|
Prev: Problem printing with a network printer
Next: listview1
From: Ed on 19 Jun 2008 09:46 I am trying to figure out a way to convert an image into text. In other words, I want to take an image and have a text output of 0's for the white area and 1's for the black area. For instance, if I have a bitmap of an X, the text output would be: 1000001 0100010 0010100 0001000 0010100 0100010 1000001 Can anyone help me? Ed
From: Mike Williams on 19 Jun 2008 14:36 On 19 Jun, 14:46, Ed <exg...(a)gmail.com> wrote: > I am trying to figure out a way to convert an > image into text. In other words, I want to take > an image and have a text output of 0's for the > white area and 1's for the black area. What you are looking for is OCR (optical character recognition). There are lots of applications out there than can perform the job. Some are free and some are very cheap and some are very expensive. Basically, you get what you pay for. I don't know how many are available for use with VB6, but I'm sure there are some. But if you are actually looking for a way of coding this yourself in straight VB code (or in any other code, for that matter) then you've got a *massive* job on your hands. This sort of thing is far from trivial, and is in fact extremely complex if you want worthwhile results. Mike
From: Diggy on 19 Jun 2008 14:56 Ed wrote: > I am trying to figure out a way to convert an image into text. In > other words, I want to take an image and have a text output of 0's for > the white area and 1's for the black area. > > For instance, if I have a bitmap of an X, the text output would be: > > 1000001 > 0100010 > 0010100 > 0001000 > 0010100 > 0100010 > 1000001 > > Can anyone help me? > > Ed Sounds difficult to do yourself. If you just want a program to do it try Digitizer (it's free and quite good).
From: James Parsly on 19 Jun 2008 15:18 If all you want to do is to pick apart the pattern for some text, you can do something like this: ' Picture1.ForeColor = QBColor(0) t$ = "Hello" Picture1.CurrentX = 0 Picture1.CurrentY = 0 Picture1.ScaleMode = 3 'pixel scaling Picture1.Print t$ For j = 0 To Picture1.TextHeight(t$) - 1 r$ = "" For i = 0 To Picture1.TextWidth(t$) - 1 If Picture1.Point(i, j) = QBColor(0) Then r$ = r$ + "1" Else r$ = r$ + "0" Next i Picture1.Print r$ Next j This code writes a string up in the top left corner of a picture box. It then loops through the rows and columns taken up by the string and uses the POINT function to example the pixel at each location. "Ed" <exg001(a)gmail.com> wrote in message news:4a18f1d1-ac4a-48a6-95f0-8b60be14c002(a)s33g2000pri.googlegroups.com... >I am trying to figure out a way to convert an image into text. In > other words, I want to take an image and have a text output of 0's for > the white area and 1's for the black area. > > For instance, if I have a bitmap of an X, the text output would be: > > 1000001 > 0100010 > 0010100 > 0001000 > 0010100 > 0100010 > 1000001 > > Can anyone help me? > > Ed
|
Pages: 1 Prev: Problem printing with a network printer Next: listview1 |