I work with images. I have a button which I use to choose an image of bmp format:
if (OpenPictureDialog1->Execute())
{
Image1->Picture->LoadFromFile(OpenPictureDialog1->FileName);
}
The image is displaying in a TImage
component. Then I divide the image into sectors and count all of the black dots in each sector. After that, I receive a vector of signs and I normalize it by dividing on the max element in the vector of signs. Then I save the values of normalized vector in a DynamicArray
from library <sysdyn.h>
and I print the result on a TMemo
component:
DynamicArray<double> NormArr1;
NormArr.Length = n;
Memo1->Lines->Add( "Normalized vector is:" );
for (i = 0; i < n; i++)
{
NormArr[i] = cop[i] / (double) max;
Memo1->Lines->Add(NormArr[i]);
}
Memo1->Lines->Add( "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" );
I need to process several images in the same way, but in DynamicArray
is saved only the results of processing of one image. So I should click on the button, choose an image and find its normalized vector. Then I should choose another image using the same button, and also find its normalized vector. After that, I need to compare the elements of these vectors.
The most important thing is that I should use only one button and choose not exactly 2 but a lot of images, and compare their normalized vectors. How can I do this? I need the right implementation of self training of images.
Here is my form: