Nice work ! I used this function as an alternative to bwlabel. The only required modification in my code was to take into account the syntax difference : label puts 0 binary values into a connected object. As per the author's 'Important remark', zeros should be replaced by NaNs in this use case.
Great! needs a few more options though.
1. Specify font size of axes, legend, etc.
2. When there are multiple axes in a given Matlab figure, the axes are not spaced properly in latex.
3. Option to include extra code inside the tikzpicture environment.