9 #include <FeatureDetector/BlobDetectorDOM.hh>
10 #include <Base/ImageUtils/ImageDraw.hh>
17 int main(
int argc,
char* argv[]){
21 testImg.
Init(1024,768,3);
23 float white[] = {255.0,255.0,255.0};
24 for (
int xpos = 100; xpos < 1000; xpos+= 200)
25 for (
int ypos = 100; ypos < 700; ypos+= 200)
29 vector<HomgPoint2D> blobs;
30 vector<float> qualvec;
39 for (
int xpos = 100; xpos < 1000; xpos+= 200)
40 for (
int ypos = 100; ypos < 700; ypos+= 200){
41 bool foundBlob =
false;
42 for (
int i = 0; i < (int)blobs.size(); i++)
43 if (fabs(blobs[i][0] - (
double)xpos) < 1.0 && fabs(blobs[i][1] - (
double)ypos) < 1.0)
45 if (foundBlob ==
false)
return 1;
void GetBlobsAsHomgPoint2D(std::vector< HomgPoint2D > &blobs, std::vector< float > &qual_vec)
Returns the blobs generated by Detect() as HomgPoin2D vector and quality vector (Like feature points)...
void SetThreshold(float threshold)
Set threshold for blob detection.
void Clear(const StorageType value=0)
sets all pixels to zero/value
void SetCabin(int cabinsPerAxis, int maxPopulation)
Allow just a maximum number of DOM extrema in one cabin.
void Init(unsigned int Width, unsigned int Height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true)
calls Init from ImageBase storageType is ignored, just dummy argument
int Detect(BIAS::Image< StorageType > &image, std::vector< BIAS::BIASBlob > &blobs)
Detect and return blobs in an image.
Blob detector for 'Difference Of Means'-blobs (so this is not a binary blob detector).
drawing simple entities into the image like rectangles or lines As all functions are static they have...