webcam

opencv+python+linux+webcam = cannot capture frames

老子叫甜甜 提交于 2019-12-11 02:53:13
问题 I am trying to code up simple face detection in python using opencv. But unfortunately my opencv is refusing to detect my webcam. I am not sure how it works internally, as documentation is very limited, but CaptureFromCAM(-1) returns some object, but QueryFrame returns nones. When I try to use one of my two cameras for example in cheese, I get video without a problem. capture = cv.CaptureFromCAM(-1) faceCascade = cv.Load("haarcascade_frontalface_alt.xml") while (cv.WaitKey(15)==-1): img = cv

VB.NET and WebCam Select Video Source dialog

喜你入骨 提交于 2019-12-11 02:12:09
问题 So, I am building an application which needs to have access to a single webcam on the computer, the problem is that whenever I run the application I get a dialog from Windows asking to select a Video Source. I would like to make it programatically select the standard device. Does anybody have any idea on how should I approach this? Main App code: Imports WindowsApplication1.iCam Imports System.Drawing.Imaging Public Class Form1 Dim myCam As iCam Dim Dir As String Private Sub Form1_Load(sender

Bash: sort find results using part of a filename [duplicate]

瘦欲@ 提交于 2019-12-10 23:20:08
问题 This question already has answers here : Bash and sort files in order (7 answers) Closed 4 years ago . I have 3 webcams set up in a building, uploading still images to a webserver. I'm using ffmpeg to encode the jpgs to mp4 video. The directories are set up like this: Cam1/201504 Cam1/201505 Cam2/201504 Cam2/201505 Cam3/201504 Cam3/201505 I'm using the following bash loop/ffmpeg parameters to make one video per camera, per year. This works well so far (well... except that my SSD is rapidly

Should I use WinForms or WPF for taking pics with webcam?

微笑、不失礼 提交于 2019-12-10 22:36:48
问题 We have a Logitech web cam that we want to get working with .NET. It needs to recognize the device, and be able to take a picture. We just installed VS 2008, and I was wondering if Microsoft made it easier to interact with devices with some of the newer stuff like WPF, Silverlight, or whatever. If anybody can point me in the right direction, or even provide some source code, it would really help a noob out. Thanks in advance. 回答1: You can try the VideoCaptureElement control in my WPF MediaKit

Directshow capture to file, nothing happens

时光毁灭记忆、已成空白 提交于 2019-12-10 22:19:48
问题 I am trying to follow through the DirectShow examples on the windows dev center to make my own application that can capture screen and audio to video: Capturing Video to an AVI File All code goes ok but nothing happens, the avi file is not appearing. The web cam is connected I can see stream with AMCap. In code cam is appearing with correct filename. The windows SDK is installed, my platform is win7 x64. My code: #include "stdafx.h" #include <iostream> #include <windows.h> #include <dshow.h>

Auto allow webcam access using Puppeteer for Node.js

隐身守侯 提交于 2019-12-10 20:00:02
问题 I'm setting up a test that involves starting a webcam video session. So far all is working fine and doesn't require any user interaction except for granting access to the webcam. When the third party library I'm using makes the call: navigator.mediaDevices.getUserMedia({audio: true, video: true}) the browser opens a prompt asking the user to allow access. What I'm looking for is a way to grant access without user interaction. I've tried puppeteer's page.on('dialog'... but that doesn't get

using pygame to stream over sockets in python error

别等时光非礼了梦想. 提交于 2019-12-10 19:58:16
问题 i am working on with a webcam script i got of the internet in python and i am using pygame module the code is import socket import pygame import sys port=5014 #create pygame screen screen = pygame.display.set_mode((800,600),0) while True: s=socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(("",port)) # server is available on the whole network by setting host to "" s.listen(1) connection, addr = s.accept() received = [] # loop .recv, it returns empty string when done, then transmitted

Android: Error using webcam in emulator

随声附和 提交于 2019-12-10 15:42:41
问题 In a previous post, I got this error when starting the camera application in an emulator with a webcam connected: CameraService::connect X (pid 702) rejected (invalid cameraId 0). After updating the dev tools, I got this other error instead (then, after making a new emulator, I got the first error again): 03-15 03:44:04.272: E/EmulatedCamera_QemuClient(40): queryStart: Query failed: Cannot start the camera 03-15 03:44:04.272: E/EmulatedCamera_QemuDevice(40): startDevice: Unable to start

Problems using webcam in python + openCV

瘦欲@ 提交于 2019-12-10 14:49:05
问题 I am using the following code to access my webcam using openCV + python... import cv cv.NamedWindow('webcam_feed', cv.CV_WINDOW_AUTOSIZE) cam = cv.CaptureFromCAM(-1) I am then getting the following error in the console... VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument I was originally using, cv.CaptureFromCAM(0) to access the same and had the same issue and used -1 because it is suppose to pick up any webcam. I also tested to see if

setParameters failed when initializing android webcam with python and SL4A

Deadly 提交于 2019-12-10 14:33:12
问题 I'm using the SL4A platform on an android 4.0 tablet and attempting to initialize a webcam stream using the droid.webcamStart() method found here: http://code.google.com/p/android-scripting/wiki/ApiReference#webcamStart my problem is when I execute the following code I get a setParameters failed error. The python code is simple: import android droid = android.Android() address = droid.webcamStart(100,80,0).result if all goes according to plan this should initialize a webcam preview stream but