#include #include #define LINHAS 64 #define COLUNAS 64 unsigned char in_img[LINHAS*COLUNAS]; unsigned char out_img[LINHAS*COLUNAS]; unsigned char zero[LINHAS*COLUNAS]; void main() { FILE *fin, *fout; int readSize; fin = fopen("arco.raw", "rb"); fout = fopen("thres.raw", "wb"); readSize = fread(in_img, sizeof(char), LINHAS*COLUNAS, fin); printf("%d\n",readSize); threshold(in_img, out_img, COLUNAS, LINHAS, 10<<4); fwrite(out_img, sizeof(char), LINHAS*COLUNAS, fout); fclose(fin); fclose(fout); }