1 #if !defined(_GRAYSCALEIMAGESFVPRODUCER_) 2 #define _GRAYSCALEIMAGESFVPRODUCER_ 12 using namespace KKMLL;
15 #define _GrayScaleImagesFVProducer_VersionNum_ 10
30 float priorReductionFactor,
58 void BinarizeImageByThreshold (
uchar lower,
64 void ReductionByMultiple (
kkint32 multiple,
69 void SaveIntermediateImage (
const Raster& raster,
74 uchar* workRaster1Area;
75 uchar* workRaster2Area;
76 uchar* workRaster3Area;
77 uchar** workRaster1Rows;
78 uchar** workRaster2Rows;
79 uchar** workRaster3Rows;
88 static kkint16 maxNumOfFeatures;
89 static const kkint32 SizeThreshold;
91 static const KKStr featureNames[];
104 static kkint16 EdgeMoment1Index;
105 static kkint16 EdgeMoment2Index;
106 static kkint16 EdgeMoment3Index;
107 static kkint16 EdgeMoment4Index;
108 static kkint16 EdgeMoment5Index;
109 static kkint16 EdgeMoment6Index;
110 static kkint16 EdgeMoment7Index;
111 static kkint16 EdgeMoment8Index;
113 static kkint16 TransparancyConvexHullIndex;
114 static kkint16 TransparancyPixelCountIndex;
115 static kkint16 TransparancyOpen3Index;
116 static kkint16 TransparancyOpen5Index;
117 static kkint16 TransparancyOpen7Index;
118 static kkint16 TransparancyOpen9Index;
119 static kkint16 TransparancyClose3Index;
120 static kkint16 TransparancyClose5Index;
121 static kkint16 TransparancyClose7Index;
123 static kkint16 ConvexAreaIndex;
124 static kkint16 TransparancySizeIndex;
125 static kkint16 TransparancyWtdIndex;
127 static kkint16 WeighedMoment0Index;
128 static kkint16 WeighedMoment1Index;
129 static kkint16 WeighedMoment2Index;
130 static kkint16 WeighedMoment3Index;
131 static kkint16 WeighedMoment4Index;
132 static kkint16 WeighedMoment5Index;
133 static kkint16 WeighedMoment6Index;
134 static kkint16 WeighedMoment7Index;
135 static kkint16 WeighedMoment8Index;
137 static kkint16 IntensityHist1Index;
138 static kkint16 IntensityHist2Index;
139 static kkint16 IntensityHist3Index;
140 static kkint16 IntensityHist4Index;
141 static kkint16 IntensityHist5Index;
142 static kkint16 IntensityHist6Index;
143 static kkint16 IntensityHist7Index;
155 static FileDescPtr existingFileDesc;
162 #define _GrayScaleImagesFVProducer_Defined_ 170 GrayScaleImagesFVProducerFactory ();
186 virtual FileDescPtr
FileDesc ()
const;
215 #define _GrayScaleImagesFVProducerFactory_Defined_ __int16 kkint16
16 bit signed integer.
virtual ~GrayScaleImagesFVProducerFactory()
A Factory can never be deleted until the application terminates; the atexit method will perform the d...
virtual const type_info * FeatureVectorTypeId() const
Returns the 'type_info' of the Feature Vector that this instance of 'FeatureComputer' creates...
virtual GrayScaleImagesFVProducerPtr ManufactureInstance(RunLog &runLog)
static kkint32 MaxNumOfFeatures()
A class that is used by to represent a single image in memory.
GrayScaleImagesFVProducer(FactoryFVProducerPtr factory)
virtual FeatureVectorListPtr ManufacturFeatureVectorList(bool owner, RunLog &runLog) const
Manufactures a instance of a derived 'FeatureVectorList' class that is appropriate for containing ins...
#define _GrayScaleImagesFVProducer_VersionNum_
virtual FeatureVectorListPtr ManufacturFeatureVectorList(bool owner, RunLog &runLog) const
Manufactures a instance of a 'LarcosFeatureVectorList' class that will own its contents.
static FileDescPtr DefineFileDescStatic()
virtual FileDescPtr FileDesc() const
RasterList * RasterListPtr
virtual ~GrayScaleImagesFVProducer()
virtual const type_info * FeatureVectorListTypeId() const
Returns the 'type_info' of the FeatureVectorList that this instance of 'FactoryFVProducer' will creat...
virtual const type_info * FeatureVectorTypeId() const
Returns the 'type_info' of the FeatureVector that this instance of 'FactoryFVProducer' works with...
unsigned char uchar
Unsigned character.
static KKStr Concat(const std::vector< std::string > &values)
Concatenates the list of 'std::string' strings.
GrayScaleImagesFVProducer * GrayScaleImagesFVProducerPtr
virtual FeatureFileIOPtr DefaultFeatureFileIO() const
virtual FeatureVectorPtr ComputeFeatureVector(const Raster &srcImage, const MLClassPtr knownClass, RasterListPtr intermediateImages, float priorReductionFactor, RunLog &runLog)
Compute a FeatureVector for the supplied 'image'.
Used for logging messages.
void EncodeProblem(const struct svm_paramater ¶m, struct svm_problem &prob_in, struct svm_problem &prob_out)
virtual FileDescPtr DefineFileDesc() const
Responsible for creating a FeatureFectorProducer instance.
virtual kkint16 Version() const
static GrayScaleImagesFVProducerFactory * Factory(RunLog *runLog)
Returns instance of "GrayScaleImagesFVProducerFactory" that is registered with "FactoryFVProducer::Re...
A abstract class that is meant to compute a FeatureVector from a source image.
virtual const type_info * FeatureVectorListTypeId() const
Returns the 'type_info' of the FeatureVectorList derived class that can contain instances in 'Feature...