Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to bound zebra crossing stripes?

Hello I understand that this a more direct question.

Input: image description

Output: image description

I know basic OpenCV. Any lead would be helpful to me.

How to bound zebra crossing stripes?

Hello I understand that this a more direct question.

Input: image description

Output: image description

I know basic OpenCV. Any lead would be helpful to me.

Update: So far where I have reached is;

cv::cvtColor(img, hsv, cv::COLOR_BGR2HSV);
cv::Scalar lowerWhite  = cv::Scalar(0,0,154);
cv::Scalar upperWhite = cv::Scalar(180,24,253);
cv::inRange(hsv, lowerWhite, upperWhite, mask);
mask.rowRange(0, 204) = 0;
Mat element = getStructuringElement( MORPH_RECT, Size( 5, 5 ), Point( 5, 5 ) );
morphologyEx( mask, Output, MORPH_OPEN, element );

Output:

image description

How to bound zebra crossing stripes?

Hello I understand that this a more direct question.

Input: image description

Output: image description

I know basic OpenCV. Any lead would be helpful to me.

Update: Update: So far where I have reached is;

cv::cvtColor(img, hsv, cv::COLOR_BGR2HSV);
cv::Scalar lowerWhite  = cv::Scalar(0,0,154);
cv::Scalar upperWhite = cv::Scalar(180,24,253);
cv::inRange(hsv, lowerWhite, upperWhite, mask);
mask.rowRange(0, 204) = 0;
Mat element = getStructuringElement( MORPH_RECT, Size( 5, 5 ), Point( 5, 5 ) );
morphologyEx( mask, Output, MORPH_OPEN, element );

Output:

image description