AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

Image identification and tracking

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

Image identification and tracking

Postby sriranga » Sat Apr 25, 2009 7:20 am

Hi everyone,
I am using my webcam to track a red/blue LED in my hand.. I am using the Afore.net framework 1.7.. So far I have been able to access the webcam data, and do some basic manipulation on the images..

Can someone suggest me how I can identify a RED LED's position from the background and later track it.. It will be very helpful if you can throw some light on image identification..
sriranga
 
Posts: 11
Joined: Sun Mar 01, 2009 2:36 pm

Re: Image identification and tracking

Postby andrew.kirillov » Sat Apr 25, 2009 8:12 pm

Hello,

I believe you are using one of the available color filters to find LEDs of different colors ... If so, then you may use grayscaling after that and then blob counting. Blob counter will give you size and position of each found object.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 2571
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Re: Image identification and tracking

Postby sriranga » Mon Apr 27, 2009 6:00 am

Thanks a lot.. Will try it out today.. Is blob tracking better than using unsafe code and finding the position of each object?

PS : I copy-pasted the code from motion detector example to interact with my webcam.. Removing components I didn't need.. Is there any documentation on how to actually access the webcam from scratch?
sriranga
 
Posts: 11
Joined: Sun Mar 01, 2009 2:36 pm

Re: Image identification and tracking

Postby andrew.kirillov » Mon Apr 27, 2009 6:56 pm

sriranga wrote:Is blob tracking better than using unsafe code and finding the position of each object?

Blob counter already does the work of searching objects, their size and position. It uses unsafe section for this.

sriranga wrote:Is there any documentation on how to actually access the webcam from scratch?

Maybe we need to check this and this ...
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 2571
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Re: Image identification and tracking

Postby sriranga » Mon Apr 27, 2009 7:19 pm

Again,

Thanks a lot.. I am able to get the position from the blob counter.. Works like a charm..

I am using AForge 1.7 version. I tried adding controls from AForge.Controls.Dll. It had only histrogram and some chart function. If I am not wrong, The webcam video is played in a VideoSourcePlayer control right?

Do you have drag and drop functionality for this control in AForge 2.0?

One more thing, I am really new to this.. How does my code compile in safe mode if the blob is using unsafe internally? Is it because it is a .Net component?
sriranga
 
Posts: 11
Joined: Sun Mar 01, 2009 2:36 pm

Re: Image identification and tracking

Postby andrew.kirillov » Mon Apr 27, 2009 8:10 pm

Hello,

sriranga wrote:One more thing, I am really new to this.. How does my code compile in safe mode if the blob is using unsafe internally? Is it because it is a .Net component?

AForge.Imaging.dll is already compiled with unsafe option, which is enough. This option should be enabled only in the assembly, which uses unsafe code explicitly.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 2571
Joined: Fri Jan 23, 2009 9:12 am
Location: UK




Return to AForge.NET Framework