DSLR lens focus control

Issue #139 closed
The Backyard Cosmos created an issue

Support for lens focus control would be great for low end setups.

It's very difficult to achieve perfect focus by hand on a lens and currently the only way to do this is by using external software that cannot be used without disconnecting the camera from NINA.

Comments (11)

  1. Aaron Dalton

    Would love this feature. There’s a microstepping focus feature in Canon’s crappy remote EOS app so hopefully functionality exists somewhere?

  2. The Backyard Cosmos reporter

    Any updates on lens control?

    Been seeing a lot of questions regarding this on social media.

  3. Stanley Dimant

    Hello,

    this is just my 2 cents on this particular problem after looking into it for a bit just based on the SDK.

    The way the Canon SDK allows movement of the Lens Focus interferes a lot with how we do auto focus in N.I.N.A and how all other focuser devices behave in general. This is a plain and simple fact - our routines require the raw (potentially debayered) images of the camera to be able to calculate the HFR reliably - the SDK requires live view to be active to being able to even move the lens. In addition the lens mechanism only allows small, medium and large steps. Whatever those are supposed to be in relation of each other! The auto focus routines in N.I.N.A. also require positions for the focuser to work reliably - we do not have them here.

    Auto focus just for lenses would be a completely different beast than the auto focus N.I.N.A. currently has in place which was made with absolute focusers in mind. Since the lens focus movement requires live view to be able to steer the lens focus position and we have no information of how the small/medium/large steps relate to each other, the only solution I could think of would be:

    • enabling live view
    • moving the lens by 1 small step
    • disable live view
    • take a picture
    • evaluating the image
    • repeat

    This would implement the lens as a fictional absolute focuser which also would bring its own issues (e.g. hitting lens limits). This is hardly a solution that seems adequate for doing auto focus. While technically potentially possible it is very inelegant, potentially very very slow and also taxing on the shutter.

    Maybe this information is helpful for anyone who wants to dare implementing this in N.I.N.A. in the future.

  4. The Backyard Cosmos reporter

    Sorry, I should have made this more clear in the original issue, I’m not talking about full autofocus.

    What I’m looking for is a way to manually focus using the lens focus motor from within NINA to achieve more precise focus than by hand. This could be implemented as a window with directional buttons that is toggleable in the imaging tab.

    Now here comes the not really necessary but extremely useful part. From using APT I understand focus control is something that only works while the lens is in AF mode, if we could find a work around that allows us to capture images while the lens is in AF mode without it actually autofocusing that would be really useful for running imaging sessions from indoors.

  5. Dale Ghent

    Canon has architected its SDK to function like how a human would manually control the camera. This is why we can’t do things like switch camera modes (such as from Av to M, etc) via software and instead the user has to actually physically turn the mode dial on their camera. Another example is the lens AF mode - we cannot override the physical setting of the AF/MF switch on the lens via software… the user must physically slide the switch to change the mode. This and other reasons that @Stanley Dimant touched on makes this kind of control infeasible and convoluted to the point where any attempt at a solution will be underwhelming in the end.

    For those reasons, people who wish to have autofocus on DSLR lenses should look to external stepper motor-driven belt focusers. These can act exactly like absolute focusers and allows the user to focus DSLR lenses almost exactly like they would with a regular telescope without having to deal with so-so compromises and half-solutions.

  6. The Backyard Cosmos reporter

    I want to continue to clarify that I’m looking for a solution for manual focus, not autofocus. Also, having to manually switch from MF to AF and back during focusing is not a problem if it means having electronic lens control, I’ve been able to achieve much better focus using electronic lens control (via apt) than manually turning the focus ring, you can only hold your hands so steady.

    Myself and many others use the lens control feature in APT as part of our manual focus routine and would like to switch over to NINA for this for what should be obvious reasons, having two programs trying to control the camera has…issues, especially when you need to refocus mid session.

  7. Log in to comment