Fix np row,column to cv y,x

This explanation was created to avoid confusion, but it seems like the author was confused :D
This commit is contained in:
or-toledano 2020-09-14 14:23:38 +03:00 committed by GitHub
parent 4b24ddd70d
commit 49ba744130
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,7 @@ pixelpoints = np.transpose(np.nonzero(mask))
Here, two methods, one using Numpy functions, next one using OpenCV function (last commented line) Here, two methods, one using Numpy functions, next one using OpenCV function (last commented line)
are given to do the same. Results are also same, but with a slight difference. Numpy gives are given to do the same. Results are also same, but with a slight difference. Numpy gives
coordinates in **(row, column)** format, while OpenCV gives coordinates in **(x,y)** format. So coordinates in **(row, column)** format, while OpenCV gives coordinates in **(x,y)** format. So
basically the answers will be interchanged. Note that, **row = x** and **column = y**. basically the answers will be interchanged. Note that, **row = y** and **column = x**.
7. Maximum Value, Minimum Value and their locations 7. Maximum Value, Minimum Value and their locations
--------------------------------------------------- ---------------------------------------------------