Code covered by the BSD License  

Highlights from
Mosaic generator

image thumbnail

Mosaic generator

by

 

15 Jan 2011 (Updated )

Photo mosaic generator. Choose a tile image, and a directory with images, and see the magic.

mosaic_el_perm=permute_mosaic_elements(needed_no_of_elements,no_of_existing_elms)
function mosaic_el_perm=permute_mosaic_elements(needed_no_of_elements,no_of_existing_elms)

mosaic_el_perm=1:no_of_existing_elms;

if needed_no_of_elements>no_of_existing_elms
    mosaic_el_perm=imresize(mosaic_el_perm,[1,needed_no_of_elements],'nearest');
end
mosaic_el_perm=mosaic_el_perm(randperm(length(mosaic_el_perm)));
mosaic_el_perm=mosaic_el_perm(1:needed_no_of_elements);

Contact us