Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
インフリーハンドを使用せずに、Matlabの画像で不規則な形状のマスクを自動的に選択するにはどうすればよいですか?画像の背景が黒で、画像全体を黒の背景なしでマスクとして選択したいと思います(黒の背景なしのすべて)。
これを試して:
threshold=0; % or a different value if needed mask=image>threshold;
背景が完全に黒、つまりピクセル値が 0 の場合、しきい値を 0 に設定します。それ以外の場合は、背景をキャプチャする値を選択します (自動的に行う方法があります)。