ebook img

Apparatus and method for vectorization of incoming scanned image PDF

131 Pages·2013·5.95 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Apparatus and method for vectorization of incoming scanned image

United States Patent [19] [11] Patent Number: 4,817,187 Lien [45] Date of Patent: Mar. 28, 1989 54 ARATUS AND METH D FOR [ ] yJgIORIZATION 0F ENSOMING FOREIGN PATENT DOCUMENTS SCANNED IMAGE DATA 2131660 6/1984 United Kingdom . [75] Inventor: Yih-Liang L. Lien, Chandler, Ariz. primayy Examiner_l_,eo I-I, Boudreau [73] Assigneez GTX Corporation’ Phoenix, Ariz Attorney, Agent, or Firm-Cahill, Sutton & Thomas [21] Appl. No.: 16,660 [57] ABSTRACT [22] F 11 ed t Feb. 19, 19 87 Serial data obtained by scanning an object including a [51] plurality of connected shapes is encoded into “slices” consisting of colinear connected black pixels and is Fi'elh of: Search 5261’ 3522/2252 processed and assembled into “records” that contain 382 261 2’63_ £59133’ compact slice data or corner points of trapezoidal ’ ’ ’ ’ ’ shapes. For each shape, a record is fetched and recog [56] References Cited nized as to whether it is to be represented by a horizon U_S_ PATENT DOCUMENTS tal, vertical or diagonal vector, an arc vector, or a ?lled shape. The vector is entered into a table or merged with 2322x553;" """""""""""" " a vector already in the table, or corresponding “?lled 4:097:847 (5/1978 Forsen et aL 382/22 shape” data is generated and entered in the table. Merg 4,107,648 8/1978 Frank ............. .. . 340/1463 ing is accomplished by determining if the input veetor 4,183,013 l/ 1980 Agrawala et al. .... .. 382/22 has an intersection number equal to that of any vector 4,204,232 5/ 1980 Millmo - - - - - - - - - ~ - - - - ~ -~ 332/56 stored in the table, and merging the input vector with i’iog'i’gg 1? 3:11? et - 3403/8 the stored vector if their respective end points and ori 4’ 56173 5x985 Abe ‘ital ‘ "" "358/;61 entations are sufficiently close. 4,545,067 10/1985 Juvin et a1. . . . . . . . . . .. 382/21 4,603,431 7/ 1986 Grover et a]. ...................... .. 382/56 45 Claims, 12 Drawing Sheets SET INTERSECTION POINTER TO CDN'VERG‘ ENCE 0R DWERGM RECCRD VB [5 INCREMENT INTDI SECTION COUNTER CUT . em seuenm'e _ "E eluea cmcLe FILLED Poueou (F, 2, omune m1 ammo. 16) 1s 1? 1s oe‘neuLrel mmaun “ ceuemre ARC vecmn VECTOR em (no. 1F) (mm 1m 1m 1 t t EXECUTE ENTITY GENER ATION 8 DBBFMENTIHON SUBROUYINE (FIG, 3) - MORE 20 YES VECTOR on NO FOR HESQINT “APE US. Patent Mar. 28, 1989 Sheet 1 of 12 4,817,187 START / I IE; BRANCHES MARK RECORD As ‘ PROCESSED PROCEssED NO V5 ”’ SET INTERSECTION MULTlPLE POINTER TO CONVERG NON-HORIZ. ENCE OR DIVERGENCE RECORDs GENER- RE 0RD ATED #___ (/6 INCREMENT INTER SECTION COuNTER PROCESSED I No {/0 ' FETCH RECORDS OF NEXT BLOB OR TRAP EzOID (FIG. IE) I SHAPE HORIZONTAL r7 vECTORIzE FRONT f9. GENERATE HORIZONTAL 8 REAR EDGES VECTOR (FIG. IC) EXEUTE ENTITY GENERATION 8 DESEG MENTATION SUBROUTINE (FIG. 3) SELECT ONE SIMPLE - I PART OF COMPLEX SHAPE I I3 /4 EXECUTE SHAPE REC- GENERATE GENERATE FILLED CIRCLE FILLED POLYGON °GN'T"’{;,%P2B,R°“T'“E DATA (FIG. IH) DATA (FIG. IGI - I II I (/6 J, (/7 'I, [la GENERATE GENERATE GENERATE ARC VECTOR DIQEQgIQL VERTICAL vECTOR (FIG. IF) (FIG IE) (FIG. ID) I I I I EXECUTE ENTITY GENER ATION 8 DESEGMENTATION SUBROUTINE (FIG. 3) 20 MORE VECTOR DATA FOR PRESENT SHAPE .FI[ 5E1 US. Patent 4,817,187 Mar. 28, 1989 Sheet 2 Of 12 EXECUTE END POINT FROM fZOA FIEUZAI EXTENSION SUBROUTINE (FIG I5) PRESENT ENTITY CONTAINS MORE THAN 2 VECTORS I OUTPUT VECTOR OR FILLED II I27 CIRCLE, FILLED INTER SECTION, BLOB , FILLED POLYGON OR THIN LINE OUTPUT ARC DATA OUTPUT CIRCLE DATA I I I L GENERATE GENERATE I HORIZONTAL vEcToR DIAGONAL VECTOR 22/ [24/ II [249 READ Y OF TOP AND COMPUTE PROJECTION FIND LONGEST VECTOR BOTTOM SLICES OF UPPER END OF THE BETWEEN THE FOUR LONGEST FRONT EDGE MIDPOINTS I r223 vEcTOR MIDPOINT a | COMPUTE AVERAGE Y SHAPE THICKNESS II K250 243 COMPUTE THE AVERAGE I (224 I r DIAGONAL SHAPE COMPUTE PROJECTION THICKNESS COMPUTE THICKNESS OF LOWER END OF OF HORIZ. VECTOR LONGEST FRONT EDGE I K25 VECTOR, MIDPOINT 8 ENTER COORDINATES I {225 SHAPE THICKNESS OF DIAGONAL VECTOR SEARCH FOR MIN LEFT INTO INPUT BUFFER EDGE X AND MAX RIGHT I r245 EDGE X COMPUTE PROJECTION I (226‘ OF UPPER END OF LCNG II EST REAR EDGE VECTOR ( RETURN I ENTER END POINTS AND 8| MIDPOINT THICKNESS OF HORIZ. VECTOR INTO INPUT I /247 BUFFER COMPUTE PROJECTION I OF LOWER END OF (E LONGEST REAR EDGE VECTOR 8n MIDPOINT Frizz/ll: I US. Patent Mar. 28, 1989 Sheet 3 of 12 4,817,187 200 FETCH RECORDS OF NEXT BLOB OR TRAPEZOID I ' 20/ _ ‘ NQAM YES RECORD T l READ TRAPEZOID READ SLICE DATA DATA FROM RECORD FROM RECORD T 207 END YES OF RECORD V " (205 MARK RECORD TO INDICATE IT HAS BEN PROCESSED EZOID MUCH DIFFER MUCH DIFFERENT ENT THAN THAN PRESENT PRESENT SLI CE NO MORE RECORDS 2/0 NEXT RECORD A BLOB RECORD 2”; T 2/2) READ THE FIRST READ THE FIRST TRAPEZOID DATA SLICE DATA FROM FROM RECORD _ RECORD T T COMPUTE RATIO OF /2/5 AVERAGE SLICE LENGTH TO HEIGTH OF PRESENT FIEQZB SHAPE US. Patent Mar. 28, 1989 4,817,187 Sheet 4 0f 12 GENERATE GENERATE FILLED VERTICAL VECTOR POLYGON DATA [27/ I, 233/ READ UPPER END READ COORDINATES POINTS OF FRONT8 OF VERTICES OF FRONT REAR EDGES OF 8 REAR EDGES 8 FORM VERTICAL SHAPE 8 FILLED POLYGON RECORD COMPUTE MIDPOINT I I 233 272 NO. OF READ LOWER END VERTIC ES POINTS OF FRONT 8 GREATER REAR EDGES OF THAN 7 VERTICAL SHAPE 8 COMPUTE MIDPOINT YES (273 I 235 CALL "CONTRACT" TO COMPUTE WIDTH DELETE POINTS, IF OF VERTICAL SHAPE POSSIBLE (FIG. I4A) I 236 274 ENTER MIDPOINTS 8 WIDTH OF VERTICAL VECTOR INTO INPUT BUFFER I 275 I SELECT 7 VERTICES FROM FRONT AND REAR EDGES 1 f276 ENTER cooRDINATEs GE NERATE 0F vERTIcEs INTO ARC VECTORS INPUT BUFFER FIFE” @ ‘ I, 26/ FIND LOWEST a HIGH- ) EsT Y VALUES IN THE INPUT DATA GENERATE FILLED I 263 ' CIRCLE DATA COMPUTE MIDPOINTS [28/ BETWEEN CORRESP READ COORDINATES ONDING mom a REAR OF 3 POINTS FROM EDGE END POINT FRONT 8 REAR EDGES COORDINATES I /282 y 2615 COM PUTE CENTER 8 RADIUS vEcToRIzE MIDPOINTS I, 266 II COM PUTE SHAPE / ENTER INTO INPUT THICKNESS BUFFER I 267 II ENTER COORDINATES a J I RETURN I THICKNESS OF ARC VECTOR INTO INPUT BUFFER I @ Fl-Em?: US. Patent Mar. 28, 1989 Sheet 5 0f 12 4,817,187 SHAPE RECOGNITION FIEGB ( SUBROUTINE >//2A i (36 FIND LoNGEsT VECTOR 0F FRONT a REAR EDGEs ‘ r37 ‘ v (44 couNT No. OF VECTORS COMPUTE ANGLE OF FRONT a REAR BETWEEN LoNGEsT EDGEs OF LENGTH VECTOR OF FRONT SIMILAR TO LoNGEsT EDGE a LoNGEsT VECTOR OF THAT EDGE VECTOR OF REAR EDGE BOTH HAVE MULT ARE IPLE VECTORS OF LONGEST SIMILAR YES VECTORS OF FRONT LENGTH 8 REAR EDGES PARALLEL IS GENERATE CODE OF SHAPE coNvEx FILLED POLYGON GENERATE 47 ‘ ARE x ARC CODE 42 COORDINATES - GENERATE< INTERSECTION EQUAL BLOB coDE # (43 (48 ‘ <49 GENERATE GENERATE GENERATE 50 FILLED CIRCLE VERTICAL DIAGONAL CODE VECTOR CODE vEcToR CODE ( RETURN y " ‘ _ _ + ‘ /67 /68 US. Patent Mar. 28, 1989 Sheet 6 0112 4,817,187 ENTITY GEN. a ,9A DESEGMENTATION IS INPUT VECTOR AN ARC VECTOR $5714 59) ‘I 60) EXECUTE FILLED EXECUTE LINE EXECUTE ARC POLYGON DESEG- DESEGMENTATION DESEGMENTATION MENTATION SUB- SUBROUTINE (FIG.4) SUBROUTINE( FIG.5) ROUTINE (FIG. I4) + J l T 6, 57B D\D DID DESEG DESEG MENTATI ON MENTATION OCCUR OCCUR ENTER FILLED (57D ' 63 64? " CIRCLE OR COMBINE FILLED ENTER INPUT UPDATEVECTOR WITH FILLED POLYGON POLYGON WITH STORED VECTOR INTO SAMEINTERSECTION INTo FILLED SHAPE FILLED POLYGON IN VECTOR TABLE NUMBER BY ADDING TABLE FILLED SHAPE TABLE v INPuT VECTOR To IT 5705 T + f I l5/C FIE/3H US. Patent 4,817,187 Mar. 28, 1989 Sheet 7 0f 12 FIE/:74 ( DESEGMLEINNTEA TION >594 v 595 I RESET COMBINE FLAG YES BEGIN AT OPEN POINT 8 END AT DIVERGENCE I 69) COMPUTE LENGTH OF INPUT VECTOR 72) COMPUTE LENGTH OF INPUT VECTOR I 73 NO HAVE SAME INTER SECTION NO. AS INPUT VECTOR 76» IS VECTOR IN EXECUTE ARC TABLE AN ARC DESEGMENTATION VECTOR SUBROUTINEI FIG.5I FIND 2 'CLOSEST END POINTS OF THAT STORED VECTOR 8 INPUT VECTOR I A COMPUT. E OFFSET BE- / 79 TWEEN CLOSEST END POINTS 8 STRAIGHT 6,2 LINE BEWEEN OUTER / END POINTS ADD INPUT VECTOR ‘90 VEECCIBOFIIIIO EH“ v v CTOR IN VECTORTABLE I TABLE 8 SET BE COMBINED WITH COMBINE FLAG INPUT VECTO I RETURN I US. Patent Mar. 28, 1989 Sheet 8 of 12 4,817,187 ARC DESEGMENTATION 60A 608 | REsET COMBINE FLAG I SQ/ FIND 2 CLOSEST END POINTS OF INPUT ARC VECTOR a VECTOR IN vEcToR TABLE HAVING PRESENT INTERSECTION NUMBER COMPUTE THE LENGTH RATIO OF INPUT ARC VECTOR GI VECTOR IN VECTOR TABLE ARE LENGTHS SIMILAR COMPUTE INTERSECTION ANGLE OF INPUT ARC VECTOR 8 VECTOR IN VECTOR TABLE DETERMINE /9&9 CIRCULARITY DETERMINE CONVEXITY DO INPUT VECTOR BIVECTOR IN TABLE FORM CONVEX SHAPE /0/ I COMBINE INPUT VECTOR RETURN WITH VECTOR IN TABLE a SET COMBINE FLAG I II F1555 US. Patent Mar. 28, 1989 4,817,187 Sheet 9 0f 12 PRESENT FILLED POLYGON CLOSE TO ONE STORED YES (292 FIND LOWEST POINT OF UPPER POLYGON 2.93 (30/ HORIZONTAL EDGE AT THIS ‘ SET NO MERGE FLAG YES (294 FIND HIGHEST POINT OF LOWER POLYGON 2.95 v (300 HORIZONTAL ENTER MERGED FILLED EDGE AT THIS POLYGON VE RTICES INTO INPUT BUFFER I GENERATE MERGED I RETURN > FILLED POLYON RECORD INCLUDING ALL VERTICES IN BOTH GIVEN POLYGONS ' (2.97 ELIMINATE EXTRA PONTS AT THE MERGE JUNCTION IF STRAIGHT LINE IS FORMED AT JUNCTION EDGE I 9298 CALL "CONTRACT" ROUTINE TO REMOVE MORE UNNECESSARY POINTS OF THE COMB INED POLYGON (FIG. I4A)

Description:
ENCE 0R DWERGM. RECCRD. VB. [5. INCREMENT INTDI. SECTION COUNTER. CUT . em seuenm'e. _. "E eluea cmcLe. FILLED Poueou. (F, 2, omune m1.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.