Giter Site home page Giter Site logo

s_afv's Introduction

Visualizer of AF data from Sony cameras JPEG and ARW (RAW) EXIFs

alt text

This tool allows to visualize some statuses of PDAF sensors or CAF stored in EXIF metadata of JPEGs and RAW (ARW) from Sony cameras. Auto focus statuses are parsed from EXIF and presented as ExifTool interprets them. I.e. this tool show where are focus points.

Most recent standalone single file (extracts all libs and runtime to temp folder, no python installed required) Win x64 version download link (no exiftool.exe included)

Win64 executable download

With this tool you can see:

  • For SLT cameras with 15-points PDAF (SLT-A33, SLT-A55, SLT-A35, SLT-A65, SLT-A57, SLT-A58):
    • AF hit status for each sensor at shutter release. AF hit displayed by colors from black to white. Black = out of focus. White = In Focus
    • If Face Detection was on, and Face(s) detected - they are highlighted with red frame
    • What AF points were used for final focus adjustments (have additional RED frame)
    • What AF point was reported as in Focus (Yellow circle)

alt text

  • For SLT cameras with 19-points PDAF (SLT-A77, SLT-A99):

    • AF hit status for each sensor at shutter release. AF hit displayed by colors from black to white. Black = out of focus. White = In Focus
    • If Face Detection was on, and Face(s) detected - they are highlighted with red frame
  • For CAF cameras (for example, DSC-RX100M4, DSC-RX10M3 and many other older Cybershots)

    • If Face Detection was on, and Face(s) detected - they are highlighted with red frame
    • What area was reported as in Focus (Yellow circle). Actually what camera thinks it focused at.
  • For Hybrid AF cameras (like ILCE-5100, ILCE-6000, ILCE-6300, ILCE-6400, ILCE-6500, ILCE-7RM2,ILCA-99M2, ILCA-77M2, ILCE-9, ILCE-7RM3, ILCE-7M3, DSC-RX100M6, DSC-RX10M4, DSC-RX100M7 and ILCE-7RM4)

    • If Face Detection was on, and Face(s) detected - they are highlighted with red frame
    • What area was reported as in Focus (Yellow circle). Actually what camera thinks it focused at.
    • What Focal Plane (on-sensor) AF points were used
    • Eye detection marker (when Eye AF used, no DPAF points data stored in exif, only Eye and Face positions recorded)
    • [ILCA-77M2, ILCA-99M2] Also Dedicated PDAF sensors statuses display

Reads both JPEG/ARW

This tool consists of:

  • afv.py - main script itself doing all drawing.
  • exiftool (should be downloaded separately (link below) and named as exiftool.exe and placed in the same folder as afv.py

Note: For easy use downloaded compiled already package)

Prerequisities for launching source script:

  • Python 3.7 (code rewritten from Python 2.7 as it will be discontinued)
  • matplotlib module installed (http://matplotlib.org/ or pip install matplotlib)
  • rawpy (pip install rawpy) to read and render Sony RAW - ARW files)
  • pillow (pip install pillow or pip install pillow-simd) to load and show JPG
  • Phil Harvey's EXIFTool binary (named exiftool.exe) to be placed in the same folder as afv.py script. Exiftool download (http://www.sno.phy.queensu.ca/~phil/exiftool/)

Warning! You will get no results or corrupted results if you JPEG photos (their EXIF) were modified or by image processing software. So please use JPEGs straight from the camera.

s_afv's People

Contributors

sk-hardwired avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

s_afv's Issues

OSX - High Sierra support

Would love to see this adapted to work on OSX, specifically High Sierra. I don't know enough python to fix this but I am able to at least get the UI to launch with Python 2.7. However, when I click Open and chose the file nothing else happens or displays.

Windows 10 - not working

On Windows 10 seems ta app not working, after selecting file to open I have white screen, no photo is displayed.

No AF information for Sony ILCE-6000

Hi,

The tool returns "Focal Plane AF points used = 0".

Exiftools seems to return no info.
Running exiftool from the cmdline gives:

ExifTool Version Number         : 12.40
File Name                       : DSC04768.ARW
Directory                       : FocusTest
File Size                       : 24 MiB
File Modification Date/Time     : 2022:02:27 04:14:30-08:00
File Access Date/Time           : 2022:02:27 02:14:38-08:00
File Creation Date/Time         : 2022:02:27 02:14:38-08:00
File Permissions                : -rw-rw-rw-
File Type                       : ARW
File Type Extension             : arw
MIME Type                       : image/x-sony-arw
Exif Byte Order                 : Little-endian (Intel, II)
Subfile Type                    : Reduced-resolution image
Compression                     : JPEG (old-style)
Image Description               : 
Make                            : SONY
Camera Model Name               : ILCE-6000
Orientation                     : Horizontal (normal)
X Resolution                    : 350
Y Resolution                    : 350
Resolution Unit                 : inches
Software                        : ILCE-6000 v3.21
Modify Date                     : 2022:02:27 12:14:30
Subfile Type                    : Full-resolution image
Image Width                     : 6048
Image Height                    : 4024
Bits Per Sample                 : 12
Compression                     : Sony ARW Compressed
Photometric Interpretation      : Color Filter Array
Samples Per Pixel               : 1
Planar Configuration            : Chunky
X Resolution                    : 350
Y Resolution                    : 350
Resolution Unit                 : inches
CFA Repeat Pattern Dim          : 2 2
CFA Pattern 2                   : 0 1 1 2
Sony Raw File Type              : Sony Compressed RAW
Sony Tone Curve                 : 8000 10400 12900 14100
Strip Offsets                   : 487424
Rows Per Strip                  : 4024
Strip Byte Counts               : 24337152
Vignetting Correction           : Off
Vignetting Corr Params          : 11 0 64 192 320 512 704 1152 1984 3328 5184 7744 0 0 0 0 0
Chromatic Aberration Correction : Off
Chromatic Aberration Corr Params: 22 1152 1152 1024 1024 896 768 768 640 512 384 256 -384 -384 -384 -256 -128 0 128 256 384 512 640 0 0 0 0 0 0 0 0 0 0
Distortion Correction           : Off
Distortion Corr Params          : 11 -7 -4 -13 -29 -57 -92 -142 -201 -280 -377 -503 0 0 0 0 0
Preview Image Start             : 143522
Preview Image Length            : 341306
Y Cb Cr Positioning             : Co-sited
Exposure Time                   : 1/200
F Number                        : 2.8
Exposure Program                : Manual
ISO                             : 500
Sensitivity Type                : Recommended Exposure Index
Recommended Exposure Index      : 500
Exif Version                    : 0230
Date/Time Original              : 2022:02:27 12:14:30
Create Date                     : 2022:02:27 12:14:30
Components Configuration        : Y, Cb, Cr, -
Compressed Bits Per Pixel       : 8
Brightness Value                : 3.36875
Exposure Compensation           : 0
Max Aperture Value              : 1.4
Metering Mode                   : Multi-segment
Light Source                    : Unknown
Flash                           : Off, Did not fire
Focal Length                    : 30.0 mm
Rating                          : 0
Contrast                        : 0
Saturation                      : 0
Sharpness                       : 0
Brightness                      : 0
Long Exposure Noise Reduction   : Off
High ISO Noise Reduction        : Off
HDR                             : Off; Uncorrected image
WB Shift AB GM                  : 0 0
Face Info Offset                : 94
Sony Date Time                  : 2022:02:27 12:14:30
Sony Image Height               : 4000
Sony Image Width                : 6000
Faces Detected                  : 0
Face Info Length                : 37
Meta Version                    : DC7303320222000
Creative Style                  : Standard
Color Temperature               : Auto
Color Compensation Filter       : 0
Scene Mode                      : Standard
Zone Matching                   : ISO Setting Used
Dynamic Range Optimizer         : Off
Image Stabilization             : Off
Color Mode                      : Standard
Full Image Size                 : 6000x4000
Preview Image Size              : 1616x1080
File Format                     : ARW 2.3.1
Quality                         : RAW + JPEG/HEIF
Flash Exposure Compensation     : 0
White Balance Fine Tune         : 0
White Balance                   : Auto
Sony Model ID                   : ILCE-6000
Teleconverter                   : None
Multi Frame Noise Reduction     : Off
Picture Effect                  : Off
Soft Skin Effect                : Off
Vignetting Correction           : Off
Lateral Chromatic Aberration    : Off
Distortion Correction Setting   : Off
Lens Type                       : E-Mount, T-Mount, Other Lens or no lens
Lens Spec                       : E 30mm F1.4
Auto Portrait Framed            : No
Flash Action                    : Did not fire
Electronic Front Curtain Shutter: On
Focus Mode                      : AF-S
AF Area Mode Setting            : Wide
Flexible Spot Position          : 0 0
AF Point Selected               : n/a
AF Points Used                  : (none)
AF Tracking                     : Off
Focal Plane AF Points Used      : (none)
Multi Frame NR Effect           : Normal
Exposure Mode                   : Manual
Flash Level                     : Normal
Release Mode                    : Normal
Sequence Number                 : Single
Anti-Blur                       : Off
Dynamic Range Optimizer         : Off
Intelligent Auto                : Off
White Balance                   : Auto
Release Mode 2                  : Normal
Shot Number Since Power Up      : 1
Sequence Image Number           : 1
Sequence Length                 : 1 shot
Sequence File Number            : 1
Sequence Length                 : 1 file
Camera Orientation              : Horizontal (normal)
Quality 2                       : RAW + JPEG
Sony Image Height               : 4000
Model Release Year              : 2014
ISO Setting                     : Auto
ISO Auto Min                    : 100
ISO Auto Max                    : 3200
Ambient Temperature             : 30 C
Focus Mode                      : AF-S
AF Area Mode                    : Multi
Focus Position 2                : 148
Exposure Program                : Manual
Intelligent Auto                : Off
Lens Zoom Position              : 0%
Sony ISO                        : 462
Base ISO                        : 100
Stops Above Base ISO            : 2.2
Sony Exposure Time 2            : 1/181
Exposure Time                   : 1/200
Sony F Number                   : 2.8
Sony Max Aperture Value         : 1.5
Sequence Image Number           : 1
Release Mode 2                  : Normal
Sony Image Width Max            : 6024
Sony Image Height Max           : 4024
High ISO Noise Reduction        : Normal
Long Exposure Noise Reduction   : Off
Picture Effect 2                : Off
Exposure Program                : Manual
Creative Style                  : Standard
Sharpness                       : 0
Distortion Corr Params Present  : Yes
Distortion Correction           : None
Lens Format                     : APS-C
Lens Mount                      : E-mount
Lens Type 2                     : Sigma 30mm F1.4 DC DN | C
Distortion Corr Params          : -8 -4 -14 -32 -64 -102 -158 -224 -312 -420 -560 0 0 0 0 0
Lens Zoom Position              : 0%
Vignetting Corr Params          : 0 64 192 320 512 704 1152 1984 3328 5184 7744 0 0 0 0 0
Chromatic Aberration Corr Params: 1160 1100 1036 964 884 796 704 616 512 384 224 0 0 0 0 0 -400 -388 -352 -280 -188 -52 92 232 376 524 672 0 0 0 0 0
Battery Temperature             : 36.7 C
Battery Level                   : 92%
Lens Mount 2                    : E-mount
Lens Type 3                     : Sigma 30mm F1.4 DC DN | C
Camera E-mount Version          : 1.50
Lens E-mount Version            : 1.60
Lens Firmware Version           : Ver.03.001
Release Mode 2                  : Normal
Dynamic Range Optimizer         : Off
Release Mode 3                  : Normal
Release Mode 2                  : Normal
Self Timer                      : Off
Flash Mode                      : Fill-flash
Stops Above Base ISO            : 2.2
Brightness Value                : 3.36875
Dynamic Range Optimizer         : Off
HDR Setting                     : Off
Exposure Compensation           : 0
Picture Profile                 : Gamma Still - Standard/Neutral (PP2)
Picture Profile                 : Gamma Still - Standard/Neutral (PP2)
Picture Effect 2                : Off
Quality 2                       : RAW + JPEG
Metering Mode                   : Multi-segment
Exposure Program                : Manual
WB RGB Levels                   : 746 256 410
Focal Length                    : 30.0 mm
Min Focal Length                : 30.0 mm
Sony ISO                        : 462
Distortion Corr Params          : -8 -4 -14 -32 -64 -102 -158 -224 -312 -420 -560 -560 -560 -560 -560 -560
Lens Format                     : APS-C
Lens Mount                      : E-mount
Lens Type 2                     : Sigma 30mm F1.4 DC DN | C
Distortion Corr Params Present  : Yes
Distortion Corr Params Number   : 11 (APS-C)
Shutter                         : Mechanical (3322 5564 6293)
Flash Status                    : Built-in Flash present
Shutter Count                   : 4879
Sony Exposure Time              : 1/181
Sony F Number                   : 2.8
Release Mode 2                  : Normal
Shutter Count 2                 : 4879
Sony Date Time 2                : 2022:02:27 09:14:30
Release Mode 2                  : Normal
Internal Serial Number          : 2b00750c
Lens Mount                      : E-mount
Lens Format                     : APS-C
Lens Type 2                     : Sigma 30mm F1.4 DC DN | C
Distortion Corr Params Present  : Yes
Lens Spec Features              : E
User Comment                    : 
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 6000
Exif Image Height               : 4000
Interoperability Index          : R98 - DCF basic file (sRGB)
Interoperability Version        : 0100
File Source                     : Digital Camera
Scene Type                      : Directly photographed
Custom Rendered                 : Normal
Exposure Mode                   : Manual
White Balance                   : Auto
Digital Zoom Ratio              : 1
Focal Length In 35mm Format     : 45 mm
Scene Capture Type              : Standard
Contrast                        : Normal
Saturation                      : Normal
Sharpness                       : Normal
Lens Info                       : 30mm f/1.4
Lens Model                      : 30mm F1.4 DC DN | Contemporary 016
PrintIM Version                 : 0300
SR2 Sub IFD Offset              : 48552
SR2 Sub IFD Length              : 56958
SR2 Sub IFD Key                 : 0x44332211
Black Level                     : 512 512 512 512
WB RGGB Levels Auto             : 3068 1024 1024 1652
WB RGGB Levels                  : 3068 1024 1024 1652
Color Matrix                    : 1292 -180 -88 -44 1340 -272 -24 -108 1156
WB RGB Levels Daylight          : 2740 1024 1768
WB RGB Levels Cloudy            : 2952 1024 1620
WB RGB Levels Tungsten          : 1712 1024 3176
WB RGB Levels Flash             : 3124 1024 1620
WB RGB Levels 4500K             : 2480 1024 1988
WB RGB Levels Shade             : 3240 1024 1456
WB RGB Levels Fluorescent       : 2484 1024 2604
WB RGB Levels Fluorescent P1    : 2636 1024 1872
WB RGB Levels Fluorescent P2    : 2956 1024 1692
WB RGB Levels Fluorescent M1    : 1980 1024 3136
WB RGB Levels 8500K             : 3400 1024 1380
WB RGB Levels 6000K             : 2924 1024 1636
WB RGB Levels 3200K             : 1908 1024 2756
WB RGB Levels 2500K             : 1492 1024 3832
White Level                     : 15360 15360 15360
Color Mode                      : Standard
Color Mode                      : Vivid
Color Mode                      : Neutral
Color Mode                      : Clear
Color Mode                      : Deep
Color Mode                      : Light
Color Mode                      : Portrait
Color Mode                      : Landscape
Color Mode                      : Sunset
Color Mode                      : Nightview
Color Mode                      : Autumnleaves
Color Mode                      : BW
Color Mode                      : Sepia
Vignetting Corr Params          : 11 0 64 192 320 512 704 1152 1984 3328 5184 7744 0 0 0 0 0
Chromatic Aberration Corr Params: 22 1152 1152 1024 1024 896 768 768 640 512 384 256 -384 -384 -384 -256 -128 0 128 256 384 512 640 0 0 0 0 0 0 0 0 0 0
Distortion Corr Params          : 11 -7 -4 -13 -29 -57 -92 -142 -201 -280 -377 -503 0 0 0 0 0
Subfile Type                    : Reduced-resolution image
Compression                     : JPEG (old-style)
Image Description               : 
Make                            : SONY
Camera Model Name               : ILCE-6000
Orientation                     : Horizontal (normal)
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Software                        : ILCE-6000 v3.21
Modify Date                     : 2022:02:27 12:14:30
Thumbnail Offset                : 38542
Thumbnail Length                : 8330
Y Cb Cr Positioning             : Co-sited
Aperture                        : 2.8
Blue Balance                    : 1.613281
CFA Pattern                     : [Red,Green][Green,Blue]
Image Size                      : 6048x4024
Lens ID                         : Sigma 30mm F1.4 DC DN | C
Megapixels                      : 24.3
Preview Image                   : (Binary data 341306 bytes, use -b option to extract)
Red Balance                     : 2.996094
Scale Factor To 35 mm Equivalent: 1.5
Shutter Speed                   : 1/200
Thumbnail Image                 : (Binary data 8330 bytes, use -b option to extract)
Focus Distance 2                : 0.90 m
Circle Of Confusion             : 0.020 mm
Field Of View                   : 43.6 deg
Focal Length                    : 30.0 mm (35 mm equivalent: 45.0 mm)
Hyperfocal Distance             : 16.05 m
Light Value                     : 8.3

Do I need an specific setup on camera?
Could you share a sample image where we can test the setup?
Thanks!

Exception thrown when loading original jpeg file shot by ILCE-7RM3

The exception is thrown when loading original jpeg file (as below) shot by ILCE-7RM3:
DSC00008.zip

Traceback (most recent call last):
File "C:\Python27\lib\site-packages\matplotlib\cbook_init_.py", line 388, in process
proxy(*args, **kwargs)
File "C:\Python27\lib\site-packages\matplotlib\cbook_init_.py", line 228, in call
return mtd(*args, **kwargs)
File "C:\Python27\lib\site-packages\matplotlib\widgets.py", line 225, in _release
func(event)
File "afv.py", line 55, in ofile
self.start(F)
File "afv.py", line 1139, in start
ax.add_patch(focuspoint)
File "C:\Python27\lib\site-packages\matplotlib\axes_base.py", line 2007, in add_patch
self._update_patch_limits(p)
File "C:\Python27\lib\site-packages\matplotlib\axes_base.py", line 2027, in _update_patch_limits
xys = patch.get_patch_transform().transform(vertices)
File "C:\Python27\lib\site-packages\matplotlib\patches.py", line 1494, in get_patch_transform
self._recompute_transform()
File "C:\Python27\lib\site-packages\matplotlib\patches.py", line 1478, in _recompute_transform
center = (self.convert_xunits(self.center[0]),
File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 191, in convert_xunits
return ax.xaxis.convert_units(x)
File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 1526, in convert_units
ret = self.converter.convert(x, self.units, self)
File "C:\Python27\lib\site-packages\matplotlib\category.py", line 65, in convert
unit.update(values)
AttributeError: 'NoneType' object has no attribute 'update'

When loading arw files shot by ILCE-7RM3, no exception is thrown, but no picture is shown in UI, either.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.