Results 1 to 8 of 8
  1. #1
    damien.raemy is offline Member
    Join Date
    Sep 2011
    Posts
    4
    Rep Power
    0

    Question Library to split picture

    Hello,

    I search a Java library that we can use to split an image automatically. The idea is that scan a letter and use this library to split and analyze the elements of the letter (content, sender address, receiver address, ...).

    Does anyone know a library that I could use?

    Thanks.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,323
    Rep Power
    25

    Default Re: Library to split picture

    The BufferedImage class has a method that will get sub images out of an image. Use that with a set of x,y,width, height values and an array should do it.

  3. #3
    damien.raemy is offline Member
    Join Date
    Sep 2011
    Posts
    4
    Rep Power
    0

    Default Re: Library to split picture

    Thanks for your answer.

    I think I haven't well explained my problem: I don't want to extract a subimage. I want a library that calculate and give me coordonate (x, y, width, height) of each element in the image. After, I will can use your method to "cut" the image.

    For example, look at this picture:
    Library to split picture-11949844071868980516addressed_envelope_with_stamp_01.svg.med.png

    I want a library that analyze the picture and return me the separated elements:
    - The sender address
    - The recipient address
    - The stamp.

    Do you have an idea?

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,323
    Rep Power
    25

    Default Re: Library to split picture

    calculate and give me coordonate (x, y, width, height) of each element
    How is an element of an image defined?
    Is there a white background with groups of other colored pixels for the elements?
    You want to draw a rectangle around each of the groups of non-background colored pixels where the background colored border is greater than a certain number of pixels.

  5. #5
    damien.raemy is offline Member
    Join Date
    Sep 2011
    Posts
    4
    Rep Power
    0

    Default Re: Library to split picture

    How is an element of an image defined?
    An element is defined because it has white space around it (see my example).

    My project is:
    - Registered letter
    - Split the scanned image in elements (my question): address, barecode
    - Archive some elements (barecode) and read and store texts in a database using an OCR

  6. #6
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,323
    Rep Power
    25

    Default Re: Library to split picture

    Are you going to write the code to do the scan to find the elements?

  7. #7
    damien.raemy is offline Member
    Join Date
    Sep 2011
    Posts
    4
    Rep Power
    0

    Default Re: Library to split picture

    No, it's too complicate and should take too much time. I'm searching an OpenSource library that do that.

  8. #8
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,323
    Rep Power
    25

Similar Threads

  1. Split a String with split()--Help
    By danilson in forum New To Java
    Replies: 7
    Last Post: 11-19-2010, 04:08 PM
  2. I want to put the native library in library path in mac os x
    By Hussain Ali in forum Advanced Java
    Replies: 2
    Last Post: 02-24-2010, 07:55 AM
  3. How to split a String using split function
    By Java Tip in forum java.lang
    Replies: 4
    Last Post: 04-17-2009, 08:27 PM
  4. Tell me jar file for library library org.bouncycastle.cms
    By 82rathi.angara in forum New To Java
    Replies: 10
    Last Post: 09-09-2008, 05:11 AM
  5. How to split a String using split function
    By JavaBean in forum Java Tip
    Replies: 0
    Last Post: 10-04-2007, 09:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •