Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

jpeg header info

I am trying to gfigure out if it is possible to get the header info out of a jpeg file from a digital camera.  The header info includes the focal length which I would like to use to scale my images.  I can do it with a litte command prmt program, but would like to stream line it into my Labview application if it doesn't require too much work.
Any suggestions?
Read JPEG File pulls some of this info, but not all of it, and not the stuff I need.
Cheers.
AZ
0 Kudos
Message 1 of 3
(4,397 Views)
AZ,
 
Thank you for your post.  As you mentioned, a lot of the JPEG information is returned to you by the "Read JPEG File.vi".  If you would like to have access to the entire header file, it may be possible to parse through the binary data using the "Read From Binary File.vi" (there are no other IMAQ or Vision functions that will give you access to any more information in the JPEG header).  This will not be trival, as you will need to know the exact format the JPEG image is stored in and how to interpert the binary data in the header.  You can then interpert the binary data as need to extract the entire header.
 
Thanks,
 
Scott Savage
National Instruments
Applications Engineering
 
0 Kudos
Message 2 of 3
(4,385 Views)

You can easily find the structure of the Exif data in the Jpeg image by using Google.  I searched for "exif header data format".  You will have to dig a little, but it should be fairly easy to read one or two parameters that you are interested in.  All you will have to do is read the file in binary format, then search for the appropriate tags that you are interested in.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 3 of 3
(4,379 Views)