spateo.tools.roi
#
Module Contents#
Functions#
|
Click with the left mouse button to draw lines |
|
Hold down the left mouse button and move the mouse to draw lines |
|
Add different labels and colors to the divided areas according to fill_mode on the mask |
|
Mouse event in response to the "drawing" window |
|
|
|
|
|
|
fill mask with different color in different region |
|
|
|
|
|
|
Attributes#
Track expansion width, pixel value |
|
- spateo.tools.roi.line_mode(x, y)[source]#
- Click with the left mouse button to draw lines
on the original image and the mask to distinguish regions
- Parameters:
- x
x_coordinate where the left mouse button is clicked
- y
y_coordinate where the left mouse button is clicked
- Returns:
None
- Raises:
None –
- spateo.tools.roi.drag_mode(x, y)[source]#
- Hold down the left mouse button and move the mouse to draw lines
on the original image and the mask to distinguish regions
- Parameters:
- x
x_coordinate where the left mouse button is clicked
- y
y_coordinate where the left mouse button is clicked
- Returns:
None
- Raises:
None –
- spateo.tools.roi.mask_fill(x, y, fill_mode)[source]#
Add different labels and colors to the divided areas according to fill_mode on the mask :param x: x_coordinate where the left mouse button is clicked :param y: y_coordinate where the left mouse button is clicked :param fill_mode: The way the region is filled with color ,
optional mode : manual(Click a region to fill it),auto(Fill all areas with one mouse click)
- Returns:
None
- Raises:
None –
- spateo.tools.roi.mouse_event(event, x, y, flags, param)[source]#
Mouse event in response to the “drawing” window
- spateo.tools.roi.color = [(192, 182, 255), (203, 192, 255), (60, 20, 220), (245, 240, 255), (147, 112, 219), (180, 105,...[source]#
Track expansion width, pixel value line_ls : Save the mouse click point, the point coordinates(a tuple of coordinate points) fill : Distinguish between drawing or filling flags when the mouse is clicked. {‘True’:fill_mode , ‘False’:line_mode color_index : Index when filling the mask with a color, an iterator draw_mode : The way draw trajectories. optional: {‘line’:line_mode,’drag’:drag_mode} fill_mode : The way fill mask. optional:{‘manual’:A single area is manually filled. ‘auto’: All area is auto filled} mask : The area divided mask_extend : The area divided, used when extending the contours mask_id : The area divided, use when labeling areas mask_flood : Use when fill mask with different color mask_flood_1 : Use when fill img_2 with different color labels : A diagram of the result after each area has been labeled with different integer
- Type:
EXTEND_WIDTH