How to bound zebra crossing stripes?

asked 2020-03-13 15:36:35 -0600

JeyP4 gravatar image

updated 2020-03-14 04:52:21 -0600

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

edit retag flag offensive close merge delete

Comments

LBerger gravatar imageLBerger ( 2020-03-14 05:14:11 -0600 )edit

I merely used python.

supra56 gravatar imagesupra56 ( 2020-03-14 10:30:42 -0600 )edit
1

@LBerger Thank you for spotting a good paper for me. Let me go through it and see if I can come up with a robust solution.

JeyP4 gravatar imageJeyP4 ( 2020-03-17 05:16:22 -0600 )edit