How to make HoughlinesP to detect more lines?
Hello everyone, I am trying to detect the straight lines in a bottle. I am using the example provided by OpenCV tutorials however the maximum I can get is just one.
I have played with most of the parameters of CannyEdge and Houghlinesp, however the maximum I can get is always maximum 1 (I got 2 but just in one example) I am sending the examples of bottles that I am trying also with it's resulting example.
I have several suspects about the problems with this non-detection: one could be the shadow, other one could be the light reflect, and even I am thinking that the camera is not well calibrated. However if someone knows or has worked with this function before and thinks that this doesn't have any relation, I would thank you too much.
Thanks a lot for everything.
!
The original images
can you add some code and upload the original images without the title bar. Plus from what I am seeing you get the image from canny and pass it to houghTransfomp without any post-processing (e.g. some morphology operation that could strength the edges/lines and give you a more robust result ;-) Moreover, what is your main purpose by detecting the lines (e.g. obtain orientation of bottle, just get the bottle lines, playing around, etc)?
Actually I am using CannyEdge + HoughLinesP
My idea is to find the orientation of the bottle. I tried with other options, actually there is an option to find the orientation of the bottle (Object orientation which appears in http://www.google.de/imgres?imgurl=ht...), however the shadow and reflect of the bottle affects the real orientation of it (So I would need to find an algorithm to detect them)
I will add the photos in my main question.
This is the code