フィルターのクリア

How to add text to a video in matlab?

28 ビュー (過去 30 日間)
Anand
Anand 2014 年 4 月 23 日
コメント済み: Image Analyst 2020 年 5 月 17 日
hi, can someone help me on how to add text to a video that is running on matlab, my teacher told me its very simple and just 1 or 2 lines of code. i think you have to use the insertText function but im not sure how to do it. basically all i want to do is to write some text in certain frames of the video. it would be outputted in the subplot below. can someone please help me on this problem.
subplot(2, 2, 3);
imshow(Background);
title('Detecting Expression...', 'FontSize', fontSize)
thankyou
  3 件のコメント
khoa dang
khoa dang 2020 年 5 月 17 日
編集済み: khoa dang 2020 年 5 月 17 日
How to write a program to create flowing text in a video (karaoke). Can someone help me ?
Image Analyst
Image Analyst 2020 年 5 月 17 日
If you have the Computer Vision Toolbox...
RGB = insertText(I,position,text) returns a truecolor image with text inserted. The input image, I, can be either a truecolor or grayscale image.

サインインしてコメントする。

回答 (2 件)

Sara
Sara 2014 年 4 月 24 日
Use
text
for the frame of interest
  2 件のコメント
Anand
Anand 2014 年 4 月 24 日
hi, can you show me how to use this function? i want it to include it in the code below. thank you
subplot(2, 2, 3);
imshow(Background);
title('Detecting Expression...', 'FontSize', fontSize)
Sara
Sara 2014 年 4 月 24 日
have you tried "help text" at least??
text(X,Y,'string')
where x,y are the coordinates where you want the text.

サインインしてコメントする。


Image Analyst
Image Analyst 2014 年 4 月 24 日
With text(), the text shows up in the overlay above the image. I believe the insertText function of the Computer Vision System Toolbox "burns it into" the image, though I don't use that function. I use text() to display text over a live video all the time. Not sure what your problem is. imshow() dispalys a still image while preview() shows a live video from a video camera. How are you displaying your video?
  2 件のコメント
Anand
Anand 2014 年 4 月 25 日
I have managed to display the text on the video using the text() function... now all i want it to do is to display on certain frames for a few seconds...do you know how to do this?
Title_={'Smile'};
imshow(Background); text(40,100,Title_{1},'Color','r','FontWeight','Bold','FontSize',40);
Image Analyst
Image Analyst 2014 年 4 月 25 日
Get the handle to the text when you display it, then delete it when you want it to disappear.
hText = text(x,y,str); % Create it.
delete(htext); % Delete it.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeComputer Vision with Simulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by