I have been manually adjusting the findLines parameters and have come up with the following:
One of the most frequent issues I encounter with ChosunTruck's current implementation is the extraneous lines created by the guardrails along the road. Here are my observations and thoughts about this:
Changing the deltaRho value had a significant impact on the quality of lines detected. I found the optimal value of deltaRho to be around 0.75-0.80. However, changing this by itself would not be sufficient as the lines would typically disappear when the truck accelerates and the IPM window 'zooms out'. While deltaRho's default value of 1 is sufficient in most cases, it may be worth trying to reduce it to 0.90 - 0.95 to see if that reduces the extraneous lines.
Consideration: Implementing a version of adaptive IPM like the one found in the linux version may make changing the deltaRho value a viable option.
Changing the minLength and maxGap parameters had a small effect on line detection. However, I do believe our current values of 20 for minLength and 120 for maxGap may be sub-optimal. Through my own personal expirementation, I found the optimal range for minLength to be from 5-35 and the optimal range for maxGap to be from 70-75.
Changing setMinVote had a significant impact on line detection. It is important to note that changing setMinVote won't be effective by itself. This parameter is entirely dependent on the quality of the pre-proccessed image. I found the optimal value to be between 60 and 65.
Guassian blur - I tried replacing cv::blur(gray, blur, cv::Size(10, 10)); with cv2.GaussianBlur(gray, blur, (17,17),0) and I believe it might be more effective at reducing noise. I am still experimenting with this.
I will be creating a related issue regarding the use of the detected lines' angles to devise a way to filter the near-horizontal lines created by the guardrails. I'm also looking at calculating the average slope of the lines to implement cv::fitLine to extrapolate the lines detected. Implementing these features to our project may make the following suggestions above unnecessary.
Through the use of thresholding and calculating the angles of lines, I have improved the quality of lines detected by ChosunTruck. I will be pushing this code out soon.
I have been manually adjusting the findLines parameters and have come up with the following: One of the most frequent issues I encounter with ChosunTruck's current implementation is the extraneous lines created by the guardrails along the road. Here are my observations and thoughts about this:
minLength
andmaxGap
parameters had a small effect on line detection. However, I do believe our current values of 20 forminLength
and 120 formaxGap
may be sub-optimal. Through my own personal expirementation, I found the optimal range forminLength
to be from 5-35 and the optimal range formaxGap
to be from 70-75.setMinVote
had a significant impact on line detection. It is important to note that changingsetMinVote
won't be effective by itself. This parameter is entirely dependent on the quality of the pre-proccessed image. I found the optimal value to be between 60 and 65.cv::blur(gray, blur, cv::Size(10, 10));
withcv2.GaussianBlur(gray, blur, (17,17),0)
and I believe it might be more effective at reducing noise. I am still experimenting with this.I will be creating a related issue regarding the use of the detected lines' angles to devise a way to filter the near-horizontal lines created by the guardrails. I'm also looking at calculating the average slope of the lines to implement cv::fitLine to extrapolate the lines detected. Implementing these features to our project may make the following suggestions above unnecessary.