How can I linearly index a masked image

95 Views Asked by At

I have an image which i applied a mask to

Input_image = double(imread('re1.jpg')); % original image
mask = double(imread(/block_text.bmp')); % text mask
mask = mask ./ max(mask(:));        
X = Input_image.*mask;           % partially observed image. (matrix with missing elements)

This code gives this image

enter image description here

EDIT: what i mean is that i have the code below and i want to modify to use images in the code above instead of random data. i.e matrix M becomes my image X. but what i dont know is how to get omega in my case.

m=400, n=500; 
M =  rand(m,r) * rand(r,n); % randomly generated matrix
I = randi([0 1],m,n);
Omega = find(I);
A = M(Omega);
0

There are 0 best solutions below