Thanks for emailing the files.
Our Face Detection demo "merges" all overlapping rectangles, so if you have two faces close together it merges them.
This is done by:
m_objectsFinder.mergeAllRects();
We've now modified the example (IEVision\GetFaces) to maintain the faces as separated. The new code is:
var
i, j, count: integer;
rects:TIEVisionVectorRect;
objName:AnsiString;
for i := 0 to CheckListBox1.Items.Count-1 do
begin
objName := AnsiString( CheckListBox1.Items[i] );
count := m_objectsFinder.getFoundRectCount(PAnsiChar(objName));
for j := 0 to count - 1 do
begin
with m_objectsFinder.getFoundRect(PAnsiChar(objName), j) do
begin
ImageEnView1.LayersAdd( iesRectangle, Rect(x, y, x+width, y+height), clRed, 2 );
ImageEnMView1.SetImageRect(ImageEnMView1.AppendImage(), ImageEnView1.IEBitmap, x, y, x+width, y+height);
end;
end;
end;
Whereas, before it was:
// merge intersecting rectangles of all searched objects
rects := m_objectsFinder.mergeAllRects();
// loop among rectangles
for i := 0 to rects.size - 1 do
with rects.getRect(i) do
begin
ImageEnView1.LayersAdd( iesRectangle, Rect(x, y, x+width, y+height), clRed, 2 );
ImageEnMView1.SetImageRect(ImageEnMView1.AppendImage(), ImageEnView1.IEBitmap, x, y, x+width, y+height);
end;
This now gives the same result as in the other demo.
Nigel
Xequte Software
www.imageen.com