I was trying to plot hough transform using hough(edge_detected_image). Then Im using the following commands:
imshow(h,[],'XData',theta,'YData',rho,'InitialMagnification','fit');
axis on
axis normal
hold on
But Im getting the plot as:
while i need something like 
How can this be achieved? Are there any settings to be done?
You need to change the colour map. In addition, you may want to rescale the data so that it conforms within an acceptable range. Use imadjust on the output accumulator matrix prior to showing it. You will need to change the values of the accumulator matrix so that it's normalized. Simply dividing by the maximum value of h should work.
The colour map used in your figure is the hot colour map, so therefore:
imshow(imadjust(h / max(h(:))),'XData',theta,'YData',rho,'InitialMagnification','fit');
axis on; axis normal; hold on
colormap(gca,hot);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With