Video stream capture and frame comparison using webcam

For everyone, just starting with C++ or programming at all. Ask newbie questions in this forum!

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard

Video stream capture and frame comparison using webcam

Postby saad » Sun Mar 13, 2011 2:02 am

Hi , I want to record video stream of web cam, can you guide me.
What all I want is :

I am developing a kids shooting game using a laser gun.

I need to compare each frame for a set of pixels.

Step 1. Capture video stream of web cam
Step 2. Save each frame as JPG / any other still image format ( may be I stay in video format - which ever is easier )
Step 3. Compare each frame to find the group of pixel color of laser spots.

If found , save the frame as JPG.
Thanks
saad
 
Posts: 5
Joined: Sun Mar 13, 2011 1:38 am

Re: Video stream capture and frame comparison using webcam

Postby ventsyv » Mon Mar 14, 2011 9:23 am

Are you using a particular web cam, or you want to stay generic? What operating system are you going to support? If I have to guess, you'll need to look into DirectX or some other image acquisition API Microsoft provides. Maybe Windows Presentation Foundation - I think that's the latest MS is pushing.
User avatar
ventsyv
 
Posts: 2810
Joined: Mon Sep 22, 2003 5:25 pm
Location: MD USA

Re: Video stream capture and frame comparison using webcam

Postby saad » Mon Mar 14, 2011 10:12 am

Thanks, I am using Win XP, I want to remain generic in Web Cams.

I know C++ ( Using Dev C++ ) , Java , last night got Visual C as well just to solve the mystery of Video.

Trying over OpenCV , but unable to compile the example codes , probably setting issue.

Selection of C++ or Java so far is equally good for me.
Basic Idea.
My idea is to make a shooting game, the scenes of game ( as on monitor ) will be displayed on Wall using Video Projectors and Web cam to continuously capture the scenes. One Function will keep a look out for Laser Spot in the scene made by a laser gun by playing kids, track location of spot and compare with polygon of flying duck / airplane in the scene to declare hit or miss.
With Regards.
saad
 
Posts: 5
Joined: Sun Mar 13, 2011 1:38 am

Re: Video stream capture and frame comparison using webcam

Postby saad » Wed Jun 08, 2011 3:28 pm

I am now using OpenCV Ver 2.0 , with Code Block, It is working fine. Hopefully I shall be able to solve the issue. I shall post my code on completion here just to say thanks to the Admin / moderators and encourage the visitors of this site.
Regards
saad
 
Posts: 5
Joined: Sun Mar 13, 2011 1:38 am

Re: Video stream capture and frame comparison using webcam

Postby saad » Wed Jun 08, 2011 3:30 pm

Can you tell me how to add image in my reply. Wanted to post the results of screen capture / screen shots of my project interfaces.

Do not understand the use of tags , [url][/url] etc. thanks
saad
 
Posts: 5
Joined: Sun Mar 13, 2011 1:38 am

Re: Video stream capture and frame comparison using webcam

Postby Wizard » Thu Jun 09, 2011 7:02 am

You have to upload your image to an image site like photobucket.com, then you can just copy the URL for that image into your post and the forum software will automatically turn it into a link.
User avatar
Wizard
Site Admin
 
Posts: 3226
Joined: Mon Sep 22, 2003 4:52 pm
Location: ON, CA

Re: Video stream capture and frame comparison using webcam

Postby saad » Thu Jun 09, 2011 2:55 pm

Thanks Dear Wizard. :clap:
I shall do that.
saad
 
Posts: 5
Joined: Sun Mar 13, 2011 1:38 am

Re: Video stream capture and frame comparison using webcam

Postby Ulrike » Fri Oct 21, 2011 6:16 am

evalyne wrote:How you make a webcam work so you can communicate with people?

you need a mic to your webcams. one that you can plug to your pc. and ready get it track a cell phone started :)
Last edited by Ulrike on Fri Jan 06, 2012 12:55 am, edited 1 time in total.
Ulrike
 
Posts: 1
Joined: Fri Oct 21, 2011 5:48 am

Re: Video stream capture and frame comparison using webcam

Postby bonnie434 » Fri Oct 21, 2011 6:22 am

Thank you very much, your solution generic levitra and advice worked and helped me!!!
bonnie434
 
Posts: 1
Joined: Fri Oct 21, 2011 6:20 am


Return to For Beginners

Who is online

Users browsing this forum: No registered users and 1 guest