InsertText creates black image without annotating

1 view (last 30 days)
I have a cropped grayscale image i wish to annotate using InsertText. its a 479x746 double.
frame_sec = sprintf('%s%03i%s%i', 'Frame: ', n , ' Time: ', floor(n*(1/FPS))); %add annotation to picture
difference = insertText(difference , [0, 0], frame_sec,'AnchorPoint','LeftTop'); %add frame and time annotation
imshow(difference,[])
The structure is changed to 479x746x3 double and calling imshow gives me a black image. I tried rbg2gray and rgb2ind without success.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!