WO2020192113A1 - 图像处理方法及装置、电子设备和存储介质 - Google Patents

图像处理方法及装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2020192113A1
WO2020192113A1 PCT/CN2019/114465 CN2019114465W WO2020192113A1 WO 2020192113 A1 WO2020192113 A1 WO 2020192113A1 CN 2019114465 W CN2019114465 W CN 2019114465W WO 2020192113 A1 WO2020192113 A1 WO 2020192113A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
image feature
feature
matrix
weight
Prior art date
Application number
PCT/CN2019/114465
Other languages
English (en)
French (fr)
Inventor
吴佳飞
梁明亮
Original Assignee
上海商汤智能科技有限公司
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 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Priority to JP2020573111A priority Critical patent/JP7098763B2/ja
Priority to KR1020217002882A priority patent/KR102389766B1/ko
Priority to SG11202108147UA priority patent/SG11202108147UA/en
Publication of WO2020192113A1 publication Critical patent/WO2020192113A1/zh
Priority to US17/378,931 priority patent/US20210342632A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/211Selection of the most significant subset of features
    • G06F18/2113Selection of the most significant subset of features by ranking or filtering the set of features, e.g. using a measure of variance or of feature cross-correlation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/251Fusion techniques of input or preprocessed data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/806Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Definitions

  • the present disclosure relates to the field of computer vision, and in particular to an image processing method and device, electronic equipment, and storage medium.
  • Feature fusion is one of the important issues in the field of computer vision and intelligent video surveillance.
  • face feature fusion has important application significance in many fields, such as being applied to face recognition systems.
  • the features of multiple frames of images are directly averaged as the fused features.
  • this method is simple, its performance is poor, especially its robustness to outliers.
  • the embodiments of the present disclosure provide an image processing method and device, electronic equipment, and storage medium.
  • an image processing method including: respectively acquiring image features of multiple images for the same object; and determining a one-to-one correspondence with each of the image features according to the image features of each image Based on the weight coefficient of each image feature, perform feature fusion processing on the image features of the multiple images to obtain the fusion features of the multiple images.
  • the determining a weight coefficient corresponding to each image feature one-to-one according to the image feature of each image includes: forming an image feature matrix based on the image feature of each image; The feature matrix performs feature fitting processing to obtain a first weight matrix; and the weight coefficient corresponding to each image feature is determined based on the first weight matrix.
  • the performing feature fitting processing on the image feature matrix to obtain the first weight matrix includes: performing feature fitting processing on the image feature matrix by using a regularized linear least squares estimation algorithm , And obtain the first weight matrix when the preset objective function is the minimum value.
  • the determining the weight coefficient corresponding to each image feature based on the first weight matrix includes: determining each first weight coefficient included in the first weight matrix as each image feature Corresponding weight coefficient; or, perform first optimization processing on the first weight matrix, and determine each first weight coefficient included in the optimized first weight matrix as the weight coefficient corresponding to each image feature .
  • the performing the first optimization process on the first weight matrix includes: determining the fit of each image based on the first weight coefficient of each image feature included in the first weight matrix Image feature, the fitted image feature is the product of the image feature and the corresponding first weight coefficient; the first error between the image feature of each image and the fitted image feature is used to execute the first weight
  • the first optimization processing of the matrix obtains the first optimized weight matrix; in response to the difference between the first weight matrix and the first optimized weight matrix satisfying the first condition, the first optimized weight matrix is determined as the optimized weight matrix And, in response to the difference between the first weight matrix and the first optimized weight matrix that does not satisfy the first condition, the first optimized weight matrix is used to obtain new fitted image features, based on The new fitted image feature repeatedly executes the first optimization process until the difference between the obtained kth optimized weight matrix and the k-1th optimized weight matrix satisfies the first condition, and the kth The optimized weight matrix is determined as the optimized first weight matrix, where k is a positive integer greater than 1.
  • the using the first error between the image feature of each image and the fitted image feature to perform the first optimization processing of the first weight matrix includes: The sum of the squares of the differences between the corresponding elements in the fitted image feature is obtained to obtain the first error between the image feature and the fitted image feature; the first error of each image feature is obtained based on each of the first errors Two weighting coefficients; the first optimization processing of the first weighting matrix is performed based on the second weighting coefficients of each image to obtain the first optimized weighting matrix corresponding to the first weighting matrix.
  • the obtaining the second weight coefficient of each image feature based on each of the first errors includes: obtaining the second weight coefficient of each image feature based on each of the first errors in a first manner , Where the expression of the first mode is:
  • w i is the second weight coefficient of the i-th image
  • e i represents the first error between the i-th image feature and its corresponding fitted image feature
  • i is an integer between 1 and N
  • N is the image
  • k 1.345 ⁇
  • is the standard deviation of the error e i .
  • the determining the weight coefficients corresponding to each of the image features one-to-one according to the image features of each image further includes: forming an image feature matrix based on the image features of each image; The image feature matrix executes median filtering processing to obtain a median feature matrix; the weight coefficient corresponding to each image feature is determined based on the median feature matrix.
  • the performing median filtering processing on the image feature matrix to obtain the median feature matrix includes: determining the median value of each of the image features in the image feature matrix for elements at the same position; The median feature matrix is obtained based on the median value of the element at each position.
  • the determining the weight coefficient corresponding to each image feature based on the median feature matrix includes: acquiring a second error between each image feature and the median feature matrix; responding to The second error between the image feature and the median feature matrix satisfies the second condition, and the weight coefficient of the image feature is configured as the first weight, in response to the second error between the image feature and the median feature matrix If the error does not meet the second condition, the second method is used to determine the weight coefficient of the image feature.
  • the expression of the second manner is:
  • b h is the weight coefficient of the h-th image determined by the second method
  • e h is the second error between the image feature of the h-th image and the median feature matrix
  • h is an integer value from 1 to N
  • N represents the number of images.
  • the second condition is:
  • MADN median([e 1 ,e 2 ,...e N ])/0.675;
  • e h is the second error between the image feature of the hth image and the median feature matrix
  • h is an integer value from 1 to N
  • N represents the number of images
  • K is the judgment threshold
  • median represents the median filter function .
  • the performing feature fusion processing on the image features of the multiple images based on the weight coefficients of the image features to obtain the fusion features of the multiple images includes: using each image feature And the sum of the products of the corresponding weight coefficients to obtain the fusion feature.
  • the method further includes: performing the recognition operation of the same object by using the fusion feature.
  • the method before the determining the weight coefficient corresponding to each image feature according to the image feature of each image, the method further includes: obtaining the acquisition of the weight coefficient Mode selection information; determine the acquisition mode of the weight coefficient based on the selection information; perform the determination of the weight corresponding to each image feature based on the image feature of each image based on the determined acquisition mode of the weight coefficient Coefficient; the acquisition mode of the weight coefficient includes the use of feature fitting to obtain the weight coefficient and the use of median filtering to obtain the weight coefficient.
  • an image processing device which includes: an acquisition module configured to respectively acquire image features of multiple images for the same object; a determination module configured to obtain image features of each image , Determining the weight coefficients corresponding to each of the image features one-to-one; the fusion module is configured to perform feature fusion processing on the image features of the multiple images based on the weight coefficients of each of the image features to obtain the multiple images Fusion characteristics.
  • the determining module includes: a first establishing unit configured to form an image feature matrix based on the image features of each image; a fitting unit configured to perform feature fitting on the image feature matrix Processing to obtain a first weight matrix; a first determining unit configured to determine the weight coefficient corresponding to each image feature based on the first weight matrix.
  • the fitting unit is further configured to perform feature fitting processing on the image feature matrix by using a regularized linear least squares estimation algorithm, and obtain the result when the preset objective function is the minimum value.
  • the first weight matrix is further configured to perform feature fitting processing on the image feature matrix by using a regularized linear least squares estimation algorithm, and obtain the result when the preset objective function is the minimum value.
  • the determining module further includes an optimization unit configured to perform a first optimization process on the first weight matrix; the first determining unit is further configured to include the first weight matrix Each first weight coefficient of is determined as the weight coefficient corresponding to each image feature; or each first weight coefficient included in the optimized first weight matrix is determined as the weight coefficient corresponding to each image feature.
  • the optimization unit is further configured to determine the fitted image feature of each image based on the first weight coefficient of each image feature included in the first weight matrix; For the first error between the fitted image features, the first optimization process of the first weight matrix is performed to obtain the first optimized weight matrix; in response to the difference between the first weight matrix and the first optimized weight matrix If the difference satisfies the first condition, the first optimized weight matrix is determined to be the optimized first weight matrix; and, in response to the difference between the first weight matrix and the first optimized weight matrix, the first Condition, use the first optimized weight matrix to obtain a new fitted image feature, and repeatedly execute the first optimization process based on the new fitted image feature until the obtained kth optimized weight matrix and the kth- 1
  • the difference between the optimized weight matrices satisfies the first condition, and the k-th optimized weight matrix is determined as the optimized first weight matrix, where k is a positive integer greater than 1; wherein the fitted image feature is The product of the image feature and the corresponding first weight coefficient.
  • the optimization unit is further configured to obtain the image feature and the fitted image feature according to the sum of the squares of differences between each image feature and the corresponding element in the fitted image feature The first error between the first error; the second weight coefficient of each image feature is obtained based on each of the first errors; the first optimization process of the first weight matrix is performed based on the second weight coefficient of each image to obtain the first The first optimized weight matrix corresponding to the weight matrix.
  • the optimization unit is further configured to obtain a second weight coefficient of each image feature based on each of the first errors in a first manner, wherein the expression of the first manner is:
  • w i is the second weight coefficient of the i-th image
  • e i represents the first error between the i-th image feature and its corresponding fitted image feature
  • i is an integer between 1 and N
  • N is the image
  • k 1.345 ⁇
  • is the standard deviation of the error e i .
  • the determining module further includes: a second establishing unit configured to form an image feature matrix based on the image features of each image; a filtering unit configured to perform median filtering on the image feature matrix Processing to obtain a median feature matrix; the second determining unit is configured to determine the weight coefficient corresponding to each image feature based on the median feature matrix.
  • the filtering unit is further configured to determine the median value of elements in the image feature matrix for the same position of each image feature; and obtain the median feature matrix based on the median value of the elements in each position .
  • the second determining unit is further configured to obtain a second error between each image feature and the median feature matrix; in response to the first error between the image feature and the median feature matrix If the two errors meet the second condition, the weight coefficient of the image feature is configured as the first weight; in response to the second error between the image feature and the median feature matrix not meeting the second condition, the second method is used to determine the The weight coefficient of the image feature.
  • the expression of the second manner is:
  • b h is the weight coefficient of the h-th image determined by the second method
  • e h is the second error between the image feature of the h-th image and the median feature matrix
  • h is an integer value from 1 to N
  • N represents the number of images.
  • the second condition is:
  • MADN median([e 1 ,e 2 ,...e N ])/0.675;
  • e h is the second error between the image feature of the hth image and the median feature matrix
  • h is an integer value from 1 to N
  • N represents the number of images
  • K is the judgment threshold
  • median represents the median filter function .
  • the fusion module is further configured to obtain the fusion feature by using the sum value of the product of each image feature and the corresponding weight coefficient.
  • the device further includes a recognition module configured to perform the recognition operation of the same object by using the fusion feature.
  • the device further includes a mode determination module configured to select information about the acquisition mode of the weight coefficient, and determine the acquisition mode of the weight coefficient based on the selection information, and the acquisition of the weight coefficient
  • the mode includes obtaining the weight coefficient by means of feature fitting and obtaining the weight coefficient by means of median filtering.
  • the determining module is further configured to execute the determination of the weight coefficient corresponding to each image feature based on the determined acquisition mode of the weight coefficient.
  • an electronic device including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to execute any of the first aspect The method described in one item.
  • a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the method described in any one of the first aspects is implemented .
  • the embodiments of the present disclosure can fuse different features of the same object, where the weight coefficient corresponding to each image feature can be determined according to the image features of different images of the same object, and the feature fusion of the image features is performed through the weight coefficient. Different weight coefficients can be determined for each image feature. Therefore, the technical solutions of the embodiments of the present disclosure can improve the accuracy of feature fusion.
  • Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure
  • Fig. 2 shows a flow chart of determining a method for obtaining weight coefficients in an image processing method according to an embodiment of the present disclosure
  • Fig. 3 shows a flowchart of step S20 in an image processing method according to an embodiment of the present disclosure
  • Fig. 4 shows a flowchart of performing a first optimization process in an image processing method according to an embodiment of the present disclosure
  • Fig. 5 shows a flowchart of step S232 in an image processing method according to an embodiment of the present disclosure
  • Fig. 6 shows a flowchart of step S20 in an image processing method according to an embodiment of the present disclosure
  • Fig. 7 shows a flowchart of step S203 in an image processing method according to an embodiment of the present disclosure
  • Fig. 8 shows a block diagram of an image processing device according to an embodiment of the present disclosure
  • FIG. 9 shows a block diagram of an electronic device 800 according to an embodiment of the present disclosure.
  • FIG. 10 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure.
  • the embodiments of the present disclosure provide an image processing method that can perform feature fusion processing of multiple images, which can be applied to any electronic device or server.
  • the electronic device may include user equipment (UE, User Equipment) , Mobile devices, cellular phones, cordless phones, personal digital assistants (PDAs, Personal Digital Assistant), handheld devices, computing devices, in-vehicle devices, wearable devices, etc.
  • the server may include a local server or a cloud server.
  • the image generation method can be implemented by a processor calling computer-readable instructions stored in a memory. The foregoing is only an exemplary description of the device, and is not a specific limitation of the present disclosure. In other embodiments, it may also be implemented by other devices capable of performing image processing.
  • Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
  • the image processing method includes:
  • feature fusion processing can be performed on features of different images of the same object.
  • the type of the object may be any type, for example, a person, an animal, a plant, a vehicle, a cartoon character, etc., which are not specifically limited in the embodiment of the present disclosure.
  • Different images of the same object can be different images taken in the same scene, or images taken in different scenes, and the embodiment of the present disclosure does not specifically limit the time for acquiring the image, and the time for acquiring each image can be the same. It can also be different.
  • the embodiment of the present disclosure may first acquire multiple images of the same object described above.
  • the method of acquiring multiple images may include: acquiring multiple images through a camera device, or communicating with other devices, receiving multiple images transmitted by other devices, or reading local or specific network addresses stored
  • the foregoing is only an exemplary description, and in other embodiments, multiple images for the same object may be obtained in other ways.
  • image features in each image can be extracted separately.
  • image features can be extracted by feature extraction algorithms, such as facial feature extraction algorithms, edge feature extraction algorithms, etc., or other feature extraction algorithms can also be used to extract relevant features of the object.
  • the embodiments of the present disclosure may also extract image features in each image through a neural network with a feature extraction function.
  • the image feature can reflect the feature information of the corresponding image, or reflect the feature information of the object in the image.
  • the image feature may be the gray value of each pixel in the image.
  • the acquired image feature may be the facial feature of the object.
  • each image can be processed by a facial feature extraction algorithm to extract facial features in the image.
  • each image may be input to a neural network capable of obtaining facial features in the image, and the facial features of each image can be obtained through the neural network.
  • the neural network can be a neural network that can obtain the image features of the image after the training is completed and then perform object recognition in the image.
  • the final layer of the neural network can be processed by the convolutional layer (the feature obtained before the classification and recognition) result
  • the neural network may be a convolutional neural network.
  • corresponding image features can also be obtained through corresponding feature extraction algorithms or neural networks, which are not specifically limited in the embodiments of the present disclosure.
  • the embodiment of the present disclosure can determine the weight coefficient of each image feature according to the feature parameter in the image feature of each image, and the weight coefficient may be a value between [0, 1] or other values.
  • the embodiment of the present disclosure There is no specific restriction on this. By configuring different weight coefficients for each image feature, the image features with higher accuracy can be highlighted, so that the accuracy of the fused features obtained by the feature fusion processing can be improved.
  • S30 Perform feature fusion processing on the image features of the multiple images based on the weight coefficient of each of the image features to obtain the fusion features of the multiple images.
  • the manner of performing feature fusion processing may include: obtaining the fusion feature by using the sum value of the product of each image feature and the corresponding weight coefficient.
  • the fusion feature of each image feature can be obtained by the following formula:
  • G represents a fused feature generation
  • i is an integer value between 1 and N
  • N represents the number of images
  • b i represents the image feature weight coefficient of the i-th image of X i.
  • the embodiment of the present disclosure can perform multiplication processing on the image feature and the corresponding weight coefficient, and then perform the addition processing on the multiplication results obtained by each multiplication process, that is, the fusion feature of the embodiment of the present disclosure can be obtained.
  • the weight coefficient corresponding to each image feature can be determined according to the feature parameter in the image feature, and the fusion feature of each image can be obtained according to the weight coefficient, instead of simply taking the average value of each image feature to obtain the fusion feature , Improve the accuracy of fusion features, and also has the characteristics of simplicity and convenience.
  • the weight coefficient of each image feature can be determined.
  • the weight coefficients can be obtained by feature fitting, in other possible implementation manners, the weight coefficients can be obtained by median filtering, or in other implementation manners, also The weight coefficients can be obtained through average value or other processing, which is not specifically limited in the embodiment of the present disclosure.
  • a method for obtaining each weight coefficient may be first determined, such as a feature fitting method or a median filtering method.
  • Fig. 2 shows a flow chart of determining a manner of obtaining weight coefficients in an image processing method according to an embodiment of the present disclosure. Before the determining the weight coefficient corresponding to each image feature according to the image feature of each image, the method further includes:
  • the selection information is the mode selection information for performing the operation of obtaining the weight coefficients.
  • the selection information may be the first selection information for obtaining the weight coefficients using the first mode (such as the feature fitting method), or may be the use of The second mode (such as the median filtering method) obtains the second selection information of the weight coefficient.
  • it may also include using other modes to obtain the selection information of the weight coefficient, which is not specifically limited in the embodiment of the present disclosure.
  • the manner of obtaining the selection information may include receiving input information received by the input component, and determining the selection information based on the input information.
  • the input component may include a switch, a keyboard, a mouse, an audio receiving interface, a touch panel, a touch screen, a communication interface, etc.
  • the embodiment of the present disclosure does not specifically limit this, as long as it can receive selection information, it can be implemented as the present disclosure. example.
  • the corresponding mode information can be obtained according to the received selection information. For example, in the case that the selection information includes the first selection information, it can be determined to use the first mode (the way of feature fitting) to perform the acquisition of the weight coefficient; in the case that the selection information includes the second selection information, it can be determined to use the second selection information.
  • the second mode (median filtering method) performs the acquisition of weight coefficients.
  • the method of obtaining the weight coefficient corresponding to the selection information can be determined accordingly.
  • At least one of the accuracy or the amount of calculation and the calculation speed of the acquisition modes of different weight coefficients may be different.
  • the accuracy of the first mode may be higher than the accuracy of the second mode, and the operation speed of the first mode may be lower than the operation speed of the second mode, but this is not a specific limitation of the embodiment of the present disclosure. Therefore, in the embodiments of the present disclosure, the user can select an adaptive mode to perform the acquisition of the weight parameter according to different needs.
  • the acquisition operation of the weight information can be performed according to the determined mode.
  • the selection of the acquisition mode of the weight coefficient can be realized through the above-mentioned method. Under different requirements, different modes can be used to perform the acquisition of the weight coefficient, which has better applicability.
  • Fig. 3 shows a flowchart of step S20 in an image processing method according to an embodiment of the present disclosure, wherein the determining a weight coefficient corresponding to each image feature according to the image feature of each image (step S20) may include :
  • the image characteristics of each image can be expressed in the form of feature vectors.
  • the dimensions of the image features of the images are the same, and they are all D.
  • the image feature matrix X formed according to the image features of each image can be expressed as:
  • the image feature matrix composed of each image feature can be obtained.
  • the elements of each row in the image feature matrix can be regarded as the image feature of an image, and the corresponding image features of each row are different The image characteristics of the image.
  • the elements of each column in the image feature matrix can also be used as the image feature of an image, and the image features corresponding to each column are the image features of different images.
  • the embodiment of the present disclosure does not make specific arrangements for the image feature matrix. limited.
  • the feature fitting process of the image feature matrix can be performed.
  • the embodiment of the present disclosure can use the regularized least-square linear regression algorithm to perform the feature simulation. ⁇ Handle.
  • a preset objective function can be set, and the preset objective function is a function related to weight coefficients.
  • the preset objective function takes the minimum value, the first weight matrix corresponding to each weight coefficient is determined.
  • the dimension of the weight matrix is the same as the number of image features, and the final weight coefficient can be determined according to each element in the first weight matrix.
  • the preset objective function expression can be:
  • X represents the image feature matrix
  • Y represents the observation matrix, which is the same as X
  • X T represents X
  • the transpose matrix of, ⁇ represents the regularization parameter, The L2norm (standard) regularization term that represents the parameter.
  • the generated first weight matrix is a column vector; conversely, if the image feature is a column vector, the generated first weight matrix is a row vector.
  • the dimension of the first weight matrix is the same as the image feature or the number of images.
  • the embodiment of the present disclosure can determine the value of the first weight matrix b when the above-mentioned objective function is the minimum value. At this time, the final first weight matrix can be obtained, and the expression of the first weight matrix can be:
  • the first weight matrix obtained by the feature fitting process can be obtained.
  • the feature fitting process of the image feature matrix can also be performed by other feature fitting methods to obtain the corresponding first weight matrix, or different preset objective functions can also be set to perform feature
  • the fitting process is not specifically limited in the embodiment of the present disclosure.
  • the weight coefficient corresponding to the image feature can be determined according to the obtained first weight matrix.
  • each element included in the first weight matrix may be directly used as a weight coefficient, that is, each first weight coefficient included in the first weight matrix may be determined as a weight coefficient corresponding to each image feature .
  • optimization processing may be performed on the first weight matrix to obtain the optimized first weight matrix, and the elements in the optimized first weight matrix are used as The weight coefficient of each image feature. That is, the first optimization process may be performed on the first weight matrix, and each first weight coefficient included in the optimized first weight matrix may be determined as the weight coefficient corresponding to each image feature.
  • the first optimization processing an abnormal value in the first weight matrix can be detected, and corresponding optimization processing can be performed on the abnormal value to improve the accuracy of the obtained weight matrix.
  • Fig. 4 shows a flowchart of performing a first optimization process in an image processing method according to an embodiment of the present disclosure.
  • performing a first optimization process on the first weight matrix, and determining each first weight coefficient included in the optimized first weight matrix as the weight coefficient corresponding to each image feature may include:
  • S231 Determine a fitted image feature of each image based on the first weight coefficient of each image feature included in the first weight matrix, where the fitted image feature is the product of the image feature and the corresponding first weight coefficient .
  • the fitted image feature of each image feature may be obtained first based on the determined first weight matrix.
  • the first weight coefficient of each image feature included in the first weight matrix can be multiplied with the corresponding image feature to obtain the fitted image feature of the image feature.
  • the first weight may be the weight of the first weight image feature matrix of the i-th image of X i b i multiplied by weight coefficient of the image feature X i, to obtain the image feature fitting X i b i.
  • S232 Use the first error between the image feature of each image and the fitted image feature to perform the first optimization process of the first weight matrix to obtain the first optimized weight matrix.
  • the first error between the image feature and its corresponding fitted image feature can be obtained.
  • the embodiment of the present disclosure can obtain the first error between the image feature and the fitted image feature according to the following formula:
  • e i represents the first error between the i-th image feature and its corresponding fitted image feature
  • i is an integer between 1 and N
  • N is the number of image features
  • j is an integer between 1 and D
  • D denotes the dimension of each image feature
  • X i represents the i-th image feature images
  • b i X i represents the i-fitting feature image corresponding to image feature.
  • the first error between the image feature and the fitted image feature can also be determined in other ways.
  • the average value of the difference between the fitted image feature and the image feature can be directly calculated.
  • the embodiment of the present disclosure does not specifically limit the method for determining the first error.
  • the first error can be used to perform the first optimization process of the first weight matrix to obtain the first optimized weight matrix.
  • the elements in the first optimization weight matrix can also represent the weight coefficients after the first optimization corresponding to each image feature.
  • step S233 Determine whether the difference between the first weight matrix and the first optimized weight matrix satisfies the first condition, if the first condition is met, step S234 is executed, and if the first condition is not met, step S235 is executed.
  • the first optimization processing result (first optimization weight matrix) of the first weight matrix based on the first error After obtaining the first optimization processing result (first optimization weight matrix) of the first weight matrix based on the first error, it can be determined whether the difference between the first optimization weight matrix and the first weight matrix satisfies the first condition, If the difference satisfies the first condition, it indicates that the first optimization weight matrix does not need to be further optimized, and the first optimization weight matrix can be determined as the final optimization weight matrix obtained by the first optimization process. If the difference between the first optimized weight matrix and the first weight matrix does not satisfy the first condition, then it is necessary to continue the optimization process on the first optimized weight matrix.
  • the first condition of the embodiment of the present disclosure may be that the absolute value of the difference between the first optimized weight matrix and the first weight matrix is less than a first threshold, and the first threshold is a preset threshold, which may be less than 1.
  • the value of the first threshold can be set according to requirements, and the embodiment of the present disclosure does not specifically limit this, for example, it can be 0.01.
  • S234 Determine the first optimized weight matrix as the optimized first weight matrix.
  • the first optimized weight matrix is directly determined as the optimization weight matrix obtained by the final first optimization process.
  • S235 Use the first optimized weight matrix to obtain a new fitted image feature, and repeatedly execute the first optimization process based on the new fitted image feature until the obtained kth optimized weight matrix and the kth- 1 The difference between the optimized weight matrices satisfies the first condition, and the k-th optimized weight matrix is determined as the optimized first weight matrix, where k is a positive integer greater than 1.
  • the difference between the first optimized weight matrix and the first weight matrix obtained by the first optimization processing of the image feature may not be the same. Meet the first condition, for example, if the difference is greater than the first threshold, you can continue to use the weight coefficients in the first optimization weight matrix to obtain the fitted image features of each image feature, and then use the image features and the fitted image features
  • the second error between the first optimization process is further performed to obtain the second optimization weight matrix.
  • the second optimization weight matrix can be determined as the final optimization result, that is, the weight matrix after optimization; Second, the difference between the optimized weight matrix and the first optimized weight matrix still does not satisfy the first condition.
  • the difference between the values satisfies the first condition, and at this time, the k-th optimized weight matrix may be determined as the optimized first weight matrix, where k is a positive integer greater than 1.
  • the process of performing the first optimization process and obtaining the optimized first weight matrix according to the first error between the image feature and the fitted image feature can be completed.
  • the expression of the iterative function of the first optimization process may be:
  • t represents the number of iterations (that is, the number of first optimization processing)
  • b (t) represents the first optimization weight matrix obtained from the t-th first optimization processing
  • X represents the image feature matrix
  • Y represents the observation matrix Same as X
  • W (t-1) represents the diagonal matrix of the second weight coefficient w i obtained from the t-1 iteration
  • I is the diagonal matrix
  • represents the regularization parameter. It can be obtained from the foregoing embodiment that the embodiment of the present disclosure may perform optimization processing on the weight matrix by adjusting the second weight coefficient w i every time the first optimization processing is performed.
  • FIG. 5 shows a flowchart of step S232 in an image processing method according to an embodiment of the present disclosure.
  • the using the first error between the image feature of each image and the fitted image feature to execute the first optimization process of the first weight matrix includes:
  • the first error between each image feature and the corresponding fitted image feature can be determined.
  • the determination of the first error can refer to the aforementioned expression (5).
  • the second weight coefficient of the image feature can be determined according to the value of the first error, and the second weight coefficient is used to perform the first optimization process .
  • the second weight coefficient of the corresponding image feature can be determined in the first way, and the expression in the first way can be:
  • w i is the second weight coefficient of the i-th image
  • e i represents the first error between the i-th image feature and its corresponding fitted image feature
  • i is an integer between 1 and N
  • N is the image
  • the number of features, k 1.345 ⁇ , and ⁇ is the e i standard deviation of the error.
  • the k value may be other values.
  • the value, such as 0.6, etc., is not a specific limitation of the embodiment of the present disclosure.
  • the first error can be compared with the error threshold k. If the first error is less than k, the second weight corresponding to the corresponding image feature can be The coefficient is determined to be a first value, such as 1. If the first error is greater than or equal to k, the second weighting coefficient of the image feature can be determined according to the first error. At this time, the second weighting coefficient can be a second value, k Ratio of absolute error
  • S2323 Perform the first optimization process of the first weight matrix based on the second weight coefficients of each image to obtain the first optimized weight matrix.
  • the difference between the first optimized weight matrix and the first weight matrix does not satisfy the first condition, after using the weight coefficients in the first weight matrix to obtain new fitted image features, the The first error between the image feature and the new fitted image feature re-determines the second weight coefficient of each image feature, so that the above function iteration is performed according to the new second weight coefficient to obtain the second optimized weight matrix, and so on, The k-th optimized weight matrix corresponding to the k-th first optimization process can be obtained.
  • the difference between the k-th optimized weight matrix obtained by the kth first optimization process and the k-1th optimized weight matrix obtained by the k-1th first optimization process can further satisfy the first condition
  • the process of obtaining the weight coefficients of image features by feature fitting can be completed, and the weight coefficients obtained by this method have high accuracy and high robustness to abnormal values in the weight coefficients.
  • the embodiments of the present disclosure also provide a method for determining the weight coefficient of each image feature by means of median filtering. Compared with the feature fitting method, this method has a smaller computational cost.
  • FIG. 6 shows a flowchart of step S20 in an image processing method according to an embodiment of the present disclosure, wherein the weight coefficient corresponding to each image feature is determined according to the image feature of each image (step S20), and Can include:
  • S201 Form an image feature matrix based on the image features of each image.
  • the embodiment of the present disclosure can form an image feature matrix according to the image features of each image, and the image features of each image can be represented in the form of feature vectors.
  • the dimensions of the image features of the images are the same, and they are all D.
  • the image feature matrix X formed according to the image features of each image can be expressed as the aforementioned expression (2), namely:
  • an image feature matrix composed of each image feature can be obtained.
  • the elements of each row in the image feature matrix can be used as image features of an image, and the image features corresponding to each row are image features of different images.
  • the elements of each column in the image feature matrix can also be used as the image feature of an image, and the image features corresponding to each column are the image features of different images.
  • the embodiment of the present disclosure does not make specific arrangements for the image feature matrix. limited.
  • median filtering processing may be performed on the obtained image feature matrix to obtain the median feature matrix corresponding to the image feature matrix.
  • the element in the median feature matrix is the median of the image features corresponding to the corresponding elements in the image feature matrix.
  • the embodiment of the present disclosure can determine the median value of each image feature in the image feature matrix for the element at the same location; and obtain the median feature matrix based on the median value of the element at each location.
  • the image feature matrix of the embodiment of the present disclosure is represented by the aforementioned expression (2), namely: Correspondingly, the median value of the image feature for each same position can be obtained.
  • the "position” here refers to the position corresponding to the sequence number of each image feature.
  • the first element in each image feature can be (x 11 , x 21 ,..., x N1 ), or the element position is
  • the j-th element of j can be (x 1j , x 2j ,..., x Nj ), and the elements at the same position can be determined by the above.
  • the median function is a median function, that is, the value of the eigenvalue in [m 1j ,m 2j ,...,m Nj ] in the middle position can be obtained.
  • the median value obtained is the middle position ((N+1)/2 ) Image feature value (element value)
  • the median value obtained is the average of the two middle element values.
  • the median feature matrix corresponding to each image feature in the image feature matrix can be obtained.
  • the median value can be used to obtain the weight coefficient of the image feature.
  • the second error between each image feature and the median feature matrix can be used, and the weight coefficient of each image feature can be determined according to the second error.
  • Fig. 7 shows a flowchart of step S203 in an image processing method according to an embodiment of the present disclosure.
  • the determining the weight coefficient corresponding to each image feature based on the median feature matrix includes:
  • the sum of the absolute value of the difference between the image feature and the corresponding element in the median feature matrix may be used as the second error between the image feature and the median feature matrix.
  • the expression of the second error can be:
  • e h is the second error between the image feature X h of the h image and the median feature matrix
  • M represents the median feature matrix
  • X h represents the image feature of the h image
  • h is between 1 and N Integer value between.
  • the second error between each image feature and the median feature matrix can be obtained, and then the weight coefficient can be determined by the second error.
  • the second condition of the embodiment of the present disclosure may be that the second error is greater than the second threshold, and the second threshold may be a preset value, or it may be determined by the second error between each image feature and the median feature matrix.
  • the expression of the second condition may be:
  • MADN median([e 1 ,e 2 ,...e N ])/0.675 (10)
  • e h is the second error between the image feature of the h-th image and the median feature matrix
  • h is an integer value from 1 to N
  • N is the number of images
  • K is the judgment threshold, which can be achieved
  • the set value for example, can be 0.8, but it is not a limitation of the embodiment of the present disclosure, and median represents a median filter function. That is, the second threshold in the embodiment of the present disclosure may be the product of the ratio of the mean value of the second error corresponding to each image feature to 0.675 and the judgment threshold K, and the judgment threshold may be a positive number less than 1.
  • the second error between the image feature and the median feature matrix satisfies the second condition, for example, the second error is greater than the second threshold. At this time, it indicates that the image feature may be abnormal, and the first The weight is determined as the weight coefficient of the image feature.
  • the first weight value in the embodiment of the present disclosure may be a preset weight coefficient, for example, it may be 0, or in other embodiments, the first weight value may also be set to other values to reduce possible abnormal situations The influence of image features on fusion features.
  • S2034 Use the second method to determine the weight coefficient of the image feature.
  • the second error between the image feature and the median feature matrix when the second error between the image feature and the median feature matrix does not satisfy the second condition, for example, the second error is less than or equal to the second threshold. In this case, it indicates that the image feature is relatively accurate.
  • the weight coefficient of the image feature will be determined based on the second error in a second manner.
  • the expression of the second mode may be:
  • b h is the weight coefficient of the h-th image determined by the second method
  • e h is the second error between the image feature of the h-th image and the median feature matrix
  • h is an integer value from 1 to N
  • N represents the number of images.
  • the weight coefficient b h of the image feature can be obtained through the second method described above.
  • the weight coefficients of each image feature can be obtained by median filtering.
  • the median filtering method to determine the weight coefficients can further reduce the computational overhead, and can effectively reduce the complexity of calculation and processing.
  • the accuracy of the obtained fusion features can also be improved.
  • feature fusion processing can be performed. For example, the sum of the product of each image feature and the corresponding weight coefficient can be used to obtain the fusion feature.
  • the embodiment of the present disclosure may also use the fusion feature to perform a recognition operation of the target object in the image.
  • the fusion feature can be compared with the image of each object stored in the database. If there is a first image with a similarity greater than the similarity threshold, the target object can be determined as the object corresponding to the first image, thereby completing identity recognition , The operation of target recognition.
  • other types of object recognition operations may also be performed, which is not specifically limited in the present disclosure.
  • the embodiment of the present disclosure may first obtain different face images about the object A, for example, N face images may be obtained, where N is an integer greater than 1.
  • N an integer greater than 1.
  • the weight coefficient corresponding to each facial feature can be determined.
  • the weight coefficient may be obtained by means of feature fitting, or the weight coefficient may be obtained by means of median filtering, which may be specifically determined according to the received selection information.
  • the sum of the product between the weight coefficient and the image feature can be used to obtain the fusion feature.
  • the fusion feature can be further used to perform operations such as target detection and target recognition.
  • the embodiments of the present disclosure can fuse different features of the same object.
  • the weight coefficient corresponding to each image feature can be determined according to the image features of different images of the same object, and the image feature can be performed by the weight coefficient.
  • Feature fusion this method can improve the accuracy of feature fusion.
  • the writing order of the steps does not mean a strict execution order but constitutes any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possibility.
  • the inner logic is determined.
  • the present disclosure also provides image processing devices, electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any image processing method provided in the present disclosure.
  • image processing devices electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any image processing method provided in the present disclosure.
  • Fig. 8 shows a block diagram of an image processing apparatus according to an embodiment of the present disclosure.
  • the image processing apparatus of an embodiment of the present disclosure may include:
  • the obtaining module 10 is configured to obtain image features of multiple images of the same object respectively;
  • the determining module 20 is configured to determine the weight coefficient corresponding to each image feature one-to-one according to the image feature of each image;
  • the fusion module 30 is configured to perform feature fusion processing on the image features of the multiple images based on the weight coefficients of each of the image features to obtain the fusion features of the multiple images.
  • the determining module 20 includes:
  • the first establishing unit is configured to form an image feature matrix based on the image features of each image
  • a fitting unit configured to perform feature fitting processing on the image feature matrix to obtain a first weight matrix
  • the first determining unit is configured to determine the weight coefficient corresponding to each image feature based on the first weight matrix.
  • the fitting unit is further configured to perform feature fitting processing on the image feature matrix by using a regularized linear least squares estimation algorithm, and obtain the result when the preset objective function is the minimum value.
  • the first weight matrix is further configured to perform feature fitting processing on the image feature matrix by using a regularized linear least squares estimation algorithm, and obtain the result when the preset objective function is the minimum value.
  • the determining module 20 further includes an optimization unit configured to perform a first optimization process on the first weight matrix
  • the first determining unit is further configured to determine each first weight coefficient included in the first weight matrix as the weight coefficient corresponding to each image feature; or to determine each first weight coefficient included in the optimized first weight matrix A weight coefficient is determined as the weight coefficient corresponding to each image feature.
  • the optimization unit is further configured to determine the fitted image feature of each image based on the first weight coefficient of each image feature included in the first weight matrix; For the first error between the fitted image features, the first optimization process of the first weight matrix is performed to obtain the first optimized weight matrix; in response to the difference between the first weight matrix and the first optimized weight matrix If the difference satisfies the first condition, the first optimization weight matrix is determined to be the optimized first weight matrix, and in response to the difference between the first weight matrix and the first optimization weight matrix does not satisfy the first condition , Using the first optimized weight matrix to obtain a new fitted image feature, and repeatedly execute the first optimization process based on the new fitted image feature until the obtained k-th optimized weight matrix and the k-1 The difference between the optimized weight matrices satisfies the first condition, and the k-th optimized weight matrix is determined as the optimized first weight matrix, where k is a positive integer greater than 1; wherein, the fitted image features are all The product of the image feature and the corresponding first weight coefficient.
  • the optimization unit is further configured to obtain the image feature and the fitted image feature according to the sum of the squares of differences between each image feature and the corresponding element in the fitted image feature The first error between the first error; the second weight coefficient of each image feature is obtained based on each of the first errors; the first optimization process of the first weight matrix is performed based on the second weight coefficient of each image to obtain the first The first optimized weight matrix corresponding to the weight matrix.
  • the optimization unit is further configured to obtain a second weight coefficient of each image feature based on each of the first errors in a first manner, wherein the expression of the first manner is:
  • w i is the second weight coefficient of the i-th image
  • e i represents the first error between the i-th image feature and its corresponding fitted image feature
  • i is an integer between 1 and N
  • N is the image
  • k 1.345 ⁇
  • is the standard deviation of the error e i .
  • the determining module 20 further includes:
  • the second establishing unit is configured to form an image feature matrix based on the image features of each image
  • a filtering unit configured to perform median filtering processing on the image feature matrix to obtain a median feature matrix
  • the second determining unit is configured to determine the weight coefficient corresponding to each image feature based on the median feature matrix.
  • the filtering unit is further configured to determine the median value of elements in the image feature matrix for the same position of each image feature; and obtain the median feature matrix based on the median value of the elements in each position .
  • the second determining unit is further configured to obtain a second error between each image feature and the median feature matrix; in response to the first error between the image feature and the median feature matrix If the two errors meet the second condition, the weight coefficient of the image feature is configured as the first weight, and in response to the second error between the image feature and the median feature matrix that does not meet the second condition, the second method is used to determine the The weight coefficient of the image feature.
  • the expression of the second manner is:
  • b h is the weight coefficient of the h-th image determined by the second method
  • e h is the second error between the image feature of the h-th image and the median feature matrix
  • h is an integer value from 1 to N
  • N represents the number of images.
  • the second condition is:
  • MADN median([e 1 ,e 2 ,...e N ])/0.675;
  • e h is the second error between the image feature of the hth image and the median feature matrix
  • h is an integer value from 1 to N
  • N represents the number of images
  • K is the judgment threshold
  • median represents the median filter function .
  • the fusion module 30 is further configured to obtain the fusion feature by using the sum value of the product of each image feature and the corresponding weight coefficient.
  • the device further includes a recognition module configured to perform the recognition operation of the same object by using the fusion feature.
  • the device further includes a mode determination module configured to select information about the acquisition mode of the weight coefficient, and determine the acquisition mode of the weight coefficient based on the selection information, and the acquisition of the weight coefficient
  • the mode includes obtaining the weight coefficient by means of feature fitting and obtaining the weight coefficient by means of median filtering.
  • the determining module 20 is further configured to execute the determination of the weight coefficient corresponding to each image feature according to the image feature of each image based on the determined acquisition mode of the weight coefficient.
  • the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • brevity, here No longer refer to the description of the above method embodiments.
  • the embodiments of the present disclosure also provide a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above-mentioned method when executed by a processor.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium.
  • An embodiment of the present disclosure also provides an electronic device, including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured as the above method.
  • the electronic device can be provided as a terminal, server or other form of device.
  • FIG. 9 shows a block diagram of an electronic device 800 according to an embodiment of the present disclosure.
  • the electronic device 800 may be a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and other terminals.
  • the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, And the communication component 816.
  • the processing component 802 generally controls the overall operations of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the foregoing method.
  • the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components.
  • the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
  • the memory 804 is configured to store various types of data to support operations in the electronic device 800. Examples of these data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc.
  • the memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM, Static Random Access Memory), electrically erasable programmable read-only memory (EEPROM, Electrically Erasable Programmable Read-Only Memory, Erasable Programmable Read-Only Memory (EPROM, Erasable Programmable Read-Only Memory), Programmable Read-Only Memory (PROM, Programmable Read-Only Memory), Read-Only Memory (ROM, Read Only Memory), magnetic memory, flash memory, magnetic disk or optical disk.
  • SRAM static random access memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • EPROM Erasable Programmable Read-Only Memory
  • PROM Programmable Read-Only Memory
  • the power supply component 806 provides power for various components of the electronic device 800.
  • the power supply component 806 may include a power management system, one or more power supplies, and other components associated with the generation, management, and distribution of power for the electronic device 800.
  • the multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (LCD, Liquid Crystal Display) and a touch panel (TP, Touch Panel). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touch, sliding, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure related to the touch or slide operation.
  • the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 810 is configured to output and/or input audio signals.
  • the audio component 810 includes a microphone (MIC, Microphone), and when the electronic device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive external audio signals.
  • the received audio signal may be further stored in the memory 804 or transmitted via the communication component 816.
  • the audio component 810 further includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module.
  • the peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
  • the sensor component 814 includes one or more sensors for providing the electronic device 800 with various aspects of state evaluation.
  • the sensor component 814 can detect the on/off status of the electronic device 800 and the relative positioning of the components.
  • the component is the display and the keypad of the electronic device 800.
  • the sensor component 814 can also detect the electronic device 800 or the electronic device 800.
  • the position of the component changes, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration/deceleration of the electronic device 800, and the temperature change of the electronic device 800.
  • the sensor component 814 may include a proximity sensor configured to detect the presence of nearby objects when there is no physical contact.
  • the sensor component 814 may also include a light sensor, such as a Complementary Metal-Oxide Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor for use in imaging applications.
  • CMOS Complementary Metal-Oxide Semiconductor
  • CCD Charge Coupled Device
  • the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
  • the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
  • the electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof.
  • the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communication.
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA, Infrared Data Association) technology, ultra-wideband (UWB, Ultra Wide Band) technology, Bluetooth (BT, BlueTooth) technology and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB Ultra Wide Band
  • Bluetooth Bluetooth
  • the electronic device 800 may be used by one or more application specific integrated circuits (ASIC, Application Specific Integrated Circuit), digital signal processor (DSP, Digital Signal Processor), digital signal processing device (DSPD), Programmable logic device (PLD, Programmable Logic Device), field programmable gate array (FPGA, Field-Programmable Gate Array), controller, microcontroller (MCU, Micro Controller Unit), microprocessor (Microprocessor) or other electronic components Implementation, used to perform the above method.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processor
  • DSPD digital signal processing device
  • PLD Programmable logic device
  • FPGA Field-Programmable Gate Array
  • controller microcontroller
  • MCU Micro Controller Unit
  • microprocessor Microprocessor
  • a non-volatile computer-readable storage medium such as a memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to complete the foregoing method.
  • FIG. 10 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure.
  • the electronic device 1900 may be provided as a server.
  • the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932, for storing instructions executable by the processing component 1922, such as application programs.
  • the application program stored in the memory 1932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above-described methods.
  • the electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input output (I/O) interface 1958 .
  • the electronic device 1900 can operate based on an operating system stored in the memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
  • the embodiment of the present disclosure also provides a non-volatile computer-readable storage medium, such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to complete The above method.
  • a non-volatile computer-readable storage medium such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to complete The above method.
  • the embodiments of the present disclosure may be systems, methods and/or computer program products.
  • the computer program product may include a computer-readable storage medium loaded with computer-readable program instructions for enabling a processor to implement various aspects of the embodiments of the present disclosure.
  • the computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM, Random Access Memory), read-only memory (ROM, Read Only Memory), erasable Programmable Read-Only Memory (EPROM, Erasable Programmable Read-Only Memory) or flash memory, Static Random Access Memory (SRAM, Static Random Access Memory), portable compact disk read-only memory (CD-ROM), digital multi-function disk ( DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards on which instructions are stored or raised structures in grooves, and any suitable combination of the above.
  • RAM random access memory
  • ROM read-only memory
  • EPROM Erasable Programmable Read-Only Memory
  • flash memory Static Random Access Memory
  • SRAM Static Random Access Memory
  • CD-ROM compact disk read-only memory
  • DVD digital multi-function disk
  • memory sticks floppy disks
  • mechanical encoding devices such as punch cards on which instructions are stored or raised structures in grooves
  • the computer-readable storage medium used here is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses through fiber optic cables), or through wires Transmission of electrical signals.
  • the computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing/processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • the network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network, and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device .
  • the computer program instructions used to perform the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, status setting data, or in one or more programming languages.
  • Source code or object code written in any combination, the programming language includes object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages.
  • Computer-readable program instructions can be executed entirely on the user's computer, partly on the user's computer, executed as a stand-alone software package, partly on the user's computer and partly executed on a remote computer, or entirely on the remote computer or server carried out.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to access the Internet connection).
  • LAN local area network
  • WAN wide area network
  • an electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by using the status information of the computer-readable program instructions.
  • the computer-readable program instructions are executed to realize various aspects of the present disclosure.
  • These computer-readable program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine such that when these instructions are executed by the processor of the computer or other programmable data processing device , A device that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram is produced. It is also possible to store these computer-readable program instructions in a computer-readable storage medium. These instructions make computers, programmable data processing apparatuses, and/or other devices work in a specific manner, so that the computer-readable medium storing instructions includes An article of manufacture, which includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of an instruction, and the module, program segment, or part of an instruction contains one or more functions for implementing the specified logical function.
  • Executable instructions may also occur in a different order from the order marked in the drawings. For example, two consecutive blocks can actually be executed in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or actions Or it can be realized by a combination of dedicated hardware and computer instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Electric Double-Layer Capacitors Or The Like (AREA)
  • Silver Salt Photography Or Processing Solution Therefor (AREA)

Abstract

一种图像处理方法及装置、电子设备和存储介质,其中,所述方法包括:分别获取针对同一对象的多个图像的图像特征(S10);根据各图像的图像特征,确定与各所述图像特征一一对应的权重系数(S20);基于各所述图像特征的权重系数,对所述多个图像的图像特征执行特征融合处理,得到所述多个图像的融合特征(S30)。上述方法能够提高融合特征的精度。

Description

图像处理方法及装置、电子设备和存储介质
相关申请的交叉引用
本公开基于申请号为201910228716.X,申请日为2019年03月25日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本公开。
技术领域
本公开涉及计算机视觉领域,特别涉及一种图像处理方法及装置、电子设备和存储介质。
背景技术
特征融合是计算机视觉及智能视频监控领域的重要问题之一。例如人脸特征融合在在很多领域有重要应用意义,如可以应用到人脸识别系统等。目前,通常是将多帧图像的特征直接取均值作为融合后的特征,这种方法虽然简单但性能较差,特别是对异常值的鲁棒性很差。
发明内容
本公开实施例提供了一种图像处理方法及装置、电子设备和存储介质。
根据本公开实施例的第一方面,提供了一种图像处理方法,包括:分别获取针对同一对象的多个图像的图像特征;根据各图像的图像特征,确定与各所述图像特征一一对应的权重系数;基于各所述图像特征的权重系数,对所述多个图像的图像特征执行特征融合处理,得到所述多个图像的融合特征。
在一些可能的实施方式中,所述根据各图像的图像特征,确定与各所述图像特征一一对应的权重系数,包括:基于各图像的所述图像特征形成图像特征矩阵;对所述图像特征矩阵执行特征拟合处理,得到第一权重矩阵;基于所述第一权重矩阵确定各图像特征对应的所述权重系数。
在一些可能的实施方式中,所述对所述图像特征矩阵执行特征拟合处理,得到第一权重矩阵,包括:利用正则化线性最小二乘估计算法对所述图像特征矩阵执行特征拟合处理,并在预设目标函数为最小值的情况下得到所述第一权重矩阵。
在一些可能的实施方式中,所述基于所述第一权重矩阵确定各图像特征对应的所述权重系数,包括:将所述第一权重矩阵中包括的各第一权重系数确定为各图像特征对应的所述权重系数;或者,对所述第一权重矩阵执行第一优化处理,并将优化后的第一权重矩阵中包括的各第一权重系数确定为各图像特征对应的所述权重系数。
在一些可能的实施方式中,所述对所述第一权重矩阵执行第一优化处理,包括:基于所述第一权重矩阵中包括的各图像特征的第一权重系数,确定各图像的拟合图像特征,所述拟合图像特征为所述图像特征与相应的第一权重系数的乘积;利用各图像的图像特征和所述拟合图像特征之间的第一误差,执行所述第一权重矩阵的第一优化处理,得到第一优化权重矩阵;响应于所述第一权重矩阵和第一优化权重矩阵之间的差值满足第一条件,将所述第一优化权重矩阵确定为优化后的所述第一权重矩阵,以及,响应于第一权重矩阵和第一优化权重矩阵之间的差值不满足第一条件,利用所述第一优化权重矩阵获得新的拟合图像特征,基于所述新的拟合图像特征重复执行所述第一优化处理,直至得到的第k优化权重矩阵与所述第k-1优化权重矩阵之间的差值满足所述第一条件,将第k优化权重矩阵确定为优化后的第一权重矩阵,其中k为大于1的正整数。
在一些可能的实施方式中,所述利用各图像的图像特征和所述拟合图像特征之间的第一误差,执行所述第一权重矩阵的第一优化处理,包括:根据各图像特征和所述拟合图像特征中相应元素之 间的差值的平方和,得到所述图像特征和所述拟合图像特征之间的第一误差;基于各所述第一误差得到各图像特征的第二权重系数;基于各图像的第二权重系数执行所述第一权重矩阵的第一优化处理,得到所述第一权重矩阵对应的第一优化权重矩阵。
在一些可能的实施方式中,所述基于各所述第一误差得到各图像特征的第二权重系数,包括:通过第一方式,基于各所述第一误差得到各图像特征的第二权重系数,其中所述第一方式的表达式为:
Figure PCTCN2019114465-appb-000001
其中,w i为第i个图像的第二权重系数,e i表示第i个图像特征与其对应的拟合图像特征之间的第一误差,i为1到N之间的整数,N为图像特征的数量,k=1.345σ,σ是误差e i的标准差。
在一些可能的实施方式中,所述根据各图像的图像特征,确定与各所述图像特征一一对应的权重系数,还包括:基于各图像的所述图像特征形成图像特征矩阵;对所述图像特征矩阵执行中值滤波处理,得到中值特征矩阵;基于所述中值特征矩阵确定各图像特征对应的所述权重系数。
在一些可能的实施方式中,所述对所述图像特征矩阵执行中值滤波处理,得到中值特征矩阵,包括:确定所述图像特征矩阵中各所述图像特征针对同一位置的元素中值;基于每个位置的元素中值得到所述中值特征矩阵。
在一些可能的实施方式中,所述基于所述中值特征矩阵确定各图像特征对应的所述权重系数,包括:获取各图像特征与所述中值特征矩阵之间的第二误差;响应于图像特征与中值特征矩阵之间的所述第二误差满足第二条件,将该图像特征的权重系数配置为第一权值,响应于图像特征与中值特征矩阵之间的所述第二误差不满足第二条件,利用第二方式确定该图像特征的权重系数。
在一些可能的实施方式中,所述第二方式的表达式为:
Figure PCTCN2019114465-appb-000002
θ h=1/e h
其中,b h为通过第二方式确定的第h个图像的权重系数,e h为第h个图像的图像特征与中值特征矩阵之间的第二误差,h为1到N的整数值,N表示图像的数量。
在一些可能的实施方式中,所述第二条件为:
e h>K·MADN;
MADN=median([e 1,e 2,...e N])/0.675;
其中,e h为第h个图像的图像特征与中值特征矩阵之间的第二误差,h为1到N的整数值,N表示图像的数量,K为判断阈值,median表示中值滤波函数。
在一些可能的实施方式中,所述基于各所述图像特征的权重系数,对所述多个图像的图像特征执行特征融合处理,得到所述多个图像的融合特征,包括:利用各图像特征与对应的权重系数之间的乘积的加和值,得到所述融合特征。
在一些可能的实施方式中,所述方法还包括:利用所述融合特征执行所述相同对象的识别操作。
在一些可能的实施方式中,在一些可能的实施方式中,所述根据各图像的图像特征,确定与各所述图像特征对应的权重系数之前,所述方法还包括:获取针对权重系数的获取模式的选择信息;基于所述选择信息确定所述权重系数的获取模式;基于确定的所述权重系数的获取模式,执行所述根据各图像的图像特征,确定与各所述图像特征对应的权重系数;所述权重系数的获取模式包括利用特征拟合的方式获取所述权重系数和利用中值滤波的方式获取所述权重系数。
根据本公开实施例的第二方面,提供了一种图像处理装置,其包括:获取模块,配置为分别获取针对同一对象的多个图像的图像特征;确定模块,配置为根据各图像的图像特征,确定与各所述图像特征一一对应的权重系数;融合模块,配置为基于各所述图像特征的权重系数,对所述多个图像的图像特征执行特征融合处理,得到所述多个图像的融合特征。
在一些可能的实施方式中,所述确定模块包括:第一建立单元,配置为基于各图像的所述图像 特征形成图像特征矩阵;拟合单元,配置为对所述图像特征矩阵执行特征拟合处理,得到第一权重矩阵;第一确定单元,配置为基于所述第一权重矩阵确定各图像特征对应的所述权重系数。
在一些可能的实施方式中,所述拟合单元还配置为利用正则化线性最小二乘估计算法对所述图像特征矩阵执行特征拟合处理,并在预设目标函数为最小值的情况下得到所述第一权重矩阵。
在一些可能的实施方式中,所述确定模块还包括优化单元,配置为对所述第一权重矩阵执行第一优化处理;所述第一确定单元还配置为将所述第一权重矩阵中包括的各第一权重系数确定为各图像特征对应的所述权重系数;或者将优化后的第一权重矩阵中包括的各第一权重系数确定为各图像特征对应的所述权重系数。
在一些可能的实施方式中,所述优化单元还配置为基于所述第一权重矩阵中包括的各图像特征的第一权重系数,确定各图像的拟合图像特征;利用各图像的图像特征和所述拟合图像特征之间的第一误差,执行所述第一权重矩阵的第一优化处理,得到第一优化权重矩阵;响应于所述第一权重矩阵和第一优化权重矩阵之间的差值满足第一条件,将所述第一优化权重矩阵确定为优化后的所述第一权重矩阵;以及,响应于第一权重矩阵和第一优化权重矩阵之间的差值不满足第一条件,利用所述第一优化权重矩阵获得新的拟合图像特征,基于所述新的拟合图像特征重复执行所述第一优化处理,直至得到的第k优化权重矩阵与所述第k-1优化权重矩阵之间的差值满足所述第一条件,将第k优化权重矩阵确定为优化后的第一权重矩阵,其中k为大于1的正整数;其中,所述拟合图像特征为所述图像特征与相应的第一权重系数的乘积。
在一些可能的实施方式中,所述优化单元还配置为根据各图像特征和所述拟合图像特征中相应元素之间的差值的平方和,得到所述图像特征和所述拟合图像特征之间的第一误差;基于各所述第一误差得到各图像特征的第二权重系数;基于各图像的第二权重系数执行所述第一权重矩阵的第一优化处理,得到所述第一权重矩阵对应的第一优化权重矩阵。
在一些可能的实施方式中,所述优化单元还用于通过第一方式,基于各所述第一误差得到各图像特征的第二权重系数,其中,所述第一方式的表达式为:
Figure PCTCN2019114465-appb-000003
其中,w i为第i个图像的第二权重系数,e i表示第i个图像特征与其对应的拟合图像特征之间的第一误差,i为1到N之间的整数,N为图像特征的数量,k=1.345σ,σ是误差e i的标准差。
在一些可能的实施方式中,所述确定模块还包括:第二建立单元,配置为基于各图像的所述图像特征形成图像特征矩阵;滤波单元,配置为对所述图像特征矩阵执行中值滤波处理,得到中值特征矩阵;第二确定单元,配置为基于所述中值特征矩阵确定各图像特征对应的所述权重系数。
在一些可能的实施方式中,所述滤波单元还配置为确定所述图像特征矩阵中各所述图像特征针对同一位置的元素中值;基于每个位置的元素中值得到所述中值特征矩阵。
在一些可能的实施方式中,所述第二确定单元还配置为获取各图像特征与所述中值特征矩阵之间的第二误差;响应于图像特征与中值特征矩阵之间的所述第二误差满足第二条件,将该图像特征的权重系数配置为第一权值;响应于图像特征与中值特征矩阵之间的所述第二误差不满足第二条件,利用第二方式确定该图像特征的权重系数。
在一些可能的实施方式中,所述第二方式的表达式为:
Figure PCTCN2019114465-appb-000004
θ h=1/e h
其中,b h为通过第二方式确定的第h个图像的权重系数,e h为第h个图像的图像特征与中值特征矩阵之间的第二误差,h为1到N的整数值,N表示图像的数量。
在一些可能的实施方式中,所述第二条件为:
e h>K·MADN;
MADN=median([e 1,e 2,...e N])/0.675;
其中,e h为第h个图像的图像特征与中值特征矩阵之间的第二误差,h为1到N的整数值,N表示图像的数量,K为判断阈值,median表示中值滤波函数。
在一些可能的实施方式中,所述融合模块还配置为利用各图像特征与对应的权重系数之间的乘积的加和值,得到所述融合特征。
在一些可能的实施方式中,所述装置还包括识别模块,配置为利用所述融合特征执行所述相同对象的识别操作。
在一些可能的实施方式中,所述装置还包括模式确定模块,配置为针对权重系数的获取模式的选择信息,并基于所述选择信息确定所述权重系数的获取模式,所述权重系数的获取模式包括利用特征拟合的方式获取所述权重系数和利用中值滤波的方式获取所述权重系数。
所述确定模块还配置为基于确定的所述权重系数的获取模式,执行所述根据各图像的图像特征,确定与各所述图像特征对应的权重系数。
根据本公开实施例的第三方面,提供了一种电子设备,其包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为:执行第一方面中任意一项所述的方法。
根据本公开实施例的第四方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现第一方面中任意一项所述的方法。
本公开实施例可以对同一对象的不同特征进行融合,其中,可以根据该同一对象的不同图像的图像特征,确定每个图像特征对应的权重系数,通过该权重系数执行图像特征的特征融合,由于可以为每个图像特征确定不同的权重系数,因此,本公开实施例的技术方案能够提高特征融合的精度。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。
根据下面参考附图对示例性实施例的详细说明,本公开实施例的其它特征及方面将变得清楚。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。
图1示出根据本公开实施例的一种图像处理方法的流程图;
图2示出根据本公开实施例的一种图像处理方法中确定获取权重系数的方式的流程图;
图3示出根据本公开实施例的一种图像处理方法中步骤S20的流程图;
图4示出根据本公开实施例的一种图像处理方法中执行第一优化处理的流程图;
图5示出根据本公开实施例的一种图像处理方法中步骤S232的流程图;
图6示出根据本公开实施例的一种图像处理方法中步骤S20的流程图;
图7示出根据本公开实施例的一种图像处理方法中步骤S203的流程图;
图8示出根据本公开实施例的一种图像处理装置的框图;
图9示出根据本公开实施例的一种电子设备800的框图;
图10示出根据本公开实施例的一种电子设备1900的框图。
具体实施方式
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开实施例同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开实施例的主旨。
本公开实施例提供了一种图像处理方法,该方法可以执行多个图像的特征融合处理,其可以应用到任意的电子设备或者服务器中,例如,电子设备可以包括用户设备(UE,User Equipment)、移动设备、蜂窝电话、无绳电话、个人数字处理(PDA,Personal Digital Assistant)、手持设备、计算设备、车载设备、可穿戴设备等。服务器可以包括本地服务器或者云端服务器。在一些可能的实现方式中,该图像生成方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。上述仅为设备的示例性说明,不作为本公开的具体限定,在其他实施例中,也可以通过其他能够执行图像处理的设备实现。
图1示出根据本公开实施例的一种图像处理方法的流程图。所述图像处理方法包括:
S10:获取针对同一对象的多个图像的图像特征。
本公开实施例中,可以对同一对象的不同图像的特征执行特征融合处理。其中,对象的类型可以为任意的类型,例如可以为人、动物、植物、车辆、卡通形象等,本公开实施例对此不作具体限定。针对同一对象的不同图像可以为在相同场景下拍摄的不同图像,也可以为不同场景下拍摄的图像,同时本公开实施例对获取图像的时间也不作具体限定,获取各图像的时间可以相同,也可以不同。
本公开实施例可以首先获取上述同一对象的多个图像。其中,获取多个图像的方式可以包括:通过摄像设备采集多个图像,或者也可以通过与其他设备通信、接收其他设备通信传输的多个图像,或者也可以读取本地或者特定网络地址中存储的多个图像,上述仅为示例性说明,在其他实施例中也可以通过其他方式获得针对相同对象的多个图像。
在获取多个图像之后,可以分别提取各图像中的图像特征。在一些可能的实施方式中,可以通过特征提取算法提取图像特征,特征提取算法例如人脸特征提取算法、边缘特征提取算法等算法,或者也可以通过其他特征提取算法提取对象的相关特征。或者,本公开实施例也可以通过具有特征提取功能的神经网络提取各图像中的图像特征。其中,图像特征可以反映相应的图像的特征信息,或者反映图像中的对象的特征信息。示例性的,图像特征可以为图像中各像素点的灰度值。
本公开实施例中,在图像中包括的对象为人物对象时,获取的图像特征可以为该对象的人脸特征。例如,可以通过面部特征提取算法对各图像进行处理,提取出图像中的人脸特征。或者,也可以将各图像输入至能够获取图像中的人脸特征的神经网络中,通过神经网络得到各图像的人脸特征。其中,该神经网络可以为训练完成后能够获取图像的图像特征进而执行图像中对象识别的神经网络,可以将神经网络最后一层卷积层处理(得到的特征在分类识别之前的特征)的结果作为本公开实施例的图像特征,神经网络可以为卷积神经网络。或者,针对其他类型的对象,也可以通过相应的特征提取算法或者神经网络得到对应的图像特征,本公开实施例对此不作具体限定。
本公开实施例中,图像特征可以为特征向量的形式,例如第i个图像的图像特征(如人脸特征)可以表示成:X i=[x i1,x i2,x i3,...,x iD],其中D表示图像特征的维度,i为1到N之间的整数,N表示图像的数量。
S20:根据各图像的图像特征,确定与各所述图像特征一一对应的权重系数。
本公开实施例可以根据各图像的图像特征中的特征参数,确定各图像特征的权重系数,该权重系数可以为[0,1]之间的数值,或者也可以为其他数值,本公开实施例对此不作具体限定。通过为各图像特征配置不同的权重系数,可以突出精度较高的图像特征,从而可以提高特征融合处理得到的融合特征的精度。
S30:基于各所述图像特征的权重系数,对所述多个图像的图像特征执行特征融合处理,得到所述多个图像的融合特征。
本公开实施例,执行特征融合处理的方式可以包括:利用各图像特征与对应的权重系数之间的乘积的加和值,得到所述融合特征。例如可以通过下式得到各图像特征的融合特征:
Figure PCTCN2019114465-appb-000005
其中,G表示生成的融合特征,i为1到N之间的整数值,N表示图像的数量,b i表示第i个图像的图像特征X i的权重系数。
也就是说,本公开实施例可以将图像特征与相应的权重系数执行相乘处理,而后将各相乘处理得到的相乘结果进行加和处理,即可以得到本公开实施例的融合特征。
通过本公开实施例,可以根据图像特征中的特征参数确定与每个图像特征对应的权重系数,根 据权重系数获得各图像的融合特征,而不是简单直接的取各图像特征的均值,得到融合特征,提高了融合特征的精度,并且同样具有简单方便的特点。
下面结合附图对本公开实施例的各过程进行详细的说明。
本公开实施例中,在获取相同对象的各不同图像的图像特征之后,即可以确定各图像特征的权重系数。在一些可能的实施方式中,可以通过特征拟合的方式得到各权重系数,在另一些可能的实施方式中,可以通过中值滤波的方式得到各权重系数,或者在其他的实施方式中,也可以通过均值或者其他处理的得到各权重系数,本公开实施例对此不作具体限定。
本公开实施例在执行步骤S20获取各权重系数之前,可以首先确定获取各权重系数的方式,如特征拟合的方式或者中值滤波的方式。图2示出根据本公开实施例的一种图像处理方法中确定获取权重系数的方式的流程图。在所述根据各图像的图像特征,确定与各所述图像特征对应的权重系数之前,所述方法还包括:
S41:获取针对权重系数的获取模式的选择信息。
其中,该选择信息为关于执行获取权重系数的操作的模式选择信息,例如选择信息可以为利用第一模式(如特征拟合的方式)获取所述权重系数的第一选择信息,或者可以为利用第二模式(如中值滤波的方式)获取所述权重系数的第二选择信息。或者,也可以包括利用其他模式获取权重系数的选择信息,本公开实施例对此不作具体限定。
其中,获取该选择信息的方式可以包括接收输入组件接收的输入信息,基于该输入信息确定所述选择信息。本公开实施例中,输入组件可以包括开关、键盘、鼠标、音频接收接口、触摸板、触摸屏、通信接口等,本公开实施例对此不作具体限定,只要能够接收选择信息即可以作为本公开实施例。
S42:基于所述选择信息确定所述权重系数的获取模式。
由于选择信息中包括了关于权重信息的获取模式的相关信息,即可以根据接收的选择信息获得相应的模式信息。如在选择信息包括第一选择信息的情况下,可以确定为利用第一模式(特征拟合的方式)执行权重系数的获取;在选择信息包括第二选择信息的情况下,可以确定为利用第二模式(中值滤波的方式)执行权重系数的获取。相应的,在选择信息中包括其他选择信息时,可以相应的确定与选择信息对应的获取权重系数的方式。
在一些可能的实施方式中,不同的权重系数的获取模式的精度或者运算量、运算速度中的至少一种可以不同。例如第一模式的精度可以高于第二模式的精度,第一模式的运算速度可以低于第二模式的运算速度,但不作为本公开实施例的具体限定。因此,本公开实施例中用户可以根据不同的需求选择适应的模式执行权重参数的获取。
S43:基于确定的所述权重系数的获取模式,执行所述根据各图像的图像特征,确定与各所述图像特征对应的权重系数;其中,所述权重系数的获取模式包括利用特征拟合的方式获取所述权重系数和利用中值滤波的方式获取所述权重系数。
在基于选择信息确定了权重系数的获取模式之后,即可以按照确定的模式执行权重信息的获取操作。
本公开实施例中,通过上述方式可以实现权重系数的获取模式的选择,在不同的需求的情况下,可以采用不同的模式执行权重系数的获取,具有更好的适用性。
下面对本公开实施例的获取权重系数的方式进行详细说明。图3示出根据本公开实施例的一种图像处理方法中步骤S20的流程图,其中,所述根据各图像的图像特征,确定与各所述图像特征对应的权重系数(步骤S20)可以包括:
S21:基于各图像的所述图像特征形成图像特征矩阵。
本公开实施例中,各图像的图像特征可以按照特征向量的方式表示,例如第i个图像的图像特征可以表示为X i=[x i1,x i2,x i3,...,x iD],其中D表示图像特征的维度,i为1到N之间的整数,N表示图像的数量。并且,本公开实施例中,各图像的图像特征的维度相同,均为D。
根据每个图像的图像特征形成的图像特征矩阵X可以表示为:
Figure PCTCN2019114465-appb-000006
基于上述表达式(2),即可以得到每个图像特征构成的图像特征矩阵,通过上述方式中,可以将图像特征矩阵中每行的元素作为一个图像的图像特征,各行对应的图像特征为不同图像的图像特征。在其他实施方式中,也可以将图像特征矩阵中每列的元素作为一个图像的图像特征,各列对应的图像特征为不同图像的图像特征,本公开实施例对图像特征矩阵的排列方式不作具体限定。
S22:对所述图像特征矩阵执行特征拟合处理,得到第一权重矩阵。
在获得各图像特征对应的图像特征矩阵之后,即可以执行图像特征矩阵的特征拟合处理,本公开实施例可以利用正则化线性最小二乘估计算法(regularized least-square linear regression)执行该特征拟合处理。例如可以设定预设目标函数,该预设目标函数为与权重系数相关的函数,在该预设目标函数取最小值的情况下,确定由各权重系数对应的第一权重矩阵,该第一权重矩阵的维度与图像特征的数量相同,并且根据第一权重矩阵中的各元素可以确定最终的权重系数。
在一些可能的实施方式中,预设的目标函数的表达式可以为:
Figure PCTCN2019114465-appb-000007
其中,X表示图像特征矩阵,b=[b 1,b 2,...,b N] T表示待估计的第一权重矩阵,Y表示观察矩阵,该观察矩阵与X相同,X T表示X的转置矩阵,λ表示正则化参数,
Figure PCTCN2019114465-appb-000008
表示参数的L2norm(标准)正则化项。
在一些可能的实施方式中,如果图像特征为行向量,则生成的第一权重矩阵则为列向量;相反的,如果图像特征为列向量,则生成的第一权重矩阵则为行向量。并且,第一权重矩阵的维度与图像特征或者图像的数量相同。
本公开实施例可以确定在上述目标函数为最小值的情况下,第一权重矩阵b的取值,此时可以得到最终的第一权重矩阵,该第一权重矩阵的表达式可以为:
b=(X TX+λI) -1X TY             (4)
通过上述实施例,即可以得到特征拟合处理得到的第一权重矩阵。在本公开的其他实施方式中,也可以通过其他特征拟合的方式执行图像特征矩阵的特征拟合处理,得到相应的第一权重矩阵,或者也可以设定不同的预设目标函数,执行特征拟合处理,本公开实施例对此不作具体限定。
S23:基于所述第一权重矩阵确定各图像特征对应的所述权重系数。
在得到第一权重矩阵之后,即可以根据得到的第一权重矩阵确定图像特征对应的权重系数。
其中,在一些可能的实施方式中,可以直接将第一权重矩阵中包括的各元素作为权重系数,即可以将第一权重矩阵中包括的各第一权重系数确定为各图像特征对应的权重系数。在得到的第一权重矩阵为b=[b 1,b 2,...,b N] T的情况下,第i个图像的图像特征X i的权重系数即可以为b i
在本公开的另一些实施方式中,为了进一步提高权重系数的精度,还可以对第一权重矩阵执行优化处理得到优化后的第一权重矩阵,并根据优化后的第一权重矩阵中的元素作为各图像特征的权重系数。即可以对所述第一权重矩阵执行第一优化处理,并将优化后的第一权重矩阵中包括的各第一权重系数确定为每个图像特征对应的所述权重系数。通过该第一优化处理可以检测出第一权重矩阵中的异常值,并可以对该异常值执行相应的优化处理,提高得到的权重矩阵的精度。
图4示出根据本公开实施例的一种图像处理方法中执行第一优化处理的流程图。其中,对所述第一权重矩阵执行第一优化处理,并将优化后的第一权重矩阵中包括的各第一权重系数确定为每个图像特征对应的所述权重系数,可以包括:
S231:基于所述第一权重矩阵中包括的各图像特征的第一权重系数,确定各图像的拟合图像特征,所述拟合图像特征为所述图像特征与相应的第一权重系数的乘积。
本公开实施例中,可以首先基于确定的第一权重矩阵得到各图像特征的拟合图像特征。其中,可以将第一权重矩阵中包括的各图像特征的第一权重系数与相应的图像特征执行相乘处理,得到该图像特征的拟合图像特征。例如,可以将第一权重矩阵中的第i个图像的图像特征X i的第一权重系数b i与该图像特征X i相乘,得到拟合图像特征b iX i
S232:利用各图像的图像特征和所述拟合图像特征之间的第一误差,执行所述第一权重矩阵的第一优化处理,得到第一优化权重矩阵。
在得到拟合图像特征之后,可以得到图像特征和与其对应的拟合图像特征之间的第一误差。本公开实施例可以按照下式得到图像特征和拟合图像特征之间的第一误差:
Figure PCTCN2019114465-appb-000009
其中,e i表示第i个图像特征与其对应的拟合图像特征之间的第一误差,i为1到N之间的整数,N为图像特征的数量,j为1到D之间的整数,D表示各图像特征的维度,X i表示第i个图像的图像特征,b iX i表示第i个图像特征对应的拟合图像特征。
在本公开的其他实施方式中,也可以通过其他方式确定图像特征和拟合图像特征之间的第一误差,例如可以直接将拟合图像特征与图像特征之间各元素的差值的平均值作为第一误差,本公开实施例对第一误差的确定方式不作具体限定。
在得到第一误差之后,即可以利用该第一误差执行第一权重矩阵的第一次优化处理过程,得到第一优化权重矩阵。其中,该第一优化权重矩阵中的元素同样可以表示与各图像特征对应的第一次优化后的权重系数。
S233:判断所述第一权重矩阵和第一优化权重矩阵之间的差值是否满足第一条件,如果满足第一条件则执行步骤S234,如果不满足第一条件则执行步骤S235。
在通过基于第一误差得到第一权重矩阵的第一优化处理结果(第一优化权重矩阵)之后,可以判断该第一优化权重矩阵与第一权重矩阵之间的差值是否满足第一条件,如果该差值满足第一条件,说明该第一优化权重矩阵无需在执行进一步的优化,并且可以将该第一优化权重矩阵确定为最终的第一优化处理得到的优化权重矩阵。如果该第一优化权重矩阵与第一权重矩阵之间的差值不满足第一条件,在则需要对该第一优化权重矩阵继续进行优化处理。
其中,本公开实施例的第一条件可以第一优化权重矩阵与第一权重矩阵之间的差值的绝对值小于第一阈值,该第一阈值为预先设定的阈值,其可以为小于1的数值,本公开实施例中,第一阈值的取值可以根据需求设定,本公开实施例对此不做具体限定,例如可以为0.01。
基于上述实施例,即可以得到第一优化权重矩阵和第一权重矩阵之间的差值是否满足第一条件,并进一步执行相应的后续步骤。
S234:将所述第一优化权重矩阵确定为优化后的第一权重矩阵。
如上述实施例所述,如果判断出该第一优化权重矩阵与第一权重矩阵之间的差值满足第一条件,则说明该第一优化权重矩阵无需再执行进一步的优化处理,此时可以直接将该第一优化权重矩阵确定为最终的第一优化处理得到的优化权重矩阵。
S235:利用所述第一优化权重矩阵获得新的拟合图像特征,基于所述新的拟合图像特征重复执行所述第一优化处理,直至得到的第k优化权重矩阵与所述第k-1优化权重矩阵之间的差值满足所述第一条件,将第k个优化权重矩阵确定为优化后的第一权重矩阵,其中k为大于1的正整数。
在一些可能的实施方式中,基于图像特征和拟合图像特征之间的第一误差,对图像特征的第一优化处理得到的第一优化权重矩阵和第一权重矩阵之间的差值可能不满足第一条件,例如,该差值大于第一阈值的情况,此时可以继续利用第一优化权重矩阵中的权重系数得到各图像特征的拟合图像特征,再利用图像特征和拟合图像特征之间的第一误差进一步执行第二次第一优化处理过程,得到第二优化权重矩阵。
如果该第二优化权重矩阵与第一优化权重矩阵之间的差值满足第一条件,则可以将该第二优化权重矩阵确定为最终的优化结果,即优化处理后的权重矩阵;如果该第二优化权重矩阵与第一优化权重矩阵之间的差值仍然不满足第一条件,可以继续利用第二优化权重矩阵中的权重系数得到各图像特征的拟合图像特征,并利用该图像特征和拟合图像特征之间的第一误差进一步执行第三次第一优化处理过程,得到第三优化权重矩阵,以此类推,直至得到的第k优化权重矩阵与所述第k-1优化权重矩阵之间的差值满足所述第一条件,此时可以将第k优化权重矩阵确定为优化后的所述第一权重矩阵,其中k为大于1的正整数。
通过上述实施例即可以完成根据图像特征和拟合图像特征之间的第一误差,执行第一优化处理并得到优化后的第一权重矩阵的过程。本公开实施例中,第一优化处理的迭代函数的表达式可以为:
b (t)=(X TW (t-1)X+λI) -1X TW (t-1)Y            (6)
其中,t表示迭代次数(即第一优化处理的次数),b (t)表示第t次第一优化处理得到的第一优化权重矩阵,X表示图像特征矩阵,Y表示观察矩阵,该观察矩阵与X相同,W (t-1)表示第t-1次迭代得到的第二权重系数w i的对角阵,I为对角阵,λ表示正则化参数。从上述实施例可以得到,本公开 实施例可以在每次执行第一优化处理时,通过调整第二权重系数w i对权重矩阵进行优化处理。
本公开实施例结合对第一权重矩阵的第一次第一优化处理的过程对第一优化处理进行说明,图5示出根据本公开实施例的一种图像处理方法中步骤S232的流程图。所述利用各图像的图像特征和所述拟合图像特征之间的第一误差,执行所述第一权重矩阵的第一优化处理,包括:
S2321:根据各图像特征和所述拟合图像特征中相应元素之间的差值的平方和,得到所述图像特征和所述拟合图像特征之间的第一误差。
如上述实施例所述,在得到图像特征和对应的拟合图像特征之后,可以确定每个图像特征和相应的拟合图像特征之间的第一误差,第一误差的确定可参照前述表达式(5)。
S2322:基于各所述第一误差得到各图像特征的第二权重系数。
在确定每个图像特征和与其对应的拟合图像特征之间的第一误差之后,可以根据该第一误差的数值确定图像特征的第二权重系数,第二权重系数用于执行第一优化处理。其中可以通过第一方式确定相应的图像特征的第二权重系数,第一方式的表达式可以为:
Figure PCTCN2019114465-appb-000010
其中,w i为第i个图像的第二权重系数,e i表示第i个图像特征与其对应的拟合图像特征之间的第一误差,i为1到N之间的整数,N为图像特征的数量,k=1.345σ,σ是误差的e i标准差。本公开实施例中k可以表示误差阈值,其可以为所有图像特征和拟合图像特征之间的第一误差的标准差的1.348=5倍,在其他实施方式中,该k值可以为其他取值,如可以为0.6等,不作为本公开实施例的具体限定。
在得到各图像特征和拟合图像特征之间的第一误差之后,可以将该第一误差与误差阈值k进行比较,如果第一误差小于k,则可以将相应的图像特征对应的第二权重系数确定为第一数值,如1;如果第一误差大于或者等于k,则可以根据第一误差确定图像特征的第二权重系数,此时第二权重系数可以为第二数值,k与第二误差的绝对值的比值
Figure PCTCN2019114465-appb-000011
S2323:基于各图像的第二权重系数执行所述第一权重矩阵的第一优化处理,得到第一优化权重矩阵。
在得到图像特征的第二权重系数之后,即可以利用该第二权重系数执行第一权重矩阵的第一优化处理,其中,可以利用迭代函数b (t)=(X TW (t-1)X+λI) -1X TW (t-1)Y得到第一优化权重矩阵。
本公开实施例中,如果第一优化权重矩阵与第一权重矩阵之间的差值不满足第一条件,在利用第一权重矩阵中的权重系数得到新的拟合图像特征之后,可以根据该图像特征和新的拟合图像特征之间的第一误差重新确定各图像特征的第二权重系数,从而根据新的第二权重系数执行上述函数迭代,得到第二优化权重矩阵,以此类推,可以得到第k次第一优化处理对应的第k优化权重矩阵。
从而可以进一步在第k次第一优化处理得到的第k优化权重矩阵与第k-1次第一优化处理得到的第k-1优化权重矩阵之间的差值满足第一条件|b (t-1)-b (t)|<ε,其中,ε为第一阈值,则可以将该第k优化权重矩阵b (t)作为优化后的第一权重矩阵。
基于上述实施例,可以完成通过特征拟合的方式得到图像特征的权重系数的过程,通过该方式得到的权重系数的精度较高且对权重系数中的异常值的鲁棒性也较高。
如上述所述,本公开实施例还提供了一种通过中值滤波的方式确定各图像特征的权重系数方法。该方法相对于特征拟合的方式具有更小的运算成本。
图6示出根据本公开实施例的一种图像处理方法中步骤S20的流程图,其中,所述根据各图像的图像特征,确定与各所述图像特征对应的权重系数(步骤S20),还可以包括:
S201:基于各图像的所述图像特征形成图像特征矩阵。
同步骤S21相同,本公开实施例可以根据每个图像的图像特征形成图像特征矩阵,各图像的图像特征可以按照特征向量的方式表示,例如第i个图像的图像特征可以表示为X i=[x i1,x i2,x i3,...,x iD],其中D表示图像特征的维度,i为1到N之间的整数,N表示图像的数量。并且,本公开实施例中,各图像的图像特征的维度相同,均为D。
根据每个图像的图像特征形成的图像特征矩阵X可以如前述表达式(2)表示,即:
Figure PCTCN2019114465-appb-000012
基于上述,即可以得到每个图像特征构成的图像特征矩阵,通过上述方式中,可以将图像特征矩阵中每行的元素作为一个图像的图像特征,各行对应的图像特征为不同图像的图像特征。在其他实施方式中,也可以将图像特征矩阵中每列的元素作为一个图像的图像特征,各列对应的图像特征为不同图像的图像特征,本公开实施例对图像特征矩阵的排列方式不作具体限定。
S202:对所述图像特征矩阵执行中值滤波处理,得到中值特征矩阵。
本公开实施例中,在得到图像特征矩阵之后,可以对得到的图像特征矩阵执行中值滤波处理,得到所述图像特征矩阵对应的中值特征矩阵。其中,中值特征矩阵中的元素为图像特征矩阵中相应元素对应的图像特征的中值。
其中,本公开实施例可以确定所述图像特征矩阵中各所述图像特征针对同一位置的元素中值;基于每个位置的元素中值得到所述中值特征矩阵。
例如,本公开实施例的图像特征矩阵如前述表达式(2)表示,即:
Figure PCTCN2019114465-appb-000013
对应的,可以得到针对每个相同位置的图像特征的中值。这里的“位置”是指各图像特征中特征的顺序号对应的位置,例如,各图像特征中的第一个元素可以为(x 11,x 21,…,x N1),或者,元素位置为j的第j个元素可以为(x 1j,x 2j,…,x Nj),通过上述即可以确定相同位置的元素。本公开实施例的得到的中值特征矩阵的维度可以与图像特征的维度相同,中值特征矩阵可以表示成M=[m 1,m 2,...,m D],其中任意第j个元素可以为m j=median([m 1j,m 2j,...,m Nj]),j为1到D之间的整数值。其中,median函数为中值函数,即可以得到[m 1j,m 2j,...,m Nj]中特征值的大小位于中间位置的值。其中,可以首先对[m 1j,m 2j,...,m Nj]进行从大到小的排序,在N为奇数时,得到的中值即为中间位置(第(N+1)/2)的图像特征值(元素值),在N为偶数时,得到的中值即为最中间的两个元素值的平均值。
基于上述即可以得到图像特征矩阵中各图像特征对应的中值特征矩阵。
S203:基于所述中值特征矩阵确定各图像特征对应的所述权重系数。
在得到图像特征对应的中值特征矩阵之后,可以利用该中值得到图像特征的权重系数。
在一些可能的实施方式中,可以利用每个图像特征和中值特征矩阵之间的第二误差,并根据该第二误差确定每个图像特征的权重系数。
图7示出根据本公开实施例的一种图像处理方法中步骤S203的流程图。其中,所述基于所述中值特征矩阵确定各图像特征对应的所述权重系数,包括:
S2031:获取各图像特征与所述中值特征矩阵之间的第二误差。
本公开实施例,可以将图像特征与中值特征矩阵中对应元素之间的差值的绝对值之和作为图像特征和中值特征矩阵之间的第二误差。第二误差的表达式可以为:
Figure PCTCN2019114465-appb-000014
其中,e h为第h个图像的图像特征X h与中值特征矩阵之间的第二误差,M表示中值特征矩阵,X h表示第h个图像的图像特征,h为1到N之间的整数值。
通过上述实施例,即可以获得每个图像特征与中值特征矩阵之间的第二误差,继而可以通过第二误差确定权重系数。
S2032:判断所述第二误差是否满足第二条件,如果所述第二误差满足第二条件,则执行步骤 S2033;如果所述第二误差不满足第二条件,则执行步骤S2034。
其中,本公开实施例的第二条件可以第二误差大于第二阈值,该第二阈值可以预先设定的数值,或者也可以是通过每个图像特征与中值特征矩阵之间的第二误差确定的,本公开实施例对此不作具体限定。在一些可能的实施方式中,第二条件的表达式可以为:
e h>K·MADN          (9)
MADN=median([e 1,e 2,...e N])/0.675               (10)
其中,e h为第h个图像的图像特征与中值特征矩阵之间的第二误差,h为1到N的整数值,N表示图像的数量,K为判断阈值,该判断阈值可以为实现设定的数值,如可以为0.8,但不作为本公开实施例的限定,median表示中值滤波函数。即,本公开实施例中的第二阈值可以为各图像特征对应的第二误差的均值与0.675的比值与判断阈值K的乘积,该判断阈值可以为小于1的正数。
通过设定的第二条件或者第二阈值即可以判断图像特征和中值特征矩阵之间的第二误差是否满足第二条件,并根据判断结果执行后续的操作。
S2033:将该图像特征的权重系数配置为第一权值。
本公开实施例在图像特征与中值特征矩阵之间的第二误差满足第二条件时,例如该第二误差大于第二阈值,此时说明该图像特征可能为存在异常,则可以将第一权值确定为该图像特征的权重系数。本公开实施例的第一权值可以为预设的权值系数,例如可以为0,或者在其他实施例中,也可以将第一权值设定成其他值,以减小可能存在异常情况的图像特征对融合特征的影响。
S2034:利用第二方式确定该图像特征的权重系数。
本公开实施例在图像特征与中值特征矩阵之间的第二误差不满足第二条件时,例如该第二误差小于或者等于第二阈值的情况,此时说明该图像特征相对准确,则可以将按照第二方式基于所述第二误差确定该图像特征的权重系数。其中,所述第二方式的表达式可以为:
Figure PCTCN2019114465-appb-000015
θ h=1/e h(12)
其中,b h为通过第二方式确定的第h个图像的权重系数,e h为第h个图像的图像特征与中值特征矩阵之间的第二误差,h为1到N的整数值,N表示图像的数量。
在图像特征对应的第二误差小于或者等于第二阈值时,即可以通过上述第二方式得到该图像特征的权重系数b h
基于本公开实施例,可以通过中值滤波的方式得到各图像特征的权重系数,其中,中值滤波确定权重系数的方式可以进一步减少算力开销,可以有效的降低运算和处理的复杂度,同时也能够提高得到的融合特征的精度。
在得到每个图像特征的权重系数之后,即可以执行特征融合处理,例如可以利用每个图像特征与对应的权重系数之间的乘积的加和值,得到所述融合特征。
在本公开一些可能的实施方式中,在得到融合特征之后,本公开实施例还可以利用融合特征执行图像中目标对象的识别操作。例如可以基于融合特征与数据库中存储的各对象的图像进行比较,如果存在相似度大于相似度阈值的第一图像,则可以将该目标对象确定为该第一图像对应的对象,从而完成身份识别、目标识别的操作。在本公开的其他实施例中,也可以执行其他类型的对象的识别操作,本公开对此不作具体限定。
为了更加清楚的说明本公开实施例的过程,下面以人脸图像为例进行举例说明。
本公开实施例可以首先获取关于对象A的不同人脸图像,例如可以获得N张人脸图像,N为大于1的整数。在获得该N张人脸图像之后,可以通过能够提取人脸特征的神经网络提取该N张人脸图像中的人脸特征,形成各图像的人脸特征(图像特征)X i=[x i1,x i2,x i3,...,x iD]。
在得到各人脸图像的人脸特征之后,可以确定各人脸特征对应的权重系数。本公开实施例可以采用特征拟合的方式获取该权重系数,也可以通过中值滤波的方式获得该权重系数,具体可以根据接收的选择信息确定。其中,在采用特征拟合的方式时,可以首先获得各人脸特征对应 的人脸特征矩阵
Figure PCTCN2019114465-appb-000016
对该图像特征进行特征拟合得到第一权重矩阵,该第一权重矩阵可以表示成b=(X TX+λI) -1X TY,而后可以对第一权重矩阵执行第一优化处理,其中,第一优化处理的迭代函数表示为b (t)=(X TW (t-1)X+λI) -1X TW (t-1)Y,获得优化后的第一权重矩阵,基于该优化后的第一权重矩阵中的参数确定各人脸特征的权重系数。
在采用中值滤波的方式获得权重系数时,同样可以获取图像特征矩阵,再通过获取图像特征矩阵中各图像特征对于相同位置的元素的中值,根据获取的中值确定中值特征矩阵M=[m 1,m 2,...,m D],而后根据每个图像特征与该中值特征矩阵之间的第二误差确定图像特征的权重系数。
在得到每个图像特征的权重系数之后,即可以利用权重系数和图像特征之间的乘积的加和值,得到融合特征。同时还可以进一步利用该融合特征执行目标检测、目标识别等操作。上述仅为示例性说明本公开实施例的特征融合过程,不作为本公开实施例的具体限定。
综上所述,本公开实施例可以对相同对象的不同特征进行融合,其中,可以根据相同对象的不同图像的图像特征,确定每个图像特征对应的权重系数,通过该权重系数执行图像特征的特征融合,该方式能够提高特征融合的精度。
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。
此外,本公开还提供了图像处理装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种图像处理方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。
图8示出根据本公开实施例的一种图像处理装置的框图,如图8所示本公开实施例的图像处理装置可以包括:
获取模块10,配置为分别获取针对同一对象的多个图像的图像特征;
确定模块20,配置为根据各图像的图像特征,确定与各所述图像特征一一对应的权重系数;
融合模块30,配置为基于各所述图像特征的权重系数,对所述多个图像的图像特征执行特征融合处理,得到所述多个图像的融合特征。
在一些可能的实施方式中,所述确定模块20包括:
第一建立单元,配置为基于各图像的所述图像特征形成图像特征矩阵;
拟合单元,配置为对所述图像特征矩阵执行特征拟合处理,得到第一权重矩阵;
第一确定单元,配置为基于所述第一权重矩阵确定各图像特征对应的所述权重系数。
在一些可能的实施方式中,所述拟合单元还配置为利用正则化线性最小二乘估计算法对所述图像特征矩阵执行特征拟合处理,并在预设目标函数为最小值的情况下得到所述第一权重矩阵。
在一些可能的实施方式中,所述确定模块20还包括优化单元,配置为对所述第一权重矩阵执行第一优化处理;
所述第一确定单元还配置为将所述第一权重矩阵中包括的各第一权重系数确定为各图像特征对应的所述权重系数;或者将优化后的第一权重矩阵中包括的各第一权重系数确定为各图像特征对应的所述权重系数。
在一些可能的实施方式中,所述优化单元还配置为基于所述第一权重矩阵中包括的各图像特征的第一权重系数,确定各图像的拟合图像特征;利用各图像的图像特征和所述拟合图像特征之间的第一误差,执行所述第一权重矩阵的第一优化处理,得到第一优化权重矩阵;响应于所述第一权重矩阵和第一优化权重矩阵之间的差值满足第一条件,将所述第一优化权重矩阵确定为优化后的所述第一权重矩阵,以及响应于第一权重矩阵和第一优化权重矩阵之间的差值不满足第一条件,利用所述第一优化权重矩阵获得新的拟合图像特征,基于所述新的拟合图像特征重复执行所述第一优化处 理,直至得到的第k优化权重矩阵与所述第k-1优化权重矩阵之间的差值满足所述第一条件,将第k优化权重矩阵确定为优化后的第一权重矩阵,其中k为大于1的正整数;其中,所述拟合图像特征为所述图像特征与相应的第一权重系数的乘积。
在一些可能的实施方式中,所述优化单元还配置为根据各图像特征和所述拟合图像特征中相应元素之间的差值的平方和,得到所述图像特征和所述拟合图像特征之间的第一误差;基于各所述第一误差得到各图像特征的第二权重系数;基于各图像的第二权重系数执行所述第一权重矩阵的第一优化处理,得到所述第一权重矩阵对应的第一优化权重矩阵。
在一些可能的实施方式中,所述优化单元还配置为通过第一方式,基于各所述第一误差得到各图像特征的第二权重系数,其中所述第一方式的表达式为:
Figure PCTCN2019114465-appb-000017
其中,w i为第i个图像的第二权重系数,e i表示第i个图像特征与其对应的拟合图像特征之间的第一误差,i为1到N之间的整数,N为图像特征的数量,k=1.345σ,σ是误差e i的标准差。
在一些可能的实施方式中,所述确定模块20还包括:
第二建立单元,配置为基于各图像的所述图像特征形成图像特征矩阵;
滤波单元,配置为对所述图像特征矩阵执行中值滤波处理,得到中值特征矩阵;
第二确定单元,配置为基于所述中值特征矩阵确定各图像特征对应的所述权重系数。
在一些可能的实施方式中,所述滤波单元还配置为确定所述图像特征矩阵中各所述图像特征针对同一位置的元素中值;基于每个位置的元素中值得到所述中值特征矩阵。
在一些可能的实施方式中,所述第二确定单元还配置为获取各图像特征与所述中值特征矩阵之间的第二误差;响应于图像特征与中值特征矩阵之间的所述第二误差满足第二条件,将该图像特征的权重系数配置为第一权值,响应于图像特征与中值特征矩阵之间的所述第二误差不满足第二条件,利用第二方式确定该图像特征的权重系数。
在一些可能的实施方式中,所述第二方式的表达式为:
Figure PCTCN2019114465-appb-000018
θ h=1/e h
其中,b h为通过第二方式确定的第h个图像的权重系数,e h为第h个图像的图像特征与中值特征矩阵之间的第二误差,h为1到N的整数值,N表示图像的数量。
在一些可能的实施方式中,所述第二条件为:
e h>K·MADN;
MADN=median([e 1,e 2,...e N])/0.675;
其中,e h为第h个图像的图像特征与中值特征矩阵之间的第二误差,h为1到N的整数值,N表示图像的数量,K为判断阈值,median表示中值滤波函数。
在一些可能的实施方式中,所述融合模块30还配置为利用各图像特征与对应的权重系数之间的乘积的加和值,得到所述融合特征。
在一些可能的实施方式中,所述装置还包括识别模块,配置为利用所述融合特征执行所述相同对象的识别操作。
在一些可能的实施方式中,所述装置还包括模式确定模块,配置为针对权重系数的获取模式的选择信息,并基于所述选择信息确定所述权重系数的获取模式,所述权重系数的获取模式包括利用特征拟合的方式获取所述权重系数和利用中值滤波的方式获取所述权重系数。
所述确定模块20还配置为基于确定的所述权重系数的获取模式,执行所述根据各图像的图像特征,确定与各所述图像特征对应的权重系数。
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是非易失性计算机可读存储介质。
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为上述方法。
电子设备可以被提供为终端、服务器或其它形态的设备。
图9示出根据本公开实施例的一种电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。
参照图9,电子设备800可以包括以下一个或多个组件:处理组件802、存储器804、电源组件806、多媒体组件808、音频组件810、输入/输出(I/O)接口812、传感器组件814、以及通信组件816。
处理组件802通常控制电子设备800的整体操作,诸如与显示、电话呼叫、数据通信、相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM,Static Random Access Memory),电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory),可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory),可编程只读存储器(PROM,Programmable Read-Only Memory),只读存储器(ROM,Read Only Memory),磁存储器,快闪存储器,磁盘或光盘。
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD,Liquid Crystal Display)和触摸面板(TP,Touch Panel)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC,Microphone),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘、点击轮、按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如金属氧化物半导体元件(CMOS,Complementary Metal-Oxide Semiconductor)或电荷耦合元件(CCD,Charge Coupled Device)图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如WiFi、2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC,Near Field Communication)模块,以促进短程通信。 例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA,Infrared Data Association)技术,超宽带(UWB,Ultra Wide Band)技术,蓝牙(BT,BlueTooth)技术和其他技术来实现。
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC,Application Specific Integrated Circuit)、数字信号处理器(DSP,Digital Signal Processor)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD,Programmable Logic Device)、现场可编程门阵列(FPGA,Field-Programmable Gate Array)、控制器、微控制器(MCU,Micro Controller Unit)、微处理器(Microprocessor)或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。
图10示出根据本公开实施例的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器。参照图10,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。
在示例性实施例中,本公开实施例还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。
本公开实施例可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开实施例的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以但不限于电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM,Random Access Memory)、只读存储器(ROM,Read Only Memory)、可擦式可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)或闪存、静态随机存取存储器(SRAM,Static Random Access Memory)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。

Claims (32)

  1. 一种图像处理方法,包括:
    分别获取针对同一对象的多个图像的图像特征;
    根据各图像的图像特征,确定与各所述图像特征一一对应的权重系数;
    基于各所述图像特征的权重系数,对所述多个图像的图像特征执行特征融合处理,得到所述多个图像的融合特征。
  2. 根据权利要求1所述的方法,其中,所述根据各图像的图像特征,确定与各所述图像特征一一对应的权重系数,包括:
    基于各图像的所述图像特征形成图像特征矩阵;
    对所述图像特征矩阵执行特征拟合处理,得到第一权重矩阵;
    基于所述第一权重矩阵确定各图像特征对应的所述权重系数。
  3. 根据权利要求2所述的方法,其中,所述对所述图像特征矩阵执行特征拟合处理,得到第一权重矩阵,包括:
    利用正则化线性最小二乘估计算法对所述图像特征矩阵执行特征拟合处理,并在预设目标函数为最小值的情况下得到所述第一权重矩阵。
  4. 根据权利要求2或3所述的方法,其中,所述基于所述第一权重矩阵确定各图像特征对应的所述权重系数,包括:
    将所述第一权重矩阵中包括的各第一权重系数确定为各图像特征对应的所述权重系数;或者,对所述第一权重矩阵执行第一优化处理,并将优化后的第一权重矩阵中包括的各第一权重系数确定为各图像特征对应的所述权重系数。
  5. 根据权利要求4所述的方法,其中,所述对所述第一权重矩阵执行第一优化处理,包括:
    基于所述第一权重矩阵中包括的各图像特征的第一权重系数,确定各图像的拟合图像特征,所述拟合图像特征为所述图像特征与相应的第一权重系数的乘积;
    利用各图像的图像特征和所述拟合图像特征之间的第一误差,执行所述第一权重矩阵的第一优化处理,得到第一优化权重矩阵;
    响应于所述第一权重矩阵和第一优化权重矩阵之间的差值满足第一条件,将所述第一优化权重矩阵确定为优化后的所述第一权重矩阵,以及
    响应于第一权重矩阵和第一优化权重矩阵之间的差值不满足第一条件,利用所述第一优化权重矩阵获得新的拟合图像特征,基于所述新的拟合图像特征重复执行所述第一优化处理,直至得到的第k优化权重矩阵与所述第k-1优化权重矩阵之间的差值满足所述第一条件,将第k优化权重矩阵确定为优化后的第一权重矩阵,其中k为大于1的正整数。
  6. 根据权利要求5所述的方法,其中,所述利用各图像的图像特征和所述拟合图像特征之间的第一误差,执行所述第一权重矩阵的第一优化处理,包括:
    根据各图像特征和所述拟合图像特征中相应元素之间的差值的平方和,得到所述图像特征和所述拟合图像特征之间的第一误差;
    基于各所述第一误差得到各图像特征的第二权重系数;
    基于各图像的第二权重系数执行所述第一权重矩阵的第一优化处理,得到所述第一权重矩阵对应的第一优化权重矩阵。
  7. 根据权利要求6所述的方法,其中,所述基于各所述第一误差得到各图像特征的第二权重系数,包括:
    通过第一方式,基于各所述第一误差得到各图像特征的第二权重系数,其中所述第一方式的表达式为:
    Figure PCTCN2019114465-appb-100001
    其中,w i为第i个图像的第二权重系数,e i表示第i个图像特征与其对应的拟合图像特征之间的第一误差,i为1到N之间的整数,N为图像特征的数量,k=1.345σ,σ是误差e i的标准差。
  8. 根据权利要求1-7中任意一项所述的方法,其中,所述根据各图像的图像特征,确定与各所述图像特征一一对应的权重系数,还包括:
    基于各图像的所述图像特征形成图像特征矩阵;
    对所述图像特征矩阵执行中值滤波处理,得到中值特征矩阵;
    基于所述中值特征矩阵确定各图像特征对应的所述权重系数。
  9. 根据权利要求8所述的方法,其中,所述对所述图像特征矩阵执行中值滤波处理,得到中值特征矩阵,包括:
    确定所述图像特征矩阵中各所述图像特征针对同一位置的元素中值;
    基于每个位置的元素中值得到所述中值特征矩阵。
  10. 根据权利要求8或9所述的方法,其中,所述基于所述中值特征矩阵确定各图像特征对应的所述权重系数,包括:
    获取各图像特征与所述中值特征矩阵之间的第二误差;
    响应于图像特征与中值特征矩阵之间的所述第二误差满足第二条件,将该图像特征的权重系数配置为第一权值,响应于图像特征与中值特征矩阵之间的所述第二误差不满足第二条件,利用第二方式确定该图像特征的权重系数。
  11. 根据权利要求10所述的方法,其中,所述第二方式的表达式为:
    Figure PCTCN2019114465-appb-100002
    θ h=1/e h
    其中,b h为通过第二方式确定的第h个图像的权重系数,e h为第h个图像的图像特征与中值特征矩阵之间的第二误差,h为1到N的整数值,N表示图像的数量。
  12. 根据权利要求10或11所述的方法,其中,所述第二条件为:
    e h>K·MADN;
    MADN=median([e 1,e 2,...e N])/0.675;
    其中,e h为第h个图像的图像特征与中值特征矩阵之间的第二误差,h为1到N的整数值,N表示图像的数量,K为判断阈值,median表示中值滤波函数。
  13. 根据权利要求1-12中任意一项所述的方法,其中,所述基于各所述图像特征的权重系数,对所述多个图像的图像特征执行特征融合处理,得到所述多个图像的融合特征,包括:
    利用各图像特征与对应的权重系数之间的乘积的加和值,得到所述融合特征。
  14. 根据权利要求1-13中任意一项所述的方法,其中,所述方法还包括:
    利用所述融合特征执行所述相同对象的识别操作。
  15. 根据权利要求1-14中任意一项所述的方法,其中,所述根据各图像的图像特征,确定与各所述图像特征对应的权重系数之前,所述方法还包括:
    获取针对权重系数的获取模式的选择信息;
    基于所述选择信息确定所述权重系数的获取模式;
    基于确定的所述权重系数的获取模式,执行所述根据各图像的图像特征,确定与各所述图像特征对应的权重系数;
    所述权重系数的获取模式包括利用特征拟合的方式获取所述权重系数和利用中值滤波的方式获取所述权重系数。
  16. 一种图像处理装置,包括:
    获取模块,配置为分别获取针对同一对象的多个图像的图像特征;
    确定模块,配置为根据各图像的图像特征,确定与各所述图像特征一一对应的权重系数;
    融合模块,配置为基于各所述图像特征的权重系数,对所述多个图像的图像特征执行特征融合处理,得到所述多个图像的融合特征。
  17. 根据权利要求16所述的装置,其中,所述确定模块包括:
    第一建立单元,配置为基于各图像的所述图像特征形成图像特征矩阵;
    拟合单元,配置为对所述图像特征矩阵执行特征拟合处理,得到第一权重矩阵;
    第一确定单元,配置为基于所述第一权重矩阵确定各图像特征对应的所述权重系数。
  18. 根据权利要求17所述的装置,其中,所述拟合单元还配置为利用正则化线性最小二乘估计算法对所述图像特征矩阵执行特征拟合处理,并在预设目标函数为最小值的情况下得到所述第一权重矩阵。
  19. 根据权利要求17或18所述的装置,其中,所述确定模块还包括优化单元,配置为对所述第一权重矩阵执行第一优化处理;
    所述第一确定单元还配置为将所述第一权重矩阵中包括的各第一权重系数确定为各图像特征对应的所述权重系数;或者将优化后的第一权重矩阵中包括的各第一权重系数确定为各图像特征对应的所述权重系数。
  20. 根据权利要求19所述的装置,其中,所述优化单元还配置为基于所述第一权重矩阵中包括的各图像特征的第一权重系数,确定各图像的拟合图像特征;利用各图像的图像特征和所述拟合图像特征之间的第一误差,执行所述第一权重矩阵的第一优化处理,得到第一优化权重矩阵;响应于所述第一权重矩阵和第一优化权重矩阵之间的差值满足第一条件,将所述第一优化权重矩阵确定为优化后的所述第一权重矩阵;以及,响应于第一权重矩阵和第一优化权重矩阵之间的差值不满足第一条件,利用所述第一优化权重矩阵获得新的拟合图像特征,基于所述新的拟合图像特征重复执行所述第一优化处理,直至得到的第k优化权重矩阵与所述第k-1优化权重矩阵之间的差值满足所述第一条件,将第k优化权重矩阵确定为优化后的第一权重矩阵,其中k为大于1的正整数;其中,所述拟合图像特征为所述图像特征与相应的第一权重系数的乘积。
  21. 根据权利要求20所述的装置,其中,所述优化单元还配置为根据各图像特征和所述拟合图像特征中相应元素之间的差值的平方和,得到所述图像特征和所述拟合图像特征之间的第一误差;基于各所述第一误差得到各图像特征的第二权重系数;基于各图像的第二权重系数执行所述第一权重矩阵的第一优化处理,得到所述第一权重矩阵对应的第一优化权重矩阵。
  22. 根据权利要求21所述的装置,其中,所述优化单元还配置为通过第一方式,基于各所述第一误差得到各图像特征的第二权重系数,其中,所述第一方式的表达式为:
    Figure PCTCN2019114465-appb-100003
    其中,w i为第i个图像的第二权重系数,e i表示第i个图像特征与其对应的拟合图像特征之间的第一误差,i为1到N之间的整数,N为图像特征的数量,k=1.345σ,σ是误差e i的标准差。
  23. 根据权利要求16-22中任意一项所述的装置,其中,所述确定模块还包括:
    第二建立单元,配置为基于各图像的所述图像特征形成图像特征矩阵;
    滤波单元,配置为对所述图像特征矩阵执行中值滤波处理,得到中值特征矩阵;
    第二确定单元,配置为基于所述中值特征矩阵确定各图像特征对应的所述权重系数。
  24. 根据权利要求23所述的装置,其中,所述滤波单元还配置为确定所述图像特征矩阵中各所述图像特征针对同一位置的元素中值;基于每个位置的元素中值得到所述中值特征矩阵。
  25. 根据权利要求23或24所述的装置,其中,所述第二确定单元还配置为获取各图像特征与所述中值特征矩阵之间的第二误差;响应于图像特征与中值特征矩阵之间的所述第二误差满足第二条件,将该图像特征的权重系数配置为第一权值,响应于图像特征与中值特征矩阵之间的所述第二误差不满足第二条件,利用第二方式确定该图像特征的权重系数。
  26. 根据权利要求25所述的装置,其中,所述第二方式的表达式为:
    Figure PCTCN2019114465-appb-100004
    θ h=1/e h
    其中,b h为通过第二方式确定的第h个图像的权重系数,e h为第h个图像的图像特征与中值特征矩阵之间的第二误差,h为1到N的整数值,N表示图像的数量。
  27. 根据权利要求25或26所述的装置,所述第二条件为:
    e h>K·MADN;
    MADN=median([e 1,e 2,...e N])/0.675;
    其中,e h为第h个图像的图像特征与中值特征矩阵之间的第二误差,h为1到N的整数值,N表示图像的数量,K为判断阈值,median表示中值滤波函数。
  28. 根据权利要求16-27中任意一项所述的装置,其中,所述融合模块还配置为利用各图像特征与对应的权重系数之间的乘积的加和值,得到所述融合特征。
  29. 根据权利要求16-28中任意一项所述的装置,其中,所述装置还包括识别模块,配置为利用所述融合特征执行所述相同对象的识别操作。
  30. 根据权利要求16-29中任意一项所述的装置,其中,所述装置还包括模式确定模块,配置为针对权重系数的获取模式的选择信息,并基于所述选择信息确定所述权重系数的获取模式,所述权重系数的获取模式包括利用特征拟合的方式获取所述权重系数和利用中值滤波的方式获取所述权重系数;
    所述确定模块还配置为基于确定的所述权重系数的获取模式,执行所述根据各图像的图像特征,确定与各所述图像特征对应的权重系数。
  31. 一种电子设备,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为:执行权利要求1至15中任意一项所述的方法。
  32. 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求1至15中任意一项所述的方法。
PCT/CN2019/114465 2019-03-25 2019-10-30 图像处理方法及装置、电子设备和存储介质 WO2020192113A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2020573111A JP7098763B2 (ja) 2019-03-25 2019-10-30 画像処理方法及び装置、電子機器、並びに記憶媒体
KR1020217002882A KR102389766B1 (ko) 2019-03-25 2019-10-30 이미지 처리 방법 및 장치, 전자 기기 및 저장 매체
SG11202108147UA SG11202108147UA (en) 2019-03-25 2019-10-30 Image processing method and apparatus, electronic device, and storage medium
US17/378,931 US20210342632A1 (en) 2019-03-25 2021-07-19 Image processing method and apparatus, electronic device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910228716.XA CN109977860B (zh) 2019-03-25 2019-03-25 图像处理方法及装置、电子设备和存储介质
CN201910228716.X 2019-03-25

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/378,931 Continuation US20210342632A1 (en) 2019-03-25 2021-07-19 Image processing method and apparatus, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
WO2020192113A1 true WO2020192113A1 (zh) 2020-10-01

Family

ID=67080466

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/114465 WO2020192113A1 (zh) 2019-03-25 2019-10-30 图像处理方法及装置、电子设备和存储介质

Country Status (7)

Country Link
US (1) US20210342632A1 (zh)
JP (1) JP7098763B2 (zh)
KR (1) KR102389766B1 (zh)
CN (3) CN113486830A (zh)
SG (1) SG11202108147UA (zh)
TW (1) TWI778313B (zh)
WO (1) WO2020192113A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112289306A (zh) * 2020-11-18 2021-01-29 上海依图网络科技有限公司 一种基于人体特征的未成年人识别的方法及装置

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113486830A (zh) * 2019-03-25 2021-10-08 上海商汤智能科技有限公司 图像处理方法及装置、电子设备和存储介质
TWI796072B (zh) * 2021-12-30 2023-03-11 關貿網路股份有限公司 身分辨識系統、方法及其電腦可讀媒體
CN114627431B (zh) * 2022-02-22 2023-07-21 安徽新识智能科技有限公司 一种基于物联网的环境智能监控方法及系统
CN115334239B (zh) * 2022-08-10 2023-12-15 青岛海信移动通信技术有限公司 前后摄像头拍照融合的方法、终端设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259774A (zh) * 2018-01-31 2018-07-06 珠海市杰理科技股份有限公司 图像合成方法、系统和设备
US20180204094A1 (en) * 2015-11-26 2018-07-19 Tencent Technology (Shenzhen) Company Limited Image recognition method and apparatus
CN108460365A (zh) * 2018-03-27 2018-08-28 百度在线网络技术(北京)有限公司 身份认证方法和装置
CN109472211A (zh) * 2018-10-16 2019-03-15 深圳爱莫科技有限公司 人脸识别方法及装置
CN109977860A (zh) * 2019-03-25 2019-07-05 上海商汤智能科技有限公司 图像处理方法及装置、电子设备和存储介质

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100745981B1 (ko) * 2006-01-13 2007-08-06 삼성전자주식회사 보상적 특징에 기반한 확장형 얼굴 인식 방법 및 장치
KR20120066462A (ko) * 2010-12-14 2012-06-22 한국전자통신연구원 얼굴 인식 방법 및 시스템, 얼굴 인식을 위한 학습용 특징 벡터 추출 장치 및 테스트용 특징 벡터 추출 장치
CN108022252A (zh) * 2012-01-19 2018-05-11 索尼公司 图像处理设备和方法
US9053558B2 (en) * 2013-07-26 2015-06-09 Rui Shen Method and system for fusing multiple images
CN103679144B (zh) * 2013-12-05 2017-01-11 东南大学 一种基于计算机视觉的复杂环境下果蔬识别方法
JP6679373B2 (ja) 2016-03-28 2020-04-15 パナソニックi−PROセンシングソリューションズ株式会社 顔検出装置、顔検出方法及び顔認識システム
TWI731920B (zh) * 2017-01-19 2021-07-01 香港商斑馬智行網絡(香港)有限公司 圖像特徵提取方法、裝置、終端設備及系統
JP2018120527A (ja) 2017-01-27 2018-08-02 株式会社リコー 画像処理装置、画像処理方法及び画像処理システム
CN107085833B (zh) * 2017-04-13 2019-07-16 长安大学 基于梯度倒数自适应开关均中值融合的遥感图像滤波方法
CN108304789A (zh) * 2017-12-12 2018-07-20 北京深醒科技有限公司 脸部识别方法及装置
CN108052942B (zh) * 2017-12-28 2021-07-06 南京理工大学 一种飞机飞行姿态的视觉图像识别方法
CN108563767B (zh) * 2018-04-19 2020-11-27 深圳市商汤科技有限公司 图像检索方法及装置
CN109165551B (zh) * 2018-07-13 2021-08-31 广东工业大学 一种自适应加权融合显著性结构张量和lbp特征的表情识别方法
CN109389587B (zh) * 2018-09-26 2021-07-16 上海联影智能医疗科技有限公司 一种医学图像分析系统、装置及存储介质
CN109492560A (zh) * 2018-10-26 2019-03-19 深圳力维智联技术有限公司 基于时间尺度的人脸图像特征融合方法、装置和存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180204094A1 (en) * 2015-11-26 2018-07-19 Tencent Technology (Shenzhen) Company Limited Image recognition method and apparatus
CN108259774A (zh) * 2018-01-31 2018-07-06 珠海市杰理科技股份有限公司 图像合成方法、系统和设备
CN108460365A (zh) * 2018-03-27 2018-08-28 百度在线网络技术(北京)有限公司 身份认证方法和装置
CN109472211A (zh) * 2018-10-16 2019-03-15 深圳爱莫科技有限公司 人脸识别方法及装置
CN109977860A (zh) * 2019-03-25 2019-07-05 上海商汤智能科技有限公司 图像处理方法及装置、电子设备和存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112289306A (zh) * 2020-11-18 2021-01-29 上海依图网络科技有限公司 一种基于人体特征的未成年人识别的方法及装置
CN112289306B (zh) * 2020-11-18 2024-03-26 上海依图网络科技有限公司 一种基于人体特征的未成年人识别的方法及装置

Also Published As

Publication number Publication date
TWI778313B (zh) 2022-09-21
KR102389766B1 (ko) 2022-04-22
JP2021530047A (ja) 2021-11-04
CN109977860A (zh) 2019-07-05
CN113537048A (zh) 2021-10-22
JP7098763B2 (ja) 2022-07-11
CN109977860B (zh) 2021-07-16
TW202036476A (zh) 2020-10-01
US20210342632A1 (en) 2021-11-04
KR20210024631A (ko) 2021-03-05
SG11202108147UA (en) 2021-08-30
CN113486830A (zh) 2021-10-08

Similar Documents

Publication Publication Date Title
WO2021196401A1 (zh) 图像重建方法及装置、电子设备和存储介质
WO2021056808A1 (zh) 图像处理方法及装置、电子设备和存储介质
WO2021164469A1 (zh) 目标对象的检测方法、装置、设备和存储介质
CN107491541B (zh) 文本分类方法及装置
WO2020192113A1 (zh) 图像处理方法及装置、电子设备和存储介质
WO2021008023A1 (zh) 图像处理方法及装置、电子设备和存储介质
CN110390394B (zh) 批归一化数据的处理方法及装置、电子设备和存储介质
WO2021031609A1 (zh) 活体检测方法及装置、电子设备和存储介质
TWI782480B (zh) 圖像處理方法及電子設備和電腦可讀儲存介質
WO2021012564A1 (zh) 视频处理方法及装置、电子设备和存储介质
WO2021035812A1 (zh) 一种图像处理方法及装置、电子设备和存储介质
CN110909815B (zh) 神经网络训练、图像处理方法、装置及电子设备
CN109214428B (zh) 图像分割方法、装置、计算机设备及计算机存储介质
WO2021036382A1 (zh) 图像处理方法及装置、电子设备和存储介质
CN110532956B (zh) 图像处理方法及装置、电子设备和存储介质
CN109635920B (zh) 神经网络优化方法及装置、电子设备和存储介质
CN110659690B (zh) 神经网络的构建方法及装置、电子设备和存储介质
TWI735112B (zh) 圖像生成方法、電子設備和儲存介質
WO2020147414A1 (zh) 网络优化方法及装置、图像处理方法及装置、存储介质
TWI719777B (zh) 圖像重建方法、圖像重建裝置、電子設備和電腦可讀儲存媒體
CN111259967A (zh) 图像分类及神经网络训练方法、装置、设备及存储介质
TW202141352A (zh) 字元識別方法及電子設備和電腦可讀儲存介質
CN111242303A (zh) 网络训练方法及装置、图像处理方法及装置
CN111582383A (zh) 属性识别方法及装置、电子设备和存储介质
CN111062407B (zh) 图像处理方法及装置、电子设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19920730

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020573111

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20217002882

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04.02.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19920730

Country of ref document: EP

Kind code of ref document: A1