Ask Your Question
0

Saving OpenCV images in Android

asked 2016-08-18 08:56:09 -0500

WhoAmI gravatar image

updated 2016-08-18 08:56:30 -0500

I have the Image with DrawMatches() between two Images (one from the database and the other from the user captured Image in his mobile). I need to store this Image automatically in my gallery without deletion of the prior one.

I know that on Desktop I can store using

Highgui.imwrite("C://Users//name.png", resImg);

Can anyone help me out on how to store this Image in android gallery please

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-08-18 09:31:53 -0500

berak gravatar image

updated 2016-08-18 09:33:58 -0500

you basically do the same, the main difference is the path:

 // locate your sdcard, my images are in an "ocv" subfolder:
 String folder = Environment.getExternalStorageDirectory().getPath() + "/ocv";  
 // imwrite() won't create folders though, you have to do that manually before !
 Highgui.imwrite(folder + "/" + "name.png", resImg);
edit flag offensive delete link more

Comments

Hey @berak, Thanks for your comment. The program is being executed but I can't see the Image in my Gallery. The Image is not shown in Gallery. Any word on this?

WhoAmI gravatar imageWhoAmI ( 2016-09-06 05:16:40 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-08-18 08:56:09 -0500

Seen: 172 times

Last updated: Aug 18 '16