MP5
Photomosaic
|
Code for the maptiles function. More...
Functions | |
MosaicCanvas * | mapTiles (SourceImage const &theSource, vector< TileImage > &theTiles) |
Map the image tiles into a mosaic canvas which closely matches the input image. More... | |
TileImage * | get_match_at_idx (const KDTree< 3 > &tree, map< Point< 3 >, int > tile_avg_map, vector< TileImage > &theTiles, const SourceImage &theSource, int row, int col) |
Find the closest TileImage for a particular row and column. More... | |
Code for the maptiles function.
MosaicCanvas* mapTiles | ( | SourceImage const & | theSource, |
vector< TileImage > & | theTiles | ||
) |
TileImage* get_match_at_idx | ( | const KDTree< 3 > & | tree, |
map< Point< 3 >, int > | tile_avg_map, | ||
vector< TileImage > & | theTiles, | ||
const SourceImage & | theSource, | ||
int | row, | ||
int | col | ||
) |
Find the closest TileImage for a particular row and column.
This involves creating a representative TileImage to search for, and querying the KDTree for the nearest neighbor
tree | The KDTree to search in |
tile_avg_map | Maps points to indices in the TileImage vector |
theTiles | Tiles to be used in the Photomosaic |
theSource | The image to make a Photomosaic of |
row | The row of the source image |
col | The column of the source image |