Problem with start opencv300 and Video [closed]
I want to start Opencv300 in VC12 . have everything connected as in the video : [ https://www.youtube.com/watch?v=ScAPi...]
with images I can work without any problems , but if I want CONNECTING camera immediately comes error message :
Unhandled exception at at 0x7510812F in Sample1.exe : Microsoft C ++ exception : cv :: Exception at memory location 0x001BD64C .
and the window is :
OpenCV Error : Assertion failed < SCN == 3 SCN== 4 > in cv :: cvtColor , file c: \ builds \ master_PackSlave Win32 VC11 - shared \ OpenCV \ modules \ imgproc \ src \ color . cpp Line 7564
Why is that ? thank you
First of all, you say you want to use OpenCV in VC12 but your folder says you're using VC11 binaries, so that may cause problems (in general). About your specific problem, hard to say what's going on without any code, but guessing you just haven't checked if the camera is properly opened/outputting non-empty frames
I use VC12 and VC12 of all libraries , I do not know what does this error message . To the camera : I have previously worked with Opencv231 but is ziehlich old when code is running smoothly , but here with this error
Code:
Is that the code you're using? I very much doubt it, because the error is in function
cvtColor
, which you don't seem to use.NOOOOO, It is a simplified version. there's something in between . Cod is different, which I have brought as an example.
without cvtColor i have: OpenCV Error: Assertion failed (size.width>0 && size.height>0) in cv::imshow, fi le C:\builds\master_PackSlave-win32-vc11-shared\opencv\modules\highgui\src\windo w.cpp, line 271
no matter what kind of code I have . Problem is due to the camera , as all code without using the camera run ( eg images ) , as far as I calls camera , it does not go
As I said in the first comment, what you need to do is check if the image has been captured or not:
thank you , I'm a little further , but I still have not viedeo
a lot of: Cannot find or open the PDB file. and 'Sample1.exe' (Win32): Unloaded 'C:\Windows\System32\vfwwdm32.dll' The thread 0x1d70 has exited with code 0 (0x0). The thread 0x2048 has exited with code 0 (0x0). The thread 0x23e8 has exited with code 0 (0x0). The thread 0x2198 has exited with code 0 (0x0). The thread 0x7ec has exited with code 0 (0x0). The program '[9988] Sample1.exe' has exited with code 0 (0x0).
Instead of
VideoCapture cap(0)
, try one of the following:And add this check just below whatever option you choose:
Hello , unfortunately, that did not help
1)for VideoCapture cap(-1); VideoCapture cap(0 + CV_CAP_VFW);
a lot of Cannot find or open the PDB file. VIDEOINPUT LIBRARY - 0.1995 - TFW07 The thread 0x10d4 has exited with code 0 (0x0). The thread 0xe50 has exited with code -1 (0xffffffff). The program '[1656] Sample1.exe' has exited with code -1 (0xffffffff).
2)for VideoCapture cap(0 + CV_CAP_DSHOW);
a lot of Cannot find or open the PDB file. SETUP: Disconnecting device 0 SETUP: freeing Grabber Callback SETUP: freeing Renderer SETUP: freeing Capture Source SETUP: freeing Grabber Filter SETUP: freeing Grabber SETUP: freeing Control SETUP: freeing Media Type SETUP: removing filter NullRenderer... SETUP: filter removed NullRenderer .....