CN110838150B - Color recognition method for supervised learning - Google Patents
Color recognition method for supervised learning Download PDFInfo
- Publication number
- CN110838150B CN110838150B CN201911127308.1A CN201911127308A CN110838150B CN 110838150 B CN110838150 B CN 110838150B CN 201911127308 A CN201911127308 A CN 201911127308A CN 110838150 B CN110838150 B CN 110838150B
- Authority
- CN
- China
- Prior art keywords
- color
- magic cube
- data
- space
- dimensional space
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2411—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Image Analysis (AREA)
- Spectrometry And Color Measurement (AREA)
Abstract
The invention discloses a color identification method for supervised learning, which comprises the following steps of 1) collecting data: a) collecting 6 magic cube color images in different illumination environments; b) converting an image space from RGB to HSV space; c) selecting specific areas of an image RGB and an image HSV, and averaging to obtain six groups of data of R, G, B, H, S and V in RGB and HSV color spaces; d) labeling color information on each group of data; 2) establishing an SVM model: e) taking the data (R, G, B, H, S, V) acquired in the step 1) as a point of a six-dimensional space; f) establishing a six-dimensional space, and mapping a large amount of data collected in different illumination environments in the step 1) into the six-dimensional space; g) dividing a six-dimensional space into six areas by using a five-dimensional plane, and storing model parameters; 3) the method comprises the steps of obtaining a magic cube image to be restored through a camera, collecting the average value of six RGBWV values in a designated area of the magic cube, extracting an SVM training model for color recognition, and judging which area of a six-dimensional space the point is located in.
Description
Technical Field
The invention relates to the field of magic cube restoration, in particular to a color identification method for supervised learning.
Background
The task of recovery of a puzzle is generally divided into two phases: firstly, the color of the magic cube is input and recognized by using an artificial intelligence technology, before the magic cube is restored, a computer sends an instruction to one mechanical arm, so that the mechanical arm performs specific action on the magic cube placed on a fingertip, and six faces of the magic cube appear in front of a camera according to a set rule. The color recognition efficiency of the existing magic cube robot is not high, the color recognition success rate can be reduced by the change of the illumination environment and the color difference of different magic cubes, for example, the MIT robot can not distinguish red from orange even though the recovery speed is high and the time is short, so that the black magic cube block is required to replace the orange to realize good recognition.
Disclosure of Invention
The invention aims to solve the technical problem that the color recognition efficiency of the existing magic cube robot is not high, and aims to provide a color recognition method for supervised learning.
The invention is realized by the following technical scheme:
a color recognition method for supervised learning comprises the following steps of 1) collecting data: a) collecting a large number of color images of 6 magic cube blocks under different illumination environments; b) converting each magic cube color image space from RGB to HSV space; c) selecting a specific area of an image RGB and an image HSV, and averaging to obtain six groups of data of R, G, B, H, S and V in RGB and HSV color spaces; d) labeling color information for each group of data; 2) establishing an SVM training model: e) taking the data (R, G, B, H, S, V) acquired in the step 1) as one point of a six-dimensional space; f) establishing a six-dimensional space, and mapping a large amount of data collected in different illumination environments in the step 1) into the six-dimensional space; g) dividing the six-dimensional space into six areas by using a five-dimensional plane, and storing the model parameters; 3) the method comprises the steps of obtaining an image of the magic cube to be restored through a camera, collecting an average value of six RGBHSV values in an appointed area of the magic cube, extracting an SVM training model for color recognition, and judging which area of a six-dimensional space the point is located in to judge the color.
The magic cube color recognition method adopts the algorithm of a multivariate support vector machine, and trains different magic cubes under different environments by using the SVM classifier, so that the running speed and the accuracy of the system are improved, the accuracy of the system in magic cube state recognition under different illumination conditions is improved, and the accurate recognition of six colors of the magic cube under the complex illumination environment is realized; by marking color information on each group of obtained data, the supervised learning of the magic cube color can be realized, and the accuracy of color identification is improved.
The SVM is an important algorithm in machine learning, and compared with the traditional method of dividing colors by threshold value limitation, the SVM is more stable. The method comprises the steps of firstly collecting 6 magic cube colors under different illumination, then decomposing the magic cube colors in an RGB space and an HSV space, and placing the magic cube colors in a six-dimensional space. Finally, the color recognition target is achieved by a method of finding a five-dimensional hyperplane in a six-dimensional space.
In step 3), the color of the rest surface of the edge block or the corner block is supplemented according to the color of one surface of the edge block or the colors of two surfaces of the corner block of the magic cube. On the premise of identifying the magic cube color by using an SVM classification method, the condition that a small part of color block colors cannot be identified or are identified wrongly still exists due to the change of shadow or magic cube color difference. Aiming at the problem, the method for automatically complementing the magic cube is provided, because the edge blocks with the same color on one surface are only four, and one edge block has two colors, the color of the missing edge block can be deduced according to another color, the color of the corner block can also be deduced in the same way, and the accuracy of magic cube color recognition can be greatly improved by combining an SVM method.
In step 3), the RGB color space of the magic cube image is converted into HSV color space.
Compared with the prior art, the invention has the following advantages and beneficial effects:
1. the color identification method for supervised learning adopts the algorithm of a multivariate support vector machine, improves the running speed and accuracy of the system, improves the accuracy of the system in identifying the magic cube state under different illumination conditions, and realizes the identification of the magic cube color under the complex illumination environment;
2. according to the color identification method for supervised learning, disclosed by the invention, the supervised learning of magic cube colors can be realized by labeling the color information on each group of obtained data, and the accuracy of color identification is improved;
3. the color recognition method for supervised learning, disclosed by the invention, can be used for training different magic cubes in different environments by using the SVM classifier, so that six colors of the magic cube can be accurately recognized;
4. according to the color recognition method for supervised learning, disclosed by the invention, the accuracy of magic cube color recognition can be greatly improved by combining a missing color repairing algorithm with an SVM (support vector machine) method.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to examples, and the exemplary embodiments and descriptions thereof are only used for explaining the present invention and are not used as limitations of the present invention.
Example 1
A color recognition method for supervised learning comprises the following steps of 1) collecting data: a) collecting a large number of color images of 6 magic cube blocks under different illumination environments; b) converting each magic cube color image space from RGB to HSV space; c) selecting a specific area of an image RGB and an image HSV, and averaging to obtain six groups of data of R, G, B, H, S and V in RGB and HSV color spaces; d) labeling color information for each group of data; 2) establishing an SVM training model: e) taking the data (R, G, B, H, S, V) collected in the step 1) as a point of a six-dimensional space; f) establishing a six-dimensional space, and mapping a large amount of data collected in different illumination environments in the step 1) into the six-dimensional space; g) dividing the six-dimensional space into six areas by using a five-dimensional plane, and storing the model parameters; 3) the method comprises the steps of obtaining a magic cube image to be restored through a camera, collecting the average value of six RGBWV values in a designated area of the magic cube, extracting an SVM training model for color recognition, and judging which area of a six-dimensional space the point is located in to judge the color.
The magic cube color recognition method adopts the algorithm of a multi-element support vector machine, and uses the SVM classifier to train different magic cubes under different environments, so that the running speed and the accuracy of the system are improved, the accuracy of the system in magic cube state recognition under different illumination conditions is improved, and the accurate recognition of six colors of the magic cube under a complex illumination environment is realized; by marking color information on each group of obtained data, the supervised learning of the magic cube color can be realized, and the accuracy of color identification is improved.
The SVM is an important algorithm in machine learning, and compared with the traditional method of dividing colors by threshold value limitation, the SVM is more stable. Firstly, the colors of 6 magic squares under different illumination are collected, then the colors are decomposed in an RGB space and an HSV space, and the colors are placed in a six-dimensional space. Finally, the color recognition target is achieved by a method of finding a five-dimensional hyperplane in a six-dimensional space.
Preferably, in step 3), the color of one surface of the edge block or the color of the other surface of the corner block of the magic cube is supplemented according to the color of one surface of the edge block or the colors of the two surfaces of the corner block. On the premise of identifying the color of the magic cube by using an SVM classification method, the condition that the color of a small number of color blocks cannot be identified or is identified wrongly still exists due to the change of shadows or color differences of the magic cube. Aiming at the problem, the method for automatically complementing the magic cube is provided, because the edge blocks with the same color on one surface are only four, and one edge block has two colors, the color of the missing edge block can be deduced according to another color, the color of the corner block can also be deduced in the same way, and the accuracy of magic cube color recognition can be greatly improved by combining an SVM method.
Preferably, in step 3), the RGB color space of the magic cube image is converted into the HSV color space.
The above-mentioned embodiments, objects, technical solutions and advantages of the present invention are further described in detail, it should be understood that the above-mentioned embodiments are only examples of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (3)
1. A color recognition method for supervised learning comprises the following steps of 1) collecting data: a) collecting color images of 6 magic cube blocks under a large number of different illumination environments; b) converting each magic cube color image space from RGB to HSV space; c) selecting specific areas of an image RGB and an image HSV, and averaging to obtain six groups of data of R, G, B, H, S and V in RGB and HSV color spaces; d) labeling color information for each group of data; 2) establishing an SVM training model: e) taking the data (R, G, B, H, S, V) acquired in the step 1) as one point of a six-dimensional space; f) establishing a six-dimensional space, and mapping a large amount of data collected in different illumination environments in the step 1) into the six-dimensional space; g) dividing the six-dimensional space into six areas by using a five-dimensional plane, and storing the model parameters; 3) the method comprises the steps of obtaining a magic cube image to be restored through a camera, collecting the average value of six RGBWV values in a designated area of the magic cube, extracting an SVM training model for color recognition, and judging which area of a six-dimensional space the point is located in to judge the color.
2. A supervised learning colour recognition method as claimed in claim 1, wherein in step 3), the colour of one of the remaining faces of the cube or cube is supplemented with the colour of one of the faces of the cube or both faces of the cube.
3. A color recognition method for supervised learning according to claim 1, wherein in step 3), the RGB color space of the magic cube image is converted into the HSV color space.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911127308.1A CN110838150B (en) | 2019-11-18 | 2019-11-18 | Color recognition method for supervised learning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911127308.1A CN110838150B (en) | 2019-11-18 | 2019-11-18 | Color recognition method for supervised learning |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110838150A CN110838150A (en) | 2020-02-25 |
CN110838150B true CN110838150B (en) | 2022-07-15 |
Family
ID=69576719
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911127308.1A Active CN110838150B (en) | 2019-11-18 | 2019-11-18 | Color recognition method for supervised learning |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110838150B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111950654B (en) * | 2020-08-25 | 2022-07-05 | 桂林电子科技大学 | Magic cube color block color reduction method based on SVM classification |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106960176A (en) * | 2017-02-22 | 2017-07-18 | 华侨大学 | A kind of pedestrian's gender identification method based on transfinite learning machine and color characteristic fusion |
CN107292339A (en) * | 2017-06-16 | 2017-10-24 | 重庆大学 | The unmanned plane low altitude remote sensing image high score Geomorphological Classification method of feature based fusion |
CN109035196A (en) * | 2018-05-22 | 2018-12-18 | 安徽大学 | Saliency-Based Image Local Blur Detection Method |
CN109284759A (en) * | 2018-07-24 | 2019-01-29 | 五邑大学 | One kind being based on the magic square color identification method of support vector machines (svm) |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016070309A1 (en) * | 2014-11-03 | 2016-05-12 | Carroll Terrence A | Textile matching using color and pattern recognition and methods of use |
-
2019
- 2019-11-18 CN CN201911127308.1A patent/CN110838150B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106960176A (en) * | 2017-02-22 | 2017-07-18 | 华侨大学 | A kind of pedestrian's gender identification method based on transfinite learning machine and color characteristic fusion |
CN107292339A (en) * | 2017-06-16 | 2017-10-24 | 重庆大学 | The unmanned plane low altitude remote sensing image high score Geomorphological Classification method of feature based fusion |
CN109035196A (en) * | 2018-05-22 | 2018-12-18 | 安徽大学 | Saliency-Based Image Local Blur Detection Method |
CN109284759A (en) * | 2018-07-24 | 2019-01-29 | 五邑大学 | One kind being based on the magic square color identification method of support vector machines (svm) |
Non-Patent Citations (3)
Title |
---|
"An efficient detection method for rare colored capsule based on RGB and HSV color space";Liu Feng 等;《2014 IEEE International Conference on Granular Computing (GrC)》;20141215;第175-178页 * |
"基于图像颜色特征的玉米种子神经网络分类研究";李奔 等;《仪表仪器学报》;20110630;第32卷(第6(增刊)期);第301-304页 * |
"融合颜色与纹理的复杂场景下的服装图像分割算法";郭鑫鹏 等;《计算机科学》;20171130;第44卷(第11A期);第228-232页 * |
Also Published As
Publication number | Publication date |
---|---|
CN110838150A (en) | 2020-02-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Song et al. | Learning to detect visual grasp affordance | |
Mishra et al. | Segmenting “simple” objects using RGB-D | |
Khan et al. | Comparative study of hand gesture recognition system | |
CN110852186B (en) | Visual identification and picking sequence planning method for citrus on tree and simulation system thereof | |
Zhang et al. | Keypoint-graph-driven learning framework for object pose estimation | |
Rogers et al. | Simultaneous localization and mapping with learned object recognition and semantic data association | |
Cho et al. | 2D barcode detection using images for drone-assisted inventory management | |
CN103473530A (en) | Adaptive action recognition method based on multi-view and multi-mode characteristics | |
CN105894503A (en) | Method for restoring Kinect plant color and depth detection images | |
CN110480637A (en) | A kind of mechanical arm part image identification grasping means based on Kinect sensor | |
CN107943077A (en) | A kind of method for tracing, device and the unmanned plane of unmanned plane drop target | |
CN110838150B (en) | Color recognition method for supervised learning | |
CN103955693B (en) | A kind of computer aided detection recognition methods of nine balls | |
Chai et al. | Multi-step pick-and-place tasks using object-centric dense correspondences | |
CN110553650A (en) | mobile robot repositioning method based on small sample learning | |
Wei et al. | Novel green-fruit detection algorithm based on D2D framework | |
Nassu et al. | Automatic recognition of railway signs using sift features | |
CN113420839B (en) | Semi-automatic labeling method and segmentation positioning system for stacking planar target objects | |
CN113537224B (en) | Automatic recognition method for switch state of power distribution cabinet based on vision | |
Villamizar et al. | Fast online learning and detection of natural landmarks for autonomous aerial robots | |
Li et al. | RaP-Net: A region-wise and point-wise weighting network to extract robust features for indoor localization | |
CN102103752B (en) | Method for detecting color code blocks in human-computer interaction | |
Hwang et al. | Robust descriptors for 3d point clouds using geometric and photometric local feature | |
CN115410184A (en) | Target detection license plate recognition method based on deep neural network | |
CN113221915A (en) | Underwater cluster neighbor identification method based on vision |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |