Opencv 3.1 project on GR-PEACH board
Fork of gr-peach-opencv-project by
opencv_3_1/opencv2/face/bif.hpp@170:54ff26da7eb6, 2017-07-04 (annotated)
- Committer:
- thedo
- Date:
- Tue Jul 04 06:23:13 2017 +0000
- Revision:
- 170:54ff26da7eb6
- Parent:
- 166:3a9487d57a5c
project opencv 3.1 on GR PEACH board, no use SD card.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thedo | 166:3a9487d57a5c | 1 | /* |
thedo | 166:3a9487d57a5c | 2 | By downloading, copying, installing or using the software you agree to this license. |
thedo | 166:3a9487d57a5c | 3 | If you do not agree to this license, do not download, install, |
thedo | 166:3a9487d57a5c | 4 | copy or use the software. |
thedo | 166:3a9487d57a5c | 5 | |
thedo | 166:3a9487d57a5c | 6 | |
thedo | 166:3a9487d57a5c | 7 | License Agreement |
thedo | 166:3a9487d57a5c | 8 | For Open Source Computer Vision Library |
thedo | 166:3a9487d57a5c | 9 | (3-clause BSD License) |
thedo | 166:3a9487d57a5c | 10 | |
thedo | 166:3a9487d57a5c | 11 | Copyright (C) 2000-2015, Intel Corporation, all rights reserved. |
thedo | 166:3a9487d57a5c | 12 | Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved. |
thedo | 166:3a9487d57a5c | 13 | Copyright (C) 2009-2015, NVIDIA Corporation, all rights reserved. |
thedo | 166:3a9487d57a5c | 14 | Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved. |
thedo | 166:3a9487d57a5c | 15 | Copyright (C) 2015, OpenCV Foundation, all rights reserved. |
thedo | 166:3a9487d57a5c | 16 | Copyright (C) 2015, Itseez Inc., all rights reserved. |
thedo | 166:3a9487d57a5c | 17 | Third party copyrights are property of their respective owners. |
thedo | 166:3a9487d57a5c | 18 | |
thedo | 166:3a9487d57a5c | 19 | Redistribution and use in source and binary forms, with or without modification, |
thedo | 166:3a9487d57a5c | 20 | are permitted provided that the following conditions are met: |
thedo | 166:3a9487d57a5c | 21 | |
thedo | 166:3a9487d57a5c | 22 | * Redistributions of source code must retain the above copyright notice, |
thedo | 166:3a9487d57a5c | 23 | this list of conditions and the following disclaimer. |
thedo | 166:3a9487d57a5c | 24 | |
thedo | 166:3a9487d57a5c | 25 | * Redistributions in binary form must reproduce the above copyright notice, |
thedo | 166:3a9487d57a5c | 26 | this list of conditions and the following disclaimer in the documentation |
thedo | 166:3a9487d57a5c | 27 | and/or other materials provided with the distribution. |
thedo | 166:3a9487d57a5c | 28 | |
thedo | 166:3a9487d57a5c | 29 | * Neither the names of the copyright holders nor the names of the contributors |
thedo | 166:3a9487d57a5c | 30 | may be used to endorse or promote products derived from this software |
thedo | 166:3a9487d57a5c | 31 | without specific prior written permission. |
thedo | 166:3a9487d57a5c | 32 | |
thedo | 166:3a9487d57a5c | 33 | This software is provided by the copyright holders and contributors "as is" and |
thedo | 166:3a9487d57a5c | 34 | any express or implied warranties, including, but not limited to, the implied |
thedo | 166:3a9487d57a5c | 35 | warranties of merchantability and fitness for a particular purpose are disclaimed. |
thedo | 166:3a9487d57a5c | 36 | In no event shall copyright holders or contributors be liable for any direct, |
thedo | 166:3a9487d57a5c | 37 | indirect, incidental, special, exemplary, or consequential damages |
thedo | 166:3a9487d57a5c | 38 | (including, but not limited to, procurement of substitute goods or services; |
thedo | 166:3a9487d57a5c | 39 | loss of use, data, or profits; or business interruption) however caused |
thedo | 166:3a9487d57a5c | 40 | and on any theory of liability, whether in contract, strict liability, |
thedo | 166:3a9487d57a5c | 41 | or tort (including negligence or otherwise) arising in any way out of |
thedo | 166:3a9487d57a5c | 42 | the use of this software, even if advised of the possibility of such damage. |
thedo | 166:3a9487d57a5c | 43 | */ |
thedo | 166:3a9487d57a5c | 44 | |
thedo | 166:3a9487d57a5c | 45 | #ifndef __OPENCV_BIF_HPP__ |
thedo | 166:3a9487d57a5c | 46 | #define __OPENCV_BIF_HPP__ |
thedo | 166:3a9487d57a5c | 47 | |
thedo | 166:3a9487d57a5c | 48 | #include "opencv2/core.hpp" |
thedo | 166:3a9487d57a5c | 49 | |
thedo | 166:3a9487d57a5c | 50 | namespace cv { |
thedo | 166:3a9487d57a5c | 51 | namespace face { |
thedo | 166:3a9487d57a5c | 52 | |
thedo | 166:3a9487d57a5c | 53 | /** Implementation of bio-inspired features (BIF) from the paper: |
thedo | 166:3a9487d57a5c | 54 | * Guo, Guodong, et al. "Human age estimation using bio-inspired features." |
thedo | 166:3a9487d57a5c | 55 | * Computer Vision and Pattern Recognition, 2009. CVPR 2009. |
thedo | 166:3a9487d57a5c | 56 | */ |
thedo | 166:3a9487d57a5c | 57 | class CV_EXPORTS_W BIF : public Algorithm { |
thedo | 166:3a9487d57a5c | 58 | public: |
thedo | 166:3a9487d57a5c | 59 | /** @returns The number of filter bands used for computing BIF. */ |
thedo | 166:3a9487d57a5c | 60 | CV_WRAP virtual int getNumBands() const = 0; |
thedo | 166:3a9487d57a5c | 61 | |
thedo | 166:3a9487d57a5c | 62 | /** @returns The number of image rotations. */ |
thedo | 166:3a9487d57a5c | 63 | CV_WRAP virtual int getNumRotations() const = 0; |
thedo | 166:3a9487d57a5c | 64 | |
thedo | 166:3a9487d57a5c | 65 | /** Computes features sby input image. |
thedo | 166:3a9487d57a5c | 66 | * @param image Input image (CV_32FC1). |
thedo | 166:3a9487d57a5c | 67 | * @param features Feature vector (CV_32FC1). |
thedo | 166:3a9487d57a5c | 68 | */ |
thedo | 166:3a9487d57a5c | 69 | CV_WRAP virtual void compute(InputArray image, |
thedo | 166:3a9487d57a5c | 70 | OutputArray features) const = 0; |
thedo | 166:3a9487d57a5c | 71 | }; |
thedo | 166:3a9487d57a5c | 72 | |
thedo | 166:3a9487d57a5c | 73 | /** |
thedo | 166:3a9487d57a5c | 74 | * @param num_bands The number of filter bands (<=8) used for computing BIF. |
thedo | 166:3a9487d57a5c | 75 | * @param num_rotations The number of image rotations for computing BIF. |
thedo | 166:3a9487d57a5c | 76 | * @returns Object for computing BIF. |
thedo | 166:3a9487d57a5c | 77 | */ |
thedo | 166:3a9487d57a5c | 78 | CV_EXPORTS_W cv::Ptr<BIF> createBIF(int num_bands = 8, int num_rotations = 12); |
thedo | 166:3a9487d57a5c | 79 | |
thedo | 166:3a9487d57a5c | 80 | } // namespace cv |
thedo | 166:3a9487d57a5c | 81 | } // namespace face |
thedo | 166:3a9487d57a5c | 82 | |
thedo | 166:3a9487d57a5c | 83 | #endif // #ifndef __OPENCV_FACEREC_HPP__ |
thedo | 166:3a9487d57a5c | 84 |