Author |
Topic |
|
kerk
Malaysia
11 Posts |
Posted - Sep 18 2024 : 03:02:19
|
Dear sir/madam,
I'm new to the ImageEn & IEVision components. I was looking for a sample coding for searching/finding similar face which provided at the first stage, and continue for searching function with multiple image files and list them out to the listbox.
Kerk
kerk |
|
xequte
38496 Posts |
|
kerk
Malaysia
11 Posts |
Posted - Sep 20 2024 : 22:53:45
|
Dear Nigel,
I had tried the sample application and also read out some of the features and functions. But still can't figure out how to match or search/compare from provided image and searching thru the image files in the subfolder each by each which match the provided image function.
Can you guide me thru it? I'm rushing out to create the Demo application for my client.
Thanks a lot for your help.
Kerk |
|
|
kerk
Malaysia
11 Posts |
Posted - Sep 20 2024 : 23:34:02
|
Hi Nigel,
I had uses 2 ImageEnView component for open two different image files and my codes as below to find/search/compare the two files:
var
i : Integer;
objectsFinder: TIEVisionObjectsFinder;
rects: TIEVisionVectorRect;
r: TIEVisionRect;
Text_Color: String;
begin
objectsFinder := IEVisionLib.createObjectsFinder();
objectsFinder.addClassifier('face detector 5', IEVisionLib.createCascadeClassifier(IEVC_PROFILE_FACE));
objectsFinder.findIn(ImageEnView2.IEBitmap.GetIEVisionImage());
rects := objectsFinder.mergeAllRects(); // merge intersecting rectangles
for i := 0 to rects.size() - 1 do
begin
r := rects.getRect(i);
with ImageEnView1.IEBitmap.Canvas do
begin
Pen.Width := 2;
Pen.Color := clRed;
Brush.Style := bsClear;
Rectangle( r.x, r.y, r.x + r.width, r.y + r.width );
end;
end;
ImageEnView2.Proc.TextOut( Align_Text_Near_LEft, Align_Text_Near_Top, Format( 'Found: %d', [ rects.size ]), 'Arial', 12, clWhite, [fsBold]);
ImageEnView2.Update();
|
|
|
xequte
38496 Posts |
Posted - Sep 21 2024 : 17:35:47
|
Sorry, I'm not sure if there is much more detail I can add over what is shown in the FaceRecognizer.dpr demo.
To generate a database you would need to use a standard method to iterate the files in a folder (e.g. FindFirstFile/FindNextFile) and then:
1. Load the image into a TImageEnView or TIEBitmap 2. Call a method like ExtractFaces() (in the demo) to extract all the faces in the image 3. Pass each face to a method like AddFace() (in the demo) to add the face to the database
To find a matching face in the database you would:
1. Load the image into a TImageEnView or TIEBitmap 2. Call a method like ExtractFaces() (in the demo) to extract the faces in the image 3. Assign one of the face rects to a TIEBitmap, e.g. faceBitmap.AssignRect( ImageEnView1.IEBitmap, IEVisionRectToTRect(Rect) ); 4. Pass the bitmap to TIEVisionFaceRecognizer.detect() to get the matching name and confidence
recName := m_faceRecognizer.detect( faceBitmap.GetIEVisionImage(), confidence );
Nigel Xequte Software www.imageen.com
|
|
|
kerk
Malaysia
11 Posts |
Posted - Sep 25 2024 : 00:59:14
|
Hi Nigal,
I had tried according to your guides. But when I try to run the application is ok, but when pressing and load the image for next step, it shown the error Access violation at address 009A251C in module. When i try to debug and run it, it stop at the
m_objectsFinder.findIn(ImageEnView1.IEBitmap.GetIEVisionImage());
Kerk
|
|
|
xequte
38496 Posts |
Posted - Sep 26 2024 : 15:03:56
|
Hi Kerk
Is this our pre-compiled demo from: www.ImageEn.com/demos/
Or have you compiled itself using the trial? If so, what version of Delphi are you using?
If you are using ImageEn v13.2.0, please use this version of IEVision:
https://imageen.com/files/trial/IEVision_8.1.1_Trial.exe
Are you sure the IEVision-Trial.dll is in the same folder as your EXE. Please right-click it to view the properties and tell me what version it is.
Please forward me some of the images you are testing.
Nigel Xequte Software www.imageen.com
|
|
|
kerk
Malaysia
11 Posts |
Posted - Sep 27 2024 : 02:25:01
|
Hi Nigel,
Yes, even I use the pre-compiled version. I did also copy the IEVision_Trial.dll to the application folder.
Alright, will attach the document for your reference.
Kerk
|
|
|
kerk
Malaysia
11 Posts |
Posted - Sep 27 2024 : 02:30:19
|
Hi Nigel,
I had tried the latest download of:
If you are using ImageEn v13.2.0, please use this version of IEVision: https://imageen.com/files/trial/IEVision_8.1.1_Trial.exe
When i try to open the FaceRecognizer from demo folder and try to run it, it shown the attach error.
Kerk
|
|
|
kerk
Malaysia
11 Posts |
Posted - Sep 27 2024 : 02:43:19
|
Hi Nigel,
After i try to compiled it and run it. Seem like doesn't work as well.
Kerk.
|
|
|
xequte
38496 Posts |
|
kerk
Malaysia
11 Posts |
Posted - Sep 27 2024 : 03:53:19
|
Hi Nigel,
Ok, downloading now, will try out asap. Thanks ya!
Kerk |
|
|
kerk
Malaysia
11 Posts |
Posted - Sep 27 2024 : 20:47:30
|
Hi Nigel,
I had downloaded the 6.0.4, but when i compiled and run it, it shown required 6.0.3.dll.
Kerk
|
|
|
xequte
38496 Posts |
|
kerk
Malaysia
11 Posts |
Posted - Sep 29 2024 : 00:16:38
|
Hi Nigel,
Now it able to run the trial demo. Thanks for your help. I'll continue with the Demo Application to my client. Hope to hear from the result asap.
Kerk |
|
|
kerk
Malaysia
11 Posts |
Posted - Sep 29 2024 : 01:40:20
|
Hi Nigel,
I had managed to run the demo and learned the codes. But I still can't find a way to compare the Face in provided image file and other image files.
For the detect face part is ok. Now only left the checking each files which contain the detected face.
Or is there any command to match detected face or something like that?
Kerk. |
|
|
xequte
38496 Posts |
|
|
Topic |
|