BSI-OFIQ / OFIQ-Project

Open Source Facial Image Quality
Other
36 stars 9 forks source link

Handling of exif tag 274 (=0x112) is inaccurate #38

Open tadam98s opened 1 month ago

tadam98s commented 1 month ago

I have tested 3000 images with exif Rotation Tag not equal {1,0}. The application failed to detect many faces. I have applied https://stackoverflow.com/questions/27835064/get-image-orientation-and-rotate-as-per-orientation, and, then, set tag 274 to (1,0) to get the correctly un-rotated un-flipped umage.

After this ALL 3000 faces were detected.

I would suggest that in case tag 274 <> (0,0) or (1,0) that the image be un-rotated first in preprocessing and then proces sthe larameters. Just fix the "detected" angle accordingly. The suggested un-rotate also un-does the "flip" if there is one in the exif header.

Best, Mickey

tadam98s commented 3 weeks ago

I believe it is an essential fix as the images we are all getting now come from cellphones and not from professional cameras. and cellphones reflect the phone holding position in the jpeg exif flag 274: phone held horizontal left or right, flipped or both. Such is life. So it is best to first "correct" the image to its tru orientation and then do the processing.