IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
KernelKMeansAssignImgLvl1.h
1 // KernelKMeansAssignImgLvl1.h:
3 // ----------------------------
4 //
14 
15 #ifndef __IPSDKIPLCLASSIFICATION_KERNELKMEANSASSIGNIMGLVL1_H__
16 #define __IPSDKIPLCLASSIFICATION_KERNELKMEANSASSIGNIMGLVL1_H__
17 
21 
22 // Attributes headers
23 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/InHomogeneousImg.h>
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InKKMeansCentroids.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/OutClassImg.h>
27 
28 namespace ipsdk {
29 namespace imaproc {
30 namespace classif {
31 
34 
35 // declare processor class
36 IPSDK_DECLARE_LVL1_PROCESSOR(ASYNC1, IPSDKIPLClassification, KernelKMeansAssignImg,
37  ipsdk::imaproc::customImageProperty(_pOutClassImg, matchKernelKMeansClassImg(_pInHomogeneousImg, _pInKKMeansCentroids)),
38  (((ipsdk)(imaproc)(attr))(InHomogeneousImg))
39  (((ipsdk)(imaproc)(attr))(InKKMeansCentroids))
40  (((ipsdk)(imaproc)(attr))(OutClassImg)(customOutput)(outputKernelKMeans(_pInHomogeneousImg, _pInKKMeansCentroids))))
41 
42 // methods
43 public:
44 
45 protected:
49 
51  void clearIntermediateData();
52 
53 // attributes
54 protected:
56  image::ImageConstPtr _pInSeqImg;
57 };
58 
61 
62 } // end of namespace classif
63 } // end of namespace imaproc
64 } // end of namespace ipsdk
65 
66 #endif // __IPSDKIPLCLASSIFICATION_KERNELKMEANSASSIGNIMGLVL1_H__
#define IPSDK_DECLARE_LVL1_PROCESSOR(ProcType, libraryName, algoName, RuleString, attributeSeq)
IPSDKIPLCLASSIFICATION_API CustomCheckedImagePropertyPtr matchKernelKMeansClassImg(const ImageAttributeConstPtr &pInHomogeneousImgAttribute, const boost::shared_ptr< const attr::InNbClusters > &pInNbClustersAttribute)
function allowing to check that output class image matches input image and expected number of cluster...
ipsdk::core::ExecResult preProcess()
method called before processing
IPSDKIPLCLASSIFICATION_API CustomImageInfoPtr outputKernelKMeans(const ImageAttributeConstPtr &pInputAttribute, const boost::shared_ptr< const attr::InNbClusters > &pInNbClustersAttribute)
function allowing to create a Kernel KMeans output image initializer
Definition of import/export macro for library.
processor::OutputInitializerPtr customOutput(const boost::weak_ptr< OutputAttributeType > &pOutputAttribute, const CustomImageInfoPtr &pCustomImageInfo)
Utility functions for Kernel KMeans attribute rules management.
boost::shared_ptr< const BaseImage > ImageConstPtr
IPSDK_DECLARE_GPU_PROCESSING_ALGORITHM(IPSDKIPLFiltering, Convolution2dImg, ipsdk::imaproc::matchSize(_pInSubGpuImg, _pOutImg),(((ipsdk)(imaproc)(attr))(InSubGpuImg))(((ipsdk)(imaproc)(attr))(InKnlXY))(((ipsdk)(imaproc)(attr))(InNormalize))(((ipsdk)(imaproc)(attr))(InConvolBorder2d))(((ipsdk)(imaproc)(attr))(OutImg))) IPSDKCUDA_DECLARE_ALGORITHM_FUNCTION_SELECTOR((InSubGpuImg)(OutImg)) public void clearIntermediateData()
method called before processing
Utility functions for Kernel KMeans attribute output initialization management.