Talk:Marching squares: Difference between revisions

(→‎Task needs work: abandoning interwiki link format -- someone broke the underlying implementation)
Line 33:
0 0 0 1 0
0 0 0 0 0</pre>
 
::'''Incorrect:''' The Julia and Python entries also start with the same q-shaped input. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 15:43, 30 June 2022 (UTC)
 
and identify a path with length 11 composed of 10 unique coordinates which would probably correspond to these positions (or maybe this should be shifted up and to the left by one grid coordinate? I'm guessing because I don't know whether the 0,0 coordinate would correspond to the upper left hand corner of the bitmap or if it would be outside the bitmap):
Line 48 ⟶ 50:
 
Looking at this more closely, the implementation of <code>identifyPerimeter</code> at http://www.tomgibara.com/computer-vision/MarchingSquares.java is unable to identify diagonal contour lines, even though half of the contour lines in the lookup table of the [https://en.wikipedia.org/wiki/Marching_squares#Basic_algorithm basic algorithm] are diagonals. Also, that <code>identifyPerimeter</code> implementation finds only one contour line (and only if that contour line corresponds to a perimeter which touches the center of the image). --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]])
 
:Overall I would agree this task is far from perfect and TG's code is at best a gross oversimplification (whilst somehow also being a gross overcomplication) that bears little resemblance to anything else I've seen. Then again in my opinion the wp description of the algorithm also leaves much to be desired. It seems to me the Julia and Python outputs are rotated by 90 but with 99.9% of the actual implementation being somewhat hidden I can't exactly be sure about that. A much better (text-representable) input, the expected/desired output (ditto), and maybe a few simple (third-party-hosted) images would certainly help. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 15:43, 30 June 2022 (UTC)
7,805

edits