#pragma once /** * @file histogram_utils.h * @brief Somewhat generic histogram manipulation utilities */ #include "image.h" #include namespace satdump { namespace image { namespace histogram { /** * @brief Get histogram of a buffer * @param values to get the history of * @param len length of the output histogram * @return histogram */ std::vector get_histogram(std::vector values, int len); /** * @brief Equalize an histogram (stretch to normal distribution) * @param hist histogram to equalize * @return equalized histogram */ std::vector equalize_histogram(std::vector hist); /** * @brief Make an histogram-matching table between 2 equalized histograms * @param input_hist histogram to match from * @param target_hist histogram to match to * @param maxdiff Ignored (TODOREWORK?) * @return matching table LUT */ std::vector make_hist_match_table(std::vector input_hist, std::vector target_hist, int maxdiff); } // namespace histogram } // namespace image } // namespace satdump