Пример #1
0
    def configure(self, rf):

        BaseModule.configure(self, rf)

        self.skeletonInPort = self.createInputPort('skeleton', 'buffered')
        self.skeletonOutPort = self.createOutputPort('skeleton', 'buffered')
        return True
Пример #2
0
    def configure(self, rf):

        BaseModule.configure(self, rf)

        self.skeletonInPort  = self.createInputPort('skeleton',  'buffered')
        self.skeletonOutPort = self.createOutputPort('skeleton', 'buffered')
        return True
Пример #3
0
    def configure(self, rf):

        BaseModule.configure(self, rf)

        self.facesPort     = self.createOutputPort('faces')
        self.skeletonPort  = self.createOutputPort('skeleton')

        self.imgInPort     = self.createInputPort('img')
        self.imgOutPort    = self.createOutputPort('img')

        self.bufImageIn,  self.bufArrayIn  = self.createImageBuffer(640, 480, 3)
        self.bufImageOut, self.bufArrayOut = self.createImageBuffer(640, 480, 3)

        return True
Пример #4
0
    def configure(self, rf):

        BaseModule.configure(self, rf)

        self.facesPort = self.createOutputPort('faces')
        self.skeletonPort = self.createOutputPort('skeleton')

        self.imgInPort = self.createInputPort('img')
        self.imgOutPort = self.createOutputPort('img')

        self.bufImageIn, self.bufArrayIn = self.createImageBuffer(640, 480, 3)
        self.bufImageOut, self.bufArrayOut = self.createImageBuffer(
            640, 480, 3)

        return True
Пример #5
0
    def __init__(self, args):
        BaseModule.__init__(self, args)
        self.memory_length = args.memory
        self.translation = args.translation
        self.translation_db = {}

        if self.translation:

            # check that we got a file
            if not op.isfile(self.translation):
                raise ValueError, 'Path [%s] does not point to a file.' % self.translation

            # read translation database
            with open(self.translation, 'r') as _file:
                for line in _file.read().split('\n'):
                    mid, word = line.split()
                    self.translation_db[int(mid)] = word
Пример #6
0
    def __init__(self, args):
        BaseModule.__init__(self, args)
        self.memory_length = args.memory
        self.translation = args.translation
        self.translation_db = {}

        if self.translation:

            # check that we got a file
            if not op.isfile(self.translation):
                raise ValueError, "Path [%s] does not point to a file." % self.translation

            # read translation database
            with open(self.translation, "r") as _file:
                for line in _file.read().split("\n"):
                    mid, word = line.split()
                    self.translation_db[int(mid)] = word
Пример #7
0
    def configure(self, rf):

        BaseModule.configure(self, rf)

        self.markersPort = self.createOutputPort("markers")
        self.orderPort = self.createOutputPort("order")
        self.translationPort = self.createOutputPort("translation")

        self.imgInPort = self.createInputPort("img")
        self.imgOutPort = self.createOutputPort("img")

        self.bufImageIn, self.bufArrayIn = self.createImageBuffer(640, 480, 3)
        self.bufImageOut, self.bufArrayOut = self.createImageBuffer(640, 480, 3)

        self.order = HCMarker.O_HORIZONTAL
        self.orderIsReversed = False

        self.memory = {}

        return True
Пример #8
0
    def configure(self, rf):

        BaseModule.configure(self, rf)

        self.markersPort = self.createOutputPort('markers')
        self.orderPort = self.createOutputPort('order')
        self.translationPort = self.createOutputPort('translation')

        self.imgInPort = self.createInputPort('img')
        self.imgOutPort = self.createOutputPort('img')

        self.bufImageIn, self.bufArrayIn = self.createImageBuffer(640, 480, 3)
        self.bufImageOut, self.bufArrayOut = self.createImageBuffer(
            640, 480, 3)

        self.order = HCMarker.O_HORIZONTAL
        self.orderIsReversed = False

        self.memory = {}

        return True