zadanie-5
This commit is contained in:
parent
c6daa832b7
commit
6bd761d4f1
@ -23,7 +23,7 @@ math::matrix<float> EdgeLaplaceOfGauss::getMask(int size, float sigma, Mode)
|
||||
|
||||
for (int i=0;i<size;++i) {
|
||||
for (int j=0;j<size;++j) {
|
||||
mask[i][j] = getLoG(i - (size/2.0), j - (size/2.0), sigma);
|
||||
mask(i,j) = getLoG(i - (size/2.0), j - (size/2.0), sigma);
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,8 +32,7 @@ math::matrix<float> EdgeLaplaceOfGauss::getMask(int size, float sigma, Mode)
|
||||
|
||||
float EdgeLaplaceOfGauss::getLoG(int x, int y, float s)
|
||||
{
|
||||
float gauss = BlurGaussian::getGauss(x,y,s);
|
||||
return ((pow(x,2.0) + pow(y,2.0) - 2) * gauss) / pow(s,2.0);
|
||||
return ((pow(x, 2) + pow(y, 2) - 2) * BlurGaussian::getGauss(x, y, s)) / pow(s, 2);
|
||||
}
|
||||
|
||||
int EdgeLaplaceOfGauss::getSize()
|
||||
|
@ -22,7 +22,7 @@ PNM* EdgeZeroCrossing::transform()
|
||||
int t = getParameter("threshold").toInt();
|
||||
|
||||
PNM* newImage = new PNM(width, height, image->format());
|
||||
EdgeLaplaceOfGauss log(newImage);
|
||||
EdgeLaplaceOfGauss log(image);
|
||||
log.setParameter("size", getParameter("size"));
|
||||
log.setParameter("sigma", getParameter("sigma"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user