Meccanica Cerebrale

β Programs β


Running programs and bank of images

Important note: You should not download an use the programs before to read the "Read ME"

Read Me

Running programs and images (DOWNLOAD)

Work in progress<<<<< READ OFTEN.


For the sources or for the former DOS version please contact me.


These programs serve to test my theory about the human like recognition of the images. I agree with the psychologist Piaget in considering this recognition in a child as topological, so I begin with the mechanization of this. Don’t expect an elegant programmation style, the programs have been rewritten and rearranged many times in the old version (301.a) of turbo Pascal of Borland, dating 80’s. For the winter 2011 I have been rewritting these programs in Lazarus. I am not an expert in this subject. I give sources hoping that someone refine them.

I ‘m mechanizing memory and language that I consider strictly connected to geometrical recognition of the visual images. That ‘s less important than the topological recognition that I have studied once. In the geometrical recognition we must organize one after another, in order, some visual perceptions, recognizing topologically each of them and giving their correct importance. In order to realize this objective, I have to test many times on the computer I like to have the topological vision perfectly and rapidly working. This study has industrial repercussions on OCR construction, on objects recognition, on ECG reading,…. Unfortunately I have no time to develop these technical applications.

I warn you can’t understand the following programs without reading the web book called “Meccanica cerebrale” written only in Italian.


I give a set of images of Latin letters of 256x256 pixels with 256 grey levels. By these you can see how the computer learn. Each page has four letters A or four letters B,... graphically different. You can add other images, after have scannered them, using the software of Franco Languasco. I used it, it works well and I am grateful to the author.


The programs TABULA0, TABULA1, TABULA2, TABULA3, TABULA4, TABULA5 extract edges. Going on the track of human visual system, as I understand it, I simulate the lateral inhibition and in fact near the images edges appear the Mach bands that enhance the light to dark gradient (see Meccanica Cerebrale pag.21 fig.9). Anyway I consider much more important another inhibition, the directional that, in my opinion is very important in classification angles importance. The mechanization of this latest inhibition means a great calculation so I had to renounce. But the rough work can be seen because every point near the edge has the direction of its gradient associated. This simple beginning make TABULA4 very slow. You can complete the work extending all around each point the direction of its gradient. By the superposition of these extensions you have a field causing optical illusions to the computer: the same as the man. I mean those particular illusions dues to a wrong perception of angles, even when the wrong perceptions produce the displacing of lines (e.g. Zeemann, Hering,....) but they were too slow and I preferred to dedicate to the topological description of form, that is the main part of work. Please call me for further information. The edges detection is the less important part of my study. Beside, a complete and perfect edges are formed during the memorization of the shape. I am not interested to obtain it with low level visual processes.


The programs CONTR, RICON e MISCHIA are the most important part of my work. They mechanize the shapes recognition which is an inconsious brain activity. You must distinguish that from the visual perception furnishing the model of the world whose we have consciousness. We haven't any conscientiousness of the activity of recognition because it is internal of the human body and is follows a function of brain established before like the kidneys that filter blood. On the contrary the visual perception require a confrontation between the changing world, the various human needs and all the strategies to achieve in surviving.

CONTR: it starts from an image that cover all the visual field. In the human visual system the movement permits to isolate an image and bring it on scale. However I can't memorize this later brain activity because I can't planning programs following moving objects. The computer could also recognize an incomplete image: In order to simplify calculation I considered only complete images and only the external edge the “silhoutte” of these. CONTR defines the power of corners, in a simulation of what is written on page 22 fig.10 of Meccanica cerebrale.

In the simulation I inscribe a polygonal in the image and I form a layer model thresholding gradually the corners and only keeping only those powerful enough. We can realize that removing the polygonal corners that have a side shorter than a certain value, augmenting from layer to layer. The polygonals deriving from this process approximate the image from which we eliminate the less important details (see La visione della macchina pag. 5 fig. 34) CONTR sends to RICON program the value of the corner of every layer, the distance of the higher point of image and the angulation (slant) of their bisector. RICON compare these features whit those of other shapes memorized previously. It control that corner have about the same position and value too and that the corners belong about at the same layer. According whit discover of Hubel and Wiesel ( see Meccanica Cerebrale pag. 17). The program can realize the target that in the last 40's had scientists. They wanted the computer recognized the same shape drew on rubber sheet which is stretched at will. RICON is a very complex program and it realizes the first part of my work, that of the topological recognition of forms. I can resume in this way the program working; 1) the feactures of the corners are at first compared between the picture analysed (presented at the computer) and that (or those) memorized. As the features are approximate you find a corner of the analysed picture correspond to many of them in the memorize image. You may sort imposing that the sequence of angles must be the same in the two images. In other words, if we dispose the corners (nay, their features) of the present image on a straight line and the corners of the memorized image in another parallel line and we connect these corners whit some lines, only not crossing lines must be accepted. In “La visione della macchina” pag13 fig. 38, the features of the two pictures are represented by the two sets of red and green vertical bars. Green lines connect all suitable features and among these connection, the right connection are the red lines. Approximately I can said that the likeness between the two pictures is determined by the sum of the connected corners (whit red lines). Bigger is this number bigger is topological likeness. MISCHIA follows RICON when recognition is corrected. MISCHIA program can be seen as a modest neuronal network like those of mc Culloch and Pitt of 40's.


Now we consider two very similar images but a little repeat difference that permits to man to discriminate the two classes. The little detail is kept because MISCHIA puts in evidence it and eliminate the details. It has a little difference on powerful of correspondence that is the key of the topological recognition. So it'll be impossible for the computer to discriminate between the two images and it confuses them. However if the detail is isolated, when the computer can't decide between the two images, it'll permit to decide. In other words the detail is considered another image. Its position on the edge of the principal image is memorized. Details can be more than one, in this case they would be isolated in succession. Their relative collocation permits to establish a series of linking that can be “geometrical”. They can permit the passage from the topological vision to the geometrical one. Piaget, a psychologist of 70's, said that babies had at first a topological vision of world and then topological. In this way and order is the working of my device. Besides, I think that geometrical vision is the main part of the structured language as Chomsky called. All this permits the following programs and they are the first step to the syntactic recognition. The OPZIONI program follows RICON and causes many choices: 1) it recall the MISCHIA program, to perfect features of the recognised image mixing it with the other memorized. The recognition of image is real without any doubts if: a) happens whit a high power (of correspondences) and b) the power is bigger than other images. 2) If the recognition is uncertain because images are little different among them (the two image differing for a little details) it goes in the syntactic recognition of the shape through the UNIRES and DELTA programs. 3) If the image is recognised whit lower power, OPZIONI recalls the program OMONIMI. OMONIMI memorizes the image with a new name, internal in the computer, that you can see. 4) Program PRIMO follows OPZIONI and it memorize the name of unknown image. 5) Program SINONIMI is trivial and it would permit to give another name to a known form. UNIRES and DELTA are programs that permit to recognize among the indiscriminate form through their differences. On its results, the geometrical recognition and the sentence (phrase) begin. If we present to the device the form R and it has in memory the forms R and A, RICON won't discriminate between two. UNIRES and DELTA search differences among features of these images memorized. They find that R is different from A for a notch (indent) on the middle of the right part of the R. The program controls that such a notch is present on the presented forms and in the right point. UNIRES and DELTA create some passages among details of images similar to Yarbu's eyes movements: the geometrical – syntactical structure of recognition is defined by the importance, position or absence of details. The syntactic recognition is mainly an ordered sequence of images recognized topologically. It is based on DELTA result and is not part of programs that I give.


The RICON program still presents a lot of mistakes and it would be rewritten. It could be work whit pieces of edge but now work only on closed edges. Besides it considers only the external edge of the images (suilhuette). However, because of these limits, I think is have the intelligence of two year child when he is put in front of drew silhuettes of objects. I mean only “drew silhuette”; the child can't touch, smell or see colours of objects and he can't recognizes objects from these features of them. DELTA works properly if the shapes have been refined through many passages in MISCHIA program.

In the picture: the Right Honourable Augusta Ada, Countess of Lovelace.