IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
CannyEdges2dImgLvl3.h
1 // CannyEdges2dImgLvl3.h:
3 // ----------------------
4 //
14 
15 #ifndef __IPSDKIPLFEATUREDETECTION_CANNYEDGES2DIMGLVL3_H__
16 #define __IPSDKIPLFEATUREDETECTION_CANNYEDGES2DIMGLVL3_H__
17 
20 
21 // Attributes headers
22 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/YStrip2d/OutYStrip2d.h>
23 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/YStrip2dWithKernel/InGxKnlYStrip2d.h>
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/YStrip2dWithKernel/InGyKnlYStrip2d.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InCannyThresholds.h>
26 
27 namespace ipsdk {
28 namespace imaproc {
29 namespace fd {
30 
33 
34 // declare processing algorithm
35 IPSDK_DECLARE_PROCESSING_ALGORITHM(IPSDKIPLFeatureDetection, CannyEdges2dImg,
37  (((ipsdk)(imaproc)(attr))(InGxKnlYStrip2d))
38  (((ipsdk)(imaproc)(attr))(InGyKnlYStrip2d))
39  (((ipsdk)(imaproc)(attr))(InCannyThresholds))
40  (((ipsdk)(imaproc)(attr))(OutYStrip2d)))
41 
42  // implementation of image processing data identifier retrieval method
43  // for function selector usage
44  IPSDK_DECLARE_ALGORITHM_FUNCTION_SELECTOR(((STRIP)(InGxKnlYStrip2d)));
45 
46  // declaration of parsed data during processing
47  IPSDK_DECLARE_ALGORITHM_PARSED_DATA(((LINESTRIP)(InGxKnlYStrip2d))
48  ((LINESTRIP)(InGyKnlYStrip2d))
49  ((LINESTRIP)(OutYStrip2d)));
50 
51 // methods
52 public:
53 
54 protected:
56  template <typename BufInType,
57  ipsdk::eInstructionSet::domain IS>
58  ipsdk::BoolResult genericProcessFunction(const ipsdk::processor::ProcessingInfo& info);
59 
60  template <typename BufInType, typename GradientMagT, ipsdk::eInstructionSet::domain IS>
61  ipsdk::BoolResult processFunction(const ipsdk::processor::ProcessingInfo& info);
62 
63  template <typename T, ipsdk::eInstructionSet::domain IS>
64  void applySobel_yOp(
65  const FragHybridBufferPtr& pGxSepX,
66  const FragHybridBufferPtr& pGySepX,
67  ipUInt32 nFirstRowIdx,
68  T* pGxBuf,
69  T* pGyBuf,
70  ipUInt64 nbElts);
71 
72  template <typename BufInType, typename MagT, ipsdk::eInstructionSet::domain IS>
73  void computeGradientMagnitudeSquare(
74  const FragHybridBufferPtr& pGMag,
76 
78 
79 // attributes
80 protected:
81  FragHybridBufferPtr _pGMagnitudeInitial;
82  FragHybridBufferPtr _pGMagnitudeMain;
83  FragHybridBufferPtr _pGMagnitudeFinal;
84 };
85 
88 
89 } // end of namespace fd
90 } // end of namespace imaproc
91 } // end of namespace ipsdk
92 
93 #endif // __IPSDKIPLFEATUREDETECTION_CANNYEDGES2DIMGLVL3_H__
boost::shared_ptr< FragHybridBuffer > FragHybridBufferPtr
uint64_t ipUInt64
IPSDKBASEPROCESSING_API RulePtr none()
ipsdk::core::ExecResult preProcess()
method called before processing
Definition of import/export macro for library.
ProcessingResult< eExecutionResult > ExecResult
#define IPSDK_DECLARE_PROCESSING_ALGORITHM(libraryName, algoName, RuleString, attributeSeq)
#define IPSDK_DECLARE_ALGORITHM_PARSED_DATA(dataSeq)
#define IPSDK_DECLARE_ALGORITHM_FUNCTION_SELECTOR(dataTypeSeq)
uint32_t ipUInt32