| |
- builtins.object
-
- AsyncTransfer
- DeviceEnumeration
- DeviceInfo
- DeviceParameters
- DeviceStatus
- ImageSet
- ImageTransfer
- LibraryInfo
- Parameter
- ParameterSet
- ParameterSetIterator
- Reconstruct3D
- enum.IntEnum(builtins.int, enum.Enum)
-
- AutoMode
- ColorSource
- DeviceModel
- ImageFormat
- ImageType
- NetworkProtocol
- OperationMode
- ParameterAccessMode
- ParameterType
- ProtocolType
- TargetFrame
- TriggerInputMode
class AsyncTransfer(builtins.object) |
|
AsyncTransfer(device_info_or_address, **kwargs)
Class for asynchronous transfer of image sets.
This class opens a network socket for delivering or receiving image sets. All
operations are performed asynchronously, which means that they do not block.
The class encapsulates ImageTransfer. |
|
Methods defined here:
- __init__(...)
- Creates a new transfer object from a DeviceInfo (see DeviceEnumeration),
or by manually specifying the target address. Additional keyword arguments
can be specified after the first argument:
Kwargs:
service: A port string; default '7681'
(not used for DeviceInfo construction mode),
prot_type: ProtocolType.PROTOCOL_UDP (default) or PROTOCOL_TCP
(not used for DeviceInfo construction mode),
server: Whether the object is a communication server; default False
(not used for DeviceInfo construction mode),
buffer_size: Buffer size for sending / receiving network data;
default 16 MiB,
max_udp_packet_size: Maximum allowed size of a UDP packet when
sending data; default 1472.
auto_reconnect_delay: Seconds between automatic reconnection
attempts after disconnection, or 0 to disable; default 1.
- __reduce__ = __reduce_cython__(...)
- AsyncTransfer.__reduce_cython__(self)
- __setstate__ = __setstate_cython__(...)
- AsyncTransfer.__setstate_cython__(self, __pyx_state)
- collect_received_image_pair(...)
- AsyncTransfer.collect_received_image_pair(self, timeout=-1)
DEPRECATED: Use collect_received_image_set() instead.
- collect_received_image_set(...)
- AsyncTransfer.collect_received_image_set(self, timeout=-1)
Collects the asynchronously received image.
Args:
timeout: The maximum time in seconds for which to wait if no
image set has been received yet.
Returns:
An ImageSet if an image set has been received before the timeout.
If no image set has been received, this method might block or return None.
Otherwise the returned image set is valid until the next call.
If timeout is set to a value < 0, the function will block indefinitely.
If timeout = 0, the function will return immediately, and if timeout is > 0 then
the function will block for the given amount of time in seconds. The received
image set is only valid until the next call of this function.
- disconnect(...)
- AsyncTransfer.disconnect(self)
Terminates the current connection.
If connected to a remote host this connection will be closed.
- get_num_dropped_frames(...)
- AsyncTransfer.get_num_dropped_frames(self)
Returns the number of frames that have been dropped since
connecting to the current remote host.
Dropped frames are caused by dropped packets due to a poor network
connection
- get_remote_address(...)
- AsyncTransfer.get_remote_address(self)
Returns the address of the remote host
Returns:
Remote address or "" if no connection has been established.
- is_connected(...)
- AsyncTransfer.is_connected(self)
Returns true if a remote connection is established
Static methods defined here:
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
|
class AutoMode(enum.IntEnum) |
|
AutoMode(value, names=None, *, module=None, qualname=None, type=None, start=1)
Possible modes of the automatic exposure and gain control. |
|
- Method resolution order:
- AutoMode
- enum.IntEnum
- builtins.int
- enum.Enum
- builtins.object
Data and other attributes defined here:
- AUTO_EXPOSURE_AND_GAIN = <AutoMode.AUTO_EXPOSURE_AND_GAIN: 0>
- AUTO_EXPOSURE_MANUAL_GAIN = <AutoMode.AUTO_EXPOSURE_MANUAL_GAIN: 1>
- MANUAL_EXPOSURE_AUTO_GAIN = <AutoMode.MANUAL_EXPOSURE_AUTO_GAIN: 2>
- MANUAL_EXPOSURE_MANUAL_GAIN = <AutoMode.MANUAL_EXPOSURE_MANUAL_GAIN: 3>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Readonly properties inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
|
class ColorSource(enum.IntEnum) |
|
ColorSource(value, names=None, *, module=None, qualname=None, type=None, start=1)
Source channel selection for color information.
COLOR_THIRD_COLOR is only available on models with a separate third color camera. |
|
- Method resolution order:
- ColorSource
- enum.IntEnum
- builtins.int
- enum.Enum
- builtins.object
Data and other attributes defined here:
- COLOR_AUTO = <ColorSource.COLOR_AUTO: 1>
- COLOR_LEFT = <ColorSource.COLOR_LEFT: 2>
- COLOR_NONE = <ColorSource.COLOR_NONE: 0>
- COLOR_THIRD_COLOR = <ColorSource.COLOR_THIRD_COLOR: 3>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Readonly properties inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
|
class DeviceInfo(builtins.object) |
|
Aggregates information about a discovered device |
|
Methods defined here:
- __reduce__ = __reduce_cython__(...)
- DeviceInfo.__reduce_cython__(self)
- __repr__ = __str__(self, /)
- __setstate__ = __setstate_cython__(...)
- DeviceInfo.__setstate_cython__(self, __pyx_state)
- __str__(self, /)
- Return str(self).
- get_firmware_version(...)
- DeviceInfo.get_firmware_version(self)
Gets the firmware version of the device.
Returns:
Firmware version encoded as string.
A firmware version string typically consists of a major, minor
and patch version, like for example "1.2.34". For special
firmware releases, however, the firmware string might deviate.
- get_ip_address(...)
- DeviceInfo.get_ip_address(self)
Gets the IP address of the device.
Returns:
Device IP address.
- get_model(...)
- DeviceInfo.get_model(self)
Gets the model identifier of the discovered device.
Returns:
The device model.
Currently supported models are SCENESCAN, SCENESCAN_PRO,
SCARLET and RUBY.
- get_network_protocol(...)
- DeviceInfo.get_network_protocol(self)
Gets the network protocol of the device.
Returns:
Device network protocol.
Possible network protocols are PROTOCOL_TCP or PROTOCOL_UDP.
- get_serial_number(...)
- DeviceInfo.get_serial_number(self)
Returns the device serial number
- get_status(...)
- DeviceInfo.get_status(self)
Return the status / health as reported by the device
- is_compatible(...)
- DeviceInfo.is_compatible(self)
Returns true if the device is compatible with this API
version
Static methods defined here:
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
|
class DeviceModel(enum.IntEnum) |
|
DeviceModel(value, names=None, *, module=None, qualname=None, type=None, start=1)
(No extra documentation for visiontransfer::DeviceParameters::DeviceModel) |
|
- Method resolution order:
- DeviceModel
- enum.IntEnum
- builtins.int
- enum.Enum
- builtins.object
Data and other attributes defined here:
- RUBY = <DeviceModel.RUBY: 3>
- SCARLET = <DeviceModel.SCARLET: 2>
- SCENESCAN = <DeviceModel.SCENESCAN: 0>
- SCENESCAN_PRO = <DeviceModel.SCENESCAN_PRO: 1>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Readonly properties inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
|
class DeviceParameters(builtins.object) |
|
DeviceParameters(device_info_or_address, service=u'7683')
Allows for configuration of the parameters of a Nerian stereo device
through a network connection.
Parameters are read and written through a TCP connection. Not all
parameters that are available in the web interface can be configured
through this class.
If parameters are changed, they are only valid until the device is
rebooted or until a parameter change is performed through the web
interface.
Since device parameters should be predictable at all times,
the functions from this class will internally throw a
visiontransfer::TransferException in case of network failure
or device reinitialization during parameter access. Please catch
this exception if you wish to handle such cases. |
|
Methods defined here:
- __init__(...)
- Connects to parameter server of a Nerian stereo device, either by using a
discovered DeviceInfo (see DeviceEnumeration) or an address and optional port.
- __reduce__ = __reduce_cython__(...)
- DeviceParameters.__reduce_cython__(self)
- __setstate__ = __setstate_cython__(...)
- DeviceParameters.__setstate_cython__(self, __pyx_state)
- get_auto_intensity_delta(...)
- DeviceParameters.get_auto_intensity_delta(self)
Gets the minimum intensity change that is required for adjusting
the camera settings.
Intensity values are relatively to the target intensity. A value of
0.01 represents a change of 1%.
- get_auto_max_exposure_time(...)
- DeviceParameters.get_auto_max_exposure_time(self)
Gets the maximum exposure time that can be selected automatically.
Returns:
Maximum exposure time in microseconds.
- get_auto_max_gain(...)
- DeviceParameters.get_auto_max_gain(self)
Gets the maximum gain that can be selected automatically for the left and right cameras.
Returns:
Maximum gain in dB.
- get_auto_max_gain_third_camera(...)
- DeviceParameters.get_auto_max_gain_third_camera(self)
Gets the maximum gain that can be selected automatically for the third, center, color camera (if present in the device).
Returns:
Maximum gain in dB.
- get_auto_mode(...)
- DeviceParameters.get_auto_mode(self)
Gets the current mode of the automatic exposure and gain control.
See: AutoMode
- get_auto_recalibration_enabled(...)
- DeviceParameters.get_auto_recalibration_enabled(self)
Returns true if auto re-calibration is enabled.
- get_auto_roi(...)
- DeviceParameters.get_auto_roi(self)
Gets the configured ROI for automatic exposure and gain control.
Args:
x: Horizontal offset of the ROI from the image center. A value
of 0 means the ROI is horizontally centered.
y: Vertical offset of the ROI from the image center. A value
of 0 means the ROI is vertically centered.
width: Width of the ROI.
height: Height of the ROI.
The ROI must be enabled with setAutoROIEnabled() before it is considered
for exposure or gain control.
- get_auto_roi_enabled(...)
- DeviceParameters.get_auto_roi_enabled(self)
Returns true if an ROI for automatic exposure and gain control is enabled.
- get_auto_skipped_frames(...)
- DeviceParameters.get_auto_skipped_frames(self)
Gets the current interval at which the automatic exposure and gain control is run.
The return value indicates the number of skipped frames between each
adjustment. Typically a value > 0 is desired to give the cameras enough
time to react to the new setting.
- get_auto_target_frame(...)
- DeviceParameters.get_auto_target_frame(self)
Gets the selected target frame for automatic exposure and gain control.
See: TargetFrame
- get_auto_target_intensity(...)
- DeviceParameters.get_auto_target_intensity(self)
Gets the target image intensity of the automatic exposure and gain control for the left and right cameras.
Returns:
The target intensity.
Intensities are measured from 0.0 to 1.0, with 0.0 being the darkest,
and 1.0 the brightest possible pixel intensity.
- get_auto_target_intensity_third_camera(...)
- DeviceParameters.get_auto_target_intensity_third_camera(self)
Gets the target image intensity of the automatic exposure and gain control for the third, center, color camera (if present in the device).
Returns:
The target intensity.
Intensities are measured from 0.0 to 1.0, with 0.0 being the darkest,
and 1.0 the brightest possible pixel intensity.
- get_consistency_check_enabled(...)
- DeviceParameters.get_consistency_check_enabled(self)
Returns true if the consistency check is enabled.
- get_consistency_check_sensitivity(...)
- DeviceParameters.get_consistency_check_sensitivity(self)
Gets the current sensitivity value for the consistency check.
- get_disparity_offset(...)
- DeviceParameters.get_disparity_offset(self)
Gets the current offset of the evaluated disparity range.
- get_gamma(...)
- DeviceParameters.get_gamma(self)
Gets the gamma parameter for the left and right cameras.
Returns:
Current gamma value.
- get_gamma_third_camera(...)
- DeviceParameters.get_gamma_third_camera(self)
Gets the gamma parameter for the third, center, color camera (if present in the device).
Returns:
Current gamma value.
- get_gap_interpolation_enabled(...)
- DeviceParameters.get_gap_interpolation_enabled(self)
Returns true if the texture gap interpolation is enabled.
- get_manual_exposure_time(...)
- DeviceParameters.get_manual_exposure_time(self)
Gets the manually selected exposure time for the left and right cameras.
Returns:
Exposure time in microseconds.
This parameter is only relevant if the auto mode is set to
MANUAL_EXPOSURE_AUTO_GAIN or MANUAL_EXPOSURE_MANUAL_GAIN.
See: setAutoMode
- get_manual_exposure_time_third_camera(...)
- DeviceParameters.get_manual_exposure_time_third_camera(self)
Gets the manually selected exposure time for the third, center, color camera (if present in the device).
Returns:
Exposure time in microseconds.
This parameter is only relevant if the auto mode is set to
MANUAL_EXPOSURE_AUTO_GAIN or MANUAL_EXPOSURE_MANUAL_GAIN.
See: setAutoMode
- get_manual_gain(...)
- DeviceParameters.get_manual_gain(self)
Gets the manually selected gain for the left and right cameras.
Returns:
Gain in dB.
This parameter is only relevant if the auto mode is set to
AUTO_EXPOSURE_MANUAL_GAIN or MANUAL_EXPOSURE_MANUAL_GAIN.
See: setAutoMode
- get_manual_gain_third_camera(...)
- DeviceParameters.get_manual_gain_third_camera(self)
Gets the manually selected gain for the third, center, color camera (if present in the device).
Returns:
Gain in dB.
This parameter is only relevant if the auto mode is set to
AUTO_EXPOSURE_MANUAL_GAIN or MANUAL_EXPOSURE_MANUAL_GAIN.
See: setAutoMode
- get_mask_border_pixels_enabled(...)
- DeviceParameters.get_mask_border_pixels_enabled(self)
Returns true if border pixels are removed from the computed
disparity map.
- get_max_frame_time_difference(...)
- DeviceParameters.get_max_frame_time_difference(self)
Gets the maximum allowed time difference between two corresponding
frames.
Returns:
Time difference in milliseconds. A value of -1 corresponds to automatic
pairing.
- get_noise_reduction_enabled(...)
- DeviceParameters.get_noise_reduction_enabled(self)
Returns true if the noise reduction filter is enabled.
- get_operation_mode(...)
- DeviceParameters.get_operation_mode(self)
Gets the current operation mode.
Returns:
The current operation mode, which can be PASS_THROUGH,
RECTIFY or STEREO_MATCHING.
See: OperationMode
- get_parameter(...)
- DeviceParameters.get_parameter(self, uid)
Returns a Parameter object for the named device parameter. An
exception is raised for invalid or inaccessible parameter names.
The returned object is a detached copy of the internal parameter at invocation
time; it is not updated when the device sends a new value or metadata.
Likewise, any modifications must be requested using set_parameter() or the
various parameter-specific setters.
- get_parameter_set(...)
- DeviceParameters.get_parameter_set(self)
Returns a copy of the currently active ParameterSet (works like dict from
parameter UID to Parameter objects). Contents are not updated in this copy
if parameters are modified by the server. For setting parameters, please
use set_parameter() exclusively.
- get_save_auto_recalibration(...)
- DeviceParameters.get_save_auto_recalibration(self)
Returns true if persistent storage of auto re-calibration results is enabled.
- get_skipped_trigger_count(...)
- DeviceParameters.get_skipped_trigger_count(self)
Returns the number of skipped (unhandled) trigger pulses.
An increasing counter indicates that the trigger frequency is set
too high for the current image size, processing settings, or network
connection bandwidth.
This counter is reset to 0 when setTriggerInputMode is used (or the
"trigger_input" parameter value is set).
Note: This is not informative with cameras that are in free running mode
or use an external trigger that is not emitted from the Nerian stereo device.
- get_speckle_filter_iterations(...)
- DeviceParameters.get_speckle_filter_iterations(self)
Returns true if the speckle filter is enabled.
- get_stereo_matching_edge_sensitivity(...)
- DeviceParameters.get_stereo_matching_edge_sensitivity(self)
Gets the edge sensitivity of the SGM algorithm
- get_stereo_matching_p1_edge(...)
- DeviceParameters.get_stereo_matching_p1_edge(self)
Gets the SGM penalty P1 for small disparity changes at image edges.
- get_stereo_matching_p1_no_edge(...)
- DeviceParameters.get_stereo_matching_p1_no_edge(self)
Gets the SGM penalty P1 for small disparity changes outside image edges.
- get_stereo_matching_p2_edge(...)
- DeviceParameters.get_stereo_matching_p2_edge(self)
Gets the SGM penalty P2 for large disparity changes at image edges.
- get_stereo_matching_p2_no_edge(...)
- DeviceParameters.get_stereo_matching_p2_no_edge(self)
Gets the SGM penalty P2 for large disparity changes at image edges.
- get_subpixel_optimization_roi(...)
- DeviceParameters.get_subpixel_optimization_roi(self)
Gets the configured ROI for the subpixel optimization algorithm.
Args:
x: Horizontal offset of the ROI from the image center. A value
of 0 means the ROI is horizontally centered.
y: Vertical offset of the ROI from the image center. A value
of 0 means the ROI is vertically centered.
width: Width of the ROI.
height: Height of the ROI.
The ROI must be enabled with setSubpixelOptimizationROIEnabled(), otherwise the
optimization algorithm will consider the full images.
- get_subpixel_optimization_roi_enabled(...)
- DeviceParameters.get_subpixel_optimization_roi_enabled(self)
Returns true if an ROI for the subpixel optimization algorithm is enabled
(otherwise complete frames are used for optimization).
- get_texture_filter_enabled(...)
- DeviceParameters.get_texture_filter_enabled(self)
Returns true if the texture filter is enabled.
- get_texture_filter_sensitivity(...)
- DeviceParameters.get_texture_filter_sensitivity(self)
Gets the current sensitivity value for the texture filter.
- get_trigger0_constant(...)
- DeviceParameters.get_trigger0_constant(self)
Returns the constant value that is output when trigger 0 is disabled
- get_trigger0_enabled(...)
- DeviceParameters.get_trigger0_enabled(self)
Returns true if trigger signal 0 is enabled.
- get_trigger0_polarity(...)
- DeviceParameters.get_trigger0_polarity(self)
Returns false if trigger0 polarity is active-high (non-inverted) and
false if polarity is active-low (inverted)
- get_trigger0_pulse_width(...)
- DeviceParameters.get_trigger0_pulse_width(self, pulse=0)
Gets the pulse width of trigger signal 0.
Args:
pulse: For a cyclic pulse width configuration, this is the index
of the pulse for which to return the width. Valid values
are 0 to 7.
Returns:
Pulse width in milliseconds.
- get_trigger1_constant(...)
- DeviceParameters.get_trigger1_constant(self)
Returns the constant value that is output when trigger 1 is disabled
- get_trigger1_enabled(...)
- DeviceParameters.get_trigger1_enabled(self)
Returns true if trigger signal 1 is enabled.
- get_trigger1_offset(...)
- DeviceParameters.get_trigger1_offset(self)
Gets the time offset between trigger signal 1 and signal 0.
Returns:
Offset in milliseconds.
- get_trigger1_polarity(...)
- DeviceParameters.get_trigger1_polarity(self)
Returns false if trigger1 polarity is active-high (non-inverted) and
false if polarity is active-low (inverted)
- get_trigger1_pulse_width(...)
- DeviceParameters.get_trigger1_pulse_width(self, pulse=0)
Gets the pulse width of trigger signal 1.
Args:
pulse: For a cyclic pulse width configuration, this is the index
of the pulse for which to return the width. Valid values
are 0 to 7.
Returns:
Pulse width in milliseconds.
- get_trigger_frequency(...)
- DeviceParameters.get_trigger_frequency(self)
Gets the frequency of the trigger signal.
Returns:
Frequency in Hz.
- get_trigger_input_mode(...)
- DeviceParameters.get_trigger_input_mode(self)
Returns the current trigger input configuration.
- get_uniqueness_check_enabled(...)
- DeviceParameters.get_uniqueness_check_enabled(self)
Returns true if the consistency check is enabled.
- get_uniqueness_check_sensitivity(...)
- DeviceParameters.get_uniqueness_check_sensitivity(self)
Gets the current sensitivity value for the uniqueness check.
- has_parameter(...)
- DeviceParameters.has_parameter(self, uid)
Tests whether a specific named parameter is available for this device.
- reboot(...)
- DeviceParameters.reboot(self)
Remotely triggers a reboot of the device
- save_parameter(...)
- DeviceParameters.save_parameter(self, uid_or_param, blocking=True)
Save the specified parameter to persistent device storage
Args:
uid_or_param: The parameter UID or Parameter to save
blocking: If true, block until the request is accepted
or denied by the device (actual write can take slightly longer).
If denied, this throws a ParameterException. In non-blocking mode,
no such diagnosis is possible.
Note:
Caution - this operation writes to permanent storage and
flushes the file system on the remote device. You should use it
only when required, to avoid increased wear of the flash memory
inside the device.
- save_parameters(...)
- DeviceParameters.save_parameters(self, uid_or_param_list, blocking=True)
Saves all specified UIDs / Parameters to persistent device storage
See save_parameter() for more information.
This saves all UIDs / Parameters in the specified iterable at once.
If any error occurs, none of the parameters are saved.
- set_auto_intensity_delta(...)
- DeviceParameters.set_auto_intensity_delta(self, double delta)
Sets the minimum intensity change that is required for adjusting
the camera settings.
Intensity values are relatively to the target intensity. A value of
0.01 represents a change of 1%.
- set_auto_max_exposure_time(...)
- DeviceParameters.set_auto_max_exposure_time(self, double time)
Sets the maximum exposure time that can be selected automatically.
Args:
time: Maximum exposure time in microseconds.
- set_auto_max_gain(...)
- DeviceParameters.set_auto_max_gain(self, double gain)
Gets the maximum gain that can be selected automatically for the left and right cameras.
Args:
gain: Maximum gain in dB.
- set_auto_max_gain_third_camera(...)
- DeviceParameters.set_auto_max_gain_third_camera(self, double gain)
Gets the maximum gain that can be selected automatically for the third, center, color camera (if present in the device).
Args:
gain: Maximum gain in dB.
- set_auto_mode(...)
- DeviceParameters.set_auto_mode(self, AutoMode mode)
Sets the current mode of the automatic exposure and gain control.
See: AutoMode
- set_auto_recalibration_enabled(...)
- DeviceParameters.set_auto_recalibration_enabled(self, bool enabled)
Enables or disables auto-recalibration.
- set_auto_roi(...)
- DeviceParameters.set_auto_roi(self, int x, int y, int width, int height)
Sets the configured ROI for automatic exposure and gain control.
Args:
x: Horizontal offset of the ROI from the image center. A value
of 0 means the ROI is horizontally centered.
y: Vertical offset of the ROI from the image center. A value
of 0 means the ROI is vertically centered.
width: Width of the ROI.
height: Height of the ROI.
The ROI must be enabled with setAutoROIEnabled() before it is considered
for exposure or gain control.
- set_auto_roi_enabled(...)
- DeviceParameters.set_auto_roi_enabled(self, bool enabled)
Enables or disables an ROI for automatic exposure and gain control.
- set_auto_skipped_frames(...)
- DeviceParameters.set_auto_skipped_frames(self, int skipped)
Sets the current interval at which the automatic exposure and gain control is run.
The return value indicates the number of skipped frames between each
adjustment. Typically a value > 0 is desired to give the cameras enough
time to react to the new setting.
- set_auto_target_frame(...)
- DeviceParameters.set_auto_target_frame(self, TargetFrame target)
Selects the target frame for automatic exposure and gain control.
See: TargetFrame
- set_auto_target_intensity(...)
- DeviceParameters.set_auto_target_intensity(self, double intensity)
Sets the target image intensity of the automatic exposure and gain control for the left and right cameras.
Args:
intensity: The new target intensity.
Intensities are measured from 0.0 to 1.0, with 0.0 being the darkest,
and 1.0 the brightest possible pixel intensity.
- set_auto_target_intensity_third_camera(...)
- DeviceParameters.set_auto_target_intensity_third_camera(self, double intensity)
Sets the target image intensity of the automatic exposure and gain control for the third, center, color camera (if present in the device).
Args:
intensity: The new target intensity.
Intensities are measured from 0.0 to 1.0, with 0.0 being the darkest,
and 1.0 the brightest possible pixel intensity.
- set_consistency_check_enabled(...)
- DeviceParameters.set_consistency_check_enabled(self, bool enabled)
Enables or disables the consistency check.
- set_consistency_check_sensitivity(...)
- DeviceParameters.set_consistency_check_sensitivity(self, int sensitivity)
Sets a new sensitivity value for the consistency check.
This parameter must be in the range of 0 to 15.
- set_disparity_offset(...)
- DeviceParameters.set_disparity_offset(self, int offset)
Sets the offset of the evaluated disparity range.
The offset plus the number of disparities must be smaller or equal to 256.
- set_gamma(...)
- DeviceParameters.set_gamma(self, double gamma)
Sets the gamma parameter for the left and right cameras.
Args:
gamma: New gamma value.
- set_gamma_third_camera(...)
- DeviceParameters.set_gamma_third_camera(self, double gamma)
Sets the gamma parameter for the third, center, color camera (if present in the device).
Args:
gamma: New gamma value.
- set_gap_interpolation_enabled(...)
- DeviceParameters.set_gap_interpolation_enabled(self, bool enabled)
Enables or disables the gap interpolation.
- set_manual_exposure_time(...)
- DeviceParameters.set_manual_exposure_time(self, double time)
Sets the manually selected exposure time for the left and right cameras.
Args:
time: Exposure time in microseconds.
This parameter is only relevant if the auto mode is set to
MANUAL_EXPOSURE_AUTO_GAIN or MANUAL_EXPOSURE_MANUAL_GAIN.
See: setAutoMode
- set_manual_exposure_time_third_camera(...)
- DeviceParameters.set_manual_exposure_time_third_camera(self, double time)
Sets the manually selected exposure time for the third, center, color camera (if present in the device).
Args:
time: Exposure time in microseconds.
This parameter is only relevant if the auto mode is set to
MANUAL_EXPOSURE_AUTO_GAIN or MANUAL_EXPOSURE_MANUAL_GAIN.
See: setAutoMode
- set_manual_gain(...)
- DeviceParameters.set_manual_gain(self, double gain)
Sets the manually selected gain for the left and right cameras.
Args:
gain: Gain in dB.
This parameter is only relevant if the auto mode is set to
AUTO_EXPOSURE_MANUAL_GAIN or MANUAL_EXPOSURE_MANUAL_GAIN.
See: setAutoMode
- set_manual_gain_third_camera(...)
- DeviceParameters.set_manual_gain_third_camera(self, double gain)
Sets the manually selected gain for the third, center, color camera (if present in the device).
Args:
gain: Gain in dB.
This parameter is only relevant if the auto mode is set to
AUTO_EXPOSURE_MANUAL_GAIN or MANUAL_EXPOSURE_MANUAL_GAIN.
See: setAutoMode
- set_mask_border_pixels_enabled(...)
- DeviceParameters.set_mask_border_pixels_enabled(self, bool enabled)
Enables or disables the removal of border pixels from the computed
disparity map.
- set_max_frame_time_difference(...)
- DeviceParameters.set_max_frame_time_difference(self, int diffMs)
Sets the maximum allowed time difference between two corresponding
frames.
Args:
diffMs: Time difference in milliseconds. If automatic pairing is desired,
a value of -1 should be set.
- set_noise_reduction_enabled(...)
- DeviceParameters.set_noise_reduction_enabled(self, bool enabled)
Enables or disables the noise reduction filter.
- set_operation_mode(...)
- DeviceParameters.set_operation_mode(self, OperationMode mode)
Configures the device to a new operation mode.
Args:
mode: The new operation mode, which can be PASS_THROUGH,
RECTIFY or STEREO_MATCHING.
See: OperationMode
- set_parameter(...)
- DeviceParameters.set_parameter(self, uid, value)
Attempts to set a parameter on the device, given a parameter UID string
and a new value, which is typecast automatically. Raises an exception
if the operation failed.
- set_save_auto_recalibration(...)
- DeviceParameters.set_save_auto_recalibration(self, bool save)
Enables or disables persistent storage of auto re-calibration results.
- set_speckle_filter_iterations(...)
- DeviceParameters.set_speckle_filter_iterations(self, int iter)
Enables or disables the speckle filter.
- set_stereo_matching_edge_sensitivity(...)
- DeviceParameters.set_stereo_matching_edge_sensitivity(self, int sensitivity)
Sets the edge sensitivity of the SGM algorithm
This parameter must be in the range of 0 to 255.
- set_stereo_matching_p1_edge(...)
- DeviceParameters.set_stereo_matching_p1_edge(self, int p1)
Sets the SGM penalty P1 for small disparity changes at image edges.
This parameter must be in the range of 0 to 255.
- set_stereo_matching_p1_no_edge(...)
- DeviceParameters.set_stereo_matching_p1_no_edge(self, int p1)
Sets the SGM penalty P1 for small disparity changes outside image edges.
This parameter must be in the range of 0 to 255.
- set_stereo_matching_p2_edge(...)
- DeviceParameters.set_stereo_matching_p2_edge(self, int p2)
Sets the SGM penalty P2 for large disparity changes at image edges.
This parameter must be in the range of 0 to 255.
- set_stereo_matching_p2_no_edge(...)
- DeviceParameters.set_stereo_matching_p2_no_edge(self, int p2)
Sets the SGM penalty P2 for large disparity changes at image edges.
This parameter must be in the range of 0 to 255.
- set_subpixel_optimization_roi(...)
- DeviceParameters.set_subpixel_optimization_roi(self, int x, int y, int width, int height)
Sets the configured ROI for the subpixel optimization algorithm.
Args:
x: Horizontal offset of the ROI from the image center. A value
of 0 means the ROI is horizontally centered.
y: Vertical offset of the ROI from the image center. A value
of 0 means the ROI is vertically centered.
width: Width of the ROI.
height: Height of the ROI.
The ROI must be enabled with setSubpixelOptimizationROIEnabled(), otherwise the
optimization algorithm will consider the full images.
- set_subpixel_optimization_roi_enabled(...)
- DeviceParameters.set_subpixel_optimization_roi_enabled(self, bool enabled)
Enables or disables an ROI for the subpixel optimization algorithm.
(if disabled, complete frames are used for optimization).
- set_texture_filter_enabled(...)
- DeviceParameters.set_texture_filter_enabled(self, bool enabled)
Enables or disables the texture filter.
- set_texture_filter_sensitivity(...)
- DeviceParameters.set_texture_filter_sensitivity(self, int sensitivity)
Sets a new sensitivity value for the texture filter.
This parameter must be in the range of 0 to 63.
- set_trigger0_constant(...)
- DeviceParameters.set_trigger0_constant(self, bool on)
Sets the constant value that is output when trigger 0 is disabled
- set_trigger0_enabled(...)
- DeviceParameters.set_trigger0_enabled(self, bool enabled)
Enables or disables trigger signal 0.
- set_trigger0_polarity(...)
- DeviceParameters.set_trigger0_polarity(self, bool invert)
Sets the polarity for trigger0. If invert is false, the polarity
is active-high (non-inverted). Otherwise the polarity is active-low (inverted).
- set_trigger0_pulse_width(...)
- DeviceParameters.set_trigger0_pulse_width(self, double width, int pulse=0)
Sets the pulse width of trigger signal 0.
Args:
width: Pulse width in milliseconds.
pulse: For a cyclic pulse width configuration, this is the index
of the pulse for which to set the width. Valid values
are 0 to 7.
- set_trigger1_constant(...)
- DeviceParameters.set_trigger1_constant(self, bool on)
Sets the constant value that is output when trigger 1 is disabled
- set_trigger1_enabled(...)
- DeviceParameters.set_trigger1_enabled(self, bool enabled)
Enables or disables trigger signal 1.
- set_trigger1_offset(...)
- DeviceParameters.set_trigger1_offset(self, double offset)
Sets the time offset between trigger signal 1 and signal 0.
Args:
offset: Offset in milliseconds.
- set_trigger1_polarity(...)
- DeviceParameters.set_trigger1_polarity(self, bool invert)
Sets the polarity for trigger1. If invert is false, the polarity
is active-high (non-inverted). Otherwise the polarity is active-low (inverted).
- set_trigger1_pulse_width(...)
- DeviceParameters.set_trigger1_pulse_width(self, double width, int pulse=0)
Sets the pulse width of trigger signal 1.
Args:
width: Pulse width in milliseconds.
pulse: For a cyclic pulse width configuration, this is the index
of the pulse for which to set the width. Valid values
are 0 to 7.
- set_trigger_frequency(...)
- DeviceParameters.set_trigger_frequency(self, double freq)
Sets the frequency of the trigger signal.
Args:
freq: Frequency in Hz.
- set_trigger_input_mode(...)
- DeviceParameters.set_trigger_input_mode(self, TriggerInputMode mode)
Requests to change the trigger input configuration.
Args:
mode: The desired input mode.
External hardware trigger input (EXTERNAL) is not available on all devices.
- set_uniqueness_check_enabled(...)
- DeviceParameters.set_uniqueness_check_enabled(self, bool enabled)
Enables or disables the uniqueness check.
- set_uniqueness_check_sensitivity(...)
- DeviceParameters.set_uniqueness_check_sensitivity(self, int sensitivity)
Sets a new sensitivity value for the uniqueness check.
This parameter must be in the range of 0 to 256.
- trigger_now(...)
- DeviceParameters.trigger_now(self)
Emit a software trigger event to perform a single acquisition.
This only has effect when the External Trigger mode is set to Software.
Static methods defined here:
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
|
class ImageFormat(enum.IntEnum) |
|
ImageFormat(value, names=None, *, module=None, qualname=None, type=None, start=1)
Image formats that can be transferred. |
|
- Method resolution order:
- ImageFormat
- enum.IntEnum
- builtins.int
- enum.Enum
- builtins.object
Data and other attributes defined here:
- FORMAT_12_BIT_MONO = <ImageFormat.FORMAT_12_BIT_MONO: 2>
- FORMAT_8_BIT_MONO = <ImageFormat.FORMAT_8_BIT_MONO: 0>
- FORMAT_8_BIT_RGB = <ImageFormat.FORMAT_8_BIT_RGB: 1>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Readonly properties inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
|
class ImageSet(builtins.object) |
|
A set of one to three images, but usually two (the left camera image
and the disparity map). One- and three-image modes can be enabled
in the device configuration interface.
For backwards compatibility, for sets of at least two images the image at
index 0 is always the left camera image, while the one at index 1 is either the
disparity map if in disparity processing mode, or the right image otherwise.
All images must be of equal width and height, but are allowed to have
different pixel formats. Please note that the class does not manage the
pixel data but only keeps pointers. You thus need to ensure that the pixel
data remains valid for as long as this object persists. |
|
Methods defined here:
- __reduce__(...)
- ImageSet.__reduce__(self)
- __repr__ = __str__(self, /)
- __str__(self, /)
- Return str(self).
- copy(...)
- ImageSet.copy(self)
Create a full copy of the ImageSet. All its data is managed by Python (i.e.
no deallocation attempts by the C++ API will ever take place on this clone).
- get_bytes_per_pixel(...)
- ImageSet.get_bytes_per_pixel(self, what)
Returns the number of bytes that are required to store one
image pixel with the given pixel format.
- get_disparity_range(...)
- ImageSet.get_disparity_range(self)
Gets the value range for the disparity map contained in this
image set. If the image set does not contain any disparity data
then the disparity range is undefined.
Returns:
minimum, maximum: The minimum and maximum disparity in the image set.
- get_exposure_time(...)
- ImageSet.get_exposure_time(self)
Gets the exposure time in microseconds that was used for
capturing the image set.
Returns:
Exposure time in microseconds
- get_height(...)
- ImageSet.get_height(self)
Returns the height of each image.
- get_index_of(...)
- ImageSet.get_index_of(self, what, throw_if_not_found=False)
Returns the index of a specific image type
Args:
what: ImageType of the desired channel.
throwIfNotFound: Throw a runtime error instead of returning -1.
Returns:
Returns the index of the specified type, or -1 if not found.
- get_last_sync_pulse(...)
- ImageSet.get_last_sync_pulse(self)
Gets the timestamp of the last received sync pulse.
Returns:
sec, usec: A tuple representing the time stamp: the integer seconds, and the
fractional seconds part in microseconds.
- get_number_of_images(...)
- ImageSet.get_number_of_images(self)
Returns the number of images in this set
- get_pixel_data(...)
- ImageSet.get_pixel_data(self, what, force8bit=False, do_copy=True)
Obtain a numpy array containing the image data for a channel.
Args:
what: The ImageType or image index to retrieve.
force8bit: optional flag, causes rescaling to 0..255 in case of 12-bit images (dividing by 16).
do_copy: copy the final array view (default True; primarily for internal use, disable with caution)
Returns:
The image data as a copied numpy array; two-dimensional for monochrome images, three-dimensional for RGB.
- get_pixel_data_raw(...)
- ImageSet.get_pixel_data_raw(self, what)
Return a flat uint8 view of the image data of the specified channel (primarily for internal use).
- get_pixel_format(...)
- ImageSet.get_pixel_format(self, what)
Returns the pixel format for the given image.
Args:
what: ImageType of the desired channel.
This function will throw an exception when the ImageType
is not present in this set (use hasImageType(what) to check).
- get_qmatrix(...)
- ImageSet.get_qmatrix(self)
Returns a pointer to the disparity-to-depth mapping matrix q.
- get_row_stride(...)
- ImageSet.get_row_stride(self, what)
Returns the row stride for the pixel data of one image.
Args:
what: ImageType of the desired channel.
This function will throw an exception when the ImageType
is not present in this set (use hasImageType(what) to check).
- get_sequence_number(...)
- ImageSet.get_sequence_number(self)
Returns the sequence number for this image set.
- get_subpixel_factor(...)
- ImageSet.get_subpixel_factor(self)
Gets the subpixel factor for this image set.
- get_timestamp(...)
- ImageSet.get_timestamp(self)
Returns the time at which this image set has been captured.
Returns:
sec, usec: A tuple representing the time stamp: the integer seconds, and the
fractional seconds part in microseconds.
- get_width(...)
- ImageSet.get_width(self)
Returns the width of each image.
- has_image_type(...)
- ImageSet.has_image_type(self, what)
Returns whether a left camera image is included in the enabled data
- is_image_disparity_pair(...)
- ImageSet.is_image_disparity_pair(self)
(No extra documentation for visiontransfer::ImageSet::isImageDisparityPair)
- set_disparity_range(...)
- ImageSet.set_disparity_range(self, minimum, maximum)
Sets the value range for the disparity map contained in this
image set.
Args:
minimum: Minimum disparity value.
maximum: Maximum disparity value.
- set_exposure_time(...)
- ImageSet.set_exposure_time(self, time_microsec)
Sets the exposure time that was used for capturing the image set
Args:
timeMicrosec: Exposure time measured in microseconds
- set_height(...)
- ImageSet.set_height(self, height)
Sets a new width for both images.
- set_index_of(...)
- ImageSet.set_index_of(self, what, idx)
Assign an image index to a specified ImageType, -1 to disable
Args:
what: The ImageType to assign a new image index to.
idx: The index of the specified ImageType inside the data of
this ImageSet (-1 to disable).
- set_last_sync_pulse(...)
- ImageSet.set_last_sync_pulse(self, sec, usec)
Sets the timestamp of the last received sync pulse
Args:
seconds: The time stamp with a resolution of one second.
microsec: The fractional seconds part of the time stamp with
a resolution of 1 microsecond.
- set_number_of_images(...)
- ImageSet.set_number_of_images(self, number)
Sets the number of valid images in this set
- set_pixel_data(...)
- ImageSet.set_pixel_data(self, image_number, ndarray pixel_data)
Sets the pixel data for the given image.
Args:
imageNumber: Number of the image for which to set the
pixel data (0 ... getNumberOfImages()-1).
pixelData: The pixel data that shall be set.
- set_pixel_format(...)
- ImageSet.set_pixel_format(self, image_number, image_format)
Sets the pixel format for the given image.
Args:
imageNumber: Number of the image for which to set the
pixel format (0 ... getNumberOfImages()-1).
format: The pixel format that shall be set.
- set_qmatrix(...)
- ImageSet.set_qmatrix(self, ndarray q)
Sets the pointer to the disparity-to-depth mapping matrix q.
No data is copied. The data which q is pointing to has to remain valid
for as long as this object exists.
- set_row_stride(...)
- ImageSet.set_row_stride(self, image_number, row_stride)
Sets a new row stride for the pixel data of one image.
Args:
imageNumber: Number of the image for which to set the
row stride (0 ... getNumberOfImages()-1).
stride: The row stride that shall be set.
- set_sequence_number(...)
- ImageSet.set_sequence_number(self, num)
Sets the sequence number for this image set.
- set_subpixel_factor(...)
- ImageSet.set_subpixel_factor(self, subpixel_factor)
Sets the subpixel factor for this image set.
- set_timestamp(...)
- ImageSet.set_timestamp(self, sec, usec)
Sets the time at which this image set has been captured.
Args:
seconds: The time stamp with a resolution of one second.
microsec: The fractional seconds part of the time stamp with
a resolution of 1 microsecond.
- set_width(...)
- ImageSet.set_width(self, width)
Sets a new width for both images.
- write_pgm_file(...)
- ImageSet.write_pgm_file(self, image_number, filename)
Writes one image of the set to a PGM or PPM file.
Args:
imageNumber: The number of the image that shall be written.
File: name of the PGM or PPM file that shall be created.
Static methods defined here:
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
Data and other attributes defined here:
- __pyx_vtable__ = <capsule object NULL>
|
class ImageTransfer(builtins.object) |
|
ImageTransfer(device_info_or_address, **kwargs)
Class for synchronous transfer of image sets.
This class opens a network socket for delivering or receiving image sets. All
operations are performed synchronously, which means that they might block.
The class encapsulates ImageProtocol.
This class is thread safe for as long as sending and receiving data
each has its dedicated thread.
Note for Python version: for best performance, the use of AsyncTransfer
is recommended for all regular desktop systems. Using ImageTransfer
directly is only advised in use cases where an implicit background
CPU thread is not acceptable. |
|
Methods defined here:
- __init__(...)
- Creates a new transfer object from a DeviceInfo (see DeviceEnumeration),
or by manually specifying the target address. Additional keyword arguments
can be specified after the first argument:
Kwargs:
service: A port string; default '7681'
(not used for DeviceInfo construction mode),
prot_type: ProtocolType.PROTOCOL_UDP (default) or PROTOCOL_TCP
(not used for DeviceInfo construction mode),
server: Whether the object is a communication server; default False
(not used for DeviceInfo construction mode),
buffer_size: Buffer size for sending / receiving network data;
default 16 MiB,
max_udp_packet_size: Maximum allowed size of a UDP packet when
sending data; default 1472.
auto_reconnect_delay: Seconds between automatic reconnection
attempts after disconnection, or 0 to disable; default 1.
- __reduce__ = __reduce_cython__(...)
- ImageTransfer.__reduce_cython__(self)
- __setstate__ = __setstate_cython__(...)
- ImageTransfer.__setstate_cython__(self, __pyx_state)
- disconnect(...)
- ImageTransfer.disconnect(self)
Terminates the current connection.
If connected to a remote host this connection will be closed.
- get_num_dropped_frames(...)
- ImageTransfer.get_num_dropped_frames(self)
Returns the number of frames that have been dropped since
connecting to the current remote host.
Dropped frames are caused by dropped packets due to a poor network
connection
- get_remote_address(...)
- ImageTransfer.get_remote_address(self)
Returns the address of the remote host
Returns:
Remote address or "" if no connection has been established.
- is_connected(...)
- ImageTransfer.is_connected(self)
Returns true if a remote connection is established (and not temporarily disconnected).
For event-driven signaling of this state, see also setConnectionStateChangeCallback()
- receive(...)
- ImageTransfer.receive(self, timeout=-1, poll_delay=0.001)
Python: polling wrapper for receive_image_set.
Args:
timeout: The timeout in seconds before returning None unless an
image arrives. A non-positive timeout means to wait forever.
poll_delay: The sleep delay to enforce after each polling
attempt.
Returns:
An ImageSet if an image set has been received before the timeout.
None otherwise.
On desktop systems, use AsyncTransfer instead for best performance.
- receive_image_pair(...)
- ImageTransfer.receive_image_pair(self)
DEPRECATED: Use receive_image_set() instead.
- receive_image_set(...)
- ImageTransfer.receive_image_set(self)
Waits for and receives a new image set.
Returns:
Returns an ImageSet a new image set has been received. Otherwise
None.
The received image set is only valid until the next call of receive_image_set.
The method will not block indefinitely, but return after a short timeout.
You can use receive() as a Python library convenience wrapper
for more efficient repolling with custom delay and number of attempts.
Static methods defined here:
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
|
class ImageType(enum.IntEnum) |
|
ImageType(value, names=None, *, module=None, qualname=None, type=None, start=1)
Supported image types |
|
- Method resolution order:
- ImageType
- enum.IntEnum
- builtins.int
- enum.Enum
- builtins.object
Data and other attributes defined here:
- IMAGE_COLOR = <ImageType.IMAGE_COLOR: 4>
- IMAGE_DISPARITY = <ImageType.IMAGE_DISPARITY: 2>
- IMAGE_LEFT = <ImageType.IMAGE_LEFT: 1>
- IMAGE_RIGHT = <ImageType.IMAGE_RIGHT: 3>
- IMAGE_UNDEFINED = <ImageType.IMAGE_UNDEFINED: 0>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Readonly properties inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
|
class OperationMode(enum.IntEnum) |
|
OperationMode(value, names=None, *, module=None, qualname=None, type=None, start=1)
Operation modes supported by Nerian stereo devices. |
|
- Method resolution order:
- OperationMode
- enum.IntEnum
- builtins.int
- enum.Enum
- builtins.object
Data and other attributes defined here:
- PASS_THROUGH = <OperationMode.PASS_THROUGH: 0>
- RECTIFY = <OperationMode.RECTIFY: 1>
- STEREO_MATCHING = <OperationMode.STEREO_MATCHING: 2>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Readonly properties inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
|
class Parameter(builtins.object) |
|
(No extra documentation for visiontransfer::param::Parameter) |
|
Methods defined here:
- __reduce__ = __reduce_cython__(...)
- Parameter.__reduce_cython__(self)
- __setstate__ = __setstate_cython__(...)
- Parameter.__setstate_cython__(self, __pyx_state)
- get_access_for_api(...)
- Parameter.get_access_for_api(self)
Return the access rights to this parameter for the C++/Python APIs.
- get_access_for_config(...)
- Parameter.get_access_for_config(self)
Return the access rights to this parameter for the web interface.
- get_category_name(...)
- Parameter.get_category_name(self)
Return the category name the parameter is associated with,
within the overarching module.
- get_current(...)
- Parameter.get_current(self)
Return the current value of the parameter (or an existing default
value if no current value is set). For tensors, use get_tensor_data
and get_tensor_shape instead.
- get_default(...)
- Parameter.get_default(self)
Return the default value of the parameter (platform-specific).
For tensors, use get_tensor_default_data and get_tensor_shape instead.
- get_description(...)
- Parameter.get_description(self)
Return the custom documentation string, or "" if undefined.
- get_increment(...)
- Parameter.get_increment(self)
Return the increment for an increment-restricted parameter (the
increment is constant and relative to its minimum value if a minimum
is set, or to zero if not).
- get_max(...)
- Parameter.get_max(self)
Return the maximum valid value for a range-restricted parameter.
- get_min(...)
- Parameter.get_min(self)
Return the minimum valid value for a range-restricted parameter.
- get_module_name(...)
- Parameter.get_module_name(self)
Return the module name the parameter is associated with,
i.e. the overall branch of processing, such as "Input".
- get_name(...)
- Parameter.get_name(self)
Return the human-readable name
- get_option_descriptions(...)
- Parameter.get_option_descriptions(self)
Return the list of descriptions for each option of
an enum-like parameter.
- get_options(...)
- Parameter.get_options(self)
Return the list of valid options for an enum-like parameter.
- get_tensor_data(...)
- Parameter.get_tensor_data(self)
Return the current tensor data (as a flat list, no shape).
- get_tensor_default_data(...)
- Parameter.get_tensor_default_data(self)
Return the default tensor data (as a flat list, no shape).
- get_tensor_dimension(...)
- Parameter.get_tensor_dimension(self)
Return the dimension of the tensor, e.g. 1 for vectors,
2 for matrices etc.
- get_tensor_num_elements(...)
- Parameter.get_tensor_num_elements(self)
Return the total number of elements, corresponding
to the size of its data.
- get_tensor_shape(...)
- Parameter.get_tensor_shape(self)
Return the shape of the tensor, row-like-first
(i.e. compatible with numpy or pytorch)
- get_type(...)
- Parameter.get_type(self)
Return the ParameterType (see there); i.e. one of
several scalar types, tensor, or command.
- get_uid(...)
- Parameter.get_uid(self)
Returns the unique ID (UID) string
- get_unit(...)
- Parameter.get_unit(self)
Return the unit, or "" if undefined.
- has_current(...)
- Parameter.has_current(self)
Return True if this parameter has a set current value
in addition to its default.
- has_default(...)
- Parameter.has_default(self)
Return True if this parameter has a set default value.
- has_increment(...)
- Parameter.has_increment(self)
Return True if the parameter is subject to a value increment.
- has_options(...)
- Parameter.has_options(self)
Return True if this is an enum-like parameter
(cf. get_options, get_option_descriptions).
- has_range(...)
- Parameter.has_range(self)
Return True if the parameter is range-restricted (cf. get_min, get_max).
- is_command(...)
- Parameter.is_command(self)
Return True if the parameter is a command (i.e. writing it
generates an event, and reading is not informative).
- is_modified(...)
- Parameter.is_modified(self)
Return True if the server reports unsaved changes for the parameter.
- is_readonly(...)
- Parameter.is_readonly(self)
Return whether access rights disallow modifying the parameter.
- is_scalar(...)
- Parameter.is_scalar(self)
Return True if the parameter is scalar (int, double, string, bool)
and not a tensor.
- is_tensor(...)
- Parameter.is_tensor(self)
Return True if the parameter is a tensor.
- is_writable(...)
- Parameter.is_writable(self)
Return whether access rights allow for modifying the parameter.
Static methods defined here:
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
|
class ParameterSet(builtins.object) |
|
ParameterSet is a wrapper for a dict from UIDs to Parameters
Supports for, in, len, [] like a normal dict.
Obtained ParameterSet in the API are disconnected copies of the
server-reported state; they are not updated automatically.
Parameters can not be modified here, use DeviceParameters.set_parameter (etc.) |
|
Methods defined here:
- __contains__(self, key, /)
- Return key in self.
- __getitem__(self, key, /)
- Return self[key].
- __iter__(self, /)
- Implement iter(self).
- __len__(self, /)
- Return len(self).
- __reduce__ = __reduce_cython__(...)
- ParameterSet.__reduce_cython__(self)
- __setstate__ = __setstate_cython__(...)
- ParameterSet.__setstate_cython__(self, __pyx_state)
- get(...)
- ParameterSet.get(self, uid)
(No extra documentation for visiontransfer::param::ParameterSet::get)
Static methods defined here:
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
|
class ParameterType(enum.IntEnum) |
|
ParameterType(value, names=None, *, module=None, qualname=None, type=None, start=1)
(No extra documentation for visiontransfer::param::ParameterValue::ParameterType) |
|
- Method resolution order:
- ParameterType
- enum.IntEnum
- builtins.int
- enum.Enum
- builtins.object
Data and other attributes defined here:
- TYPE_BOOL = <ParameterType.TYPE_BOOL: 2>
- TYPE_COMMAND = <ParameterType.TYPE_COMMAND: 6>
- TYPE_DOUBLE = <ParameterType.TYPE_DOUBLE: 1>
- TYPE_INT = <ParameterType.TYPE_INT: 0>
- TYPE_SAFESTRING = <ParameterType.TYPE_SAFESTRING: 4>
- TYPE_STRING = <ParameterType.TYPE_STRING: 3>
- TYPE_TENSOR = <ParameterType.TYPE_TENSOR: 5>
- TYPE_UNDEFINED = <ParameterType.TYPE_UNDEFINED: 7>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Readonly properties inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
|
class ProtocolType(enum.IntEnum) |
|
ProtocolType(value, names=None, *, module=None, qualname=None, type=None, start=1)
(No extra documentation for visiontransfer::ImageProtocol::ProtocolType) |
|
- Method resolution order:
- ProtocolType
- enum.IntEnum
- builtins.int
- enum.Enum
- builtins.object
Data and other attributes defined here:
- PROTOCOL_TCP = <ProtocolType.PROTOCOL_TCP: 0>
- PROTOCOL_UDP = <ProtocolType.PROTOCOL_UDP: 1>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Readonly properties inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
|
class Reconstruct3D(builtins.object) |
|
Transforms a disparity map into a set of 3D points.
Use this class for reconstructing the 3D location for each valid
point in a disparity map. |
|
Methods defined here:
- __reduce__ = __reduce_cython__(...)
- Reconstruct3D.__reduce_cython__(self)
- __setstate__ = __setstate_cython__(...)
- Reconstruct3D.__setstate_cython__(self, __pyx_state)
- create_open3d_pointcloud(...)
- Reconstruct3D.create_open3d_pointcloud(self, ImageSet image_set, min_disparity=1, max_z=0, color_source=ColorSource.COLOR_AUTO)
Convenience wrapper to directly return an Open3D point cloud for an image set.
Args:
image_set: Image set containing the disparity map.
min_disparity: The minimum disparity with 4-bit subpixel resolution.
max_z: (Python specific) Filter the point cloud data to only return
points closer than specified value. A non-positive value means
no filtering (default).
color_source: The source of color information for the point cloud
(see ColorSource; default ColorSource.COLOR_AUTO).
Returns:
An open3d.geometry.PointCloud for the (filtered) coordinates from the ImageSet.
Contains color information unless the ImageSet was disparity-only.
- create_open3d_rgbd_image(...)
- Reconstruct3D.create_open3d_rgbd_image(self, ImageSet image_set, min_disparity=1, depth_trunc=3.0, depth_scale=1.0, color_source=ColorSource.COLOR_AUTO, convert_rgb_to_intensity=True, convert_intensity_to_rgb=False)
Convenience wrapper to directly return an Open3D RGBD image for an ImageSet.
Raises a RuntimeError when called with a disparity-only image set.
Args:
image_set: Image set containing the disparity map.
min_disparity: The minimum disparity with 4-bit subpixel resolution.
depth_trunc: (Open3D argument, relayed) Filter the depth channel to
zero-clamp points more distant than the specified value (default 3.0).
depth_scale: (Open3D argument, relayed) Scaling, before trunc (our default 1.0)
color_source: The source of color information for the RGBD image
(see ColorSource; default ColorSource.COLOR_AUTO).
convert_rgb_to_intensity: (Open3D argument, relayed) Whether to convert
RGB image to intensity image.
convert_intensity_to_rgb: Expand grayscale images to RGB (e.g. for point
cloud color data)
Returns:
An open3d.geometry.RGBDImage for the image set.
- create_point_map(...)
- Reconstruct3D.create_point_map(self, ImageSet image_set, min_disparity=1, max_z=0)
Reconstructs the 3D location of each pixel using the disparity map
and metadata of the given image set.
Args:
image_set: Image set containing the disparity map.
min_disparity: The minimum disparity with 4-bit subpixel resolution.
max_z: (Python specific) Filter the numpy array to only return
points closer than specified value. A non-positive value means
no filtering (default).
Returns:
A numpy array of size [:,3] containing the 3D points corresponding to the disparity map.
Please refer to the C++ API docs for further details.
- create_point_map_and_color_map(...)
- Reconstruct3D.create_point_map_and_color_map(self, ImageSet image_set, min_disparity=1, max_z=0, color_source=ColorSource.COLOR_AUTO)
Reconstructs the 3D location of each pixel using the disparity map
and metadata of the given image set, alongside their colors.
Args:
image_set: Image set containing the disparity map.
min_disparity: The minimum disparity with 4-bit subpixel resolution.
max_z: (Python specific) Filter the numpy array to only return
points closer than specified value. A non-positive value means
no filtering (default).
color_source: The source of color information for the color map
(see ColorSource; default ColorSource.COLOR_AUTO).
Returns:
Two numpy arrays of identical size [:,3], the first containing the 3D points corresponding
to the disparity map, and the second one their colors as float RGB triplets (or None if
the ImageSet is disparity-only).
- create_point_map_from_disparity_data(...)
- Reconstruct3D.create_point_map_from_disparity_data(self, disp_map_data, width, height, row_stride, q, min_disparity=1, subpixel_factor=16, max_z=0, max_disparity=0xFFF)
Reconstructs the 3D location of each pixel in the given disparity map,
with custom parameters.
Args:
disp_map_data: Data of the disparity map (unsigned short array). The
disparity map is assumed to have a N-bit subpixel resolution.
This means that each value needs to be divided by the subpixel factor
to receive the true disparity.
width, height: Disparity map dimensions
row_stride: Row stride (i.e. distance between two rows in bytes)
of the disparity map.
q: Disparity-to-depth mapping matrix of size 4x4. The matrix is
stored in a row-wise alignment. Obtain this matrix from your
camera calibration data.
minDisparity: The minimum disparity, again with N-bit subpixel
resolution. Lower disparities will be clamped to this value
before computing the 3D location (default 1).
subpixel_factor: Subpixel division factor for disparity value
(default 16)
max_z: (Python specific) Filter the numpy array to only return
points closer than specified value. A non-positive value means
no filtering (default).
max_disparity: The maximum value that occurs in the disparity map. Any value
greater or equal will be marked as invalid.
Returns:
A numpy array of size [:,3] containing the 3D points corresponding to the disparity map.
Please refer to the C++ API docs for further details.
- create_z_map(...)
- Reconstruct3D.create_z_map(self, ImageSet image_set, min_disparity=1, max_disparity=0xfff)
Converts the disparity in an image set to a depth map
Args:
image_set: Image set containing the disparity map.
min_disparity: The minimum disparity with N-bit subpixel resolution.
max_disparity: The maximum value that occurs in the disparity map.
Any value greater or equal will be marked as invalid.
The output map will have a size of exactly width*height float values. Each
value represents the depth at the given pixel coordinate in meters.
This method is closely related to create_point_map(). It only computes the
Z coordinates, whereas create_point_map() also computes X and Y coordinates
for each image point.
If the minimum disparity is set to 0, points with a disparity of 0 or an invalid
disparity will receive a z coordinate of +inf. If a larger minimum disparity is given,
points with a lower disparity will be at a fix depth that corresponds to this
disparity.
The returned map is valid until the next call of create_z_map(), create_point_map()
or write_ply_file().
Please refer to the C++ API docs for further details.
- project_single_point(...)
- Reconstruct3D.project_single_point(self, point_x, point_y, disparity, q, subpix_factor)
PYTHON NOTE: Returns a tuple (pointX, pointY, pointZ). Please ignore those C++ reference arguments.
Reconstructs the 3D location of one individual point.
Args:
imageX: X component of the image location.
imageY: Y component of the image location.
disparity: Value of the disparity map at the image location.
It is assumed that the lower N bits are the fractional component.
This means that each value needs to be divided by a subpixel factor to
receive the true disparity.
q: Disparity-to-depth mapping matrix of size 4x4. The matrix is
stored in a row-wise alignment. Obtain this matrix from your
camera calibration data.
pointX: Destination variable for the 3D point X component.
pointY: Destination variable for the 3D point Y component.
pointZ: Destination variable for the 3D point Z component.
subpixelFactor: Subpixel division factor for disparity value.
This method projects a single point from a disparity map to a
3D location. If the 3D coordinates of multiple points are of interest,
createPointMap() should be used for best performance.
- write_ply_file(...)
- Reconstruct3D.write_ply_file(self, filename, ImageSet image_set, double max_z=sys.float_info.max, bool binary=False)
Projects the given disparity map to 3D points and exports the result to
a PLY file.
Args:
file: The name for the output file.
imageSet: Image set containing camera image and disparity map.
maxZ: Maximum allowed z-coordinate.
binary: Specifies whether the ASCII or binary PLY-format should be used.
colSource: Source channel of the color information
maxDisparity: The maximum value that occurs in the disparity map. Any value
greater or equal will be marked as invalid.
Static methods defined here:
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
|
class TargetFrame(enum.IntEnum) |
|
TargetFrame(value, names=None, *, module=None, qualname=None, type=None, start=1)
Possible options for the target frame selection of the
automatic exposure and gain control. |
|
- Method resolution order:
- TargetFrame
- enum.IntEnum
- builtins.int
- enum.Enum
- builtins.object
Data and other attributes defined here:
- BOTH_FRAMES = <TargetFrame.BOTH_FRAMES: 2>
- LEFT_FRAME = <TargetFrame.LEFT_FRAME: 0>
- RIGHT_FRAME = <TargetFrame.RIGHT_FRAME: 1>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Readonly properties inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
|
class TriggerInputMode(enum.IntEnum) |
|
TriggerInputMode(value, names=None, *, module=None, qualname=None, type=None, start=1)
Trigger input modes supported by Nerian stereo devices. |
|
- Method resolution order:
- TriggerInputMode
- enum.IntEnum
- builtins.int
- enum.Enum
- builtins.object
Data and other attributes defined here:
- EXTERNAL = <TriggerInputMode.EXTERNAL: 1>
- INTERNAL = <TriggerInputMode.INTERNAL: 0>
- SOFTWARE = <TriggerInputMode.SOFTWARE: 2>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Readonly properties inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
| |