best way to analysis this?

Started by
2 comments, last by dimebolt 18 years, 9 months ago
what i am doing is making a mosaic program, one that will take a picture and make a new picture that is the same but made up of other pictures. what i need is a good way to figure out the colors of the original picture and using those as integers, figure out what picture to use in a given area as the area's color. This seems similar to compression but im not sure what method to use that would result in good mosaics. Any ideas?
Advertisement
I'm not sure about compression... but my impulse would be to downsample the image to the dimension where each mosaic component image would represent one pixel in the original. Then using the downsampled original's pixels as RGBs, pick the closest mosaic candidate image's average RGBs to fill that pixel's space. This is the equivalent to shrinking the image down, then blowing it back up into a bunch of monotone rectangles, then replacing each rectangle with one of the mosaic images based on how similar their RGBs are.

Of course, there are certainly better ways to obtain higher-quality mosaics, but as a first pass this will work out alright.
(edit: forget it the problem is different. Sorry for being misleading.) ajas95 solution is fine.


[Edited by - b34r on July 11, 2005 3:39:14 AM]
Praise the alternative.
Quote:Original post by ajas95
I'm not sure about compression... but my impulse would be to downsample the image to the dimension where each mosaic component image would represent one pixel in the original. Then using the downsampled original's pixels as RGBs, pick the closest mosaic candidate image's average RGBs to fill that pixel's space. This is the equivalent to shrinking the image down, then blowing it back up into a bunch of monotone rectangles, then replacing each rectangle with one of the mosaic images based on how similar their RGBs are.

Of course, there are certainly better ways to obtain higher-quality mosaics, but as a first pass this will work out alright.


That will probably work well enough for your purposes. But, if your interested in more advanced techniques, this link should point to a ppt presentation describing more tricks. Unfortunately, at the time of posting, the link is dead. It was still alive 4 days ago, though. It may come back up again. Otherwise this post is utterly useless.

Tom

This topic is closed to new replies.

Advertisement