Having trouble with the image aq
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi
So i just got the image Aq toolbox and I'm trying to following a bit of example code on the math works site
Im working on the second part of the example and i don't understand the following
imageData = getdata(vidobj, 30);
So i used the help menu and i gather this function is setting the variable imageData to a 3d array containing frame #30 from my video object.
ok fine that makes sense
to display the frame to see it, it tells me to use this bit of code. If i have already assigned the imageData variable to frame 30 what is the 30 at the end of the function do. If i change it, it appears to change the frame but how is that possible?
Im using the FaceTime camera built into my macbook air. Ive also notices that my frames are very dark and distorted even in a brightly lit room.
Can someone help me understand this line and possibly why my images are all dark and grainy? When i do a preview the images have proper resolution and are full of color like you would expect Thanks
imagesc(imageData(:,:,:,30))
0 comentarios
Respuestas (2)
Walter Roberson
el 15 de Feb. de 2016
imageData = getdata(vidobj, 30); is going to return the first 30 logged frames remaining in the buffer, not the 30'th logged frame. The result is going to be height by width by number of channels by 30.
If you are getting RGB images then you should use
image(imageData(:,:,:,30))
instead of imagesc()
1 comentario
Ver también
Categorías
Más información sobre Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface) en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!