| 20 | #include "IPLCamera.h" |
| 21 | |
| 22 | void IPLCamera::init() |
| 23 | { |
| 24 | // init |
| 25 | _result = NULL; |
| 26 | |
| 27 | // basic settings |
| 28 | setClassName("IPLCamera"); |
| 29 | setTitle("Capture Camera"); |
| 30 | setDescription("Opens and captures images from the default camera which is connected to your computer. The frame rate depends on the complexity of your process chain, the next frame is captured only after all processing of the previous frame is finished."); |
| 31 | setCategory(IPLProcess::CATEGORY_IO); |
| 32 | setOpenCVSupport(IPLOpenCVSupport::OPENCV_ONLY); |
| 33 | setIsSource(true); |
| 34 | setIsSequence(true); |
| 35 | |
| 36 | // inputs and outputs |
| 37 | addOutput("Image", IPL_IMAGE_COLOR); |
| 38 | |
| 39 | addProcessPropertyUnsignedInt("trigger", "Trigger Image", "", 0, IPL_WIDGET_BUTTON); |
| 40 | addProcessPropertyBool("continuous", "Run continuously", "", false, IPL_WIDGET_CHECKBOXES); |
| 41 | |
| 42 | // all properties which can later be changed by gui |
| 43 | addProcessPropertyInt("width", "Width", "", 640, IPL_WIDGET_SLIDER, 640, 1920); |
| 44 | addProcessPropertyInt("height", "Height", "", 480, IPL_WIDGET_SLIDER, 480, 1080); |
| 45 | addProcessPropertyInt("brightness", "Brightness", "", 128, IPL_WIDGET_SLIDER, 0, 255); |
| 46 | addProcessPropertyInt("contrast", "Contrast", "", 128, IPL_WIDGET_SLIDER, 0, 255); |
| 47 | addProcessPropertyDouble("exposure", "Exposure", "", 0.5, IPL_WIDGET_SLIDER, 0.0, 1.0); |
| 48 | } |
| 49 | |
| 50 | void IPLCamera::destroy() |
| 51 | { |
nothing calls this directly
no test coverage detected