Official comment

There is not currently a way to set the lens to infinity.
Is there currently any way of being able to put the focus of the camera at infinity?
I read in a few posts last year that it was not possible, and that the only option is to tap with two fingers to force autofocus.
Today I tried to do it at the time when drone has reached the altitude of the mission (80m) but does not seem to do anything. I have tried it several times during the mission, the camera's screen is reduced and enlarged, but it does not seem to make an attempt to focus (Is there any indicator that it is doing autofocus? It has to be stopped to focus?).
After the flight all the photos were out of focus. The drone is an Inspire 2 with camera X4S.
The configuration used is Shutter Priority 1/2000, ISO Auto, Speed 8m/s, Altitude 80m. The light conditions were good (high clouds) in fact the ISO has not risen to more than 200 in any image.
Interestingly I made the same flight with a fixed ISO (100) and the same configuration and the photos were fine (but it does not compensate the lighting conditions ...).
Without the possibility of putting the focus in infinity (I understand that establishing it previously in DJI GO 4 will not work) there is no way to be sure that the images will be focused until after the flight, especially in those areas with a homogeneous texture such as grass.
There is not currently a way to set the lens to infinity.
Please sign in to leave a comment.
Hi Zane,
Do you have any plans to incorporate this function or some kind of control over the focus of the camera?
Clearly the problem is because the auto focus fails and stays at the same value as the first image it took on the ground. This camera (X4s) has a hyperfocal distance of 0.89m so any focus beyond this value would work well ...
The two-finger method I can not get it to work (or maybe yes?) and if I activate it I also have no way of knowing if it has failed and continues the focus as the ground value. Is it necessary to stop the mission so that it works?
You have a very powerful and well developed application but if I can not trust the focus of the images it becomes useless ...
I attach a comparative image between two flights from the same area. Same configuration except that the ISO was in Auto in the defocused image.
We will look into it.
This can happen though if you are taking off from an area that is significantly higher or lower than the area you are mapping.
Autofocus failure is certainly and issue and pulling a bad focus will throw off the whole flight.
I've had focus issue for my 2 years of using Map Pilot (not focusing on infinity) . Despite a brief message that says "focus test successful" once reaches desired altitude, much of the time it is actually not in focus. Usually it is the first leg of a multi-battery flight that is out of focus. Frustrating as heck because can't refly individual legs without either starting over from scratch AFTER entire out of focus flight is finished and no way to DUPLICATE a plan except to draw it out manually again and hope covering exact same area.
Also no way to tell just by looking at iPad Pro if this leg is in focus or not, because preview square is too small to really know if in focus or not
I've tried skipping focus check in DJI GO and I've also tried using DJI GO focus check, switching between AF/MF in DJI GO before launching, neither solves the problem.
Anyways, attached is example A of the typical out of focus first-leg flight and Example B which is all the way after the first flight is completed.
Inspire 1 with Zenmuse XT.
How do you plan to fix this issue?
It would be helpful to know how (what logic) MP is using to set focus on non-fixed focus cameras.
The aircraft pulls an autofocus from the center of the frame at the top of the climb to the cruising altitude while the aircraft is not in motion. When it does this it reports that it either succeeded or failed. This is equivalent to tapping the center of the frame to pull an autofocus in DJI Go.
You know you can make the camera preview full screen now, right?
https://support.dronesmadeeasy.com/hc/en-us/articles/360000751606-Full-Screen-Camera-Map-Swap-Button
It is possible to pull a bad focus in DJI Go too...
The camera requires a stable and contrasty target upon which it can derive a peak contrast value for successive images. That is now this works.
There are lots of things that will make the autofocus inaccurate while still reporting successfully locking the focus:
If it is windy, the autofocus can be wrong. If the location is super overexposed, the autofocus can be wrong. If there is a lot of motion in the frame during the autofocus calculation the autofocus can be wrong. Really anything that is changing the content of the image in that small area in the middle of the camera's view will throw off.
For example, in the latest image that was posted, if a truck drove through the middle of the camera's view when the autofocus was being calculated it would probably be wrong.
White is bad. Sand is bad. Water is bad. Snow is bad. Trees are bad. Tall grass in the wind is bad. The pilot doing a dance directly under the takeoff is bad.
Make sure you are taking off in a place that is feature rich and doesn't have a lot of motion in it and the focus quality will likely be better.
Thank you for that explanation, Zane. Sometimes we can't choose to take off from a nice contrast area. How will focus in MP react if we launch manually in Go, ascend to proper height, move over a nice contrast spot, pull focus and then close out of Go and open and start a MP mission?
Lately I have been using DD on our P4P just because they have the option to set focus in Go like I explained above and then start the mission in DD. I prefer MP but risking focus is a huge factor in choosing which app to use.
The ultimate would be if you were able to add a point (pin) that the user could set where they wanted MP to stop and pull focus before moving on to the first waypoint. That would be fantastic and preferred to using Go in DD because that wastes battery.
Hi Zane, thank you for your time.
That the autofocus fails is normal in all types of cameras and obviously has to do with the type and characteristics of the terrain. That is why I don´t understand the reason why there is not the possibility of putting the focus of the camera at infinity (it doesn´t have to come by default).
The fact that something, which is vital in order to obtain a precise result, can not be controlled by the user, and can randomly fail, makes the application in practical terms be useless.
As a professional I can not make a flight to a client and then explain that I have to repeat a flight (and probably charge batteries) because the flight is out of focus ... I think it's understandable.
From what I have seen in the forums this has been a request from the users for a few years.
The Litchi application just put this option this week after requesting it, so until MP allows this option I have no choice but to use Litchi.
For me it is frustrating, since Mp seems to me a fantastic app with a lot of potential, without counting on the fact of having invested time and money in it.
I hope you can add this function for your clients soon.
Thank you and best regards,
Zane, your suggestion to take over a place that is feature rich isn't practical and not my experience either. In multi-battery missions, even if the ground below is feature rich, sometimes it focuses properly, other times it doesn't. Just a few days ago, legs 1 and 2 were in focus, legs 3 and 4 were not in focus, and leg 5 was. Same exact takeoff location. As pilots we usually opt to launch from the flattest point with fewest features for safety. There has to be a more reliable solution! DD allows the setting of infinite focus, this might be a solution for MP.
(Another matter, why does the app say focus test "successful" when it pulls focus at mission altitude, when it actually isn't?)
I would also like to see a way to set focus in a way that didn't leave you wondering if it worked each time as the mission progresses and you have no certainty that it is not a wast of time. This should be bumped up the list IMHO. I'm happy to take responsibility for the focus if it can't be programmed to do it correctly each time. But you have give us the option. In app before first waypoint would be the best.
DO NOT USE MULTIPLE APPS AT THE SAME TIME!!!!!! Unless you don't like knowing where your aircraft is...
The issue here is that the SDK only offers so much control over the focus. We tell it to focus, it tells us whether or not it succeeded. That's all we know. It is up to the pilot to check that it was done properly. I know this sucks because it is almost impossible to tell whether or not it did a really good job or just an OK job, even in full screen mode.
We used to have a feature where you could double tap on the camera preview to do the autofocus. Somewhere along the line we took that out but we will put it back in for version 2.9.0 which should be out soon.
This will give you the capability of pausing the mission and manually triggering an auto focus on a target of your choosing. It will still be reported as success or failure according to DJI's determination of the focus but you will have the option of running it over and over until you are happy with it.
Nicolas: Keep in mind that focus is based on the distance to the objective so if you are flying over an area that is higher or lower than the distance at which the focus was pulled it may or may not be valid.
"We used to have a feature where you could double tap on the camera preview to do the autofocus. Somewhere along the line we took that out but we will put it back in for version 2.9.0 which should be out soon.
This will give you the capability of pausing the mission and manually triggering an auto focus on a target of your choosing. It will still be reported as success or failure according to DJI's determination of the focus but you will have the option of running it over and over until you are happy with it."
Thank you! A pity they don't expose focus peaking in the SDK.
Zane in my experience changing elevations does not affect focus, with this app it’s an all-or-nothing scenario, either every photo is in focus, or every photo is out of focus – I know this because many of my sites have close to 100m (300ft) elevation gain from start to finish.
So I have been using the new stop-and-focus feature introduced in recent update. There is good news and bad:
The good news is it that when it work, it works really well, and fixes the focus issue I have been having with this app for years. The difference is remarkable. See below for a mid-flight before/after example.
The bad news: It only worked maybe 4 times out of 5. (I did about 20 flights). On those exceptional occasions, I would do stop-and-focus, but the Continue, Start and Home button were all greyed out, the only option is to press the Upload button. Which I did, and got the terrifying message “Your home is point is not set to within 20m of this location. Do you want to set it now? Y/N”. This is while drone is hovering a half-kilometre away at 300 feet. I didn’t dare press “Yes” because I certainly didn’t want it landing in the middle of a forest. I pushed “No” and nothing changed, all buttons were still greyed out. I manually flew the drone home and landed it manually (and wasted an entire battery in the procedure which cost me much time). What does this error message mean? Shouldn’t there be a failsafe that prevents the “continue” and “home” button from being greyed out?!
This is a limitation of the camera/SDK. We tell the camera to focus and it says it did it. When you do the manual focus taps that is the area that gets used to calculate the focus so be sure to pick something contrasty with lots of little details for the camera to work with. Try not to pick green stuff. Those tire tracks would have been a great area. The dirt piles would have been good. The middle of the road would not be. The grass would not be. You want edges and hard light to dark transition areas. That is the kind of stuff that helps the camera find a peak contrast setting.
If you press the Stop button you should be able to hit the Continue button to keep going. You can't manually move the aircraft around during this time without having to restart the mission. You can't restart a mission away from the home point. This is enforced for safety reasons.
The only way you should have gotten the upload button while up in the air is if you switched out of the programmed flight mode.
So Zane what I'm telling you is that there IS a bug in the app, at least 4 times I was unable to resume my flight after stopping, and at no time did I ever switch out of programmed flight mode. Given that I never switched modes, can you look into that issue?
Also, 20 flights later, I can tell you that where I pull focus is irrelevant. It's just pulling the focus after stopping that works. Either everything is in focus, or nothing is in focus. Even when I pull focus on the EXACT same spot multiple times, no matter whether field of dirt or high contrast area, it has been hit and miss up till this new feature was introduced. But the new feature is not very good if it causes me to lose control of programmed flight. It's aggravating that you don't believe that. Maybe others on this forum can weigh in?
Also, if I had said "Yes" to the "homepoint not within 20m do you want to set it now" while drone in midair away from me, what would have happened??
Please email the log files for the affected flights to us so we can actually see what happened and we can look into it.
Where you pull is SUPER relevant. The automated focus pull that happens at the top of the climb is done on center of the current field of view. When you double tap to force an autofocus it will use the area you tap on to calculate the focus. If that area is not contrasty it can give poor results.
That does not mean that it cannot fail though...
This is how autofocus works: the camera internally looks at a series of images at different focus settings and determines which one has the most entropy within a certain pixel window. The entropy value is higher when there are more features with bigger value differences. These numbers quickly flatten out when it is out of focus and peak when it is in focus. If the successive images that are used to calculate the autofocus value are taken while in motion or the target is changing this will obviously mess things up. This is why we enforce that the aircraft is not moving when the autofocus is taken. If the target is largely featureless or lacks sufficient contrast the entropy number may have a false peak that makes the camera think that is the optimal value when in fact it isn't. The camera then reports that a peak value was found and without checking the full resolution images carefully the pilot may not know and take a bunch of out of focus pictures. This is an old problem that is inherent in successive image autofocuses and is why high end cameras use other methods such as range finders and phase shift measurements to help weed out false peaks.
Okay the physics of the focus make sense. The camera onboard is excellent and seems to have great focus (as observed during manual flights).
So I would put forward, that your procedure/commands to the drone to do a focus test after liftoff when reaching target altitude is flawed (works maybe 2/3 of the time, verified by others in this discussion), whereas your procedure/commands to the drone to do a focus test after stopping midflight in fullscreen mode is effective (works every time and over any terrain). I wonder if the focus test after liftoff maybe occurs a fraction of a second before or after the drone changes motion - i.e. maybe the drone is pulling focus while slightly in motion. Now I know you wouldn't program it that way, but it seems to be happening that way and that's what all my posts have been getting at.
I suspect the full STOP command is causing the drone to stop reliably as opposed to the focus test that happens initially. Indeed, after pushing STOP midflight, I was unable to force focus for about 5 seconds, during which time I noticed the drone stabilizing and becoming absolutely still. Only then would it let me force focus - which is good programming on your end. I would look to the initial takeoff/focus procedure to identify any possible motion/drift occurring during focus.
As for the greyed out continue button, I will email you the log file of one aborted flight.
Have you ever had to tap more than once to get it to pull a good focus in DJI Go? They use what we would hope is the same SDK calls. In DJI Go you get a beep when it says it has a solution and you don't get a beep if it doesn't come up with one.
The same code is used when doing it at the top of the climb and on the double tap gesture.
The reason the pause is so long at the top is because it is waiting for things to settle before pulling an autofocus from the center of the frame. No motion occurs until we get a response from the camera.
There are some differences between the way the aircraft is STOPped manually and how it occurs when at the top of the climb waypoint. We will look into that. Your feedback that it sometimes takes 5 seconds is interesting. I don't know that the positional holding strength while on a waypoint is sufficient to overcome wind and it is possible there is still motion going on in some cases.
In Go, you won't get a successful focus (with confirmation) unless it registers a good contrasted target either. (Just a data point.)
Give us feedback on the latest beta version that has an added Infinity Focus button or forever hold your peace!
Could you send me an email invitation to redeem code for test flight to the email associated with my account please (I don't have "Mail" on my ios device so can't ask for a code thru app).
PS I sent you flight logs about 3 weeks ago, did you have a chance to review them?
All you need is the link posted above to be able to test the beta version.
We looked at the logs but there is nothing that was out of place. It said the focus succeeded.
The beta version includes an Infinity Focus button that puts the focus ring value all the way at the far end. This is what DJI would refer to as being focused at infinity. We have done some testing but would like some feedback from the people that have requested it.
ThankU Zane! I will try this new feature as soon as I can and make feedback. I really appreciate your effort!
It's not possible to receive the access code for "test flight" without a mail client on the device.It can be downloaded but not accessed. If anyone has a code to share, please let me know.
Zane there was another question above, regarding what happened when the drone did not resume course. I got the error message while it was stopped mid-flight
“Your home is point is not set to within 20m of this location. Do you want to set it now? Y/N”
What do I do in this situation? What happens if I say yes? Each time I had to fly it home manually not risking setting my home point above a forest. Please clarify?
We are not using redemption codes for the beta version. Follow the link that has been provided after you have downloaded TestFlight from App Store.
Nicholas: You cannot reload a mission mid flight if you have left the programmed flight mode. The only way to pause and resume a mission is using the stop and continue buttons in the app. It wouldn't have let you reload the points while you were flying anyway.
No link arrived with Testflight download. All I can do is this:Also, your answer re. midflight is unclear. To clarify, my question was, what happens if I press "YES" ? (I never left programmed flight mode either. I merely stopped it. And the flight logs you have will verify that). So if I push YES...
I'm guessing you tap on the icon. The app provided no feedback indication that you tapped the icon or anything happened. So I would suggest it change color momentarily or something to indicate an action has occurred.
Secondly, I rarely ever set focus to infinity when I'm flying. The reason is in all the testing I have done, I set the focus to auto, tap an area of contrast that is far away, and then change the focus setting to manual and observe where the slider is set after my auto focus. It is never completely to infinity, almost, but never all the way. It doesn't matter how far away an object is that I auto focus on, when going back to manual, it's never quite on infinity. This gives me the impression that full infinity may not be the best setting for this camera (p4p).
So, that said, I would prefer that the icon pull an auto focus on the subject I am aiming at rather than simply setting the camera to infinity. Maybe I position the craft so that my target is center screen, tap the icon, and the app pulls an auto focus on the center of the screen followed by a green "success" or red "fail" and then the user could resume the mission or try again.