how to perform closing by reconstruction followed by opening by reconstruction

4 ビュー (過去 30 日間)
Sukuchha
Sukuchha 2012 年 2 月 9 日
編集済み: John Kelly 2014 年 8 月 22 日
In image processing demo(watershed segmentation) following codes were used for opening by reconstruction follwed by closing by reconstruction
Ie = imerode(I, se);
Iobr = imreconstruct(Ie, I);
figure, imshow(Iobr), title('Opening-by-reconstruction (Iobr)')
Iobrd = imdilate(Iobr, se);
Iobrcbr = imreconstruct(imcomplement(Iobrd), imcomplement(Iobr));
Iobrcbr = imcomplement(Iobrcbr);
figure, imshow(Iobrcbr), title('Opening-closing by reconstruction (Iobrcbr)')
For closing by reconstruction followed by opening by reconstruction can i follow the same sequence but interchanging imerode and imdilate positioning in above code ? ;

採用された回答

Jeff E
Jeff E 2012 年 2 月 9 日
編集済み: John Kelly 2014 年 8 月 22 日
No, you cannot. Notice the multiple imcomplement calls after the imdilate step. These are necessary in the closing by reconstruction to make the mask and marker image fit the required inputs of imreconstruct. These imcomplement calls are not necessary for the opening by reconstruction.
In order to reverse the operations, you would need to take lines 4 through 6 in the code you pasted, and put them above lines 1 through 3, AND rename the variables accordingly.
  1 件のコメント
Sukuchha
Sukuchha 2012 年 2 月 10 日
Thanks Jeff for your input! the link you provided helped me a lot !

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by