When using the C# CSShapeFinder2010 project (for testing purposes), it does not return a shapefinder object if the AOI for the feature window is selected in one of the corners… I only modified the RectDragged function for testing and used one of the sample pictures in CVB (e.g., ClassicSwitch).
private void cvDisp_RectDraged(object sender, EventArgs e)
{
double x0, y0, x1, y1, x2, y2;
x0 = x1 = x2 = y0 = y1 = y2 = 0.0;
// get the selected AOI
cvDisp.GetSelectedArea (ref x0, ref y0, ref x1, ref y1, ref x2, ref y2);
// keep it in the AOI
m_AOI = new Rectangle((int)x0, (int)y0, (int)(x2 - x0) + 1, (int)(y1 - y0) + 1);
}
If the function m_AOI = new Rectangle … is replaced with one of the following (for testing):
m_AOI = new Rectangle(Cvb.Image.ImageWidth(cvImg.Image) - 100, 0, 99, 100);
m_AOI = new Rectangle(0, 0, 100, 100);
and then Train is clicked the returned ShapeFinder object will be 0.
Is this behaviour expected? If yes, how far does the training window need to be away of the edges/corners of the images. It works fine if a AOI is chosen in the centre.
Thanks for your help.