Ask Your Question

Revision history [back]

Is it possible that you are mixing up coördinate systems and in that case messing up the way you are visualizing the input?

Example of OpenCV coördinate system

Also a common made mistake is switching the cols and row parameter when defining width and height of an image. It is confusing I know. Maybe worth investigating this?

On the other hand, the suggestion of flipping will work, but is just going around the actual problem.

Is it possible that you are mixing up coördinate systems and in that case messing up the way you are visualizing the input?

OpenCV coordinate system

Example of OpenCV coördinate system

General coordinate system

image description

Also a common made mistake is switching the cols and row parameter when defining width and height of an image. It is confusing I know. Maybe worth investigating this?

On the other hand, the suggestion of flipping will work, but is just going around the actual problem.

Is it possible that you are mixing up coördinate systems and in that case messing up the way you are visualizing the input?

OpenCV coordinate system

Example of OpenCV coördinate system

General coordinate system

image description

Also a common made mistake is switching the cols and row parameter when defining width and height of an image. It is confusing I know. Maybe worth investigating this?

On the other hand, the suggestion of flipping will work, but is just going around the actual problem.

EDIT : looking through the internet, I have found the following image, which suggests the IPAD coordinate system:

IPAD Coordinate System

If considering this coordinate system, considered to the actual OpenCV coordinate system, I guess it is normal that you have a 180 degree shift, since the y - axis is inverted. So take this into consideration and flip your image pixels along the horizontal axis to get good references.