필터 지우기
필터 지우기

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