CN111862178B - Improved LBP feature extraction method - Google Patents

Improved LBP feature extraction method Download PDF

Info

Publication number
CN111862178B
CN111862178B CN202010756173.1A CN202010756173A CN111862178B CN 111862178 B CN111862178 B CN 111862178B CN 202010756173 A CN202010756173 A CN 202010756173A CN 111862178 B CN111862178 B CN 111862178B
Authority
CN
China
Prior art keywords
feature
image
lbp
detected
value
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
Application number
CN202010756173.1A
Other languages
Chinese (zh)
Other versions
CN111862178A (en
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.)
Yi Si Si Hangzhou Technology Co ltd
Original Assignee
Isvision Hangzhou Technology Co Ltd
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 Isvision Hangzhou Technology Co Ltd filed Critical Isvision Hangzhou Technology Co Ltd
Priority to CN202010756173.1A priority Critical patent/CN111862178B/en
Publication of CN111862178A publication Critical patent/CN111862178A/en
Application granted granted Critical
Publication of CN111862178B publication Critical patent/CN111862178B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • G06T7/41Analysis of texture based on statistical description of texture
    • G06T7/44Analysis of texture based on statistical description of texture using image operators, e.g. filters, edge density metrics or local histograms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features

Abstract

The invention discloses an improved LBP (local binary pattern) feature extraction method, which comprises the following steps: acquiring an image data set to be detected according to an actual detection process; generating a training image set, respectively performing frame selection on the features to be detected in each image, and recording a width pixel value and a height pixel value; clustering processing is carried out by taking the k clustering results as a sample data set to obtain k clustering results; using reference width values mu of single clustering results respectively i And a reference height value g i Calculating the radius R i Obtaining a radius set; taking each value in the radius set as the radius of the circular neighborhood of the LBP respectively to form q LBP feature description operators; respectively traversing the image I by using q LBP feature description operators to obtain q feature vectors, cascading to obtain a fusion feature vector, recording the fusion feature vector as the feature description of the image I, and finishing the extraction of the LBP feature; the method has more accurate identification on the target characteristics and improves the accuracy of an identification algorithm.

Description

Improved LBP feature extraction method
Technical Field
The invention relates to the field of image processing, in particular to an improved LBP feature extraction method.
Background
With the development of digital image processing technology, the digital processing technology has replaced manual methods to perform automatic feature recognition and analysis, such as face recognition, fingerprint indexes, defect detection, and the like, feature extraction is firstly performed in the feature recognition, wherein, an LBP (Local Binary pattern) feature extraction method has been widely applied in the fields of face recognition, image quality evaluation, target detection, and the like, the traditional LBP method sets a 3 × 3 square neighborhood, then gradually derives a circular field, and the improved LBP operator allows any number of pixel points to be in the circular neighborhood with the radius of R, thereby obtaining the LBP operator which contains P sampling points in the circular region with the radius of R; however, the determination of the radius R requires repeated verification by scientific researchers, and meanwhile, the sizes corresponding to different features are different, so that various features cannot be accurately extracted by a single set R value, and false detection and missing detection are easy to occur.
Disclosure of Invention
In order to solve the problems, the invention provides an improved LBP feature extraction method, which combines a clustering method to obtain a radius set, designs an LBP descriptor, and uses a multi-scale LBP operator to jointly detect the same image to be detected to form a fusion feature vector.
The technical scheme is as follows:
an improved LBP feature extraction method comprises the following steps:
acquiring images I of a plurality of objects to be detected according to an actual detection process, and recording the images I as an image data set to be detected;
all or part of an image data set to be detected is used as a training image set to ensure that the training image set contains all types of characteristics to be detected; respectively selecting the features to be detected in each image, and recording the width pixel value and the height pixel value of each feature to be detected;
clustering each feature to be measured and the width pixel value and the height pixel value of the feature to be measured as a sample data set to obtain k clustering results, wherein each single clustering result comprises a reference width value mu i And a reference height value g i
Step two, respectively utilizing the reference width value mu of the single clustering result i And a reference height value g i Calculating the radius R of the detection range of the LBP feature description operator corresponding to the feature to be detected i The method comprises the following steps:
Figure GDA0003768239380000021
wherein: i is 1,2 … … k; deleting the repeated data to obtain a radius set R ═ { R ═ R 1 ,R 2 ,…,R q };
Step three, taking each value in the radius set as the radius of a circular neighborhood of the LBP respectively to form q LBP feature description operators;
and step four, traversing the image I by using q LBP feature description operators respectively to obtain q feature vectors, cascading to obtain a fusion feature vector, and recording the fusion feature vector as the feature description of the image I to finish the extraction of the LBP feature.
Step five, inputting the fusion feature vector into a classifier or a convolutional neural network for feature recognition and classification; and obtaining the characteristics to be detected in the image I.
Preferably, the clustering method in the first step is a K-means clustering method, and the K value is equal to the number of the types of the features to be detected.
Further, the feature to be measured in the step one is a local feature (e.g. facial feature) of the object to be measured itself, or a defect feature (e.g. scratch, impurity) of the surface of the object to be measured.
Further, in step four, the step of traversing the image I by using a single LBP feature description operator is:
I. setting a local circular area from the starting point of the image I according to the radius of the detection range of the current single LBP feature description operator; presetting the number P of sampling points of a local circular area;
II. Calculate each sample point (x) within a local circular region p ,y p ):
Figure GDA0003768239380000031
Figure GDA0003768239380000032
Wherein (x) c ,y c ) As the pixel coordinate of the center point of the current circular region, R i Represents the radius of the detection range of the current single LBP feature description operator, P is 1,2 … … P;
then, processing P sampling points (x) by using bilinear interpolation method p ,y p ) Obtaining the pixel coordinates of each sampling point;
record the center point (x) c ,y c ) Comparing the gray value at the pixel coordinate of the sampling point with A, wherein the gray value is A, the gray value at the pixel coordinate of the sampling point is larger than A, the sampling point is marked as 1, otherwise, the sampling point is marked as 0, and a group of binary data is obtained;
III, moving the local circular area along the X-axis/Y-axis direction of the image I, and repeating the step II; and cascading all the obtained groups of binary data until the whole image I is traversed, and recording the binary data as a feature vector.
Preferably, the number of sample points P is 8, 16 or 32.
In order to increase the calculation speed, the feature vector is preferably subjected to dimension reduction processing by using an equivalence mode, and the feature dimension is reduced to P × (P-1) +3 dimensions.
Equivalent mode: when a cyclic binary number corresponding to a certain LBP has at most two jumps from 0 to 1 or from 1 to 0, the type is reserved; when the jumping times exceed 2 times, the Chinese characters are classified into one class; the total 58 types of 8-bit binary numbers with jump less than or equal to two times.
This way, the amount of calculation can be greatly reduced, and information can not be lost. For 8 sampling points in a 3 × 3 neighborhood, the binary pattern is reduced from the original 256 to 59, which makes the feature vector have fewer dimensions and reduces the effect of high-frequency noise.
The scheme of the invention has the following advantages: the method combines a clustering method, considers different feature sizes, obtains a radius set, designs LBP descriptors by using different radius values respectively, and detects the same image to be detected by using a multi-scale LBP operator together to form a fusion feature vector.
Drawings
FIG. 1 is a schematic flow diagram of the inventive process;
FIG. 2 is a graph of the original gray scale of an automobile paint panel member;
fig. 3 is an LBP feature map obtained by traversing the whole image to be detected by using LBP feature description operators (R1, 2) with different radius values, respectively;
fig. 4 is an LBP feature map obtained after traversing the whole image to be detected by using LBP feature description operators (R ═ 3,5, and 7) with different radius values, respectively;
FIG. 5 is a diagram of classification results input into an SVM after features are extracted using a conventional circular neighborhood LBP method;
fig. 6 is a diagram of the classification results input into the SVM after the features are extracted by the LBP method of the present invention.
Detailed Description
The technical solution of the present invention is described in detail below with reference to the accompanying drawings and the detailed description.
An improved LBP feature extraction method, as shown in fig. 1, includes the following steps:
step one, collecting images I of a plurality of objects to be detected according to an actual detection flow and recording the images I as an image data set to be detected;
all or part of images in the image data set to be detected are used as a training image set to ensure that the training image set contains all types of characteristics to be detected; respectively selecting the features to be detected in each image, and recording the width pixel value and the height pixel value of each feature to be detected;
clustering each feature to be measured and the width pixel value and the height pixel value of the feature to be measured as a sample data set to obtain k clustering results, wherein each single clustering result comprises a reference width value mu i And a reference height value g i
Step two, respectively utilizing the reference width value mu of the single clustering result i And a reference height value g i Calculating the radius R of the detection range of the LBP feature description operator corresponding to the feature to be detected i The method comprises the following steps:
Figure GDA0003768239380000051
wherein: i is 1,2 … … k; deleting the repeated data to obtain a radius set R ═ { R ═ R 1 ,R 2 ,…,R q };
Step three, taking each value in the radius set as the radius of a circular neighborhood of the LBP respectively to form q LBP feature description operators;
and step four, traversing the image I by using q LBP feature description operators respectively to obtain q feature vectors, cascading to obtain a fusion feature vector, and recording the fusion feature vector as the feature description of the image I to finish the extraction of the LBP feature.
Inputting the fusion feature vector into a classifier or a convolutional neural network, and performing feature identification and classification; and obtaining the characteristics to be detected in the image I.
As an implementation mode of the invention, the clustering method in the step one is a K-means clustering method, and the K value is equal to the number of the types of the features to be measured.
Specifically, the characteristic to be measured in the first step is a local characteristic (such as a feature of five sense organs in a human face) of the object to be measured, or a defect characteristic (such as a scratch and an impurity) of the surface of the object to be measured.
In this embodiment, the camera forms an image data set to be detected from an image of the painted surface of the body panel shot at the automobile detection station, and selects 70% of the images as a training image set, so that 7 defect categories are defined: impurities (Inclusion), Shallow cavities (Shallow crater), pinholes (Pinhole crater), depressions (Dent), bumps (Bump), sagging (Boilers), scratches (Scratch); marking width pixel values and height pixel values of each image with defects in the training image set;
setting K to 7, forming 7 sets of reference width values mu i And a reference height value g i
Obtaining a radius set R {1,2,3,5,7} in step two;
in the fourth step, the step of traversing the image I by using a single LBP feature description operator is as follows:
I. setting a local circular area from the starting point of the image I according to the radius of the detection range of the current single LBP feature description operator; presetting the number P of sampling points of a local circular area;
II. Calculate each sample point (x) within a local circular region p ,y p ):
Figure GDA0003768239380000061
Figure GDA0003768239380000062
Wherein (x) c ,y c ) As the pixel coordinate of the center point of the current circular region, R i Represents the radius of the detection range of the current single LBP feature description operator, P is 1,2 … … P;
then, using bilinear interpolation method to process P sampling points (x) p ,y p ) Obtaining the pixel coordinates of each sampling point;
record the center point (x) c ,y c ) The gray value at the position is A, the gray value at the pixel coordinate position of the sampling point is compared with A, the gray value is larger than A, the sampling point is marked as 1, otherwise, the sampling point is marked as 0, and a group of binary data is obtained;
III, moving the local circular area along the X-axis/Y-axis direction of the image I, and repeating the step II; and cascading all the obtained groups of binary data until the whole image I is traversed, and recording the binary data as a feature vector.
Wherein, the number of sampling points P is 8, 16 or 32.
In order to improve the calculation speed, the feature vector is subjected to dimension reduction processing by adopting an equivalent mode, and the feature dimension is reduced to P x (P-1) +3 dimensions.
During the in-service use, to same detection station, step one ~ step four only need be gone on once, obtain radius set R and generate q LBP operators after, q LBP operators can directly be used for subsequent real-time detection process, and specific real-time detection process is: the camera collects the painting surface image of the automobile body panel at the same station in real time (as shown in fig. 2), the image is directly subjected to the fourth step, wherein LBP characteristic diagrams obtained by different LBP operators are shown in fig. 3 and 4, the defect characteristics in the diagrams can be seen as black and gray impurities (embodied as black dots in the diagrams) and natural scratch (scratch on the lower right side of the diagrams)), and the LBP operators with different scales can be respectively adopted to extract more comprehensive characteristic information; the feature vectors extracted by the method and the feature vectors obtained by adopting the traditional circular neighborhood LBP method are respectively input into an SVM (Support Vector Machine), the classification result graphs are shown as figures 5 and 6, and as can be seen from the figures, the defect feature extraction is more accurate and comprehensive in the classification graphs processed by the method, and the phenomena of missing detection and error detection easily occur by adopting the traditional method.
The foregoing descriptions of specific exemplary embodiments of the present invention have been presented for purposes of illustration and description. The foregoing description is not intended to be exhaustive or to limit the invention to the precise form disclosed, and obviously many modifications and variations are possible in light of the above teaching. The exemplary embodiments were chosen and described in order to explain certain principles of the invention and its practical application to enable others skilled in the art to make and use various exemplary embodiments of the invention and various alternatives and modifications thereof. It is intended that the scope of the invention be defined by the following claims and their equivalents.

Claims (6)

1. An improved LBP feature extraction method is characterized by comprising the following steps:
acquiring images I of a plurality of objects to be detected according to an actual detection process, and recording the images I as an image data set to be detected;
all or part of images in the image data set to be detected are used as a training image set to ensure that the training image set contains all types of characteristics to be detected; the characteristic to be detected is a local characteristic of the object to be detected or a defect characteristic of the surface of the object to be detected; respectively selecting the features to be detected in each image, and recording the width pixel value and the height pixel value of each feature to be detected;
clustering each feature to be measured and the width pixel value and the height pixel value of the feature to be measured as a sample data set to obtain k clustering results, wherein each single clustering result comprises a reference width value mu i And a reference height value g i
Step two, respectively utilizing the reference width value mu of the single clustering result i And a reference height value g i Calculating the radius R of the detection range of the LBP feature description operator corresponding to the feature to be detected i Method ofThe following were used:
Figure FDA0003768239370000011
wherein: i is 1,2 … … k; deleting the repeated data to obtain a radius set R ═ { R ═ R 1 ,R 2 ,...,R q };
Step three, taking each value in the radius set as the radius of a circular neighborhood of the LBP respectively to form q LBP feature description operators;
and step four, traversing the image I by using q LBP feature description operators respectively to obtain q feature vectors, cascading to obtain a fusion feature vector, and recording the fusion feature vector as the feature description of the image I to finish the extraction of the LBP feature.
2. The improved LBP feature extraction method as claimed in claim 1, further comprising a fifth step of inputting said fused feature vector into a classifier or a convolutional neural network for feature recognition and classification; and obtaining the characteristics to be detected in the image I.
3. The improved LBP feature extraction method of claim 1, wherein the clustering process in step one is a K-means clustering process, where the K value is equal to the number of classes of the features to be tested.
4. The improved LBP feature extraction method of claim 1, wherein in step four, the step of traversing the image I with a single LBP feature descriptor operator is:
I. setting a local circular area from the starting point of the image I according to the radius of the detection range of the current single LBP feature description operator; presetting the number P of sampling points of a local circular area;
II. Calculate each sample point (x) within a local circular region p ,y p ):
Figure FDA0003768239370000021
Figure FDA0003768239370000022
Wherein (x) c ,y c ) Is the current circle region center point pixel coordinate, R i Represents the radius of the detection range of the current single LBP feature description operator, P is 1,2 … … P;
then, processing P sampling points (x) by using bilinear interpolation method p ,y p ) Obtaining the pixel coordinates of each sampling point;
noting the center point (x) c ,y c ) Comparing the gray value at the pixel coordinate of the sampling point with A, wherein the gray value is A, the gray value at the pixel coordinate of the sampling point is larger than A, the sampling point is marked as 1, otherwise, the sampling point is marked as 0, and a group of binary data is obtained;
III, moving the local circular area along the X-axis/Y-axis direction of the image I, and repeating the step II; and cascading all the obtained groups of binary data until the whole image I is traversed, and recording the binary data as a feature vector.
5. The improved LBP feature extraction method of claim 4, wherein: the number of sample points P is 8, 16 or 32.
6. The improved LBP feature extraction method of claim 4, wherein the feature vector is dimension-reduced by using an equivalence mode to reduce the feature dimension to P x (P-1) +3 dimensions.
CN202010756173.1A 2020-07-31 2020-07-31 Improved LBP feature extraction method Active CN111862178B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010756173.1A CN111862178B (en) 2020-07-31 2020-07-31 Improved LBP feature extraction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010756173.1A CN111862178B (en) 2020-07-31 2020-07-31 Improved LBP feature extraction method

Publications (2)

Publication Number Publication Date
CN111862178A CN111862178A (en) 2020-10-30
CN111862178B true CN111862178B (en) 2022-09-30

Family

ID=72945906

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010756173.1A Active CN111862178B (en) 2020-07-31 2020-07-31 Improved LBP feature extraction method

Country Status (1)

Country Link
CN (1) CN111862178B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113706517A (en) * 2021-09-01 2021-11-26 什维新智医疗科技(上海)有限公司 Device is judged to good or malignant node based on GULBP operator
CN115131355B (en) * 2022-08-31 2022-11-18 南通鑫阳雨具有限公司 Intelligent method for detecting waterproof cloth abnormity by using electronic equipment data

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108805050A (en) * 2018-05-28 2018-11-13 上海交通大学 Electric wire detection method based on local binary patterns
CN109446882A (en) * 2018-09-05 2019-03-08 合肥工业大学智能制造技术研究院 Logo feature extraction and recognition methods based on the characteristic quantification that gradient direction divides

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9424458B1 (en) * 2015-02-06 2016-08-23 Hoyos Labs Ip Ltd. Systems and methods for performing fingerprint based user authentication using imagery captured using mobile devices

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108805050A (en) * 2018-05-28 2018-11-13 上海交通大学 Electric wire detection method based on local binary patterns
CN109446882A (en) * 2018-09-05 2019-03-08 合肥工业大学智能制造技术研究院 Logo feature extraction and recognition methods based on the characteristic quantification that gradient direction divides

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《A Novel Adaptive LBP-Based Descriptor for Color Image》;Mahmood Sotoodeh 等;;《Expert Systems With Applications》;20191231;第1-25页; *
《基于多尺度等价模式LBP的人脸表情识别》;叶棪 等;;《计算机与数字工程》;20161231;第44卷(第1期);第40-44页; *

Also Published As

Publication number Publication date
CN111862178A (en) 2020-10-30

Similar Documents

Publication Publication Date Title
CN110427937B (en) Inclined license plate correction and indefinite-length license plate identification method based on deep learning
CN110148162B (en) Heterogeneous image matching method based on composite operator
CN110399884B (en) Feature fusion self-adaptive anchor frame model vehicle detection method
CN108345881B (en) Document quality detection method based on computer vision
CN109376572A (en) Real-time vehicle detection and trace tracking method in traffic video based on deep learning
CN109101924A (en) A kind of pavement marking recognition methods based on machine learning
CN111862178B (en) Improved LBP feature extraction method
CN111127417B (en) Printing defect detection method based on SIFT feature matching and SSD algorithm improvement
CN111415376B (en) Automobile glass subpixel contour extraction method and automobile glass detection method
CN110929713B (en) Steel seal character recognition method based on BP neural network
CN110866430A (en) License plate recognition method and device
CN108491498A (en) A kind of bayonet image object searching method based on multiple features detection
CN114998198A (en) Injection molding surface defect identification method
CN107862319B (en) Heterogeneous high-light optical image matching error eliminating method based on neighborhood voting
CN114627080B (en) Vehicle stamping accessory defect detection method based on computer vision
CN113706593B (en) Vehicle chassis point cloud fusion method suitable for vehicle geometric passing parameter detection
CN108961301B (en) Chaetoceros image segmentation method based on unsupervised pixel-by-pixel classification
CN106897723B (en) Target real-time identification method based on characteristic matching
CN110705553B (en) Scratch detection method suitable for vehicle distant view image
CN112241964A (en) Light strip center extraction method for line structured light non-contact measurement
CN113781413A (en) Electrolytic capacitor positioning method based on Hough gradient method
CN112364881B (en) Advanced sampling consistency image matching method
CN113379788A (en) Target tracking stability method based on three-element network
CN110334727B (en) Intelligent matching detection method for tunnel cracks
CN116523916A (en) Product surface defect detection method and device, electronic equipment and storage medium

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
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: Room 495, building 3, 1197 Bin'an Road, Binjiang District, Hangzhou City, Zhejiang Province 310051

Patentee after: Yi Si Si (Hangzhou) Technology Co.,Ltd.

Address before: Room 495, building 3, 1197 Bin'an Road, Binjiang District, Hangzhou City, Zhejiang Province 310051

Patentee before: ISVISION (HANGZHOU) TECHNOLOGY Co.,Ltd.