MATLAB: How to convert the binarized image to the original gray image

binarized image to original image with gray valueconverted to gray imageImage Processing Toolbox

Dear all, Hello good morning,
Could you please share your experience how to convert the binarized image to the original image with gray vlaues? THank all.

Best Answer

You probably want
maskedImage = binaryImage .* originalImage;