cpp-bmp-reader/image-lib/filters.h

22 lines
No EOL
634 B
C++

#pragma once
#include <cstdint>
#include <array>
const int AVERAGE_MASK[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1};
const int PREWITT_MASK_DX[9] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
const int PREWITT_MASK_DY[9] = {-1, -1, -1, 0, 0, 0, 1, 1, 1};
const int SOBEL_MASK_DX[9] = {-1, 0, 1, -2, 0, 2, -1, 0, 1};
const int SOBEL_MASK_DY[9] = {-1, -2, -1, 0, 0, 0, 1, 2, 1};
uint8_t medianFilter(std::array<int, 9> &);
uint8_t averageFilter(std::array<int, 9> &);
uint8_t prewittDXFilter(std::array<int, 9> &);
uint8_t prewittDYFilter(std::array<int, 9> &);
uint8_t sobelDXFilter(std::array<int, 9> &);
uint8_t sobelDYFilter(std::array<int, 9> &);