science_jubilee.tools.Camera#
Classes#
A class representation of a Raspberry Pi camera. |
Module Contents#
- class science_jubilee.tools.Camera.Camera(index, name)[source]#
Bases:
science_jubilee.tools.Tool.Tool
A class representation of a Raspberry Pi camera.
- Parameters:
Tool (class:Tool) – The base tool class
- get_camera_indices()[source]#
Returns valid camera indices for use with OpenCV
- Returns:
A list of valid camera indices
- Return type:
- get_frame(resolution=[1200, 1200], uvc=False)[source]#
Take a picture and return the image. Compensates for lens distortion using camera calibration file.
- show_frame(frame, grid=False, save=False, save_path='fig.png')[source]#
Show a captured frame using matplotlib.
- video_stream(camera_index=0)[source]#
Start a video stream from the camera.
- Parameters:
camera_index (int, optional) – The camera index, defaults to 0
- image_wells(resolution=[1200, 1200], uvc=False, wells: science_jubilee.labware.Labware.Well = None)[source]#
Move to a number of wells to take and show images.
- get_well_image(resolution=[1200, 1200], uvc=False, well: science_jubilee.labware.Labware.Well = None)[source]#
Move to a single well to take a picture and return the frame.
- Parameters:
- Returns:
The captured frame
- Return type:
ndarray
- static _get_xyz(well: science_jubilee.labware.Labware.Well = None, location: Tuple[float] = None)[source]#
Get the (x,y,z) position of a well.
- Parameters:
well (
Well
, optional) – The well to fetch position of, defaults to Nonelocation (Tuple[float], optional) – Directly specify an (x,y,z) location, defaults to None
- Raises:
ValueError – Must specify either a well or a location
- Returns:
The well location
- Return type: