OpenDroneMap / ODM

A command line toolkit to generate maps, point clouds, 3D models and DEMs from drone, balloon or kite images. 📷
https://opendronemap.org
GNU Affero General Public License v3.0
4.9k stars 1.11k forks source link

Set of images produces "collage" like distorted orthophoto #384

Closed pierotofy closed 8 years ago

pierotofy commented 8 years ago

Input images: https://masseranolabs.com/images.zip (taken at 50 meters AGL, 80% overlap). Trees in the area likely lead to poor features detection. Camera: DJI Phantom 3 (ccd: 6.16)

Processed using dev branch, default options.

Resulting orthophoto:

orthophoto_1

Changing option "--matcher-distance" to 50 yields:

orthophoto_2

GPS EXIF data looks correct:

exit_data

@paulinus

dakotabenjamin commented 8 years ago

This looks like an issue with OpenSfM. Look at the sparse cloud here: croppercapture 4

dakotabenjamin commented 8 years ago

For the sake of transparency, it was suggested on the gitter that this may be a camera calibration issue.

I've produced a kludge-y calibration tool here that produces calibrated photos based on distortion parameters from checkerboard reference photos.

pierotofy commented 8 years ago

I'll try to run the tool and retry processing. I'll report results here. Thanks @dakotabenjamin

pierotofy commented 8 years ago

I ran the CameraDistortion tool using the calibration images for DJI Phantom 3, and I got this:

odm_orthophoto

Point cloud (shows part of one of the houses, which makes sense, since there are more features there).

model

dakotabenjamin commented 8 years ago

That's disappointing. It looks like there are a few problems going on here

  1. You have a partial reconstruction. This may be solved by increasing the number of features extracted or, oddly enough, decreasing the resize value.
  2. Since the point colors in the point cloud are fine I'm wondering if it's a texturing bug.

Quick question, what time of day were these photos taken? It almost looks like there are lots of shadows in the point colors of the point cloud.

pierotofy commented 8 years ago

On 1. original images were 4000x3000 but I set a resize parameter of 1000.

Images were taken around 5:25pm, so just before twilight. Not ideal light conditions I realize. I would expect some distortion, but the output is really messed up.

dakotabenjamin commented 8 years ago

I'm at a loss at this point. I'm hoping @paulinus can provide any insight, although if its a texturing problem, @smathermather we should ping spotscale.

pierotofy commented 8 years ago

Result of processing with DroneDeploy: http://drdp.ly/2XlFAs

Some distortion near trees, but main features are reconstructed.

smathermather commented 8 years ago

Resize parameter of 1000 is pretty low, and if you didn't change your matching parameters, this could result in a smaller point cloud. @pierotofy: have you run this with undistorted images and with defaults?

pierotofy commented 8 years ago

@smathermather just tried with all defaults parameters and undistorted images.

odm_orthophoto

smathermather commented 8 years ago

@pierotofy -- what does your textured mesh look like?

pierotofy commented 8 years ago

Here it is (default parameters):

image

Doesn't look too good.

smathermather commented 8 years ago

Hard to tell for sure-- does the textured mesh look fine but the orthophoto is problematic?

pierotofy commented 8 years ago

Well, the orthophoto is definitely problematic, the textured mesh is not complete, it displays only a very small area (like, 4 tiles instead of the 200+ from the dataset) and elevation is also not properly represented (look at the warp in the image above).

Images are linked at the top of this discussion for anyone that wants to reproduce this problem.

dakotabenjamin commented 8 years ago

Hey @xialang2012 I ran your images. Can you tell me what parameters you used?

dakotabenjamin commented 8 years ago

@pierotofy have you tried a resize of 1200 or 1500? It looks like on #392 it's being linked back to a too-small resizing.

pierotofy commented 8 years ago

I've tried using 2400 (the default), but I still get malformed output.

I wish I had more time to dig into the code myself to troubleshoot it, but I'm busy with WebODM.

xialang2012 commented 8 years ago

@pierotofy ,I have test the dataset that you provide with the default parameter, and the result is reasonable

qq 20161021121716

With --rezise--to 1000 qq 20161021155512

pierotofy commented 8 years ago

O_o

Is it be possible that a computer with low RAM is the cause? I ran my dataset with a VM that had only 3 GB of RAM.

xialang2012 commented 8 years ago

Youd better to update to the lastly version of the dev branch and try it again. I think it is none of the business about the RAM size.

For my experience the weird ortho image would be product when number of the input images is small, such as less than 8 and with the resize to 1000(about). Besides, I found only when we used the mvs-texting to texture the mesh, it will occurred.

pierotofy commented 8 years ago

Ok I can confirm that using the latest code in the dev branch seems to work. I got this results (resized the images to 1800, default parameters).

odm_orthophoto large

image

This can probably be closed! Thanks everyone for the help.

JLMarcelino commented 5 months ago

Hi! Sorry for bothering here, but I have the exact same problem (2024!). Can you explain how can I update to the lastly version of the dev branch?

smathermather commented 5 months ago

This was a walk through memory lane to see this issue. Hi @pierotofy -- did you ever figure out how to improve your results from OpenDroneMap? :smile:

@JLMarcelino -- please come over to community.opendronemap.org where we provide support and troubleshooting. We try to keep the repositories focused on bug reports and improvements, but we'll get you sorted over on the community forum.