Hello, I am wondering if anyone has tips to extract camera name or serial number from image files. We have a situation where images from multiple cameras got mixed up on an SD card, and we aren't able to separate them easily by date (because they overlap) or filename (they're just generic filenames currently). If this weren't thousands of images, I would do it by hand, but I'd like to find an easier way!
These are images from Bushnell trail cameras. I don't see anything resembling serial number or camera name in the EXIF data; the closest I can find is the "ImageDescription" field, which has values that are unique between cameras but one camera can have multiple values here, so it's not super straightforward.
Fortunately, the cameras were named manually so the image stamps do have unique names on them (e.g., Camera1, Camera2). My next idea is to try something like this to read the text using character recognition and separate them that way. But, I am wondering if I have overlooked a much simpler solution. Does anyone have tips?
Thank you!
11 February 2025 3:03am
Exiftool should be able to extract information if it exist in the files. ImageDescription and MakerNote and similar fields often contain manufacturer specific info in a somewhat obscured non standard format.
DM me and I can see if I can help with samples of your files - no promises though :-)
You might get better responses with a post of this same question on exiftool.org/forum/

Akiba
Freaklabs
11 February 2025 3:09am
I was going to recommend ExifTool but then realized there doesn't seem to be any specific Exif tag format for Bushnell. Beynd that, I don't know of any way to categorize the data other than going through the images/videos and classifying them by their background imagery. If the files have unique prefixes on them, then it "shouldn't be too difficult" although I also realize those are famous last words.
12 February 2025 4:29am
It sounds like you've exhausted everything exiftool can do, in which case, YMMV, but I have a module that uses a combination of OpenCV and PyTesseract to pull metadata from the actual pixels:
https://github.com/agentmorris/MegaDetector/blob/main/megadetector/data_management/ocr_tools.py
Documentation for this module is here:
https://megadetector.readthedocs.io/en/latest/data_management.html#module-megadetector.data_management.ocr_tools
I have only really used this to extract time and date; my goal was to make it as robust as possible for time and date over a wide variety of manufacturers, rather than to find a wide variety of text. But I expect it would be relatively straightforward to tune for a single bit of metadata and a single manufacturer. I'm not sure whether it's worth literally using this module vs. just looking at the code and using that as a starting point, or using the similar R example you linked to, but FWIW, if you try it out and get stuck, send me a few images by email and I'll see if I can tune it a bit to get what you need.
Good luck!
-Dan
HeinrichS