Prewitt operator is used for edge detection. It creates 2 3x3 arrays G_x and G_y and apply them to an image A(G_x * A, G_y * A). After that, the resulting image with edge detection is G = sqrt(G_x^2 + G_y^2). It's almost the same as the sobel operator, but with a different mask.
More...
|
std::vector< std::vector< int32_t > > | square (const std::vector< std::vector< int32_t > > &G) |
| square function
|
|
std::vector< std::vector< int32_t > > | Prewitt (const std::vector< std::vector< int32_t > > &image) |
| Prewitt apply function.
|
|
Prewitt operator is used for edge detection. It creates 2 3x3 arrays G_x and G_y and apply them to an image A(G_x * A, G_y * A). After that, the resulting image with edge detection is G = sqrt(G_x^2 + G_y^2). It's almost the same as the sobel operator, but with a different mask.
◆ Prewitt()
std::vector< std::vector< int32_t > > prewitt::Prewitt |
( |
const std::vector< std::vector< int32_t > > & | image | ) |
|
|
inline |
Prewitt apply function.
- Parameters
-
- Returns
- std::vector<std::vector<int32_t> > the resulted image after applying the prewitt mask
◆ square()
std::vector< std::vector< int32_t > > prewitt::square |
( |
const std::vector< std::vector< int32_t > > & | G | ) |
|
|
inline |
square function
- Parameters
-
- Returns
- vector<vector<int32_t> > the squared root 2d array