#include <StructuringElement.h>
Inheritance diagram for CStructuringElement
Public Methods | |
CStructuringElement () | |
CStructuringElement (int *pix, int nb, int *extrem, int nbe) | |
Create a convex structuring element. | |
CStructuringElement (double alpha) | |
Create a line structuring element with angle alpha (in degree) center in its middle. | |
CStructuringElement (CImageGrey *img) | |
Create a generic structuring element from image *img. | |
virtual | ~CStructuringElement () |
Destructor, for the cleaning-up. | |
EltStructT | TypeGet () const |
Return the type of the element (mostly debuging purpose). | |
int | WidthGet () const |
Return the width of the element. | |
int | HeightGet () const |
Return the height of the element. | |
int | BaricenterXGet () const |
Return the x-baricenter. | |
int | BaricenterYGet () const |
Return the y-baricenter. | |
void | Translate (int x, int y) |
Translate the element. More... | |
CImageGrey* | createImage (PIXEL color=1) |
Create an image from the structuring element. | |
CImageGrey* | dilate (CImageGrey *img, int size) |
Generic dilation. | |
CImageGrey* | erode (CImageGrey *img, int size) |
Generic erosion. | |
CImageGrey* | test (int x1, int y1, int x2, int y2) |
Draw test. | |
Protected Methods | |
void | updateMax (ListPixelT *remove, ListPixelT *add, LPPIXEL start) |
update the maximum for the dilation. | |
void | updateMin (ListPixelT *remove, ListPixelT *add, LPPIXEL start) |
update the minimum for the erosion. | |
void | init (CImageGrey *image) |
first thing to do before a generic dilation or erosion. | |
int | offset (CPixel pix) |
return the offset computed in init(). | |
CImageGrey* | dilate1Gen (CImageGrey *img) |
Dilate the image *im with the structuring element. | |
CImageGrey* | erode1Gen (CImageGrey *img) |
Erode the image *im with the structuring element. | |
CImageGrey* | dilateGen (CImageGrey* img, int size) |
Dilation with convex element. More... | |
CImageGrey* | erodeGen (CImageGrey* img, int size) |
Dilation with convex element. More... | |
CImageGrey* | dilate1Conv (CImageGrey* img, CImageGrey* imgOut, ListPixelT *lpix, int size) |
Dilation size 1 with convex element. | |
CImageGrey* | erode1Conv (CImageGrey* img, CImageGrey* imgOut, ListPixelT *lpix, int size) |
Erosion size 1 with convex element. | |
CImageGrey* | dilateConv (CImageGrey* img, int size) |
Dilation with convex element. More... | |
CImageGrey* | erodeConv (CImageGrey* img, int size) |
Erosion with convex element. More... | |
CImageGrey* | dilateLinear (CImageGrey *img, int size) |
Dilation with linear element. More... | |
CImageGrey* | erodeLinear (CImageGrey *img, int size) |
Erosion with linear element. More... | |
void | BresenhamOffset (int x1, int y1, int x2, int y2, int *pb, int *rlc, int nx) |
Compute the offset of a Bresenham line, stored in a run-length code. More... | |
Protected Attributes | |
PIXEL | histo [512] |
PIXEL | maximum |
PIXEL | minimum |
int | LineLength |
int | centerx |
int | centery |
int | Width |
int | Height |
int | top |
int | left |
int | bottom |
int | right |
int | baricenterx |
int | baricentery |
double | alpha |
angle for linear element. | |
ListPixelT | allpixels |
All the pixels of the structuring element. | |
ListPixelT | removeBottom |
Lists which are used in Talbot algorithm. | |
ListPixelT | removeLeft |
ListPixelT | removeRight |
ListPixelT | addBottom |
ListPixelT | addLeft |
ListPixelT | addRight |
ListPixelT | extremSet |
List of extrem pixel to use with convex element. | |
EltStructT | type |
Type of the structuring element. | |
Private Methods | |
void | computeMaxG (LPPIXEL f, int *p, PIXEL *g, int k, int nx) |
void | computeMaxH (LPPIXEL f, int *p, PIXEL *h, int k, int nx) |
void | computeMaxGH (PIXEL *gh, PIXEL *g,PIXEL *h,int k,int nx) |
void | computeMaxH2 (LPPIXEL f, int *p, PIXEL *h2, int k, int nx) |
void | computeMaxR (LPPIXEL f, int *p, PIXEL *g, PIXEL *h, PIXEL *gh, PIXEL *h2, int k, int nx) |
void | computeMinG (LPPIXEL f, int *p, PIXEL *g, int k, int nx) |
void | computeMinH (LPPIXEL f, int *p, PIXEL *h, int k, int nx) |
void | computeMinGH (PIXEL *gh, PIXEL *g,PIXEL *h,int k,int nx) |
void | computeMinH2 (LPPIXEL f, int *p, PIXEL *h2, int k, int nx) |
void | computeMinR (LPPIXEL f, int *p, PIXEL *g, PIXEL *h, PIXEL *gh, PIXEL *h2, int k, int nx) |
|
Compute the offset of a Bresenham line, stored in a run-length code. Bresenham algorithm to draw a line
|
|
Translate the element. Not always implemented everywhere (yet)!!! |
|
Dilation with convex element. Dilation with a convex structuring Element. Implements logarithmic decomposition in Boomgaard thesis. |
|
Dilation with convex element. Dilation with a generic structuring element Implements Talbot's thesis |
|
Dilation with linear element. Dilatation with a linear structuring element - 3 max per pixels. Implements "Recursive Implementation of Erosions and Dilations Along Discrete Lines at Arbitrary Angles" P. Soille, E.J. Breen, and R. Jones IEEE PAMI Vol. 18, No. 5, May 1996, pp. 562-567 |
|
Erosion with convex element. Erosion with a convex structuring Element. Implements logarithmic decomposition in Boomgaard thesis. |
|
Dilation with convex element. Dilation with a generic structuring element Implements Talbot's thesis |
|
Erosion with linear element. Erosion with a linear structuring element - 3 min per pixels. Implements "Recursive Implementation of Erosions and Dilations Along Discrete Lines at Arbitrary Angles". P. Soille, E.J. Breen, and R. Jones. IEEE PAMI Vol. 18, No. 5, May 1996, pp. 562-567. |