Problem with 3d to 2d projection

  • Follow


I have a data group (xi,yi,zi) which is an arch. These data are on the CCD plane. I know the pixel size and CCD size. How do I convert them to a 2d indexed image. 

Thanks.

Roy
0
Reply Roy 8/27/2010 10:39:06 PM

On Aug 27, 6:39=A0pm, "Roy " <chaowu2...@gmail.com> wrote:
> I have a data group (xi,yi,zi) which is an arch. These data are on the CC=
D plane. I know the pixel size and CCD size. How do I convert them to a 2d =
indexed image.
>
> Thanks.
>
> Roy
------------------------------------------------------------------------
I would guess you'd assign the zi value to intensity, then just loop
over all the xi and yi that you have and make the assignment

numberOfDataPoints =3D length(xi)
for k =3D 1 : numberOfDataPoints
  column =3D xi(k);
  row =3D yi(k);
  outputImage(row, column) =3D zi(k);
end
0
Reply ImageAnalyst 8/27/2010 10:46:49 PM


(xi,yi,zi) are the coordinates of the points. I want to find the corresponding points on the CCD plane in terms of horizon index and vertical index.

"Roy " <chaowu2009@gmail.com> wrote in message <i59eqa$in2$1@fred.mathworks.com>...
> I have a data group (xi,yi,zi) which is an arch. These data are on the CCD plane. I know the pixel size and CCD size. How do I convert them to a 2d indexed image. 
> 
> Thanks.
> 
> Roy
0
Reply Roy 8/28/2010 12:32:22 AM

On Aug 27, 8:32=A0pm, "Roy " <chaowu2...@gmail.com> wrote:
> (xi,yi,zi) are the coordinates of the points. I want to find the correspo=
nding points on the CCD plane in terms of horizon index and vertical index.
> > Roy
---------------------------------------------------------
And how are you supposed to do that?  Let's say that your (x,y,z)
coordinates represent a football kicked over the playing field.  The
coordinate system has some arbitrary origin.  And let's say that you
also have a camera there.  But where is it pointed?  Does the football
even cross the field of view?  And even if it does, the path the image
of the football makes as it moves across the sensor depends on where
you have your camera pointed.  So, there is no answer with what you
have specified so far.  For example, you'd need the the (x,y,z)
location of the camera in the same coordinate system as your football,
you'd need the Euler angles of where the camera is pointed, you'd need
the focal length of the lens (of course), and maybe some other things
too.

0
Reply ImageAnalyst 8/28/2010 2:26:25 AM

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <433c3c6f-1579-4895-9eb5-385990614c45@s4g2000yqm.googlegroups.com>...
> On Aug 27, 8:32 pm, "Roy " <chaowu2...@gmail.com> wrote:
> > (xi,yi,zi) are the coordinates of the points. I want to find the corresponding points on the CCD plane in terms of horizon index and vertical index.
> > > Roy
> ---------------------------------------------------------
> And how are you supposed to do that?  Let's say that your (x,y,z)
> coordinates represent a football kicked over the playing field.  The
> coordinate system has some arbitrary origin.  And let's say that you
> also have a camera there.  But where is it pointed?  Does the football
> even cross the field of view?  And even if it does, the path the image
> of the football makes as it moves across the sensor depends on where
> you have your camera pointed.  So, there is no answer with what you
> have specified so far.  For example, you'd need the the (x,y,z)
> location of the camera in the same coordinate system as your football,
> you'd need the Euler angles of where the camera is pointed, you'd need
> the focal length of the lens (of course), and maybe some other things
> too.
----------------------------------------------------------------------------------
Thanks a lot for your answer. The resulting (x,y,z) is the reflecting of a circle through a focal point with known focal length. So my (x,y,z) is the image of that circle on my CCD. However, every computation is done in 3D. I don't know how I can convert the this 3D data to a 2D indexed image. 
0
Reply Roy 8/28/2010 2:40:15 AM

Why don't you start out trying to use the "thin lens equation"?
1/(image distance)  + 1/(object distance) = 1/(focal length)
You say you know the focal length.
You know the object distance - it's sqrt(x^2+y^2) -- and angle.
So you know the location of the object on the sensor.
0
Reply ImageAnalyst 8/28/2010 3:10:00 AM

5 Replies
477 Views

(page loaded in 0.06 seconds)

Similiar Articles:













7/25/2012 8:16:33 PM


Reply: