MATLAB: Colormap/caxis edit roipoly

caxiscolormapImage Processing Toolboxroipoly

I would really appreciate help on this one,
Using roipoly to isolate data but when the function displays the initial image I want to draw on, the scaling is all wrong and it just shows a black image.
Applying colormap or caxis on figure editor shows the scaling is wrong but the below code does nothing. How can I set caxis on roipoly figure?
e.g.
BW = roipoly(img)
colormap hot
caxis([0 1000])
Many thanks, Will

Best Answer

Don't pass in img - I never do. Just set up the image in advance as far as how you want it to look.
imshow(img, []);
colormap(hot(256));
colorbar;
mask = roipoly;
Related Question