erosion and dilation in signal processing

조회 수: 6 (최근 30일)
Annapoorani
Annapoorani 2012년 2월 4일
댓글: Image Analyst 2020년 2월 21일
we need codes for erosion and dilation in signal processing...as imdilate and imerode functions can only be used in image processing..

채택된 답변

Image Analyst
Image Analyst 2012년 2월 4일
They can be used for 1D signals, if you have the Image Processing Toolbox. Do you have that toolbox? If not, you might play around with this approach:
windowSize = 3;
originalSignal = rand(10,1)
hank = hankel(originalSignal)
h3 = hank(:,1:windowSize)
dilatedSignal = max(h3, [], 2)
  댓글 수: 9
John Cristion
John Cristion 2020년 2월 20일
Kernel may need to be transposed
Image Analyst
Image Analyst 2020년 2월 21일
You can still view the dilated image even though you get a warning that says it will shrink it down to fit onto the screen. You can safely ignore that warning. It's not serious. If you want to see it pixel for pixel, use the zoom tool to zoom in.

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

추가 답변 (1개)

shelley
shelley 2014년 8월 22일
Yes, it is doable. It is better to binarize the signal first, and then use the command like
sel=strel('line',120,90);
%the length 120 depends on how big the gap you want to close/seal.
%the degree 90 or 0 depends on your 1D signal is in vector or row format;
results=imdilate(1Dsig,sel);

태그

Community Treasure Hunt

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

Start Hunting!

Translated by