1

I am working on some image processing problem. So I am facing a problem that in java the coordinate system of image is not like the conventional coordinate system used in Mathematics (where origin is at bottom left corner), but instead it is a coordinate system where the origin is at top left corner and x increases to the right side, and y increased downside.

I want to change it to the conventional coordinate system. Please help me how to do that?

Abdul Fatah
  • 119
  • 3

2 Answers2

1

Make the following transformation:

y2 = image.height - y

x2 = x

Darren
  • 465
0

that's easy! let your max ordinate be 'Ymax'(for e.g. its 480 for 640x480) then new ordinate

Ynew = Ymax - Y (where Y is the ordinate u want to display)

PleaseHelp
  • 761
  • 8
  • 29