CN104966099B - A kind of foot type sorting technique based on people's pin image - Google Patents

A kind of foot type sorting technique based on people's pin image Download PDF

Info

Publication number
CN104966099B
CN104966099B CN201510329437.4A CN201510329437A CN104966099B CN 104966099 B CN104966099 B CN 104966099B CN 201510329437 A CN201510329437 A CN 201510329437A CN 104966099 B CN104966099 B CN 104966099B
Authority
CN
China
Prior art keywords
mrow
msub
mover
foot
image
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.)
Expired - Fee Related
Application number
CN201510329437.4A
Other languages
Chinese (zh)
Other versions
CN104966099A (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.)
Beihang University
Original Assignee
Beihang 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 Beihang University filed Critical Beihang University
Priority to CN201510329437.4A priority Critical patent/CN104966099B/en
Publication of CN104966099A publication Critical patent/CN104966099A/en
Application granted granted Critical
Publication of CN104966099B publication Critical patent/CN104966099B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24133Distances to prototypes

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

A kind of foot type sorting technique based on people's pin image, it is characterised in that:Its step is as follows:Step 1:The foundation of database;Step 2:Shade is removed in pretreatment;Step 3:Extract sole position;Step 4:Extract the feature of sole profile;Step 5:Establish foot type disaggregated model;Step 6:Foot type classification prediction.The present invention uses 10 folding cross validation methods, data set stochastic averagina be divide into 10 separate subsets, the data that 9 sons are concentrated successively are as training set example, the data that remaining 1 son is concentrated are as test set example, carry out 10 training and test, its average is sought again, as the estimation to algorithm accuracy.We count to 300 width images, obtain 80.33% classification accuracy, and effect is satisfactory.

Description

Foot type classification method based on human foot image
(I) technical field
The invention relates to a foot type classification method based on a human foot image, and belongs to the technical field of image processing.
(II) background of the invention
People all need walk every day, and the comfort level of shoes has directly influenced the comfort level of foot and the comfort level of walking in-process, has also influenced one person's quality of life simultaneously. With the development of productivity, more and more shoes are available for selection, but not every shoe is suitable for the shoe. To select a pair of comfortable shoes, not only the size of the foot but also the style of the shoe should be considered. Generally, the human foot type can be classified into Egypt foot, Roman foot and Greek foot according to the length of five toes. When the thumb of the foot is longer than other toes, the foot type is Egypt, and the foot type is suitable for wearing oblique-head shoes. And when the second toe is longer than the other toes, the foot type belongs to a Greek foot type, and the foot type is suitable for wearing pointed-end shoes. The five toes of the Roman foot are all almost the same in length, look relatively neat and are suitable for wearing round-head or square-head shoes.
With the increasing economic level, the purchasing ability of people is increasing day by day, especially in the high development of the internet, and online shopping has become an essential requirement in life. And a user can hardly buy shoes suitable for the user by only depending on one shoe size. If the foot type data can be used as the reference data for selecting the shoe size and the shoe money, the user can be helped to buy more suitable shoes, and the possibility of shoe replacement is reduced, so that the requirements of the user can be met, the service quality of merchants can be improved, and service disputes are reduced.
The invention needs to collect the front foot image of the user, needs to place the foot on a simple background, collects the image data, extracts the edge contour of the sole, and completes the division of the foot shape according to the key position information of the sole contour.
Disclosure of the invention
The purpose is as follows:
the invention aims to classify the foot type of a person through the foot image, and recommend a proper shoe money for online shoe purchasing of a user according to the foot type of the user. According to the method, the foot shape of the user is obtained through processing the foot image, and the network merchant can recommend proper shoe size and style for the user according to basic data provided by the user and the obtained foot shape data. Meanwhile, the invention can also be used for private shoe customization service, so as to meet the user requirements, improve the service quality of the merchant and further improve the business income of the merchant.
The technical scheme is as follows:
the invention discloses a foot type classification method based on a human foot image, which comprises the following steps:
the method comprises the following steps: creation of a database
This scheme need collect the positive image of a large amount of people's feet, carries out foot type characteristic learning to the foot of difference to guarantee later stage categorised accuracy. The collection process includes the following three aspects:
(1) image acquisition
The foot wearing the pure-color socks is stepped on the horizontal ground, and the background color of the ground is required to have a certain distinction degree from the color of the socks, for example, the foot wearing the black socks is stepped on a light-colored floor. The lens shoots vertically downwards right above the feet, so that the central axis of the feet is consistent with the vertical direction of the image as much as possible, and the sole part is ensured to be completely contained in the image. Meanwhile, the image background is simple, and other objects are not required to enter, namely, only the foot target and the ground background exist in the image;
(2) data collection
Under the condition that the collected background and the color of the socks are guaranteed to have enough distinction, different backgrounds and colors of the socks are changed, front foot imaging is carried out on different people, and 300 experimental samples are collected in total;
(3) generation of sample truth values
The standard foot types are classified into Roman feet, Greek feet and Egypt feet (as shown in figure 1), the foot type category of one image is manually given, in order to ensure the accuracy of foot type classification, 5 people manually classify the image, the foot type category of the image is determined according to most principles, and the category is the true value of the foot type of the image;
step two: pre-processing shadow removal
For 300 collected experimental images, due to different illumination environments, shadows often exist at the edges of the sole of a foot, which brings difficulty to subsequent segmentation and positioning of the sole outline.
The "significance method" is detailed as follows:
(1) color space conversion
The image is converted from the RGB color space to the Lab color space, and the method comprises two steps of firstly converting the RGB color space into the XYZ color space and then converting the XYZ color space into the Lab color space.
the method for converting an RGB color space into an XYZ color space is as follows:
the method for converting the XYZ color space into the Lab color space comprises the following steps:
L=116*f(Y)-16
a=500*[f(X)-f(Y)]
b=200*[f(Y)-f(Z)
wherein
In the above formula, L, a, b are the values of three channels of the Lab color space.
(2) Obtaining the mean value of each channel
In Lab color space, each pixel point corresponds to a set of channel values (L value, a value, b value), pass
Calculating the mean value of each channel for all pixel points of the whole imageAnd
in the above formula, n is the number of pixel points in the image;
(3) shadow removal
Order (L)i,ai,bi) The values of the ith pixel in the image in three channels of L, a and b are according to the display
The saliency value of the ith pixel is
Wherein
The saliency value of a pixel in the image is calculated and mapped to [0,255] using the following formula:
wherein p ismaxAnd pminThe maximum and minimum saliency values, respectively, of all pixels of the image.
Since the human foot in the image occupies the main body and is a salient region in the image, after the saliency calculation, the foot target is enhanced, and the shadow at the edge of the sole of the foot is effectively suppressed.
The "RGB color space" described in this step means an image represented by intensities of red, green, and blue, the "XYZ color space" means an image represented by tristimulus values, and the "Lab color space" means an image represented by luminance values, intensities from pure black to pure white, and intensities from yellow to blue.
Step three: extracting sole part
In the last step, the image is enhanced, and the shadow of the outline part of the sole of the foot is removed. Because the color of the sock and the background have enough contrast and the scene is single, in the step, the image segmentation is realized by adopting an Otsu threshold value method, and the sole of the foot is extracted from the image.
(1) Image binarization
The said Otsu threshold method is detailed as follows:
let t be the segmentation threshold of the target and the background, and target pixels with pixel gray levels less than t, otherwise background pixels. Let the ratio of target pixel point to image be w0Average gray of u0The ratio of background pixel points to image is w1Average gray of u1. The total average gray scale of the image is:
the variance between the target and the background is:
according to the Otsu threshold principle, the possible threshold t is traversed within the range of [0,255], and when the variance g is maximum, the optimal segmentation threshold t can be obtained.
(2) Noise and hole removal
After the image is subjected to binarization processing by t, noise often appears in the image background, and holes also appear in the inner part of the foot target. According to the priori knowledge, the human foot corresponds to the largest connected region in the image, so that the largest connected region in the image is searched and extracted as a target, and other small connected regions are filtered out as noise. Meanwhile, as for the holes in the target, a seed filling method is adopted for removing the holes.
The seed filling method is detailed as follows:
starting from a point inside a hole in the ball region, the pixel-by-pixel fill is made up from top, bottom, left, and right directions, from inside to outside, with black until a white border is encountered.
Step four: extracting features of a sole profile
The method mainly extracts 2 slopes and 2 area ratios as the characteristics of foot type classification, and here, the left foot is taken as an example.
(1) Extracting key points
The key points include the rightmost point A of the outline, the topmost point B of the outline, the leftmost point C of the sole outline, and the upper left turning point D of the outline (as shown in FIG. 2). The point A, B, C is obtained by searching the uppermost point horizontally or the outermost points on the left and right sides vertically, respectively. For any contour point between B and C, a vertical line is drawn for a straight line in the vertical direction of the point B and a straight line in the horizontal direction of the point C, and the enclosed rectangle is shown as an area 1 in FIG. 2. The point D is the point where the area of the enclosed rectangle is the largest among all the contour points between B and C.
(2) Slope feature extraction
Let p and q be two key points and the sequence of edge points between these two points be (x)1,y1),(x2,y2)...(xn,yn). A straight line can be fitted with this sequence of edge points:
y=kx+b
in the above formula, k is the slope of the fitted line, and b is the offset value of the fitted line.
According to the principle of least squares, the values of k and b are found by the following formula:
wherein
For the key point pairs (A, B) and (B, D), a straight line fitting method is adopted to obtain 2 straight lines, and the slope characteristics of the 2 straight lines can be used for subsequent decision tree classification.
(3) Area feature extraction
Making horizontal lines and vertical lines for the points A and B, obtaining a rectangle (shown as a region 2 in fig. 2) by using four straight lines, sequentially counting the pixel number sum _ in the foot and the pixel number sum _ out outside the foot in the region surrounded by the rectangle, and calculating the area ratio of the outside area to the inside area:
Rate=sum_in/sum_out
similarly, a rectangle (shown as region 3 in fig. 2) can be obtained by using points B and D to obtain another area ratio. These 2 area ratio features are used in the subsequent decision tree classification together with the previous two straight-line features.
Step five: establishing a foot type classification model
The foot type classification problem is a typical pattern classification problem, in which a human foot image is a pattern to be recognized, and the corresponding foot type is a class label. The invention adopts a C4.5 decision tree method to construct a classification model.
The "C4.5 decision tree method" is detailed as follows:
let D be the training sample set, which has sum samples, and belong to C respectively1,C2And C3The three categories correspond to three foot types of Roman foot, Greek foot and Egypt foot respectively. The present invention has four attributes in common, including two straight line slopes and two area ratios.
(1) Computing entropy of training sample set category information
Let cjBelong to C for the category in sum samplesjThe number of samples of (1). Then
The sample is CjThe probability of a class is:
the entropy of the sample set class information is:
where k is the number of classes, there are three types of legs in the present invention, and therefore k is 3.
(2) Calculating the information gain ratio of the attribute V
Selecting one attribute V, wherein V has n values { V ] which are not coincident with each other1,v2,v3...vn}. Taking each value V of the attribute ViArranged from small to large to obtain a new value sequence { v }1,v2,v3...vnAnd generating n-1 partition points in total, wherein n-1 partition modes are provided, and the value of the kth partition point is set as:
ak=(vk+vk+1)/2
it divides the node's data set into 2 data subsets, which can be represented by v1,ak],(ak,vn]Represents the value of the attribute V.
Each of the n-1 partitions of the attribute V may be taken as 2 discrete values of the attribute, and the discrete values of the attribute are reconstructed, so that the value of V at this time is V ═ m0,m1In which m is0Indicates that v takes a value of a or lesskSet of (1), m1Meaning that v takes on a value greater than akSet of (1) diIs V ═ mi(i is 0,1) isIs V = miIn the sample of (A) is CjThe number of (2). The information gain ratio corresponding to each partition is then calculated in turn as follows.
a) Calculating the information entropy of each value of the attribute V
Attribute V ═ miIn (C)jThe probability of a class is:
the entropy of the class condition information of the attribute V
b) Calculating V as miProbability of (2)
c) Computing class condition information entropy
Entropy(V)=p0I(V=m0)+p1I(V=m1)
d) Calculating information gain of attribute V
Gain(V)=I(C)-Entropy(V)
e) Calculating the entropy of the attribute V as
Split(V)=-(p0logp0+p1logp1)
f) Calculating the information gain ratio of the attribute V
The division threshold value a in which the information gain rate is maximum is selected as the optimum division threshold value of the attribute V.
(3) And (2) performing recursion until the information gain rate of each attribute V is calculated, selecting the attribute V with the maximum information gain rate, and creating a node at the optimal segmentation threshold value a of the attribute V.
(4) If the samples contained in the leaf node in the step (3) belong to different types, the steps (1) to (3) are recursively executed on the samples in the leaf node until the leaf node only contains the same type of data.
Step six: foot type classification prediction
Given a test set, we can build a foot type classification model using the above process. For a sample to be classified, extracting key points of the sample, calculating two slopes and two area characteristics, and inputting the two slope and two area characteristics into a trained foot type classification model, so that the class attribute of the sample can be predicted.
The invention has the advantages that: the invention adopts a 10-fold cross validation method, randomly and averagely divides a data set into 10 mutually independent subsets, sequentially takes data in 9 subsets as training set examples, takes data in the remaining 1 subset as test set examples, carries out 10 times of training and testing, and then calculates the mean value of the training and testing examples to be used as the estimation of the algorithm accuracy. The statistics of 300 images can obtain 80.33% of classification accuracy rate, and the effect is satisfactory.
(IV) description of the drawings
Fig. 1(1) is a schematic view of a roman foot.
FIG. 1(2) is a schematic diagram of the Egypt foot.
FIG. 1(3) is a schematic view of a Greek foot.
Fig. 2 is a schematic diagram of key points and the proposed rectangle.
FIG. 3 is a flowchart of a method for classifying foot types according to the present invention.
(V) detailed description of the preferred embodiments
For a better understanding of the technical solution of the present invention, the following embodiments of the present invention are further described with reference to the accompanying drawings:
according to the method, after the human foot image data are read by a computer, preprocessing such as shadow removal, denoising and the like is firstly carried out, then a decision tree classifier based on slope characteristics and area ratio characteristics obtained by human foot key points is trained, and the foot type class prediction is carried out by utilizing the decision tree classifier.
The flow of the invention is shown in fig. 3, and the computer configuration adopts: an Intel Core i5-3337U processor, a master frequency of 1.80GHz, a memory of 4GB, an operating system of Windows 8 and a programming environment of Visual Studio 2010.
The invention discloses a foot type classification method based on a human foot image, which comprises the following steps as shown in figures 1(1) - (3) and 3:
the method comprises the following steps: 300 experimental samples are collected according to requirements, are manually classified by 5 persons, and the foot type category of the image is determined according to most principles, and is the true foot type value of the image.
Step two: the sole part is enhanced by adopting a significant method, and shadow interference of the sole part is removed.
Step three: and (3) segmenting the image by adopting an Otsu threshold value method, extracting the sole from the image, and denoising and filling the cavity.
Step four: four key points (as shown in fig. 2) such as a rightmost point a of the contour, a topmost point B of the contour, a leftmost point C of the contour, and a leftmost point D of the contour are extracted, and 2 straight line slopes and 2 area ratios can be obtained according to the key points as main features of subsequent classification prediction.
Step five: a C4.5 decision tree classifier is trained. The process is as follows:
let D be the training sample set, which has sum samples, and belong to C respectively1,C2And C3The three categories correspond to three foot types of Roman foot, Greek foot and Egypt foot respectively. The present invention has four attributes in common, including two straight line slopes and two area ratios.
(1) Computing entropy of training sample set category information
Let cjBelong to C for the category in sum samplesjThe number of samples of (1). Then
The sample is CjThe probability of a class is:
the entropy of the sample set class information is:
where k is the number of classes, there are three types of legs in the present invention, and therefore k is 3.
(2) Calculating the information gain ratio of the attribute V
Selecting one attribute V, wherein V has n values { V ] which are not coincident with each other1,v2,v3...vn}. Taking each value V of the attribute ViArranged from small to large to obtain a new value sequence { v }1,v2,v3...vnAnd generating n-1 partition points in total, wherein n-1 partition modes are provided, and the value of the kth partition point is set as:
ak=(vk+vk+1)/2
it divides the node's data set into 2 data subsets, which can be represented by v1,ak],(ak,vn]Represents the value of the attribute V.
Each of the n-1 partitions of the attribute V may be taken as 2 discrete values of the attribute, and the discrete values of the attribute are reconstructed, so that the value of V at this time is V ═ m0,m1In which m is0Indicates that v takes a value of a or lesskSet of (1), m1Meaning that v takes on a value greater than akSet of (1) diIs V ═ mi(i is 0,1) isIs V ═ miIn the sample of (A) is CjThe number of (2). The information gain ratio corresponding to each partition is then calculated in turn as follows.
a) Calculating the information entropy of each value of the attribute V
Attribute V ═ miIn (C)jThe probability of a class is:
the entropy of the class condition information of the attribute V
b) Calculating V as miProbability of (2)
c) Computing class condition information entropy
Entropy(V)=p0I(V=m0)+p1I(V=m1)
d) Calculating information gain of attribute V
Gain(V)=I(C)-Entropy(V)
e) Calculating the entropy of the attribute V as
Split(V)=-(p0logp0+p1logp1)
f) Calculating the information gain ratio of the attribute V
The division threshold value a in which the information gain rate is maximum is selected as the optimum division threshold value of the attribute V.
(3) And (2) performing recursion until the information gain rate of each attribute V is calculated, selecting the attribute V with the maximum information gain rate, and creating a node at the optimal segmentation threshold value a of the attribute V.
(4) If the samples contained in the leaf node in the step (3) belong to different types, the steps (1) to (3) are recursively executed on the samples in the leaf node until the leaf node only contains the same type of data.
Step six: and performing foot type classification on the input image by using a trained C4.5 decision tree classifier.
The classification of the foot types is completed through the six steps, and at present, no foot type classification method is available at home and abroad for reference, so that the method has wide practical value.

Claims (2)

1. A foot type classification method based on human foot images is characterized in that: the method comprises the following steps:
the method comprises the following steps: creation of a database
The method is characterized in that a large number of images of the front face of the human foot are collected, foot type characteristic learning is carried out on different feet, and the collecting process comprises the following three aspects:
(1) image acquisition
The method comprises the following steps of (1) stepping a foot wearing the pure-color socks on a horizontal ground, wherein a preset discrimination degree is required between the background color of the ground and the color of the socks; the method comprises the following steps that black socks are worn and stepped on a light-colored floor, a lens vertically shoots downwards right above feet, the central axis of the feet is enabled to be consistent with the vertical direction of an image, the sole part is enabled to be completely contained in the image, and meanwhile, the image background is enabled to be simple, namely only a foot target and the ground background are in the image;
(2) data collection
Under the condition of ensuring that the acquired background and the color of the socks have distinction, different backgrounds and colors of the socks are changed, front foot imaging is carried out on different people, and 300 experimental samples are collected in total;
(3) generation of sample truth values
The standard foot types are classified into Roman feet, Greek feet and Egypt feet, the foot type categories of one image are manually classified, the foot type categories of the image are determined according to most principles, and the categories are the true foot types of the image;
step two: pre-processing shadow removal
For 300 collected experimental images, enhancing the sole part by adopting a significance method, and removing shadow interference of the sole part;
step three: extracting sole part
In the step, an Otsu threshold method is adopted to realize the segmentation of the image, and the sole is extracted from the image;
(1) image binarization
The said Otsu threshold method is detailed as follows:
assuming that t is a segmentation threshold value of the target and the background, and the target is the pixel with the gray level smaller than t, otherwise, the background pixel is the pixel; let the ratio of target pixel point to image be w0Average gray of u0The ratio of background pixel points to image is w1Average gray of u1
The total average gray scale of the image is:
<mrow> <mover> <mi>u</mi> <mo>&amp;OverBar;</mo> </mover> <mo>=</mo> <msub> <mi>w</mi> <mn>0</mn> </msub> <mo>&amp;times;</mo> <msub> <mi>u</mi> <mn>0</mn> </msub> <mo>+</mo> <msub> <mi>w</mi> <mn>1</mn> </msub> <mo>&amp;times;</mo> <msub> <mi>u</mi> <mn>1</mn> </msub> </mrow>
the variance between the target and the background is:
<mrow> <mi>g</mi> <mo>=</mo> <msub> <mi>w</mi> <mn>0</mn> </msub> <mo>&amp;times;</mo> <msup> <mrow> <mo>(</mo> <msub> <mi>u</mi> <mn>0</mn> </msub> <mo>-</mo> <mover> <mi>u</mi> <mo>&amp;OverBar;</mo> </mover> <mo>)</mo> </mrow> <mn>2</mn> </msup> <mo>+</mo> <msub> <mi>w</mi> <mn>1</mn> </msub> <mo>&amp;times;</mo> <msup> <mrow> <mo>(</mo> <msub> <mi>u</mi> <mn>1</mn> </msub> <mo>-</mo> <mover> <mi>u</mi> <mo>&amp;OverBar;</mo> </mover> <mo>)</mo> </mrow> <mn>2</mn> </msup> </mrow>
traversing a threshold t within the range of [0,255] according to the Otsu threshold principle, and obtaining the optimal segmentation threshold t when the variance g is maximum;
(2) noise and hole removal
After the image is subjected to binarization processing by t, noise can appear in the image background, and holes can also appear in the foot target; according to the priori knowledge, a human foot corresponds to the largest connected region in the image, so that the largest connected region in the image is searched and extracted as a target, other small connected regions are filtered out as noise, and holes in the target are removed by adopting a seed filling method;
step four: extracting features of a sole profile
Extracting 2 slopes and 2 area ratios as the characteristics of foot type classification;
(1) extracting key points
The key points comprise a rightmost point A of the outline, a topmost point B of the outline, a leftmost point C of the sole outline and a left upper turning point D of the outline; the point A, B, C is obtained by searching the uppermost point horizontally or the outermost points on the left and right sides vertically; for any contour point between B and C, making a vertical line for a straight line in the vertical direction of the point B and a straight line in the horizontal direction of the point C and enclosing to form a rectangle, wherein the point D is the point with the largest rectangular area enclosed by all contour points between B and C;
(2) slope feature extraction
Let p and q be two key points and the sequence of edge points between these two points be (x)1,y1),(x2,y2)…(xn,yn) Fitting a straight line with the sequence of edge points:
y=kx+b
in the above formula, k is the slope of the fitted straight line, and b is the offset value of the fitted straight line;
according to the principle of least squares, the values of k and b are found by the following formula:
<mrow> <mi>k</mi> <mo>=</mo> <mrow> <mo>(</mo> <mover> <mrow> <mi>X</mi> <mi>Y</mi> </mrow> <mo>&amp;OverBar;</mo> </mover> <mo>-</mo> <mover> <mi>X</mi> <mo>&amp;OverBar;</mo> </mover> <mo>*</mo> <mover> <mi>Y</mi> <mo>&amp;OverBar;</mo> </mover> <mo>)</mo> </mrow> <mo>/</mo> <mrow> <mo>(</mo> <mo>(</mo> <mover> <mrow> <mi>X</mi> <mo>*</mo> <mi>X</mi> </mrow> <mo>&amp;OverBar;</mo> </mover> <mo>)</mo> <mo>-</mo> <mo>(</mo> <mrow> <mover> <mi>X</mi> <mo>&amp;OverBar;</mo> </mover> <mo>*</mo> <mover> <mi>X</mi> <mo>&amp;OverBar;</mo> </mover> </mrow> <mo>)</mo> <mo>)</mo> </mrow> </mrow>
<mrow> <mi>b</mi> <mo>=</mo> <mover> <mi>Y</mi> <mo>&amp;OverBar;</mo> </mover> <mo>-</mo> <mi>k</mi> <mover> <mi>X</mi> <mo>&amp;OverBar;</mo> </mover> </mrow>
wherein,
n is the total number of pixels of the edge point sequence; obtaining 2 straight lines by adopting a straight line fitting method for the key point pairs (A, B) and (B, D), wherein the slope characteristics of the 2 straight lines can be used for subsequent decision tree classification;
(3) area feature extraction
Making horizontal lines and vertical lines for the points A and B, obtaining a rectangle by using four straight lines, sequentially counting the number of pixels sum _ in the foot and the number of pixels sum _ out outside the foot in the region surrounded by the rectangle, and calculating the area ratio of the outside area of the foot to the inside area of the foot:
Rate=sum_in/sum_out
similarly, a rectangle can be obtained by using the point B and the point D, another area ratio is obtained, and the 2 area ratio features and the two previous straight line features are used for subsequent decision tree classification;
step five: establishing a foot type classification model
The foot type classification problem is a typical mode classification problem, wherein a human foot image is a mode to be identified, the corresponding foot type is a class label, and a C4.5 decision tree method is adopted to construct a classification model;
the "C4.5 decision tree method" is detailed as follows:
let D be the training sample set, which has sum samples, and belong to C respectively1,C2And C3Three categories, which respectively correspond to three foot types of a Roman foot, a Greek foot and an Egypt foot, have four attributes in total, and comprise two straight line slopes and two area ratios;
(1) computing entropy of training sample set category information
Let cjBelong to C for the category in sum samplesjThe number of samples of (1) is
The sample is CjThe probability of a class is:
<mrow> <msub> <mi>p</mi> <mi>j</mi> </msub> <mo>=</mo> <mfrac> <msub> <mi>c</mi> <mi>j</mi> </msub> <mrow> <mi>s</mi> <mi>u</mi> <mi>m</mi> </mrow> </mfrac> </mrow>
the entropy of the sample set class information is:
<mrow> <mi>I</mi> <mrow> <mo>(</mo> <mi>C</mi> <mo>)</mo> </mrow> <mo>=</mo> <mo>-</mo> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>j</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>k</mi> </munderover> <msub> <mi>p</mi> <mi>j</mi> </msub> <mo>&amp;CenterDot;</mo> <msub> <mi>log</mi> <mn>2</mn> </msub> <msub> <mi>p</mi> <mi>j</mi> </msub> </mrow>
wherein k is the number of categories, and there are three foot types in the invention, so k is 3;
(2) calculating the information gain ratio of the attribute V
Selecting one attribute V, wherein V has n values { V ] which are not coincident with each other1′,v2′,v3′…vn' } taking each value V of attribute Vi' are arranged from small to large to obtain a new value sequence { v1,v2,v3…vnAnd generating n-1 partition points in total, wherein n-1 partition modes are provided, and the value of the kth partition point is set as:
ak=(vk+vk+1)/2
it divides the node's data set into 2 subsets of data, using v1,ak],(ak,vn]Represents the value of the attribute V;
each of the n-1 partitions of the attribute V is taken as 2 discrete values of the attribute, and the discrete values of the attribute are reconstructed, so that the value of V at this time is V ═ m { (m)0,m1In which m is0Indicates that v takes a value of a or lesskSet of (1), m1Meaning that v takes on a value greater than akSet of (1) diIs V ═ mi(i is 0,1) isIs V ═ miIn the sample of (A) is CjThe number of the division is calculated according to the following steps;
a) calculating the information entropy of each value of the attribute V
Attribute V ═ miIn (C)jThe probability of a class is:
<mrow> <mi>p</mi> <mrow> <mo>(</mo> <msub> <mi>C</mi> <mi>j</mi> </msub> <mo>|</mo> <mi>V</mi> <mo>=</mo> <msub> <mi>m</mi> <mi>i</mi> </msub> <mo>)</mo> </mrow> <mo>=</mo> <mfrac> <msub> <mi>c</mi> <mrow> <msub> <mi>jm</mi> <mi>i</mi> </msub> </mrow> </msub> <msub> <mi>d</mi> <mi>j</mi> </msub> </mfrac> </mrow>
the entropy of the class condition information of the attribute V
<mrow> <mi>I</mi> <mrow> <mo>(</mo> <mi>V</mi> <mo>=</mo> <msub> <mi>m</mi> <mi>i</mi> </msub> <mo>)</mo> </mrow> <mo>=</mo> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>j</mi> <mo>=</mo> <mn>1</mn> </mrow> <mn>3</mn> </munderover> <mi>p</mi> <mrow> <mo>(</mo> <msub> <mi>C</mi> <mi>j</mi> </msub> <mo>|</mo> <mi>V</mi> <mo>=</mo> <msub> <mi>m</mi> <mi>i</mi> </msub> <mo>)</mo> </mrow> <msub> <mi>log</mi> <mn>2</mn> </msub> <mi>p</mi> <mrow> <mo>(</mo> <msub> <mi>C</mi> <mi>j</mi> </msub> <mo>|</mo> <mi>V</mi> <mo>=</mo> <msub> <mi>m</mi> <mi>i</mi> </msub> <mo>)</mo> </mrow> </mrow>
b) Calculating V as miProbability of (2)
<mrow> <msub> <mi>p</mi> <mi>i</mi> </msub> <mo>=</mo> <mfrac> <msub> <mi>d</mi> <mi>i</mi> </msub> <mrow> <mi>s</mi> <mi>u</mi> <mi>m</mi> </mrow> </mfrac> </mrow>
c) Computing class condition information entropy
Entropy(V)=p0I(V=m0)+p1I(V=m1)
d) Calculating information gain of attribute V
Gain(V)=I(C)-Entropy(V)
e) Calculating the entropy of the attribute V as
Split(V)=-(p0logp0+p1logp1)
f) Calculating the information gain ratio of the attribute V
<mrow> <mi>G</mi> <mi>a</mi> <mi>i</mi> <mi>n</mi> <mo>_</mo> <mi>R</mi> <mi>a</mi> <mi>t</mi> <mi>i</mi> <mi>o</mi> <mrow> <mo>(</mo> <mi>V</mi> <mo>)</mo> </mrow> <mo>=</mo> <mfrac> <mrow> <mi>G</mi> <mi>a</mi> <mi>i</mi> <mi>n</mi> <mrow> <mo>(</mo> <mi>V</mi> <mo>)</mo> </mrow> </mrow> <mrow> <mi>S</mi> <mi>p</mi> <mi>l</mi> <mi>i</mi> <mi>t</mi> <mrow> <mo>(</mo> <mi>V</mi> <mo>)</mo> </mrow> </mrow> </mfrac> </mrow>
Selecting a segmentation threshold a where the information gain rate is maximum as an optimal segmentation threshold of the attribute V;
(3) recursively performing (2) until an information gain ratio of each attribute V is calculated, selecting an attribute V having a maximum information gain ratio, and creating a node at an optimal division threshold a thereof;
(4) if the samples contained in the leaf nodes in the step (3) belong to different types, performing the steps (1) to (3) recursively on the samples in the leaf nodes until the leaf nodes only contain the same type of data;
step six: foot type classification prediction
Setting a test set, establishing a foot type classification model by adopting the process, extracting key points of a sample to be classified, calculating two slopes and two area characteristics, and inputting the two slopes and the two area characteristics into a trained foot type classification model, namely predicting the class attribute of the sample;
the "significance method" described in step two is detailed below:
(1) color space conversion
Converting an image from an RGB color space to a Lab color space, comprising two steps, firstly converting the RGB color space into an XYZ color space, and then converting the XYZ color space into the Lab color space;
the method for converting an RGB color space into an XYZ color space is as follows:
<mrow> <mfenced open = "[" close = "]"> <mtable> <mtr> <mtd> <mi>X</mi> </mtd> </mtr> <mtr> <mtd> <mi>Y</mi> </mtd> </mtr> <mtr> <mtd> <mi>Z</mi> </mtd> </mtr> </mtable> </mfenced> <mo>=</mo> <mfenced open = "[" close = "]"> <mtable> <mtr> <mtd> <mn>0.436052025</mn> </mtd> <mtd> <mn>0.385081593</mn> </mtd> <mtd> <mn>0.143087414</mn> </mtd> </mtr> <mtr> <mtd> <mn>0.222491598</mn> </mtd> <mtd> <mn>0.716886060</mn> </mtd> <mtd> <mn>0.060621486</mn> </mtd> </mtr> <mtr> <mtd> <mn>0.013929122</mn> </mtd> <mtd> <mrow> <mn>0.</mn> <mo>,</mo> <mn>097097002</mn> </mrow> </mtd> <mtd> <mn>0.714185470</mn> </mtd> </mtr> </mtable> </mfenced> <mo>*</mo> <mfenced open = "[" close = "]"> <mtable> <mtr> <mtd> <mi>R</mi> </mtd> </mtr> <mtr> <mtd> <mi>G</mi> </mtd> </mtr> <mtr> <mtd> <mi>B</mi> </mtd> </mtr> </mtable> </mfenced> </mrow>
the method for converting the XYZ color space into the Lab color space comprises the following steps:
L=116*f(Y)-16
a=500*[f(X)-f(Y)]
b=200*[f(Y)-f(Z)]
wherein
In the above formula, L, a and b are the values of three Lab color space channels;
(2) obtaining the mean value of each channel
In Lab color space, each pixel point corresponds to a group of channel values, namely L value, a value and b value, all pixel points of the whole image are traversed, and the mean value of each channel is calculatedAnd
<mrow> <mover> <mi>L</mi> <mo>&amp;OverBar;</mo> </mover> <mo>=</mo> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>i</mi> <mo>=</mo> <mn>0</mn> </mrow> <mi>n</mi> </munderover> <msub> <mi>L</mi> <mi>i</mi> </msub> </mrow>
<mrow> <mover> <mi>a</mi> <mo>&amp;OverBar;</mo> </mover> <mo>=</mo> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>i</mi> <mo>=</mo> <mn>0</mn> </mrow> <mi>n</mi> </munderover> <msub> <mi>a</mi> <mi>i</mi> </msub> </mrow>
<mrow> <mover> <mi>b</mi> <mo>&amp;OverBar;</mo> </mover> <mo>=</mo> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>i</mi> <mo>=</mo> <mn>0</mn> </mrow> <mi>n</mi> </munderover> <msub> <mi>b</mi> <mi>i</mi> </msub> </mrow>
in the above formula, n is the number of pixel points in the image;
(3) shadow removal
Order (L)i,ai,bi) The value of the ith pixel in the image in three channels of L, a and b is shown, and the significance value of the ith pixel is shown as
<mrow> <msub> <mi>p</mi> <mi>i</mi> </msub> <mo>=</mo> <mroot> <mrow> <msup> <mrow> <mo>(</mo> <msub> <mi>L</mi> <mi>i</mi> </msub> <mo>-</mo> <mover> <mi>L</mi> <mo>&amp;OverBar;</mo> </mover> <mo>)</mo> </mrow> <mn>2</mn> </msup> <mo>+</mo> <msup> <mrow> <mo>(</mo> <msub> <mi>a</mi> <mi>i</mi> </msub> <mo>-</mo> <mover> <mi>a</mi> <mo>&amp;OverBar;</mo> </mover> <mo>)</mo> </mrow> <mn>2</mn> </msup> <mo>+</mo> <msup> <mrow> <mo>(</mo> <msub> <mi>b</mi> <mi>i</mi> </msub> <mo>-</mo> <mover> <mi>b</mi> <mo>&amp;OverBar;</mo> </mover> <mo>)</mo> </mrow> <mn>2</mn> </msup> </mrow> <mn>2</mn> </mroot> </mrow>
Whereinm∈{L,a,b}
The saliency value of a pixel in the image is calculated and mapped to [0,255] using the following formula:
<mrow> <msub> <mi>p</mi> <mi>i</mi> </msub> <mo>=</mo> <mfrac> <msub> <mi>p</mi> <mi>i</mi> </msub> <mrow> <msub> <mi>p</mi> <mrow> <mi>m</mi> <mi>a</mi> <mi>x</mi> </mrow> </msub> <mo>-</mo> <msub> <mi>p</mi> <mrow> <mi>m</mi> <mi>i</mi> <mi>n</mi> </mrow> </msub> </mrow> </mfrac> <mo>*</mo> <mn>255</mn> </mrow>
wherein p ismaxAnd pminRespectively the maximum and minimum saliency values among all pixels of the image;
the "RGB color space" described in this step means an image represented by intensities of red, green, and blue, the "XYZ color space" means an image represented by tristimulus values, and the "Lab color space" means an image represented by luminance values, intensities from pure black to pure white, and intensities from yellow to blue.
2. The method of claim 1, wherein the foot type classification based on the human foot image is performed by: the "method of seed filling" described in step three, is detailed below:
starting from a point inside a hole in the ball region, the pixel-by-pixel fill is made up from top, bottom, left, and right directions, from inside to outside, with black until a white border is encountered.
CN201510329437.4A 2015-06-15 2015-06-15 A kind of foot type sorting technique based on people's pin image Expired - Fee Related CN104966099B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510329437.4A CN104966099B (en) 2015-06-15 2015-06-15 A kind of foot type sorting technique based on people's pin image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510329437.4A CN104966099B (en) 2015-06-15 2015-06-15 A kind of foot type sorting technique based on people's pin image

Publications (2)

Publication Number Publication Date
CN104966099A CN104966099A (en) 2015-10-07
CN104966099B true CN104966099B (en) 2018-03-20

Family

ID=54220134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510329437.4A Expired - Fee Related CN104966099B (en) 2015-06-15 2015-06-15 A kind of foot type sorting technique based on people's pin image

Country Status (1)

Country Link
CN (1) CN104966099B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107203930B (en) * 2017-06-23 2021-03-23 温州职业技术学院 Method and system for classifying and customizing shoes
US10621730B2 (en) 2018-05-22 2020-04-14 Sony Corporation Missing feet recovery of a human object from an image sequence based on ground plane detection
CN112116580B (en) * 2020-09-22 2023-09-05 中用科技有限公司 Detection method, system and equipment for camera support
CN113317593B (en) * 2021-06-25 2022-07-26 浙江星链数据科技有限公司 Method for obtaining foot type data based on foot scanning device
CN115700831A (en) * 2021-07-29 2023-02-07 脸萌有限公司 Image labeling method, image classification method and machine learning model training method
CN114523236A (en) * 2022-02-28 2022-05-24 柳州铁道职业技术学院 Intelligent automatic detection platform based on machine vision
CN115100696A (en) * 2022-08-29 2022-09-23 山东圣点世纪科技有限公司 Connected domain rapid marking and extracting method and system in palm vein recognition

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101103854A (en) * 2007-04-13 2008-01-16 浙江大学 Personality shoe last model generating method for integrating three-dimension foot-shaped global parameter and local cross section regulation
CN102339513A (en) * 2010-07-16 2012-02-01 重庆工商大学 Anti-pet tread type alarm and method thereof for distinguishing foot type by measuring area with contour method
CN102509109A (en) * 2011-10-20 2012-06-20 西北民族大学 Method for distinguishing Thangka image from non-Thangka image

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101103854A (en) * 2007-04-13 2008-01-16 浙江大学 Personality shoe last model generating method for integrating three-dimension foot-shaped global parameter and local cross section regulation
CN102339513A (en) * 2010-07-16 2012-02-01 重庆工商大学 Anti-pet tread type alarm and method thereof for distinguishing foot type by measuring area with contour method
CN102509109A (en) * 2011-10-20 2012-06-20 西北民族大学 Method for distinguishing Thangka image from non-Thangka image

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于激光扫描的脚型测量系统设计及应用;张涛;《万方数据知识服务平台》;20131129;第1-66页 *
融合小波变换和颜色熵的分块浮游生物识别;丁伟杰等;《计算机仿真》;20111031;第28卷(第10期);第244-248页 *

Also Published As

Publication number Publication date
CN104966099A (en) 2015-10-07

Similar Documents

Publication Publication Date Title
CN104966099B (en) A kind of foot type sorting technique based on people&#39;s pin image
Preetha et al. Image segmentation using seeded region growing
Wang et al. Optimized color sampling for robust matting
CN103971115B (en) Automatic extraction method for newly-increased construction land image spots based on NDVI and PanTex index
CN111738064B (en) Haze concentration identification method for haze image
CN108537239B (en) Method for detecting image saliency target
CN102013017B (en) Method for roughly sorting high-resolution remote sensing image scene
CN109215091B (en) Clothing fashion color automatic extraction method based on graph representation
Almogdady et al. A flower recognition system based on image processing and neural networks
CN106548160A (en) A kind of face smile detection method
Su Scale-variable region-merging for high resolution remote sensing image segmentation
CN103914705B (en) Hyperspectral image classification and wave band selection method based on multi-target immune cloning
JP4098021B2 (en) Scene identification method, apparatus, and program
Khan et al. Color image segmentation: a novel spatial fuzzy genetic algorithm
CN110120042A (en) A kind of crop map based on SLIC super-pixel and automatic threshold segmentation is as pest and disease damage method for extracting region
CN109829425B (en) Farmland landscape small-scale ground feature classification method and system
CN106294705A (en) A kind of batch remote sensing image preprocess method
CN104636759A (en) Method for obtaining picture recommending filter information and picture filter information recommending system
CN103714181A (en) Stratification specific figure search method
CN110163822A (en) The netted analyte detection and minimizing technology and system cut based on super-pixel segmentation and figure
CN104408731B (en) Region graph and statistic similarity coding-based SAR (synthetic aperture radar) image segmentation method
CN110853027A (en) Three-dimensional synthetic image no-reference quality evaluation method based on local variation and global variation
CN116109933B (en) Dynamic identification method for ecological restoration of abandoned mine
CN106846343A (en) A kind of pathological image feature extracting method based on cluster super-pixel segmentation
CN109447111A (en) A kind of remote sensing supervised classification method based on subclass training sample

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180320

Termination date: 20200615