<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3029609170987457991</id><updated>2026-01-31T19:29:34.492-08:00</updated><category term="Image Processing"/><category term="RFID"/><title type='text'>Prem&#39;s Knowledge Sharing</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://irslab.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3029609170987457991/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://irslab.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Prem</name><uri>http://www.blogger.com/profile/14932135081288608213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3029609170987457991.post-3461124540397708161</id><published>2011-06-05T10:14:00.000-07:00</published><updated>2011-06-05T10:14:05.662-07:00</updated><title type='text'>HSL vs RGB Aforge.NET Color Filter</title><content type='html'>&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Yes, I am obsessed with color filters. And looks like that is what usually the hello world in image processing world to understand your image formats. Initially I have done color filters that are based on RGB. Last week in my lab we ran into an issue when we printed 6 blocks of color on white paper and kept it under a camera and used of filter to see how it works. Guess what? the filter showed red with magenta and other colors! That is not good. So why is it happening?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;When we do a filter based on RGB, it looks for percentage of R, G and B in the a particular pixel. So it is a kind of relation. Let me give you a nice example&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Assume I want to detect red color but I also have magenta color in the same image. My filter shows magenta as red! So I go to wikipedia (&lt;/span&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Magenta&quot; title=&quot;http://en.wikipedia.org/wiki/Magenta&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;http://en.wikipedia.org/wiki/Magenta&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;) and see why is it so and get something like this&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://en.wikipedia.org/wiki/RGB_color_model&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;RGB&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;sup&gt;&lt;b&gt;B&lt;/b&gt;&lt;/sup&gt; &lt;br /&gt;
(&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Red&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;r&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;, &lt;/span&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Green&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;g&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;, &lt;/span&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Blue&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;b&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;) &lt;br /&gt;
(255, 0, 255)&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://en.wikipedia.org/wiki/HSV_color_space&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;HSV&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt; &lt;br /&gt;
(&lt;/span&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Hue&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;h&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;, &lt;/span&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Saturation_(color_theory)&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;s&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;, &lt;/span&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Brightness&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;v&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;) &lt;br /&gt;
(300°, 100%, 100&lt;sup&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/#cite_note-0&quot;&gt;[1]&lt;/a&gt;&lt;/sup&gt;%)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;So when I used red filter in RGB space the magenta has 255 for R and 255 for B. So it will show up in both Red and Blue filter working in magenta.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;But in HSV the value is 300. That is only one number. So when I filter my image in HSV and say 300 it will show only Magenta. For red it will be somewhere between 0 to 20. How I know the value, simple this image given below taken from Wikipedia (&lt;/span&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/HSL_and_HSV&quot; title=&quot;http://en.wikipedia.org/wiki/HSL_and_HSV&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;http://en.wikipedia.org/wiki/HSL_and_HSV&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;) will help&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://upload.wikimedia.org/wikipedia/commons/a/a0/Hsl-hsv_models.svg&quot;&gt;&lt;img alt=&quot;File:Hsl-hsv models.svg&quot; height=&quot;494&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Hsl-hsv_models.svg/600px-Hsl-hsv_models.svg.png&quot; width=&quot;494&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;I know we are all lazy, so here is the source code to grab image from webcam &lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://webpages.eng.wayne.edu/~dx8289/AforgeTutorial/Base/AforgeTutorial.zip&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Download&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&amp;nbsp; (Source code to grab image from Web Cam using C# )(&lt;/span&gt;&lt;a href=&quot;http://webpages.eng.wayne.edu/~dx8289/AforgeTutorial/Base/AforgeTutorial.zip&quot; title=&quot;http://webpages.eng.wayne.edu/~dx8289/AforgeTutorial/Base/AforgeTutorial.zip&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;http://webpages.eng.wayne.edu/~dx8289/AforgeTutorial/Base/AforgeTutorial.zip&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;After that we use AForge library by adding the Aforge.Imaging.dll to convert RGB to HSL. Added the following code for HSL filter and you’ll see the prefomance&lt;/span&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;csharpcode&quot;&gt;&lt;span class=&quot;kwrd&quot;&gt;void&lt;/span&gt; SelectedCam_NewFrame(&lt;span class=&quot;kwrd&quot;&gt;object&lt;/span&gt; sender, NewFrameEventArgs eventArgs)
{
Bitmap image = (Bitmap)eventArgs.Frame.Clone();

&lt;span class=&quot;rem&quot;&gt;//Reference : http://www.aforgenet.com/framework/docs/html/743311a9-6c27-972d-39d2-ddc383dd1dd4.htm&lt;/span&gt;

&lt;span class=&quot;rem&quot;&gt;// set color ranges to keep red-orange&lt;/span&gt;
filter.Hue = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; IntRange(0, 20);
filter.Saturation = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; DoubleRange(0.5, 1);

&lt;span class=&quot;rem&quot;&gt;// apply the filter&lt;/span&gt;
filter.ApplyInPlace(image);

&lt;span class=&quot;rem&quot;&gt;// display in picture box&lt;/span&gt;
pictureBox1.Image = image;
}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Let me show how the image worked. &lt;br /&gt;
Given below is the image from my webcam that I am going to filter using HSL&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirmkltHJgEIi8lVbns2XHP9dqvLaDQj6Yn5hL3pE4R1Uo1z3shVoLDym8MPby07YtLzhCnhOCq_HurmnZoyDsIj3SIUVFXH1nOk5GE7C_JUi5BPvhkLd-mdL6zPfFGitliC28TFekuODk/s1600-h/realimage%25255B4%25255D.jpg&quot;&gt;&lt;img alt=&quot;realimage&quot; border=&quot;0&quot; height=&quot;407&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioyeikE6BdL7CAyzkFtUCL3ng1ip6vy9Mif77bIcmoiFS7aVfoag5BFkbrkuB5SDYsCvCylat3HGMaQWfk6aSKCDNgZ5iQ_KabKRNIK24qBrlSw0WZ6MZz9IZKzzt66QG1FVGGKbR8Dmc/?imgmax=800&quot; style=&quot;background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;realimage&quot; width=&quot;467&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;style type=&quot;text/css&quot;&gt;
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, &quot;Courier New&quot;, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;I have added a magenta color printed in a paper and kept it at the background. Because you will see the real difference when you use a RGB to filter vs HSL for this image. I am not doing the RGB, but I will be giving the source code for this at the end of the post. So you are free to try based on the previous posts. After applying the HSL filter lets look how it looks&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;Tada!!!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTFRj5lrAdxfNeqPA-EZzShAD1l-rsATyet4qn6RQ0RgHgxfQyqHhKpVKmX_URIJkALnSH9Dzv1fqe20-a73QlLKdIkOP0BnZjbn6bL0IEyEz_aPRW7QgB-ZWsxkDQG-yLFP2AyH0vag8/s1600-h/filtered%25255B5%25255D.jpg&quot;&gt;&lt;img alt=&quot;filtered&quot; border=&quot;0&quot; height=&quot;410&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4VzoqpfHASx8tQbJOcuzghyphenhyphen7CtN8B3mzPZXccTowlFEePMK6M4hPmomC15VxmTh7bPRbWXBiICjqt-RiNsoV57eRqFqyjgklj3u99HNMKzDVTQ4AganPsJ3mtjpeAjYFz1Iih91PKdVA/?imgmax=800&quot; style=&quot;background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;filtered&quot; width=&quot;471&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;There is no Magenta or any other color being showed. By tweaking the value you can get more better results.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;You can download the source code by clicking down below&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;http://webpages.eng.wayne.edu/~dx8289/AforgeTutorial/RGBtoHSL/RGB%20to%20HSL%20Color%20Filter.zip&quot; target=&quot;_blank&quot;&gt;Click Here for Source Code for HSLFilter using Aforge&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://irslab.blogspot.com/feeds/3461124540397708161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://irslab.blogspot.com/2011/06/hsl-vs-rgb-aforgenet-color-filter.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3029609170987457991/posts/default/3461124540397708161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3029609170987457991/posts/default/3461124540397708161'/><link rel='alternate' type='text/html' href='http://irslab.blogspot.com/2011/06/hsl-vs-rgb-aforgenet-color-filter.html' title='HSL vs RGB Aforge.NET Color Filter'/><author><name>Prem</name><uri>http://www.blogger.com/profile/14932135081288608213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioyeikE6BdL7CAyzkFtUCL3ng1ip6vy9Mif77bIcmoiFS7aVfoag5BFkbrkuB5SDYsCvCylat3HGMaQWfk6aSKCDNgZ5iQ_KabKRNIK24qBrlSw0WZ6MZz9IZKzzt66QG1FVGGKbR8Dmc/s72-c?imgmax=800" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3029609170987457991.post-139963628155633813</id><published>2011-02-16T14:10:00.000-08:00</published><updated>2011-02-16T18:16:33.754-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="RFID"/><title type='text'>DLP RFID1 .NET DLL</title><content type='html'>&lt;h1&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;DLP RFID 1 API for IEEE15693 C# .NET&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p align=&quot;center&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;strong&gt;Download Here&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;http://webpages.eng.wayne.edu/~dx8289/RFIDCardDotNet.zip&quot; target=&quot;_blank&quot;&gt;&lt;font style=&quot;background-color: #333333&quot; size=&quot;5&quot; face=&quot;Bell MT&quot;&gt;&lt;u&gt;&lt;strong&gt;RFIDCardDotNet.zip&lt;/strong&gt;&lt;/u&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;h2&gt;&lt;/h2&gt; &lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;I have been working on a project for the special education school. My project involves the use of RFID reader from DLP Design (&lt;/font&gt;&lt;a title=&quot;http://www.dlpdesign.com/rf/rfid1.shtml&quot; href=&quot;http://www.dlpdesign.com/rf/rfid1.shtml&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;http://www.dlpdesign.com/rf/rfid1.shtml&lt;/font&gt;&lt;/a&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;). Being a typical .NET programmer, I wanted to develop my application in C# windows application using DLP RFID1 reader. I took the sample code from the DLP site (&lt;/font&gt;&lt;a title=&quot;http://www.dlpdesign.com/rfrdr/&quot; href=&quot;http://www.dlpdesign.com/rfrdr/&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;http://www.dlpdesign.com/rfrdr/&lt;/font&gt;&lt;/a&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;) which was given in C++. I tried to write a wrapper around the existing library, but then came across a site/blog (&lt;/font&gt;&lt;a title=&quot;http://www.electricrock.co.nz/tools/dlp-rfid1-library-for-linux/&quot; href=&quot;http://www.electricrock.co.nz/tools/dlp-rfid1-library-for-linux/&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;http://www.electricrock.co.nz/tools/dlp-rfid1-library-for-linux/&lt;/font&gt;&lt;/a&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;) who wrote about the details of the communication protocol. So I wrote according the to document and it worked!!! My system had a card already made and it runs on IEEE5693. So I wrote my DLP RFID1 .NET library only for this type of tag. I am attaching the download link for the library and also giving a screenshot tutorial of the library usage.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;Add Reference as shown…&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMH3UwbPryAUOZsRXqf2GStVfU0WXZQWHQm4Rb46l1eVdvXQSCOnRCHW7-Wkuveq69SVvKXGiE0j0wCgFrVpu6QrkLGOseT_U7t2UBW3JxOS3IVSCXsJl0-XYLmQFM34qffildmZgAHlE/s1600-h/addreference%5B2%5D.png&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;addreference&quot; border=&quot;0&quot; alt=&quot;addreference&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha-ZpxiecNjLKFrSavbr-DwRtXh-6haGRqc6v1pJ39HAyf3OTpwkb_DkKpCXUdYchUfVMEIsZAtdJc27YHKHjuYCKALNL35wb-09Vw_HX22IguZrd6KL3l-mksOWsQ714u2nvglsyX9jY/?imgmax=800&quot; width=&quot;244&quot; height=&quot;117&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;Add the files that you downloaded&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9cPt5rHzs62rwwVKbZ7aELEB9T7a7lhKJoQx2GZvCGdSLTCe0FN40wnE-ORl8MJS8NGBn5b930zpGMUwglMzsG_E0FbRi0xiaTD_vDSCGUG4NRBO2psMf5ljdOXN5jNkaqoTR9TuT1QY/s1600-h/addfiles%5B5%5D.png&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;addfiles&quot; border=&quot;0&quot; alt=&quot;addfiles&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisYc2dyzcWCnJv5XbzyF-GiZ6ldUxzs-fFG7RQmwC28vhNczUfDrdB2iANYigidwh0jAk9dmaQl2dKq30ExnSKou_0LT_qDOTyk8o18-i4j1l8486Z0XVuOnZpawYSHmqADG8etG6uazI/?imgmax=800&quot; width=&quot;455&quot; height=&quot;363&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;And here is the code&lt;/font&gt;&lt;/p&gt; &lt;div id=&quot;codeSnippetWrapper&quot;&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;p&gt;..&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; System.Text;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; RFIDCard;&lt;/p&gt;&lt;p&gt;&lt;br&gt;..&lt;/p&gt;&lt;/pre&gt;&lt;br&gt;&lt;/div&gt;&lt;br /&gt;&lt;div id=&quot;codeSnippetWrapper&quot;&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;p&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (!CardReader.DetectReader())&lt;/p&gt;&lt;p&gt;&lt;br&gt;    Console.WriteLine(CardReader.ErrorMsg);&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;else&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&lt;/span&gt;&lt;font color=&quot;#0000ff&quot;&gt;&lt;/font&gt;&lt;br&gt;    Console.WriteLine(CardReader.ReadRFCard());&lt;/p&gt;&lt;/pre&gt;&lt;br&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;Sorry for poor documentation. &lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;There are only 2 usable functions and 1 string variable.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;Functions (static):&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil1ZOQDRRM-GhyphenhyphenoE2xwYJgvsqHcJFzYd-9KHJjKQDccZQn2iASXRGooR7XLIHWvJg1Lxtn3Kp5ozAlrRfLDpDdPNY8VavyUCw6nSfNlXHQfLZ4fstZy3yeTvoBP_NnHR1dRuqpj9sKWdE/s1600-h/image%5B11%5D.png&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ2khov8kMuHCbcoxQd0zlrb65zJ4RusNliXMd0L1fCIqI4Ab2ixgwTNeUzilctJjUjH3KyuLYBO1cmb3OO3HIK8RLVVadi62Q86TKO8Vw8gcV5s8ldPN7FVqIu2zoyYfaMisTd2kfrCU/?imgmax=800&quot; width=&quot;200&quot; height=&quot;60&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;String Variable for error feedback (static):&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwLkmZiU6R011CHEJoyi9mIvbaWQNJAh3VE27ojnmhb-oe1XP3ZDfSITJKilabJom6XGrKsj4bOHvoU1ZJ5j3a7TuWSZ80VE54tk4fCa35vcdC0-OfhgwBixDx5xDVHScci2zUd7IAXGs/s1600-h/image%5B18%5D.png&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR2RYiOuGTb_dgOgoYlk16THBiDrwJjEzmVFfsPIDb8Jym3OhwFlxi7daOUC-Oo_axWIBhfkB9CXdTQuBCO4AzGKhW25a7qbZ7R52zvKBpL5cYvBFF5b2b6rOL9qYjXX6YxtjS35XGleU/?imgmax=800&quot; width=&quot;144&quot; height=&quot;29&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p align=&quot;center&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;strong&gt;Download Here&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;http://webpages.eng.wayne.edu/~dx8289/RFIDCardDotNet.zip&quot; target=&quot;_blank&quot;&gt;&lt;font style=&quot;background-color: #333333&quot; size=&quot;5&quot; face=&quot;Bell MT&quot;&gt;&lt;u&gt;&lt;strong&gt;RFIDCardDotNet.zip&lt;/strong&gt;&lt;/u&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p align=&quot;center&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;Leave comments.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://irslab.blogspot.com/feeds/139963628155633813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://irslab.blogspot.com/2011/02/dlp-rfid1-net-dll.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3029609170987457991/posts/default/139963628155633813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3029609170987457991/posts/default/139963628155633813'/><link rel='alternate' type='text/html' href='http://irslab.blogspot.com/2011/02/dlp-rfid1-net-dll.html' title='DLP RFID1 .NET DLL'/><author><name>Prem</name><uri>http://www.blogger.com/profile/14932135081288608213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha-ZpxiecNjLKFrSavbr-DwRtXh-6haGRqc6v1pJ39HAyf3OTpwkb_DkKpCXUdYchUfVMEIsZAtdJc27YHKHjuYCKALNL35wb-09Vw_HX22IguZrd6KL3l-mksOWsQ714u2nvglsyX9jY/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3029609170987457991.post-8693858889614187555</id><published>2010-12-13T15:00:00.001-08:00</published><updated>2010-12-13T15:00:24.039-08:00</updated><title type='text'>Edge Detection using C# and Aforge.NET</title><content type='html'>&lt;h1&gt;&lt;font color=&quot;#00ff00&quot;&gt;Edge Detection using C# and Aforge.NET&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;As I have told earlier, I am a newbie to image processing. I am posting things as I work on them. For the past few months I have been&amp;nbsp; busy with my PhD qualifiers. &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;Our topic for today is Edge Detection. &lt;/font&gt;&lt;/p&gt; &lt;h2&gt;Edge Detection:&lt;/h2&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;First step in our segmentation is edge detection. I will take a simple example to do this. Here is the picture where I am going to do the processing. Actually it is not an image. It is a video stream.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYIHNiyIwU17lFBQo5OfipNyB1bzzAYvCSkMDdNO20c4Z2wsl-RnLFvDTMh_C60BdGBR2FWzN_MwXZvH9dYkrWrrXtQjdgBtNPQpVvGcWdsR9ekULWrng9J4PeLp1XAOFnOXM-GkHXgSE/s1600-h/image8.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2XkA9PYlAn3mirS_HELJ-xSBQDe5Ki-AE-UVwxzRjwgavPC1YUoWHI2X8UNi0JP_sGb8Y9AtYXnach6FbvlYnM9LVQcv3XCJmLbTm4QnYpf1s_8VnNJpVButbCHAobog1RVoEBUjA_2I/?imgmax=800&quot; width=&quot;337&quot; height=&quot;348&quot;&gt;&lt;/a&gt;&lt;br&gt;Now I am going to do edge detection in it using Aforge. Before doing edge detection you should first convert into grayscale. There are mutliple ways to do edge detection [ Ref: &lt;a title=&quot;http://www.aforgenet.com/framework/features/edge_detectors_filters.html&quot; href=&quot;http://www.aforgenet.com/framework/features/edge_detectors_filters.html&quot;&gt;http://www.aforgenet.com/framework/features/edge_detectors_filters.html&lt;/a&gt;]. Given below is the code snippet.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCZawz8-pCVFyr8yKvPei1T-dDt6g2v8H67H3QtG5SsCIehIrc1OUDDPNOT__6VY4ChX8Vhdmr1iE-uUfv0hIxNjnpGKRJwEUt7KKkJBz1a0oBjTD9ngCf0P6P_WP0NRMiOFsEccoyAWQ/s1600-h/image12.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgE5T5PF9FXHhZiB_5fy90CLbBWYyWOtOtvWb7ptbdrRPZYk0y6QhPKAuSuOLh8yKUsZAZwx19MNj3zhysSjwO2HpL2MTyPStEXTnCAtLmUno42xGVNzQ034tfmU7X4GP_Ir94pJv4yKs/?imgmax=800&quot; width=&quot;298&quot; height=&quot;307&quot;&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-mYNILESqeJIX6yvFWzkLwRHkr2mDr_hotdhC7YRP1law3NO3-qaLRlT3iK8AxqCoEz5XqjY4tEyzqPZnFUEHfJwcZjbS-j4cJQOZwUSmYTf7cXist86U5I4urZARPIM01TdaCh88Uc8/s1600-h/image16.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5hJbJKySs-f53EzFbDMZ4DLMxM5vD8wF_lWiCgpCURkJzgD1iEAIa7jk7xMaZVHeQEcFx9OQWyuHzdaWQMhqv7hJjeWQYcNmV-cZiMomoeb3M6FGnA_k8TB4xo8ZGmyvG5CcWULNKN2o/?imgmax=800&quot; width=&quot;292&quot; height=&quot;301&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 90.58%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; height: 117px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt; &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;Bitmap image = (Bitmap)eventArgs.Frame.Clone();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;Bitmap gsImage = Grayscale.CommonAlgorithms.BT709.Apply(image);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;CannyEdgeDetector filter = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; CannyEdgeDetector();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;Bitmap edge = filter.Apply(gsImage);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;pictureBox1.Image = (Bitmap)edge;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Actually I started this topic for image segmentation, but ended up as a Edge detection. I will come up with more topics. Also don’t forget to try other edge detection techniques given in Aforge.NET (link given below).&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a title=&quot;http://www.aforgenet.com/framework/features/edge_detectors_filters.html&quot; href=&quot;http://www.aforgenet.com/framework/features/edge_detectors_filters.html&quot;&gt;http://www.aforgenet.com/framework/features/edge_detectors_filters.html&lt;/a&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://irslab.blogspot.com/feeds/8693858889614187555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://irslab.blogspot.com/2010/12/edge-detection-using-c-and-aforgenet.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3029609170987457991/posts/default/8693858889614187555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3029609170987457991/posts/default/8693858889614187555'/><link rel='alternate' type='text/html' href='http://irslab.blogspot.com/2010/12/edge-detection-using-c-and-aforgenet.html' title='Edge Detection using C# and Aforge.NET'/><author><name>Prem</name><uri>http://www.blogger.com/profile/14932135081288608213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2XkA9PYlAn3mirS_HELJ-xSBQDe5Ki-AE-UVwxzRjwgavPC1YUoWHI2X8UNi0JP_sGb8Y9AtYXnach6FbvlYnM9LVQcv3XCJmLbTm4QnYpf1s_8VnNJpVButbCHAobog1RVoEBUjA_2I/s72-c?imgmax=800" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3029609170987457991.post-1334832580125753214</id><published>2010-07-04T18:44:00.001-07:00</published><updated>2010-07-04T18:44:54.299-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Image Processing"/><title type='text'>AForge.NET color filter C#</title><content type='html'>&lt;p&gt;&lt;font size=&quot;3&quot;&gt;We are going to filter the colors of the video feed from a webcam. We will be using AForge.NET image processing framework for this and C#. You can check my previous posts for some basic video capture from webcam.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;We have some steps as follows…&lt;/font&gt;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Acquire image from webcam (check previous posts - &lt;/font&gt;&lt;a href=&quot;http://picbot.spaces.live.com/?_c11_BlogPart_BlogPart=summary&amp;amp;_c=BlogPart&quot; target=&quot;_blank&quot;&gt;&lt;font size=&quot;3&quot;&gt;click here&lt;/font&gt;&lt;/a&gt;&lt;font size=&quot;3&quot;&gt; ) &lt;/font&gt; &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Create a color filter &lt;/font&gt; &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Apply filter&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;h2&gt;&lt;font color=&quot;#00ff00&quot; size=&quot;3&quot;&gt;Step 1: Check previous posts - &lt;/font&gt;&lt;a href=&quot;http://picbot.spaces.live.com/?_c11_BlogPart_BlogPart=summary&amp;amp;_c=BlogPart&quot; target=&quot;_blank&quot;&gt;&lt;font color=&quot;#00ff00&quot; size=&quot;3&quot;&gt;click here&lt;/font&gt;&lt;/a&gt;&lt;/h2&gt; &lt;h2&gt;&lt;font color=&quot;#00ff00&quot; size=&quot;3&quot;&gt;Step 2: Create a color filter&lt;/font&gt;&lt;/h2&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;First a little modification to the UI&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7FB5318/image29.png&quot; rel=&quot;WLPP&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb33&quot; border=&quot;0&quot; alt=&quot;image_thumb33&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSQR4LE1aUdbnxAGwA3vYfLlkQnhVpWAbo4nlMea770TVpxdNkEdiedOPufGhWgaMk4zBonB4q5Ylfry8FpUWhuR-CfG0E9H8n5WqxeAu6ELD1Kqe1Z0bTIuutoGW7otWPC9a0OcgUKYI/?imgmax=800&quot; width=&quot;450&quot; height=&quot;410&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;Then the code for the track bar.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7FB5318/image4.png&quot; rel=&quot;WLPP&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb2&quot; border=&quot;0&quot; alt=&quot;image_thumb2&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxGdyt3F0zumJLLm0ZDzfXJUX_wxJ0UhAuIjSCy1hXCO1LL5LAx-7ZB5pc9epgjN0yOh_YJB0-b7813cfAdi9S7SSWZfo-tcaRY20EMKhnhvvURlpPe2cN4NgH2FGY1lYFJ_kRj46X_Ck/?imgmax=800&quot; width=&quot;672&quot; height=&quot;483&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;Now as we move the slider, the variable for the RGB has to change accordingly. We have given the incremental/decremental value of 3. So when we move the slider, the value of RGB will change +3 or –3. You can change to required value by changing the TickFrequency value.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7FB5318/image8.png&quot; rel=&quot;WLPP&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb4&quot; border=&quot;0&quot; alt=&quot;image_thumb4&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAFuL1OlGp7n0xSL0GPAs1Jen254XywDGGTK1WtMoqeB8kZ63gn0TV21GhIk4oexadpztXUXNmuYiQA98lmU9FHtrLe5yFj_N848u2ePITXPhuNHNsWj7WU9dYzp_PtNJoikVmH-K3iOI/?imgmax=800&quot; width=&quot;658&quot; height=&quot;247&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;The main filter part. Please check this reference link/documentation ( &lt;/font&gt;&lt;a href=&quot;http://www.aforgenet.com/framework/docs/html/35bd90e3-4e35-8f5f-e255-26c5d8d4b927.htm&quot; target=&quot;_blank&quot;&gt;&lt;font size=&quot;3&quot;&gt;http://www.aforgenet.com/framework/docs/html/35bd90e3-4e35-8f5f-e255-26c5d8d4b927.htm&lt;/font&gt;&lt;/a&gt;&lt;font size=&quot;3&quot;&gt; ). I have done the same with a&amp;nbsp; little UI.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7FB5318/image34.png&quot; rel=&quot;WLPP&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb41&quot; border=&quot;0&quot; alt=&quot;image_thumb41&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyTUlxRHhv4WKxLV-pzVLjPpcdKlHu6EFTTkvbCPl1gzETy65kQlV3NPbHyR5gaJAqp7qz7QghsXtDgQ5cKdhUzVCZRDjq_fZc2Jo1eHu5x8P0QK3BLnp7eIBauBIXKyXjw7GZXSHLqSI/?imgmax=800&quot; width=&quot;676&quot; height=&quot;199&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;I am changing the value from 0 to the value in the track bar. You can add one more track bar for the lower value and can get a very good results.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;Here is the reference and source for this step 2&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;Links : &lt;/font&gt;&lt;a href=&quot;http://www.aforgenet.com/framework/docs/html/35bd90e3-4e35-8f5f-e255-26c5d8d4b927.htm&quot; target=&quot;_blank&quot;&gt;&lt;font size=&quot;3&quot;&gt;http://www.aforgenet.com/framework/docs/html/35bd90e3-4e35-8f5f-e255-26c5d8d4b927.htm&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;&lt;font color=&quot;#00ff00&quot; size=&quot;3&quot;&gt;Step 3: Apply filter&lt;/font&gt;&lt;/h3&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7FB5318/image24.png&quot; rel=&quot;WLPP&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb27&quot; border=&quot;0&quot; alt=&quot;image_thumb27&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlKpxrQOLVdEcRaMVE_0RHgFc_-SYm4WC6MrTCqRrDRKd8izYhfAgugmSIyjmOhB1643HENy4pWvSN4-nK2lusN9_VQhIZY-9CquO0is9sTvjbMv3X6iS0yfQSbbYPUF2kyBRVm6Cs3hc/?imgmax=800&quot; width=&quot;649&quot; height=&quot;208&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;Now run it !!!!!!!!!!!!!!!!!!!!!!! &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;It works !!!&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;Here are my results&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;The Original Screen (Before Processing)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;Note the trackbar at full. Move your trackbar to maximum initially. Else you will not see anything. Because all the filter will be at 0. Which means block everything.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7FB5318/image38.png&quot; rel=&quot;WLPP&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb43&quot; border=&quot;0&quot; alt=&quot;image_thumb43&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvHKbv0A4nYWdAlzKbPn03yCKjjCEK3aorzoDXs5kg2o6OIbEfrcflyuj9yQWXoYHD5cu40c1oQVgZ1jjNHyK2D3Vguh-oq89eWCd-OOoKRUfod8KH-gcN1Aup1rnoHCmiyJQkapSJ8tM/?imgmax=800&quot; width=&quot;453&quot; height=&quot;428&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;br&gt;&lt;/p&gt;&lt;font size=&quot;3&quot;&gt;After applying value of red filter (look at the red trackbar)&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7FB5318/image42.png&quot; rel=&quot;WLPP&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb45&quot; border=&quot;0&quot; alt=&quot;image_thumb45&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzKWrD_BLx7LkEtqmCzlg6TDDTKyEdUBcFb7xuJYm12rvF5BpCX72W3v6m6xvHDsTWcxca28L1SOGezfQ3XxKkctUKI14l-_BmnBBtBqu775-NquFYeR72yz0Yj7EQNh8ltKER2Xcl61c/?imgmax=800&quot; width=&quot;483&quot; height=&quot;458&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;br&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;Wow, the red is completely removed.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;Now lets try Blue. (bring back red trackbar to maximum)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7FB5318/image47.png&quot; rel=&quot;WLPP&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb48&quot; border=&quot;0&quot; alt=&quot;image_thumb48&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2EPFmugo6OJdRxdXlZ9pjeM-JUPsYaoDPVbhrr7D4AnM7qxeA5Xv5qDtGLurVN04gQ2uvSVYFQNH8IT2tF5XoUcoYSZAI-PTrEb0EsmvhtLobJuZIG__ZE6qPmPoLU8BOMoGwR9pFF2g/?imgmax=800&quot; width=&quot;473&quot; height=&quot;447&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;Light source is natural light (sun light) through window.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;Same blue filter with indoor lightings. Yes. Lights do affect the result a lot.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7FB5318/image51.png&quot; rel=&quot;WLPP&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb50&quot; border=&quot;0&quot; alt=&quot;image_thumb50&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtfWYYvzmgMCZEmXb1ejhPAedrHwIoHM60Y3Pr7-A5gWXhJUN_5boJ7crjepGB-WHem5kCtKnCPFN2meSJaiEZrxDr1YfSFQ-wjDUxoj0etOpXYUGSBOxaVAQOcGSAfJkE58LPBW0vL84/?imgmax=800&quot; width=&quot;476&quot; height=&quot;450&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;Green filter test..&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7FB5318/image55.png&quot; rel=&quot;WLPP&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb52&quot; border=&quot;0&quot; alt=&quot;image_thumb52&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitgEGrZgb11HcfMoDshTzD9euyLHQVctgL8Mda6KPSrMrr2PkrAZb1ccP85ykLs4xWHim3VBjNVU_ShZskJ-xn-6AGP03RIQ2TpRfQnv-KPfh8-QSFoC9jyj5NI1gGOCYb6w1MFcfzQhI/?imgmax=800&quot; width=&quot;484&quot; height=&quot;459&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;br&gt;&lt;font size=&quot;3&quot;&gt;Ok, but not impressive. Because the lower limit of the filter is 0. If we move both upper and lower, we’ll get impressive results.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;------------------------------------------- Using Lower Value for filter -----------------------------------------------------------------------&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;I just modified the UI so that I can change the lower value of the filter too. And I started playing to do some object isolation. Pretty nice. Here are some screen shots. Note the slide bar too.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7FB5318/image60.png&quot; rel=&quot;WLPP&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb55&quot; border=&quot;0&quot; alt=&quot;image_thumb55&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXBF3LOt_oRX04yZ4_IUBKosbi5LolNuz_c-Zwe-BGd_PAh_xs2dQzK7qih9wXL3vmXvIgM7C00UWxv0t3hMuihO-WOOadIS4VGWaArFHvOE_uRzNGH11crUpMF0L4lvtFsngAvL0Bsm4/?imgmax=800&quot; width=&quot;492&quot; height=&quot;395&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;Isolated the orange cup !!!!!!!!!!!!!!!1 success&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7FB5318/image67.png&quot; rel=&quot;WLPP&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb58&quot; border=&quot;0&quot; alt=&quot;image_thumb58&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW5wBmwrw3oPjeTvuqQ14GDhb1dmcWXV6rLIhWWc6Fgc99ABOBDkJ7kxyhN1ywUgFoAd5Hs2LUD82fSd9ClMyraTA2OvwopY9Zp5XDkJpmAhbNuGN2ZTInpRCBhACTUUdlgCcv3ywjo_A/?imgmax=800&quot; width=&quot;494&quot; height=&quot;396&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;br&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;Note : &lt;/font&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Lightings play a major part in image processing. We need to add more things in the future to make it work under any lightings. &lt;/font&gt; &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Camera also plays a major role. Due to some reasons, my camera shows green color in the background. Using good quality cameras, you can do miracles.&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;have a good day.&lt;br&gt;~Prem&lt;/font&gt;&lt;/p&gt;&lt;br&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;&lt;/font&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://irslab.blogspot.com/feeds/1334832580125753214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://irslab.blogspot.com/2010/07/aforgenet-color-filter-c.html#comment-form' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3029609170987457991/posts/default/1334832580125753214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3029609170987457991/posts/default/1334832580125753214'/><link rel='alternate' type='text/html' href='http://irslab.blogspot.com/2010/07/aforgenet-color-filter-c.html' title='AForge.NET color filter C#'/><author><name>Prem</name><uri>http://www.blogger.com/profile/14932135081288608213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSQR4LE1aUdbnxAGwA3vYfLlkQnhVpWAbo4nlMea770TVpxdNkEdiedOPufGhWgaMk4zBonB4q5Ylfry8FpUWhuR-CfG0E9H8n5WqxeAu6ELD1Kqe1Z0bTIuutoGW7otWPC9a0OcgUKYI/s72-c?imgmax=800" height="72" width="72"/><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3029609170987457991.post-7165079752766509393</id><published>2010-07-04T18:39:00.001-07:00</published><updated>2010-07-04T18:39:06.563-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Image Processing"/><title type='text'>Webcam using AForge.NET (Part II)</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;Now to use webcam and I will go with the USB camera. I know the name of the camera (from the tutorial Part I, pop up box) as “USB2.0 Camera” and it is index as number 4 (from 0). You need to draw a picture box and a button to start the camera in the design view like this&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7F9506A/image5.png&quot; rel=&quot;WLPP&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb5&quot; border=&quot;0&quot; alt=&quot;image_thumb5&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-TMBSqj_aOEeZzlq_gL88Rl1gx99R2L89OwbByX-wcIHVFJwIaO6hvjQya0TdY3Fux-PwJ9AnP0PYyfyL-JcFzjIszBo3eeWNNqEzrAQaMqrX4ONTZYHMwhx0FNj_m0-dm61R44hJ02k/?imgmax=800&quot; width=&quot;497&quot; height=&quot;308&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;Double click on the “Start Camera” button and we go to the code side. I am posting the code with comments. This will probably help you if you read the code.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7F9506A/image9.png&quot; rel=&quot;WLPP&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb10&quot; border=&quot;0&quot; alt=&quot;image_thumb10&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGo_pvL-gcE600MtaposfE0SFqeMt3Bh1l0zIZh5aVDXnWagDw3xNL0iA5hz6MbGfgEJmXiVyXJdpba2-fe4pAT964wLhXhTkqY15DWdpBDFs8L9noT2ZlgzhxwrXwEhCp_nEH7mGDZB8/?imgmax=800&quot; width=&quot;622&quot; height=&quot;558&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;And it works !!!!!!!!!!!!!!!!!!!!!!!!!&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;font face=&quot;Verdana&quot;&gt;Ok, here is another video from a different site. I am not the author. But just a crash programming. &lt;/p&gt; &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:3c0a88f8-1d34-4e24-9813-f35a01d5fe1f&quot;&gt;&lt;embed height=&quot;250&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;400&quot; src=&quot;http://vimeo.com/moogaloop.swf?clip_id=7526663&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1&quot; allowfullscreen=&quot;true&quot; allowscriptaccess=&quot;always&quot;&gt;&lt;/embed&gt;  &lt;p&gt;&lt;a href=&quot;http://vimeo.com/7526663&quot;&gt;C# Tutorial - Getting Images from Webcam using Aforge&lt;/a&gt; from &lt;a href=&quot;http://vimeo.com/user2610554&quot;&gt;shivam&lt;/a&gt; on &lt;a href=&quot;http://vimeo.com&quot;&gt;Vimeo&lt;/a&gt;.&lt;/p&gt; &lt;div style=&quot;width: 400px; clear: both; font-size: 0.8em&quot; class=&quot;wlEditField&quot; maxcharactersaccepted=&quot;245&quot; defaulttext=&quot;Enter video caption here&quot; wlpropertypath=&quot;Video.caption&quot;&gt;Here is the link to the source of this video and author http://vimeo.com/7526663&lt;/div&gt;&lt;/div&gt;&lt;/font&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;Up coming tutorials will be on image processing. I will be posting as I am learning.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;~Prem&lt;/font&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://irslab.blogspot.com/feeds/7165079752766509393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://irslab.blogspot.com/2010/07/webcam-using-aforgenet-part-ii.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3029609170987457991/posts/default/7165079752766509393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3029609170987457991/posts/default/7165079752766509393'/><link rel='alternate' type='text/html' href='http://irslab.blogspot.com/2010/07/webcam-using-aforgenet-part-ii.html' title='Webcam using AForge.NET (Part II)'/><author><name>Prem</name><uri>http://www.blogger.com/profile/14932135081288608213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-TMBSqj_aOEeZzlq_gL88Rl1gx99R2L89OwbByX-wcIHVFJwIaO6hvjQya0TdY3Fux-PwJ9AnP0PYyfyL-JcFzjIszBo3eeWNNqEzrAQaMqrX4ONTZYHMwhx0FNj_m0-dm61R44hJ02k/s72-c?imgmax=800" height="72" width="72"/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3029609170987457991.post-3095045355715953904</id><published>2010-07-04T18:36:00.001-07:00</published><updated>2010-07-04T18:36:37.378-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Image Processing"/><title type='text'>Webcam using AForge.NET (Part I)</title><content type='html'>&lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;Last tutorial we saw about setting up the environment to use AForge.NET. That was not a necessary tutorial, but it was my first post to see how to use windows live writer tool. And also that will give a sense satisfaction for people who have used OpenCV and trying AForge for the first time.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;So now we have a window look like this. ( you can refer the previous tutorial to see how we set this environment).&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7E8C3B5/image4.png&quot; rel=&quot;WLPP&quot;&gt;&lt;font face=&quot;Verdana&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb6&quot; border=&quot;0&quot; alt=&quot;image_thumb6&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGycq4s78p7A53W7feg2zOxVMTVG_UGWwJlOwgs0vaZSXO-i_QHlcpOwnmnmuVkhktPTqcFfdKewplDiTXxMiGyO86SDAJc0KjmggTbcV-py4kEBasY2fypdxZlHfWVoem7phdhSkOWow/?imgmax=800&quot; width=&quot;696&quot; height=&quot;247&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;Now the fun part. Programming !!!!!!!!!!!!!!!!!!!!!!!!!!&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;I am an Electrical guy, therefore according to records I am not a good programmer.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;Press the “F7” function key to go the see the code of this form.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;[or] right click on the form and select “View Code”&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7E8C3B5/image8.png&quot; rel=&quot;WLPP&quot;&gt;&lt;font face=&quot;Verdana&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb11&quot; border=&quot;0&quot; alt=&quot;image_thumb11&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBghzByEgV5CFO22Au1JF3mOf9ClbALZKcp0oJZdkMf_fxbEveBCeX5OpgglwgtaMS_CK5QWWVR3D6P1lV2SguzK_kJT-YAqjXnCaFtBRswEoyAwWpj6x1mc2e73m0dmAc-z1Y3aDZ97M/?imgmax=800&quot; width=&quot;366&quot; height=&quot;377&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face=&quot;Verdana&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font face=&quot;Verdana&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; It is the same.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;We will see a page like this&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7E8C3B5/image14.png&quot; rel=&quot;WLPP&quot;&gt;&lt;font face=&quot;Verdana&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb17&quot; border=&quot;0&quot; alt=&quot;image_thumb17&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY0hJ-WXqCV_y8EZLoJrdIGnpAOLp9NANV1bRtBQ9u9cti-MEPHxyBxTi_EmMdPz2KKvJMtKHNw3H6I8JNSybKLqCK5AsWijvJ8-z2_ugxoZ9DWNivltS56CceG_0nSfuMryadvQm4mz4/?imgmax=800&quot; width=&quot;534&quot; height=&quot;350&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;This is called the “code behind”. The previous one is called the “design view”. These are non standard terminologies used in programming environment. Just keep yourself updated because we’ll be using this in the upcoming tutorials.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;Add these two namespaces&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7E8C3B5/image19.png&quot; rel=&quot;WLPP&quot;&gt;&lt;font face=&quot;Verdana&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb28&quot; border=&quot;0&quot; alt=&quot;image_thumb28&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifV8Y6uhaKSJ7tC2Foi0iUhh3q4UOsRrPnwxAfecbT7Gu-UOlR2uSPUhxE08PT_3oNk6WCskZBq8nGcKGOZZAmjNEvRyaKkLXg-A39ncinqlCd6LNUK8BVXh0BEeKy1u_XeLT4tljCmwc/?imgmax=800&quot; width=&quot;539&quot; height=&quot;190&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;Before we use the webcam the code has to see the webcam (or ) the program has to know that there is a web cam attached to the computer. So here is our first aim&lt;/font&gt;&lt;/p&gt; &lt;h2&gt;&lt;font face=&quot;Verdana&quot;&gt;&lt;/font&gt;&lt;/h2&gt; &lt;h2&gt;&lt;font face=&quot;Verdana&quot;&gt;&lt;/font&gt;&lt;/h2&gt; &lt;h2&gt;&lt;font face=&quot;Verdana&quot;&gt;&lt;/font&gt;&lt;/h2&gt;&lt;font face=&quot;Verdana&quot;&gt;&lt;/font&gt; &lt;h2&gt;Aim : To list the USB camera attached to my computer&lt;/h2&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;Put a button in the form. So when we click on the button, it is going to popup box for each camera.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7E8C3B5/image24.png&quot; rel=&quot;WLPP&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb35&quot; border=&quot;0&quot; alt=&quot;image_thumb35&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkdcsYp-hUVsUI6q0Af-gpOwr88MCwORn7EU-bcgs5iPbVuYYc9qKlZRYi6iOhj-u7aEhO0WTBk0RMi-w2FaikhfbT-OgmvGdHGV_kwNGy8PBKnOs6cK23oDqOupFpx_oiNnjbBUQLr5w/?imgmax=800&quot; width=&quot;456&quot; height=&quot;435&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;br&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;Double click on the button and it will create a function. They call it the event handler. So when the applications is running and we click on the button, it will go to this function.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7E8C3B5/image29.png&quot; rel=&quot;WLPP&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb41&quot; border=&quot;0&quot; alt=&quot;image_thumb41&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO8ak5Gi7pVSOTM9NqdogXgU2yDW7IE1DUzzH2SoMLeCw4gcOOYG7kWtnHDrrrhkmmlbPHq7UTNki0zJBkK8m9h1_gtI2ze_UMTLotwUmaHWEwzhCZm9AQqx9ariziq08bNcYeLt1Vg2w/?imgmax=800&quot; width=&quot;488&quot; height=&quot;212&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;Now we are going to add code into this function so when we click the button it should list the USB camera attached to this computer (or laptop in my case). I will add the code and then explain the code with inline comments. I don’t want to add more screenshots and make this boring. So look at the following screenshot and try to read and understand the inline comments which will explain what is what.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7E8C3B5/image36.png&quot; rel=&quot;WLPP&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb51&quot; border=&quot;0&quot; alt=&quot;image_thumb51&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit7yBFDqCMscFlSiV7z0p45-aEkpXsyNpUhu9pKAjAVEODKBO4Aoav7xg72yXfZYJc0h0uDw83zyYQGnZ77yMQEe9me4WZQvrjEuxvSrMYPeWqONB1MILGsyKlY5jw5XGe08JYoQxfpY4/?imgmax=800&quot; width=&quot;492&quot; height=&quot;311&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;Now lets compile the code using the shortcut key (im sorry, im used to it. Sort of fun) [ Ctrl + Shift + b ] or you can directly run it by pressing the function key “F5”. But “F5” will properly execute only if the code has no errors. &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;Lets see what result I got when I ran this program. I got 2 Camera’s in my laptop. So lets see if it lists them all. The following screenshots are my outputs. &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;I got 2 outputs !!!&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;1&lt;sup&gt;st&lt;/sup&gt; Camera - HP Webcam&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7E8C3B5/image42.png&quot; rel=&quot;WLPP&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb57&quot; border=&quot;0&quot; alt=&quot;image_thumb57&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoK9X4BADFqb74UBfjrvglUDTiEd9urfsvE8_BOh1eIpKRj1oF1izDnZsVHkQZDqffpDEkN3G4mJIGGXTpXwnoxzmrRHCMLEszHxi7Jh633OCy1cXFGzappY_Z_hhkZGBsvNJ64tMucxQ/?imgmax=800&quot; width=&quot;414&quot; height=&quot;271&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;2&lt;sup&gt;nd&lt;/sup&gt; Camera – USB camera&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;file:///C:/Users/Prem/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles7E8C3B5/image49.png&quot; rel=&quot;WLPP&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; class=&quot;wlDisabledImage&quot; title=&quot;image_thumb64&quot; border=&quot;0&quot; alt=&quot;image_thumb64&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikswnqlC5yVkmWDvpqEs4rGjMNfLYvNpNL3hd70pcYcP1Cae6wz5iHza6xY0_z1Yp1hI4FKBbeExsScyOQ3fTcPzv0GVDnoUhzB0r8GDrM4H-xvGZC1fbWMcoP7FbiecU2GGV7h6ZoQXc/?imgmax=800&quot; width=&quot;418&quot; height=&quot;272&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;Awesome!!!!!!!!!!!!!!!!!!! AForge.NET got the list of camera’s connected to my computer.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;font face=&quot;Verdana&quot;&gt;Next tutorial is how to read video from a USB camera (a webcam in my case).&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font face=&quot;Verdana&quot;&gt;~Prem&lt;/font&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://irslab.blogspot.com/feeds/3095045355715953904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://irslab.blogspot.com/2010/07/webcam-using-aforgenet-part-i.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3029609170987457991/posts/default/3095045355715953904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3029609170987457991/posts/default/3095045355715953904'/><link rel='alternate' type='text/html' href='http://irslab.blogspot.com/2010/07/webcam-using-aforgenet-part-i.html' title='Webcam using AForge.NET (Part I)'/><author><name>Prem</name><uri>http://www.blogger.com/profile/14932135081288608213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGycq4s78p7A53W7feg2zOxVMTVG_UGWwJlOwgs0vaZSXO-i_QHlcpOwnmnmuVkhktPTqcFfdKewplDiTXxMiGyO86SDAJc0KjmggTbcV-py4kEBasY2fypdxZlHfWVoem7phdhSkOWow/s72-c?imgmax=800" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3029609170987457991.post-5420634778330023006</id><published>2010-07-04T18:13:00.001-07:00</published><updated>2010-07-04T18:13:21.347-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Image Processing"/><title type='text'>AForge.NET &amp;lt;&amp;gt; Visual Studio 2010 Setup (Tutorial)</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;First we have to download AForge.NET from here ---&amp;gt; &lt;/font&gt;&lt;a href=&quot;http://code.google.com/p/aforge/downloads/list&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;AForge.NET library Download&lt;/font&gt;&lt;/a&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;.&lt;/font&gt; Assuming we are using a Windows OS, download the latest .exe. After downloading install it. &lt;/p&gt; &lt;p&gt;Once installed we will be able to see the binaries in here&lt;/p&gt; &lt;p&gt;&lt;font color=&quot;#c0504d&quot;&gt;C:\Program Files (x86)\AForge.NET\Framework\Release&lt;/font&gt;&amp;nbsp;&amp;nbsp; - For 64 bit OS&lt;/p&gt; &lt;p&gt;&lt;font color=&quot;#c0504d&quot;&gt;C:\Program Files\AForge.NET\Framework\Release&amp;nbsp; &lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;- For 32 bit OS&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://zlzmya.bay.livefilestore.com/y1m-DkQFhmewiku-0oRuk676emgy71ZSiHzlSk28w6NboHh9u85HqgsYNVqaY8UuzqEhCuosZ9kkiSCJlxtjTh_jGRVAJOdfl4RdNI2JAcupXdykWL9sAjG4OYgzUJpamezy0kNAUGOE1a-_pU8QezK5A/image[8].png?download&amp;amp;psid=1&quot; rel=&quot;WLPP&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://zlzmya.bay.livefilestore.com/y1m04p7yiOJzAI3y3U_1XJHiR2ri0_2MP2U1yz9a5yr2Kc-RtR_N4ni28yW5JzIzEFkiad3W1KtDNlwOCPT2YEJVP_Ga9PCEYZVQw2-dXK2cKYoRWOb_wbuNz_Ap3Wpix5tcyVU8uA-l_VWuADVkwWuhw/image_thumb[11].png?download&amp;amp;psid=1&quot; width=&quot;633&quot; height=&quot;451&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;br&gt; &lt;p&gt;Now I assume we already have Visual studio installed in you computer. I will be demoing with VS2010 (even 2008 is compatible).&lt;/p&gt; &lt;p&gt;&lt;font color=&quot;#00ff00&quot;&gt;File –&amp;gt; New –&amp;gt; Project&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color=&quot;#00ff00&quot;&gt;Select “Windows Forms Application”&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://zlzmya.bay.livefilestore.com/y1mFGAWZTVGZMXKSA4nRMy8iNzHIu6UlDOep-nd32S1rlpsq1-UxVzMcgSV6_WlFtLuLXB_sx2qY431Hdt2MmMnQ0rQ3dq7xKhgr7102OX6XBqrBkVsey_yKOXqqLUKkNpydnN2UoFN-4gYiqPr9oZG3w/image[15].png?download&amp;amp;psid=1&quot; rel=&quot;WLPP&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://zlzmya.bay.livefilestore.com/y1ms3jRtlp5328XVVC0o8ImEVgi5CzSWsHzZ0y_Gg-ZARzVeZ68yi11-zUrqEXWiQcxzaxVQ8PXGSesJZ_WEoRVz6sMCA7Y78YdeFHuMtyNKzS3hvSSmJiG1Of-H9eA1LMfRYWWMLPSg3qvKWeNX-GF8Q/image_thumb[19].png?download&amp;amp;psid=1&quot; width=&quot;677&quot; height=&quot;426&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Then we get a window like this&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://zlzmya.bay.livefilestore.com/y1mxTc1PBCn5v4oY2_J_vWa1HgFdTh899m1I4k0uiIcGQMNNKAlq8nrVkkyxPdHKBS0Tf8B7Bi9m-5WxCCbty9UURhxqeCApeqBjehHIj2mO67RGOGmjp7bYc2AeJmJNCnvrTKhW_f4dXjxucFyYOBtWg/image[21].png?download&amp;amp;psid=1&quot; rel=&quot;WLPP&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://zlzmya.bay.livefilestore.com/y1mqLDqxo3mUJiRka112Jsx4y2BHxY-9FJownQYv5K6-IzfD0R10LpXSeUEGVadupZEganmcpGTvOx1ZfDsKiYr_02BHeIZy-x_pvFAUQP-oZ0ZpTnhV6bt2Oi72iWI057Htv115ICymULT3GNAeILQQw/image_thumb[23].png?download&amp;amp;psid=1&quot; width=&quot;699&quot; height=&quot;465&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;/p&gt; &lt;p&gt;Add AForge.NET libraries as reference. To do this right click on Reference (in Solution explorer).&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://zlzmya.bay.livefilestore.com/y1miGzaInYpSpRtl4zFD_tWV9G45w0DbfLQR1FnbXh4JVJfwjLqgQqNvXQIG-Nq5jeKCRK4hkR6bP_VC7gP1FwIFWUZqdMU_sNfLeAzQwv9x3LIEy_8_ZoAPuUefegJDK-gtV2PkT0hNB9xi6r1GJKMjQ/image[26].png?download&amp;amp;psid=1&quot; rel=&quot;WLPP&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://zlzmya.bay.livefilestore.com/y1mb2tXHeZYX21-GfhdMwSdGrZCpyfRLe6OVi_IsSrC_X7ZdnsHMSlAhnZYkN3ui2f4MmNCRlSwXvKnPvm-CK3WuWo8qob5G2mlPOLw3Qc6WbeBqV5fnoXB3hLun8DzdjmqyJ7OS1sDXp5NLyXH023TPw/image_thumb[29].png?download&amp;amp;psid=1&quot; width=&quot;421&quot; height=&quot;292&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The browse to the folder where we installed the AForge.NET libraries&lt;/p&gt; &lt;p&gt;&lt;font color=&quot;#c0504d&quot;&gt;C:\Program Files (x86)\AForge.NET\Framework\Release&lt;/font&gt;&amp;nbsp;&amp;nbsp; - For 64 bit OS&lt;/p&gt; &lt;p&gt;&lt;font color=&quot;#c0504d&quot;&gt;C:\Program Files\AForge.NET\Framework\Release&amp;nbsp; &lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;- For 32 bit OS&lt;/font&gt;&lt;/p&gt;&lt;a href=&quot;https://zlzmya.bay.livefilestore.com/y1mBifnCtgYvDaS9rAbsmO6NxQjQesU34Fs4kh1XHCXwuLq0N8T-U7p4ptxOh4kADJS4YKDbY_lHYtugjorO4PLmroqg0cyszgDhaIQ0go9VbSa110E-rL0OUiHDZQmREb2KqUqAluLD4TGxUPlpp7ENQ/image[31].png?download&amp;amp;psid=1&quot; rel=&quot;WLPP&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://zlzmya.bay.livefilestore.com/y1m9APLWAlKBkte0vSFMQXeYUxnnDe_Ang5w0FwAG_QrPDYqwGxGkkAb943jbxXRcna_OK5qzE2CbYadEibPg_AEp54qQHEOaBEQQnwmlDE9YwfIDkOWqiWoJPQGiYivYfGtJp_8Fs9YzKbBcyClrFP1w/image_thumb[32].png?download&amp;amp;psid=1&quot; width=&quot;627&quot; height=&quot;484&quot;&gt;&lt;/a&gt;&lt;br&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Since our next tutorial is going to be on using AForge.NET with Webcam, we are going to add only the required binaries (.dll) namely &lt;font color=&quot;#f79646&quot;&gt;Aforge.Video.dll&lt;/font&gt; and &lt;font color=&quot;#f79646&quot;&gt;Aforge.DirectShow.dll&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://zlzmya.bay.livefilestore.com/y1mFZOmXToK4_r7nYoI6YnJXm00jTqanrZODad4cp_TTJda6Dsdol0_Ia2XDU5FPR4NzQMQnNSE5IzCWJQtKcXyHuPngfXqdum-ybskc1L-wKv5gHLRU5LiNXckf6YWyQryZWfgLdntVTBCwDnhPLfBHQ/image[37].png?download&amp;amp;psid=1&quot; rel=&quot;WLPP&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://zlzmya.bay.livefilestore.com/y1mhMKbHno2h_moZyieE-MZuksaWhaZbDpyK9sPpHhnnI5_9XqhG4tgoaC1pwD7OiCs9OROYiHmtgBb083OFi5sFVysbJFRciiS4z7altzjGdrp2RonvKcV-dSEpQMkYRlfn7ynXGyUQnnZQGntMOvHWQ/image_thumb[48].png?download&amp;amp;psid=1&quot; width=&quot;654&quot; height=&quot;197&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;/p&gt; &lt;p&gt;On click “OK” we should be able to see the binaries (.dll) listed in the solution explorer under the reference folder like this&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://zlzmya.bay.livefilestore.com/y1meAkTbLq8xbg7oqVk1tBSwVoZfkTqiDRwgW3Zpp_jO0WzBKTjSOgXLokDkG0CkEFS1hfY1xqgWOmY72pNUPEFUxiiL3bfjxN_-ItgoCQ69m7HpLb08i7gsVWEj5iUUzv_ZqRt4e1356J-Y8g7OEx-nA/image[46].png?download&amp;amp;psid=1&quot; rel=&quot;WLPP&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://zlzmya.bay.livefilestore.com/y1mheurr_unBo3yjbTA7aP1WaviUK1orkQsuKzN4OC8KSGNu_sffQAqMhO8CQ-iKXL5au9V3Cz5Ia75w73bS0QbZknIOpXaqRoGl16WrKKiAINEXDWjSdKDPDs8WzZ7XP7RPVrCR0kM10IJnC1Vki8Xbg/image_thumb[60].png?download&amp;amp;psid=1&quot; width=&quot;310&quot; height=&quot;326&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Done !!!! Now we have our environment ready to do some basic webcam stuff. &lt;br&gt;&lt;/p&gt;See you in next tutorial.&lt;br&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;~Prem&lt;/p&gt;&lt;!-- AddThis Button BEGIN --&gt; &lt;div class=&quot;addthis_toolbox addthis_default_style&quot;&gt;&lt;a class=&quot;addthis_button_compact&quot; href=&quot;http://www.addthis.com/bookmark.php?v=250&amp;amp;username=xa-4c2c85b74396fd04&quot;&gt;Share&lt;/a&gt; &lt;span class=&quot;addthis_separator&quot;&gt;|&lt;/span&gt; &lt;a class=&quot;addthis_button_facebook&quot;&gt;&lt;/a&gt;&lt;a class=&quot;addthis_button_myspace&quot;&gt;&lt;/a&gt;&lt;a class=&quot;addthis_button_google&quot;&gt;&lt;/a&gt;&lt;a class=&quot;addthis_button_twitter&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;span id=&quot;preserveabef16358bb04669aef820f4b80a71e0&quot; class=&quot;wlWriterPreserve&quot;&gt;&lt;SCRIPT type=&quot;text/javascript&quot; src=&quot;http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4c2c85b74396fd04&quot;&gt;&lt;/SCRIPT&gt;&lt;/span&gt;&lt;!-- AddThis Button END --&gt;  </content><link rel='replies' type='application/atom+xml' href='http://irslab.blogspot.com/feeds/5420634778330023006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://irslab.blogspot.com/2010/07/aforgenet-visual-studio-2010-setup.html#comment-form' title='24 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3029609170987457991/posts/default/5420634778330023006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3029609170987457991/posts/default/5420634778330023006'/><link rel='alternate' type='text/html' href='http://irslab.blogspot.com/2010/07/aforgenet-visual-studio-2010-setup.html' title='AForge.NET &amp;lt;&amp;gt; Visual Studio 2010 Setup (Tutorial)'/><author><name>Prem</name><uri>http://www.blogger.com/profile/14932135081288608213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>24</thr:total></entry></feed>