- h = drawpolygon で、ROIを取得
- BW = createMask(h, img) で、マスクを作成
- img(~BW) = 0 で画像にマスクを適用
画像の切り取りをMATLABで行いたい
19 views (last 30 days)
Show older comments
Haruki Kimura
on 9 Dec 2019
Answered: Shunichi Kusano
on 9 Dec 2019
matlabで画像を四角とかではなく任意の形に切り取ることは可能ですか?
例としては、画像の背景部分だけを切り取ったり、物の形に沿って切り取ったりです。
よろしくお願いします。
0 Comments
Accepted Answer
Shunichi Kusano
on 9 Dec 2019
こんにちは。
関数で言うとdrawpolygonでできます。処理の流れとしては、
みたいな感じです。細かいところは、各関数のドキュメントをご覧ください。
0 Comments
More Answers (0)
See Also
Categories
Find more on ROI ベース処理 in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!