Extrinsic parameters of camera - are they constant? - matrix

I am wondering how can the extrinsic parameters of a camera be constant?
I know that the rotation matrix aligns the world coordinate system axises to the camera coordinate system, and the translation matrix/vector aligns the origo on top of each other.
But how can the parameters be constant? Would it not somehow be required that I know the orientation of the camera in world space? I.e. by an accelerometer or something?
I hope someone can help me wrap my head around this.

As you have correctly pointed out, camera extrinsics consist of a rotation and a translation of the camera's coordinate system relative to some world coordinate system. So, the extrinsics are constant only as long as the camera does not move relative to the world coordinates. As soon as your camera moves, its extrinsics change.
When you calibrate your camera, you typically use multiple images of a planar calibration pattern. During the calibration process the extrinsics of each location of the calibration pattern are computed. Once the camera is calibrated, you can compute the extrinsics by detecting some reference points with known world coordinates in the image. See this example in MATLAB.

Related

How is point cloud data acquired from the structured light 3D scanning?

I am trying to understand the 3D reconstruction of Object using 3D structured Lighting scanner and I am stuck at the point where a method of decoding set of camera and projector correspondences to use to reconstruct a 3D point cloud. How exactly is 3D point cloud information acquired from the information obtained from those correspondences? I want to understand the mathematical implementation, not the code implementation.
assuming you used structured light method which uses some sort of lines (vertical or horizontal - like binary coding or de-brujin) the idea is as follows:
a light plane goes through the projector perspective center and the line in the pattern.
the light plane normal needs to be rotated with the projector rotation matrix relative to the camera (or world depends on the calibration). the rotation part for the light plane can be avoided if if treat the projector perspective center as system origin.
using the correspondences you find a pixel in the image that match he light plane. now you need to define a vector that goes from the camera perspective center to the pixel in the image and then rotate this vector by the camera rotation (relative to the projector or world. again' depending on the calibration).
intersect the light plane with the found vector. how to compute that can be found in wikipedia: https://en.wikipedia.org/wiki/Line%E2%80%93plane_intersection
the mathematical problem (3d reconstruction) here is very simple as you can see. the hard part is recognizing the projected pattern in the image (easier than regular stereo but still hard) and calibrating (finding relative orientation between camera and projector).

How to Use FindPlane()

Could someone explain to me how FindPlane works? (I understand the inputs, and the outputs, but not the process.) I am getting random values for the output and therefore I do not understand how it actually functions: does it raycast a normal vector from my camera according to my touch position and gets the depth point that hit the raycast and gets a plane out of that?
Operation is similar to raycast, but other way round. When you click any point on screen, screen coordinates are recorded. All 3D points in Pointcloud are projected onto image plane using camera intrinsic. Points which are close to screen coordinates are taken. RANSAC method is used to extract plane information from those points. SVD can also be used to extract plane normal from inliers obtained from RANSAC. This method should be used only once per frame transformation operation is applied on all points in pointcloud.
This method gives random values in cases where Sparse Pointcloud, reflections in 3D point cloud, reflective surfaces, Cluttered 3D space, IR from outside etc.,

Three.js : Absolute coordinates of point on surface [duplicate]

I have a 3D object. "Attached" to it is a point. When the object is moved or rotated, the point moves and rotates with it.
Given the object's position and rotation, how can the position of the point in world space be calculated? (Using THREE.js's API if possible)
Thanks
For a point in an object's local coordinate system,
object.localToWorld( point );
will return the world coordinates of the point, assuming the same transform is applied to the point as is applied to the object.
three.js r.55

THREE.js: Calculate world space position of a point on an object

I have a 3D object. "Attached" to it is a point. When the object is moved or rotated, the point moves and rotates with it.
Given the object's position and rotation, how can the position of the point in world space be calculated? (Using THREE.js's API if possible)
Thanks
For a point in an object's local coordinate system,
object.localToWorld( point );
will return the world coordinates of the point, assuming the same transform is applied to the point as is applied to the object.
three.js r.55

principle point in camera matrix ( programming issue)

In a 3x3 camera matrix what does the principle point do? how its location is formed? can we visualize that?
It is told that the principle point is the intersection of optical axis with the image plane. but why it is not always in the center of image?
we use opencv
The 3x3 camera intrinsics matrix is used to map between the coordinates in the image to the physical world coordinates. Similarly, the role of the principle point in this matrix is the mapping of "the intersection of optical axis with the image plane", between the coordinates in the image to the physical world coordinates. Ideally the principle point is in the center of the image, for most cameras, but this is not always the case in practice. The principle point may be slightly off center due to tangential distortion or imperfect centering of the lens components and other manufacturing defects. The 3x3 camera intrinsics matrix tries to correct this distortion.
I have found this site to be helpful to me when when learning about camera calibration. Although it is in MATLAB, it is based on the same camera calibration used in OpenCV.
The principal point in the 3x3 camera calibration matrix might also, more usefully, represent image cropping. If the image has been cropped around an object, then mapping the pixel coordinates to word coordinates requires a translation vector which appears as a non-centralized principal point in the matrix.

Resources