IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
CannyEdges2dImgLvl1.h
1 // CannyEdges2dImgLvl1.h:
3 // ----------------------
4 //
14 
15 #ifndef __IPSDKIPLFEATUREDETECTION_CANNYEDGES2DIMGLVL1_H__
16 #define __IPSDKIPLFEATUREDETECTION_CANNYEDGES2DIMGLVL1_H__
17 
21 
22 // Attributes headers
23 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/2d/InGxGreyImg2d.h>
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/2d/InGyGreyImg2d.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Working/Optional/OutOptWk1BinImg.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Working/Optional/OutOptWk2BinImg.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Working/Optional/OutOptWk1LabelImg.h>
28 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/OutBinImg.h>
29 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Enumerate/InOptOptimizationPolicy.h>
30 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InCannyThresholds.h>
31 
32 namespace ipsdk {
33 namespace imaproc {
34 
35 namespace advmorpho {
36 
37 class ConnectedComponent2dImgLvl1;
38 
39 } // end of namespace advmorpho
40 
41 namespace fd {
42 
45 
46 // declare processor class
47 IPSDK_DECLARE_LVL1_PROCESSOR(REP_ASYNC1, IPSDKIPLFeatureDetection, CannyEdges2dImg,
48  ipsdk::imaproc::matchSizeAndType(_pInGxGreyImg2d, _pInGyGreyImg2d) &&
49  ipsdk::imaproc::matchSize(_pInGxGreyImg2d, _pOutBinImg) &&
50  (ipsdk::processor::ifIsSet(_pOutOptWk1BinImg,
51  (ipsdk::imaproc::matchSize(_pInGxGreyImg2d, _pOutOptWk1BinImg)))) &&
52  (ipsdk::processor::ifIsSet(_pOutOptWk2BinImg,
53  (ipsdk::imaproc::matchSize(_pInGxGreyImg2d, _pOutOptWk2BinImg)))) &&
54  (ipsdk::processor::ifIsSet(_pOutOptWk1LabelImg,
55  (ipsdk::imaproc::matchSize(_pInGxGreyImg2d, _pOutOptWk1LabelImg)))),
56  (((ipsdk)(imaproc)(attr))(InGxGreyImg2d))
57  (((ipsdk)(imaproc)(attr))(InGyGreyImg2d))
58  (((ipsdk)(imaproc)(attr))(InCannyThresholds))
59  (((ipsdk)(imaproc)(attr))(InOptOptimizationPolicy))
60  (((ipsdk)(imaproc)(attr))(OutOptWk1BinImg))
61  (((ipsdk)(imaproc)(attr))(OutOptWk2BinImg))
62  (((ipsdk)(imaproc)(attr))(OutOptWk1LabelImg))
63  (((ipsdk)(imaproc)(attr))(OutBinImg)(ipsdk::imaproc::duplicateInOut)(_pInGxGreyImg2d)(ipsdk::image::eImageBufferType::eIBT_Binary)))
64 
65 // methods
66 public:
67 
68 protected:
69  processor::RetrievalResult retrieveFirstProvider(const core::BasePriority& priority,
70  core::ActionProviderPtr& pProvider);
71 
72  processor::RetrievalResult retrieveSecondProvider(const core::BasePriority& priority,
73  core::ActionProviderPtr& pProvider);
74 
75  processor::RetrievalResult retrieveThirdProvider(const core::BasePriority& priority,
76  core::ActionProviderPtr& pProvider);
77 
78  processor::RetrievalResult retrieveFourthProvider(const core::BasePriority& priority,
79  core::ActionProviderPtr& pProvider);
80 
81  processor::RetrievalResult retrieveFifthProvider(const core::BasePriority& priority,
82  core::ActionProviderPtr& pProvider);
83 
84  processor::RetrievalResult retrieveSixthProvider(const core::BasePriority& priority,
85  core::ActionProviderPtr& pProvider);
86 
87  processor::RetrievalResult retrieveThresholdImgProvider(const core::BasePriority& priority,
88  core::ActionProviderPtr& pProvider);
89 
90 // attributes
91 protected:
93  boost::shared_ptr<advmorpho::ConnectedComponent2dImgLvl1> _pConnectedComponent2dImgLvl1;
94 };
95 
98 
99 } // end of namespace fd
100 } // end of namespace imaproc
101 } // end of namespace ipsdk
102 
103 #endif // __IPSDKIPLFEATUREDETECTION_CANNYEDGES2DIMGLVL1_H__
ProcessingResult< eRetrievalResultType > RetrievalResult
#define IPSDK_DECLARE_LVL1_PROCESSOR(ProcType, libraryName, algoName, RuleString, attributeSeq)
processor::OutputInitializerPtr duplicateInOut(const boost::weak_ptr< OutputAttributeType > &pOutputAttribute, const boost::weak_ptr< InputAttributeType > &pInputAttribute, const eImageInitializerStoragePolicy &storagePolicy=eImageInitializerStoragePolicy::eIISP_Inherit)
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< BaseActionProvider > ActionProviderPtr