AForge.NET

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

Segmentation

The forum is to discuss topics related to different areas of image processing and computer vision.

Segmentation

Postby christina wie » Thu Mar 15, 2012 4:07 pm

Hello,
Well i have a problem, i have an image in that image(given below) i have characters. I use extractblobsimage() method to segment out each character individually to the best of my knowledge it should work but in reality it is not working.I repeat i just want to segment out each character,for exapmle in the image below i want "N""K""8""0""5" individually seperated

Code: Select all
    BlobCounterBase bc = new BlobCounter();
            bc.FilterBlobs = true;
            bc.MinHeight = 5;
            bc.MinWidth =  5;
           
            bc.ProcessImage(image);
            Blob[] blobs = bc.GetObjectsInformation();
            MessageBox.Show(bc.ObjectsCount.ToString());
            for(int i=0,n=blobs.Length;i<n;i++)
            {
                if (blobs.Length > 0)
                {

                    bc.ExtractBlobsImage(image, blobs[i], true);

                    copy = blobs[i].Image.ToManagedImage();
                    copy.Save(i + "segmented character.jpg");
                   
                   
                }
               
            }
Attachments
test-.jpg
test-.jpg (13.48 KiB) Viewed 671 times
christina wie
 
Posts: 41
Joined: Fri Jul 01, 2011 6:48 am

Re: Segmentation

Postby andrew.kirillov » Thu Mar 15, 2012 4:20 pm

Hello,

First of all, when you say "it is not working", you better be more specific and explain what it does instead.

Second, please, read documentation, which clearly says that BlobCounte expects background to be BLACK and objects to be not black (WHITE, for example).
With best regards,
Andrew


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

Re: Segmentation

Postby christina wie » Thu Mar 15, 2012 5:00 pm

Hello
Yeah i did it all it required was inverting it
p.s i must admit that 80% of errors are their because we just don't read documentation clearly.Next time i will definitely have a harder look at documentation
Thanks
christina wie
 
Posts: 41
Joined: Fri Jul 01, 2011 6:48 am




Return to Image Processing and Computer Vision

cron