Select all pics with a certain serial number in the EXIF data

Started by hanswkraus, September 07, 2018, 11:16:44 AM

Previous topic - Next topic

hanswkraus

Hi,
at least with my Canon cams I get a serial numer in the EXIF data, an example as reported by IrfanView: "Camera Serial Number - 830404993 (317E63873)".
Now I would like to select all pics with that serial number '830404993'. I thougt of using a category formula like that example I got for a former request: "@MetadataTag[Exif::Main\37386\FocalLength,between,0,10]" but with another tag, of course.

I used "@MetadataTag[photools.com::IMatch\1501\cameraserialnumbercomp\0,contains-any,830404993]". The tag "photools.com::IMatch\1501\cameraserialnumbercomp\0" was the only one I found using the search.

But alas, it doesn't work. It doesn't find any pic and there should be at least one?

Any help appreciated,
kind regards,
Hans

hanswkraus

Hi,

I checked it with pics for which I still have the body: that  "Camera Serial Number" is the same as engraved in the body.

Kind regards,
Hans

zematima

Hi:
Have you tried this?
Go to:
Edit / Preferences / Metadata2 and in the righr bottom choose Tag Manager
Then on the left go down until you find some Canon models and other Canon stuff.
Maybe you have luck.
Best regards,
JRosa



Mario

1.  cameraserialnumbercomp was introduced in IMatch 2018 and as outlined in the initial IMatch 2018 release notes is filled only for files which are added / updated to the database with IMatch 2018. IMatch does not rescan all files in your database to fill this special tag. See the release notes for details, just search for cameraserialnumbercomp.

2.  Camera serial number is not a mandatory or standard EXIF metadata tag. Many camera vendors bury this information somewhere in the proprietary maker notes.

Check:

A)

Can you see the tag when you switch the Metadata Panel to browser mode? In that case, IMatch has imported the data for this tag. In that case you can just search for the serial number with the file window search bar (even in your entire database) or you can create a data-driven category based on that tag to automatically group your files by camera body.

B)

1.  If you cannot see the tag, you need to find out which tag contains the serial number for your specific camera model and firmware. Different Canon bodies store this data in different tags.
You can look at one of your files in the Exiftool Command Processor. Use the "List Metadata" preset then search for the maker note that contains the data.

2.  As zematima pointed out above, you then open the Tag Manager in IMatch and enable the tag(s) you want to import in addition. By default IMatch imports only important and frequently used tags, but leaves out proprietary maker notes. These are not intended to be used by humans and would only increase the database size and reduce performance.

See https://www.photools.com/help/imatch/#rmh_config_metadata_tagman.htm in the IMatch help for details. Reload the metadata of affected files with Shift+Ctrl+F5 afterwards.

Once IMatch has imported the tag containing the serial number for your cameras you can do the tasks described in A) above.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hanswkraus

Thanks for all the help.

I discovered that "exiftool -serialnumber {filename}" gives the serial number of the body.

Is it possible to use that ExifTool output to fill a data driven category? If yes, how do I do it?
If no: is it possible to implement such a thing?

Kind regards,
Hans

Mario

As I said, just identify the tag for your camera. Did you read me instructions above?
Do you see the serial number in the metadata panel in browser mode?
Usually the tag is named Internal Serial Number for Canon. Or Serial Number


If not you need to enable the tag in the IMatch Tag Manager to use it. IMatch does by default not import most maker notes.

You cannot fill the output of a command line application into a data-driven category.
Which tag is used when you use that command line parameter? ExifTool will show it when you us the -G1 option, for example.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hanswkraus

Hi,

I tried the "Tag Manager" again and found the things I appended as part of a screen copy. As far as I can see all metadata is imported.

With ExifTools I got:
I:\Daten\Foto\Eigene\Raw\2010\2010_04_17>exiftool -serialnumber -G1 20100417_173516_CRW_8735.CRW
[CanonRaw]      Serial Number                   : 0830303342

Looking at the complete ExifTool info I found:
...
[CanonRaw]      Camera Model Name               : Canon EOS 10D
[CanonRaw]      Serial Number                   : 0830303342
[CanonRaw]      Base ISO                        : 100
...

But where I am at a complete loss is formulating the correct tag string for it. If I use a category formula the only accepted tag is "@MetadataTag[Exif::Main\42033\SerialNumber\0,...". And, at least with "between,0,2830404999]" as selecting statement,
doesn't find any Canon *.CRW or *.CR2 files at all.

And when I try to use a data driven category the only accepted tag is (as stated already above) "photools.com::IMatch\1501\cameraserialnumbercomp\0".

Kind regards, Hans

Mario

I have asked this above several times: Do you see the serial number in the Metadata Panel when you switch to browser mode?

If so, you know the tag name. When you move the mouse over the header of the tag in the Metadata Panel, IMatch displays the fully qualified tag name.



You can also right click and use "Copy as Variable" if you want to use the variable or you need the tag name copied into the clipboard.

When I understand you correctly, you just want to search for files with a specific serial number? Then use the "Everywhere" mode in the file window search bar, select the database node in the Media & Folders View and enter the serial number in the search bar. This will show all files in your database which contain the specified serial number.

Or do you want a data-driven category to group your files by camera? Then use the tag you found out in the Metadata Panel as per my instructions above.

In your last post you seem to want to create a @Metadata category formula which shows only files with a specific serial number. Is his correct?

This is easy. I used "@MetadataTag[Canon::Main\12\SerialNumber\2,contains-any,12345]" to fill the category with all files having the serial number 12345.

Again, the name name used in the formula comes straight from the Metadata Panel. I used the "Copy as Variable" command which copies {File.MD.Canon::Main\21\SerialNumberFormat\0} into the clipboard. For the category formula I removed the {File.MD. and the final } to get the plain tag name: Canon::Main\12\SerialNumber\2

The name of the tag you have to use will vary, depending on the camera model. Canon uses at least 10 different metadata fields to store the serial number and ExifTool maps these fields to tags with different names.

Note: @Metadata formulas are slow, compared to data-driven categories. Use them sparingly and create the formula category as the child of another category so you can collapse the parent when you don't need the formula category. This avoids continuous recalculations whenever something in your database changes.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hanswkraus

Hi Mario,

sorry, I mixed up Tag Manager and Metadata Browser. I do see "{File.MD.Canon::Main\12\SerialNumber\2}" (copied as variable name from the Metadata Browser).

I used your example (adapted for another variable name) and it worked. Many thanks. I wasn't shure how to compare numerical values.

When I copy the variable name from the Metadata panel I get {File.MD.Canon::Main\150\InternalSerialNumber\1}. As I understand you, one simply cuts the curly braces and the "File.MD." to get the tag?

And a last question: when I try to use a data-driven category, neither "Canon::Main\12\SerialNumber\2" as tag nor "{File.MD.Canon::Main\12\SerialNumber\2}" as variable does work. Where do I find the correct syntax?

Kind regards,
Hans







Mario

QuoteAs I understand you, one simply cuts the curly braces and the "File.MD." to get the tag?

Precisely.

QuoteWhere do I find the correct syntax?

When you select the tag from the Tag Browser (click on the ... button next to the tag field), the syntax will be correct.


-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook