C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28695
Number of posts: 94715

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
photo mosaic- data-structure Posted by PHPeter on 12 Nov 2012 at 7:28 AM
I’m not sure where to post this question, so if it’s not in the right forum please move it, thank you.

My goal is to make a photomosaic. I already have made a script which makes a photomosaic (PHP). But it very slow because of the linear search through all images. I’m trying to make this process much quicker.

The bottleneck is matching the best picture with a part of the main picture. For example: I have to search which 3 images are closest to the color 34.234.128. (RGB). So I determine the distance between this color and the mean color of all images.

Now I’m searching how to improve this process, this is the reason I’m here. I’ve got some questions and maybe you got some suggestions/answers.

• What data-structure should I use and why? After searching online I found a solution called KD-tree. But I’m not sure this is the most efficient way. Maybe there are other methods more suited for my problem.
• Which language should I use with this data-structure. And what sort of database do you guys suggest?

Peter




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.