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)
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)
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)
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"
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"
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"
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"
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"
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"
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)
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)
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)
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)
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)
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)
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)