WO2019075644A1 - 人像照片的搜索方法和终端 - Google Patents

人像照片的搜索方法和终端 Download PDF

Info

Publication number
WO2019075644A1
WO2019075644A1 PCT/CN2017/106588 CN2017106588W WO2019075644A1 WO 2019075644 A1 WO2019075644 A1 WO 2019075644A1 CN 2017106588 W CN2017106588 W CN 2017106588W WO 2019075644 A1 WO2019075644 A1 WO 2019075644A1
Authority
WO
WIPO (PCT)
Prior art keywords
face image
index
similarity
user
portrait photo
Prior art date
Application number
PCT/CN2017/106588
Other languages
English (en)
French (fr)
Inventor
陆晓华
Original Assignee
深圳传音通讯有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳传音通讯有限公司 filed Critical 深圳传音通讯有限公司
Priority to PCT/CN2017/106588 priority Critical patent/WO2019075644A1/zh
Publication of WO2019075644A1 publication Critical patent/WO2019075644A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition

Definitions

  • the present application relates to signal processing technologies, and in particular, to a method and a terminal for searching a portrait photo.
  • some current terminals set a fast search mode for the photos of the user.
  • the photos of different time segments can be divided into multiple photo groups according to the shooting time, according to the target time determined by the user.
  • the segment displays the photo taken during the target time period to the user, so that the user can find the photo he needs in the enlarged photo group.
  • the invention provides a search method and a terminal for a portrait photo, and obtains a target portrait photo by comparing with an index face image, thereby reducing the number of comparisons and improving the search efficiency of the portrait photo.
  • a method for searching a portrait photo comprising:
  • the method before the obtaining the first similarity between the first face image selected by the user and the index face image, the method further includes:
  • the second face image is set as a new index face image
  • the index of the new portrait photo is set as the new index face image
  • the method before the obtaining the first similarity between the first face image selected by the user and the index face image, the method further includes:
  • the extracting the third facial image displayed in the enclosing area of the circular sliding track comprises:
  • the extracting the third facial image displayed in the enclosing area of the circular sliding track comprises:
  • a terminal comprising:
  • a first similarity obtaining module configured to acquire a first similarity between the first face image selected by the user and the index face image, where the index face image is an index of a portrait photo of the same person captured in the photo library;
  • a target index face image determining module configured to determine an index face image corresponding to the first similarity greater than or equal to the preset first similarity threshold as a target index face image
  • the target portrait photo acquisition module is configured to acquire a target portrait photo indexed into the target index face image, and display the target portrait photo to the user.
  • it also includes:
  • An index setting module configured to acquire, in the first, the first face image and the index face image selected by the user Before acquiring the new portrait photo, extracting the second face image in the new portrait photo; acquiring the second similarity between the second face image and the index face image; determining the largest Whether the second similarity is greater than or equal to a preset second similarity threshold; if yes, setting an index of the new portrait photo to the indexed face image corresponding to the maximum second similarity; And setting the second face image as a new index face image, and setting an index of the new portrait photo as the new index face image.
  • it also includes:
  • a first face image determining module configured to determine a sliding track of the user performing a sliding operation on the screen as a circle sliding before acquiring the first similarity between the first face image and the index face image selected by the user At the time of the trajectory, the third face image displayed in the enclosing area of the hoop-shaped sliding trajectory is extracted, and the third face image is determined as the first face image.
  • the first face image determining module is specifically configured to:
  • a third face image displayed in an enclosing area of the circle-shaped sliding track is extracted, and the third face image is determined as the first face image.
  • the first face image determining module is specifically configured to:
  • the screen is acquired from the cache.
  • a terminal comprising: a memory, a processor, and a computer program, wherein the computer program is stored in the memory, the processor running the computer program to execute the first aspect and the first Aspects of the search methods for the portrait photos of various possible designs.
  • a storage medium comprising: a readable storage medium and a computer program, the computer program for implementing the first aspect and the first aspect, various possible design methods for searching for the portrait photo .
  • the method and terminal for searching a portrait photo provided by the present invention first acquire a first similarity between a first face image selected by a user and an index face image, wherein the index face image is a portrait of the same person photographed in the photo library The index of the photo, the invalid comparison and the repeated comparison are removed, and the portrait photo search efficiency is improved; then the index face image corresponding to the first similarity greater than or equal to the preset first similarity threshold is determined as the target Index face map Finally, the target portrait photo indexed to the target index face image is obtained, and the target portrait photo is displayed to the user.
  • the search method of the portrait photo provided by the present invention and the terminal obtain the target portrait by comparing with the index face image. The photo reduces the number of comparisons and has a high efficiency of portrait photo search.
  • FIG. 1 is an example of a method for searching a portrait photo according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a method for searching a portrait photo according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of another method for searching a portrait photo according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of still another method for searching a portrait photo according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of another terminal according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of still another terminal according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of a hardware of a terminal according to an embodiment of the present invention.
  • a display screen with a touch function usually disposed on an electronic device, for displaying information input by the user or information provided to the user to the user, and receiving information input by the user through touch control.
  • the touch control may specifically be that the user inputs the control information of the electronic device by means of a touch, a sliding, or the like.
  • the user interaction screen that the user prompts the user to touch operation may be displayed on the screen, or the user interaction screen may not be displayed.
  • Index face image indication information for pointing to a certain type of portrait photo.
  • Each portrait photo stored in the photo library of the present application is correspondingly configured with an index for searching, and the index is specifically a face image.
  • the portrait photos of the same person are photographed with the same index face image, so that it is possible to search for all portrait photos of a certain person based on the index face image.
  • the original picture displayed on the screen the screen display content at a certain moment acquired from the cache. If the screen display content is a photo, the photo file is obtained from the cache as the original image displayed on the screen, for example, jpg, bmp, gif format a photo file; if the screen display content is a video, the original image is a frame image displayed by the video at the time of acquiring the original image.
  • the screen display content is a photo
  • the photo file is obtained from the cache as the original image displayed on the screen, for example, jpg, bmp, gif format a photo file
  • the screen display content is a video
  • the original image is a frame image displayed by the video at the time of acquiring the original image.
  • Terminal It can be a mobile terminal or a fixed terminal.
  • Mobile terminals include, but are not limited to, mobile devices, personal digital assistants (PDAs), tablets, portable devices (eg, portable computers, pocket computers, or handheld computers), and the like.
  • Fixed terminals include, but are not limited to, fixed devices with image capture functions such as access control, smart landline, and console. The form of the terminal of the present invention is not limited.
  • FIG. 1 is an example of a method for searching a portrait photo according to an embodiment of the present invention.
  • the user stores his or her own photo, a photo of himself and his family, a single photo of the family, a still photo, and a landscape photo in the photo library of the terminal.
  • their own single photos, their own photos with their families, and the family's single photos are all portrait photos, each portrait photo corresponding to at least one index face image. Forming this corresponding way, it can be
  • the index information is added to the attribute information of the portrait photo, or the storage location of the portrait photo and the index face image may be mutually bound.
  • users need to search all of their photos like photos, they include getting their own single photos and taking photos of themselves and their families.
  • This embodiment uses a camera phone as a terminal for illustration.
  • An optional portrait photo search method is shown in Figure 1.
  • the photo gallery of the mobile phone stores six portrait photos (1, 2, 3, 4, 5, 6), and each photo is based on the face contained therein.
  • the image corresponds to at least one index photo.
  • portrait photo 2 corresponds to two index face images: the face image of the wife and the user's own face image.
  • Portrait photo 1 corresponds to only one index face image: the face image of the wife.
  • the user circled the face image in the self-portrait image and the mobile phone detects the user's circle operation and detects the face image within the circled range, and extracts the face image circled by the user from the self-portrait image as FIG. 1
  • the first face image and the index face image are compared one by one, and the similarities are 20%, 50%, and 90%, respectively, wherein 90% is greater than a preset first similarity threshold of 80%. All portrait photos corresponding to the index face image with a similarity of 90% are extracted and displayed to the user.
  • the mobile phone can also perform the next operation on the extracted photos according to the input information of the user, such as playing a slide show, packaging and sending to another terminal, performing image editing uniformly, or making a personal album.
  • FIG. 2 is a schematic flowchart diagram of a method for searching a portrait photo according to an embodiment of the present invention.
  • the execution body of the method flow shown in FIG. 2 may be a terminal.
  • the method shown in FIG. 2 may specifically be:
  • the index face image is an index of a portrait photo of the same person photographed in the photo library.
  • the terminal may be configured to perform step S101 after detecting that the user selects the first face image.
  • the operation of selecting the first face image by the user may be a sliding operation of the user on the screen of the terminal, and may be a click operation on the screen, which may be a voice input, or an operation of shaking the terminal.
  • the terminal compares the first face image with the existing index face image in the terminal, and obtains the first similarity respectively.
  • the first similarity in the patent refers to at least one similarity between the first face image and all index face images. For example, 20%, 50%, and 90% shown in FIG. 1 may be obtained by the embodiment. An example of the first similarity.
  • the method for obtaining the first similarity of the face comparison may be implemented by applying the existing face matching technique, for example, extracting the face image feature vector first, and then calculating the Euclidean distance or the Mahalanobis distance according to the calculated feature vector, the specific ratio
  • the process will not be described in detail here.
  • the portrait photo in the photo library may be a storage method different from the non-portrait photo, and each portrait photo corresponds to at least one index face image.
  • an index library for storing an index face image is set, and each index face image in the index library is configured with an index number.
  • the attribute information of the portrait photo is written with the index number of the corresponding index face image, thereby forming a portrait The correspondence between the photo and the index face image.
  • the terminal only needs to search the index number of an index face image for the portrait photo, and can quickly search for the portrait photo corresponding to the index face image.
  • the terminal does not need to compare the first face image with all the photos in the photo library, and not only removes the invalid comparison with the photo of the unmanned face image such as the landscape photo, but also removes the portrait photo with the same person. Repeating the comparison can reduce the amount of search time.
  • the index face image is set as the index of the portrait photo of the same person in the photo library, and the correspondence between the photo and the photo content is established, which improves the search efficiency of the portrait photo.
  • the greater the first similarity the more the first face image and the index face image may be the same person's face image, so that at least one first similarity is greater than or equal to the preset first similarity.
  • the index face image corresponding to the first similarity is used as the target index face image that the user needs to acquire.
  • the target index face image may be one or two or more.
  • the first similarity threshold is 80%
  • the target index face image is the user's own index face image. If the first similarity threshold in FIG. 1 is changed to 50%, there are two target index face images: the son's index face image and the user's own index face image.
  • the search method may be: first acquiring the target index number of the target index face image, and then searching in the attribute information of the photo gallery portrait photo, and determining the portrait photo including the target index number in the attribute information as the target portrait photo, and finally The determined target portrait photo is displayed to the user.
  • the first similarity between the first face image and the index face image selected by the user is obtained, and the index face image is an index of the portrait photo of the same person in the photo library, and the image is removed. Invalid alignment and repeated comparison improve the efficiency of portrait photo search; then, the index face image corresponding to the first similarity greater than or equal to the preset first similarity threshold is determined as the target index face image; Obtaining a target portrait photo of the target index face image and displaying the target portrait photo to the user.
  • the search method of the portrait photo provided by the embodiment obtains the target portrait photo by comparing with the index face image, thereby reducing the number of comparisons. Has a high portrait photo search efficiency.
  • FIG. 3 is a schematic flowchart diagram of another method for searching a portrait photo according to an embodiment of the present invention.
  • FIG. 4 is an example of another method for searching a portrait photo according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of another embodiment of the present invention An example of a search method for a portrait photo.
  • the terminal may also perform the process of pre-setting the index shown in FIG. 3, and then perform the method steps shown in FIG. 2.
  • the index setting process shown in FIG. 3 may specifically be:
  • a new portrait photo is determined if the portrait is included, and a step S201 is performed; if the portrait is not included, it is confirmed that the acquired non-portrait is Photo, do not perform step S201.
  • the new portrait photo is obtained, which may be a portrait photo taken by the camera, a portrait photo received from another device, or a portrait photo generated by the terminal processing the existing photo.
  • the second face image contained therein is extracted to prepare for the next face comparison, see Figures 4 and 5.
  • the second face image in this patent is a face image that the terminal automatically recognizes from the new portrait photo.
  • the second similarity is directly zeroed (not shown); if the terminal has stored the index face image, the extracted second face image and the index face are extracted. The images are compared to obtain a second similarity (see Figures 4 and 5).
  • the second similarity in the patent is the similarity obtained by comparing the second face image with the existing index face image in the terminal, and each index face image corresponds to a second similarity.
  • the similarity 20%, the similarity 75%, and the similarity 93% shown in FIG. 4 are an example of the second similarity, and the similarity 20%, the similarity 50%, and the similarity 70% shown in FIG. Is another example of the second similarity.
  • S203 Determine whether the largest second similarity is greater than or equal to a preset second similarity threshold. If yes, then S204; if not, then S205.
  • the two determination results of S203 are respectively illustrated in FIG. 4 and FIG.
  • An implementation manner of executing S204 after S203 is illustrated by the example shown in FIG. 4: the obtained second similarity is 20%, 75%, and 93%, and the largest second similarity is 93%, and it is judged that 93% is greater than
  • the preset second similarity threshold is 90%, indicating that a new portrait photo is taken in a person with an indexed face image.
  • Executing S204 the index of the new portrait is set to the user's own face image shown in FIG. 4, thereby obtaining the correspondence relationship between the portrait photo and the index face image shown in FIG. 1.
  • An implementation manner of executing S205 after S203 is illustrated by the example shown in FIG.
  • the obtained second similarity is 20%, 50%, and 70%, and the largest second similarity is 70%, and the judgment is obtained.
  • 70% is less than the preset second similarity threshold of 90%, indicating that no one in the new portrait photo is photographed in the indexed face image.
  • Execution S205 the second face image is set as a new index face image, and the index of the new portrait photo is set as a new index face image (see the dotted line portion of FIG. 5).
  • the index is set, and the structure of the portrait photo stored in the terminal is improved, when the user needs to search for the portrait photo. Can improve search efficiency.
  • the terminal may further perform the process of determining the first face image, and then perform the method steps shown in FIG. 2 or FIG. 3.
  • the process of determining the first face image by the terminal may be specifically: when determining that the sliding track of the user performing the sliding operation on the screen is a circular sliding track, extracting the third face image displayed in the surrounding area of the circular sliding track, The three-face image is determined as the first face image.
  • the manner in which the user selects the first face image may be to draw a circle on the screen to surround the displayed face image (see FIG. 1).
  • the terminal determines whether the sliding track continuously formed by the sliding operation satisfies a preset circle shape, and if not, does not perform processing; if satisfied, determines a circle-shaped sliding track.
  • the terminal may determine whether the sliding track is a closed track, or whether the arc length of the sliding track is greater than a preset value.
  • the selected image displayed in the enclosed area of the circle-shaped sliding track is extracted. The selected image is subjected to face detection.
  • the third face image is extracted as the first face image selected by the user.
  • the third face image in this patent is a face image displayed in a circle-shaped sliding track enclosing area on the screen.
  • the terminal determines the first face image according to the circle-shaped sliding track made by the user, and the operation mode is convenient, and the user experience is provided.
  • An implementation manner of extracting the third face image displayed in the enclosing area of the circle-shaped sliding track may be: when determining the circle-shaped sliding track, first obtaining a snapshot of the screen display content according to the content currently displayed on the screen. Then, in the snapshot, the third face image displayed in the enclosing area of the circle-shaped sliding track is extracted.
  • This kind of implementation is more convenient. Regardless of whether the screen currently displays a dynamic picture or a static picture, a snapshot can be obtained according to the picture displayed on the time screen of the circle-shaped sliding track, and the third face is extracted from the snapshot. The image improves the speed at which the third face image is acquired.
  • Another implementation manner of extracting the third face image displayed in the enclosing area of the circle-shaped sliding track may be: At the moment when it is determined that the circle-shaped sliding track is obtained, the original picture displayed on the screen is first obtained from the cache according to the content currently displayed on the screen. If the screen is displaying a still picture at the time, the original picture is taken directly from the cache. For example, if the screen is displaying a photo at the time, the photo is taken directly from the cache as the original image. If the screen is displaying a dynamic picture at the time, the frame image displayed at the time of the dynamic picture is obtained from the cache as the original picture.
  • the frame image displayed by the video at the time can be obtained from the cache as the original picture.
  • the third face image displayed in the enclosing area of the circle-shaped sliding track is extracted. This implementation obtains a third face image according to the original picture, has the same sharpness as the original face image, and retains the feature information of the face image to the greatest extent, and can have higher accuracy in subsequent face comparison. .
  • the terminal may perform image sharpening processing on the obtained first face image when obtaining the first face image.
  • the image sharpening process specifically compensates the outline of the image, enhances the edge of the image and the portion of the grayscale jump, and makes the image clear.
  • Image sharpening can usually be divided into two types: spatial processing and frequency domain processing.
  • the purpose of image sharpening is to make the edges, outlines, and details of the image clear.
  • the root cause of the blurred image becomes blurred because the image is subjected to averaging or integral operations, so it can be inversely computed. (such as differential operations) can make the image clear.
  • the essence of image blurring is because its high-frequency components are attenuated, so image sharpening can be performed with a high-pass filter to make the image clear.
  • FIG. 6 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • the terminal shown in FIG. 6 may include the following structure:
  • a first similarity obtaining module 61 configured to acquire a first similarity between the first face image selected by the user and the index face image, where the index face image is an index of the portrait photo of the same person captured in the photo library;
  • the target index face image determining module 62 is configured to determine an index face image corresponding to the first similarity greater than or equal to the preset first similarity threshold as the target index face image;
  • the target portrait photo acquisition module 63 is configured to acquire a target portrait photo indexed as a target index face image, and display the target portrait photo to the user.
  • the terminal of the embodiment shown in FIG. 6 is correspondingly used to perform the steps performed by the terminal in the method embodiment shown in FIG. 2, and the implementation principle and technical effects are similar, and details are not described herein again.
  • FIG. 7 is a schematic structural diagram of another terminal according to an embodiment of the present invention. Based on the structure shown in FIG. 6, the terminal shown in FIG. 7 may further include:
  • the index setting module 64 is configured to acquire the first phase of the first face image and the index face image selected by the user Before the degree of similarity, when acquiring a new portrait photo, extracting a second face image in the new portrait photo; acquiring a second similarity of the second face image and the index face image; determining the second largest similarity Whether it is greater than or equal to the preset second similarity threshold; if yes, the index of the new portrait photo is set to the index face image corresponding to the largest second similarity; if not, the second face image is set to The new index face image and the index of the new portrait photo is set to the new index face image.
  • FIG. 8 is a schematic structural diagram of still another terminal according to an embodiment of the present invention.
  • the terminal shown in FIG. 8 may further include:
  • the first face image determining module 65 is configured to determine a sliding track of the user performing a sliding operation on the screen as a circular sliding track before acquiring the first similarity between the first face image and the index face image selected by the user. At the time, the third face image displayed in the enclosing area of the circle-shaped sliding track is extracted, and the third face image is determined as the first face image.
  • the first face image determining module 65 is specifically configured to:
  • the sliding track of the user performing the sliding operation on the screen is a circle-shaped sliding track
  • acquiring a snapshot of the screen display content The third face image displayed in the enclosing area of the circle-shaped sliding track is extracted, and the third face image is determined as the first face image.
  • the first face image determining module 65 is specifically configured to:
  • the original image displayed on the screen is obtained from the cache.
  • the third face image displayed in the enclosing area of the circle-shaped sliding track is extracted.
  • FIG. 9 is a schematic structural diagram of a hardware of a terminal according to an embodiment of the present invention. As shown in FIG. 9, the terminal includes: a processor 911 and a memory 912;
  • the memory 912 is configured to store a computer program, and the memory may also be a flash memory.
  • the processor 911 is configured to execute execution instructions of the memory storage to implement various steps performed by the terminal in the above-mentioned method for searching for a portrait photo. For details, refer to the related description in the foregoing method embodiments.
  • the memory 912 can be either standalone or integrated with the processor 911.
  • the terminal may further include:
  • a bus 913 is provided for connecting the memory 912 and the processor 911.
  • the present invention further provides a readable storage medium.
  • the readable storage medium stores execution instructions.
  • the terminal executes the search for the portrait photo provided by the various embodiments described above. Cable method.
  • the present invention also provides a program product comprising an execution instruction stored in a readable storage medium.
  • At least one processor of the terminal may read the execution instruction from a readable storage medium, and the at least one processor executes the execution instruction such that the terminal implements the search method of the portrait photo provided by the various embodiments described above.
  • the processor may be a central processing unit (English: Central Processing Unit, CPU for short), or may be other general-purpose processors, digital signal processors (English: Digital Signal Processor) , referred to as: DSP), ASIC (English: Application Specific Integrated Circuit, referred to as: ASIC).
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like. The steps of the method disclosed in connection with the present application may be directly embodied by hardware processor execution or by a combination of hardware and software modules in a processor.

Abstract

一种人像照片的搜索方法和终端。该方法首先获取用户选定的第一人脸图像与索引人脸图像的第一相似度(S101),所述索引人脸图像为照片库中拍摄有同一人的人像照片的索引,去除了无效比对和重复比对,提高了人像照片搜索效率;然后将大于或等于预设的第一相似度阈值的第一相似度所对应的索引人脸图像,确定为目标索引人脸图像(S102);最后获取索引为所述目标索引人脸图像的目标人像照片,并向用户显示所述目标人像照片(S103),上述人像照片的搜索方法和终端通过与索引人脸图像的对比获得目标人像照片,减少了对比的次数,具有较高的人像照片搜索效率。

Description

人像照片的搜索方法和终端 技术领域
本申请涉及信号处理技术,尤其涉及一种人像照片的搜索方法和终端。
背景技术
随着数字图像处理技术的发展,用户在日常生活中可以非常简便地使用手机、平板电脑等终端进行拍照。随着拍照方式越来越便捷,用户在终端中存储的照片也日益增加,而如何在众多照片中搜索到特定人物的照片,则成为困扰用户的难题。例如,用户需要将为某位朋友拍摄的照片找出来,但是在终端中存储有上千张照片,包括风景照、静物照、人像照,其中人像照又包括多人照和单人照,如果仅仅靠用户自己一张张辨识寻找,无疑需要花费大量的时间,也可能出现遗漏的情况。
为了解决上述搜索照片难的问题,目前的一些终端为用户的照片设置快速搜索模式,具体地,可以是按照拍摄时间将不同时间段的照片进行区分为多个照片群,根据用户确定的目标时间段,向用户显示目标时间段拍摄的照片,以使得用户可以在放大显示的照片群中寻找到自己需要的照片。
然而,用户在出游期间通常会频繁地拍摄照片,这导致大量的照片集中在同一时间段,用户仍然需要在大量的照片群中进行人工辨识,才能寻找到为某位朋友拍摄的所有照片。现有的照片搜索方法的效率不高。
发明内容
本发明提供一种人像照片的搜索方法和终端,通过与索引人脸图像的对比获得目标人像照片,减少了对比的次数,提高了人像照片的搜索效率。
根据本发明的第一方面,提供一种人像照片的搜索方法,包括:
获取用户选定的第一人脸图像与索引人脸图像的第一相似度,所述索引人脸图像为照片库中拍摄有同一人的人像照片的索引;
将大于或等于预设的第一相似度阈值的第一相似度所对应的索引人脸图像,确定为目标索引人脸图像;
获取索引为所述目标索引人脸图像的目标人像照片,并向用户显示所述目标人像 照片。
可选地,在所述获取用户选定的第一人脸图像与索引人脸图像的第一相似度之前,还包括:
在获取到新的人像照片时,提取所述新的人像照片中的第二人脸图像;
获取所述第二人脸图像与索引人脸图像的第二相似度;
判断最大的第二相似度是否大于或等于预设的第二相似度阈值;
若是,则将所述新的人像照片的索引设置为所述最大的第二相似度对应的所述索引人脸图像;
若否,则将所述第二人脸图像设置为新的索引人脸图像,并将所述新的人像照片的索引设置为所述新的索引人脸图像。
可选地,在所述获取用户选定的第一人脸图像与索引人脸图像的第一相似度之前,还包括:
在确定用户对屏幕进行滑动操作的滑动轨迹为圈形滑动轨迹时,提取所述圈形滑动轨迹的包围区域中显示的第三人脸图像,将所述第三人脸图像确定为所述第一人脸图像。
可选地,所述提取所述圈形滑动轨迹的包围区域中显示的第三人脸图像,包括:
获取屏幕显示内容的快照;
在所述快照中,提取所述圈形滑动轨迹的包围区域中显示的第三人脸图像。
可选地,所述提取所述圈形滑动轨迹的包围区域中显示的第三人脸图像,包括:
从缓存中获取所述屏幕显示的原始图片;
在所述原始图片中,提取所述圈形滑动轨迹的包围区域中显示的第三人脸图像。
根据本发明的第二方面,提供一种终端,包括:
第一相似度获得模块,用于获取用户选定的第一人脸图像与索引人脸图像的第一相似度,所述索引人脸图像为照片库中拍摄有同一人的人像照片的索引;
目标索引人脸图像确定模块,用于将大于或等于预设的第一相似度阈值的第一相似度所对应的索引人脸图像,确定为目标索引人脸图像;
目标人像照片获取模块,用于获取索引为所述目标索引人脸图像的目标人像照片,并向用户显示所述目标人像照片。
可选地,还包括:
索引设置模块,用于在所述获取用户选定的第一人脸图像与索引人脸图像的第一 相似度之前,在获取到新的人像照片时,提取所述新的人像照片中的第二人脸图像;获取所述第二人脸图像与索引人脸图像的第二相似度;判断最大的第二相似度是否大于或等于预设的第二相似度阈值;若是,则将所述新的人像照片的索引设置为所述最大的第二相似度对应的所述索引人脸图像;若否,则将所述第二人脸图像设置为新的索引人脸图像,并将所述新的人像照片的索引设置为所述新的索引人脸图像。
可选地,还包括:
第一人脸图像确定模块,用于在所述获取用户选定的第一人脸图像与索引人脸图像的第一相似度之前,在确定用户对屏幕进行滑动操作的滑动轨迹为圈形滑动轨迹时,提取所述圈形滑动轨迹的包围区域中显示的第三人脸图像,将所述第三人脸图像确定为所述第一人脸图像。
可选地,所述第一人脸图像确定模块具体用于:
在所述获取用户选定的第一人脸图像与索引人脸图像的第一相似度之前,在确定用户对屏幕进行滑动操作的滑动轨迹为圈形滑动轨迹时,获取屏幕显示内容的快照;在所述快照中,提取所述圈形滑动轨迹的包围区域中显示的第三人脸图像,将所述第三人脸图像确定为所述第一人脸图像。
可选地,所述第一人脸图像确定模块具体用于:
在所述获取用户选定的第一人脸图像与索引人脸图像的第一相似度之前,在确定用户对屏幕进行滑动操作的滑动轨迹为圈形滑动轨迹时,从缓存中获取所述屏幕显示的原始图片;在所述原始图片中,提取所述圈形滑动轨迹的包围区域中显示的第三人脸图像。
根据本发明的第三方面,提供一种终端,包括:存储器、处理器以及计算机程序,所述计算机程序存储在所述存储器中,所述处理器运行所述计算机程序执行第一方面及第一方面各种可能的设计的所述人像照片的搜索方法。
根据本发明的第四方面,提供一种存储介质,包括:可读存储介质和计算机程序,所述计算机程序用于实现第一方面及第一方面各种可能的设计所述人像照片的搜索方法。
本发明提供的人像照片的搜索方法和终端,首先获取用户选定的第一人脸图像与索引人脸图像的第一相似度,所述索引人脸图像为照片库中拍摄有同一人的人像照片的索引,去除了无效比对和重复比对,提高了人像照片搜索效率;然后将大于或等于预设的第一相似度阈值的第一相似度所对应的索引人脸图像,确定为目标索引人脸图 像;最后获取索引为所述目标索引人脸图像的目标人像照片,并向用户显示所述目标人像照片,本发明提供的人像照片的搜索方法和终端通过与索引人脸图像的对比获得目标人像照片,减少了对比的次数,具有较高的人像照片搜索效率。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图做简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种人像照片的搜索方法的示例;
图2为本发明实施例提供的一种人像照片的搜索方法的流程示意图;
图3为本发明实施例提供的另一种人像照片的搜索方法的流程示意图;
图4为本发明实施例提供的另一种人像照片的搜索方法的示例;
图5为本发明实施例提供的再一种人像照片的搜索方法的示例;
图6为本发明实施例提供的一种终端的结构示意图;
图7为本发明实施例提供的另一种终端的结构示意图;
图8为本发明实施例提供的再一种终端的结构示意图;
图9为本发明实施例提供的一种终端的硬件结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。本文中使用的术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、 产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。取决于语境,如在此所使用的“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。
下面以具体地实施例对本发明的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。
本发明的术语解释:
(1)屏幕:具有触控功能的显示屏,通常设置在电子设备上,用于向用户显示由用户输入的信息或提供给用户的信息,以及接收用户通过触摸控制输入的信息。触摸控制具体可以是用户通过点击、滑动等触摸方式实现对电子设备控制信息的输入。屏幕上可以显示用户提示用户触控操作的用户交互画面,也可以不显示用户交互画面。
(2)索引人脸图像:用于指向某一类人像照片的指示信息。本申请照片库中存储的每一张人像照片都对应配置有用于搜索的索引,该索引具体为人脸图像。拍摄有属于同一个人的人像照片都具有相同的索引人脸图像,因此可以根据索引人脸图像搜索到拍摄有某一个人的所有人像照片。
(3)屏幕显示内容的快照:从屏幕快速获取的某一时刻的屏幕显示内容,呈现为静态图片。快照的像素与屏幕的显示像素一致。
(4)屏幕显示的原始图片:从缓存获取的某一时刻的屏幕显示内容,若屏幕显示内容为照片,则从缓存获取该照片文件作为屏幕显示的原始图片,例如jpg、bmp、gif格式的照片文件;若屏幕显示内容为视频,则所述原始图片为该视频在获取原始图片时刻显示的帧图片。
(5)终端:可以是移动终端,也可以是固定终端。移动终端包括但不限于手机、个人数字助理(Personal Digital Assistant,简称:PDA)、平板电脑、便携设备(例如,便携式计算机、袖珍式计算机或手持式计算机)等具有图像采集功能的移动设备。固定终端包括但不限于门禁、智能固定电话、控制台等具有图像采集功能的固定设备。本发明对终端的形式并不限定。
图1为本发明实施例提供的一种人像照片的搜索方法的示例。用户在终端的照片库中存储有自己的单人照片、自己与家人的合照、家人的单人照片、静物照片以及风景照片等。其中,自己的单人照片、自己与家人的合照、家人的单人照片都属于人像照片,每张人像照片与至少一个索引人脸图像对应。形成这种对应的方式,可以是在 人像照片的属性信息中添加有索引信息,也可以是人像照片与索引人脸图像的存储位置相互绑定。在用户需要将自己的所有人像照片搜索出来时,包括了获得自己的单人照片以及自己和家人的合照。本实施例以可拍照的手机为终端进行举例说明。一种可选的人像照片搜索方法如图1所示,手机的照片库中存储有6张人像照片(1,2,3,4,5,6),并且每张照片根据其中包含的人脸图像,至少对应一个索引照片。例如,人像照片2对应有两个索引人脸图像:妻子的人脸图像以及用户自己的人脸图像。人像照片1仅对应一个索引人脸图像:妻子的人脸图像。用户在搜索需要自己的照片时,首先用手机拍摄一张自拍像。用户在该自拍像中圈出人脸图像,手机检测到用户的画圈操作并在圈出的范围内检测到人脸图像后,从该自拍像中提取用户圈出的人脸图像作为图1所示的第一人脸图像。将第一人脸图像与索引人脸图像进行一一比对,相似度分别为20%、50%和90%,其中,90%大于预设的第一相似度阈值80%。提取相似度为90%的索引人脸图像对应的所有人像照片,并向用户显示。手机还可以根据用户的输入信息对提取的照片进行下一步的操作,例如播放幻灯片、打包发送给另一个终端、统一进行图像编辑或者制作个人相册等。
图2为本发明实施例提供的一种人像照片的搜索方法的流程示意图。图2所示方法流程的执行主体可以为终端。图2所示的方法具体可以是:
S101,获取用户选定的第一人脸图像与索引人脸图像的第一相似度。
其中,索引人脸图像为照片库中拍摄有同一人的人像照片的索引。
具体地,终端可以是检测到用户选定第一人脸图像的操作后,执行步骤S101。用户选定第一人脸图像的操作可以是用户在终端的屏幕上的滑动操作,可以是屏幕上的点击操作,可以是语音输入,还可以是摇晃终端的操作等。终端在获得用户选定的第一人脸图像后,将第一人脸图像与终端中已有的索引人脸图像进行人脸比对,分别获得第一相似度。本专利中第一相似度是指第一人脸图像与所有索引人脸图像进行对比得到的至少一个相似度,例如图1所示的20%、50%和90%可以是本实施例得到的第一相似度的示例。人脸比对获得第一相似度的方法具体可以是应用现有的人脸比对技术实现,例如先提取人脸图像特征向量,再根据计算特征向量计算欧氏距离或马氏距离,具体比对过程在此不做详细说明。其中,照片库中的人像照片可以是具有与非人像照片不同的存储方式,每张人像照片都与至少一个索引人脸图像对应。一种实现方式中,设置用于存储索引人脸图像的索引库,该索引库中的每个索引人脸图像配置有一个索引号。人像照片的属性信息中写入有其对应的索引人脸图像的索引号,由此形成人像 照片与索引人脸图像的对应。终端只需要对人像照片搜索某个索引人脸图像的索引号,就能将该索引人脸图像对应的人像照片快速搜索出来。终端不需要将第一人脸图像与照片库中的所有照片一一比对,不仅去除了与风景照等无人脸图像的照片的无效比对,还去除了与包含同一个人的人像照片的重复比对,可以减少大量的搜索时间。将索引人脸图像设置为照片库中拍摄有同一人的人像照片的索引,建立了照片与照片内容之间的对应关系,提高了人像照片的搜索效率。
S102,将大于或等于预设的第一相似度阈值的第一相似度所对应的索引人脸图像,确定为目标索引人脸图像。
具体地,第一相似度越大,越表明第一人脸图像与索引人脸图像可能是同一个人的人脸图像,因此在得到至少一个第一相似度大于或等于预设的第一相似度阈值时,将该第一相似度对应的索引人脸图像作为用户需要获取的目标索引人脸图像。目标索引人脸图像可以是一个也可以是两个或者多个,例如图1所示的示例中,第一相似度阈值为80%,目标索引人脸图像为用户自己的索引人脸图像。若图1中第一相似度阈值改为50%,则目标索引人脸图像就有2个:儿子的索引人脸图像和用户自己的索引人脸图像。
S103,获取索引为目标索引人脸图像的目标人像照片,并向用户显示目标人像照片。
具体地,在确定了目标索引人脸图像之后,可以快速地在照片库中搜索到与该目标索引人脸图像对应的人像照片。具体地搜索方式可以是首先获取该目标索引人脸图像的目标索引号,再在照片库人像照片的属性信息中进行查找,将属性信息中包含目标索引号的人像照片确定为目标人像照片,最后向用户显示确定出来的目标人像照片。
本实施例提供的方法中,首先获取用户选定的第一人脸图像与索引人脸图像的第一相似度,索引人脸图像为照片库中拍摄有同一人的人像照片的索引,去除了无效比对和重复比对,提高了人像照片搜索效率;然后将大于或等于预设的第一相似度阈值的第一相似度所对应的索引人脸图像,确定为目标索引人脸图像;最后获取索引为目标索引人脸图像的目标人像照片,并向用户显示目标人像照片,本实施例提供的人像照片的搜索方法通过与索引人脸图像的对比获得目标人像照片,减少了对比的次数,具有较高的人像照片搜索效率。
图3为本发明实施例提供的另一种人像照片的搜索方法的流程示意图。图4为本发明实施例提供的另一种人像照片的搜索方法的示例。图5为本发明实施例提供的再 一种人像照片的搜索方法的示例。在图2所示实施例的基础上,终端还可以是先进行图3所示的预设置索引的过程,再执行图2所示的方法步骤。如图3所示的索引设置过程具体可以是:
S201,在获取到新的人像照片时,提取新的人像照片中的第二人脸图像。
具体地,可以是在获取到新的照片时判断是否包含人像,若包含人像则确定为获取到的是新的人像照片,并且执行S201步骤;若不包含人像,则确认为获取到的是非人像照片,不执行S201步骤。其中,获取到新的人像照片,具体可以是摄像头拍摄获得的人像照片,也可以是从其他设备接收到的人像照片,还可以是终端对已有照片进行处理生成的人像照片。每次得到新的人像照片时,都将其中包含的第二人脸图像提取出来,为下一步的人脸比对做准备,参见图4和图5。本专利中的第二人脸图像是终端自动从新的人像照片中识别出来的人脸图像。
S202,获取第二人脸图像与索引人脸图像的第二相似度。
具体地,若终端不存在索引人脸图像,则第二相似度直接置零(未示出);若终端已存储有索引人脸图像,则将提取出的第二人脸图像与索引人脸图像进行比对,得到第二相似度(参见图4和图5)。本专利中的第二相似度是第二人脸图像与终端中已有的索引人脸图像进行对比获得的相似度,每个索引人脸图像分别对应一个第二相似度。如图4所示的相似度20%、相似度75%和相似度93%是第二相似度的一种示例,如图5所示的相似度20%、相似度50%和相似度70%是第二相似度另一种示例。
S203,判断最大的第二相似度是否大于或等于预设的第二相似度阈值。若是,则S204;若否,则S205。
S204,将新的人像照片的索引设置为最大的第二相似度对应的索引人脸图像。
S205,将第二人脸图像设置为新的索引人脸图像,并将新的人像照片的索引设置为新的索引人脸图像。
具体地,假设预设的第二相似度阈值为90%,S203的两种判断结果以图4和图5分别进行举例说明。以图4所示的示例说明在S203后执行S204的一种实现方式:得到的第二相似度为20%、75%和93%,取最大的第二相似度93%,判断得到93%大于预设的第二相似度阈值90%,表明新的人像照片中拍摄有索引人脸图像中的人。执行S204,将新的人像照的索引设置为图4所示用户自己的人脸图像,从而得到图1所示人像照片和索引人脸图像的对应关系。以图5所示的示例说明在S203后执行S205的一种实现方式:得到的第二相似度为20%、50%和70%,取最大的第二相似度70%,判断得到 70%小于预设的第二相似度阈值90%,表明新的人像照片中没有拍摄索引人脸图像中的人。执行S205,将第二人脸图像设置为新的索引人脸图像,并将新的人像照片的索引设置为新的索引人脸图像(参见图5虚线部分)。
本实施例通过对每一张新的人像照片提取人脸图像与已有的索引人脸图像进行对比,从而设置索引,提高了终端内存储的人像照片的结构性,在用户需要搜索人像照片时,能够提高搜索效率。
在图2或图3所示实施例的基础上,在获取第一相似度之前,终端还可以先进行确定第一人脸图像的过程,再执行图2或图3所示的方法步骤。终端确定第一人脸图像的过程具体可以是:在确定用户对屏幕进行滑动操作的滑动轨迹为圈形滑动轨迹时,提取圈形滑动轨迹的包围区域中显示的第三人脸图像,将第三人脸图像确定为第一人脸图像。
具体地,用户选定第一人脸图像的方式可以是在屏幕上画圈围住显示的人脸图像(参见图1)。终端在检测到用户对屏幕进行滑动操作时,判断该滑动操作连续形成的滑动轨迹是否满足预设的圈形,若不满足则不做处理;若满足则确定得到圈形滑动轨迹。终端在判断滑动轨迹是否满足预设的圈形时,可以是判断滑动轨迹是否是闭合的轨迹,或者滑动轨迹的弧长是否大于预设值。在得到该圈形滑动轨迹的时刻,提取圈形滑动轨迹的包围区域中显示的选定图像。对该选定图像进行人脸检测,若该选定图像包含有第三人脸图像,则提取该第三人脸图像作为用户选定的第一人脸图像。本专利中第三人脸图像是屏幕上圈形滑动轨迹包围区域中显示的人脸图像。本实施例中,终端根据用户做出的圈形滑动轨迹确定第一人脸图像,操作方式便捷,提供了用户体验。
为了更加清楚地解释上述实施例中提取圈形滑动轨迹的包围区域中显示的第三人脸图像的过程,以下用两种可选的实现方式进行说明。
一种提取圈形滑动轨迹的包围区域中显示的第三人脸图像的实现方式,可以是:在确定得到圈形滑动轨迹的时刻,首先根据屏幕当前显示的内容获取屏幕显示内容的快照。然后在快照中,提取圈形滑动轨迹的包围区域中显示的第三人脸图像。这种实现方式较为便捷,无论屏幕当前显示的是动态画面还是静态的画面,都可以根据确定得到圈形滑动轨迹的时刻屏幕显示出来的画面得到一张快照,并从快照中提取第三人脸图像,提高了获取第三人脸图像的速度。
另一种提取圈形滑动轨迹的包围区域中显示的第三人脸图像的实现方式,可以是: 在确定得到圈形滑动轨迹的时刻,首先根据屏幕当前显示的内容从缓存中获取屏幕显示的原始图片。如果屏幕当时正在显示的是静态画面,则直接从缓存中获取原始图片。例如屏幕当时正在显示一张照片,则直接从缓存中获取这张照片作为原始图片。如果屏幕当时正在显示的是动态画面,则从缓存中获取该动态画面在当时显示的帧图像作为原始图片。例如屏幕当时正在显示视频,则可以从缓存中获取视频在当时显示的帧图像作为原始图片。得到原始图片之后,在原始图片中,提取圈形滑动轨迹的包围区域中显示的第三人脸图像。这种实现方式根据原始图片获得第三人脸图像,具有与原始人脸图像一致的清晰度,最大程度保留了人脸图像的特征信息,在后续的人脸对比中能够具有较高的准确性。
在上述实施例的基础上,为了提高人脸对比的准确性,终端在获得第一人脸图像时,还可以对获得的第一人脸图像进行图像锐化处理。图像锐化处理具体是补偿图像的轮廓,增强图像的边缘及灰度跳变的部分,使图像变得清晰。图像锐化处理通常可以分为空域处理和频域处理两类。图像锐化处理的目的是为了使图像的边缘、轮廓线以及图像的细节变的清晰,经过平滑的图像变得模糊的根本原因是因为图像受到了平均或积分运算,因此可以对其进行逆运算(如微分运算)就可以使图像变的清晰。从频率域来考虑,图像模糊的实质是因为其高频分量被衰减,因此可以用高通滤波器进行图像锐化处理来使图像清晰。
图6为本发明实施例提供的一种终端的结构示意图。图6所示的终端可以包括以下结构:
第一相似度获得模块61,用于获取用户选定的第一人脸图像与索引人脸图像的第一相似度,索引人脸图像为照片库中拍摄有同一人的人像照片的索引;
目标索引人脸图像确定模块62,用于将大于或等于预设的第一相似度阈值的第一相似度所对应的索引人脸图像,确定为目标索引人脸图像;
目标人像照片获取模块63,用于获取索引为目标索引人脸图像的目标人像照片,并向用户显示目标人像照片。
图6所示实施例的终端对应地可用于执行图2所示方法实施例中终端执行的步骤,其实现原理和技术效果类似,此处不再赘述。
图7为本发明实施例提供的另一种终端的结构示意图。在图6所示结构的基础上,图7所示的终端还可以包括:
索引设置模块64,用于在获取用户选定的第一人脸图像与索引人脸图像的第一相 似度之前,在获取到新的人像照片时,提取新的人像照片中的第二人脸图像;获取第二人脸图像与索引人脸图像的第二相似度;判断最大的第二相似度是否大于或等于预设的第二相似度阈值;若是,则将新的人像照片的索引设置为最大的第二相似度对应的索引人脸图像;若否,则将第二人脸图像设置为新的索引人脸图像,并将新的人像照片的索引设置为新的索引人脸图像。
图8为本发明实施例提供的再一种终端的结构示意图。在图6和图7所示结构的基础上,图8所示的终端还可以包括:
第一人脸图像确定模块65,用于在获取用户选定的第一人脸图像与索引人脸图像的第一相似度之前,在确定用户对屏幕进行滑动操作的滑动轨迹为圈形滑动轨迹时,提取圈形滑动轨迹的包围区域中显示的第三人脸图像,将第三人脸图像确定为第一人脸图像。
在上述实施例的基础上,第一人脸图像确定模块65具体用于:
在获取用户选定的第一人脸图像与索引人脸图像的第一相似度之前,在确定用户对屏幕进行滑动操作的滑动轨迹为圈形滑动轨迹时,获取屏幕显示内容的快照;在快照中,提取圈形滑动轨迹的包围区域中显示的第三人脸图像,将第三人脸图像确定为第一人脸图像。
在上述实施例的基础上,第一人脸图像确定模块65具体用于:
在获取用户选定的第一人脸图像与索引人脸图像的第一相似度之前,在确定用户对屏幕进行滑动操作的滑动轨迹为圈形滑动轨迹时,从缓存中获取屏幕显示的原始图片;在原始图片中,提取圈形滑动轨迹的包围区域中显示的第三人脸图像。
图9为本发明实施例提供的一种终端的硬件结构示意图。如图9所示,该终端包括:处理器911以及存储器912;其中
存储器912,用于存储计算机程序,该存储器还可以是闪存(flash)。
处理器911,用于执行存储器存储的执行指令,以实现上述人像照片的搜索方法中终端执行的各个步骤。具体可以参见前面方法实施例中的相关描述。
可选地,存储器912既可以是独立的,也可以跟处理器911集成在一起。
当存储器912是独立于处理器911之外的器件时,终端还可以包括:
总线913,用于连接存储器912和处理器911。
本发明还提供一种可读存储介质,可读存储介质中存储有执行指令,当终端的至少一个处理器执行该执行指令时,终端执行上述的各种实施方式提供的人像照片的搜 索方法。
本发明还提供一种程序产品,该程序产品包括执行指令,该执行指令存储在可读存储介质中。终端的至少一个处理器可以从可读存储介质读取该执行指令,至少一个处理器执行该执行指令使得终端实施上述的各种实施方式提供的人像照片的搜索方法。
在上述终端或者服务器的实施例中,应理解,处理器可以是中央处理单元(英文:Central Processing Unit,简称:CPU),还可以是其他通用处理器、数字信号处理器(英文:Digital Signal Processor,简称:DSP)、专用集成电路(英文:Application Specific Integrated Circuit,简称:ASIC)等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (10)

  1. 一种人像照片的搜索方法,其特征在于,包括:
    获取用户选定的第一人脸图像与索引人脸图像的第一相似度,所述索引人脸图像为照片库中拍摄有同一人的人像照片的索引;
    将大于或等于预设的第一相似度阈值的第一相似度所对应的索引人脸图像,确定为目标索引人脸图像;
    获取索引为所述目标索引人脸图像的目标人像照片,并向用户显示所述目标人像照片。
  2. 根据权利要求1所述的方法,其特征在于,在所述获取用户选定的第一人脸图像与索引人脸图像的第一相似度之前,还包括:
    在获取到新的人像照片时,提取所述新的人像照片中的第二人脸图像;
    获取所述第二人脸图像与索引人脸图像的第二相似度;
    判断最大的第二相似度是否大于或等于预设的第二相似度阈值;
    若是,则将所述新的人像照片的索引设置为所述最大的第二相似度对应的所述索引人脸图像;
    若否,则将所述第二人脸图像设置为新的索引人脸图像,并将所述新的人像照片的索引设置为所述新的索引人脸图像。
  3. 根据权利要求1所述的方法,其特征在于,在所述获取用户选定的第一人脸图像与索引人脸图像的第一相似度之前,还包括:
    在确定用户对屏幕进行滑动操作的滑动轨迹为圈形滑动轨迹时,提取所述圈形滑动轨迹的包围区域中显示的第三人脸图像,将所述第三人脸图像确定为所述第一人脸图像。
  4. 根据权利要求3所述的方法,其特征在于,所述提取所述圈形滑动轨迹的包围区域中显示的第三人脸图像,包括:
    获取屏幕显示内容的快照;
    在所述快照中,提取所述圈形滑动轨迹的包围区域中显示的第三人脸图像。
  5. 根据权利要求3所述的方法,其特征在于,所述提取所述圈形滑动轨迹的包围区域中显示的第三人脸图像,包括:
    从缓存中获取所述屏幕显示的原始图片;
    在所述原始图片中,提取所述圈形滑动轨迹的包围区域中显示的第三人脸图像。
  6. 一种终端,其特征在于,包括:
    第一相似度获得模块,用于获取用户选定的第一人脸图像与索引人脸图像的第一相似度,所述索引人脸图像为照片库中拍摄有同一人的人像照片的索引;
    目标索引人脸图像确定模块,用于将大于或等于预设的第一相似度阈值的第一相似度所对应的索引人脸图像,确定为目标索引人脸图像;
    目标人像照片获取模块,用于获取索引为所述目标索引人脸图像的目标人像照片,并向用户显示所述目标人像照片。
  7. 根据权利要求6所述的终端,其特征在于,还包括:
    索引设置模块,用于在所述获取用户选定的第一人脸图像与索引人脸图像的第一相似度之前,在获取到新的人像照片时,提取所述新的人像照片中的第二人脸图像;获取所述第二人脸图像与索引人脸图像的第二相似度;判断最大的第二相似度是否大于或等于预设的第二相似度阈值;若是,则将所述新的人像照片的索引设置为所述最大的第二相似度对应的所述索引人脸图像;若否,则将所述第二人脸图像设置为新的索引人脸图像,并将所述新的人像照片的索引设置为所述新的索引人脸图像。
  8. 根据权利要求6所述的终端,其特征在于,还包括:
    第一人脸图像确定模块,用于在所述获取用户选定的第一人脸图像与索引人脸图像的第一相似度之前,在确定用户对屏幕进行滑动操作的滑动轨迹为圈形滑动轨迹时,提取所述圈形滑动轨迹的包围区域中显示的第三人脸图像,将所述第三人脸图像确定为所述第一人脸图像。
  9. 根据权利要求8所述的终端,其特征在于,所述第一人脸图像确定模块具体用于:
    在所述获取用户选定的第一人脸图像与索引人脸图像的第一相似度之前,在确定用户对屏幕进行滑动操作的滑动轨迹为圈形滑动轨迹时,获取屏幕显示内容的快照;在所述快照中,提取所述圈形滑动轨迹的包围区域中显示的第三人脸图像,将所述第三人脸图像确定为所述第一人脸图像。
  10. 根据权利要求8所述的终端,其特征在于,所述第一人脸图像确定模块具体用于:
    在所述获取用户选定的第一人脸图像与索引人脸图像的第一相似度之前,在确定用户对屏幕进行滑动操作的滑动轨迹为圈形滑动轨迹时,从缓存中获取所述屏幕显示的原始图片;在所述原始图片中,提取所述圈形滑动轨迹的包围区域中显示的第三人 脸图像。
PCT/CN2017/106588 2017-10-17 2017-10-17 人像照片的搜索方法和终端 WO2019075644A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/106588 WO2019075644A1 (zh) 2017-10-17 2017-10-17 人像照片的搜索方法和终端

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/106588 WO2019075644A1 (zh) 2017-10-17 2017-10-17 人像照片的搜索方法和终端

Publications (1)

Publication Number Publication Date
WO2019075644A1 true WO2019075644A1 (zh) 2019-04-25

Family

ID=66173138

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/106588 WO2019075644A1 (zh) 2017-10-17 2017-10-17 人像照片的搜索方法和终端

Country Status (1)

Country Link
WO (1) WO2019075644A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111209425A (zh) * 2020-01-06 2020-05-29 闻泰通讯股份有限公司 图像搜索方法、装置、电子设备及计算机可读存储介质
CN113094530A (zh) * 2019-12-23 2021-07-09 深圳云天励飞技术有限公司 一种图像数据检索方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572905A (zh) * 2014-12-26 2015-04-29 小米科技有限责任公司 照片索引创建方法、照片搜索方法及装置
US9235782B1 (en) * 2012-12-24 2016-01-12 Google Inc. Searching images and identifying images with similar facial features
CN105279165A (zh) * 2014-06-19 2016-01-27 中兴通讯股份有限公司 一种基于通讯录的照片匹配方法及终端
CN106372068A (zh) * 2015-07-20 2017-02-01 中兴通讯股份有限公司 一种图像查找方法及装置、终端
CN106777334A (zh) * 2017-01-12 2017-05-31 珠海格力电器股份有限公司 一种照片分类存储方法、装置及移动终端

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9235782B1 (en) * 2012-12-24 2016-01-12 Google Inc. Searching images and identifying images with similar facial features
CN105279165A (zh) * 2014-06-19 2016-01-27 中兴通讯股份有限公司 一种基于通讯录的照片匹配方法及终端
CN104572905A (zh) * 2014-12-26 2015-04-29 小米科技有限责任公司 照片索引创建方法、照片搜索方法及装置
CN106372068A (zh) * 2015-07-20 2017-02-01 中兴通讯股份有限公司 一种图像查找方法及装置、终端
CN106777334A (zh) * 2017-01-12 2017-05-31 珠海格力电器股份有限公司 一种照片分类存储方法、装置及移动终端

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094530A (zh) * 2019-12-23 2021-07-09 深圳云天励飞技术有限公司 一种图像数据检索方法、装置、电子设备及存储介质
CN113094530B (zh) * 2019-12-23 2024-03-29 深圳云天励飞技术有限公司 一种图像数据检索方法、装置、电子设备及存储介质
CN111209425A (zh) * 2020-01-06 2020-05-29 闻泰通讯股份有限公司 图像搜索方法、装置、电子设备及计算机可读存储介质

Similar Documents

Publication Publication Date Title
US11113523B2 (en) Method for recognizing a specific object inside an image and electronic device thereof
JP7058760B2 (ja) 画像処理方法およびその、装置、端末並びにコンピュータプログラム
CN105072337B (zh) 图片处理方法及装置
WO2017185630A1 (zh) 基于情绪识别的信息推荐方法、装置和电子设备
US9690980B2 (en) Automatic curation of digital images
WO2017054442A1 (zh) 一种图像信息识别处理方法及装置、计算机存储介质
US10594930B2 (en) Image enhancement and repair using sample data from other images
CN108898082B (zh) 图片处理方法、图片处理装置及终端设备
US8693739B2 (en) Systems and methods for performing facial detection
AU2014271204B2 (en) Image recognition of vehicle parts
WO2017107855A1 (zh) 一种图片搜索方法及装置
WO2015039575A1 (en) Method and system for performing image identification
CN115170893B (zh) 共视档位分类网络的训练方法、图像排序方法及相关设备
WO2019109246A1 (zh) 图片查找方法和装置
WO2015196681A1 (zh) 一种图片处理方法及电子设备
WO2019075644A1 (zh) 人像照片的搜索方法和终端
WO2020001016A1 (zh) 运动图像生成方法、装置、电子设备及计算机可读存储介质
US20170200062A1 (en) Method of determination of stable zones within an image stream, and portable device for implementing the method
CN103353879B (zh) 图像处理方法及设备
CN110313001A (zh) 照片处理方法、装置及计算机设备
CN108549702B (zh) 一种移动终端的图片库的清理方法及移动终端
CN108062405B (zh) 图片分类方法、装置、存储介质及电子设备
US11647294B2 (en) Panoramic video data process
CN108769527B (zh) 场景识别方法、装置及终端设备
WO2015185479A1 (en) Method of and system for determining and selecting media representing event diversity

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: 17929128

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: 17929128

Country of ref document: EP

Kind code of ref document: A1