特定の範囲における二値化についてです
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
画像の二値化においてimbinarizeを使っています。
特定の範囲をimbinarizeで二値化し、 それ以外の範囲は二値化せず白くしたいです。
何か方法はあるでしょうか?
1 commentaire
Naoya
le 27 Jan 2021
特定の領域は画像の関心領域のみに2値化を適用となりましたでしょうか?
関心領域のみ特定の処理を行う機能として roifilt2が利用できます。
以下のようなフローはいかがでしょうか?
% 画像読み込み
>> I = imread('cameraman.tif');
% 関心領域をマウスを使ってインタラクティブに多角形で選択
>> mask = roipoly(I);
% roifilt2を使って関心領域のみに2値化
J = roifilt2(I, mask, @(I) imbinarize(I,0.5));
% 結果の表示
imshow(J)
Réponses (0)
Voir également
Catégories
En savoir plus sur イメージ タイプの変換 dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!