Talk:Zhang-Suen thinning algorithm: Difference between revisions
(Corrected.) |
No edit summary |
||
Line 1: | Line 1: | ||
==Inverted axis?== |
==Inverted axis?== |
||
Could someone help explain why, in the example image the following |
Could someone help explain why, in the example image the following |
||
Line 57: | Line 56: | ||
: I've corrected that too Tim. Thanks. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 22:30, 18 October 2013 (UTC) |
: I've corrected that too Tim. Thanks. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 22:30, 18 October 2013 (UTC) |
||
==Three Data Files== |
|||
To avoid every entry to needlessly contain the same large tables, I suggest to add to the task description three links to the tree files of the test cases. -[[User:Bearophile|bearophile]] ([[User talk:Bearophile|talk]]) |
Revision as of 11:35, 21 October 2013
Inverted axis?
Could someone help explain why, in the example image the following transformation occurs (in the periods separating the R and C, and after the C):
..... ..... .###. -> ..... .#?#. ..#.. ..... .....
Surely the the cell labelled '?' will be culled at step 1:
- It is black with 8 neighbours - B = 5 (2 <= 5 <= 6) - A = 1 - At least one of P2 P4 P6 is white (P6 is white) - At least one of P4 P6 P8 is white (P6 is white)
Why isn't it whitened at step 1?
--Tim-brown (talk) 17:33, 15 October 2013 (UTC)
- I expect that there are removals of some of those surrounding cells before it gets to your '?' cell which affects the final outcome. --Paddy3118 (talk) 18:54, 15 October 2013 (UTC)
- I'm considering what happens to this individual cell (not necessarily its neighbours). As far as I am concerned, the situation I describe above is the calculation for Step-1 of the first iteration. Nothing has changed (i.e. been removed) before this: all changes are stored, and applied `after` the analysis. So the step-1 rule should apply to cell '?'. And it should be blank (by my interpretation of the rules). But it ain't.
--Tim-brown (talk) 19:27, 15 October 2013 (UTC)
You are right the table given of P1 to P9 in the task page is actually transformed but ins such a way that the output is thinned in the same way (but with an offset possibly). I am actually calculating with:
P7 | P6 | P5 |
P8 | P1 | P4 |
P9 | P2 | P3 |
I've got an inverted vertical axis it seems. --Paddy3118 (talk) 22:32, 15 October 2013 (UTC)
- Now I'm a bit more confident in posting my Racket solution! ---Tim-brown (talk) 09:50, 16 October 2013 (UTC)
Is the thinned version of the big "R.C." in the task description correct? I have it as:
........................................................... ........................................................... ....#.##########.......................#######............. .....##........#...................####.......#............ .....#..........#.................##....................... .....#..........#................#......................... .....#..........#................#......................... .....#..........#................#......................... .....############...............#.......................... .....#..........#...............#.......................... .....#..........#................#......................... .....#..........#................#......................... .....#..........#................#......................... .....#............................##....................... .....#.............................############............ .......................###..........................###.... ........................................................... ...........................................................
---Tim-brown (talk) 10:05, 16 October 2013 (UTC)
Three Data Files
To avoid every entry to needlessly contain the same large tables, I suggest to add to the task description three links to the tree files of the test cases. -bearophile (talk)