rcute_cozmars.camera

class rcute_cozmars.camera.Camera(robot, resolution=(480, 360), frame_rate=3, q_size=1)
resolution

the default is (480, 360)

Resolution cannot be modified after the camera has been opened, otherwise an exception will be thrown

frame_rate

default is 3 FPS

Frame rate cannot be modified after the camera has been opened, otherwise an exception will be thrown

capture(output=None, **options)

Take a photo

参数:
  • output (str/writable, optional) – If it is a file path or an object with write() method, it will be saved to the specified location. Default is None
  • options (optional) –
    • delay - The default is 1 (second), which means the camera is turned on for 1 second before taking pictures. Give the camera more time to warm up and focus, and the image quality may be better
    • standby - Default is False. If set to True, the camera will not close after taking a picture, which is convenient for continuous/time-lapse capture, and delay will defaults to 0 for consequent captures.
    • For other optional parameters, please refer to PiCamera.capture()
返回:

If output is None, a numpy.ndarray of the photo is returned

引发:

RuntimeError – When the camera is transmitting video, it can’t take pictures; and camera can’t transmit video when in standby mode.

closed

Is the data stream closed

get_buffer()

Get output data stream