About Camera Matrix From One Image

Hello everyone,

I want to get a pinhole camera matrix (x = PX) using the photograph of the object. Then I will decompose the camera matrix into intrinsic and ectrinsic matrices. Is there any suggestion?

“the object”

can you show it? what pieces of information do you have?

why do you think this is mathematically possible?

For example glass in the photo. If we have x (2D image point) and X (3D world point) we can get P (camera matrix). It comes from the general formulation x = PX.

i wonder, how you get 3d points from arbitrary images ?

Actually, I am askşng it too. Do I have to use more than one image with this shape? Or I can calculate it only with chessboard (cameracalibration). I am open to new suggestion.

that’s a projection, it removes a dimension from your data.

you don’t even have 3D points. you have a random stock photo of a random object.

you might be able to estimate focal length from vanishing points/lines in your picture. I’ve never dealt with vanishing points/lines for this purpose.

you can never get absolute 3D distances from a single picture. you will always be left with scale ambiguity.

please get a book on Multiple View Geometry. what you’re asking isn’t a question, it’s a request for a college course.

if i may ask: what’s the general context here ? what do you need the camera matrix for ?

in general, you get that thing either from a (multiple) chessboard calibration, or, if it is not even your camera, with some luck from exif data in the image

while there are several ways to get 3d points, most of them need a (calibrated !) stereo cam, or multiple views (from calibrated cams, again !), also the cam matrix is needed as input.

1 Like

I have a real photo, it was just an example. I know my cam focal length too. I am asking how should I think for the start. Is it possible to do with only one image, or ten images from different angles, etc.

I want to get intrinsic and extrinsic matrices. I did with stereo camera on matlab once, about 9 years ago but I want to do this with one camera on python now. If you say that I should use calibration for this, I will follow this way.

IF you have the focal, you can construct the (intrinsic) cam matrix from that and the image size.

also note, that the extrinsic matrices you get from calibration are per-image, wrt the chessboard
(nice to cross-check the calibration, but useless for anything else)

you did not answer my question: . what is all this for ? what are you planning to do with the data ?

1 Like

I need these for my computer vision class, then I can use this information on mobile robots too.