CN114491126A - Image library updating method, system, electronic equipment and storage medium - Google Patents

Image library updating method, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN114491126A
CN114491126A CN202111679776.7A CN202111679776A CN114491126A CN 114491126 A CN114491126 A CN 114491126A CN 202111679776 A CN202111679776 A CN 202111679776A CN 114491126 A CN114491126 A CN 114491126A
Authority
CN
China
Prior art keywords
image
snapshot
library
similarity
image library
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111679776.7A
Other languages
Chinese (zh)
Inventor
姚正斌
汝聪翀
沈寓实
吴昊
刘利锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fenomen Array Beijing Technology Co ltd
Original Assignee
Fenomen Array Beijing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fenomen Array Beijing Technology Co ltd filed Critical Fenomen Array Beijing Technology Co ltd
Priority to CN202111679776.7A priority Critical patent/CN114491126A/en
Publication of CN114491126A publication Critical patent/CN114491126A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Landscapes

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

Abstract

The invention provides an image library updating method, an image library updating system, electronic equipment and a storage medium, and relates to the technical field of image processing. The method comprises the following steps: analyzing the snapshot image which is taken in real time to obtain the characteristics of the snapshot image; according to the characteristics of the snapshot image, whether a first image with the similarity of the characteristics of the snapshot image in a preset range exists in a first image library or not is inquired; determining the object identification in the first image under the condition that the first image is inquired; reading a second image corresponding to the object identification from a second image library; comparing image parameters of the snap-shot image with image parameters of the second image; and updating the second image library according to the comparison result. The method aims to automatically update the images in the dynamic image library and simultaneously improve the image comparison performance and the identification precision.

Description

Image library updating method, system, electronic equipment and storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image library updating method, system, electronic device, and storage medium.
Background
At present, in the existing face image recognition roll call system, a typical image (such as an identification card photo) of a roll call object is stored in a static image library of the system. If necessary, the captured typical pictures can be stored into the comparison image library periodically and then possibly manually. When roll calling is carried out, the snap-shot image is compared with the static image library and the images in the comparison image library, and finally, the image comparison result is directly returned, so that the purpose of roll calling through face recognition is achieved.
In the existing scheme, the images in the image library are compared mainly by manual static addition, and the addition mode is complicated. Meanwhile, the problems of adding errors, low quality of the contrast images and the like possibly exist in the manual addition of the contrast images in the contrast image library, and the performance and the identification precision of image comparison during image identification roll calling are directly influenced.
Disclosure of Invention
In view of the above, the present invention provides an image library updating method, system, electronic device and storage medium, which are used to automatically update images in a dynamic image library and improve the performance of image comparison and recognition accuracy. In order to achieve the purpose, the technical scheme of the invention is realized as follows:
an image library update method, the method comprising:
analyzing the snapshot image which is taken in real time to obtain the characteristics of the snapshot image;
according to the characteristics of the snapshot image, whether a first image with the similarity of the characteristics of the snapshot image in a preset range exists in a first image library or not is inquired;
in the case of querying the first image, determining an object identifier in the first image;
reading a second image corresponding to the object identification from a second image library;
comparing image parameters of the snap-shot image with image parameters of the second image;
and updating the second image library according to the comparison result.
Further, the updating the second image library according to the comparison result includes:
under the condition that the comparison result represents that the image parameters of the snapshot image are different from the image parameters of the second image, marking the snapshot image with the object identification;
and adding the snapshot image carrying the object identification to the second image library.
Further, the updating the second image library according to the comparison result includes:
comparing the quality of the snapshot image with the quality of the second image under the condition that the comparison result represents that the image parameters of the snapshot image are the same as the image parameters of the second image;
under the condition that the image quality of the snapshot image is higher than that of the second image, marking the snapshot image with the object identification;
and deleting the second image from the second image library, and adding the snapshot image carrying the object identifier to the second image library.
Further, the querying, according to the feature of the snapshot image, whether a first image whose similarity with the feature of the snapshot image is in a preset range exists in a first image library includes:
respectively carrying out similarity comparison on the characteristics of all images in a first image library and the characteristics of the snapshot images;
determining whether a first image with the similarity higher than a preset low threshold value exists in the first image library according to the similarity comparison result; or
And determining whether a first image with the similarity higher than a preset low threshold value and lower than a preset high threshold value exists in the first image library according to the similarity comparison result.
Further, the similarity comparison between the features of the images in the first image library and the features of the captured images includes:
obtaining a representation vector of the characteristic of each image in a first image library, and obtaining a representation vector of the characteristic of the snapshot image;
and calculating the distance between the expression vector of the characteristic of each image in the first image library and the expression vector of the characteristic of the snapshot image.
Further, the image parameters are image angle information and are obtained by calculating the Euler angles of the human faces in the snapshot images.
Compared with the prior art, the image library updating method has the following advantages:
the matching first image is found by comparing the snap-shot image taken in real time with the images in the static image library (i.e. the first image library) to determine the user corresponding to the snap-shot image, i.e. the user corresponding to the first image. Since the snap-shot image is firstly matched with the image in the static image library before the dynamic image library is updated by the snap-shot image, the snap-shot image can be more accurately added to the dynamic image library, namely, the user to which the snap-shot image belongs can be accurately marked, and then the snap-shot image is added to the dynamic image library, so that the condition that the snap-shot image is marked as other users which do not correspond to the snap-shot image during manual addition and wrong addition is caused is avoided.
After the user corresponding to the snapshot image is determined, when the image parameters of the snapshot image are different from those of the two images, the snapshot image is automatically added to a dynamic image library (namely, a second image library), and the usability of updating the image library is improved through automatic addition.
Since the captured image added to the dynamic image library is a captured image corresponding to the image parameter not present in the dynamic image library. Therefore, the images in the dynamic image library enrich image samples during image comparison, and when the image comparison is performed, the captured images are compared with the images in the static image library and the images with different image parameters in the dynamic image library, so that the image comparison performance and the identification precision can be effectively improved.
Another objective of the present invention is to provide an image comparison method, which is to automatically update images in a dynamic image library, and improve the performance of image comparison and the recognition accuracy.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a method of image alignment, the method comprising:
analyzing the snapshot image which is taken in real time to obtain the characteristics of the snapshot image;
according to the characteristics of the snapshot image, whether a third image with the similarity of the characteristics of the snapshot image in a first preset range exists in a first image library or not is inquired;
determining a target object identification in the third image under the condition that the third image is inquired;
reading a fourth image corresponding to the target object identification from a second image library;
determining the similarity between the snapshot image and the fourth image;
under the condition that the similarity between the snapshot image and the fourth image is in a second preset range, marking the snapshot image with an object identifier in the fourth image;
the second image library is an image library which is dynamically updated according to the image library updating method provided by the first aspect of the application.
Another objective of the present invention is to provide an image library updating system, which is aimed at automatically updating images in a dynamic image library, and simultaneously improving the performance of image comparison and the recognition accuracy.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
an image library update system, the system comprising:
the image acquisition module is used for capturing images in real time and sending the captured images in real time to the main control module;
the main control module is used for sending the snapshot image which is snapshot in real time to the image analysis module;
the image analysis module is used for analyzing the snapshot image which is snapshot in real time to obtain the characteristics of the snapshot image;
the master control module is used for sending the characteristics of the snap-shot images and the characteristics of each image in the first image library to the comparison module;
the comparison module is used for inquiring whether a first image with the similarity of the characteristics of the snapshot image in a preset range exists in a first image library or not according to the characteristics of the snapshot image; and is used for determining the object identification in the first image under the condition of inquiring the first image;
the main control module is used for reading a second image corresponding to the object identifier from a second image library and sending the second image to the comparison module;
the comparison module is used for comparing the image parameters of the snapshot image with the image parameters of the second image and sending the comparison result to the main control module;
and the main control module is used for updating the second image library according to the comparison result.
The image library updating system and the image library updating method have the same advantages compared with the prior art, and are not described herein again.
Another objective of the present invention is to provide an electronic device, which is aimed at automatically updating images in a dynamic image library, and simultaneously improving the performance of image comparison and the recognition accuracy.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
an electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, which when executed implements the steps of the image library update method as described above.
The advantages of the electronic device and the image library updating method are the same as those of the image library updating method in the prior art, and are not described herein again.
Another objective of the present invention is to provide a computer-readable storage medium, which is used for automatically updating images in a dynamic image library, and simultaneously, improving the performance of image comparison and the recognition accuracy.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the image library updating method as described above.
The advantages of the computer-readable storage medium and the image library updating method are the same as those of the image library updating method in comparison with the prior art, and are not described herein again.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow chart illustrating an image library updating method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating an image library updating method according to an embodiment of the present application;
fig. 3 is a system structural diagram of an image library updating system according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a flowchart illustrating an image library updating method according to an embodiment of the present application. Referring to fig. 1, the image library updating method provided by the present application includes the following steps:
s11: and analyzing the snapshot image which is taken in real time to obtain the characteristics of the snapshot image.
In this embodiment, a user is snapshotted in real time by a video capture device. And extracting the feature vectors of the captured images through a pre-trained deep learning algorithm. Therefore, the feature vector of the snapshot image is obtained by analyzing the snapshot image of the user which is snapshot in real time. The feature vector of the snapshot image is a 512-dimensional array generated by the pre-trained deep learning algorithm.
S12: and inquiring whether a first image with the similarity of the characteristics of the snapshot image in a preset range exists in a first image library or not according to the characteristics of the snapshot image.
In this embodiment, the first image library is a static image library of pre-recorded typical images (such as identification card photos) of each user, and is a basic image library that does not change, and each image in the first image library has a corresponding object identifier, that is, each image in the first image library is subjected to object marking when being pre-recorded. After the feature vectors of the captured image are obtained through analysis in step S11, the similarity between the feature vectors of the captured image and the feature vectors of the respective images in the first image library is calculated through a preset algorithm, and the user to which the captured image belongs is determined according to the similarity. When a first image with the similarity of the features of the snapshot image in a preset range exists in the first image library, it is determined that the object identifier corresponding to the snapshot image is the same as the object identifier of the first image, that is, it is determined that the snapshot image belongs to the user corresponding to the first image.
In the present application, step S12 specifically includes: respectively carrying out similarity comparison on the characteristics of all images in a first image library and the characteristics of the snapshot images; determining whether a first image with the similarity higher than a preset low threshold value exists in the first image library according to the similarity comparison result; or according to the similarity comparison result, determining whether a first image with the similarity higher than a preset low threshold value and lower than a preset high threshold value exists in the first image library.
In this embodiment, in an implementation manner, the preset range only sets the lower threshold. If the first image with the similarity higher than the preset low threshold value with the snapshot image exists in the first image library, it is determined that the object identifier corresponding to the snapshot image is the same as the object identifier of the first image, that is, it is determined that the snapshot image belongs to the user corresponding to the first image.
In this embodiment, in another implementation, the preset range sets the lower threshold and the upper threshold at the same time. If the similarity between the first image library and the snapshot image is higher than the preset low threshold value and lower than the preset high threshold value, it is determined that the object identifier corresponding to the snapshot image is the same as the object identifier of the first image, that is, it is determined that the snapshot image belongs to the user corresponding to the first image.
Specifically, the lower limit THR _ LOW of the preset range is used for judging whether the snap-shot image and the image in the first image library correspond to the same user; the preset upper range limit THR _ HIGH is used for filtering out the snap-shot image with HIGH similarity so as to avoid the excessive update of the second image library of the snap-shot image. Calculating the similarity between the feature vector of the snapshot image and the feature vector of each image in the first image library through a preset algorithm, and after the similarity between the snapshot image and each image in the first image library is obtained through calculation, determining whether the similarity CORR is in a preset range THR _ LOW < CORR < THR _ HIGH. And under the condition that the similarity CORR of one image exists in the first image library and is in the preset range, determining the image in the first image library corresponding to the similarity as the first image.
Illustratively, one image corresponding to each of the users a1, a2, A3, … …, An is previously entered in the first image library. Among them, the user a1 has previously entered the image a1, the user a2 has previously entered the image a2, the user A3 has previously entered the images A3, … …, and the user An has previously entered the image An. Wherein, a1, a2, a31, a3, … … and an are respectively the object identifications of the images a1, a2, a3, … … and an. And calculating the similarity between the snapshot image and the images a1, a2, a3, … … and an respectively, and when the similarity between the snapshot image and the image a1 is within a preset range, the image a1 is the first image.
Optionally, the feature vectors corresponding to the images in the first image library may be calculated when the feature vectors are pre-recorded and stored in the first image library together with the corresponding images; or the similarity between the snapshot image and each image in the first image library is calculated in real time. For the first embodiment, that is, the feature vectors of the images are calculated when the images are pre-recorded, the feature vectors of the images can be directly called each time a new snap-shot image needs to be respectively similar to the images in the first image library. And when a new snapshot image needs to be respectively calculated with the similarity of each image in the first image library, the feature vectors of each image in the first image library are not required to be calculated in real time. Therefore, of the above two embodiments, the first embodiment of calculating the feature vectors of the respective images upon pre-recording is preferable to increase the speed of updating the entire second image library.
Preferably, the preset range is THR _ LOW ═ 0.6 and THR _ HIGH ═ 0.8.
S13: in the case of querying the first image, determining an object identifier in the first image;
in this embodiment, after querying the first image, determining an object identifier carried by the first image, and reading data in the second image library through the object identifier is required. That is, after the user to which the snapshot image belongs is queried, all images belonging to the user need to be read in the second image library through the object identifier.
S14: and reading a second image corresponding to the object identification from a second image library.
In this embodiment, according to the object identifier, all the second images corresponding to the object identifier are read in the second image library. I.e. reading a second image from a second image library belonging to the same user as the captured image.
S15: comparing image parameters of the snap-shot image with image parameters of the second image;
s16: and updating the second image library according to the comparison result.
In this embodiment, in order to increase the number of different snap-shot images of the same user and improve the recognition accuracy and the comparison performance of subsequent snap-shot images, a dynamic image library that can be automatically updated, that is, a second image library, is set. The number of different snap-shot images of the same user is increased by adding snap-shot images which do not exist in the first image library to the second image library. Therefore, in the specific application process of the first image library and the second image library, namely in the process of identifying the snapshot image of the user, the snapshot image can be compared with the images in the first image library and the second image library simultaneously, so that the identification precision and the comparison performance are improved.
Since different snapshot images of the user are updated in the second image library, after the object identifier corresponding to the snapshot image is determined in the above steps and the second image corresponding to the object identifier in the second image library is read, it is also necessary to compare and determine whether the image parameters of the second image are the same as the image parameters of the snapshot image. And updating the second image library according to the comparison result.
In the present application, step S16 specifically includes: under the condition that the comparison result represents that the image parameters of the snapshot image are different from the image parameters of the second image, marking the snapshot image with the object identification; and adding the snapshot image carrying the object identification to the second image library.
In this embodiment, by comparing the image parameter of the second image with the image parameter of the captured image, if the two are different, it is described that there is no image in the moving image library that belongs to the same user as the captured image and has the same image parameter as the captured image. At the moment, the snapshot image is marked by the inquired object identification of the first image, and the marked snapshot image is added to the second image library.
In the present application, step S16 specifically includes: comparing the quality of the snapshot image with the quality of the second image under the condition that the comparison result represents that the image parameters of the snapshot image are the same as the image parameters of the second image; under the condition that the image quality of the snap-shot image is higher than that of the second image, marking the snap-shot image with the object identification; and deleting the second image from the second image library, and adding the snapshot image carrying the object identifier to the second image library.
In the embodiment, in the application process of the snapshot image recognition, the recognition accuracy and the comparison performance are further improved. When a second image which has the same image parameter with the snapshot image and belongs to the same user exists in the second image library, the image quality of the snapshot image and the image quality of the second image can be determined, and the image with higher image quality is stored in the second image library, so that the identification precision and the comparison performance can be further improved in the application process of subsequent snapshot image identification.
It should be understood that the first image library in the present application is a static image library of pre-entered typical images (such as identification card photos) of each user, and is a basic image library that does not change. Thus, the image quality contrast is only for the second image library. Comparing the image parameters of the second image with the image parameters of the snapshot image, and if the image parameters of the second image are the same as the image parameters of the snapshot image, indicating that a second image which is the same as the snapshot image and is the same as the user exists in the dynamic image library. And comparing the second image with the snapshot image, wherein the second image has the same image parameters as the snapshot image. And under the condition that the image quality of the snapshot image is higher than that of a second image with the same image parameters as those of the snapshot image, deleting the second image with the same image parameters as those of the snapshot image in a second image library, marking the snapshot image by the inquired object identifier of the first image, and adding the marked snapshot image to the second image library.
In the present embodiment, the image quality of each image is solved by a preset algorithm.
In this embodiment, when a user enters a plurality of typical images in the first image library in advance, or when a user with a similar long phase exists in the first image library, there may be a case where the similarity between the captured image and each of the plurality of images in the first image library is within a preset range. And because the images of the captured image and the user to which the captured image actually belongs in the first image library are more similar, the similarity is higher, at this time, one image with the maximum similarity to the captured image is used as the first image, that is, the user corresponding to the image with the maximum similarity is determined as the user to which the captured image belongs, the image is determined as the first image corresponding to the captured image, and the object identifier of the first image is determined as the target object identifier. Or when the similarity between the snapshot image and the plurality of images in the first image library is within a preset range, the user to which the snapshot image belongs is determined in a manual offline confirmation mode, and then the object identification is marked.
In this embodiment, the image quality of the images in the second image library can be analytically obtained when the quality comparison is to be performed; or may be obtained by pre-parsing before all images are added to the second image library and stored with the images in the second image library. For the second embodiment, the image quality of the second image can be directly called each time a new snap shot image needs to be compared with the quality of the second image in the second image library, wherein the quality of the second image is the same as the image parameter of the snap shot image. And the image quality of the second image is not required to be calculated in real time when a new snap shot image needs to be compared with the second image with the same image parameters as the snap shot image in the second image library in quality each time. Therefore, of the above two embodiments, the second embodiment is preferable to increase the speed of updating the entire second image library.
In the application, the image parameter is image angle information and is obtained by calculating the Euler angle of the face in the snapshot image.
In this embodiment, the image parameter of the image is an image angle, and the image angle of the image is calculated by a human face euler angle calculation method.
In this embodiment, the second image library is a dynamic image library that can be automatically updated, and in the application process of the snapshot image recognition, the images in the first image library and the second image library are compared with the snapshot image to realize the face recognition of the user.
In this application, the similarity comparison between the features of each image in the first image library and the features of the captured images includes: obtaining a representation vector of the characteristic of each image in a first image library, and obtaining a representation vector of the characteristic of the snapshot image; and calculating the distance between the expression vector of the characteristic of each image in the first image library and the expression vector of the characteristic of the snapshot image.
In this embodiment, first, the expression vectors of the features of the respective images in the first image library are acquired, and the expression vectors of the features of the snap-shot images are acquired. Calculating the expression vectors of the features of the images in the first image library, respectively calculating the distance between the expression vectors of the features of the snap-shot images and the expression vectors of the features of the snap-shot images, and determining the similarity between the snap-shot images and the images in the first image library according to the calculated distance between the snap-shot images and the images in the first image library.
According to the image library updating method, the automatically updated dynamic image library, namely the second image library, is set. And updating and adding the snap-shot images of the image angles which do not exist in the first image library in the second image library so as to increase the number of different snap-shot images of the same user. Therefore, in the application process of snapshot image recognition, the recognition precision and the comparison performance can be effectively improved.
In the image library updating method, in the process of updating the second image library, the first image matched with the snapshot image is found by comparing the snapshot image with the image in the static image library (namely, the first image library), so as to determine the user corresponding to the snapshot image, wherein the user is the user corresponding to the first image. Since the snap-shot image is firstly matched with the image in the static image library before the dynamic image library is updated by the snap-shot image, the snap-shot image can be more accurately added to the dynamic image library, namely, the user to which the snap-shot image belongs can be accurately marked, and then the snap-shot image is added to the dynamic image library, so that the condition that the snap-shot image is marked as other users which do not correspond to the snap-shot image during manual addition and wrong addition is caused is avoided. After the user corresponding to the snapshot image is determined, when the image angle of the snapshot image is different from that of the second image, the snapshot image is automatically added to a dynamic image library (namely, the second image library), and the usability of updating the image library is improved through automatic addition.
The embodiment of the invention also provides an image comparison method, which comprises the following steps:
analyzing the snapshot image which is taken in real time to obtain the characteristics of the snapshot image;
according to the characteristics of the snapshot image, whether a third image with the similarity of the characteristics of the snapshot image in a first preset range exists in a first image library or not is inquired;
determining a target object identification in the third image under the condition that the third image is inquired;
reading a fourth image corresponding to the target object identification from a second image library;
determining the similarity between the snapshot image and the fourth image;
under the condition that the similarity between the snapshot image and the fourth image is in a second preset range, marking the snapshot image with an object identifier in the fourth image;
the first image library and the second image library are both the first image library and the second image library in the image library updating method provided by the application.
In this embodiment, for a continuously updated second image library, a user in the second image library may have a plurality of captured images from different angles, and meanwhile, a captured image with better quality may be obtained. According to the method, a first preset range with a larger similarity range is preset, the similarity between the captured snapshot image and each image in the first image library is calculated firstly, and users to which the captured snapshot image possibly belongs are determined according to whether the similarity between the captured snapshot image and each image is in the first preset range, so that the recognition range of the subsequent snapshot image is narrowed.
Then, the similarity between each image of the user in the second image library, to which the captured image may belong, and the captured image is calculated by presetting a second preset range with a smaller and more accurate similarity range, and the user corresponding to the image in the second preset range is determined as the user to which the captured image belongs, so that the identification of the captured image is completed, and the consumption of calculation amount for identifying the captured image can be effectively reduced.
Specifically, the snapshot image taken in real time is analyzed to obtain the feature vector of the snapshot image. And calculating the distance between the feature vector of the snapshot image and the feature vector of each image in the first image library to obtain the similarity between the snapshot image and each image in the first image library, and determining a third image in the first image library in a first preset range. And according to the third image, determining the target object identification corresponding to the third image, namely determining the target object identification corresponding to the snapshot image, namely determining a specific user to which the snapshot image may belong, wherein the specific user comprises one or more users.
And reading a fourth image corresponding to the target object identification from the second image library, namely reading all images which exist in the second image library by a specific user to which the snapshot image possibly belongs. And calculating the similarity between the snapshot image and each fourth image, determining the object identifier corresponding to the fourth image with the similarity within a second preset range as the object identifier of the snapshot image, marking the snapshot image, and identifying the snapshot image as the user corresponding to the fourth image with the similarity within the second preset range. Thereby completing the recognition of the snap-shot image.
In this embodiment, fig. 2 is a processing flow chart of an image library updating method according to an embodiment of the present application. Referring to fig. 2, a camera or other device is used to capture a captured image of a user, the captured image is sent to an image analysis unit through a main control unit, and the image analysis unit analyzes the received captured image to obtain a feature vector, an image angle and image quality of the captured image. The master control unit sends the snap-shot images and the feature vectors of the snap-shot images, and sends the images and the feature vectors of the images in the first image library to the image comparison unit, so that the similarity between the feature vectors of the snap-shot images and the feature vectors of the images in the first image library is solved, and whether the similarity is within a preset range or not is judged. And when the similarity between the snapshot image and each image in the first image library is not in the preset range, finishing the updating operation of the second image library. When the similarity between the first image and the snapshot image is within a preset range in the first image library, the main control unit calls each image of the user corresponding to the first image in the second image library to respectively match the image angle with the snapshot image. And when the image angle of the snapshot image is different from the image angle of each image of the user corresponding to the first image in the second image library, adding the snapshot image into the second image library. When a second image with the same image angle as the snap-shot image exists in each image of the user corresponding to the first image in a second image library, comparing the image quality of the snap-shot image with that of the image with the same angle, adding the snap-shot image into the second image library when the image quality of the snap-shot image is higher than that of the second image, and deleting the second image from the second image library. And when the image quality of the snapshot image is lower than or equal to the second image, ending the updating operation of the second image library.
In summary, the image library updating method according to the embodiment of the present invention at least includes the following advantages:
according to the image library updating method provided by the invention, the first image matched with the snapshot image in real time is found by comparing the snapshot image with the image in the static image library (namely the first image library) so as to determine the user corresponding to the snapshot image, wherein the user is the user corresponding to the first image. Since the snap-shot image is firstly matched with the image in the static image library before the dynamic image library is updated by the snap-shot image, the snap-shot image can be more accurately added to the dynamic image library, namely, the user to which the snap-shot image belongs can be accurately marked, and then the snap-shot image is added to the dynamic image library, so that the condition that the snap-shot image is marked as other users which do not correspond to the snap-shot image during manual addition and wrong addition is caused is avoided.
After determining a user corresponding to the snapshot image taken in real time, when the image angle of the snapshot image is different from that of the second image, automatically adding the snapshot image into a dynamic image library (namely the second image library), and improving the usability of updating the image library through automatic addition.
Since the snap shot images added to the dynamic image library are snap shot images of image angles that do not exist in the dynamic image library. Therefore, the images in the dynamic image library enrich image samples during image comparison, and when the image comparison is performed, the captured images are compared with the images in the static image library and the images at different image angles in the dynamic image library, so that the image comparison performance and the identification precision can be effectively improved.
The embodiment of the invention also provides an image library updating system. Fig. 3 is a system structural diagram of an image library updating system according to an embodiment of the present application. Referring to fig. 3, an image library updating system 300 provided by the present application includes:
the image acquisition module 301 is used for capturing images in real time and sending the captured images captured in real time to the main control module;
the main control module 302 is configured to send a snapshot image taken in real time to the image analysis module;
the image analysis module 303 is configured to analyze the snapshot image captured in real time to obtain features of the snapshot image;
the master control module is used for sending the characteristics of the snap-shot images and the characteristics of each image in the first image library to the comparison module;
the comparison module 304 is configured to query whether a first image with a similarity to the feature of the snapshot image within a preset range exists in a first image library according to the feature of the snapshot image; and is used for determining the object identification in the first image under the condition of inquiring the first image;
the main control module is used for reading a second image corresponding to the object identifier from a second image library and sending the second image to the comparison module;
the comparison module is used for comparing the image parameters of the snapshot image with the image parameters of the second image and sending the comparison result to the main control module;
and the main control module is used for updating the second image library according to the comparison result.
Optionally, the main control module 302 includes:
the marking module is used for marking the snapshot image with the object identifier under the condition that the comparison result represents that the image parameters of the snapshot image are different from the image parameters of the second image;
and the updating module is used for adding the snapshot image carrying the object identifier to the second image library.
Optionally, the main control module 302 includes:
the quality comparison module is used for comparing the quality of the snapshot image with the quality of the second image under the condition that the comparison result represents that the image parameters of the snapshot image are the same as the image parameters of the second image;
a first marking module, configured to mark the captured image with the object identifier when an image quality of the captured image is higher than an image quality of the second image;
and the first updating module is used for deleting the second image from the second image library and adding the snapshot image carrying the object identifier to the second image library.
Optionally, the alignment module 304 includes:
the parameter comparison module is used for respectively comparing the similarity of the characteristics of each image in the first image library with the characteristics of the snap-shot images;
the first image determining module is used for determining whether a first image with the similarity higher than a preset low threshold value exists in the first image library according to the similarity comparison result; or the second image determining module is used for determining whether a first image with the similarity higher than a preset low threshold value and lower than a preset high threshold value exists in the first image library according to the similarity comparison result.
Optionally, the alignment module 304 includes:
the vector calculation module is used for obtaining the expression vector of the characteristic of each image in the first image library and obtaining the expression vector of the characteristic of the snapshot image;
and the similarity calculation module is used for calculating the distance between the expression vector of the characteristic of each image in the first image library and the expression vector of the characteristic of the snapshot image.
An embodiment of the present invention further provides an electronic device, including: memory, processor and computer program stored on the memory and executable on the processor, which when executed implements the steps of the image library update method as described above.
Embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the image library updating method as described above.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. An image library update method, the method comprising:
analyzing the snapshot image which is taken in real time to obtain the characteristics of the snapshot image;
according to the characteristics of the snapshot image, whether a first image with the similarity of the characteristics of the snapshot image in a preset range exists in a first image library or not is inquired;
in the case of querying the first image, determining an object identifier in the first image;
reading a second image corresponding to the object identification from a second image library;
comparing image parameters of the snap-shot image with image parameters of the second image;
and updating the second image library according to the comparison result.
2. The method of claim 1, wherein the updating the second image library according to the comparison comprises:
under the condition that the comparison result represents that the image parameters of the snapshot image are different from the image parameters of the second image, marking the snapshot image with the object identification;
and adding the snapshot image carrying the object identification to the second image library.
3. The method of claim 1, wherein the updating the second image library according to the comparison comprises:
comparing the quality of the snapshot image with the quality of the second image under the condition that the comparison result represents that the image parameters of the snapshot image are the same as the image parameters of the second image;
under the condition that the image quality of the snapshot image is higher than that of the second image, marking the snapshot image with the object identification;
and deleting the second image from the second image library, and adding the snapshot image carrying the object identifier to the second image library.
4. The method according to claim 1, wherein the querying whether a first image with a similarity to the feature of the captured image in a preset range exists in a first image library according to the feature of the captured image comprises:
respectively carrying out similarity comparison on the characteristics of all images in a first image library and the characteristics of the snapshot images;
determining whether a first image with the similarity higher than a preset low threshold value exists in the first image library according to the similarity comparison result; or
And determining whether a first image with the similarity higher than a preset low threshold value and lower than a preset high threshold value exists in the first image library according to the similarity comparison result.
5. The method of claim 4, wherein comparing the similarity of the features of the respective images in the first image library with the features of the snap-shot images comprises:
obtaining a representation vector of the characteristic of each image in a first image library, and obtaining a representation vector of the characteristic of the snapshot image;
and calculating the distance between the expression vector of the characteristic of each image in the first image library and the expression vector of the characteristic of the snapshot image.
6. The method according to claim 2 or 3, wherein the image parameter is image angle information obtained by calculation of Euler angles of human faces in the captured image.
7. An image comparison method, comprising:
analyzing the snapshot image which is taken in real time to obtain the characteristics of the snapshot image;
according to the characteristics of the snapshot image, whether a third image with the similarity of the characteristics of the snapshot image in a first preset range exists in a first image library or not is inquired;
determining a target object identification in the third image under the condition that the third image is inquired;
reading a fourth image corresponding to the target object identification from a second image library;
determining the similarity between the snapshot image and the fourth image;
under the condition that the similarity between the snapshot image and the fourth image is in a second preset range, marking the snapshot image with an object identifier in the fourth image;
wherein the second image library is an image library dynamically updated according to the image library updating method of any one of claims 1 to 6.
8. An image library update system, the system comprising:
the image acquisition module is used for capturing images in real time and sending the captured images in real time to the main control module;
the main control module is used for sending the snapshot image which is snapshot in real time to the image analysis module;
the image analysis module is used for analyzing the snapshot image which is snapshot in real time to obtain the characteristics of the snapshot image;
the master control module is used for sending the characteristics of the snap-shot images and the characteristics of each image in the first image library to the comparison module;
the comparison module is used for inquiring whether a first image with the similarity of the characteristics of the snapshot image in a preset range exists in a first image library or not according to the characteristics of the snapshot image; and is used for determining the object identification in the first image under the condition of inquiring the first image;
the main control module is used for reading a second image corresponding to the object identifier from a second image library and sending the second image to the comparison module;
the comparison module is used for comparing the image parameters of the snapshot image with the image parameters of the second image and sending the comparison result to the main control module;
and the main control module is used for updating the second image library according to the comparison result.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing performs the steps of the image library update method of any of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the image library update method according to any one of claims 1 to 6.
CN202111679776.7A 2021-12-31 2021-12-31 Image library updating method, system, electronic equipment and storage medium Pending CN114491126A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111679776.7A CN114491126A (en) 2021-12-31 2021-12-31 Image library updating method, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111679776.7A CN114491126A (en) 2021-12-31 2021-12-31 Image library updating method, system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114491126A true CN114491126A (en) 2022-05-13

Family

ID=81510385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111679776.7A Pending CN114491126A (en) 2021-12-31 2021-12-31 Image library updating method, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114491126A (en)

Similar Documents

Publication Publication Date Title
CN110046266B (en) Intelligent management method and device for photos
CN109829435B (en) Video image processing method, device and computer readable medium
US9064171B2 (en) Detection device and method for transition area in space
JP5662670B2 (en) Image processing apparatus, image processing method, and program
CN111512317A (en) Multi-target real-time tracking method and device and electronic equipment
CN111126122B (en) Face recognition algorithm evaluation method and device
CN110460838B (en) Lens switching detection method and device and computer equipment
WO2020111776A1 (en) Electronic device for focus tracking photographing and method thereof
CN112199530B (en) Multi-dimensional face library picture automatic updating method, system, equipment and medium
CN111507232B (en) Stranger identification method and system based on multi-mode multi-strategy fusion
CN110941992A (en) Smile expression detection method and device, computer equipment and storage medium
CN110472499B (en) Pedestrian re-identification method and device
CN111553302A (en) Key frame selection method, device, equipment and computer readable storage medium
CN111881740A (en) Face recognition method, face recognition device, electronic equipment and medium
CN112084939A (en) Image feature data management method and device, computer equipment and storage medium
CN108416298B (en) Scene judgment method and terminal
CN110084187B (en) Position identification method, device, equipment and storage medium based on computer vision
CN114491126A (en) Image library updating method, system, electronic equipment and storage medium
CN111274965A (en) Face recognition method and device, computer equipment and storage medium
JP2003022442A (en) Method and device for object detection and position measurement, execution program for the same method, and its recording medium
CN112380938B (en) Face recognition and temperature measurement method, device, equipment and medium
CN114140822A (en) Pedestrian re-identification method and device
CN113688708A (en) Face recognition method, system and storage medium based on probability characteristics
JP5923744B2 (en) Image search system, image search method, and search apparatus
CN111881855A (en) Image processing method, image processing device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination