lines of text simultaneously as well as smaller pictures.
SUMMARY OF THE INVENTION
An object of the present invention is to provide a scanner pen which enable fast recording of text in real time.
Another object of the invention is to provide a scanner pen which may be used at a distance from the text and may scan several lines of text in a single stroke as well as discrete pictures.
These objects are obtained by a method and a device for recording information by imaging on a light-sensitive sensor for obtaining at least two images of the information having partially overlapping contents. The method comprises converting the information in each of the images to a coded representation,, comparing the coded representation of said images for determining an overlap position, and assemblying the images to form a composite image. The coded representation may be a character code, such as ASCII. Alternatively, the coded representation may comprise a division of the information inside boarders, such as rectangles, each comprising portions of the information, such as words included in said information. Thereafter, the composite image may be converted to a character code format, such as ASCII-code. Alternatively, each image may be separetly converted into character code format, such as ASCII, before assemblying.
The method may further comprise determining structures in each of said images, such as direction of lines or text line directions in each • image . This may be accomplished by means of a Hough transformation of each image. This information may be used for adjusting the rotational position and/or perspective of each image in dependence of the direction of lines. The information may also be used for the division of the image in reactangles .
A concept of the present invention is to record a
P tn Φ
•P P X Dl 0 CQ φ . Tj Φ CQ P
0 X P rd CQ 0 φ P X rH P CQ P rH φ Φ
© X rH X -P ε Tj cd P -P CQ cd Φ Φ φ CQ ri* cd P P -P p X
IΛ -l X cd TJ -rl P TJ cd Φ Φ TJ ε P X φ X rH P 0 0 -P EH
Φ φ 3 CQ P 0 φ P cd rH Dl φ -P -P X X Φ cd Dl X X -. CQ rH
X CQ Tj Tj 0 £ P-l tn Φ CQ ε X cd X X rH Pt X X rH P CQ CQ -P .
© TJ P CQ P -P cd P Φ -P ε P X X X 0 X Φ X Φ CG ω X P 0 P 0 Φ X Φ ε -P TJ Di CQ -P φ Φ rd ri* ε -P Pt rH CJ X tn X X 35
CΛ o o u φ 3s X X cd X P rd CQ CQ φ > X P o φ rd P X rd X X o
H 3s φ X X 0 ε X o cd rd £ 0 φ rH P Dl cd P CQ X P cd φ • ε Φ Dl H
U CQ P CJ Φ P X £ -P • Pi X X 0 X P Tj X cd 0 cd X Φ X Tj -P 0 tn X P rH
PH φ X cd X X CQ 0 X X φ H rd J 0 0 CJ CQ φ P p Dl 0 0
P 0 Φ P X X X X 0 φ X P Tj > Φ rH rH X P TJ P φ P Φ X >, -P -P P !U X
•P X cd -P Φ P rP CQ rd φ -P X • -P φ CQ cd 0 33 Φ φ P cd 0 X P P CQ Tj 0 rH Tj X X X 5 CQ -P TJ X P X Tj X P rd X φ 0 P _Q Φ Φ X X φ rd tn p K Φ CQ
P J 0 P -P -P CQ P υ rH Φ > P rH P TJ -P £ X CQ > p -. P -P X cd
Φ φ X CQ 0 φ φ CQ X 0 φ rH X cd X -P Φ Φ X P X φ X P -P Φ -P X φ EH
X 0 X Tj Φ X X CQ Φ CJ Pi -P X 0 rH X n TJ φ P . rH -P -H X X CQ X TJ
X TJ 0 P tn P cd TJ 0 X X φ CQ 13 0 CQ P -P £ P Tj • rH X -P CQ φ X . φ
P X Φ cd -P υ P Pi P X P P -P Φ Pi P rd Tj φ Φ -P -. • O X Φ CQ CQ X
Di cd υ CQ £ -P rd 0 φ X X TJ X P tn Φ . > CQ CQ Φ X £ υ -P Dl Φ -P
P -H X Tj -H Tj rH φ X P φ Pi -P CJ X φ X X Pt P P -P -P CQ rH P 0 P P Dl P
•P X X φ P φ 5 CQ cd X P & X X X Φ X cd cd φ υ Φ P -P -P X 0 Φ -P -P TJ P Pt -P cd J
Tj P P -P X X Tj ^ Φ X P tn cd X Φ ε -. cd Pi X P Pi £ CQ ε CQ
P cd rH P TJ rd rH 35 S P CQ X p Φ X CQ X P X P -. TJ cd 0 P -P Φ
-P X X 0 X P φ X rH -. rd Φ Pt P 0 rH Φ P •- Pt Tj φ Φ CJ TJ x CQ CJ X P 0 X CQ -P CQ • Tj Di cd P φ r P P Φ Tj X φ Φ Φ P X M Dl CQ TJ φ P cd P X 35 Φ P φ P cd rH 0 X cd -P o X P Φ X X CQ P P υ d Φ φ Φ
Φ Tj rH -P X X o -P Dl Di o -P 0 ε P -P X X -P 0 Tj rH P P 0 φ r
Φ CQ cd J 3s rd -P P -P Φ X ε cd Dl Tj X
CQ P P X X - CQ <-. Pi £ Φ X cd P cd P > rH -P £ rd P
-P -P CQ TJ X -P -P ε X -P X > cd CQ TJ Di -. P 0 0 Tj Dl p X £ 0 >•.
P X φ X φ CQ -P -H X cd φ O ε φ p P X X cd Pl . CJ 0 Tj TJ -H CJ rH
& o X φ P Φ X » P P X X P tn 0 -rl X 0 φ cd X CJ CJ φ O φ X ε 0 X P -P 0 cd tn -P X Φ tn φ 0 X CQ 0 cd CQ 33 X φ X cd P ε X 0 cd rH P X J P Φ
0 X φ X CG cd X X X 0 Tj P Φ X
-P P ε P CJ X P 0 -P 0 X φ Φ P X Φ -P J Tj £ P Φ X υ -P X Dl P -P Φ X P φ P rH Φ Tj X P -P φ Tj Φ P
•~ P P X - 0 -P Φ X φ CQ 0 rd -P X 0 cd X o Tj -P P -. cd φ Φ X
CQ cd 0 P CQ -P TJ X ε P X X . P P Tj ε P υ Φ 0 £ P Φ 0 CQ φ X £ P o X cd Φ CJ Φ Φ X X -P X 0 φ P Dl -P ε >. Φ cd Tj CQ P Φ CQ X •P X X rd 0 Φ CJ P tn X J Dl cd cd 0 P φ cd P rH X P P CQ P rP X CQ CQ φ P Φ J X P P ε tn CJ X φ X cd rd X φ -P cd ε X >, tn φ X n -P φ P X rd Φ . P X P 0 CJ
Tj ε φ X £ P X CQ CQ P X Φ rH X 0 0 X X P Tj X 3 -P H -P rd CQ -P φ
0 -P X φ -P 0 Φ -P υ φ P o X CJ Tj -P Φ -P 0 rH X Φ P X -. φ P P
X o X X P • P rH cd > P P p Tj rH P . Pi rH cd . ^ X Dl -P X P X 0 0
X Tj X X X Tj P 0 TJ -P O P rd CQ Φ 35 -P -P X cd Φ -P X Φ X Φ CQ cd rd Φ X -P -P φ φ 0 φ -rl φ rH £ cd X cd CQ 0 rd 0 -P Φ ε X X -P P rH P ε X CG X X ε Tj φ X j CQ TJ Φ X CQ X X > X X X P Φ P -rl Φ φ P φ 0 P cd cd
P CQ P o P P P φ CQ υ CQ J cd P rH CQ P -H X Φ X cd TJ φ rH X X 0 X φ -P
Φ o Φ cd 0 P Φ cd X CQ Tj φ X 0 Φ X ε ε cd X X Tj P Di X φ J cd P P P
X CJ P TJ υ cd X υ X cd rH P X X P J X φ X P X Φ X rd cd Φ P. n X X 0 X 0 0
EH φ -P CQ -P Φ CQ J CQ cd 0 υ Dl 0 Φ CQ CQ φ tn Tj 0 0 P P -P EH CQ -H X
P rH φ rd P CQ rd -P D X υ 3s φ P X rH s X X
TJ P Φ P Φ d tr Φ P Φ rH Φ CG CQ r-< Di Φ P TJ P tn -P P 0 TJ υ & 0 -P 0 P φ > ε -P X X Di X P P r- φ φ cd Φ Φ υ cd 0 P X Φ P P P -P ε X P P. P φ 0 rH -P rd υ rd rd
X X ε X X Φ X φ rH 0 Pt X 0 -P X 0 P φ X -P P X 0 X X Φ £ rd X P P
X X -P X X P J X cd P 0 X υ cd X 33 υ -P X X cd rH cd cd H 0 3 X -P X 0 X X
is an infinite number of straight lines extending through a point in an XY plane. The equation of the straight line for each of these lines can be expressed with two parameters. If the parameters of the individual lines are plotted in a diagram, a curve is obtained which corresponds to the Hough transform of the point . In this way, it is possible to plot curves for any of the points in the XY plane. The Hough transform of two different points will intersect in a point, which corresponds to the equation of the straight line extending through the two points. If the Hough transforms for all the dark pixels in a recorded image are plotted, a large number of intersections between the different Hough transforms will be obtained. However, there is a maximum number of intersections for lines following the lines of text.
The device may comprise a memory adapted to store the recorded images, which are to be converted into sets of characters, in the memory, and to convert the stored images into sets of characters after completion of the recording of the images . By only storing the recorded images which are to be converted into sets of characters, the memory space which is required for storing recorded images is minimized. By converting the stored images into sets of characters after the recording of images has been completed, it is not necessary to place high demands on the speed of the optical character recognition, which would be the case if it were to be carried out while images are being recorded.
The device is advantageously designed in such a man- ner that a user can hold it by hand and at a distance from a substrate to record text on the substrate.
The device may be adapted to correct the images for rotation before they are converted into sets of characters. In the case where the lines of text in the recorded images have been identified, the correction for rotation can be carried out in a relatively simple way. However, some optical character recognition programs can
process also rotated images, in which case the rotation is not required.
Correspondingly, the device may correct the images for perspective before they are converted into sets of characters since the optical character recognition may be facilitated if all letters have the same size in the images .
The device may be designed as a reading head which is connected to a calculating unit in which the recorded images are processed.
The device may be adapted to assemble the sets of characters by comparing the sets of characters in pairs, the sets of characters being compared in a number of relative positions displaced relative to each other. Thus, a first character in a first set of characters is compared with characters in the second set of characters until correspondence is achieved or until the first character in the first set of characters has been compared with all characters in the second set of char- acters . Subsequently, the correspondence of the second characters in the first set of characters is compared with the characters in the second set of characters . By making the comparison for a large number of different relative positions, a plurality of total numbers of points can be obtained, the total number of points reflecting the correspondence between the two sets of characters for the specific position. In this way, an optimum relative position can be obtained.
The device may be adapted to store the recorded images that are to be converted into sets of characters along with a serial number indicating in which order the images have been recorded, and to assemble the sets of characters with the aid of the serial number for the images corresponding to the sets of characters. Especially in the case where first all images are recorded and not until then the character recognition and the assembling are begun, the serial numbers may be used for
the recorded images since then a large number of images are to be assembled.
According to a second aspect of the present invention, a method is provided for recording of text on a substrate, comprising the step of imaging and digitally recording images of the text, the images having partly overlapping contents. The method is characterized in that it comprises the steps of converting at least two of the recorded images into a set of characters, each with a plurality of characters, by means of optical character recognition, and putting together the sets of characters with the aid of the characters in the sets of characters.
The area recorded by the sensor may be arranged so that a plurality of lines of text are imaged in a recorded image.
According to a third aspect of the present invention, a computer-readable storage medium, in which a computer program is stored which is adapted to be used for conversion of digital images, which are recorded by an image sensor, into text. The storage medium is characterized in that the computer program comprises instructions for making the computer receive digital images as input signals, convert the digital images into sets of characters, with a plurality of characters, by means of character recognition, and put together the sets of characters with the aid of the characters in the sets of characters .
Further objects, features and advantages of the invention will appear from the following detailed description of embodiments of the invention with reference to the drawings .
BRIEF DESCRIPTION OF THE DRAWINGS
Fig. 1 is a schematic view of a device according to a first embodiment of the present invention.
Fig. 2 is a schematic block diagram of parts of the embodiment of Fig l .
Fig. 3 is a schematic view of images of text on a sheet of paper, which are recorded according to the invention.
Figs. 4a and 4b are diagrams, illustrating the principle of the Hough transformation.
Fig. 5 is a diagram, which shows maximum points for the Hough transform of two different images.
Fig. 6 is a diagram and a histogram for illustrating the detection of start and end points of words. Figs. 7a and 7b are diagrams for illustrating the division of the text images into words.
Fig. 8 is a diagram of two images converted to characters for assembling.
Fig. 9 is a diagram for illustrating lines of text in a recorded image.
Fig. 10 is a flow chart of the operation of a computer program according to the invention.
Fig. 11a, lib and lie are shematic representations of a text, division thereof in rectangles and display on a small display.
DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION
Fig. 1 discloses a scanner pen, comprises a casing 1 having approximately the same shape as a conventional highlighter. In one short side of the casing there is an opening 2, which is intended to be directed at an area on a substrate which a user wants to image. The information carrier can be a sheet of paper.
The casing 1 essentially contains an optics part 3, an electronic circuitry part 4 and a power supply part 5.
The optics part 3 comprises a lens system 7, light- emitting diodes 6, and an optical sensor 8 constituting an interface with the electronic circuitry part 4. The light-emitting diodes 6 may be used to increase the illumination.
The light-sensitive optical sensor 8 may be a two- dimensional CMOS unit or CCD unit (CCD = Charge Coupled
00 X CQ Tj X X CQ cd oo P P CQ P CM ϋ Φ Φ O 0 φ X
H X CQ X Tj 0 φ 0 P -P X rH X -P φ P r -P P CJ cd CQ Dl CQ φ o Φ X P r Φ rH CQ . CQ
IT. rd -l P O X P X -P Φ CQ cd P CM CJ 3s φ P X O Tj Tj φ > CQ Tj rd £ P CJ X P Φ £ Φ £ X φ φ X P P φ P -H Φ Φ
Tj 0 φ P cd 35 CJ -H CQ P Φ P > CQ X P φ X X O X -P X CQ X
© CG φ P ε -P φ 0 CQ P X P cd φ Φ 0 Φ X X 0 Φ P CJ -P rH CJ CQ CJ
P X X X CJ rd P X P cd Tj Φ X -P ϋ TJ Tj tn X X X 0 Φ P rd cd φ
O P P -P Pi Φ X cd rH o T CQ X CJ P CJ X Pi P
H CQ P TJ cd CJ > P rH TJ X P rd M Di -P P Tj Φ CQ φ CQ o P
U P 0 φ & -P -. 5 φ rH P O -P O P φ P TJ rd CM P tn X -. Φ φ X . Φ φ TJ Tj
PH Φ ε P £ P ~. CM X φ 0 0 X -P P CQ -P cd rd Pt vo P X rd Tj Tj >. CQ P
CG -P 0 0 X CM cd X 33 CJ X Tj TJ Φ P X Di X X P P CM cd X P φ X P cd CM
Φ rd ϋ P CJ φ Tj φ cd X cd P 0 -P P cd P Φ X Φ -P
X X X X -P .>: 0 X CQ P Tj φ X P X φ J -P P P 0 ε P P o P P cd X rH cd r tn
CJ X Φ CJ X o X 0 cd P X P Φ X -P X P CQ φ φ -P φ > cd CM P
P >, 0 X φ 3s rt Φ cd J P φ X Tj X P P 0 X > CQ tn -P 3s P P -P
CQ rd r rH «. P X φ O Di P P 0 CJ Φ CQ P •P Φ Dl X 0 P φ CG P
£ CQ P φ o >. Tj P 0 X > P £ P cd X -P ε -P CQ rH -P Φ Tj P t ϋ P rH X P Φ
• -P cd CM P φ 0 CQ CM P rd ϋ φ CG Dl cd ϋ O -P CM rd Pi 35 0 Pt
P co P. φ 0 P P £
Φ ε 0 in P φ 0 X ε -P P 1 P 0 φ X CQ -P Tj r X 0 φ Φ Φ X P ε 0 J CM 0 X 0 X P rH X X 0 P Tj rd CQ P rH cd • X
X P CJ CQ X 0 Φ X ε CQ P -P X P 35 -P X CJ X -P cd Φ P Φ 00 P Φ
P 0 -P CQ ε CQ X P CQ P X X Di J rH P P P Dl P 0 X 35 X X X φ CG cd X CQ Λ φ P -P cd O *— --, X cd -P 0 0 -. P 0 X P X s X X
> P φ 0 Φ CQ P X TJ rH X 0 0 P rH P CQ -P -P Tj X Φ -P Dl Φ
H P Φ Tj P J rH -P O X Φ CJ Pt CQ X Φ Di X Φ CJ X φ X P P o CJ 35 -P X X rH 0 CQ -P rd 0 P 3s X -P CM CQ CG Pi X P P -P cd X X cd X CM -P Pm X X ϋ φ ε P 0 P ε φ Di -P P P P 0 0 -P 0 P tn N X -P > Tj -P
Φ X Tj φ Pi 0 φ 0 P 0 X Tj 0 0 cd Tj J 0 0 -H ε tn φ P φ φ P X 35
P X X φ X Tj CQ X P Pi rH -P -P φ P X P ε rH X -. φ P X o Tj TJ 0
EH • X ϋ cd cd CQ X 4H P P cd P X ε cd φ 0 φ Φ -P t -P EH CQ -P P rH 0 P CQ Φ Φ φ rH P φ cd CQ ϋ X ε rH P CM X X CQ φ P CG Φ
P ri X P CQ P ϋ CQ CQ X 0 CQ > ε Tj φ EH 0 o X -H • Φ X 0 5 P Pi
•H Φ 0 Φ 0 -P φ P P ϋ rd -P P X P Tj P Φ P -P CQ tn P X CJ X P 0 cd rd
Tj ε ϋ CQ cd P tn -P X -P φ o cd P • X X P P -P 3s -P 0 Pi X Φ Pt
X X P rH 0 -P Pi X cd P Dl X ϋ X IT- 0 P CQ X P Pt 0 rH P P X CQ £ rH rd cd Pt CQ rH P 0 CJ ε φ 0 0 ϋ CQ P CM ^ ϋ φ P o X >, P Pt 0 CQ X
•P rH 0 Pi -P X & X Φ -P -P P ϋ rH P P -P φ φ X 0 0 J φ X Φ X -P CQ O
P -P X P ε X X cd CG cd CG J CQ X -P X X P X CJ φ P cd X
X cd CQ X cd O Tj X 3s φ cd rH P tn P -P φ X φ X X X P -P X 0
X
> X CJ CJ Φ X X 0 «. X P 0 > cd X -P CG X O tn X -P o P Φ rd cd -P P -P CQ X X -. X cd 0 P CQ -P X φ IS Tj rH EH TJ φ TJ CQ 0 X P H Φ Φ
P φ X Dl -P X CJ 0 00 X X X rH rt P X TJ X P cd P X P CQ rH 0 J φ P. X
X CJ 35 IS P ϋ Φ CM X X P rd H P P 0 φ 0 P • cd EH rd Φ X P P. X CQ
X rH P o -P CM -P P ε CJ ^ 0 P Φ X φ X CJ tn CQ ϋ rH P cd X P
•P rH -P Pi CM CQ X P cd s -P CQ J ϋ Φ P X X n cd -P rH P * in O 0 CQ X Pi φ Φ Φ 5 cd CJ rH cd . 35 0 P rtj X P φ X cd CQ ^ X P J tn CG cd 0 P CM P P X X P X
-P φ CJ Dl CJ Dl p-S 33 φ P φ Pt P P -P -P P P -P 0 Pt X Pt φ X P X
-—-. CJ TJ X -P ~ 0 X 0 X -P cd φ rP X Tj -P rH φ X CQ P P X 0 Tj cd φ P φ EH P Φ Pm ^ CQ P >. P ϋ X EP P tn P X 0 CQ P X 0 X cd CQ rd φ o P EH φ CJ CG
CJ Φ X Φ X Pt P -P cd CQ Φ P X P P -P -P rd P Pi P Φ rH X J P X X CQ CQ
-P £ P X X X 0 P Pi -P Q> X CQ P X -P Φ CJ Pt X φ φ P 0
> £ -P X P Φ ε TJ cd φ CQ P ε P P Φ P P P O CQ Φ X φ -P φ P φ 0 P cd P cd X φ P X P X cd 0 0 o o rd Pt o φ φ P -H >, X P X P X ϋ
P CJ Pi X -P Pi CM X £ cd CJ rd oo 0 ϋ X ϋ J J ε 0 J Pt tn Pt TJ X X -P CQ Pt X cd
lines of text are to be found. For each black pixel in the second recorded image 15, a Hough transform curve is calculated. The Hough transforms are inserted in one and the same diagram. Fig. 9 shows a first line 32 and a second line 33. Lines having approximately the same direction as the first line 32 will intersect a larger number of points than lines having approximately the same inclination as the second line 33 since the dark pixels in the recorded image 15 are positioned along lines of text having approximately the same direction as the first line 32.
Fig. 5 illustrates that the maximum number of intersections can be used to determine the orientation of the lines of text. The circles 73 correspond to points in the Hough transform diagram where several Hough transform curves of points in Fig. 9 intersect, i.e. maximum of intersections. The circles 73 corresponds to the image 15 and are positioned along a straight line> 34. From the distance between the circles 73, the distance between the lines of text can be determined. The position of the intersecting line 34 along the θ axis indicates the rotation of the recorded image. The second line 35 in Fig. 5 corresponds to the image 14 and extends through a plurality of maximum indicated by crosses 36 in the diagram. The inclination of the second line 35 indicates that the image has a perspective, i.e. the lines of text have different rotations. Also the sligth different distances between the crosses 36 indicate that the image has a perspective with larger distances between the lines at the lower portion of the line 36. The displacement of the second intersecting line 35 in relation to the first line along the θ axis indicates that the lines of text are rotated in the recorded image. By means of this information, the image may be adjusted for perspective and rotated, for example to the horizontal direction, which is the same direction as image 15. As appears, image 15 corresponding to line 34 need no adjustment,
while image 14 corresponding to line 35 needs adjustment of the perspective to make line 36 vertical and with approximately equidistant crosses 36 and adjustment as to the rotational position, to move line 35 to the same angle θ as image 15, which may correspond to zero angle. After identification of the lines of text, an identification of the start and end parts of the words in the recorded image is carried out. Fig. 6 indicates how the letter "e" 37 is detected. As shown in Fig. 6, the number of dark pixels 7 are counted in the vertical direction perpendicular to the line 38, which may be calculated as described above. The number of dark pixels is zero up to the start 39 of the letter "e" and will again be zero at the end 40 of the letter "e" . When the number of dark pixels has been zero for a predetermined period, this is detected as the end of a word.
With reference to Fig. 7, the words are indicated as rectangles, the start 41 of the rectangles indicating the start of a word and the end 42 of the rectangles indicating the end of a word. Fig. 7a corresponds to a first recorded image 14 and Fig. 7b corresponds to a second recorded image 15. A length of a first word 43 in Fig. 7a has correspondence in a length of a second word 44 in Fig. 7b. Correspondingly, a length of a third word 45 in Fig. 7a has correspondence in a length of a fourth word 46 in Fig. 7b. By matching the two images, it is possible to find out how the recorded images overlap each other, by only using the graphical information of the length of each word. Thus, by using the length of the words for each line, it is possible to carry out a rough putting- together or stitching or assembling of the two images. The images are roughly assembled so that a sequence of word lengths in the first recorded image corresponds to a sequence of word lengths in the second recorded image. The word lengths along different lines in the first recorded image should thus correspond to word lengths
along corresponding lines in the second recorded image. In this way, it is possible to determine how the images are displaced relative to each other.
Fig. 3 shows how this may be used to sort out unnecessary images so that optical character recognition need not be carried out as regards all images that are recorded. A first image 47 and a second image 49 completely overlap the area which is covered by a third recorded image 48 which is indicated by dashed lines. By using the method as described in connection with Fig. 7, the third recorded image 48 can be completely omitted, without optical character recognition being carried out. Of course, Fig. 3 is only schematic, since the images often overlap each other to a much larger extent. Indeed, if the scanner pen is held approximately still, all images overlap more or less, and a substantial saving of computing power may be obtained by omitting images with duplicate information. On the other hand, during normal scanning operation, a partial overlap may be used for sorting out errors in the optical character recognition process or the assembling process, in which case overlapping images are not omitted or discarded.
Another method of assembling the images is disclosed in Fig. 8, which shows a first set of characters 50 with a plurality of characters 60 corresponding to the first recorded image 47 in Fig. 3 and a second set of characters 51 with a plurality of characters 61 corresponding to the second recorded image 49 in Fig. 3. The text in the first set of characters and the second set of char- acters follows the direction of the lines of• text 62, which may have been obtained by the Hough transform process described above. The first set of characters 50 and the second set of characters 51 are put together or assembled by comparing characters in the two sets of characters. Firstly, the first character 52 in the first set of characters is compared with each of the characters in the second set of characters 51. The operation
. X CQ Φ CQ cd X X
Tj o φ φ X X P Φ X TJ X P 0 0 cd Φ
P m CQ P J P X 0 P X rd P φ cd Φ 0 X -. Φ TJ X
© crj P -P P rd 0 -P 0 cd X rd Φ P X X X X P Pl ϋ P Φ -P
IΛ CQ -P X -P X CQ X 3s X -P J X X -P X X TJ X -P -P X -P Dl Tj CQ CQ -l
© ro P CQ < CQ CG φ 0 X -P X -P Φ X rH φ Φ Φ X X X φ P 0
VD φ CQ P in P CQ -H Tj CQ Di Φ o Tj rH TJ rH TJ CQ o CQ X CQ -H
© X P -P • φ cd P φ 0 CQ P P TJ cd φ CQ P CQ P X φ 0 φ P P X -P X P CQ ω P υ φ X -: H ε
P & φ X Pt 0 -P -P P P X -P Φ cd -P X ε Φ rH 0 0 P -P • -P 0
CΛ Φ rd X TJ in 0 £ ,Ω X Pl cd Dl rd P .. CQ -P X _Ω -P P Φ 3s X φ CJ
H X P J φ φ 0 ^ P X CQ CG X P P &■ Φ Tj P CQ ε X X £ X P -P X P X CQ
U CJ cd cd X rH CQ -. υ P rH o X φ X -P CQ cd X
P rH CQ ε φ Φ 0 -P CQ Φ rd Φ cd ϋ P Φ TJ cd
PH cd X P X rH P X P rP -P φ X P 0 P p P Pt rP P 0 CQ rP X X cd 0 £ >, P
P CJ cd -P Φ X P φ X P X -P X φ P CJ 0 -P P -P X CQ φ X X P -P P rH 0 O cd X X X φ Φ rH 3s -P o X Tj P rH n cd Φ X X cd P o cd X Di Φ 35 X
X X υ 0 CQ υ X X cd CQ φ - Pt φ P Φ rH o » *£ ε X X Tj Tj X -P -P > P
O o = rd X X 35 0 X X P X -rl CQ CQ 0 -P CQ P φ rH P 0 CJ CQ rH -P X -P
Φ φ P cd 0 0 Pt X rH X X rH P CJ X r-H IS -P cd X cd rd X 0 cd X 0
Tj X X P Tj rd Tj X X rH 0 φ X 0 0 rd 0 n rH P Φ Pt cd Tj
P Φ X -P P X P P CQ P cd X P X -P Φ P -P CQ Φ P 0 X Dl X X P X φ
0 CQ rH 0 CJ •P cd cd CQ -P 0 P P X cd . 03 X O IS P ϋ 5 X P P CQ EH rH 0 P X rH
CJ P 35 φ X X -P φ P Tj cd CQ P 0 -P 0 £ -P rd cd φ Di π
Φ X φ Tj X CQ Tj ^ X X Pm Q ^ Φ cd Φ ε Φ >, X -P > Tj CQ rH Φ • CJ X P £
CQ CQ X P φ 0 P P P cd TJ £ oo X CQ P cd cd -P CQ Φ -P Φ n tn -P X rH Φ φ
P IS 0 X 0 P 0 CJ P φ • P X P P φ Pl ε P Tj P X ξ- S P X -P cd rH CQ
Φ -P CJ X X •P 0 -H -P o X Tj P • -P Dl X P -. φ Φ X X Φ rH -P P rH CQ
X X Tj φ φ X X X Tj X rd φ tn P cd Φ CQ -P > ε tn X CJ CQ Φ rH φ -P tn cd
VD -J-1 Φ CQ X CG •P -P P Φ P rH -P -P φ rH ε Tj cd -P P X -P Dl CQ > n > X cd P
H φ P X CQ Φ CQ -P TJ Pt -P cd Pm X P -P H 0 Tj 33 Tj -P X P cd ε -P ε -P φ
P X -P Φ -P Tj 0 CJ 0 P Φ cd X Tj 0 rrj X φ TJ TJ £ -P X φ φ CQ CQ X
0 X cd X 3s P Pl P Pt X 0 P X 0 P φ rH φ CJ X P CQ 0 rd P P X cd CQ X CQ Tj P
X X X 0 Φ υ Pl X X H rH rH CQ X -P φ cd -P 5 Φ cd Tj -P n rH CQ X 0 0
P X Tj υ Tj CQ -P CQ CQ 0 rH Φ -P EH X . ε Pl X X P φ £ P Φ rd Pt X Tj cd
-P 0 P φ Φ P P -P X Φ -P Φ 35 cd X rH -P P Q cd 0 X 3s P CQ X Φ M co ε X ro P P 0 P φ X 0 ε
£ P Dl o P Φ -P Φ P rH P Φ φ X
Dl ■φ CG cd £ Pl X P Pl -P X ϋ CQ CQ Φ φ φ P CJ P -P X cd X CQ r -P X ε X CQ
P VD -P oo Pt Φ CQ TJ 0 Φ P cd . CJ X X -P H X D) X Φ . -P υ £ X φ φ
-P in ε X P Φ P φ J X φ X φ P Di -P X rH X tn -H X TJ X -P P Di
X X φ ε Di
Tj P φ 0 X -P P 0 P CQ CJ CJ TJ O X -P > cd Φ CQ - P X P o P P cd
P φ CJ = J P X CD P -H P CQ CQ Pm φ £ ■ P rH -P H CQ -P P X -H -H Φ ε
O X P J P P 0 rd P CG φ X 0 P P Tj TJ Φ -P Φ rH P CQ CQ φ Φ Φ rH X -P
Pt υ Φ φ CQ -P cd CJ X X φ -P TJ IS P. Φ -n P CQ φ CQ X X • -P -P tn -. > Tj CQ π X
CQ cd TJ rH -P Φ X X X X P CQ P. -P φ cd X CQ Φ Φ P • cd r-H X £ φ
Φ P P rH φ Pl X φ 0 CJ X 0 P φ Tj X -P rd φ rH ε φ Φ φ CQ ε φ Tj CQ rH Φ X X
P cd 0 -P CQ P Pt CQ X rd Pl -P P cd rH X X X £ P CQ 35 rM ϋ P -P > P Φ P CQ H X
P X Pt ! P -H cd P tn P CQ P P X CJ -P 0 cd P CQ 0 -P cd 0 φ cd P CQ CQ
0 υ CG CQ φ rH -P φ P cd rH Φ Tj 0 X 0 Φ X P rH Φ rd Pl rH X -P rH r -P Φ cd • ^
CJ φ = X P X X -P X X P φ ϋ P ϋ X 0 CQ X CQ X P CQ cd rH rH P .
Tj P CJ X cd X φ υ P P X X cd φ ϋ X Dl X P P -P P cd X rH rH
CQ P P Tj cd CQ CJ Φ X Φ o J X X Φ P -. Φ tn rd P P X CQ φ X Φ X Φ CJ Φ φ
Tj -P 0 P P P X X X P CJ φ CQ X X X 0 CQ 0 X cd P 0 -P tn £ P X P X CJ cd X X
Φ X CJ 0 cd -P Tj X 0 CQ 0 tr rP φ CQ φ X -P rH X EH ε cd X -P P -P cd CJ 0 X cd rd cd
Φ X .3 X X P X Φ φ Φ X -P X X 0 -P X P P φ Tj Pt cd N P P P r-< υ Tj CJ 0 £ X P CQ Q P CQ rH X ϋ π - J P P. tn P -P X P rd cd r- 0 Φ 0 Φ Φ 35 0 CQ -P X X φ φ Dl φ rd P p X φ P ε φ P o φ cd P cd CJ Pt P.
P X 0 X X X P φ o φ P X CQ X P X X P ?-ι P X P rd 0 X rd 3s X X 0 X CJ φ Φ
Pl X CD X 0 X cd X P Pl CQ CQ 3s X pq X X X CQ cd X o J o X rH X X CJ X X cd CQ CQ
CQ Tj CQ 0 rH TJ -. . rd cd X
P φ cd TJ X Φ Φ H X CQ CQ cd φ CQ P P r-H X > H cd Φ Φ P Φ P φ Tj Tj CQ X
X P X 0 cd rH rH -P P u CQ rH 0 P φ X P ^ P Tj TJ X ϋ CJ -P -P a rd P CQ -. CQ tn cd X > Φ X rd X CM •P φ P cd φ P CQ CQ 33 cd Φ ϋ t, >•. Φ P rH J -P X CQ .. X IS1 0 CQ CQ
P X CQ rH TJ X Φ P rH X CJ cd 0 CQ -P tn X -. . P CM X -P a P P cd 0 P CQ X X cd P CQ Φ CJ 0 X n Φ X CQ CM -P Tj P CQ cd -P
X >. π 0 CQ rH X 0 φ rd X rd P CJ £ P 33 CQ TJ l • • X Tj P φ tn φ Φ cd ϋ cd X £ 33 Φ rH P > d Φ a Φ P tn -H P P 0 X o P ε X
H ε X CJ Φ -P P CQ cd φ Φ X P P CQ X CQ P cd Tj Φ 0 5 X ϋ P X
U o φ CQ φ O P 33 Φ φ X CJ cd P Φ ϋ Φ -P φ P TJ X 3s φ o X o
X Tj X P P cd X s CQ P X P a -P X CQ cd -P rH a rH P cd P X X -. P J CJ
0 φ φ a CQ X cd 0 CQ φ cd a Dl Dl Φ 0
X a Tj CQ CM •P X
CQ X P X 3 CQ CQ P CQ P P P cd P n cd 35 -. P • P .. 35 ■ X t φ X cd X n rH Φ TJ X CQ φ Φ φ d X 0 rH cd rH cd £ t φ 0 "φ oo 0 .« 5
Di φ X >, P 0 J P P J Φ X Tj TJ X ε CJ cd X P X P X P CJ .. X P CM . rd ε X - φ -P _Ω O cd φ P P X o φ X P J P J Φ J P . -P Φ CM Tj -. ε D φ X rH ^ P X CQ -P cd υ rH cd CQ CQ P φ φ > φ CQ φ rH CQ φ P CQ -. X -P
•P CQ P CQ X π a ~ X rH TJ ε Φ 0 > P 0 P Φ Dl P TJ X 0 -P £ Pm
-P φ cd ε CQ CQ o - X P P n -. 33 φ P Tj φ P X s 0
Φ X X ϋ X Φ rt P CG X P φ rd X cd CQ CQ X P X -P Pm Φ P X 0 X P . X
X EH X -P CQ P u φ • Φ X 0 X X X ε P φ 0 φ CJ r-H X 0 X 35 «. Tj H tn 0
X cd CQ CQ 0 o X Tj rH tn J Φ -P φ X . X cd P X ϋ φ P Tj -P
• ε -P CQ cd CJ cd Dl -P Tj rd φ X Tj φ CQ P 12 φ Φ φ «. X P 0 • P Pm φ
X P X cd CQ Φ cd Φ P cd Φ P X Φ P rH cd 0 X -. CG rH X -P CJ 0 P
0 0 P X φ Φ X P X cd P -P rd X cd a Φ -P • - X -. rH • • P rH φ • • J X -P
-P φ TJ X P X cd CG X X P X . X X 0 ε P CQ X TJ CG φ CM P CG oo φ 0 rH
H P X X P φ EH P X P ϋ CQ P CJ cd X 0 cd CQ X φ tn P H X 0 Tj CQ
0 -P X 1-H rH X -. CJ -P φ cd o ε Tj -. CJ Φ Φ P P X X P X P φ Tj CM Tj
P 0 TJ • ϋ P P P J φ t P φ ϋ X -H -P EH P O -P X P φ P
CQ Di . P Φ -P φ CQ J P X CQ Tj -P cd X CJ ε CQ 0 P -P φ X X 0 X Φ 0
P O CQ CQ cd rH a > cd φ P O CQ P . -P P TJ P -H • -P o X X X LS X P V φ CJ φ r X Dl φ CQ cd X -P φ 0 P Dl φ CQ X CQ φ Φ P Φ X cd X -. -P φ
> Φ CQ O P Φ 3 φ P X tn π o tn φ 33 X X a P cd P φ X P rH CQ
P P -P p φ cd X 0 rH X P tn rd J P Pm cd CQ cd P Φ ε -P P oo tn TJ X X 0
0 P ε X X X W Dl φ cd p ε P £ -P rd TJ 0 rH tn • • -P P X 00 P P Φ J P & . CJ P X Tj X -P -P CQ P ε -P P X tn 35 o -H rH CQ cd P Tj O X
Φ ε CQ rH φ X • cd φ X rH CQ 0 a P P X CQ φ P P 0 P X rH X 0 rH P cd rH X CQ n X Tj P φ ε Tj -P Φ Φ -. cd Φ TJ Tj ro 0 0 X 0 Tj cd CJ o P X rH CJ rd P Φ £ ϋ P φ X X 0 φ TJ X Φ P X Tj P • • -P 35 P X
P cd 0 LS cd X cd φ ε P Φ rd cd P X CJ TJ P X X Φ X 0 φ CM -. X φ 0 cd
-H P CQ ε P φ o CQ φ cd CQ P -P n CQ 13 X >. cd X X 3s
X rd φ CQ CQ P TJ CQ P X ε CQ CQ P X Φ P X o Φ £ P P X Tj rH P X X Tj
X tn Φ Φ -P φ φ 0 rd X Φ >, cd 0 rH 0 X > P 0 -P Dl P Dl tn P Tj P φ CJ rd P P Tj X -P 0 P Φ φ Dl P P cd P cd P CQ 0 P -P Tj P P 0
P ε P P Tj -P rH X X cd X Φ P X a P P P 0 CQ X P X -P P 35 •P CQ P 0 0 3s
0 rH -P X X φ > X cd ε X P X X a 0 rd P X Tj P Φ X £ -P Tj φ rd X ϋ
X cd CJ J Tj 0 P φ X Tj X 0 J cd -P X CQ P CQ o π 0 o cd TJ P Tj Φ X φ ϋ φ -P -P P P Φ N P CQ Φ -P -P X CQ CJ Tj 0 P -P £ rH X P 0 ro Φ CQ CQ
X -P X Pl Pt rH a -P -P φ P X X CQ a -P CQ -P Φ φ φ a 0 CQ P rH rH X -P a CQ • • X P
X X ϋ ϋ P CQ φ -P • H P • > P P P CQ -P CQ P 0 0 X CQ P 00 X φ -P φ Pl rH rH P -* -P tn φ Tj ε co Φ r-H X Φ -P P rd φ X φ X X φ -P X X
D) 0 P rH rH -P X 0 P P -P φ > rH CG n Tj X X & P -P ϋ Tj Tj P cd TJ X X rd φ cd cd P X J a cd rH P P d cd crj ϋ CJ ε P CQ ϋ P P φ P φ P X P cd Φ ε . X ε ε Φ O P Φ Φ O φ -P 0 ε φ £ rd -P 0 o O P 0 0 X 0 X 0 X 0 X 0 X
-P X 33 CQ CQ X 33 CQ P P X Tj rH CJ CQ rH -P X H a CJ CJ a CQ 35 3s X LS X CJ 0 35 X X X
especially if the OCR program indicates a poor quality of processing.
Every new image is compared with previous information in order to find out its orientation therein. Thus, each image is processed both in the vertical direction as well as in the horizontal direction, both forwards and backwards. Thus, it is possible to scan in two dimensions by the present invention. This is possible because of the division of the image in a coded representation which is less time consuming to process, either in the form of rectangles or similar or in the form of ASCII code.
It may be of interest to have some kind of feed-back that the desired information is gathered. This may be accomplished by displaying the assembled information at the screen. However, since the display at a handheld device is rather small, another method would be to display the lines as a succession of pixels at the display, in which one pixel approximately corresponds to a single character. Then, the characters will form words and the layout of words would give a visual indication of the scanned surface. If the processing comprises division into rectangles, these rectangles may be indicated as they are assembled. Figs 11a, lib and lie show how this may be accomplished. Fig. 11a is a text that is to be scanned. Fig. lib is the division of this text in rectangles. Finally, Fig. lie is the representation of the rectangles at a small display, in which rectangles are indicated in black pixels and spaces between the rectangles as gray pixels. From Fig. lie it can be seen that some information is missing as indicated by white pixels 29. The user then directs his scanner pen towards the area missing until the display indicates that all areas are fully covered by at least one image. Finally, the comlete image is converted to ASCII, if that has not been done earlier in the process.
P I
Tj CQ P 1 r-H 0 CQ P
Φ CQ TJ CQ Tj 0 1 P cd a a tn -P -P X Φ
Tj cd φ 0 φ CG 0 ε P -P X Φ φ P X X X >
0 P Tj P Tj CQ X X X • 0 Φ CJ -P X X -P -P X X φ P X υ ι *. -P φ CJ -P Φ CQ cd Φ J X n CQ X CQ X P Φ υ X -H cd
Φ cd P tn P P cd > CJ cd Φ tn P υ -P 0 X n TJ X P -P X
Tj rH <$ P tr 0 0 φ r CQ cd cd a -P TJ TJ Tj X P 0 φ rd X X Φ X
TJ a -p Φ Tj Tj P rH X cd ε ε P P CG P P a CJ Tj X 33 0 X φ X CQ . CQ P X φ a φ -P -P X 0 0 -. 0 tn -P a Φ P o X X Tj
H Tj o CQ CQ -rl CQ X X P X CQ P 0 J P in J P X X P P 0 -P TJ CQ P
U 0 cd Tj X -H CQ CQ CQ 0 Φ o cd CQ 0 >. X m φ -H X P tn -P J CQ Φ Φ X cd
PH CJ Φ 0 ε -P 0 cd P X >. 0 0 P P φ υ CQ P 0 P P φ Φ CQ CQ P cd
Φ Tj a a X cd φ P a CQ Φ 0 X φ a X cd 0 Tj Φ P P Φ P -P X P φ -. X CQ X CQ ε P o > -P EH rH φ cd CG TJ P φ X -P n rH X 3
X Φ X -P -P CQ CQ -P . P φ CQ Φ X Φ X P Φ X υ φ rH cd CQ 0
X TJ Φ -P X Φ X s X cd rd • 0- P 0 H r-H φ -P cd X ε -P φ CQ X o P P P -. X i J rH P P P Φ H X X X P P X φ -P X Φ CQ
Di J cd Dl 0 P φ CJ Tj cd -P φ Tj ^ -P Φ 0 X X P • ε X CJ cd X ε X N
P -P 0 rH υ -P Φ ε a X rP P φ P 0 Tj a -P X CQ • -P P Φ CQ X CQ X TJ X -P CQ
-P H X CQ X •P rH -P X Tj -P 0 X P co 0 CQ X Φ υ TJ φ X P r X
CG H 0 rd cd X cd s> 33 P P rH o -P φ P P -P Tj -P CQ P Tj P X TJ -P φ cd P
P CJ Tj ε P φ 0 φ rd a 3s X TJ φ Φ -P X P φ X cd 0 rH cd O P P X φ Φ
CQ Tj P φ X TJ φ CJ X ε P P X > 0 X -P CQ cd n 0 0 33 P ε . Λ Φ 0 > P υ Φ X CQ 0 X φ rH X P J cd CQ P P φ rd J φ P CJ tn -P
X J X P cd φ rd P cd υ -P > CJ -P φ P φ tn P P -P P 0 Φ rH 0 X Tj
X rd rd P •P a X X X P P X X P Φ > 0 cd P CQ X -P P rd CG P 0 o Φ o rH rH -P X P Φ 0 CQ «. -P -P 0 Φ P H CQ P υ cd Φ a CQ X rH cd π
CM P X a X X P X rH -P CQ X J 0 φ CQ CJ Di 0 rd rd Φ P cd £ o φ CQ X P CQ X CQ X Φ Φ φ CQ X X φ . Φ CJ P P cd X X 0 φ φ
TJ P rd •H cd φ rd H P X φ P X -P P X Φ X Φ o £ TJ >. P X -P CQ X
P Tj X CQ φ P rH cd cd J -P X rd 0 φ υ X φ P X X -P P rH Φ X P X φ
CQ X CQ X φ rH • φ a P cd r Φ X X -P P Φ CJ rd X -P P -P φ X
-P cd cd Φ P CQ X CQ cd X cd P 0 φ > ε cd X rd TJ CJ P -P P X P X
P P φ a X φ X cd CQ a P >, -P -P Dl X Φ o CJ P P φ -. Φ O tn CJ -P tn TJ cd X rd P 0 Φ -P φ P X > rH L? P TJ P CQ cd cd cd Tj t P TJ 0 cd 0 p φ φ cd Φ -P X CQ CQ 0 -P 0 X φ P X CQ P -P Φ φ CJ P TJ X
-P X >. CQ CJ X P rH φ P X TJ P d rH J X Φ tn cd υ CQ 0 • TJ X -P φ cd φ rH X cd Φ -P X O ε cd TJ Tj Φ o X P X Tj cd X φ CJ tn X X P X rH Tj n rH υ TJ φ 0 CJ TJ φ -P Tj -P X 0 Tj X φ ε CJ X CJ φ -P X -P CJ rH φ g P a cd P 0 X rH CQ P P rd P X 0 rd υ Φ i> -P 0 Φ P Pm P - X P -P X
Φ •P CQ a -P X cd X CQ rd 0 CQ P cd CJ X X -P Dl P 0 P P Φ -P
CG -ri CQ Φ £ cd P -P X 0 P P CQ cd a 0 φ rH P Q φ X φ φ X X CQ ε
CQ P TJ rH > tn P -P 0 X ». CQ X P X 0 -P cd υ cd -P n X X X TJ i> Tj υ -P -P cd 0 Φ r 0 p 0 X X Φ H P -P -P ε Tj φ X CQ P 0 X -P Φ 0 -P rd X P rH
•H CQ rH -P X •P X -P X CJ P P CQ X σ rd cd P -P P -P P LS -P φ P P • 0 φ X •P 33 cd Tj P X a - -P o . CQ P rH P X i P X P P φ cd φ TJ CQ X
X cd X P •P P rd CG > X φ 0 n CQ P Φ -P CQ X CQ o P P 0 X X Tj φ P 0
X X P 33 X TJ 0 φ P Φ φ Tj a >. X a . 0 -P m P Tj P CQ . -P 0 rd s CJ -P X φ P
P φ 0 Φ J Φ TJ Dl P Tj φ rd rH X l P a cd Φ P P -P J X rd a
X Φ X •-. TJ X CJ X -P 0 -P Tj P rH cd -P a £ Φ X Φ Φ X φ X • 0 rH 0 X CQ
H CQ CJ P -P X X rH φ P Di rd φ Pm cd . CQ X CJ X X H X CJ Φ CQ P cd X 0 -P φ rd Φ φ P Dl 0 X cd O -P rH X P P P Φ X cd X X X φ X φ CJ P
P P Φ X CJ X P X 0 X CJ X X TJ CQ Φ Di X tn P φ φ P Dl Tj -P φ P a rd P -P CQ cd 0 a X CQ 0 P P cd X 0 -P rd - cd -. Dl Di P P rd φ X rH Φ 0
Φ X CJ X Φ X rH P P -P X cd cd φ P P P ε VD X r- 0 0 0 rd £ φ a X P -P
P CJ CQ !S TJ X cd cd -P -P Tj a a X rH a a υ -P in U in X X CJ CJ -P P 0 rd cd X
many modifications are feasible within the scope of the invention. The invention is only limited by the appended patent claims.