Can I use cv::fitLine() to robustly find an intersection point?
cv::fitLine
provide robust line fitting algorithms, that ought to be better than the regular least-square fitting.
I am wondering if cv::fitLine
can be "abused" to robustly find the "best" intersection point of a large number of image lines.
I can just list each image line as a 3D (homogrphic) point and then call cv::fitLine
.
The result after normalizing should be the best fitting point.
Is there any reason this will not work? After all lines and point are duals in 2D space, and identical in 2D projective space.
If it does work, then what should the param
, reps
and aeps
parameters be?
intersting... as answer you could post some code to show something! good job anyway
The code does exactly what I wrote. It's using some internal classes, so it'd take some rewrite to post here. If there's more demand I may do it anyway.
You can post an answer to your own question, signal it as the correct answer, and people will give you credit for it. Also, the better you format the answer (ex: including code snippets), the better for the community (and also will receive more upvotes) =)
Yes, I know, but actually I was still waiting for some more answers regarding: the validity and the parameters.