CN112258393A - Method, device and equipment for displaying picture - Google Patents

Method, device and equipment for displaying picture Download PDF

Info

Publication number
CN112258393A
CN112258393A CN202011154788.3A CN202011154788A CN112258393A CN 112258393 A CN112258393 A CN 112258393A CN 202011154788 A CN202011154788 A CN 202011154788A CN 112258393 A CN112258393 A CN 112258393A
Authority
CN
China
Prior art keywords
target
face
faces
picture
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011154788.3A
Other languages
Chinese (zh)
Inventor
王沛彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202011154788.3A priority Critical patent/CN112258393A/en
Publication of CN112258393A publication Critical patent/CN112258393A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • 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/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Geometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • User Interface Of Digital Computer (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a method, a device and equipment for displaying pictures, wherein the method comprises the following steps: responding to the picture viewing instruction, and displaying the selected picture in the display area; carrying out face recognition on the picture, and determining the region information of the recognized face in the picture; and determining a target face needing to be amplified and displayed in the recognized faces, and amplifying the picture according to the regional information of the target face. By utilizing the method disclosed by the invention, through carrying out character recognition on the selected picture, when the character is recognized in the picture, the picture is automatically amplified, the effect of rapidly amplifying and displaying the face in the picture can be realized, and the use experience of a user is improved.

Description

Method, device and equipment for displaying picture
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a method, an apparatus, and a device for displaying a picture.
Background
With the development of technology, electronic devices such as mobile phones or tablet computers are popularized in life of people, and taking pictures, particularly taking pictures of people, by using the electronic devices with cameras becomes a scene commonly occurring in daily life. The electronic equipment stores the photos in the photo album, the current picture viewer can display thumbnails, and after the pictures are selected, the photos can be displayed in a full screen mode. However, the screen size of electronic devices such as mobile terminals is relatively small, and when the proportion of people occupying the picture is relatively small, users often need to manually enlarge the picture to see the picture effect of the shot people, especially the portrait, for evaluating the effects of brightness, skin color, definition, and the like. Because the frequency of magnifying and checking the photos of the people is very high, no matter the photos are magnified manually on the touch screen or magnified by using a mouse and a key, frequent magnifying operations are inconvenient, and the experience is not perfect.
Disclosure of Invention
The invention provides a method, a device and equipment for displaying pictures, which solve the problems that when a user magnifies and views a figure photo, magnification operation is required frequently, viewing of the figure is inconvenient, and experience is not perfect.
In a first aspect, the present invention provides a method for displaying pictures, the method comprising:
responding to the picture viewing instruction, and displaying the selected picture in the display area;
carrying out face recognition on the picture, and determining the region information of the recognized face in the picture;
and determining a target face needing to be amplified and displayed in the recognized faces, and amplifying the picture according to the regional information of the target face.
Optionally, the enlarging the picture according to the region information of the target face includes:
dividing the target human face to be amplified and displayed into at least one batch;
and for each batch of target faces, amplifying the pictures according to the area information of the batch of target faces until the batch of target faces are amplified to a preset multiple.
Optionally, when dividing the target faces to be magnified and displayed into at least one batch, magnifying the pictures until the target faces in the batch are magnified to a preset multiple, further comprising:
and restoring the current picture to the picture before amplification.
Optionally, after the image is enlarged, the method further includes:
determining a current display position and a target display position of a target face, and determining a moving direction according to the current display position and the target display position of the target face;
and moving the amplified picture at a preset speed and in the determined moving direction until the target face is moved to a target display position in a display area.
Optionally, if the number of the target faces in the batch is 1, determining the target display position of the target face includes:
and determining the target display position of the target face according to the principle that the center point of the target face of the batch is superposed with the preset coordinate point of the display area.
Optionally, when the target face to be magnified and displayed is divided into at least two batches, magnifying the picture, including any one of the following steps:
amplifying the pictures according to the area of the region of the target face of each batch and the sequence from large to small of the area;
and amplifying the pictures according to the area of the region of the target face of each batch and the sequence from small to large of the area.
Optionally, determining a target face to be displayed in an enlarged manner in the recognized faces includes:
determining a target face needing to be amplified and displayed in the recognized faces as the face with the largest area of the region of the recognized faces according to the selection indication information of the target face determination mode; or
Determining a target face needing to be amplified and displayed in the recognized face as the face of which the area of the region of the recognized face is larger than a preset threshold according to the selection indication information of the target face determination mode; or
And determining the target human faces needing to be amplified and displayed in the recognized human faces as the specified number of human faces in the recognized human faces according to the selection indication information of the target human face determination mode.
Optionally, determining, according to selection indication information of a target face determination manner, that a target face to be displayed in an enlarged manner in the recognized face is a face with a largest area of the region of the recognized face, including:
judging whether the number of the faces with the largest area in the identified face region is one or not;
if the number is one, determining that the target face is the face with the largest area;
and if the number is at least two, determining that the target face is the face closest to a preset coordinate point in the faces with the largest area.
Optionally, for each batch of target faces, magnifying the picture according to the area information of the batch of target faces until the batch of target faces is magnified to a preset multiple, including:
and determining a preset multiple according to the size of the area of the target face region of each batch and the size of the area of the display region.
Optionally, the enlarging the picture further includes:
and in response to a pause instruction, interrupting the amplification of the picture and entering a state of adjusting the picture in response to an adjusting instruction.
In a second aspect, the present invention provides an apparatus for displaying pictures, comprising a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor is used for reading the program in the memory and executing the following steps:
responding to the picture viewing instruction, and displaying the selected picture in the display area;
carrying out face recognition on the picture, and determining the region information of the recognized face in the picture;
and determining a target face needing to be amplified and displayed in the recognized faces, and amplifying the picture according to the regional information of the target face.
Optionally, the processor enlarges the picture according to the region information of the target face, and includes:
dividing the target human face to be amplified and displayed into at least one batch;
and for each batch of target faces, amplifying the pictures according to the area information of the batch of target faces until the batch of target faces are amplified to a preset multiple.
Optionally, when the processor divides the target faces to be magnified and displayed into at least one batch, the processor magnifies the pictures until the target faces in the batch are magnified to a preset multiple, and is further configured to:
and restoring the current picture to the picture before amplification.
Optionally, after the processor enlarges the picture, the processor is further configured to:
determining a current display position and a target display position of a target face, and determining a moving direction according to the current display position and the target display position of the target face;
and moving the amplified picture at a preset speed and in the determined moving direction until the target face is moved to a target display position in a display area.
Optionally, if the number of the target faces in the batch is 1, the determining, by the processor, the target display position of the target face includes:
and determining the target display position of the target face according to the principle that the center point of the target face of the batch is superposed with the preset coordinate point of the display area.
Optionally, when the processor divides the target face to be displayed in an enlarged manner into at least two batches, the processor enlarges the picture, including any one of the following steps:
amplifying the pictures according to the area of the region of the target face of each batch and the sequence from large to small of the area;
and amplifying the pictures according to the area of the region of the target face of each batch and the sequence from small to large of the area.
Optionally, the determining, by the processor, a target face to be displayed in an enlarged manner in the recognized faces includes:
determining a target face needing to be amplified and displayed in the recognized faces as the face with the largest area of the region of the recognized faces according to the selection indication information of the target face determination mode; or
Determining a target face needing to be amplified and displayed in the recognized face as the face of which the area of the region of the recognized face is larger than a preset threshold according to the selection indication information of the target face determination mode; or
And determining the target human faces needing to be amplified and displayed in the recognized human faces as the specified number of human faces in the recognized human faces according to the selection indication information of the target human face determination mode.
Optionally, the determining, by the processor, according to selection indication information of a target face determination mode, that a target face to be displayed in an enlarged manner in the recognized face is a face with a largest area of the region of the recognized face includes:
judging whether the number of the faces with the largest area in the identified face region is one or not;
if the number is one, determining that the target face is the face with the largest area;
and if the number is at least two, determining that the target face is the face closest to a preset coordinate point in the faces with the largest area.
Optionally, the processor enlarges the picture according to the area information of the target faces of each batch until the target faces of the batch are enlarged by a preset multiple, where the method includes:
and determining a preset multiple according to the size of the area of the target face region of each batch and the size of the area of the display region.
Optionally, the processor enlarges the picture, further comprising:
and in response to a pause instruction, interrupting the amplification of the picture and entering a state of adjusting the picture in response to an adjusting instruction.
In a third aspect, the present invention provides an apparatus for displaying pictures, comprising:
the picture display unit is used for responding to the picture viewing instruction and displaying the selected picture in the display area;
the face recognition unit is used for carrying out face recognition on the picture and determining the region information of the recognized face in the picture;
and the image amplifying unit is used for determining a target face needing to be amplified and displayed in the recognized faces and amplifying the image according to the area information of the target face.
Optionally, the image enlarging unit enlarges the image according to the region information of the target face, including:
dividing the target human face to be amplified and displayed into at least one batch;
and for each batch of target faces, amplifying the pictures according to the area information of the batch of target faces until the batch of target faces are amplified to a preset multiple.
Optionally, when the image magnification unit divides the target faces to be magnified and displayed into at least one batch, the image magnification unit magnifies the images until the target faces in the batch are magnified to a preset multiple, and is further configured to:
and restoring the current picture to the picture before amplification.
Optionally, after the image enlarging unit enlarges the image, the image enlarging unit is further configured to:
determining a current display position and a target display position of a target face, and determining a moving direction according to the current display position and the target display position of the target face;
and moving the amplified picture at a preset speed and in the determined moving direction until the target face is moved to a target display position in a display area.
Optionally, if the number of the target faces in the batch is 1, the determining, by the image enlarging unit, the target display position of the target face includes:
and determining the target display position of the target face according to the principle that the center point of the target face of the batch is superposed with the preset coordinate point of the display area.
Optionally, when the image enlarging unit divides the target face to be enlarged and displayed into at least two batches, enlarging the image, including any one of the following steps:
amplifying the pictures according to the area of the region of the target face of each batch and the sequence from large to small of the area;
and amplifying the pictures according to the area of the region of the target face of each batch and the sequence from small to large of the area.
Optionally, the determining, by the image enlarging unit, a target face to be enlarged and displayed in the recognized faces includes:
determining a target face needing to be amplified and displayed in the recognized faces as the face with the largest area of the region of the recognized faces according to the selection indication information of the target face determination mode; or
Determining a target face needing to be amplified and displayed in the recognized face as the face of which the area of the region of the recognized face is larger than a preset threshold according to the selection indication information of the target face determination mode; or
And determining the target human faces needing to be amplified and displayed in the recognized human faces as the specified number of human faces in the recognized human faces according to the selection indication information of the target human face determination mode.
Optionally, the determining, by the image enlarging unit, that the target face to be enlarged and displayed in the recognized face is the face with the largest area of the region of the recognized face according to the selection indication information of the target face determination mode includes:
judging whether the number of the faces with the largest area in the identified face region is one or not;
if the number is one, determining that the target face is the face with the largest area;
and if the number is at least two, determining that the target face is the face closest to a preset coordinate point in the faces with the largest area.
Optionally, the image enlarging unit enlarges the image for each batch of target faces according to the area information of the batch of target faces until the batch of target faces are enlarged by a preset multiple, where the method includes:
and determining a preset multiple according to the size of the area of the target face region of each batch and the size of the area of the display region.
Optionally, the image enlarging unit enlarges the image, and further includes:
and in response to a pause instruction, interrupting the amplification of the picture and entering a state of adjusting the picture in response to an adjusting instruction.
In a fourth aspect, the present invention provides a computer program medium having a computer program stored thereon, which when executed by a processor, performs the steps of a method of displaying pictures as provided in the first aspect above.
The method, the device and the equipment for displaying the picture have the following beneficial effects that:
through carrying out figure identification on the selected picture, when a figure is identified in the picture, the picture is automatically amplified, the effect of rapidly amplifying and displaying the face in the picture can be realized, and the use experience of a user is improved.
Drawings
Fig. 1 is a flowchart of a method for displaying pictures according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a picture browser according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a selected picture displayed in a display area according to an embodiment of the present invention;
fig. 4 is a schematic diagram of outputting and displaying the target face in the display area according to the embodiment of the present invention;
fig. 5 is a schematic view illustrating a process of enlarging a picture according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an apparatus for displaying pictures according to an embodiment of the present invention;
fig. 7 is a schematic diagram of an apparatus for displaying pictures according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
With the development of technology, electronic devices such as mobile phones or tablet computers are popularized in life of people, and taking pictures, particularly taking pictures of people, by using the electronic devices with cameras becomes a scene commonly occurring in daily life. The electronic equipment stores the photos in the photo album, the current picture viewer can display thumbnails, and after the pictures are selected, the photos can be displayed in a full screen mode.
However, the screen size of electronic devices such as mobile terminals is relatively small, and when the proportion of people occupying the picture is relatively small, users often need to manually enlarge the picture to see the picture effect of the shot people, especially the portrait, for evaluating the effects of brightness, skin color, definition, and the like. Because the frequency of magnifying and checking the photos of the people is very high, no matter the photos are magnified manually on the touch screen or magnified by using a mouse and a key, frequent magnifying operations are inconvenient, and the experience is not perfect.
Based on the above problems, embodiments of the present invention provide a method, an apparatus, and a device for displaying a picture, where a person is identified in a selected picture, and when a person is identified in the picture, the picture is automatically enlarged, so that an effect of quickly enlarging and displaying a face in the picture can be achieved, and user experience can be improved. Embodiments of a method, an apparatus, and a device for displaying a picture according to embodiments of the present invention are provided below.
Example 1
As shown in fig. 1, an embodiment of the invention provides a flowchart of a method for displaying a picture.
Step S101, responding to a picture viewing instruction, and displaying a selected picture in a display area;
it should be noted that, as shown in fig. 2, an embodiment of the present invention provides a schematic diagram of a picture browser, which shows a state of an original picture before responding to a picture viewing instruction.
An image browser is accessed on a mobile device side or other electronic display devices, and in the embodiment of the invention, an album application or a gallery application of a file manager is collectively referred to as an image browser. The picture browser displays thumbnails of all pictures in a tiled mode, and a user selects the thumbnail to be viewed, namely the browser is expected to display the pictures in an enlarged mode.
It should be noted that fig. 2 is only an example of the image browser provided in the embodiment of the present invention, and does not constitute a specific limitation, and the image browser may display thumbnails of pictures in any manner, for example, classifying the pictures according to time or picture size or picture source, and tiling the pictures of the same type in one area.
As shown in fig. 3, an embodiment of the invention provides a schematic diagram of displaying a selected picture in a display area. In response to the picture viewing instruction, displaying the selected picture in the display area, for example, displaying the selected picture in the display area in a full screen mode, or displaying the selected picture in a preset size, for example, 3/4 of the screen.
It should be noted that the image viewing instruction includes, but is not limited to, a user touch, a preset gesture, and a button click.
Step S102, carrying out face recognition on the picture, and determining the region information of the recognized face in the picture;
when the face does not exist in the picture, the display state of the selected picture in the display area is maintained, and no operation is performed.
It should be noted that the image may be subjected to face recognition through any face recognition algorithm, which is not the main point of the embodiment of the present invention.
It should be noted that the information of the area occupied by the face in the picture includes position information of the face and the size of the area of the face.
As an alternative embodiment, the position information of the face may be determined by coordinates of a center of the face, or by coordinates of key points of the face.
As an alternative embodiment, the area of the face can be determined by calculating the area size of an ROI (region of interest) on the face through various operators and functions.
Step S103, determining a target face needing to be amplified and displayed in the recognized faces, and amplifying the picture according to the regional information of the target face.
It should be noted that the target face is a part of the recognized faces or all of the recognized faces, and the target face may be determined according to a preset rule, for example, the target face is determined as a face whose area of the region of the recognized face is greater than a preset threshold. After the displayed target face is determined, the target face is automatically displayed according to a set mode, and the target face can be displayed for multiple times or can be displayed all at once.
As shown in fig. 4, an embodiment of the present invention provides a schematic diagram for displaying the target face in the display area.
As an optional implementation, enlarging the picture, further includes:
and in response to a pause instruction, interrupting the amplification of the picture and entering a state of adjusting the picture in response to an adjusting instruction.
It should be noted that the pause command and the adjustment command include, but are not limited to, a user touch, a preset gesture, and a button click. For example, when the picture is enlarged, the user touches the screen, the enlargement of the picture is interrupted in response to a pause instruction, and the user adjusts the picture through two-finger enlargement.
As an optional implementation, determining a target face to be displayed in an enlarged manner in the recognized faces includes:
determining a target face needing to be amplified and displayed in the recognized faces as the face with the largest area of the region of the recognized faces according to the selection indication information of the target face determination mode; or
Determining a target face needing to be amplified and displayed in the recognized face as the face of which the area of the region of the recognized face is larger than a preset threshold according to the selection indication information of the target face determination mode; or
And determining the target human faces needing to be amplified and displayed in the recognized human faces as the specified number of human faces in the recognized human faces according to the selection indication information of the target human face determination mode.
Embodiment (1): determining a target face to be amplified and displayed in the recognized faces as a face with the largest area of a region of the recognized faces according to selection indication information of a target face determination mode, wherein the method comprises the following steps:
judging whether the number of the faces with the largest area in the identified face region is one or not;
if the number is one, determining that the target face is the face with the largest area;
and if the number is at least two, determining that the target face is the face closest to a preset coordinate point in the faces with the largest area.
It should be noted that the preset coordinate point is a position where the target face is expected to be displayed.
It should be noted that, if there are a plurality of faces with the same area and the same distance from the preset coordinate point, any one of the faces is randomly selected as the target face.
It should be noted that, when a user usually takes a picture of a person, the area of the focused face of the shooting object is the largest, for example, the person plays in a tourist area, the picture taken by the user includes a plurality of faces, but the area of the face of the shooting target is the largest, and the face of the shooting target is closest to the preset coordinate point.
As an alternative embodiment, the condition for determining the target face is not limited to the above manner according to the area of the face, and may also be according to parameters such as a focusing parameter and a resolution of a face region.
Embodiment (2): and determining the target face needing to be amplified and displayed in the recognized face as the face with the area of the region of the recognized face larger than a preset threshold value according to the selection indication information of the target face determination mode.
The method for determining the target face is suitable for the case that the shooting target is multiple, for example, multiple persons perform group photo, the area difference of the faces which are expected to be shot is not large, but the difference of the areas of the faces with the faces of other persons in the background is large, and the effect of directly positioning the multiple shooting targets and performing amplification display can be realized through the method.
For example, the preset threshold is set as 5% of the area of the picture by the selection indication information, and the target face to be displayed in an enlarged manner in the recognized face is the face with the area of the region of the recognized face larger than 5% of the area of the picture.
Embodiment (3): and determining the target human faces needing to be amplified and displayed in the recognized human faces as the specified number of human faces in the recognized human faces according to the selection indication information of the target human face determination mode.
For example, the specified number of the selection indication information is set to be 3, and the target face to be displayed in an enlarged manner in the faces is 3 faces in the recognized faces. If the number of the recognized faces is less than or equal to three, the target faces are all the recognized faces; if the number of the recognized faces is more than three, determining a target face according to a set rule, for example, according to the size of an area, the integrity degree of the faces, the definition degree of the faces and the like, or randomly selecting three faces of the recognized faces as the target face.
It should be noted that, as an optional implementation, after determining the target face by using any of the above manners, enlarging the picture according to the region information of the target face includes:
dividing the target human face to be amplified and displayed into at least one batch;
and for each batch of target faces, amplifying the pictures according to the area information of the batch of target faces until the batch of target faces are amplified to a preset multiple.
It should be noted that, the dividing the target face to be displayed in an enlarged manner into at least one batch includes: (1) dividing the target human faces to be amplified and displayed into a batch, namely displaying all the target human faces at one time; (2) dividing the target human faces to be amplified and displayed into at least two batches, namely displaying all the target human faces for multiple times. The number of the target faces may be one or more, and when the number of the target faces may be one, the display mode that all the target faces are displayed at one time may be adopted.
It should be noted that there may be one or more target faces in each batch.
As an optional implementation manner, when dividing the target faces to be magnified and displayed into at least one batch, magnifying the pictures until the target faces in the batch are magnified to a preset multiple, further comprising:
and restoring the current picture to the picture before amplification.
It should be noted that, the current picture is restored to the picture before enlargement, that is, to the state shown in fig. 2.
As an optional implementation manner, after the enlarging the picture, the method further includes:
determining a current display position and a target display position of a target face, and determining a moving direction according to the current display position and the target display position of the target face;
and moving the amplified picture at a preset speed and in the determined moving direction until the target face is moved to a target display position in a display area.
It should be noted that, the user can set the moving speed to be slow, moderate or fast according to the use habit of the user, so as to meet the needs of the user.
As an optional implementation manner, if the number of the target faces in the batch is 1, determining the target display position of the target face includes:
and determining the target display position of the target face according to the principle that the center point of the target face of the batch is superposed with the preset coordinate point of the display area.
As an optional implementation manner, for each batch of target faces, the enlarging the picture according to the area information of the batch of target faces until the batch of target faces is enlarged to a preset multiple includes:
and determining a preset multiple according to the size of the area of the target face region of each batch and the size of the area of the display region.
Note that the area of the region of the target face enlarged to the preset multiple is not larger than the set ratio of the size of the area of the display region, for example, the long side of the face size does not exceed 2/3 of the screen, and the short side of the face size does not exceed 2/3 of the screen.
The enlargement operation should maintain the original scale without deforming the image.
As an optional implementation manner, when the target face to be displayed in an enlarged manner is divided into at least two batches, the image is enlarged, including any one of the following steps:
amplifying the pictures according to the area of the region of the target face of each batch and the sequence from large to small of the area;
and amplifying the pictures according to the area of the region of the target face of each batch and the sequence from small to large of the area.
It should be noted that the image may be magnified for multiple times according to any sequence, for example, the image may be magnified for multiple times according to the sequence of magnifying a female face first and then magnifying a male face; or the picture is enlarged in multiple times, completely random regardless of any factors.
As an alternative implementation manner, as shown in fig. 5, an embodiment of the present invention provides a schematic flow diagram for enlarging a picture. In this embodiment, the target faces are all the faces identified, one target face is displayed for each batch in the amplification mode, and the pictures are amplified in multiple batches.
Step S501, responding to a picture viewing instruction, and displaying a selected picture in a display area;
step S502, carrying out face recognition on the picture, judging whether a face exists in the picture, if not, executing step S503, and if so, executing step S504;
step S503, keeping the display state of the selected picture in the display area;
and recording the number of the recognized faces as N, and displaying the picture in a full screen mode according to a traditional common mode when N is 0, namely no face information exists in the picture.
Step S504, determining the area information of the recognized face in the picture;
and when N is greater than 0, namely at least 1 face exists in the picture, determining the region information of the recognized faces in the picture, wherein the area size of each face is determined, the area of the nth face is recorded as N _ size, and the face position center coordinate is recorded as N (x, y).
Step S505, according to the area of the target face of each batch, amplifying the pictures according to the sequence from large to small of the area until the target face of the batch is amplified to a preset multiple, and moving the amplified pictures at a preset speed and in a preset moving direction until the target face is moved to a target display position in a display area;
setting a preset coordinate point as a central point of a display screen of the terminal, recording the preset coordinate point as center (0, 0), arranging N target faces from large to small according to the area, and moving the whole picture at a preset speed s, with N (x, y) as a starting point and center (0, 0) as an end point when the nth personal face information is obtained.
And when n (x, y) is close to center (0, 0), the picture is magnified, so that the magnification factor of the picture is maximum when n (x, y) is moved to the center (0, 0).
Step S506, restoring the picture before amplification;
step S507, determining whether all target faces are output and displayed, if not, executing step S505, and if so, executing step S508;
step S508, the state of the picture before enlargement is maintained.
Example 2
An embodiment of the present invention provides an apparatus 600 for displaying pictures, which includes a memory 601 and a processor 602, as shown in fig. 6, where:
the memory is used for storing a computer program;
the processor is used for reading the program in the memory and executing the following steps:
responding to the picture viewing instruction, and displaying the selected picture in the display area;
carrying out face recognition on the picture, and determining the region information of the recognized face in the picture;
and determining a target face needing to be amplified and displayed in the recognized faces, and amplifying the picture according to the regional information of the target face.
Optionally, the processor enlarges the picture according to the region information of the target face, and includes:
dividing the target human face to be amplified and displayed into at least one batch;
and for each batch of target faces, amplifying the pictures according to the area information of the batch of target faces until the batch of target faces are amplified to a preset multiple.
Optionally, when the processor divides the target faces to be magnified and displayed into at least one batch, the processor magnifies the pictures until the target faces in the batch are magnified to a preset multiple, and is further configured to:
and restoring the current picture to the picture before amplification.
Optionally, after the processor enlarges the picture, the processor is further configured to:
determining a current display position and a target display position of a target face, and determining a moving direction according to the current display position and the target display position of the target face;
and moving the amplified picture at a preset speed and in the determined moving direction until the target face is moved to a target display position in a display area.
Optionally, if the number of the target faces in the batch is 1, the determining, by the processor, the target display position of the target face includes:
and determining the target display position of the target face according to the principle that the center point of the target face of the batch is superposed with the preset coordinate point of the display area.
Optionally, when the processor divides the target face to be displayed in an enlarged manner into at least two batches, the processor enlarges the picture, including any one of the following steps:
amplifying the pictures according to the area of the region of the target face of each batch and the sequence from large to small of the area;
and amplifying the pictures according to the area of the region of the target face of each batch and the sequence from small to large of the area.
Optionally, the determining, by the processor, a target face to be displayed in an enlarged manner in the recognized faces includes:
determining a target face needing to be amplified and displayed in the recognized faces as the face with the largest area of the region of the recognized faces according to the selection indication information of the target face determination mode; or
Determining a target face needing to be amplified and displayed in the recognized face as the face of which the area of the region of the recognized face is larger than a preset threshold according to the selection indication information of the target face determination mode; or
And determining the target human faces needing to be amplified and displayed in the recognized human faces as the specified number of human faces in the recognized human faces according to the selection indication information of the target human face determination mode.
Optionally, the determining, by the processor, according to selection indication information of a target face determination mode, that a target face to be displayed in an enlarged manner in the recognized face is a face with a largest area of the region of the recognized face includes:
judging whether the number of the faces with the largest area in the identified face region is one or not;
if the number is one, determining that the target face is the face with the largest area;
and if the number is at least two, determining that the target face is the face closest to a preset coordinate point in the faces with the largest area.
Optionally, the processor enlarges the picture according to the area information of the target faces of each batch until the target faces of the batch are enlarged by a preset multiple, where the method includes:
and determining a preset multiple according to the size of the area of the target face region of each batch and the size of the area of the display region.
Optionally, the processor enlarges the picture, further comprising:
and in response to a pause instruction, interrupting the amplification of the picture and entering a state of adjusting the picture in response to an adjusting instruction.
An embodiment of the present invention provides a schematic diagram of an apparatus for displaying pictures, as shown in fig. 7, including:
a picture display unit 701 configured to display the selected picture in the display area in response to the picture viewing instruction;
a face recognition unit 702, configured to perform face recognition on the picture, and determine area information of a recognized face in the picture;
and the image amplifying unit 703 is configured to determine a target face to be amplified and displayed in the identified faces, and amplify the image according to the region information of the target face.
Optionally, the image enlarging unit enlarges the image according to the region information of the target face, including:
dividing the target human face to be amplified and displayed into at least one batch;
and for each batch of target faces, amplifying the pictures according to the area information of the batch of target faces until the batch of target faces are amplified to a preset multiple.
Optionally, when the image magnification unit divides the target faces to be magnified and displayed into at least one batch, the image magnification unit magnifies the images until the target faces in the batch are magnified to a preset multiple, and is further configured to:
and restoring the current picture to the picture before amplification.
Optionally, after the image enlarging unit enlarges the image, the image enlarging unit is further configured to:
determining a current display position and a target display position of a target face, and determining a moving direction according to the current display position and the target display position of the target face;
and moving the amplified picture at a preset speed and in the determined moving direction until the target face is moved to a target display position in a display area.
Optionally, if the number of the target faces in the batch is 1, the determining, by the image enlarging unit, the target display position of the target face includes:
and determining the target display position of the target face according to the principle that the center point of the target face of the batch is superposed with the preset coordinate point of the display area.
Optionally, when the image enlarging unit divides the target face to be enlarged and displayed into at least two batches, enlarging the image, including any one of the following steps:
amplifying the pictures according to the area of the region of the target face of each batch and the sequence from large to small of the area;
and amplifying the pictures according to the area of the region of the target face of each batch and the sequence from small to large of the area.
Optionally, the determining, by the image enlarging unit, a target face to be enlarged and displayed in the recognized faces includes:
determining a target face needing to be amplified and displayed in the recognized faces as the face with the largest area of the region of the recognized faces according to the selection indication information of the target face determination mode; or
Determining a target face needing to be amplified and displayed in the recognized face as the face of which the area of the region of the recognized face is larger than a preset threshold according to the selection indication information of the target face determination mode; or
And determining the target human faces needing to be amplified and displayed in the recognized human faces as the specified number of human faces in the recognized human faces according to the selection indication information of the target human face determination mode.
Optionally, the determining, by the image enlarging unit, that the target face to be enlarged and displayed in the recognized face is the face with the largest area of the region of the recognized face according to the selection indication information of the target face determination mode includes:
judging whether the number of the faces with the largest area in the identified face region is one or not;
if the number is one, determining that the target face is the face with the largest area;
and if the number is at least two, determining that the target face is the face closest to a preset coordinate point in the faces with the largest area.
Optionally, the image enlarging unit enlarges the image for each batch of target faces according to the area information of the batch of target faces until the batch of target faces are enlarged by a preset multiple, where the method includes:
and determining a preset multiple according to the size of the area of the target face region of each batch and the size of the area of the display region.
Optionally, the image enlarging unit enlarges the image, and further includes:
and in response to a pause instruction, interrupting the amplification of the picture and entering a state of adjusting the picture in response to an adjusting instruction.
The present invention also provides a computer program medium having stored thereon a computer program which, when executed by a processor, implements the steps of a method of displaying pictures provided in embodiment 1 above.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The technical solutions provided by the present application are introduced in detail, and the present application applies specific examples to explain the principles and embodiments of the present application, and the descriptions of the above examples are only used to help understand the method and the core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (22)

1. A method for displaying pictures, comprising:
responding to the picture viewing instruction, and displaying the selected picture in the display area;
carrying out face recognition on the picture, and determining the region information of the recognized face in the picture;
and determining a target face needing to be amplified and displayed in the recognized faces, and amplifying the picture according to the regional information of the target face.
2. The method according to claim 1, wherein enlarging the picture according to the region information of the target face comprises:
dividing the target human face to be amplified and displayed into at least one batch;
and for each batch of target faces, amplifying the pictures according to the area information of the batch of target faces until the batch of target faces are amplified to a preset multiple.
3. The method of claim 2, wherein when the target faces to be magnified and displayed are divided into at least one batch, the method magnifies the pictures until the target faces in the batch are magnified to a preset multiple, and further comprising:
and restoring the current picture to the picture before amplification.
4. The method according to any one of claims 1 to 3, wherein after the enlarging the picture, the method further comprises:
determining a current display position and a target display position of a target face, and determining a moving direction according to the current display position and the target display position of the target face;
and moving the amplified picture at a preset speed and in the determined moving direction until the target face is moved to a target display position in a display area.
5. The method of claim 4, wherein determining the target display position of the target face if the number of the target faces in the batch is 1 comprises:
and determining the target display position of the target face according to the principle that the center point of the target face of the batch is superposed with the preset coordinate point of the display area.
6. The method according to claim 2, wherein when the target face to be magnified and displayed is divided into at least two batches, the picture is magnified, and the method comprises any one of the following steps:
amplifying the pictures according to the area of the region of the target face of each batch and the sequence from large to small of the area;
and amplifying the pictures according to the area of the region of the target face of each batch and the sequence from small to large of the area.
7. The method of claim 1, wherein determining a target face to be displayed in an enlarged manner from among the recognized faces comprises:
determining a target face needing to be amplified and displayed in the recognized faces as the face with the largest area of the region of the recognized faces according to the selection indication information of the target face determination mode; or
Determining a target face needing to be amplified and displayed in the recognized face as the face of which the area of the region of the recognized face is larger than a preset threshold according to the selection indication information of the target face determination mode; or
And determining the target human faces needing to be amplified and displayed in the recognized human faces as the specified number of human faces in the recognized human faces according to the selection indication information of the target human face determination mode.
8. The method according to claim 7, wherein determining, according to selection indication information of a target face determination method, that a target face to be displayed in an enlarged manner in the recognized faces is a face with a largest area of a region of the recognized face comprises:
judging whether the number of the faces with the largest area in the identified face region is one or not;
if the number is one, determining that the target face is the face with the largest area;
and if the number is at least two, determining that the target face is the face closest to a preset coordinate point in the faces with the largest area.
9. The method of claim 2, wherein for each batch of target faces, magnifying the pictures according to the area information of the batch of target faces until the batch of target faces is magnified to a preset multiple comprises:
and determining a preset multiple according to the size of the area of the target face region of each batch and the size of the area of the display region.
10. The method of claim 1, wherein the picture is enlarged, further comprising:
and in response to a pause instruction, interrupting the amplification of the picture and entering a state of adjusting the picture in response to an adjusting instruction.
11. An apparatus for displaying pictures, comprising:
the picture display unit is used for responding to the picture viewing instruction and displaying the selected picture in the display area;
the face recognition unit is used for carrying out face recognition on the picture and determining the region information of the recognized face in the picture;
and the image amplifying unit is used for determining a target face needing to be amplified and displayed in the recognized faces and amplifying the image according to the area information of the target face.
12. The apparatus of claim 11, wherein the enlarging the picture according to the region information of the target face comprises:
dividing the target human face to be amplified and displayed into at least one batch;
and for each batch of target faces, amplifying the pictures according to the area information of the batch of target faces until the batch of target faces are amplified to a preset multiple.
13. The apparatus of claim 12, wherein when the target faces to be magnified and displayed are divided into at least one batch, the method further comprises magnifying the pictures until the target faces in the batch are magnified to a preset multiple, and further comprising:
and restoring the current picture to the picture before amplification.
14. The apparatus according to any one of claims 11 to 13, wherein after enlarging the picture, the apparatus further comprises:
determining a current display position and a target display position of a target face, and determining a moving direction according to the current display position and the target display position of the target face;
and moving the amplified picture at a preset speed and in the determined moving direction until the target face is moved to a target display position in a display area.
15. The apparatus of claim 14, wherein if there are 1 target faces in the batch, determining the target display position of the target face comprises:
and determining the target display position of the target face according to the principle that the center point of the target face of the batch is superposed with the preset coordinate point of the display area.
16. The apparatus of claim 12, wherein when the target face to be magnified and displayed is divided into at least two batches, the method for magnifying the picture comprises any one of the following steps:
amplifying the pictures according to the area of the region of the target face of each batch and the sequence from large to small of the area;
and amplifying the pictures according to the area of the region of the target face of each batch and the sequence from small to large of the area.
17. The apparatus of claim 11, wherein determining a target face to be displayed in an enlarged manner from among the recognized faces comprises:
determining a target face needing to be amplified and displayed in the recognized faces as the face with the largest area of the region of the recognized faces according to the selection indication information of the target face determination mode; or
Determining a target face needing to be amplified and displayed in the recognized face as the face of which the area of the region of the recognized face is larger than a preset threshold according to the selection indication information of the target face determination mode; or
And determining the target human faces needing to be amplified and displayed in the recognized human faces as the specified number of human faces in the recognized human faces according to the selection indication information of the target human face determination mode.
18. The apparatus according to claim 17, wherein determining, according to selection instruction information for a target face determination method, that a target face to be displayed in an enlarged manner in the recognized faces is a face with a largest area of a region of the recognized face comprises:
judging whether the number of the faces with the largest area in the identified face region is one or not;
if the number is one, determining that the target face is the face with the largest area;
and if the number is at least two, determining that the target face is the face closest to a preset coordinate point in the faces with the largest area.
19. The apparatus of claim 12, wherein for each batch of target faces, the enlarging the picture according to the area information of the batch of target faces until the batch of target faces is enlarged to a preset multiple comprises:
and determining a preset multiple according to the size of the area of the target face region of each batch and the size of the area of the display region.
20. The apparatus of claim 11, wherein the picture is enlarged, further comprising:
and in response to a pause instruction, interrupting the amplification of the picture and entering a state of adjusting the picture in response to an adjusting instruction.
21. An apparatus for displaying pictures, comprising a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor is used for reading the program in the memory and executing the method for displaying the picture according to any one of claims 1 to 10.
22. A computer program medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of a method of displaying pictures as claimed in claims 1 to 10.
CN202011154788.3A 2020-10-26 2020-10-26 Method, device and equipment for displaying picture Pending CN112258393A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011154788.3A CN112258393A (en) 2020-10-26 2020-10-26 Method, device and equipment for displaying picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011154788.3A CN112258393A (en) 2020-10-26 2020-10-26 Method, device and equipment for displaying picture

Publications (1)

Publication Number Publication Date
CN112258393A true CN112258393A (en) 2021-01-22

Family

ID=74262954

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011154788.3A Pending CN112258393A (en) 2020-10-26 2020-10-26 Method, device and equipment for displaying picture

Country Status (1)

Country Link
CN (1) CN112258393A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101626450A (en) * 2008-07-11 2010-01-13 鸿富锦精密工业(深圳)有限公司 Display device and image enlargement method thereof
TW201005679A (en) * 2008-07-25 2010-02-01 Hon Hai Prec Ind Co Ltd Display device and image zooming method thereof
CN101732071A (en) * 2009-10-21 2010-06-16 无锡祥生科技有限公司 Real-time image amplification display method suitable for ultrasonic diagnosis equipment
CN101873426A (en) * 2009-04-25 2010-10-27 鸿富锦精密工业(深圳)有限公司 Image preview system and image preview method thereof
CN105491284A (en) * 2015-11-30 2016-04-13 小米科技有限责任公司 Preview image display method and device
CN105867858A (en) * 2016-03-22 2016-08-17 广东欧珀移动通信有限公司 Control method, control device and electronic device
CN107124543A (en) * 2017-02-20 2017-09-01 维沃移动通信有限公司 A kind of image pickup method and mobile terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101626450A (en) * 2008-07-11 2010-01-13 鸿富锦精密工业(深圳)有限公司 Display device and image enlargement method thereof
TW201005679A (en) * 2008-07-25 2010-02-01 Hon Hai Prec Ind Co Ltd Display device and image zooming method thereof
CN101873426A (en) * 2009-04-25 2010-10-27 鸿富锦精密工业(深圳)有限公司 Image preview system and image preview method thereof
CN101732071A (en) * 2009-10-21 2010-06-16 无锡祥生科技有限公司 Real-time image amplification display method suitable for ultrasonic diagnosis equipment
CN105491284A (en) * 2015-11-30 2016-04-13 小米科技有限责任公司 Preview image display method and device
CN105867858A (en) * 2016-03-22 2016-08-17 广东欧珀移动通信有限公司 Control method, control device and electronic device
CN107124543A (en) * 2017-02-20 2017-09-01 维沃移动通信有限公司 A kind of image pickup method and mobile terminal

Similar Documents

Publication Publication Date Title
CN110100251B (en) Apparatus, method, and computer-readable storage medium for processing document
CN109064390B (en) Image processing method, image processing device and mobile terminal
EP3125135B1 (en) Picture processing method and device
US11256904B2 (en) Image candidate determination apparatus, image candidate determination method, program for controlling image candidate determination apparatus, and recording medium storing program
EP2283642B1 (en) Method, apparatus, and computer program product for presenting burst images
CN108961157B (en) Picture processing method, picture processing device and terminal equipment
US10430456B2 (en) Automatic grouping based handling of similar photos
CN108898082B (en) Picture processing method, picture processing device and terminal equipment
US9251404B2 (en) Name bubble handling
WO2022042679A1 (en) Picture processing method and apparatus, device, and storage medium
US10140005B2 (en) Causing elements to be displayed
CN104754223A (en) Method for generating thumbnail and shooting terminal
CN111223045B (en) Jigsaw method and device and terminal equipment
US9767588B2 (en) Method and apparatus for image processing
US10304232B2 (en) Image animation in a presentation document
CN108932703B (en) Picture processing method, picture processing device and terminal equipment
JP4724242B2 (en) Electronic apparatus and image display method
JP5886662B2 (en) Image display device
CN110677586B (en) Image display method, image display device and mobile terminal
JP2007219761A (en) Image classification display device and image classification display program
WO2016188199A1 (en) Method and device for clipping pictures
CN108763491B (en) Picture processing method and device and terminal equipment
CN112258393A (en) Method, device and equipment for displaying picture
CN113273167B (en) Data processing apparatus, method and storage medium
TWM589834U (en) Augmented Reality Integration System

Legal Events

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