draco1023 / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 0 forks source link

An unhandled exception of type 'System.StackOverflowException' occurred in AForge.Imaging.dll #82

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Bitmap bitmap = new Bitmap(@"test.tif"); //Attached File
2. AForge.Imaging.RecursiveBlobCounter rbc = new RecursiveBlobCounter();
3. rbc.ProcessImage(bitmap);

What version of the product are you using? On what operating system?
AForge 1.7.0.0
Windows 2008 x64

Original issue reported on code.google.com by mareatu...@gmail.com on 14 Dec 2008 at 8:21

Attachments:

GoogleCodeExporter commented 9 years ago
Caused by infinity loop with RecursiveBlobCounter.LabelPixel()

Original comment by mareatu...@gmail.com on 14 Dec 2008 at 8:23

GoogleCodeExporter commented 9 years ago
Please, read documentation to the class before. It is said there that the class 
should not be applied to images with big objects, since it requires big stack, 
which 
may cause its overflow. The recursive version is only useful for small objects 
- 
like stars on the sky.

I would suggest you to BlobCounter class, which does not depend on stack.

By the way. I believe you have a wrong image and you will not get anything good 
with 
it. Blob counter relies on the fact that background is black, but objects are 
none 
black. But you have different situation.

Original comment by andrew.k...@gmail.com on 14 Dec 2008 at 9:57