Error -5 Array Should Be Cvmat Or Iplimage
Sign in Pricing Blog Support Search GitHub This repository Watch 3 Star 13 Fork 12 anilshanbhag/videochat Code Issues 0 Pull requests 0 Projects 0 Pulse Graphs New issue Error while trying to test on loopback. #1 Closed theSage21 opened this Issue Sep 14, 2015 · 4 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 2 participants theSage21 commented Sep 14, 2015 ghost@amnesia ~/dev/videochat $ python server.py server VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument TCPServer Waiting for client on port 5000 I got a connection from ('127.0.0.1', 42707) Traceback (most recent call last): File "server.py", line 31, in server.start() File "server.py", line 23, in start frame = vsock.vreceive() File "/home/ghost/dev/videochat/videosocket.py", line 46, in vreceive raise RuntimeError("Socket connection broken") RuntimeError: Socket connection broken ghost@amnesia ~/dev/videochat $ ghost@amnesia ~/dev/videochat $ python client.py client VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument libv4l2: error setting pixformat: Device or resource busy HIGHGUI ERROR: libv4l unable to ioctl S_FMT libv4l2: error setting pixformat: Device or resource busy libv4l1: error setting pixformat: Device or resource busy HIGHGUI ERROR: libv4l unable to ioctl VIDIOCSPICT OpenCV Error: Bad argument (Array should be CvMat or IplImage) in cvGetSize, file /build/buildd/opencv-2.4.8+dfsg1/modules/core/src/array.cpp, line 1238 Traceback (most recent call last): File "client.py", line 34, in client.connect() File "client.py", line 19, in connect frame = self.videofeed.get_frame() File "/home/ghost/dev/videochat/videofeed.py", line 25, in get_frame jpegImg = Image.fromstring("RGB", cv.GetSize(self.frame), self.frame.tostring()) cv2.error: Array should be CvMat or IplImage ghost@amnesia ~/dev/videochat $ I am at my wits end. Can you help? Owner anilshanbhag commented Sep 14, 2015 Thanks for reporting. Its been a while since I looked at the code. Will try to get it working later tonight and let you know. theSage21 commented Sep 14, 2015 This might be relevant, I thi
2012-09-25 10:41:57 -0500 Kirill Kornyakov 2606 ●10 ●25 ●50 I am having trouble with the following simple code snippet: import cv2.cv as cv capture = cv.CaptureFromFile('C://video.mp4') frame = cv.QueryFrame(capture) frame_size = cv.GetSize(frame) cv.GetSize gives this error: error: Array should be CvMat or IplImage frame is of type , so QueryFrame is not returning properly. capture seems to be ok. It is type and has a valid looking value: . Here are the details of my setup: Python 2.7.3, OpenCV 2.4.2, OS = Windows 7. I can view the video.mp4 file in windows media player. I https://github.com/anilshanbhag/videochat/issues/1 can open jpg files successfully with: frame = cv.LoadImageM('C://test.jpg',cv.CV_LOAD_IMAGE_COLOR); Whatever I do, I haven't been able to open video files with OpenCV. Any suggestions? edit retag flag offensive close merge delete Comments2In the meantime you can try cv2 API: http://answers.opencv.org/question/6Kirill Kornyakov( 2012-09-25 10:42:57 -0500 )editI just tried and am not having any luck. I've tried this on two Windows7 64 bit machines, and I get the same error on http://answers.opencv.org/question/2463/video-capture-issue-in-python/ both: cv2.imshow('some', img) error: ......\src\opencv\modules\core\src\array.cpp:2482: error: (-206) Unrecognized or unsupported array typeI installed Python 2.7.2 and opencv 2.4.2 on both machines. Is there something I'm doing wrong with the installation? Should I try a different version of opencv? Any suggestions would be helpful. Thanks!blimp555( 2012-09-25 13:59:06 -0500 )editSorry, but I don't work with Python usually, that's why I can't try your code. But could you also check this sample or other python samples. You can grep for cv2.VideoCapture and try all of them...Kirill Kornyakov( 2012-09-26 01:32:04 -0500 )editadd a comment Login/Signup to Answer Question Tools Follow subscribe to rss feed Stats Asked: 2012-09-20 11:41:42 -0500 Seen: 2,410 times Last updated: Sep 25 '12 Related questions Help to Open Video File ASF Video File Read in OpenCV Stroke width transform lines parallel with houghlines opencv+python Fail to import smbus in OpenCV?? [closed] real time disparity map Save flann matcher data for use later 3D coordinates of a colored tracked object with stereo vision How to detect semi transparent logo location on video? Error :SyntaxError: 'break' outside loop Copyright Itseez, 2012-2016. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license. about | faq | help | privacy policy Powered by Askbot ver
von GoogleAnmeldenAusgeblendete FelderNach Gruppen oder Nachrichten suchen
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How can I get width and height from a decoded image in opencv? up vote 0 down vote favorite I receive an image as binary in web.data() and decode it with cv2.imdecode. The result is an image. I can succefully run some blob detection on it no problem. Getting width and height however turned out to be a problem. Here's the code I'm using (found here and here) with the error messages I get. Neither of the two suggested ways of doing this works, why is that? imageDecoded = cv2.imdecode(np.frombuffer(web.data(), dtype='uint8'), cv2.CV_LOAD_IMAGE_GRAYSCALE) # http://stackoverflow.com/questions/13033278/image-size-python-opencv height, width = cv.GetSize(imageDecoded) # Array should be CvMat or IplImage # http://stackoverflow.com/questions/32971241/how-to-get-image-width-and-height-in-opencv height, width, channels = imageDecoded.shape # 'NoneType' object has no attribute 'shape' python image opencv height width share|improve this question edited Sep 13 at 14:03 asked Sep 13 at 12:47 null 4,3181933 if the retval of the function is a numpy.array you can do height, width = imageDecoded.shape –Francesco Nazzaro Sep 13 at 12:51 @FrancescoNazzaro how is telling me "If you had something that worked, you could d