예제 #1
0
파일: gauss_blur.py 프로젝트: 05dirnbe/nefi
    def __init__(self):
        """
        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category
            | *kernelsize* : blurring kernel size that will be used as slider
              for the UI. Consider that a value n is treated as 2*n+1 to
              guarantee an odd box filter. For example the value 1 gives
              a neighbourhood of size 3x3.
            | *sigmaX* : gaussian kernel standard deviation in X direction
            | *channel1* : checkbox if computing the first color channel
            | *channel2* : checkbox if computing the second color channel
            | *channel3* : checkbox if computing the third color channel

        """
        Algorithm.__init__(self)
        self.name = "Gauss Blur"
        self.parent = "Preprocessing"
        self.kernelsize = IntegerSlider("kernelsize", 1, 20, 1, 1)
        self.sigmaX = FloatSlider("sigmaX", 1.0, 100.0, 0.1, 1.0)
        self.channel1 = CheckBox("channel1", True)
        self.channel2 = CheckBox("channel2", True)
        self.channel3 = CheckBox("channel3", True)
        self.integer_sliders.append(self.kernelsize)
        self.float_sliders.append(self.sigmaX)
예제 #2
0
    def __init__(self):
        """
        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category
            | *kernelsize* : blurring kernel size that will be used as slider
              for the UI. Consider that a value n is treated as 2*n+1 to
              guarantee an odd box filter. For example the value 1 gives
              a neighbourhood of size 3x3.
            | *sigmaX* : gaussian kernel standard deviation in X direction
            | *channel1* : checkbox if computing the first color channel
            | *channel2* : checkbox if computing the second color channel
            | *channel3* : checkbox if computing the third color channel

        """
        Algorithm.__init__(self)
        self.name = "Gauss Blur"
        self.parent = "Preprocessing"
        self.kernelsize = IntegerSlider("kernelsize", 1, 20, 1, 1)
        self.sigmaX = FloatSlider("sigmaX", 1.0, 100.0, 0.1, 1.0)
        self.channel1 = CheckBox("channel1", True)
        self.channel2 = CheckBox("channel2", True)
        self.channel3 = CheckBox("channel3", True)
        self.integer_sliders.append(self.kernelsize)
        self.float_sliders.append(self.sigmaX)
예제 #3
0
    def __init__(self):
        """
        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category
            | *f_strength* : Parameter regulating filter strength.
              A larger value of the parameter means that more noise and also
              more image details will be removed
            | *f_col* : The same as h but for color components. For most images
                value equals 10 will be enough to remove colored noise and do
                not distort colors
            | *template_size* : size in pixels of the template patch that
              is used to compute weights. Consider that a value n is treated
              as 2*n+1 to guarantee an odd box filter. For example the value 1
              gives a neighbourhood of size 3x3.
            | *search_size* : size in pixels of the window that is used
              to compute weighted average for given pixel.
              A larger value of the parameter means a larger denoising time.
              Consider that a value n is treated as 2*n+1 to
              guarantee an odd box filter. For example the value 1 gives
              a neighbourhood of size 3x3.

        """
        Algorithm.__init__(self)
        self.name = "FM Denoise Color"
        self.parent = "Preprocessing"
        self.f_strength = FloatSlider("filter strength", 1.0, 100.0, 0.1, 1.0)
        self.f_col = FloatSlider("filter strength color", 1.0, 100.0, 0.1, 1.0)
        self.template_size = IntegerSlider("template window size", 1, 20, 1, 3)
        self.search_size = IntegerSlider("search window size", 1, 20, 1, 10)
        self.integer_sliders.append(self.template_size)
        self.integer_sliders.append(self.search_size)
        self.float_sliders.append(self.f_strength)
        self.float_sliders.append(self.f_col)
예제 #4
0
    def __init__(self):
        """
        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriated category
            | *attribute* :  A valid edge attribute present in the graph.
            | *attribute_threshold_value* : A threshold value for
             the given attribute
            | *operator* : A logical python operator.
             See python module operator

        """
        Algorithm.__init__(self)
        self.name = "Edge Attribute"
        self.parent = "Graph Filtering"
        self.attribute = DropDown("Attribute", {"width", "length"})
        self.drop_downs.append(self.attribute)
        self.attribute_threshold_value = FloatSlider("Attribute treshold", 0.0,
                                                     20.0, 0.1, 10.0)
        self.float_sliders.append(self.attribute_threshold_value)
        self.operator = DropDown(
            "Operator", {
                "strictly smaller", "smaller or equal", "equal",
                "greater or equal", "strictly greater"
            })
        self.drop_downs.append(self.operator)
예제 #5
0
 def __init__(self):
     """
     Instance vars:
         | *name* : name of the algorithm
         | *parent* : name of the appropriated category
     """
     Algorithm.__init__(self)
     self.name = "Smooth 2 Nodes"
     self.parent = "Graph Filtering"
예제 #6
0
 def __init__(self):
     """
     Instance vars:
         | *name* : name of the algorithm
         | *parent* : name of the appropriated category
     """
     Algorithm.__init__(self)
     self.name = "Smooth 2 Nodes"
     self.parent = "Graph Filtering"
예제 #7
0
    def __init__(self):
        """
        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category

        """
        Algorithm.__init__(self)
        self.name = "Simple Cycle"
        self.parent = "Graph Filtering"
    def __init__(self):
        """
        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category

        """
        Algorithm.__init__(self)
        self.name = "Guo Hall"
        self.parent = "Graph Detection"
예제 #9
0
파일: otsus.py 프로젝트: 05dirnbe/nefi
    def __init__(self):
        """
        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category

        """
        Algorithm.__init__(self)
        self.name = "Otsus"
        self.parent = "Segmentation"
예제 #10
0
    def __init__(self):
        """
        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category

        """
        Algorithm.__init__(self)
        self.name = "Otsus"
        self.parent = "Segmentation"
예제 #11
0
    def __init__(self):
        """
        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category

        """
        Algorithm.__init__(self)
        self.name = "Keep only LCC"
        self.parent = "Graph Filtering"
예제 #12
0
    def __init__(self):
        """
        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category

        """
        Algorithm.__init__(self)
        self.name = "Guo Hall Thinning"
        self.parent = "Thinning"
예제 #13
0
파일: guo_hall.py 프로젝트: whungt/nefi
    def __init__(self):
        """
        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category

        """
        Algorithm.__init__(self)
        self.name = "Guo Hall Graph Detection"
        self.parent = "Graph Detection"
예제 #14
0
 def __init__(self):
     Algorithm.__init__(self)
     self.name = "Color Enhance"
     self.parent = "Preprocessing"
     self.left_pct = FloatSlider("left percentage", 0.0, 10.0, 0.1, 2.5)
     self.right_pct = FloatSlider("right percentage", 0.0, 10.0, 0.1, 2.5)
     self.channel1 = CheckBox("channel1", True)
     self.channel2 = CheckBox("channel2", True)
     self.channel3 = CheckBox("channel3", True)
     self.float_sliders.append(self.left_pct)
     self.float_sliders.append(self.right_pct)
예제 #15
0
 def __init__(self):
     Algorithm.__init__(self)
     self.name = "Color Enhance"
     self.parent = "Preprocessing"
     self.left_pct = FloatSlider("left percentage", 0.0, 10.0, 0.1, 2.5)
     self.right_pct = FloatSlider("right percentage", 0.0, 10.0, 0.1, 2.5)
     self.channel1 = CheckBox("channel1", True)
     self.channel2 = CheckBox("channel2", True)
     self.channel3 = CheckBox("channel3", True)
     self.float_sliders.append(self.left_pct)
     self.float_sliders.append(self.right_pct)
예제 #16
0
    def __init__(self):
        """
        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category
            | *threshold* : threshold [1-254]

        """
        Algorithm.__init__(self)
        self.name = "Constant"
        self.parent = "Segmentation"
        self.threshold = IntegerSlider("Threshold", 1, 254, 1, 127)
        self.integer_sliders.append(self.threshold)
예제 #17
0
    def __init__(self):
        """
        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category
            | *threshold* : threshold [1-254]

        """
        Algorithm.__init__(self)
        self.name = "Constant"
        self.parent = "Segmentation"
        self.threshold = IntegerSlider("Threshold", 1, 254, 1, 127)
        self.integer_sliders.append(self.threshold)
예제 #18
0
파일: adaptive.py 프로젝트: 05dirnbe/nefi
    def __init__(self):
        """
        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category
            | *constant* : threshold constant [-10-10]
            | *blocksize* : threshold blocksize [3-23]

        """
        Algorithm.__init__(self)
        self.name = "Adaptive"
        self.parent = "Segmentation"
        self.blocksize = IntegerSlider("Threshold Blocksize", 1, 20, 1, 5)
        self.constant = IntegerSlider("Threshold Constant", -10, 10, 1, 2)
        self.integer_sliders.append(self.blocksize)
        self.integer_sliders.append(self.constant)
예제 #19
0
    def __init__(self):
        """
        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category
            | *constant* : threshold constant [-10-10]
            | *blocksize* : threshold blocksize [3-23]

        """
        Algorithm.__init__(self)
        self.name = "Adaptive"
        self.parent = "Segmentation"
        self.blocksize = IntegerSlider("Threshold Blocksize", 1, 20, 1, 5)
        self.constant = IntegerSlider("Threshold Constant", -10, 10, 1, 2)
        self.integer_sliders.append(self.blocksize)
        self.integer_sliders.append(self.constant)
예제 #20
0
    def __init__(self):
        """
        Invert Color object constructor

        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category
            | *channel1* : checkbox if computing the first color channel
            | *channel2* : checkbox if computing the second color channel
            | *channel3* : checkbox if computing the third color channel

        """
        Algorithm.__init__(self)
        self.name = "Invert Color"
        self.parent = "Preprocessing"
        self.channel1 = CheckBox("channel1", True)
        self.channel2 = CheckBox("channel2", True)
        self.channel3 = CheckBox("channel3", True)
예제 #21
0
    def __init__(self):
        """
        Invert Color object constructor

        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category
            | *channel1* : checkbox if computing the first color channel
            | *channel2* : checkbox if computing the second color channel
            | *channel3* : checkbox if computing the third color channel

        """
        Algorithm.__init__(self)
        self.name = "Invert Color"
        self.parent = "Preprocessing"
        self.channel1 = CheckBox("channel1", True)
        self.channel2 = CheckBox("channel2", True)
        self.channel3 = CheckBox("channel3", True)
예제 #22
0
    def __init__(self):
        """
        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriated category
            | *compnt_size* : A threshold value for the size of
             the connected components
            | *operator* : A logical python operator.
             See python module operator

        """
        Algorithm.__init__(self)
        self.name = "Connected Component"
        self.parent = "Graph Filtering"
        self.compnt_size = IntegerSlider("Component Size", 0.0, 20.0, 1.0, 10)
        self.integer_sliders.append(self.compnt_size)
        self.operator = DropDown("Operator", {"strictly smaller",
                                              "smaller or equal",
                                              "equal",
                                              "greater or equal",
                                              "strictly greater"})
        self.drop_downs.append(self.operator)
예제 #23
0
    def __init__(self):
        """
        Fast nl Means Denoising object constructor.

        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category
            | *f_strength* : Parameter regulating filter strength.
              A larger value of the parameter means that more noise and also
              more image details will be removed
            | *template_size* : size in pixels of the template patch that
              is used to compute weights. Consider that a value n is treated
              as 2*n+1 to guarantee an odd box filter. For example the value 1
              gives a neighbourhood of size 3x3.
            | *search_size* : size in pixels of the window that is used
              to compute weighted average for given pixel.
              A larger value of the parameter means a larger denoising time.
              Consider that a value n is treated as 2*n+1 to
              guarantee an odd box filter. For example the value 1 gives
              a neighbourhood of size 3x3.
            | *channel1* : checkbox if computing the first color channel
            | *channel2* : checkbox if computing the second color channel
            | *channel3* : checkbox if computing the third color channel

        """
        Algorithm.__init__(self)
        self.name = "FM Denoise"
        self.parent = "Preprocessing"
        self.f_strength = FloatSlider("filter strength", 1.0, 100.0, 0.1, 1.0)
        self.template_size = IntegerSlider("template window size", 1, 20, 1, 3)
        self.search_size = IntegerSlider("search window size", 1, 20, 1, 10)
        self.channel1 = CheckBox("channel1", True)
        self.channel2 = CheckBox("channel2", True)
        self.channel3 = CheckBox("channel3", True)
        self.integer_sliders.append(self.template_size)
        self.integer_sliders.append(self.search_size)
        self.float_sliders.append(self.f_strength)
예제 #24
0
    def __init__(self):
        """
        Fast nl Means Denoising object constructor.

        Instance vars:
            | *name* : name of the algorithm
            | *parent* : name of the appropriate category
            | *f_strength* : Parameter regulating filter strength.
              A larger value of the parameter means that more noise and also
              more image details will be removed
            | *template_size* : size in pixels of the template patch that
              is used to compute weights. Consider that a value n is treated
              as 2*n+1 to guarantee an odd box filter. For example the value 1
              gives a neighbourhood of size 3x3.
            | *search_size* : size in pixels of the window that is used
              to compute weighted average for given pixel.
              A larger value of the parameter means a larger denoising time.
              Consider that a value n is treated as 2*n+1 to
              guarantee an odd box filter. For example the value 1 gives
              a neighbourhood of size 3x3.
            | *channel1* : checkbox if computing the first color channel
            | *channel2* : checkbox if computing the second color channel
            | *channel3* : checkbox if computing the third color channel

        """
        Algorithm.__init__(self)
        self.name = "FM Denoise"
        self.parent = "Preprocessing"
        self.f_strength = FloatSlider("filter strength", 1.0, 100.0, 0.1, 1.0)
        self.template_size = IntegerSlider("template window size", 1, 20, 1, 3)
        self.search_size = IntegerSlider("search window size", 1, 20, 1, 10)
        self.channel1 = CheckBox("channel1", True)
        self.channel2 = CheckBox("channel2", True)
        self.channel3 = CheckBox("channel3", True)
        self.integer_sliders.append(self.template_size)
        self.integer_sliders.append(self.search_size)
        self.float_sliders.append(self.f_strength)
예제 #25
0
 def __init__(self):
     Algorithm.__init__(self)
     self.name = "Image Reduce"
     self.parent = "Preprocessing"
     self.ratio = IntegerSlider("Reduction %", 1, 100, 1, 50)
     self.integer_sliders.append(self.ratio)