Exif with Highgui.imwrite(filename, myMat); ?
In need to insert some exif tag in a jpg image.
I can't find an easy way to do that.
In need to insert some exif tag in a jpg image.
I can't find an easy way to do that.
Asked: 2013-09-23 09:40:47 -0600
Seen: 3,904 times
Last updated: Sep 24 '13
you can't with opencv. neither read nor write
The EXIF support is even an open feature request. Best way to get it into the sourcecode, is to come up with a pull request :)
However, an idea could be to use an external library for that, and then store the data somewhere. Libexif does exactly that.
I already tried libexif before, but that need to much step :
1) opencv write the mat to jpeg 2) java read this new jpeg 3) libexif apply exif 4) finally write a second time the jpeg.
Source code is native and cant modifiy it for #java#opencv
Is there a reason why you are using the java interface? Because the libexif is C - based and could be easily integrated in a simple workflow with openCV C++ interface. I do not know why you should write the JPEG twice... You can store it as a temporarily element in memory, removing the need of all those abundant read and write operations.
I use Java because I use it an android platform development. libexif exist for java as library. I can use Highguy.imencode to have a Buffer, but how i can handle it with libexif ?
Have no experience in Java, will have to find someone else for that :)
Sure. Even if you can do many things, I think you cant do that. And a library that can read / write metadata IPTC/EXIF from a buffer will be the best.