Class OpenCVOptimizer

  • All Implemented Interfaces:
    Optimizer<org.opencv.core.Mat>

    public class OpenCVOptimizer
    extends Object
    implements Optimizer<org.opencv.core.Mat>

    Implementation of the Optimizer Interface which is used to improve the quality and/or speed of image processing algorithms.

    Since:
    1.0
    Author:
    Christoph Praschl, Gerald Zwettler
    • Constructor Detail

      • OpenCVOptimizer

        public OpenCVOptimizer()
    • Method Detail

      • optimize

        public RotationOffset optimize​(ImageWrapper<org.opencv.core.Mat> ref,
                                       ImageWrapper<org.opencv.core.Mat> current,
                                       int numberOfIterations,
                                       int positionalRadius,
                                       int rotationalRadius,
                                       int stepsOfInterestingPoints,
                                       double degressionRate,
                                       RGBColor paddingFillColor)
        Method for calculating the offset of two images in an optimized way.
        Specified by:
        optimize in interface Optimizer<org.opencv.core.Mat>
        Parameters:
        ref - The image which is used for comparison.
        current - The image which should be compared with ref
        numberOfIterations - Max. number of iterations which should be done.
        positionalRadius - The search window for positional offset (look between -positionalRadius to +positionRadius. e.g. if image is translated max +/- 10 pixels on x-axis and y-axis)
        rotationalRadius - The search window for rotational offset (look between -rotationalRadius to +rotationalRadius. e.g. if image is translated max +/- 2 degrees)
        stepsOfInterestingPoints - Defines each x points which are interesting for feature detection. E.q. with = 3 just every third point will be used as feature.
        degressionRate - degression of positionalRadius and rotationalRadius per iteration
        paddingFillColor - Color which is used for filling new pixels after padding.
        Returns:
        Rotational and Translational offset between ref and current
      • optimize

        public RotationOffset optimize​(ImageWrapper<org.opencv.core.Mat> ref,
                                       ImageWrapper<org.opencv.core.Mat> current)
        This method optimizes the quality and/or the speed of image processing algorithms.
        Specified by:
        optimize in interface Optimizer<org.opencv.core.Mat>
        Parameters:
        ref - The image which is used for comparison.
        current - The image which should be compared with ref
        Returns:
        Rotational and Translational offset between ref and current
      • optimizePositionalOffset

        public TranslationOffset optimizePositionalOffset​(ImageWrapper<org.opencv.core.Mat> ref,
                                                          ImageWrapper<org.opencv.core.Mat> current)
        Method for calculating the offset of two images.
        Specified by:
        optimizePositionalOffset in interface Optimizer<org.opencv.core.Mat>
        Parameters:
        ref - The image which is used for comparison.
        current - The image which should be compared with ref
        Returns:
        Rotational and Translational offset between ref and current