Skip to content

Initial cone/cube filter #5

@Connor2573

Description

@Connor2573

The first and easiest thing we can do to detect the cone is look for its color.

Prep work: Get a cone and point the PI camera at it.

Algorithm:

  1. Load the live camera feed.
  2. Make a copy of the image call it cImg
  3. For each pixel value detect if the RGB range is within a set tolerance. Set a lower and upper bound for red, green, and blue to compare the pixels to.
  4. If the value is within the tolerance set the pixel that corresponds to its position in cImg to 255 and if it is not set it to 0.
  5. Display the original and the copy.

Some notes:
Play with the tolerance and set it to be as small as possible.
We are creating a binary image in the copy, think about what that means.
To start with for the tolerance, google the RGB value of yellow and set it around that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions