1 | initial version |
"Iwant to implement a simple thresholding algorithm" - please use the builtin threshold() function, do not reinvent the wheel. writing "per-pixel loops" is absolutely an anti-pattern.
2 | No.2 Revision |
"Iwant "I want to implement a simple thresholding algorithm" - please use the builtin threshold() function, do not reinvent the wheel. writing "per-pixel loops" is absolutely an anti-pattern.
(the error also complains, that one of the Mat's (probably "gray") is not initialized at all)
3 | No.3 Revision |
"I want to implement a simple thresholding algorithm" - please use the builtin threshold() function, do not reinvent the wheel. writing "per-pixel loops" is absolutely an anti-pattern.
(the error also complains, that one of the Mat's (probably "gray") is not initialized at all)
(if your gray Mat is invalid, so will be the binary one. please check size() before)
4 | No.4 Revision |
"I want to implement a simple thresholding algorithm" - please use the builtin threshold() function, do not reinvent the wheel. writing "per-pixel loops" is absolutely an anti-pattern.
(the error also complains, that one of the Mat's (probably "gray") is not initialized at all)
(if your gray Mat is invalid, so will be the binary one. please check size() before)
last, j <= mat.cols
will be out of bounds. again, please do not write such loops.
5 | No.5 Revision |
"I want to implement a simple thresholding algorithm" - please use the builtin threshold() function, do not reinvent the wheel. writing "per-pixel loops" is absolutely an anti-pattern.
(the error also complains, that one of the Mat's (probably "gray") is not initialized at all)
(if your gray Mat is invalid, so will be the binary one. please check size() before)
last, both : ì <= rows
and j <=
will be out of bounds. again, please do not write such loops.mat.colscols
6 | No.6 Revision |
"I want to implement a simple thresholding algorithm" - please use the builtin threshold() function, do not reinvent the wheel. writing "per-pixel loops" is absolutely an anti-pattern.
(the error also complains, that one of the Mat's (probably "gray") is not initialized at all)
(if your gray Mat is invalid, so will be the binary one. please check size() before)
last, both : ì <= rows
and j <= cols
will be out of bounds. again, please do not write such loops.