I'm trying to adjust the VideoResolution parameter for image acquisition. The normal way to do that is as follows:
info = imaqhwinfo('winvideo');
obj = videoinput('winvideo',1, 'RGB24_640x480');
However, since I'm not using a standard webcam, but an industrial camera, my "supported formats" looks like this:
info = imaqhwinfo('gige');
'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 :)