Untitled

 

Saturday June 8th 2002 01:41 AM PST
ok, for those of you who don't know. I am a geek. Its now about 1:30 in the morning and I've finished playing Final Fantasy X and watching Star Trek Voyager (I'm not just saying this to be cute, it's the truth) Now, i've got a problem. the best way for me to figure this shit out is to just start writing and hopefully i'll trigger the answer. OK... THE PROBLEM. you have 10,000+ images. and you want to build a mosaic out of them and recreate a single image. So, you take point samples of the color on the images and do a whole bunch of math. Its accurate enough now, but i want a little more. Let's say each image has 16 "sectors", and in each sector you average the RGB value. So now for each of the 10,000+ images you have good idea of the color, and more importantly the color distribution. Now, i lied earlier, here's the actual problem. How do you take a single 4x4 matrix and find the closest matching matrix out of thousands? Ok, like i said, i'm a geek. Ok, so solution #1. Take the source matrix (the one you're trying to match) and look at the first sample RGB value. This would be the average color in the top left of the image. I can easily do a quick search through an array and spit out the ONE IMAGE that has the closest matching color to the source. So what i should do is actually list the top 20 closest match for each of the 16 samples. Then out of all the close matches do a cross reference and then find any image that may pop up more than the others. Problem with option #1 is that it's DAMN SLOW. Too many operations and too many fuckin recursive loops. So now, I don't have an option #2 yet. i know i've got to use a series of averages to find the close match. I have to take all the sample points into consideration and then find a way to match all the points at the same time. hmmmm...

No Comments Yet

Add Your Own Comment: --
Comments will go through an approval process and will be added when they are approved.

Name:
Email:
Homepage: