You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
635 B
28 lines
635 B
10 years ago
|
#pragma once
|
||
|
|
||
|
#include <av.hpp>
|
||
|
#include <fingerprint_traits.hpp>
|
||
|
|
||
|
#include <boost/serialization/access.hpp>
|
||
|
#include <boost/serialization/vector.hpp>
|
||
|
|
||
|
#include <iosfwd>
|
||
|
#include <vector>
|
||
|
|
||
|
struct downscale {
|
||
|
std::vector<uint8_t> data;
|
||
|
|
||
|
static downscale pre_calculate(av::frame const & frame);
|
||
|
static downscale calculate(av::frame const & frame);
|
||
|
double distance_to(downscale const & fingerprint) const;
|
||
|
|
||
|
private:
|
||
|
friend class boost::serialization::access;
|
||
|
template<class Archive>
|
||
|
void serialize(Archive & ar, const unsigned int /*version*/){
|
||
|
ar & data;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
std::ostream& operator<<(std::ostream& out, downscale const & x);
|