runs.c

来自「NIST Handwriting OCR Testbed」· C语言 代码 · 共 25 行

C
25
字号
/*# proc: ramp_int_runs - takes a list of integers, thresholds them into# proc:                 binary values and assigns incrementally accumulated# proc:                 run length vales into a new list.*/#include <stdio.h>ramp_int_runs(bins, rlist, blen, thresh)int *bins, **rlist;int blen, thresh;{   int i, count;   calloc_int(rlist, blen, "ramp_int_runs : rlist");   count = 0;   for(i = 0; i < blen; i++){      if(bins[i] > thresh)         (*rlist)[i] = ++count;      else         count = 0;   }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?