フィルターのクリア

how to convert ROI into zero values.

1 回表示 (過去 30 日間)
Piyum Rangana
Piyum Rangana 2017 年 2 月 21 日
回答済み: Image Analyst 2017 年 4 月 1 日
I have colored image with a damaged region(ROI). I want to convert the pixel values of damaged area into zero values. AN example output needs to be like the attached one below What is the process should i follow ?
  1 件のコメント
Peter O
Peter O 2017 年 2 月 21 日
How is your ROI defined and what is the structure of your image data? If the image is a grayscale matrix, it should be as straightforward as identifying the indices of the ROI, then
A(idces) = 0
If your ROI is a rectangle of the form [x0 y0 w h] you could use the meshgrid command to get the coordinates and, optionally, convert them to the single-index form I used above. (You could also use A(X,Y) = 0)

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

回答 (1 件)

Image Analyst
Image Analyst 2017 年 4 月 1 日
Use regionfill().

Community Treasure Hunt

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

Start Hunting!

Translated by