0

I had an issue about the coordinate system of mathematica. I have a {800,600} image acquired with a camera. The projection matrix P of the camera is calculated using the calibration task. Now, when I calculate the projection of a known point {x,y,z} as p.{x,y,z,1}={X,Y} in the image. I remark that the Y is not correct and the real value is given by 600-Y. It seems that the y-axis inversed between the camera and mathematica. Any clarification?

BetterEnglish
  • 2,026
  • 13
  • 19
  • How do you access the pixels of the image? Remember that you can see an image as a matrix, where the first row is the top row of pixels. This is why ImageData[image][[1]] represents the top row. – FJRA Dec 18 '14 at 20:20
  • @FJRA, I access to pixel using the tool "Get coordinates" – BetterEnglish Dec 18 '14 at 20:23
  • I see, that's a Graphics tool, and those are "plot" coordinates, so they start bottom left. That means that you have to do height - coordY to get the row number. – FJRA Dec 18 '14 at 20:26
  • @FJRA, I see the problem.In fact the camera gives us the indices of the pixel not the coordinates. So when I compare the {X,Y} of the camera and the Get indices I am getting the same. – BetterEnglish Dec 18 '14 at 20:26
  • @FJRA, so I have to use the ImageData[] to get the right value – BetterEnglish Dec 18 '14 at 20:28
  • Yes, I think ImageData is the best function if you need to access directly the pixel values. Check the documentation, maybe some of its options are useful for your case of use. – FJRA Dec 18 '14 at 20:30
  • Here is an extended discussion of the various graphics/image coordinate systems: http://mathematica.stackexchange.com/a/32377/1783 – bill s Dec 19 '14 at 01:17

0 Answers0