AForge.NET

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

Checking whether an image have edge(s) or not

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

Checking whether an image have edge(s) or not

Postby hoho2312 » Wed Jan 09, 2019 2:28 pm

Hello everyone, I am quite new to the field of image processing and I just found this framework, which is really helpful for my work.

I am now having a problem to determine the edges of some images. However, those images may not have edges at all.
I once tried to look through the edge detectors, but it seems that they are all based on the assumption that the image must have edge.
Does AForge provide any function (or combination of functions) which can help to check whether images have edge or not, before applying the edge detector?
Thank you very much.
hoho2312
 
Posts: 2
Joined: Wed Jan 09, 2019 2:10 pm

Re: Checking whether an image have edge(s) or not

Postby andrew.kirillov » Wed Jan 09, 2019 2:45 pm

Hello,

It is very difficult to understand what you mean by "image with edges" and "image without edges". And so hard to advice anything.

Any sample images available?
With best regards,
Andrew


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

Re: Checking whether an image have edge(s) or not

Postby hoho2312 » Thu Jan 10, 2019 2:12 am

I just tried to get two sample images, one should have edges but one should not.

I also tried to apply a SobelEdgeDetector to them and have the processed image.

The first one is the image with edge:
Image

The second one is the image without edge:
Image

For the second image, I once assumed that the edge detection method will give out a totally black image (so that I can check whether it contains any non-black pixels), but I was wrong.
In fact, when the input image is without edge, the edge detection method will give an image with many randomly scattered black and white pixels. This makes me even more confused...
hoho2312
 
Posts: 2
Joined: Wed Jan 09, 2019 2:10 pm

Re: Checking whether an image have edge(s) or not

Postby andrew.kirillov » Thu Jan 10, 2019 8:12 am

So, for the black image on the right. What if you try some thresholding first to remove low intensity pixels and the do blob processing? If it results in a large blob, then it might be like the object you are looking for.
With best regards,
Andrew


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




Return to AForge.NET Framework