If the regions overlap more than one region might contain the pixel.
In this case all these regions are returned.
If no region contains the indicated pixel the
empty tuple (= no region) is returned.
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
read_image(&Image,"fabrik");
regiongrowing(Image,&Seg,3,3,5.0,0);
do {
printf("Select the region with the mouse (End right button \n");
get_mbutton(WindowHandle,&Row,&Column,&Button);
select_region_point(Seg,&Single,Row,Column);
clear(Single);
} while(Button != 4);
Example (C++)
#include "HIOStream.h"
#if !defined(USE_IOSTREAM_H)
using namespace std;
#endif
#include "HalconCpp.h"
using namespace Halcon;
int main ()
{
HImage img ("fabrik");
HWindow w;
HRegionArray ireg, reg;
DPoint2D rc;
int Button;
reg = img.Regiongrowing (3, 3, 5, 100);
reg.Display (w);
w.SetColor ("red");
w.SetDraw ("margin");
cout << "Select any region with left mouse button (right button ends)"
<< endl;
do
{
rc = w.GetMbutton (&Button);
cout << "[x, y] = " << (Hlong) rc.X() << ", " << (long) rc.Y() << endl;
ireg = reg.SelectRegionPoint ((Hlong) rc.Y(), (long) rc.X());
img.Display (w);
ireg.Display (w);
} while (Button != 4);
return(0);
}