def newVideoInputChoosen(self):
     ModuleConnection.changed_event(self._video)
     value = self._video.value
     if value:
         self.open(value)
         self._player.value = self
         print value
Ejemplo n.º 2
0
    def __init__(self, name):
        icon_path = tools.getFileInSameDirectory(__file__, 'iconsubbg.jpg')
        TypeColorVideoPipe.__init__(self)
        OTModulePlugin.__init__(self, name, iconFile=icon_path)

        self._video = ModuleConnection("Video", connecting=TypeColorVideo)
        self._player = ControlPlayer("Video player")
        self._colorDomain = ControlCombo("Color domain")

        self._colorDomain.add_item("XYZ", cv2.COLOR_BGR2XYZ)
        self._colorDomain.add_item("YCrCb", cv2.COLOR_BGR2YCR_CB)
        self._colorDomain.add_item("HSV", cv2.COLOR_BGR2HSV)
        self._colorDomain.add_item("HLS", cv2.COLOR_BGR2HLS)
        self._colorDomain.add_item("Lab", cv2.COLOR_BGR2LAB)
        self._colorDomain.add_item("Luv", cv2.COLOR_BGR2LUV)

        self._colorDomain.changed_event = self._player.refresh
        self._video.changed_event = self.newVideoInputChoosen
        self._player.process_frame_event = self.processFrame

        self._formset = [
            '_video',
            '_colorDomain',
            "_player",
        ]
    def __init__(self, name):
        icon_path = tools.getFileInSameDirectory(__file__, 'iconsubbg.jpg')
        OTModulePlugin.__init__(self, name, iconFile=icon_path)
        TypeComponentsVideoPipe.__init__(self)

        self._video = ModuleConnection("Video", connecting=TypeColorVideo)
        self._player = ControlPlayer("Video player")

        self._player.process_frame_event = self.processFrame
        self._video.changed_event = self.newVideoInputChoosen

        self._formset = [
            '_video',
            "_player",
        ]
    def __init__(self, name):
        icon_path = tools.getFileInSameDirectory(__file__, 'iconsubbg.jpg')
        OTModulePlugin.__init__(self, name, iconFile=icon_path)
        TypeSingleChannelImage.__init__(self)

        self._video = ModuleConnection("Video", connecting=TypeBWVideoPipe)
        self._player = ControlPlayer("Video player")

        self._min = ControlSlider("Min", 1, 0, 255)
        self._max = ControlSlider("Max", 255, 0, 255)

        self._formset = ['_video', "_player", '_min', '_max']

        self._player.process_frame_event = self.processFrame
        self._video.changed_event = self.newVideoInputChoosen
        self._min.changed_event = self._player.refresh
        self._max.changed_event = self._player.refresh
    def __init__(self, name):
        icon_path = tools.getFileInSameDirectory(__file__, 'iconsubbg.jpg')
        TypeBWVideoPipe.__init__(self)
        OTModulePlugin.__init__(self, name, iconFile=icon_path)

        self._video = ModuleConnection("Video",
                                       connecting=TypeComponentsVideoPipe)
        self._player = ControlPlayer("Video player")
        self._colorComponent = ControlCombo("Component")

        self._colorComponent.add_item("A", 0)
        self._colorComponent.add_item("B", 1)
        self._colorComponent.add_item("C", 2)
        self._colorComponent.changed_event = self.refreshValue
        self._video.changed_event = self.newVideoInputChoosen

        self._formset = [
            '_video',
            '_colorComponent',
            "_player",
        ]