Improving marching squares

Right. Today is the day of improving 2×2 marching squares flavor described in wikipedia. A year ago Sakri Rosenstrom found that it is flawed:

As you can see, two checkerboard-like patterns are ambiguous, but the algorithm ignores it, causing random deadlocks as a side effect. So I tried to find some solution to this by posting the problem at wonderfl; and then I just couldn’t wait :) Well, my solution uses 2 to 4 pixels out of 2×2 window and seems to work on crazy images, so I’m happy. But if you suddenly find some better way, let me know.

5 Responses to “Improving marching squares”


  1. 1 makc3d October 17, 2010 at 23:00

    Btw, this haXe code always does only 2 reads at a time, very reasonable idea.

  2. 2 nicoptere October 23, 2010 at 02:26

    why is there no sound?


  1. 1 Meet qtrack « ¿noʎ ǝɹɐ ʍoɥ 'ʎǝɥ Trackback on December 29, 2010 at 21:06

Ask a Question

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Old stuff

October 2010
M T W T F S S
« Sep   Nov »
 123
45678910
11121314151617
18192021222324
25262728293031

Oh, btw…


%d bloggers like this: