
#include "image.h"
#include "vector.h"

main()
{
  GrayImage img;
  uchar *scan, *end;
  LongVector hist;
  int i;
  
  img  = imLoad(IMAGE_GRAY, NULL);
  hist = vecNew(VECTOR_LONG, 256);

  scan = imGetStore(img);
  end  = scan + imGetStoreLen(img);
  while(scan < end){
    vecRef(hist,*scan++)++;
  }

  for(i = 0; i < 256; i++){
    printf("%ld\n", vecRef(hist, i));
  }
}

