modified with OpenCV for image r/w
change output file name