Morphological Filter¶
This class provides methods to apply morphological filters (dilation, top-hat, …) to an image.
Defined in src/imgfilt/MorphFilter.h
-
class MorphFilter : public TObject¶
Public Functions
-
MorphFilter()¶
Class constructor: initialize structures.
-
virtual ~MorphFilter()¶
Class destructor: free allocated memory.
Public Static Functions
-
static Image *ComputeWatershedFilter(std::vector<Contour*> &contours, Image *img, Image *markerImg)¶
Compute Watershed filter map and get contours.
-
static Image *ComputeHDomeFilter(Image *img, double baseline, int kernSize = 3)¶
Compute H-dome filter.
-
static Image *ComputeMorphRecoFilter(Image *img, double baseline, int kernSize = 3, double tol = 1.e-6)¶
Compute H-dome filter.
Apply image reconstruction filter to image and return filtered image
-
static Image *ComputeMorphRecoFilter(Image *img, Image *marker_img, int kernSize = 3, double tol = 1.e-6)¶
Apply morph filter to image and return filtered image.
-
static Image *ComputeMorphFilter(Image *img, int morphOp, int kernSize = 3, int structElementType = eMORPH_RECT, int niters = 1, bool skipZeroPixels = true)¶
Apply morph filter to image and return filtered image.
-
static int FindPeaks(std::vector<ImgPeak> &peakPoints, Image *img, std::vector<int> kernelSizes = {3, 5}, int peakShiftTolerance = 1, bool skipBorders = true, int peakKernelMultiplicityThr = -1)¶
Find peaks in image by combining local peaks found with different dilation kernel sizes.
-
static Image *Dilate(std::vector<long int> &peakPixelIds, Image *img, int KernSize, bool skipBorders = true)¶
Dilate image with specified kernel.
-
static Image *GetFiltered(std::vector<long int> &peakPixelIds, Image *img, int KernSize, int morphOp, int structElementType, int niters, bool skipBorders)¶
Apply a morphological operation (DILATE/ERODE, OPENING/CLOSING, …) to input image with configurable kernel and other pars.
-
static int DilateAroundSources(Image *img, std::vector<Source*> const &sources, int KernSize = 5, int dilateModel = eDilateWithBkg, int dilateSourceType = -1, bool skipToNested = false, ImgBkgData *bkgData = 0, bool useLocalBkg = false, bool randomize = false, double zThr = 5, double zBrightThr = 20)¶
Dilate image around specified sources position.
-
static int DilateAroundSource(Image *img, Source *source, int KernSize = 21, int dilateModel = eDilateWithBkg, ImgBkgData *bkgData = 0, bool useLocalBkg = true, bool randomize = false, Image *mask = 0, int bkgBoxThickness = 20)¶
Dilate image around a given source.
-
MorphFilter()¶