Get focus area of focus from SONY α7 IV ILCE-7M4

Started by cerberusrei, December 29, 2022, 02:52:06 AM

Previous topic - Next topic

cerberusrei

Hi, I'm newbie to use Camera.
I'm using SONY α7 IV ILCE-7M4 + SEL2470GM2 to take photo.

However, some photo was shoot far away from target, so I would like to use a simple script to auto-zoom-in to the focus area.
I thought this information must be stored in EXIF or somewhere since it is doable and it really work when I preview the photo by camera.
But, it turns out that the information is not in standard field.

So, I tried some tools include the tool created by Harvey.
But, what I can see is something like `FocusPosition2` which is a 8bit integer.

I'm not sure how to read it.
Do you have any idea or this is totally impossible currently?

Thank you very much.

This is the information for one of the photo dumped by ExifTool.

SourceFile,/storage/9C33-6BBD/DCIM/Imaging Edge Mobile/DSC00057.JPG
ExifToolVersion,12.51
FileName,DSC00057.JPG
Directory,/storage/9C33-6BBD/DCIM/Imaging Edge Mobile
FileSize,17 MB
FileModifyDate,2022:12:27 23:28:33+09:00
FileAccessDate,2022:12:27 23:28:28+09:00
FileInodeChangeDate,2022:12:27 23:28:33+09:00
FilePermissions,-rwxrwx---
FileType,JPEG
FileTypeExtension,jpg
MIMEType,image/jpeg
ExifByteOrder,"Little-endian (Intel, II)"
Make,SONY
Model,ILCE-7M4
Orientation,Rotate 270 CW
XResolution,350
YResolution,350
ResolutionUnit,inches
Software,ILCE-7M4 v1.01
ModifyDate,2022:12:25 17:47:29
YCbCrPositioning,Co-sited
FNumber,2.8
ExposureProgram,Manual
ISO,4000
SensitivityType,Recommended Exposure Index
RecommendedExposureIndex,4000
ExifVersion,0232
DateTimeOriginal,2022:12:25 17:47:29
CreateDate,2022:12:25 17:47:29
OffsetTime,+09:00
OffsetTimeOriginal,+09:00
OffsetTimeDigitized,+09:00
ComponentsConfiguration,"Y, Cb, Cr, -"
CompressedBitsPerPixel,5
BrightnessValue,-2.1625
ExposureCompensation,0
MaxApertureValue,2.8
MeteringMode,Multi-segment
LightSource,Daylight
Flash,"Off, Did not fire"
Brightness,0
LongExposureNoiseReduction,On (unused)
HighISONoiseReduction,Normal
HDR,Off; Uncorrected image
WBShiftAB_GM,0 0
WBShiftAB_GM_Precise,0.00 0.00
CreativeStyle,Standard
ColorTemperature,Auto
ColorCompensationFilter,0
SceneMode,Standard
ZoneMatching,ISO Setting Used
DynamicRangeOptimizer,Auto
ImageStabilization,On
ColorMode,Standard
FullImageSize,7008x3944
PreviewImageSize,1920x1080
FileFormat,ARW 4.0
FlashExposureComp,0
WhiteBalanceFineTune,0
WhiteBalance,Daylight
SonyModelID,ILCE-7M4
MultiFrameNoiseReduction,Off
PictureEffect,Off
SoftSkinEffect,Off
VignettingCorrection,Auto
LateralChromaticAberration,Auto
DistortionCorrectionSetting,Off
LensType,"E-Mount, T-Mount, Other Lens or no lens"
LensSpec,FE 24-70mm F2.8 II
AutoPortraitFramed,No
FlashAction,Did not fire
ElectronicFrontCurtainShutter,On
FocusMode,Manual
AFAreaModeSetting,Center
FlexibleSpotPosition,0 0
AFPointSelected,n/a
AFPointsUsed,(none)
AFTracking,Off
FocalPlaneAFPointsUsed,0
MultiFrameNREffect,Normal
FocusLocation,7008 3944 3504 1972
VariableLowPassFilter,n/a
PrioritySetInAWB,Standard
MeteringMode2,Multi-segment
ExposureStandardAdjustment,0
RAWFileType,n/a
Quality,Extra Fine
PixelShiftInfo,n/a
Shadows,0
Highlights,0
Fade,0
SharpnessRange,+3
Clarity,+1
FocusFrameSize,n/a
JPEG-HEIFSwitch,JPEG
FlashLevel,Normal
ReleaseMode,Normal
SequenceNumber,Single
Anti-Blur,On (Shooting)
IntelligentAuto,Off
SequenceFileNumber,1
SequenceLength,1 file
CameraOrientation,Rotate 270 CW
Quality2,JPEG
ISOSetting,4000
ISOAutoMin,125
ISOAutoMax,12800
AFAreaMode,Manual
FocusPosition2,165
Tag9416_0000,  3
SonyISO,4039
StopsAboveBaseISO,5.3
SonyExposureTime2,1/81
ExposureTime,1/80
SonyFNumber2,2.9
SonyMaxApertureValue,2.9
SequenceImageNumber,1
LensFormat,Full-frame
LensMount,E-mount
LensType2,Unknown E-mount lens or other lens
DistortionCorrParams,1 2 8 18 32 50 73 100 132 169 211 257 308 363 422 484
PictureProfile,Gamma Still - Standard/Neutral (PP2)
FocalLength,70.0 mm
MinFocalLength,24.0 mm
MaxFocalLength,70.0 mm
VignettingCorrParams,0 128 480 960 1536 2144 2752 3360 4000 4640 5312 6080 7072 8352 9984 11808
ChromaticAberrationCorrParams,-92 -90 -91 -92 -97 -102 -110 -117 -129 -145 -166 -188 -215 -245 -281 -324 -471 -470 -469 -467 -465 -463 -459 -454 -448 -443 -437 -429 -420 -411 -402 -388
BatteryTemperature,21.7 C
BatteryLevel,13%
LensMount2,E-mount
LensType3,Sony FE 24-70mm F2.8 GM II
CameraE-mountVersion,1.80
LensE-mountVersion,1.60
LensFirmwareVersion,Ver.01.000
Shutter,Mechanical (2949 5299 6620)
FlashStatus,No Flash present
ShutterCount, 13583
ShutterCount2,13583
SonyExposureTime,1/81
SonyFNumber,2.9
ReleaseMode2,Normal
InternalSerialNumber,1fff00009209
UserComment,
SubSecTime,552
SubSecTimeOriginal,552
SubSecTimeDigitized,552
FlashpixVersion,0100
ColorSpace,sRGB
ExifImageWidth,7008
ExifImageHeight,3944
InteropIndex,R98 - DCF basic file (sRGB)
InteropVersion,0100
FileSource,Digital Camera
SceneType,Directly photographed
CustomRendered,Normal
ExposureMode,Manual
DigitalZoomRatio,1
FocalLengthIn35mmFormat,70 mm
SceneCaptureType,Standard
Contrast,Normal
Saturation,Normal
Sharpness,Normal
LensInfo,24-70mm f/2.8
LensModel,FE 24-70mm F2.8 GM II
CompositeImage,Unknown
PrintIMVersion,0300
Compression,JPEG (old-style)
ThumbnailOffset,39664
ThumbnailLength,7561
Rating,0
MPFVersion,0100
NumberOfImages,2
MPImageFlags,Dependent child image
MPImageFormat,JPEG
MPImageType,Large Thumbnail (full HD equivalent)
MPImageLength,183352
MPImageStart,17031168
DependentImage1EntryNumber,0
DependentImage2EntryNumber,0
ImageWidth,7008
ImageHeight,3944
EncodingProcess,"Baseline DCT, Huffman coding"
BitsPerSample,8
ColorComponents,3
YCbCrSubSampling,YCbCr4:2:2 (2 1)
Aperture,2.8
ImageSize,7008x3944
LensID,Sony FE 24-70mm F2.8 GM II
Megapixels,27.6
ScaleFactor35efl,1.0
ShutterSpeed,1/80
SubSecCreateDate,2022:12:25 17:47:29.552+09:00
SubSecDateTimeOriginal,2022:12:25 17:47:29.552+09:00
SubSecModifyDate,2022:12:25 17:47:29.552+09:00
ThumbnailImage,"(Binary data 7561 bytes, use -b option to extract)"
PreviewImage,"(Binary data 183352 bytes, use -b option to extract)"
FocusDistance2,2.85 m
CircleOfConfusion,0.030 mm
FOV,28.8 deg
FocalLength35efl,70.0 mm (35 mm equivalent: 70.0 mm)
HyperfocalDistance,58.24 m
LightValue,4.0

Phil Harvey

I would guess that FocusPosition2 probably gives the position of the focus ring on the lens.  I doubt this is what you want.  If you want to zoom in to the focus area, maybe you want to look at FocusLocation, but you will have to do some experimenting to see what this represents.  I don't own an a7 so there isn't much more help I can provide here.  I rely on people that own these cameras to determine the meanings of these tags.

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

greybeard

Having spent time working on Fujifilm cameras and writing apps to show focus position I'd suggest you run your exiftool command with the -u command so that you also see tags which have not yet been decoded.

A pair of values might be the focus point - mapped onto the sensor area.

When there are sets of four - four digit - values (such as FocusLocation) they are often face / eye / subject detection coordinates.

Focuslocation (7008 3944 3504 1972) in this case seems to indicate a quadrant of the sensor area (7008x3944) so not sure what this means.

Its going to be a matter of trial and error - shooting an image - looking where the camera thinks you have focussed and looking for exif tags which map to the same point.

(Unless someone else responds who has already done the work for Sony cameras - there must be someone)

cerberusrei

Thanks Phil and Greybeard.

I checked FocusLocation before, and I found the values are always the same, even for the the photo which target is not in center part of photo. (First two is the width and height, later two are always the same but I don't know why...)
It surprised me because I thought it is what I want when I see it first time.

Value of FocusPosition2 is different for each photo, but I have no idea how to convert it into at least two points for the focus area.

I will try more photo and see if I can see different values, and try exiftool with -u to check the detail.

Let me update if I found any clues.