**B. Adaptation of the discrimination threshold to staining variability**

Adaptive thresholding is very important due to the variability of staining from sample to sample and the possible inhomogeneity of the staining within same slide. Many authors were convinced that the manual threshold setting was adequate in morphometric studies because the visual criteria of the thresholding is evident. Working with the given specimen, it is very simple to define the discrimination level according to the visual impression, looking on the microscope and on the screen. The formalized procedures following after the “intuitive” setting of the threshold position is assumed to be important only for the adaptation to the local variability of the staining within the current specimen.

However, the significant obstacles which is necessary to overcome is the adaptation to the staining variability between different specimens. Very often it is difficult or just impossible to get the standard staining result in different specimens and the Nissl staining of the human brain material is one of these cases. We were able to prove that the measurement results based on the “visual” thresholding are influenced by the differences in staining more than the differences in true values of cellular size and density. The criteria based on the evaluation of the gradient of the image are more stable and can be used to build the segmentation approach, which becomes independent of both local and inter-specimens’ staining variations. However, the speed requirements limit the application of the gradient algorithms. To determine the criteria of the thresholding we produced the analysis of the field of view and the corresponding intensity profile (see Fig. 4,a). The local profile has enough information to attribute their segments to the particular morphologically identifiable structures (pericaria, nuclei etc.), but it is not independent from the variability of the absolute intensity of the specimen. The gradient is independent of the absolute intensity value, but it misses their morphological properties. Obviously, the local gradient value of the border between background and pericaria can be the same as of the border between pericaria and nuclei. This analysis led us to the idea, that it would be useful to define the parameter, which will combine both the morphological properties of the “local” profile and the independence of the gradient from local intensity variations. This approach resulted in the definition of the ,,averaged image profile” or “mean gradient”.

Let’s examine the intersection of the image function F (see Fig. 4, b) by the vertical plane through its local maximum, and two horizontal thresholds. The intersection of the function with the vertical plane will form the intensity profile of the image F(x), analogous to the real one, presented in Fig. 5, a. According to the definition, the estimation of the profile’s gradient value between thresholds will be the ratio ΔD/Δx, were ΔD is the gray function increment between thresholds, and Δx is the distance between projections of the end points of the corresponding profiles segment to the image plane. Two thresholds dissect the segment of the gray function, which projection to the picture plane forms the ring with the mean width I. It can be estimated as 2A/(P1+P2) were A is the area, and P1 and P2 are inner and outer perimeters of the ring. When ΔD is small comparatively to the gray value variations of the image, the value 1/I can be used to estimate the mean slope of the gray function between two thresholds. So far, for the image between thresholds i and i+l, the estimation of the value Gi, which we called the mean gradient (se also Fig. 5, left, b), will be estimated as

ΔD (Pi + Pi+1 ) / 2*[Ai+1 -Ai],

were ΔD = Di-Di+1 . In each section, for the region under study the value of mean gradient can be estimated as defined in Fig.5, right, d. Accordingly, to build the averaged profile of the image it is enough to accumulate the values from the minimal threshold to the current i, and to examine Di as a function of L (see Fig. 5, right panel, c).

Fig. 5: Principles of adaptation of the segmentation threshold to staining variability using mean gradient distribution. Left panel: geometrical introduction of the mean gradient. Right panel: “average” profile estimation as cumulate of inverse mean gradient, and mean gradient calculation.

Within known experimentally established limits, the characteristic pattern of the average profile can be used in each stained section to find the value of the threshold, which will correctly outline the desired structures regardless of the variations of staining intensity. In our measuring procedure point “c” (Fig. 5, left panel, c and d) was used as a stable marker of the boundaries between intensely stained pericaria (first maximum) and weakly stained neuropile. Quite obviously, we describe this approach not only for historical reason. Mean gradient was used as a way to accelerate processing, and avoid direct measurement of image gradient in each field of view, which was extremely slow. However, analysis of the gradient distribution for adaptation to staining variability can be used today, especially because the effect of staining variations on image processing results in human brain tissue is largely ignored [Istomin V.V., Korsakov’s Journal, 1985]. However, it has to be taken into account in standardized technologies of quantitative analysis of cortical architecture and identification of neuronal types.

**C. Algorithms of image processing of cellular elements in each field of view**

Considering availability of AI algorithms, including convolutional neuronal networks, which are more and more successfully used for image segmentation and identification in many areas, the approach developed in 1980s looks today naïve and simplistic. However, it was one of first approaches developed and applied practically for standardized quantitative analysts of cortical traverse in human brain. So, below we provide very brief demonstration of the idea and its implementation, using some slides from our presentation of the technology. More elaborate explanation, if needed, can be found here [Istomin V., Amunts K., V&V Magazine, 1992].

Fig. 6: Elimination of the large artifacts using diameter as size criterion.

Fig. 7: Elimination of vessels using length of the skeleton.

Fig. 8: Separation of overlapping blobs and correction of hyper-segmentation.

Thank you for paying tribute and preserving memory of yhe people who evidently have contributed so much for the scientific development!

At the place and time where every substantial and good deed must have been done contrary to the prevailing standard, those scientists and truly gifted administratirs had the strength and dedication to carry out their vision! The following generations of the medical practitioners and researchers will carry on!