1 | initial version |
for hough line code is -: HoughLinesP(dst,lines,1,CV_PI/180,80,30,10); now make a conditional statement like-: if( theta>CV_PI/180170 || theta<cv_pi 180<="" em="">10) { Point pt1, pt2; .......... line( cdst, pt1, pt2, Scalar(0,0,255), 3, CV_AA); } this while restrict the scope of detected lines and then you will be able to show your horizontal lines only.
2 | No.2 Revision |
for hough line code is -:
HoughLinesP(dst,lines,1,CV_PI/180,80,30,10);
HoughLinesP(dst,lines,1,CV_PI/180,80,30,10);
now make a conditional statement like-:
like-:
if( theta>CV_PI/180170 theta>CV_PI/180*170 || theta<cv_pi 180<="" em="">10)
theta<CV_PI/180*10)
{ Point pt1, pt2;
..........
line( cdst, pt1, pt2, Scalar(0,0,255), 3, CV_AA);
}
this while restrict the scope of detected lines and then you will be able to show your horizontal lines only.