I want to describe one of the nonlinear contour extraction algorithms on images.
Classic
Almost all known contour extraction algorithms approaching an image as a matrix of numbers with values ​​of 0..255, integers within one machine byte (16 bits are considered later). Then, convolution with the coefficient matrix is ​​done.
And if you do not do that?
')
And if you do not do that?
But if we deepen, in our analysis, and assume an even deeper fragmentation of the image, namely, “embroider” it into
binary layers .
in place of a single matrix of 0..255 values, we consider 8 matrices of the same size, but with values ​​of 0..1
And now we apply to the obtained binary matrices convolution with ...

Without coefficients. Just perform the function of Boolean algebra. After all, the input data is binary values. [one]
Exposing
Where did this boolean function come from?
- let's say that the contour is found in some pixel of the binary image if the brightness value of this scribe differs from the brightness value of at least one of its surrounding pixels in the nx n window. The case of an isolated pixel is excluded from consideration by the requirement: the value of the pixel in question must coincide with the value of at least one of the surrounding pixels;
- the contour is ascending (from 0 to 1, where 1 is the value of the analyzed pixel), the contour is descending (from 1 to 0, where 0 is the value of the analyzed pixel) do not match ;
- from the second postulate, we find that there are three options for the selection of contours a) separate contours ascending; b) separate contours downward; c) the combined allocation of contr on the ascending and descending changes in brightness.
visual results:

- original (electron microscope)
- contour according to our formula
- raised contrast by our result
for comparison:

- contour by linear operator Sobel
- Contour materials [2]
- Contour materials [3]
and another live example

options

"Ascending"

"Downward"
[1] Aizenberg I. and Butakoff C., “Image Processing Using Multiple-Valued and Universal Binary Neurons”, Journal of VLSI Signal Processing Systems for Video, Image and Video Technology, Vol. 32, 2002, pp. 169-188.
[2] XZSun, and ANVenetsanopoulos “Adaptive Schemes for Noise Filtering and Edge Detection by us
Statistics ”, IEEE Transactions on Circuits and Systems, vol. CAS-35, 1988, pp. 57-69
[3] RMHaralick “Statistics and Structural Approach to Texture”, Proceedings IEEE, vol. 67, No 5, 1979, pp. 786-804