IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
HoughLinesGradient2dImgLvl3.h
1 // HoughLinesGradient2dImgLvl3.h:
3 // ----------------------
4 //
14 
15 #ifndef __IPSDKIPLFEATUREDETECTION_HOUGHLINESGRADIENT2DIMGLVL3_H__
16 #define __IPSDKIPLFEATUREDETECTION_HOUGHLINESGRADIENT2DIMGLVL3_H__
17 
20 
21 // Attributes headers
22 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InOptHoughLinesGradientImgParams.h>
23 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/OutRealImg.h>
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/YStrip2d/InGxYStrip2d.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/YStrip2d/InGyYStrip2d.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InOptHoughLinesOrientationTolerance.h>
27 
29 
30 namespace ipsdk {
31 namespace imaproc {
32 namespace fd {
33 
36 
37 // declare processing algorithm
38 IPSDK_DECLARE_PROCESSING_ALGORITHM(IPSDKIPLFeatureDetection, HoughLinesGradient2dImg,
40  (((ipsdk)(imaproc)(attr))(InGxYStrip2d))
41  (((ipsdk)(imaproc)(attr))(InGyYStrip2d))
42  (((ipsdk)(imaproc)(attr))(InOptHoughLinesGradientImgParams))
43  (((ipsdk)(imaproc)(attr))(InOptHoughLinesOrientationTolerance))
44  (((ipsdk)(imaproc)(attr))(OutRealImg)))
45 
46  // implementation of image processing data identifier retrieval method
47  // for function selector usage
48  IPSDK_DECLARE_ALGORITHM_FUNCTION_SELECTOR(((STRIP)(InGxYStrip2d)));
49 
50  // declaration of parsed data during processing
51  IPSDK_DECLARE_ALGORITHM_PARSED_DATA(((LINESTRIP)(InGxYStrip2d))
52  ((LINESTRIP)(InGyYStrip2d)));
53 
54 // methods
55 public:
56  void setRowsMutexColl(const boost::shared_ptr<std::vector<boost::shared_ptr<boost::mutex> > >& pRowsMutexColl);
57 
58 protected:
59 
61  template <typename BufInType,
62  ipsdk::eInstructionSet::domain IS>
63  ipsdk::BoolResult genericProcessFunction(const ipsdk::processor::ProcessingInfo& info);
64 
65  template <
66  typename BufInType,
67  ipsdk::eInstructionSet::domain IS>
68  ipsdk::BoolResult processFunction(
70 
71  void pushPositionAndIntensityForThetaRange(
72  ipUInt64 x,
73  ipReal32 intensity,
74  ipReal32 thetaMin,
75  ipReal32 thetaMax);
76 
77  template <
78  typename BufInType,
79  ipsdk::eInstructionSet::domain IS>
80  void
81  storeValuesToAccumulate(const ipsdk::processor::ProcessingInfo& info);
82 
83 // attributes
84 protected:
85  typedef std::vector<boost::shared_ptr<boost::mutex> > MutexColl;
86  typedef boost::shared_ptr<MutexColl> MutexCollPtr;
87 
88  MutexCollPtr _pRowsMutexColl;
89 
90  ipReal64 _rhoStep;
91  ipUInt64 _nbRhoClasses;
92  ipReal64 _thetaMin;
93  ipReal64 _thetaMax;
94  ipUInt64 _nbThetaClasses;
95  ipReal64 _thetaStep;
96  ipReal64 _intensityThreshold;
97  std::vector<ipReal32> _cos;
98  std::vector<ipReal32> _sin;
99 
100  //std::vector<ipUInt32> _pixelsAboveThresholdX;
101  //std::vector<ipReal32> _pixelsAboveThresholdIntensity;
102 
103  std::vector<std::vector<ipInt32> > _pixelsAboveThresholdX;
104  std::vector<std::vector<ipReal32> > _pixelsAboveThresholdIntensity;
105 };
106 
109 
110 } // end of namespace fd
111 } // end of namespace imaproc
112 } // end of namespace ipsdk
113 
114 #endif // __IPSDKIPLFEATUREDETECTION_HOUGHLINESGRADIENT2DIMGLVL3_H__
uint64_t ipUInt64
IPSDKBASEPROCESSING_API RulePtr none()
double ipReal64
Definition of import/export macro for library.
#define IPSDK_DECLARE_PROCESSING_ALGORITHM(libraryName, algoName, RuleString, attributeSeq)
#define IPSDK_DECLARE_ALGORITHM_PARSED_DATA(dataSeq)
#define IPSDK_DECLARE_ALGORITHM_FUNCTION_SELECTOR(dataTypeSeq)
float ipReal32