When I run the matlab code with my .jpg image nothing happens. I tried "imshow(mask)" but I only get a white image. What am I doing wrong ? Is there something to add to the code to get an image output with the result of the segmentation on my image ?
This function provides approx. 10x speed up on a windows machine as compared to imwrite(..'append') loop. But, on mac (I presume also on Unix) the call to fileattrib (fileattrib(tempfile, '+h +w', '', 's');) throws an exception. saveastiff catches this exception and deletes the temp file without saying anything.
The exception occurs because +h (hidden) attribute is not valid on mac. Removing +h and -h from the calls to fileattrib fixes the problem.