NI VideoMASTER and NI AudioMASTER

cancel
Showing results for 
Search instead for 
Did you mean: 

Capture Frame with PXIe-1491 and videoMaster

I'm trying to capture a frame programmatically using the videoMaster API and the PXIe-1491 video analyzer.  I'm having no luck, I don't receive any errors when I run this code and the file shows up as a 4 KB file that can't be opened.

 

Below is a screenshot of the block diagram and the front panel after I have ran it.  I have also attached the vi.  I would appreciate any help on this.

 

Block Diagram

 

Front Panel

0 Kudos
Message 1 of 21
(14,811 Views)

Hey Daniel,

 

I have been looking at the VI that you attached. I noticed that you used the NI VMS VBF to image file VI. Here is a screenshot of the help file for this function. 

 

VBF.PNG

 

As the help file explains, the format of the image file is going to be defined by the extension of the file path that you specify. You can also save this file as a JPG or PNG format by changing the file extension. 

 

Does this help answer your question? Additionally, I also found this community example online that shows how to acquire a HDMI signal using VMS in LabVIEW. I am not sure what your overall application is, but this example might point you in the right direction.  https://decibel.ni.com/content/docs/DOC-28699

 

 

0 Kudos
Message 2 of 21
(14,801 Views)

I saw the help file which is why I gave the destination file a ".bmp" extenstion as seen in the block diagram vi image that I posted previously.  

 

All I'm trying to do is grab a frame of the video coming in and then save it to a file.  I have looked at your example I will see what I can do with it although right now I'm already seeing a problem in that it uses a composite signal instead of an HDMI signal, not sure if the example will help but I will give it a try.

 

 

0 Kudos
Message 3 of 21
(14,796 Views)

Hi Daniel,

 

Let me know whether or not you have any luck with this example. 

 

I also had some additional questions about your VI, so that I can try to help point you in the right direction. What format are you attempting to save the captured frames as? I think it would be helpful to know a little more about the overall goal of this VI. 

0 Kudos
Message 4 of 21
(14,788 Views)
I'm simply trying to grab a single frame from an HDMI video source and then save it to a file as a BMP file.
0 Kudos
Message 5 of 21
(14,786 Views)

Hey Daniel,

 

I tried running your code, and it worked for me. I was able to capture a frame from an HDMI signal and save it as a BMP file. From this, we at least know there is nothing wrong with the code you provided. 

 

I would make sure that the file path that you have specified is correct, and that you have a program installed that allows you to view BMP files. For my setup, I created a BMP file and saved it to my desktop before running the VI. 

 

 

0 Kudos
Message 6 of 21
(14,780 Views)
Yeah it saves the file but i can't open it. Did you open the file and actually see a picture?
0 Kudos
Message 7 of 21
(14,778 Views)

Yeah, I did! I opened it in Windows Photo Viewer. 

0 Kudos
Message 8 of 21
(14,776 Views)
Interesting... Did you use a pxie1491? I'm wondering if it is my hardware setup.
0 Kudos
Message 9 of 21
(14,773 Views)

No, I didn't have a 1491 available, so I used the old setup with a 6545 HSDIO card and a 2175. I don't think it should matter though, as long as you are able to acquire your signal. 

0 Kudos
Message 10 of 21
(14,771 Views)