| 20 | #include "IPLHoughLineSegments.h" |
| 21 | |
| 22 | void IPLHoughLineSegments::init() |
| 23 | { |
| 24 | // init |
| 25 | _overlay = NULL; |
| 26 | _result = NULL; |
| 27 | |
| 28 | // basic settings |
| 29 | setClassName("IPLHoughLineSegments"); |
| 30 | setTitle("Hough Line Segments"); |
| 31 | setCategory(IPLProcess::CATEGORY_OBJECTS); |
| 32 | setOpenCVSupport(IPLOpenCVSupport::OPENCV_ONLY); |
| 33 | setDescription("Finds line segments in a binary image using the standard Hough transform."); |
| 34 | |
| 35 | // inputs and outputs |
| 36 | addInput("Image", IPL_IMAGE_GRAYSCALE); |
| 37 | addOutput("Hough Result", IPL_IMAGE_GRAYSCALE); |
| 38 | addOutput("Line Overlay", IPL_IMAGE_COLOR); |
| 39 | |
| 40 | // properties |
| 41 | addProcessPropertyDouble("rho", "Rho", "Distance resolution of the accumulator in pixels", 1, IPL_WIDGET_SLIDER, 0, 10); |
| 42 | addProcessPropertyDouble("theta", "Theta", "Angle resolution of the accumulator in radians.", 0.01, IPL_WIDGET_SLIDER, 0, 5.14); |
| 43 | addProcessPropertyInt("threshold", "Threshold", "Accumulator threshold parameter.", 1, IPL_WIDGET_SLIDER, 1, 1000); |
| 44 | addProcessPropertyInt("minLenght", "Min. Length", "", 1, IPL_WIDGET_SLIDER, 1, 1000); |
| 45 | addProcessPropertyInt("maxLineGap", "Max. Line Gap", "", 1, IPL_WIDGET_SLIDER, 1, 1000); |
| 46 | } |
| 47 | |
| 48 | void IPLHoughLineSegments::destroy() |
| 49 | { |
nothing calls this directly
no test coverage detected