yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
USB Industrial Grade AI Vision Camera📖
01.Basic course
  • 1.Camera parameters
  • 2.Camera detect
  • 3.Camera preview screen
02.Docker
  • 1.Docker overview and docker installation
  • 2.Common commands for docker image containers
  • 3.Docker images deeply understand and publish images
  • 4.Docker hardware interaction and data processing
  • 5.Enter the bot's docker container
  • 6.Robot development environment construction in Docker
  • 7.How customers can update docker images in the future
03.ROS vision course
  • 0.Camera preview screen
  • 1.QR code
  • 2.Human pose estimation
  • 3.Target Detection
  • 4.AR vision
  • 5.ROS+Opencv basics
  • 6.Face recognition
  • 7.harris corner detection
  • 8.Target tracking algorithm
  • 9.Contour moment
  • 10.Polygon outline
  • 11.Discrete fourier transform algorithm
  • 12.Edge detection algorithm
  • 13.Face detection algorithm
  • 14.Optical flow detection algorithm
  • 15.Contour detection
  • 16.General contour detection
  • 17.Feature point tracking
  • 18.HLS color filtering
  • 19.Hough circle detection
  • 20.Hough linear detection
  • 21.HSV color filtering
  • 22.LK optical flow algorithm
  • 23.Detection algorithm
  • 24.Phase dependent displacement detection
  • 25.Image pyramid sampling algorithm
  • 26.RGB color filtering
  • 27.Clear background detection algorithm
  • 28.Simplified optical flow algorithm
  • 29.Simple filter
  • 30.Threshold image processing
  • 31.Watershed segmentation algorithm
04.Mediapipe course
  • 1.Hand detection
  • 2.Attitude detection
  • 3.Overall inspection
  • 4.Face detection
  • 5.Face recognition
  • 6.Face effects
  • 7.3D object recognition
  • 8.Brush
  • 9.Finger control
  • 10.Gesture recognition
05.Robot Vision course
  • Tracking color line
06.Camera preview and frame rate test
  • Camera preview and frame rate test
Download
  • Docker Image
  • PC_Software
Download ZIP

Welcome to USB Industrial Grade AI Vision Camera repository

Tracking color line

Tracking color line

Tracking color line1. Introduction1.1 Introduction to HSV1.2 HSV hexagonal pyramid2. Operation steps2.1 Start2.2 Identify

Code path:~/yahboomcar_ws/src/yahboomcar_linefollw

1. Introduction

The Yahboom robot has tracking color line, which can recognize multiple colors at any time and autonomously store the currently recognized colors. It follows the detected colors and can also achieve real-time obstacle avoidance during the tracking process.

The Yahboom mobile robot can also achieve real-time control of HSV. By adjusting the high and low thresholds of HSV, interference colors can be filtered out, so that the tracking route can be recognized very ideal in complex environments. If the effect in color picking is not ideal, the car needs to be moved to different environments for calibration to achieve the ability to recognize the desired color in complex environments.

1.1 Introduction to HSV

HSV (Hue, Saturation, Value) is determined by A R. A color space created by Smith in 1978, also known as the Hexacone Model. The parameters of colors in this model are: hue (H), saturation (S), and brightness (V). H: 0-180 S: 0-255 V: 0-255 Here, part of the red color is classified as the purple range:

image-20240307153429351

1.2 HSV hexagonal pyramid

Color tone H Represents color information, that is, the position of the spectral color in which it is located. This parameter is represented by an angular quantity, with a value range of 0 ° to 360 °. It is calculated counterclockwise starting from red, with red indicating 0 °, green indicating 120 °, and blue indicating 240 °. Their complementary colors are: yellow at 60 °, cyan at 180 °, and purple at 300 °. Saturation S The saturation S is expressed as the ratio between the purity of the selected color and the maximum purity of that color. When S=0, only grayscale is available. 120 degrees apart. The complementary colors differ by 180 degrees. A color can be seen as the result of mixing a certain spectral color with white. The larger the proportion of spectral colors, the closer the color is to spectral colors, and the higher the saturation of the color. High saturation results in deep and vibrant colors. The white light component of the spectral color is 0, and the saturation reaches its highest level. The usual range of values is 0% to 100%, and the larger the value, the more saturated the color. Brightness V Brightness represents the degree of brightness of a color, and for a light source color, the brightness value is related to the brightness of the emitting body; For object color, this value is related to the transmittance or reflectance of the object. The usual range of values is from 0% (black) to 100% (white). One thing to note is that there is no direct connection between it and light intensity. The three-dimensional representation of the HSV model evolved from the RGB cube. Imagine observing the hexagonal shape of a cube from the white vertices along the diagonal of the RGB to the black vertices. The hexagonal boundary represents color, the horizontal axis represents purity, and brightness is measured along the vertical axis.

image-20240307153449345

2. Operation steps

2.1 Start

Open two terminals and run the following content separately:

Terminals-1:

roscore

Terminals-2:

xxxxxxxxxx
cd ~/yahboomcar_ws/src/yahboomcar_linefollw/scripts
python3 follow_line.py 

2.2 Identify

After startup, the system defaults to [Object Detection Mode], as shown in the following image on the left:

image-20240307154141402

Keyboard key control: 【r】 Color selection mode, where the mouse can be used to select the area of the color to be recognized (within the range of the area). 【i】 Object detection mode. Color image on the left and Binary image on the right. 【q】 : Exit the program.

x
In the color selection mode, you can use the mouse to select the area of the color you want to recognize (not exceeding the area range), as shown in the following figure. Release to start recognition.

 

 

Gesture recognition
Camera preview and frame rate test

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文