Skip to content
tezvyn:

Explain the pinhole camera model and intrinsic matrix K

Source: Wikipedia: Pinhole camera modelMediumHow cards are made

Explain the pinhole camera model and intrinsic matrix K

Tests projective geometry and mapping sensor properties to K. Good answers derive perspective projection via similar triangles, list fx, fy, cx, cy, skew, and explain pixel scaling. Red flag: mixing intrinsics with extrinsics or saying K includes distortion.

What's really being asked

This question tests whether you can move beyond memorizing the K matrix and actually explain the physical camera properties it encodes. Interviewers want to see that you understand perspective projection as a geometric process and can connect real sensor characteristics like focal length, pixel size, and principal point offset to their algebraic representation. At the senior level, they also care whether you distinguish between the idealized pinhole model and real lens effects.

The full answer

A strong answer starts by describing the pinhole camera as an idealized device where light travels through a single point and projects onto an image plane, forming similar triangles between the 3D world point, the pinhole, and the sensor. From this geometry, the candidate should derive that the projection equations are x = fX/Z and y = fY/Z. Next, the candidate must explain that the intrinsic matrix K maps these metric coordinates to pixel coordinates. The parameters are fx and fy, which equal the focal length divided by pixel width and height respectively, cx and cy which represent the principal point or sensor offset from the optical axis in pixels, and an optional skew parameter gamma that accounts for non-rectangular pixels. A senior candidate should explicitly state that fx and fy are not just the focal length but also incorporate pixel density, and that cx and cy are not necessarily at the image center if the sensor is misaligned.

The mistakes people make

A common red flag is listing K's entries without explaining what physical property each represents. Another is conflating intrinsics with extrinsics by bringing in rotation and translation matrices. Some candidates incorrectly state that K includes radial or tangential distortion coefficients; distortion is modeled separately because the pinhole camera is an idealization with no lens. Saying that fx and fy are identical without qualification is also weak, since real sensors can have non-square pixels or anisotropic scaling.

What usually comes next

The interviewer may ask how the projection changes if the origin moves to the bottom-left instead of the center, which tests your understanding of cx and cy sign conventions. They might ask what happens if pixels are non-square, leading to different fx and fy values. Another follow-up is to write the full projection equation including extrinsics, P = K[R|t]X, and ask which parameters are fixed per camera versus per frame. You might also be asked why the pinhole model ignores focus and what failure modes occur with wide-angle lenses.

A concrete example

Consider a camera with a 35 millimeter focal length, a sensor with 5 micron square pixels, and a 1920 by 1080 resolution where the optical axis hits the exact center. The focal length in pixels is 35 millimeters divided by 0.005 millimeters per pixel, giving fx = fy = 7000 pixels. The principal point is at the image center, so cx = 960 and cy = 540. The intrinsic matrix is therefore K = [[7000, 0, 960], [0, 7000, 540], [0, 0, 1]]. If the pixels were rectangular at 5 by 6 microns, fx would remain 7000 while fy would become 5833, and K would reflect that anisotropy.

Interview question

How are the intrinsic parameters fx and fy in K derived from physical camera properties?

  • a.They equal the focal length divided by pixel width and height respectivelyCorrect
  • b.They combine focal length with the camera's rotation and translation
  • c.They incorporate radial distortion coefficients for lens curvature
  • d.They equal the physical focal length measured directly in millimeters
Why?

fx and fy convert the physical focal length into pixel units by dividing by pixel width and height, making C correct. A is a common misconception because K stores focal length in pixel units, not millimeters, and D is wrong since distortion is modeled outside the idealized pinhole matrix.

Just read this? Test yourself on what you have been reading.

Read the original → en.wikipedia.org

You just looked this up. Could you explain it out loud?

That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on computer vision — each one lists the topics its interview covers.

See open roles