How to save image into specific location and the name? [closed]

asked 2019-04-29 12:13:21 -0600

hua gravatar image
 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.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-10-15 14:30:36.259065

Comments

Does this help? imwrite("normlized.jpg", normlized);

supra56 gravatar imagesupra56 ( 2019-04-29 13:25:24 -0600 )edit

Sorry! It doesn't help.

hua gravatar imagehua ( 2019-04-30 11:02:07 -0600 )edit

take a look at this i hope it gives enough clue about what you need to do

sturkmen gravatar imagesturkmen ( 2019-04-30 13:28:55 -0600 )edit

Thank you! I will try it, sir.

hua gravatar imagehua ( 2019-05-02 04:15:12 -0600 )edit