當前位置: 首頁>>代碼示例>>Python>>正文


Python filter.Filter類代碼示例

本文整理匯總了Python中SeaGoatVision.server.core.filter.Filter的典型用法代碼示例。如果您正苦於以下問題:Python Filter類的具體用法?Python Filter怎麽用?Python Filter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Filter類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

 def __init__(self):
     Filter.__init__(self)
     self.kernel_erode_height = Param(
         "Kernel Erode Height",
         3,
         min_v=1,
         max_v=255)
     self.kernel_erode_width = Param(
         "Kernel Dilate Width",
         3,
         min_v=1,
         max_v=255)
     self.kernel_dilate_height = Param(
         "Kernel Erode Height",
         5,
         min_v=1,
         max_v=255)
     self.kernel_dilate_width = Param(
         "Kernel Dilate Width",
         5,
         min_v=1,
         max_v=255)
     self.sections = Param("Sections", 5, min_v=1, max_v=10)
     self.min_area = Param("Minimum Area", 1000, min_v=1, max_v=65535)
     self.configure()
開發者ID:Octets,項目名稱:SeaGoatVision,代碼行數:25,代碼來源:sectionfilter.py

示例2: __init__

 def __init__(self):
     Filter.__init__(self)
     self.face_detect_name = os.path.join('data',
                                          'facedetect',
                                          'haarcascade_frontalface_alt.xml')
     self.face_cascade = cv2.CascadeClassifier()
     assert self.face_cascade.load(self.face_detect_name)
開發者ID:FredericLanglois,項目名稱:SeaGoatVision,代碼行數:7,代碼來源:faceswap.py

示例3: __init__

    def __init__(self):
        Filter.__init__(self)

        self.convert_color = Param("Convert choice", 1, min_v=0, max_v=4)
        desc = "0 = original\n1 = BGR TO YUV\n2 = BGR TO HSV\n3 = BGR TO RGB\n\
        4 = BGR TO GRAY"
        self.convert_color.set_description(desc)
開發者ID:Octets,項目名稱:SeaGoatVision,代碼行數:7,代碼來源:example1.py

示例4: __init__

    def __init__(self):
        Filter.__init__(self)
        self.area_min = Param("Area Min", 300, min_v=1, max_v=100000)
        self.area_max = Param("Area Max", 35000, min_v=1, max_v=100000)

        self._kernel = cv2.getStructuringElement(
            cv2.MORPH_RECT, (3, 3), (0, 0))
開發者ID:Octets,項目名稱:SeaGoatVision,代碼行數:7,代碼來源:lineorientation.py

示例5: __init__

 def __init__(self):
     Filter.__init__(self)
     self.circley = Param("Circley", 0, min_v=0, max_v=200)
     self.circlex = Param("Circlex", 0, min_v=0, max_v=200)
     self.colorr = Param("colorr", 0, min_v=0, max_v=255)
     self.colorg = Param("colorg", 0, min_v=0, max_v=255)
     self.colorb = Param("colorb", 255, min_v=0, max_v=255)
開發者ID:Octets,項目名稱:SeaGoatVision,代碼行數:7,代碼來源:scipytest.py

示例6: __init__

    def __init__(self):
        Filter.__init__(self)
        self.case = 'test'
        self.resize = False

        self.strength = Param("strength", 0.0, min_v=0.0, max_v=3.0)
        self.naturalness = Param("naturalness", 10, min_v=0, max_v=10)
        # self.sub_lum = Param("sub_lum", 100, min_v=0, max_v=255)
        # self.shift_x = Param("shift_x", 0, min_v=-800, max_v=800)
        # self.shift_y = Param("shift_y", 0, min_v=-600, max_v=600)

        self.show_image = Param("show_images", 1, min_v=1, max_v=10)
        self.limit_image = Param("limit_image", 4, min_v=1, max_v=10)
        self.debug_show = Param(
            "show_debug",
            "show_normal",
            lst_value=[
                "show_normal",
                "show_sat",
                "show_con"])
        self.show_hdr = Param("show_hdr", False)
        self.index = 0
        self.images = []
        self.imgs = []
        self.first_time = True
開發者ID:Octets,項目名稱:SeaGoatVision,代碼行數:25,代碼來源:hdr_pil.py

示例7: __init__

 def __init__(self):
     Filter.__init__(self)
     self.canny1 = Param("Canny1", 50, min_v=1, max_v=256)
     self.canny2 = Param("Canny2", 200, min_v=1, max_v=256)
     self.rho = Param("Rho", 1, min_v=1, max_v=256)
     self.theta = Param("Theta", 180, min_v=0, max_v=360)
     self.threshold = Param("Threshold", 100, min_v=1, max_v=256)
     self.line_size = Param("Line Size", 1000, min_v=1, max_v=2000)
開發者ID:FredericLanglois,項目名稱:SeaGoatVision,代碼行數:8,代碼來源:houghtransform.py

示例8: __init__

 def __init__(self):
     Filter.__init__(self)
     self.kernel_width = Param("Kernel Width", 3, min_v=1, max_v=256)
     self.kernel_height = Param("Kernel Height", 3, min_v=1, max_v=256)
     self.anchor_x = Param("Anchor X", -1)
     self.anchor_y = Param("Anchor Y", -1)
     self.iterations = Param("Iteration,", 1, min_v=1)
     self.configure()
開發者ID:Octets,項目名稱:SeaGoatVision,代碼行數:8,代碼來源:morphology.py

示例9: __init__

 def __init__(self):
     Filter.__init__(self)
     self.blue = Param("Blue", 20, min_v=1, max_v=256, thres_h=256)
     self.green = Param("Green", 20, min_v=1, max_v=256, thres_h=256)
     self.red = Param("Red", 20, min_v=1, max_v=256, thres_h=256)
     self._barray = None
     self._garray = None
     self._rarray = None
     self.configure()
開發者ID:Octets,項目名稱:SeaGoatVision,代碼行數:9,代碼來源:colorthreshold.py

示例10: __init__

 def __init__(self):
     Filter.__init__(self)
     path_frontal_face = os.path.join('/', 'usr', 'share', 'opencv',
                                      'haarcascades',
                                      'haarcascade_frontalface_alt.xml')
     self.face_detect_name = os.path.join('data',
                                          'facedetect',
                                          path_frontal_face)
     self.face_cascade = cv2.CascadeClassifier()
     assert self.face_cascade.load(self.face_detect_name)
開發者ID:Octets,項目名稱:SeaGoatVision,代碼行數:10,代碼來源:faceswap.py

示例11: __init__

 def __init__(self):
     # this subclass of Filter
     Filter.__init__(self)
     self.params = {}
     cppfunc(
         self.params,
         self.py_init_param,
         self.notify_output_observers,
         self.dct_global_param,
         self.py_init_global_param)
開發者ID:Octets,項目名稱:SeaGoatVision,代碼行數:10,代碼來源:python_code.py

示例12: __init__

 def __init__(self):
     Filter.__init__(self)
     self.nb_face = 1
     self.eye_detect_name = os.path.join('data', 'facedetect',
                                     'haarcascade_eye_tree_eyeglasses.xml')
     self.face_detect_name = os.path.join('data', 'facedetect',
                                          'haarcascade_frontalface_alt.xml')
     self.eye_cascade = cv2.CascadeClassifier()
     self.face_cascade = cv2.CascadeClassifier()
     self.eye_cascade.load(self.eye_detect_name)
     self.face_cascade.load(self.face_detect_name)
     self.notify_filter = Param("notify", False)
開發者ID:FredericLanglois,項目名稱:SeaGoatVision,代碼行數:12,代碼來源:facedetect.py

示例13: __init__

    def __init__(self):
        Filter.__init__(self)
        self.topleftx = Param("Top Left X", 0, min_v=0, max_v=640)
        self.toplefty = Param("Top Left TY", 0, min_v=0, max_v=480)
        self.bottomleftx = Param("Bottom Left X", 100, min_v=0, max_v=640)
        self.bottomlefty = Param("Bottom Left Y", 480, min_v=0, max_v=480)
        self.toprightx = Param("Top Right X", 640, min_v=0, max_v=640)
        self.toprighty = Param("Top Right Y", 0, min_v=0, max_v=480)
        self.bottomrightx = Param("Bottom Right X", 540, min_v=0, max_v=640)
        self.bottomrighty = Param("Bottom Right Y", 480, min_v=0, max_v=480)

        self.mmat = None
        self.configure()
開發者ID:Octets,項目名稱:SeaGoatVision,代碼行數:13,代碼來源:perspective.py

示例14: __init__

    def __init__(self):
        Filter.__init__(self)
        self.nb_face = 1
        # linux path
        path_frontal_face = os.path.join('/', 'usr', 'share', 'opencv',
                                         'haarcascades',
                                         'haarcascade_frontalface_alt.xml')
        self.face_detect_name = os.path.join(
            'data', 'facedetect', path_frontal_face)

        self.face_cascade = cv2.CascadeClassifier()
        self.face_cascade.load(self.face_detect_name)

        self.notify_filter = Param("notify", False)
開發者ID:Octets,項目名稱:SeaGoatVision,代碼行數:14,代碼來源:facedetect.py

示例15: __init__

    def __init__(self):
        Filter.__init__(self)
        self.dct_color_choose = {"red": (0, 0, 255), "green": (0, 255, 0),
                                 "blue": (255, 0, 0)}
        self.color_rect = self.dct_color_choose["red"]
        self.i_text_size = 1.0
        # add params
        self.show_output = Param("enable_output", True)
        self.show_output.set_description("Enable to show rectangle.")

        self.color_rectangle = Param("color_rectangle", "red",
                                     lst_value=self.dct_color_choose.keys())
        self.color_rectangle.set_description(
            "Change the RGB color of the rectangle.")
        self.color_rectangle.add_group("rectangle")

        self.show_rectangle = Param("show_rectangle", True)
        self.show_rectangle.set_description(
            "Colorize a rectangle around the face.")
        self.show_rectangle.add_group("rectangle")

        self.border_rec_size = Param("border_rec_size", 3, min_v=1, max_v=9)
        self.border_rec_size.set_description(
            "Change the border size of the rectangle.")
        self.border_rec_size.add_group("rectangle")

        self.show_text = Param("enable_text", True)
        self.show_text.set_description("Show text upper the rectangle.")
        self.show_text.add_group("message")

        self.text_face = Param("text_face", "")
        self.text_face.set_description("The text to write on the rectangle.")
        self.text_face.add_group("message")

        self.text_size = Param("text_size", self.i_text_size, min_v=0.1,
                               max_v=4.9)
        self.text_size.set_description("Change the text size.")
        self.text_size.add_group("message")

        self.nb_face = 1
        # linux path
        path_frontal_face = os.path.join('/', 'usr', 'share', 'opencv',
                                         'haarcascades',
                                         'haarcascade_frontalface_alt.xml')
        self.face_detect_name = os.path.join('data', 'facedetect',
                                             path_frontal_face)
        self.face_cascade = cv2.CascadeClassifier()
        self.face_cascade.load(self.face_detect_name)
開發者ID:Octets,項目名稱:SeaGoatVision,代碼行數:48,代碼來源:example2.py


注:本文中的SeaGoatVision.server.core.filter.Filter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。