cam2ip icon indicating copy to clipboard operation
cam2ip copied to clipboard

ERROR: SampleCB() - buffer sizes do not match

Open misov1 opened this issue 2 years ago • 1 comments

Hello. First of all, I inform you that I am writing this article through a translator. Please excuse me.

A few days ago, I was using a program that was released as cam2ip-1.6-64bit-cv2.zip, but there was a power outage once due to an accident, and after that, the console displays an ERROR: SampleCB() - buffer sizes do not match error, and it is not running normally.

To solve this problem, I have downgraded to 1.5 version, no cv2 version, and run to 32bit version, but no progress has been made.

The main command to use is cam2ip.exe -width 640 -height 360, and using cam2ip without any further syntax did not run normally. and i'm using Windows 10 image

misov1 avatar Jan 07 '23 02:01 misov1

Hello, as I understand you, it used to work then stopped after a power outage, right? This might help you, from here https://opencv.yahoogroups.narkive.com/Yc8H2P6w/error-samplecb-buffer-sizes-do-not-match

This seems to be a problem with the videoInput library that happens only
with some cameras. Do you happen to be using a Microsoft VX-6000 (or
something similar)? It is a result of the setting of the capture size
not working. If you set the capture size to e.g. 640x480, this setting
somehow does not propagate to the driver. The error message happens when
OpenCV receives a frame which does have a size that is different from
what it is expecting. (If you have a debugger, try setting a breakpoint
there and you can see the different buffer sizes)

The only workaround I have found so far is to set the camera's
resolution manually beforehand by using the Webcam software that came
with the camera. Somehow, that setting is remembered by the driver.

gen2brain avatar Jan 12 '23 06:01 gen2brain