1
/*This is mechanically generated code*/
4
typedef struct { int x, y; } xy;
5
typedef unsigned char byte;
7
int fast9_corner_score(const byte* p, const int pixel[], int bstart)
11
int b = (bmax + bmin)/2;
13
/*Compute the score using binary search*/
31
if( p[pixel[15]] > cb)
35
else if( p[pixel[7]] < c_b)
36
if( p[pixel[14]] > cb)
37
if( p[pixel[15]] > cb)
41
else if( p[pixel[14]] < c_b)
42
if( p[pixel[8]] < c_b)
43
if( p[pixel[9]] < c_b)
44
if( p[pixel[10]] < c_b)
45
if( p[pixel[11]] < c_b)
46
if( p[pixel[12]] < c_b)
47
if( p[pixel[13]] < c_b)
48
if( p[pixel[15]] < c_b)
67
if( p[pixel[14]] > cb)
68
if( p[pixel[15]] > cb)
74
else if( p[pixel[6]] < c_b)
75
if( p[pixel[15]] > cb)
76
if( p[pixel[13]] > cb)
77
if( p[pixel[14]] > cb)
81
else if( p[pixel[13]] < c_b)
82
if( p[pixel[7]] < c_b)
83
if( p[pixel[8]] < c_b)
84
if( p[pixel[9]] < c_b)
85
if( p[pixel[10]] < c_b)
86
if( p[pixel[11]] < c_b)
87
if( p[pixel[12]] < c_b)
88
if( p[pixel[14]] < c_b)
101
goto is_not_a_corner;
103
goto is_not_a_corner;
105
goto is_not_a_corner;
107
if( p[pixel[7]] < c_b)
108
if( p[pixel[8]] < c_b)
109
if( p[pixel[9]] < c_b)
110
if( p[pixel[10]] < c_b)
111
if( p[pixel[11]] < c_b)
112
if( p[pixel[12]] < c_b)
113
if( p[pixel[13]] < c_b)
114
if( p[pixel[14]] < c_b)
117
goto is_not_a_corner;
119
goto is_not_a_corner;
121
goto is_not_a_corner;
123
goto is_not_a_corner;
125
goto is_not_a_corner;
127
goto is_not_a_corner;
129
goto is_not_a_corner;
131
goto is_not_a_corner;
133
if( p[pixel[13]] > cb)
134
if( p[pixel[14]] > cb)
135
if( p[pixel[15]] > cb)
138
goto is_not_a_corner;
140
goto is_not_a_corner;
141
else if( p[pixel[13]] < c_b)
142
if( p[pixel[7]] < c_b)
143
if( p[pixel[8]] < c_b)
144
if( p[pixel[9]] < c_b)
145
if( p[pixel[10]] < c_b)
146
if( p[pixel[11]] < c_b)
147
if( p[pixel[12]] < c_b)
148
if( p[pixel[14]] < c_b)
149
if( p[pixel[15]] < c_b)
152
goto is_not_a_corner;
154
goto is_not_a_corner;
156
goto is_not_a_corner;
158
goto is_not_a_corner;
160
goto is_not_a_corner;
162
goto is_not_a_corner;
164
goto is_not_a_corner;
166
goto is_not_a_corner;
168
goto is_not_a_corner;
169
else if( p[pixel[5]] < c_b)
170
if( p[pixel[14]] > cb)
171
if( p[pixel[12]] > cb)
172
if( p[pixel[13]] > cb)
173
if( p[pixel[15]] > cb)
176
if( p[pixel[6]] > cb)
177
if( p[pixel[7]] > cb)
178
if( p[pixel[8]] > cb)
179
if( p[pixel[9]] > cb)
180
if( p[pixel[10]] > cb)
181
if( p[pixel[11]] > cb)
184
goto is_not_a_corner;
186
goto is_not_a_corner;
188
goto is_not_a_corner;
190
goto is_not_a_corner;
192
goto is_not_a_corner;
194
goto is_not_a_corner;
196
goto is_not_a_corner;
197
else if( p[pixel[12]] < c_b)
198
if( p[pixel[6]] < c_b)
199
if( p[pixel[7]] < c_b)
200
if( p[pixel[8]] < c_b)
201
if( p[pixel[9]] < c_b)
202
if( p[pixel[10]] < c_b)
203
if( p[pixel[11]] < c_b)
204
if( p[pixel[13]] < c_b)
207
goto is_not_a_corner;
209
goto is_not_a_corner;
211
goto is_not_a_corner;
213
goto is_not_a_corner;
215
goto is_not_a_corner;
217
goto is_not_a_corner;
219
goto is_not_a_corner;
221
goto is_not_a_corner;
222
else if( p[pixel[14]] < c_b)
223
if( p[pixel[7]] < c_b)
224
if( p[pixel[8]] < c_b)
225
if( p[pixel[9]] < c_b)
226
if( p[pixel[10]] < c_b)
227
if( p[pixel[11]] < c_b)
228
if( p[pixel[12]] < c_b)
229
if( p[pixel[13]] < c_b)
230
if( p[pixel[6]] < c_b)
233
if( p[pixel[15]] < c_b)
236
goto is_not_a_corner;
238
goto is_not_a_corner;
240
goto is_not_a_corner;
242
goto is_not_a_corner;
244
goto is_not_a_corner;
246
goto is_not_a_corner;
248
goto is_not_a_corner;
250
goto is_not_a_corner;
252
if( p[pixel[6]] < c_b)
253
if( p[pixel[7]] < c_b)
254
if( p[pixel[8]] < c_b)
255
if( p[pixel[9]] < c_b)
256
if( p[pixel[10]] < c_b)
257
if( p[pixel[11]] < c_b)
258
if( p[pixel[12]] < c_b)
259
if( p[pixel[13]] < c_b)
262
goto is_not_a_corner;
264
goto is_not_a_corner;
266
goto is_not_a_corner;
268
goto is_not_a_corner;
270
goto is_not_a_corner;
272
goto is_not_a_corner;
274
goto is_not_a_corner;
276
goto is_not_a_corner;
278
if( p[pixel[12]] > cb)
279
if( p[pixel[13]] > cb)
280
if( p[pixel[14]] > cb)
281
if( p[pixel[15]] > cb)
284
if( p[pixel[6]] > cb)
285
if( p[pixel[7]] > cb)
286
if( p[pixel[8]] > cb)
287
if( p[pixel[9]] > cb)
288
if( p[pixel[10]] > cb)
289
if( p[pixel[11]] > cb)
292
goto is_not_a_corner;
294
goto is_not_a_corner;
296
goto is_not_a_corner;
298
goto is_not_a_corner;
300
goto is_not_a_corner;
302
goto is_not_a_corner;
304
goto is_not_a_corner;
306
goto is_not_a_corner;
307
else if( p[pixel[12]] < c_b)
308
if( p[pixel[7]] < c_b)
309
if( p[pixel[8]] < c_b)
310
if( p[pixel[9]] < c_b)
311
if( p[pixel[10]] < c_b)
312
if( p[pixel[11]] < c_b)
313
if( p[pixel[13]] < c_b)
314
if( p[pixel[14]] < c_b)
315
if( p[pixel[6]] < c_b)
318
if( p[pixel[15]] < c_b)
321
goto is_not_a_corner;
323
goto is_not_a_corner;
325
goto is_not_a_corner;
327
goto is_not_a_corner;
329
goto is_not_a_corner;
331
goto is_not_a_corner;
333
goto is_not_a_corner;
335
goto is_not_a_corner;
337
goto is_not_a_corner;
338
else if( p[pixel[4]] < c_b)
339
if( p[pixel[13]] > cb)
340
if( p[pixel[11]] > cb)
341
if( p[pixel[12]] > cb)
342
if( p[pixel[14]] > cb)
343
if( p[pixel[15]] > cb)
346
if( p[pixel[6]] > cb)
347
if( p[pixel[7]] > cb)
348
if( p[pixel[8]] > cb)
349
if( p[pixel[9]] > cb)
350
if( p[pixel[10]] > cb)
353
goto is_not_a_corner;
355
goto is_not_a_corner;
357
goto is_not_a_corner;
359
goto is_not_a_corner;
361
goto is_not_a_corner;
363
if( p[pixel[5]] > cb)
364
if( p[pixel[6]] > cb)
365
if( p[pixel[7]] > cb)
366
if( p[pixel[8]] > cb)
367
if( p[pixel[9]] > cb)
368
if( p[pixel[10]] > cb)
371
goto is_not_a_corner;
373
goto is_not_a_corner;
375
goto is_not_a_corner;
377
goto is_not_a_corner;
379
goto is_not_a_corner;
381
goto is_not_a_corner;
383
goto is_not_a_corner;
384
else if( p[pixel[11]] < c_b)
385
if( p[pixel[5]] < c_b)
386
if( p[pixel[6]] < c_b)
387
if( p[pixel[7]] < c_b)
388
if( p[pixel[8]] < c_b)
389
if( p[pixel[9]] < c_b)
390
if( p[pixel[10]] < c_b)
391
if( p[pixel[12]] < c_b)
394
goto is_not_a_corner;
396
goto is_not_a_corner;
398
goto is_not_a_corner;
400
goto is_not_a_corner;
402
goto is_not_a_corner;
404
goto is_not_a_corner;
406
goto is_not_a_corner;
408
goto is_not_a_corner;
409
else if( p[pixel[13]] < c_b)
410
if( p[pixel[7]] < c_b)
411
if( p[pixel[8]] < c_b)
412
if( p[pixel[9]] < c_b)
413
if( p[pixel[10]] < c_b)
414
if( p[pixel[11]] < c_b)
415
if( p[pixel[12]] < c_b)
416
if( p[pixel[6]] < c_b)
417
if( p[pixel[5]] < c_b)
420
if( p[pixel[14]] < c_b)
423
goto is_not_a_corner;
425
if( p[pixel[14]] < c_b)
426
if( p[pixel[15]] < c_b)
429
goto is_not_a_corner;
431
goto is_not_a_corner;
433
goto is_not_a_corner;
435
goto is_not_a_corner;
437
goto is_not_a_corner;
439
goto is_not_a_corner;
441
goto is_not_a_corner;
443
goto is_not_a_corner;
445
if( p[pixel[5]] < c_b)
446
if( p[pixel[6]] < c_b)
447
if( p[pixel[7]] < c_b)
448
if( p[pixel[8]] < c_b)
449
if( p[pixel[9]] < c_b)
450
if( p[pixel[10]] < c_b)
451
if( p[pixel[11]] < c_b)
452
if( p[pixel[12]] < c_b)
455
goto is_not_a_corner;
457
goto is_not_a_corner;
459
goto is_not_a_corner;
461
goto is_not_a_corner;
463
goto is_not_a_corner;
465
goto is_not_a_corner;
467
goto is_not_a_corner;
469
goto is_not_a_corner;
471
if( p[pixel[11]] > cb)
472
if( p[pixel[12]] > cb)
473
if( p[pixel[13]] > cb)
474
if( p[pixel[14]] > cb)
475
if( p[pixel[15]] > cb)
478
if( p[pixel[6]] > cb)
479
if( p[pixel[7]] > cb)
480
if( p[pixel[8]] > cb)
481
if( p[pixel[9]] > cb)
482
if( p[pixel[10]] > cb)
485
goto is_not_a_corner;
487
goto is_not_a_corner;
489
goto is_not_a_corner;
491
goto is_not_a_corner;
493
goto is_not_a_corner;
495
if( p[pixel[5]] > cb)
496
if( p[pixel[6]] > cb)
497
if( p[pixel[7]] > cb)
498
if( p[pixel[8]] > cb)
499
if( p[pixel[9]] > cb)
500
if( p[pixel[10]] > cb)
503
goto is_not_a_corner;
505
goto is_not_a_corner;
507
goto is_not_a_corner;
509
goto is_not_a_corner;
511
goto is_not_a_corner;
513
goto is_not_a_corner;
515
goto is_not_a_corner;
517
goto is_not_a_corner;
518
else if( p[pixel[11]] < c_b)
519
if( p[pixel[7]] < c_b)
520
if( p[pixel[8]] < c_b)
521
if( p[pixel[9]] < c_b)
522
if( p[pixel[10]] < c_b)
523
if( p[pixel[12]] < c_b)
524
if( p[pixel[13]] < c_b)
525
if( p[pixel[6]] < c_b)
526
if( p[pixel[5]] < c_b)
529
if( p[pixel[14]] < c_b)
532
goto is_not_a_corner;
534
if( p[pixel[14]] < c_b)
535
if( p[pixel[15]] < c_b)
538
goto is_not_a_corner;
540
goto is_not_a_corner;
542
goto is_not_a_corner;
544
goto is_not_a_corner;
546
goto is_not_a_corner;
548
goto is_not_a_corner;
550
goto is_not_a_corner;
552
goto is_not_a_corner;
554
goto is_not_a_corner;
555
else if( p[pixel[3]] < c_b)
556
if( p[pixel[10]] > cb)
557
if( p[pixel[11]] > cb)
558
if( p[pixel[12]] > cb)
559
if( p[pixel[13]] > cb)
560
if( p[pixel[14]] > cb)
561
if( p[pixel[15]] > cb)
564
if( p[pixel[6]] > cb)
565
if( p[pixel[7]] > cb)
566
if( p[pixel[8]] > cb)
567
if( p[pixel[9]] > cb)
570
goto is_not_a_corner;
572
goto is_not_a_corner;
574
goto is_not_a_corner;
576
goto is_not_a_corner;
578
if( p[pixel[5]] > cb)
579
if( p[pixel[6]] > cb)
580
if( p[pixel[7]] > cb)
581
if( p[pixel[8]] > cb)
582
if( p[pixel[9]] > cb)
585
goto is_not_a_corner;
587
goto is_not_a_corner;
589
goto is_not_a_corner;
591
goto is_not_a_corner;
593
goto is_not_a_corner;
595
if( p[pixel[4]] > cb)
596
if( p[pixel[5]] > cb)
597
if( p[pixel[6]] > cb)
598
if( p[pixel[7]] > cb)
599
if( p[pixel[8]] > cb)
600
if( p[pixel[9]] > cb)
603
goto is_not_a_corner;
605
goto is_not_a_corner;
607
goto is_not_a_corner;
609
goto is_not_a_corner;
611
goto is_not_a_corner;
613
goto is_not_a_corner;
615
goto is_not_a_corner;
617
goto is_not_a_corner;
618
else if( p[pixel[10]] < c_b)
619
if( p[pixel[7]] < c_b)
620
if( p[pixel[8]] < c_b)
621
if( p[pixel[9]] < c_b)
622
if( p[pixel[11]] < c_b)
623
if( p[pixel[6]] < c_b)
624
if( p[pixel[5]] < c_b)
625
if( p[pixel[4]] < c_b)
628
if( p[pixel[12]] < c_b)
629
if( p[pixel[13]] < c_b)
632
goto is_not_a_corner;
634
goto is_not_a_corner;
636
if( p[pixel[12]] < c_b)
637
if( p[pixel[13]] < c_b)
638
if( p[pixel[14]] < c_b)
641
goto is_not_a_corner;
643
goto is_not_a_corner;
645
goto is_not_a_corner;
647
if( p[pixel[12]] < c_b)
648
if( p[pixel[13]] < c_b)
649
if( p[pixel[14]] < c_b)
650
if( p[pixel[15]] < c_b)
653
goto is_not_a_corner;
655
goto is_not_a_corner;
657
goto is_not_a_corner;
659
goto is_not_a_corner;
661
goto is_not_a_corner;
663
goto is_not_a_corner;
665
goto is_not_a_corner;
667
goto is_not_a_corner;
669
goto is_not_a_corner;
671
if( p[pixel[10]] > cb)
672
if( p[pixel[11]] > cb)
673
if( p[pixel[12]] > cb)
674
if( p[pixel[13]] > cb)
675
if( p[pixel[14]] > cb)
676
if( p[pixel[15]] > cb)
679
if( p[pixel[6]] > cb)
680
if( p[pixel[7]] > cb)
681
if( p[pixel[8]] > cb)
682
if( p[pixel[9]] > cb)
685
goto is_not_a_corner;
687
goto is_not_a_corner;
689
goto is_not_a_corner;
691
goto is_not_a_corner;
693
if( p[pixel[5]] > cb)
694
if( p[pixel[6]] > cb)
695
if( p[pixel[7]] > cb)
696
if( p[pixel[8]] > cb)
697
if( p[pixel[9]] > cb)
700
goto is_not_a_corner;
702
goto is_not_a_corner;
704
goto is_not_a_corner;
706
goto is_not_a_corner;
708
goto is_not_a_corner;
710
if( p[pixel[4]] > cb)
711
if( p[pixel[5]] > cb)
712
if( p[pixel[6]] > cb)
713
if( p[pixel[7]] > cb)
714
if( p[pixel[8]] > cb)
715
if( p[pixel[9]] > cb)
718
goto is_not_a_corner;
720
goto is_not_a_corner;
722
goto is_not_a_corner;
724
goto is_not_a_corner;
726
goto is_not_a_corner;
728
goto is_not_a_corner;
730
goto is_not_a_corner;
732
goto is_not_a_corner;
733
else if( p[pixel[10]] < c_b)
734
if( p[pixel[7]] < c_b)
735
if( p[pixel[8]] < c_b)
736
if( p[pixel[9]] < c_b)
737
if( p[pixel[11]] < c_b)
738
if( p[pixel[12]] < c_b)
739
if( p[pixel[6]] < c_b)
740
if( p[pixel[5]] < c_b)
741
if( p[pixel[4]] < c_b)
744
if( p[pixel[13]] < c_b)
747
goto is_not_a_corner;
749
if( p[pixel[13]] < c_b)
750
if( p[pixel[14]] < c_b)
753
goto is_not_a_corner;
755
goto is_not_a_corner;
757
if( p[pixel[13]] < c_b)
758
if( p[pixel[14]] < c_b)
759
if( p[pixel[15]] < c_b)
762
goto is_not_a_corner;
764
goto is_not_a_corner;
766
goto is_not_a_corner;
768
goto is_not_a_corner;
770
goto is_not_a_corner;
772
goto is_not_a_corner;
774
goto is_not_a_corner;
776
goto is_not_a_corner;
778
goto is_not_a_corner;
779
else if( p[pixel[2]] < c_b)
780
if( p[pixel[9]] > cb)
781
if( p[pixel[10]] > cb)
782
if( p[pixel[11]] > cb)
783
if( p[pixel[12]] > cb)
784
if( p[pixel[13]] > cb)
785
if( p[pixel[14]] > cb)
786
if( p[pixel[15]] > cb)
789
if( p[pixel[6]] > cb)
790
if( p[pixel[7]] > cb)
791
if( p[pixel[8]] > cb)
794
goto is_not_a_corner;
796
goto is_not_a_corner;
798
goto is_not_a_corner;
800
if( p[pixel[5]] > cb)
801
if( p[pixel[6]] > cb)
802
if( p[pixel[7]] > cb)
803
if( p[pixel[8]] > cb)
806
goto is_not_a_corner;
808
goto is_not_a_corner;
810
goto is_not_a_corner;
812
goto is_not_a_corner;
814
if( p[pixel[4]] > cb)
815
if( p[pixel[5]] > cb)
816
if( p[pixel[6]] > cb)
817
if( p[pixel[7]] > cb)
818
if( p[pixel[8]] > cb)
821
goto is_not_a_corner;
823
goto is_not_a_corner;
825
goto is_not_a_corner;
827
goto is_not_a_corner;
829
goto is_not_a_corner;
831
if( p[pixel[3]] > cb)
832
if( p[pixel[4]] > cb)
833
if( p[pixel[5]] > cb)
834
if( p[pixel[6]] > cb)
835
if( p[pixel[7]] > cb)
836
if( p[pixel[8]] > cb)
839
goto is_not_a_corner;
841
goto is_not_a_corner;
843
goto is_not_a_corner;
845
goto is_not_a_corner;
847
goto is_not_a_corner;
849
goto is_not_a_corner;
851
goto is_not_a_corner;
853
goto is_not_a_corner;
854
else if( p[pixel[9]] < c_b)
855
if( p[pixel[7]] < c_b)
856
if( p[pixel[8]] < c_b)
857
if( p[pixel[10]] < c_b)
858
if( p[pixel[6]] < c_b)
859
if( p[pixel[5]] < c_b)
860
if( p[pixel[4]] < c_b)
861
if( p[pixel[3]] < c_b)
864
if( p[pixel[11]] < c_b)
865
if( p[pixel[12]] < c_b)
868
goto is_not_a_corner;
870
goto is_not_a_corner;
872
if( p[pixel[11]] < c_b)
873
if( p[pixel[12]] < c_b)
874
if( p[pixel[13]] < c_b)
877
goto is_not_a_corner;
879
goto is_not_a_corner;
881
goto is_not_a_corner;
883
if( p[pixel[11]] < c_b)
884
if( p[pixel[12]] < c_b)
885
if( p[pixel[13]] < c_b)
886
if( p[pixel[14]] < c_b)
889
goto is_not_a_corner;
891
goto is_not_a_corner;
893
goto is_not_a_corner;
895
goto is_not_a_corner;
897
if( p[pixel[11]] < c_b)
898
if( p[pixel[12]] < c_b)
899
if( p[pixel[13]] < c_b)
900
if( p[pixel[14]] < c_b)
901
if( p[pixel[15]] < c_b)
904
goto is_not_a_corner;
906
goto is_not_a_corner;
908
goto is_not_a_corner;
910
goto is_not_a_corner;
912
goto is_not_a_corner;
914
goto is_not_a_corner;
916
goto is_not_a_corner;
918
goto is_not_a_corner;
920
goto is_not_a_corner;
922
if( p[pixel[9]] > cb)
923
if( p[pixel[10]] > cb)
924
if( p[pixel[11]] > cb)
925
if( p[pixel[12]] > cb)
926
if( p[pixel[13]] > cb)
927
if( p[pixel[14]] > cb)
928
if( p[pixel[15]] > cb)
931
if( p[pixel[6]] > cb)
932
if( p[pixel[7]] > cb)
933
if( p[pixel[8]] > cb)
936
goto is_not_a_corner;
938
goto is_not_a_corner;
940
goto is_not_a_corner;
942
if( p[pixel[5]] > cb)
943
if( p[pixel[6]] > cb)
944
if( p[pixel[7]] > cb)
945
if( p[pixel[8]] > cb)
948
goto is_not_a_corner;
950
goto is_not_a_corner;
952
goto is_not_a_corner;
954
goto is_not_a_corner;
956
if( p[pixel[4]] > cb)
957
if( p[pixel[5]] > cb)
958
if( p[pixel[6]] > cb)
959
if( p[pixel[7]] > cb)
960
if( p[pixel[8]] > cb)
963
goto is_not_a_corner;
965
goto is_not_a_corner;
967
goto is_not_a_corner;
969
goto is_not_a_corner;
971
goto is_not_a_corner;
973
if( p[pixel[3]] > cb)
974
if( p[pixel[4]] > cb)
975
if( p[pixel[5]] > cb)
976
if( p[pixel[6]] > cb)
977
if( p[pixel[7]] > cb)
978
if( p[pixel[8]] > cb)
981
goto is_not_a_corner;
983
goto is_not_a_corner;
985
goto is_not_a_corner;
987
goto is_not_a_corner;
989
goto is_not_a_corner;
991
goto is_not_a_corner;
993
goto is_not_a_corner;
995
goto is_not_a_corner;
996
else if( p[pixel[9]] < c_b)
997
if( p[pixel[7]] < c_b)
998
if( p[pixel[8]] < c_b)
999
if( p[pixel[10]] < c_b)
1000
if( p[pixel[11]] < c_b)
1001
if( p[pixel[6]] < c_b)
1002
if( p[pixel[5]] < c_b)
1003
if( p[pixel[4]] < c_b)
1004
if( p[pixel[3]] < c_b)
1007
if( p[pixel[12]] < c_b)
1010
goto is_not_a_corner;
1012
if( p[pixel[12]] < c_b)
1013
if( p[pixel[13]] < c_b)
1016
goto is_not_a_corner;
1018
goto is_not_a_corner;
1020
if( p[pixel[12]] < c_b)
1021
if( p[pixel[13]] < c_b)
1022
if( p[pixel[14]] < c_b)
1025
goto is_not_a_corner;
1027
goto is_not_a_corner;
1029
goto is_not_a_corner;
1031
if( p[pixel[12]] < c_b)
1032
if( p[pixel[13]] < c_b)
1033
if( p[pixel[14]] < c_b)
1034
if( p[pixel[15]] < c_b)
1037
goto is_not_a_corner;
1039
goto is_not_a_corner;
1041
goto is_not_a_corner;
1043
goto is_not_a_corner;
1045
goto is_not_a_corner;
1047
goto is_not_a_corner;
1049
goto is_not_a_corner;
1051
goto is_not_a_corner;
1053
goto is_not_a_corner;
1054
else if( p[pixel[1]] < c_b)
1055
if( p[pixel[8]] > cb)
1056
if( p[pixel[9]] > cb)
1057
if( p[pixel[10]] > cb)
1058
if( p[pixel[11]] > cb)
1059
if( p[pixel[12]] > cb)
1060
if( p[pixel[13]] > cb)
1061
if( p[pixel[14]] > cb)
1062
if( p[pixel[15]] > cb)
1065
if( p[pixel[6]] > cb)
1066
if( p[pixel[7]] > cb)
1069
goto is_not_a_corner;
1071
goto is_not_a_corner;
1073
if( p[pixel[5]] > cb)
1074
if( p[pixel[6]] > cb)
1075
if( p[pixel[7]] > cb)
1078
goto is_not_a_corner;
1080
goto is_not_a_corner;
1082
goto is_not_a_corner;
1084
if( p[pixel[4]] > cb)
1085
if( p[pixel[5]] > cb)
1086
if( p[pixel[6]] > cb)
1087
if( p[pixel[7]] > cb)
1090
goto is_not_a_corner;
1092
goto is_not_a_corner;
1094
goto is_not_a_corner;
1096
goto is_not_a_corner;
1098
if( p[pixel[3]] > cb)
1099
if( p[pixel[4]] > cb)
1100
if( p[pixel[5]] > cb)
1101
if( p[pixel[6]] > cb)
1102
if( p[pixel[7]] > cb)
1105
goto is_not_a_corner;
1107
goto is_not_a_corner;
1109
goto is_not_a_corner;
1111
goto is_not_a_corner;
1113
goto is_not_a_corner;
1115
if( p[pixel[2]] > cb)
1116
if( p[pixel[3]] > cb)
1117
if( p[pixel[4]] > cb)
1118
if( p[pixel[5]] > cb)
1119
if( p[pixel[6]] > cb)
1120
if( p[pixel[7]] > cb)
1123
goto is_not_a_corner;
1125
goto is_not_a_corner;
1127
goto is_not_a_corner;
1129
goto is_not_a_corner;
1131
goto is_not_a_corner;
1133
goto is_not_a_corner;
1135
goto is_not_a_corner;
1137
goto is_not_a_corner;
1138
else if( p[pixel[8]] < c_b)
1139
if( p[pixel[7]] < c_b)
1140
if( p[pixel[9]] < c_b)
1141
if( p[pixel[6]] < c_b)
1142
if( p[pixel[5]] < c_b)
1143
if( p[pixel[4]] < c_b)
1144
if( p[pixel[3]] < c_b)
1145
if( p[pixel[2]] < c_b)
1148
if( p[pixel[10]] < c_b)
1149
if( p[pixel[11]] < c_b)
1152
goto is_not_a_corner;
1154
goto is_not_a_corner;
1156
if( p[pixel[10]] < c_b)
1157
if( p[pixel[11]] < c_b)
1158
if( p[pixel[12]] < c_b)
1161
goto is_not_a_corner;
1163
goto is_not_a_corner;
1165
goto is_not_a_corner;
1167
if( p[pixel[10]] < c_b)
1168
if( p[pixel[11]] < c_b)
1169
if( p[pixel[12]] < c_b)
1170
if( p[pixel[13]] < c_b)
1173
goto is_not_a_corner;
1175
goto is_not_a_corner;
1177
goto is_not_a_corner;
1179
goto is_not_a_corner;
1181
if( p[pixel[10]] < c_b)
1182
if( p[pixel[11]] < c_b)
1183
if( p[pixel[12]] < c_b)
1184
if( p[pixel[13]] < c_b)
1185
if( p[pixel[14]] < c_b)
1188
goto is_not_a_corner;
1190
goto is_not_a_corner;
1192
goto is_not_a_corner;
1194
goto is_not_a_corner;
1196
goto is_not_a_corner;
1198
if( p[pixel[10]] < c_b)
1199
if( p[pixel[11]] < c_b)
1200
if( p[pixel[12]] < c_b)
1201
if( p[pixel[13]] < c_b)
1202
if( p[pixel[14]] < c_b)
1203
if( p[pixel[15]] < c_b)
1206
goto is_not_a_corner;
1208
goto is_not_a_corner;
1210
goto is_not_a_corner;
1212
goto is_not_a_corner;
1214
goto is_not_a_corner;
1216
goto is_not_a_corner;
1218
goto is_not_a_corner;
1220
goto is_not_a_corner;
1222
goto is_not_a_corner;
1224
if( p[pixel[8]] > cb)
1225
if( p[pixel[9]] > cb)
1226
if( p[pixel[10]] > cb)
1227
if( p[pixel[11]] > cb)
1228
if( p[pixel[12]] > cb)
1229
if( p[pixel[13]] > cb)
1230
if( p[pixel[14]] > cb)
1231
if( p[pixel[15]] > cb)
1234
if( p[pixel[6]] > cb)
1235
if( p[pixel[7]] > cb)
1238
goto is_not_a_corner;
1240
goto is_not_a_corner;
1242
if( p[pixel[5]] > cb)
1243
if( p[pixel[6]] > cb)
1244
if( p[pixel[7]] > cb)
1247
goto is_not_a_corner;
1249
goto is_not_a_corner;
1251
goto is_not_a_corner;
1253
if( p[pixel[4]] > cb)
1254
if( p[pixel[5]] > cb)
1255
if( p[pixel[6]] > cb)
1256
if( p[pixel[7]] > cb)
1259
goto is_not_a_corner;
1261
goto is_not_a_corner;
1263
goto is_not_a_corner;
1265
goto is_not_a_corner;
1267
if( p[pixel[3]] > cb)
1268
if( p[pixel[4]] > cb)
1269
if( p[pixel[5]] > cb)
1270
if( p[pixel[6]] > cb)
1271
if( p[pixel[7]] > cb)
1274
goto is_not_a_corner;
1276
goto is_not_a_corner;
1278
goto is_not_a_corner;
1280
goto is_not_a_corner;
1282
goto is_not_a_corner;
1284
if( p[pixel[2]] > cb)
1285
if( p[pixel[3]] > cb)
1286
if( p[pixel[4]] > cb)
1287
if( p[pixel[5]] > cb)
1288
if( p[pixel[6]] > cb)
1289
if( p[pixel[7]] > cb)
1292
goto is_not_a_corner;
1294
goto is_not_a_corner;
1296
goto is_not_a_corner;
1298
goto is_not_a_corner;
1300
goto is_not_a_corner;
1302
goto is_not_a_corner;
1304
goto is_not_a_corner;
1306
goto is_not_a_corner;
1307
else if( p[pixel[8]] < c_b)
1308
if( p[pixel[7]] < c_b)
1309
if( p[pixel[9]] < c_b)
1310
if( p[pixel[10]] < c_b)
1311
if( p[pixel[6]] < c_b)
1312
if( p[pixel[5]] < c_b)
1313
if( p[pixel[4]] < c_b)
1314
if( p[pixel[3]] < c_b)
1315
if( p[pixel[2]] < c_b)
1318
if( p[pixel[11]] < c_b)
1321
goto is_not_a_corner;
1323
if( p[pixel[11]] < c_b)
1324
if( p[pixel[12]] < c_b)
1327
goto is_not_a_corner;
1329
goto is_not_a_corner;
1331
if( p[pixel[11]] < c_b)
1332
if( p[pixel[12]] < c_b)
1333
if( p[pixel[13]] < c_b)
1336
goto is_not_a_corner;
1338
goto is_not_a_corner;
1340
goto is_not_a_corner;
1342
if( p[pixel[11]] < c_b)
1343
if( p[pixel[12]] < c_b)
1344
if( p[pixel[13]] < c_b)
1345
if( p[pixel[14]] < c_b)
1348
goto is_not_a_corner;
1350
goto is_not_a_corner;
1352
goto is_not_a_corner;
1354
goto is_not_a_corner;
1356
if( p[pixel[11]] < c_b)
1357
if( p[pixel[12]] < c_b)
1358
if( p[pixel[13]] < c_b)
1359
if( p[pixel[14]] < c_b)
1360
if( p[pixel[15]] < c_b)
1363
goto is_not_a_corner;
1365
goto is_not_a_corner;
1367
goto is_not_a_corner;
1369
goto is_not_a_corner;
1371
goto is_not_a_corner;
1373
goto is_not_a_corner;
1375
goto is_not_a_corner;
1377
goto is_not_a_corner;
1379
goto is_not_a_corner;
1380
else if( p[pixel[0]] < c_b)
1381
if( p[pixel[1]] > cb)
1382
if( p[pixel[8]] > cb)
1383
if( p[pixel[7]] > cb)
1384
if( p[pixel[9]] > cb)
1385
if( p[pixel[6]] > cb)
1386
if( p[pixel[5]] > cb)
1387
if( p[pixel[4]] > cb)
1388
if( p[pixel[3]] > cb)
1389
if( p[pixel[2]] > cb)
1392
if( p[pixel[10]] > cb)
1393
if( p[pixel[11]] > cb)
1396
goto is_not_a_corner;
1398
goto is_not_a_corner;
1400
if( p[pixel[10]] > cb)
1401
if( p[pixel[11]] > cb)
1402
if( p[pixel[12]] > cb)
1405
goto is_not_a_corner;
1407
goto is_not_a_corner;
1409
goto is_not_a_corner;
1411
if( p[pixel[10]] > cb)
1412
if( p[pixel[11]] > cb)
1413
if( p[pixel[12]] > cb)
1414
if( p[pixel[13]] > cb)
1417
goto is_not_a_corner;
1419
goto is_not_a_corner;
1421
goto is_not_a_corner;
1423
goto is_not_a_corner;
1425
if( p[pixel[10]] > cb)
1426
if( p[pixel[11]] > cb)
1427
if( p[pixel[12]] > cb)
1428
if( p[pixel[13]] > cb)
1429
if( p[pixel[14]] > cb)
1432
goto is_not_a_corner;
1434
goto is_not_a_corner;
1436
goto is_not_a_corner;
1438
goto is_not_a_corner;
1440
goto is_not_a_corner;
1442
if( p[pixel[10]] > cb)
1443
if( p[pixel[11]] > cb)
1444
if( p[pixel[12]] > cb)
1445
if( p[pixel[13]] > cb)
1446
if( p[pixel[14]] > cb)
1447
if( p[pixel[15]] > cb)
1450
goto is_not_a_corner;
1452
goto is_not_a_corner;
1454
goto is_not_a_corner;
1456
goto is_not_a_corner;
1458
goto is_not_a_corner;
1460
goto is_not_a_corner;
1462
goto is_not_a_corner;
1464
goto is_not_a_corner;
1465
else if( p[pixel[8]] < c_b)
1466
if( p[pixel[9]] < c_b)
1467
if( p[pixel[10]] < c_b)
1468
if( p[pixel[11]] < c_b)
1469
if( p[pixel[12]] < c_b)
1470
if( p[pixel[13]] < c_b)
1471
if( p[pixel[14]] < c_b)
1472
if( p[pixel[15]] < c_b)
1475
if( p[pixel[6]] < c_b)
1476
if( p[pixel[7]] < c_b)
1479
goto is_not_a_corner;
1481
goto is_not_a_corner;
1483
if( p[pixel[5]] < c_b)
1484
if( p[pixel[6]] < c_b)
1485
if( p[pixel[7]] < c_b)
1488
goto is_not_a_corner;
1490
goto is_not_a_corner;
1492
goto is_not_a_corner;
1494
if( p[pixel[4]] < c_b)
1495
if( p[pixel[5]] < c_b)
1496
if( p[pixel[6]] < c_b)
1497
if( p[pixel[7]] < c_b)
1500
goto is_not_a_corner;
1502
goto is_not_a_corner;
1504
goto is_not_a_corner;
1506
goto is_not_a_corner;
1508
if( p[pixel[3]] < c_b)
1509
if( p[pixel[4]] < c_b)
1510
if( p[pixel[5]] < c_b)
1511
if( p[pixel[6]] < c_b)
1512
if( p[pixel[7]] < c_b)
1515
goto is_not_a_corner;
1517
goto is_not_a_corner;
1519
goto is_not_a_corner;
1521
goto is_not_a_corner;
1523
goto is_not_a_corner;
1525
if( p[pixel[2]] < c_b)
1526
if( p[pixel[3]] < c_b)
1527
if( p[pixel[4]] < c_b)
1528
if( p[pixel[5]] < c_b)
1529
if( p[pixel[6]] < c_b)
1530
if( p[pixel[7]] < c_b)
1533
goto is_not_a_corner;
1535
goto is_not_a_corner;
1537
goto is_not_a_corner;
1539
goto is_not_a_corner;
1541
goto is_not_a_corner;
1543
goto is_not_a_corner;
1545
goto is_not_a_corner;
1547
goto is_not_a_corner;
1549
goto is_not_a_corner;
1550
else if( p[pixel[1]] < c_b)
1551
if( p[pixel[2]] > cb)
1552
if( p[pixel[9]] > cb)
1553
if( p[pixel[7]] > cb)
1554
if( p[pixel[8]] > cb)
1555
if( p[pixel[10]] > cb)
1556
if( p[pixel[6]] > cb)
1557
if( p[pixel[5]] > cb)
1558
if( p[pixel[4]] > cb)
1559
if( p[pixel[3]] > cb)
1562
if( p[pixel[11]] > cb)
1563
if( p[pixel[12]] > cb)
1566
goto is_not_a_corner;
1568
goto is_not_a_corner;
1570
if( p[pixel[11]] > cb)
1571
if( p[pixel[12]] > cb)
1572
if( p[pixel[13]] > cb)
1575
goto is_not_a_corner;
1577
goto is_not_a_corner;
1579
goto is_not_a_corner;
1581
if( p[pixel[11]] > cb)
1582
if( p[pixel[12]] > cb)
1583
if( p[pixel[13]] > cb)
1584
if( p[pixel[14]] > cb)
1587
goto is_not_a_corner;
1589
goto is_not_a_corner;
1591
goto is_not_a_corner;
1593
goto is_not_a_corner;
1595
if( p[pixel[11]] > cb)
1596
if( p[pixel[12]] > cb)
1597
if( p[pixel[13]] > cb)
1598
if( p[pixel[14]] > cb)
1599
if( p[pixel[15]] > cb)
1602
goto is_not_a_corner;
1604
goto is_not_a_corner;
1606
goto is_not_a_corner;
1608
goto is_not_a_corner;
1610
goto is_not_a_corner;
1612
goto is_not_a_corner;
1614
goto is_not_a_corner;
1616
goto is_not_a_corner;
1617
else if( p[pixel[9]] < c_b)
1618
if( p[pixel[10]] < c_b)
1619
if( p[pixel[11]] < c_b)
1620
if( p[pixel[12]] < c_b)
1621
if( p[pixel[13]] < c_b)
1622
if( p[pixel[14]] < c_b)
1623
if( p[pixel[15]] < c_b)
1626
if( p[pixel[6]] < c_b)
1627
if( p[pixel[7]] < c_b)
1628
if( p[pixel[8]] < c_b)
1631
goto is_not_a_corner;
1633
goto is_not_a_corner;
1635
goto is_not_a_corner;
1637
if( p[pixel[5]] < c_b)
1638
if( p[pixel[6]] < c_b)
1639
if( p[pixel[7]] < c_b)
1640
if( p[pixel[8]] < c_b)
1643
goto is_not_a_corner;
1645
goto is_not_a_corner;
1647
goto is_not_a_corner;
1649
goto is_not_a_corner;
1651
if( p[pixel[4]] < c_b)
1652
if( p[pixel[5]] < c_b)
1653
if( p[pixel[6]] < c_b)
1654
if( p[pixel[7]] < c_b)
1655
if( p[pixel[8]] < c_b)
1658
goto is_not_a_corner;
1660
goto is_not_a_corner;
1662
goto is_not_a_corner;
1664
goto is_not_a_corner;
1666
goto is_not_a_corner;
1668
if( p[pixel[3]] < c_b)
1669
if( p[pixel[4]] < c_b)
1670
if( p[pixel[5]] < c_b)
1671
if( p[pixel[6]] < c_b)
1672
if( p[pixel[7]] < c_b)
1673
if( p[pixel[8]] < c_b)
1676
goto is_not_a_corner;
1678
goto is_not_a_corner;
1680
goto is_not_a_corner;
1682
goto is_not_a_corner;
1684
goto is_not_a_corner;
1686
goto is_not_a_corner;
1688
goto is_not_a_corner;
1690
goto is_not_a_corner;
1692
goto is_not_a_corner;
1693
else if( p[pixel[2]] < c_b)
1694
if( p[pixel[3]] > cb)
1695
if( p[pixel[10]] > cb)
1696
if( p[pixel[7]] > cb)
1697
if( p[pixel[8]] > cb)
1698
if( p[pixel[9]] > cb)
1699
if( p[pixel[11]] > cb)
1700
if( p[pixel[6]] > cb)
1701
if( p[pixel[5]] > cb)
1702
if( p[pixel[4]] > cb)
1705
if( p[pixel[12]] > cb)
1706
if( p[pixel[13]] > cb)
1709
goto is_not_a_corner;
1711
goto is_not_a_corner;
1713
if( p[pixel[12]] > cb)
1714
if( p[pixel[13]] > cb)
1715
if( p[pixel[14]] > cb)
1718
goto is_not_a_corner;
1720
goto is_not_a_corner;
1722
goto is_not_a_corner;
1724
if( p[pixel[12]] > cb)
1725
if( p[pixel[13]] > cb)
1726
if( p[pixel[14]] > cb)
1727
if( p[pixel[15]] > cb)
1730
goto is_not_a_corner;
1732
goto is_not_a_corner;
1734
goto is_not_a_corner;
1736
goto is_not_a_corner;
1738
goto is_not_a_corner;
1740
goto is_not_a_corner;
1742
goto is_not_a_corner;
1744
goto is_not_a_corner;
1745
else if( p[pixel[10]] < c_b)
1746
if( p[pixel[11]] < c_b)
1747
if( p[pixel[12]] < c_b)
1748
if( p[pixel[13]] < c_b)
1749
if( p[pixel[14]] < c_b)
1750
if( p[pixel[15]] < c_b)
1753
if( p[pixel[6]] < c_b)
1754
if( p[pixel[7]] < c_b)
1755
if( p[pixel[8]] < c_b)
1756
if( p[pixel[9]] < c_b)
1759
goto is_not_a_corner;
1761
goto is_not_a_corner;
1763
goto is_not_a_corner;
1765
goto is_not_a_corner;
1767
if( p[pixel[5]] < c_b)
1768
if( p[pixel[6]] < c_b)
1769
if( p[pixel[7]] < c_b)
1770
if( p[pixel[8]] < c_b)
1771
if( p[pixel[9]] < c_b)
1774
goto is_not_a_corner;
1776
goto is_not_a_corner;
1778
goto is_not_a_corner;
1780
goto is_not_a_corner;
1782
goto is_not_a_corner;
1784
if( p[pixel[4]] < c_b)
1785
if( p[pixel[5]] < c_b)
1786
if( p[pixel[6]] < c_b)
1787
if( p[pixel[7]] < c_b)
1788
if( p[pixel[8]] < c_b)
1789
if( p[pixel[9]] < c_b)
1792
goto is_not_a_corner;
1794
goto is_not_a_corner;
1796
goto is_not_a_corner;
1798
goto is_not_a_corner;
1800
goto is_not_a_corner;
1802
goto is_not_a_corner;
1804
goto is_not_a_corner;
1806
goto is_not_a_corner;
1808
goto is_not_a_corner;
1809
else if( p[pixel[3]] < c_b)
1810
if( p[pixel[4]] > cb)
1811
if( p[pixel[13]] > cb)
1812
if( p[pixel[7]] > cb)
1813
if( p[pixel[8]] > cb)
1814
if( p[pixel[9]] > cb)
1815
if( p[pixel[10]] > cb)
1816
if( p[pixel[11]] > cb)
1817
if( p[pixel[12]] > cb)
1818
if( p[pixel[6]] > cb)
1819
if( p[pixel[5]] > cb)
1822
if( p[pixel[14]] > cb)
1825
goto is_not_a_corner;
1827
if( p[pixel[14]] > cb)
1828
if( p[pixel[15]] > cb)
1831
goto is_not_a_corner;
1833
goto is_not_a_corner;
1835
goto is_not_a_corner;
1837
goto is_not_a_corner;
1839
goto is_not_a_corner;
1841
goto is_not_a_corner;
1843
goto is_not_a_corner;
1845
goto is_not_a_corner;
1846
else if( p[pixel[13]] < c_b)
1847
if( p[pixel[11]] > cb)
1848
if( p[pixel[5]] > cb)
1849
if( p[pixel[6]] > cb)
1850
if( p[pixel[7]] > cb)
1851
if( p[pixel[8]] > cb)
1852
if( p[pixel[9]] > cb)
1853
if( p[pixel[10]] > cb)
1854
if( p[pixel[12]] > cb)
1857
goto is_not_a_corner;
1859
goto is_not_a_corner;
1861
goto is_not_a_corner;
1863
goto is_not_a_corner;
1865
goto is_not_a_corner;
1867
goto is_not_a_corner;
1869
goto is_not_a_corner;
1870
else if( p[pixel[11]] < c_b)
1871
if( p[pixel[12]] < c_b)
1872
if( p[pixel[14]] < c_b)
1873
if( p[pixel[15]] < c_b)
1876
if( p[pixel[6]] < c_b)
1877
if( p[pixel[7]] < c_b)
1878
if( p[pixel[8]] < c_b)
1879
if( p[pixel[9]] < c_b)
1880
if( p[pixel[10]] < c_b)
1883
goto is_not_a_corner;
1885
goto is_not_a_corner;
1887
goto is_not_a_corner;
1889
goto is_not_a_corner;
1891
goto is_not_a_corner;
1893
if( p[pixel[5]] < c_b)
1894
if( p[pixel[6]] < c_b)
1895
if( p[pixel[7]] < c_b)
1896
if( p[pixel[8]] < c_b)
1897
if( p[pixel[9]] < c_b)
1898
if( p[pixel[10]] < c_b)
1901
goto is_not_a_corner;
1903
goto is_not_a_corner;
1905
goto is_not_a_corner;
1907
goto is_not_a_corner;
1909
goto is_not_a_corner;
1911
goto is_not_a_corner;
1913
goto is_not_a_corner;
1915
goto is_not_a_corner;
1917
if( p[pixel[5]] > cb)
1918
if( p[pixel[6]] > cb)
1919
if( p[pixel[7]] > cb)
1920
if( p[pixel[8]] > cb)
1921
if( p[pixel[9]] > cb)
1922
if( p[pixel[10]] > cb)
1923
if( p[pixel[11]] > cb)
1924
if( p[pixel[12]] > cb)
1927
goto is_not_a_corner;
1929
goto is_not_a_corner;
1931
goto is_not_a_corner;
1933
goto is_not_a_corner;
1935
goto is_not_a_corner;
1937
goto is_not_a_corner;
1939
goto is_not_a_corner;
1941
goto is_not_a_corner;
1942
else if( p[pixel[4]] < c_b)
1943
if( p[pixel[5]] > cb)
1944
if( p[pixel[14]] > cb)
1945
if( p[pixel[7]] > cb)
1946
if( p[pixel[8]] > cb)
1947
if( p[pixel[9]] > cb)
1948
if( p[pixel[10]] > cb)
1949
if( p[pixel[11]] > cb)
1950
if( p[pixel[12]] > cb)
1951
if( p[pixel[13]] > cb)
1952
if( p[pixel[6]] > cb)
1955
if( p[pixel[15]] > cb)
1958
goto is_not_a_corner;
1960
goto is_not_a_corner;
1962
goto is_not_a_corner;
1964
goto is_not_a_corner;
1966
goto is_not_a_corner;
1968
goto is_not_a_corner;
1970
goto is_not_a_corner;
1972
goto is_not_a_corner;
1973
else if( p[pixel[14]] < c_b)
1974
if( p[pixel[12]] > cb)
1975
if( p[pixel[6]] > cb)
1976
if( p[pixel[7]] > cb)
1977
if( p[pixel[8]] > cb)
1978
if( p[pixel[9]] > cb)
1979
if( p[pixel[10]] > cb)
1980
if( p[pixel[11]] > cb)
1981
if( p[pixel[13]] > cb)
1984
goto is_not_a_corner;
1986
goto is_not_a_corner;
1988
goto is_not_a_corner;
1990
goto is_not_a_corner;
1992
goto is_not_a_corner;
1994
goto is_not_a_corner;
1996
goto is_not_a_corner;
1997
else if( p[pixel[12]] < c_b)
1998
if( p[pixel[13]] < c_b)
1999
if( p[pixel[15]] < c_b)
2002
if( p[pixel[6]] < c_b)
2003
if( p[pixel[7]] < c_b)
2004
if( p[pixel[8]] < c_b)
2005
if( p[pixel[9]] < c_b)
2006
if( p[pixel[10]] < c_b)
2007
if( p[pixel[11]] < c_b)
2010
goto is_not_a_corner;
2012
goto is_not_a_corner;
2014
goto is_not_a_corner;
2016
goto is_not_a_corner;
2018
goto is_not_a_corner;
2020
goto is_not_a_corner;
2022
goto is_not_a_corner;
2024
goto is_not_a_corner;
2026
if( p[pixel[6]] > cb)
2027
if( p[pixel[7]] > cb)
2028
if( p[pixel[8]] > cb)
2029
if( p[pixel[9]] > cb)
2030
if( p[pixel[10]] > cb)
2031
if( p[pixel[11]] > cb)
2032
if( p[pixel[12]] > cb)
2033
if( p[pixel[13]] > cb)
2036
goto is_not_a_corner;
2038
goto is_not_a_corner;
2040
goto is_not_a_corner;
2042
goto is_not_a_corner;
2044
goto is_not_a_corner;
2046
goto is_not_a_corner;
2048
goto is_not_a_corner;
2050
goto is_not_a_corner;
2051
else if( p[pixel[5]] < c_b)
2052
if( p[pixel[6]] > cb)
2053
if( p[pixel[15]] < c_b)
2054
if( p[pixel[13]] > cb)
2055
if( p[pixel[7]] > cb)
2056
if( p[pixel[8]] > cb)
2057
if( p[pixel[9]] > cb)
2058
if( p[pixel[10]] > cb)
2059
if( p[pixel[11]] > cb)
2060
if( p[pixel[12]] > cb)
2061
if( p[pixel[14]] > cb)
2064
goto is_not_a_corner;
2066
goto is_not_a_corner;
2068
goto is_not_a_corner;
2070
goto is_not_a_corner;
2072
goto is_not_a_corner;
2074
goto is_not_a_corner;
2076
goto is_not_a_corner;
2077
else if( p[pixel[13]] < c_b)
2078
if( p[pixel[14]] < c_b)
2081
goto is_not_a_corner;
2083
goto is_not_a_corner;
2085
if( p[pixel[7]] > cb)
2086
if( p[pixel[8]] > cb)
2087
if( p[pixel[9]] > cb)
2088
if( p[pixel[10]] > cb)
2089
if( p[pixel[11]] > cb)
2090
if( p[pixel[12]] > cb)
2091
if( p[pixel[13]] > cb)
2092
if( p[pixel[14]] > cb)
2095
goto is_not_a_corner;
2097
goto is_not_a_corner;
2099
goto is_not_a_corner;
2101
goto is_not_a_corner;
2103
goto is_not_a_corner;
2105
goto is_not_a_corner;
2107
goto is_not_a_corner;
2109
goto is_not_a_corner;
2110
else if( p[pixel[6]] < c_b)
2111
if( p[pixel[7]] > cb)
2112
if( p[pixel[14]] > cb)
2113
if( p[pixel[8]] > cb)
2114
if( p[pixel[9]] > cb)
2115
if( p[pixel[10]] > cb)
2116
if( p[pixel[11]] > cb)
2117
if( p[pixel[12]] > cb)
2118
if( p[pixel[13]] > cb)
2119
if( p[pixel[15]] > cb)
2122
goto is_not_a_corner;
2124
goto is_not_a_corner;
2126
goto is_not_a_corner;
2128
goto is_not_a_corner;
2130
goto is_not_a_corner;
2132
goto is_not_a_corner;
2134
goto is_not_a_corner;
2135
else if( p[pixel[14]] < c_b)
2136
if( p[pixel[15]] < c_b)
2139
goto is_not_a_corner;
2141
goto is_not_a_corner;
2142
else if( p[pixel[7]] < c_b)
2143
if( p[pixel[8]] < c_b)
2146
if( p[pixel[15]] < c_b)
2149
goto is_not_a_corner;
2151
if( p[pixel[14]] < c_b)
2152
if( p[pixel[15]] < c_b)
2155
goto is_not_a_corner;
2157
goto is_not_a_corner;
2159
if( p[pixel[13]] > cb)
2160
if( p[pixel[7]] > cb)
2161
if( p[pixel[8]] > cb)
2162
if( p[pixel[9]] > cb)
2163
if( p[pixel[10]] > cb)
2164
if( p[pixel[11]] > cb)
2165
if( p[pixel[12]] > cb)
2166
if( p[pixel[14]] > cb)
2167
if( p[pixel[15]] > cb)
2170
goto is_not_a_corner;
2172
goto is_not_a_corner;
2174
goto is_not_a_corner;
2176
goto is_not_a_corner;
2178
goto is_not_a_corner;
2180
goto is_not_a_corner;
2182
goto is_not_a_corner;
2184
goto is_not_a_corner;
2185
else if( p[pixel[13]] < c_b)
2186
if( p[pixel[14]] < c_b)
2187
if( p[pixel[15]] < c_b)
2190
goto is_not_a_corner;
2192
goto is_not_a_corner;
2194
goto is_not_a_corner;
2196
if( p[pixel[12]] > cb)
2197
if( p[pixel[7]] > cb)
2198
if( p[pixel[8]] > cb)
2199
if( p[pixel[9]] > cb)
2200
if( p[pixel[10]] > cb)
2201
if( p[pixel[11]] > cb)
2202
if( p[pixel[13]] > cb)
2203
if( p[pixel[14]] > cb)
2204
if( p[pixel[6]] > cb)
2207
if( p[pixel[15]] > cb)
2210
goto is_not_a_corner;
2212
goto is_not_a_corner;
2214
goto is_not_a_corner;
2216
goto is_not_a_corner;
2218
goto is_not_a_corner;
2220
goto is_not_a_corner;
2222
goto is_not_a_corner;
2224
goto is_not_a_corner;
2225
else if( p[pixel[12]] < c_b)
2226
if( p[pixel[13]] < c_b)
2227
if( p[pixel[14]] < c_b)
2228
if( p[pixel[15]] < c_b)
2231
if( p[pixel[6]] < c_b)
2232
if( p[pixel[7]] < c_b)
2233
if( p[pixel[8]] < c_b)
2234
if( p[pixel[9]] < c_b)
2235
if( p[pixel[10]] < c_b)
2236
if( p[pixel[11]] < c_b)
2239
goto is_not_a_corner;
2241
goto is_not_a_corner;
2243
goto is_not_a_corner;
2245
goto is_not_a_corner;
2247
goto is_not_a_corner;
2249
goto is_not_a_corner;
2251
goto is_not_a_corner;
2253
goto is_not_a_corner;
2255
goto is_not_a_corner;
2257
if( p[pixel[11]] > cb)
2258
if( p[pixel[7]] > cb)
2259
if( p[pixel[8]] > cb)
2260
if( p[pixel[9]] > cb)
2261
if( p[pixel[10]] > cb)
2262
if( p[pixel[12]] > cb)
2263
if( p[pixel[13]] > cb)
2264
if( p[pixel[6]] > cb)
2265
if( p[pixel[5]] > cb)
2268
if( p[pixel[14]] > cb)
2271
goto is_not_a_corner;
2273
if( p[pixel[14]] > cb)
2274
if( p[pixel[15]] > cb)
2277
goto is_not_a_corner;
2279
goto is_not_a_corner;
2281
goto is_not_a_corner;
2283
goto is_not_a_corner;
2285
goto is_not_a_corner;
2287
goto is_not_a_corner;
2289
goto is_not_a_corner;
2291
goto is_not_a_corner;
2292
else if( p[pixel[11]] < c_b)
2293
if( p[pixel[12]] < c_b)
2294
if( p[pixel[13]] < c_b)
2295
if( p[pixel[14]] < c_b)
2296
if( p[pixel[15]] < c_b)
2299
if( p[pixel[6]] < c_b)
2300
if( p[pixel[7]] < c_b)
2301
if( p[pixel[8]] < c_b)
2302
if( p[pixel[9]] < c_b)
2303
if( p[pixel[10]] < c_b)
2306
goto is_not_a_corner;
2308
goto is_not_a_corner;
2310
goto is_not_a_corner;
2312
goto is_not_a_corner;
2314
goto is_not_a_corner;
2316
if( p[pixel[5]] < c_b)
2317
if( p[pixel[6]] < c_b)
2318
if( p[pixel[7]] < c_b)
2319
if( p[pixel[8]] < c_b)
2320
if( p[pixel[9]] < c_b)
2321
if( p[pixel[10]] < c_b)
2324
goto is_not_a_corner;
2326
goto is_not_a_corner;
2328
goto is_not_a_corner;
2330
goto is_not_a_corner;
2332
goto is_not_a_corner;
2334
goto is_not_a_corner;
2336
goto is_not_a_corner;
2338
goto is_not_a_corner;
2340
goto is_not_a_corner;
2342
if( p[pixel[10]] > cb)
2343
if( p[pixel[7]] > cb)
2344
if( p[pixel[8]] > cb)
2345
if( p[pixel[9]] > cb)
2346
if( p[pixel[11]] > cb)
2347
if( p[pixel[12]] > cb)
2348
if( p[pixel[6]] > cb)
2349
if( p[pixel[5]] > cb)
2350
if( p[pixel[4]] > cb)
2353
if( p[pixel[13]] > cb)
2356
goto is_not_a_corner;
2358
if( p[pixel[13]] > cb)
2359
if( p[pixel[14]] > cb)
2362
goto is_not_a_corner;
2364
goto is_not_a_corner;
2366
if( p[pixel[13]] > cb)
2367
if( p[pixel[14]] > cb)
2368
if( p[pixel[15]] > cb)
2371
goto is_not_a_corner;
2373
goto is_not_a_corner;
2375
goto is_not_a_corner;
2377
goto is_not_a_corner;
2379
goto is_not_a_corner;
2381
goto is_not_a_corner;
2383
goto is_not_a_corner;
2385
goto is_not_a_corner;
2386
else if( p[pixel[10]] < c_b)
2387
if( p[pixel[11]] < c_b)
2388
if( p[pixel[12]] < c_b)
2389
if( p[pixel[13]] < c_b)
2390
if( p[pixel[14]] < c_b)
2391
if( p[pixel[15]] < c_b)
2394
if( p[pixel[6]] < c_b)
2395
if( p[pixel[7]] < c_b)
2396
if( p[pixel[8]] < c_b)
2397
if( p[pixel[9]] < c_b)
2400
goto is_not_a_corner;
2402
goto is_not_a_corner;
2404
goto is_not_a_corner;
2406
goto is_not_a_corner;
2408
if( p[pixel[5]] < c_b)
2409
if( p[pixel[6]] < c_b)
2410
if( p[pixel[7]] < c_b)
2411
if( p[pixel[8]] < c_b)
2412
if( p[pixel[9]] < c_b)
2415
goto is_not_a_corner;
2417
goto is_not_a_corner;
2419
goto is_not_a_corner;
2421
goto is_not_a_corner;
2423
goto is_not_a_corner;
2425
if( p[pixel[4]] < c_b)
2426
if( p[pixel[5]] < c_b)
2427
if( p[pixel[6]] < c_b)
2428
if( p[pixel[7]] < c_b)
2429
if( p[pixel[8]] < c_b)
2430
if( p[pixel[9]] < c_b)
2433
goto is_not_a_corner;
2435
goto is_not_a_corner;
2437
goto is_not_a_corner;
2439
goto is_not_a_corner;
2441
goto is_not_a_corner;
2443
goto is_not_a_corner;
2445
goto is_not_a_corner;
2447
goto is_not_a_corner;
2449
goto is_not_a_corner;
2451
if( p[pixel[9]] > cb)
2452
if( p[pixel[7]] > cb)
2453
if( p[pixel[8]] > cb)
2454
if( p[pixel[10]] > cb)
2455
if( p[pixel[11]] > cb)
2456
if( p[pixel[6]] > cb)
2457
if( p[pixel[5]] > cb)
2458
if( p[pixel[4]] > cb)
2459
if( p[pixel[3]] > cb)
2462
if( p[pixel[12]] > cb)
2465
goto is_not_a_corner;
2467
if( p[pixel[12]] > cb)
2468
if( p[pixel[13]] > cb)
2471
goto is_not_a_corner;
2473
goto is_not_a_corner;
2475
if( p[pixel[12]] > cb)
2476
if( p[pixel[13]] > cb)
2477
if( p[pixel[14]] > cb)
2480
goto is_not_a_corner;
2482
goto is_not_a_corner;
2484
goto is_not_a_corner;
2486
if( p[pixel[12]] > cb)
2487
if( p[pixel[13]] > cb)
2488
if( p[pixel[14]] > cb)
2489
if( p[pixel[15]] > cb)
2492
goto is_not_a_corner;
2494
goto is_not_a_corner;
2496
goto is_not_a_corner;
2498
goto is_not_a_corner;
2500
goto is_not_a_corner;
2502
goto is_not_a_corner;
2504
goto is_not_a_corner;
2506
goto is_not_a_corner;
2507
else if( p[pixel[9]] < c_b)
2508
if( p[pixel[10]] < c_b)
2509
if( p[pixel[11]] < c_b)
2510
if( p[pixel[12]] < c_b)
2511
if( p[pixel[13]] < c_b)
2512
if( p[pixel[14]] < c_b)
2513
if( p[pixel[15]] < c_b)
2516
if( p[pixel[6]] < c_b)
2517
if( p[pixel[7]] < c_b)
2518
if( p[pixel[8]] < c_b)
2521
goto is_not_a_corner;
2523
goto is_not_a_corner;
2525
goto is_not_a_corner;
2527
if( p[pixel[5]] < c_b)
2528
if( p[pixel[6]] < c_b)
2529
if( p[pixel[7]] < c_b)
2530
if( p[pixel[8]] < c_b)
2533
goto is_not_a_corner;
2535
goto is_not_a_corner;
2537
goto is_not_a_corner;
2539
goto is_not_a_corner;
2541
if( p[pixel[4]] < c_b)
2542
if( p[pixel[5]] < c_b)
2543
if( p[pixel[6]] < c_b)
2544
if( p[pixel[7]] < c_b)
2545
if( p[pixel[8]] < c_b)
2548
goto is_not_a_corner;
2550
goto is_not_a_corner;
2552
goto is_not_a_corner;
2554
goto is_not_a_corner;
2556
goto is_not_a_corner;
2558
if( p[pixel[3]] < c_b)
2559
if( p[pixel[4]] < c_b)
2560
if( p[pixel[5]] < c_b)
2561
if( p[pixel[6]] < c_b)
2562
if( p[pixel[7]] < c_b)
2563
if( p[pixel[8]] < c_b)
2566
goto is_not_a_corner;
2568
goto is_not_a_corner;
2570
goto is_not_a_corner;
2572
goto is_not_a_corner;
2574
goto is_not_a_corner;
2576
goto is_not_a_corner;
2578
goto is_not_a_corner;
2580
goto is_not_a_corner;
2582
goto is_not_a_corner;
2584
if( p[pixel[8]] > cb)
2585
if( p[pixel[7]] > cb)
2586
if( p[pixel[9]] > cb)
2587
if( p[pixel[10]] > cb)
2588
if( p[pixel[6]] > cb)
2589
if( p[pixel[5]] > cb)
2590
if( p[pixel[4]] > cb)
2591
if( p[pixel[3]] > cb)
2592
if( p[pixel[2]] > cb)
2595
if( p[pixel[11]] > cb)
2598
goto is_not_a_corner;
2600
if( p[pixel[11]] > cb)
2601
if( p[pixel[12]] > cb)
2604
goto is_not_a_corner;
2606
goto is_not_a_corner;
2608
if( p[pixel[11]] > cb)
2609
if( p[pixel[12]] > cb)
2610
if( p[pixel[13]] > cb)
2613
goto is_not_a_corner;
2615
goto is_not_a_corner;
2617
goto is_not_a_corner;
2619
if( p[pixel[11]] > cb)
2620
if( p[pixel[12]] > cb)
2621
if( p[pixel[13]] > cb)
2622
if( p[pixel[14]] > cb)
2625
goto is_not_a_corner;
2627
goto is_not_a_corner;
2629
goto is_not_a_corner;
2631
goto is_not_a_corner;
2633
if( p[pixel[11]] > cb)
2634
if( p[pixel[12]] > cb)
2635
if( p[pixel[13]] > cb)
2636
if( p[pixel[14]] > cb)
2637
if( p[pixel[15]] > cb)
2640
goto is_not_a_corner;
2642
goto is_not_a_corner;
2644
goto is_not_a_corner;
2646
goto is_not_a_corner;
2648
goto is_not_a_corner;
2650
goto is_not_a_corner;
2652
goto is_not_a_corner;
2654
goto is_not_a_corner;
2655
else if( p[pixel[8]] < c_b)
2656
if( p[pixel[9]] < c_b)
2657
if( p[pixel[10]] < c_b)
2658
if( p[pixel[11]] < c_b)
2659
if( p[pixel[12]] < c_b)
2660
if( p[pixel[13]] < c_b)
2661
if( p[pixel[14]] < c_b)
2662
if( p[pixel[15]] < c_b)
2665
if( p[pixel[6]] < c_b)
2666
if( p[pixel[7]] < c_b)
2669
goto is_not_a_corner;
2671
goto is_not_a_corner;
2673
if( p[pixel[5]] < c_b)
2674
if( p[pixel[6]] < c_b)
2675
if( p[pixel[7]] < c_b)
2678
goto is_not_a_corner;
2680
goto is_not_a_corner;
2682
goto is_not_a_corner;
2684
if( p[pixel[4]] < c_b)
2685
if( p[pixel[5]] < c_b)
2686
if( p[pixel[6]] < c_b)
2687
if( p[pixel[7]] < c_b)
2690
goto is_not_a_corner;
2692
goto is_not_a_corner;
2694
goto is_not_a_corner;
2696
goto is_not_a_corner;
2698
if( p[pixel[3]] < c_b)
2699
if( p[pixel[4]] < c_b)
2700
if( p[pixel[5]] < c_b)
2701
if( p[pixel[6]] < c_b)
2702
if( p[pixel[7]] < c_b)
2705
goto is_not_a_corner;
2707
goto is_not_a_corner;
2709
goto is_not_a_corner;
2711
goto is_not_a_corner;
2713
goto is_not_a_corner;
2715
if( p[pixel[2]] < c_b)
2716
if( p[pixel[3]] < c_b)
2717
if( p[pixel[4]] < c_b)
2718
if( p[pixel[5]] < c_b)
2719
if( p[pixel[6]] < c_b)
2720
if( p[pixel[7]] < c_b)
2723
goto is_not_a_corner;
2725
goto is_not_a_corner;
2727
goto is_not_a_corner;
2729
goto is_not_a_corner;
2731
goto is_not_a_corner;
2733
goto is_not_a_corner;
2735
goto is_not_a_corner;
2737
goto is_not_a_corner;
2739
goto is_not_a_corner;
2741
if( p[pixel[7]] > cb)
2742
if( p[pixel[8]] > cb)
2743
if( p[pixel[9]] > cb)
2744
if( p[pixel[6]] > cb)
2745
if( p[pixel[5]] > cb)
2746
if( p[pixel[4]] > cb)
2747
if( p[pixel[3]] > cb)
2748
if( p[pixel[2]] > cb)
2749
if( p[pixel[1]] > cb)
2752
if( p[pixel[10]] > cb)
2755
goto is_not_a_corner;
2757
if( p[pixel[10]] > cb)
2758
if( p[pixel[11]] > cb)
2761
goto is_not_a_corner;
2763
goto is_not_a_corner;
2765
if( p[pixel[10]] > cb)
2766
if( p[pixel[11]] > cb)
2767
if( p[pixel[12]] > cb)
2770
goto is_not_a_corner;
2772
goto is_not_a_corner;
2774
goto is_not_a_corner;
2776
if( p[pixel[10]] > cb)
2777
if( p[pixel[11]] > cb)
2778
if( p[pixel[12]] > cb)
2779
if( p[pixel[13]] > cb)
2782
goto is_not_a_corner;
2784
goto is_not_a_corner;
2786
goto is_not_a_corner;
2788
goto is_not_a_corner;
2790
if( p[pixel[10]] > cb)
2791
if( p[pixel[11]] > cb)
2792
if( p[pixel[12]] > cb)
2793
if( p[pixel[13]] > cb)
2794
if( p[pixel[14]] > cb)
2797
goto is_not_a_corner;
2799
goto is_not_a_corner;
2801
goto is_not_a_corner;
2803
goto is_not_a_corner;
2805
goto is_not_a_corner;
2807
if( p[pixel[10]] > cb)
2808
if( p[pixel[11]] > cb)
2809
if( p[pixel[12]] > cb)
2810
if( p[pixel[13]] > cb)
2811
if( p[pixel[14]] > cb)
2812
if( p[pixel[15]] > cb)
2815
goto is_not_a_corner;
2817
goto is_not_a_corner;
2819
goto is_not_a_corner;
2821
goto is_not_a_corner;
2823
goto is_not_a_corner;
2825
goto is_not_a_corner;
2827
goto is_not_a_corner;
2829
goto is_not_a_corner;
2830
else if( p[pixel[7]] < c_b)
2831
if( p[pixel[8]] < c_b)
2832
if( p[pixel[9]] < c_b)
2833
if( p[pixel[6]] < c_b)
2834
if( p[pixel[5]] < c_b)
2835
if( p[pixel[4]] < c_b)
2836
if( p[pixel[3]] < c_b)
2837
if( p[pixel[2]] < c_b)
2838
if( p[pixel[1]] < c_b)
2841
if( p[pixel[10]] < c_b)
2844
goto is_not_a_corner;
2846
if( p[pixel[10]] < c_b)
2847
if( p[pixel[11]] < c_b)
2850
goto is_not_a_corner;
2852
goto is_not_a_corner;
2854
if( p[pixel[10]] < c_b)
2855
if( p[pixel[11]] < c_b)
2856
if( p[pixel[12]] < c_b)
2859
goto is_not_a_corner;
2861
goto is_not_a_corner;
2863
goto is_not_a_corner;
2865
if( p[pixel[10]] < c_b)
2866
if( p[pixel[11]] < c_b)
2867
if( p[pixel[12]] < c_b)
2868
if( p[pixel[13]] < c_b)
2871
goto is_not_a_corner;
2873
goto is_not_a_corner;
2875
goto is_not_a_corner;
2877
goto is_not_a_corner;
2879
if( p[pixel[10]] < c_b)
2880
if( p[pixel[11]] < c_b)
2881
if( p[pixel[12]] < c_b)
2882
if( p[pixel[13]] < c_b)
2883
if( p[pixel[14]] < c_b)
2886
goto is_not_a_corner;
2888
goto is_not_a_corner;
2890
goto is_not_a_corner;
2892
goto is_not_a_corner;
2894
goto is_not_a_corner;
2896
if( p[pixel[10]] < c_b)
2897
if( p[pixel[11]] < c_b)
2898
if( p[pixel[12]] < c_b)
2899
if( p[pixel[13]] < c_b)
2900
if( p[pixel[14]] < c_b)
2901
if( p[pixel[15]] < c_b)
2904
goto is_not_a_corner;
2906
goto is_not_a_corner;
2908
goto is_not_a_corner;
2910
goto is_not_a_corner;
2912
goto is_not_a_corner;
2914
goto is_not_a_corner;
2916
goto is_not_a_corner;
2918
goto is_not_a_corner;
2920
goto is_not_a_corner;
2932
if(bmin == bmax - 1 || bmin == bmax)
2934
b = (bmin + bmax) / 2;
2938
static void make_offsets(int pixel[], int row_stride)
2940
pixel[0] = 0 + row_stride * 3;
2941
pixel[1] = 1 + row_stride * 3;
2942
pixel[2] = 2 + row_stride * 2;
2943
pixel[3] = 3 + row_stride * 1;
2944
pixel[4] = 3 + row_stride * 0;
2945
pixel[5] = 3 + row_stride * -1;
2946
pixel[6] = 2 + row_stride * -2;
2947
pixel[7] = 1 + row_stride * -3;
2948
pixel[8] = 0 + row_stride * -3;
2949
pixel[9] = -1 + row_stride * -3;
2950
pixel[10] = -2 + row_stride * -2;
2951
pixel[11] = -3 + row_stride * -1;
2952
pixel[12] = -3 + row_stride * 0;
2953
pixel[13] = -3 + row_stride * 1;
2954
pixel[14] = -2 + row_stride * 2;
2955
pixel[15] = -1 + row_stride * 3;
2960
int* fast9_score(const byte* i, int stride, xy* corners, int num_corners, int b)
2962
int* scores = (int*)malloc(sizeof(int)* num_corners);
2966
make_offsets(pixel, stride);
2968
for(n=0; n < num_corners; n++)
2969
scores[n] = fast9_corner_score(i + corners[n].y*stride + corners[n].x, pixel, b);
2975
xy* fast9_detect(const byte* im, int xsize, int ysize, int stride, int b, int* ret_num_corners)
2983
ret_corners = (xy*)malloc(sizeof(xy)*rsize);
2984
make_offsets(pixel, stride);
2986
for(y=3; y < ysize - 3; y++)
2987
for(x=3; x < xsize - 3; x++)
2989
const byte* p = im + y*stride + x;
2993
if(p[pixel[0]] > cb)
2994
if(p[pixel[1]] > cb)
2995
if(p[pixel[2]] > cb)
2996
if(p[pixel[3]] > cb)
2997
if(p[pixel[4]] > cb)
2998
if(p[pixel[5]] > cb)
2999
if(p[pixel[6]] > cb)
3000
if(p[pixel[7]] > cb)
3001
if(p[pixel[8]] > cb)
3004
if(p[pixel[15]] > cb)
3008
else if(p[pixel[7]] < c_b)
3009
if(p[pixel[14]] > cb)
3010
if(p[pixel[15]] > cb)
3014
else if(p[pixel[14]] < c_b)
3015
if(p[pixel[8]] < c_b)
3016
if(p[pixel[9]] < c_b)
3017
if(p[pixel[10]] < c_b)
3018
if(p[pixel[11]] < c_b)
3019
if(p[pixel[12]] < c_b)
3020
if(p[pixel[13]] < c_b)
3021
if(p[pixel[15]] < c_b)
3040
if(p[pixel[14]] > cb)
3041
if(p[pixel[15]] > cb)
3047
else if(p[pixel[6]] < c_b)
3048
if(p[pixel[15]] > cb)
3049
if(p[pixel[13]] > cb)
3050
if(p[pixel[14]] > cb)
3054
else if(p[pixel[13]] < c_b)
3055
if(p[pixel[7]] < c_b)
3056
if(p[pixel[8]] < c_b)
3057
if(p[pixel[9]] < c_b)
3058
if(p[pixel[10]] < c_b)
3059
if(p[pixel[11]] < c_b)
3060
if(p[pixel[12]] < c_b)
3061
if(p[pixel[14]] < c_b)
3080
if(p[pixel[7]] < c_b)
3081
if(p[pixel[8]] < c_b)
3082
if(p[pixel[9]] < c_b)
3083
if(p[pixel[10]] < c_b)
3084
if(p[pixel[11]] < c_b)
3085
if(p[pixel[12]] < c_b)
3086
if(p[pixel[13]] < c_b)
3087
if(p[pixel[14]] < c_b)
3106
if(p[pixel[13]] > cb)
3107
if(p[pixel[14]] > cb)
3108
if(p[pixel[15]] > cb)
3114
else if(p[pixel[13]] < c_b)
3115
if(p[pixel[7]] < c_b)
3116
if(p[pixel[8]] < c_b)
3117
if(p[pixel[9]] < c_b)
3118
if(p[pixel[10]] < c_b)
3119
if(p[pixel[11]] < c_b)
3120
if(p[pixel[12]] < c_b)
3121
if(p[pixel[14]] < c_b)
3122
if(p[pixel[15]] < c_b)
3142
else if(p[pixel[5]] < c_b)
3143
if(p[pixel[14]] > cb)
3144
if(p[pixel[12]] > cb)
3145
if(p[pixel[13]] > cb)
3146
if(p[pixel[15]] > cb)
3149
if(p[pixel[6]] > cb)
3150
if(p[pixel[7]] > cb)
3151
if(p[pixel[8]] > cb)
3152
if(p[pixel[9]] > cb)
3153
if(p[pixel[10]] > cb)
3154
if(p[pixel[11]] > cb)
3170
else if(p[pixel[12]] < c_b)
3171
if(p[pixel[6]] < c_b)
3172
if(p[pixel[7]] < c_b)
3173
if(p[pixel[8]] < c_b)
3174
if(p[pixel[9]] < c_b)
3175
if(p[pixel[10]] < c_b)
3176
if(p[pixel[11]] < c_b)
3177
if(p[pixel[13]] < c_b)
3195
else if(p[pixel[14]] < c_b)
3196
if(p[pixel[7]] < c_b)
3197
if(p[pixel[8]] < c_b)
3198
if(p[pixel[9]] < c_b)
3199
if(p[pixel[10]] < c_b)
3200
if(p[pixel[11]] < c_b)
3201
if(p[pixel[12]] < c_b)
3202
if(p[pixel[13]] < c_b)
3203
if(p[pixel[6]] < c_b)
3206
if(p[pixel[15]] < c_b)
3225
if(p[pixel[6]] < c_b)
3226
if(p[pixel[7]] < c_b)
3227
if(p[pixel[8]] < c_b)
3228
if(p[pixel[9]] < c_b)
3229
if(p[pixel[10]] < c_b)
3230
if(p[pixel[11]] < c_b)
3231
if(p[pixel[12]] < c_b)
3232
if(p[pixel[13]] < c_b)
3251
if(p[pixel[12]] > cb)
3252
if(p[pixel[13]] > cb)
3253
if(p[pixel[14]] > cb)
3254
if(p[pixel[15]] > cb)
3257
if(p[pixel[6]] > cb)
3258
if(p[pixel[7]] > cb)
3259
if(p[pixel[8]] > cb)
3260
if(p[pixel[9]] > cb)
3261
if(p[pixel[10]] > cb)
3262
if(p[pixel[11]] > cb)
3280
else if(p[pixel[12]] < c_b)
3281
if(p[pixel[7]] < c_b)
3282
if(p[pixel[8]] < c_b)
3283
if(p[pixel[9]] < c_b)
3284
if(p[pixel[10]] < c_b)
3285
if(p[pixel[11]] < c_b)
3286
if(p[pixel[13]] < c_b)
3287
if(p[pixel[14]] < c_b)
3288
if(p[pixel[6]] < c_b)
3291
if(p[pixel[15]] < c_b)
3311
else if(p[pixel[4]] < c_b)
3312
if(p[pixel[13]] > cb)
3313
if(p[pixel[11]] > cb)
3314
if(p[pixel[12]] > cb)
3315
if(p[pixel[14]] > cb)
3316
if(p[pixel[15]] > cb)
3319
if(p[pixel[6]] > cb)
3320
if(p[pixel[7]] > cb)
3321
if(p[pixel[8]] > cb)
3322
if(p[pixel[9]] > cb)
3323
if(p[pixel[10]] > cb)
3336
if(p[pixel[5]] > cb)
3337
if(p[pixel[6]] > cb)
3338
if(p[pixel[7]] > cb)
3339
if(p[pixel[8]] > cb)
3340
if(p[pixel[9]] > cb)
3341
if(p[pixel[10]] > cb)
3357
else if(p[pixel[11]] < c_b)
3358
if(p[pixel[5]] < c_b)
3359
if(p[pixel[6]] < c_b)
3360
if(p[pixel[7]] < c_b)
3361
if(p[pixel[8]] < c_b)
3362
if(p[pixel[9]] < c_b)
3363
if(p[pixel[10]] < c_b)
3364
if(p[pixel[12]] < c_b)
3382
else if(p[pixel[13]] < c_b)
3383
if(p[pixel[7]] < c_b)
3384
if(p[pixel[8]] < c_b)
3385
if(p[pixel[9]] < c_b)
3386
if(p[pixel[10]] < c_b)
3387
if(p[pixel[11]] < c_b)
3388
if(p[pixel[12]] < c_b)
3389
if(p[pixel[6]] < c_b)
3390
if(p[pixel[5]] < c_b)
3393
if(p[pixel[14]] < c_b)
3398
if(p[pixel[14]] < c_b)
3399
if(p[pixel[15]] < c_b)
3418
if(p[pixel[5]] < c_b)
3419
if(p[pixel[6]] < c_b)
3420
if(p[pixel[7]] < c_b)
3421
if(p[pixel[8]] < c_b)
3422
if(p[pixel[9]] < c_b)
3423
if(p[pixel[10]] < c_b)
3424
if(p[pixel[11]] < c_b)
3425
if(p[pixel[12]] < c_b)
3444
if(p[pixel[11]] > cb)
3445
if(p[pixel[12]] > cb)
3446
if(p[pixel[13]] > cb)
3447
if(p[pixel[14]] > cb)
3448
if(p[pixel[15]] > cb)
3451
if(p[pixel[6]] > cb)
3452
if(p[pixel[7]] > cb)
3453
if(p[pixel[8]] > cb)
3454
if(p[pixel[9]] > cb)
3455
if(p[pixel[10]] > cb)
3468
if(p[pixel[5]] > cb)
3469
if(p[pixel[6]] > cb)
3470
if(p[pixel[7]] > cb)
3471
if(p[pixel[8]] > cb)
3472
if(p[pixel[9]] > cb)
3473
if(p[pixel[10]] > cb)
3491
else if(p[pixel[11]] < c_b)
3492
if(p[pixel[7]] < c_b)
3493
if(p[pixel[8]] < c_b)
3494
if(p[pixel[9]] < c_b)
3495
if(p[pixel[10]] < c_b)
3496
if(p[pixel[12]] < c_b)
3497
if(p[pixel[13]] < c_b)
3498
if(p[pixel[6]] < c_b)
3499
if(p[pixel[5]] < c_b)
3502
if(p[pixel[14]] < c_b)
3507
if(p[pixel[14]] < c_b)
3508
if(p[pixel[15]] < c_b)
3528
else if(p[pixel[3]] < c_b)
3529
if(p[pixel[10]] > cb)
3530
if(p[pixel[11]] > cb)
3531
if(p[pixel[12]] > cb)
3532
if(p[pixel[13]] > cb)
3533
if(p[pixel[14]] > cb)
3534
if(p[pixel[15]] > cb)
3537
if(p[pixel[6]] > cb)
3538
if(p[pixel[7]] > cb)
3539
if(p[pixel[8]] > cb)
3540
if(p[pixel[9]] > cb)
3551
if(p[pixel[5]] > cb)
3552
if(p[pixel[6]] > cb)
3553
if(p[pixel[7]] > cb)
3554
if(p[pixel[8]] > cb)
3555
if(p[pixel[9]] > cb)
3568
if(p[pixel[4]] > cb)
3569
if(p[pixel[5]] > cb)
3570
if(p[pixel[6]] > cb)
3571
if(p[pixel[7]] > cb)
3572
if(p[pixel[8]] > cb)
3573
if(p[pixel[9]] > cb)
3591
else if(p[pixel[10]] < c_b)
3592
if(p[pixel[7]] < c_b)
3593
if(p[pixel[8]] < c_b)
3594
if(p[pixel[9]] < c_b)
3595
if(p[pixel[11]] < c_b)
3596
if(p[pixel[6]] < c_b)
3597
if(p[pixel[5]] < c_b)
3598
if(p[pixel[4]] < c_b)
3601
if(p[pixel[12]] < c_b)
3602
if(p[pixel[13]] < c_b)
3609
if(p[pixel[12]] < c_b)
3610
if(p[pixel[13]] < c_b)
3611
if(p[pixel[14]] < c_b)
3620
if(p[pixel[12]] < c_b)
3621
if(p[pixel[13]] < c_b)
3622
if(p[pixel[14]] < c_b)
3623
if(p[pixel[15]] < c_b)
3644
if(p[pixel[10]] > cb)
3645
if(p[pixel[11]] > cb)
3646
if(p[pixel[12]] > cb)
3647
if(p[pixel[13]] > cb)
3648
if(p[pixel[14]] > cb)
3649
if(p[pixel[15]] > cb)
3652
if(p[pixel[6]] > cb)
3653
if(p[pixel[7]] > cb)
3654
if(p[pixel[8]] > cb)
3655
if(p[pixel[9]] > cb)
3666
if(p[pixel[5]] > cb)
3667
if(p[pixel[6]] > cb)
3668
if(p[pixel[7]] > cb)
3669
if(p[pixel[8]] > cb)
3670
if(p[pixel[9]] > cb)
3683
if(p[pixel[4]] > cb)
3684
if(p[pixel[5]] > cb)
3685
if(p[pixel[6]] > cb)
3686
if(p[pixel[7]] > cb)
3687
if(p[pixel[8]] > cb)
3688
if(p[pixel[9]] > cb)
3706
else if(p[pixel[10]] < c_b)
3707
if(p[pixel[7]] < c_b)
3708
if(p[pixel[8]] < c_b)
3709
if(p[pixel[9]] < c_b)
3710
if(p[pixel[11]] < c_b)
3711
if(p[pixel[12]] < c_b)
3712
if(p[pixel[6]] < c_b)
3713
if(p[pixel[5]] < c_b)
3714
if(p[pixel[4]] < c_b)
3717
if(p[pixel[13]] < c_b)
3722
if(p[pixel[13]] < c_b)
3723
if(p[pixel[14]] < c_b)
3730
if(p[pixel[13]] < c_b)
3731
if(p[pixel[14]] < c_b)
3732
if(p[pixel[15]] < c_b)
3752
else if(p[pixel[2]] < c_b)
3753
if(p[pixel[9]] > cb)
3754
if(p[pixel[10]] > cb)
3755
if(p[pixel[11]] > cb)
3756
if(p[pixel[12]] > cb)
3757
if(p[pixel[13]] > cb)
3758
if(p[pixel[14]] > cb)
3759
if(p[pixel[15]] > cb)
3762
if(p[pixel[6]] > cb)
3763
if(p[pixel[7]] > cb)
3764
if(p[pixel[8]] > cb)
3773
if(p[pixel[5]] > cb)
3774
if(p[pixel[6]] > cb)
3775
if(p[pixel[7]] > cb)
3776
if(p[pixel[8]] > cb)
3787
if(p[pixel[4]] > cb)
3788
if(p[pixel[5]] > cb)
3789
if(p[pixel[6]] > cb)
3790
if(p[pixel[7]] > cb)
3791
if(p[pixel[8]] > cb)
3804
if(p[pixel[3]] > cb)
3805
if(p[pixel[4]] > cb)
3806
if(p[pixel[5]] > cb)
3807
if(p[pixel[6]] > cb)
3808
if(p[pixel[7]] > cb)
3809
if(p[pixel[8]] > cb)
3827
else if(p[pixel[9]] < c_b)
3828
if(p[pixel[7]] < c_b)
3829
if(p[pixel[8]] < c_b)
3830
if(p[pixel[10]] < c_b)
3831
if(p[pixel[6]] < c_b)
3832
if(p[pixel[5]] < c_b)
3833
if(p[pixel[4]] < c_b)
3834
if(p[pixel[3]] < c_b)
3837
if(p[pixel[11]] < c_b)
3838
if(p[pixel[12]] < c_b)
3845
if(p[pixel[11]] < c_b)
3846
if(p[pixel[12]] < c_b)
3847
if(p[pixel[13]] < c_b)
3856
if(p[pixel[11]] < c_b)
3857
if(p[pixel[12]] < c_b)
3858
if(p[pixel[13]] < c_b)
3859
if(p[pixel[14]] < c_b)
3870
if(p[pixel[11]] < c_b)
3871
if(p[pixel[12]] < c_b)
3872
if(p[pixel[13]] < c_b)
3873
if(p[pixel[14]] < c_b)
3874
if(p[pixel[15]] < c_b)
3895
if(p[pixel[9]] > cb)
3896
if(p[pixel[10]] > cb)
3897
if(p[pixel[11]] > cb)
3898
if(p[pixel[12]] > cb)
3899
if(p[pixel[13]] > cb)
3900
if(p[pixel[14]] > cb)
3901
if(p[pixel[15]] > cb)
3904
if(p[pixel[6]] > cb)
3905
if(p[pixel[7]] > cb)
3906
if(p[pixel[8]] > cb)
3915
if(p[pixel[5]] > cb)
3916
if(p[pixel[6]] > cb)
3917
if(p[pixel[7]] > cb)
3918
if(p[pixel[8]] > cb)
3929
if(p[pixel[4]] > cb)
3930
if(p[pixel[5]] > cb)
3931
if(p[pixel[6]] > cb)
3932
if(p[pixel[7]] > cb)
3933
if(p[pixel[8]] > cb)
3946
if(p[pixel[3]] > cb)
3947
if(p[pixel[4]] > cb)
3948
if(p[pixel[5]] > cb)
3949
if(p[pixel[6]] > cb)
3950
if(p[pixel[7]] > cb)
3951
if(p[pixel[8]] > cb)
3969
else if(p[pixel[9]] < c_b)
3970
if(p[pixel[7]] < c_b)
3971
if(p[pixel[8]] < c_b)
3972
if(p[pixel[10]] < c_b)
3973
if(p[pixel[11]] < c_b)
3974
if(p[pixel[6]] < c_b)
3975
if(p[pixel[5]] < c_b)
3976
if(p[pixel[4]] < c_b)
3977
if(p[pixel[3]] < c_b)
3980
if(p[pixel[12]] < c_b)
3985
if(p[pixel[12]] < c_b)
3986
if(p[pixel[13]] < c_b)
3993
if(p[pixel[12]] < c_b)
3994
if(p[pixel[13]] < c_b)
3995
if(p[pixel[14]] < c_b)
4004
if(p[pixel[12]] < c_b)
4005
if(p[pixel[13]] < c_b)
4006
if(p[pixel[14]] < c_b)
4007
if(p[pixel[15]] < c_b)
4027
else if(p[pixel[1]] < c_b)
4028
if(p[pixel[8]] > cb)
4029
if(p[pixel[9]] > cb)
4030
if(p[pixel[10]] > cb)
4031
if(p[pixel[11]] > cb)
4032
if(p[pixel[12]] > cb)
4033
if(p[pixel[13]] > cb)
4034
if(p[pixel[14]] > cb)
4035
if(p[pixel[15]] > cb)
4038
if(p[pixel[6]] > cb)
4039
if(p[pixel[7]] > cb)
4046
if(p[pixel[5]] > cb)
4047
if(p[pixel[6]] > cb)
4048
if(p[pixel[7]] > cb)
4057
if(p[pixel[4]] > cb)
4058
if(p[pixel[5]] > cb)
4059
if(p[pixel[6]] > cb)
4060
if(p[pixel[7]] > cb)
4071
if(p[pixel[3]] > cb)
4072
if(p[pixel[4]] > cb)
4073
if(p[pixel[5]] > cb)
4074
if(p[pixel[6]] > cb)
4075
if(p[pixel[7]] > cb)
4088
if(p[pixel[2]] > cb)
4089
if(p[pixel[3]] > cb)
4090
if(p[pixel[4]] > cb)
4091
if(p[pixel[5]] > cb)
4092
if(p[pixel[6]] > cb)
4093
if(p[pixel[7]] > cb)
4111
else if(p[pixel[8]] < c_b)
4112
if(p[pixel[7]] < c_b)
4113
if(p[pixel[9]] < c_b)
4114
if(p[pixel[6]] < c_b)
4115
if(p[pixel[5]] < c_b)
4116
if(p[pixel[4]] < c_b)
4117
if(p[pixel[3]] < c_b)
4118
if(p[pixel[2]] < c_b)
4121
if(p[pixel[10]] < c_b)
4122
if(p[pixel[11]] < c_b)
4129
if(p[pixel[10]] < c_b)
4130
if(p[pixel[11]] < c_b)
4131
if(p[pixel[12]] < c_b)
4140
if(p[pixel[10]] < c_b)
4141
if(p[pixel[11]] < c_b)
4142
if(p[pixel[12]] < c_b)
4143
if(p[pixel[13]] < c_b)
4154
if(p[pixel[10]] < c_b)
4155
if(p[pixel[11]] < c_b)
4156
if(p[pixel[12]] < c_b)
4157
if(p[pixel[13]] < c_b)
4158
if(p[pixel[14]] < c_b)
4171
if(p[pixel[10]] < c_b)
4172
if(p[pixel[11]] < c_b)
4173
if(p[pixel[12]] < c_b)
4174
if(p[pixel[13]] < c_b)
4175
if(p[pixel[14]] < c_b)
4176
if(p[pixel[15]] < c_b)
4197
if(p[pixel[8]] > cb)
4198
if(p[pixel[9]] > cb)
4199
if(p[pixel[10]] > cb)
4200
if(p[pixel[11]] > cb)
4201
if(p[pixel[12]] > cb)
4202
if(p[pixel[13]] > cb)
4203
if(p[pixel[14]] > cb)
4204
if(p[pixel[15]] > cb)
4207
if(p[pixel[6]] > cb)
4208
if(p[pixel[7]] > cb)
4215
if(p[pixel[5]] > cb)
4216
if(p[pixel[6]] > cb)
4217
if(p[pixel[7]] > cb)
4226
if(p[pixel[4]] > cb)
4227
if(p[pixel[5]] > cb)
4228
if(p[pixel[6]] > cb)
4229
if(p[pixel[7]] > cb)
4240
if(p[pixel[3]] > cb)
4241
if(p[pixel[4]] > cb)
4242
if(p[pixel[5]] > cb)
4243
if(p[pixel[6]] > cb)
4244
if(p[pixel[7]] > cb)
4257
if(p[pixel[2]] > cb)
4258
if(p[pixel[3]] > cb)
4259
if(p[pixel[4]] > cb)
4260
if(p[pixel[5]] > cb)
4261
if(p[pixel[6]] > cb)
4262
if(p[pixel[7]] > cb)
4280
else if(p[pixel[8]] < c_b)
4281
if(p[pixel[7]] < c_b)
4282
if(p[pixel[9]] < c_b)
4283
if(p[pixel[10]] < c_b)
4284
if(p[pixel[6]] < c_b)
4285
if(p[pixel[5]] < c_b)
4286
if(p[pixel[4]] < c_b)
4287
if(p[pixel[3]] < c_b)
4288
if(p[pixel[2]] < c_b)
4291
if(p[pixel[11]] < c_b)
4296
if(p[pixel[11]] < c_b)
4297
if(p[pixel[12]] < c_b)
4304
if(p[pixel[11]] < c_b)
4305
if(p[pixel[12]] < c_b)
4306
if(p[pixel[13]] < c_b)
4315
if(p[pixel[11]] < c_b)
4316
if(p[pixel[12]] < c_b)
4317
if(p[pixel[13]] < c_b)
4318
if(p[pixel[14]] < c_b)
4329
if(p[pixel[11]] < c_b)
4330
if(p[pixel[12]] < c_b)
4331
if(p[pixel[13]] < c_b)
4332
if(p[pixel[14]] < c_b)
4333
if(p[pixel[15]] < c_b)
4353
else if(p[pixel[0]] < c_b)
4354
if(p[pixel[1]] > cb)
4355
if(p[pixel[8]] > cb)
4356
if(p[pixel[7]] > cb)
4357
if(p[pixel[9]] > cb)
4358
if(p[pixel[6]] > cb)
4359
if(p[pixel[5]] > cb)
4360
if(p[pixel[4]] > cb)
4361
if(p[pixel[3]] > cb)
4362
if(p[pixel[2]] > cb)
4365
if(p[pixel[10]] > cb)
4366
if(p[pixel[11]] > cb)
4373
if(p[pixel[10]] > cb)
4374
if(p[pixel[11]] > cb)
4375
if(p[pixel[12]] > cb)
4384
if(p[pixel[10]] > cb)
4385
if(p[pixel[11]] > cb)
4386
if(p[pixel[12]] > cb)
4387
if(p[pixel[13]] > cb)
4398
if(p[pixel[10]] > cb)
4399
if(p[pixel[11]] > cb)
4400
if(p[pixel[12]] > cb)
4401
if(p[pixel[13]] > cb)
4402
if(p[pixel[14]] > cb)
4415
if(p[pixel[10]] > cb)
4416
if(p[pixel[11]] > cb)
4417
if(p[pixel[12]] > cb)
4418
if(p[pixel[13]] > cb)
4419
if(p[pixel[14]] > cb)
4420
if(p[pixel[15]] > cb)
4438
else if(p[pixel[8]] < c_b)
4439
if(p[pixel[9]] < c_b)
4440
if(p[pixel[10]] < c_b)
4441
if(p[pixel[11]] < c_b)
4442
if(p[pixel[12]] < c_b)
4443
if(p[pixel[13]] < c_b)
4444
if(p[pixel[14]] < c_b)
4445
if(p[pixel[15]] < c_b)
4448
if(p[pixel[6]] < c_b)
4449
if(p[pixel[7]] < c_b)
4456
if(p[pixel[5]] < c_b)
4457
if(p[pixel[6]] < c_b)
4458
if(p[pixel[7]] < c_b)
4467
if(p[pixel[4]] < c_b)
4468
if(p[pixel[5]] < c_b)
4469
if(p[pixel[6]] < c_b)
4470
if(p[pixel[7]] < c_b)
4481
if(p[pixel[3]] < c_b)
4482
if(p[pixel[4]] < c_b)
4483
if(p[pixel[5]] < c_b)
4484
if(p[pixel[6]] < c_b)
4485
if(p[pixel[7]] < c_b)
4498
if(p[pixel[2]] < c_b)
4499
if(p[pixel[3]] < c_b)
4500
if(p[pixel[4]] < c_b)
4501
if(p[pixel[5]] < c_b)
4502
if(p[pixel[6]] < c_b)
4503
if(p[pixel[7]] < c_b)
4523
else if(p[pixel[1]] < c_b)
4524
if(p[pixel[2]] > cb)
4525
if(p[pixel[9]] > cb)
4526
if(p[pixel[7]] > cb)
4527
if(p[pixel[8]] > cb)
4528
if(p[pixel[10]] > cb)
4529
if(p[pixel[6]] > cb)
4530
if(p[pixel[5]] > cb)
4531
if(p[pixel[4]] > cb)
4532
if(p[pixel[3]] > cb)
4535
if(p[pixel[11]] > cb)
4536
if(p[pixel[12]] > cb)
4543
if(p[pixel[11]] > cb)
4544
if(p[pixel[12]] > cb)
4545
if(p[pixel[13]] > cb)
4554
if(p[pixel[11]] > cb)
4555
if(p[pixel[12]] > cb)
4556
if(p[pixel[13]] > cb)
4557
if(p[pixel[14]] > cb)
4568
if(p[pixel[11]] > cb)
4569
if(p[pixel[12]] > cb)
4570
if(p[pixel[13]] > cb)
4571
if(p[pixel[14]] > cb)
4572
if(p[pixel[15]] > cb)
4590
else if(p[pixel[9]] < c_b)
4591
if(p[pixel[10]] < c_b)
4592
if(p[pixel[11]] < c_b)
4593
if(p[pixel[12]] < c_b)
4594
if(p[pixel[13]] < c_b)
4595
if(p[pixel[14]] < c_b)
4596
if(p[pixel[15]] < c_b)
4599
if(p[pixel[6]] < c_b)
4600
if(p[pixel[7]] < c_b)
4601
if(p[pixel[8]] < c_b)
4610
if(p[pixel[5]] < c_b)
4611
if(p[pixel[6]] < c_b)
4612
if(p[pixel[7]] < c_b)
4613
if(p[pixel[8]] < c_b)
4624
if(p[pixel[4]] < c_b)
4625
if(p[pixel[5]] < c_b)
4626
if(p[pixel[6]] < c_b)
4627
if(p[pixel[7]] < c_b)
4628
if(p[pixel[8]] < c_b)
4641
if(p[pixel[3]] < c_b)
4642
if(p[pixel[4]] < c_b)
4643
if(p[pixel[5]] < c_b)
4644
if(p[pixel[6]] < c_b)
4645
if(p[pixel[7]] < c_b)
4646
if(p[pixel[8]] < c_b)
4666
else if(p[pixel[2]] < c_b)
4667
if(p[pixel[3]] > cb)
4668
if(p[pixel[10]] > cb)
4669
if(p[pixel[7]] > cb)
4670
if(p[pixel[8]] > cb)
4671
if(p[pixel[9]] > cb)
4672
if(p[pixel[11]] > cb)
4673
if(p[pixel[6]] > cb)
4674
if(p[pixel[5]] > cb)
4675
if(p[pixel[4]] > cb)
4678
if(p[pixel[12]] > cb)
4679
if(p[pixel[13]] > cb)
4686
if(p[pixel[12]] > cb)
4687
if(p[pixel[13]] > cb)
4688
if(p[pixel[14]] > cb)
4697
if(p[pixel[12]] > cb)
4698
if(p[pixel[13]] > cb)
4699
if(p[pixel[14]] > cb)
4700
if(p[pixel[15]] > cb)
4718
else if(p[pixel[10]] < c_b)
4719
if(p[pixel[11]] < c_b)
4720
if(p[pixel[12]] < c_b)
4721
if(p[pixel[13]] < c_b)
4722
if(p[pixel[14]] < c_b)
4723
if(p[pixel[15]] < c_b)
4726
if(p[pixel[6]] < c_b)
4727
if(p[pixel[7]] < c_b)
4728
if(p[pixel[8]] < c_b)
4729
if(p[pixel[9]] < c_b)
4740
if(p[pixel[5]] < c_b)
4741
if(p[pixel[6]] < c_b)
4742
if(p[pixel[7]] < c_b)
4743
if(p[pixel[8]] < c_b)
4744
if(p[pixel[9]] < c_b)
4757
if(p[pixel[4]] < c_b)
4758
if(p[pixel[5]] < c_b)
4759
if(p[pixel[6]] < c_b)
4760
if(p[pixel[7]] < c_b)
4761
if(p[pixel[8]] < c_b)
4762
if(p[pixel[9]] < c_b)
4782
else if(p[pixel[3]] < c_b)
4783
if(p[pixel[4]] > cb)
4784
if(p[pixel[13]] > cb)
4785
if(p[pixel[7]] > cb)
4786
if(p[pixel[8]] > cb)
4787
if(p[pixel[9]] > cb)
4788
if(p[pixel[10]] > cb)
4789
if(p[pixel[11]] > cb)
4790
if(p[pixel[12]] > cb)
4791
if(p[pixel[6]] > cb)
4792
if(p[pixel[5]] > cb)
4795
if(p[pixel[14]] > cb)
4800
if(p[pixel[14]] > cb)
4801
if(p[pixel[15]] > cb)
4819
else if(p[pixel[13]] < c_b)
4820
if(p[pixel[11]] > cb)
4821
if(p[pixel[5]] > cb)
4822
if(p[pixel[6]] > cb)
4823
if(p[pixel[7]] > cb)
4824
if(p[pixel[8]] > cb)
4825
if(p[pixel[9]] > cb)
4826
if(p[pixel[10]] > cb)
4827
if(p[pixel[12]] > cb)
4843
else if(p[pixel[11]] < c_b)
4844
if(p[pixel[12]] < c_b)
4845
if(p[pixel[14]] < c_b)
4846
if(p[pixel[15]] < c_b)
4849
if(p[pixel[6]] < c_b)
4850
if(p[pixel[7]] < c_b)
4851
if(p[pixel[8]] < c_b)
4852
if(p[pixel[9]] < c_b)
4853
if(p[pixel[10]] < c_b)
4866
if(p[pixel[5]] < c_b)
4867
if(p[pixel[6]] < c_b)
4868
if(p[pixel[7]] < c_b)
4869
if(p[pixel[8]] < c_b)
4870
if(p[pixel[9]] < c_b)
4871
if(p[pixel[10]] < c_b)
4890
if(p[pixel[5]] > cb)
4891
if(p[pixel[6]] > cb)
4892
if(p[pixel[7]] > cb)
4893
if(p[pixel[8]] > cb)
4894
if(p[pixel[9]] > cb)
4895
if(p[pixel[10]] > cb)
4896
if(p[pixel[11]] > cb)
4897
if(p[pixel[12]] > cb)
4915
else if(p[pixel[4]] < c_b)
4916
if(p[pixel[5]] > cb)
4917
if(p[pixel[14]] > cb)
4918
if(p[pixel[7]] > cb)
4919
if(p[pixel[8]] > cb)
4920
if(p[pixel[9]] > cb)
4921
if(p[pixel[10]] > cb)
4922
if(p[pixel[11]] > cb)
4923
if(p[pixel[12]] > cb)
4924
if(p[pixel[13]] > cb)
4925
if(p[pixel[6]] > cb)
4928
if(p[pixel[15]] > cb)
4946
else if(p[pixel[14]] < c_b)
4947
if(p[pixel[12]] > cb)
4948
if(p[pixel[6]] > cb)
4949
if(p[pixel[7]] > cb)
4950
if(p[pixel[8]] > cb)
4951
if(p[pixel[9]] > cb)
4952
if(p[pixel[10]] > cb)
4953
if(p[pixel[11]] > cb)
4954
if(p[pixel[13]] > cb)
4970
else if(p[pixel[12]] < c_b)
4971
if(p[pixel[13]] < c_b)
4972
if(p[pixel[15]] < c_b)
4975
if(p[pixel[6]] < c_b)
4976
if(p[pixel[7]] < c_b)
4977
if(p[pixel[8]] < c_b)
4978
if(p[pixel[9]] < c_b)
4979
if(p[pixel[10]] < c_b)
4980
if(p[pixel[11]] < c_b)
4999
if(p[pixel[6]] > cb)
5000
if(p[pixel[7]] > cb)
5001
if(p[pixel[8]] > cb)
5002
if(p[pixel[9]] > cb)
5003
if(p[pixel[10]] > cb)
5004
if(p[pixel[11]] > cb)
5005
if(p[pixel[12]] > cb)
5006
if(p[pixel[13]] > cb)
5024
else if(p[pixel[5]] < c_b)
5025
if(p[pixel[6]] > cb)
5026
if(p[pixel[15]] < c_b)
5027
if(p[pixel[13]] > cb)
5028
if(p[pixel[7]] > cb)
5029
if(p[pixel[8]] > cb)
5030
if(p[pixel[9]] > cb)
5031
if(p[pixel[10]] > cb)
5032
if(p[pixel[11]] > cb)
5033
if(p[pixel[12]] > cb)
5034
if(p[pixel[14]] > cb)
5050
else if(p[pixel[13]] < c_b)
5051
if(p[pixel[14]] < c_b)
5058
if(p[pixel[7]] > cb)
5059
if(p[pixel[8]] > cb)
5060
if(p[pixel[9]] > cb)
5061
if(p[pixel[10]] > cb)
5062
if(p[pixel[11]] > cb)
5063
if(p[pixel[12]] > cb)
5064
if(p[pixel[13]] > cb)
5065
if(p[pixel[14]] > cb)
5083
else if(p[pixel[6]] < c_b)
5084
if(p[pixel[7]] > cb)
5085
if(p[pixel[14]] > cb)
5086
if(p[pixel[8]] > cb)
5087
if(p[pixel[9]] > cb)
5088
if(p[pixel[10]] > cb)
5089
if(p[pixel[11]] > cb)
5090
if(p[pixel[12]] > cb)
5091
if(p[pixel[13]] > cb)
5092
if(p[pixel[15]] > cb)
5108
else if(p[pixel[14]] < c_b)
5109
if(p[pixel[15]] < c_b)
5115
else if(p[pixel[7]] < c_b)
5116
if(p[pixel[8]] < c_b)
5119
if(p[pixel[15]] < c_b)
5124
if(p[pixel[14]] < c_b)
5125
if(p[pixel[15]] < c_b)
5132
if(p[pixel[13]] > cb)
5133
if(p[pixel[7]] > cb)
5134
if(p[pixel[8]] > cb)
5135
if(p[pixel[9]] > cb)
5136
if(p[pixel[10]] > cb)
5137
if(p[pixel[11]] > cb)
5138
if(p[pixel[12]] > cb)
5139
if(p[pixel[14]] > cb)
5140
if(p[pixel[15]] > cb)
5158
else if(p[pixel[13]] < c_b)
5159
if(p[pixel[14]] < c_b)
5160
if(p[pixel[15]] < c_b)
5169
if(p[pixel[12]] > cb)
5170
if(p[pixel[7]] > cb)
5171
if(p[pixel[8]] > cb)
5172
if(p[pixel[9]] > cb)
5173
if(p[pixel[10]] > cb)
5174
if(p[pixel[11]] > cb)
5175
if(p[pixel[13]] > cb)
5176
if(p[pixel[14]] > cb)
5177
if(p[pixel[6]] > cb)
5180
if(p[pixel[15]] > cb)
5198
else if(p[pixel[12]] < c_b)
5199
if(p[pixel[13]] < c_b)
5200
if(p[pixel[14]] < c_b)
5201
if(p[pixel[15]] < c_b)
5204
if(p[pixel[6]] < c_b)
5205
if(p[pixel[7]] < c_b)
5206
if(p[pixel[8]] < c_b)
5207
if(p[pixel[9]] < c_b)
5208
if(p[pixel[10]] < c_b)
5209
if(p[pixel[11]] < c_b)
5230
if(p[pixel[11]] > cb)
5231
if(p[pixel[7]] > cb)
5232
if(p[pixel[8]] > cb)
5233
if(p[pixel[9]] > cb)
5234
if(p[pixel[10]] > cb)
5235
if(p[pixel[12]] > cb)
5236
if(p[pixel[13]] > cb)
5237
if(p[pixel[6]] > cb)
5238
if(p[pixel[5]] > cb)
5241
if(p[pixel[14]] > cb)
5246
if(p[pixel[14]] > cb)
5247
if(p[pixel[15]] > cb)
5265
else if(p[pixel[11]] < c_b)
5266
if(p[pixel[12]] < c_b)
5267
if(p[pixel[13]] < c_b)
5268
if(p[pixel[14]] < c_b)
5269
if(p[pixel[15]] < c_b)
5272
if(p[pixel[6]] < c_b)
5273
if(p[pixel[7]] < c_b)
5274
if(p[pixel[8]] < c_b)
5275
if(p[pixel[9]] < c_b)
5276
if(p[pixel[10]] < c_b)
5289
if(p[pixel[5]] < c_b)
5290
if(p[pixel[6]] < c_b)
5291
if(p[pixel[7]] < c_b)
5292
if(p[pixel[8]] < c_b)
5293
if(p[pixel[9]] < c_b)
5294
if(p[pixel[10]] < c_b)
5315
if(p[pixel[10]] > cb)
5316
if(p[pixel[7]] > cb)
5317
if(p[pixel[8]] > cb)
5318
if(p[pixel[9]] > cb)
5319
if(p[pixel[11]] > cb)
5320
if(p[pixel[12]] > cb)
5321
if(p[pixel[6]] > cb)
5322
if(p[pixel[5]] > cb)
5323
if(p[pixel[4]] > cb)
5326
if(p[pixel[13]] > cb)
5331
if(p[pixel[13]] > cb)
5332
if(p[pixel[14]] > cb)
5339
if(p[pixel[13]] > cb)
5340
if(p[pixel[14]] > cb)
5341
if(p[pixel[15]] > cb)
5359
else if(p[pixel[10]] < c_b)
5360
if(p[pixel[11]] < c_b)
5361
if(p[pixel[12]] < c_b)
5362
if(p[pixel[13]] < c_b)
5363
if(p[pixel[14]] < c_b)
5364
if(p[pixel[15]] < c_b)
5367
if(p[pixel[6]] < c_b)
5368
if(p[pixel[7]] < c_b)
5369
if(p[pixel[8]] < c_b)
5370
if(p[pixel[9]] < c_b)
5381
if(p[pixel[5]] < c_b)
5382
if(p[pixel[6]] < c_b)
5383
if(p[pixel[7]] < c_b)
5384
if(p[pixel[8]] < c_b)
5385
if(p[pixel[9]] < c_b)
5398
if(p[pixel[4]] < c_b)
5399
if(p[pixel[5]] < c_b)
5400
if(p[pixel[6]] < c_b)
5401
if(p[pixel[7]] < c_b)
5402
if(p[pixel[8]] < c_b)
5403
if(p[pixel[9]] < c_b)
5424
if(p[pixel[9]] > cb)
5425
if(p[pixel[7]] > cb)
5426
if(p[pixel[8]] > cb)
5427
if(p[pixel[10]] > cb)
5428
if(p[pixel[11]] > cb)
5429
if(p[pixel[6]] > cb)
5430
if(p[pixel[5]] > cb)
5431
if(p[pixel[4]] > cb)
5432
if(p[pixel[3]] > cb)
5435
if(p[pixel[12]] > cb)
5440
if(p[pixel[12]] > cb)
5441
if(p[pixel[13]] > cb)
5448
if(p[pixel[12]] > cb)
5449
if(p[pixel[13]] > cb)
5450
if(p[pixel[14]] > cb)
5459
if(p[pixel[12]] > cb)
5460
if(p[pixel[13]] > cb)
5461
if(p[pixel[14]] > cb)
5462
if(p[pixel[15]] > cb)
5480
else if(p[pixel[9]] < c_b)
5481
if(p[pixel[10]] < c_b)
5482
if(p[pixel[11]] < c_b)
5483
if(p[pixel[12]] < c_b)
5484
if(p[pixel[13]] < c_b)
5485
if(p[pixel[14]] < c_b)
5486
if(p[pixel[15]] < c_b)
5489
if(p[pixel[6]] < c_b)
5490
if(p[pixel[7]] < c_b)
5491
if(p[pixel[8]] < c_b)
5500
if(p[pixel[5]] < c_b)
5501
if(p[pixel[6]] < c_b)
5502
if(p[pixel[7]] < c_b)
5503
if(p[pixel[8]] < c_b)
5514
if(p[pixel[4]] < c_b)
5515
if(p[pixel[5]] < c_b)
5516
if(p[pixel[6]] < c_b)
5517
if(p[pixel[7]] < c_b)
5518
if(p[pixel[8]] < c_b)
5531
if(p[pixel[3]] < c_b)
5532
if(p[pixel[4]] < c_b)
5533
if(p[pixel[5]] < c_b)
5534
if(p[pixel[6]] < c_b)
5535
if(p[pixel[7]] < c_b)
5536
if(p[pixel[8]] < c_b)
5557
if(p[pixel[8]] > cb)
5558
if(p[pixel[7]] > cb)
5559
if(p[pixel[9]] > cb)
5560
if(p[pixel[10]] > cb)
5561
if(p[pixel[6]] > cb)
5562
if(p[pixel[5]] > cb)
5563
if(p[pixel[4]] > cb)
5564
if(p[pixel[3]] > cb)
5565
if(p[pixel[2]] > cb)
5568
if(p[pixel[11]] > cb)
5573
if(p[pixel[11]] > cb)
5574
if(p[pixel[12]] > cb)
5581
if(p[pixel[11]] > cb)
5582
if(p[pixel[12]] > cb)
5583
if(p[pixel[13]] > cb)
5592
if(p[pixel[11]] > cb)
5593
if(p[pixel[12]] > cb)
5594
if(p[pixel[13]] > cb)
5595
if(p[pixel[14]] > cb)
5606
if(p[pixel[11]] > cb)
5607
if(p[pixel[12]] > cb)
5608
if(p[pixel[13]] > cb)
5609
if(p[pixel[14]] > cb)
5610
if(p[pixel[15]] > cb)
5628
else if(p[pixel[8]] < c_b)
5629
if(p[pixel[9]] < c_b)
5630
if(p[pixel[10]] < c_b)
5631
if(p[pixel[11]] < c_b)
5632
if(p[pixel[12]] < c_b)
5633
if(p[pixel[13]] < c_b)
5634
if(p[pixel[14]] < c_b)
5635
if(p[pixel[15]] < c_b)
5638
if(p[pixel[6]] < c_b)
5639
if(p[pixel[7]] < c_b)
5646
if(p[pixel[5]] < c_b)
5647
if(p[pixel[6]] < c_b)
5648
if(p[pixel[7]] < c_b)
5657
if(p[pixel[4]] < c_b)
5658
if(p[pixel[5]] < c_b)
5659
if(p[pixel[6]] < c_b)
5660
if(p[pixel[7]] < c_b)
5671
if(p[pixel[3]] < c_b)
5672
if(p[pixel[4]] < c_b)
5673
if(p[pixel[5]] < c_b)
5674
if(p[pixel[6]] < c_b)
5675
if(p[pixel[7]] < c_b)
5688
if(p[pixel[2]] < c_b)
5689
if(p[pixel[3]] < c_b)
5690
if(p[pixel[4]] < c_b)
5691
if(p[pixel[5]] < c_b)
5692
if(p[pixel[6]] < c_b)
5693
if(p[pixel[7]] < c_b)
5714
if(p[pixel[7]] > cb)
5715
if(p[pixel[8]] > cb)
5716
if(p[pixel[9]] > cb)
5717
if(p[pixel[6]] > cb)
5718
if(p[pixel[5]] > cb)
5719
if(p[pixel[4]] > cb)
5720
if(p[pixel[3]] > cb)
5721
if(p[pixel[2]] > cb)
5722
if(p[pixel[1]] > cb)
5725
if(p[pixel[10]] > cb)
5730
if(p[pixel[10]] > cb)
5731
if(p[pixel[11]] > cb)
5738
if(p[pixel[10]] > cb)
5739
if(p[pixel[11]] > cb)
5740
if(p[pixel[12]] > cb)
5749
if(p[pixel[10]] > cb)
5750
if(p[pixel[11]] > cb)
5751
if(p[pixel[12]] > cb)
5752
if(p[pixel[13]] > cb)
5763
if(p[pixel[10]] > cb)
5764
if(p[pixel[11]] > cb)
5765
if(p[pixel[12]] > cb)
5766
if(p[pixel[13]] > cb)
5767
if(p[pixel[14]] > cb)
5780
if(p[pixel[10]] > cb)
5781
if(p[pixel[11]] > cb)
5782
if(p[pixel[12]] > cb)
5783
if(p[pixel[13]] > cb)
5784
if(p[pixel[14]] > cb)
5785
if(p[pixel[15]] > cb)
5803
else if(p[pixel[7]] < c_b)
5804
if(p[pixel[8]] < c_b)
5805
if(p[pixel[9]] < c_b)
5806
if(p[pixel[6]] < c_b)
5807
if(p[pixel[5]] < c_b)
5808
if(p[pixel[4]] < c_b)
5809
if(p[pixel[3]] < c_b)
5810
if(p[pixel[2]] < c_b)
5811
if(p[pixel[1]] < c_b)
5814
if(p[pixel[10]] < c_b)
5819
if(p[pixel[10]] < c_b)
5820
if(p[pixel[11]] < c_b)
5827
if(p[pixel[10]] < c_b)
5828
if(p[pixel[11]] < c_b)
5829
if(p[pixel[12]] < c_b)
5838
if(p[pixel[10]] < c_b)
5839
if(p[pixel[11]] < c_b)
5840
if(p[pixel[12]] < c_b)
5841
if(p[pixel[13]] < c_b)
5852
if(p[pixel[10]] < c_b)
5853
if(p[pixel[11]] < c_b)
5854
if(p[pixel[12]] < c_b)
5855
if(p[pixel[13]] < c_b)
5856
if(p[pixel[14]] < c_b)
5869
if(p[pixel[10]] < c_b)
5870
if(p[pixel[11]] < c_b)
5871
if(p[pixel[12]] < c_b)
5872
if(p[pixel[13]] < c_b)
5873
if(p[pixel[14]] < c_b)
5874
if(p[pixel[15]] < c_b)
5894
if(num_corners == rsize)
5897
ret_corners = (xy*)realloc(ret_corners, sizeof(xy)*rsize);
5899
ret_corners[num_corners].x = x;
5900
ret_corners[num_corners].y = y;
5905
*ret_num_corners = num_corners;