getmask implemented
This commit is contained in:
parent
f8967f3893
commit
94268df7ec
@ -22,7 +22,19 @@ math::matrix<float> Convolution::getMask(int size, Mode mode = Normalize)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user