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);
}
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);
}
Beispiel #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);
}
Beispiel #4
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);
}
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);
}
Beispiel #6
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 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);
}
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);
}