Respuestas (1)

KSSV
KSSV el 1 de Mzo. de 2019
Editada: KSSV el 1 de Mzo. de 2019

0 votos

  1. Read both the images
  2. See to it hat they are of same dimensions, if not get them to same size using imresize.
  3. Get the indices of 0 and 1 from image2. , you may use find for this
  4. With the above indices make the region black in the first image.

2 comentarios

rahul unnikrishnan
rahul unnikrishnan el 1 de Mzo. de 2019
Sir,can you please provide the Matlab code
KSSV
KSSV el 1 de Mzo. de 2019
Editada: KSSV el 1 de Mzo. de 2019
I1 = imread('newimage.png') ;
I2 = imread('newmask1.png') ;
I22 = rgb2gray(I2) ;
[y,x] = find(I2==0) ;
idx = imbinarize(I22) ;
for i = 1:3
T = I1(:,:,1) ;
T(~idx) = 0 ;
I1(:,:,i) = T ;
end
imshow(I1)

Iniciar sesión para comentar.

Categorías

Más información sobre Read, Write, and Modify Image en Centro de ayuda y File Exchange.

Preguntada:

el 1 de Mzo. de 2019

Editada:

el 1 de Mzo. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by