Reputation: 377
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
How can this be achieved? Are there any settings to be done?
Upvotes: 3
Views: 196
Reputation: 104464
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);
Upvotes: 6