Image recognition method and apparatus
First Claim
1. An image recognition method, comprising:
- extracting a local binary pattern (LBP) feature vector of a target image, the target image being a face image;
calculating a high-dimensional feature vector of the target image according to the LBP feature vector;
obtaining a training matrix, the training matrix being a matrix obtained by training images in an image library by using a joint Bayesian algorithm, the image library comprising m*n face images, m being a number of persons corresponding to images in the image library, and n being a number of face images of each person; and
performing image recognition on the target image according to the high-dimensional feature vector of the target image and the training matrix,wherein obtaining the training matrix comprises;
obtaining a high-dimensional feature vector of each person corresponding to the face images in the image library;
initializing a first covariance matrix of n face images of each person in the image library and a second covariance matrix of images of different persons in the image library, the first covariance matrix being an m-dimensional square matrix and the second covariance matrix being an m*n square matrix;
calculating a mean value of Gaussian distribution of each person in the image library;
calculating a joint distribution covariance matrix of two persons in the image library according to the first covariance matrix, the second covariance matrix, and the high-dimensional feature vectors of the two persons;
updating the first covariance matrix according to the mean value of Gaussian distribution, and updating the second covariance matrix according to the joint distribution covariance matrix; and
obtaining the training matrix based on the updated first covariance matrix and the updated second covariance matrix.
1 Assignment
0 Petitions
Accused Products
Abstract
The present disclosure discloses an image recognition method and apparatus, and belongs to the field of computer technologies. The method includes: extracting a local binary pattern (LBP) feature vector of a target image; calculating a high-dimensional feature vector of the target image according to the LBP feature vector; obtaining a training matrix, the training matrix being a matrix obtained by training images in an image library by using a joint Bayesian algorithm; and recognizing the target image according to the high-dimensional feature vector of the target image and the training matrix. The image recognition method and apparatus according to the present disclosure may combine LBP algorithm with a joint Bayesian algorithm to perform recognition, thereby improving the accuracy of image recognition.
6 Citations
17 Claims
-
1. An image recognition method, comprising:
-
extracting a local binary pattern (LBP) feature vector of a target image, the target image being a face image; calculating a high-dimensional feature vector of the target image according to the LBP feature vector; obtaining a training matrix, the training matrix being a matrix obtained by training images in an image library by using a joint Bayesian algorithm, the image library comprising m*n face images, m being a number of persons corresponding to images in the image library, and n being a number of face images of each person; and performing image recognition on the target image according to the high-dimensional feature vector of the target image and the training matrix, wherein obtaining the training matrix comprises; obtaining a high-dimensional feature vector of each person corresponding to the face images in the image library; initializing a first covariance matrix of n face images of each person in the image library and a second covariance matrix of images of different persons in the image library, the first covariance matrix being an m-dimensional square matrix and the second covariance matrix being an m*n square matrix; calculating a mean value of Gaussian distribution of each person in the image library; calculating a joint distribution covariance matrix of two persons in the image library according to the first covariance matrix, the second covariance matrix, and the high-dimensional feature vectors of the two persons; updating the first covariance matrix according to the mean value of Gaussian distribution, and updating the second covariance matrix according to the joint distribution covariance matrix; and obtaining the training matrix based on the updated first covariance matrix and the updated second covariance matrix. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. An image recognition apparatus, comprising:
-
at least one processor; and a memory, the memory storing program instructions, and the image recognition apparatus being configured to perform the following operations when the program instructions are performed by the processor; extracting a local binary pattern (LBP) feature vector of a target image, the target image being a face image; calculating a high-dimensional feature vector of the target image according to the LBP feature vector; obtaining a training matrix, the training matrix being a matrix obtained by training images in an image library by using a joint Bayesian algorithm, the image library comprising m*n face images, m being a number of persons corresponding to images in the image library, and n being a number of face images of each person; and performing image recognition on the target image according to the high-dimensional feature vector of the target image and the training matrix, wherein obtaining the training matrix comprises; obtaining a high-dimensional feature vector of each person corresponding to the face images in the image library; initializing a first covariance matrix of n face images of each person in the image library and a second covariance matrix of images of different persons in the image library, the first covariance matrix being an m-dimensional square matrix and the second covariance matrix being an m*n square matrix; calculating a mean value of Gaussian distribution of each person in the image library; calculating a joint distribution covariance matrix of two persons in the image library according to the first covariance matrix, the second covariance matrix, and the high-dimensional feature vectors of the two persons; updating the first covariance matrix according to the mean value of Gaussian distribution, and updating the second covariance matrix according to the joint distribution covariance matrix; and obtaining the training matrix based on the updated first covariance matrix and the updated second covariance matrix. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A non-transitory computer-readable storage medium, the storage medium storing program instructions, and when being executed by a processor of a computing device, the program instructions causing the processor to perform:
-
extracting a local binary pattern (LBP) feature vector of a target image, the target image being a face image; calculating a high-dimensional feature vector of the target image according to the LBP feature vector; obtaining a training matrix, the training matrix being a matrix obtained by training images in an image library by using a joint Bayesian algorithm, the image library comprising m*n face images, m being a number of persons corresponding to images in the image library, and n being a number of face images of each person; and performing image recognition on the target image according to the high-dimensional feature vector of the target image and the training matrix, wherein obtaining the training matrix comprises; obtaining a high-dimensional feature vector of each person corresponding to the face images in the image library; initializing a first covariance matrix of n face images of each person in the image library and a second covariance matrix of images of different persons in the image library, the first covariance matrix being an m-dimensional square matrix and the second covariance matrix being an m*n square matrix; calculating a mean value of Gaussian distribution of each person in the image library; calculating a joint distribution covariance matrix of two persons in the image library according to the first covariance matrix, the second covariance matrix, and the high-dimensional feature vectors of the two persons; updating the first covariance matrix according to the mean value of Gaussian distribution, and updating the second covariance matrix according to the joint distribution covariance matrix; and obtaining the training matrix based on the updated first covariance matrix and the updated second covariance matrix.
-
Specification