15 #ifndef VISIONTRANSFER_SCENESCANPARAMETERS_H 16 #define VISIONTRANSFER_SCENESCANPARAMETERS_H 18 #include "visiontransfer/common.h" 19 #include "visiontransfer/deviceinfo.h" 20 #include "visiontransfer/standardparameterids.h" 21 #include "visiontransfer/parameterinfo.h" 87 return static_cast<OperationMode>(readIntParameter(internal::StandardParameterIDs::OPERATION_MODE));
97 writeIntParameter(internal::StandardParameterIDs::OPERATION_MODE, static_cast<int>(mode));
104 return readIntParameter(internal::StandardParameterIDs::DISPARITY_OFFSET);
113 writeIntParameter(internal::StandardParameterIDs::DISPARITY_OFFSET, offset);
122 return readIntParameter(internal::StandardParameterIDs::SGM_P1);
131 writeIntParameter(internal::StandardParameterIDs::SGM_P1, p1);
138 return readIntParameter(internal::StandardParameterIDs::SGM_P2);
147 writeIntParameter(internal::StandardParameterIDs::SGM_P2, p2);
155 return readBoolParameter(internal::StandardParameterIDs::MASK_BORDER_PIXELS_ENABLED);
163 writeBoolParameter(internal::StandardParameterIDs::MASK_BORDER_PIXELS_ENABLED, enabled);
170 return readBoolParameter(internal::StandardParameterIDs::CONSISTENCY_CHECK_ENABLED);
177 writeBoolParameter(internal::StandardParameterIDs::CONSISTENCY_CHECK_ENABLED, enabled);
184 return readIntParameter(internal::StandardParameterIDs::CONSISTENCY_CHECK_SENSITIVITY);
193 writeIntParameter(internal::StandardParameterIDs::CONSISTENCY_CHECK_SENSITIVITY, sensitivity);
200 return readBoolParameter(internal::StandardParameterIDs::UNIQUENESS_CHECK_ENABLED);
207 writeBoolParameter(internal::StandardParameterIDs::UNIQUENESS_CHECK_ENABLED, enabled);
214 return readIntParameter(internal::StandardParameterIDs::UNIQUENESS_CHECK_SENSITIVITY);
223 writeIntParameter(internal::StandardParameterIDs::UNIQUENESS_CHECK_SENSITIVITY, sensitivity);
230 return readBoolParameter(internal::StandardParameterIDs::TEXTURE_FILTER_ENABLED);
237 writeBoolParameter(internal::StandardParameterIDs::TEXTURE_FILTER_ENABLED, enabled);
244 return readIntParameter(internal::StandardParameterIDs::TEXTURE_FILTER_SENSITIVITY);
253 writeIntParameter(internal::StandardParameterIDs::TEXTURE_FILTER_SENSITIVITY, sensitivity);
260 return readBoolParameter(internal::StandardParameterIDs::GAP_INTERPOLATION_ENABLED);
267 writeBoolParameter(internal::StandardParameterIDs::GAP_INTERPOLATION_ENABLED, enabled);
274 return readBoolParameter(internal::StandardParameterIDs::NOISE_REDUCTION_ENABLED);
281 writeBoolParameter(internal::StandardParameterIDs::NOISE_REDUCTION_ENABLED, enabled);
288 return readIntParameter(internal::StandardParameterIDs::SPECKLE_FILTER_ITERATIONS);
295 writeIntParameter(internal::StandardParameterIDs::SPECKLE_FILTER_ITERATIONS, iter);
305 AUTO_EXPOSURE_AND_GAIN = 0,
308 AUTO_EXPOSURE_MANUAL_GAIN = 1,
311 MANUAL_EXPOSORE_AUTO_GAIN = 2,
314 MANUAL_EXPOSURE_MANUAL_GAIN = 3
322 return static_cast<AutoMode>(readIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_MODE));
330 writeIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_MODE, static_cast<int>(mode));
341 return readDoubleParameter(internal::StandardParameterIDs::AUTO_TARGET_INTENSITY);
352 writeDoubleParameter(internal::StandardParameterIDs::AUTO_TARGET_INTENSITY, intensity);
363 return readDoubleParameter(internal::StandardParameterIDs::AUTO_INTENSITY_DELTA);
374 writeDoubleParameter(internal::StandardParameterIDs::AUTO_INTENSITY_DELTA, delta);
397 return static_cast<AutoMode>(readIntParameter(internal::StandardParameterIDs::AUTO_TARGET_FRAME));
405 writeIntParameter(internal::StandardParameterIDs::AUTO_TARGET_FRAME, static_cast<int>(target));
416 return readIntParameter(internal::StandardParameterIDs::AUTO_SKIPPED_FRAMES);
427 writeIntParameter(internal::StandardParameterIDs::AUTO_SKIPPED_FRAMES, skipped);
435 return readDoubleParameter(internal::StandardParameterIDs::AUTO_MAXIMUM_EXPOSURE_TIME);
443 writeDoubleParameter(internal::StandardParameterIDs::AUTO_MAXIMUM_EXPOSURE_TIME, time);
451 return readDoubleParameter(internal::StandardParameterIDs::AUTO_MAXIMUM_GAIN);
459 writeDoubleParameter(internal::StandardParameterIDs::AUTO_MAXIMUM_GAIN, gain);
472 return readDoubleParameter(internal::StandardParameterIDs::MANUAL_EXPOSURE_TIME);
485 writeDoubleParameter(internal::StandardParameterIDs::MANUAL_EXPOSURE_TIME, time);
498 return readDoubleParameter(internal::StandardParameterIDs::MANUAL_GAIN);
511 writeDoubleParameter(internal::StandardParameterIDs::MANUAL_GAIN, gain);
518 return readBoolParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_ENABLED);
525 writeBoolParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_ENABLED, enabled);
542 x = readIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_X);
543 y = readIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_Y);
544 width = readIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_WIDTH);
545 height = readIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_HEIGHT);
562 writeIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_X, x);
563 writeIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_Y, y);
564 writeIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_WIDTH, width);
565 writeIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_HEIGHT, height);
576 return readIntParameter(internal::StandardParameterIDs::MAX_FRAME_TIME_DIFFERENCE_MS);
585 writeIntParameter(internal::StandardParameterIDs::MAX_FRAME_TIME_DIFFERENCE_MS, diffMs);
593 return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_FREQUENCY);
601 writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_FREQUENCY, freq);
608 return readBoolParameter(internal::StandardParameterIDs::TRIGGER_0_ENABLED);
615 writeBoolParameter(internal::StandardParameterIDs::TRIGGER_0_ENABLED, enabled);
622 return readBoolParameter(internal::StandardParameterIDs::TRIGGER_1_ENABLED);
629 writeBoolParameter(internal::StandardParameterIDs::TRIGGER_1_ENABLED, enabled);
637 return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_0_PULSE_WIDTH);
645 writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_0_PULSE_WIDTH, width);
653 return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1_PULSE_WIDTH);
661 writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1_PULSE_WIDTH, width);
669 return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1_OFFSET);
677 writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1_OFFSET, offset);
686 return readBoolParameter(internal::StandardParameterIDs::AUTO_RECALIBRATION_ENABLED);
693 writeBoolParameter(internal::StandardParameterIDs::AUTO_RECALIBRATION_ENABLED, enabled);
700 return readBoolParameter(internal::StandardParameterIDs::AUTO_RECALIBRATION_PERMANENT);
707 writeBoolParameter(internal::StandardParameterIDs::AUTO_RECALIBRATION_PERMANENT, save);
714 std::map<std::string, ParameterInfo> getAllParameters();
720 void setNamedParameter(
const std::string& name, T value);
726 T getNamedParameter(
const std::string& name);
738 int readIntParameter(
int id);
739 double readDoubleParameter(
int id);
740 bool readBoolParameter(
int id);
743 void writeIntParameter(
int id,
int value);
744 void writeDoubleParameter(
int id,
double value);
745 void writeBoolParameter(
int id,
bool value);
void setDisparityOffset(int offset)
Sets the offset of the evaluated disparity range.
void setAutoIntensityDelta(double delta)
Sets the minimum intensity change that is required for adjusting the camera settings.
void getAutoROI(int &x, int &y, int &width, int &height)
Gets the configured ROI for automatic exposure and gain control.
bool getAutoRecalibrationEnabled()
Returns true if auto re-calibration is enabled.
bool getAutoROIEnabled()
Returns true if an ROI for automatic exposure and gain control is enabled.
bool getTextureFilterEnabled()
Returns true if the texture filter is enabled.
void setStereoMatchingP1(int p1)
Sets the SGM penalty P1 for small disparity changes.
void setAutoROI(int x, int y, int width, int height)
Sets the configured ROI for automatic exposure and gain control.
int getStereoMatchingP2()
Gets the SGM penalty P2 for large disparity changes.
void setAutoMaxGain(double gain)
Gets the maximum gain that can be selected automatically.
bool getGapInterpolationEnabled()
Returns true if the texture gap interpolation is enabled.
double getAutoMaxGain()
Gets the maximum gain that can be selected automatically.
double getTriggerFrequency()
Gets the frequency of the trigger signal.
void setManualExposureTime(double time)
Sets the manually selected exposure time.
void setAutoMaxExposureTime(double time)
Sets the maximum exposure time that can be selected automatically.
void setSpeckleFilterIterations(int iter)
Enables or disables the speckle filter.
bool getMaskBorderPixelsEnabled()
Returns true if border pixels are removed from the computed disparity map.
void setUniquenessCheckSensitivity(int sensitivity)
Sets a new sensitivity value for the uniqueness check.
double getTrigger0PulseWidth()
Gets the pulse width of trigger signal 0.
void setAutoRecalibrationEnabled(bool enabled)
Enables or disables auto-recalibration.
double getAutoMaxExposureTime()
Gets the maximum exposure time that can be selected automatically.
double getAutoTargetIntensity()
Gets the target image intensity of the automatic exposure and gain control.
int getMaxFrameTimeDifference()
Gets the maximum allowed time difference between two corresponding frames.
void setTrigger0Enabled(bool enabled)
Enables or disables trigger signal 0.
void setNoiseReductionEnabled(bool enabled)
Enables or disables the noise reduction filter.
bool getSaveAutoReclabration()
Returns true if persistent storage of auto re-calibration results is enabled.
TargetFrame
Possible options for the target frame selection of the automatic exposure and gain control...
int getStereoMatchingP1()
Gets the SGM penalty P1 for small disparity changes.
double getTrigger1PulseWidth()
Gets the pulse width of trigger signal 1.
void setManualGain(double gain)
Sets the manually selected gain.
OperationMode getOperationMode()
Gets the current operation mode.
void setMaxFrameTimeDifference(int diffMs)
Sets the maximum allowed time difference between two corresponding frames.
void setAutoSkippedFrames(int skipped)
Sets the current interval at which the automatic exposure and gain control is run.
void setAutoTargetIntensity(double intensity)
Sets the target image intensity of the automatic exposure and gain control.
AutoMode getAutoMode()
Gets the current mode of the automatic exposure and gain control.
bool getNoiseReductionEnabled()
Returns true if the noise reduction filter is enabled.
int getUniquenessCheckSensitivity()
Gets the current sensitivity value for the uniqueness check.
int getAutoSkippedFrames()
Gets the current interval at which the automatic exposure and gain control is run.
void setTrigger0PulseWidth(double width)
Sets the pulse width of trigger signal 0.
OperationMode
Operation modes supported by SceneScan.
AutoMode getAutoTargetFrame()
Gets the selected target frame for automatic exposure and gain control.
void setMaskBorderPixelsEnabled(bool enabled)
Enables or disables the removal of border pixels from the computed disparity map. ...
int getTextureFilterSensitivity()
Gets the current sensitivity value for the texture filter.
Allows a configuration of SceneScan's parameters through a network connection.
void setTextureFilterSensitivity(int sensitivity)
Sets a new sensitivity value for the texture filter.
void setAutoROIEnabled(bool enabled)
Enables or disables an ROI for automatic exposure and gain control.
void setTrigger1PulseWidth(double width)
Sets the pulse width of trigger signal 1.
void setUniquenessCheckEnabled(bool enabled)
Enables or disables the uniqueness check.
int getSpeckleFilterIterations()
Returns true if the speckle filter is enabled.
void setConsistencyCheckEnabled(bool enabled)
Enables or disables the consistency check.
Aggregates information about a discovered device.
void setTextureFilterEnabled(bool enabled)
Enables or disables the texture filter.
int getConsistencyCheckSensitivity()
Gets the current sensitivity value for the consistency check.
void setTriggerFrequency(double freq)
Sets the frequency of the trigger signal.
void setTrigger1Enabled(bool enabled)
Enables or disables trigger signal 1.
void setConsistencyCheckSensitivity(int sensitivity)
Sets a new sensitivity value for the consistency check.
void setAutoTargetFrame(TargetFrame target)
Selects the target frame for automatic exposure and gain control.
double getManualGain()
Gets the manually selected gain.
int getDisparityOffset()
Gets the current offset of the evaluated disparity range.
double getAutoIntensityDelta()
Gets the minimum intensity change that is required for adjusting the camera settings.
void setGapInterpolationEnabled(bool enabled)
Enables or disables the gap interpolation.
bool getUniquenessCheckEnabled()
Returns true if the consistency check is enabled.
AutoMode
Possible modes of the automatic exposure and gain control.
bool getTrigger1Enabled()
Returns true if trigger signal 1 is enabled.
void setSaveAutoReclabration(bool save)
Enables or disables persistent storage of auto re-calibration results.
void setTrigger1Offset(double offset)
Sets the time offset between trigger signal 1 and signal 0.
void setAutoMode(AutoMode mode)
Sets the current mode of the automatic exposure and gain control.
double getTrigger1Offset()
Gets the time offset between trigger signal 1 and signal 0.
double getManualExposureTime()
Gets the manually selected exposure time.
bool getConsistencyCheckEnabled()
Returns true if the consistency check is enabled.
void setOperationMode(OperationMode mode)
Configures the device to a new operation mode.
void setStereoMatchingP2(int p2)
Sets the SGM penalty P2 for large disparity changes.
bool getTrigger0Enabled()
Returns true if trigger signal 0 is enabled.