Example Program Drafts

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquire Blackmagic Intensity Pro 4K Images (HDMI and Analog Video Inputs)

Overview

 

Blackmagic Intensity Pro 4K is a PCIe express board able to acquire and generate NTSC/PAL, HD and UltraHD video.

 

Description

 

Although Blackmagic provide a SDK (IDL based) with good examples, this post aims to exemplify acquire NTSC/PAL and HD images in LabVIEW through IMAQdx and/or DirectShow .NET LabVIEW SDK (thanks GriffinRU for the great job done) to be process in NI Vision Development Module.

 

Hardware and Software Requirements

 

HW:

- HDMI Output (used my laptop HDMI output);

- HDMI2AV converter (to convert laptop HDMI output to NTSC/PAL);

- Blackmagic Intensity Pro 4k.

 

SW:

- LabVIEW 2016;

- Vision Development Module 2016;

- Blackmagic Desktop Video 10.10;

- Blackmagic Desktop Video 10.10 SDK;

- All SW required for the DirectShow .NET LabVIEW SDK.

 

Steps to Implement or Execute Code

 

Either on IMAQdx or DirectShow, Intensity Pro 4K requires to switch the right input as well as configure the right image format, otherwise returns black/blue image.

 

Switch inputs can be done with the "Switch Video and Audio Inputs.vi", that basically send commands to DeviceConfigure.exe (located at [Blackmagic SDK Folder]\Win\Samples\bin) through SystemExec.vi.

OBS: Put DeviceConfigure.exe in the same VI folder or change how the VI refers to it.

Cur_Config.jpgChecking current configuration Set_Conf.jpgChanging to composite video Cur_Config2.jpgChecking configuration again

 

Find the right image format can be in MAX or DecklinkCapture.exe (located at [Blackmagic SDK Folder]\Win\DirectShow\Samples\bin), trying one by one and checking when return a proper image.

"Scan Video Modes.vi", scan and take a snap in every format and populate an array indicator:

Scan_nosignal.PNGHDMI2AV connected but no signal Scan_HDMI.PNGImage format found, index 22

 

IMAQdx:

 

Mapped the image/video format index, set "Video Mode" control in the "Video Mode Grab - Flip Img.vi" example, choose the right camera name (in my case "Blackmagic WDM Capture" appeared as "cam0", can be seen in MAX) and run the VI. Flip the image horizontally if needed.

IMAQ_HDMI.PNGIMAQ HDMI image acquisition IMAQ_NTSC.PNGIMAQ NTSC image acquisition IMAQ_PAL.PNGIMAQ PAL image acquisition

 

DirectShow:

 

Was done few changes in the "DirectShow - Example - Acquire Video plus Sample Grabber.vi" SDK example allowing set video format and copy image to an IMAQ pointer. Same case than IMAQdx example, set the "Video Input Index" and run the VI.

DS_HDMI.PNGDirectShow HDMI image acquisition DS_NTSC.PNGDirectShow NTSC image acquisition DS_PAL.PNGDirectShow PAL image acquisition

Others few changes in "DirectShow - SampleGrabber (Buffer).vi" and "DirectShow - Bitmap to LabVIEW image.vi" were just to optimize it for this example. These 3 VIs are attached and were renamed with MOD at the beginning of the file name.

 

Additional Information or References

 

Files attached in the ZIP:

- MOD_DirectShow - Bitmap to U32.vi

- MOD_DirectShow - Example - Acquire Video plus Sample Grabber.vi

- MOD_DirectShow - SampleGrabber (Buffer).vi

- NEW_DirectShow - Example - List Video Formats.vi

- Scan Video Modes.vi

- Switch Video and Audio Inputs.vi

- Video Mode Grab - Flip Img.vi

 

If "DirectShow Examples.llb" and "DirectShow SDK.llb" are in this same folder, it should be ok to open and run the examples.

Contributors