Imager testing method, device, equipment, storage medium and program product

By using the support vector regression model to evaluate the quality of the images captured by the imager, the high cost and inefficiency problems caused by the reliance on labor in the prior art of imager quality testing are solved, and a more accurate and efficient imager quality evaluation is achieved.

CN113362301BActive Publication Date: 2025-02-18AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110620603.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-03
Publication Date
2025-02-18
Estimated Expiration
2041-06-03

AI Technical Summary

Technical Problem

In the prior art, the quality testing of the imager depends on manual completion, which is costly and inefficient.

Method used

Through the trained support vector regression model, the image is evaluated, the image taken by the image is obtained, the color and texture features of the image are extracted, and the combination features of the image are obtained, so as to be combined with the pre-trained support vector The regression model was matched to determine the imager's evaluation results.

Benefits of technology

It realizes automation of imager quality evaluation, reduces costs, improves efficiency, and more accurate and comprehensive evaluation of imager quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113362301B_ABST
    Figure CN113362301B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides an imager testing method, device, equipment, storage medium and program product, wherein the method comprises: acquiring an image captured by an imager, wherein the imager is an imager installed in a bank and used for visual verification of user transactions, extracting color features and texture features of the image, and combining the color features and texture features to obtain combined features of the image, determining an evaluation result of the imager according to the combined features of the image and a pre-trained support vector regression model, combining the color features and texture features to cover image information more comprehensively, evaluating the quality of the image through the trained support vector regression model, obtaining an evaluation result of the imager, improving the quality evaluation efficiency and accuracy of the imager, and helping the bank system to improve the identification and transaction processes, and having low cost and good practical application effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to an imager testing method, device, equipment, storage medium and program product. Background Art

[0002] With the development of network technology, images are increasingly used as a more secure verification method in many trading venues. For example, the identity of the customer and the information on the customer's ID can be verified by taking a picture of the customer. Therefore, the image quality recorded by image capture devices such as imagers has a great correlation with the relevant verification of customer information, and the corresponding image quality test should also be included in the software evaluation.

[0003] Since the image quality of imagers plays an important role in identification, transaction and other links in the banking system, the quality evaluation of imagers has become an important part of the banking system.

[0004] Currently, the quality testing of imagers relies on manual work, which is costly and inefficient. Summary of the invention

[0005] The embodiments of the present invention provide an imager testing method, device, equipment, storage medium and program product, which can evaluate the quality of an imager through a trained support vector regression model, save costs and be easy to implement.

[0006] In a first aspect, an embodiment of the present invention provides an imaging device testing method, the method comprising:

[0007] Acquire an image captured by an imager; wherein the imager is an imager installed in a bank and used for visual verification of user transactions;

[0008] Extracting color features and texture features of the image, and combining the color features and texture features to obtain combined features of the image;

[0009] The evaluation result of the imager is determined according to the combined features of the image and a pre-trained support vector regression model.

[0010] Optionally, the captured image is an RGB image; and extracting color features of the image includes:

[0011] Convert the RGB image into an HSV image;

[0012] According to the HSV image, construct a brightness matrix, a hue matrix and a saturation matrix;

[0013] The brightness matrix, the hue matrix and the saturation matrix are respectively averaged to obtain a brightness mean, a hue mean and a saturation mean;

[0014] A one-dimensional vector representing color characteristics is generated according to the lightness mean, hue mean, and saturation mean.

[0015] Optionally, extracting texture features of the image includes:

[0016] Convert the RGB image into a grayscale image, and extract the brightness information of each pixel in the grayscale image;

[0017] compressing the brightness information of the grayscale image, and setting multiple directions and multiple step sizes for calculating the grayscale co-occurrence matrix;

[0018] For each direction, the following steps are performed: according to the brightness information of each pixel in the grayscale image, the grayscale co-occurrence matrix corresponding to each step length in the direction is calculated and normalized, wherein the normalization operation includes calculating energy, entropy, contrast, and inverse moment; and calculating the mean and variance of the normalized data;

[0019] The means and variances corresponding to each direction are combined to obtain the corresponding gray-level co-occurrence matrix as the texture feature of the image.

[0020] Optionally, the method further includes:

[0021] Acquire a training data set, wherein the training data set includes a plurality of training samples, each training sample includes a training image and a corresponding subjective score;

[0022] Extracting color features and texture features of the training images in the training data set, and obtaining combined features based on the color features and texture features;

[0023] The initial support vector regression model is trained according to the combined features and subjective scores corresponding to the training data set to obtain the pre-trained support vector regression model.

[0024] Optionally, combining the color feature and the texture feature to obtain a combined feature of the image includes:

[0025] Determining a weight of the color feature and a weight of the texture feature;

[0026] The color features and texture features are weightedly combined to obtain the combined features of the image.

[0027] Optionally, the image captured by the imager is at least one image; and determining the evaluation result of the imager according to the combined features of the image and a pre-trained support vector regression model includes:

[0028] For each image, inputting the combined features of the image into a pre-trained support vector regression model to obtain a quality score of the image;

[0029] An evaluation result of the imager is determined according to the quality score of the at least one image.

[0030] Optionally, inputting the combined features of the image into a pre-trained support vector regression model to obtain a quality score of the image includes:

[0031] The combined features of the image are input into a pre-trained support vector regression model, and the support vector regression model is run multiple times to obtain an intermediate value of the output result as the quality score of the image.

[0032] Optionally, the image captured by the imager includes a face image and an ID image; the support vector regression model includes a first support vector regression model for detecting the face image and a second support vector regression model for detecting the ID image;

[0033] For each image, the combined features of the image are input into a pre-trained support vector regression model to obtain a quality score of the image, including:

[0034] For each image, determining whether the image is a face image or an ID image;

[0035] If it is a face image, inputting the image into a first support vector regression model to obtain a quality score of the face image;

[0036] If it is a document image, inputting the image into a second support vector regression model to obtain a quality score of the document image;

[0037] Accordingly, determining the evaluation result of the imager according to the quality score of the at least one image includes:

[0038] The quality score of the face image captured by the imager and the quality score of the document image are weightedly summed to obtain the evaluation result of the imager.

[0039] Optionally, the method further includes:

[0040] Determining whether the evaluation result of the imager meets the preset requirements;

[0041] If not, a prompt message is generated, the prompt message is used to prompt the bank staff to adjust the imager; and / or control the imager to adjust at least one of the following: height, direction, focal length, aperture size, magnification, image processing algorithm.

[0042] In a second aspect, an embodiment of the present invention provides an imaging device testing device, the device comprising:

[0043] An acquisition module, used to acquire images captured by an imager; wherein the imager is an imager installed in a bank and used to visually verify the business transactions of users;

[0044] An obtaining module is used to extract color features and texture features of the image, and combine the color features and texture features to obtain combined features of the image;

[0045] The determination module is used to determine the evaluation result of the imager according to the combined features of the image and the pre-trained support vector regression model.

[0046] In a third aspect, an embodiment of the present invention provides an imaging device testing device, comprising:

[0047] at least one processor and memory;

[0048] The memory stores computer-executable instructions;

[0049] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the imager testing method as described in any one of the first aspects above.

[0050] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the imaging device testing method as described in any one of the first aspects above.

[0051] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements the imager testing method as described in any one of the first aspects above.

[0052] The imager testing method, device, equipment, storage medium and program product provided by the embodiments of the present invention obtain an image taken by an imager, wherein the imager is an imager installed in a bank and used for visual verification of user transactions, extracts color features and texture features of the image, and combines the color features and texture features to obtain combined features of the image, determines an evaluation result of the imager based on the combined features of the image and a pre-trained support vector regression model, combines the color features and texture features to more comprehensively cover image information, evaluates the quality of the image through the trained support vector regression model, obtains the evaluation result of the imager, improves the quality evaluation efficiency and accuracy of the imager, helps the bank system to improve the identification and transaction processes, and has low cost and good practical application effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0054] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present invention;

[0055] Figure 2 A schematic diagram of a flow chart of an imaging device testing method provided by an embodiment of the present invention;

[0056] Figure 3 A schematic diagram of the principle of an imaging device testing method provided by an embodiment of the present invention;

[0057] Figure 4 A schematic diagram of the structure of an imaging device testing device provided by an embodiment of the present invention;

[0058] Figure 5 A schematic structural diagram of an imaging device testing device provided by an embodiment of the present invention.

[0059] The above drawings have shown clear embodiments of the present invention, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present invention in any way, but to illustrate the concept of the present invention for those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0060] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0061] The following specific embodiments are used to describe in detail the technical solution of the present invention and how the technical solution of the present invention solves the above technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0062] An application scenario provided by an embodiment of the present invention is explained below: The method provided by an embodiment of the present invention is used to evaluate the image quality of an image output by an image capture device. There are two types of image quality evaluation methods: subjective quality evaluation methods and objective quality evaluation methods. The former mainly uses people as the observation subject to evaluate and score images in a specific environment according to pre-defined evaluation standards and evaluation systems to obtain an average subjective score for each image. The latter directly analyzes and calculates the image using a mathematical modeling method to obtain a value that is as close to the subjective quality score as possible.

[0063] In some technologies, the image database is divided into a training image set and a test image set, and images of different scales are constructed for each image, and normalized brightness images are obtained for images of different sizes. Then, the normalized grayscale co-occurrence matrix in four directions is obtained for the normalized brightness image, and the energy, entropy, contrast and inverse moment of the normalized grayscale co-occurrence matrix are calculated respectively, and the eigenvector is obtained by combining. The eigenvector and the subjective score are sent to the support vector machine for training, and the trained support vector machine is used to predict the test image set to obtain the objective image quality evaluation result. This method divides the standard data set into a training set and a prediction set, and the actual application ability is not high. When the grayscale co-occurrence matrix converts the image into a grayscale image, the color information of the image is lost, and the evaluation of the image quality by the color information is lost.

[0064] Therefore, an embodiment of the present invention provides a method for testing an imager, using a standard data set as a training set, and an image output by an image output device such as an image as a prediction set, extracting the brightness, hue and saturation of the image to obtain color features, using a grayscale co-occurrence matrix to obtain image texture features, and combining the two after averaging to obtain the combined features of the image. The standard data set is trained to obtain a support vector regression model. The combined features of the image output by the imager are input into the trained support vector regression model for prediction to obtain an evaluation result of the image quality. This method has more comprehensive information coverage of the image and better practical application effect.

[0065] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present invention. Figure 1 As shown, when handling banking business, the user performs face recognition at the imager. The imager transmits the acquired image to the computer device while performing face recognition. The computer device has a trained support vector machine regression model. The support vector regression model performs recognition calculations on the image and outputs the quality score of the image, which can be used to detect the quality of the image taken by the imaging device.

[0066] In the following, some embodiments of the present invention are described in detail in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and features in the embodiments can be combined with each other.

[0067] Figure 2 A flowchart of an imaging device testing method provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the method in this embodiment may include:

[0068] Step 201: Acquire an image captured by an imager; wherein the imager is an imager installed in a bank and used for visual verification of user transactions.

[0069] Among them, the imager is a device with a camera that can take pictures of customers and scenes for identity verification and directly output images. The images taken by the imager can be facial images or ID images, etc.

[0070] Optionally, when a user conducts some business in a bank or other place, it is necessary to identify the user's face or ID card, and the imager can obtain the user's image information and perform identification.

[0071] Step 202: extract color features and texture features of the image, and combine the color features and texture features to obtain combined features of the image.

[0072] Among them, image texture features characterize the recurring local patterns and their arrangement rules in the image, can reflect the characteristics of the object surface, and have rotation invariance and good noise performance.

[0073] Optionally, an image captured by an imager is acquired, and color features and texture features in the image are extracted and combined to obtain combined features that can represent the image features.

[0074] The image features mainly include color features, texture features, shape features and spatial relationship features of the image, which are digital information extracted from the image by digital image processing methods. In this embodiment, color features and texture features are selected to represent image features.

[0075] Step 203: Determine the evaluation result of the imager according to the combined features of the image and the pre-trained support vector regression model.

[0076] Among them, the Support Vector Regression (SVR) model is a model that uses a Support Vector Machine (SVM) to fit the curve for regression analysis.

[0077] Optionally, a pre-trained support vector regression model can be trained in advance.

[0078] The evaluation results can be divided into three levels: excellent, medium, and poor to judge the quality of the image. There may also be other classification criteria, which are not specifically limited here.

[0079] Optionally, by inputting the combined features of the image output by the imager into a trained support vector regression model, an evaluation result of the image can be output.

[0080] The imager testing method provided in the present embodiment obtains an image taken by an imager, wherein the imager is an imager installed in a bank and used for visual verification of user transactions, extracts color features and texture features of the image, and combines the color features and texture features to obtain combined features of the image, determines an evaluation result of the imager based on the combined features of the image and a pre-trained support vector regression model, combines the color features and texture features to more comprehensively cover image information, evaluates the quality of the image through the trained support vector regression model, obtains the evaluation result of the imager, improves the quality evaluation efficiency and accuracy of the imager, helps the bank system to improve the identification and transaction processes, and has low cost and good practical application effect.

[0081] Based on the technical solution provided in the above embodiment, optionally, the captured image is an RGB image; and extracting the color features of the image includes:

[0082] The RGB image is converted into an HSV image; a brightness matrix, a hue matrix and a saturation matrix are constructed according to the HSV image; the brightness matrix, the hue matrix and the saturation matrix are respectively averaged to obtain a brightness mean, a hue mean and a saturation mean; and a one-dimensional vector for representing color features is generated according to the brightness mean, the hue mean and the saturation mean.

[0083] Among them, the HSV color space is a color space created based on the intuitive characteristics of color, which contains hue, brightness and saturation information.

[0084] Color images captured by imaging devices are composed of mixed values ​​of the three color channels of RGB. The relationship between the values ​​of the three color components in the RGB color space and the resulting color is not intuitive. The human eye tends to see light and dark, depth and specific color. Therefore, the RGB image is converted to an HSV image to obtain a color space that is more in line with the human visual system. The H in the HSV image represents hue or hue, S represents saturation, and V represents brightness.

[0085] Convert the RGB value of each image to HSV value to obtain the HSV image. According to the coordinates of each pixel in the HSV image, three matrices representing the brightness, hue and saturation of the image are obtained. Formula M can be used. x Represents each matrix, where x=1, 2, 3 represent the obtained lightness, hue and saturation matrices respectively.

[0086] The lightness, hue and saturation matrices obtained from the HSV image are averaged using formula (1).

[0087] V x =mean(M x ) (1)

[0088] Among them, mean(M x ) means taking the average value of each element in the x-th matrix. When x=1, 2, and 3, the average value of the brightness matrix, the average value of the hue matrix, and the average value of the saturation matrix are obtained respectively. The three average values ​​are combined together to generate a one-dimensional vector for representing color features, that is, the color features [V1, V2, V3] representing the basic colors of the image are obtained.

[0089] Specifically, the brightness, hue, and saturation matrices of a HSV image are obtained as follows:

[0090]

[0091] By first averaging each column of each matrix to obtain a one-dimensional array, and then averaging each row, the means of the lightness, hue, and saturation matrices can be obtained as 37, 51, and 57, respectively. The three calculated average values ​​are combined together to obtain the color feature [37, 51, 57] representing the basic color of the HSV image.

[0092] Converting RGB images into HSV images that are closer to the human visual system makes pixel recognition of different colors more precise and accurate. Performing mean processing on each matrix, we can obtain color features that can represent the basic colors of the image, and provide a more holistic summary of the image color information.

[0093] Optionally, the color features of the RGB image may be extracted in more dimensions, for example, converted into other types of color features in addition to the three features of the HSV color space.

[0094] Optionally, extracting texture features of the image includes:

[0095] Convert the RGB image into a grayscale image, and extract the brightness information of each pixel in the grayscale image;

[0096] compressing the brightness information of the grayscale image, and setting multiple directions and multiple step sizes for calculating the grayscale co-occurrence matrix;

[0097] For each direction, the following steps are performed: according to the brightness information of each pixel in the grayscale image, the grayscale co-occurrence matrix corresponding to each step length in the direction is calculated and normalized, wherein the normalization operation includes calculating energy, entropy, contrast, and inverse moment; and calculating the mean and variance of the normalized data;

[0098] The means and variances corresponding to each direction are combined to obtain the corresponding gray-level co-occurrence matrix as the texture feature of the image.

[0099] The texture features of the image are obtained through the Gray-level Co-occurrence Matrix (GLCM).

[0100] Among them, the multiple directions can be four directions, namely 0°, 45°, 90°, and 135°. The gray-level co-occurrence matrix can describe the image texture by studying the spatial correlation characteristics of grayscale. The gray-level histogram is the result of counting the grayscale of a single pixel on the image, while the gray-level co-occurrence matrix is ​​the result of counting the conditions in which two pixels at a certain distance on the image have a certain grayscale. The essence of the gray-level co-occurrence matrix is ​​to start from the pixel with grayscale i in the image (whose position is (x, y)), and count the number of times (i, j, d, θ) that appears at the same time with the pixel (x+Dx, y+Dy) with a distance d and grayscale j. The mathematical expression is:

[0101] p(i,j,d,θ)=[(x,y),(x+Dx,y+Dx)|f(x,y)=i,f(x+Dx,y+Dy)=j] (2)

[0102] Among them, x, y = 1, 2, ..., N-1, represent the pixel coordinates in the image, i, j = 1, 2, ..., L-1 represent the grayscale, L represents the maximum grayscale after compression, N represents the compression level, Dx, Dy represent the position offset, d represents the step size of generating the gray-level co-occurrence matrix, θ represents the generation direction, which can take four directions: 0°, 45°, 90°, and 135°.

[0103] The normalization operation includes calculating energy, entropy, contrast, and inverse moment, and the corresponding formulas are:

[0104]

[0105]

[0106]

[0107]

[0108] Among them, a variety of image texture features can be derived from the gray level co-occurrence matrix, and the characteristic statistics of the gray level co-occurrence matrix can be calculated. The characteristic statistics refer to the statistics of the number of times a pixel with a gray level of i appears at the same time as a pixel with a distance of d and a gray level of j.

[0109] Optionally, the RGB image is converted into a grayscale image, and the brightness information of each pixel in the grayscale image is extracted to obtain a matrix containing only brightness information, and each point in the matrix represents the grayscale level of the point in the grayscale image. Since the grayscale level of each pixel in the grayscale image is relatively large, from the perspective of texture separability and calculation time, the grayscale level can be compressed, and a suitable step size is selected. Considering the rotation invariance of the parameters, calculations are performed in four directions respectively to obtain the step size and the grayscale co-occurrence matrix in the direction, and the grayscale co-occurrence matrix is ​​normalized by the above energy formula (3), entropy formula (4), contrast formula (5) and inverse moment formula (6), and the mean and variance of the normalized data are calculated, and the two are put together to obtain the final extracted features. Traverse all the selected step sizes and directions, and combine the final results together to obtain the texture feature data representing the image, which is recorded as [Glcm].

[0110] Among them, multiple step sizes can be 1, 2, ..., which is smaller than the number of compression levels.

[0111] Specifically, the grayscale levels in the grayscale image are compressed to different levels, and 10 steps from 1 to 10 are selected from four directions for cyclic calculation and normalization. Finally, the mean and variance of the normalized data are calculated, and the two are listed together as the final extracted features to obtain a set of 80-dimensional texture feature data, which represents the texture features of the image.

[0112] For example, the grayscale level in the grayscale image is compressed to 9 levels, and the grayscale co-occurrence matrix of the compressed grayscale image is calculated when the step size is 1 and the direction is 0°. The obtained grayscale co-occurrence matrix is ​​then normalized according to formula (3)(4)(5)(6), and the mean and variance of the data after normalization are calculated to obtain a set of two-dimensional data. Then, three sets of two-dimensional data are obtained from the directions of 45°, 90°, and 135° respectively. The data calculated when the step size is 1 are combined to obtain a set of eight-dimensional texture feature data. Therefore, when there are ten step sizes, a set of 80-dimensional texture feature data is obtained.

[0113] Optionally, when actually calculating the gray-level co-occurrence matrix, the graycomatrix function in the MATLAB tool may be used to obtain it.

[0114] The feature statistics are calculated for the compressed grayscale image. The statistics are independent of each other and can effectively express the texture characteristics of the image. They are also easy to calculate and have good identification ability.

[0115] Optionally, the method further includes:

[0116] A training data set is obtained, wherein the training data set includes multiple training samples, each training sample includes a training image and a corresponding subjective score; color features and texture features of the training images in the training data set are extracted, and combined features are obtained based on the color features and texture features; an initial support vector regression model is trained based on the combined features and subjective scores corresponding to the training data set to obtain the pre-trained support vector regression model.

[0117] Optionally, a standard dataset can be used as a training dataset. Among them, the image standard dataset is a dataset in which various research institutions use various images taken to different degrees of distortion, and then find more evaluators to perform subjective quality evaluation and scoring on each image to obtain a standard score for each image. Currently, the most commonly used 2D image dataset is the LIVE dataset.

[0118] Each data set may include multiple training images and subjective scores corresponding to the images. Support vector machine is essentially a classification method that transforms the input sample set from low-dimensional to high-dimensional space through nonlinear transformation to separate the characteristics of the sample set.

[0119] In the support vector regression model, the data points on and outside the boundary of the decision surface interval are called support vectors, so that the fitted linear regression curve can accurately describe the trend of the data. Among them, the kernel function is required in the vector regression model. The kernel function is the key to mapping samples from the original space to a higher-dimensional space and calculating the hyperplane. In this embodiment, the Gaussian radial basis function is selected.

[0120] Among them, the two most important parameters affecting the performance of the support vector regression model are the penalty factor and the Gamma value. The penalty factor weighs the empirical risk (fitting ability of the sample) and the structural risk (prediction ability of the test sample). The Gamma value can be used to adjust the complexity of the support vector regression model. When the Gamma value is smaller, the complexity of the support vector regression model is lower. When the Gamma value is larger, the complexity of the support vector regression model is higher. However, the performance of these two parameters is not always better when they are larger or smaller, but there will be the most suitable values ​​for different training sample data sets. The optimal parameters will greatly improve the performance of the support vector regression model obtained by training, so this embodiment adopts the parameter optimization method to construct the support vector regression model.

[0121] There are many methods for parameter optimization, such as grid parameter optimization, genetic algorithm parameter optimization, particle swarm optimization parameter optimization, etc. This embodiment selects the grid optimization method to construct a support vector regression model.

[0122] Optionally, the color features [V1, V2, V3] and texture features [Glcm] in the training image are extracted and combined, and the combined features of the training image can be obtained as F = [V1, V2, V3, Glcm]. Based on the combined features of the training image and the subjective score, a grid optimization method is selected to perform training in the support vector machine to obtain a pre-trained support vector regression model.

[0123] Specifically, a more mature support vector machine development platform can be selected, such as the MATLAB version of LIBSVM-3.22 as the experimental platform, by calling the radial basis function k(A,A n ) is used to build a support vector regression model:

[0124]

[0125]

[0126] Among them, f(x) represents the predicted score, MOS represents the subjective score of the standard data set, and W n represents the weight parameter, b represents the intercept, n represents the combined features of the nth image, m represents the combined features of a total of m images, and ε represents the selected minimum value. When the error between f(x) and MOS is less than the fixed minimum value ε, the required support vector regression model is obtained.

[0127] The standard data set is selected as the training set, and the image color features and texture features are combined to improve the prediction accuracy of the support vector regression model, which has a good practical application effect.

[0128] Figure 3 The schematic diagram of the principle of an imaging device testing method provided by an embodiment of the present invention is as follows. Figure 3 As shown, the RGB image output by the imager is obtained, and the RGB image is converted into an HSV image, the brightness, hue and saturation of the HSV image are extracted, the color features of the image are constructed based on the brightness, hue and saturation, the texture features of the image are extracted using the gray level co-occurrence matrix, and the color features and texture features are combined to obtain the combined features representing an image.

[0129] A standard data set with a standard score for each image is used as a training set. After extracting the combined features of the images, the combined features are trained in a support vector machine to obtain the required support vector regression model.

[0130] The images output by the imager are combined with features and input into the prediction model for prediction to obtain the quality score of the image.

[0131] Optionally, combining the color feature and the texture feature to obtain a combined feature of the image includes:

[0132] Determine the weight of the color feature and the weight of the texture feature; perform weighted combination on the color feature and the texture feature to obtain the combined feature of the image.

[0133] Optionally, color features and texture features may be assigned corresponding weights according to their proportions in the image feature information. Color features and texture features may be weighted combined according to their corresponding weights to obtain a combined feature that can represent the image.

[0134] Specifically, if the weight ratio of the color feature of the image is 0.4 and the weight of the texture feature is 0.6, the combined feature of the image is F = [0.4V1, 0.4V2, 0.4V3, 0.6Glcm].

[0135] By weighted combination of color features and texture features and assigning different weights according to their different weights, better evaluation results can be achieved.

[0136] Optionally, the image captured by the imager is at least one image; and determining the evaluation result of the imager according to the combined features of the image and a pre-trained support vector regression model includes:

[0137] For each image, inputting the combined features of the image into a pre-trained support vector regression model to obtain a quality score of the image;

[0138] An evaluation result of the imager is determined according to the quality score of the at least one image.

[0139] The image quality score may be a value between 1 and 100. The lower the score, the better the image quality. The evaluation results of the imager may be divided according to the image quality score. When the score is 0-35, it indicates that the image quality taken by the imager is excellent, and the imager's evaluation result is excellent. When the score is 35-80, it indicates that the image quality taken by the imager is medium, and the imager's evaluation result is medium. When the score is 80-100, it indicates that the image quality taken by the imager is poor, and the imager's evaluation result is poor. The image quality score may be divided in other ways, which are not specifically limited here.

[0140] Optionally, the image output by the imager is used as the image to be predicted. The imager can obtain multiple images of the user, and perform feature combination on the obtained images and transmit them to the support vector regression model. The support vector regression model performs feature combination prediction on the transmitted images to obtain the image quality score, and judges the image quality taken by the imager based on the quality scores of the multiple images. For example, when the quality scores of the output 5 images are 20, 35, 23, 12, and 45 respectively, the scores of the quality of the multiple images can be said to indicate that the image quality taken by the imager is excellent, and the evaluation result of the imager is excellent.

[0141] By predicting the image output by the imager through the support vector regression model, the quality score of the image can be obtained, thereby obtaining the evaluation result of the imager. The operation is simple, cost-saving, and it is easy to obtain the quality score of the image taken by the imager.

[0142] Optionally, inputting the combined features of the image into a pre-trained support vector regression model to obtain a quality score of the image includes:

[0143] The combined features of the image are input into a pre-trained support vector regression model, and the support vector regression model is run multiple times to obtain an intermediate value of the output result as the quality score of the image.

[0144] Optionally, the image output by the imager is feature combined and input into a trained support vector regression model, which is run multiple times and the middle value in the final result is selected as the prediction score.

[0145] Specifically, the combined features of the image are input into the support vector regression model, the entire model is run 1000 times, and the result of the 500th time is selected as the final prediction score.

[0146] Objective Score=SVR_model{F} (9)

[0147] Among them, Objectiv eScor represents the objective quality score of a predicted image, SVR_model{F} represents the intermediate score value of the predicted image after multiple runs of the support vector regression model, and the score value is the objective quality score of the predicted image.

[0148] By cycling the model multiple times and selecting the middle value as the image quality prediction score of the image, the instability of the prediction can be eliminated and the prediction result of the image quality score can be improved.

[0149] Optionally, the image captured by the imager includes a face image and an ID image; the support vector regression model includes a first support vector regression model for detecting the face image and a second support vector regression model for detecting the ID image;

[0150] For each image, the combined features of the image are input into a pre-trained support vector regression model to obtain a quality score of the image, including:

[0151] For each image, determining whether the image is a face image or an ID image;

[0152] If it is a face image, inputting the image into a first support vector regression model to obtain a quality score of the face image;

[0153] If it is a document image, inputting the image into a second support vector regression model to obtain a quality score of the document image;

[0154] Accordingly, determining the evaluation result of the imager according to the quality score of the at least one image includes:

[0155] The quality score of the face image captured by the imager and the quality score of the document image are weightedly summed to obtain the evaluation result of the imager.

[0156] The imager can take images of faces and documents respectively. Different support vector regression models can be trained according to the different contents of face images and document images. Among them, the first support vector regression model is used to detect face images, and the second support vector regression model is used to detect document images. When the imager transmits the acquired image to the support vector regression model, it can be selected to determine whether the image content is a face image or a document image. If it is a face image, it is transmitted to the first support vector regression model for prediction to obtain the quality score of the face image. If it is a document image, it is transmitted to the second support vector regression model to obtain the quality score of the document image.

[0157] When the quality scores of the face image and the document image are obtained, certain weights can be assigned to the quality scores of the two images, and the final quality score is obtained by summing up the weights to obtain the evaluation result of the imager.

[0158] Specifically, if the quality score of the face image is 45, the quality score of the ID image is 30, and the weights of the two image quality scores are 0.5 and 0.5 respectively, and the quality score obtained by the weighted sum of the two image quality scores is 37.5, then the image quality taken by the imager is medium, and the evaluation result of the imager is medium.

[0159] Optionally, predictions may be made based on multiple face images or ID images to obtain multiple quality scores for evaluating the imager. Prediction may also be made based on face images and ID images to obtain image quality scores for weighted summation to evaluate the imager.

[0160] By training the support vector regression model for face images and ID images respectively, it is more targeted, and the weighted sum of the face image quality score and the ID image quality score is performed to determine the evaluation result of the imager, which can achieve better evaluation effect.

[0161] Optionally, the method further includes:

[0162] Determine whether the evaluation result of the imager meets the preset requirements; if not, generate a prompt message, wherein the prompt message is used to prompt bank personnel to adjust the imager; and / or control the imager to adjust at least one of the following: height, orientation, focal length, aperture size, magnification, image processing algorithm.

[0163] The preset condition may be that the evaluation result of the imager is excellent or medium. When the imager does not meet the preset condition, it indicates that the evaluation result of the imager is poor.

[0164] Optionally, when the evaluation result of the imager is poor, it means that the imager cannot meet the preset requirements and has low efficiency in user face recognition and ID card recognition. A prompt message will be generated to prompt bank staff and other personnel to make corresponding adjustments to the imager, including height, orientation, focal length, aperture size, magnification, and image processing algorithm.

[0165] Optionally, when the evaluation result fails to meet the requirements, corresponding prompt information such as "there is a problem with the imager" can be output to the bank staff, who will then adjust or repair it to reduce the occurrence of bank transaction failures.

[0166] Furthermore, more targeted prompts can be generated based on specific issues. When the image brightness is judged to be low based on the calculated image quality score, a corresponding prompt message "the image brightness is low" will be displayed on the page, and the staff can adjust the brightness of the imager accordingly.

[0167] Optionally, the imager can also be controlled to automatically adjust. For example, the height and orientation can be automatically adjusted, and after the adjustment, the image is continuously captured and the quality is evaluated through the support vector regression model. If the score meets the requirements, the adjustment is stopped, and if it does not meet the requirements, the adjustment is continued until the requirements are met. The specific image processing algorithm can also be adjusted, such as the parameters of the image filter, so that the final image presents different clarity levels.

[0168] By judging whether the imager meets the preset conditions, the relevant staff is notified to adjust the parameters and algorithms of the imager accordingly, thereby improving the working efficiency of the imager and facilitating user use.

[0169] Figure 4 The structure diagram of an imaging device testing device provided by an embodiment of the present invention is shown in FIG. Figure 4 As shown, the imager testing device provided in this embodiment may include:

[0170] The acquisition module 401 is used to acquire an image captured by an imager; wherein the imager is an imager installed in a bank and used for visual verification of user transactions;

[0171] An obtaining module 402 is used to extract color features and texture features of the image, and combine the color features and texture features to obtain combined features of the image;

[0172] The determination module 403 is used to determine the evaluation result of the imager according to the combined features of the image and the pre-trained support vector regression model.

[0173] Optionally, the captured image is an RGB image, and the obtaining module 402 is specifically used to:

[0174] Convert the RGB image into an HSV image;

[0175] According to the HSV image, construct a brightness matrix, a hue matrix and a saturation matrix;

[0176] The brightness matrix, the hue matrix and the saturation matrix are respectively averaged to obtain a brightness mean, a hue mean and a saturation mean;

[0177] A one-dimensional vector representing color characteristics is generated according to the lightness mean, hue mean, and saturation mean.

[0178] Optionally, when extracting the texture features of the image, the obtaining module 402 is specifically used to:

[0179] Convert the RGB image into a grayscale image, and extract the brightness information of each pixel in the grayscale image;

[0180] compressing the brightness information of the grayscale image, and setting multiple directions and multiple step sizes for calculating the grayscale co-occurrence matrix;

[0181] For each direction, the following steps are performed: according to the brightness information of each pixel in the grayscale image, the grayscale co-occurrence matrix corresponding to each step length in the direction is calculated and normalized, wherein the normalization operation includes calculating energy, entropy, contrast, and inverse moment; and calculating the mean and variance of the normalized data;

[0182] The means and variances corresponding to each direction are combined to obtain the corresponding gray-level co-occurrence matrix as the texture feature of the image.

[0183] Optionally, the determining module 403 is further configured to:

[0184] Acquire a training data set, wherein the training data set includes a plurality of training samples, each training sample includes a training image and a corresponding subjective score;

[0185] Extracting color features and texture features of the training images in the training data set, and obtaining combined features based on the color features and texture features;

[0186] The initial support vector model is trained according to the combined features and subjective scores corresponding to the training data set to obtain the pre-trained support vector regression model.

[0187] Optionally, when the obtaining module 402 combines the color feature and the texture feature to obtain the combined feature of the image, it is specifically used to:

[0188] Determining a weight of the color feature and a weight of the texture feature;

[0189] The color features and texture features are weightedly combined to obtain the combined features of the image.

[0190] Optionally, the image captured by the imaging device is at least one image, and the determining module 403 is specifically configured to:

[0191] For each image, inputting the combined features of the image into a pre-trained support vector regression model to obtain a quality score of the image;

[0192] An evaluation result of the imager is determined according to the quality score of the at least one image.

[0193] Optionally, when the determination module 403 inputs the combined features of the image into a pre-trained support vector regression model to obtain the quality score of the image, it is specifically used to:

[0194] The combined features of the image are input into a pre-trained support vector regression model, and the support vector regression model is run multiple times to obtain an intermediate value of the output result as the quality score of the image.

[0195] Optionally, the image captured by the imager includes a face image and an ID image; the support vector regression model includes a first support vector regression model for detecting the face image and a second support vector regression model for detecting the ID image;

[0196] The determination module 403, for each image, inputs the combined features of the image into a pre-trained support vector regression model to obtain a quality score of the image, specifically for:

[0197] For each image, determining whether the image is a face image or an ID image;

[0198] If it is a face image, inputting the image into a first support vector regression model to obtain a quality score of the face image;

[0199] If it is a document image, inputting the image into a second support vector regression model to obtain a quality score of the document image;

[0200] Accordingly, when determining the evaluation result of the imager according to the quality score of the at least one image, the determination module 403 is specifically used to:

[0201] The quality score of the face image captured by the imager and the quality score of the document image are weightedly summed to obtain the evaluation result of the imager.

[0202] Optionally, the determining module 403 is further configured to:

[0203] Determining whether the evaluation result of the imager meets the preset requirements;

[0204] If not, a prompt message is generated, the prompt message is used to prompt the bank staff to adjust the imager; and / or control the imager to adjust at least one of the following: height, direction, focal length, aperture size, magnification, image processing algorithm.

[0205] The device provided in this embodiment can perform the following steps: Figure 1-Figure 3The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.

[0206] Figure 5 The structure diagram of an imaging device testing device provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the device provided in this embodiment may include: at least one processor 51 and a memory 52;

[0207] The memory 52 stores computer-executable instructions;

[0208] The at least one processor 51 executes the computer-executable instructions stored in the memory 52, so that the at least one processor 51 executes the method described in any one of the above embodiments.

[0209] The memory 52 and the processor 51 may be connected via a bus 53 .

[0210] The specific implementation principle and effect of the device provided in this embodiment can be found in Figure 1-Figure 3 The relevant descriptions and effects corresponding to the illustrated embodiments are not elaborated in detail here.

[0211] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the imager testing method provided by any embodiment of the present invention.

[0212] An embodiment of the present invention further provides a computer program product, including a computer program. When the computer program is executed by a processor, the imager testing method described in any embodiment of the present invention is implemented.

[0213] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0214] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.

[0215] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit. The above-mentioned module-composed unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0216] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present invention.

[0217] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.

[0218] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.

[0219] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present invention is not limited to only one bus or one type of bus.

[0220] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0221] An exemplary storage medium is coupled to a processor so that the processor can read features from the storage medium and write features to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.

[0222] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0223] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention is indicated by the following claims.

[0224] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A method for testing an imager, characterized in that: include: Acquire an image captured by an imager; wherein the imager is an imager installed in a bank and used for visual verification of a user's business transactions; the image captured by the imager is at least one image; Extracting color features and texture features of the image, and combining the color features and texture features to obtain combined features of the image; For each image, inputting the combined features of the image into a pre-trained support vector regression model to obtain a quality score of the image; Determining an evaluation result of the imager according to the quality score of the at least one image; The step of inputting the combined features of the image into a pre-trained support vector regression model to obtain a quality score of the image includes: Inputting the combined features of the image into a pre-trained support vector regression model, running the support vector regression model multiple times, and obtaining an intermediate value of the output result as the quality score of the image; The images captured by the imager include face images and document images; the support vector regression model includes a first support vector regression model for detecting face images and a second support vector regression model for detecting document images; For each image, inputting the combined features of the image into a pre-trained support vector regression model to obtain a quality score of the image includes: For each image, determining whether the image is a face image or an ID image; If it is a face image, inputting the image into a first support vector regression model to obtain a quality score of the face image; If it is a document image, inputting the image into a second support vector regression model to obtain a quality score of the document image; Accordingly, determining the evaluation result of the imager according to the quality score of the at least one image includes: The quality score of the face image captured by the imager and the quality score of the document image are weightedly summed to obtain the evaluation result of the imager.

2. The method according to claim 1, characterized in that The captured image is an RGB image; extracting color features of the image includes: Convert the RGB image into an HSV image; According to the HSV image, construct a brightness matrix, a hue matrix and a saturation matrix; The brightness matrix, the hue matrix and the saturation matrix are respectively averaged to obtain a brightness mean, a hue mean and a saturation mean; A one-dimensional vector representing color characteristics is generated according to the lightness mean, hue mean, and saturation mean.

3. The method according to claim 2, characterized in that Extracting texture features of the image, including: Convert the RGB image into a grayscale image, and extract the brightness information of each pixel in the grayscale image; compressing the brightness information of the grayscale image, and setting multiple directions and multiple step sizes for calculating the grayscale co-occurrence matrix; For each direction, the following steps are performed: according to the brightness information of each pixel in the grayscale image, the grayscale co-occurrence matrix corresponding to each step length in the direction is calculated and normalized, wherein the normalization operation includes calculating energy, entropy, contrast, and inverse moment; and calculating the mean and variance of the normalized data; The means and variances corresponding to each direction are combined to obtain the corresponding gray-level co-occurrence matrix as the texture feature of the image.

4. The method according to claim 1, characterized in that Also includes: Acquire a training data set, wherein the training data set includes a plurality of training samples, each training sample includes a training image and a corresponding subjective score; Extracting color features and texture features of the training images in the training data set, and obtaining combined features based on the color features and texture features; The initial support vector regression model is trained according to the combined features and subjective scores corresponding to the training data set to obtain the pre-trained support vector regression model.

5. The method according to claim 1, characterized in that The color feature and the texture feature are combined to obtain a combined feature of the image, including: Determining a weight of the color feature and a weight of the texture feature; The color features and texture features are weightedly combined to obtain the combined features of the image.

6. The method according to claim 1, characterized in that Also includes: Determining whether the evaluation result of the imager meets the preset requirements; If not, a prompt message is generated, the prompt message is used to prompt the bank staff to adjust the imager; and / or control the imager to adjust at least one of the following: height, direction, focal length, aperture size, magnification, image processing algorithm.

7. An imaging device testing device, characterized in that: include: An acquisition module, used to acquire an image captured by an imager; wherein the imager is an imager installed in a bank and used for visual verification of a user's business transactions; the image captured by the imager is at least one image; An obtaining module is used to extract color features and texture features of the image, and combine the color features and texture features to obtain combined features of the image; A determination module, used to determine the evaluation result of the imager according to the combined features of the image and a pre-trained support vector regression model; The determination module is specifically used for, for each image, inputting the combined features of the image into a pre-trained support vector regression model to obtain a quality score of the image; determining the evaluation result of the imager according to the quality score of the at least one image; inputting the combined features of the image into a pre-trained support vector regression model, running the support vector regression model multiple times, and obtaining the intermediate value of the output result as the quality score of the image; the images captured by the imager include face images and document images; the support vector regression model includes a first support vector regression model for detecting face images and a second support vector regression model for detecting document images; for each image, determining whether the image is a face image or a document image; if it is a face image, inputting the image into the first support vector regression model to obtain the quality score of the face image; if it is a document image, inputting the image into the second support vector regression model to obtain the quality score of the document image; performing weighted summation on the quality score of the face image captured by the imager and the quality score of the document image to obtain the evaluation result of the imager.

8. An imaging device testing device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the imager testing method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the imaging device testing method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the imager testing method according to any one of claims 1 to 6 is implemented.