SensorCamera#
- class ansys.speos.core.sensor.SensorCamera(project, name, description='', metadata=None, sensor_instance=None, default_values=True)#
Bases:
BaseSensorSensor 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:
- project
ansys.speos.core.project.Project Project that will own the feature.
- name
str Name of the feature.
- description
str Description of the feature. By default,
"".- metadata
Optional[Mapping[str,str]] Metadata of the feature. By default,
{}.- sensor_instance
ansys.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_valuesbool
Uses default values when True. By default,
True.
- project
- Parameters:
Overview#
Set the focal length. |
|
Set the imager distance. |
|
Set the f number. |
|
Set the distortion file. |
|
Set the horizontal pixels number corresponding to the camera resolution. |
|
Set the vertical pixels number corresponding to the camera resolution. |
|
Set the width of the sensor. |
|
Set the height of the sensor. |
|
Set mode geometric for the camera sensor. |
|
Set mode photometric for the camera sensor. |
|
Set the position of the sensor. |
|
Save feature: send the local data to the speos server database. |
Property containing camera sensor visualization data. |
|
Property containing the instance of SensorCamera.Photometric used to build 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.VisualDataInstance 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
Method detail#
- SensorCamera.set_focal_length(value=5.0)#
Set the focal length.
- Parameters:
- value
float Distance between the center of the optical system and the focus. (mm) By default,
5.0.
- value
- Returns:
ansys.speos.core.sensor.SensorCameraCamera feature
- SensorCamera.set_imager_distance(value=10)#
Set the imager distance.
- Parameters:
- value
float Imager distance (mm). The imager is located at the focal point. The Imager distance has no impact on the result. By default,
10.
- value
- Returns:
ansys.speos.core.sensor.SensorCameraCamera feature
- SensorCamera.set_f_number(value=20)#
Set the f number.
- Parameters:
- value
float F-number represents the aperture of the front lens. F number has no impact on the result. By default,
20.
- value
- Returns:
ansys.speos.core.sensor.SensorCameraCamera feature
- SensorCamera.set_distortion_file_uri(uri)#
Set the distortion file.
- Parameters:
- uri
str Optical aberration that deforms and bends straight lines. The distortion is expressed in a .OPTDistortion file.
- uri
- Returns:
ansys.speos.core.sensor.SensorCameraCamera feature
- SensorCamera.set_horz_pixel(value=640)#
Set the horizontal pixels number corresponding to the camera resolution.
- Parameters:
- value
int The horizontal pixels number corresponding to the camera resolution. By default,
640.
- value
- Returns:
ansys.speos.core.sensor.SensorCameraCamera feature
- SensorCamera.set_vert_pixel(value=480)#
Set the vertical pixels number corresponding to the camera resolution.
- Parameters:
- value
int The vertical pixels number corresponding to the camera resolution. By default,
480.
- value
- Returns:
ansys.speos.core.sensor.SensorCameraCamera feature
- SensorCamera.set_width(value=5.0)#
Set the width of the sensor.
- Parameters:
- value
float Sensor’s width (mm). By default,
5.0.
- value
- Returns:
ansys.speos.core.sensor.SensorCameraCamera feature
- SensorCamera.set_height(value=5.0)#
Set the height of the sensor.
- Parameters:
- value
float Sensor’s height (mm). By default,
5.0.
- value
- Returns:
ansys.speos.core.sensor.SensorCameraCamera feature
- 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.SensorCameraGeometric 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.PhotometricPhotometric Camera Sensor feature
- SensorCamera.set_axis_system(axis_system=None)#
Set the position of the sensor.
- Parameters:
- axis_system
Optional[List[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].
- axis_system
- Returns:
ansys.speos.core.sensor.SensorCameraCamera Sensor feature
- SensorCamera.commit()#
Save feature: send the local data to the speos server database.
- Returns:
ansys.speos.core.sensor.SensorCameraSensor feature.
Classes#
Mode of camera sensor : Photometric. |