MATLAB: How to change colour (black to white) in binary image

binary imagecolourconvert coloursimageImage Processing Toolboxsegmentation

Dear all,
I have this binary image:
I would like to convert the colours black into white and white into black. Is it possible? I also attach this binary image. Thank you for your answers.

Best Answer

yourbwimage = ~yourbwimage
Simple as that, or
yourbwimage = logical(1 - yourbwimage)