libvisiontransfer  8.3.0
deviceparameters.h
1 /*******************************************************************************
2  * Copyright (c) 2020 Nerian Vision GmbH
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *******************************************************************************/
14 
15 #ifndef VISIONTRANSFER_DEVICEPARAMETERS_H
16 #define VISIONTRANSFER_DEVICEPARAMETERS_H
17 
18 #include "visiontransfer/common.h"
19 #include "visiontransfer/deviceinfo.h"
20 #include "visiontransfer/standardparameterids.h"
21 #include "visiontransfer/parameterinfo.h"
22 
23 #include <map>
24 
25 namespace visiontransfer {
26 
46 class VT_EXPORT DeviceParameters {
47 public:
55  DeviceParameters(const DeviceInfo& device);
56 
66  DeviceParameters(const char* address, const char* service = "7683");
67 
69 
70  // Processing settings
71 
77  PASS_THROUGH = 0,
78 
80  RECTIFY = 1,
81 
83  STEREO_MATCHING = 2
84  };
85 
93  return static_cast<OperationMode>(readIntParameter(internal::StandardParameterIDs::OPERATION_MODE));
94  }
95 
103  writeIntParameter(internal::StandardParameterIDs::OPERATION_MODE, static_cast<int>(mode));
104  }
105 
110  return readIntParameter(internal::StandardParameterIDs::DISPARITY_OFFSET);
111  }
112 
118  void setDisparityOffset(int offset) {
119  writeIntParameter(internal::StandardParameterIDs::DISPARITY_OFFSET, offset);
120  }
121 
122  // Algorithmic settings
123 
128  return readIntParameter(internal::StandardParameterIDs::SGM_P1_EDGE);
129  }
130 
136  void setStereoMatchingP1Edge(int p1) {
137  writeIntParameter(internal::StandardParameterIDs::SGM_P1_EDGE, p1);
138  }
139 
144  return readIntParameter(internal::StandardParameterIDs::SGM_P1_NO_EDGE);
145  }
146 
153  writeIntParameter(internal::StandardParameterIDs::SGM_P1_NO_EDGE, p1);
154  }
155 
160  return readIntParameter(internal::StandardParameterIDs::SGM_P2_EDGE);
161  }
162 
168  void setStereoMatchingP2Edge(int p2) {
169  writeIntParameter(internal::StandardParameterIDs::SGM_P2_EDGE, p2);
170  }
171 
176  return readIntParameter(internal::StandardParameterIDs::SGM_P2_NO_EDGE);
177  }
178 
185  writeIntParameter(internal::StandardParameterIDs::SGM_P2_NO_EDGE, p2);
186  }
187 
192  return readIntParameter(internal::StandardParameterIDs::SGM_EDGE_SENSITIVITY);
193  }
194 
200  void setStereoMatchingEdgeSensitivity(int sensitivity) {
201  writeIntParameter(internal::StandardParameterIDs::SGM_EDGE_SENSITIVITY, sensitivity);
202  }
203 
209  return readBoolParameter(internal::StandardParameterIDs::MASK_BORDER_PIXELS_ENABLED);
210  }
211 
216  void setMaskBorderPixelsEnabled(bool enabled) {
217  writeBoolParameter(internal::StandardParameterIDs::MASK_BORDER_PIXELS_ENABLED, enabled);
218  }
219 
224  return readBoolParameter(internal::StandardParameterIDs::CONSISTENCY_CHECK_ENABLED);
225  }
226 
230  void setConsistencyCheckEnabled(bool enabled) {
231  writeBoolParameter(internal::StandardParameterIDs::CONSISTENCY_CHECK_ENABLED, enabled);
232  }
233 
238  return readIntParameter(internal::StandardParameterIDs::CONSISTENCY_CHECK_SENSITIVITY);
239  }
240 
246  void setConsistencyCheckSensitivity(int sensitivity) {
247  writeIntParameter(internal::StandardParameterIDs::CONSISTENCY_CHECK_SENSITIVITY, sensitivity);
248  }
249 
254  return readBoolParameter(internal::StandardParameterIDs::UNIQUENESS_CHECK_ENABLED);
255  }
256 
260  void setUniquenessCheckEnabled(bool enabled) {
261  writeBoolParameter(internal::StandardParameterIDs::UNIQUENESS_CHECK_ENABLED, enabled);
262  }
263 
268  return readIntParameter(internal::StandardParameterIDs::UNIQUENESS_CHECK_SENSITIVITY);
269  }
270 
276  void setUniquenessCheckSensitivity(int sensitivity) {
277  writeIntParameter(internal::StandardParameterIDs::UNIQUENESS_CHECK_SENSITIVITY, sensitivity);
278  }
279 
284  return readBoolParameter(internal::StandardParameterIDs::TEXTURE_FILTER_ENABLED);
285  }
286 
290  void setTextureFilterEnabled(bool enabled) {
291  writeBoolParameter(internal::StandardParameterIDs::TEXTURE_FILTER_ENABLED, enabled);
292  }
293 
298  return readIntParameter(internal::StandardParameterIDs::TEXTURE_FILTER_SENSITIVITY);
299  }
300 
306  void setTextureFilterSensitivity(int sensitivity) {
307  writeIntParameter(internal::StandardParameterIDs::TEXTURE_FILTER_SENSITIVITY, sensitivity);
308  }
309 
314  return readBoolParameter(internal::StandardParameterIDs::GAP_INTERPOLATION_ENABLED);
315  }
316 
320  void setGapInterpolationEnabled(bool enabled) {
321  writeBoolParameter(internal::StandardParameterIDs::GAP_INTERPOLATION_ENABLED, enabled);
322  }
323 
328  return readBoolParameter(internal::StandardParameterIDs::NOISE_REDUCTION_ENABLED);
329  }
330 
334  void setNoiseReductionEnabled(bool enabled) {
335  writeBoolParameter(internal::StandardParameterIDs::NOISE_REDUCTION_ENABLED, enabled);
336  }
337 
342  return readIntParameter(internal::StandardParameterIDs::SPECKLE_FILTER_ITERATIONS);
343  }
344 
348  void setSpeckleFilterIterations(int iter) {
349  writeIntParameter(internal::StandardParameterIDs::SPECKLE_FILTER_ITERATIONS, iter);
350  }
351 
352  // Exposure and gain settings
353 
357  enum AutoMode {
359  AUTO_EXPOSURE_AND_GAIN = 0,
360 
362  AUTO_EXPOSURE_MANUAL_GAIN = 1,
363 
365  MANUAL_EXPOSORE_AUTO_GAIN = 2,
366 
368  MANUAL_EXPOSURE_MANUAL_GAIN = 3
369  };
370 
376  return static_cast<AutoMode>(readIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_MODE));
377  }
378 
383  void setAutoMode(AutoMode mode) {
384  writeIntParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_MODE, static_cast<int>(mode));
385  }
386 
395  return readDoubleParameter(internal::StandardParameterIDs::AUTO_TARGET_INTENSITY);
396  }
397 
405  void setAutoTargetIntensity(double intensity) {
406  writeDoubleParameter(internal::StandardParameterIDs::AUTO_TARGET_INTENSITY, intensity);
407  }
408 
417  return readDoubleParameter(internal::StandardParameterIDs::AUTO_INTENSITY_DELTA);
418  }
419 
427  void setAutoIntensityDelta(double delta) {
428  writeDoubleParameter(internal::StandardParameterIDs::AUTO_INTENSITY_DELTA, delta);
429  }
430 
435  enum TargetFrame {
437  LEFT_FRAME = 0,
438 
440  RIGHT_FRAME = 1,
441 
443  BOTH_FRAMES = 2,
444  };
445 
451  return static_cast<TargetFrame>(readIntParameter(internal::StandardParameterIDs::AUTO_TARGET_FRAME));
452  }
453 
459  writeIntParameter(internal::StandardParameterIDs::AUTO_TARGET_FRAME, static_cast<int>(target));
460  }
461 
470  return readIntParameter(internal::StandardParameterIDs::AUTO_SKIPPED_FRAMES);
471  }
472 
480  void setAutoSkippedFrames(int skipped) {
481  writeIntParameter(internal::StandardParameterIDs::AUTO_SKIPPED_FRAMES, skipped);
482  }
483 
489  return readDoubleParameter(internal::StandardParameterIDs::AUTO_MAXIMUM_EXPOSURE_TIME);
490  }
491 
496  void setAutoMaxExposureTime(double time) {
497  writeDoubleParameter(internal::StandardParameterIDs::AUTO_MAXIMUM_EXPOSURE_TIME, time);
498  }
499 
504  double getAutoMaxGain() {
505  return readDoubleParameter(internal::StandardParameterIDs::AUTO_MAXIMUM_GAIN);
506  }
507 
512  void setAutoMaxGain(double gain) {
513  writeDoubleParameter(internal::StandardParameterIDs::AUTO_MAXIMUM_GAIN, gain);
514  }
515 
526  return readDoubleParameter(internal::StandardParameterIDs::MANUAL_EXPOSURE_TIME);
527  }
528 
538  void setManualExposureTime(double time) {
539  writeDoubleParameter(internal::StandardParameterIDs::MANUAL_EXPOSURE_TIME, time);
540  }
541 
551  double getManualGain() {
552  return readDoubleParameter(internal::StandardParameterIDs::MANUAL_GAIN);
553  }
554 
564  void setManualGain(double gain) {
565  writeDoubleParameter(internal::StandardParameterIDs::MANUAL_GAIN, gain);
566  }
567 
572  return readBoolParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_ENABLED);
573  }
574 
578  void setAutoROIEnabled(bool enabled) {
579  writeBoolParameter(internal::StandardParameterIDs::AUTO_EXPOSURE_ROI_ENABLED, enabled);
580  }
581 
595  void getAutoROI(int& x, int& y, int& width, int& height) {
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);
600  }
601 
615  void setAutoROI(int x, int y, int width, int 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);
620  }
621 
622  // Trigger and pairing settings
623 
631  return readIntParameter(internal::StandardParameterIDs::MAX_FRAME_TIME_DIFFERENCE_MS);
632  }
633 
640  void setMaxFrameTimeDifference(int diffMs) {
641  writeIntParameter(internal::StandardParameterIDs::MAX_FRAME_TIME_DIFFERENCE_MS, diffMs);
642  }
643 
649  return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_FREQUENCY);
650  }
651 
656  void setTriggerFrequency(double freq) {
657  writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_FREQUENCY, freq);
658  }
659 
664  return readBoolParameter(internal::StandardParameterIDs::TRIGGER_0_ENABLED);
665  }
666 
670  void setTrigger0Enabled(bool enabled) {
671  writeBoolParameter(internal::StandardParameterIDs::TRIGGER_0_ENABLED, enabled);
672  }
673 
678  return readBoolParameter(internal::StandardParameterIDs::TRIGGER_0_CONSTANT);
679  }
680 
684  void setTrigger0Constant(bool on) {
685  writeBoolParameter(internal::StandardParameterIDs::TRIGGER_0_CONSTANT, on);
686  }
687 
693  return readBoolParameter(internal::StandardParameterIDs::TRIGGER_0_POLARITY);
694  }
695 
700  void setTrigger0Polarity(bool invert) {
701  writeBoolParameter(internal::StandardParameterIDs::TRIGGER_0_POLARITY, invert);
702  }
703 
708  return readBoolParameter(internal::StandardParameterIDs::TRIGGER_1_ENABLED);
709  }
710 
714  void setTrigger1Enabled(bool enabled) {
715  writeBoolParameter(internal::StandardParameterIDs::TRIGGER_1_ENABLED, enabled);
716  }
717 
722  return readBoolParameter(internal::StandardParameterIDs::TRIGGER_1_CONSTANT);
723  }
724 
728  void setTrigger1Constant(bool on) {
729  writeBoolParameter(internal::StandardParameterIDs::TRIGGER_1_CONSTANT, on);
730  }
731 
737  return readBoolParameter(internal::StandardParameterIDs::TRIGGER_1_POLARITY);
738  }
739 
744  void setTrigger1Polarity(bool invert) {
745  writeBoolParameter(internal::StandardParameterIDs::TRIGGER_1_POLARITY, invert);
746  }
747 
755  double getTrigger0PulseWidth(int pulse=0) {
756  switch(pulse) {
757  case 0: return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_0_PULSE_WIDTH);
758  case 1: return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_0B_PULSE_WIDTH);
759  case 2: return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_0C_PULSE_WIDTH);
760  case 3: return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_0D_PULSE_WIDTH);
761  case 4: return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_0E_PULSE_WIDTH);
762  case 5: return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_0F_PULSE_WIDTH);
763  case 6: return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_0G_PULSE_WIDTH);
764  case 7: return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_0H_PULSE_WIDTH);
765  default: return -1;
766  }
767  }
768 
776  void setTrigger0PulseWidth(double width, int pulse=0) {
777  switch(pulse) {
778  case 0: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_0_PULSE_WIDTH, width);break;
779  case 1: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_0B_PULSE_WIDTH, width);break;
780  case 2: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_0C_PULSE_WIDTH, width);break;
781  case 3: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_0D_PULSE_WIDTH, width);break;
782  case 4: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_0E_PULSE_WIDTH, width);break;
783  case 5: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_0F_PULSE_WIDTH, width);break;
784  case 6: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_0G_PULSE_WIDTH, width);break;
785  case 7: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_0H_PULSE_WIDTH, width);break;
786  default: return;
787  }
788  }
789 
797  double getTrigger1PulseWidth(int pulse=0) {
798  switch(pulse) {
799  case 0: return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1_PULSE_WIDTH);
800  case 1: return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1B_PULSE_WIDTH);
801  case 2: return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1C_PULSE_WIDTH);
802  case 3: return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1D_PULSE_WIDTH);
803  case 4: return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1E_PULSE_WIDTH);
804  case 5: return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1F_PULSE_WIDTH);
805  case 6: return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1G_PULSE_WIDTH);
806  case 7: return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1H_PULSE_WIDTH);
807  default: return -1;
808  }
809  }
810 
818  void setTrigger1PulseWidth(double width, int pulse=0) {
819  switch(pulse) {
820  case 0: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1_PULSE_WIDTH, width);break;
821  case 1: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1B_PULSE_WIDTH, width);break;
822  case 2: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1C_PULSE_WIDTH, width);break;
823  case 3: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1D_PULSE_WIDTH, width);break;
824  case 4: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1E_PULSE_WIDTH, width);break;
825  case 5: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1F_PULSE_WIDTH, width);break;
826  case 6: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1G_PULSE_WIDTH, width);break;
827  case 7: writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1H_PULSE_WIDTH, width);break;
828  default: return;
829  }
830  }
831 
836  double getTrigger1Offset() {
837  return readDoubleParameter(internal::StandardParameterIDs::TRIGGER_1_OFFSET);
838  }
839 
844  void setTrigger1Offset(double offset) {
845  writeDoubleParameter(internal::StandardParameterIDs::TRIGGER_1_OFFSET, offset);
846  }
847 
851  bool getInput() {
852  return readBoolParameter(internal::StandardParameterIDs::TRIGGER_INPUT);
853  }
854 
858  void setTrigger1Offset(bool enabled) {
859  writeBoolParameter(internal::StandardParameterIDs::TRIGGER_INPUT, enabled);
860  }
861 
862 
863  // Auto calibration parameters
864 
869  return readBoolParameter(internal::StandardParameterIDs::AUTO_RECALIBRATION_ENABLED);
870  }
871 
875  void setAutoRecalibrationEnabled(bool enabled) {
876  writeBoolParameter(internal::StandardParameterIDs::AUTO_RECALIBRATION_ENABLED, enabled);
877  }
878 
883  return readBoolParameter(internal::StandardParameterIDs::AUTO_RECALIBRATION_PERMANENT);
884  }
885 
889  void setSaveAutoRecalibration(bool save) {
890  writeBoolParameter(internal::StandardParameterIDs::AUTO_RECALIBRATION_PERMANENT, save);
891  }
892 
898  return readBoolParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_ENABLED);
899  }
900 
906  writeBoolParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_ENABLED, enabled);
907  }
908 
922  void getSubpixelOptimizationROI(int& x, int& y, int& width, int& height) {
923  x = readIntParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_X);
924  y = readIntParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_Y);
925  width = readIntParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_WIDTH);
926  height = readIntParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_HEIGHT);
927  }
928 
942  void setSubpixelOptimizationROI(int x, int y, int width, int height) {
943  writeIntParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_X, x);
944  writeIntParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_Y, y);
945  writeIntParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_WIDTH, width);
946  writeIntParameter(internal::StandardParameterIDs::SUBPIXEL_OPTIMIZATION_ROI_HEIGHT, height);
947  }
948 
953  std::map<std::string, ParameterInfo> getAllParameters();
954 
958  template<typename T>
959  void setNamedParameter(const std::string& name, T value);
960 
964  template<typename T>
965  T getNamedParameter(const std::string& name);
966 
967 private:
968  // We (mostly) follow the pimpl idiom here
969  class Pimpl;
970  Pimpl* pimpl;
971 
972  // This class cannot be copied
973  DeviceParameters(const DeviceParameters& other);
974  DeviceParameters& operator=(const DeviceParameters& other);
975 
976  // Generic functions for reading parameters
977  int readIntParameter(int id);
978  double readDoubleParameter(int id);
979  bool readBoolParameter(int id);
980 
981  // Generic functions for writing parameters
982  void writeIntParameter(int id, int value);
983  void writeDoubleParameter(int id, double value);
984  void writeBoolParameter(int id, bool value);
985 
986 };
987 
988 #ifndef DOXYGEN_SHOULD_SKIP_THIS
989 // For source compatibility
990 class DEPRECATED("Use DeviceParameters instead.") SceneScanParameters: public DeviceParameters {
991 };
992 #endif
993 
994 } // namespace
995 
996 #endif
void setTrigger0Constant(bool on)
Sets the constant value that is output when trigger 0 is disabled.
void setTrigger1Enabled(bool enabled)
Enables or disables trigger signal 1.
int getAutoSkippedFrames()
Gets the current interval at which the automatic exposure and gain control is run.
bool getTextureFilterEnabled()
Returns true if the texture filter is enabled.
double getTrigger1PulseWidth(int pulse=0)
Gets the pulse width of trigger signal 1.
void setAutoTargetFrame(TargetFrame target)
Selects the 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. ...
void setAutoROI(int x, int y, int width, int height)
Sets the configured ROI for automatic exposure and gain control.
bool getTrigger1Polarity()
Returns false if trigger1 polarity is active-high (non-inverted) and false if polarity is active-low ...
int getConsistencyCheckSensitivity()
Gets the current sensitivity value for the consistency check.
bool getTrigger1Enabled()
Returns true if trigger signal 1 is enabled.
void setAutoMaxExposureTime(double time)
Sets the maximum exposure time that can be selected automatically.
TargetFrame
Possible options for the target frame selection of the automatic exposure and gain control...
double getAutoIntensityDelta()
Gets the minimum intensity change that is required for adjusting the camera settings.
TargetFrame getAutoTargetFrame()
Gets the selected target frame for automatic exposure and gain control.
int getStereoMatchingP2NoEdge()
Gets the SGM penalty P2 for large disparity changes at image edges.
bool getMaskBorderPixelsEnabled()
Returns true if border pixels are removed from the computed disparity map.
int getSpeckleFilterIterations()
Returns true if the speckle filter is enabled.
void setAutoTargetIntensity(double intensity)
Sets the target image intensity of the automatic exposure and gain control.
void setAutoIntensityDelta(double delta)
Sets the minimum intensity change that is required for adjusting the camera settings.
void setAutoROIEnabled(bool enabled)
Enables or disables an ROI for automatic exposure and gain control.
void setDisparityOffset(int offset)
Sets the offset of the evaluated disparity range.
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).
double getAutoMaxGain()
Gets the maximum gain that can be selected automatically.
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).
OperationMode getOperationMode()
Gets the current operation mode.
void setConsistencyCheckEnabled(bool enabled)
Enables or disables the consistency check.
void setAutoRecalibrationEnabled(bool enabled)
Enables or disables auto-recalibration.
void setOperationMode(OperationMode mode)
Configures the device to a new operation mode.
void setStereoMatchingEdgeSensitivity(int sensitivity)
Sets the edge sensitivity of the SGM algorithm.
double getTrigger0PulseWidth(int pulse=0)
Gets the pulse width of trigger signal 0.
void setTrigger1Constant(bool on)
Sets the constant value that is output when trigger 1 is disabled.
void setTrigger0Enabled(bool enabled)
Enables or disables trigger signal 0.
void setTrigger0PulseWidth(double width, int pulse=0)
Sets the pulse width of trigger signal 0.
bool getTrigger0Polarity()
Returns false if trigger0 polarity is active-high (non-inverted) and false if polarity is active-low ...
void setSubpixelOptimizationROIEnabled(bool enabled)
Enables or disables an ROI for the subpixel optimization algorithm. (if disabled, complete frames are...
void setGapInterpolationEnabled(bool enabled)
Enables or disables the gap interpolation.
int getStereoMatchingEdgeSensitivity()
Gets the edge sensitivity of the SGM algorithm.
double getAutoMaxExposureTime()
Gets the maximum exposure time that can be selected automatically.
double getTriggerFrequency()
Gets the frequency of the trigger signal.
void getAutoROI(int &x, int &y, int &width, int &height)
Gets the configured ROI for automatic exposure and gain control.
bool getSubpixelOptimizationROIEnabled()
Returns true if an ROI for the subpixel optimization algorithm is enabled (otherwise complete frames ...
bool getAutoROIEnabled()
Returns true if an ROI for automatic exposure and gain control is enabled.
void setConsistencyCheckSensitivity(int sensitivity)
Sets a new sensitivity value for the consistency check.
double getTrigger1Offset()
Gets the time offset between trigger signal 1 and signal 0.
bool getUniquenessCheckEnabled()
Returns true if the consistency check is enabled.
bool getInput()
Returns true if the extgernal trigger input is enabled.
void setTriggerFrequency(double freq)
Sets the frequency of the trigger signal.
double getManualGain()
Gets the manually selected gain.
void setSpeckleFilterIterations(int iter)
Enables or disables the speckle filter.
void setSubpixelOptimizationROI(int x, int y, int width, int height)
Sets the configured ROI for the subpixel optimization algorithm.
void setStereoMatchingP1Edge(int p1)
Sets the SGM penalty P1 for small disparity changes at image edges.
void getSubpixelOptimizationROI(int &x, int &y, int &width, int &height)
Gets the configured ROI for the subpixel optimization algorithm.
double getAutoTargetIntensity()
Gets the target image intensity of the automatic exposure and gain control.
void setStereoMatchingP2Edge(int p2)
Sets the SGM penalty P2 for large disparity changes at image edges.
int getMaxFrameTimeDifference()
Gets the maximum allowed time difference between two corresponding frames.
void setTextureFilterSensitivity(int sensitivity)
Sets a new sensitivity value for the texture filter.
int getUniquenessCheckSensitivity()
Gets the current sensitivity value for the uniqueness check.
bool getTrigger0Constant()
Returns the constant value that is output when trigger 0 is disabled.
void setNoiseReductionEnabled(bool enabled)
Enables or disables the noise reduction filter.
Aggregates information about a discovered device.
Definition: deviceinfo.h:47
Allows for configuration of the parameters of a Nerian stereo device through a network connection...
int getTextureFilterSensitivity()
Gets the current sensitivity value for the texture filter.
void setStereoMatchingP2NoEdge(int p2)
Sets the SGM penalty P2 for large disparity changes at image edges.
void setTrigger1PulseWidth(double width, int pulse=0)
Sets the pulse width of trigger signal 1.
void setTrigger1Offset(bool enabled)
Enables or disables the external trigger input.
bool getAutoRecalibrationEnabled()
Returns true if auto re-calibration is enabled.
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.
int getStereoMatchingP1NoEdge()
Gets the SGM penalty P1 for small disparity changes outside image edges.
void setManualExposureTime(double time)
Sets the manually selected exposure time.
int getStereoMatchingP2Edge()
Gets the SGM penalty P2 for large disparity changes at image edges.
int getStereoMatchingP1Edge()
Gets the SGM penalty P1 for small disparity changes at image edges.
void setUniquenessCheckEnabled(bool enabled)
Enables or disables the uniqueness check.
int getDisparityOffset()
Gets the current offset of the evaluated disparity range.
void setUniquenessCheckSensitivity(int sensitivity)
Sets a new sensitivity value for the uniqueness check.
AutoMode getAutoMode()
Gets the current mode of the automatic exposure and gain control.
void setTrigger1Offset(double offset)
Sets the time offset between trigger signal 1 and signal 0.
bool getSaveAutoRecalibration()
Returns true if persistent storage of auto re-calibration results is enabled.
void setAutoMaxGain(double gain)
Gets the maximum gain that can be selected automatically.
void setTextureFilterEnabled(bool enabled)
Enables or disables the texture filter.
double getManualExposureTime()
Gets the manually selected exposure time.
bool getTrigger1Constant()
Returns the constant value that is output when trigger 1 is disabled.
bool getConsistencyCheckEnabled()
Returns true if the consistency check is enabled.
bool getTrigger0Enabled()
Returns true if trigger signal 0 is enabled.
void setStereoMatchingP1NoEdge(int p1)
Sets the SGM penalty P1 for small disparity changes outside image edges.
AutoMode
Possible modes of the automatic exposure and gain control.
bool getNoiseReductionEnabled()
Returns true if the noise reduction filter is enabled.
void setMaxFrameTimeDifference(int diffMs)
Sets the maximum allowed time difference between two corresponding frames.
bool getGapInterpolationEnabled()
Returns true if the texture gap interpolation is enabled.
void setAutoMode(AutoMode mode)
Sets the current mode of the automatic exposure and gain control.
void setManualGain(double gain)
Sets the manually selected gain.
OperationMode
Operation modes supported by Nerian stereo devices.
Nerian Vision Technologies