Saving JPEG metada using OpenCV - opencv

Is there any way I could save some JPEG metadata (like Exposure Time) using OpenCV 2.4.2?
Any help would be appreciated.

You can use VideoCapture properties to retrieve information from images (frames).
I use pyexiv2 to create exif tags and write the retrieved info to those images.

Related

How to extract List - movi tag from AVI files on iOS

I am trying to retrieve RIFF data from AVI file in my iOS app. I tried to convert AVI file to NSDATA and then i have converted to NSASCIIStringEncoding and i am getting all tag as string but how to retrieve particular tag,in this case I am getting all data but as there is lots data inside it, it is tough to get data from specific tags. I want to retrieve specific data from the specific tag. Here I have enclosed screenshot which shows how data looks like on Windows computer. I have used software named AVI master to see RIFF data in windows computer .As you can see in the screenshot, I will need data associated with 03tx tag.
I tried all possible ways to read chunk by chunk and also tried Libavformat library, but no success. Is there any other way to get RIFF data associated with AVI file?
Please advise.

Save image that has been segmented in matlab

I would like to know how can we save an image that has been segmented (using fuzzy c-means method) in MATLAB where the end product are images of each cluster group. I would like to save the images to use later.
I assume you just want to save an image, this should be independent on how you produces that.
If I understood correctly you just have to use the function
imwrite(M, filename)
Where M is the matrix containing your image data. You just need to do this for each matrix/image you have.
Then you can reload the image from filename using imread.
imread(filename)
Note that if you want to specify the format for imwrite and not obtain it via the filename extension, you just to add an additional parameter as follow:
imwrite(M, filename, format)

How to realize ROI (region of interest ) in EDSDK?

I need to take picture with EDSDK and save to host only ROI of Image. Do I need to use EdsGetImage? How can I realize this? I don't understand how to use EdsGetImage.
EDSDK only provides complete, uncropped image download to Host in either JPG or CR2. You may crop once the original is downloaded and decoded. You might want to use EDSDKs internal EdsGetImage, with EdsRect and EdsSize parameters to do "cropped" retrieval from the image source.

How to update model in a paperclip processor?

I've build a processor that determine which image format is best to compress my model attached thumbnail. The processor simply build images in png and jpg and check which one is the smallest.
Since Paperclip use the original thumbnail format to build it's thumbnail style URL I had to create a field in my model to store the format of each of the styled thumbnail.
ex: thumbnail_small_content_type, would be "image/png"
In my processor I tried to save the format by using the Paperclip:attachment method : instance_write.
#attachment.instance_write "#{#style_name}_content_type", "image/#{optimised_format}"
Strangely it work perfectly when a create a new model, but failed to work when I use the paperclip method reprocess! to crop my image. Any idea how I could workaround that limitation?

Which EXIF tag to store keyword/tag for a photo?

I am developing a photo gallery which will read/write EXIF tags. I will put photo title in the EXIF tag DocumentName and description in EXIF tag ImageDescription. I also plan to use the geo-tags. But what about photo tags/categories? I want to store a space-separated string of the tags a photo is tagged with in my system. Is there any EXIF tag that is normally used for this type of information? I could write my own (i.e. PhotoTags) but I guess that is not really of any use except for internally in my system (where this information is stored in a database anyway).
I think that will want to look into IPTC and/or XMP (not entirely clear over their relation) for storing metadata about images (such as keywords/tags, title, description and so on).
There's no EXIF tag for this, but there is an IPTC "keywords" tag. JPEG can handle IPTC records, so there should be no problem.

Resources