How to get the exposure time of a camera when an images is clicked using opencv?

780 Views Asked by At

Is it possible to get the exposure time of a camera when a photo is clicked. In opencv at the time of video it can be set and get using CV_CAP_PROP_EXPOSURE in Capture property function. But in case of images how how we can get it ?

Thanks

1

There are 1 best solutions below

0
On

For images, I would suggest to use lightweight easyexif to extract the exposure time.

Example:

EXIFInfo result;
result.parseFrom(JPEGFileBuffer, BufferSize);
...
printf("Exposure time: 1/%d s\n", (unsigned) (1.0/result.ExposureTime));