The insertion of text can be done on an image by specifying color and location.The input image I, can be a 2-D grayscale image or a truecolor RGB image. The textInserter returns a text inserter object which draws text on image. The step function is used to draw the specified text onto input image
textColor = [255, 255, 255];
textLocation = [100 315];
a=imread('data1.jpg');
textInserter = vision.TextInserter('Swarupa','Color', textColor, 'FontSize', 24, 'Location', textLocation);
J = step(textInserter, a);
imshow(J);
textColor = [255, 255, 255];
textLocation = [100 315];
a=imread('data1.jpg');
textInserter = vision.TextInserter('Swarupa','Color', textColor, 'FontSize', 24, 'Location', textLocation);
J = step(textInserter, a);
imshow(J);
No comments:
Post a Comment