def __init__(self, options): FrameProcessor.__init__(self, options) self.windowWidth = options.get('windowWidth', 640) self.windowHeight = options.get('windowHeight', 480) # * Initialize OpenGL texture and framebuffer used to render camera images # NOTE: A valid OpenGL context must available at this point self.texOutId = glGenTextures(1) glBindTexture(GL_TEXTURE_2D, self.texOutId) #glPixelStorei(GL_UNPACK_ALIGNMENT, 1) # image data is not padded (?) glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR) # GL_NEAREST glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) # GL_NEAREST glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE) # GL_REPEAT glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE) # GL_REPEAT self.framebufferId = glGenFramebuffers(1) glBindFramebuffer(GL_DRAW_FRAMEBUFFER, self.framebufferId) glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, self.texOutId, 0) glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0)
def __init__(self, options): FrameProcessor.__init__(self, options)
def __init__(self, options): FrameProcessor.__init__(self, options) if self.debug: self.loop_delay = 0.025 # set some delay when debugging, in case we are running a video self.state = ExposureNormalizer.State.NONE # set to NONE here, call start() to run through once
def __init__(self, options): FrameProcessor.__init__(self, options) self.filterBankFilename = options.get('filter_bank', self.defaultFilterBankFilename) #self.debug = True # overriding debug flag self.state = self.State.INIT