musselwhizzle / Focus-Points

Plugin for Lightroom to show which focus point was active in the camera when a photo was taken
Apache License 2.0
344 stars 42 forks source link

Support for Canon 60D cameras #91

Closed neilschelly closed 7 years ago

neilschelly commented 7 years ago

I've started some work on Canon support, but it probably should be a lot cleaner than what's currently in place. I found that all the information for the which focus points are selected, which are in focus, and the exact coordinates are all in the EXIF on my Canon 60D. Since that's not exactly the most modern Canon at this point, I would venture the same or better information can be found in newer ones.

I documented what the EXIF data looks like and created a map file for the Canon 60D coordinates in a branch, if someone is interested in using it to add broader Canon support based on this. It should be easy to generate maps of any Canon camera that has similar AF data to mine automatically.

See my branch at https://github.com/neilschelly/Focus-Points/tree/canon-60d I'd be happy to answer any questions or supply any sample images if it would be helpful to someone motivated to continue this work.

musselwhizzle commented 7 years ago

Hi, Thanks a bunch for this. I may have some good/bad news for you. I think your camera is already supported. Can you please download the latest from the master repo and try it?

neilschelly commented 7 years ago

I just bumped to your latest master, removed and reinstalled the plugin, and I don't see any focus points come up when I click "Show Focus Point" in the plugin extras menu. I just see the image itself in the window. If I do Show Metadata, it comes up as a blank/empty window.

I can try to troubleshoot a bit more later, or I can send you the images I'm looking at if that would help you. I don't have a lot of time to contribute unfortunately. I had the best of intentions when I forked this, but it's going to be awhile before I can really contribute too much more coding time.

musselwhizzle commented 7 years ago

great. I'll add your mapping file then. thanks for checking that. 1 final thing if you dont mind. can you PR some sample images into here for me https://github.com/musselwhizzle/Focus-Points-Sample-Images

neilschelly commented 7 years ago

Done.

musselwhizzle commented 7 years ago

Using supplied sample images, current canon 60D is off. Adjust or used supplied point map (See Screenshot)

screen shot 2017-01-12 at 6 52 19 pm
philmoz commented 7 years ago

I can't reproduce this - all the 60D sample images show correct focus points with the latest master branch on my system. e.g. screen shot 2017-01-13 at 3 24 23 pm copy

musselwhizzle commented 7 years ago

weird, I dont get that at all. None of the 60D images work for me. Both the 40D and 80D work great. I even downloaded from your repo and it still doesn't work for me.

musselwhizzle commented 7 years ago

@rderimay - could you try and see what you get?

musselwhizzle commented 7 years ago

PS: attached is my metadata file. Is this the same as you're getting? IMG_8568-metadata.txt

philmoz commented 7 years ago

Your metadata matches what I see. What does a full log look like?

musselwhizzle commented 7 years ago

log attached:

libraryLogger.txt

musselwhizzle commented 7 years ago

It's related to the dialog size which is a result of your screen size. Change the dialog to something small here:

local contentWidth = appWidth * .4
local contentHeight = appHeight * .4

and it will completely break (or fix it in my case). * .72 is my magic number. Any less than that fails. Anything more works.

screen shot 2017-01-12 at 9 55 31 pm
musselwhizzle commented 7 years ago

it has to do with the piecing together of the focus box. If there's not enough space to draw all 4 corners, the script completely fails.

screen shot 2017-01-12 at 10 05 25 pm screen shot 2017-01-12 at 10 05 46 pm

Look how close the first image is. When I make the dialog box just a hair smaller, the focus box goes away. We fix this issue, and it should be resolved @rderimay

philmoz commented 7 years ago

Yes, this line causes the small boxes to be ignored: if dist > 25 then

'dist' is the diagonal size of the focus box.

Commenting out the 'dist' size check and setting a small view window (x0.4) gives this: screen shot 2017-01-13 at 5 21 28 pm copy

This still looks ok to me so I would probably just remove the 'dist' check.

musselwhizzle commented 7 years ago

I agree. It looks like a bug when they dont show up. The first image I posted isn't useable. I'll let @rderimay chime in before we change the code.

musselwhizzle commented 7 years ago

@neilschelly let's see if we can get yours working. First off are you mac or PC.

If I do Show Metadata, it comes up as a blank/empty window

That's not a good sign. It wont work with that blank.

Set your logging to debug (as shown in the screenshot), and then attach your log file here please.

screen shot 2017-01-12 at 10 29 34 pm

Your log file is located under ~/Documents/libraryLogger.log. Rename it to libraryLogger.txt so this webpage will let you upload it.

rderimay commented 7 years ago

Good Morning :-) This is intended behavior. I will PR an improvement by displaying them in all cases but limiting their proximity so that it still looks like an af point.

Le 13 janv. 2017 à 07:27, Joshua Musselwhite notifications@github.com a écrit :

I agree. It looks like a bug when they dont show up. The first image I posted isn't useable. I'll let @rderimay chime in before we change the code.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

rderimay commented 7 years ago

Fixed in PR #98

musselwhizzle commented 7 years ago

Yes, the current master resolves my issue. Still need to figure out why @neilschelly metadata is completely blank, then we'll be all set!

rderimay commented 7 years ago

When do you write blank metadata, is it something that is not working on my code or in the metadata dialog code ? Don't understand if I need to test something or not actually.

On 13 janvier 2017 at 19:39:06, Joshua Musselwhite (notifications@github.com) wrote:

Yes, the current master resolves my issue. Still need to figure out why @neilschelly metadata is completely blank, then we'll be all set!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

musselwhizzle commented 7 years ago

I need a response from Neil. You're off the hook for now :) If his metadata dialog is blank, I'm assuming the metadata is never written to the file....which is unexpected.

rderimay commented 7 years ago

Ok !

On 13 janvier 2017 at 20:21:40, Joshua Musselwhite (notifications@github.com) wrote:

I need a response from Neil. You're off the hook for now :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

neilschelly commented 7 years ago

Sorry folks, my day job has nothing to do with this. The Mac I use for photography is at home. I hope to be able to get the test data you need later tonight.

neilschelly commented 7 years ago

I just upgraded the plugin to the latest/greatest. Focus points show up and the metadata page is no longer empty. I'm all good now! Thanks a ton for the effort.