I'm not really sure what the question was. "the color pattern but not the shape" really doesn't make much sense, since shapes in images are arguably just color patterns.
So we have two interpretations:
- How do I generate a symmetric pattern? (i.e. the tile)
- How do I generate a montage of images? (i.e. the mosaic)
The first task is probably something easier done in an actual graphics editing program. I'm going to ignore that for now. Creating the mosaic from similar-sized tiles is simple. Consider the repeated tiling of a single image:
The simplest way would be to just replicate the image. There's no border between tiles.
inpict = imread('pat9.png');
outpict = repmat(inpict,tiling);
You could add a border between the tiles if you use imtile().
inpict = imread('pat9.png');
bcolor = [0.9173 0.8899 0.775];
outpict = imtile(repmat(inpict,[1 1 1 prod(tiling)]),'gridsize',tiling, ...
'bordersize',bwidth,'backgroundcolor',bcolor);
Note that the border is 5px around each tile. That means that the border between adjacent tiles is twice as wide as the border around the entire mosaic. You can fix that by adding an extra border on the result.
inpict = imread('pat9.png');
bcolor = [0.9173 0.8899 0.775];
tiledpict = imtile(repmat({inpict},[prod(tiling) 1]),'gridsize',tiling, ...
'bordersize',bwidth,'backgroundcolor',bcolor);
for c = 1:size(tiledpict,3)
outpict(:,:,c) = padarray(tiledpict(:,:,c),[1 1]*bwidth,'replicate','both');
That's clumsy and could be simplified with MIMT tools. inpict = imread('pat9.png');
bcolor = [0.9173 0.8899 0.775];
outpict = addborder(inpict,bwidth,bcolor,'normalized');
outpict = imtile(repmat(outpict,[1 1 1 prod(tiling)]),tiling);
outpict = addborder(outpict,bwidth,bcolor,'normalized');
Consider how we might extend this to recreating the original mosaic from multiple different tiles.
instack = mimread('pat*.png');
bcolor = [0.9173 0.8899 0.775];
instack = imstacker(instack,'padding',bcolor);
instack = addborder(instack,bwidth,bcolor,'normalized');
outpict = imtile(instack,tiling);
outpict = addborder(outpict,bwidth,bcolor,'normalized');
These last two examples rely on MIMT imtile(), which is a reversible 4D image reshaping tool, and not the same as imtile(), which is an extension of the display tool montage(). They are similar, but incompatible.
It should be noted that the original tiles given are not strictly symmetric. The angular spacing of features is not consistent, nor are the sequences of features colocated on a common center of symmetry. These were probably generated by hand.
That said, I did go ahead and clean up all the original tiles and denoise them as best I could. They have been trimmed, padded and resized to a consistent geometry. See the attached zip file.