?
Solved

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

Posted on 2011-09-16
4
Medium Priority
?
429 Views
Last Modified: 2012-05-12
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!
0
Comment
Question by:ADFB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 31

Accepted Solution

by:
Zoppo earned 2000 total points
ID: 36548492
Hi ADFB,

maybe it's overkill for your need, but you should take a look at the open source library OpenCV (http://en.wikipedia.org/wiki/OpenCV) which is especially made for things like image segmentation and recognition. This cross-platform library can be used from C, C++, C#, Python, Ruby, Java, maybe more ...

ZOPPO
0
 

Author Comment

by:ADFB
ID: 36548569
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.)
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 36548593
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 ...
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 36552122
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
0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question