projective-geometry

Normal Vector of Three Points

a 夏天 提交于 2019-11-30 07:10:31
Hey math geeks, I've got a problem that's been stumping me for a while now. It's for a personal project. I've got three dots: red, green, and blue. They're positioned on a cardboard slip such that the red dot is in the lower left (0,0), the blue dot is in the lower right (1,0), and the green dot is in the upper left. Imagine stepping back and taking a picture of the card from an angle. If you were to find the center of each dot in the picture (let's say the units are pixels), how would you find the normal vector of the card's face in the picture (relative to the camera)? Now a few things I've

Extract projective homography from two Kinect depth maps

情到浓时终转凉″ 提交于 2019-11-29 11:43:12
问题 Given two consecutive 3D point clouds 1 and 2 (not the whole cloud, say 100 points selected from the cloud with OpenCV's GoodFeaturesToMatch), obtained from a Kinect depthmap, I want to compute camera's homography from 1 to 2. I understand that this a projective transform, and it has already been done by many people: here (slide 12), here (slide 30) and here in what seems to be the classic paper. My problem is that whilst I'm a competent programmer, I haven't got the math or trig skills to

Normal Vector of Three Points

余生颓废 提交于 2019-11-29 08:59:08
问题 Hey math geeks, I've got a problem that's been stumping me for a while now. It's for a personal project. I've got three dots: red, green, and blue. They're positioned on a cardboard slip such that the red dot is in the lower left (0,0), the blue dot is in the lower right (1,0), and the green dot is in the upper left. Imagine stepping back and taking a picture of the card from an angle. If you were to find the center of each dot in the picture (let's say the units are pixels), how would you

How can I project an arbitrary plane identified by 4 points onto a 2d plane?

拥有回忆 提交于 2019-11-28 22:06:57
The issue we are trying to solve the issue of locating a point in two different representations of a plane. The first plane we have is rotated to create perspective; the second is a 2d view of that same plane. We have 4 points on each of the plans that we know to be equivalent. The question is if we have an arbitrary point in plane 1, how do we find the corresponding point in plane 2? It is best probably to illustrate the use case in order to best clarify the question. We have an image illustrated on the left. Projective plane 2D layout diagram of space So the givens that we have are the red

Warping an image using control points

北城余情 提交于 2019-11-28 09:11:14
I want to convert an image using control points according to this scheme extracted from here : A and B contains the coordinates of the source an target vertices. I am computing the transformation matrix as: A = [51 228; 51 127; 191 127; 191 228]; B = [152 57; 219 191; 62 240; 92 109]; X = imread('rectangle.png'); info = imfinfo('rectangle.png'); T = cp2tform(A,B,'projective'); Up to here it seems to properly work, because (using normalized coordinates) a source vertex produces its target vertex: H = T.tdata.T; > [51 228 1]*H ans = -248.2186 -93.0820 -1.6330 > [51 228 1]*H/ -1.6330 ans = 152

How can I project an arbitrary plane identified by 4 points onto a 2d plane?

一曲冷凌霜 提交于 2019-11-27 14:12:30
问题 The issue we are trying to solve the issue of locating a point in two different representations of a plane. The first plane we have is rotated to create perspective; the second is a 2d view of that same plane. We have 4 points on each of the plans that we know to be equivalent. The question is if we have an arbitrary point in plane 1, how do we find the corresponding point in plane 2? It is best probably to illustrate the use case in order to best clarify the question. We have an image

proportions of a perspective-deformed rectangle

时光怂恿深爱的人放手 提交于 2019-11-27 02:51:31
Given a 2d picture of a rectangle distorted by perspective: I know that the shape was originally a rectangle, but I do not know its original size. If I know the pixel coordinates of the corners in this picture, how can I calculate the original proportions, i.e. the quotient ( width / height ) of the rectangle? (background: the goal is to automatically undistort photos of rectangular documents, edge detection will probably be done with hough transform) UPDATE: There has been some discussion on whether it is possible at all to determine the width:height ratio with the information given. My naive

Warping an image using control points

99封情书 提交于 2019-11-27 02:43:26
问题 I want to convert an image using control points according to this scheme extracted from here: A and B contains the coordinates of the source an target vertices. I am computing the transformation matrix as: A = [51 228; 51 127; 191 127; 191 228]; B = [152 57; 219 191; 62 240; 92 109]; X = imread('rectangle.png'); info = imfinfo('rectangle.png'); T = cp2tform(A,B,'projective'); Up to here it seems to properly work, because (using normalized coordinates) a source vertex produces its target