> ## Documentation Index
> Fetch the complete documentation index at: https://docs.generalrobotics.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Camera

## Camera

Inherits from: [`Sensor`](/robot-api/reference/base/sensors/sensor/Sensor)

Abstract base class for camera sensors.

Extends the base Sensor class with camera-specific functionality
including intrinsic parameter management and image capture.

Attributes:
settings (CameraSettings): Camera configuration and parameters

### **init**

```python theme={null}
Camera.__init__() -> None
```

Initialize camera with default settings.

<ResponseField name="Returns">
  <ResponseField name="returns" type="None" />
</ResponseField>

### getImage

```python theme={null}
Camera.getImage() -> Image
```

Return the image from camera.

Captures and returns the current image from the camera sensor.

<ResponseField name="Returns">
  <ResponseField name="Image" type="Image">
    The captured image with metadata
  </ResponseField>
</ResponseField>

<ResponseField name="Raises">
  <ParamField query="NotImplementedError" type="">
    Must be implemented by subclasses
  </ParamField>
</ResponseField>

### getData

```python theme={null}
Camera.getData() -> Image
```

Get the image from the camera.

Implements the Sensor interface by delegating to getImage().

<ResponseField name="Returns">
  <ResponseField name="Image" type="Image">
    The captured image from the camera
  </ResponseField>
</ResponseField>

### getCameraIntrinsics

```python theme={null}
Camera.getCameraIntrinsics() -> Optional[tuple[float, float, float, float]]
```

Get the intrinsic parameters for the camera.

Retrieves the camera's intrinsic calibration parameters used for
image projection and rectification.

<ResponseField name="Returns">
  <ResponseField name="returns" type="Optional[tuple[float, float, float, float]]" />
</ResponseField>

### setCameraIntrinsics

```python theme={null}
Camera.setCameraIntrinsics(fx: float, fy: float, cx: float, cy: float) -> None
```

Set the intrinsic parameters for the camera.

Configures the camera's intrinsic calibration parameters for
accurate image projection and rectification.

<ResponseField name="Arguments">
  <ParamField query="fx (float)" type="float" required>
    Focal length in x direction (pixels)
  </ParamField>

  <ParamField query="fy (float)" type="float" required>
    Focal length in y direction (pixels)
  </ParamField>

  <ParamField query="cx (float)" type="float" required>
    Principal point x coordinate (pixels)
  </ParamField>

  <ParamField query="cy (float)" type="float" required>
    Principal point y coordinate (pixels)
  </ParamField>
</ResponseField>

<ResponseField name="Returns">
  <ResponseField name="returns" type="None" />
</ResponseField>

### getCameraSettings

```python theme={null}
Camera.getCameraSettings() -> CameraSettings
```

Get the camera settings.

<ResponseField name="Returns">
  <ResponseField name="CameraSettings" type="CameraSettings">
    Current camera configuration and parameters
  </ResponseField>
</ResponseField>

### setCameraSettings

```python theme={null}
Camera.setCameraSettings(settings: CameraSettings) -> None
```

Set the camera settings.

<ResponseField name="Arguments">
  <ParamField query="settings (CameraSettings)" type="CameraSettings" required>
    New camera configuration to apply
  </ParamField>
</ResponseField>

<ResponseField name="Returns">
  <ResponseField name="returns" type="None" />
</ResponseField>
