Sign in to follow this  
vaneger

best way to analysis this?

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
(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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this