PointGrey

class asgard_alignment.Cameras.PointGrey(cam_index=0)

Bases: object

No-index:

Attributes Summary

EDITABLE_PARAMS

camera

Get the camera instance.

img_size

Get the image size.

Methods Summary

get_frame()

Get the next image frame from the camera.

release()

Release the camera resources.

start_stream()

Start the camera acquisition stream.

stop_stream()

Stop the camera acquisition stream.

Attributes Documentation

EDITABLE_PARAMS = ['AcquisitionFrameRate', 'ExposureTime', 'Gain', 'Height', 'Width', 'PixelFormat', 'ExposureAuto', 'GainAuto', 'AcquisitionMode', 'ExposureMode', 'OffsetX', 'OffsetY']
camera

Get the camera instance.

Returns:

The camera instance.

Return type:

PySpin.Camera

img_size

Get the image size.

Returns:

The height and width of the image.

Return type:

tuple

Methods Documentation

get_frame()

Get the next image frame from the camera.

Returns:

The next image frame as a numpy array.

Return type:

numpy.ndarray

release()

Release the camera resources.

start_stream()

Start the camera acquisition stream.

stop_stream()

Stop the camera acquisition stream.

EDITABLE_PARAMS = ['AcquisitionFrameRate', 'ExposureTime', 'Gain', 'Height', 'Width', 'PixelFormat', 'ExposureAuto', 'GainAuto', 'AcquisitionMode', 'ExposureMode', 'OffsetX', 'OffsetY']
__getitem__(key)

Get the value of a camera parameter.

Parameters:

key (str) – The name of the parameter to get.

Returns:

The value of the parameter.

Return type:

Any

Raises:

KeyError – If the key is not a valid parameter.

__setattr__(name, value)

Set the attribute of the camera.

Parameters:
  • name (str) – The name of the attribute to set.

  • value (Any) – The value to set the attribute to.

__setitem__(key, value)

Set the value of a camera parameter.

Parameters:
  • key (str) – The name of the parameter to set.

  • value (Any) – The value to set the parameter to.

Raises:

KeyError – If the key is not a valid parameter.

property camera

Get the camera instance.

Returns:

The camera instance.

Return type:

PySpin.Camera

get_frame()

Get the next image frame from the camera.

Returns:

The next image frame as a numpy array.

Return type:

numpy.ndarray

property img_size

Get the image size.

Returns:

The height and width of the image.

Return type:

tuple

release()

Release the camera resources.

set_region_from_corners(x1, y1, x2, y2)

Set the region of interest from the top left and bottom right corners.

Parameters:
  • x1 (int) – The x coordinate of the top left corner.

  • y1 (int) – The y coordinate of the top left corner.

  • x2 (int) – The x coordinate of the bottom right corner.

  • y2 (int) – The y coordinate of the bottom right corner.

start_stream()

Start the camera acquisition stream.

stop_stream()

Stop the camera acquisition stream.