Where is the system origin for the principal point of a camera?

10 views (last 30 days)
In the example given in the documentation for the function cameraIntrinsics for the image size [480, 640] principal point is located at [320, 240]. On the other hand, the documentation states that 'the pixel coordinates used in Computer Vision Toolbox™ software are one-based, consistent with the pixel coordinates used by Image Processing Toolbox™ and MATLAB®'. So the principal point should be located at [320.5, 240.5]. Which variant is correct if it is known that the principal point should be located at the center of the image?

Accepted Answer

Image Analyst
Image Analyst on 18 Jul 2023
Well neither is correct since you swapped rows and columns from [480, 640] to when you were talking about [320, 240] and [320.5 and 240.5]. The center of the image is at (240.5, 320.5). Of course this is midway between a patch of 4 pixels at the center of the image so if you want the intensity there you can either interpolate it's value or use indexing once you've rounded the coordinates either up or down. So if you're indexing you can essentially take whichever of the 4 surrounding integer pixel locations that you want.
  3 Comments
Image Analyst
Image Analyst on 23 Jul 2023
Maybe it's just a convention/feature that they're using because they need integer coordinates because they're to be used as indexes into a matrix. Maybe they can't use floating point coordinates for some reason.
There's always this concept of whether pixels are points, or small square patches corresponding to IFOVs (instantaneous field of view) on the scene. For example, regionprops returns the bounding box as half a pixel outside the pixel coordinates because they're considering the pixels as squares with finite width and they want the bounding box to lie completely outside the little squares. Sometimes this causes problems if you want to crop the image by indexing so I wish they'd give us the option of having "on pixel" integer coordinates or "surrounding the pixel" floating point coordinates half a pixel outside the pixels.
Anyway, if you're interested in why they're doing it that way, contact tech support and they'll escalate it to the computer vision team and get back to you with an answer.

Sign in to comment.

More Answers (0)

Categories

Find more on Image Processing and Computer Vision in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!