SDEI-OUEST.FR - 2017-08-29

Hello happy people,

I'm trying to use OpenCV with CODESYS but I can't change the capture size from a USB camera (not using the piCam).
I modified the OpenCV example like this :

// Open camera
Camera_for_OpenCV(xExecute := NOT xDoneCamera, xDone => xDoneCamera);
IF Camera_for_OpenCV.pCapture = 0 THEN
Β  Β RETURN;
END_IF
//*************************************************************
// TRY SMALLER IMAGE : property 3 = WIDTH
CmpOpenCV.cvSetCaptureProperty(Camera_for_OpenCV.pCapture, 3, 320);
//*************************************************************
// Get image from camera.
pImgCam := CmpOpenCV.cvQueryFrame(capture := Camera_for_OpenCV.pCapture);

But it looks like the SetCaptureProperty is simply ignored. When I llok the webvisu it is still in 640x480, and in the program the pImgCam is also 640x480.
Side note : if I try with property 4 : HEIGHT, the codesyscontrol crashes.

I tried the FBD and the ST program, but no luck in either cases.
I even tried to reduce the image display on the visualization, but it didn't work.

Does someone know how to change the capture size from a camera in OpenCV+CODESYS ?