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

Question on The Physical method - camera calibration and fundamental matrix, or given essential matrix #2

Open
ahyow opened this issue Mar 28, 2021 · 5 comments

Comments

@ahyow
Copy link

ahyow commented Mar 28, 2021

Hi, i have read through ur code and appreciate your works!

I have a question that would request help from you. I have a cross eyed stereo camera (both tilt inwards toward my object) and when i compute the disparity map, i got gradient depth (because of angled camera) instead of constant as it it flat on the table.
I been searching for ways to transform the image plan so that the object looks frontal view as it it put flat on the table.

i saw the formula from the paragraph "The Physical method - camera calibration and fundamental matrix, or given essential matrix" but i not really understand, would like to ask is it applicable to my case??which i wan to remove the gradient disparity as the object is put flat on table while maintaining cross eye stereo camera

@dmckinnon
Copy link
Owner

I'm not sure I understand what the question is - are you saying you want to artificially construct the front view from two angled views?

@ahyow
Copy link
Author

ahyow commented Apr 5, 2021

Im sorry for not mention it in clear way.

My question is that now i have a convergence stereo camera and the object that i would like to capture is putting flat on the table, which mean the depth return from the object should be flat( or constant) but the depth return in gradient/varient increasing depth ( due to keystoneof the toe in stereo camera i would believe).

Mayb you help me how can i get constant depth return from flat surface instead of increasing/decreasing depth from the item.

@dmckinnon
Copy link
Owner

I apologise for the late response. I think I would need to see your setup to fully understand but if the camera you get depth with respect to is angled from your object, then of course you'll naturally get a gradient of depth. Can you define a point between your cameras, that is perpendicular to the plane of your object, and transform the object's depth points in the camera to the reference frame of this point? That should achieve the end you want. Does that make send?

@ahyow
Copy link
Author

ahyow commented May 4, 2021

111

Hi, its okay for late response because i still in need your help haha!

Attached image is quite similar to my setup, and like you say the depth is respect to angled from my object.

Can you help me on how to define the plane between camera the is perpendicular to my object??

I would wan to set up my camera in converging but the result using code to adjust it become parallel (non gradient as the object is flat )
d36956ea2d541d6c3a0312245f1c1b5ddbdb4502

This is my result as can see from the color map the depth is not consistent (gradient due to angle ) but i would like to adjust this

@dmckinnon
Copy link
Owner

Well, if your origin is at camera 1 - call this C1 - and you have a transform T that is the translation and rotation of camera 2 with respect to camera 1, then apply half of that transform to get the midpoint. You'd then be looking at that particular plane head-on. More generally, draw a perpendicular ray from your surface to the line in between your two cameras, and then where those two lines intersect, use that.

Remember that if T is an SE3 - which if you are using my code, it should be - then you need to take the log to move from the group space to the algebra space, half that 6-vector to get the half rotation and half translation, and then take the exponential again and apply this as a left-update to the identity transform from the origin.

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

2 participants