|
|
Christian Froeschlin <chr### [at] chrfrde> wrote:
> Matheus wrote:
> > Hi everyone!
> > Is it possible to know the pixel coordinate with sub-pixel precision of a
> > projected disc (or any object) center (in image coord)?
> > I'm trying to simulate camera calibration generating images with Pov-Ray and
> > I need to recover this kind of information.
>
> I assume you are rendering a calibration object to obtain test images
> for an image processing algorithm. Have a look at section 3.3.1.1 in
> the documentation, which should give you enough information to
> calculate the values you need.
>
> It would probably be useful to place the camera at <0,0,-1> and specify
> "direction z", so that your image plane is the x-y plane. Then, all you
> need to do is to calculate the intersection point of the line from the
> object center point to <0,0,-1> with the x-y-plane, and scale this to
> the actual pixel values considering image size and aspect ratio.
Thank you Alain and Christian!
Christian, that's exatly what I'm doing: rendering a calibration object. The
solution you gave me solved my problem. Well, in fact now I just need to
write a program to perform it automatically, because there are 864 white
discs on my calibration object that I need to know the right center
location in image coordinates. Maybe I'll try to edit the Pov-ray codes to
export me the discs center after each rendering... it could be exported in
a .txt file. Do you think it would be hard to do? I mean, edit and compile
the Pov-ray codes?
Thank for your help!
Best regards!
Post a reply to this message
|
|