tag:blogger.com,1999:blog-3240993750799145183.post1075383707502882348..comments2019-03-03T12:55:33.035+05:30Comments on Sidekick: Implementing Hough Transform (Line Detection)Tanmayhttp://www.blogger.com/profile/05342457728508357508noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-3240993750799145183.post-62455282798140447372013-03-20T14:54:40.409+05:302013-03-20T14:54:40.409+05:30I tried to run your program and these are the mist...I tried to run your program and these are the mistakes I encountered.<br />1>d:\eg3243\projects\hough transform\hough transform\hough transform.cpp(20): error C2668: 'sqrt' : ambiguous call to overloaded function<br />1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\math.h(589): could be 'long double sqrt(long double)'<br />1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\math.h(541): or 'float sqrt(float)'<br />1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\math.h(127): or 'double sqrt(double)'<br />1> while trying to match the argument list '(int)'<br />1>d:\eg3243\projects\hough transform\hough transform\hough transform.cpp(85): warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data<br />1>d:\eg3243\projects\hough transform\hough transform\hough transform.cpp(90): warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data<br />1>d:\eg3243\projects\hough transform\hough transform\hough transform.cpp(97): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data<br />1>d:\eg3243\projects\hough transform\hough transform\hough transform.cpp(98): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data<br />========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========<br />Can you show me what caused these errors?<br />Thank you so much<br />My email address is lavenderziyi@hotmail.comLavenderhttps://www.blogger.com/profile/15062346807551813392noreply@blogger.comtag:blogger.com,1999:blog-3240993750799145183.post-2455919328341650142013-03-18T09:36:09.436+05:302013-03-18T09:36:09.436+05:30Hi Kevin.
I think you mean to have a way of conve...Hi Kevin.<br /><br />I think you mean to have a way of converting from rho theta to the "y = mx + c" form. It is simply:<br /><br />y = rho/sin(theta) - x * cos(theta) / sin(theta)<br />Tanmayhttps://www.blogger.com/profile/05342457728508357508noreply@blogger.comtag:blogger.com,1999:blog-3240993750799145183.post-81373353643021989182013-03-17T23:34:24.117+05:302013-03-17T23:34:24.117+05:30Great job dude.
But how can u draw lines after u g...Great job dude.<br />But how can u draw lines after u get the rho and theta values. Can u please give a brief example?Kevin Hanksnoreply@blogger.comtag:blogger.com,1999:blog-3240993750799145183.post-66678571329911146692013-01-19T01:37:17.462+05:302013-01-19T01:37:17.462+05:30Hi, thanks for your interest.
Changing it for 2D ...Hi, thanks for your interest.<br /><br />Changing it for 2D points should be pretty straight forward. Modify the section that goes through the opencv image pixels to go through your 2D array. You can find the maximas as usual, but you may have to get the thresholds to a very low value since there may not be too many points.<br /><br />Cheers!Tanmayhttps://www.blogger.com/profile/05342457728508357508noreply@blogger.comtag:blogger.com,1999:blog-3240993750799145183.post-19331459978107450472013-01-17T00:40:46.662+05:302013-01-17T00:40:46.662+05:30Good day,
Firstly thanks for your post, it has be...Good day,<br /><br />Firstly thanks for your post, it has been useful in familiarising myself with the Hough Transform. I was wondering how one would go about changing your code to work with 2D data points and not images. <br /><br />The reason for this is; is that I am not familiar with OpenCV and would like to use the Hough Transform on straight forward 2D data (based on x and y points); to detect how many lines can be fitted to the 2D data points.<br /><br />Thanks in advance for your assitance.Anonymousnoreply@blogger.com