getmask implemented

This commit is contained in:
Damian Kowalski 2024-04-07 13:33:09 +02:00
parent f8967f3893
commit 94268df7ec

View File

@ -22,7 +22,19 @@ math::matrix<float> Convolution::getMask(int size, Mode mode = Normalize)
{ {
math::matrix<float> mask(size, size); math::matrix<float> mask(size, size);
qDebug() << Q_FUNC_INFO << "Not implemented yet!"; for (int i = 0; i < size; i++)
for (int j = 0; j < size; j++)
{
// Check if i or j is the middle point
if (i == j && i == size / 2 && j == size / 2)
{
mask[i][j] = 1;
}
else
{
mask[i][j] = 0;
}
}
return mask; return mask;
} }