Define principal point of Graphic3d_Camera

Hello,

Regarding the definition of the virtual camera intrinsic parameters, I wanted to know if there is any way of setting an offset for the principal point, that is, the intersection between the optical axis and image plane (http://ksimek.github.io/2013/08/13/intrinsic/).

Thanks in advance!

924112424_150196's picture

Hi Adriana,

i am facing the same problem with you. I wonder if you have solved the problem. Maybe you can give me some help?

Adriana Costas's picture

Hello,

Not really. I finally solved it increasing the FOVy of the Graphic3d_Camera and cropping the captured image. I mean, I take the image in which the principal point is c =(img_width/2, img_height/2) and, then, I crop it obtaining an image in which that point c has your desired coordinates ( pixel coordinates of the principal point of the real camera). I don't know if this makes sense for you....

924112424_150196's picture

Thank you for your reply :) i will have a try.

Kirill Gavrilov's picture

Graphic3d_Camera generates well-defines view and projection matrices, based on camera definition (Eye, Direction, Up, FovY, Aspect Ratio).
There are only two extensions available - stereoscopic perspective projection and tiled rendering.

Any other effect, which would require alterning projection matrix in non-standard way, would require patching Graphic3d_Camera class to support extra parameters / custom matrices.

924112424_150196's picture

I noticed that the projection shift concept has been removed since OCCT 6.8.0. So the reference system of the view is located at the center of screen and can not be changed, is that right?

Is there any method to change it? Or is there a better way to take a picture of the view? Now i am using ToPixMap() to get the picture after setting Graphic3d_Camera. And i want to dump the picture without setting the camera.

Thanks in advance.