steps for creating a histogram for binary image in JAVA

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • balucec
    New Member
    • Apr 2010
    • 4

    steps for creating a histogram for binary image in JAVA

    Please explain the steps to create a histogram for a binary image using JAVA(JAI).
    I m working out a project wherein I need to separate single sentences (individual lines only; not upto full stop)from a scanned handwritten document in one of the Local languages of INDIA. If you have any idea regarding the separation of lines pls share it with me..
    and pls dont forget the histogram..
    since it's a research project i need the best solutions.. pls help
  • chaarmann
    Recognized Expert Contributor
    • Nov 2007
    • 785

    #2
    How to detect space between text lines?
    You can detect the separating blank stripes between text lines if you look for consecutive dots of white color (usually all bits set in RGB), that means a row of bytes that have all the same value if the document was scanned in horizontally. (Vertical scanned documents must be flipped 90 degree before).

    Regarding "histogram" :
    Basically, you will go through all bytes of the image and calculate a statistic about how often which value shows up.
    I googled for you "histogram of binary image" and the first hit shows me some formulas how to calculate it. Did you read it? Why not, what problem did you have there, can you tell me? I would copy and paste the formula here for you, but first I am probably violating copyright and second I can't show it up here in the forum as nice as it's there regarding text formatting. So please look it up yourself. You can research in your research project if this is the best solution. Maybe you'll find a better one. If you don't research yourself but instead only manage answers of other researchers, then it's not a research project, but a management project.

    Comment

    Working...