Introduction
In the previous article we looked at the propagation of wave neurons, but now we need to consider the descriptor of active (red) neurons. This article will offer a simple method for describing the contour formed around a black image.
Theory
Let me remind you that we have a black and white image. We write a condition for activating white pixels if and only if there is only one or more black pixels next to the white pixel. In this case, we paint the white pixel red.
That is, we get a solid outline.
β .
- - , . , .
. . , , , . , , .
. , , ( ) , . .
. , y. , .
.
, , .
y . -1.
y , , .
! . , .
. , (1,-1)
.
, , . (-) , . . .
«». . , , β . 1,-1
«» , . 1, -1, 1, -1. . , . , , , , , , , . 1, -1, 1, -1
.
, . . .
«»
. .
We have reached the end. The values ββof the contours also did not change. Everything is correct.
Click on the scan button.
The program will think and give the following result.
In this case, we get a slightly different result. The program scans the image and records contours that are different from each other. First we got the value 1, -1 and we write it down. Then we write the value 1, -1, 1, -1 a number of times. We remove duplicate elements. We get the corresponding result. {{1, -1}} {{1, -1,1, -1}}
Thanks for reading the article.