Re: performer camera representation

New Message Reply Date view Thread view Subject view Author view

John Rohlf (jrohlf++at++tubes)
Sat, 23 Mar 96 9:24:57 PST


>
>
>
>
> Hello,
>
>
> We are currently trying to input real calibration
> parameters extracted from Sony CCD cameras into
> a performer channel. Our parameters are the
> standard parameters used in computer vision, i.e.
>
> (u0, v0) : center of the image (intersection of
> optical axis with image plane. Typically close
> to (256,256) for a 512x512 image. Close but *not*
> equal).
>
>
> (sx, sy): scaling factors in both directions,
> which is the number of imaging cells (image
> pixels) per unit length.
>
>
> We've tried to interpret these parameters in
> term of the coordinates of a frustum and
> by calling pfMakePerspChan. Unfortunately
> we did not manage to obtain a matching between
> real and synthetic images. We computed the formulas
> for the (left,right,bottom,top) channel cordinates:
>
>
> left = -u0 / sx (negative)
> right = (512 - u0) / sx
> bottom = -v0 / sy (negative)
> up = (512 - v0) / sy
>
> near = 0.001 (our unit was 1mm)
> far = 10 (arbitrarily large number).
>
> (note that our frustum is not symetric).
>
> But apparently this is wrong: the object
> is imaged shifted to the right in our
> viewport, instead of being centered like
> in the real image.
>
> Does someone have a clue as to how to
> compute the frustum, given our parameters
> above ?
>

        pfMakePerspChan assumes that the (left,right,bottom,top) coordinates
        lie in the view plane and that the view plane is the near
        clip plane. Thus if you call:

pfMakePerspChan(chan, l,r,b,t);
pfChanNearFar(chan, n, f);

        you will get different results than if you call:

pfChanNearFar(chan, n, f);
pfMakePerspChan(chan, l,r,b,t);

        This order-dependence is an API flaw, but hopefully you can
        work around it. (You should set near,far before l,r,b,t)


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:34 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.