KDnuggets » Forums
Latest News



 FAQFAQ    SearchSearch    MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Kd tree 3d

 
Post new topic   Reply to topic    www.kdnuggets.com Forum Index -> Data Mining Open Forum
View previous topic :: View next topic  
Author Message
phpeter



Joined: 09 Jul 2012
Posts: 2

PostPosted: Sat Nov 10, 2012 2:11 pm    Post subject: Kd tree 3d Reply with quote

I made a photo mosaic script (PHP). This script takes one main picture and changes it to a photo buildup of little pictures (thumbnails). From a distance it looks like the real picture, when you move closer you see it are all little pictures. I take a square of a fixed number of pixels and determine the average color of that square. Then I compare this with my database which contains the average color of a couple thousand of pictures. I determine the color distance with all available images. But to run this script fully it takes a couple of minutes.

The bottleneck is matching the best picture with a part of the main picture. I have been searching online how to reduce this and came a cross “KD Tree.”

So I’m trying to make a K-D Tree, to compare the mean color of pictures. For example: I have to search which thumbnail is closed to the color 255.255.2555. (RGB). But I have some questions.

• Is the KD Tree the best way to store my data? Or are there better solutions which are quicker or easier to code?
• First off all I’m only familiar with PHP in combination with MySQL. Is it possible to store this tree somehow in to my MySQL DB? If not what do you guys recommend
• I presume it is possible to find the 3 closed points by using Nearest Neighbor (NN), but do I really get the points closed to it or do I get some points that are pretty close?
• I've have searched the web but couldn’t find something on how to search in the tree. Does anyone know an article or some other guide on how the search works? Any other useful information about the K-D tree is welcome as well.

Peter
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.kdnuggets.com Forum Index -> Data Mining Open Forum All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KDnuggets » Forums

Copyright © 2012 KDnuggets.   Subscribe to KDnuggets News! Tweet Twitter | facebook Facebook | RSS RSS | About KDnuggets