95 double refR,
double refG,
double refB,
double threshold);
100 template<
class T,
class Criterion>
110 core::Channel8u ff = result.ffLUT[0];
112 ff(seed.x,seed.y) = 255;
120 #define ICL_DYNAMIC_FLOOD_FILLER_P(x,y) \ 121 if(r.contains(x,y) && !ff(x,y)){ \ 122 *e++ = utils::Point(x,y); \ 136 #undef ICL_DYNAMIC_FLOOD_FILLER_P 146 template<
class T,
class Criterion3Channels>
159 core::Channel8u ff = result.ffLUT[0];
161 ff(seed.x,seed.y) = 255;
167 if(crit(im0(x,y),im1(x,y),im2(x,y))){
169 #define ICL_DYNAMIC_FLOOD_FILLER_P(x,y) \ 170 if(r.contains(x,y) && !ff(x,y)){ \ 171 *e++ = utils::Point(x,y); \ 185 #undef ICL_DYNAMIC_FLOOD_FILLER_P 209 maxSquaredEuklDist(maxEuclDist*maxEuclDist){
214 inline bool operator()(
const T &r,
const T &g,
const T &b)
const{
223 struct FloodFiller::ReferenceColorCriterion<
icl8u>{
result structure, returned by the 'apply' methods
Definition: FloodFiller.h:80
undocument this line if you encounter any issues!
Definition: Any.h:37
Ipp8u icl8u
8Bit unsigned integer type for the ICL
Definition: BasicTypes.h:64
bool operator()(const T &pix) const
Definition: FloodFiller.h:197
T maxSquaredEuklDist
Definition: FloodFiller.h:206
bool operator()(const T &r, const T &g, const T &b) const
Definition: FloodFiller.h:214
core::Img8u ffLUT
list of filled pixels
Definition: FloodFiller.h:82
const Result & applyColorGeneric(const core::Img< T > &image, const utils::Point &seed, Criterion3Channels crit)
generic floodfilling algorithm for 3-channel color images
Definition: FloodFiller.h:147
T refcol[3]
Definition: FloodFiller.h:205
ReferenceColorCriterion(T refr, T refg, T refb, T maxEuclDist)
Definition: FloodFiller.h:208
#define ICLCV_API
Definition: CompatMacros.h:177
ICLQt_API ImgQ abs(const ImgQ &image)
calls abs ( each pixel)
T thresh
Definition: FloodFiller.h:195
Size class of the ICL.
Definition: Size.h:61
Utility helper class for faster and more convenient access to single channel image data.
Definition: Channel.h:145
#define ICL_DYNAMIC_FLOOD_FILLER_P(x, y)
static T sqr(const T &x)
square template (faster than pow(x,2)
Definition: Macros.h:212
ICLQt_API ImgQ thresh(const ImgQ &image, float threshold)
performs an image binarisation for each channel with given threshold
ICLQt_API void pix(ImgQ &image, int x, int y)
draw a single pixel into an image
T val
Definition: FloodFiller.h:194
std::vector< utils::Point > pixels
Definition: FloodFiller.h:81
predefined criterion for simple reference-value based filling for 3-channel images
Definition: FloodFiller.h:204
Point class of the ICL used e.g. for the Images ROI offset.
Definition: Point.h:58
predefined criterion for simple reference-value based filling for 1-channel images
Definition: FloodFiller.h:193
Utility class for image flood filling.
Definition: FloodFiller.h:70
Rectangle class of the ICL used e.g. for the Images ROI-rect.
Definition: Rect.h:95
const Result & applyGeneric(const core::Img< T > &image, const utils::Point &seed, Criterion crit)
generic grayscale image floodfilling using an arbitrary filling criterion
Definition: FloodFiller.h:101
std::vector< utils::Point > futurePoints
internal list of to-be-processed points
Definition: FloodFiller.h:72
DefaultCriterion(T val, T thresh)
Definition: FloodFiller.h:196
ImgBase is the Image-Interface class that provides save access to underlying Img-template .
Definition: ImgBase.h:131
const utils::Size & getSize() const
returns the size of the images
Definition: ImgBase.h:477