Git Product home page Git Product logo

Comments (20)

obs1dium avatar obs1dium commented on May 26, 2024

with this lens the number of shots is really limited

The number of shots is limited by the focusing range, which is divided into discrete steps. For the lenses I tested, the total range consists of 120 steps.
I don't know if your macro lens simply has a narrower range, but it's a possibility.

from focusbracket.

loomitz avatar loomitz commented on May 26, 2024

Thanks, for the reply, the detail with macro lenses is that the path of the barrel is much longer in a shorter distance, for example the distance between 0.92 feet and 1.5 feet is much longer in a macro but the app detects that it is short and gives only a few shots.

I upload a video of the operation of the app with this lens and the other two I have.

https://youtu.be/NXhTEXnur3k

I hope that helps in something

from focusbracket.

obs1dium avatar obs1dium commented on May 26, 2024

Interesting. Focusing ranges appear to be the same, but focusing speed could indeed be improved.
In the first test, you selected about 1/6th of the total range, so 20 pictures is exactly what you should expect.

from focusbracket.

loomitz avatar loomitz commented on May 26, 2024

ok , I think I understand about the focusing range, but about the the speed of focus I think it has to do something with barrel turns difference between MF and AF lens , the camera always in MF .

example for better understanding.

https://www.youtube.com/watch?v=tsWwzLGx4Gc

from focusbracket.

3ricj avatar 3ricj commented on May 26, 2024

Wow, wait, so this works on the a7rII but not the a7r? Should I try installing the latest version (eg: the new one might work) or is it more that there is a bug specific to the a7r? I am using the same 90mm lens.

from focusbracket.

loomitz avatar loomitz commented on May 26, 2024

Try this, Put the lens the 90mm, in Auto Focus (the ring up), but the camera focus mode in manual, thats the only way that works on A7RII, its slow but works you will notice that you have to do a lot of turns more for focus.

from focusbracket.

3ricj avatar 3ricj commented on May 26, 2024

I have completed a full removal and reinstall of version 1.2. It still locks up/hangs when I press O at the max position and then the app no longer responds. I have tried your method as described, with the lens on AF and camera setting to be on DMF and MF without any luck.

from focusbracket.

obs1dium avatar obs1dium commented on May 26, 2024

It still locks up/hangs when I press O at the max position

It's possible that your camera does not support the method I use to adjust focus.

from focusbracket.

MartinNuc avatar MartinNuc commented on May 26, 2024

I have this lens too and i can confirm it shoots bracketed photos but focusing is very slow. Lens focus ring on AF, camera settings MF.

The first thing I think could help is just to reverse focusQueue (https://github.com/obs1dium/FocusBracket/blob/master/app/src/main/java/com/obsidium/focusbracket/FocusActivity.java#L234). Here is why:

First you set minimum focus. After that you set maximum focus. Therefore the focus ring is in the maximum focus position. When starting shooting the app first moves focus to the minimum position. On 90mm lens this takes a long time. If we start shooting from the maximum position and move to the minimum after we will save some time at the beginning. Made PR #15

Another option is to first pick maximum focus position and pick minimum focus position after.

from focusbracket.

obs1dium avatar obs1dium commented on May 26, 2024

You could try and check if the FocusDriveListener gets called at all with that lens.

from focusbracket.

MartinNuc avatar MartinNuc commented on May 26, 2024

If FocusDriverListener would not be called it would take no photos at all, am I right?

from focusbracket.

obs1dium avatar obs1dium commented on May 26, 2024

Err, right. I thought I was checking the focus position in another place as well, but apparently not.

from focusbracket.

pdykmans avatar pdykmans commented on May 26, 2024

This reminds me of a problem I had when doing a similar thing for Magic Lantern (Canon). Now, I'm very new to Sony, so I can't say for sure that the problem is the same. But the issue I had with focusing on the Canon system was that the discrete steps in the focusing range behaved totally different depending on the lens. E.g. sometimes the discrete steps were linear with focusing distance, sometimes the relationship was logarithmic, and especially with cheaper lenses there was hardly a correlation between the two. There was one lens where focussing increments required +4 to actually move the lens one step. And when that lens was steered with +1 increments it would simply not move at all (and therefore freeze the program). I also found a rather wild variety in the total number of steps that any lens would support.

My theory at the time was that it depended on the motor system of the lens. E.g. a stepper motor can be controlled very discretely. But other motor types might not. If that makes any sense...

In the end I found no other way (at least for the difficult lenses) than to record the stepping range into a hard coded dictionary, mapped against their linear distance. Ugly as hell, I know :-)

That said, I tested this FocusBracket app on my Sony A6000. With the Sony 50mm 1.8 it is very slow (but it works). With the 18-105mm OSS it works much faster.

B.t.w. thanks for the app Obs1dium!

Regards,
Philippe

from focusbracket.

obs1dium avatar obs1dium commented on May 26, 2024

Thanks for the insight, it could very well be that these kinds of issues also affect Sony cameras and lenses.

I recently upgraded from the A5100 to an A6000, and surprisingly focusing with the kit lens is extremely slow now. Not sure why that is, loomitz mentioned in the first post that this camera/lens combination works smoothly.

The only other two autofocus lenses I own (Sigma 19 and 30) are working fine.

from focusbracket.

pdykmans avatar pdykmans commented on May 26, 2024

Hello obs1dium,

I finally had some time to play with your focusbracket application. And first of all I take my hat off to you! Getting that far while starting from so little is really impressive! And I can only imagine how often you must have opened that LOG.TXT to figure out what the heck was going on. Because a lot in that CameraEx API is not very intuitive, to say the least. So, thumbs up to you obs1dium!

Regarding this variation in speed across systems/lenses, I made some observations that I think might be interesting;

  1. As you mention in your code, higher drive speeds give errors. So I ran a routine that would increment the drive speed until it failed. And I consistently found the maximum to be 7 for all 3 lenses that I tested. So, the drive speed of 4 that you use in the code may be a bit conservative. BUT! ... I can only speek for 3 lenses on one single system (A6000). So, let's just keep it at 4 to be safe. But if we run a little startup routine to determine the real maximum, we might get some drastic speed improvement IMO.

  2. See figure below. I measured the average movement of the focusing system versus the drive speed used in startOneShotFocusDrive(...). As the figure shows, it is very non-linear. But more importantly, there is a significant variation across lenses. E.g. calling startOneShotFocusDrive( far, 1 ) a hundred times, the Sony 50mm would move only 3 positions while the Sony 18-105mm would move 29 positions. AT LEAST... when it is set to 18mm! Which brings me to the next point...

  3. As also seen in the figure, the speed vs. increment of a zoomlens (like the 18-105mm) depends on the actual focal length of the lens. The data seem to suggest that there is some real-world knowledge implemented. I.e. that focussing a wide FOV requires less precision than focussing a narrow FOV (tele-end). If that makes any sense...

  4. If all that is not confusing enough... I also found variations between drive-speed and step-size while using the same lens on the same system. Making all this even more non-deterministic than it already is. But the variations are not big. My first guess is that there might be an accumulator in the system. So that when the lens is driven forward and back a couple times with different speeds, there may still be a leftover that we don't account for when performing steps.

Now, based on these LIMITED and PRELIMINARY statistics, I took the freedom to test your code with the following speed calculation:

if (absDiff > 10)
speed = 4;
else if (absDiff > 5)
speed = 3;
else if(absDiff > 2)
speed = 2;
else
speed = 1;

And focusbracket now works significantly faster. I tested it with all 3 lenses on my A6000 and found no problems. But a bit more testing on different systems would be welcome. Just to be safe.

If we want to push it even a bit further we might try to set speed = 4 to speed = 5 in the above code. But that is under the assumption that 5 is a valid speed on all systems. I have NOT tested that (yet).

Regards,
Philippe

B.t.w. I can't get shiftFocusPosition to do anything either, except for freezing the system...

Explanation of the test setup: I drove the focusing system roughly 100 times for every speed. Then recorded the actual focus position and divided by 100. For some speeds the number of calls had to be a lot less because only a couple calls would already drive focus to max. The results in this sheet give an idea of the relative movement of the focusing system when driven by a single call.

image

from focusbracket.

pdykmans avatar pdykmans commented on May 26, 2024

Following up on my previous post;

For those who want to try faster focusing with the unproven speed of 5, here is a setting that works fine on my system and with all of my lenses:

        if (absDiff > 20)
            speed = 5;
        else if (absDiff > 4)
            speed = 4;
        else if(absDiff > 1)
            speed = 2;
        else
            speed = 1;

Please note that:

  1. The focusbracket app was using a maximum speed of 4. As for speed 5, all I can say is that it works on my A6000. But it's not proven that it will work on other systems too. If it is not supported I expect it to crash the application. I don't expect your system to go up in smoke... ;-) If it doesn't work for you, just replace speed = 5 by speed = 4. It will only make a difference when you drive focus over a long distance anyway. No worries.

  2. You would be excused for scratching your head over the last check: absDiff > 1. But it's NOT a typo, and it makes quite a difference! Especially with a lens like the 50mm 1.8. As the data suggests, this lens needs to be driven 30+ times with a speed of 1 before it will move 1 position. With roughly 50ms delay on every call, we get around 1.5 seconds. If we would drive it with speed = 1 when we hit absDiff = 2, then this becomes 3 seconds! And so on...

  3. I don't know how critical the above settings are. But if you have a lens that starts hunting, I would suggest to change absDiff > 1 to absDiff > 2. If it still hunts, I have no clue right now. But it would be good to let me know.

I have experimented a little bit with this setting too:

        if (absDiff > 20)
            speed = 5;
        else if (absDiff > 4)
            speed = 4;
        else if (absDiff > 1)
            speed = 3;
        else
            speed = 1;

But I feel that the gain in speed is marginal. And it makes my zoomlens hunt at the widest setting. It comes out of the hunting eventually. But it makes the whole thing actually become slower rather than faster. So... I would advise not to go there.

Grtz and have a nice weekend!
Philippe

from focusbracket.

fotovideoguy avatar fotovideoguy commented on May 26, 2024

Got it to install on A7R2, but it doesn't work

Does not work with my native lens or my adapted Canon lenses.

from focusbracket.

MartinNuc avatar MartinNuc commented on May 26, 2024

@fotovideoguy and how is your problem related to this issue? 🙄

from focusbracket.

fotovideoguy avatar fotovideoguy commented on May 26, 2024

I still have not had any luck with gettingthe app to work.
I have installed and uninstalled every version, trying to get it to work.
currently the latest version 1.5 is installed.
When started, I have the minimum and maximum icons on screen and a solid green line between them.
From watching video provided by other users, the app I have installed does not behave as it shows on the A7R2.

I have the lens in AF mode, and set the camera to MF mode, as well, but still no luck.

Really would like to know why it works on some A7R2 anot not others.

Thanks and looking forward to any input that helps to get this working.

from focusbracket.

MartinNuc avatar MartinNuc commented on May 26, 2024

@fotovideoguy this issue is about slow focusing with 90mm macro lens as the title says. Please search for issue related to your topic.

from focusbracket.

Related Issues (20)

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.