Выделил переиспользуемые модули из проекта.
This commit is contained in:
parent
3fe2a87e35
commit
7c83d9c93e
15 changed files with 287 additions and 207 deletions
22
image-lib/filters.h
Normal file
22
image-lib/filters.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#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> &);
|
Loading…
Add table
Add a link
Reference in a new issue