From a70c54f2c592e7d64dfbf5af1ba8ba5cb4137624 Mon Sep 17 00:00:00 2001 From: Steven Puttemans Date: Mon, 8 Feb 2016 10:20:08 +0100 Subject: [PATCH 1/2] Added suggestions from PR6068 As discussed here: https://github.com/Itseez/opencv/pull/6068#issuecomment-180797723 --- modules/core/include/opencv2/core/mat.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/core/include/opencv2/core/mat.hpp b/modules/core/include/opencv2/core/mat.hpp index 1fa0a76854..06aa48d3be 100644 --- a/modules/core/include/opencv2/core/mat.hpp +++ b/modules/core/include/opencv2/core/mat.hpp @@ -1706,9 +1706,12 @@ public: Keep in mind that the size identifier used in the at operator cannot be chosen at random. It depends on the image from which you are trying to retrieve the data. The table below gives a better insight in this: - If matrix is of type `CV_8U` or `CV_8S` then use `Mat.at(y,x)`. - - If matrix is of type `CV_16U` or `CV_16S` then use `Mat.at(y,x)`. - - If matrix is of type `CV_32S` or `CV_32F` then use `Mat.at(y,x)`. - - If matrix is of type `CV_64FU` then use `Mat.at(y,x)`. + - If matrix is of type `CV_8S` then use `Mat.at(y,x)`. + - If matrix is of type `CV_16U` then use `Mat.at(y,x)`. + - If matrix is of type `CV_16S` then use `Mat.at(y,x)`. + - If matrix is of type `CV_32S` then use `Mat.at(y,x)`. + - If matrix is of type `CV_32F` then use `Mat.at(y,x)`. + - If matrix is of type `CV_64F` then use `Mat.at(y,x)`. @param i0 Index along the dimension 0 */ From cd96df1407a5c5bfb15ca2d0d8d962fa5e310ea8 Mon Sep 17 00:00:00 2001 From: Steven Puttemans Date: Mon, 8 Feb 2016 13:26:06 +0100 Subject: [PATCH 2/2] Update mat.hpp --- modules/core/include/opencv2/core/mat.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/include/opencv2/core/mat.hpp b/modules/core/include/opencv2/core/mat.hpp index 06aa48d3be..d554663783 100644 --- a/modules/core/include/opencv2/core/mat.hpp +++ b/modules/core/include/opencv2/core/mat.hpp @@ -1705,7 +1705,7 @@ public: Keep in mind that the size identifier used in the at operator cannot be chosen at random. It depends on the image from which you are trying to retrieve the data. The table below gives a better insight in this: - - If matrix is of type `CV_8U` or `CV_8S` then use `Mat.at(y,x)`. + - If matrix is of type `CV_8U` then use `Mat.at(y,x)`. - If matrix is of type `CV_8S` then use `Mat.at(y,x)`. - If matrix is of type `CV_16U` then use `Mat.at(y,x)`. - If matrix is of type `CV_16S` then use `Mat.at(y,x)`.