Closed GoogleCodeExporter closed 8 years ago
Ok, but more information is required.
Let's take a look at Edges filter. It uses kernel with sum 0. What is wrong
with the
filter? Let's use this filter as a sample.
The phrase "the intensitis are not scaled correctly" does not give a lot of
information.
Original comment by andrew.k...@gmail.com
on 27 Mar 2008 at 2:14
Original comment by andrew.k...@gmail.com
on 13 May 2008 at 6:40
The problem only occures if you define the Kernel yourself, I used a kernel
filter like this
-1 -1 -1
0 0 0
1 1 1
so the sum of the filter values is 0. The output is then scaled with this sum
if it is not 0. But in this case it
should be scaled by 6, the sum of the absolute values.
example of the input:
64 64 64
0 0 0
255 255 255
the convolution with the above filter would return 255 (the calculated value is
573 which is larger as 255 so it
would get truncated). Correctly it would return 95.5 (= 573 / 6).
Original comment by georg.tr...@gmail.com
on 13 May 2008 at 7:07
Original comment by andrew.k...@gmail.com
on 19 May 2008 at 5:58
You are both right and not. For the kernel you've provided you may be right.
But if
we take sharpen kernel (see below), then sum of absolute values will give bad
result.
0 -1 0
-1 5 -1
0 -1 0
To resolve the issue a new property was added, which allows to specify desired
divisor. Also new constructor is added for this. The old constructor (which
takes
only kernel) calculates divisor automatically.
Committed in revision 578. Will be released in version 1.7.0
Original comment by andrew.k...@gmail.com
on 19 Jul 2008 at 5:06
Original comment by andrew.k...@gmail.com
on 21 Jul 2008 at 9:35
Original issue reported on code.google.com by
georg.tr...@gmail.com
on 27 Mar 2008 at 2:02