Troubleshooting a black preview screen with video input

4 views (last 30 days)

I'm attempting to record video from a camcorder via a Blackmagic DeckLink capture card. Blackmagic provides a WDM driver, so both inputs of the device (and all supported resolutions) are recognized when using 'imaqtool'. However, previews of the video stream, as well as snapshots captured by 'getsnapshot', are completely black.

I read a question that suggested the issue could be related to the bit-depth of the camcorder I'm using (e.g., that matlab is expecting 8- or 16-bit input, whereas the camera is supplying 12-bit data). Unfortunately, I can't find any information about the bit depth of my camcorder. It's a Bell and Howell DNV6HD. Also, the video feed works fine with Blackmagic's provided software, so the actual capture card is working as it should.

Any troubleshooting tips would be greatly appreciated, thanks!

Answers (1)

Div Tiwari
Div Tiwari on 8 Aug 2016
Unfortunately, there is no way to find the actual bit-depth of a camera other than looking in its datasheet. A workaround to approximate it in MATLAB would be to have a very bright white surface in front of the camera (to saturate the image) and then to look at the maximum value returned by 'getsnapshot' or 'getdata'. If this is somewhere between 2048 and 4096, the camera likely returns 12-bit data.
If MATLAB is expecting the input to be scaled to 16 bits, multiplying the image data matrix by a factor of 16 (since 2^(16-12) = 2^4 = 16) would give the corrected image.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!