Package pyvision :: Package types :: Module Video :: Class Webcam
[hide private]
[frames] | no frames]

Class Webcam

source code

    object --+    
             |    
VideoInterface --+
                 |
                Webcam

Instance Methods [hide private]
 
__init__(self, camera_num=0, size=(640, 480), flipped=False)
Web camera interface for cameras attached to your computer via USB or built-in.
source code
 
__iter__(self)
Return an iterator for this video
source code
 
query(self)
The returned image also include a field named orig_frame which returns the original image returned before rescaling.
source code
 
grab(self)
This is a placeholder for the open cv webcam interface that sometimes requires this call.
source code
 
retrieve(self)
The returned image also include a field named orig_frame which returns the original image returned before rescaling.
source code

Inherited from VideoInterface: next, play, resize

Inherited from VideoInterface (private): _pauseAndPlay

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, camera_num=0, size=(640, 480), flipped=False)
(Constructor)

source code 

Web camera interface for cameras attached to your computer via USB or built-in. For IP/network cameras, use the Video object instead.

Parameters:
  • camera_num - The camera index. Usually 0 if you only have a single webcam on your computer. See the OpenCV highgui documentation for details.
  • flipped - Set to true if camera is installed upside-down.
Overrides: object.__init__

__iter__(self)

source code 

Return an iterator for this video

Overrides: VideoInterface.__iter__

query(self)

source code 

The returned image also include a field named orig_frame which returns the original image returned before rescaling.

Returns:
the frame rescaled to a given size.
Overrides: VideoInterface.query

grab(self)

source code 

This is a placeholder for the open cv webcam interface that sometimes requires this call.

Overrides: VideoInterface.grab
(inherited documentation)

retrieve(self)

source code 

The returned image also include a field named orig_frame which returns the original image returned before rescaling.

Returns:
the frame rescaled to a given size.