Dear sir,
I am a user of c++ builder (under CB 10.1 + ImageEn 7.5 + IEVision 4.0)
I use the TrackObjects sample from IEVision demos, and after translate delphi to the C++ syntax.
After compiling and linking, it looks like everything is normal, but after the execution, the tracked object is opposite to the rectangular area.
(When the object being tracked goes up, the red rectangle goes down)
I listed some of the code below. Where is the problem?
P.S:
I'm not familiar with Delpi, but the example is only delphi, so please tell me where is a bug in the program.
Thank You .
James Lin.
:
:
oImageEnView->IO->DShowParams->GetSample(oImageEnView->->IEBitmap);
// ------------------------------------------------------------
// localize object (use CamShift)
Robj_IEBitmap_BKPROJ->GetIEVisionImage()->flip(ievY_AXIS, obj_IEVisionImage);
// --------------------------------------------
ObjTracker->locateNewPosition(obj_IEVisionImage, obj_IEVisionImageBKPROJ,
stru_rotRect);
// ------------------------------------------------------------
// localized?
if((stru_rotRect.size.width > 0) &&
(stru_rotRect.size.height > 0) &&
obj_IEVisionImageBKPROJ!= NULL )
{
// display back projected image (just for testing)
obj_IEVisionImage->getScanline(0, mvp_SRCBUFF);
// --------------------------------------------
obj_IEVisionImage->getWidth(mi_Width);
obj_IEVisionImage->getHeight(mi_Height);
obj_IEVisionImage->getRowLen(mi_RowLen);
// --------------------------------------------
// show rect
IECanvas->Translate(stru_rotRect.center.x,
stru_rotRect.center.y);
IECanvas->Rotate(stru_rotRect.angle);
// --------------------------------------------
// show rect
IECanvas->Pen->Color = clRed;
IECanvas->Pen->Width = 3;
IECanvas->Brush->Style = bsClear;
IECanvas->Rectangle(-1 * stru_rotRect.size.width / 2,
-1 * stru_rotRect.size.height / 2,
stru_rotRect.size.width / 2,
stru_rotRect.size.height / 2);
:
: