Inputs:intrinsic_lambda is the 3×3 matrix K with fx=fy=800, principal point (cx,cy)=(320,240) and zero skew. point_w_prime is the camera-frame point (Xc,Yc,Zc)=(10,20,5), so it sits 5 units in front of the camera.
Perspective: dividing by depth puts the point on the plane Z=1: (510,520,1)=(2,4,1). Points twice as far away would land half as far from the optical axis.
Intrinsics:K scales those normalized coordinates into pixels and shifts them to the principal point: u=800⋅2+0⋅4+320=1920, v=800⋅4+240=3440. The third row gives 1, confirming the homogeneous form.
Output: the pixel pair [1920.0, 3440.0], floats rounded to 4 decimal places.
Notice the result lies far outside a 640×480 image: the projection never clips, it just maps the ray. With a nonzero skew s, u would also pick up s times the normalized y.
Constraints
The 3D point [X_c, Y_c, Z_c] is in camera coordinates with depth Z_c > 0
K (passed as intrinsic_lambda) is a valid 3x3 intrinsic matrix
The pinhole camera model is the foundational idealization in computer vision for perspective projection, assuming light rays pass through a single point (pinhole) to form an image on the sensor plane. Key concepts include:
Camera coordinates: 3D point Pc=[Xc,Yc,Zc]T in the camera frame, where Zc>0 is depth (behind the pinhole).
Intrinsic matrix K: Encodes internal parameters—focal lengthsfx,fy (pixels per radian in x/y), principal point(cx,cy) (image center offset).
Homogeneous coordinates: Enable perspective division; projection yields [u,v,1]T=\frac{1}{Z_c}KPc, where pixel [u,v] is the normalized image point.
Prerequisites: Matrix multiplication, perspective division, NumPy-like array operations. No distortion assumed here (ideal pinhole).
This model underpins tasks like 3D reconstruction and augmented reality.
2. Algorithm Approach
Direct matrix-vector multiplication followed by normalization: