sq 155 lib/gocr/ocr0.c l2=sq(r2x-r1x)+sq(r2y-r1y); // square of distance r2-r1 sq 171 lib/gocr/ocr0.c dist=sq((x-r3x)*1024/(box1->x1-box1->x0+1)) sq 172 lib/gocr/ocr0.c +sq((y-r3y)*1024/(box1->y1-box1->y0+1)); // 0..2*sq(1024) sq 215 lib/gocr/ocr0.c aa[2]=d=2*sq(128)+sq((rx-(x0+x1)/2)*128/dx)+sq((ry-(y0+y1)/2)*128/dy); sq 228 lib/gocr/ocr0.c d=sq((x-rx)*128/dx)+sq((y-ry)*128/dy); sq 595 lib/gocr/ocr0.c d=2*sq(128/4); sq 953 lib/gocr/ocr0.c d=2*sq(128/4); sq 968 lib/gocr/ocr0.c d=line_deviation(box1, aa[0][3], aa[1][3]); if (d>2*sq(1024/4)) Break; sq 969 lib/gocr/ocr0.c ad=(100-(d-sq(1024)/2)/sq(1024)/4)*ad/100; sq 970 lib/gocr/ocr0.c d=line_deviation(box1, aa[2][3], aa[3][3]); if (d>2*sq(1024/4)) Break; sq 989 lib/gocr/ocr0.c if (dbg[0] > sq(1024/4)) Break; sq 990 lib/gocr/ocr0.c if (dx>4 && dbg[1] > sq(1024/4)) ad=97*ad/100; // d=0..2*sq(1024) sq 991 lib/gocr/ocr0.c if (dx>4 && dbg[1] > sq(1024/3)) Break; // d=0..2*sq(1024) sq 1011 lib/gocr/ocr0.c if (dbg[2] > sq(1024/4)) Break; sq 1012 lib/gocr/ocr0.c if (dbg[3] > sq(1024/4)) ad=97*ad/100; // serif N, ToDo: do it better sq 1013 lib/gocr/ocr0.c if (dbg[3] > sq(1024/3)) Break; sq 1029 lib/gocr/ocr0.c dbg[0],dbg[1],dbg[2],dbg[3],sq(1024/4),sq(1024));) sq 1030 lib/gocr/ocr0.c ad=(100-(dbg[0]-sq(1024)/2)/sq(1024)/4)*ad/100; sq 1031 lib/gocr/ocr0.c ad=(100-(dbg[1]-sq(1024)/2)/sq(1024)/4)*ad/100; sq 1032 lib/gocr/ocr0.c ad=(100-(dbg[2]-sq(1024)/2)/sq(1024)/4)*ad/100; sq 1033 lib/gocr/ocr0.c ad=(100-(dbg[3]-sq(1024)/2)/sq(1024)/4)*ad/100; sq 1059 lib/gocr/ocr0.c d=2*sq(128/4); sq 1269 lib/gocr/ocr0.c d=2*sq(128/4); sq 1521 lib/gocr/ocr0.c d=2*sq(128/4); sq 3024 lib/gocr/ocr0.c d=2*sq(128/4); sq 3054 lib/gocr/ocr0.c MSG(fprintf(stderr," 0-X %d %d dist= %d/%d",x-x0,y-y0,ld,2*sq(1024/4));) sq 3055 lib/gocr/ocr0.c if (ld >2*sq(1024/4)) Break; sq 3058 lib/gocr/ocr0.c MSG(fprintf(stderr," X-1 %d %d dist= %d/%d",x-x0,y-y0,ld,2*sq(1024/4));) sq 3059 lib/gocr/ocr0.c if (ld >2*sq(1024/4)) Break; sq 3074 lib/gocr/ocr0.c MSG(fprintf(stderr," 1-X %d %d dist= %d/%d",x-x0,y-y0,ld,2*sq(1024/4));) sq 3075 lib/gocr/ocr0.c if (ld >2*sq(1024/4)) Break; sq 3078 lib/gocr/ocr0.c MSG(fprintf(stderr," X-2 %d %d dist= %d/%d",x-x0,y-y0,ld,2*sq(1024/4));) sq 3079 lib/gocr/ocr0.c if (ld >2*sq(1024/4)) Break; sq 3099 lib/gocr/ocr0.c MSG(fprintf(stderr," 2-X %d %d dist= %d/%d",x-x0,y-y0,ld,2*sq(1024/4));) sq 3100 lib/gocr/ocr0.c if (ld >2*sq(1024/4)) Break; sq 3103 lib/gocr/ocr0.c MSG(fprintf(stderr," X-3 %d %d dist= %d/%d",x-x0,y-y0,ld,2*sq(1024/4));) sq 3104 lib/gocr/ocr0.c if (ld >2*sq(1024/4)) Break; sq 3119 lib/gocr/ocr0.c MSG(fprintf(stderr," 3-X %d %d dist= %d/%d",x-x0,y-y0,ld,2*sq(1024/4));) sq 3120 lib/gocr/ocr0.c if (ld >2*sq(1024/4)) Break; sq 3123 lib/gocr/ocr0.c MSG(fprintf(stderr," X-0 %d %d dist= %d/%d",x-x0,y-y0,ld,2*sq(1024/4));) sq 3124 lib/gocr/ocr0.c if (ld >2*sq(1024/4)) Break; sq 3310 lib/gocr/ocr0.c d=2*sq(128/4); sq 3330 lib/gocr/ocr0.c d=line_deviation(box1, aa[3][3], aa[0][3]); if (d>2*sq(1024/4)) Break; sq 3331 lib/gocr/ocr0.c ad=(100-(d-sq(1024)/2)/sq(1024)/4)*ad/100; sq 3332 lib/gocr/ocr0.c d=line_deviation(box1, aa[1][3], aa[2][3]); if (d>2*sq(1024/4)) Break; sq 3375 lib/gocr/ocr0.c d=sq(box1->frame_vector[i5][0]-box1->frame_vector[i4][0]) sq 3376 lib/gocr/ocr0.c +sq(box1->frame_vector[i5][1]-box1->frame_vector[i4][1]); sq 3377 lib/gocr/ocr0.c if (d>2*sq(dx/8+1)) break; sq 3380 lib/gocr/ocr0.c dbg[0]=d=line_deviation(box1, aa[0][3], i1); if (d >2*sq(1024/4)) Break; sq 3382 lib/gocr/ocr0.c dbg[1]=d=line_deviation(box1, i1, aa[1][3]); if (d >2*sq(1024/4)) Break; sq 3394 lib/gocr/ocr0.c dbg[2]=d=line_deviation(box1,i2, aa[3][3]); if (d >2*sq(1024/4)) Break; sq 3396 lib/gocr/ocr0.c dbg[3]=d=line_deviation(box1, aa[2][3],i2); if (d >2*sq(1024/4)) Break; sq 3404 lib/gocr/ocr0.c dbg[0],dbg[1],dbg[2],dbg[3],2*sq(1024/4),2*sq(1024));) sq 3405 lib/gocr/ocr0.c ad=(100-(dbg[0]-sq(1024)/2)/sq(1024)/4)*ad/100; sq 3406 lib/gocr/ocr0.c ad=(100-(dbg[1]-sq(1024)/2)/sq(1024)/4)*ad/100; sq 3407 lib/gocr/ocr0.c ad=(100-(dbg[2]-sq(1024)/2)/sq(1024)/4)*ad/100; sq 3408 lib/gocr/ocr0.c ad=(100-(dbg[3]-sq(1024)/2)/sq(1024)/4)*ad/100; sq 4950 lib/gocr/ocr0.c d=2*sq(128/4); sq 5026 lib/gocr/ocr0.c MSG(fprintf(stderr," i7,i1 %d %d linedist= %d/%d",i7,i1,ld,2*sq(1024/4));) sq 5027 lib/gocr/ocr0.c if (ld >2*sq(1024/4)) Break; sq 5028 lib/gocr/ocr0.c if (5*ld >4*2*sq(1024/4)) ad=99*ad/100; // ~3 sq 5029 lib/gocr/ocr0.c if (6*ld >4*2*sq(1024/4)) ad=99*ad/100; // ~3 sq 5030 lib/gocr/ocr0.c if (7*ld >4*2*sq(1024/4)) ad=99*ad/100; // ~3 sq 5031 lib/gocr/ocr0.c if (8*ld >4*2*sq(1024/4)) ad=99*ad/100; // ~3 sq 5034 lib/gocr/ocr0.c MSG(fprintf(stderr," i4,i5 %d %d linedist= %d/%d",i4,i5,ld,2*sq(1024/4));) sq 5035 lib/gocr/ocr0.c if (ld >2*sq(1024/4)) Break; sq 5036 lib/gocr/ocr0.c if (5*ld >4*2*sq(1024/4)) ad=99*ad/100; sq 5070 lib/gocr/ocr0.c d=2*sq(128/4); sq 5089 lib/gocr/ocr0.c d=line_deviation(box1, aa[0][3], j) >sq(1024/4); sq 5091 lib/gocr/ocr0.c MSG(fprintf(stderr,"x %d %d dist= %d/%d",x-x0,y-y0,d,sq(1024/4));) sq 5092 lib/gocr/ocr0.c if (d >sq(1024/4)) Break; ad=ad-d*100/sq(1024); sq 5096 lib/gocr/ocr0.c MSG(fprintf(stderr,"x %d %d dist= %d/%d",x-x0,y-y0,d,sq(1024/4));) sq 5097 lib/gocr/ocr0.c if (d >sq(1024/4)) Break; ad=ad-d*100/sq(1024); sq 5115 lib/gocr/ocr0.c MSG(fprintf(stderr,"x %d %d dist= %d/%d",x-x0,y-y0,d,sq(1024/4));) sq 5116 lib/gocr/ocr0.c if (d >sq(1024/4)) Break; ad=ad-d*100/sq(1024); sq 5120 lib/gocr/ocr0.c MSG(fprintf(stderr,"x %d %d dist= %d/%d",x-x0,y-y0,d,sq(1024/4));) sq 5121 lib/gocr/ocr0.c if (d >sq(1024/4)) Break; ad=ad-d*100/sq(1024); sq 5286 lib/gocr/ocr0.c d=2*sq(128/16); sq 5303 lib/gocr/ocr0.c d=line_deviation(box1, aa[0][3], aa[1][3]); if (d>2*sq(1024/4)) Break; sq 5304 lib/gocr/ocr0.c ad=(100-(d-sq(1024)/2)/sq(1024)/4)*ad/100; sq 5305 lib/gocr/ocr0.c d=line_deviation(box1, aa[2][3], aa[3][3]); if (d>2*sq(1024/4)) Break; sq 5319 lib/gocr/ocr0.c dbg[0]=d=line_deviation(box1,i1, aa[2][3]); if (d >2*sq(1024/4)) Break; sq 5321 lib/gocr/ocr0.c dbg[1]=d=line_deviation(box1, aa[1][3],i1); if (d >2*sq(1024/4)) Break; sq 6269 lib/gocr/ocr0.c aa[0][2]=aa[1][2]=aa[2][2]=aa[3][2]=2*sq(128); /* distance to box edges */ sq 6276 lib/gocr/ocr0.c j=0; d=sq((x-x0)*128/dx)+sq((y-y0)*128/dy); sq 6280 lib/gocr/ocr0.c j=1; d=sq((x-x0)*128/dx)+sq((y-y1)*128/dy); sq 6283 lib/gocr/ocr0.c j=2; d=sq((x-x1)*128/dx)+sq((y-y1)*128/dy); sq 6286 lib/gocr/ocr0.c j=3; d=sq((x-x1)*128/dx)+sq((y-y0)*128/dy); sq 442 lib/gocr/ocr0n.c d=2*sq(128/4); sq 523 lib/gocr/ocr0n.c MSG(fprintf(stderr," i1-i2 %d %d dist= %d/%d",i1,i2,ld,2*sq(1024/4));) sq 524 lib/gocr/ocr0n.c if (ld >2*sq(1024/4)) Break; sq 525 lib/gocr/ocr0n.c if (ld > sq(1024/4)) ad=99*ad/100; sq 602 lib/gocr/ocr0n.c d=2*sq(128/4); sq 705 lib/gocr/ocr0n.c MSG(fprintf(stderr," i1-i2 %d %d dist= %d/%d",i1,i2,ld,2*sq(1024/4));) sq 706 lib/gocr/ocr0n.c if (ld >2*sq(1024/4)) Break; sq 709 lib/gocr/ocr0n.c MSG(fprintf(stderr," i2-i3 %d %d dist= %d/%d",i2,i3,ld,2*sq(1024/4));) sq 710 lib/gocr/ocr0n.c if (ld > sq(1024/4)) Break; sq 713 lib/gocr/ocr0n.c MSG(fprintf(stderr," i3-i4 %d %d dist= %d/%d",i3,i4,ld,2*sq(1024/4));) sq 714 lib/gocr/ocr0n.c if (ld > sq(1024/4)) Break; sq 717 lib/gocr/ocr0n.c MSG(fprintf(stderr," i6-i7 %d %d dist= %d/%d",i6,i7,ld,2*sq(1024/4));) sq 718 lib/gocr/ocr0n.c if (ld >2*sq(1024/4)) Break;