IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
HoughLines2dImgLvl3.h
1 // HoughLines2dImgLvl3.h:
3 // ----------------------
4 //
14 
15 #ifndef __IPSDKIPLFEATUREDETECTION_HOUGHLINES2DIMGLVL3_H__
16 #define __IPSDKIPLFEATUREDETECTION_HOUGHLINES2DIMGLVL3_H__
17 
20 
21 // Attributes headers
22 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InOptHoughLinesImgParams.h>
23 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/OutImg.h>
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/YStrip2d/InYStrip2d.h>
25 
26 namespace ipsdk {
27 namespace imaproc {
28 namespace fd {
29 
32 
33 // declare processing algorithm
34 IPSDK_DECLARE_PROCESSING_ALGORITHM(IPSDKIPLFeatureDetection, HoughLines2dImg,
36  (((ipsdk)(imaproc)(attr))(InYStrip2d))
37  (((ipsdk)(imaproc)(attr))(InOptHoughLinesImgParams))
38  (((ipsdk)(imaproc)(attr))(OutImg)))
39 
40  // implementation of image processing data identifier retrieval method
41  // for function selector usage
42  IPSDK_DECLARE_ALGORITHM_FUNCTION_SELECTOR(((STRIP)(InYStrip2d)));
43 
44  // declaration of parsed data during processing
45  IPSDK_DECLARE_ALGORITHM_PARSED_DATA(((LINESTRIP)(InYStrip2d)));
46 
47 // methods
48 public:
49  void setRowsMutexColl(const boost::shared_ptr<std::vector<boost::shared_ptr<boost::mutex> > >& pRowsMutexColl);
50 
51 protected:
52 
54  template <typename BufInType,
55  ipsdk::eInstructionSet::domain IS>
56  ipsdk::BoolResult genericProcessFunction(const ipsdk::processor::ProcessingInfo& info);
57 
58  template <
59  typename BufInType,
60  typename BufOutType,
61  ipsdk::eInstructionSet::domain IS>
62  ipsdk::BoolResult processFunction(
64  std::vector<BufOutType>& pixelsAboveThresholdIntensities);
65 
66 // attributes
67 protected:
68  typedef std::vector<boost::shared_ptr<boost::mutex> > MutexColl;
69  typedef boost::shared_ptr<MutexColl> MutexCollPtr;
70 
71  MutexCollPtr _pRowsMutexColl;
72 
73  ipReal64 _rhoStep;
74  ipUInt64 _nbRhoClasses;
75  ipReal64 _thetaMin;
76  ipReal64 _thetaMax;
77  ipUInt64 _nbThetaClasses;
78  ipReal64 _intensityThreshold;
79  std::vector<ipReal32> _cos;
80  std::vector<ipReal32> _sin;
81 
82  std::vector<ipInt32> _pixelsAboveThresholdX;
83  std::vector<ipInt32> _pixelsAboveThresholdIntensityI;
84  std::vector<ipUInt32> _pixelsAboveThresholdIntensityUI;
85  std::vector<ipReal32> _pixelsAboveThresholdIntensityF;
86 };
87 
90 
91 } // end of namespace fd
92 } // end of namespace imaproc
93 } // end of namespace ipsdk
94 
95 #endif // __IPSDKIPLFEATUREDETECTION_HOUGHLINES2DIMGLVL3_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)