I have an image that named ‘binary3.tiff’.

I am asked:
“In the following function (is called func) the images are given as matrices of doubles. In those images 1 represents the object and 0 (black) represents the background.”
what should the input be?
I tried:
img = imread('binary3.tiff');
img2 = double(img)/255;
newimg = func(img2);
but it doesn’t work.
please help me.
Without more details about what
funcdoes and the nature of the error you’re getting, I can’t help you much, but you can do this instead:to ensure that the values in the input image are binary, and give it another go. Note that instead of
0you can, of course, put any threshold number below which it is considered “background”.