MATLAB: Showing Alert of empty axes box.

axesImage Processing Toolbox

When the Axes Box does not contain any image and user clicks on the Push button then an error should popup saying "Please upload an image" or something else, how to do that how check whether the axes box is empty or not?

Best Answer

Set the 'enable' property of the Extract button to 'off' at the start of the program. When the user has uploaded or captured an image, set the enable property to 'on'. That way it is not possible for the Extract button to be clicked when there is no image to extract from.
Related Question