How to remove and “glue” a spherical panorama on DJI Mavic Air
- Tutorial
With the release of Dji Mavic Air, the process of creating spherical panoramas seems to be simplified to the limit - he pressed a button and the sphere is ready. That’s what the advertisement said. To be honest, I already expected that our entire ball will be shot in the first months of sales, but for some reason this did not happen.
photo by Paul Oostveen
Most likely there are several reasons - the built-in software is extremely primitive and is not able to make a decent panorama if the conditions are at least slightly different from ideal. Above the water or over snow in cloudy weather you can get chunks of sky on the ground and other “beauties”, well, I'm not talking about the mediocre colors of the finished jpeg file and absolutely no resolution. Also a problem is objects located close to the camera - for example, to remove a sphere where a tower will be in the foreground or something similar on the machine will most likely not work out. The reason for this is parallax, namely the drift of the copter during shooting (despite the Mavic Air ’s very good GPS retention - a dozen centimeters will be enough to stupor the automation of embedded systems).
In advertising, the panorama resolution is 32mp, but is it so much when we shoot at 360 degrees, and everywhere with screens with a resolution of 4K or even higher? Plus, the firmware does not know how to glue the sky and does not understand what the right colors are, and this is impossible. Although the copter can shoot at +15 degrees, it’s still not enough to get a “roof”.
But it is not all that bad. If you are determined to get a good panorama - it is quite possible with Mavic Air. At first, I was somewhat skeptical of the standard shooting of 25 frames, but then I concluded that this is quite enough. Earlier, when shooting on DJI Phantom ¾ or DJI Mavic Pro using Litchi, I tried to take from 32 to 48 photos. Plus or minus. The 25 offered by Mavic Air at first seemed a little to me, I tried Litchi, but no significant increase came out. In the process of training, I developed a clear technique and optimized the process. Now for one not very large battery I manage to make up to 4-5 spheres, and gluing with color correction takes about 10-15 minutes. At the exit, we have a panorama with a resolution of up to 177mp with good colors, normal sky and full control of what is happening.
So, what is needed to achieve a good result?
First of all, it is advisable to remove everything correctly in order to minimize processing time. Of course, shooting at sunrise / sunset is very beautiful, but due to the low sun and possible glare, gluing can be difficult. You can use an additional lens hood - this will facilitate the work, but still you will have frames where the sun shines directly into the camera. For the first experiments, choose a clock closer to noon - then the sun will not be able to get into the frame. It is also worth avoiding objects that are very close to the copter. Select plans with equidistant objects. Large spaces can be very difficult to bond together without an obvious texture - lake / sea / snow / sand. I recommend turning off the automatic exposure of the camera. Look around and select the average shutter speed and aperture (in the case of the DJI Phantom 4 Pro), fix the sensitivity (ISO). Even if in some direction the exposure is not ideal, it can be corrected in Lightroom when converting from RAW. This is much easier than fighting automation errors that can occur if the camera is aimed at the sun or at the bottom is solid forest / water and similar surfaces.
Make sure that saving originals is turned on. When all parameters are set - you can start shooting. In the process, I recommend to monitor what the device removes. If there is any main object in the frame, you need to make sure that it is shot with the whole frame, that is, it does not fall into the junction of 2 frames and is not too close to the edge of the frame. If this nevertheless happened - it’s better not to move the copter at the end of the survey, using only rotation around its axis and tilting the camera to take a few frames of the object manually - this can greatly simplify gluing. To get a beautiful panorama, it is not necessary to go too high. Panoramas look great, where you kind of dive inside, you can be located not higher, but between the objects of shooting, but you need to make sure that the copter is able to remove the upper borders of objects,
An example in which the copter was too low. The panorama is glued with the built-in DJI Mavic Air software. Although, it is likely that if you take the source code and glue it with an external panorama program, you can save it.
And now - the frames are received - we proceed to the processing. DJI Go 4 saves all the sources in a separate folder - “Panorama” - copy the contents of the desired folder to the hard drive and drop it into Lightroom. Our task is to prepare individual frames for gluing in PTGUI - for this it is important not only to deal with the exposure and color of each frame, but also to make all parts of the future panorama as close as possible in brightness and contrast.
If local brightness correction is used - pull out any object - make sure that at all frames where it is present this is done as close as possible. PTGUI has a brightness equalization function, but it is better to do this in advance. Further, the resulting material can be exported (I recommend using Tiff with LZW compression of 8/16 bits per channel, depending on the power of your PC).
The next step will be the direct assembly of the panorama. Upload files to PTGUI PRO and click Align images.
The system analyzes the data and tries to compare frames by control points.
In some cases (water / snow, etc.), the program may display a message about the absence of matches on some frames - this means that you will have to set the control points manually.
If this is not the case, the program will give us a window with a panorama scan, where it is desirable to set the center - the place that will be displayed when loading - the face of the panorama, you can also adjust the horizon.
Next, we can open a preview of the panorama, which can be twisted and pre-evaluate the result.
Here you can notice especially strong problems, and if any, go to the editing of control points and try to fix it.
If there are no special problems - the last tab - Create Panorama - is set as in Lightroom - Tiff with LZW compression.
The next step is inspection and final fitting in Photoshop. We slowly look at the whole panorama in parts for inconsistencies - the horizon and problems at the main objects are especially striking. Well, if the joint on the object without a special texture.
Here, all the tools are already good - first we try to allocate by divergence by polygonal selection, then transformation - distortion and other options - we customize the “dropped out” piece. The shading of the selection can be set small - 1-2 pixels, and sometimes it is better to leave sharp edges altogether, we close the resulting areas as a result of the shift, as usual with a stamp or a healing brush.
Of course, there are more complicated cases - then we open a separate file with the object, copy it to a new layer, adjust the scale, delete the excess - we get a patch. In the case of the use of deformations - especially puppet deformation, it is very important to limit the points and not touch the edges of the panorama - otherwise it will no longer stick together.
It is time to give the effect and richness to the panorama. Now we can safely twist levels / curves / color to achieve the desired effect. You may need to use the Dodge / burn tools, work on individual objects - actually for this moment we exported all the way to Tiff and put up with huge file sizes.
In the end, you need to pick up the sky. I have already accumulated a certain amount of my reserves + I found something on the network. If there are no stocks or saved options, just stretch the sky up to the stop. it will not be very beautiful, but at least not a black dome.
We insert the sky object, immediately rasterize it (if before you had the sky panorama done correctly, no changes will be required), then make the mask, use the gradient to move from the sky to our background and adjust the brightness of the inserted layer with curves. Pay attention to the junction of the sky and your panorama, sometimes even when using a mask and gradient - dark objects can shine through and you can easily get translucent mountains above the city. It’s better to turn off the panorama layer and slowly, if you need to erase all the suspicious eraser.
This can be done. Glue in one layer the function “reduce” to minimize the volume, save Tiff just in case, then reduce the image to 10,000 points under the long side, since most services (Sferika.ru or the same Google Maps) will not miss a panorama that is too large in volume - Yes, and there’s no need to ship such a huge load (for phones on 4g it will be generally unbearable). We save the result of the work in JPEG - quality is enough 10 and the output has a panorama of 50 megapixels and a file size of 10-15 mb (depending on the details).
Our panorama is ready - it remains only to find a service for publication.
→ Ready panorama here
photo by Paul Oostveen
Most likely there are several reasons - the built-in software is extremely primitive and is not able to make a decent panorama if the conditions are at least slightly different from ideal. Above the water or over snow in cloudy weather you can get chunks of sky on the ground and other “beauties”, well, I'm not talking about the mediocre colors of the finished jpeg file and absolutely no resolution. Also a problem is objects located close to the camera - for example, to remove a sphere where a tower will be in the foreground or something similar on the machine will most likely not work out. The reason for this is parallax, namely the drift of the copter during shooting (despite the Mavic Air ’s very good GPS retention - a dozen centimeters will be enough to stupor the automation of embedded systems).
In advertising, the panorama resolution is 32mp, but is it so much when we shoot at 360 degrees, and everywhere with screens with a resolution of 4K or even higher? Plus, the firmware does not know how to glue the sky and does not understand what the right colors are, and this is impossible. Although the copter can shoot at +15 degrees, it’s still not enough to get a “roof”.
But it is not all that bad. If you are determined to get a good panorama - it is quite possible with Mavic Air. At first, I was somewhat skeptical of the standard shooting of 25 frames, but then I concluded that this is quite enough. Earlier, when shooting on DJI Phantom ¾ or DJI Mavic Pro using Litchi, I tried to take from 32 to 48 photos. Plus or minus. The 25 offered by Mavic Air at first seemed a little to me, I tried Litchi, but no significant increase came out. In the process of training, I developed a clear technique and optimized the process. Now for one not very large battery I manage to make up to 4-5 spheres, and gluing with color correction takes about 10-15 minutes. At the exit, we have a panorama with a resolution of up to 177mp with good colors, normal sky and full control of what is happening.
So, what is needed to achieve a good result?
- Standard DJI GO 4 software and saving shots in DNG Raw
- Adobe lightroom
- PtGui Pro
- Adobe Photoshop ... 10-20 minutes for each panorama
First of all, it is advisable to remove everything correctly in order to minimize processing time. Of course, shooting at sunrise / sunset is very beautiful, but due to the low sun and possible glare, gluing can be difficult. You can use an additional lens hood - this will facilitate the work, but still you will have frames where the sun shines directly into the camera. For the first experiments, choose a clock closer to noon - then the sun will not be able to get into the frame. It is also worth avoiding objects that are very close to the copter. Select plans with equidistant objects. Large spaces can be very difficult to bond together without an obvious texture - lake / sea / snow / sand. I recommend turning off the automatic exposure of the camera. Look around and select the average shutter speed and aperture (in the case of the DJI Phantom 4 Pro), fix the sensitivity (ISO). Even if in some direction the exposure is not ideal, it can be corrected in Lightroom when converting from RAW. This is much easier than fighting automation errors that can occur if the camera is aimed at the sun or at the bottom is solid forest / water and similar surfaces.
Make sure that saving originals is turned on. When all parameters are set - you can start shooting. In the process, I recommend to monitor what the device removes. If there is any main object in the frame, you need to make sure that it is shot with the whole frame, that is, it does not fall into the junction of 2 frames and is not too close to the edge of the frame. If this nevertheless happened - it’s better not to move the copter at the end of the survey, using only rotation around its axis and tilting the camera to take a few frames of the object manually - this can greatly simplify gluing. To get a beautiful panorama, it is not necessary to go too high. Panoramas look great, where you kind of dive inside, you can be located not higher, but between the objects of shooting, but you need to make sure that the copter is able to remove the upper borders of objects,
An example in which the copter was too low. The panorama is glued with the built-in DJI Mavic Air software. Although, it is likely that if you take the source code and glue it with an external panorama program, you can save it.
And now - the frames are received - we proceed to the processing. DJI Go 4 saves all the sources in a separate folder - “Panorama” - copy the contents of the desired folder to the hard drive and drop it into Lightroom. Our task is to prepare individual frames for gluing in PTGUI - for this it is important not only to deal with the exposure and color of each frame, but also to make all parts of the future panorama as close as possible in brightness and contrast.
If local brightness correction is used - pull out any object - make sure that at all frames where it is present this is done as close as possible. PTGUI has a brightness equalization function, but it is better to do this in advance. Further, the resulting material can be exported (I recommend using Tiff with LZW compression of 8/16 bits per channel, depending on the power of your PC).
The next step will be the direct assembly of the panorama. Upload files to PTGUI PRO and click Align images.
The system analyzes the data and tries to compare frames by control points.
In some cases (water / snow, etc.), the program may display a message about the absence of matches on some frames - this means that you will have to set the control points manually.
If this is not the case, the program will give us a window with a panorama scan, where it is desirable to set the center - the place that will be displayed when loading - the face of the panorama, you can also adjust the horizon.
Next, we can open a preview of the panorama, which can be twisted and pre-evaluate the result.
Here you can notice especially strong problems, and if any, go to the editing of control points and try to fix it.
If there are no special problems - the last tab - Create Panorama - is set as in Lightroom - Tiff with LZW compression.
The next step is inspection and final fitting in Photoshop. We slowly look at the whole panorama in parts for inconsistencies - the horizon and problems at the main objects are especially striking. Well, if the joint on the object without a special texture.
Here, all the tools are already good - first we try to allocate by divergence by polygonal selection, then transformation - distortion and other options - we customize the “dropped out” piece. The shading of the selection can be set small - 1-2 pixels, and sometimes it is better to leave sharp edges altogether, we close the resulting areas as a result of the shift, as usual with a stamp or a healing brush.
Of course, there are more complicated cases - then we open a separate file with the object, copy it to a new layer, adjust the scale, delete the excess - we get a patch. In the case of the use of deformations - especially puppet deformation, it is very important to limit the points and not touch the edges of the panorama - otherwise it will no longer stick together.
It is time to give the effect and richness to the panorama. Now we can safely twist levels / curves / color to achieve the desired effect. You may need to use the Dodge / burn tools, work on individual objects - actually for this moment we exported all the way to Tiff and put up with huge file sizes.
In the end, you need to pick up the sky. I have already accumulated a certain amount of my reserves + I found something on the network. If there are no stocks or saved options, just stretch the sky up to the stop. it will not be very beautiful, but at least not a black dome.
We insert the sky object, immediately rasterize it (if before you had the sky panorama done correctly, no changes will be required), then make the mask, use the gradient to move from the sky to our background and adjust the brightness of the inserted layer with curves. Pay attention to the junction of the sky and your panorama, sometimes even when using a mask and gradient - dark objects can shine through and you can easily get translucent mountains above the city. It’s better to turn off the panorama layer and slowly, if you need to erase all the suspicious eraser.
This can be done. Glue in one layer the function “reduce” to minimize the volume, save Tiff just in case, then reduce the image to 10,000 points under the long side, since most services (Sferika.ru or the same Google Maps) will not miss a panorama that is too large in volume - Yes, and there’s no need to ship such a huge load (for phones on 4g it will be generally unbearable). We save the result of the work in JPEG - quality is enough 10 and the output has a panorama of 50 megapixels and a file size of 10-15 mb (depending on the details).
Our panorama is ready - it remains only to find a service for publication.
→ Ready panorama here