#include #include #include vector vec3(icl8u r, icl8u g, icl8u b){ vector v(3); v[0] = r; v[1] = g; v[2] = b; return v; } void testA(){ ImgQ A = scale(create("parrot"),0.3); A = gray(A); A = levels(A,5); A = filter(A,"median"); ImgRegionDetector RD(100,1000,100,255); vector data = RD.detect(&A); A = rgb(A); for(unsigned int i=0;i(200,255), // value range new Range(10,1000000) ), // size range new RegionFilter( new Range(200,255), // value range new Range(10,1000000) ), // size range new RegionFilter( new Range(200,255), // value range new Range(10,1000000) ) }; // size range for(int i=0;i<3;++i){ R.add(fmc[i],rf[i]); } R.extractRegions(&A); A =rgb(A); color(255,0,0,200); pix(A,R.getCOGs()); color(0,255,0,100); const Array > &boundaries = R.getBoundaries(); for(unsigned int i=0;i