Object display method and device
By identifying and adjusting the target object in the image to the optimized position on the display, the problem of poor user experience is solved and a more convenient image viewing experience is achieved.
Patent Information
- Application Number
- CN201910447742.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-05-27
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2039-05-27
AI Technical Summary
When users view images, the objects they focus on may be located in areas of the display that are inconvenient to view, resulting in a poor user experience, especially when the ratio of the image to the display does not match.
By identifying the target object in the image, determining its position information on the display end, and adjusting the target object to the target area on the display end based on this information, so that it can be displayed in the center or other optimized positions, using convolutional neural networks and calculation formulas to calculate Adjust the amount and direction of movement.
It improves the user's convenience in viewing key objects and improves the user experience, especially in application scenarios such as AR makeup try-on, allowing users to conveniently view their own makeup try-on effects.
Smart Images

Figure CN112000218B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an object display method and device. Background Art
[0002] At present, after the acquisition end acquires the image, the image is generally displayed directly on the display end. For example, when the image acquired by the camera is displayed, the camera's own display screen or other display ends such as computers and mobile phones are used to directly display the image.
[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:
[0004] When viewing an image, the user usually focuses on an object. For example, when the captured image is a user's makeup trial photo, the user focuses on the face area. However, due to factors such as the user's activities when capturing the image or the mismatch between the image and the display ratio of the display end, the object that the user focuses on may be located in an area of the display end that is not easy to view. For example, when the user's face area is located at the edge area of the display end, it is not easy for the user to view the face area, resulting in a poor user experience. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides an object display method and device, which can automatically adjust the target object in the image to be displayed to the target area of the display end, so that the target object is displayed in the target area, thereby facilitating the viewing of the target object and improving the user experience.
[0006] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for displaying an object is provided, comprising:
[0007] Acquire images to be displayed;
[0008] Identifying a target object from the image to be displayed;
[0009] Determining the location information of the target object in the display terminal;
[0010] According to the position information, the target object is adjusted to a target area in the display terminal so that the target object is displayed in the target area.
[0011] Optionally, adjusting the target object to a target area in the display terminal according to the position information includes:
[0012] Placing the image to be displayed and the display end in the same coordinate system;
[0013] Calculating a first distance between a center of the target object and a center of the target area in the coordinate system according to the position information of the target object in the coordinate system and the position of the target area in the coordinate system;
[0014] The target object is adjusted to the target area according to the first distance.
[0015] Optionally, the target area is a central area of the display terminal;
[0016] The step of adjusting the target object to a target area in the display terminal according to the position information includes:
[0017] Calculating a second distance between the center of the target object and the edge of the display end according to the position information of the target object;
[0018] Determining a movement amount and a movement direction of the target object toward the central area according to the second distance;
[0019] The target object is moved to a central area of the display terminal according to the movement amount and the movement direction.
[0020] Optionally, calculating the movement amount of the target object toward the central area according to the second distance includes:
[0021] Determining two second distances between the center of the target object and mutually parallel edges of the display end;
[0022] According to the determined two second distances, the movement amount is calculated using the following calculation formula;
[0023]
[0024] Wherein, M represents the movement amount, a represents one of the two second distances, and b represents the other of the two second distances.
[0025] Optionally, the object display method further comprises:
[0026] Determining a focal length adjustment amount according to position information of the target object in the display terminal, a resolution of the image to be displayed, and a resolution of the display terminal;
[0027] The display ratio of the target object is adjusted according to the focal length adjustment amount.
[0028] Optionally, the identifying a target object from the image to be displayed, and the determining position information of the target object corresponding to the image to be displayed, include:
[0029] Selecting a plurality of candidate regions from the image to be displayed;
[0030] Performing normalization processing on the candidate region;
[0031] Determine the category of the normalized candidate region using a convolutional neural network model;
[0032] The target object and the position information of the target object are determined according to the category of the candidate area.
[0033] According to a second aspect of an embodiment of the present invention, there is provided an object display device, comprising: an object recognition module, a position determination module and an adjustment module; wherein:
[0034] The object recognition module is used to collect the image to be displayed and recognize the target object from the image to be displayed;
[0035] The position determination module is used to determine the position information of the target object in the image to be displayed;
[0036] The adjustment module is used to adjust the target object to a target area in the display terminal according to the position information, so that the target object is displayed in the target area.
[0037] Optionally, the adjustment module is used to place the image to be displayed and the display end in the same coordinate system; calculate a first distance between the center of the target object and the center of the target area in the coordinate system based on the position information of the target object in the coordinate system and the position of the target area in the coordinate system; and adjust the target object to the target area based on the first distance.
[0038] Optionally, the target area is a central area of the display terminal;
[0039] The adjustment module is used to calculate a second distance between the center of the target object and the edge of the display end according to the position information of the target object; determine the movement amount and movement direction of the target object toward the central area according to the second distance; and move the target object to the central area of the display end according to the movement amount and movement direction.
[0040] Optionally, the adjustment module is used to determine two second distances between the center of the target object and the edges of the display end that are parallel to each other; and calculate the movement amount using the following calculation formula according to the two determined second distances;
[0041]
[0042] Wherein, M represents the movement amount, a represents one of the two second distances, and b represents the other of the two second distances.
[0043] Optionally, the adjustment module is further used to determine the focal length adjustment amount according to the position information of the target object in the display end, the resolution of the image to be displayed and the resolution of the display end, and adjust the display ratio of the target object according to the focal length adjustment amount.
[0044] According to a third aspect of an embodiment of the present invention, a server is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any method described in the first aspect above.
[0045] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, characterized in that when the program is executed by a processor, any method described in the first aspect is implemented.
[0046] An embodiment of the above invention has the following advantages or beneficial effects: according to the position information of the target object in the image to be displayed, the target object is adjusted to the target area in the display end so that the target object is displayed in the target area, thereby facilitating the viewing of the target object, which is beneficial to improving the user experience.
[0047] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0049] Figure 1 is a flow chart of an object display method provided by an embodiment of the present invention;
[0050] Figure 2 is a schematic diagram of a position of a target object on a display terminal provided by an embodiment of the present invention;
[0051] Figure 3 is a schematic diagram of a position of a target object on a display terminal provided by another embodiment of the present invention;
[0052] Figure 4 is a flow chart of an object display method provided by another embodiment of the present invention;
[0053] Figure 5is a schematic structural diagram of an object display device provided by an embodiment of the present invention;
[0054] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0055] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0057] like Figure 1 As shown, an embodiment of the present invention provides an object display method, which includes the following steps S101 to S104:
[0058] Step S101: Acquire an image to be displayed.
[0059] When the acquisition end acquires the image to be displayed, it may acquire video information. In this case, the image to be displayed can be extracted from the acquired video information by performing frame extraction preprocessing on the video information. Furthermore, according to the acquisition site environment and the analysis of the acquired image to be displayed, the acquisition end (such as a camera) can realize automatic exposure processing, automatic white balance processing, automatic backlight processing, automatic overexposure processing, etc. Then, the image to be displayed can be further processed by performing noise filtering, contrast enhancement, image scaling, etc., so as to facilitate the identification of the target object from the image to be displayed at a later stage.
[0060] Step S102: identifying a target object from the image to be displayed.
[0061] Optionally, image recognition technology can be used to identify the target object from the image to be displayed, for example, multiple candidate areas are selected from the image to be displayed; the candidate areas are normalized; a convolutional neural network model is used to determine the category of the normalized candidate areas; and the target object and the target object are determined according to the category of the candidate areas.
[0062] Specifically, first, a selective search method can be used to select 2000-3000 candidate regions from the image to be displayed, and then each candidate region is normalized to the same size. For example, each candidate region is normalized to the same size of 227*227, and then the normalized candidate regions are trained using a convolutional neural network model. After that, for each trained candidate region, a linear SVM two-class classifier is used for discrimination. The input of the linear SVM two-class classifier is the 4096-dimensional feature output by the convolutional neural network model, and the output is whether the candidate region is of this type. Taking the target object as a human face as an example, the output is whether the candidate region is a human face. Finally, according to the categories corresponding to each candidate region, the candidate region belonging to the target object can be determined, that is, the target object is identified from the image to be displayed.
[0063] Step S103: Determine the location information of the target object in the display terminal.
[0064] Since the position information of each candidate area in the image to be displayed is determined, after the candidate area corresponding to the target object is determined, the position information of the target object in the image to be displayed can be determined based on the position information of the candidate area corresponding to the target object in the image to be displayed, and then the position information of the target object in the display end can be further determined based on the relative display position of the image to be displayed and the display end. Specifically, when the image to be displayed is displayed on the display end, its center usually coincides with the center of the display end, and the position information of the target object in the display end can be determined based on the display ratio of the image to be displayed and the display end.
[0065] In addition, the image to be displayed and the display end can also be placed in the same coordinate system. For example, the coordinate origin of the coordinate system is the center of the image to be displayed and the display end (it is assumed here that the center of the image to be displayed and the center of the display end coincide with each other). Then, the coordinates of the target object in the image to be displayed can be determined through the position information of the target object in the image to be displayed, that is, the position information of the target object on the display end is determined.
[0066] Step S104: adjusting the target object to a target area in the display terminal according to the position information, so that the target object is displayed in the target area.
[0067] Still taking the example that the image to be displayed and the display end are located in the same coordinate system, the target object can be adjusted to the target area of the display end in the following manner: according to the position information of the target object in the coordinate system and the position of the target area in the coordinate system, calculate the first distance between the center of the target object and the center of the target area in the coordinate system; according to the first distance, adjust the target object to the target area.
[0068] Here, the position diagram of the image to be displayed and the display end can be as follows: Figure 2 As shown, the square area A represents the target object in the image to be displayed, the rounded rectangle B represents the display end, the rectangle C represents the image to be displayed, and the square area D represents the target area in the display end. Figure 2 In the example, the center of the image to be displayed coincides with the center of the display end, and the coincident center is the origin of the coordinate system of the two. Since the image to be displayed and the display end are located in the same coordinate system, the first distance AD between the center of the target object A and the center of the target area D in the display end in the coordinate system can be directly calculated, and then the target object A can be moved toward the target area D by the first distance AD, so that the target object can be adjusted to the target area, so that the target object can be displayed using the target area.
[0069] Generally, in order to further facilitate user viewing, the target area for displaying the target object is the central area of the display terminal, and since the center of the display terminal is the origin of the coordinate system, it is easy to understand that the center of the central area of the display terminal is also located at the origin of the coordinate system. At this time, the first distance between the center of the target object and the center of the target area can be directly determined according to the coordinates of the center of the target object in the coordinate system, thereby further reducing the calculation amount of the first distance, which is conducive to improving the adjustment rate of the target object, and further improving the user experience.
[0070] When the target area is the central area of the display end, other methods can also be used to calculate the movement amount of the target object. For example, the second distance between the center of the target object and the edge of the display end can be calculated based on the position information of the target object; based on the second distance, the movement amount and movement direction of the target object toward the central area are determined; based on the movement amount and the movement direction, the target object is moved to the central area of the display end.
[0071] When determining the movement amount, two second distances between the center of the target object and the mutually parallel edges of the display end may be determined first; and then the movement amount may be calculated using the following calculation formula according to the determined two second distances;
[0072]
[0073] Wherein, M represents the movement amount, a represents one of the two second distances, and b represents the other of the two second distances.
[0074] In this embodiment, the position diagram of the image to be displayed and the display end can be as follows: Figure 3As shown in the figure, where the square area A represents the target object in the image to be displayed, the rectangle B represents the display end, the rectangle C represents the image to be displayed, and the target area is the central area of the display end, which is not shown in the figure. The following will refer to Figure 3 Figure 3 , taking the calculation of the second distance between the center of the target object and the two vertical edges of the display end as an example, the determination process of the movement amount and the movement direction will be described in detail.
[0075] First, the second distance a between the center of the target object and the left vertical edge b1 of the display end can be calculated, and then the second distance b between the center of the target object and the left vertical edge b2 of the display end can be calculated. Then, using the calculation formula calculate the movement amount of the target object in the horizontal direction towards the central area. And, according to the size relationship between a and b, the movement direction of the target object in the horizontal direction towards the central area can be determined. For example, when a > b, it means that the target object is close to the right side of the display end, and the movement direction is to move left to adjust the target area to the central area of the display end; conversely, when a < b, it means that the target object is close to the left side of the display end, and the movement direction is to move right. When a = b, it means that the target object does not need to move in the horizontal direction, and the movement amount is 0.
[0076] It can be understood that the same method can be used to calculate the second distance between the center of the target object and the two horizontal edges of the display end to determine the movement amount and the movement direction of the target object in the vertical direction towards the central area.
[0077] Furthermore, the focal length adjustment amount can be determined according to the position information of the target object in the display end, the resolution of the image to be displayed, and the resolution of the display end; according to the focal length adjustment amount, the display ratio of the target object can be adjusted.
[0078] For example, when the target object is in a relatively central position, the focal length adjustment amount can be adjusted according to the comparison value between the resolution of the image to be displayed and the resolution of the display end, so that when the image to be displayed is displayed on the display end according to the focal length adjustment amount, the original display ratio can be maintained. However, when the target object is in a relatively marginal position, for example, when the distance (a and / or b) between the center of the target object and the edge of the display end is greater than the side length of the target area in the display end (assumed to be e), it can be determined that the target object is in a relatively marginal position. At this time, if the target object is adjusted to the target area of the display end and displayed according to the original display ratio, there may be a display area in the edge area of the display end that is not filled by the image to be displayed. At this time, the display ratio of the target object can be appropriately enlarged according to the actual situation, so that when the target object is displayed using the central area, other areas of the display end are also filled by the image to be displayed, thereby improving the aesthetics of the display screen and further improving the user experience.
[0079] The following takes the use of augmented reality (AR) technology for smart makeup trial as an example, combined with the application scenario of AR smart makeup trial, to explain in detail the object display method provided by the embodiment of the present invention. It can be understood that in the AR smart makeup trial application scenario, the target object is the user's face area, and the target area in the display terminal is the central area of the display terminal, that is, the purpose of the object display method is to display the face area through the central area of the display terminal, so that the user can more conveniently view the effect of his or her own makeup trial. Figure 4 As shown, in this application scenario, the object recognition method provided by the embodiment of the present invention may include the following steps:
[0080] Step S401: Acquire an image to be displayed.
[0081] In the image to be displayed, in addition to the face area, the background area where the user is located is also included.
[0082] Step S402: identifying a face region from the image to be displayed.
[0083] Step S403: Calculate the distance between the center of the face region and the edge of the display end according to the position information of the face region in the display end.
[0084] When the face region is identified from the image to be displayed using image recognition technology, the recognition result may be a matrix corresponding to the face region. When calculating the distance, the distance between the edge of the face region matrix and the edge of the display end may also be calculated.
[0085] Step S404: Determine the movement amount and direction of the face area toward the center area of the display terminal according to the calculated distance.
[0086] Step S405: moving the face region to the central region of the display end according to the movement amount and the movement direction, so as to display the face region using the central region of the display end.
[0087] In the above application scenario, the object display method provided by the embodiment of the present invention can automatically adjust the user's facial area to the central area of the display end, so that the facial area is located in the central area of the display screen, so that when the user performs AR makeup trial, the user can place his or her facial area within the acquisition range of the image to be displayed, without having to constantly adjust his or her position to make the facial area located in the center of the display screen. In other words, the object display method provided by the embodiment of the present invention allows the user to move in a larger range during AR makeup trial, rather than just limiting his or her activity range to the area corresponding to the center of the display screen. Therefore, from the two aspects of the user's activity range and the viewing of the facial area, the object display method provided by the embodiment of the present invention improves the user experience.
[0088] like Figure 5 As shown, an embodiment of the present invention provides an object display device 500, including: an object recognition module 501, a position determination module 502 and an adjustment module 503; wherein,
[0089] The object recognition module 501 is used to collect images to be displayed and recognize target objects from the images to be displayed;
[0090] The position determination module 502 is used to determine the position information of the target object in the image to be displayed;
[0091] The adjusting module 503 is used to adjust the target object to a target area in the display terminal according to the position information, so that the target object is displayed in the target area.
[0092] Optionally, the adjustment module 503 is used to place the image to be displayed and the display end in the same coordinate system; calculate a first distance between the center of the target object and the center of the target area in the coordinate system according to the position information of the target object in the coordinate system and the position of the target area in the coordinate system; and adjust the target object to the target area according to the first distance.
[0093] Optionally, the target area is the central area of the display end; the adjustment module 503 is used to calculate a second distance between the center of the target object and the edge of the display end according to the position information of the target object; determine the movement amount and movement direction of the target object toward the central area according to the second distance; and move the target object to the central area of the display end according to the movement amount and movement direction.
[0094] Optionally, the adjustment module 503 is used to determine two second distances between the center of the target object and the edges of the display end that are parallel to each other; and calculate the movement amount using the following calculation formula according to the two determined second distances;
[0095]
[0096] Wherein, M represents the movement amount, a represents one of the two second distances, and b represents the other of the two second distances.
[0097] Optionally, the adjustment module 503 is further used to determine the focal length adjustment amount according to the position information of the target object in the display end, the resolution of the image to be displayed and the resolution of the display end, and adjust the display ratio of the target object according to the focal length adjustment amount.
[0098] An embodiment of the present invention also provides a server, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement any method described in the first aspect above.
[0099] An embodiment of the present invention further provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any one of the first aspects above is implemented.
[0100] Figure 6 An exemplary system architecture 600 to which the object display method or object display device according to the embodiment of the present invention can be applied is shown.
[0101] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, 603, network 604 and server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0102] The user can use the terminal devices 601, 602, 603 to interact with the server 605 through the network 604 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 601, 602, 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0103] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0104] The server 605 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 601, 602, and 603. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.
[0105] It should be noted that the object display method provided in the embodiment of the present invention is generally executed by the server 605 , and accordingly, the object display device is generally disposed in the server 605 .
[0106] It should be understood that Figure 6The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0107] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device suitable for implementing an embodiment of the present invention. Figure 7 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0108] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0109] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0110] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.
[0111] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0112] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0113] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes an object recognition module, a position determination module and an adjustment module. The names of these modules do not constitute a limitation on the modules themselves in some cases, for example, the object recognition module may also be described as a "module for recognizing a target object from an image to be displayed".
[0114] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: collecting an image to be displayed; identifying a target object from the image to be displayed; determining the position information of the target object in the display terminal; and adjusting the target object to a target area in the display terminal according to the position information, so that the target object is displayed in the target area.
[0115] According to the technical solution of the embodiment of the present invention, the target object is adjusted to the target area in the display end according to the position information of the target object in the image to be displayed, so that the target object is displayed in the target area, thereby facilitating the viewing of the target object and thus helping to improve the user experience.
[0116] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An object display method, characterized in that: include: Acquire images to be displayed; Identifying a target object from the image to be displayed; Determining the location information of the target object in the display terminal; According to the position information, the target object is adjusted to a target area in the display terminal so that the target object is displayed in the target area. in, The adjusting the target object to a target area in the display terminal according to the position information includes: Placing the image to be displayed and the display end in the same coordinate system, Calculate a first distance between the center of the target object and the center of the target area in the coordinate system according to the position information of the target object in the coordinate system and the position of the target area in the coordinate system, adjusting the target object to the target area according to the first distance; or, The target area is a central area of the display terminal, and adjusting the target object to the target area in the display terminal according to the position information includes: Calculating a second distance between the center of the target object and the edge of the display terminal according to the position information of the target object, determining the movement amount and movement direction of the target object toward the central area according to the second distance, The target object is moved to a central area of the display terminal according to the movement amount and the movement direction.
2. The method according to claim 1, characterized in that The calculating, according to the second distance, the movement amount of the target object toward the central area includes: Determining two second distances between the center of the target object and mutually parallel edges of the display end; According to the determined two second distances, the movement amount is calculated using the following calculation formula; Wherein, M represents the movement amount, a represents one of the two second distances, and b represents the other of the two second distances.
3. The method according to claim 1, characterized in that Further including: Determining a focal length adjustment amount according to position information of the target object in the display terminal, a resolution of the image to be displayed, and a resolution of the display terminal; The display ratio of the target object is adjusted according to the focal length adjustment amount.
4. The method according to any one of claims 1 to 3, characterized in that: The identifying a target object from the image to be displayed, and determining the position information of the target object corresponding to the image to be displayed, include: Selecting a plurality of candidate regions from the image to be displayed; Performing normalization processing on the candidate region; Determine the category of the normalized candidate region using a convolutional neural network model; The target object and the position information of the target object are determined according to the category of the candidate area.
5. An object display device, characterized in that: include: An object recognition module, a position determination module and an adjustment module; wherein, The object recognition module is used to collect the image to be displayed and recognize the target object from the image to be displayed; The position determination module is used to determine the position information of the target object in the image to be displayed; The adjustment module is used to adjust the target object to a target area in the display terminal according to the position information, so that the target object is displayed in the target area. in, The adjusting the target object to a target area in the display terminal according to the position information includes: Placing the image to be displayed and the display end in the same coordinate system, Calculate a first distance between the center of the target object and the center of the target area in the coordinate system according to the position information of the target object in the coordinate system and the position of the target area in the coordinate system, adjusting the target object to the target area according to the first distance; or, The target area is a central area of the display terminal, and adjusting the target object to the target area in the display terminal according to the position information includes: Calculating a second distance between the center of the target object and the edge of the display terminal according to the position information of the target object, determining the movement amount and movement direction of the target object toward the central area according to the second distance, The target object is moved to a central area of the display terminal according to the movement amount and the movement direction.
6. The device according to claim 5, characterized in that The adjustment module is used to place the image to be displayed and the display end in the same coordinate system; calculate a first distance between the center of the target object and the center of the target area in the coordinate system according to the position information of the target object in the coordinate system and the position of the target area in the coordinate system; and adjust the target object to the target area according to the first distance.
7. A server, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.
8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
