RSS/Atom feed Twitter
Site is read-only, email is disabled

extract text in a rectangle from a jpg file

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

8 of 9 messages available
Toggle history

Please log in to manage your subscriptions.

extract text in a rectangle from a jpg file PoWah Wong 02 Mar 23:07
  extract text in a rectangle from a jpg file Kevin Cozens 02 Mar 23:27
extract text in a rectangle from a jpg file powah 04 Mar 17:08
  extract text in a rectangle from a jpg file Daniel Hornung 04 Mar 18:35
extract text in a rectangle from a jpg file Jernej Simon?i? 04 Mar 18:35
extract text in a rectangle from a jpg file PoWah Wong 04 Mar 21:00
  extract text in a rectangle from a jpg file Daniel Hornung 05 Mar 15:21
acfad57e0903041214j1c268af7... 07 Oct 20:19
  extract text in a rectangle from a jpg file PoWah Wong 04 Mar 21:46
PoWah Wong
2009-03-02 23:07:45 UTC (almost 16 years ago)

extract text in a rectangle from a jpg file

How to extract (get or copy) text in a rectangle from a jpg file? i.e. the jpg file has a rectangle which has some text (character strings). How to get those text to a text file?

___________________

Kevin Cozens
2009-03-02 23:27:48 UTC (almost 16 years ago)

extract text in a rectangle from a jpg file

PoWah Wong wrote:

How to extract (get or copy) text in a rectangle from a jpg file? i.e. the jpg file has a rectangle which has some text (character strings). How to get those text to a text file?

You need to take a look at some of the OCR programs like Tesseract (http://code.google.com/p/tesseract-ocr/).

powah
2009-03-04 17:08:31 UTC (almost 16 years ago)

extract text in a rectangle from a jpg file

My image is 640 x 512 pixels & X Y resolution are both 300 pixels/in. How to improve the image so that the OCR programs will recognize the text better? I try the "Scale Image" menu with different values of pixels & X Y resolutions (e.g. 1920 x 1536 pixels & X Y resolution are both 1200 pixels/in) but does not seem to improve the result.

Daniel Hornung
2009-03-04 18:35:33 UTC (almost 16 years ago)

extract text in a rectangle from a jpg file

On Wednesday 04 March 2009, powah wrote:

My image is 640 x 512 pixels & X Y resolution are both 300 pixels/in. How to improve the image so that the OCR programs will recognize the text better? I try the "Scale Image" menu with different values of pixels & X Y resolutions (e.g. 1920 x 1536 pixels & X Y resolution are both 1200 pixels/in) but does not seem to improve the result.

In most cases there's not much you can do, since scaling the image up doesn't increase the amount of available information. The best programs to improve such images do nothing more but good (sometimes surprisingly good) guesses. Maybe greycstoration[1] could improve the situation a bit? And the OCR program might work better with increased contrasts, so playing around with the levels (or curves) tool could also help.

Daniel

[1] http://cimg.sourceforge.net/greycstoration/index.shtml

Jernej Simon?i?
2009-03-04 18:35:50 UTC (almost 16 years ago)

extract text in a rectangle from a jpg file

On Wed, 4 Mar 2009 16:08:31 +0000 (UTC), powah wrote:

My image is 640 x 512 pixels & X Y resolution are both 300 pixels/in. How to improve the image so that the OCR programs will recognize the text better? I try the "Scale Image" menu with different values of pixels & X Y resolutions (e.g. 1920 x 1536 pixels & X Y resolution are both 1200 pixels/in) but does not seem to improve the result.

640x512 seems pretty small for something to OCR out. What kind of image is it?

Note that resizing will not have any positive effect on text recognition.

PoWah Wong
2009-03-04 21:00:23 UTC (almost 16 years ago)

extract text in a rectangle from a jpg file

--- On Mon, 3/2/09, PoWah Wong wrote:

From: PoWah Wong
Subject: extract text in a rectangle from a jpg file To: gimp-user@lists.XCF.Berkeley.EDU Received: Monday, March 2, 2009, 5:07 PM How to extract (get or copy) text in a rectangle from a jpg file?
i.e. the jpg file has a rectangle which has some text (character strings). How to get those text to a text file?

640x512 seems pretty small for something to OCR out. What kind of image is

it?

Note that resizing will not have any positive effect on text recognition.

Attached is the image.
It has some text inside some rectangles.

___________________

PoWah Wong
2009-03-04 21:46:06 UTC (almost 16 years ago)

extract text in a rectangle from a jpg file

--- On Thu, 3/5/09, Chris Mohler wrote:

From: Chris Mohler
Subject: Re: [Gimp-user] extract text in a rectangle from a jpg file To: "PoWah Wong"
Cc: gimp-user@lists.xcf.berkeley.edu Received: Thursday, March 5, 2009, 7:14 AM On Thu, Mar 5, 2009 at 2:00 PM, PoWah Wong wrote:

Attached is the image.
It has some text inside some rectangles.

Wow - that's tough. No chance of getting the original at a higher
res? I tried tesseract and was only able to get roughly half of
it.... In GIMP -> Grayscale -> Levels -> Scale about 200% -> Levels
-> Indexed -> save as TIFF.

Chris

No, that is the best res I get.

___________________

Daniel Hornung
2009-03-05 15:21:26 UTC (almost 16 years ago)

extract text in a rectangle from a jpg file

On Wednesday 04 March 2009, PoWah Wong wrote:

Attached is the image.
It has some text inside some rectangles.

Looks heavily compressed, greycstoration probably could really reduce the jpeg artifacts, plus adjusting the levels might help. (As I wrote earlier.)

I'm not sure I want to know what you need it for actually :)

Daniel