필터 지우기
필터 지우기

how can i find dent in structure?

조회 수: 1 (최근 30일)
vijendra sn
vijendra sn 2014년 8월 12일
댓글: vijendra sn 2014년 8월 12일
I = imread('diodo.jpg');
I = rgb2gray(I);
% f=figure,imshow(I); % g=figure,imshow(J);
hy = fspecial('sobel'); hx = hy'; Iy = imfilter(double(I), hy, 'replicate'); Ix = imfilter(double(I), hx, 'replicate');
gradmag = sqrt(Ix.^2 + Iy.^2);
K=figure,imshow(gradmag,[]); set(K, 'visible','on'); filename = 'temp_file.jpg' saveas(K, filename)
i1 = imread(filename) delete(filename)
[x, y, rgb] = ind2sub([size(i1,1) size(i1,2) size(i1,3)], find(i1 ~= 255)); A = i1(min(x):max(x)-1,min(y):max(y)-1,:);
A = rgb2gray(A)
I = edge(A,'sobel')
%934 742 I = imcrop(I,[10 7 914 728]); I = imresize(I, [2000 2500])
f=figure,imshow(I); set(f, 'visible','on');
imwrite(I, filename) bw = imread(filename) delete(filename) bw = im2bw(bw, graythresh(bw)) bw = bwareaopen(bw,65); set(f, 'visible','on'); f, imshow(bw)
But i don't need to find depth of the image just i need to find dent in the image
  댓글 수: 1
vijendra sn
vijendra sn 2014년 8월 12일
i have used this code for dent detection on structure and for images i can find dent but not for all
i have attached image which i cannot find dent (DSC_img0976.jpg)
but i find dent on these images (img18.jpg) pls help on this

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by