/** * OpenCV demo application in C. * * Uses the cvbase C module (cvbase.c, cvbase.h). * * This is just a translation of the C++ example in cvdemo.cpp, cvbase.cpp, * and cvbase.hpp. * * Opens a display window and reads input frames from either a camera or video * file. Processes each frame (no operation by default) and displays the * results. * * Provides basic functions to pause/unpause the live input, emit debugging * information for selected frames, and to save both raw capture and processed * images. * * @author vona **/ #include "cvbase.h" #include int camIndexOptional() { return 1; } void cmdHelpExt() { } const char *cmdHelpExtParams() { return ""; } void guiHelpExt() { } IplImage *process(IplImage *frame) { return frame; } int handleKeyExt(int code) { printf("unhandled keycode %d\n", code); return 1; } void cleanupExt() {} int initExt(int argc, char *argv[], int ate) { return ate; } /** Program entry point. **/ int main(int argc, char *argv[]) { appname = "cvdemo"; printf("ate %d args\n", init(argc, argv)); mainLoop(); }