How to save a text annotation on an image photo

조회 수: 25 (최근 30일)
Stephen Devlin
Stephen Devlin 2018년 6월 28일
편집: Guillaume 2018년 6월 28일
Hi, I have an image, I crop it, add some text to the photo, then I want to save that photo into a cell
imshow(CroppedImage)
text(10,10,text_for_pic,'Color','y')
I have this running within a loop of a large set of images and then concatenate the images (stitching)
AA=ImageCell{:};
ImageCell = cat(2,ImageCell{:}) ;
Any ideas for how I can save the croppedImage with the text on without using Computer Vision Toolbox?

답변 (1개)

Guillaume
Guillaume 2018년 6월 28일
If you have the Computer Vision Toolbox, you can insert your text into the image with InsertText otherwise you have to convert the displayed figure into an image which is a right pain and usually result in an image of a different size than you started with.
  댓글 수: 2
Stephen Devlin
Stephen Devlin 2018년 6월 28일
Hi, Yes I can't justify the purchase of that toolbox, shame as it would just be one line of code. At the moment I've saved each cropped image and then will have to record the whitespace off them.
Guillaume
Guillaume 2018년 6월 28일
편집: Guillaume 2018년 6월 28일
Then you're stuck with getframe or print and all the issues that come with them. I don't use them so can't help. There may be a utility on the file exchange that would help.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by