Rank: 1204 based on 76 downloads (last 30 days) and 1 file submitted
photo

Daniel Warren

E-mail
Company/University
University of Oxford

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Daniel
Updated   File Tags Downloads
(last 30 days)
Comments Rating
18 Apr 2013 Screenshot Add Text To Image Overlays rasterized text on an image matrix. Author: Daniel Warren image, text, raster, rasterize, rasterise, rasterisation 76 3
  • 5.0
5.0 | 1 rating
Comments and Ratings by Daniel
Updated File Comments Rating
14 Apr 2013 Add Text To Image Overlays rasterized text on an image matrix. Author: Daniel Warren

@Sav: That's not something I thought about, but how's about this?

Text = 'Test Text';
Position = [100 100];
FontName = 'Arial';
FontSize = 32;
Color = [1 1 0];
Border = 1; % thickness in pixels

Mask = AddTextToImage(false(size(Image(:,:,1))),Text,Position,1,FontName,FontSize);
Outline = logical(imdilate(Mask,ones(1+2*Border,1+2*Border))-Mask);
TextOnImage = AddTextToImage(Image,Text,Position,Color,FontName,FontSize);

for i = 1:3
tmp = TextOnImage(:,:,i);
tmp(Outline) = 0;
TextOnImage(:,:,i) = tmp;
end

Comments and Ratings on Daniel's Files View all
Updated File Comment by Comments Rating
17 Apr 2013 Add Text To Image Overlays rasterized text on an image matrix. Author: Daniel Warren Treeby, B

Nice function, exactly what I was looking for! I had to add a drawnow after the call to text in BitmapFont.m to prevent the same letter being captured several times by getFrame. It would also be nice to remove the reliance on the padarray function and the image processing toolbox.

14 Apr 2013 Add Text To Image Overlays rasterized text on an image matrix. Author: Daniel Warren Warren, Daniel

@Sav: That's not something I thought about, but how's about this?

Text = 'Test Text';
Position = [100 100];
FontName = 'Arial';
FontSize = 32;
Color = [1 1 0];
Border = 1; % thickness in pixels

Mask = AddTextToImage(false(size(Image(:,:,1))),Text,Position,1,FontName,FontSize);
Outline = logical(imdilate(Mask,ones(1+2*Border,1+2*Border))-Mask);
TextOnImage = AddTextToImage(Image,Text,Position,Color,FontName,FontSize);

for i = 1:3
tmp = TextOnImage(:,:,i);
tmp(Outline) = 0;
TextOnImage(:,:,i) = tmp;
end

12 Apr 2013 Add Text To Image Overlays rasterized text on an image matrix. Author: Daniel Warren Deb, Sav

Is it possible with this script to create an outlined text?

Top Tags Applied by Daniel
bitmap font, bitmap text, bitmapped font, bitmapped text, image
Files Tagged by Daniel
Updated   File Tags Downloads
(last 30 days)
Comments Rating
18 Apr 2013 Screenshot Add Text To Image Overlays rasterized text on an image matrix. Author: Daniel Warren image, text, raster, rasterize, rasterise, rasterisation 76 3
  • 5.0
5.0 | 1 rating

Contact us