ICF 3.0.5.47
Technical documentation of ICF Libraries
iipr::CCaliperLineFinderComp Class Reference

Caliper based line finder. More...

#include <CCaliperLineFinderComp.h>

Inheritance diagram for iipr::CCaliperLineFinderComp:
Collaboration diagram for iipr::CCaliperLineFinderComp:

Public Types

typedef iproc::TSyncProcessorCompBase< IImageToFeatureProcessorBaseClass
 
- Public Types inherited from iproc::TSyncProcessorCompBase< IImageToFeatureProcessor >
typedef ilog::CLoggerComponentBase BaseClass
 
typedef iproc::TSyncProcessorWrap< IImageToFeatureProcessor > BaseClass2
 
typedef IImageToFeatureProcessor InterfaceType
 
- Public Types inherited from ilog::TLoggerCompWrap< Base >
enum  MessageId { MI_BAD_DEPENDENCY = 0x8a340 }
 
typedef Base BaseClass
 
typedef ilog::CLoggerBase BaseClass2
 
- Public Types inherited from iproc::TSyncProcessorWrap< IImageToFeatureProcessor >
typedef IImageToFeatureProcessor BaseClass
 

Public Member Functions

 CCaliperLineFinderComp ()
 
virtual iproc::CTaskState DoExtractFeatures (const iprm::IParamsSet *paramsPtr, const iimg::IBitmap &image, IFeaturesConsumer &results, iproc::IProgressManager *progressManagerPtr=nullptr) override
 
virtual iproc::CTaskState DoProcessing (const iprm::IParamsSet *paramsPtr, const istd::IPolymorphic *inputPtr, istd::IChangeable *outputPtr, bool allowAsync=false, iproc::IProgressManager *progressManagerPtr=nullptr) override
 
- Public Member Functions inherited from ilog::CLoggerBase
 CLoggerBase ()
 
const QByteArray & GetVerboseSenderId () const
 Get sender ID for verbose messages.
 
void SetVerboseSenderId (const QByteArray &id)
 Set sender ID for verbose messages.
 
void SetLogPtr (ilog::IMessageConsumer *logPtr) override
 Install log.
 
ilog::IMessageConsumerGetLogPtr () const override
 Get log.
 
- Public Member Functions inherited from ilog::ILoggable
- Public Member Functions inherited from iproc::TSyncProcessorWrap< IImageToFeatureProcessor >
 TSyncProcessorWrap ()
 
int GetProcessorState (const iprm::IParamsSet *paramsPtr) const override
 
bool AreParamsAccepted (const iprm::IParamsSet *paramsPtr, const istd::IPolymorphic *inputPtr, const istd::IChangeable *outputPtr) const override
 
void InitProcessor (const iprm::IParamsSet *paramsPtr, bool doReset) override
 

Static Public Member Functions

static double CalculateLine (const i2d::CVector2d &direction, double minOutliersDist, Rays &rays, i2d::CLine2d &result)
 Calculate line based on the list of rays.
 
static double CalculateParallelLines (const i2d::CVector2d &direction, double minOutliersDist, Rays &inRays, Rays &outRays, i2d::CParallelogram &result)
 Calculate parallel lines based on the list of rays.
 

Protected Member Functions

double DoFindSingleLine (const iprm::IParamsSet *paramsPtr, const iimg::IBitmap &image, i2d::CLine2d &result)
 
double DoFindParallelLines (const iprm::IParamsSet *paramsPtr, const iimg::IBitmap &image, i2d::CParallelogram &result)
 
bool CalcRays (const iprm::IParamsSet *paramsPtr, const iimg::IBitmap &image, Rays &inRays, Rays &outRays, double &minOutlierDist)
 
void AddIntermediateResults (const Rays &outRays, const QString &name)
 
void OnComponentCreated () override
 
- Protected Member Functions inherited from ilog::TLoggerCompWrap< Base >
virtual void DecorateMessage (istd::IInformationProvider::InformationCategory category, int id, int flags, QString &message, QString &messageSource) const override
 Decorate message parts before outputting.
 
void OnComponentCreated () override
 
void OnComponentDestroyed () override
 
- Protected Member Functions inherited from ilog::CLoggerBase
bool IsVerboseEnabled () const
 Check if verbose messages are enabled.
 
bool SendVerboseMessage (const QString &message, const QString &messageSource=QString()) const
 Send verbose message.
 
bool SendInfoMessage (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send info message to log.
 
bool SendWarningMessage (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send warning message to log.
 
bool SendErrorMessage (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send error message to log.
 
bool SendCriticalMessage (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send critical message to log.
 
bool SendInfoMessageOnce (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send once info message to log.
 
bool SendWarningMessageOnce (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send once warning message to log.
 
bool SendErrorMessageOnce (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send once error message to log.
 
bool SendCriticalMessageOnce (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send once critical message to log.
 
bool SendUserMessage (const istd::IInformationProvider *messagePtr) const
 Send message with user object.
 
bool AllowMessageOnceAgain (int id)
 Reset message lock.
 
bool IsLogConsumed (const istd::IInformationProvider::InformationCategory *categoryPtr=nullptr, const int *flagsPtr=nullptr) const override
 Check if any log message is consumed.
 
bool SendLogMessage (istd::IInformationProvider::InformationCategory category, int id, const QString &message, const QString &messageSource, int flags=0) const override
 Send any message to log.
 
- Protected Member Functions inherited from istd::ILogger

Additional Inherited Members

- Protected Types inherited from iipr::CCaliperFinderBase
typedef std::vector< RayRays
 
- Static Protected Member Functions inherited from iipr::CCaliperFinderBase
static void AddProjectionResultsToRays (const i2d::CLine2d &projectionLine, const iprm::IParamsSet &params, const IFeaturesProvider &container, const IFeatureToImageMapper &featuresMapper, const i2d::ICalibration2d *resultCalibPtr, Rays &inRays, Rays &outRays)
 
static bool DecomposeToLines (const istd::IChangeable &aoiObject, int maxRays, bool allowComposed, i2d::CVector2d &suggestedCenter, std::function< bool(const i2d::CLine2d &)> lineFn)
 Decompose some aoi object to single line calls.
 
static bool DecomposeAnnulus (const i2d::CAnnulus &annulus, int maxRays, i2d::CVector2d &suggestedCenter, std::function< bool(const i2d::CLine2d &)> lineFn)
 Decompose anulus to single line calls.
 
static bool DecomposeRect (const i2d::CRectangle &rect, int maxRays, i2d::CVector2d &suggestedCenter, std::function< bool(const i2d::CLine2d &)> lineFn)
 Decompose rectangle to single line calls.
 
static int AddAoiToRays (const istd::IChangeable &aoiObject, iproc::IProcessor &caliper, const QByteArray &lineParamId, const iprm::IParamsSet *paramsPtr, const IFeatureToImageMapper &featuresMapper, const i2d::ICalibration2d *resultCalibPtr, const iimg::IBitmap &image, const iipr::ICaliperFinderParams &finderParams, bool allowComposed, Rays &inRays, Rays &outRays, i2d::CVector2d &suggestedCenter)
 Add some aoi object to the lists of rays.
 
- Protected Attributes inherited from ilog::CLoggerBase
QSet< int > m_onceMessageIds
 

Detailed Description

Caliper based line finder.

This is realized as processor, as input the image, as output consumer of features must be given. It uses set of 1D caliper lines to find the position and radius of circle. It takes area of interests (AOI) from parameter set. As AOI can be used annulus, segment of annulus, rectangle and set of segments of annulus.

Definition at line 35 of file CCaliperLineFinderComp.h.

Member Typedef Documentation

◆ BaseClass

Constructor & Destructor Documentation

◆ CCaliperLineFinderComp()

iipr::CCaliperLineFinderComp::CCaliperLineFinderComp ( )

Member Function Documentation

◆ AddIntermediateResults()

void iipr::CCaliperLineFinderComp::AddIntermediateResults ( const Rays & outRays,
const QString & name )
protected

◆ CalcRays()

bool iipr::CCaliperLineFinderComp::CalcRays ( const iprm::IParamsSet * paramsPtr,
const iimg::IBitmap & image,
Rays & inRays,
Rays & outRays,
double & minOutlierDist )
protected

◆ CalculateLine()

static double iipr::CCaliperLineFinderComp::CalculateLine ( const i2d::CVector2d & direction,
double minOutliersDist,
Rays & rays,
i2d::CLine2d & result )
static

Calculate line based on the list of rays.

Parameters
directionapproximated line direction, will be base to optimization.
minOutliersDistminimal outlier distance or negative value, if disabled.
rayslist of rays, the selection will be set inside.
resultresult line.

◆ CalculateParallelLines()

static double iipr::CCaliperLineFinderComp::CalculateParallelLines ( const i2d::CVector2d & direction,
double minOutliersDist,
Rays & inRays,
Rays & outRays,
i2d::CParallelogram & result )
static

Calculate parallel lines based on the list of rays.

Parameters
directionapproximated line direction, will be base to optimization.
minOutliersDistminimal outlier distance or negative value, if disabled.
rayslist of rays, the selection will be set inside.
resultresult parallelogram.

◆ DoExtractFeatures()

virtual iproc::CTaskState iipr::CCaliperLineFinderComp::DoExtractFeatures ( const iprm::IParamsSet * paramsPtr,
const iimg::IBitmap & image,
IFeaturesConsumer & results,
iproc::IProgressManager * progressManagerPtr = nullptr )
overridevirtual

◆ DoFindParallelLines()

double iipr::CCaliperLineFinderComp::DoFindParallelLines ( const iprm::IParamsSet * paramsPtr,
const iimg::IBitmap & image,
i2d::CParallelogram & result )
protected

◆ DoFindSingleLine()

double iipr::CCaliperLineFinderComp::DoFindSingleLine ( const iprm::IParamsSet * paramsPtr,
const iimg::IBitmap & image,
i2d::CLine2d & result )
protected

◆ DoProcessing()

virtual iproc::CTaskState iipr::CCaliperLineFinderComp::DoProcessing ( const iprm::IParamsSet * paramsPtr,
const istd::IPolymorphic * inputPtr,
istd::IChangeable * outputPtr,
bool allowAsync = false,
iproc::IProgressManager * progressManagerPtr = nullptr )
overridevirtual

◆ OnComponentCreated()

void iipr::CCaliperLineFinderComp::OnComponentCreated ( )
overrideprotected

The documentation for this class was generated from the following file:

© Witold Gantzke and Kirill Lepskiy