473,405 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Image comparison, from image capture device

Hi
I am trying to find some code, or reference docs, to assist in helping
capture images from an image capture device (ie. webcam etc etc).

I want to be able to compare successive images coming from the device, and
be able to detect if the image has changed from the previous one. I have
found some Java code which does something similar to what I want to do, but
I am unsure which classes in the .Net framework are equivalents or of use in
this.

If anyone can help, it would be most appreciated.

Thanks
Paul
Nov 16 '05 #1
2 8771
Paul,

There's nothing directly built in to .Net for capturing images, but you can
use the DirectX API to do so. There's no need to sweat, though -- try the
DirectX.Capture library for capturing images. I found it pretty easy to use:
http://www.thecodeproject.com/cs/med...ctxcapture.asp

Now, as far as comparing successive images... that's practically a whole
science! Quick and dirty, you could do per-pixel or region comparisons of
successive images with threshold values. I would probably write those
functions in unmanaged C++ and compile a DLL that you could then reference
from .Net, since it's processor-intensive and will run faster than managed
code.

Keep in mind that many webcam drivers auto-adjust the image for lighting
conditions, so the image brightness or saturation may change automatically
and trick your program into thinking something has moved when it hasn't.
Some cameras (I have a Logitech cam) let you turn all that auto-adjustment
stuff off if you don't want it.

-Adrian

"Paul Aspinall" <pa**@aspy.co.uk> wrote in message
news:Rq******************@fe3.news.blueyonder.co.u k...
Hi
I am trying to find some code, or reference docs, to assist in helping
capture images from an image capture device (ie. webcam etc etc).

I want to be able to compare successive images coming from the device, and
be able to detect if the image has changed from the previous one. I have
found some Java code which does something similar to what I want to do,
but I am unsure which classes in the .Net framework are equivalents or of
use in this.

If anyone can help, it would be most appreciated.

Thanks
Paul

Nov 16 '05 #2
Hi Paul,

I believe there is a way to do this in managed code using Windows Messaging
without having to resort to Directx or COM.
http://www.webtropy.com/articles/art7.asp?Webcam

Difference image and motion detection algorithms, using pattern recognition
as is found in security and QA apps, are usually in the realm of DSP. I
would say the easiest way would be to do a Fast Fourier Transform on the
images and then calulate some vector difference. You can use the Exocortex
engine:
http://www.exocortex.org/dsp/

ok,
aq

"Paul Aspinall" <pa**@aspy.co.uk> wrote in message
news:Rq******************@fe3.news.blueyonder.co.u k...
Hi
I am trying to find some code, or reference docs, to assist in helping
capture images from an image capture device (ie. webcam etc etc).

I want to be able to compare successive images coming from the device, and
be able to detect if the image has changed from the previous one. I have
found some Java code which does something similar to what I want to do, but I am unsure which classes in the .Net framework are equivalents or of use in this.

If anyone can help, it would be most appreciated.

Thanks
Paul

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ravi | last post by:
Hi, I've tried creating a capture graph twice for the same camera device in the same program. But, the second time I try to create graph for the device, Im getting an error at the "RenderStream"...
2
by: DraguVaso | last post by:
Hi, In the override of the Paint-method of a DataGridTextBoxColumn I want to show an image with BitBlt, to see what I can gain there on performance. The problem is: It doesn't show me the image...
49
by: Lauren Wilson | last post by:
Hi folks, Just wondered if, for the sake of clarity, it is permissible to post small image files of an error box along with a text message about a problem with Access?
5
by: Stan Shankman | last post by:
C# -- Visual Studio.Net – Windows Application Greetings all, How do I copy a Form’s image to a bitmap? – And do so before it gets to the screen. I haven’t been able to find anyone that knows...
2
by: Arash | last post by:
Dear all, I've got a video capture device. Device manager shows "nVidia WDM Video Capture (universal)" driver in "Sound, video and game controllers" category. Also, Windows Movie Maker, and...
6
by: anonymous | last post by:
hi all, I'm trying to use the capCreateCaptureWindow (see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_capcreatecapturewindow.asp) in a Windows...
5
by: Brian | last post by:
Hello, I was wondering if anyone knows of an easy way to capture an image from a digital camera and put it into a picturebox. I need to be able to view the video feed and click a capture button...
3
by: dcruncher4 | last post by:
It is possible that we may be asked to restore a production tape, say 3 yrs later. We would prefer redirect restore for that. I am documenting a process to do a redirect restore. We take...
1
by: sangith | last post by:
Hi, I tried the packet capture module program. I did a file transfer using ftp from this host to another server. But when I ran the program, it was just hanging off and it did not print the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.