 # COMP322/S2000/L221 Relationship between part, camera, and robot (cont’d) the inverse perspective transformation which is dependent on the focal length.

## Presentation on theme: "COMP322/S2000/L221 Relationship between part, camera, and robot (cont’d) the inverse perspective transformation which is dependent on the focal length."— Presentation transcript:

COMP322/S2000/L221 Relationship between part, camera, and robot (cont’d) the inverse perspective transformation which is dependent on the focal length (f ) and the distance ( ) of the point P along the z- axis of the camera coordinate frame; is the coordinate of the image of P in the x-y plane of the camera coordinate frame. Questions: l How to estimate f, if it is not given? l How can we compute since we can only obtain the pixel location of P from image processing programs? How to estimate, if the position of the camera is not given?

COMP322/S2000/L222 Estimating the Effective Focal Length By carefully selecting test image points, a and b, such that and b is at a distance of d from a; and careful alignment and measuring of the focal length, f, can be computed by similar triangles, i.e., ==> where is the distance of in the image. Unfortunately, a image and b image are not readily known!!

COMP322/S2000/L223 Relationship between pixel and camera frames Camera coordinate frame: Pixel coordinate frame: Need to establish the relationship:

COMP322/S2000/L224 Relationship between pixel and camera frames Note: l There is a scaling factor involved. Let  x and  y denote the distance between 2 pixels in the x-axis and y-axis of the pixel frame respectively. These two values are not easy to calculate; usually given as specification of the camera. l Assuming the camera coordinate frame has its origin at the center of the image, i.e. at pixel, ( N x /2, N y /2), where N x and N y are the pixel sizes in the pixel frame, we have

COMP322/S2000/L225 Relationship between base, part and camera Assuming the orientation of the camera is known, but the position is not known, i.e. Q: How to estimate the position of the camera with respect to the base? A: Need some equations to solve for the three unknowns.

COMP322/S2000/L226 Relationship between base, part, and camera Since  = z 0, the equation is quite complicated. Let’s invert the equation, i.e., Eq.(1) :

COMP322/S2000/L227 Relationship between base, part, and camera Suppose we have a test pattern with 2 points on the work table, the coordinates of a, b w.r.t. the base are known, i.e., and the image coordinates are also known, i.e.,

COMP322/S2000/L228 Relationship between base, part, and camera Substituting into Eq.(1), we have, Assuming f is known, we have 4 equations and 3 unknowns, thus,

COMP322/S2000/L229 Relationship between base, part, and camera Example: Given f = 1cm; camera orientation is Find the position of the camera w.r.t. the base.

COMP322/S2000/L2210 Relationship between base, part, and camera Unfortunately, a image and b image are not easily calculated, therefore, we need to reformulate our derivation. Following the idea that we can always pre-define points to calculate the unknown, i.e., the position of the camera, the focal length,  x  and  y. Let’s attempt to establish equations to solve for these camera parameters: (assuming the orientation of the camera is known) We start with the equation:

COMP322/S2000/L2211 Relationship between base, part, and camera

COMP322/S2000/L2212 Relationship between base, part, and camera Multiplying the two matrices, we have and the unknowns are x 0, y 0, z 0,  x,  y, and f.

COMP322/S2000/L2213 Relationship between base, part, and camera Let Multiplying out, we have 4 equations:

COMP322/S2000/L2214 Relationship between base, part, and camera To solve for the 6 (x 0, y 0, z 0,  x,  y, and f ) unknowns, we should try to re-arrange into matrix form (Ma = d), In expanding the previous 4 equations, we cannot re-arrange into linear equations. Conclusion: the solution is not as simple as we thought.!!!

Download ppt "COMP322/S2000/L221 Relationship between part, camera, and robot (cont’d) the inverse perspective transformation which is dependent on the focal length."

Similar presentations