I am attempting to configure downsampling for the MC023CG-SY-UB Ximea camera. When I invoke the following setters in the python API:
cam.set_imgdataformat('XI_RGB24');
cam.set_gain(20);
cam.disable_aeag();
cam.enable_auto_wb();
cam.set_exposure(7000);
cam.set_downsampling('XI_DWN_2x2');
I get this error:
xiAPI: XiApiToGentlParamModel::SetDownsampling ERROR setting value 2
xiAPI: xiAPI error: Expected XI_OK in:../API/xiFAPI/interfaces/02_mid/xifapi_Handlers_Setters.gen.h SetParam/Line:55
xiAPI: xiSetParam - error: setting parameter downsampling
Traceback (most recent call last):
File "show_ximea_position.py", line 21, in <module>
cam.set_downsampling('XI_DWN_2x2');
File "/usr/local/lib/python2.7/site-packages/ximea/xiapi.py", line 611, in set_downsampling
self.set_param('downsampling', downsampling)
File "/usr/local/lib/python2.7/site-packages/ximea/xiapi.py", line 389, in set_param
raise Xi_error(stat)
ximea.xiapi.Xi_error: ERROR 12: Not supported
I tried every XI_DWN_NxN sampling method from 2x2->16x16 mentioned in the documentation, and all yield the same error ( Not supported ). If I use XI_DWN_1x1, the configuration is functional, but the image resolution is way too high.
What functions should I invoke to reduce the resolution of the camera? I know that I can do something like:
cam.set_width
cam.set_height
but that crops the image, and does not alter the resolution.