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" 93 return static_cast<OperationMode>(readIntParameter(internal::StandardParameterIDs::OPERATION_MODE));
103 writeIntParameter(internal::StandardParameterIDs::OPERATION_MODE, static_cast<int>(mode));
110 return readIntParameter(internal::StandardParameterIDs::DISPARITY_OFFSET);
119 writeIntParameter(internal::StandardParameterIDs::DISPARITY_OFFSET, offset);
128 return readIntParameter(internal::StandardParameterIDs::SGM_P1_EDGE);
137 writeIntParameter(internal::StandardParameterIDs::SGM_P1_EDGE, p1);
144 return readIntParameter(internal::StandardParameterIDs::SGM_P1_NO_EDGE);
153 writeIntParameter(internal::StandardParameterIDs::SGM_P1_NO_EDGE, p1);
160 return readIntParameter(internal::StandardParameterIDs::SGM_P2_EDGE);
169 writeIntParameter(internal::StandardParameterIDs::SGM_P2_EDGE, p2);
176 return readIntParameter(internal::StandardParameterIDs::SGM_P2_NO_EDGE);
185 writeIntParameter(internal::StandardParameterIDs::SGM_P2_NO_EDGE, p2);
192 return readIntParameter(internal::StandardParameterIDs::SGM_EDGE_SENSITIVITY);
201 writeIntParameter(internal::StandardParameterIDs::SGM_EDGE_SENSITIVITY, sensitivity);
209 return readBoolParameter(internal::StandardParameterIDs::MASK_BORDER_PIXELS_ENABLED);
217 writeBoolParameter(internal::StandardParameterIDs::MASK_BORDER_PIXELS_ENABLED, enabled);
224 return readBoolParameter(internal::StandardParameterIDs::CONSISTENCY_CHECK_ENABLED);
231 writeBoolParameter(internal::StandardParameterIDs::CONSISTENCY_CHECK_ENABLED, enabled);
238 return readIntParameter(internal::StandardParameterIDs::CONSISTENCY_CHECK_SENSITIVITY);
247 writeIntParameter(internal::StandardParameterIDs::CONSISTENCY_CHECK_SENSITIVITY, sensitivity);
254 return readBoolParameter(internal::StandardParameterIDs::UNIQUENESS_CHECK_ENABLED);
261 writeBoolParameter(internal::StandardParameterIDs::UNIQUENESS_CHECK_ENABLED, enabled);
268 return readIntParameter(internal::StandardParameterIDs::UNIQUENESS_CHECK_SENSITIVITY);
277 writeIntParameter(internal::StandardParameterIDs::UNIQUENESS_CHECK_SENSITIVITY, sensitivity);
284 return readBoolParameter(internal::StandardParameterIDs::TEXTURE_FILTER_ENABLED);
291 writeBoolParameter(internal::StandardParameterIDs::TEXTURE_FILTER_ENABLED, enabled);
298 return readIntParameter(internal::StandardParameterIDs::TEXTURE_FILTER_SENSITIVITY);
307 writeIntParameter(internal::StandardParameterIDs::TEXTURE_FILTER_SENSITIVITY, sensitivity);
314 return readBoolParameter(internal::StandardParameterIDs::GAP_INTERPOLATION_ENABLED);
321 writeBoolParameter(internal::StandardParameterIDs::GAP_INTERPOLATION_ENABLED, enabled);
328 return readBoolParameter(internal::StandardParameterIDs::NOISE_REDUCTION_ENABLED);
335 writeBoolParameter(internal::StandardParameterIDs::NOISE_REDUCTION_ENABLED, enabled);
342 return readIntParameter(internal::StandardParameterIDs::SPECKLE_FILTER_ITERATIONS);
349 writeIntParameter(internal::StandardParameterIDs::SPECKLE_FILTER_ITERATIONS, iter);
359 AUTO_EXPOSURE_AND_GAIN = 0,
362 AUTO_EXPOSURE_MANUAL_GAIN = 1,
365 MANUAL_EXPOSORE_AUTO_GAIN = 2,
368 MANUAL_EXPOSURE_MANUAL_GAIN = 3
376 return static_cast<AutoMode>(readIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_MODE));
384 writeIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_MODE, static_cast<int>(mode));
395 return readDoubleParameter(internal::StandardParameterIDs::AUTO_TARGET_INTENSITY);
406 writeDoubleParameter(internal::StandardParameterIDs::AUTO_TARGET_INTENSITY, intensity);
417 return readDoubleParameter(internal::StandardParameterIDs::AUTO_INTENSITY_DELTA);
428 writeDoubleParameter(internal::StandardParameterIDs::AUTO_INTENSITY_DELTA, delta);
451 return static_cast<TargetFrame>(readIntParameter(internal::StandardParameterIDs::AUTO_TARGET_FRAME));
459 writeIntParameter(internal::StandardParameterIDs::AUTO_TARGET_FRAME, static_cast<int>(target));
470 return readIntParameter(internal::StandardParameterIDs::AUTO_SKIPPED_FRAMES);
481 writeIntParameter(internal::StandardParameterIDs::AUTO_SKIPPED_FRAMES, skipped);
489 return readDoubleParameter(internal::StandardParameterIDs::AUTO_MAXIMUM_EXPOSURE_TIME);
497 writeDoubleParameter(internal::StandardParameterIDs::AUTO_MAXIMUM_EXPOSURE_TIME, time);
505 return readDoubleParameter(internal::StandardParameterIDs::AUTO_MAXIMUM_GAIN);
513 writeDoubleParameter(internal::StandardParameterIDs::AUTO_MAXIMUM_GAIN, gain);
526 return readDoubleParameter(internal::StandardParameterIDs::MANUAL_EXPOSURE_TIME);
539 writeDoubleParameter(internal::StandardParameterIDs::MANUAL_EXPOSURE_TIME, time);
552 return readDoubleParameter(internal::StandardParameterIDs::MANUAL_GAIN);
565 writeDoubleParameter(internal::StandardParameterIDs::MANUAL_GAIN, gain);
572 return readBoolParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_ENABLED);
579 writeBoolParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_ENABLED, enabled);
596 x = readIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_X);
597 y = readIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_Y);
598 width = readIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_WIDTH);
599 height = readIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_HEIGHT);
616 writeIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_X, x);
617 writeIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_Y, y);
618 writeIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_WIDTH, width);
619 writeIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_HEIGHT, height);
631 return readIntParameter(internal::StandardParameterIDs::MAX_FRAME_TIME_DIFFERENCE_MS);
641 writeIntParameter(internal::StandardParameterIDs::MAX_FRAME_TIME_DIFFERENCE_MS, diffMs);
649 return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_FREQUENCY);
657 writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_FREQUENCY, freq);
664 return readBoolParameter(internal::StandardParameterIDs::TRIGGER_0_ENABLED);
671 writeBoolParameter(internal::StandardParameterIDs::TRIGGER_0_ENABLED, enabled);
680 return readBoolParameter(internal::StandardParameterIDs::TRIGGER_0_POLARITY);
688 writeBoolParameter(internal::StandardParameterIDs::TRIGGER_0_POLARITY, invert);
695 return readBoolParameter(internal::StandardParameterIDs::TRIGGER_1_ENABLED);
702 writeBoolParameter(internal::StandardParameterIDs::TRIGGER_1_ENABLED, enabled);
710 return readBoolParameter(internal::StandardParameterIDs::TRIGGER_1_POLARITY);
718 writeBoolParameter(internal::StandardParameterIDs::TRIGGER_1_POLARITY, invert);
730 case 0:
return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_0_PULSE_WIDTH);
731 case 1:
return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_0B_PULSE_WIDTH);
732 case 2:
return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_0C_PULSE_WIDTH);
733 case 3:
return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_0D_PULSE_WIDTH);
734 case 4:
return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_0E_PULSE_WIDTH);
735 case 5:
return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_0F_PULSE_WIDTH);
736 case 6:
return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_0G_PULSE_WIDTH);
737 case 7:
return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_0H_PULSE_WIDTH);
751 case 0: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_0_PULSE_WIDTH, width);
break;
752 case 1: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_0B_PULSE_WIDTH, width);
break;
753 case 2: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_0C_PULSE_WIDTH, width);
break;
754 case 3: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_0D_PULSE_WIDTH, width);
break;
755 case 4: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_0E_PULSE_WIDTH, width);
break;
756 case 5: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_0F_PULSE_WIDTH, width);
break;
757 case 6: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_0G_PULSE_WIDTH, width);
break;
758 case 7: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_0H_PULSE_WIDTH, width);
break;
772 case 0:
return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1_PULSE_WIDTH);
773 case 1:
return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1B_PULSE_WIDTH);
774 case 2:
return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1C_PULSE_WIDTH);
775 case 3:
return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1D_PULSE_WIDTH);
776 case 4:
return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1E_PULSE_WIDTH);
777 case 5:
return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1F_PULSE_WIDTH);
778 case 6:
return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1G_PULSE_WIDTH);
779 case 7:
return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1H_PULSE_WIDTH);
793 case 0: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1_PULSE_WIDTH, width);
break;
794 case 1: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1B_PULSE_WIDTH, width);
break;
795 case 2: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1C_PULSE_WIDTH, width);
break;
796 case 3: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1D_PULSE_WIDTH, width);
break;
797 case 4: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1E_PULSE_WIDTH, width);
break;
798 case 5: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1F_PULSE_WIDTH, width);
break;
799 case 6: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1G_PULSE_WIDTH, width);
break;
800 case 7: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1H_PULSE_WIDTH, width);
break;
810 return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1_OFFSET);
818 writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1_OFFSET, offset);
827 return readBoolParameter(internal::StandardParameterIDs::AUTO_RECALIBRATION_ENABLED);
834 writeBoolParameter(internal::StandardParameterIDs::AUTO_RECALIBRATION_ENABLED, enabled);
841 return readBoolParameter(internal::StandardParameterIDs::AUTO_RECALIBRATION_PERMANENT);
848 writeBoolParameter(internal::StandardParameterIDs::AUTO_RECALIBRATION_PERMANENT, save);
856 return readBoolParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_ENABLED);
864 writeBoolParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_ENABLED, enabled);
881 x = readIntParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_X);
882 y = readIntParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_Y);
883 width = readIntParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_WIDTH);
884 height = readIntParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_HEIGHT);
901 writeIntParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_X, x);
902 writeIntParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_Y, y);
903 writeIntParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_WIDTH, width);
904 writeIntParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_HEIGHT, height);
911 std::map<std::string, ParameterInfo> getAllParameters();
917 void setNamedParameter(
const std::string& name, T value);
923 T getNamedParameter(
const std::string& name);
935 int readIntParameter(
int id);
936 double readDoubleParameter(
int id);
937 bool readBoolParameter(
int id);
940 void writeIntParameter(
int id,
int value);
941 void writeDoubleParameter(
int id,
double value);
942 void writeBoolParameter(
int id,
bool value);
void setDisparityOffset(int offset)
Sets the offset of the evaluated disparity range.
double getTrigger1PulseWidth(int pulse=0)
Gets the pulse width of trigger signal 1.
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.
void setTrigger1Polarity(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).
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 setAutoROI(int x, int y, int width, int height)
Sets the configured ROI for automatic exposure and gain control.
bool getTrigger0Polarity()
Returns false if trigger0 polarity is active-high (non-inverted) and false if polarity is active-low ...
void setAutoMaxGain(double gain)
Gets the maximum gain that can be selected automatically.
void setTrigger0PulseWidth(double width, int pulse=0)
Sets the pulse width of trigger signal 0.
bool getSubpixelOptimizationROIEnabled()
Returns true if an ROI for the subpixel optimization algorithm is enabled (otherwise complete frames ...
bool getGapInterpolationEnabled()
Returns true if the texture gap interpolation is enabled.
void setStereoMatchingEdgeSensitivity(int sensitivity)
Sets the edge sensitivity of the SGM algorithm.
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.
void setStereoMatchingP2NoEdge(int p2)
Sets the SGM penalty P2 for large disparity changes at image edges.
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 setTrigger0Polarity(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).
void setNoiseReductionEnabled(bool enabled)
Enables or disables the noise reduction filter.
TargetFrame
Possible options for the target frame selection of the automatic exposure and gain control...
void setManualGain(double gain)
Sets the manually selected gain.
OperationMode getOperationMode()
Gets the current operation mode.
int getStereoMatchingP2NoEdge()
Gets the SGM penalty P2 for large disparity changes at image edges.
bool getTrigger1Polarity()
Returns false if trigger1 polarity is active-high (non-inverted) and false if polarity is active-low ...
void setSubpixelOptimizationROI(int x, int y, int width, int height)
Sets the configured ROI for the subpixel optimization algorithm.
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 setSaveAutoRecalibration(bool save)
Enables or disables persistent storage of auto re-calibration results.
void setAutoTargetIntensity(double intensity)
Sets the target image intensity of the automatic exposure and gain control.
int getStereoMatchingP2Edge()
Gets the SGM penalty P2 for large disparity changes at image edges.
void setStereoMatchingP1NoEdge(int p1)
Sets the SGM penalty P1 for small disparity changes outside image edges.
AutoMode getAutoMode()
Gets the current mode of the automatic exposure and gain control.
void getSubpixelOptimizationROI(int &x, int &y, int &width, int &height)
Gets the configured ROI for the subpixel optimization algorithm.
int getStereoMatchingP1Edge()
Gets the SGM penalty P1 for small disparity changes at image edges.
bool getNoiseReductionEnabled()
Returns true if the noise reduction filter is enabled.
double getTrigger0PulseWidth(int pulse=0)
Gets the pulse width of trigger signal 0.
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.
OperationMode
Operation modes supported by SceneScan.
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.
bool getSaveAutoRecalibration()
Returns true if persistent storage of auto re-calibration results is enabled.
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 setUniquenessCheckEnabled(bool enabled)
Enables or disables the uniqueness check.
int getStereoMatchingEdgeSensitivity()
Gets the edge sensitivity of the SGM algorithm.
void setSubpixelOptimizationROIEnabled(bool enabled)
Enables or disables an ROI for the subpixel optimization algorithm. (if disabled, complete frames are...
int getSpeckleFilterIterations()
Returns true if the speckle filter is enabled.
void setConsistencyCheckEnabled(bool enabled)
Enables or disables the consistency check.
void setTrigger1PulseWidth(double width, int pulse=0)
Sets the pulse width of trigger signal 1.
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 setStereoMatchingP2Edge(int p2)
Sets the SGM penalty P2 for large disparity changes at image edges.
void setStereoMatchingP1Edge(int p1)
Sets the SGM penalty P1 for small disparity changes at image edges.
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 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.
TargetFrame getAutoTargetFrame()
Gets the selected target frame for automatic exposure and gain control.
int getStereoMatchingP1NoEdge()
Gets the SGM penalty P1 for small disparity changes outside image edges.
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.
bool getTrigger0Enabled()
Returns true if trigger signal 0 is enabled.