Conversion_Morfology
Using of command
Command aplied morfological operation to source image. Follow morfological operations are supported:
- Erode :The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:
min src(x+x_a,y+y_a)
where x_a,y_a are dimensions in element
Erosion can be applied several (iterations) times. For color images, each channel is processed independently.
- Dilate:The function dilates the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the maximum is taken:
max src(x+x_a,y+y_a)
where x_a,y_a are dimensions in element
Dilation can be applied several (iterations) times. For color images, each channel is processed independently.
- Opening:Function combine Erode and Dilate operation according formula:
dst=open(src,element)=dilate(erode(src,element),element)
- Closing:Function combine Erode and Dilate operation according formula:
dst=close(src,element)=erode(dilate(src,element),element)
- Morfological gradient:Function combine Erode and Dilate operation according formula:
dst=morph_ grad(src,element)=dilate(src,element)-erode(src,element)
- Top hat:Function use formula:
dst=tophat(src,element)=src-open(src,element)
- Black hat:Function use formula:
dst=blackhat(src,element)=close(src,element)-src
Commands parameters
Command has 5 parameters:
- Source picture: You need select source picture.Source picture must be activated before use of this function. You can select Picture_0 to Picture_19.
- Destination picture: You need select destination picture. Destination picture must be activated before use of this function. Source and destination picture can be same. You can select Picture_0 to Picture_19.
- Morfology type: You can selec one of morfological operation.
- Iteration: You can set number of iteration.
- Element shape:You need select shape of structuring element:
- RECT:A rectangular element
- ELLIPSE:an elliptic element
- CROSS:a cross-shaped element
- Element width: you can set element width as number in pixels
- Element height: you can set element height as a number in pixels
- Anchor x:You need set relative horizontal offset of the anchor point
- Anchor y: You need set relative vertical offset of the anchor point
Error codes
- Error code -11: Bad position of source picture in picture array. Error means that source picture is not in range 0 to 19. Check test program file if command has proper format.
- Error code -12:Bad position of destination picture in picture array.Error means than destination picture is not in range 0 to 19.Check test program file if command has proper format.
- Error code -13:Bad morfology type.Check test program file if command has proper format.
- Error code -14: Bad iteration number. Iteration number must be more or equal than 1.
- Error code -15: Bad element shape.Check test program file if command has proper format.
- Error code -16:Bad elementh width. Element width must be more or equal than 1.
- Error code -17:Bad element height. Element height must be more or equal than 1.
- Error code -100: OpenCV error. Explanation of this error will be displayed in result window.