0

Heading Here

Trying to add a webcam fee to a panel inside of my wxpython GUI. I have buttons on the left currently, and a black panel on the right.

I'm confused as to how to add a webcam feed to that panel?

here is the code being used to the camera feed, I'm using pygame for it.

pygame.camera.init()
    screen = pygame.display.set_mode((640,340))
    cam = pygame.camera.Camera("/dev/video0", (300,220))
    cam.start()

    while 1:
        image = cam.get_image()
        screen.blit(image,(200,100))
        pygame.display.update()
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                sys.exit()

the Gui panel i'm trying to add the feed to is like this.

self.panel  = wx.Panel(self, -1, (150, 20), (110, 110), style=wx.SUNKEN_BORDER)
        self.panel.SetBackgroundColour(self.colour)

right now the panel, is just being painted black.

do u guys know of any good tutorials of how to do this?

2
Contributors
1
Reply
22
Views
4 Years
Discussion Span
Last Post by ZZucker
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.