IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
HoughCircles2dLvl1.h
1 // HoughCircles2dLvl1.h:
3 // ---------------------
4 //
14 
15 #ifndef __IPSDKIPLFEATUREDETECTION_HOUGHCIRCLES2DLVL1_H__
16 #define __IPSDKIPLFEATUREDETECTION_HOUGHCIRCLES2DLVL1_H__
17 
22 
23 // Attributes headers
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InOptHoughCirclesRadiusRange.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/OutPIHoughCircles2dPpties.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Enumerate/InOptCircleIntensityType.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/2d/Optional/InOptGxGreyImg2d.h>
28 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/2d/Optional/InOptGyGreyImg2d.h>
29 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/2d/Optional/InOptGreyImg2d.h>
30 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/2d/Optional/OutOptGxGreyImg2d.h>
31 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/2d/Optional/OutOptGyGreyImg2d.h>
32 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Optional/OutOptRealImg1.h>
33 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Optional/OutOptRealImg2.h>
34 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InOptAccumIntensityThreshold.h>
35 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InOptMaxAngleWithGradDir.h>
36 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InOptNbMaxPtsPerCircle.h>
37 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InOptRemoveTooCloseCirclesParams.h>
38 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Enumerate/InOptHoughCircles2dAlgoMethod.h>
39 
40 namespace ipsdk {
41 namespace imaproc {
42 namespace fd {
43 
46 
47 // declare processor class
48 IPSDK_DECLARE_LVL1_PROCESSOR(ASYNC2, IPSDKIPLFeatureDetection, HoughCircles2d,
50  ipsdk::processor::Not(ipsdk::processor::isSet(_pInOptGxGreyImg2d)) &&
51  ipsdk::processor::Not(ipsdk::processor::isSet(_pInOptGyGreyImg2d)) &&
52  ipsdk::imaproc::matchSize<ipsdk::imaproc::attr::HoughCirclesRadiusRange::MaxRadius>(
53  ipsdk::imaproc::eMatchImageSizeType::eMIST_2d,
54  ipsdk::imaproc::eMatchImageSizeScale::eMISS_HalfSize,
55  _pInOptGreyImg2d,
56  _pInOptHoughCirclesRadiusRange) &&
57  ipsdk::processor::If(ipsdk::processor::isSet(_pOutOptGxGreyImg2d),
58  ipsdk::imaproc::matchSize(_pInOptGreyImg2d, _pOutOptGxGreyImg2d)) &&
59  ipsdk::processor::If(ipsdk::processor::isSet(_pOutOptGyGreyImg2d),
60  ipsdk::imaproc::matchSize(_pInOptGreyImg2d, _pOutOptGyGreyImg2d)) &&
61  ipsdk::processor::ifIsSet(_pOutOptRealImg1,
62  ipsdk::imaproc::matchSize(_pInOptGreyImg2d, _pOutOptRealImg1)) &&
63  ipsdk::processor::ifIsSet(_pOutOptRealImg2,
64  ipsdk::imaproc::matchSize(_pInOptGreyImg2d, _pOutOptRealImg2)),
65 
66  ipsdk::processor::isSet(_pInOptGxGreyImg2d) &&
67  ipsdk::processor::isSet(_pInOptGyGreyImg2d) &&
68  ipsdk::imaproc::matchSizeAndType(_pInOptGxGreyImg2d, _pInOptGyGreyImg2d) &&
69  ipsdk::imaproc::matchSize<ipsdk::imaproc::attr::HoughCirclesRadiusRange::MaxRadius>(
70  ipsdk::imaproc::eMatchImageSizeType::eMIST_2d,
71  ipsdk::imaproc::eMatchImageSizeScale::eMISS_HalfSize,
72  _pInOptGxGreyImg2d,
73  _pInOptHoughCirclesRadiusRange) &&
74  ipsdk::processor::ifIsSet(_pOutOptRealImg1,
75  ipsdk::imaproc::matchSize(_pInOptGxGreyImg2d, _pOutOptRealImg1)) &&
76  ipsdk::processor::ifIsSet(_pOutOptRealImg2,
77  ipsdk::imaproc::matchSize(_pInOptGxGreyImg2d, _pOutOptRealImg2)))),
78  (((ipsdk)(imaproc)(attr))(InOptGreyImg2d))
79  (((ipsdk)(imaproc)(attr))(InOptGxGreyImg2d))
80  (((ipsdk)(imaproc)(attr))(InOptGyGreyImg2d))
81  (((ipsdk)(imaproc)(attr))(InOptHoughCircles2dAlgoMethod))
82  (((ipsdk)(imaproc)(attr))(InOptCircleIntensityType))
83  (((ipsdk)(imaproc)(attr))(InOptMaxAngleWithGradDir))
84  (((ipsdk)(imaproc)(attr))(InOptNbMaxPtsPerCircle))
85  (((ipsdk)(imaproc)(attr))(InOptHoughCirclesRadiusRange))
86  (((ipsdk)(imaproc)(attr))(InOptAccumIntensityThreshold))
87  (((ipsdk)(imaproc)(attr))(InOptRemoveTooCloseCirclesParams))
88  (((ipsdk)(imaproc)(attr))(OutOptRealImg1))
89  (((ipsdk)(imaproc)(attr))(OutOptRealImg2))
90  (((ipsdk)(imaproc)(attr))(OutOptGxGreyImg2d))
91  (((ipsdk)(imaproc)(attr))(OutOptGyGreyImg2d))
92  (((ipsdk)(imaproc)(attr))(OutPIHoughCircles2dPpties)(ipsdk::processor::allocate)))
93 
94 // methods
95 public:
96 
97 protected:
98  processor::RetrievalResult provideProcessor(const boost::shared_ptr<core::BaseAction>& pProcessor,
99  const core::BasePriority& priority,
100  core::ActionProviderPtr& pProvider);
101 
102  processor::RetrievalResult gaussianGradient(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
103 
104 // attributes
105 protected:
107  ipsdk::image::ImageConstPtr _pGxImgConst;
108  ipsdk::image::ImageConstPtr _pGyImgConst;
109 
110 
111 };
112 
115 
116 } // end of namespace fd
117 } // end of namespace imaproc
118 } // end of namespace ipsdk
119 
120 #endif // __IPSDKIPLFEATUREDETECTION_HOUGHCIRCLES2DLVL1_H__
ProcessingResult< eRetrievalResultType > RetrievalResult
#define IPSDK_DECLARE_LVL1_PROCESSOR(ProcType, libraryName, algoName, RuleString, attributeSeq)
IPSDKBASEPROCESSING_API RulePtr Not(const RulePtr &pRule)
Definition of import/export macro for library.
boost::enable_if_c< AttributeType::g_bOptional, RulePtr >::type ifIsSet(const boost::shared_ptr< AttributeType > &pAttribute, const RulePtr &pRuleTrue)
boost::shared_ptr< const BaseImage > ImageConstPtr
processor::OutputInitializerPtr allocate(const boost::weak_ptr< OutputAttributeType > &pOutputAttribute)
boost::enable_if_c< AttributeType::g_bOptional, RulePtr >::type isSet(const boost::shared_ptr< AttributeType > &pAttribute)
boost::shared_ptr< BaseActionProvider > ActionProviderPtr
IPSDKBASEPROCESSING_API RulePtr If(const RulePtr &pPredicate, const RulePtr &pRuleTrue)