Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to save image into specific location and the name?

 imwrite("C:/Users/Uname/source/repos/project5/x64/Debug/outImg/normlized.jpg", normlized);

I want to get the image path from the imread function saves the name as the following example:

Mat src=imread(argv[1], CV_LOAD_IMAGE_UNCHANGED);

If the loaded image name is "image1.jpg", then I want to save an image as "image1_normalized.jpg". "image1" is the name of the loaded image and the "_normalzed" is the added part by me.

Save location: "C:/Users/Uname/source/repos/project5/x64/Debug/outImg" something like this.