Effacer les filtres
Effacer les filtres

How to change VideoResolution parameter on Basler Ace camera

3 vues (au cours des 30 derniers jours)
BerendBotje
BerendBotje le 9 Fév 2016
Commenté : Ganwei Yan le 22 Déc 2020
I'm trying to adjust the VideoResolution parameter for image acquisition. The normal way to do that is as follows:
info = imaqhwinfo('winvideo');
info.DeviceInfo.SupportedFormats
obj = videoinput('winvideo',1, 'RGB24_640x480'); % <-- Fill in one of the supported formats here
However, since I'm not using a standard webcam, but an industrial camera, my "supported formats" looks like this:
info = imaqhwinfo('gige');
info.DeviceInfo.SupportedFormats
ans =
'BayerRG12' 'BayerRG8' 'Mono8' 'YUV422Packed' 'YUV422_YUYV_Packed'
As should be obvious, the camera does not have a limit to the supported formats when it comes to video resolution. I can basically set whatever I want. However, MATLAB does not seem to allow me to set the VideoResolution parameter.
vidobj = videoinput('gige', 1, 'BayerRG8');
set(vidobj, 'VideoResolution', [12 1024])
Error using imaqdevice/set (line 71)
Attempt to modify read-only property: 'VideoResolution'.
Use IMAQHELP(OBJ, 'VideoResolution') for information.
I tried to set the only other parameter that affects the video format(ROI), but that only affects the eventual selection within the image, not the image itself.
set(vidobj, 'ROIPosition', [0 0 12 1024])
The camera is basically still sending full frame images and later the software selects part of that image. Since I'm working on a time-critical system (working on 800-1200 Hz), I don't have the time to load the entire image and I really need a way to set the VideoResolution parameter.
I've been trying really hard to find a way to do this, but can't find anything. Any help or suggestions would be greatly appreciated.
Thanks for reading my story :)
  1 commentaire
Ganwei Yan
Ganwei Yan le 22 Déc 2020
I also encounter the same problem. I am using a line camera with a framegrabber from DALSA, the sapera supported for MATLAB did not provide an SupportedFormats so the VideoResolution is limited to the default setting --- 2048x480. However the ROI in sapera software (Sapera CamExpert) can be 2048*2000 or even higher. The limitation of VideoResolution by MATLAB really made my developement inconvinient.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by