Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DJI P1 Sensor is not being handled correctly for SFM Triangulation #1615

Open
summitbri opened this issue Mar 1, 2023 · 1 comment
Open

Comments

@summitbri
Copy link

How did you install ODM? (Docker, installer, natively, ...)?

Docker 3.0.5

What is the problem?

Camera orientation isn't being parsed correctly, as evidenced with attached dataset (21 images). Incremental process works fine, triangulation does not.

https://community.opendronemap.org/t/sfm-triangulation-and-orthophotos-very-strange-results/14597/9

What should be the expected behavior? If this is a feature request, please describe in detail the changes you think should be made to the code, citing files and lines where changes should be made, if possible.

SFM triangulation should produce an ortho that isn't 'garbled'.

Examples from sample provided dataset:

Triangulation:
image

Incremental:
image

How can we reproduce this? What steps did you do to trigger the problem? If this is an issue with processing a dataset, YOU MUST include a copy of your dataset AND task output log, uploaded on Google Drive or Dropbox (otherwise we cannot reproduce this).

docker run -ti --detach --rm --tty --name odm_container -v /odm/datasets/project:/datasets/code opendronemap/odm --project-path /datasets
--auto-boundary
--orthophoto-resolution 1.5
--gps-accuracy 0.03
--sfm-algorithm triangulation
--rerun-from dataset

21 image dataset here: https://drive.google.com/drive/folders/1TVp9oM4i6AEL60KjhxL45CdB5RvP1eoN?usp=share_link

@pierotofy
Copy link
Member

The root cause is that we always assume that the camera is mounted facing down.

https://github.com/OpenDroneMap/ODM/blob/master/opendm/photo.py#L882

            # Convert between image and body coordinates
            # Top of image pixels point to flying direction
            # and camera is looking down.
            # We might need to change this if we want different
            # camera mount orientations (e.g. backward or sideways)

            # (Swap X/Y, flip Z)
            cbb = np.array([[0, 1, 0],
                            [1, 0, 0],
                            [0, 0, -1]])

The P1 has the ability to move the camera independently from the drone body, but that behavior is not modeled.

We'd welcome a PR that helps to improve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants