GenericPointerMessage(const std::string& frame_id = "/", Message::Stamp stamp = 0) : Message(type<GenericPointerMessage<Type>>::name(), frame_id, stamp) { static csapex::DirectMessageConstructorRegistered<connection_types::GenericPointerMessage, Type> reg_c; static csapex::DirectMessageSerializerRegistered<connection_types::GenericPointerMessage, Type> reg_s; setDescriptiveName(type2name(typeid(Type))); }
// ###################################################################### IntegerDirectionChannel:: IntegerDirectionChannel(OptionManager& mgr, const uint dirIndex, const double direction, const int dxnumer, const int dynumer, const uint denombits, nub::ref<IntegerMathEngine> eng) : IntegerSimpleChannel(mgr, "", "", MOTION, rutz::make_shared (new IntgReichardtPyrBuilder (dxnumer, dynumer, denombits, eng->getImath())), eng), itsIndex("IntegerDirectionChannelIndex", this, dirIndex), itsDirection("IntegerDirectionChannelDirection", this, direction), itsThresh(&OPT_DirectionChannelLowThresh, this) { GVX_TRACE(__PRETTY_FUNCTION__); itsTakeAbs.setVal(true); itsNormalizeOutput.setVal(true); itsScaleNoiseToMax.setVal(true); // kill small values in pyramid: const float fthresh = itsThresh.getVal(); itsLowThresh.setVal(intgScaleFromFloat(&fthresh, this->getImath()->nbits)); // kill negative values in pyramid: itsRectifyPyramid.setVal(true); setDescriptiveName(sformat("Integer Direction(%d)", int(direction))); setTagName(sformat("int-dir_%d", dirIndex)); }
// ###################################################################### // ColorBandChannel member definitions: // ###################################################################### ColorBandChannel::ColorBandChannel(OptionManager& mgr, const uint bandidx) : SingleChannel(mgr, "", "", COLBAND, rutz::make_shared(new GaussianPyrBuilder<float>(5))), itsBandIndex("ColorBandChannelIndex", this, bandidx) { itsTakeAbs.setVal(true); itsNormalizeOutput.setVal(true); setDescriptiveName(sformat("ColorBand(%d)", bandidx)); setTagName(sformat("cband_%d", bandidx)); }
// ###################################################################### DirectFeedChannel::DirectFeedChannel(OptionManager& mgr, int id) : ChannelBase(mgr, "DirectFeed", "DirectFeed", DIRECTFEED), itsMapLevel(&OPT_MapLevel, this), itsNormType(&OPT_MaxNormType, this), itsUseOlderVersion(&OPT_UseOlderVersion, this), // see Channels/ChannelOpts.{H,C} itsOutputRangeMin(&OPT_ChannelOutputRangeMin, this), itsOutputRangeMax(&OPT_ChannelOutputRangeMax, this) { if (id >= 0) { std::string name("DirectFeed_No_"); name += toStr(id); setTagName(name); setDescriptiveName(name); } }
// ###################################################################### DirectionChannel::DirectionChannel(OptionManager& mgr, const uint dirIndex, const double direction, const PyramidType type) : SingleChannel(mgr, "", "", MOTION, rutz::make_shared(new ReichardtPyrBuilder<float> (cos(direction * M_PI / 180.0), -sin(direction * M_PI / 180.0), type, direction + 90.0))), itsIndex("DirectionChannelIndex", this, dirIndex), itsDirection("DirectionChannelDirection", this, direction), itsTakeSqrt(&OPT_DirectionChannelTakeSqrt, this), itsThresh(&OPT_DirectionChannelLowThresh, this) { GVX_TRACE(__PRETTY_FUNCTION__); itsTakeAbs.setVal(true); itsNormalizeOutput.setVal(true); itsScaleNoiseToMax.setVal(true); itsLowThresh.setVal(itsThresh.getVal()); // kill small values in pyramid itsRectifyPyramid.setVal(true); // kill negative values in pyramid setDescriptiveName(sformat("Direction(%d)", int(direction))); setTagName(sformat("dir_%d", dirIndex)); }