webcam

java:web cam application

时光总嘲笑我的痴心妄想 提交于 2019-12-04 16:18:56
I am looking to do develop the following application. How to proceed? Scan the system for installed webcams and their supported video modes. Let the user select a cam and a video mode. Displays a video of the camera. Starts a frame grabber/processor, it doesn't have to do nothing for now. I want to have the possibility to elaborate frames or at least one frame every x. Not sure if it's possible but i'd need also a routine to overlay processed frames on the playing video. n002213f Check this post on SO for inspiration. The JMF framework supports capturing real-time data, audio or video, as

Problem in java programming on windows7 (working well in windows xp)

十年热恋 提交于 2019-12-04 15:45:29
I am capturing video from webcam connected to pc.I am using the following code to do so: import java.util.*; import javax.media.*; import javax.media.protocol.*; import javax.media.control.*; import javax.media.format.*; import java.awt.*; /** * This is the primary class to run. It gathers an image stream and drives the processing. * */ public class jmfcam05v { DataSource dataSource; PushBufferStream pbs; Vector camImgSize = new Vector(); Vector camCapDevice = new Vector(); Vector camCapFormat = new Vector(); int camFPS; int camImgSel; Processor processor = null; DataSink datasink = null; /**

Save multiple images with OpenCV and Python

雨燕双飞 提交于 2019-12-04 15:24:41
问题 I'm using OpenCV and Python to take images. However currently I can only take one picture at a time. I would like to have OpenCV to take multiple pictures. This is my current code. import cv2.cv as cv import time cv.NamedWindow("camera", 1) capture = cv.CaptureFromCAM(0) while True: img = cv.QueryFrame(capture) cv.ShowImage("camera", img) cv.SaveImage('pic.jpg', img) if cv.WaitKey(10) == 27: break 回答1: Your code overwrite a file. Save to different file each time. For example: import cv2.cv as

Can't change video capture resolution using c#

纵然是瞬间 提交于 2019-12-04 12:36:49
I am trying to change the default webcam resolution using DirectShowNet in C#, from what I gather I need to change it from calling the built in VideoInfoHeader class in windows win32 api dll for avi capture. I have the following code from DirectShowNet: hr = capGraph.SetFiltergraph( graphBuilder ); if( hr < 0 ) Marshal.ThrowExceptionForHR( hr ); AMMediaType media = new AMMediaType(); media.majorType = MediaType.Video; media.subType = MediaSubType.RGB24; media.formatType = FormatType.VideoInfo; // ??? hr = sampGrabber.SetMediaType(media); if (hr < 0) Marshal.ThrowExceptionForHR(hr); hr =

Fastest way to get frames from webcam

不打扰是莪最后的温柔 提交于 2019-12-04 12:32:56
I have a little wee of a problem developing one of my programs in C++ (Visual studio) - Right now im struggling with connection of multiple webcams (connected via usb cables), creating for each of them separate thread to capture frames, and separate frame for processing image. I use OpenCV to process frames, but the problem is that i dont get a peak of webcam possibilities (it supports 25 fps, i get only 18) is there some library that i could use to get frames, than process them with OpenCV that would made frames be captured faster? I was researching a bit and the most popular way is to use

How do I track a blob using OpenCV and Python

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 06:42:19
I've gotten OpenCV working with Python and I can even detect a face through my webcam. What I really want to do though, is see movement and find the point in the middle of the blob of movement. The camshift sample is close to what I want, but I don't want to have to select which portion of the video to track. Bonus points for being able to predict the next frame. Here's the code I have currently: #!/usr/bin/env python import cv def is_rect_nonzero(r): (_,_,w,h) = r return (w > 0) and (h > 0) class CamShiftDemo: def __init__(self): self.capture = cv.CaptureFromCAM(0) cv.NamedWindow(

Using WinRT library in WPF application.

不羁岁月 提交于 2019-12-04 05:21:37
问题 I have followed this article here: http://blogs.msdn.com/b/eternalcoding/archive/2013/10/29/how-to-use-specific-winrt-api-from-desktop-apps-capturing-a-photo-using-your-webcam-into-a-wpf-app.aspx And it all works great... but how do I get a preview in WPF? The XAML "CaptureElement" control is not available in WPF. Is there any other way I can get a preview using the MediaCapture API? Why would Microsoft not make this control Available? 回答1: Late reply, but in case that helps folks in the

Using OpenCV Output as Webcam

心已入冬 提交于 2019-12-04 05:12:17
So, I want to write a program to make the processed output from OpenCV be seen as a WebCam. I want to use it to create effects for a program like Skype. I am stuck and Googling has led to no help. Please help me. Do I need to get a driver for this? What about storing as an AVI and streaming that AVI with some other application? I want to write a program to mask my face so I don't need to worry about my privacy when Skype-ing with people I am tutoring and don't personally know! By the way, I am kinda new with C++. However, that is the language I prefer. However, I understand Java and Python as

OpenCV + Webcam compatibility

不想你离开。 提交于 2019-12-04 05:03:01
问题 For the people that have experience with OpenCV, are there any webcams that don't work with OpenCV. I am looking into the feasibility of a project and I know I am going to need a high quality feed (1080p), so I am going to need a webcam that is capable of that. So does OpenCV have problems with certain cameras? To be analysing a video feed of that resolution on the fly I am going to need a fast processor, I know this, but will I need a machine that is not consumer available...ie, will an i7

How to stream Webcam in WPF?

谁说胖子不能爱 提交于 2019-12-04 04:40:37
Can I stream a live video in WPF application from my web cam? If yes, then How? You will have to use DirectX Capture or something (is not in WPF right know, so use DirectX API's directly). Look at: WPF Media Kit . It can grab the Vista Windows desktop manager DirectX Direct3D shared Surface, and use it as a visual brush in WPF. He does some nice things with it. Look at his blog where he explains it. I hope this helps you on your way... UPDATE 2009-11-06: The VideoRenderElement Codeplex project has an example on how to stream webcam content. This project looks like it would fit your requirment