yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
Muto S2 Robot📖
1.Introduction to Muto Robot
  • 1.Introduction to Muto Robot
  • 2.Accessories introduction
  • 3.Precautions for battery
  • 4.FAQ
2.Assembly and write system
  • 1.Raspberry Pi write system
  • 2.Jetson Nano write sytem
  • 3. Robot assembly tutorial
  • 4. Installation Video Part1-Part5
  • 4. Installation Video Part6-Part10
3.Remote control course
  • 1.Close APP control process
  • 2.Mobile APP remote control tutorial
  • 3.USB wireless handle remote control
4.Linux basic course
  • 1.Introduction to Linux system
  • 2.Ubuntu file system
  • 3.Ubuntu common commands
  • 4.Ubuntu common editors
  • 5.Ubuntu software operation commands
  • 6.Virtual machine installation
  • 7.SSH remote control
  • 8.VNC remote control
  • 9.Transfer files remotely
  • 10.Driver library and communication
  • 11.Static IP and hotspot mode
  • 12.Bind device ID
  • 13.Capacity expansion and resource allocation
  • 14.Update system software sources
  • 15.Set root user password
  • 16.sudo free password
  • 17.Connect to WiFi network
  • 18.View system version
  • 19.Customized service management
  • 20.Back up system image
5.JupyterLab course
  • 1.ReadMe before operate
  • 2.Environment setup
  • 3.Basic usage tutorial
  • 4.Widgets configuration
  • 5.Widgets controls use
6.Jetson NANO course
  • 1.About JetsonNano system
  • 2.Network configuration and Jtop
  • 3.swap space increased
  • 4.API usage of GPIO library
  • 5.Hardware library configuration
  • 6.Pin reading function
  • 7.Pin level output control
  • 8.Control LED
  • 9.Jetson Nano communicates with external device serial ports
  • 10.jetson nano I2C communication
7.Raspberry Pi course
  • 1.Python usage
  • 2.Use APT to install Python packages
  • 3.Python virtual environment
  • 4.GPIO Zero
  • 5.Pin output high and low levels
  • 6.Pin reads high and low levels
  • 7.Pin output PWM
  • 8.Serial communication
  • 9.I2C communication
8.Robot basic course
  • 1.Control buzzer
  • 2.Control PWM servo
  • 3.Control bus servo
  • 4.Robot forward and backward
  • 5.Robot move left and right
  • 6.Robot rotate left and right
  • 7.Control height
  • 8.Control head
  • 9.Action group performance
  • 10.Read data
  • 11.Host computer control
  • 12.Camera driver
9.Open Source CV course
  • 1.Introduction to Open Source CV
  • 2.Image reading and display
  • 3.Picture writing
  • 4.Image Quality
  • 5.Pixel operations
  • 6.Image zoom
  • 7.Picture cut
  • 8.Picture pan
  • 9.Picture mirroring
  • 10.Affine transformation
  • 11.Picture rotation
  • 12.perspective transformation
  • 13.Grayscale processing
  • 14.Binary image
  • 15.Edge green detection
  • 16.Line segment drawing
  • 17.Rectangular circle drawing
  • 18.Text and picture drawing
7.AI vision course
  • 0.Color HSV value calibration
  • 1.Color recognition
  • 2.Color tracking
  • 3.Color following
  • 4.Color recognition action group
  • 5.Face detection
  • 6.Face tracking
  • 7.Greet people
  • 8.QR code recognition
  • 9.QR code instructions
  • 10.visual line following
  • 11.Motion learning
  • 12.Teach pendant synchronized action
8.Machine deep learning
  • 1.KNN
  • 2.TensorFlow basic tutorial
  • 3.Basic use of PyTorch
  • 4.Yolov5 detects objects in real time
  • 5.Jetson-inference environment construction(selective viewing)
  • 6.Object detection and action
  • 7.Body movement control robot
  • 8.Gesture controlled robot
Remote login control
  • 1. VNC and SSH remote login
  • 2. Jupyter lab login and case code running
9.FAQnew
  • Using your own Jetson board, Muto S2 cannot start normally
Download
  • APP(iOS/Android)
  • SystemFile_For_RPi5
  • System_for_RPi4
  • System_for_JetsonNANO
  • Hardware and protocol
  • Instruction manual
  • Jetson_Boot_USB.tar.gz
Download ZIP

Welcome to Muto S2 Robot repository

0.Color HSV value calibration

0、Color HSV value calibration

0、Color HSV value calibration1 brief introduction2 Core content analysis3 Steps

1 brief introduction

In this course, we will focus on capturing camera images, selecting the corresponding color, and then adjusting its HSV value to achieve the best recognition effect.

This course mainly optimizes the recognition effect by modifying the HSV value of the image, and then provides more accurate HSV values to the routines related to color recognition.

Note: Since the HSV values calibrated by this tutorial are only stored in this routine directory, they need to be manually copied into the source code of the routine that needs to update the HSV values for this to work.

2 Core content analysis

g_ENABLE_CHINESE indicates the control Chinese character switch, the default is False for English characters, if you need to display Chinese, please set to True.

g_ENABLE_CHINESE = False
Name_widgets = {
    'Red': ("Red", "红色"),
    'Green': ("Green", "绿色"),
    'Blue': ("Blue", "蓝色"),
    'Yellow': ("Yellow", "黄色"),
    'Custom': ("Custom", "自定义"),
    'Close_Camera': ("Close_Camera", "关闭摄像头")
}

The range of color HSV values is shown in the following figure:

image-20220811205508445

When the color button is clicked for the first time, the initial HSV value is used, and then the value of the slider needs to be adjusted based on the HSV value of the color to make the color more accurate, and the final effect is to accurately identify the color, but not confusing with other colors.

Initialize the hexapod robot, set the camera pan-tilt Angle, the default is S1=90, S2=0, the initial Angle can be modified according to the actual demand.

xxxxxxxxxx
from MutoLib import Muto
g_bot = Muto()
g_bot.Gimbal_1_2(90, 0)

The default camera image resolution is 640*480, and the display resolution can be modified to 320*240 to reduce the image frame.

xxxxxxxxxx
img_width = 320
img_height = 240

 

3 Steps

Open the jupyterLab client and find the code path:

xxxxxxxxxx
muto/Samples/AI_Samples/00_color_hsv/color_hsv.ipynb

Click to run all cells, and then scroll to the bottom to see the generated controls.

image-20220810163917767

The control displays three image boxes. The image control on the left displays the original image. The function of the image control in the middle is: the recognized color is displayed as white and other colors are displayed as black. The function of the image control on the right is: the recognized color is displayed normally and other colors are displayed. into black.

A single color can be put into the camera picture, but in order to get the HSV value more accurately, four colors, red, green, blue and yellow, can be put into the camera picture. Select a color among red, green, blue and yellow. At this time, a √ will appear to the left of the selected color. Please slightly adjust the six sliders to modify the value of the color HSV so that the selected color is displayed completely and does not differ from other colors. Mix the color blocks, then click on the corresponding color again to save the color HSV value to a local file. Each time you select a color, the local file will be read first. If the local file cannot be read, the default HSV value will be used. If you need to restore the default HSV value, please delete the HSV_VALUE.TXT file of the corresponding color.

For example, red is selected here. If the color recognition is incomplete or wrong, please slightly adjust the six sliders to modify the value of the color HSV. When the color effect reaches the appropriate effect, click the red button again to save the current color HSV. value to a local file.

image-20230602111116332

For example, the red color in the picture above is saved in the RED_HSV_VALUE.TXT file, where the HSV values are 0,59,81,10,255,255. Numerical representation: Hmin, Smin, Vmin, Hmax, Smax, Vmax. This value can be copied and updated to the HSV value of other routines.image-20230602111533983

The green HSV calibration effect is as follows. After calibration, please click the green button again to save the values to the GREEN_HSV_VALUE.TXT file.

image-20230602111243095

The blue HSV calibration effect is as follows. After calibration, please click the blue button again to save the value to the BLUE_HSV_VALUE.TXT file.

image-20230602111349656

The yellow HSV calibration effect is as follows. After calibration, please click the yellow button again to save the value to the YELLOW_HSV_VALUE.TXT file.

image-20230602111436078

Customize the color button. After calibration, please click the custom button again to save the value to the CUSTOM_HSV_VALUE.TXT file.

Finally click the Close_Camera button to close the camera.

Note: The TXT file of HSV values generated after calibration in this tutorial will not be automatically updated to all routines. You need to update and replace the HSV value variables in the program based on the values in the TXT file.

Text and picture drawing
Color recognition

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
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文