Is it possible to apply imdilate and imerode to a signal and not an image?

1 ビュー (過去 30 日間)
The question is exactly the topic name. I want to apply morphological gradient to a current signal, so I would like to know if it is possible to apply imdilate and imerode to this signal, or is it necessary to create another function for this?
The signal is a 15385x1 vector.

採用された回答

Image Analyst
Image Analyst 2022 年 2 月 25 日
Yes it is. Most, but not all, of the Image processing Toolbox functions can operate on a 1-D image/signal.
For a 1-D vector, you can also use movmax() instead of imdilate(), and movmin() instead of imerode().
  1 件のコメント
Luccas S.
Luccas S. 2022 年 2 月 25 日
Okay, thank you!

サインインしてコメントする。

その他の回答 (1 件)

Benjamin Thompson
Benjamin Thompson 2022 年 2 月 25 日
Yes, it is. As shown here, the flag structuring element adds a value of one on each side of the pulse in this test:
>> se1 = strel('line',3,0);
>> figure, plot(imdilate([0 0 0 1 1 0 0 0 0], se1))
  1 件のコメント
Luccas S.
Luccas S. 2022 年 2 月 25 日
Thanks, for the example!

サインインしてコメントする。

カテゴリ

Find more on Video Formats and Interfaces in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by