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.
31 lines
655 B
31 lines
655 B
10 years ago
|
#pragma once
|
||
|
|
||
|
#include <av/av.hpp>
|
||
|
#include <fingerprint_traits.hpp>
|
||
|
|
||
|
#include <boost/serialization/access.hpp>
|
||
|
#include <boost/serialization/vector.hpp>
|
||
|
|
||
|
#include <string>
|
||
|
#include <vector>
|
||
|
|
||
|
|
||
|
namespace fingerprints {
|
||
|
struct rgb {
|
||
|
std::vector<uint8_t> data;
|
||
|
|
||
|
static rgb pre_calculate(av::frame const & frame);
|
||
|
static rgb calculate(av::frame const & frame);
|
||
|
double distance_to(rgb const & fingerprint) const;
|
||
|
|
||
|
static std::string name(){ return "rgb-25-25-25"; }
|
||
|
|
||
|
private:
|
||
|
friend class boost::serialization::access;
|
||
|
template<class Archive>
|
||
|
void serialize(Archive & ar, const unsigned int /*version*/){
|
||
|
ar & data;
|
||
|
}
|
||
|
};
|
||
|
} // namespace fingerprints
|