clear allclose all[FileName,PathName] = uigetfile('*.*','Select the image file');nomfich=[PathName,FileName];ima=imread(nomfich);HSV=rgb2hsv(ima);H=HSV(:,:,1);S=HSV(:,:,2);V=HSV(:,:,3);%dilate image
SE = strel('line',1,1);H = imdilate(H,SE);S = imdilate(S,SE);V = imdilate(V,SE);%performing dwt2 on h,s,v channels
[hca1,hch1,hcv1,hcd1] = dwt2(H,'bior1.3');[sca1,sch1,scv1,scd1] = dwt2(S,'bior1.3');[vca1,vch1,vcv1,vcd1] = dwt2(V,'bior1.3');%replacing ll(hac1) with adding all other three values(hch1,hcv1,hcd1). sililarly for s and v channls ll band is replaed with new value
LH=hch1+hcv1+hcd1;LS=sch1+scv1+scd1;LV=vch1+vcv1+vcd1;reconstructing image using replaced ll valuea=idwt2(LH,hch1,hcv1,hcd1,'bior1.3');%figure,imshow(a);
b=idwt2(LS,sch1,scv1,scd1,'bior1.3');%figure,imshow(b);
c=idwt2(LV,vch1,vcv1,vcd1,'bior1.3');%figure,imshow(c);
%hsvimg=a+b+c;
%combing all the three result into hsv1 image for display
HSV1(:,:,1)=a;HSV1(:,:,2)=b;HSV1(:,:,3)=c;figure,imshow(HSV1);title('reconstructed HSV image');rgbimg=hsv2rgb(HSV1);figure,imshow(rgbimg);%imhist(rgbimg);
title('reconstructed rgb image');grayimg=rgb2gray(rgbimg);figure,imshow(grayimg);%imhist(grayimg);
%perfotming otsu
level = graythresh(grayimg);BW = im2bw(grayimg,level);imshow(BW);
MATLAB: Hello i need clearer circle after performing the below code help me plz
Image Processing Toolboxmatlab circletree rings
Related Question
- How to Extract High density pixels in a RGB Image
- How to characterize these cells by area and diameter
- How to count a number of edges counting from canny
- Are movie frames clipped at the figure boundaries when I use the MOVIE function to play a movie in MATLAB
- How would you make a contour plot of a 3 column matrix
Best Answer