Taking a webcam in python 3 and windows

I want to take a webcam photo in python 3 and windows. Are there any modules that support it? I tried pygame, but it is only linux and python 2, and VideoCapture is only python 2.

+2
source share
2 answers

08/08/14

Pygame 3.4 Ver. released

http://www.youtube.com/watch?v=SqmSpJfN7OE
http://www.lfd.uci.edu/~gohlke/pythonlibs/

You can download "pygame-1.9.2a0.win32-py3.4.exe"

take a photo from a webcam in python 3.4 (tested in window 7) of the code [1]

import pygame
import pygame.camera

pygame.camera.init()
cam = pygame.camera.Camera(0,(640,480))
cam.start()
img = cam.get_image()
pygame.image.save(img,"filename.jpg")




Refer to [1] Capturing a single image from my webcam in Java or Python

+3

, . , :

             2.7  3.2  3.3  3.4  LINUX  WIN32
-------------------------------------------------------
OpenCV       YES   -    -    -   YES    YES
PyGame       YES  YES  YES  YES  YES    YES
SimpleCV     YES   -    -    -   YES    YES
VideoCapture YES   -    -    -    -     YES

  • opencv.org/downloads.html
  • pygame.info/downloads/
  • simplecv.org/download
  • videocapture.sourceforge.net/
+5

All Articles