Link to home
Start Free TrialLog in
Avatar of ADFB
ADFB

asked on

Detect Position of Images, Ignoring Noise (C# or PHP or ImageMagick)

I have some 2bit (black & white) images which contain a lot of noise and also images.

I need to detect roughly where the images are on the page.

What I'm thinking is if I separate the file into blocks, then count the number of black pixels in each block. I can then take an average for all the blocks. Then I know that blocks with significantly more black pixels in their block than average will contain an image.

What is the best and fastest way of coding this? I can do it in any language. It's being run from command line on Debian 6.

Thank you for your help!
ASKER CERTIFIED SOLUTION
Avatar of Zoppo
Zoppo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ADFB
ADFB

ASKER

Looks very interesting...

How would I do this with OpenCV?

The pages are B&W and consist of text, images, and lots of noise (in large black dots and some small lines). How would I use OpenCV to remove all the noise, keeping the text and images? (Or just keeping the images since I have an image mask for protecting the text anyway.)
Sorry, I don't have any experience with OpenCV - I just found it some years ago and took a look at some samples and found it very interesting. But about how to solve your problem with OpenCV I cannot help you much ...
Make a Google search for "Image Recognition" and you will see where we are in this rapidly advancing field.  The Wiki article appears to be particularly good.
http://en.wikipedia.org/wiki/Computer_vision