diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:19:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:20:02 +0000 |
commit | 58daab21cd043e1dc37024a7f99b396788372918 (patch) | |
tree | 96771e43bb69f7c1c2b0b4f7374cb74d7866d0cb /ml/dlib/dlib/statistics/image_feature_sampling_abstract.h | |
parent | Releasing debian version 1.43.2-1. (diff) | |
download | netdata-58daab21cd043e1dc37024a7f99b396788372918.tar.xz netdata-58daab21cd043e1dc37024a7f99b396788372918.zip |
Merging upstream version 1.44.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ml/dlib/dlib/statistics/image_feature_sampling_abstract.h')
-rw-r--r-- | ml/dlib/dlib/statistics/image_feature_sampling_abstract.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/ml/dlib/dlib/statistics/image_feature_sampling_abstract.h b/ml/dlib/dlib/statistics/image_feature_sampling_abstract.h new file mode 100644 index 000000000..b51ef5423 --- /dev/null +++ b/ml/dlib/dlib/statistics/image_feature_sampling_abstract.h @@ -0,0 +1,45 @@ +// Copyright (C) 2011 Davis E. King (davis@dlib.net) +// License: Boost Software License See LICENSE.txt for the full license. +#undef DLIB_IMAGE_FEATURE_SaMPLING_ABSTRACT_Hh_ +#ifdef DLIB_IMAGE_FEATURE_SaMPLING_ABSTRACT_Hh_ + +#include "random_subset_selector_abstract.h" + +namespace dlib +{ + +// ---------------------------------------------------------------------------------------- + + template < + typename image_array_type, + typename feature_extractor_type, + typename pyramid_type + > + random_subset_selector<typename feature_extractor_type::descriptor_type> randomly_sample_image_features ( + const image_array_type& images, + const pyramid_type& pyr, + const feature_extractor_type& fe, + unsigned long num + ); + /*! + requires + - pyramid_type == a type compatible with the image pyramid objects defined + in dlib/image_transforms/image_pyramid_abstract.h + - feature_extractor_type == a local image feature extractor type such as the + dlib::hog_image + - image_array_type == an implementation of dlib/array/array_kernel_abstract.h + and it must contain image objects which can be passed to pyr() and fe.load() + and are swappable by global swap(). + ensures + - creates an image pyramid for each image in images and performs feature + extraction on each pyramid level. Then selects a random subsample of at + most num local feature vectors and returns it. + !*/ + +// ---------------------------------------------------------------------------------------- + +} + +#endif // DLIB_IMAGE_FEATURE_SaMPLING_ABSTRACT_Hh_ + + |