I am looking for the way to display the video on graph!

3 views (last 30 days)
Hi,I'm Japanese highschool student, and I am reserching the way to change any videoes on youtube into graph.
Before i startede this study, I watched this video on youtube.
So, in this video, using python and html to change video into graph, however, I want to do it using only MATLAB.
Inthis video, fitst thing that I have to do is that dounload the youtube video and change them images, then, detect the edge. I could do it on MATLAB.
RGB = imread('BAd.jpg'); %画像のファイル名を入れる,file name
imshow(RGB)
I = rgb2gray(RGB); %グレースケールに画像を返還変換 change the image into gray scale
figure
imshow(I) %グレースケールの画像を表示 display the image of above one
[~, threshold] = edge(I, 'sobel');
fudgeFactor = .3; %画像の読み込む深さ depth of read the image
BWs = edge(I,'sobel', threshold * fudgeFactor);
figure, imshow(BWs), title('edge-detected-RIOREUSU'); %適当に名前を付けていいよ
However, I can not change touse images into graph. How do I do that on MATLAB? Please teach me how to do that.

Answers (1)

Aoi Midori
Aoi Midori on 13 Oct 2021
I am not 100% sure what you meant by graph, but I could get a similar result with the code below. The attached file is the output.
I = imread('cell.tif'); % Modified the filename
[~, threshold] = edge(I, 'sobel'); % Original code
fudgeFactor = .3; % Original code
BWs = edge(I,'sobel', threshold * fudgeFactor); % Original code
figure, imshow(BWs), title('edge-detected-RIOREUSU'); % Original code
GR = double(~BWs); % Added line
imagesc(GR) % Added line
colormap Gray % Added line
  3 Comments
恭歓(Yasuyoshi) 増田(Masuda)
Edited: 恭歓(Yasuyoshi) 増田(Masuda) on 14 Oct 2021
Thank you, I tried, but I have 2 more question.
First, I tried your command, but it was not succeed.why did not I success?
I succeed using this code.
-
Second,I failed to change graph into vector data. Is this only allowed to change into pdf?
RGB = imread('ポニョ.jpg'); %画像のファイル名を入れる,file name
imshow(RGB)
I = rgb2gray(RGB); %グレースケールに画像を返還変換 change the image into gray scale
figure
imshow(I) %グレースケールの画像を表示 display the image of above one
[~, threshold] = edge(I, 'sobel');
fudgeFactor = .3; %画像の読み込む深さ depth of read the image
BWs = edge(I,'sobel', threshold * fudgeFactor);
GR = double(~BWs); % Added line
imagesc(GR) % Added line
colormap colorcube % Added line
ax = gca;
exportgraphics(gca,'Ponyo.pdf','ContentType','vector');
I'm sorry for asking so many questions.

Sign in to comment.

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by