Beispiel #1
0
    def init(self, context):
        self.width = 250
        self.inputs.new("OCVLImageSocket", "image_in")
        self.inputs.new("OCVLMaskSocket", "mask_in")
        self.inputs.new("OCVLVectorSocket", "keypoints_in")

        self.outputs.new("OCVLObjectSocket", "keypoints_out")
        self.outputs.new("OCVLVectorSocket", "descriptors_out")
        self.update_layout(context)
        OCVL_OT_InitFeature2DOperator.update_class_instance_dict(self, self.id_data.name, self.name)
        FEATURE2D_INSTANCES_DICT.get("{}.{}".format(self.id_data.name, self.name))
Beispiel #2
0
    def wrapped_process(self):
        instance = FEATURE2D_INSTANCES_DICT.get("{}.{}".format(self.id_data.name, self.name))

        if self.loc_work_mode == "DETECT":
            self._detect(instance)
        elif self.loc_work_mode == "COMPUTE":
            self._compute(instance)
        elif self.loc_work_mode == "DETECT-COMPUTE":
            self._detect_and_compute(instance)
    def wrapped_process(self):
        sift = FEATURE2D_INSTANCES_DICT.get("{}.{}".format(self.id_data.name, self.name))

        if self.loc_work_mode == "DETECT":
            pass
        elif self.loc_work_mode == "COMPUTE":
            self._compute(sift)
        elif self.loc_work_mode == "DETECT-COMPUTE":
            pass
Beispiel #4
0
def update_layout(self, context):
    self.update_sockets(context)
    if FEATURE2D_INSTANCES_DICT.get("{}.{}".format(self.id_data.name, self.name)):
        update_node(self, context)
Beispiel #5
0
 def free(self):
     FEATURE2D_INSTANCES_DICT.pop("{}.{}".format(self.id_data.name, self.name))
     super().free()