Changeset 2098


Ignore:
Timestamp:
Nov 29, 2007, 6:45:10 AM (13 years ago)
Author:
Sam Hocevar
Message:
  • A few minor fixes.
Location:
www/study
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • www/study/part6.html

    r2034 r2098  
    6767<p> One of the simplest image classification technique is the storage of
    6868each tile’s <b>average colour</b> into a separate database that is used for
    69 best match lookups: </p>
     69best match lookups. Of course, this computation should be gamma-corrected:
     70</p>
    7071
    7172<p style="text-align: center;">
     
    9596<p> Having 12 values (4 RGB triplets) is still a lot less than the original
    9697value of 3072 (for 32×32 tiles), and the results show clear improvement,
    97 for instance the feather-hat frontier is now a lot smoother: </p>
     98for instance the feathers-hat frontier is now a lot smoother: </p>
    9899
    99100<p style="text-align: center;">
  • www/study/study.py

    r2032 r2098  
    3939        c = self.colorResolve((r, g, b))
    4040        self.setPixel((x, y), c)
    41     def getCrop(self, x, y, w, h):
     41    def getRegion(self, x, y, w, h):
    4242        dest = Image((w, h), True)
    4343        self.copyTo(dest, (-x, -y))
     
    817817    for y in range(sh):
    818818        for x in range(sw):
    819             thumbs.append(src.getCrop(x * tnw, y * tnh, tnw, tnh))
     819            thumbs.append(src.getRegion(x * tnw, y * tnh, tnw, tnh))
    820820    random.shuffle(thumbs)
    821821    return thumbs
     
    912912    coeffs1x1 = mosaic_analyse(tnlist, 1, 1)
    913913    test61x(coeffs1x1, 10, 8, 8).save("out6-1-1.png")
    914     out612 = lenna256.getCrop(100, 90, 80, 80)
     914    out612 = lenna256.getRegion(100, 90, 80, 80)
    915915    out612.save("out6-1-2.png")
    916916    test61y(out612, 6, 6, tnlist, coeffs1x1).save("out6-1-3.png")
Note: See TracChangeset for help on using the changeset viewer.