Main Menu

Detect camera type

Started by surfer, May 19, 2011, 07:57:49 AM

Previous topic - Next topic

surfer

Hi,

I was wondering if there is any way to detect a camera/lens type. E.g. if a camera is a SLR or point and shoot camera. I am trying to extract lens information and I am only interested in lenses from SLR cameras. For point and shoot cameras I a getting data like "Unknown 4-17mm" which is not very nice to display.

Any suggestions?

Thanks!

Phil Harvey

I considered changing "Unknown 4-17mm" to "Built-in 4-17mm" but would have to determine if the camera had a built-in lens or not.  For Canon cameras, I suppose the CameraType tag could be consulted.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

surfer

Thanks for your reply!

Would it be correct to say that when the word "Unknown" is present it's always a built in lens or an unknown SLR lens?
If this is consistent then I could simple detect if the word exists and dismiss that lens.

What do you think?

Thanks!

Phil Harvey

Yes, that is correct.  (I can't think of any other possibilities.)

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).