gst-plugins-vision icon indicating copy to clipboard operation
gst-plugins-vision copied to clipboard

pylonsrc: duplicate feature names

Open mrstecklo opened this issue 4 years ago • 5 comments

Different models of Basler cameras have different names for similar features. For example AcquisitionFrameRateAbs and AcquisitionFrameRate. Plugin can be modified to try all possible aliases is those cases. Care must be taken though as some features are related but not equivalent. For example Gain and GainRaw, where Gain = f (GainRaw) and f() depends on a camera model.

Basler features documentation

I'll try to list all features with duplicate names. At least those already implemented in plugin. And then I'll develop a way to handle them. Any help is welcome

mrstecklo avatar Jan 27 '21 11:01 mrstecklo

Some of the features I've found

Name ------------------------- Alias-------------------------- Related not equivalent

ExposureTime ---------------- ExposureTimeAbs
AutoExposureTimeLowerLimit -- AutoExposureTimeAbsLowerLimit
AutoExposureTimeUpperLimit -- AutoExposureTimeAbsUpperLimit
WidthMax -------------------- IntegerFeatureMax(Width)
HeightMax ------------------- IntegerFeatureMax(Height)
AcquisitionFrameRate -------- AcquisitionFrameRateAbs
BalanceRatio ---------------- BalanceRatioAbs
BlackLevel --------------------------------------------------- BlackLevelRaw
GammaEnable ----------------- []
ColorAdjustmentEnable ------- []
ColorAdjustmentSelector ----- BslColorAdjustmentSelector
ColorAdjustmentHue ---------- BslColorAdjustmentHue ---------- ColorAdjustmentHueRaw
ColorAdjustmentSaturetion --- BslColorAdjustmentSaturation --- ColorAdjustmentSaturationRaw
Gain --------------------------------------------------------- GainRaw
AutoGainLowerLimit ------------------------------------------- AutoGainRawLowerLimit
AutoGainUpperLimit ------------------------------------------- AutoGainRawUpperLimit
CenterX ------------------------------------------------------ BslCenterX
CenterY ------------------------------------------------------ BslCenterY
LightSourceSelector ------------------------------------------ LightSourcePreset

mrstecklo avatar Jan 28 '21 10:01 mrstecklo

Some more features. And with the previous comment it is (almost) a complete list of features with duplicates already implemented in pylonsrc.

Name ------------------------- Alias-------------------------- Related not equivalent

FrameBurstStart ------------- Acquisition Start
DemosaicingMode ---------------------------------------------- PgiMode
NoiseReduction -------------- NoiseReductionAbs
SharpnessEnhancement -------- SharpnessEnhancementAbs
AutoTargetBrightness ----------------------------------------- AutoTargetValue
GainMinimum ----------------- MinimizeGain
ExposureMinimum ------------- MinimizeExposureTime

mrstecklo avatar Feb 01 '21 09:02 mrstecklo

At first I thought that feature name strings could be extended to an array of aliases. this would introduce a generic way to handle duplicates. But it also has a big overhead on features with no aliases. So I think that we should simply add required checks for proper names.

As for features like Gain and GainRaw that implement related feature but their values are not equivalent. Those are never both supported by a given camera. So I think they can be safely treated as aliases by the plugin. Assuming than user is aware of which version of a feature is implemented in their camera.

During my research I've also noticed that gst_pylonsrc_set_colour_transformation is probably erroneous. See code example in Basler documentation on color transformation

mrstecklo avatar Feb 01 '21 09:02 mrstecklo

Thanks for gathering these, unfortunate that Pylon doesn't transparently handle changed names.

joshdoe avatar Feb 01 '21 11:02 joshdoe

The difference on feature naming is encoded in SFNC version supported ( GetSfncVersion() )

Check the Basler pylon c++ documentation regarding ( MigrationMode and "Migrating Existing Code for Using SFNC 2.x-Based Camera Devices" ) There we offer the tables of feature names that have direct counterparts, describe the automatic "MigrationMode" feature and the very advanced features, that are different in implementation, and need a different programming model.

thiesmoeller avatar Mar 12 '21 14:03 thiesmoeller