Hello, I have a final project for video processing, but i am stuck. I only could make the video work, and got snapshots, and i am not really sure that works.
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
raed bou aram
el 16 de Jun. de 2015
Comentada: Image Analyst
el 13 de Jul. de 2015
The idea is, while the video is on, each 5 frames will take a picture or snapshot and then identify if match with any letter. In sum, is a hand language translator in video streaming. I can realize how to create a data base for the images, i want to use edge detection to this comparing process. I want to know how to save images (like a database) and then when a image that is on the video is equal to one of the data base it will tell which character i am calling. Thanks a lot.
this is what i got (I know that is not much but, i don't have experience with video streaming processing):
vid= videoinput('winvideo',1,'MJPG_1280x720');
set(vid,'FramesPerTrigger',inf);
set(vid,'ReturnedColorSpace','grayscale');
vid.FrameGrabinterval=5;
start(vid);
while(vid.framesAcquired<=100)
data=getsnapshot(vid);
dif_im2=im2bw(data, graythresh(data));
dif_im=edge(dif_im2);
0 comentarios
Respuesta aceptada
Image Analyst
el 22 de Jun. de 2015
I haven't used it (I always use getsnapshot()), but have you looked at getdata(vid, 5) to get 5 frames out of the video stream?
6 comentarios
Image Analyst
el 13 de Jul. de 2015
OK, so you want to cut the object (hand) into 4 quadrants, not the image. So you need to find the centroid (like I gave before):
labeledImage = bwlabel(binaryImage);
blobMeasurements = regionprops(labeledImage, 'Centroid');
blobCentroid = blobMeasurements(1).Centroid;
Then you need to round it to the nearest row or column because indexes have to be integers. Then you need to use that in your 4 indexing operations:
middleRow = round(blobCentroid(2) / 2);
middleColumn = round(blobCentroid(1) / 2);
upperLeft = binaryImage(1:middleRow, 1:middleColumn);
lowerLeft = binaryImage(middleRow+1:end, 1:middleColumn);
upperRight = binaryImage(1:middleRow, middleColumn+1:end);
lowerRight = binaryImage(middleRow+1:end, middleColumn+1:end);
Más respuestas (1)
Ver también
Categorías
Más información sobre National Instruments Frame Grabbers en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!