Unregistered
January 3, 2006, 01:04:43
Hil all.
I purchased a license key yesterday and have a problem in CurrentContour method of BlobFinder.
At first, added MVSmartContrl in Delphi 7 IDE.
MVSC_Blob: TMVSmartControl;
and added OnFilterEvent handler of MVSC_Blob.
procedure TFormMain.MVSC_BlobFilterEvent(ASender: TObject; Cookie, EventCode: Integer);
var
IFilter: IInterface;
IBlobFinder: IMVBlobFinder;
pContour: MV_POINT;
cCount: Integer;
cMax: SYSINT;
begin
if (Cookie = BlobCookie) and (Update = True) and
(EventCode = MV_ALGORITHM_END_EVENT) then
begin
FilterGraph.GetFilter('MV Blob Finder', IFilter);
if(IFilter <> nil) then
begin
IFilter.QueryInterface(IID_IMVBlobFinder, IBlobFinder);
if(IBlobFinder <> nil) then
begin
cMax := 100000;
try
IBlobFinder.CurrentContour(pContour, cMax, cCount);
except
on E: Exception do Caption := 'Error';
end;
end;
end;
end;
Above code always make exception and when I debug in Delphi, sometimes
makes my PC to restart.
Would you tell me the right usage to use CurrentContour method?
Thanks in advance.
I purchased a license key yesterday and have a problem in CurrentContour method of BlobFinder.
At first, added MVSmartContrl in Delphi 7 IDE.
MVSC_Blob: TMVSmartControl;
and added OnFilterEvent handler of MVSC_Blob.
procedure TFormMain.MVSC_BlobFilterEvent(ASender: TObject; Cookie, EventCode: Integer);
var
IFilter: IInterface;
IBlobFinder: IMVBlobFinder;
pContour: MV_POINT;
cCount: Integer;
cMax: SYSINT;
begin
if (Cookie = BlobCookie) and (Update = True) and
(EventCode = MV_ALGORITHM_END_EVENT) then
begin
FilterGraph.GetFilter('MV Blob Finder', IFilter);
if(IFilter <> nil) then
begin
IFilter.QueryInterface(IID_IMVBlobFinder, IBlobFinder);
if(IBlobFinder <> nil) then
begin
cMax := 100000;
try
IBlobFinder.CurrentContour(pContour, cMax, cCount);
except
on E: Exception do Caption := 'Error';
end;
end;
end;
end;
Above code always make exception and when I debug in Delphi, sometimes
makes my PC to restart.
Would you tell me the right usage to use CurrentContour method?
Thanks in advance.