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 7959073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:30:57+00:00 2026-06-04T04:30:57+00:00

Im developing a system that uses kinect for image processing. The system needs to

  • 0

Im developing a system that uses kinect for image processing. The system needs to detect certain objects based on their colors (from the kinect image).

My current solution is to use a window (of fixed size) and slide it through the whole image. I then count(in the window) the number of pixels that are green and compare it against some treshold. To check if the pixel is green i use a reference color (0x00FF00) and then calculate the distance of the current pixel to the reference color.

The algorithm goes like this:

referenceColor = 0x00FF00;
window_width = 10;
window_height = 10;
colorSum = 0;

COLOR_TRESHOLD = 20;
WINDOW_COLOR_TRESHOLD = 70;

foreach (pixel in image)
{
   colorSum = 0;
   for(i = 0; i < window_width; i++)
   { 
      for(j = 0; j < window_height; j++)
      { 
        //get the current pixel that is processed by the window
        curPixel = image.getPixelAt(i+pixel.indexX,j+pixel.indexY);
        // calculate the distance
        distance = sqrt((curPixel.r - referenceColor.r) ^ 2 + (curPixel.g - referenceColor.g) ^ 2 + (curPixel.b - referenceColor.b) ^ 2); 

        // check if distance smaller than the treshold
        if(distance <= COLOR_TRESHOLD) 
        {
           // pixel is green
           colorSum++;
        }
      }
   }
   // check if there are enough green pixels in the image
   if(colorSum > WINDOW_COLOR_TRESHOLD)
   {
       // green object detected
   }
}

The problem with this algorithm is that if the color is to dark/bright (due to sunlight/reflections) it fails (and i have to change the tresholds to get good detection). Ideally i would like to archive that every green pixel/object will get detected (regardless of how bright/dark it is). Does any know any good (robust) algorithm to archive this? Would appreciate a point in the right direction.

Thanks.

  • 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-06-04T04:30:58+00:00Added an answer on June 4, 2026 at 4:30 am

    You may need to use another colour space. Convert to HSV, and work with the hue.
    Have a look at this article, it provides an example. This is with openCV, but it should not be too difficult to adapt.

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

Sidebar

Related Questions

I'm developing a simple captcha system that uses jquery to refresh the image if
I am developing an application that uses system activity to add a contact to
Im currently developing a program that uses a scrollable/zoomable image as the main user
My current problem is that I'm developing a embedded system that uses a binary
I am developing a WordPress page that uses a jquery.slideto.js navigation system and html
I'm developing some lower end code in my system that uses multiple child classes
I am developing a PHP application that uses SQLite as database management system, MySQL
I have been developing an application that uses Models that are based on a
I'm developing on a system that was originally developed five years ago. I don't
I'm developing a system in Ruby that is going to make use of RabbitMQ

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.