0

I am doing a perspective projection of a list of voxel V={v1,v2,v3,...,vn} using the perspective projection matrix 3*4 to get the indices of each pixel pi=(xi,yi).

pi=P*vi

Once I get the indices, I used ReplacePixelValue[] function to get an image but i get an inverted image.

ReplacePixelValue[Image[Table[0, {x, 1, 512}, {y, 1, 680}]], indices -> 1]

I think the problem is come from the coordinates system. So, may be I have to convert the indices to fit the right coordinate system of indices. an I think this function can do the work (note the image dimension is 680*512 in my case)

convert[{x_, y_}] := {x, 512 - y}

Is it Right?

BetterEnglish
  • 2,026
  • 13
  • 19

0 Answers0