ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ievision.dll not loading or initialising
 New Topic  Reply to Topic
Author  Topic Next Topic  

Ogaere

Nigeria
1 Posts

Posted - Jul 13 2026 :  15:24:36  Show Profile  Reply





Below is my code, is there any out of the ordinary that is causing the error. The library ievision.dll is in the application folder:

function TfrmTokenSales.CountFaces(ABitmap: TBitmap): Integer;
var
ieBmp: TIEBitmap;
origImage, workImage: TIEVisionImage;
classifier: TIEVisionCascadeClassifier;
objects: TIEVisionVectorRect;
begin
ieBmp := TIEBitmap.Create;
try
ieBmp.Assign(ABitmap);

// Convert to single-channel grayscale
origImage := ieBmp.GetIEVisionImage();
workImage := IEVisionLib.createImage(origImage.getWidth(),
origImage.getHeight(), ievUINT8, 1);
origImage.convertColor(workImage, ievBGR2GRAY);
workImage.equalizeHistogram();

classifier := IEVisionLib.createCascadeClassifier(IEVC_FRONTAL_FACE_ALT_2);
objects :=classifier.detectObjects(
workImage,
1.05, // scaleFactor
5, // minNeighbors
ievDO_CANNY_PRUNING, // flags
IEVisionSize(workImage.getWidth() div 5,
workImage.getHeight() div 5), // minSize
IEVisionSize(workImage.getWidth(),
workImage.getHeight())); // maxSize

Result := objects.size();
finally
ieBmp.Free; // only the TIEBitmap needs freeing
end;
end;
   Topic Next Topic  
 New Topic  Reply to Topic
Jump To: