Changes between Version 1 and Version 2 of libcaca/study/7
- Timestamp:
- 12/22/2009 09:23:17 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
libcaca/study/7
v1 v2 5 5 Since we don’t have many images at our disposal, we will simply cut Lena into small chunks (called '''tiles''') and use these parts to create mosaics. This is our '''tile database''': 6 6 7 [[Image(source:/web/trunk/ static/study/out/lena7-0-1.png,class="inline",alt="Patterns taken from Lena")]]7 [[Image(source:/web/trunk/www/study/out/lena7-0-1.png,class="inline",alt="Patterns taken from Lena")]] 8 8 9 9 Generating a photomosaic consists in subdividing the original picture into ''x'' rectangular cells and find ''x'' tiles in the database (with or without duplicates, depending on the set of rules that is decided) so that when recombined the resulting image resembles the original picture. By the way, this technique is covered by Runaway Technology Inc.’s [http://www.freepatentsonline.com/6137498.html U.S. patent 6137498] ![9]. … … 15 15 One of the simplest image classification techniques is the storage of each tile’s '''average colour''' into a separate database that is used for best match lookups. Of course, this computation should be gamma-corrected: 16 16 17 [[Image(source:/web/trunk/ static/study/out/lena7-1-1.png,class="inline",alt="1 feature extracted from Lena patterns")]]17 [[Image(source:/web/trunk/www/study/out/lena7-1-1.png,class="inline",alt="1 feature extracted from Lena patterns")]] 18 18 19 19 When creating the mosaic, we then only need to check the average colour instead of comparing each pixel one by one. Below is the result of the technique applied on a portion of the Lena picture: 20 20 21 [[Image(source:/web/trunk/ static/study/out/lena7-1-2.png,class="inlinetop",alt="Lena (detail)")]]22 [[Image(source:/web/trunk/ static/study/out/lena7-1-3.png,class="inline",alt="Mosaic created from Lena’s detail")]]21 [[Image(source:/web/trunk/www/study/out/lena7-1-2.png,class="inlinetop",alt="Lena (detail)")]] 22 [[Image(source:/web/trunk/www/study/out/lena7-1-3.png,class="inline",alt="Mosaic created from Lena’s detail")]] 23 23 24 24 Better results can be achieved by storing '''four colour values''', one for each corner of the tile: 25 25 26 [[Image(source:/web/trunk/ static/study/out/lena7-1-4.png,class="inline",alt="4 features extracted from Lena patterns")]]26 [[Image(source:/web/trunk/www/study/out/lena7-1-4.png,class="inline",alt="4 features extracted from Lena patterns")]] 27 27 28 28 Having 12 values per tile (4 RGB triplets) is still a lot less than the original count of 3072 (for 32×32 tiles), and the results show clear improvement. For instance the feathers-hat frontier is now a lot smoother: 29 29 30 [[Image(source:/web/trunk/ static/study/out/lena7-1-2.png,class="inlinetop",alt="Lena (detail)")]]31 [[Image(source:/web/trunk/ static/study/out/lena7-1-5.png,class="inline",alt="Mosaic created from Lena’s detail")]]30 [[Image(source:/web/trunk/www/study/out/lena7-1-2.png,class="inlinetop",alt="Lena (detail)")]] 31 [[Image(source:/web/trunk/www/study/out/lena7-1-5.png,class="inline",alt="Mosaic created from Lena’s detail")]] 32 32 33 33 == 7.2. Error diffusion == … … 39 39 TODO 40 40 41 [[Image(source:/web/trunk/ static/study/fig7-3-1.png,class="matrix",alt="ASCII art tiles")]]41 [[Image(source:/web/trunk/www/study/fig7-3-1.png,class="matrix",alt="ASCII art tiles")]]