Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3232410
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:09:28+00:00 2026-05-17T17:09:28+00:00

I’m working on a project that involves scanning in colors to RGB then searching

  • 0

I’m working on a project that involves scanning in colors to RGB then searching through a database of more RGB data to see what is most similar to the scanned in color. I’ve decided that the easiest way to determine what “similar” means in this case is to represent the colors in three dimensional space and then find the distance between the scanned point and the rest of the database.

It seems to me that the first part of this is fine, the idea of using 3d space and proximity, but that second half seems like a bad idea to me, I shouldn’t have to check the scanned color against every single point in the database, should I? Having never done any formal CS work, I don’t know what to do, but I have a terribly distinct feeling that there must be a better way.

Or, to make this abstract: I have some input data, and a bunch of stored data and a function that tells me how similar the any two data are. What is the most efficient way of finding out the most similar stored entity to the input?

Edit: I’m using python for this, if anyone’s curious.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:09:28+00:00Added an answer on May 17, 2026 at 5:09 pm

    To address the abstract statement: Unless there is structure in the similarity function that is known a priori, there is no better method than “try everything”.

    Your problem is studied under the term “nearest neighbor search”. For this problem a cover tree is vaguely suitable. This page has pointers to code. A kd-tree may also be suitable.

    In the absence of further information about the structure or coverage of the database of reference colors, it’s hard to make further suggestions. For instance, if the database is known to have a worst case sparsity, then the query can be constrained to those entries whose R component differs from the test color’s R component by less than the sparsity and so on for the G and B components, reducing the entire database to a smaller cubical section guaranteed to contain the result. (Using this method requires a proof that no point in the cube is further than X from some point in the database, which at least can be predetermined only once for a fixed database.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
In my XML file chapters tag has more chapter tag.i need to display chapters
I need a function that will clean a strings' special characters. I do NOT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.