Пример #1
0
void IPLMergePlanes::init()
{
    // init
    _result = NULL;
    _inputA = NULL;
    _inputB = NULL;
    _inputC = NULL;
    _inputType  = 0;

    // basic settings
    setClassName("IPLMergePlanes");
    setTitle("Merge Planes");
    setCategory(IPLProcess::CATEGORY_CONVERSIONS);
    setDescription("Converts color planes into a color image. The input planes may be images in"
                   "the RGB, HSI, HLS, or HSV color system");

    // properties
    addProcessPropertyInt("input_type", "Color Model:RGB|HSV|HSL", "", _inputType, IPL_WIDGET_RADIOBUTTONS);

    // inputs and outputs
    addInput("Plane 1", IPLData::IMAGE_GRAYSCALE);
    addInput("Plane 2", IPLData::IMAGE_GRAYSCALE);
    addInput("Plane 3", IPLData::IMAGE_GRAYSCALE);
    addOutput("Image",  IPLData::IMAGE_COLOR);

}
Пример #2
0
void IPLUndistort::init()
{
    // init
    _result     = NULL;

    // basic settings
    setClassName("IPLUndistort");
    setTitle("Undistort Image");
    setDescription("The function transforms an image to compensate radial and tangential lens distortion.");
    setCategory(IPLProcess::CATEGORY_GEOMETRY);
    setOpenCVSupport(IPLProcess::OPENCV_ONLY);
    setKeywords("distortion, undistortion, barrel, lens correction");

    // inputs and outputs
    addInput("Image", IPL_IMAGE_COLOR);
    addOutput("Image", IPL_IMAGE_COLOR);

    // properties
    addProcessPropertyInt("f", "f", "Focal Length", 1000, IPL_WIDGET_SLIDER, 0, 10000.0);

    addProcessPropertyDouble("p1", "p1", "", 0.0, IPL_WIDGET_SLIDER, -10.0, 10.0);
    addProcessPropertyDouble("p2", "p2", "Tangential Distortion", 0.0, IPL_WIDGET_SLIDER, -10.0, 10.0);
    addProcessPropertyDouble("k1", "k1", "", 0.0, IPL_WIDGET_SLIDER, -100.0, 100.0);
    addProcessPropertyDouble("k2", "k2", "", 0.0, IPL_WIDGET_SLIDER, -100.0, 100.0);
    addProcessPropertyDouble("k3", "k3", "Radial Distortion", 0.0, IPL_WIDGET_SLIDER, -100.0, 100.0);
}
Пример #3
0
void IPLCanny::init()
{
    // init
    _result         = NULL;
    _binaryImage    = NULL;
    _orientedImage  = NULL;

    // basic settings
    setClassName("IPLCanny");
    setTitle("Canny Edge Detector");
    setCategory(IPLProcess::CATEGORY_LOCALOPERATIONS);
    setOpenCVSupport(IPLOpenCVSupport::OPENCV_ONLY);
    setDescription("The Canny edge detector delivers the magnitude and the gradient of the edge "
                   "image. Thresholding has to be done by an appropriate operator. The σ value "
                   "is used for both, smoothing and derivation operation.");

    // inputs and outputs
    addInput("Image", IPLData::IMAGE_COLOR);
    addOutput("Magnitude", IPLImage::IMAGE_GRAYSCALE);
    addOutput("Edge", IPLImage::IMAGE_GRAYSCALE);
    addOutput("Gradient", IPLImage::IMAGE_GRAYSCALE);

    // properties
    addProcessPropertyInt("window", "Window", "", 3, IPL_WIDGET_SLIDER_ODD, 3, 7);
    addProcessPropertyDouble("sigma", "Sigma", "", 1.5, IPL_WIDGET_SLIDER, 0.5, 10);
    addProcessPropertyDouble("lowThreshold", "Low Threshold", "", 0.3, IPL_WIDGET_SLIDER, 0.0, 1.0);
    addProcessPropertyDouble("highThreshold", "Hight Threshold", "Thresholds for the hysteresis procedure", 0.6, IPL_WIDGET_SLIDER, 0.0, 1.0);
}
Пример #4
0
void IPLCompassMask::init()
{
    // init
    _result     = NULL;

    // basic settings
    setClassName("IPLCompassMask");
    setTitle("Compass Mask");
    setKeywords("direction");
    setCategory(IPLProcess::CATEGORY_LOCALOPERATIONS);
    setDescription("Local compass mask low-pass operator. Prewitt, Kirsch, Sobel, and ThreeLevel masks in all directions.");

    // inputs and outputs
    addInput("Image", IPLData::IMAGE_COLOR);
    addOutput("Image", IPLImage::IMAGE_COLOR);

    // properties
    addProcessPropertyInt("maskType", "Mask Type:Prewitt|Kirsch|ThreeLevel|Sobel", "", 0, IPL_WIDGET_COMBOBOX);
    addProcessPropertyInt("direction", "Direction:N|NW|W|SW|S|SE|E|NE", "", 0, IPL_WIDGET_COMBOBOX);
}
Пример #5
0
void IPLCanvasSize::init()
{
    // init
    _result     = NULL;

    // basic settings
    setClassName("IPLCanvasSize");
    setTitle("Resize Canvas");
    setKeywords("crop");
    setCategory(IPLProcess::CATEGORY_GEOMETRY);

    // inputs and outputs
    addInput("Image", IPL_IMAGE_COLOR);
    addOutput("Image", IPL_IMAGE_COLOR);

    // properties
    addProcessPropertyInt("width",      "Width", "", 512, IPL_WIDGET_SLIDER, 1, 4096);
    addProcessPropertyInt("height",     "Height", "", 512, IPL_WIDGET_SLIDER, 1, 4096);
    addProcessPropertyInt("anchor",     "Anchor:Top Left|Top|Top Right|Left|Center|Right|Bottom Left|Bottom|Bottom Right", "", 4, IPL_WIDGET_COMBOBOX);
    addProcessPropertyColor("color",    "Background", "If extending the canvas, the background is filled with this color", IPLColor(0,0,0), IPL_WIDGET_COLOR_RGB);
}
Пример #6
0
void IPLSynthesize::init()
{
    // init
    _result     = NULL;
    _type       = 0;
    _width      = 512;
    _height     = 512;
    _amplitude  = 0.5f;
    _offset     = 0.5f;
    _wavelength = 8;
    _direction  = 0;
    _decay      = 0;

    // basic settings
    setClassName("IPLSynthesize");
    setTitle("Synthesize Image");
    setCategory(IPLProcess::CATEGORY_IO);
    setIsSource(true);

    // inputs and outputs
    addOutput("Image", IPL_IMAGE_GRAYSCALE);

    // all properties which can later be changed by gui
    addProcessPropertyInt("type", "Type:Flat|Plane Wave|Center Wave","flat|plane|radial", _type, IPL_WIDGET_GROUP);
    addProcessPropertyInt("width", "Width","", _width, IPL_WIDGET_SLIDER, 1, 1024);
    addProcessPropertyInt("height", "Height","", _height, IPL_WIDGET_SLIDER, 1, 1024);
    addProcessPropertyDouble("amplitude", "Amptlitude","", _amplitude, IPL_WIDGET_SLIDER, 0.0f, 1.0f);
    addProcessPropertyDouble("offset", "Offset","", _offset, IPL_WIDGET_SLIDER, 0.0f, 1.0f);
    addProcessPropertyInt("wavelength", "Wavelength","", _wavelength, IPL_WIDGET_SLIDER, 1, 1024);
    addProcessPropertyInt("plane_direction", "Direction","", _direction, IPL_WIDGET_SLIDER, 0, 360);
    addProcessPropertyInt("decay", "Decay","", _decay, IPL_WIDGET_SLIDER, 0, 1024);
    addProcessPropertyColor("flat_color", "Color","", IPLColor(0,0,0), IPL_WIDGET_COLOR_RGB);
}
void IPLConvolutionFilter::init()
{
    // init
    _result     = NULL;
    _offset     = 0;
    _divisor    = 0;
    _borders    = 0;
    _kernel.clear();

    // basic settings
    setClassName("IPLConvolutionFilter");
    setTitle("2D Convolution");
    setKeywords("filter");
    setCategory(IPLProcess::CATEGORY_LOCALOPERATIONS);
    setDescription("Convolution of a kernel with image.");
    setOpenCVSupport(IPLOpenCVSupport::OPENCV_OPTIONAL);

    // default values
    // 0 0 0
    // 0 1 0
    // 0 0 0
    int nrElements = 9;
    for(int i=0; i<nrElements; i++)
    {
        // set the center to 1, all others to 0
        _kernel.push_back(i == nrElements/2 ? 1 : 0);
    }

    // inputs and outputs
    addInput("Image", IPLData::IMAGE_COLOR);
    addOutput("Image", IPLData::IMAGE_COLOR);

    // properties
    addProcessPropertyVectorInt("kernel", "Kernel", "", _kernel, IPL_WIDGET_KERNEL);
    addProcessPropertyBool("normalize", "Normalize", "Divisor is computed automatically", true, IPL_WIDGET_CHECKBOXES);
    addProcessPropertyInt("divisor", "Divisor", "", 1, IPL_WIDGET_SLIDER, 1, 512);
    addProcessPropertyDouble("offset", "Offset", "", 0.0, IPL_WIDGET_SLIDER, -1.0, 1.0);
    addProcessPropertyInt("borders", "Borders:Crop|Extend|Wrap", "Wrap is not available under OpenCV.", 0, IPL_WIDGET_RADIOBUTTONS, 0, 0);
}
Пример #8
0
void IPLGabor::init()
{
    // init
    _result0    = NULL;
    _result1    = NULL;
    _result2    = NULL;

    // basic settings
    setClassName("IPLGabor");
    setTitle("Gabor Filter");
    setCategory(IPLProcess::CATEGORY_LOCALOPERATIONS);

    // inputs and outputs
    addInput("Image", IPL_IMAGE_COLOR);
    addOutput("Even Gabor ", IPL_IMAGE_COLOR);
    addOutput("Odd Gabor ", IPL_IMAGE_COLOR);
    addOutput("Power Gabor ", IPL_IMAGE_COLOR);

    // properties
    addProcessPropertyInt("window", "Window", "", 5, IPL_WIDGET_SLIDER_ODD, 3, 15);
    addProcessPropertyInt("wavelength", "Wavelength", "", 5, IPL_WIDGET_SLIDER, 1, 15);
    addProcessPropertyDouble("direction", "Direction", "", 0, IPL_WIDGET_SLIDER, 0, 2*PI);
    addProcessPropertyDouble("deviation", "Std. Deviation", "", 5, IPL_WIDGET_SLIDER, 1, 10);
}
Пример #9
0
void IPLMorphologyBinary::init()
{
    // init
    _result = NULL;

    // basic settings
    setClassName("IPLMorphologyBinary");
    setTitle("Binary Morphology");
    setCategory(IPLProcess::CATEGORY_MORPHOLOGY);
    setOpenCVSupport(IPLOpenCVSupport::OPENCV_OPTIONAL);

    // default value
    // 0 0 0
    // 0 1 0
    // 0 0 0
    int nrElements = 9;
    _kernel.clear();
    for(int i=0; i<nrElements; i++)
    {
        _kernel.push_back((i==4 ? 1 : 0));
    }

    _operation = 0;
    _iterations = 1;

    // inputs and outputs
    addInput("Image", IPLImage::IMAGE_BW);
    addOutput("Image", IPLImage::IMAGE_BW);

    // properties
    addProcessPropertyVectorInt("kernel", "Kernel", "", _kernel, IPL_WIDGET_BINARY_MORPHOLOGY);
    addProcessPropertyInt("iterations", "Iterations",
                          "Run the algorithm x times\nCaution: big kernels and too many iterations can take a long time to compute!",
                          _iterations, IPL_WIDGET_SLIDER, 1, 16);
    addProcessPropertyInt("operation", "Operation:Dilate|Erode|Opening|Closing", "", _operation, IPL_WIDGET_RADIOBUTTONS);
}
void IPLMorphologicalEdge::init()
{
    // init
    _result     = NULL;

    // basic settings
    setClassName("IPLMorphologicalEdge");
    setTitle("Morphological Edge Detector");
    setCategory(IPLProcess::CATEGORY_LOCALOPERATIONS);

    // inputs and outputs
    addInput("Image", IPL_IMAGE_COLOR);
    addOutput("Image", IPL_IMAGE_COLOR);

    // properties
    addProcessPropertyInt("window", "Window", "", 3, IPL_WIDGET_SLIDER_ODD, 3, 9);
}
Пример #11
0
void IPLFFT::init()
{
    // init
    _result     = NULL;

    // basic settings
    setClassName("IPLFFT");
    setTitle("FFT");
    setCategory(IPLProcess::CATEGORY_FOURIER);
    setDescription("Fast Fourier Transform.");

    // inputs and outputs
    addInput("Grayscale Image", IPL_IMAGE_GRAYSCALE);
    addOutput("Complex Image", IPL_IMAGE_COMPLEX);

    // properties
    addProcessPropertyInt("mode", "Windowing Function:None|Hanning|Hamming|Blackman|Border", "", 0, IPL_WIDGET_RADIOBUTTONS);
}
Пример #12
0
void IPLMedian::init()
{
    // init
    _result     = NULL;

    // basic settings
    setClassName("IPLMedian");
    setTitle("Median Operator");
    setCategory(IPLProcess::CATEGORY_MORPHOLOGY);
    setOpenCVSupport(IPLProcess::OPENCV_OPTIONAL);

    // inputs and outputs
    addInput("Image", IPLData::IMAGE_COLOR);
    addOutput("Image", IPLImage::IMAGE_COLOR);

    // properties
    addProcessPropertyInt("window", "Window", "", 3, IPL_WIDGET_SLIDER_ODD, 3, 9);
}
Пример #13
0
void IPLBinarizeSavola::init()
{
    // init
    _result     = NULL;

    // basic settings
    setClassName("IPLBinarizeSavola");
    setTitle("Local Threshold (Savola)");
    setCategory(IPLProcess::CATEGORY_LOCALOPERATIONS);
    setDescription("Local Threshold as proposed by Savola et. al.");

    // inputs and outputs
    addInput("Image", IPL_IMAGE_COLOR);
    addOutput("Image", IPL_IMAGE_COLOR);

    // properties
    addProcessPropertyInt("window", "Window Size", "", 3, IPL_WIDGET_SLIDER_ODD, 3, 9);
    addProcessPropertyDouble("aboveMean", "Above Mean", "", 0.0, IPL_WIDGET_SLIDER, 0.0, 1.0);
}
Пример #14
0
void IPLLocalThreshold::init()
{
    // init
    _result     = NULL;

    // basic settings
    setClassName("IPLLocalThreshold");
    setTitle("Local Threshold");
    setCategory(IPLProcess::CATEGORY_POINTOPERATIONS);
    setDescription("Niblack's Local Average Threshold");

    // inputs and outputs
    addInput("Image", IPLData::IMAGE_COLOR);
    addOutput("Image", IPLImage::IMAGE_COLOR);

    // properties
    addProcessPropertyInt("window", "Window", "", 3, IPL_WIDGET_SLIDER_ODD, 3, 9);
    addProcessPropertyDouble("aboveMean", "Above Mean", "", 0.5, IPL_WIDGET_SLIDER, 0.0, 9.0);
}
void IPLGradientOperator::init()
{
    // init
    _result = NULL;

    // basic settings
    setClassName("IPLGradientOperator");
    setTitle("Gradient Operator");
    setCategory(IPLProcess::CATEGORY_GRADIENTS);
    setKeywords("Fast Gradient, Roberts, Sobel, Cubic Spline");

    // inputs and outputs
    addInput("Image", IPLData::IMAGE_GRAYSCALE);
    addOutput("Image", IPLData::IMAGE_ORIENTED);

    // set the openCV support
    setOpenCVSupport( IPLOpenCVSupport::OPENCV_ONLY );

    // properties
    addProcessPropertyInt("algorithm", "Algorithm:Fast Gradient|Roberts|Sobel|Cubic Spline", "", 0, IPL_WIDGET_RADIOBUTTONS);
}
Пример #16
0
void IPLHarrisCorner::init()
{
    // init
    _result         = NULL;

    // basic settings
    setClassName("IPLHarrisCorner");
    setTitle("Harris Corner Detector");
    setCategory(IPLProcess::CATEGORY_OBJECTS);
    setOpenCVSupport(IPLOpenCVSupport::OPENCV_ONLY);
    setDescription("");

    // inputs and outputs
    addInput("Image", IPLData::IMAGE_COLOR);
    addOutput("Magnitude", IPLImage::IMAGE_GRAYSCALE);
    addOutput("Edge", IPLImage::IMAGE_GRAYSCALE);
    addOutput("Gradient", IPLImage::IMAGE_GRAYSCALE);

    // properties
    addProcessPropertyInt("threshold", "Threshold", "", 1, IPL_WIDGET_SLIDER, 1, 255);
    addProcessPropertyDouble("highThreshold", "High Threshold", "Thresholds for the hysteresis procedure", 0.6, IPL_WIDGET_SLIDER, 0.0, 1.0);
}