I want to get 4 images as my output.
- Original image
- Enhanced image
- Binarized image
- Hough transform image
But after running the below code, I am getting only binarized image and hough tranform image as my output. Can anyone please help me solving that.
code:-
rgbimage = imread('2.jpg');imshow(rgbimage);equalisedimage = rgbimage; for channel = 1:3 equalisedimage(:, :, channel) = histeq(rgbimage(:, :, channel)); %apply histogram equalisation to each channel
endimshow(equalisedimage);% imshowpair(rgbimage, equalisedimage, 'montage');
%image_binarization
[X,map] = imread('2.jpg');binarizedimage=imshow(X,map);%title('Original indexed image');
bw = im2bw(X,map,0.5);imshow(bw);%houghtransform
RGB = imread('2.jpg');I = rgb2gray(RGB);BW = edge(I,'canny'); %canny is a method to find edges
[H,T,R] = hough(BW, 'Theta', 44:0.5:46);figureimshow(imadjust(mat2gray(H)),'XData',T,'YData',R,... 'InitialMagnification','fit');% title('Limited Theta Range Hough Transform of Gantrycrane Image');
xlabel('\theta'), ylabel('\rho');axis on, axis normal;colormap(gca,hot)%houghtransform..
Best Answer