MATLAB training program (generate a Hilbert curve) can use such a line traversing all of the pixels in the image, but this is not done, but merely generates such a curve. H,w is the ultimate height and width of the image in the program, and n is the Hilbert curves of order. If n is equal to Log2 (h) or Log2 (w), the image would have been all white, can be considered just traverse all pixels. Of course, n becomes large, the image is entirely white, but not just traversing it. Code generating curve of the core functions can be found here.
Tips: You can preview the content of files by clicking file names^_^