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

Slight shift between point cloud and image #10

Open
AkshithNikhil opened this issue Sep 1, 2018 · 10 comments
Open

Slight shift between point cloud and image #10

AkshithNikhil opened this issue Sep 1, 2018 · 10 comments

Comments

@AkshithNikhil
Copy link

After overlaying image on point cloud, i'm facing a little shift. So if I take measurements on image,its giving wrong values because of shift. So is there any chance to solve this shift ?
My drone image resolution is 5472 x 3648 and using camFocal(3648.06) as you suggested in . I used pix4d for image processing.

@hokiespurs
Copy link
Owner

Hey @AkshithNikhil, apologies for the lack of documentation... it's on my todo list.

Did you do the following?

  1. undistort the images using the lens distortion parameters computed by Pix4D.
  2. set camFocal = {the focal length computed in Pix4D}. The focal length will be specific to your camera.

@AkshithNikhil
Copy link
Author

Hey @hokiespurs , thanks fot the reply.
I'm already using undistorted images and changed my focal length to pix4d computed focal length but still facing some shift. Can you suggest me any document so that I can see the entire flow ?.And in function changeImagePlane in addcameras,js, you are scaling imageplane by 3. Will that scaling matters in this issue ? and also suggest if there are any other ways to solve this.

@hokiespurs
Copy link
Owner

@AkshithNikhil,

Do you have a screenshot showing the shift?

Unfortunately, I haven't documented this project very well yet, so I don't have anything to point you towards.

The scale of 3 is just how large the images look in the 3D pointcloud. It shouldn't effect the alignment of the image with the pointcloud.

@AkshithNikhil
Copy link
Author

AkshithNikhil commented Sep 5, 2018

Hey @hokiespurs ,
I'm attaching some of the screenshots which will show you the shift. screenshot_1.png and screenshot_2.png will show shifted walls . And because of this I'm facing measurement issues. I did a point measurement on image at centre of a circle (see screenshot_3.png) but it shifted to edge of that circle (see screenshot_4.png).

shift_1
shift_2
shift_measure_1
shift_measure_2

@hokiespurs
Copy link
Owner

@AkshithNikhil, hmmm. I think it might be a scale issue due to an incorrect focal length.

If the issue is just the scale, there should not be an offset at the center of your image. Try to click a point at the center of your image and see if it ends up at the correct place in the pointcloud. Alternatively, you could zoom in on the center of an image and toggle the image on and off and see if there is misalignment. If it does end up being the scale, you could manually tweak the focal length until it lines up.

@AkshithNikhil
Copy link
Author

Hey @hokiespurs ,
I found out that issue is with pix4d. Till now I'm using pix4d for photogrametry and used outputs from pix4d. But I tried processing same images with agisoft and I did not get any shift. But still no clue why it worked with agisoft and not working with pix4d. Do you have any idea why is this happening ? And I manually tried to set focal length for pix4d outputs but no luck.

@hokiespurs
Copy link
Owner

@AkshithNikhil, glad it worked! I'm not sure why pix4d would give different results. I'll add that to my todo list to look into when I get back to this project.

Just curious, what type of project are you working on?

@AkshithNikhil
Copy link
Author

Hey @hokiespurs ,
very sorry for the late reply. I'm doing my B.tech project on image processing. So I thought this project will help for my B.tech project

@AbegNext
Copy link

@hokiespurs @AkshithNikhil do you have an email address I could contact you? I have a project I think you would find interesting and I would love to connect with you.

@p4effect
Copy link

p4effect commented May 5, 2019

Same problem here only using Agisoft to create files.

1
2

Exported camcal.xml from tool -> camera calibration -> adjusted camera with the following values
?xml version="1.0" encoding="UTF-8"?
calibration>
projection>frame</projection
width>4056</width
height>3040</height
f>2924.8915921315</f
cx>-18.7262702859493</cx
cy>-16.7157424221329</cy
k1>0.190910770363764</k1
k2>-0.573594089705962</k2
k3>0.386504850540253</k3
p1>-0.000147238276787958</p1
p2>0.000104759491985659</p2
date>2019-05-03T20:16:57Z</date
/calibration

Shots generated using dji mavic air

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

No branches or pull requests

4 participants