![]() |
[Mac/Linux/Win] Visualizer of AF data from Sony cameras (JPEG&ARW EXIFs)
Guten Morgen,
Dies ist eine Fortsetzung aus dem A9-Thread, wo "herby1961" ein Tool (Python-Script) zur Visualisierung von AF-Fokuspunkten in SONY JPEG/ARW Dateien vorgestellt hat. Danke hierfür!!! :top: Installation und Nutzung In diesem separaten Thread soll es um einen Erfahrungsaustausch bei Verwendung des Tools "Visualizer of AF data from Sony cameras" gehen. Das Script ist quelloffen und auf GitHub herunterladbar. Es wird bisher erfolgreich unter Windows, MacOS und Linux (Ubuntu 16.04.2) verwendet. Windows 7:
(Quelle) MacOS:
Linux: Siehe MacOS.
Troubleshooting (1) Problem (MacOS/Linux): Beim Laden eines ARW oder JPEG Files (A7MII) kommt es leider zu einer Exception im zusätzlich eingebundenen Paket 'Tkinter': Code:
Exception in Tkinter callback Lösung: Den o.g. Parameter aus dem Exiftool-Aufruf entfernen behebt das Problem, und "Exiftool" wird von nun an korrekt ausgeführt. Soweit eine kurze Einführung zur Installation/Konfiguration und zum Erstaufruf von 'afv.py'. Beste Grüße, euer meshua |
Installation Windows 7
Ich hänge mal meine Installationsanleitung für Windows 7 auch hier rein:
1) Phyton von https://www.python.org/downloads/release/python-360/ installiert 2) https://bootstrap.pypa.io/get-pip.py local abgespeichert. 3) durch doppelklick die Datei get-pip.py ausgeführt (nach installation von Python) 4) auf einem Windows Command Prompt die Kommandos: pip install matplotlib pip install rawpy pip install pillow 5) 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/) 6) Das Phyton Script https://github.com/SK-Hardwired/s_afv Mittels Copy and Paste in einen Texteditor kopiert und ins selbe Verzeichnis wie Punkt 5. 7) afv.py durch doppelklick starten. Unter Mac OSX habe ich auch kein Problem Python 3.6 parallel zu installieren. Aber danach macht es Probleme mit mittels "pip" nachzuinstallierenden Modulen. Die krieg ich momentan nicht in die 3.6 Version. Beste Grüße Herby |
Ich bin so oder so dafür, dass wir ein Unterforum erstellen, wo wir solche Projekte zusammen tragen. Das macht es freundlicher für zukünftige Entwickler etc ...
Es wäre schade wenn so ein nützliches Projekt, irgend wann im See der Beiträge verschwindet! |
MacOS Installationsanleitung & Konfiguration ergänzt. ;) Leider läuft das Script immer noch nicht fehlerfrei...wer Ideen hat, was die Ursache sein könnte: lasst es uns alle wissen... :crazy::top:
Viele Grüße, meshua |
Zitat:
So wie es aussieht funktionert das Füllen des Bereichs "exifdata" durch das tool exiftool nicht sauber. Wenn ich exiftool -a 20170501-15-27-31-A6509604.ARW manuell in dem Verzeichniss aufrufe bekomme ich folgenden output: Code:
ExifTool Version Number : 10.50 Code:
for i,each in enumerate(exifdata): Irgendwas geht da offensichtlich beim Aufruf von exiftool schief und wird nicht reported. Ich habe einen Kollegen der sich mit Python auskennt, den werde ich morgen mal fragen wie man das debuggen kann. Grüße Herby |
Zitat:
Zitat:
Code:
for i,each in enumerate(exifdata): |
Hallo Usch,
Vielen Dank für Deinen Input. Das hat mal gut weitergeholfen. Kleine Anmerkung unter Python 3.6 muss es Code:
print (each) Damit habe ich gesehen das die gesamte Hilfe von exiftool ausgegeben wird. Damit wird exifdata ausgeführt Code:
exifdata = subprocess.check_output(['exiftool','-a',F],shell=True,universal_newlines=True,stdin=subprocess.PIPE,stderr=subprocess.PIPE) das muss offensichtlich unter macOS anders parametriert werden als unter windows. Und damit sind wir bei der nächsten Herausforderung. Wie frägt man ab unter welchem Betriebssystem das Script läuft und löst den richtigen Aufruf aus? Werde mal suchen, vielleicht hat in der Zwischenzeit wer eine Idee. Grüße Herby |
Guten Morgen,
Zitat:
Zitat:
Wir kommen dem Problem aber näher...:top: Viele Grüße, meshua |
Zitat:
Mach mal ein print (F) vorher. |
Zitat:
Code:
# exifdata = subprocess.check_output(['exiftool', '-a',F],shell=True,universal_newlines=True,stdin=subprocess.PIPE,stderr=subprocess.PIPE) Code:
exifdata = subprocess.check_output(['exiftool', '-a', F],universal_newlines=True) |
Zitat:
Viele Grüße, meshua |
Zitat:
Grüße Herby |
Danke Herby,
Anbei nun noch ein Beispielbild, wie es mit der A7MII aussehen kann (MacOS Sierra): ![]() → Bild in der Galerie Weitere Bugs: Im Script gibt es noch weitere "fehlerhaftete" Aufrufe des Exiftools - die "Save" Funktion bleibt an der Exiftool-Hilfe stecken. Da muß wohl nochmals der Kehrbesen durch die Zeilen... ;) Viele Grüße, meshua |
Zitat:
Code:
subprocess.call(['exiftool','-tagsFromFile',F,sname,'-overwrite_original_in_place']) |
Hi,
cooles Tool. Beim letzten User-Treffen in Bremehaven hatte ich die Kollegen gefragt ob sie so ein Tool kennen, war aber keinem bekannt. Dank der Infos hier konnte ich das Skript auch unter Ubuntu (16.04.2) zum laufen kriegen. Danke an alle Beteiligten :top: Bis dann.............. Rainer |
Zitat:
PS: Habe im Eingangspost noch zum Problem (Aufruf Exiftool) auch kurz die Lösung ergänzt. Viele Grüße, meshua |
Hi,
noch zur Ergänzung. Ich habe mich an die Installatonsanleitung für MacOS gehalten. Installieren musste ich noch : Code:
sudo apt-get install libraw-dev Bis dann.............. Rainer |
Zitat:
Eine Frage: Musstest du auch unter Linux/Ubuntu "shell=True" aus dem Originalscript beim Aufruf des Exiftools entfernen, damit es fehlerfrei läuft? Viele Grüße, meshua |
Zitat:
ja musste ich :D Bis dann............... Rainer :D |
LR AF Point Visualizer
Hi,
ich habe ein LR Plugin als opensource gefunden: https://github.com/musselwhizzle/Focus-Points Wer kann das Programm um Sony Kameras erweitern? Für Beta Tests und Testfotos mit A7II und A6500 stelle ich mich gerne zur Verfügung. Grüße Herby |
Thank you and some news!
Hi!
I stumbled upon your forum and discussion. Thank you for your attention to my tool/script. Here are some updates and news of this tool: 1. Dropbox changed the rules of usage and disabled folder where windows binaries were located. Now all binaries are moved to Google Drive. Hope they will be accessible from there. 2. Due to compatibility problems (with MSVC libraries) of binaries with some Windows versions, I decided to rewrite code in Python 2.7. So I've created new branch at github and now Python 2.7 version is master and is being developed. Old version branch still available, but WILL NOT BE UPDATED by me. 3. Support of ILCE-9 (both JPEG and RAW) added. 4. Quick 1:1 zoom / Fit to screen button added for convenience. Then you can use PAN/ZOOM button to move around. To do (but not promise): 1. Add support of auto-rotation and proper markers display of portrait-oriented photos. 2. Who knows what ideas will come! Updated code and links to fresh binaries are available at https://github.com/SK-Hardwired/s_afv P.S. I have Windows only and my PC so couldn't help with Linux yet (but may consider in future at virtual PC) and MacOS for sure. You are feel free to adapt the code as you wish and if you are interested. |
@SK-Hardwired
thanks for your program and the information about updates. Once I get a little bit more time I'll update to the new version. If you want I'll write down the steps I took to install it on my Linux System (Ubuntu 16.04 LTS) Have a nice day, Rainer |
Problem with ILCE-9 Firmware 1.01
Hello all,
i write in english as the author of the software not speaking german. I get the new script with the hints in the first posting also running with python 2.7 on the mac. All worked ok with the new ILCE-9 until i upgraded the firmware to v1.01. Then the script chrashed with an error at line: Code:
ydiff = int(exif.get('Sony Image Height')) But in the v1.01 version the second entry have "n.a". As the script writes each entry of the exiftool in a table with "tag,value" pair the second "Sony Image height" TAG overwrites the first and the line "ydiff =...." cannot work with this value. When i change the code to: Code:
ydiff = int(exif.get('Exif Image Height')) The problem is only with RAW images. JPEG work fine. I will write tomorrow the author of the exiftool and sk-hardwire to explain the behavior of the exifdata in ILCE-9 v1.01. This behavior is on both windows and macOS. tested with exiftools 1.50, 1.60 and 1.61. Second problem is that script crashes with detected faces. But only when the script is running on macOS. Windows is fine. I will investigate this problem the next days when i have time. regards Herby |
Nach dem ich mir eine virtuelle Python Umgebung aufgebaut habe und dort alle Pakete lt. Anleitung im ersten Eintrag nachinstalliert habe funktioniert das Script auch mit der Gesichtserkennung.
Anleitung zum einrichten einer virtuellen Python Umgebung im macOS unter http://sourabhbajaj.com/mac-setup/Py...irtualenv.html After i have installed a virtual environment for Python and installed the latest version of the packages in the virtual environment the script recognize also the faces and draw the rectangles. The matplotlib package in my main python environment was an older version and not upgradeable. Configuration description for the virtual environment on macOS on: http://sourabhbajaj.com/mac-setup/Py...irtualenv.html regards Herbert |
Das ganze macht aber nur Sinn, wenn man die Kamera nach dem Fokusieren nicht mehr verändert, oder?
Wenn man wie ich meistens mit AF-Mitte das Objekt anvisiert, halb durchdrückt, Bildausschnitt verändert und dann ganz durchdrückt, erhält man eben immer in der Mitte den gelben Kreis :-) |
Zitat:
|
Besten Dank für die Anleitung!
Falls noch jemand Probleme mit: Zitat:
deinstallieren: pip uninstall matplotlib richtige installieren: pip install matplotlib==2.0.2 damit hat es bei mir nun auch endlich funktioniert! Gibt es eigentlich was neues bzgl. des Lightroom Plugins? https://github.com/musselwhizzle/Focus-Points Das dürfte doch eigentlich auch nicht so schwer anzupassen zu sein. |
Alle Zeitangaben in WEZ +2. Es ist jetzt 16:43 Uhr. |