CN109284759A - One kind being based on the magic square color identification method of support vector machines (svm) - Google Patents

One kind being based on the magic square color identification method of support vector machines (svm) Download PDF

Info

Publication number
CN109284759A
CN109284759A CN201810820756.9A CN201810820756A CN109284759A CN 109284759 A CN109284759 A CN 109284759A CN 201810820756 A CN201810820756 A CN 201810820756A CN 109284759 A CN109284759 A CN 109284759A
Authority
CN
China
Prior art keywords
magic square
color
svm
image
node
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.)
Pending
Application number
CN201810820756.9A
Other languages
Chinese (zh)
Inventor
李智宗
孔凡国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuyi University
Original Assignee
Wuyi University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Wuyi University filed Critical Wuyi University
Priority to CN201810820756.9A priority Critical patent/CN109284759A/en
Publication of CN109284759A publication Critical patent/CN109284759A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour

Abstract

The present invention provides a kind of magic square color identification method for being based on support vector machines (SVM), the present invention is based on hsv color spatial models, by the H for extracting the HSV model, input feature vector of the S component as support vector machines, under the model, it effectively prevents illumination condition and changes the influence identified to magic square color, to further improve accuracy of identification, simultaneously, by the training for carrying out a large amount of magic square colors to support vector cassification model, so that supporting vector machine model has biggish generalization ability, it can recognize the different magic squares with color difference, identify that magic square color speed is fast by the more traditional RGB threshold method of the SVM color sorter of DAG structure, it is high-efficient.

Description

One kind being based on the magic square color identification method of support vector machines (SVM)
Technical field
The present invention relates to a kind of color identifying processing technical field, especially a kind of evil spirit for being based on support vector machines (SVM) Square color identification method.
Background technique
Existing magic square color identification mainly obtains magic square color lump color diagram using CCD camera, is sentenced by RGB threshold method Disconnected magic square color lump color, or magic square color lump colouring information is obtained using color sensor, then judge magic square color lump color, though It is so calculated simply using RGB threshold method, but is extremely easy to be influenced by illumination condition variation, in low-light (level) and high illumination situation Under, magic square color recognition accuracy is extremely low, or even can not identify;It is simple and convenient using the recognition methods of color sensor, but know Other low efficiency, it is time-consuming, it can not be widely used, also, intensity of illumination is also to influence the factor of magic square color recognition accuracy, with The enhancing of intensity of illumination condition weakens, and RGB threshold method and Tansducer For Color Distiguishing also accordingly reduce the accuracy of identification of magic square, It cannot even identify, practicability is particularly poor.
Summary of the invention
In view of the deficiencies of the prior art, the present invention provides a kind of magic square color identification side for being based on support vector machines (SVM) Method, the present invention is based on hsv color spatial models, special as the input of support vector machines by H, S component for extracting the HSV model Sign effectively prevents illumination condition and changes the influence identified to magic square color under the model;Meanwhile by supporting vector Machine disaggregated model carries out the training of a large amount of magic square colors, so that supporting vector machine model has biggish generalization ability, can recognize Different magic squares with color difference.
The technical solution of the present invention is as follows: a kind of magic square color identification method for being based on support vector machines (SVM), including it is following Step:
S1), magic square image is obtained by industrial camera;
S2), median filter process is carried out to the magic square image of acquisition, realizes the denoising of image;
S3), image segmentation orients the position of each color lump using threshold partitioning algorithm;
S4), H, S component, the input feature vector as SVM, it is assumed that magic square color card are extracted under hsv color spatial model Integrate as M, the chroma vector of sample is hi(i=1,2,3 ... .., M), it may be assumed that
Wherein, αiFor Lagrange multiplier, b, c are the coefficient of kernel function;
S5), big measure feature training SVM classifier is extracted, magic square color is red, orange, yellow, white, green and blue 6 kinds of colors, by 6 Kind color combines building SVM model two-by-two, therefore obtains 15 SVM, bis- disaggregated model Gij(i < j), wherein i, j respectively indicate i-th Class color and jth class color, if CiIndicate the sample space of the i-th class, then
S6), the magic square color identification model for constructing DAG structure, sets red, orange, yellow, white, green, blue 6 kinds of colors of magic square Collection is { C1,C2,C3,C4,C5,C6, therefore, corresponding 15 two disaggregated models of training are as follows:
{G12,....,G16,C23,....,G26,C34,C35,G36,G45,G46,G56};
S7), magic square color is identified according to the SVM model of DAG structure in step S6).
Further, in above-mentioned technical proposal, step S3) in, specifically includes the following steps:
S301), gray processing processing is carried out to median filtering treated magic square image, magic square image is converted into grayscale image Picture;
S302), binary conversion treatment is carried out to gray level image;
S303), empty operation is filled to binaryzation picture, is substantially partitioned into magic square color lump;
S304), the image after filling cavity is done into multiplying with former grayscale image, obtains the grayscale image of target area, Then Threshold segmentation is carried out again, and does binary conversion treatment, to isolate magic square color lump;
S305), by morphological operation, extra pocket is removed, and with automatic identification frame algorithm tag magic square color Block position.
Further, in above-mentioned technical proposal, step S4) in, H, S component are extracted under hsv color spatial model, specifically Are as follows:
Further, in above-mentioned technical proposal, step S6) in, 15 two disaggregated models are distributed in 6 layers of mechanism, wherein Top layer contains only a node, referred to as root node, and i-th layer contains i node, and kth layer is that the bottom contains k leaf node, jth layer I-th of node is directed toward i-th of the node and i+1 of jth+1, and each internal node is two classifiers, and leaf node is most Whole class categories, when classifying to magic square color to be identified, since root node, according to the output of root node classifier Value determines that walk left or right side child node continues on further according to the output valve of corresponding child node classifier, until going to certain One leaf node is to get the classification for arriving such test sample.
The invention has the benefit that
1, the present invention is by extracting input feature vector of H, S component of the HSV model as support vector machines, in the model Under, it effectively prevents illumination condition and changes the influence identified to magic square color, substantially increase recognition accuracy;
2, the training of the invention by carrying out a large amount of magic square colors to support vector cassification model, so that support vector machines Model has biggish generalization ability, can recognize the different magic squares with color difference, passes through the SVM color classification of DAG structure The more traditional RGB threshold method identification magic square color speed of device is fast, high-efficient.
Detailed description of the invention
Fig. 1 is the H-S component profile of invention magic square color;
Fig. 2 is the topology diagram of the magic square color recognition classifier of DAG structure of the present invention;
Specific embodiment
Specific embodiments of the present invention will be further explained with reference to the accompanying drawing:
The present invention provides a kind of magic square color identification method for being based on support vector machines (SVM), and the present invention is based on hsv colors Spatial model is effectively kept away under the model by extracting input feature vector of H, S component of the HSV model as support vector machines Exempt from illumination condition and changes the influence identified to magic square color;Meanwhile by carrying out a large amount of evil spirits to support vector cassification model The training of Fang Yanse can recognize the difference evil spirit with color difference so that supporting vector machine model has biggish generalization ability Side.
Specifically includes the following steps:
S1), magic square image is obtained by industrial camera;
S2), median filter process is carried out to the magic square image of acquisition, realizes the denoising of image;
S3), image segmentation is oriented the position of each color lump, is specifically included using threshold partitioning algorithm:
S301), gray processing processing is carried out to median filtering treated magic square image, magic square image is converted into grayscale image Picture;
S302), binary conversion treatment is carried out to gray level image;
S303), empty operation is filled to binaryzation picture, is substantially partitioned into magic square color lump;
S304), the image after filling cavity is done into multiplying with former grayscale image, obtains the grayscale image of target area, Then Threshold segmentation is carried out again, and does binary conversion treatment, to isolate magic square color lump;
S305), by morphological operation, extra pocket is removed, and with automatic identification frame algorithm tag magic square color Block position;
S4), H, S component, the input feature vector as SVM, it is assumed that magic square color card are extracted under hsv color spatial model Integrate as M, the chroma vector of sample is hi(i=1,2,3 ... .., M), specifically:
Wherein, αiFor Lagrange multiplier, b, c are kernel function coefficient, and H-S component profile is as shown in Figure 1;
S5), big measure feature training SVM classifier is extracted, magic square color is red, orange, yellow, white, green and blue 6 kinds of colors, by 6 Kind color combines building SVM model two-by-two, therefore obtains 15 SVM, bis- disaggregated model Gij(i < j), wherein i, j respectively indicate i-th Class color and jth class color, if CiIndicate the sample space of the i-th class, then
S6), the magic square color identification model for constructing DAG structure, sets red, orange, yellow, white, green, blue 6 kinds of colors of magic square Collection is { C1,C2,C3,C4,C5,C6, therefore, training bis- disaggregated model of corresponding 15 SVM are as follows:
{G12,....,G16,C23,....,G26,C34,C35,G36,G45,G46,G56};
Wherein, 15 bis- disaggregated models of SVM are distributed in 6 layers of mechanism, and topological structure is as shown in Fig. 2, top layer contains only one A node, referred to as root node, i-th layer contains i node, and kth layer is that the bottom contains k leaf node, i-th of node of jth layer It is directed toward i-th of the node and i+1 of jth+1, each internal node is two classifiers, and leaf node is final classification class Not, when classifying to magic square color to be identified, since root node, according to the output valve of root node classifier, determine to walk Left or right side child node is continued on further according to the output valve of corresponding child node classifier, until going to a certain leaf section Point is to get the classification for arriving such test sample;
S7), magic square color is identified according to the SVM model of DAG structure in step S6).
Under the conditions of different illumination intensity, the RGB threshold method of provided method and the prior art is to phase through the invention Color identifying processing is carried out with magic square, wherein tests the red, orange of magic square, yellow, white, green, blue color lump each 100 A, recognition result is shown in Table 1, table 2, table 3, and as can be seen from the table, the present invention provides the SVM model of DAG structure in different illumination Traditional RGB threshold method is apparently higher than under strength condition to the recognition accuracy of magic square color, especially in Low light intensity and Bloom, which is shone under strength condition, to be become apparent.
The too low color recognition result of 1 intensity of illumination of table
The normal color recognition result of 2 intensity of illumination of table
The excessively high color recognition result of 3 intensity of illumination of table
The above embodiments and description only illustrate the principle of the present invention and most preferred embodiment, is not departing from this Under the premise of spirit and range, various changes and improvements may be made to the invention, these changes and improvements both fall within requirement and protect In the scope of the invention of shield.

Claims (4)

1. the magic square color identification method that one kind is based on support vector machines (SVM), which comprises the following steps:
S1), magic square image is obtained by industrial camera;
S2), median filter process is carried out to the magic square image of acquisition, realizes the denoising of image;
S3), image segmentation orients the position of each color lump using threshold partitioning algorithm;
S4), H, S component, the input feature vector as SVM are extracted under hsv color spatial model, it is assumed that magic square color sample set is M, the chroma vector of sample are hi(i=1,2,3 ... .., M), it may be assumed that
Wherein, αiFor Lagrange multiplier, b, c are the coefficient of kernel function;
S5), big measure feature training SVM classifier is extracted, magic square color is red, orange, yellow, white, green and blue 6 kinds of colors, by 6 kinds of face Color combines building SVM model two-by-two, therefore obtains 15 SVM, bis- disaggregated model Gij(i < j), wherein i, j respectively indicate the i-th class face Color and jth class color, if CiIndicate the sample space of the i-th class, then
S6), the magic square color identification model for constructing DAG structure, set red, orange, yellow, white, green, blue 6 kinds of color sets of magic square as {C1,C2,C3,C4,C5,C6, therefore, corresponding 15 two disaggregated models of training are as follows:
{G12,....,G16,C23,....,G26,C34,C35,G36,G45,G46,G56};
S7), magic square color is identified according to the SVM model of DAG structure in step S6).
2. a kind of magic square color identification method for being based on support vector machines (SVM) according to claim 1, feature exist In: in step S3), specifically includes the following steps:
S301), gray processing processing is carried out to median filtering treated magic square image, magic square image is converted into gray level image;
S302), binary conversion treatment is carried out to gray level image;
S303), empty operation is filled to binaryzation picture, is substantially partitioned into magic square color lump;
S304), the image after filling cavity is done into multiplying with former grayscale image, obtains the grayscale image of target area, then Threshold segmentation is carried out again, and does binary conversion treatment, to isolate magic square color lump;
S305), by morphological operation, extra pocket is removed, and with automatic identification frame algorithm tag magic square color lump position It sets.
3. a kind of magic square color identification method for being based on support vector machines (SVM) according to claim 1, feature exist In: in step S4), H, S component are extracted under hsv color spatial model, specifically:
R ≠ B or G ≠ B;
4. a kind of magic square color identification method for being based on support vector machines (SVM) according to claim 1, feature exist In: in step S6), 15 two disaggregated models are distributed in 6 layers of mechanism,
Wherein, top layer contains only a node, referred to as root node, and i-th layer contains i node, and kth layer is that the bottom contains k leaf section Point, i-th of node of jth layer are directed toward i-th of the node and i+1 of jth+1, and each internal node is two classifiers, leaf Child node is final class categories, when classifying to magic square color to be identified, since root node, according to root node point The output valve of class device determines that walk left or right side child node continues on further according to the output valve of corresponding child node classifier, Until going to a certain leaf node to get the classification of such test sample is arrived.
CN201810820756.9A 2018-07-24 2018-07-24 One kind being based on the magic square color identification method of support vector machines (svm) Pending CN109284759A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810820756.9A CN109284759A (en) 2018-07-24 2018-07-24 One kind being based on the magic square color identification method of support vector machines (svm)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810820756.9A CN109284759A (en) 2018-07-24 2018-07-24 One kind being based on the magic square color identification method of support vector machines (svm)

Publications (1)

Publication Number Publication Date
CN109284759A true CN109284759A (en) 2019-01-29

Family

ID=65183167

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810820756.9A Pending CN109284759A (en) 2018-07-24 2018-07-24 One kind being based on the magic square color identification method of support vector machines (svm)

Country Status (1)

Country Link
CN (1) CN109284759A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110838150A (en) * 2019-11-18 2020-02-25 重庆邮电大学 Color recognition method for supervised learning
CN111383352A (en) * 2020-03-20 2020-07-07 北京工业大学 Automatic color filling and abstracting method for three-order magic cube
CN111950654A (en) * 2020-08-25 2020-11-17 桂林电子科技大学 Magic cube color block color reduction method based on SVM classification
CN112686819A (en) * 2020-12-29 2021-04-20 东北大学 Magic cube image highlight removal method and device based on generation countermeasure network

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101726251A (en) * 2009-11-13 2010-06-09 江苏大学 Automatic fruit identification method of apple picking robot on basis of support vector machine
CN105719318A (en) * 2016-01-26 2016-06-29 上海葡萄纬度科技有限公司 Educational toy set and HSV based color identification method for Rubik's cube
CN107392890A (en) * 2017-06-20 2017-11-24 华南理工大学 A kind of FPC copper line surfaces oxidation defect detection method and its detecting system
CN108304878A (en) * 2018-02-05 2018-07-20 河北工业大学 A kind of photovoltaic cell color classification algorithm based on aberration histogram and DAG-SVMs

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101726251A (en) * 2009-11-13 2010-06-09 江苏大学 Automatic fruit identification method of apple picking robot on basis of support vector machine
CN105719318A (en) * 2016-01-26 2016-06-29 上海葡萄纬度科技有限公司 Educational toy set and HSV based color identification method for Rubik's cube
CN107392890A (en) * 2017-06-20 2017-11-24 华南理工大学 A kind of FPC copper line surfaces oxidation defect detection method and its detecting system
CN108304878A (en) * 2018-02-05 2018-07-20 河北工业大学 A kind of photovoltaic cell color classification algorithm based on aberration histogram and DAG-SVMs

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110838150A (en) * 2019-11-18 2020-02-25 重庆邮电大学 Color recognition method for supervised learning
CN110838150B (en) * 2019-11-18 2022-07-15 重庆邮电大学 Color recognition method for supervised learning
CN111383352A (en) * 2020-03-20 2020-07-07 北京工业大学 Automatic color filling and abstracting method for three-order magic cube
CN111383352B (en) * 2020-03-20 2023-09-26 北京工业大学 Automatic color filling and abstraction method for third-order magic cube
CN111950654A (en) * 2020-08-25 2020-11-17 桂林电子科技大学 Magic cube color block color reduction method based on SVM classification
CN111950654B (en) * 2020-08-25 2022-07-05 桂林电子科技大学 Magic cube color block color reduction method based on SVM classification
CN112686819A (en) * 2020-12-29 2021-04-20 东北大学 Magic cube image highlight removal method and device based on generation countermeasure network

Similar Documents

Publication Publication Date Title
CN104166841B (en) The quick detection recognition methods of pedestrian or vehicle is specified in a kind of video surveillance network
CN109284759A (en) One kind being based on the magic square color identification method of support vector machines (svm)
CN108549926A (en) A kind of deep neural network and training method for refining identification vehicle attribute
CN103761529B (en) A kind of naked light detection method and system based on multicolour model and rectangular characteristic
CN108229458A (en) A kind of intelligent flame recognition methods based on motion detection and multi-feature extraction
CN102194108B (en) Smile face expression recognition method based on clustering linear discriminant analysis of feature selection
CN107220624A (en) A kind of method for detecting human face based on Adaboost algorithm
CN109086687A (en) The traffic sign recognition method of HOG-MBLBP fusion feature based on PCA dimensionality reduction
CN103914708B (en) Food kind detection method based on machine vision and system
CN106951869B (en) A kind of living body verification method and equipment
CN106384117B (en) A kind of vehicle color identification method and device
CN108875608A (en) A kind of automobile traffic signal recognition method based on deep learning
CN105493141B (en) Unstructured road border detection
CN106610969A (en) Multimodal information-based video content auditing system and method
Zang et al. Traffic sign detection based on cascaded convolutional neural networks
CN107330360A (en) A kind of pedestrian&#39;s clothing colour recognition, pedestrian retrieval method and device
CN107220664B (en) Oil bottle boxing and counting method based on structured random forest
CN103149214B (en) Method for detecting flaw on surface of fruit
CN105760858A (en) Pedestrian detection method and apparatus based on Haar-like intermediate layer filtering features
CN105678318B (en) The matching process and device of traffic sign
CN103035013A (en) Accurate moving shadow detection method based on multi-feature fusion
CN105069816B (en) A kind of method and system of inlet and outlet people flow rate statistical
CN109918971A (en) Number detection method and device in monitor video
CN107240112A (en) Individual X Angular Point Extracting Methods under a kind of complex scene
CN107944403A (en) Pedestrian&#39;s attribute detection method and device in a kind of image

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190129

RJ01 Rejection of invention patent application after publication