Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Enforce computational requirements for SobelOperator
* Sobel Direction 1 coefficients (G_y) convolved with Neighborhood of 1's should equal 0 G_y * N [ +1. +2. +1. ] [ 1 1 1] [ 0. 0. 0. ] * [ 1 1 1] => 0 [ -1. -2. -1. ] [ 1 1 1] If the SobelOperator is templated over a pixel type that is not signed, the G_y coefficients above are typecast to the internal pixel type, this removing the sign, or introducing wrap errors. Test code: double d = -1.; unsigned char c = d; std::cout << +c << std::endl; On intel computers: prints 255 On apple silicon computers: print 0 NOTE: The sobel coeficients are not properly applied during the inner product for unsigned data types. Turn on concept checking for the SobelOperator to enforce signed neighborhood processing.
- Loading branch information