Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Smoothing binary mask and sort out distortion

Hi there,

i'm detecting a colored rect in the hsv colorspace by thresholding the single channels. Here is the result of a detected yellow square mask.

image description

colorspace -> HSV

Color to detect: Yellow (used laser printer to print out the marker // CMYK)

In OpenCV I threshold by followed values:

lower_yell = np.array([15, 100, 20])
upper_yell = np.array([40, 265, 255])

A dilation was processed after canny edge

edges_yell_pre = cv2.Canny(mask_yell, 0, 50, apertureSize = 3)
edges_yell = cv2.dilate(edges_yell_pre, None)

How would you guys delete the small distortion. Please note, that this given example here is a 'good' result.

Thanks

Smoothing binary mask and sort out distortion

Hi there,

i'm detecting a colored rect in the hsv colorspace by thresholding the single channels. Here is the result of a detected yellow square mask.

image description

colorspace -> HSV

Color to detect: Yellow (used laser printer to print out the marker // CMYK)

In OpenCV I threshold by followed values:

lower_yell = np.array([15, 100, 20])
upper_yell = np.array([40, 265, 255])

A dilation was processed after canny edge

edges_yell_pre = cv2.Canny(mask_yell, 0, 50, apertureSize = 3)
edges_yell = cv2.dilate(edges_yell_pre, None)

How would you guys delete the small distortion. Please note, that this given example here is a 'good' result.

Thanks And how to add some robustness for low level detection. How to start here? Hist eq would give me to much problems because I'm dealing with a random changing background.

Thanks