Hi ,
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!
Hello XianSheng,
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.
Regards
Senthil
Regards,
Hello Senthil ,
Thanks very much for your reply.
My email id is liuqingben511@163.com or dsp.support@zlgmcu.com
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 junsu.jang@lge.com
Thank you very much.
Hello Junsu,
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?
Best regards,
-Junsu
Junsu,
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.
Senthil,
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.
Thanks,
Junsu
Hello Senthil,
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.
Thank you,
Regards.
Ayyala
Ayyala,
I emailed you the example project.
We are planning to clean it up and release it with VLIB.
Hello senthil,
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......
regards
shan
Hello,I need the vlib ,where can I download the vlib? do you have it? email:hyunfei19862008@163.com sorry,my English is very poor!!!!!
Hello YunFei,
Please use the following link and fill the form for approval of VLIB - www.ti.com/vlibrequest
Shan,
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 iopp50@gmail.com