Q:

exact working of hough transform in matlab

Can anyone guide me how the function 'hough transform' works in matlab??  The problem is that i have an image containing two straight rectangles and one rectangle is tilted at some angle.  According to me after applying hough transform;  i should get a line structure of 1X6 but i am getting a structure of 1x14.  Can anyone help me?  I have also uploaded the images:

A:

You can't restrict Hough Transform to give a structure of 1x6.It doesn't produce stabile results. It also doesn't work well when looking further ahead on curved roads.  I should not acquire 1x6 structure from each frame. Instead, I should take all returned line segments and use some logic to determine the lane markings. 