Sat 08 Mar 2014 01:00:58 AM UTC, comment #4:
I have fixed this with changeset 875:9a76652a01f5
The problem happened when the code originally had variable "h" for width and "w" for height. Note that they are swapped. I can only guess why but probably because the code was originally written for row-major order
and it would be easier to swap the assignment to these two variables than all instances of it in the code.
It should be fixed, and I added this case to the test suite of the image package.
This fix will be released with the next stable release, version 2.2.1 which should be soon.
|
Wed 26 Feb 2014 03:08:02 PM UTC, comment #1:
and the remaining of the original post...
Result for C is:
Octave 3.8.0 - Image 2.2.0
C =
1 5 9 13 16 21 25 29 33
2 6 10 14 13 22 26 30 34
3 7 10 15 19 23 27 31 35
5 8 12 16 20 24 28 32 36
Note that the value in row 1 col 4 is 5. This is incorrect, it should be either 3 or 8! Same in row 5 cols 1 and 2.
In image-2.0.0, a more sensible value for C is produced:
Octave 3.8.0 - Image 2.0.0
C =
1 5 9 13 13 21 25 29 33
2 6 10 14 14 22 26 30 34
3 7 10 15 19 23 27 31 35
8 8 12 16 20 24 28 32 36
Comments?
Regards,
Benoit
|
Wed 26 Feb 2014 03:01:52 PM UTC, original submission:
The example below demonstrates that the linear index (C) is not correct (as in [D,C] = bwdist(BW, METHOD)):
Result for C is:
|