WO2019052433A1 - 图像处理方法、移动终端及计算机可读存储介质 - Google Patents

图像处理方法、移动终端及计算机可读存储介质 Download PDF

Info

Publication number
WO2019052433A1
WO2019052433A1 PCT/CN2018/104935 CN2018104935W WO2019052433A1 WO 2019052433 A1 WO2019052433 A1 WO 2019052433A1 CN 2018104935 W CN2018104935 W CN 2018104935W WO 2019052433 A1 WO2019052433 A1 WO 2019052433A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
database
list
clustered
updated
Prior art date
Application number
PCT/CN2018/104935
Other languages
English (en)
French (fr)
Inventor
柯秀华
曹威
王俊
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019052433A1 publication Critical patent/WO2019052433A1/zh

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/172Classification, e.g. identification
    • 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/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques

Definitions

  • the present application relates to the field of computer technologies, and in particular, to an image processing method, a mobile terminal, and a computer readable storage medium.
  • the embodiment of the present application provides an image processing method, a mobile terminal, and a computer readable storage medium.
  • An image processing method comprising:
  • the first database comprises a media database of the mobile terminal
  • the second database includes a face database storing a face recognition result of the image;
  • the newly added image list records an image of the mobile terminal that is not subjected to face recognition, and the updated image list is recorded with face recognition An image in which the content changes;
  • a mobile terminal includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following operations: comparing the first database and the second database The image information stored in the at least one of the new image list and the updated image list generated according to the comparison result, wherein the first database includes a media database of the mobile terminal, and the second database includes a person storing the image a face database of face recognition results; the newly added image list records an image in which no face recognition is performed in the mobile terminal, and the updated image list records an image in which content changes after performing face recognition; Determining an image to be clustered by at least one of a new image list and an updated image list; performing face recognition on the image to be clustered, extracting image features of the image to be clustered, and according to the image feature pair The images to be clustered are clustered.
  • a computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to cause the processor to perform an operation of comparing image information stored in a first database and a second database according to a ratio Generating at least one of a new image list and a newer image list, wherein the first database includes a media database of the mobile terminal, and the second database includes a face database storing the face recognition result of the image;
  • the newly added image list records an image in which no face recognition is performed in the mobile terminal, and the updated image list records an image in which content changes after performing face recognition; according to the newly added image list and the updated image
  • At least one of the list determines an image to be clustered; performs face recognition on the image to be clustered, extracts image features of the image to be clustered, and aggregates the image to be clustered according to the image feature class.
  • FIG. 1 is a block diagram of a mobile terminal in an embodiment
  • FIG. 2 is a schematic flow chart of an image processing method in an embodiment
  • FIG. 3 is a schematic flow chart of comparing images stored in a first database and a second database in an embodiment
  • Figure 4 is a block diagram of an image processing apparatus in an embodiment
  • Figure 5 is a block diagram of a comparison module in one embodiment
  • FIG. 6 is a block diagram of a mobile terminal in another embodiment.
  • the mobile terminal includes a processor connected through a system bus, a non-volatile storage medium, an internal memory and a network interface, a display screen, and an input device.
  • the non-volatile storage medium of the mobile terminal stores an operating system and a computer program, and the computer program is executed by the processor to implement an image processing method provided in the embodiment of the present application.
  • the processor is used to provide computing and control capabilities to support the operation of the entire mobile terminal.
  • the internal memory in the mobile terminal provides an environment for the operation of a computer program in a non-volatile storage medium.
  • the network interface is used for network communication with the server.
  • the display screen of the mobile terminal may be a liquid crystal display or an electronic ink display screen.
  • the input device may be a touch layer covered on the display screen, or may be a button, a trackball or a touchpad provided on the casing of the mobile terminal, or may be An external keyboard, trackpad, or mouse.
  • the mobile terminal can be a mobile phone, a tablet or a personal digital assistant or a wearable device.
  • FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the mobile terminal to which the solution of the present application is applied.
  • the specific mobile terminal may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
  • an image processing method including the following operations:
  • Operation 210 Align the image information stored in the first database and the second database, and generate at least one of a new image list and an updated image list according to the comparison result.
  • the mobile terminal may acquire an image to be clustered that needs to be clustered, and cluster the image to be clustered, where the image to be clustered may be an image without a group stored on the mobile terminal, that is, to be
  • the cluster image may be an image that has not been clustered, or may be an image that has a corresponding group but needs to be re-clustered.
  • the mobile terminal can determine the image to be clustered by comparing the image information stored in the first database and the second database, and cluster the image to be clustered according to the face.
  • the first database refers to a media database, and the media database can be used to store information of multimedia files such as images, videos, audios, etc., and can be used by a video player, an audio player, and an album library.
  • the first database may include a storage path of the image, a message digest, a multimedia number, a modification time, and the like, for storing information of the image.
  • the first database may include an SD card (Secure Digital Memory Card) media database and a memory media database, wherein the SD card media database may be used to store multimedia information of the SD card, and the memory media database may be used for storing in the memory. Multimedia information.
  • SD card Secure Digital Memory Card
  • the second database refers to a face database, and a face recognition result, an image feature, a group information, and the like of each image may be stored in the face database.
  • the face database may include multiple types of fields, such as a picture attribute, a face attribute, and a group attribute.
  • the picture attribute may include an image storage path, a message digest, a multimedia number, a modification time, and the like
  • the face attribute may include
  • the group attribute may include a group identifier, a group name, a creation time, and the like, but is not limited thereto.
  • the mobile terminal When the mobile terminal collects a new image, for example, can be collected by a camera or received from another computer device, it needs to be stored in the first database, and when the image is face-recognized, the image features are extracted, and After clustering according to the image features, the information of the image, the corresponding image features, group information, and the like can be stored in the face database.
  • clustering may be performed according to other features, such as scenes, places, or times, etc.
  • the second database may be stored with feature information for clustering.
  • the database of information such as clustering results is not limited to the face database described above.
  • the mobile terminal can compare the image information stored in the first database with the image information stored in the second database, and can compare the image according to the storage path of the image, the multimedia number, the modification time, or the message summary, and generate a new image.
  • At least one of a list and an updated image list may record an image in the mobile terminal that is not face-recognized, and the mobile terminal may add an image existing in the first database but not in the second database to the newly added image list.
  • the updated image list may record an image in which the content is changed after the face recognition is performed, and the mobile terminal may add an image existing in the first database and the second database but the image content is changed to the updated image list or the like.
  • only the newly added image list may be generated according to the comparison result; when only the face recognition exists in the mobile terminal An image whose content has changed, without an image that is not subjected to face recognition, may generate only an updated image list according to the comparison result; when there is an image in which the face recognition is not performed in the mobile terminal, and the content is generated after face recognition
  • the changed image can be used to generate a new image list and an updated image list based on the comparison result.
  • Operation 220 determining an image to be clustered according to at least one of a new image list and an updated image list.
  • the mobile terminal may directly use the image included in at least one of the generated new image list and the updated image list as the image to be clustered, and extract the image features of the image to be clustered for clustering.
  • the image included in the newly added image list may be directly used as the image to be clustered;
  • the image included in the updated image list may be directly used as the cluster to be clustered.
  • Image when the mobile terminal generates a new image list and an updated image list, the newly added image list and the image included in the updated image list may be directly used as the image to be clustered.
  • the mobile terminal when the mobile terminal generates an updated image list, the mobile terminal may determine whether there is an image in the updated image list that has a corresponding group but needs to be re-clustered, and each image in the updated image list may be re-identified. And extracting image features of each image in the updated image list, and then acquiring stored image features corresponding to each image in the updated image list from the second database. The mobile terminal may compare the extracted image feature with the corresponding image feature stored in the second database, and may determine if the extracted image feature and the corresponding image feature stored in the second database are greater than or equal to a preset value.
  • the image whose similarity is greater than the preset value may not be clustered again; if the similarity between the extracted image feature and the corresponding image feature stored in the second database is less than a preset value, it may be determined that the similarity is less than a preset value.
  • the image needs to be re-clustered.
  • the mobile terminal may use the newly added image list and the image in the updated image list that needs to be re-clustered as the image to be clustered.
  • Operation 230 performing face recognition on the clustered image, extracting image features of the image to be clustered, and clustering the image to be clustered according to the image features.
  • the mobile terminal may perform face recognition on each image to be clustered, and extract image features of the image to be clustered.
  • the mobile terminal may perform face recognition on each image to be clustered, and may first divide the image to be clustered into an unmanned image and a face image. Further, the mobile terminal may analyze each image to be clustered by using a preset face recognition model to determine whether a corresponding face is included in the image to be clustered.
  • the face recognition model may be a decision model constructed in advance through machine learning.
  • the sample image When constructing the face recognition model, a large number of sample images may be acquired, and the sample image includes a face image and an unmanned image, which may be according to each Whether the sample image contains a human face marks the sample image, and the marked sample image is used as an input of the face recognition model, and is trained by machine learning to obtain a face recognition model.
  • the mobile terminal may extract only the image features of the face image in the image to be clustered and perform clustering according to the image features of the face image.
  • the mobile terminal may extract image features of each face image according to a preset feature model, and the image features may include shape features, spatial features, edge features, etc., wherein the shape features refer to local shapes and spatial features in the image to be clustered. Refers to the mutual spatial position or relative direction relationship between multiple regions segmented in the image to be clustered.
  • the edge feature refers to the boundary pixel between the two regions in the image to be clustered, but is not limited thereto. It can also contain color features, texture features, and the like. Further, the mobile terminal may extract, according to the preset feature model, feature points included in each face image that can be used to describe the shape of the face and the shape, position, and the like of the facial features.
  • the mobile terminal may cluster the clustered images according to the extracted image features of the images to be clustered.
  • the mobile terminal may analyze the image features of the clustered image by using a preset clustering model, and divide the images to be clustered having the same image feature into the same group.
  • the mobile terminal may extract current image group information from the second database, wherein the image group information may include group information of each group, such as group identification, group name, creation time, and the like, and Image information included under each group may be included, such as identification information of an included image, a storage path, and the like.
  • the image grouping information may be expressed in the form of group_id:pic_id, where group_id represents the group identification and pic_id represents the multimedia number of the image.
  • the mobile terminal may further extract image features of the grouped images in the respective groups from the second database according to the image grouping information, and extract image features of the respective images included under each group from the second database.
  • the image features of the grouped images in each group are extracted, and the image features corresponding to the respective groups, for example, the face features corresponding to each group, may be determined, which may help the mobile terminal to cluster the cluster images.
  • the mobile terminal can separately calculate the similarity with the image features of the grouped images in each group by using the clustering model for the image features of each image to be clustered.
  • the mobile terminal may assign the image to be clustered to a similarity greater than the first image. In the group of thresholds.
  • the mobile terminal may update the second database according to the clustering result, where the clustering result may include image information such as a media number and a storage path of each image to be clustered, an extracted image feature, and an allocated group information, etc., which is convenient for The next image clustering.
  • the mobile terminal may add each image to be clustered to the corresponding group according to the clustering result, and assign a corresponding group identifier, thereby establishing one or more albums, and the images belonging to the same group may be in the same album. Show in the middle.
  • the mobile terminal may detect whether the plurality of images to be clustered include a repeated image, wherein the repeated image refers to multiple images with similarities greater than a second threshold, if included
  • the mobile terminal can select the highest quality image from the plurality of repeated images for recognition, and extract the image features of the highest quality image for uploading.
  • the mobile terminal can determine the image quality according to the values of saturation, sharpness, brightness, etc. in the repeated images, and select the image with the highest quality for face recognition.
  • the image processing method according to the image information stored in the first database and the second database, determining the image to be clustered according to at least one of the generated new image list and the updated image list, and performing face recognition on the cluster image
  • the image features of the image to be clustered are extracted, and the clustered images are clustered according to the image features, and the images that need to be clustered are clustered locally, which can improve the efficiency of image clustering.
  • operation 210 compares image information stored in the first database and the second database, and generates at least one of a new image list and an updated image list according to the comparison result, including the following operating:
  • Operation 302 determining whether the corresponding image is found in the second database according to the path of the image in the first database, and if so, performing operation 306, and if no, performing operation 304.
  • the mobile terminal may search in the second database according to the path of the image in the first database, and determine whether the face recognition result corresponding to the image is stored in the second database.
  • the mobile terminal can read the value of each image stored in the first database in the storage path field one by one, and find whether the second database has an image in which the value of the storage path field is consistent with the read value, and if so, the second database
  • the image in which the value of the storage path field is consistent with the read value is the corresponding image in the second database.
  • the mobile terminal may also search for a corresponding image in the second database according to the multimedia number of each image in the first database, and if the multimedia number is consistent with the image in the first database, the second database can be found.
  • the image with the same multimedia number is the corresponding image in the second database.
  • Operation 304 adding an image that is not found to the newly added image list.
  • the image information of the image exists only in the first database and not in the second database, indicating that the image is not performed.
  • an image in the first database that does not find a corresponding image in the second database may be added to the newly added image list.
  • the newly added image list may record identification information of an image existing only in the first database and not in the second database, wherein the identification information may be a multimedia number, a storage path, or the like.
  • Operation 306 determining whether the image in the first database is consistent with the modification time of the corresponding image in the second database, and if so, performing operation 312, and if not, performing operation 308.
  • the mobile terminal may extract the value of the modified time field of the image in the first database and the value of the modified time field of the corresponding image in the second database to determine whether the two are consistent. If the modification time is consistent, the image is not modified after the face recognition is performed and stored in the second database. If the modification time of the image in the first database is inconsistent with the modification time of the corresponding image in the second database, the image is modified after being subjected to face recognition and stored in the second database.
  • Operation 308 determining whether the image in the first database is consistent with the message digest of the corresponding image in the second database, and if so, performing operation 312, and if not, performing operation 310.
  • the mobile terminal may extract the value of the message summary field stored in the first database of the image, and the corresponding value in the second database.
  • the message digest may also be referred to as a digital digest.
  • Each message digest is a fixed-length value that uniquely corresponds to a message or text, etc., by determining whether the image in the first database is consistent with the message digest of the corresponding image in the second database. It can be determined whether the content of the image has changed. If the message digest is inconsistent, the image is changed after the face is recognized and stored in the second database, and the image stored in the first database corresponds to the second database. The image is not an image of the same content.
  • the message digest of the image may be MD5 (Message Digest Algorithm MD5), and may be other hash algorithms or the like, and is not limited thereto.
  • MD5 Message Digest Algorithm MD5
  • the message digest of the image is calculated according to an algorithm such as MD5, and the message digest is stored in association with the multimedia number of the image, the storage path, and the like. In the database.
  • Operation 310 adding an image inconsistent message digest to the updated image list.
  • the mobile terminal may add, in the first database, an image different from the message digest of the corresponding image in the second database to the updated image list, and the updated image list may record an image in which the content has changed after the face recognition is performed. Further, identification information of an image in which the content has changed after face recognition is recorded.
  • operation 312 it is determined whether the face state of the image is visible, and if so, operation 316 is performed, and if not, operation 314 is performed.
  • the mobile terminal may synchronize the image and the face information of the image stored by the other mobile terminal, and the like, wherein the face information may include location information of the face region in the image, the captured face image, and the like.
  • the mobile terminal may first detect whether the face information can find the corresponding image in the first database.
  • the face information when the face information is received, it may first detect whether an image corresponding to the face information has been received, and if not, the face information and the corresponding image information, group information, and the like may be stored in the first In the second database, and the face state of the image is set to be invisible, the image does not participate in image clustering.
  • the modification time of the image in the first database is consistent with the modification time of the corresponding image in the second database, or the message digest of the image in the first database is consistent with the message digest of the corresponding image in the second database, Whether the face state of the image is visible. If the image information of the image exists in the first database and the second database and the content has not been modified, and the face state of the image is invisible, it may be indicated that the mobile terminal has successfully received the image sent by the other mobile terminal, and may participate in Image clustering and changing the face state of the image from invisible to visible.
  • the mobile terminal may match the modification time of the corresponding image in the second database in the first database, or the message digest is consistent, and the image whose face state is invisible is added to the face state update list, the face state
  • the update list records images of non-participating image clusters received from other mobile terminals.
  • the mobile terminal can change the face state of the image in the face state update list from invisible to visible, and participate in image clustering.
  • the mobile terminal may determine the image to be clustered according to at least one of the generated new image list, the updated image list, and the face state update list, whether to generate a new image list, update the image list, and the face state update list according to actual conditions. The result of the comparison is decided.
  • the image information of the first database and the second database may be compared, and at least one of a new image list, an updated image list, and a face state update list may be generated to facilitate determining an image that needs to be clustered, thereby Clustering only the images that need to be clustered can reduce the processing pressure of the mobile terminal and improve the efficiency of image clustering.
  • the method may include: if the face state update list is not empty, acquiring the image included in the face state update list and the corresponding face region information, and The image features are extracted from the face regions of the corresponding images based on the face region information of each image.
  • the mobile terminal After the mobile terminal performs face recognition on the image to be clustered in at least one of the generated new image list and the updated image list, if the face state update list is generated, it is possible to detect whether the face state update list is air. If the face status update list is empty, it means that there is no image that is not clustered from other mobile terminals. If the face state update list is not empty, the face state update list may be read, and the image included in the face state update list and the corresponding face region information are obtained, wherein the face region information refers to the face region at Corresponds to the location information in the image.
  • the mobile terminal may determine the face region of the corresponding image according to the face region information, and directly in the face region of the image according to the preset feature model.
  • the image features are extracted, and the images included in the face state update list are clustered according to the extracted image features.
  • the face region can be directly determined according to the face region information of the image in the face state update list, and feature extraction is performed, and the face recognition process is not needed, thereby speeding up image clustering and improving image clustering. s efficiency.
  • the method before the operation 210 compares the image information stored in the first database and the second database, and generates at least one of the newly added image list and the updated image list according to the comparison result, the method further includes: acquiring the current In the power state, if the power state meets the preset state, performing operation 210 compares the image information stored in the first database and the second database, and generates at least one of a new image list and an updated image list according to the comparison result.
  • the mobile terminal Before acquiring the image to be clustered for image clustering, the mobile terminal may first acquire the current power state, wherein the power state may include available remaining power, whether it is in a charging state, a power consumption speed, and the like.
  • the power state meets the preset state, the image to be clustered is acquired, the face image is subjected to face recognition, the image features of the image to be clustered are extracted, and the cluster image is clustered according to the image feature.
  • the preset state may be that the available remaining power is greater than the preset percentage, or is in the charging state, or the available remaining power is greater than the preset percentage and the power consumption is less than the set value, etc., and is not limited thereto, and may be set according to actual needs. .
  • the mobile terminal may also preset a time period for performing image clustering. If the current time is in a time period for performing image clustering, the image to be clustered may be acquired and image clustering may be performed. The time period during which image clustering is performed may be set in a period in which the mobile terminal is used less, for example, from 2 am to 4 am in the morning.
  • the state of the power source of the mobile terminal during image clustering can be ensured, and the use of the image cluster for the mobile terminal is reduced. influences.
  • an image processing method comprising the following operations:
  • Operation (2) if the power state meets the preset state, comparing the image information stored in the first database and the second database, searching in the second database according to the path of the image in the first database, if in the second database If no corresponding image is found, the unfinished image is added to the newly added image list.
  • Operation (3) if the corresponding image is found in the second database, it is determined whether the image in the first database is consistent with the modification time of the corresponding image in the second database.
  • Operation (6) if only the newly added image list is generated, the image to be clustered is determined according to the newly added image list; if only the updated image list is generated, the image to be clustered is determined according to the updated image list; if only the face state update is generated
  • the list determines the image to be clustered according to the face state update list; if the new image list and the updated image list are generated, the image to be clustered is determined according to the newly added image list and the updated image list; if the newly added image list and the person are generated
  • the face state update list determines the image to be clustered according to the newly added image list and the face state update list; if the updated image list and the face state update list are generated, the cluster to be clustered is determined according to the updated image list and the face state update list.
  • Image if a new image list, an updated image list, and a face state update list are generated, the image to be clustered is determined according to the newly added image list, the updated image list, and the face
  • Operation (7) performing face recognition on at least one of the newly added image list and the updated image list, and extracting the image feature.
  • the cluster image may be subjected to face recognition by the mobile terminal, the image features of the image to be clustered are extracted, and the cluster image is clustered according to the image feature.
  • the image to be clustered may also be sent to the server by the mobile terminal, and the image features of the image to be clustered are extracted by the server, and the clustered image is clustered according to the image feature, and then the clustering result is returned to the mobile terminal, and the mobile terminal may be based on The image information included in the clustering result and the corresponding group information are added to the corresponding group.
  • the image information stored in the first database and the second database is compared, and the image to be clustered is determined according to at least one of the generated new image list and the updated image list, and the image to be clustered is performed on the image. Face recognition, extracting the image features of the image to be clustered, and clustering the clustered images according to the image features, and clustering the images that need to be clustered locally, which can improve the efficiency of image clustering.
  • an image processing apparatus 400 including a comparison module 410, a determination module 420, and an extraction module 430.
  • the comparison module 410 is configured to compare the image information stored in the first database and the second database, and generate at least one of a new image list and an updated image list according to the comparison result, where the first database includes the mobile terminal a media database, the second database includes a face database storing the face recognition result of the image; the newly added image list records the image of the mobile terminal that is not subjected to face recognition, and the updated image list record has the content generated after the face recognition is performed. Change the image.
  • the determining module 420 is configured to determine an image to be clustered according to at least one of a new image list and an updated image list.
  • the determining module 420 is further configured to extract image features of each image in the updated image list, acquire stored image features corresponding to each image in the updated image list from the second database, and update the image In the list, the image in which the extracted image features and the corresponding stored image features are less than the preset value is determined as the image to be clustered.
  • the extracting module 430 is configured to perform face recognition on the clustered image, extract image features of the image to be clustered, and cluster the clustered images according to the image features.
  • the extracting module 430 is further configured to determine image quality of the plurality of repeated images when the plurality of repeated images are included in the image to be clustered, and select the image with the highest quality for face recognition.
  • the image processing device compares the image information stored in the first database and the second database, and determines the image to be clustered according to at least one of the generated new image list and the updated image list, and performs a face image on the clustered image.
  • the image features of the image to be clustered are extracted, and the clustered images are clustered according to the image features, and the images that need to be clustered are clustered locally, which can improve the efficiency of image clustering.
  • the comparison module 410 includes a lookup unit 412, an adding unit 414, and a determining unit 416.
  • the searching unit 412 is configured to perform searching in the second database according to the path of the image in the first database.
  • the adding unit 414 is configured to add the unsearched image to the newly added image list if no corresponding image is found in the second database.
  • the determining unit 416 is configured to determine whether the image in the first database is consistent with the modification time of the corresponding image in the second database, if the corresponding image is found in the second database.
  • the determining unit 416 is further configured to determine, if the modification time is inconsistent, whether the image in the first database is consistent with the message digest of the corresponding image in the second database.
  • the adding unit 414 is further configured to add an inconsistent image to the updated image list if the message digest is inconsistent.
  • the determining unit 416 is further configured to determine whether the face state of the consistent image is visible if the image in the first database is consistent with the modification time of the corresponding image in the second database, or the message digest is consistent.
  • the adding unit 414 is further configured to add an image invisible to the face state to the face state update list if the face state is invisible, and the face state update list records the unoccupied image cluster received from the other mobile terminal. image.
  • the image information of the first database and the second database may be compared, and at least one of a new image list, an updated image list, and a face state update list may be generated to facilitate determining an image that needs to be clustered, thereby Clustering only the images that need to be clustered can reduce the processing pressure of the mobile terminal and improve the efficiency of image clustering.
  • the extraction module 430 is further configured to: if the face state update list is not empty, acquire an image included in the face state update list and corresponding face region information, and according to the face region of each image The information extracts image features from the face region of the corresponding image.
  • the face region can be directly determined according to the face region information of the image in the face state update list, and feature extraction is performed, and the face recognition process is not needed, thereby speeding up image clustering and improving image clustering. s efficiency.
  • the image processing apparatus 400 described above includes a comparison module 410, a determination module 420, and an extraction module 430, and a state acquisition module.
  • the state obtaining module is configured to obtain a current power state. If the power state meets the preset state, the comparison module 410 compares the images stored in the first database and the second database, and generates a new image list according to the comparison result. And update the image list.
  • the state of the power source of the mobile terminal during image clustering can be ensured, and the use of the image cluster for the mobile terminal is reduced. influences.
  • the embodiment of the present application further provides a mobile terminal.
  • a mobile terminal As shown in FIG. 6 , for the convenience of description, only the parts related to the embodiments of the present application are shown. If the specific technical details are not disclosed, please refer to the method part of the embodiment of the present application.
  • the mobile terminal can be any mobile device, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), an on-board computer, a wearable device, or the like, and the mobile terminal is used as a mobile phone as an example. :
  • FIG. 6 is a block diagram showing a partial structure of a mobile phone related to a mobile terminal provided by an embodiment of the present application.
  • the mobile phone includes components such as a radio frequency (RF) circuit 610, a memory 620, an input unit 630, a display unit 640, a sensor 650, an audio circuit 660, a WiFi module 670, a processor 680, and a power source 690.
  • RF radio frequency
  • FIG. 6 does not constitute a limitation to the mobile phone, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements.
  • the RF circuit 610 can be used for receiving and transmitting information during the transmission or reception of information, and can receive and send the downlink information of the base station, and then send the uplink data to the base station.
  • RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
  • LNA Low Noise Amplifier
  • RF circuitry 610 can also communicate with the network and other devices via wireless communication.
  • the above wireless communication may use any communication standard or protocol, including but not limited to GSM, General Packet Radio Service (GPRS), CDMA, Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (Long Term Evolution, LTE)), e-mail, Short Messaging Service (SMS), etc.
  • GSM Global System for Mobile Communications
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • SMS Short Messaging Service
  • the memory 620 can be used to store software programs and modules, and the processor 680 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 620.
  • the memory 620 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as an application of a sound playing function, an application of an image playing function, etc.);
  • the data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone.
  • memory 620 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input unit 630 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the handset 600.
  • the input unit 630 may include a touch panel 632 and other input devices 634.
  • the touch panel 632 also referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch panel 632 or near the touch panel 632. Operation) and drive the corresponding connection device according to a preset program.
  • the touch panel 632 can include two portions of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 680 is provided and can receive commands from the processor 680 and execute them.
  • the touch panel 632 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 630 may also include other input devices 634. Specifically, other input devices 634 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.).
  • the display unit 640 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
  • the display unit 640 can include a display panel 642.
  • the display panel 642 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch panel 632 can cover the display panel 642. When the touch panel 632 detects a touch operation thereon or nearby, the touch panel 632 transmits to the processor 680 to determine the type of the touch event, and then the processor 680 is The type of touch event provides a corresponding visual output on display panel 642.
  • the touch panel 632 and the display panel 642 are two separate components to implement the input and input functions of the mobile phone, in some embodiments, the touch panel 632 can be integrated with the display panel 642. Realize the input and output functions of the phone.
  • the handset 600 can also include at least one type of sensor 650, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 642 according to the brightness of the ambient light, and the proximity sensor may close the display panel 642 and/or when the mobile phone moves to the ear. Or backlight.
  • the motion sensor may include an acceleration sensor, and the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
  • the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
  • Audio circuitry 660, speaker 662, and microphone 664 can provide an audio interface between the user and the handset.
  • the audio circuit 660 can transmit the converted electrical data of the received audio data to the speaker 662 for conversion to the sound signal output by the speaker 662; on the other hand, the microphone 664 converts the collected sound signal into an electrical signal by the audio circuit 660. After receiving, it is converted into audio data, and then processed by the audio data output processor 680, sent to another mobile phone via the RF circuit 610, or outputted to the memory 620 for subsequent processing.
  • WiFi is a short-range wireless transmission technology
  • the mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 670, which provides users with wireless broadband Internet access.
  • the processor 680 is the control center of the handset, and connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 620, and invoking data stored in the memory 620, executing The phone's various functions and processing data, so that the overall monitoring of the phone.
  • processor 680 can include one or more processing units.
  • processor 680 can integrate an application processor and a modem processor, where the application processor primarily processes an operating system, user interface, and applications, etc.; the modem processor primarily processes wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 680.
  • the mobile phone 600 also includes a power source 690 (such as a battery) for powering various components.
  • a power source 690 (such as a battery) for powering various components.
  • the power source 690 can be logically coupled to the processor 680 through a power management system to manage functions such as charging, discharging, and power management through the power management system. .
  • the handset 600 may also include a camera, a Bluetooth module, and the like.
  • the processor 680 included in the mobile terminal implements the image processing method described above when executing a computer program stored in the memory.
  • a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the image processing method described above.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or the like.
  • Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM), which acts as an external cache.
  • RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronization.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR SDRAM dual data rate SDRAM
  • ESDRAM enhanced SDRAM
  • synchronization Link (Synchlink) DRAM (SLDRAM), Memory Bus (Rambus) Direct RAM (RDRAM), Direct Memory Bus Dynamic RAM (DRDRAM), and Memory Bus Dynamic RAM (RDRAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种图像处理方法、移动终端及计算机可读存储介质。方法,包括:比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种;根据新增图像列表和更新图像列表中的至少一种确定待聚类图像;对待聚类图像进行人脸识别,提取待聚类图像的图像特征,并根据图像特征对所述待聚类图像进行聚类。

Description

图像处理方法、移动终端及计算机可读存储介质
相关申请的交叉引用
本申请要求于2017年09月15日提交中国专利局、申请号为201710850428.9、发明名称为“图像处理方法、装置、移动终端及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,特别是涉及一种图像处理方法、移动终端及计算机可读存储介质。
背景技术
随着互联网技术的飞速发展,用户可在移动终端上存储大量的图片,可对移动终端上存储的大量的图片进行分类。在传统的方式中,当移动终端需要对存储的图片进行分类时,需将存储的图片全部同步到服务器,再由服务器进行分类,图像分类效率低。
发明内容
本申请实施例提供一种图像处理方法、移动终端及计算机可读存储介质。
一种图像处理方法,包括:
比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种,其中,所述第一数据库包括移动终端的媒体数据库,所述第二数据库包括存储有图像的人脸识别结果的人脸数据库;所述新增图像列表记录有所述移动终端中未进行人脸识别的图像,所述更新图像列表记录有在进行人脸识别后内容发生改变的图像;
根据所述新增图像列表和更新图像列表中的至少一种确定待聚类图像;
对所述待聚类图像进行人脸识别,提取所述待聚类图像的图像特征,并根据所述图像特征对所述待聚类图像进行聚类。
一种移动终端,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行以下操作:比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种,其中,所述第一数据库包括移动终端的媒体数据库,所述第二数据库包括存储有图像的人脸识别结果的人脸数据库;所述新增图像列表记录有所述移动终端中未进行人脸识别的图像,所述更新图像列表记录有在进行人脸识别后内容发生改变的图像;根据所述新增图像列表和更新图像列表中的至少一种确定待聚类图像;对所述待聚类图像进行人脸识别,提取所述待聚类图像的图像特征,并根据所述图像特征对所述待聚类图像进行聚类。
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时使得所述处理器执行以下操作:比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种,其中,所述第一数据库包括移动终端的媒体数据库,所述第二数据库包括存储有图像的人脸识别结果的人脸数据库;所述新增图像列表记录有所述移动终端中未进行人脸识别的图像,所述更新图像列表记录有在进行人脸识别后内容发生改变的图像;根据所述新增图像列表和更新图像列表中的至少一种确定待聚类图像;对所述待聚类图像进行人脸识别,提取所述待聚类图像的图像特征,并根据所述图像特征对所述待聚类图像进行聚类。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为一个实施例中移动终端的框图;
图2为一个实施例中图像处理方法的流程示意图;
图3为一个实施例中比对第一数据库及第二数据库中存储的图像的流程示意图;
图4为一个实施例中图像处理装置的框图;
图5为一个实施例中比对模块的框图;
图6为另一个实施例中移动终端的框图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。
图1为一个实施例中移动终端的框图。如图1所示,该移动终端包括通过系统总线连接的处理器、非易失性存储介质、内存储器和网络接口、显示屏和输入装置。其中,移动终端的非易失性存储介质存储有操作系统及计算机程序,该计算机程序被处理器执行时以实现本申请实施例中提供的一种图像处理方法。该处理器用于提供计算和控制能力,支撑整个移动终端的运行。移动终端中的内存储器为非易失性存储介质中的计算机程序的运行提供环境。网络接口用于与服务器进行网络通信。移动终端的显示屏可以是液晶显示屏或者电子墨水显示屏等,输入装置可以是显示屏上覆盖的触摸层,也可以是移动终端外壳上设置的按键、轨迹球或触控板,也可以是外接的键盘、触控板或鼠标等。该移动终端可以是手机、平板电脑或者个人数字助理或穿戴式设备等。本领域技术人员可以理解,图1中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的移动终端的限定,具体的移动终端可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
如图2所示,在一个实施例中,提供一种图像处理方法,包括以下操作:
操作210,比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种。
在一个实施例中,移动终端可获取需要进行聚类的待聚类图像,并对待聚类图像进行聚类,其中,待聚类图像可以是移动终端上存储的没有分组的图像,即,待聚类图像可以是没有被聚过类的图像,也可以是有对应的组别但是需要重新聚类的图像等。移动终端可通过比对第一数据库及第二数据库存储的图像信息,确定待聚类图像,并根据人脸对待聚类图像进行聚类。
在本实施例中,第一数据库指的是媒体数据库,媒体数据库可用于存储图像、视频、音频等多媒体文件的信息,可供视频播放器、音频播放器及相册图库使用。第一数据库中可包含有图像的存储路径、消息摘要、多媒体编号、修改时间等字段,用于存储图像的信息。在一个实施例中,第一数据库可包括SD卡(Secure Digital Memory Card)媒体数据库及内存媒体数据库,其中,SD卡媒体数据库可用于存储SD卡的多媒体信息,内存媒体数据库可用于存储内存中的多媒体信息。第二数据库指的是人脸数据库,人脸数据库中可存储有各个图像的人脸识别结果、图像特征、组别信息等。人脸数据库中可包含有图片属性、人脸属性及组属性等多个类型的字段,其中,图片属性可包括图像的存储路径、消息摘要、多媒体编号、修改时间等字段,人脸属性可包括人脸状态、人脸大小、人脸特征 等字段,组属性可包括组别标识、组名称、创建时间等字段,但不限于此。当移动终端采集一张新的图像时,例如可通过摄像头采集、或是从其他计算机设备接收等,需先存储在第一数据库中,当对该图像进行人脸识别时,提取图像特征,并根据图像特征进行聚类后,可将该图像的信息、以及对应的图像特征、组别信息等存储在人脸数据库中。
在其他的实施例中,除了根据人脸对图像进行聚类外,也可根据其他的特征进行聚类,例如场景、地点或时间等,则第二数据库可以是保存有用于聚类的特征信息及聚类结果等信息的数据库,并不仅限于上述的人脸数据库。
移动终端可将第一数据库存储的图像信息与第二数据库存储的图像信息进行比对,可根据图像的存储路径、多媒体编号、修改时间或是消息摘要等字段进行比对,并生成新增图像列表和更新图像列表中的至少一种。在一个实施例中,新增图像列表可记录有移动终端中未进行人脸识别的图像,移动终端可将存在于第一数据库但不存在于第二数据库的图像添加到新增图像列表。更新图像列表可记录有在进行人脸识别后内容发生改变的图像,移动终端可将同时存在于第一数据库及第二数据库,但图像内容发生了改变的图像添加到更新图像列表等。
当移动终端中仅存在未进行人脸识别的图像,而没有人脸识别后内容发生改变的图像时,可根据比对结果仅生成新增图像列表;当移动终端中仅存在进行人脸识别后内容发生改变的图像,而不存在未进行人脸识别的图像,可根据比对结果仅生成更新图像列表;当移动终端中同时存在未进行人脸识别的图像,以及进行人脸识别后内容发生改变的图像,则可根据比对结果生成新增图像列表和更新图像列表。
操作220,根据新增图像列表和更新图像列表中的至少一种确定待聚类图像。
移动终端可直接将生成的新增图像列表和更新图像列表中的至少一种中包含的图像作为待聚类图像,并提取待聚类图像的图像特征进行聚类。当移动终端仅生成新增图像列表时,可直接将新增图像列表包含的图像作为待聚类图像;当移动终端仅生成更新图像列表时,可直接将更新图像列表包含的图像作为待聚类图像;当移动终端生成新增图像列表和更新图像列表,可直接将新增图像列表和更新图像列表包含的图像作为待聚类图像。在一个实施例中,当移动终端生成更新图像列表时,移动终端可判断更新图像列表中是否存在有对应的分组但是需要重新聚类的图像,可对更新图像列表中的每个图像重新进行识别,并提取更新图像列表中每个图像的图像特征,再从第二数据库中获取与更新图像列表中每个图像对应的存储的图像特征。移动终端可将提取的图像特征与第二数据库中存储的对应的图像特征进行比较,若提取的图像特征与第二数据库中存储的对应的图像特征相似度大于或等于预设值,则可判定该相似度大于预设值的图像可不重新进行聚类;若提取的图像特征与第二数据库中存储的对应的图像特征的相似度小于预设值,则可判定该相似度小于预设值的图像需要重新进行聚类。移动终端可将新增图像列表,以及更新图像列表中需要重新进行聚类的图像作为待聚类图像。
操作230,对待聚类图像进行人脸识别,提取待聚类图像的图像特征,并根据图像特征对所述待聚类图像进行聚类。
移动终端可对各个待聚类图像进行人脸识别,并提取待聚类图像的图像特征。在一个实施例中,移动终端可对各个待聚类图像进行人脸识别,可先将待聚类图像分为无人图像及人脸图像。进一步地,移动终端可通过预设的人脸识别模型对每个待聚类图像进行分析,判断对应的待聚类图像中是否包含人脸。在一个实施例中,人脸识别模型可以是预先通过机器学习构建的决策模型,构建人脸识别模型时,可获取大量的样本图像,样本图像中包含有人脸图像及无人图像,可根据每个样本图像是否包含人脸对样本图像进行标记,并将标记的样本图像作为人脸识别模型的输入,通过机器学习进行训练,得到人脸识别模型。
移动终端将待聚类图像分为无人图像及人脸图像后,可将无人图像分到对应的无人图像组别中,并添加对应的组别标识。在一个实施例中,移动终端可仅提取待聚类图像中人 脸图像的图像特征,并根据人脸图像的图像特征进行聚类。移动终端可根据预设的特征模型提取各个人脸图像的图像特征,图像特征可包括形状特征、空间特征及边缘特征等,其中,形状特征指的是待聚类图像中局部的形状,空间特征指的是待聚类图像中分割出来的多个区域之间的相互的空间位置或相对方向关系,边缘特征指的是待聚类图像中组成两个区域之间的边界像素,但不限于此,还可包含颜色特征、纹理特征等。进一步地,移动终端可根据预设的特征模型提取各个人脸图像中包含的可用于描述人脸形状及五官形状、位置等信息的特征点。
移动终端可根据提取的各个待聚类图像的图像特征对待聚类图像进行聚类。在一个实施例中,移动终端可通过预设的聚类模型可对待聚类图像的图像特征进行分析,并将具有相同图像特征的待聚类图像划分到同一个组别中。
在一个实施例中,移动终端可从第二数据库中提取当前的图像分组信息,其中,图像分组信息可包括每个组的组别信息,例如组别标识、组名称、创建时间等信息,还可包括每个组下包含的图像信息,例如包含的图像的标识信息、存储路径等。在一个实施例中,图像分组信息可用group_id:pic_id的形式表示,其中,group_id表示组别标识,pic_id表示图像的多媒体编号。移动终端可还根据图像分组信息从第二数据库中提取各个组别中已分组图像的图像特征,可从第二数据库中提取每个组别下包含的各个图像的图像特征。提取各个组别中已分组图像的图像特征,可确定各个组别对应的图像特征,例如,各个组别对应的人脸特征等,可帮助移动终端对待聚类图像进行聚类。移动终端可通过聚类模型,针对每个待聚类图像的图像特征,可分别计算与各个组别中已分组图像的图像特征的相似度。当待聚类图像的图像特征与组别中包含图像的图像特征的相似度大于第一阈值时,则可认为属于同一类图像,移动终端可将该待聚类图像分配至相似度大于第一阈值的组别中。若不存在与待聚类图像的图像特征的相似度大于第一阈值的组别,则说明该待聚类图像不属于已有的组别,可通过预设的聚类模型对不属于已有组别的待聚类图像重新进行聚类,将具有相似图像特征的待聚类图像划分生成新的组别。移动终端可根据聚类结果对第二数据库进行更新,其中,聚类结果可包括各个待聚类图像的媒体编号、存储路径等图像信息、提取的图像特征、分配的组别信息等,方便进行下一次图像聚类。移动终端可根据聚类结果将各个待聚类图像添加到对应的组别中,并分配对应的组别标识,从而可建立一个或多个相册,可将属于同一组别的图像在同一个相册中进行展示。
在一个实施例中,若待聚类图像有多张,则移动终端可检测多张待聚类图像中是否包含重复图像,其中,重复图像指的是相似度大于第二阈值的多张图像,若包含,则移动终端可从多张重复图像中选取质量最高的图像进行识别,并提取该质量最高的图像的图像特征进行上传。移动终端可根据重复的各个图像中的饱和度、清晰度、亮度等值确定图像质量,并从中选取质量最高的图像进行人脸识别。
上述图像处理方法,比对第一数据库及第二数据库中存储的图像信息,根据生成的新增图像列表和更新图像列表中的至少一种确定待聚类图像,对待聚类图像进行人脸识别,提取待聚类图像的图像特征,并根据图像特征对待聚类图像进行聚类,在本地对需要进行聚类的图像进行聚类,可以提高图像聚类的效率。
如图3所示,在一个实施例中,操作210比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种,包括以下操作:
操作302,根据第一数据库中图像的路径判断是否在第二数据库中查找到对应的图像,若是,则执行操作306,若否,则执行操作304。
移动终端可根据第一数据库中图像的路径在第二数据库中查找,判断第二数据库中是否存储有该图像对应的人脸识别结果。移动终端可逐一读取第一数据库中存储的每个图像在存储路径字段的值,并查找第二数据库是否有存储路径字段的值与读取的值一致的图像,若有,则第二数据库中存储路径字段的值与读取的值一致的图像,即为第二数据库中 对应的图像。在一个实施例中,移动终端也可根据第一数据库中每个图像的多媒体编号在第二数据库中查找对应的图像,若在第二数据库中能查找到多媒体编号与第一数据库中一致的图像,则该多媒体编号一致的图像即为第二数据库中对应的图像。
操作304,将没有查找到的图像添加到新增图像列表。
若移动终端根据第一数据库中图像的路径没有在第二数据库中查找到对应的图像,则该图像的图像信息只存在于第一数据库而不存在于第二数据库中,说明该图像未进行人脸识别,可将第一数据库中没有在第二数据库中查找到对应图像的图像添加到新增图像列表。进一步地,新增图像列表中可记录有只存在于第一数据库而不存在于第二数据库的图像的标识信息,其中,标识信息可以是多媒体编号、存储路径等。
操作306,判断第一数据库中的图像与第二数据库中对应的图像的修改时间是否一致,若是,则执行操作312,若否,则执行操作308。
若能在第二数据库中查找到对应的图像,则移动终端可提取第一数据库中图像的修改时间字段的值,以及第二数据库中对应的图像的修改时间字段的值,判断二者是否一致,若修改时间一致,说明图像在进行人脸识别并存储在第二数据库后,没有进行过修改。若第一数据库中的图像的修改时间,与第二数据库中对应的图像的修改时间不一致,说明图像在进行人脸识别并存储在第二数据库后,进行过修改。
操作308,判断第一数据库中的图像与第二数据库中对应的图像的消息摘要是否一致,若是,则执行操作312,若否,则执行操作310。
若第一数据库中的图像的修改时间,与第二数据库中对应的图像的修改时间不一致,移动终端可提取该图像在第一数据库中存储的消息摘要字段的值,以及第二数据库中对应的图像的消息摘要字段的值,并比较是否一致。消息摘要也可称为数字摘要,每一个消息摘要是可唯一对应一个消息或文本等的固定长度的值,通过判断第一数据库中的图像与第二数据库中对应的图像的消息摘要是否一致,可判断该图像的内容是否发生了改变,若消息摘要不一致,说明图像在进行人脸识别并存储在第二数据库后,图像内容发生了变化,第一数据库中存储的图像与第二数据库中对应的图像不是同一内容的图像。
在一个实施例中,图像的消息摘要可以是图像的MD5(Message Digest Algorithm MD5,消息摘要算法第五版),也可以是其他的哈希算法等,并不限于此。移动终端每存储一张新的图像,或是对图像进行了修改等,即可根据MD5等算法计算图像的消息摘要,并将消息摘要与图像的多媒体编号、存储路径等信息关联存储在第一数据库中。
操作310,将消息摘要不一致的图像添加到更新图像列表。
移动终端可将第一数据库中,消息摘要与第二数据库中对应图像的消息摘要不同的图像添加到更新图像列表,更新图像列表中可记录有在进行人脸识别后内容发生了变化的图像,进一步地,可记录有在进行人脸识别后内容发生了变化的图像的标识信息。
操作312,判断图像的人脸状态是否可见,若是,则执行操作316,若否,则执行操作314。
在一个实施例中,移动终端可同步其他移动终端存储的图像及图像的人脸信息等,其中,人脸信息可包括人脸区域在图像中的位置信息、截取的人脸图像等。用户在不同的移动终端上登录相同的账户,即可将属于同一账户下的移动终端的图像及图像的人脸信息等进行同步及共享。当移动终端接收到其他属于同一账户的移动终端发送的图像及图像的人脸信息后,当接收到人脸信息时,可先检测该人脸信息是否可在第一数据库中找到对应的图像,也即,当接收到人脸信息时,可先检测是否已接收到与该人脸信息对应的图像,若没有,则可将该人脸信息及对应的图像信息、组别信息等存储在第二数据库中,并将该图像的人脸状态设定为不可见,则该图像不会参与图像聚类。
若第一数据库中的图像的修改时间,与第二数据库中对应的图像的修改时间一致,或是第一数据库中的图像的消息摘要,与第二数据库中对应的图像的消息摘要一致,判断该 图像的人脸状态是否可见。若图像的图像信息在第一数据库与第二数据库中同时存在且内容没有进行过修改,而图像的人脸状态为不可见,则可说明移动终端已成功接收其他移动终端发送的图像,可参与图像聚类,并将图像的人脸状态从不可见变更为可见。移动终端可将第一数据库中与所述第二数据库中对应的图像的修改时间一致,或消息摘要一致,且人脸状态为不可见的图像,添加到人脸状态更新列表中,人脸状态更新列表记录有从其他移动终端接收的未参与图像聚类的图像。移动终端可对人脸状态更新列表中的图像的人脸状态从不可见变更为可见,并参与图像聚类。移动终端可根据生成的新增图像列表、更新图像列表和人脸状态更新列表中的至少一种确定待聚类图像,是否生成新增图像列表、更新图像列表及人脸状态更新列表需根据实际的比对结果决定。
操作314,将人脸状态不可见的图像添加到人脸状态更新列表中。
操作316,不作处理。
在本实施例中,可对比第一数据库与第二数据库的图像信息,生成新增图像列表、更新图像列表和人脸状态更新列表中的至少一种,方便确定需要进行聚类的图像,从而仅对需要进行聚类的图像进行聚类,可以减轻移动终端的处理压力,并提高图像聚类的效率。
在一个实施例中,在操作提取待聚类图像的图像特征之后,可包括:若人脸状态更新列表不为空,则获取人脸状态更新列表包含的图像及对应的人脸区域信息,并根据每个图像的人脸区域信息从对应图像的人脸区域中提取图像特征。
移动终端对生成的新增图像列表和更新图像列表中的至少一种中需要进行聚类的图像进行人脸识别后,若有生成人脸状态更新列表,则可检测人脸状态更新列表是否为空。若人脸状态更新列表为空,则说明没有从其他移动终端同步的未参与聚类的图像。若人脸状态更新列表不为空,则可读取人脸状态更新列表,获取人脸状态更新列表包含的图像及对应的人脸区域信息,其中,人脸区域信息指的是人脸区域在对应图像中的位置信息。针对人脸状态更新列表的每一张图像,移动终端获取人脸区域信息后,可根据人脸区域信息确定对应图像的人脸区域,并直接根据预设的特征模型在图像的人脸区域中提取图像特征,再根据提取的图像特征对人脸状态更新列表中包含的图像进行聚类。
在本实施例中,可直接根据人脸状态更新列表中图像的人脸区域信息确定人脸区域,并进行特征提取,无需进行人脸识别过程,可加快图像聚类的速度,提高图像聚类的效率。
在一个实施例中,在操作210比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种之前,还包括:获取当前的电源状态,若电源状态满足预设状态,则执行操作210比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种。
移动终端在获取待聚类图像进行图像聚类之前,可先获取当前的电源状态,其中,电源状态可包括可用剩余电量、是否处于充电状态、用电速度等。当电源状态满足预设状态时,再获取待聚类图像,对待聚类图像进行人脸识别,提取待聚类图像的图像特征,并根据图像特征对待聚类图像进行聚类。预设状态可以是可用剩余电量大于预设百分比,或是处于充电状态,或是可用剩余电量大于预设百分比且用电速度小于设定值等,并不限于此,可根据实际需求进行设定。
在其他的实施例中,移动终端也可预先设定进行图像聚类的时间段,若当前的时刻处于进行图像聚类的时间段,则可获取待聚类图像并进行图像聚类,其中,进行图像聚类的时间段可设定在较少使用移动终端的时间段,例如,凌晨的2点至4点等。
在本实施例中,当电源状态满足预设状态,再获取待聚类图像并进行图像聚类,可保证进行图像聚类时移动终端的电源等状态,减少图像聚类对移动终端的使用的影响。
在一个实施例中,提供一种图像处理方法,包括以下操作:
操作(1),获取当前的电源状态。
操作(2),若电源状态满足预设状态,则比对第一数据库及第二数据库中存储的图像 信息,根据第一数据库中图像的路径在第二数据库中进行查找,若在第二数据库中没有查找到对应的图像,则将没有查找到的图像添加到新增图像列表。
操作(3),若在第二数据库中查找到对应的图像,则判断第一数据库中的图像与第二数据库中对应的图像的修改时间是否一致。
操作(4),若修改时间不一致,则判断第一数据库中的图像与第二数据库中对应的图像的消息摘要是否一致;若不一致,则将不一致的图像添加到更新图像列表。
操作(5),若第一数据库中的图像与第二数据库中对应的图像的修改时间一致,或消息摘要一致,则判断修改时间或消息摘要一致的图像的人脸状态是否可见,若不可见,将人脸状态不可见的图像添加到人脸状态更新列表中。
操作(6),若仅生成新增图像列表,则根据新增图像列表确定待聚类图像;若仅生成更新图像列表,则根据更新图像列表确定待聚类图像;若仅生成人脸状态更新列表,则根据人脸状态更新列表确定待聚类图像;若生成新增图像列表及更新图像列表,则根据新增图像列表及更新图像列表确定待聚类图像;若生成新增图像列表及人脸状态更新列表,则根据新增图像列表及人脸状态更新列表确定待聚类图像;若生成更新图像列表及人脸状态更新列表,则根据更新图像列表及人脸状态更新列表确定待聚类图像;若生成新增图像列表、更新图像列表及人脸状态更新列表,则根据新增图像列表、更新图像列表及人脸状态更新列表确定待聚类图像。
操作(7),对新增图像列表和更新图像列表中的至少一种确定的待聚类图像进行人脸识别,并提取图像特征。
操作(8),若人脸状态更新列表不为空,则获取人脸状态更新列表包含的图像及对应的人脸区域信息,根据每个图像的人脸区域信息从对应图像的人脸区域中提取图像特征。
操作(9),根据图像特征对待聚类图像进行聚类。
可以理解地,本申请中可通过移动终端对待聚类图像进行人脸识别,提取待聚类图像的图像特征,并根据图像特征对待聚类图像进行聚类。也可由移动终端将待聚类图像发送至服务器,由服务器提取待聚类图像的图像特征,并根据图像特征对待聚类图像进行聚类,再将聚类结果返回给移动终端,移动终端可根据聚类结果中包含的图像信息及对应的组别信息,将图像添加到对应的组别中。
在本实施例中,比对第一数据库及第二数据库中存储的图像信息,并根据生成的新增图像列表和更新图像列表中的至少一种确定待聚类图像,对待聚类图像进行人脸识别,提取待聚类图像的图像特征,并根据图像特征对待聚类图像进行聚类,在本地对需要进行聚类的图像进行聚类,可以提高图像聚类的效率。
如图4所示,在一个实施例中,提供一种图像处理装置400,包括比对模块410、确定模块420及提取模块430。
比对模块410,用于比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种,其中,第一数据库包括移动终端的媒体数据库,第二数据库包括存储有图像的人脸识别结果的人脸数据库;新增图像列表记录有移动终端中未进行人脸识别的图像,更新图像列表记录有在进行人脸识别后内容发生改变的图像。
确定模块420,用于根据新增图像列表和更新图像列表中的至少一种确定待聚类图像。
在一个实施例中,确定模块420,还用于提取更新图像列表中每个图像的图像特征,从第二数据库中获取与更新图像列表中每个图像对应的存储的图像特征,并将更新图像列表中,提取的图像特征与对应的存储的图像特征的相似度小于预设值的图像确定为待聚类图像。
提取模块430,用于对待聚类图像进行人脸识别,提取待聚类图像的图像特征,并根 据图像特征对待聚类图像进行聚类。
在一个实施例中,提取模块430,还用于当待聚类图像中包含多张重复图像时,则确定多张重复图像的图像质量,并从中选取质量最高的图像进行人脸识别。
上述图像处理装置,比对第一数据库及第二数据库中存储的图像信息,并根据生成的新增图像列表和更新图像列表中的至少一种确定待聚类图像,对待聚类图像进行人脸识别,提取待聚类图像的图像特征,并根据图像特征对待聚类图像进行聚类,在本地对需要进行聚类的图像进行聚类,可以提高图像聚类的效率。
如图5所示,在一个实施例中,比对模块410,包括查找单元412、添加单元414及判断单元416。
查找单元412,用于根据第一数据库中图像的路径在第二数据库中进行查找。
添加单元414,用于若在第二数据库中没有查找到对应的图像,则将没有查找到的图像添加到新增图像列表。
判断单元416,用于若在第二数据库中查找到对应的图像,则判断第一数据库中的图像与第二数据库中对应的图像的修改时间是否一致。
判断单元416,还用于若修改时间不一致,则判断第一数据库中的图像与第二数据库中对应的图像的消息摘要是否一致。
添加单元414,还用于若消息摘要不一致,则将不一致的图像添加到更新图像列表。
在一个实施例中,判断单元416,还用于若第一数据库中的图像与第二数据库中对应的图像的修改时间一致,或消息摘要一致,则判断一致的图像的人脸状态是否可见。
添加单元414,还用于若人脸状态不可见,将人脸状态不可见的图像添加到人脸状态更新列表中,人脸状态更新列表记录有从其他移动终端接收的未参与图像聚类的图像。
在本实施例中,可对比第一数据库与第二数据库的图像信息,生成新增图像列表、更新图像列表和人脸状态更新列表中的至少一种,方便确定需要进行聚类的图像,从而仅对需要进行聚类的图像进行聚类,可以减轻移动终端的处理压力,并提高图像聚类的效率。
在一个实施例中,提取模块430,还用于若人脸状态更新列表不为空,则获取人脸状态更新列表包含的图像及对应的人脸区域信息,并根据每个图像的人脸区域信息从对应图像的人脸区域中提取图像特征。
在本实施例中,可直接根据人脸状态更新列表中图像的人脸区域信息确定人脸区域,并进行特征提取,无需进行人脸识别过程,可加快图像聚类的速度,提高图像聚类的效率。
在一个实施例中,上述图像处理装置400,除了包括比对模块410、确定模块420及提取模块430,还包括状态获取模块。
状态获取模块,用于获取当前的电源状态,若电源状态满足预设状态,则通过比对模块410比对第一数据库及第二数据库中存储的图像,并根据比对结果生成新增图像列表及更新图像列表。
在本实施例中,当电源状态满足预设状态,再获取待聚类图像并进行图像聚类,可保证进行图像聚类时移动终端的电源等状态,减少图像聚类对移动终端的使用的影响。
本申请实施例还提供了一种移动终端。如图6所示,为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该移动终端可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备等任意终端设备,以移动终端为手机为例:
图6为与本申请实施例提供的移动终端相关的手机的部分结构的框图。参考图6,手机包括:射频(Radio Frequency,RF)电路610、存储器620、输入单元630、显示单元640、传感器650、音频电路660、WiFi模块670、处理器680、以及电源690 等部件。本领域技术人员可以理解,图6所示的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
其中,RF电路610可用于收发信息或通话过程中,信号的接收和发送,可将基站的下行信息接收后,给处理器680处理;也可以将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路610还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于GSM、通用分组无线服务(General Packet Radio Service,GPRS)、CDMA、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。
存储器620可用于存储软件程序以及模块,处理器680通过运行存储在存储器620的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器620可主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能的应用程序、图像播放功能的应用程序等)等;数据存储区可存储根据手机的使用所创建的数据(比如音频数据、通讯录等)等。此外,存储器620可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
输入单元630可用于接收输入的数字或字符信息,以及产生与手机600的用户设置以及功能控制有关的键信号输入。具体地,输入单元630可包括触控面板632以及其他输入设备634。触控面板632,也可称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板632上或在触控面板632附近的操作),并根据预先设定的程式驱动相应的连接装置。在一个实施例中,触控面板632可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器680,并能接收处理器680发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板632。除了触控面板632,输入单元630还可以包括其他输入设备634。具体地,其他输入设备634可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)等中的一种或多种。
显示单元640可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元640可包括显示面板642。在一个实施例中,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板642。在一个实施例中,触控面板632可覆盖显示面板642,当触控面板632检测到在其上或附近的触摸操作后,传送给处理器680以确定触摸事件的类型,随后处理器680根据触摸事件的类型在显示面板642上提供相应的视觉输出。虽然在图6中,触控面板632与显示面板642是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板632与显示面板642集成而实现手机的输入和输出功能。
手机600还可包括至少一种传感器650,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板642的亮度,接近传感器可在手机移动到耳边时,关闭显示面板642和/或背光。运动传感器可包括加速度传感器,通过加速度传感器可检测各个方向上加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换)、振动识别相关功能(比如计步器、敲击)等;此外,手机还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器等。
音频电路660、扬声器662和传声器664可提供用户与手机之间的音频接口。音频电路660可将接收到的音频数据转换后的电信号,传输到扬声器662,由扬声器662转换为声音信号输出;另一方面,传声器664将收集的声音信号转换为电信号,由音频电路660接收后转换为音频数据,再将音频数据输出处理器680处理后,经RF电路610可以发送给另一手机,或者将音频数据输出至存储器620以便后续处理。
WiFi属于短距离无线传输技术,手机通过WiFi模块670可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。
处理器680是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器620内的软件程序和/或模块,以及调用存储在存储器620内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。在一个实施例中,处理器680可包括一个或多个处理单元。在一个实施例中,处理器680可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器680中。
手机600还包括给各个部件供电的电源690(比如电池),优选的,电源690可以通过电源管理系统与处理器680逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
在一个实施例中,手机600还可以包括摄像头、蓝牙模块等。
在本申请实施例中,该移动终端所包括的处理器680执行存储在存储器上的计算机程序时实现上述的图像处理方法。
在一个实施例中,提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述的图像处理方法。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。
如此处所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。合适的非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDR SDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (30)

  1. 一种图像处理方法,包括:
    比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种,其中,所述第一数据库包括移动终端的媒体数据库,所述第二数据库包括存储有图像的人脸识别结果的人脸数据库;所述新增图像列表记录有所述移动终端中未进行人脸识别的图像,所述更新图像列表记录有在进行人脸识别后内容发生改变的图像;
    根据所述新增图像列表和更新图像列表中的至少一种确定待聚类图像;及
    对所述待聚类图像进行人脸识别,提取所述待聚类图像的图像特征,并根据所述图像特征对所述待聚类图像进行聚类。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    从所述第二数据库中提取当前的图像分组信息;
    根据所述图像分组信息从所述第二数据库中提取已分组图像的图像特征;
    当所述待聚类图像的图像特征与所述已分组图像的图像特征的相似度大于第一阈值时,将所述待聚类图像分配至相似度大于第一阈值的组别中;及
    当所述待聚类图像的图像特征与所述已分组图像的图像特征的相似度不大于第一阈值时,对所述待聚类图像重新进行聚类,将具有相似图像特征的所述待聚类图像划分生成新的组别。
  3. 根据权利要求1所述的方法,其特征在于,比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种,包括:
    根据第一数据库中图像的路径在第二数据库中进行查找;及
    当在第二数据库中没有查找到对应的图像时,将没有查找到的图像添加到新增图像列表。
  4. 根据权利要求3所述的方法,其特征在于,在所述根据第一数据库中图像的路径在第二数据库中进行查找之后,所述方法还包括:
    当在第二数据库中查找到对应的图像时,判断所述第一数据库中的图像与所述第二数据库中对应的图像的修改时间是否一致;及
    当修改时间不一致时,判断所述第一数据库中的图像与所述第二数据库中对应的图像的消息摘要是否一致;当不一致时,将不一致的图像添加到更新图像列表。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    当第一数据库中的图像与所述第二数据库中对应的图像的修改时间一致,或消息摘要一致时,判断一致的图像的人脸状态是否可见,当不可见时,将人脸状态不可见的图像添加到人脸状态更新列表中,所述人脸状态更新列表记录有从其他移动终端接收的未参与图像聚类的图像。
  6. 根据权利要求5所述的方法,其特征在于,在所述提取所述待聚类图像的图像特征之后,包括:
    当所述人脸状态更新列表不为空时,获取所述人脸状态更新列表包含的图像及对应的人脸区域信息;及
    根据每个图像的人脸区域信息从对应图像的人脸区域中提取图像特征。
  7. 根据权利要求1所述的方法,其特征在于,所述根据所述新增图像列表、更新图像列表中的至少一种确定待聚类图像,包括:
    当根据所述比对结果生成所述新增图像列表时,将所述新增图像列表中的图像作为待聚类图像;
    当根据所述比对结果生成所述更新图像列表时,将所述更新图像列表中的图像作为待聚类图像;及
    当根据所述比对结果生成所述新增图像列表和所述更新图像列表时,将所述新增图像列表和所述更新图像列表中的图像作为待聚类图像。
  8. 根据权利要求1至7任一所述的方法,其特征在于,所述根据所述新增图像列表和更新图像列表中的至少一种确定待聚类图像,包括:
    提取所述更新图像列表中每个图像的图像特征;
    从所述第二数据库中获取与所述更新图像列表中每个图像对应的存储的图像特征;及
    将所述更新图像列表中,提取的图像特征与对应的存储的图像特征的相似度小于预设值的图像确定为待聚类图像。
  9. 根据权利要求1至7任一所述的方法,其特征在于,在所述比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种之前,所述方法还包括:
    获取当前的电源状态,当所述电源状态满足预设状态时,执行所述比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种。
  10. 根据权利要求1所述的方法,其特征在于,所述对所述待聚类图像进行人脸识别,包括:
    当所述待聚类图像中包含多张重复图像时,确定所述多张重复图像的图像质量,并从中选取质量最高的图像进行人脸识别。
  11. 一种移动终端,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行以下操作:
    比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种,其中,所述第一数据库包括移动终端的媒体数据库,所述第二数据库包括存储有图像的人脸识别结果的人脸数据库;所述新增图像列表记录有所述移动终端中未进行人脸识别的图像,所述更新图像列表记录有在进行人脸识别后内容发生改变的图像;根据所述新增图像列表和更新图像列表中的至少一种确定待聚类图像;对所述待聚类图像进行人脸识别,提取所述待聚类图像的图像特征,并根据所述图像特征对所述待聚类图像进行聚类。
  12. 根据权利要求11所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器还执行以下操作:
    从所述第二数据库中提取当前的图像分组信息;根据所述图像分组信息从所述第二数据库中提取已分组图像的图像特征;当所述待聚类图像的图像特征与所述已分组图像的图像特征的相似度大于第一阈值时,将所述待聚类图像分配至相似度大于第一阈值的组别中;当所述待聚类图像的图像特征与所述已分组图像的图像特征的相似度不大于第一阈值时,对所述待聚类图像重新进行聚类,将具有相似图像特征的所述待聚类图像划分生成新的组别。
  13. 根据权利要求11所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种的操作时,还执行以下操作:
    根据第一数据库中图像的路径在第二数据库中进行查找;当在第二数据库中没有查找到对应的图像时,将没有查找到的图像添加到新增图像列表。
  14. 根据权利要求13所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述根据第一数据库中图像的路径在第二数据库中进行查找之后,还执行以下操作:
    当在第二数据库中查找到对应的图像时,判断所述第一数据库中的图像与所述第二数据库中对应的图像的修改时间是否一致;当修改时间不一致时,判断所述第一数据库中的 图像与所述第二数据库中对应的图像的消息摘要是否一致;当不一致时,将不一致的图像添加到更新图像列表。
  15. 根据权利要求14所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器还执行以下操作:
    当第一数据库中的图像与所述第二数据库中对应的图像的修改时间一致,或消息摘要一致时,判断一致的图像的人脸状态是否可见,当不可见时,将人脸状态不可见的图像添加到人脸状态更新列表中,所述人脸状态更新列表记录有从其他移动终端接收的未参与图像聚类的图像。
  16. 根据权利要求15所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述提取所述待聚类图像的图像特征之后,还执行以下操作:
    当所述人脸状态更新列表不为空时,获取所述人脸状态更新列表包含的图像及对应的人脸区域信息;根据每个图像的人脸区域信息从对应图像的人脸区域中提取图像特征。
  17. 根据权利要求11所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述根据所述新增图像列表和更新图像列表中的至少一种确定待聚类图像时,还执行以下操作:
    当根据所述比对结果生成所述新增图像列表时,将所述新增图像列表中的图像作为待聚类图像;当根据所述比对结果生成所述更新图像列表时,将所述更新图像列表中的图像作为待聚类图像;当根据所述比对结果生成所述新增图像列表和所述更新图像列表时,将所述新增图像列表和所述更新图像列表中的图像作为待聚类图像。
  18. 根据权利要求11至17任一所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述根据所述新增图像列表和更新图像列表中的至少一种确定待聚类图像时,还执行以下操作:
    提取所述更新图像列表中每个图像的图像特征;从所述第二数据库中获取与所述更新图像列表中每个图像对应的存储的图像特征;将所述更新图像列表中,提取的图像特征与对应的存储的图像特征的相似度小于预设值的图像确定为待聚类图像。
  19. 根据权利要求11至17任一所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种之前,还执行以下操作:
    获取当前的电源状态,当所述电源状态满足预设状态时,执行所述比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种。
  20. 根据权利要求11所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述对所述待聚类图像进行人脸识别时,还执行以下操作:
    当所述待聚类图像中包含多张重复图像时,确定所述多张重复图像的图像质量,并从中选取质量最高的图像进行人脸识别。
  21. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时,使得所述处理器执行以下操作:
    比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种,其中,所述第一数据库包括移动终端的媒体数据库,所述第二数据库包括存储有图像的人脸识别结果的人脸数据库;所述新增图像列表记录有所述移动终端中未进行人脸识别的图像,所述更新图像列表记录有在进行人脸识别后内容发生改变的图像;根据所述新增图像列表和更新图像列表中的至少一种确定待聚类图像;对所述待聚类图像进行人脸识别,提取所述待聚类图像的图像特征,并根据所述图像特征对所述 待聚类图像进行聚类。
  22. 根据权利要求21所述的计算机可读存储介质,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器还执行以下操作:
    从所述第二数据库中提取当前的图像分组信息;根据所述图像分组信息从所述第二数据库中提取已分组图像的图像特征;当所述待聚类图像的图像特征与所述已分组图像的图像特征的相似度大于第一阈值时,将所述待聚类图像分配至相似度大于第一阈值的组别中;当所述待聚类图像的图像特征与所述已分组图像的图像特征的相似度不大于第一阈值时,对所述待聚类图像重新进行聚类,将具有相似图像特征的所述待聚类图像划分生成新的组别。
  23. 根据权利要求21所述的计算机可读存储介质,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种的操作时,还执行以下操作:
    根据第一数据库中图像的路径在第二数据库中进行查找;当在第二数据库中没有查找到对应的图像时,将没有查找到的图像添加到新增图像列表。
  24. 根据权利要求23所述的计算机可读存储介质,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述根据第一数据库中图像的路径在第二数据库中进行查找之后,还执行以下操作:
    当在第二数据库中查找到对应的图像时,判断所述第一数据库中的图像与所述第二数据库中对应的图像的修改时间是否一致;当修改时间不一致时,判断所述第一数据库中的图像与所述第二数据库中对应的图像的消息摘要是否一致;当不一致时,将不一致的图像添加到更新图像列表。
  25. 根据权利要求24所述的计算机可读存储介质,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器还执行以下操作:
    当第一数据库中的图像与所述第二数据库中对应的图像的修改时间一致,或消息摘要一致时,判断一致的图像的人脸状态是否可见,当不可见时,将人脸状态不可见的图像添加到人脸状态更新列表中,所述人脸状态更新列表记录有从其他移动终端接收的未参与图像聚类的图像。
  26. 根据权利要求25所述的计算机可读存储介质,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述提取所述待聚类图像的图像特征之后,还执行以下操作:
    当所述人脸状态更新列表不为空时,获取所述人脸状态更新列表包含的图像及对应的人脸区域信息;根据每个图像的人脸区域信息从对应图像的人脸区域中提取图像特征。
  27. 根据权利要求21所述的计算机可读存储介质,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述根据所述新增图像列表和更新图像列表中的至少一种确定待聚类图像时,还执行以下操作:
    当根据所述比对结果生成所述新增图像列表时,将所述新增图像列表中的图像作为待聚类图像;当根据所述比对结果生成所述更新图像列表时,将所述更新图像列表中的图像作为待聚类图像;当根据所述比对结果生成所述新增图像列表和所述更新图像列表时,将所述新增图像列表和所述更新图像列表中的图像作为待聚类图像。
  28. 根据权利要求21至27任一所述的计算机可读存储介质,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述根据所述新增图像列表和更新图像列表中的至少一种确定待聚类图像时,还执行以下操作:
    提取所述更新图像列表中每个图像的图像特征;从所述第二数据库中获取与所述更新图像列表中每个图像对应的存储的图像特征;将所述更新图像列表中,提取的图像特征与 对应的存储的图像特征的相似度小于预设值的图像确定为待聚类图像。
  29. 根据权利要求21至27任一所述的计算机可读存储介质,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种之前,还执行以下操作:
    获取当前的电源状态,当所述电源状态满足预设状态时,执行所述比对第一数据库及第二数据库中存储的图像信息,根据比对结果生成新增图像列表和更新图像列表中的至少一种。
  30. 根据权利要求21所述的计算机可读存储介质,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述对所述待聚类图像进行人脸识别时,还执行以下操作:
    当所述待聚类图像中包含多张重复图像时,确定所述多张重复图像的图像质量,并从中选取质量最高的图像进行人脸识别。
PCT/CN2018/104935 2017-09-15 2018-09-11 图像处理方法、移动终端及计算机可读存储介质 WO2019052433A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710850428.9 2017-09-15
CN201710850428.9A CN107729815B (zh) 2017-09-15 2017-09-15 图像处理方法、装置、移动终端及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2019052433A1 true WO2019052433A1 (zh) 2019-03-21

Family

ID=61207579

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/104935 WO2019052433A1 (zh) 2017-09-15 2018-09-11 图像处理方法、移动终端及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN107729815B (zh)
WO (1) WO2019052433A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111507238A (zh) * 2020-04-13 2020-08-07 三一重工股份有限公司 人脸数据筛选方法、装置及电子设备
CN112069137A (zh) * 2020-09-02 2020-12-11 北京百度网讯科技有限公司 生成信息的方法、装置、电子设备及计算机可读存储介质

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729815B (zh) * 2017-09-15 2020-01-14 Oppo广东移动通信有限公司 图像处理方法、装置、移动终端及计算机可读存储介质
CN108846441B (zh) * 2018-06-21 2020-11-10 厦门集微科技有限公司 一种图像相似检测方法和装置、计算机可读存储介质
CN111339210B (zh) * 2018-12-18 2023-04-28 杭州海康威视数字技术股份有限公司 数据聚类方法及装置
CN109658572B (zh) 2018-12-21 2020-09-15 上海商汤智能科技有限公司 图像处理方法及装置、电子设备和存储介质
CN110245679B (zh) * 2019-05-08 2021-12-28 北京旷视科技有限公司 图像聚类方法、装置、电子设备及计算机可读存储介质
CN110232331B (zh) * 2019-05-23 2022-09-27 深圳大学 一种在线人脸聚类的方法及系统
CN110378750A (zh) * 2019-07-25 2019-10-25 秒针信息技术有限公司 图像渲染方法、装置、设备及存储介质
CN110610164A (zh) * 2019-09-16 2019-12-24 爱动信息科技(深圳)有限公司 人脸图像处理方法、系统、服务器及可读存储介质
CN113343827A (zh) * 2021-05-31 2021-09-03 北京达佳互联信息技术有限公司 视频处理方法、装置、电子设备及计算机可读存储介质
CN114492678A (zh) * 2022-04-13 2022-05-13 深圳前海中电慧安科技有限公司 一种人像聚类建档方法、装置、设备及存储介质

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070297652A1 (en) * 2006-05-29 2007-12-27 Kabushiki Kaisha Toshiba Face recognition apparatus and face recognition method
US20120328167A1 (en) * 2011-06-23 2012-12-27 Peng Wu Merging face clusters
CN103049459A (zh) * 2011-10-17 2013-04-17 天津市亚安科技股份有限公司 一种基于特征识别的快速录像检索方法
CN103207870A (zh) * 2012-01-17 2013-07-17 华为技术有限公司 一种照片分类管理方法、服务器、装置及系统
CN104050449A (zh) * 2014-06-13 2014-09-17 无锡天脉聚源传媒科技有限公司 一种人脸识别方法及装置
CN104166694A (zh) * 2014-07-31 2014-11-26 联想(北京)有限公司 一种图像分类存储方法和电子设备
CN104731964A (zh) * 2015-04-07 2015-06-24 上海海势信息科技有限公司 基于人脸识别的人脸摘要方法、视频摘要方法及其装置
CN105069016A (zh) * 2015-07-13 2015-11-18 小米科技有限责任公司 相册管理方法、装置以及终端设备
CN105335714A (zh) * 2015-10-28 2016-02-17 小米科技有限责任公司 照片处理方法、装置和设备
CN105426904A (zh) * 2015-10-28 2016-03-23 小米科技有限责任公司 照片处理方法、装置和设备
CN105554340A (zh) * 2015-12-09 2016-05-04 深圳市华德安科技有限公司 基于执法记录仪的图像处理方法及装置
CN105809174A (zh) * 2016-03-29 2016-07-27 北京小米移动软件有限公司 识别图像的方法及装置
CN107729815A (zh) * 2017-09-15 2018-02-23 广东欧珀移动通信有限公司 图像处理方法、装置、移动终端及计算机可读存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095876B (zh) * 2016-06-06 2021-11-09 北京小米移动软件有限公司 图像处理方法及装置
CN106156347A (zh) * 2016-07-21 2016-11-23 北京奇虎科技有限公司 云相册分类展示方法、装置及服务器
CN106559563B (zh) * 2016-10-31 2020-03-13 努比亚技术有限公司 图像数据处理方法及装置
CN106355170B (zh) * 2016-11-22 2020-03-20 Tcl集团股份有限公司 照片分类方法及装置

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070297652A1 (en) * 2006-05-29 2007-12-27 Kabushiki Kaisha Toshiba Face recognition apparatus and face recognition method
US20120328167A1 (en) * 2011-06-23 2012-12-27 Peng Wu Merging face clusters
CN103049459A (zh) * 2011-10-17 2013-04-17 天津市亚安科技股份有限公司 一种基于特征识别的快速录像检索方法
CN103207870A (zh) * 2012-01-17 2013-07-17 华为技术有限公司 一种照片分类管理方法、服务器、装置及系统
CN104050449A (zh) * 2014-06-13 2014-09-17 无锡天脉聚源传媒科技有限公司 一种人脸识别方法及装置
CN104166694A (zh) * 2014-07-31 2014-11-26 联想(北京)有限公司 一种图像分类存储方法和电子设备
CN104731964A (zh) * 2015-04-07 2015-06-24 上海海势信息科技有限公司 基于人脸识别的人脸摘要方法、视频摘要方法及其装置
CN105069016A (zh) * 2015-07-13 2015-11-18 小米科技有限责任公司 相册管理方法、装置以及终端设备
CN105335714A (zh) * 2015-10-28 2016-02-17 小米科技有限责任公司 照片处理方法、装置和设备
CN105426904A (zh) * 2015-10-28 2016-03-23 小米科技有限责任公司 照片处理方法、装置和设备
CN105554340A (zh) * 2015-12-09 2016-05-04 深圳市华德安科技有限公司 基于执法记录仪的图像处理方法及装置
CN105809174A (zh) * 2016-03-29 2016-07-27 北京小米移动软件有限公司 识别图像的方法及装置
CN107729815A (zh) * 2017-09-15 2018-02-23 广东欧珀移动通信有限公司 图像处理方法、装置、移动终端及计算机可读存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111507238A (zh) * 2020-04-13 2020-08-07 三一重工股份有限公司 人脸数据筛选方法、装置及电子设备
CN111507238B (zh) * 2020-04-13 2023-08-01 盛景智能科技(嘉兴)有限公司 人脸数据筛选方法、装置及电子设备
CN112069137A (zh) * 2020-09-02 2020-12-11 北京百度网讯科技有限公司 生成信息的方法、装置、电子设备及计算机可读存储介质
CN112069137B (zh) * 2020-09-02 2024-05-17 阿波罗智联(北京)科技有限公司 生成信息的方法、装置、电子设备及计算机可读存储介质

Also Published As

Publication number Publication date
CN107729815B (zh) 2020-01-14
CN107729815A (zh) 2018-02-23

Similar Documents

Publication Publication Date Title
WO2019052433A1 (zh) 图像处理方法、移动终端及计算机可读存储介质
WO2019096008A1 (zh) 身份识别方法、计算机设备及存储介质
CN107977674B (zh) 图像处理方法、装置、移动终端及计算机可读存储介质
CN106775637B (zh) 一种应用程序的页面显示方法和装置
CN107871011B (zh) 图像处理方法、装置、移动终端及计算机可读存储介质
CN107679560B (zh) 数据传输方法、装置、移动终端及计算机可读存储介质
CN107679559B (zh) 图像处理方法、装置、计算机可读存储介质和移动终端
WO2019105237A1 (zh) 图像处理方法、计算机设备和计算机可读存储介质
EP3493113B1 (en) Image processing method, computer device, and computer readable storage medium
WO2019105457A1 (zh) 图像处理方法、计算机设备和计算机可读存储介质
CN107944414B (zh) 图像处理方法、装置、电子设备及计算机可读存储介质
CN109325518B (zh) 图像的分类方法、装置、电子设备和计算机可读存储介质
WO2019051795A1 (zh) 图像处理方法、装置、终端、服务器和计算机可读存储介质
WO2019052354A1 (zh) 图像处理方法和系统、计算机设备
CN109508398B (zh) 一种照片分类方法及其终端设备
WO2019052355A1 (zh) 图像处理方法和计算机设备、计算机可读存储介质
WO2019052351A1 (zh) 图像处理方法和系统、计算机设备
WO2019056938A1 (zh) 图像处理方法和计算机设备、计算机可读存储介质
WO2019051797A1 (zh) 图像处理方法和装置、计算机设备、计算机可读存储介质
US10970522B2 (en) Data processing method, electronic device, and computer-readable storage medium
WO2019052319A1 (zh) 数据传输方法、移动终端及计算机可读存储介质
WO2019052436A1 (zh) 图像处理方法、计算机可读存储介质和移动终端
WO2019109887A1 (zh) 图像处理的方法、电子设备、计算机可读存储介质
US11314803B2 (en) Method for image-processing and mobile terminal
CN108021669B (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: 18856804

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18856804

Country of ref document: EP

Kind code of ref document: A1