MCPcopy Create free account
hub / github.com/cpvrlab/ImagePlay / init

Method init

IPL/src/processes/IPLCamera.cpp:22–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20#include "IPLCamera.h"
21
22void 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
50void IPLCamera::destroy()
51{

Callers

nothing calls this directly

Calls 7

setClassNameFunction · 0.85
setTitleFunction · 0.85
setDescriptionFunction · 0.85
setCategoryFunction · 0.85
setOpenCVSupportFunction · 0.85
setIsSourceFunction · 0.85
setIsSequenceFunction · 0.85

Tested by

no test coverage detected