Matlab - obtener grafica de un video

 
Vista:

obtener grafica de un video

Publicado por fernando (3 intervenciones) el 07/03/2013 00:57:27
Buenas tardes el problema que tengo es, que quiero inciar la camara pero que en un figure me de la grafica del video en tiempo real, he encontrado muy poco de esto y solo tengo este codigo

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
vid = videoinput('winvideo',2,'RGB24_640x480');
% only capture one frame per trigger, we are not recording a video
vid.FramesPerTrigger = 2;
% output would image in RGB color space 
vid.ReturnedColorspace = 'rgb';
% tell matlab to start the webcam on user request, not automatically
triggerconfig(vid, 'manual');
% we need this to know the image height and width
vidRes = get(vid, 'VideoResolution');
% image width
imWidth = vidRes(1);
% image height
imHeight = vidRes(2);
% number of bands of our image (should be 3 because it's RGB)
nBands = get(vid, 'NumberOfBands');
% create an empty image container and show it on axPreview
%hImage = image(zeros(imHeight, imWidth, nBands), 'parent');
% begin the webcam axPreview
preview(vid);
obj = GetData(vid,1,'unit8');
values=mean(obj(:));
plot(values)
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de JOSE JEREMIAS CABALLERO
Val: 6.975
Oro
Ha mantenido su posición en Matlab (en relación al último mes)
Gráfica de Matlab

obtener grafica de un video

Publicado por JOSE JEREMIAS CABALLERO (5917 intervenciones) el 07/03/2013 16:05:45
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
clear all
close all
vid=videoinput('winvideo',2,'RGB24_640x480');
preview(vid);
start(vid);
data=getdata(vid,1,'uint8');
values=mean(data(:));
figure(2)
imaqmontage(data);
figure(3)
plot(values,'*')
delete(vid);
 
clear all
vid=videoinput('winvideo',2,'RGB24_640x480');
preview(vid);
start(vid);
data=getdata(vid);
values=mean(data(:));
figure(4)
imaqmontage(data);
figure(5)
plot(values,'*')
delete(vid);
 
 
EJECUCION
>>camaraweb6


Saludos.
JOSE JEREMÍAS CABALLERO
Asesorías en Matlab
programador en matlab
Servicios de programación matlab
[email protected]

http://matlabcaballero.blogspot.com

http://www.lawebdelprogramador.com/foros/Matlab/1371532-FORMA_DE_APRENDER_MATLAB.html
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar