bwperim is not the only way to create outlines. It would be nice if imoverlay were smart enough to see if the input was a binary image, or a cell array that is the output of bwboundaries. A lot of times we threshold and then call bwboundaries. It would be a nice enhancement if it could take the output of bwboundaries as the location of the outlines to draw.
Andrew, you'll have to either pad or resize one of the images to match the other size to overlay them using this function. You could also consider using MATLAB graphics transparency features to overlay one image on another.
This is an excellent bit of code. It worked perfectly fine in my case.
03 Aug 2008
that's an excellent piece of code.
11 Mar 2008
Carlos Adrián Vargas Aguilera
Great tool. Now I can paint NaN's in black on imagesc.
01 Dec 2007
Great tool work very well for what a needed to do.
03 Sep 2007
Matt - I added a note and an example to the documentation based on your suggestion. Thanks!
31 Aug 2007
great and loved it
14 Aug 2007
18 Jul 2007
Simple, useful and well styled and coded. Did something in my existing code similar but this is a bit faster and less memory. Steve, you might want to note in the documentation that if you have a double input outside the range of 0-1 (soemthing you typically use imagesc to display) that you would want to run mat2gray on it before passing to this function. A useful further enhancement would be either to auto detect and apply this or have an optional switch.
14 Jun 2007
Works great. Saves me a few lines of code! :) Thanks.
28 Apr 2007
I think it works great. Thnx
11 Oct 2006
I would like to overlay a picture which is not bw.
10 Oct 2006
??? Subscript indices must either be real positive integers or logicals.
Error in ==> imoverlay at 54
out_red(mask) = color_uint8(1);
17 Apr 2012
Based on a suggestion from Lasse, I added code to automatically convert the mask input to be logical.