A "mask" is binary in Matlab. It is the mask only! If you want to get the pixel values inside the mask, you either multiply the mask with the image matrix (size remians the same) or use the mask for indexing (result is the masked rectangle only).
Please post your code and explain, what you want to achieve.
Best Answer