1 | initial version |

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

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.

2 | No.2 Revision |

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**

**General coordinate 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.

3 | No.3 Revision |

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**

**General coordinate 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.

EDIT : looking through the internet, I have found the following image, which suggests the 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.

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.