CN109840059B - Method and apparatus for displaying image - Google Patents

Method and apparatus for displaying image Download PDF

Info

Publication number
CN109840059B
CN109840059B CN201910086013.8A CN201910086013A CN109840059B CN 109840059 B CN109840059 B CN 109840059B CN 201910086013 A CN201910086013 A CN 201910086013A CN 109840059 B CN109840059 B CN 109840059B
Authority
CN
China
Prior art keywords
image
human body
amplified
size
determining
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.)
Active
Application number
CN201910086013.8A
Other languages
Chinese (zh)
Other versions
CN109840059A (en
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.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910086013.8A priority Critical patent/CN109840059B/en
Publication of CN109840059A publication Critical patent/CN109840059A/en
Application granted granted Critical
Publication of CN109840059B publication Critical patent/CN109840059B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Image Processing (AREA)

Abstract

Embodiments of the present disclosure disclose methods and apparatus for displaying images. One embodiment of the method comprises: acquiring a currently displayed image to be amplified; determining a human body image from the image to be amplified; determining whether the size of the human body image is smaller than a preset size; in response to the fact that the size of the image to be amplified is smaller than the preset size, amplifying the image to be amplified to enable the human body image to reach the target size; and moving the amplified image to be amplified so as to enable the display position of the amplified human body image to reach the target position. The implementation mode can simulate the automatic tracking of the lens, and improves the flexibility of the image display of the person.

Description

Method and apparatus for displaying image
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a method and apparatus for displaying an image.
Background
With the development of computer technology, people can use terminal devices such as mobile phones and tablet computers to perform various operations such as picture taking, video chatting and the like. When people use the terminal devices to take self-portrait or shoot other people, the people or other people are usually required to hold the terminal devices by hands to follow the moving shot people so as to place the shot people in the center of the screen. Or when the terminal device is fixed at a certain position, the position of the person to be shot needs to be fixed so that the image of the person to be shot is centered on the screen.
Disclosure of Invention
Embodiments of the present disclosure propose methods and apparatuses for displaying images.
In a first aspect, an embodiment of the present disclosure provides a method for displaying an image, the method including: acquiring a currently displayed image to be amplified; determining a human body image from the image to be amplified; determining whether the size of the human body image is smaller than a preset size; in response to the fact that the size of the image to be amplified is smaller than the preset size, amplifying the image to be amplified to enable the human body image to reach the target size; and moving the amplified image to be amplified so as to enable the display position of the amplified human body image to reach the target position.
In some embodiments, determining an image of a human body from an image to be magnified includes: detecting key points of human bones of an image to be amplified to obtain a human bone key point information set; and determining a human body image based on the human body skeleton key point information set.
In some embodiments, determining the human body image based on the human body bone key point information set comprises: and determining an image for representing the upper half of the human body as a human body image based on the human body skeleton key point information set.
In some embodiments, magnifying the image to be magnified to bring the image of the human body to a target size comprises: and determining that the human body image reaches the target size in response to the fact that the magnification of the magnified image to be magnified reaches the preset magnification and the size of the magnified human body image is smaller than the preset size.
In some embodiments, moving the enlarged image to be enlarged so that the display position of the enlarged human body image reaches the target position includes: determining a human body central point from the amplified human body image; moving the image to be amplified to enable the human body center point to move towards an interface center point of an interface for displaying the image to be amplified; and determining that the display position of the amplified human body image reaches the target position in response to determining that the central point of the human body coincides with the central point of the interface.
In some embodiments, after moving the image to be enlarged to move the center point of the human body toward the interface center point of the interface for displaying the image to be enlarged, the method further includes: and determining that the display position of the amplified human body image reaches the target position in response to determining that the sideline of the amplified image to be amplified is superposed with the sideline of the interface.
In a second aspect, an embodiment of the present disclosure provides an apparatus for displaying an image, the apparatus including: an acquisition unit configured to acquire a currently displayed image to be enlarged; a first determination unit configured to determine a human body image from an image to be enlarged; a second determination unit configured to determine whether a size of the human body image is smaller than a preset size; the amplifying unit is configured to amplify the image to be amplified to enable the human body image to reach the target size in response to the fact that the size of the image to be amplified is smaller than the preset size; and the moving unit is configured to move the amplified image to be amplified so that the display position of the amplified human body image reaches the target position.
In some embodiments, the first determination unit comprises: the detection module is configured to detect the key points of the human bones of the image to be amplified to obtain an information set of the key points of the human bones; a first determination module configured to determine a human body image based on the set of human body bone keypoint information.
In some embodiments, the first determination module is further configured to: and determining an image for representing the upper half of the human body as a human body image based on the human body skeleton key point information set.
In some embodiments, the amplification unit is further configured to: and determining that the human body image reaches the target size in response to the fact that the magnification of the magnified image to be magnified reaches the preset magnification and the size of the magnified human body image is smaller than the preset size.
In some embodiments, a mobile unit comprises: a second determination module configured to determine a human body center point from the enlarged human body image; a moving module configured to move the image to be magnified so that the human body center point moves toward an interface center point of an interface for displaying the image to be magnified; a third determination module configured to determine that the display position of the magnified human body image reaches the target position in response to determining that the human body center point coincides with the interface center point.
In some embodiments, the mobile unit further comprises: and the fourth determination module is configured to respond to the fact that the edge line of the amplified image to be amplified is coincident with the edge line of the interface, and determine that the display position of the amplified human body image reaches the target position.
In a third aspect, an embodiment of the present disclosure provides a terminal device, including: one or more processors; a storage device having one or more programs stored thereon; when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method as described in any implementation of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable medium on which a computer program is stored, which computer program, when executed by a processor, implements the method as described in any of the implementations of the first aspect.
According to the method and the device for displaying the image, the currently displayed image to be amplified is obtained, the human body image is determined from the image to be amplified, if the size of the human body image is smaller than the preset size, the image to be amplified is amplified to enable the human body image to reach the target size, and finally the amplified image to be amplified is moved to enable the display position of the amplified human body image to reach the target position, so that the human body image can be moved to the target position on a screen in real time without moving a shooting device, automatic tracking of a lens can be simulated, and the flexibility of displaying the human image is improved.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present disclosure may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for displaying an image, according to an embodiment of the present disclosure;
FIG. 3 is a schematic illustration of one application scenario for a method of displaying an image according to an embodiment of the present disclosure;
FIG. 4 is a flow diagram of yet another embodiment of a method for displaying an image, according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of an embodiment of an apparatus for displaying an image, according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a terminal device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant disclosure and are not limiting of the disclosure. It should be noted that, for the convenience of description, only the parts relevant to the related disclosure are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 of a method for displaying an image or an apparatus for displaying an image to which embodiments of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. Various communication client applications, such as a shooting application, a video playing application, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal apparatuses 101, 102, 103 are hardware, various electronic apparatuses having a display screen may be used. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the above-described electronic apparatuses. It may be implemented as multiple pieces of software or software modules (e.g., software or software modules used to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server that provides various services, such as a background server that provides support for images or videos taken on the terminal devices 101, 102, 103. The background server can receive the image or video sent by the terminal device or send the image or video to the terminal device.
It should be noted that the method for displaying an image provided by the embodiment of the present disclosure is generally performed by the terminal devices 101, 102, 103, and accordingly, the apparatus for displaying an image is generally disposed in the terminal devices 101, 102, 103.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as multiple pieces of software or software modules (e.g., software or software modules used to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. In the case where the image to be magnified does not need to be acquired from a remote location, the system architecture described above may not include a server and a network.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for displaying an image according to the present disclosure is shown. The method for displaying an image includes the steps of:
step 201, acquiring a currently displayed image to be amplified.
In the present embodiment, an execution subject (e.g., a terminal device shown in fig. 1) of the method for displaying an image may acquire an image to be enlarged that is currently displayed. The image to be enlarged may be an image displayed on a screen included in the execution main body, or an image displayed on another electronic device communicatively connected to the execution main body.
As an example, the execution subject may be a smart phone, and the user may use the smart phone to take a self-timer. The image to be magnified may be an image currently displayed on the screen of the smartphone when the user self-photographs.
Step 202, determining a human body image from the image to be amplified.
In this embodiment, the executing body may determine a human body image from the image to be enlarged. Specifically, as an example, the executing body described above may determine a human body image from an image to be enlarged using an existing human body image detection method. For example, the human body image may be detected using an existing object detection model with the human body image as a detection target. The target detection model may be a model established based on an existing target detection network (e.g., ssd (single Shot multi box detector), dpm (deformable Part model), etc.). The object detection model may determine the position of an object image (e.g., a human body image) from the images input thereto. In general, the object detection model may output coordinate information that may be used to characterize the position of the human body image in the image to be magnified. For example, the coordinate information may include coordinates representing two opposite corners of a rectangular frame, and a rectangular area may be determined in the image to be enlarged according to the coordinates of the two opposite corners, where the image covered by the rectangular area is the human body image.
In some optional implementations of the embodiment, the executing subject may determine the human body image from the image to be enlarged according to the following steps:
firstly, human skeleton key point detection is carried out on an image to be amplified to obtain a human skeleton key point information set. Wherein the human skeleton key point information is used for indicating human skeleton key points. The human skeleton key points are points for characterizing specific parts of the human body, such as the vertex, elbow joint, shoulder joint and the like. The human bone key point information may include coordinates in a coordinate system established on the image to be magnified, which may be used to characterize the location of the human bone key points in the image to be magnified.
In this embodiment, the executing body may perform human bone keypoint detection on the image to be magnified according to various existing methods for determining human bone keypoints. For example, the executing body may input the image to be enlarged into a pre-trained Convolutional Neural Network (CNN) to obtain a set of information about key points of the human skeleton. The convolutional neural network may be any of various conventional convolutional neural Networks, such as R-CNN (Region-CNN), STN (Spatial Transform Networks), and the like. It should be noted that the above method for detecting key points of human bones is a well-known technique widely studied and applied at present, and is not described herein again.
Then, based on the human skeleton key point information set, a human body image is determined. Specifically, as an example, the execution subject may determine, as a human body image, an image indicated by a minimum rectangle including human body bone key points respectively represented by the respective pieces of human body bone key point information, from the image to be enlarged.
In some optional implementations of the embodiment, the execution subject may determine, as the human body image, an image representing an upper half of the human body based on the set of human body skeletal keypoint information. Specifically, as an example, each piece of human skeleton key point information has a corresponding serial number, and the serial number may be determined by the execution main body according to the human body part corresponding to the human skeleton key point indicated by each piece of human skeleton key point information when the human skeleton key point information set is detected. The technician may preset a serial number of the human bone key point information representing the upper half of the human body, and the execution agent may determine, as the human body image, a rectangular region (for example, a region included in a minimum rectangle, or a region included in a rectangle obtained by enlarging the minimum rectangle by a predetermined multiple) including the human bone key points indicated by the human bone key point information corresponding to the serial numbers in the image to be enlarged, based on the preset serial number. For example, human skeletal keypoint information characterizing the upper body of a human includes: the human skeleton key information used for indicating the vertex, the human skeleton key information used for indicating two shoulder joints and the human skeleton key information used for indicating two hip joints. The execution main body can determine a rectangular region including human skeleton key points indicated by the human skeleton key point information respectively corresponding to the serial numbers as a human body image according to the serial numbers of the human skeleton key information.
Step 203, determining whether the size of the human body image is smaller than a preset size.
In this embodiment, the execution body may determine whether the size of the human body image is smaller than a preset size. The size of an image is usually characterized by the number of pixels, such as x × y, where x is the number of horizontal pixels and y is the number of vertical pixels. The preset size may be a preset fixed size; alternatively, the preset size may be a size determined according to a preset ratio, for example, assuming that the size of the interface for displaying the image to be enlarged is m × n and the preset ratio is 0.8, the preset size is 0.8m × 0.8 n. It should be noted that, when at least one of the following conditions is satisfied, it may be determined that the size of the human body image is smaller than the preset size: the number of horizontal pixels of the human body image is smaller than that of horizontal pixels of the preset size, the number of longitudinal pixels of the human body image is smaller than that of longitudinal pixels of the preset size, and the number of pixels included in a diagonal line of the human body image is smaller than that of pixels included in a diagonal line of a rectangle represented by the preset size. It should be understood that the above conditions are merely exemplary, and in practice, other conditions may also be included.
And 204, in response to the fact that the size of the image to be amplified is smaller than the preset size, amplifying the image to be amplified so as to enable the human body image to reach the target size.
In this embodiment, the executing body may enlarge the image to be enlarged in response to determining that the size of the human body image is smaller than the preset size, so that the human body image reaches the target size.
The target size may be equal to the preset size or a size determined based on a preset magnification. The execution main body can amplify the image to be amplified, so that the human body image in the image to be amplified is amplified to a target size. It should be noted that, in the process of magnifying an image to be magnified, when at least one of the following conditions is satisfied, it is determined that the human body image reaches the target size: the number of horizontal pixels of the human body image is the same as that of the horizontal pixels of the target size, the number of longitudinal pixels of the human body image is the same as that of the longitudinal pixels of the target size, and the number of pixels included in a diagonal line of the human body image is the same as that of pixels included in a diagonal line of the rectangle characterized by the target size. It should be understood that the above conditions are merely exemplary, and in practice, other conditions may also be included.
In some optional implementation manners of this embodiment, the executing body may determine that the human body image reaches the target size in response to determining that the magnification of the magnified image to be magnified reaches the preset magnification and the size of the magnified human body image is smaller than the preset size. Generally, when an image to be magnified is magnified, the image can be magnified to a preset magnification at maximum. For example, the preset magnification may be a maximum magnification of the camera when the image is taken. When the image to be amplified is amplified to a preset multiple, if the human body image is still smaller than the preset size at the moment, the human body image is determined to reach the target size, and the size of the human body image at the moment is the target size. Through setting up preset multiple, can reduce under the less condition of size of human image, cause the degree that the definition of the human image after the enlargeing reduces.
And step 205, moving the amplified image to be amplified so that the display position of the amplified human body image reaches the target position.
In this embodiment, the executing body may move the enlarged image to be enlarged so that the display position of the enlarged human body image reaches the target position.
Specifically, the target position may be a position set in advance in an interface for displaying an image to be enlarged. For example, the target position may be a preset region in the interface, and the executing body may move the enlarged image to be enlarged so that the enlarged human body image is in the region, and at this time, it is determined that the display position of the enlarged human body image reaches the target position. Alternatively, the target position may be the entire area of the interface, and when the enlarged human body image is in the interface, it is determined that the display position of the enlarged human body image reaches the target position. It should be noted that when all or part of the enlarged human body image (for example, half or other proportion of the area of the enlarged human body image) is in the region indicated by the target position, it may be determined that the display position of the enlarged human body image reaches the target position.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the method for displaying an image according to the present embodiment. In the application scenario of fig. 3, the terminal device 301 first acquires an image to be enlarged 302 currently displayed on the screen. Then, the terminal device 301 determines a human body image 303 from the image to be enlarged 302. For example, the terminal device 301 determines a rectangular region including the respective human bone key points as the human image 303 by performing human bone key point detection on the image to be enlarged. Then, the terminal device 301 determines that the size of the human body image 303 is smaller than a preset size (for example, the number of vertical pixels of the human body image 303 in a rectangular shape is smaller than the number of vertical pixels of the preset size), and enlarges the image to be enlarged 302 (a dotted line frame 304 in the figure is a sideline of the enlarged image to be enlarged) so as to make the human body image 303 reach a target size, where the target size may be the same as the preset size. When the terminal device 301 enlarges the human body image 303 to the number of vertical pixels of which the number of vertical pixels is equal to the target size, it is determined that the enlarged human body image reaches the target size. Finally, the terminal device moves the magnified image to be magnified to move the magnified human body image to the center (i.e., the target position) of the screen.
According to the method provided by the embodiment of the disclosure, the currently displayed image to be amplified is obtained, the human body image is determined from the image to be amplified, if the size of the human body image is smaller than the preset size, the image to be amplified is amplified to enable the human body image to reach the target size, and finally the amplified image to be amplified is moved to enable the display position of the amplified human body image to reach the target position, so that the human body image can be moved to the target position on the screen in real time without moving the shooting equipment, the automatic tracking of a lens can be simulated, and the flexibility of the display of the person image is improved.
With further reference to FIG. 4, a flow 400 of yet another embodiment of a method for displaying an image is shown. The flow 400 of the method for displaying an image comprises the steps of:
step 401, acquiring a currently displayed image to be magnified.
In this embodiment, step 401 is substantially the same as step 201 in the corresponding embodiment of fig. 2, and is not described here again.
Step 402, determining a human body image from the image to be amplified.
In this embodiment, step 402 is substantially the same as step 202 in the corresponding embodiment of fig. 2, and is not described herein again.
In step 403, it is determined whether the size of the human body image is smaller than a preset size.
In this embodiment, step 403 is substantially the same as step 203 in the corresponding embodiment of fig. 2, and is not described herein again.
And step 404, in response to the fact that the size of the image to be amplified is smaller than the preset size, amplifying the image to be amplified so as to enable the human body image to reach the target size.
In this embodiment, step 404 is substantially the same as step 204 in the corresponding embodiment of fig. 2, and is not described herein again.
In step 405, a human body center point is determined from the magnified human body image.
In the present embodiment, an execution subject (e.g., a terminal device shown in fig. 1) of the method for displaying an image may determine a human body center point from the enlarged human body image. Specifically, the shape of the human body image may be a rectangle, and the center point of the rectangle may be determined as the human body center point.
Optionally, when the human body image is determined according to the human body skeleton key point information set, the human body center point may be determined according to a human body skeleton key point indicated by the pre-specified human body skeleton key point information. For example, the midpoint of a line connecting key points of human bones characterizing the shoulder joints of the human body is determined as the center point of the human body. Alternatively, the intersection of the diagonals of a quadrilateral representing the two shoulder joints and the two hip joints is determined as the center point of the human body.
And 406, moving the image to be amplified so that the center point of the human body moves towards the interface center point of the interface for displaying the image to be amplified.
In this embodiment, the executing body may move the image to be enlarged so that the center point of the human body moves toward the interface center point of the interface for displaying the image to be enlarged. The shape of the interface is generally a rectangle, and the center point of the rectangle is the interface center point.
Step 407, in response to determining that the center point of the human body coincides with the center point of the interface, determining that the display position of the enlarged human body image reaches the target position.
In this embodiment, the executing body may determine that the display position of the enlarged human body image reaches the target position in response to determining that the human body center point coincides with the interface center point. Specifically, when the distance between the human body center point and the interface center point is less than or equal to a preset distance threshold, it is determined that the human body center point coincides with the interface center point, and at this time, the display position of the enlarged human body image reaches a target position, so that the enlarged human body image is centered on the interface.
In some optional implementation manners of this embodiment, after step 407, the executing main body may further determine that the display position of the enlarged human body image reaches the target position in response to determining that the edge of the enlarged image to be enlarged coincides with the edge of the interface. Specifically, when the sideline of the amplified image to be amplified coincides with the sideline of the interface, the amplified image to be amplified cannot move any more, and at this time, it is determined that the display position of the amplified human body image reaches the target position.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the method for displaying an image in the present embodiment highlights a step of moving the enlarged human body image to the center of the interface for displaying the image to be enlarged according to the human body center point. Therefore, the scheme described in the embodiment can enable the amplified human body image to be displayed in the center of the interface, so that the lens automatic tracking can be simulated more accurately, and the flexibility of the display of the human image is further improved.
With further reference to fig. 5, as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an apparatus for displaying an image, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable in various electronic devices.
As shown in fig. 5, the apparatus 500 for displaying an image of the present embodiment includes: an acquisition unit 501 configured to acquire a currently displayed image to be enlarged; a first determination unit 502 configured to determine a human body image from an image to be enlarged; a second determination unit 503 configured to determine whether the size of the human body image is smaller than a preset size; an enlarging unit 504 configured to enlarge the image to be enlarged so as to bring the human body image to a target size in response to determining that the size is smaller than a preset size; and a moving unit 505 configured to move the enlarged image to be enlarged so that the display position of the enlarged human body image reaches the target position.
In this embodiment, the acquisition unit 501 may acquire the currently displayed image to be enlarged. The image to be enlarged may be an image displayed on a screen included in the apparatus 500, or an image displayed on another electronic device communicatively connected to the apparatus 500.
In this embodiment, the first determination unit 502 may determine a human body image from the above-described image to be enlarged. Specifically, as an example, the above-described first determination unit 502 may determine a human body image from an image to be enlarged using an existing human body image detection method. For example, the human body image may be detected using an existing object detection model with the human body image as a detection target. The target detection model may be a model established based on an existing target detection network (e.g., ssd (single Shot multi boxdetector), dpm (deformable Part model), etc.). The object detection model may determine the position of an object image (e.g., a human body image) from the images input thereto. In general, the object detection model may output coordinate information that may be used to characterize the position of the human body image in the image to be magnified. For example, the coordinate information may include coordinates representing two opposite corners of a rectangular frame, and a rectangular area may be determined in the image to be enlarged according to the coordinates of the two opposite corners, where the image covered by the rectangular area is the human body image.
In this embodiment, the second determination unit 503 may determine whether the size of the human body image is smaller than a preset size. The size of an image is usually characterized by the number of pixels, such as x × y, where x is the number of horizontal pixels and y is the number of vertical pixels. The preset size may be a preset fixed size; alternatively, the preset size may be a size determined according to a preset ratio, for example, assuming that the size of the interface for displaying the image to be enlarged is m × n and the preset ratio is 0.8, the preset size is 0.8m × 0.8 n. It should be noted that, when at least one of the following conditions is satisfied, it may be determined that the size of the human body image is smaller than the preset size: the number of horizontal pixels of the human body image is smaller than that of horizontal pixels of the preset size, the number of longitudinal pixels of the human body image is smaller than that of longitudinal pixels of the preset size, and the number of pixels included in a diagonal line of the human body image is smaller than that of pixels included in a diagonal line of a rectangle represented by the preset size. It should be understood that the above conditions are merely exemplary, and in practice, other conditions may also be included.
In this embodiment, the enlarging unit 504 may enlarge the image to be enlarged to make the human body image reach the target size in response to determining that the size of the human body image is smaller than the preset size.
The target size may be equal to the preset size or a size determined based on a preset magnification. The enlarging unit 504 may enlarge the image to be enlarged so that the human body image therein is enlarged to a target size. It should be noted that, in the process of magnifying an image to be magnified, when at least one of the following conditions is satisfied, it is determined that the human body image reaches the target size: the number of horizontal pixels of the human body image is the same as that of the horizontal pixels of the target size, the number of longitudinal pixels of the human body image is the same as that of the longitudinal pixels of the target size, and the number of pixels included in a diagonal line of the human body image is the same as that of pixels included in a diagonal line of the rectangle characterized by the target size. It should be understood that the above conditions are merely exemplary, and in practice, other conditions may also be included.
In this embodiment, the moving unit 505 may move the enlarged image to be enlarged so that the display position of the enlarged human body image reaches the target position.
Specifically, the target position may be a position set in advance in an interface for displaying an image to be enlarged. For example, the target position may be a preset region in the interface, and the moving unit 505 may move the enlarged image to be enlarged so that the enlarged human body image is in the region, and then it is determined that the display position of the enlarged human body image reaches the target position. Alternatively, the target position may be the entire area of the interface, and when the enlarged human body image is in the interface, it is determined that the display position of the enlarged human body image reaches the target position. It should be noted that when all or part of the enlarged human body image (for example, half or other proportion of the area of the enlarged human body image) is in the region indicated by the target position, it may be determined that the display position of the enlarged human body image reaches the target position.
In some optional implementations of this embodiment, the first determining unit 502 may include: a detection module (not shown in the figure) configured to perform human skeleton key point detection on the image to be amplified to obtain a human skeleton key point information set; a first determining module (not shown in the figure) configured to determine a human body image based on the human body bone key point information set.
In some optional implementations of this embodiment, the first determining module may be further configured to: and determining an image for representing the upper half of the human body as a human body image based on the human body skeleton key point information set.
In some optional implementations of this embodiment, the amplifying unit 504 may be further configured to: and determining that the human body image reaches the target size in response to the fact that the magnification of the magnified image to be magnified reaches the preset magnification and the size of the magnified human body image is smaller than the preset size.
In some optional implementations of this embodiment, the mobile unit 505 may include: a second determining module (not shown in the figure) configured to determine a center point of the human body from the enlarged human body image; a moving module configured to move the image to be magnified so that the human body center point moves toward an interface center point of an interface for displaying the image to be magnified; a third determining module (not shown in the figure) configured to determine that the display position of the magnified human body image reaches the target position in response to determining that the human body center point coincides with the interface center point.
In some optional implementations of this embodiment, the mobile unit 505 may further include: a fourth determining module (not shown in the figures) configured to determine that the display position of the magnified image of the human body reaches the target position in response to determining that the edge of the magnified image to be magnified coincides with the edge of the interface
According to the device provided by the embodiment of the disclosure, the currently displayed image to be amplified is obtained, the human body image is determined from the image to be amplified, if the size of the human body image is smaller than the preset size, the image to be amplified is amplified to enable the human body image to reach the target size, and finally the amplified image to be amplified is moved to enable the display position of the amplified human body image to reach the target position, so that the human body image can be moved to the target position on the screen in real time without moving the shooting equipment, the lens automatic tracking can be simulated, and the flexibility of the display of the person image is improved.
Referring now to fig. 6, shown is a schematic block diagram of a terminal device 600 suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the use range of the embodiments of the present disclosure.
As shown in fig. 6, the terminal device 600 may include a processing means (e.g., a central processing unit, a graphic processor, etc.) 601 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the terminal apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, memory; and a communication device 609. The communication means 609 may allow the terminal device 600 to perform wireless or wired communication with other devices to exchange data. While fig. 6 illustrates a terminal apparatus 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of embodiments of the present disclosure. It should be noted that the computer readable medium in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable medium or any combination of the two. A computer readable medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In embodiments of the disclosure, a computer readable medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be included in the terminal device; or may exist separately without being assembled into the terminal device. The computer readable medium carries one or more programs which, when executed by the terminal device, cause the terminal device to: acquiring a currently displayed image to be amplified; determining a human body image from the image to be amplified; determining whether the size of the human body image is smaller than a preset size; in response to the fact that the size of the image to be amplified is smaller than the preset size, amplifying the image to be amplified to enable the human body image to reach the target size; and moving the amplified image to be amplified so as to enable the display position of the amplified human body image to reach the target position.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a first determination unit, a second determination unit, an amplification unit, and a moving unit. Here, the names of the units do not constitute a limitation to the unit itself in some cases, and for example, the acquiring unit may also be described as a "unit that acquires an image to be enlarged that is currently displayed".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (14)

1. A method for displaying an image, comprising:
acquiring a currently displayed image to be amplified;
determining a human body image from the image to be amplified;
determining whether the size of the human body image is smaller than a preset size;
in response to the fact that the size of the image to be amplified is smaller than the preset size, amplifying the image to be amplified to enable the human body image to reach the target size;
and moving the amplified image to be amplified so as to enable the display position of the amplified human body image to reach the target position.
2. The method according to claim 1, wherein the determining of the human body image from the image to be magnified comprises:
detecting key points of human bones of the image to be amplified to obtain an information set of the key points of the human bones;
and determining a human body image based on the human body skeleton key point information set.
3. The method of claim 2, wherein said determining a human image based on said set of human skeletal keypoint information comprises:
and determining an image for representing the upper half of the human body as a human body image based on the human body skeleton key point information set.
4. The method according to claim 1, wherein the magnifying the image to be magnified to bring the human body image to a target size comprises:
and determining that the human body image reaches the target size in response to the fact that the magnification of the magnified image to be magnified reaches the preset magnification and the size of the magnified human body image is smaller than the preset size.
5. The method according to one of claims 1 to 4, wherein the moving the enlarged image to be enlarged to make the display position of the enlarged human body image reach the target position comprises:
determining a human body central point from the amplified human body image;
moving the image to be amplified to enable the human body center point to move towards an interface center point of an interface for displaying the image to be amplified;
and determining that the display position of the amplified human body image reaches a target position in response to determining that the human body central point is coincident with the interface central point.
6. The method according to claim 5, wherein after the moving the image to be enlarged to move the body center point toward an interface center point of an interface for displaying the image to be enlarged, the method further comprises:
and determining that the display position of the amplified human body image reaches the target position in response to determining that the sideline of the amplified image to be amplified is superposed with the sideline of the interface.
7. An apparatus for displaying an image, comprising:
an acquisition unit configured to acquire a currently displayed image to be enlarged;
a first determination unit configured to determine a human body image from the image to be enlarged;
a second determination unit configured to determine whether a size of the human body image is smaller than a preset size;
the amplifying unit is configured to amplify the image to be amplified to enable the human body image to reach a target size in response to the fact that the size of the image to be amplified is smaller than a preset size;
a moving unit configured to move the enlarged image to be enlarged so that a display position of the enlarged human body image reaches a target position.
8. The apparatus of claim 7, wherein the first determining unit comprises:
the detection module is configured to detect the key points of the human bones of the image to be amplified to obtain an information set of the key points of the human bones;
a first determination module configured to determine a human body image based on the set of human body bone keypoint information.
9. The apparatus of claim 8, wherein the first determination module is further configured to:
and determining an image for representing the upper half of the human body as a human body image based on the human body skeleton key point information set.
10. The apparatus of claim 7, wherein the amplification unit is further configured to:
and determining that the human body image reaches the target size in response to the fact that the magnification of the magnified image to be magnified reaches the preset magnification and the size of the magnified human body image is smaller than the preset size.
11. The apparatus according to one of claims 7-10, wherein the mobile unit comprises:
a second determination module configured to determine a human body center point from the enlarged human body image;
a moving module configured to move the image to be magnified so that the human body center point moves toward an interface center point of an interface for displaying the image to be magnified;
a third determination module configured to determine that the display position of the magnified human body image reaches a target position in response to determining that the human body center point coincides with the interface center point.
12. The apparatus of claim 11, wherein the mobile unit further comprises:
a fourth determination module configured to determine that the display position of the magnified image of the human body reaches a target position in response to determining that the edge of the magnified image to be magnified coincides with the edge of the interface.
13. A terminal device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
14. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201910086013.8A 2019-01-29 2019-01-29 Method and apparatus for displaying image Active CN109840059B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910086013.8A CN109840059B (en) 2019-01-29 2019-01-29 Method and apparatus for displaying image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910086013.8A CN109840059B (en) 2019-01-29 2019-01-29 Method and apparatus for displaying image

Publications (2)

Publication Number Publication Date
CN109840059A CN109840059A (en) 2019-06-04
CN109840059B true CN109840059B (en) 2020-05-15

Family

ID=66884316

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910086013.8A Active CN109840059B (en) 2019-01-29 2019-01-29 Method and apparatus for displaying image

Country Status (1)

Country Link
CN (1) CN109840059B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110555798B (en) * 2019-08-26 2023-10-17 北京字节跳动网络技术有限公司 Image deformation method, device, electronic equipment and computer readable storage medium
CN111240780A (en) * 2020-01-06 2020-06-05 北京奇艺世纪科技有限公司 Image display method, image display device, display terminal and readable storage medium

Citations (6)

* 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
CN102395994A (en) * 2010-03-18 2012-03-28 松下电器产业株式会社 Omnidirectional image processing device and omnidirectional image processing method
CN102932598A (en) * 2012-11-06 2013-02-13 苏州科达科技股份有限公司 Method for intelligently tracking image on screen by camera
CN104216624A (en) * 2013-05-30 2014-12-17 联想(北京)有限公司 Display method and electronic device
CN104915109A (en) * 2014-03-11 2015-09-16 欧姆龙株式会社 Image display apparatus and image display method
CN107909540A (en) * 2017-10-26 2018-04-13 深圳天珑无线科技有限公司 Image processing method, device, mobile terminal and computer-readable recording medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4489608B2 (en) * 2004-03-31 2010-06-23 富士フイルム株式会社 DIGITAL STILL CAMERA, IMAGE REPRODUCTION DEVICE, FACE IMAGE DISPLAY DEVICE, AND CONTROL METHOD THEREOF
US20150254856A1 (en) * 2014-03-04 2015-09-10 Samsung Electronics Co., Ltd. Smart moving object capture methods, devices and digital imaging systems including the same
CN105516591A (en) * 2015-12-11 2016-04-20 小米科技有限责任公司 Method and apparatus for photographing control of mobile terminal, and mobile terminal
CN105872816A (en) * 2015-12-18 2016-08-17 乐视网信息技术(北京)股份有限公司 Method and device for amplifying video image
CN106534590B (en) * 2016-12-27 2019-08-20 努比亚技术有限公司 A kind of photo processing method, device and terminal
CN108182031A (en) * 2017-12-28 2018-06-19 努比亚技术有限公司 A kind of photographic method, terminal and computer readable storage medium
CN108629824B (en) * 2018-04-28 2020-07-31 京东数字科技控股有限公司 Image generation method and device, electronic equipment and computer readable medium

Patent Citations (6)

* 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
CN102395994A (en) * 2010-03-18 2012-03-28 松下电器产业株式会社 Omnidirectional image processing device and omnidirectional image processing method
CN102932598A (en) * 2012-11-06 2013-02-13 苏州科达科技股份有限公司 Method for intelligently tracking image on screen by camera
CN104216624A (en) * 2013-05-30 2014-12-17 联想(北京)有限公司 Display method and electronic device
CN104915109A (en) * 2014-03-11 2015-09-16 欧姆龙株式会社 Image display apparatus and image display method
CN107909540A (en) * 2017-10-26 2018-04-13 深圳天珑无线科技有限公司 Image processing method, device, mobile terminal and computer-readable recording medium

Also Published As

Publication number Publication date
CN109840059A (en) 2019-06-04

Similar Documents

Publication Publication Date Title
US11721073B2 (en) Synchronized, interactive augmented reality displays for multifunction devices
CN110059623B (en) Method and apparatus for generating information
CN110111241B (en) Method and apparatus for generating dynamic image
CN110781823B (en) Screen recording detection method and device, readable medium and electronic equipment
CN110059624B (en) Method and apparatus for detecting living body
CN112488783A (en) Image acquisition method and device and electronic equipment
CN109840059B (en) Method and apparatus for displaying image
CN109981989B (en) Method and device for rendering image, electronic equipment and computer readable storage medium
CN109816791B (en) Method and apparatus for generating information
CN115170395A (en) Panoramic image stitching method, panoramic image stitching device, electronic equipment, panoramic image stitching medium and program product
CN111385460A (en) Image processing method and device
CN110619615A (en) Method and apparatus for processing image
CN113238652B (en) Sight line estimation method, device, equipment and storage medium
CN111586295B (en) Image generation method and device and electronic equipment
CN112291445B (en) Image processing method, device, equipment and storage medium
CN111461964B (en) Picture processing method, device, electronic equipment and computer readable medium
CN109842738B (en) Method and apparatus for photographing image
CN113066166A (en) Image processing method and device and electronic equipment
CN110553639B (en) Method and apparatus for generating location information
CN111540009A (en) Method, apparatus, electronic device, and medium for generating detection information
CN111768443A (en) Image processing method and device based on mobile camera
KR102534449B1 (en) Image processing method, device, electronic device and computer readable storage medium
CN110310251B (en) Image processing method and device
CN110781888B (en) Method and device for returning to screen in video picture, readable medium and electronic equipment
CN113760414B (en) Method and device for drawing graph

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
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.