Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1019279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:59:13+00:00 2026-05-16T10:59:13+00:00

I have an image which is pretty much b&w and it has a black

  • 0

I have an image which is pretty much b&w and it has a black square on white background. How can i determine cooridnates of this square?

It is actually scanned doc and these squares are used for calibration and positioning of the scanned image. I guess I need AI and neural networks for this but I’d rather use something simpler. I just need a coordinates of a pixel inside that square.

I can read image pixel by pixel using standard Java API but that seem to be naive solution.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:59:14+00:00Added an answer on May 16, 2026 at 10:59 am

    You have to read the image pixel by pixel unless you want to use an image processing framework which uses pretty complex algorithms. But here are some tips to make the task more simple?

    1. How big is the rectangle? If you know that it’s pure white and at least 10 pixels wide, you can scale the image down by a 10th. Now you just need to look for a single, white (or very light gray) pixel. Alternatively, you can only read every 10th pixel.

    2. Crop the image before you start your search, that is ask the Java image API for all pixels in a row and then check whether they are all the same. If so, then you can ignore that line.

    3. Of course, reality rarely is that sharp. So you need to run a filter on the image which turns a pixel white if at least 3 of its 8 neighbors are white and black if more than 6 neighbors are black.

    4. If you can, start with a gray image and convert that to B&W yourself. That way, you can optimize the result for your needs (for example, set the cut at 60 or 80 instead of 128).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hope someone has an easy answer on this. I have a header image which
I have an Image inside UIScrollView which i can zoom in and out. I
I have a dashboard pretty much a rip off of BBC.com which allows you
I have pretty much tried everything but still have this same problem. I have
I have an image which is placed in the middle of the screen all
I have an image which is just made of one color ? (it could
I have an image which is added to the project. In the simulator it
Does libjpeg allows/have routines to scale the output image? I have an image which
I have a view and template called index.html. I have a image which is
I have a greyscale image which was created from a RGB image using farmula:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.