Colm Hand
Colm Hand

Reputation: 1

OpenCV HoughLinesP

When using the HoughLinesP function in OpenCV is there away of performing analysis on individual lines (i.e can all the lines detected in a frame be "labelled" for future reference).

I have reduced the number of detected lines to as few as possible by adjusting the canny edge detector, however, I still detect a few lines and would really only like to analyse one.

Thanks!

Upvotes: 0

Views: 371

Answers (1)

GPPK
GPPK

Reputation: 6666

Hough lines are read out like this:

vector<Vec4i> lines;
HoughLinesP(dst, lines, 1, CV_PI/180, 50, 50, 10 );

If you want to be able to label them you could pop the vector into a std::map

std::map<std::string, vecto<Vec4i>>

Upvotes: 1

Related Questions