When I use the function VLIB_houghLineFromList() in vlib for Hough Transform, I have a question:
First, I do not konwn what are the parameters " ping pong pang peng" mean?
Second, when I get the parameter "pOutHoughSpace" from VLIB_houghLineFromList() , and I get the biggest pixels index in "pOutHoughSpace", for example 200, and I suppose the thetaRange is 180, rhoMaxLength is 267. How can i get the true Theta and Rho? Theta = 200 / rhoMaxLength , Rho = 200 % rhoMaxLength ? What is the relation between the input parameter rhoMaxLength and the Rho/Theta?
Thanks a lot.
Hello, our expert is looking into this and will get back to you soon.
PS: Please mark this post as answered via the Verify Answer button below if you think it answers your question. Thanks!
I am currently writing an application note and developing a simple project using VLIB Hough transform for line detection in an image.
Please provide me your email id so that I can send you this project which would help you clarify all the details.
Your second question is the reason why I am doing the above as there are multiple ways to implement the Hough transform.
ping, pong, pang and peng are temporary buffers used to optimization.
Please refer to the documentation and the VLIB_testhough file for more details.
Hello Senthil ,
Thanks very much for your reply.
My email id is email@example.com or firstname.lastname@example.org
Hello XianSheng and Senthil,
I also want to know how to retrieve actual theta and rho value.
Would you share the document for me?
My email is email@example.com
Thank you very much.
I emailed you an example project.
Please let me know if you need anything more.
I got the example project. Thank you very much.
I am trying to exchange simulink hough transform block to VLIB_houghLineFromList block.
Is rhoMaxLength always the same as thetaRange?
The calculatedOutHoughSpace seems wrong, when rhoMaxLength changes to bigger number.
In my understanding of hough transform, when input image is 320*240, then rho range is -400 ~ +400 (sqrt(320^2 + 240^2)).
It seems the rho range is different in the draw_line.c.
Would you explain what following codes means?
diameter = SQRTof2_Q8*max(W,H);
normLength = 267 << 16; normLength /= diameter; normLength /= 2;
I tested simulink hough block with 1deg resolution of theta and 1pixel resolution of rho, but I don't know how to set the resolutions and the range for theta and rho in VLIB_houghLineFromList block. Can I get 'trigs.m' that generates sin, cos table?
Two years back, I worked with Mathworks to replace the Simulink Hough transform block to VLIB_hough transform block for their Lane Departure Demo.
I remember doing a few hacks to get it working as the line represenations were different in Matlab and VLIB and also had to compensate for the rho and theta transformations.
Answering your questions below:
// Diameter of Hough Space which is max abs value of r = sqrt(W^2 + H^2 ) [this is approximated by the value below] diameter = SQRTof2_Q8 * max(W, H); // Scale factor for r to rho conversion normLength = 267<< 16; normLength /= diameter; normLength /= 2;
The actual 'r' is quantized to a new variable with rhoMaxLength as the number of bins for quantization.
For example, 'r' can take any floating point value from -r_max to + r_max. This range is mapped to discrete bins 0,1,2 ... rhoMaxLength which will act as the indexes in the Hough Space. From the bin index, you need to extract the actual 'r' by doing the inverse of quantization which is what is illustrated in the sample project I sent you.
So in your example, 400 is actually r_max and not rhomaxLength and it can be different from thetaRange. This range of values -400 to 400 is mapped to discrete indices 0,1,2....267.
VLIB_testHough.c provided in VLIB contains the VLIB_InitializeTrigLUTs function which generates the sin and cos tables.
Please feel free to ask for more clarification if required.
I tested VLIB_hough transform with different rhoMaxLength.
Is there any maximum value for rhoMaxLength?
When I set high value for rhoMaxLength, HoughOut was not correct.
ex) for 360*120 images, rhoMaxLength = 380 works well
but rhoMaxLength = 600 does not work properly. I observed overlapping voting count appear in HoughOut.
If the range -r_max ~ +r_max is divided into rhoMaxLength bins equally, different rhoMaxLength generates only scaled pattern of HoughOut.
I will send you a picture showing overlapping pattern of HoughOut since I cannnot attach picture here.
Can you also send me the example project for Hough transform using VLIB.
My email Id is a_pradyumna<at>yahoo<dot>com
Also I suggest upload the example project so that others can easily find it.
I emailed you the example project.
We are planning to clean it up and release it with VLIB.
I unfortunately erase the flash program while doing some programs , But i burn the flash program in the cd (dm6437_demo.hex) i have also burn it in the flash using flash utility but it was not working properly....
So please give some solution to get my board to the Default state......
Hello,I need the vlib ,where can I download the vlib? do you have it? email:firstname.lastname@example.org sorry,my English is very poor!!!!!
Please use the following link and fill the form for approval of VLIB - www.ti.com/vlibrequest
I dont know how to fix this issue.
I will try to find out and let you know.
Hello XianSheng and Senthil and Junsu,
My email is email@example.com
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.