Special Features
Friendly interfaces with both English and Japanese languages.
Support VC NanoZ, VC proZ, VC Nano 3D Cameras.
Run on Linux and Windows.
load image & resize it | image imgFromFile, imgFromFileResized;; fread_image(img_name, &imgFromFile); resample_bilinear(&imgFromFile, &imgFromFileResized); ImageFree(&imgFromFile); |
save image | rc = fwrite_image(path, &(cpt.sen[0].img)); rc = fwrite_image(path, &imgFromFile); |
access to pixels | image *img; // input image //project (sum of) columns to row [width] |
snap image | // we can use vc_capt(&cpt) rc = vc_cam_init(&cam, &cpt, NULL, NULL, NULL); cpt.sen[0].shutter = 12345; rc= vc_capt(&cpt); //This function sends a request for an image acquisition and then waits for the image to be taken. There is no timeout. rc= vc_capt_request(&cpt); // This function sends a request for an image acquisition. rc= vc_capt_wait(&cpt,-1); //This function waits for an image acquisition requested by the function named vc_capt_request() to be finished. if(rc<0){err=rc; goto end;} … |
save image | image img; … fwrite_image(fname, img); |
draw & fill rectangle | void drawRect(image *img, RECT r, U8 color) POINT p[4]; |
standard error code | Most of the functions return a standard error code: #define ERR_NONE 0 /* no error */ #define ERR_FORMAT -1 /* image format error */ #define ERR_TYPE -2 /* image type error */ #define ERR_MEMORY -3 /* out of memory */ #define ERR_LICENCE -5 /* licence required */ #define ERR_OPEN -19 /* open error */ #define ERR_MODEL -51 /* model does not fit licence */ |
measure time | double time_now() { struct timeval tv; gettimeofday(&tv, NULL); return ((double)tv.tv_sec + ((double)tv.tv_usec*1.0e-6)); } |