IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
KMeansAssignImgLvl3.h
1 // KMeansAssignImgLvl3.h:
3 // ----------------------
4 //
14 
15 #ifndef __IPSDKIPLCLASSIFICATION_KMEANSASSIGNIMGLVL3_H__
16 #define __IPSDKIPLCLASSIFICATION_KMEANSASSIGNIMGLVL3_H__
17 
20 
21 // Attributes headers
22 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InFlattenedClustersCenters.h>
23 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/OutKMeansAssignmentInfo.h>
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/YStrip2d/InSeqYStrip2d.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/YStrip2d/OutClassYStrip2d.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InUpdateCentersFlag.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/YStrip2d/InOptSingleGreyMaskYStrip2d.h>
28 
29 namespace ipsdk {
30 namespace imaproc {
31 namespace classif {
32 
35 
36 // declare processing algorithm
37 IPSDK_DECLARE_PROCESSING_ALGORITHM(IPSDKIPLClassification, KMeansAssignImg,
39  (((ipsdk)(imaproc)(attr))(InSeqYStrip2d))
40  (((ipsdk)(imaproc)(attr))(InOptSingleGreyMaskYStrip2d))
41  (((ipsdk)(imaproc)(attr))(InFlattenedClustersCenters))
42  (((ipsdk)(imaproc)(attr))(OutKMeansAssignmentInfo))
43  (((ipsdk)(imaproc)(attr))(InUpdateCentersFlag))
44  (((ipsdk)(imaproc)(attr))(OutClassYStrip2d)))
45 
46  // implementation of image processing data identifier retrieval method
47  // for function selector usage
48  IPSDK_DECLARE_ALGORITHM_FUNCTION_SELECTOR(((STRIP)(InSeqYStrip2d))
49  ((STRIP)(OutClassYStrip2d)));
50 
51  // declaration of parsed data during processing
52  IPSDK_DECLARE_ALGORITHM_PARSED_DATA(((RAWSTRIP)(InSeqYStrip2d))
53  ((RAWSTRIP)(InOptSingleGreyMaskYStrip2d))
54  ((RAWSTRIP)(OutClassYStrip2d)));
55 
56 // methods
57 public:
58 
59 protected:
61  template <typename BufInType, typename BufOutType,
62  ipsdk::eInstructionSet::domain IS>
63  ipsdk::BoolResult genericProcessFunction(const ipsdk::processor::ProcessingInfo& info);
64 
66  template <bool g_bInit, typename BufInType, typename BufOutType,
67  ipsdk::eInstructionSet::domain IS>
68  ipsdk::BoolResult specificProcessFunction(const ipsdk::processor::ProcessingInfo& info);
69 
70 // attributes
71 protected:
73  std::vector<ipReal64> _vInBuffer;
74  std::vector<ipReal64> _vDist;
75  std::vector<ipReal64> _vMinDist;
76  std::vector<ipUInt32> _vBestClasses;
78 };
79 
82 
83 } // end of namespace classif
84 } // end of namespace imaproc
85 } // end of namespace ipsdk
86 
87 #endif // __IPSDKIPLCLASSIFICATION_KMEANSASSIGNIMGLVL3_H__
IPSDKBASEPROCESSING_API RulePtr none()
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)