Camera¶
Description¶
Module: geocompy.geo.cam
Definitions for the GeoCOM Camera subsystem.
Types¶
GeoComCAM
Definitions¶
- class GeoComCAM(parent: GeoComType)[source]¶
Camera subsystem of the GeoCOM protocol.
This subsystem performs tasks relating to the overview camera and (on Nova instruments) the telescope mounted camera
All functions require a valid GeoCOM Imaging license.
Added in version GeoCOM-VivaTPS.
- Parameters:
- parent: GeoComType¶
The parent protocol instance of this subsystem.
- get_autofocus_position() GeoComResponse[int][source]¶
RPC 23644,
CAM_AF_GetMotorPositionGets the current position of the autofocus motor.
- Returns:
- Params:
int: Autofocus motor position.
- Error codes:
NA: Imaging license not found.
- Return type:
See also
-
get_camera_direction(dist: float, camera: Camera | str =
Camera.OVERVIEW) GeoComResponse[Vector][source]¶ RPC 23611,
CAM_GetCamViewingDirGets the view vector of the overview camera relative to its coordinates. The viewing vector is a 3D vector along the optical axis of the camera, with the given slope distance length.
- Parameters:
- Returns:
- Params:
Coordinate: Viewing vector.
- Error codes:
NA: Imaging license not found.
- Return type:
See also
-
get_camera_fov(camera: Camera | str =
Camera.OVERVIEW, zoom: Zoom | str =Zoom.X1) GeoComResponse[tuple[Angle, Angle]][source]¶ RPC 23619,
CAM_GetCameraFoVGets field of view of the overview camera for a given zoom level.
- Parameters:
- Returns:
- Params:
Angle: Horizontal field of view.
Angle: Vertical field of view.
- Error codes:
IVPARAM: Invalid parameter.NA: Imaging license not found.
- Return type:
-
get_camera_position(camera: Camera | str =
Camera.OVERVIEW) GeoComResponse[Coordinate][source]¶ RPC 23611,
CAM_GetCamPosGets the position of the overview camera, relative to the station coordinates.
- Parameters:
- Returns:
- Params:
Coordinate: Relative coordinates of the camera.
- Error codes:
NA: Imaging license not found.
- Return type:
See also
tmc.get_station,get_camera_direction
-
get_camera_power_status(camera: Camera | str =
Camera.OVERVIEW) GeoComResponse[bool][source]¶ RPC 23636,
CAM_GetCameraPowerSwitchGets the current state of the camera.
- Parameters:
- Returns:
- Params:
bool: Camera is powered and active.
- Error codes:
NA: Imaging license not found.
- Return type:
- get_overview_crosshair() GeoComResponse[tuple[float, float]][source]¶
RPC 23624,
CAM_GetActCameraCenterCalculates the position of the optical crosshair on the overview camera image, at a previously set distance.
- Returns:
- Params:
float: Horizontal position of corsshair on image.
float: Vertical position of corsshair on image.
- Error codes:
NA: Imaging license not found.
- Return type:
See also
-
get_overview_exterior_orientation(calibrated: bool =
True) GeoComResponse[tuple[Coordinate, Angle, Angle, Angle]][source]¶ RPC 23603,
CAM_OVC_ReadExterOrientGets the exterior orientation parameters of the camera.
- Parameters:
- Returns:
- Params:
Coordinate: Camera offset coordinates.
Angle: Yaw deviation.
Angle: Pitch deviation.
Angle: Roll deviation.
- Error codes:
NA: Imaging license not found.
- Return type:
-
get_overview_interior_orientation(calibrated: bool =
True) GeoComResponse[tuple[float, float, float, float]][source]¶ RPC 23602,
CAM_OVC_ReadInterOrientGets the interior orientation parameters of the camera.
- Parameters:
- Returns:
- Params:
float: Horizontal position of principal point [px].
float: Vertical position of principal point [px].
float: Focus length [m].
float: Pixel size [m/px].
- Error codes:
NA: Imaging license not found.
- Return type:
-
get_sensor_size(camera: Camera | str =
Camera.OVERVIEW) GeoComResponse[tuple[float, float]][source]¶ RPC 23668,
CAM_GetChipWindowSizeGets the size of the camera chip.
- Parameters:
- Returns:
- Params:
float: Sensor width.
float: Sensor height.
- Error codes:
NA: Imaging license not found.
- Return type:
- get_telescopic_crosshair() GeoComResponse[tuple[int, int]][source]¶
RPC 23671,
CAM_OAC_GetCrossHairPosGets the position of the crosshair in the actual camera resolution.
- Returns:
- Params:
int: Horizontal position.
int: Vertical position.
- Error codes:
NA: Imaging license not found.
- Return type:
-
get_zoom(camera: Camera | str =
Camera.OVERVIEW) GeoComResponse[Zoom][source]¶ RPC 23609,
CAM_GetZoomFactorSets the current zoom factor on a camera device.
- Parameters:
- Returns:
- Params:
Zoom: Current zoom level.
- Error codes:
NA: Imaging license not found.
- Return type:
-
is_camera_ready(camera: Camera | str =
Camera.OVERVIEW) GeoComResponse[None][source]¶ RPC 23627,
CAM_IsCameraReadyChecks if a camera is ready for use.
- Parameters:
- Returns:
- Error codes:
NA: Imaging license not found.CAM_NOT_READY: Camera is turned off, or currently starting up.
- Return type:
-
set_actual_image_name(name: str, number: int, camera: Camera | str =
Camera.OVERVIEW) GeoComResponse[None][source]¶ RPC 23619,
CAM_SetActualImageNameSets the name and number of the next image to be taken.
- Parameters:
- Returns:
- Error codes:
NA: Imaging license not found.
- Return type:
See also
- set_autofocus_position(position: int) GeoComResponse[None][source]¶
RPC 23645,
CAM_AF_SetMotorPositionSets the autofocus motor to a specific position.
- Parameters:
- Returns:
- Error codes:
NA: Imaging license not found.
- Return type:
See also
-
set_camera_properties(resolution: Resolution | str, compression: Compression | str, jpegquality: JPEGQuality | str, camera: Camera | str =
Camera.OVERVIEW) GeoComResponse[None][source]¶ RPC 23633,
CAM_SetCameraPropertiesSets camera parameters.
- Parameters:
- resolution: Resolution | str¶
Image resolution.
- compression: Compression | str¶
Image compression.
- jpegquality: JPEGQuality | str¶
JPEG image compression quality.
- camera: Camera | str =
Camera.OVERVIEW¶ Camera device, by default OVERVIEW
- Returns:
- Error codes:
NA: Imaging license not found.
- Return type:
See also
- set_focus_to_distance(dist: float) GeoComResponse[None][source]¶
RPC 23652,
CAM_AF_PositFocusMotorToDistSets the autofocus motor to the specified distance.
- Parameters:
- Returns:
- Error codes:
NA: Imaging license not found.
- Return type:
- set_focus_to_infinity() GeoComResponse[None][source]¶
RPC 23677,
CAM_AF_PositFocusMotorToInfinitySets the autofocus motor to focus to infinity.
- Returns:
- Error codes:
NA: Imaging license not found.
- Return type:
- set_focus_to_target() GeoComResponse[None][source]¶
RPC 23662,
CAM_AF_SingleShotAutofocusFocuses current target.
- Returns:
- Error codes:
NA: Imaging license not found.
- Return type:
- set_focus_to_target_contrast(steps: int) GeoComResponse[None][source]¶
RPC 23663,
CAM_AF_FocusContrastAroundCurrentFocuses current target by contrast around target.
- Parameters:
- Returns:
- Error codes:
NA: Imaging license not found.
- Return type:
-
set_overview_distance(dist: float, face1: bool =
True) GeoComResponse[None][source]¶ RPC 23625,
CAM_GetActDistanceSets distance to the current target.
- Parameters:
- Returns:
- Error codes:
NA: Imaging license not found.
- Return type:
See also
-
set_whitebalance(whitebalance: WhiteBalance | str =
WhiteBalance.AUTO, camera: Camera | str =Camera.OVERVIEW) GeoComResponse[None][source]¶ RPC 23626,
CAM_SetWhiteBalanceModeSets the white balance mode for a camera device.
- Parameters:
- Returns:
- Error codes:
NA: Imaging license not found.
- Return type:
See also
-
set_zoom(zoom: Zoom | str, camera: Camera | str =
Camera.OVERVIEW) GeoComResponse[None][source]¶ RPC 23608,
CAM_SetZoomFactorSets the specified zoom factor on a camera device.
-
start_remote_video(fps: int, bitrate: int, camera: Camera | str =
Camera.OVERVIEW) GeoComResponse[None][source]¶ RPC 23675,
CAM_StartRemoteVideoStarts a remote video stream that can be watched when connected wirelessly to the instrument. Networkstrea:
rtsp://192.168.254.3/TSCame.
- stop_remote_video() GeoComResponse[None][source]¶
RPC 23676,
CAM_StopRemoteVideoStops the remote video stream.
- Returns:
- Error codes:
NA: Imaging license not found.
- Return type:
-
switch_camera_power(activate: bool, camera: Camera | str =
Camera.OVERVIEW) GeoComResponse[None][source]¶ RPC 23637,
CAM_SetCameraPowerSwitchSets the state of the camera.
- switch_continuous_autofocus(start: bool) GeoComResponse[None][source]¶
RPC 23669,
CAM_AF_ContinuousAutofocusStarts or stops the continuous autofocus.
- Parameters:
- Returns:
- Error codes:
NA: Imaging license not found.
- Return type:
-
take_image(camera: Camera | str =
Camera.OVERVIEW) GeoComResponse[None][source]¶ RPC 23623,
CAM_TakeImageTakes a new image with the selected camera.
- Parameters:
- Returns:
- Error codes:
CAM_IMAGE_SAVING_ERROR: Error while saving, SD card might not be available.NA: Imaging license not found.
- Return type: