webcam

Get image from webcam

[亡魂溺海] 提交于 2020-01-01 20:09:10
问题 I'm trying to find the way for getting image (only image, not video stream) from webcam in managed C#. Usually people suggesting libraries, but they are old or commercial or under gpl. How get image from webcam without third-party libraries? upd.: thanks for Media Foundation, I shall use that. 回答1: Web cameras are supposed to deliver video feeds, not stills. So the native API you might be interested in is the one for video capture, which are DirectShow and Media Foundation. The one you would

Get most recent frame from webcam

孤者浪人 提交于 2020-01-01 10:05:48
问题 I am using OpenCV2 to take some timelapse photos with a webcam. I want to extract the most recent view seen by the webcam. I try to accomplish this like so. import cv2 a = cv2.VideoCapture(1) ret, frame = a.read() #The following garbage just shows the image and waits for a key press #Put something in front of the webcam and then press a key cv2.imshow('a',frame); cv2.waitKey(0); cv2.destroyAllWindows(); [cv2.waitKey(25) for i in range(10)] #Since something was placed in front of the webcam we

Get most recent frame from webcam

会有一股神秘感。 提交于 2020-01-01 10:04:27
问题 I am using OpenCV2 to take some timelapse photos with a webcam. I want to extract the most recent view seen by the webcam. I try to accomplish this like so. import cv2 a = cv2.VideoCapture(1) ret, frame = a.read() #The following garbage just shows the image and waits for a key press #Put something in front of the webcam and then press a key cv2.imshow('a',frame); cv2.waitKey(0); cv2.destroyAllWindows(); [cv2.waitKey(25) for i in range(10)] #Since something was placed in front of the webcam we

Why can I stream h264 encoded video from webcam to BOTH display and file, but NOT raw video?

ぃ、小莉子 提交于 2020-01-01 00:43:10
问题 I want to stream raw video from a Logitech C920 webcam and while both displaying and saving the video to file using GStreamer 1.0. This works if I stream h264 encoded video from the camera (the camera provides hardware encoded h264), but it fails if I stream raw video from the camera. However, if I only display, or only save to file, streaming raw video works. Why does it work with a h264 video stream but not with a raw video stream? h264 encoded video stream from camera to BOTH display and

Cannot Send canvas data from Javascript AJAX to PHP page

…衆ロ難τιáo~ 提交于 2019-12-31 04:20:31
问题 I have a video element on my page showing webcam stream . Next I have a canvas with functions that takes snapshots and displays images in canvas. Now I need to send this canvas image to server and save it to file with PHP. I combined various tutorials online and ended up with this code below, however the image that is saved on the server folder is just blank, so I guess the PHP file does not properly receive the data to show... please help if you can :) Only The Jquery + AJAX not transmitting

Setting frame size of QuickCam Pro 3000 with OpenCV?

六月ゝ 毕业季﹏ 提交于 2019-12-31 02:13:11
问题 I'm using OpenCV 2.4.6 to grab images with my old Logitech QuickCam Pro 3000 webcam. Using VideoCapture::set( CV_CAP_PROP_FRAME_WIDTH, ... ) I'm not able to set the value of the width (idem for the height). set(...) always returns false . Is it normal? P.S. I'm on Linux ( kubuntu ) and it seems to use V4L. 回答1: It seems that your camera was not initialized properly. The following code works for me. using namespace cv; [...] VideoCapture capture(0); capture.set(CV_CAP_PROP_FRAME_WIDTH, width);

Setting frame size of QuickCam Pro 3000 with OpenCV?

无人久伴 提交于 2019-12-31 02:10:08
问题 I'm using OpenCV 2.4.6 to grab images with my old Logitech QuickCam Pro 3000 webcam. Using VideoCapture::set( CV_CAP_PROP_FRAME_WIDTH, ... ) I'm not able to set the value of the width (idem for the height). set(...) always returns false . Is it normal? P.S. I'm on Linux ( kubuntu ) and it seems to use V4L. 回答1: It seems that your camera was not initialized properly. The following code works for me. using namespace cv; [...] VideoCapture capture(0); capture.set(CV_CAP_PROP_FRAME_WIDTH, width);

Can't access properties of cv::VideoCapture with Logitech C920

心不动则不痛 提交于 2019-12-30 09:54:08
问题 I am developing a small webcam application with Logitech C920 and OpenCV. I can actually get images from camera without any problem with given resolution. But except for frame width and height, I can't access any setting in the camera. I have following code. As you can guess, the code produced all zero lines except for the first two. Am I doing something wrong? or Is this another proprietary BS from Logitech? If this is limitation of OpenCV, is there any other option to develop an application

Grabbing snapshots from webcams in ruby

℡╲_俬逩灬. 提交于 2019-12-30 05:20:07
问题 How can I take snapshots from a webcam in ruby? I know the webcam device is on /dev/video0, but how do I get a picture from it? 回答1: I'm the developer of Hornetseye. You can capture images with the V4L2-interface of HornetsEye as follows. require 'rubygems' require 'hornetseye_v4l2' require 'hornetseye_xorg' require 'hornetseye_rmagick' include Hornetseye input = V4L2Input.new '/dev/video0' img = X11Display.show { input.read } img.to_ubytergb.save_ubytergb 'test.png' Currently supported

Kinect SDK corrupt memory error

霸气de小男生 提交于 2019-12-29 07:53:16
问题 I have made a program in XNA using Kinect SDK. The program is running perfectly fine in my pc, and many of other PC's, but in one system when I open this program it gives me the following error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. The program stops and it gives me the error message in spritebatch.End() . I am unable to understand why its giving me this error message. The system I am using has 4GB Ram, and the system which is