Pixelink getsnapshot() producing black image

So I'm interfacing a pixelink camera with Matlab and attempting to get some kind of image data from the camera, but any image taken after a trigger is completely black. Using the getsnapshot() function also produces a black image. Strangely enough, previewing the camera video input allows me to view a normal video stream.
I suspect the issue has to do with the exposure time, though I'm unable to raise it past 2 milliseconds due to preset constraints.
vid = videoinput('pixelinkimaq', 1, 'BAYER16_2208x3000');
src = getselectedsource(vid);
>>propinfo(src, 'Exposure')
Type: 'double'
Constraint: 'bounded'
ConstraintValue: [8.4225e-05 2]
DefaultValue: 0.1000
ReadOnly: 'never'
DeviceSpecific: 1
Accessible: 1
I'm not sure how to change these settings or if I can do so in Matlab. Any ideas what else might be causing strictly black images being produced? Some more info is listed below.
Display Summary for Video Source Object:
General Settings:
Parent = [1x1 videoinput]
Selected = on
SourceName = input1
Tag = [0x0 string]
Type = videosource
Device Specific Properties:
CameraName = PixeLINK PL-B782U
CameraSerialNumber = 782000936
ColorTemperature = 3200
ColorTemperatureMode = off
Exposure = 0.06944
ExposureMode = auto
FlipHorizontal = off
FlipVertical = off
Gain = 0.00
Gamma = 2.2
GammaMode = off
Gpo1Enabled = off
Gpo1Mode = strobe
Gpo1Parameter1 = 0
Gpo1Parameter2 = 1e-05
Gpo1Parameter3 = 0
Gpo1Polarity = positive
Gpo2Enabled = off
Gpo2Mode = strobe
Gpo2Parameter1 = 0
Gpo2Parameter2 = 1e-05
Gpo2Parameter3 = 0
Gpo2Polarity = positive
Gpo3Enabled = off
Gpo3Mode = strobe
Gpo3Parameter1 = 0
Gpo3Parameter2 = 1e-05
Gpo3Parameter3 = 0
Gpo3Polarity = positive
Gpo4Enabled = off
Gpo4Mode = strobe
Gpo4Parameter1 = 0
Gpo4Parameter2 = 1e-05
Gpo4Parameter3 = 0
Gpo4Polarity = positive
PixelAddressingMode = decimate
PixelAddressingValue = 1
Saturation = 100
TriggerDelay = 0
TriggerParameter = 0
WhiteBalanceGainBlue = 1.6
WhiteBalanceGainGreen = 1.1
WhiteBalanceGainRed = 1
WhiteBalanceMode = manual

Answers (1)

I'm working with a PixeLINK PL-D722CU-T 722000034, and I ran into a similar issue.
Responding to your question, to adjust the exposure, use the following:
vid = videoinput('pixelinkimaq', 1,'BAYER16_1920x1200');
src = getselectedsource(vid);
src.Exposure = 0.07;%time in seconds
But having the same issue as you, what really helped me with that was changing the image format to Bayer8.
vid = videoinput('pixelinkimaq', 1,'BAYER8_1920x1200')

1 Comment

I almost forgot, that exposure works for me because I manually set the camera's aperture to its maximum

Sign in to comment.

Asked:

on 8 Feb 2019

Commented:

on 25 Jan 2024

Community Treasure Hunt

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

Start Hunting!