If I have two RAW files, how I can test whether they are indeed the same but with merely different tags?
(By "the same" I mean "the same data from the sensor".)
If it matters, the format I'm thinking about is ARW.
If I have two RAW files, how I can test whether they are indeed the same but with merely different tags?
(By "the same" I mean "the same data from the sensor".)
If it matters, the format I'm thinking about is ARW.
Use dcraw with the -D option to extract just the non-interpolated pixel data from each file. This will result in a .pgm file — a grayscale map — which you can then compare (using them cmp command in Linux for bytewise compare, or by making a checksum, or whatever else). I think this should be exactly what you want, since all metadata is discarded, and the format is very simple.
It's possible that two different programs which generate pgm files would use a slightly different format resulting in a different output (since there can be whitespace and comments), but I'm pretty sure that the results from dcraw will have nothing that varies other than actual differences in image data.
I grabbed the NEX-3 RAW sample from here, made a copy of it, and ran md5sum on both: same checksum. I then used exiftool to add a Subject tag to the test copy:
exiftool -subject="testing 123" test_copy.ARW
and did the checksum again, different this time. I then ran
exiftool -all= *.ARW
to remove all tags, and again generated checksums. They once again matched. This should be applicable to your situation, using any binary checksum utility. Make sure you work on copies of the files you're testing - exiftool makes backups by default, but you shouldn't rely on this.
One approach would be to compare the images in Photoshop:
Load both images into Photoshop, using the same raw conversion settings.
Copy and paste one, so you end up with them as two layers on the same document. You can then flick between the two by toggling the top layer's visibility to pick up any significant differences.
Change the blend mode on the top layer to "Difference". That will give you black pixels where the two layers are identical.
A brightness or curves adjustment will help you spot subtle differences.
I'm sure you could do something similar in any decent image editing program.
You could also try using some sort of file comparison tool that can handle binary files on the raw files themselves, but interpreting the results could be tricky.
-Wto fix the white level, but for the same image the histogram-based approach should always give the same reasult. – mattdm Aug 10 '15 at 01:47-hor one of the various-qoptions instead of-D. The practical result will really be the same, assuming (and I am) that the algorithms used are deterministic. – mattdm Aug 10 '15 at 01:55