Skip to content

+49 1626571232

info@openelab.io

🚀 Free Shipping from 50€ in EU / 80€ Worldwide

Quickly Build A Color Recognition App with AI Edge Computing

22 May 2024 0 Comments

Color Recognition Action Execution Based on HuskyLens

  

This function can learn, recognize, and track specified colors.
The default setting is to learn, recognize, and track one color. This section uses learning, recognizing, and tracking multiple colors as an example for explanation.

Tip: Ambient lighting greatly affects color recognition. For similar colors, HuskyLens may sometimes misidentify them. It is recommended to maintain stable ambient lighting and use this function in a moderately lit environment.

 

Wiring Diagram

  

HuskyLens is connected to Raspberry Pi via serial port, with HuskyLens's Tx to Rx and Rx to Tx, and a baud rate of 9600. Connect the RGB light's R to GPIO17, G to GPIO27, and B to GPIO22.

 

Specific Steps

Operation Settings

  1. Toggle the "Function Button" left or right until "Color Recognition" is displayed at the top of the screen.

  2. Long press the "Function Button" to enter the secondary menu parameter settings interface for the color recognition function.

  3. Toggle the "Function Button" left or right to select "Learn Multiple," then briefly press the "Function Button." Next, toggle the "Function Button" to the right to turn on the "Learn Multiple" switch, indicated by the progress bar turning blue and the square on the progress bar moving to the right. Briefly press the "Function Button" again to confirm this parameter.

  1. Toggle the "Function Button" to the left to select "Save and Return," then briefly press the "Function Button." The screen will prompt "Save parameters?" with the default selection being "Confirm." Briefly press the "Function Button" to save the parameters and automatically return to the color recognition mode.

Learning and Recognition

  1. Detect Color.

  2. Aim the "+" at the center of the HuskyLens screen at the target color block. A white box will appear on the screen, automatically framing the target color block. Adjust the angle and distance between the HuskyLens and the color block so that the white box encloses the entire target color block as much as possible.

  1. Learn Color.

  2. After detecting the color, press the "Learning Button" to learn the first color, then release the "Learning Button" to end learning. The screen will display a message: "Press again to continue, press another button to end." To continue learning the next color, press the "Learning Button" again before the countdown ends to continue learning the next color. If no further colors need to be learned, press the "Function Button" before the countdown ends, or do nothing and wait for the countdown to end. The color IDs displayed by HuskyLens will correspond to the order in which the colors were learned, meaning the IDs will be sequentially labeled as "ID1," "ID2," "ID3," and so on. The boxes for different colors will also have different colors.

  1. Recognize Color.

  2. When HuskyLens encounters the same or similar colors, a colored border will frame the color block on the screen and display the color's ID. The border size will change with the area of the color block, and it will automatically track the color block. Multiple different colors can be recognized and tracked simultaneously, and the borders for different colors will have different colors.

  1. In firmware versions below V0.5.1, when multiple color blocks of the same color appear, separated color blocks cannot be recognized simultaneously; only one color block can be recognized at a time. As shown in the figure below:

  1. In firmware version V0.5.1 and above, this feature has been optimized. When multiple color blocks of the same color appear, these blocks can be recognized simultaneously. This feature can be used to count color blocks.

DEMO Code

 

Experimental Phenomenon

 
This project is widely used in fields such as robot navigation, automated production, education and popular science, artistic creation, and gaming entertainment. The color recognition function can be used for robot navigation, detecting object colors to enable recognition of different color markers or paths, and adjusting movement direction accordingly. It can also be used for detecting product colors, sorting and categorizing different colored products, thereby improving production efficiency and product quality. The color recognition function of HuskyLens has broad application prospects in various fields, helping to improve efficiency, enhance safety, and create more interesting application scenarios.

 
 

If you're working on a project using a Color Recognition Application, our website offers a wide range of Color Recognition products, and we can also produce customized Color Recognition based on your requirements.
 
OpenELAB is a one-stop development platform for global AIoT electronics enthusiasts and an open-source community for electronic engineers. Besides providing developer modules online, our services also include customized manufacturing of various electronic parts such as micro switches and batteries, as well as plastic or metal parts through 3D printing, injection molding, CNC, laser cutting, etc.
 
In addition to Color Recognition products, OpenELAB offers other electronic component sourcing services such as sensors, displays, IoT, and more. OpenELAB has a user-friendly website that makes it easy to find the components you need, and we offer fast shipping to customers around the world.
 
Moreover, OpenELAB offers Design as a Service (DaaS) for design optimization, Manufacturing as a Service (MaaS) for production manufacturing, Supply Chain as a Service (SaaS) for supply chain support, and Quality as a Service (QaaS) for quality control to AIoT products transitioning into mass production, ensuring a smooth transition to the commercial production phase.
  
Most importantly, OpenELAB is dedicated to building a global open-source community for AIoT electronic developers. Through the OpenELAB open community, developers in the AIoT electronic revolution can collaborate, empower each other, and create a culture of mutual respect and collaborative sharing, generating more innovative AIoT intelligent hardware products for the world.
 
 
 
Prev Post
Next Post

Leave a comment

All blog comments are checked prior to publishing

Someone recently bought a

Thanks for subscribing!

This email has been registered!

Shop the look

Choose Options

Edit Option
Back In Stock Notification
this is just a warning
Login
Shopping Cart
0 items
RuffRuff App RuffRuff App by Tsun