Need jump start to become a "decoder"

Started by capricorn, February 22, 2025, 05:18:57 AM

Previous topic - Next topic

capricorn

I have been spending one hour with searching this forum and asking my AI pal, trying lots of different things. None of it works, so I see no other way than to ask for help here.

I am planning to get into decoding for my OM-1 camera. However, there is practical use case in the Fuji area now that requires similar tools to be applied and I'm already struggling with this.

Background: I have distributed a pre-release of my focus points plugin to a Fuji Forum. I got a question why for the X100VI there is no display of Image Stabilization under Camera Settings. I checked EXIF data, and this camera indeed doesn't seem to have this information in EXIF output. The relevant FujiFilm tag 0x1422 also isn't part of "-u -v2" output:

  | | | 52) FujiFilm_0x1409 = 0100
  | | |     - Tag 0x1409 (4 bytes, undef[4])
  | | | 53) FujiFilm_0x140a = 19
  | | |     - Tag 0x140a (2 bytes, int16u[1])
  | | | 54) FujiFilm_0x1424 = 4096
  | | |     - Tag 0x1424 (2 bytes, int16u[1])
  | | | 55) FujiFilm_0x1430 =
  | | |     - Tag 0x1430 (129 bytes, undef[129])

So, I generated a "-U args" output, hoping this way I could access any position/range I wanted in makernotes (then, interpreting its content in a defined format).

However, I struggled in accessing the unknown tags. Example:

...
-FujiFilm_RAFData_0x0006=84
-FujiFilm_RAFData_0x0007=83
-RawImageWidth=7752
-RawImageHeight=5184
-FujiFilm_RAFData_0x0010=72
-FujiFilm_RAFData_0x0011=30
...

[D:\FocusPoints\Fuji\X100VI]exiftool -RawImageWidth DSCF0103.RAF
Raw Image Width                 : 7752

[D:\FocusPoints\Fuji\X100VI]exiftool -FujiFilm_RAFData_0x0010 DSCF0103.RAF

[D:\FocusPoints\Fuji\X100VI]

I would have expected an output like "FujiFilm_RAFData_0x0010   :   72" but it's empty. Why is that?

Let's assume "FujiFilm_RAFData_0x1422" would be the right way to address the first byte of the 6-byte area (int16u[3]) where Fuji stores ImageStabilization information.

How would I need to setup a config file, so that ExifTool interprets these 6 bytes according to the expected format (as per FujiFilm.pm):

    0x1422 => { #8
        Name => 'ImageStabilization',
        Writable => 'int16u',
        Count => 3,
        PrintConv => [{
            0 => 'None',
            1 => 'Optical', #PH
            2 => 'Sensor-shift', #PH (now IBIS/OIS, ref forum13708)
            3 => 'OIS Lens', #forum9815 (optical+sensor?)
            258 => 'IBIS/OIS + DIS', #forum13708 (digital on top of IBIS/OIS)
            512 => 'Digital', #PH
        },{
            0 => 'Off',
            1 => 'On (mode 1, continuous)',
            2 => 'On (mode 2, shooting only)',
        }],

I have tried different things, but the best I could get was a config file free of syntax errors, but (again) leading to empty output.

Even if the steps and effort I'm describing here are not needed in this case because there may be a quick and easy way how to fix this particular issue -

I would really like to know what I need to do in order to make exiftool display any makernotes tag/byte range in whatever format I think might be relevant for that range.

Thanks,
Karsten

StarGeek

Quote from: capricorn on February 22, 2025, 05:18:57 AMHowever, I struggled in accessing the unknown tags. Example:
...
I would have expected an output like "FujiFilm_RAFData_0x0010  :  72" but it's empty. Why is that?

You need to include the -u (-unknown) option in order to list unknown tags.

Example, here's a snippet from the output of a NEF file
C:\>exiftool -G1 -a -s -makernotes:all -u Y:\!temp\DSC_6983.NEF
<snip>
[Nikon]         Nikon_0x00a3                    : 0
[Nikon]         Nikon_0x00a4                    : 0300
<snip>

C:\>exiftool -G1 -a -s -Nikon_0x00a3 Y:\!temp\DSC_6983.NEF

C:\>exiftool -G1 -a -s -u -Nikon_0x00a3 Y:\!temp\DSC_6983.NEF
[Nikon]         Nikon_0x00a3                    : 0

QuoteLet's assume "FujiFilm_RAFData_0x1422" would be the right way to address the first byte of the 6-byte area (int16u[3]) where Fuji stores ImageStabilization information.
...
I would really like to know what I need to do in order to make exiftool display any makernotes tag/byte range in whatever format I think might be relevant for that range.

Your first output shows that tag FujiFilm_0x1422 doesn't exist. It won't suddenly exist even if you make a config file to read it.

Camera companies are constantly changing the format of the Makernotes from model to model. ImageStabilization may exist in the file in a new location, but may simply be unknown at this point. It's also quite possible that they decided to drop the data completely.

You might try to figure out if the data exists. You would need to set the camera in a stable position, take a picture, change the setting, take another picture, etc. You want it to be stable so as few changes as possible will appear from image to image. For example, put something directly in front of the lens.

You would then run this on each of the resulting files
exiftool -G1 -a -s -u -Fugifilm_* file.jpg

D'oh, forgetting about the -diff option
exiftool -G1 -a -s -u -Fugifilm_* -diff file2.jpg file.jpg

Compare the results to see what changes. If you have a possible tag, use the -v option to see the format is similar.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

greybeard

Best of luck in identifying the image stabilization tags for the X100VI

In addition to the great advice from StarGeek I would add the following:

- the correct command for checking differences depends on your operating system
under MacOS the command would be :

exiftool -a -G1 -u -s '-FujiFilm_0x*' -diff file1.JPG file2.JPG

- you can ignore the -FujiFilm_RAFData tags - they are specific to raw files and image stabilization will almost certainly be stored in both jpg and raw files

The key tags may be 0x1449, 0x144a and/or 0x144c but I've not yet been able to definitely interpret their meanings.

The best way to view these tags is to convert the decimal values to hex as its likely that the tag values contain more than one meaning.

As an example tag 0x1449 is shown by Exiftool as a 4 byte decimal such as 251723949 (0xad00010f) but its likely that only the first byte changes.

Which Fujifilm forum did you use to distribute your plug-in?

StarGeek

Ah, yes, my mistake. An asterisk as a tag wildcard should be quoted on Mac/Linux.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

capricorn

Quote from: StarGeek on February 22, 2025, 10:14:41 AMYou need to include the -u (-unknown) option in order to list unknown tags.

Many thanks for your reply and sorry for my late response!
Sure, -u - I could have come up with it myself ::) ;D

Quote from: StarGeek on February 22, 2025, 10:14:41 AMYour first output shows that tag FujiFilm_0x1422 doesn't exist. It won't suddenly exist even if you make a config file to read it.

Got it. I guess my mistake was to think that "0x1422" in FujiFilm_RAFData_0x1422 stands for an offset in memory range, in between FujiFilm_0x140a and FujiFilm_0x1424.

The basics how to take images to use with decoding are clear to me, and this worked for me in the past at least with simple settings.

Completely independent of that particular Fuji 'Image Stabilization' setting -

If I think I have identified an unknown tag which does not have a trivial format, can I use a config file with the assumed definition of that tag to make exiftool use that definition for its output? I was thinking about this approach to be able to crosscheck whether my hypothesis is true for other image files as well.

Does the tag definition in a config file follow the same syntax as it is used in the .pm files which are part of exoftool?

capricorn

Quote from: greybeard on February 22, 2025, 03:18:31 PMBest of luck in identifying the image stabilization tags for the X100VI

I guess without having access to this camera this will be an impossibility 😄

With the plugin being in pre-release status, I have only distributed this in a few German forums. Here is the link to my post in Fuji X Forum.

In this post the question came up why for X100VI there is no display of 'Image Stabilization'. When it turned out that this tag is not known for this camera, I thought I'd give it a quick look and maybe I can do some pre-work to motivate people to engage and decode. Neither one nor the other has worked 😄

BTW, nice to meet you in this forum. I have seen your username in the comments of FujiFilmDelegates as author of face/subject and crop frame detection for Fuji. Well done 👍👍 With this, Fuji captures are the flagship images for the plugin: https://github.com/capricorn8/Focus-Points/tree/develop.

StarGeek

Quote from: capricorn on March 10, 2025, 10:20:20 AMDoes the tag definition in a config file follow the same syntax as it is used in the .pm files which are part of exoftool?

See the example.config file for details. There are more complex examples on the exiftool github.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

Quote from: capricorn on March 10, 2025, 10:20:20 AMDoes the tag definition in a config file follow the same syntax as it is used in the .pm files which are part of exoftool?

Basically, yes.

- 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 ($).