SensorCamera#

class ansys.speos.core.sensor.SensorCamera(project, name, description='', metadata=None, sensor_instance=None, default_parameters=None)#

Bases: BaseSensor

Sensor feature: Camera.

By default, regarding inherent characteristics, a camera with mode photometric is chosen. By default, regarding properties, an axis system is selected to position the sensor, and no layer separation is chosen.

Parameters:
projectansys.speos.core.project.Project

Project that will own the feature.

namestr

Name of the feature.

descriptionstr

Description of the feature. By default, "".

metadataOptional[Mapping[str, str]]

Metadata of the feature. By default, {}.

sensor_instanceansys.api.speos.scene.v2.scene_pb2.Scene.SensorInstance, optional

Sensor instance to provide if the feature does not has to be created from scratch By default, None, means that the feature is created from scratch by default.

default_parametersansys.speos.core.generic.parameters.CameraSensorParameters, optional

If defined the values in the sensor instance will be overwritten by the values of the data class

Parameters:

Overview#

set_mode_geometric

Set mode geometric for the camera sensor.

set_mode_photometric

Set mode photometric for the camera sensor.

commit

Save feature: send the local data to the speos server database.

visual_data

Property containing camera sensor visualization data.

photometric

Property containing the instance of SensorCamera.Photometric used to build the sensor.

focal_length

Focal length of the optical system.

imager_distance

Imager distance.

f_number

F number of the optical system.

distortion_file_uri

Location of the distortion file.

horz_pixel

Horizontal pixels number corresponding to the camera resolution.

vert_pixel

Vertical pixels number corresponding to the camera resolution.

width

Width of the imager.

height

Height of the imager.

axis_system

The position of the sensor.

Import detail#

from ansys.speos.core.sensor import SensorCamera

Property detail#

property SensorCamera.visual_data: ansys.speos.core.generic.visualization_methods._VisualData#

Property containing camera sensor visualization data.

Returns:
BaseSensor.VisualData

Instance of VisualData Class for pyvista.PolyData of feature faces, coordinate_systems.

property SensorCamera.photometric: SensorCamera | None#

Property containing the instance of SensorCamera.Photometric used to build the sensor.

Returns:
Union[ansys.speos.core.sensor.SensorCamera.Photometric, None]

Photometric class instance if it exists

property SensorCamera.focal_length: float#

Focal length of the optical system.

Parameters:
valuefloat

Distance between the center of the optical system and the focus. (mm) By default, 5.0.

Returns:
float

Distance between the center of the optical system and the focus. (mm)

property SensorCamera.imager_distance: SensorCamera#

Imager distance.

Parameters:
valuefloat

Imager distance (mm). The imager is located at the focal point. The Imager distance has no impact on the result. By default, 10.

Returns:
float

Imager distance (mm). The imager is located at the focal point. The Imager distance has no impact on the result.

property SensorCamera.f_number: float#

F number of the optical system.

Parameters:
valuefloat

F-number represents the aperture of the front lens. F number has no impact on the result. By default, 20.

Returns:
float

F-number represents the aperture of the front lens. F number has no impact on the result.

property SensorCamera.distortion_file_uri: str#

Location of the distortion file.

Parameters:
uriUnion[str, Path]

Optical aberration that deforms and bends straight lines. The distortion is expressed in a .OPTDistortion file.

Returns:
str

Optical aberration that deforms and bends straight lines. The distortion is expressed in a .OPTDistortion file.

property SensorCamera.horz_pixel: int#

Horizontal pixels number corresponding to the camera resolution.

Parameters:
valueint

The horizontal pixels number corresponding to the camera resolution. By default, 640.

Returns:
int

The horizontal pixels number corresponding to the camera resolution.

property SensorCamera.vert_pixel: int#

Vertical pixels number corresponding to the camera resolution.

Parameters:
valueint

The vertical pixels number corresponding to the camera resolution. By default, 480.

Returns:
int

The vertical pixels number corresponding to the camera resolution.

property SensorCamera.width: float#

Width of the imager.

Parameters:
valuefloat

Sensor’s width (mm). By default, 5.0.

Returns:
float

Sensor’s width (mm).

property SensorCamera.height: float#

Height of the imager.

Parameters:
valuefloat

Sensor’s height (mm). By default, 5.0

Returns:
float

Sensor’s height (mm). `.

property SensorCamera.axis_system: list[float]#

The position of the sensor.

Parameters:
axis_systemlist[float]

Position of the sensor [Ox Oy Oz Xx Xy Xz Yx Yy Yz Zx Zy Zz]. By default, [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1].

Returns:
list[float]

Position of the sensor [Ox Oy Oz Xx Xy Xz Yx Yy Yz Zx Zy Zz].

Method detail#

SensorCamera.set_mode_geometric()#

Set mode geometric for the camera sensor.

This is a simplified version of the Camera Sensor.

Returns:
ansys.speos.core.sensor.SensorCamera

Geometric Camera feature

SensorCamera.set_mode_photometric()#

Set mode photometric for the camera sensor.

This allows setting every Camera Sensor parameter, including the photometric definition parameters.

Returns:
ansys.speos.core.sensor.SensorCamera.Photometric

Photometric Camera Sensor feature

SensorCamera.commit()#

Save feature: send the local data to the speos server database.

Returns:
ansys.speos.core.sensor.SensorCamera

Sensor feature.

Classes#

Photometric

Mode of camera sensor : Photometric.