libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CRNFeatureSet.h
Go to the documentation of this file.
1 /* Copyright 2007-2016 Yann LEYDIER, CoReNum, INSA-Lyon, ENS-Lyon
2  *
3  * This file is part of libcrn.
4  *
5  * libcrn is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * libcrn is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with libcrn. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * file: CRNFeatureSet.h
19  * \author Yann LEYDIER
20  */
21 
22 #ifndef CRNFEATURESET
23 #define CRNFEATURESET
24 
25 #include <CRNData/CRNVector.h>
27 
28 namespace crn
29 {
30  class Block;
31  /****************************************************************************/
39  class FeatureSet: public Vector
40  {
41  public:
43  FeatureSet() = default;
44 
45  FeatureSet(const FeatureSet&) = delete;
46  FeatureSet(FeatureSet&&) = default;
47  FeatureSet& operator=(const FeatureSet&) = delete;
48  FeatureSet& operator=(FeatureSet&&) = default;
49  virtual ~FeatureSet() override = default;
50 
52  SVector Extract(Block &b);
54  SVector ExtractWithMask(Block &b, ImageIntGray &mask);
55 
58  private:
59  virtual std::string getClassName() const override { return "FeatureSet"; }
60  };
61  template<> struct IsSerializable<FeatureSet> : public std::true_type {};
62 
64 }
65 
66 #endif
67 
FeatureSet & operator=(const FeatureSet &)=delete
Abstract class for images.
Definition: CRNImage.h:141
SVector ExtractWithMask(Block &b, ImageIntGray &mask)
Extracts all the features of the set from a block.
virtual ~FeatureSet() override=default
XML element.
Definition: CRNXml.h:135
FeatureSet()=default
Default constructor.
A block.
Definition: CRNBlock.h:52
FeatureSet(xml::Element &el)
Definition: CRNFeatureSet.h:56
SVector Extract(Block &b)
Extracts all the features of the set from a block.
Data vector class.
Definition: CRNVector.h:42
#define CRN_DECLARE_CLASS_CONSTRUCTOR(classname)
Declares a class constructor.
Definition: CRNObject.h:173
CRN_ALIAS_SMART_PTR(ImageBW)
Feature vector class.
Definition: CRNFeatureSet.h:39