LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

help with matlab images

hi everybody

 I needed help with converting matlab image.. i have the 3D image from matlab and I wanted to extract the R,G, and B matrices. I used the following code

vid=videoinput('winvideo',1',RGB24_640x480')
image=getsnapshot(vid);
red=image(:,:,1);
green=image(:,:,2);
blue=image(:,:,3);


I added three output to the matlab script called red, blue, and green and changed the data type to real matrix. However, when I run the vi (with the highlight execution on) it shows that the value tranferred to the indicators was zero. is there something i need to be doing for this to be working?? I have never used matlab with Labview before.. please help .... ty

rani...
0 Kudos
Message 1 of 3
(2,134 Views)

Hi Rani,

I've never tried retrieving video from Matlab so I'm afraid I don't have much advice to offer. A couple of questions do come to mind though. First, are you getting an error from the script node along with all the 0's? Second, have you tried changing the datatypes of the outputs?

Cheers,
Chris J

0 Kudos
Message 2 of 3
(2,109 Views)
Hi Chris
 
Thank you. But i got it working now.. I was using the student version and realized that matlab script doesn't exactly work with student version when I played with the error handler. Right I am using Academic version (I believe ) and its working... Thank you though
 
 
rani
0 Kudos
Message 3 of 3
(2,101 Views)