Image Processing Method, Apparatus, Non-Volatile Storage Medium, and Electronic Device

By establishing connections between different terminals and receiving target area images and replacing background images, efficient and intuitive operation of picture synthesis is achieved, and the problems of cumbersome operation and low processing efficiency in the prior art are solved.

CN114511442BActive Publication Date: 2025-05-27NETEASE (SHANGHAI) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210135099.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-14
Publication Date
2025-05-27
Estimated Expiration
2042-02-14

AI Technical Summary

Technical Problem

In the prior art, when synthesising pictures stored on different terminals, the operation process is complicated, the processing efficiency is low, the time is long, and the synthesis effect cannot be visually previewed.

Method used

By establishing a connection between the first terminal and the second terminal, the first terminal is located above the second terminal, receives the target area image from the second terminal, and replaces the background image in the first image with the target area image to obtain a composite image.

Benefits of technology

It realizes the reduction of image data transmission, reduces the operation complexity of image synthesis, enhances the operation flexibility and intuitiveness of image synthesis, and solves the problems of cumbersome operation and low processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114511442B_ABST
    Figure CN114511442B_ABST
Patent Text Reader

Abstract

The present invention discloses an image processing method, apparatus, non-volatile storage medium and electronic device. The method includes: establishing a connection between a first terminal and a second terminal, where the first terminal is used to display a first image, the second terminal is used to display a second image, the first terminal and the second terminal are placed overlapping each other, and the first terminal is located above the second terminal; receiving a target area image from the second terminal, where the target area image is a partial image of the second image covered by the first terminal obtained by the second terminal based on the relative attribute relationship between the first terminal and the second terminal; replacing the background image in the first image with the target area image to obtain a composite image. The present invention solves the technical problems in the related art that the processing method for synthesizing pictures stored on different terminals respectively is rather cumbersome in operation process, low in processing efficiency and long in time consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to an image processing method, device, non-volatile storage medium and electronic device. Background Art

[0002] In the related art, during the process of editing picture A on terminal A (for example, a tablet computer), if picture B stored in terminal B (for example, a smart phone) needs to be used, then first, a communication connection is established between terminal A and terminal B, and picture B stored in terminal B is transmitted to terminal A. Next, picture B is loaded on terminal A and picture B is adjusted to an appropriate size. Then, the placement of the adjusted picture is confirmed, and finally picture A and picture B are synthesized, thus completing the picture synthesis process.

[0003] However, the above processing method has the drawback that in the above process, it is not possible to intuitively preview the synthesis effect between picture A and picture B. Moreover, if picture B needs to be replaced with picture C or other pictures stored in terminal B, the above operation needs to be repeated.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] At least some embodiments of the present invention provide an image processing method, apparatus, non-volatile storage medium and electronic device to at least solve the technical problems of the processing method provided in the related art for synthesizing pictures stored on different terminals, which has a complicated operation process, low processing efficiency and a long time consumption.

[0006] According to one embodiment of the present invention, there is provided an image processing method, comprising:

[0007] A connection is established between a first terminal and a second terminal, wherein the first terminal is used to display a first image, the second terminal is used to display a second image, the first terminal and the second terminal are placed overlapping each other, and the first terminal is located above the second terminal; a target area image is received from the second terminal, wherein the target area image is a partial image covered by the first terminal obtained from the second image by the second terminal based on a relative attribute relationship between the first terminal and the second terminal; a background image in the first image is replaced with the target area image to obtain a composite image.

[0008] Optionally, the image processing method further includes: updating the first image in response to a touch operation performed on a graphical user interface of the first terminal.

[0009] Optionally, the above-mentioned image processing method further includes: updating the target area image in response to a control operation performed on the first terminal.

[0010] Optionally, the above-mentioned image processing method further includes: in response to the first terminal moving out of the display range of the graphical user interface of the second terminal, restoring the display of the background image in the first image.

[0011] According to one embodiment of the present invention, another image processing method is provided, comprising:

[0012] A connection is established between a first terminal and a second terminal, wherein the first terminal is used to display a first image, the second terminal is used to display a second image, the first terminal and the second terminal are placed overlapping each other, and the first terminal is located above the second terminal; based on a relative attribute relationship between the first terminal and the second terminal, a target area image is obtained from the second image, wherein the target area image is a portion of the second image covered by the first terminal; the target area image is sent to the first terminal, so that the first terminal replaces the background image in the first image with the target area image to obtain a composite image.

[0013] Optionally, based on the relative attribute relationship between the first terminal and the second terminal, obtaining the target area image from the second image includes: obtaining the relative attribute relationship, wherein the relative attribute relationship includes: the relative position relationship and the relative angle relationship between the first terminal and the second terminal; determining first size information and second size information, wherein the first size information is the display size of the graphical user interface of the first terminal, and the second size information is the display size of the graphical user interface of the second terminal; and obtaining the target area image from the second image using the relative position relationship, the relative angle relationship, the first size information and the second size information.

[0014] Optionally, the image processing method further includes: in response to a touch operation performed on a graphical user interface of the second terminal, synthesizing the foreground image in the first image into the second image.

[0015] According to one embodiment of the present invention, there is also provided an image processing device, comprising:

[0016] A connection module is used to establish a connection between a first terminal and a second terminal, wherein the first terminal is used to display a first image, and the second terminal is used to display a second image, the first terminal and the second terminal are placed overlapping each other, and the first terminal is located above the second terminal; a receiving module is used to receive a target area image from the second terminal, wherein the target area image is a partial image covered by the first terminal and obtained from the second image by the second terminal based on the relative attribute relationship between the first terminal and the second terminal; a processing module is used to replace the background image in the first image with the target area image to obtain a composite image.

[0017] Optionally, the processing module is further configured to update the first image in response to a touch operation performed on a graphical user interface of the first terminal.

[0018] Optionally, the processing module is further configured to update the target area image in response to a control operation performed on the first terminal.

[0019] Optionally, the processing module is further configured to restore the display of the background image in the first image in response to the first terminal moving out of the display range of the graphical user interface of the second terminal.

[0020] According to one embodiment of the present invention, another image processing device is provided, comprising:

[0021] A connection module is used to establish a connection between a first terminal and a second terminal, wherein the first terminal is used to display a first image, and the second terminal is used to display a second image, the first terminal and the second terminal are placed overlapping each other, and the first terminal is located above the second terminal; a processing module is used to obtain a target area image from the second image based on a relative attribute relationship between the first terminal and the second terminal, wherein the target area image is a portion of the second image covered by the first terminal; a sending module is used to send the target area image to the first terminal, so that the first terminal replaces the background image in the first image with the target area image to obtain a composite image.

[0022] Optionally, the processing module is used to obtain a relative attribute relationship, wherein the relative attribute relationship includes: a relative position relationship and a relative angle relationship between the first terminal and the second terminal; determining first size information and second size information, wherein the first size information is a display size of a graphical user interface of the first terminal, and the second size information is a display size of a graphical user interface of the second terminal; and obtaining a target area image from the second image using the relative position relationship, the relative angle relationship, the first size information, and the second size information.

[0023] Optionally, the processing module is further configured to synthesize the foreground image in the first image into the second image in response to a touch operation performed on a graphical user interface of the second terminal.

[0024] According to one embodiment of the present invention, a non-volatile storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute any of the above-mentioned image processing methods when running.

[0025] According to one embodiment of the present invention, there is further provided an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the above-mentioned image processing methods.

[0026] In at least some embodiments of the present invention, a connection is established between a first terminal and a second terminal, the first terminal is used to display a first image, the second terminal is used to display a second image, the first terminal and the second terminal are placed overlapping each other and the first terminal is located above the second terminal, by receiving a target area image from the second terminal, the target area image is obtained by the second terminal based on the relative attribute relationship between the first terminal and the second terminal, from the second image, the partial image covered by the first terminal, and the background image in the first image is replaced with the target area image to obtain a composite image, thereby achieving the purpose of avoiding frequent transmission of image data and frequent image synthesis processing between different terminals, thereby achieving the technical effect of effectively reducing the amount of image data transmission, reducing the operational complexity of image synthesis, and enhancing the operational flexibility and intuitiveness of image synthesis, thereby solving the technical problems of the processing method for synthesizing pictures stored on different terminals provided in the related art, which has a cumbersome operation process, low processing efficiency, and long time consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0028] Figure 1 is a hardware structure block diagram of a mobile terminal of an image processing method according to an embodiment of the present invention;

[0029] Figure 2 is a flow chart of an image processing method according to one embodiment of the present invention;

[0030] Figure 3 is a schematic diagram of an image processing process according to one optional embodiment of the present invention;

[0031] Figure 4 is a flow chart of another image processing method according to one embodiment of the present invention;

[0032] Figure 5 is a structural block diagram of an image processing device according to one embodiment of the present invention;

[0033] Figure 6 is a structural block diagram of another image processing device according to one embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0036] According to one embodiment of the present invention, an embodiment of an image processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0037] In one embodiment of the present invention, the image processing method can be run on a terminal device or a server. The terminal device can be a local terminal device. When the image processing method is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.

[0038] In an optional embodiment, various cloud applications can be run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the operating body of the game program and the main body of the game screen presentation are separated, the storage and operation of the image processing method are completed on the cloud game server, and the role of the client device is used for receiving and sending data and presenting the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, etc.; but the terminal device for information processing is a cloud game server in the cloud. When playing the game, the player operates the client device to send an operation instruction to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.

[0039] In an optional embodiment, the terminal device may be a local terminal device. Taking a game as an example, the local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed by an electronic device and run conventionally. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.

[0040] In a possible implementation, an embodiment of the present invention provides an image processing method that provides a graphical user interface through a terminal device, wherein the terminal device may be the local terminal device mentioned above, or may be a client device in the cloud interaction system mentioned above.

[0041] Taking a mobile terminal running in a local terminal device as an example, the mobile terminal can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, referred to as MID), a PAD, a game console, and other terminal devices. Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of an image processing method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microprocessor (MCU), a programmable logic device (FPGA), a neural network processor (NPU), a tensor processor (TPU), an artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data. Optionally, the mobile terminal may also include a transmission device 106 for communication functions, an input and output device 108, and a display device 110. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0042] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the image processing method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above-mentioned image processing method is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0043] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0044] The inputs in the input / output device 108 may come from a plurality of human interface devices (HIDs), such as keyboards and mice, game controllers, and other dedicated game controllers (such as steering wheels, fishing rods, dance mats, remote controls, etc.). In addition to providing input functions, some human interface devices may also provide output functions, such as force feedback and vibration of game controllers, audio output of controllers, etc.

[0045] The display device 110 may be, for example, a head-up display (HUD), a touch-screen liquid crystal display (LCD), and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), and a user may interact with the GUI by finger contacts and / or gestures on a touch-sensitive surface, wherein the human-computer interaction functions here may optionally include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music, and / or web browsing, etc. The executable instructions for executing the above-mentioned human-computer interaction functions are configured / stored in a computer program product or a readable storage medium executable by one or more processors.

[0046] In this embodiment, an image processing method running on the above mobile terminal is provided. Figure 2 is a flow chart of an image processing method according to one embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:

[0047] Step S20, establishing a connection between the first terminal and the second terminal, wherein the first terminal is used to display the first image, the second terminal is used to display the second image, the first terminal and the second terminal are overlapped and placed, and the first terminal is located above the second terminal;

[0048] The first terminal can be used to display a first image, and the second terminal can be used to display a second image. The first image can include a foreground image and a background image. Taking a landscape photo of a person as an example, the foreground image can be a person image, and the background image can be a landscape image. When it is necessary to merge the foreground image in the first image displayed by the first terminal into the second image displayed by the second terminal, the first terminal and the second terminal can be placed overlapping each other and the first terminal can be located above the second terminal. At this time, the graphical user interface of the first terminal and the graphical user interface of the second terminal have the same orientation. The size relationship between the graphical user interface of the first terminal and the graphical user interface of the second terminal is not strictly limited here. For example: the size of the graphical user interface of the first terminal can be smaller than the size of the graphical user interface of the second terminal. For another example: the size of the graphical user interface of the first terminal can be equal to the size of the graphical user interface of the second terminal.

[0049] Figure 3 is a schematic diagram of an image processing process according to one optional embodiment of the present invention, such as Figure 3 As shown, terminal B is the first terminal and terminal A is the second terminal. When it is necessary to merge the foreground image in the image to be placed (equivalent to the first image) displayed by terminal B into the canvas displayed by terminal A (equivalent to the second image), terminal A and terminal B can be placed overlapping each other and terminal B is located above terminal A. At this time, the graphical user interface of terminal A and the graphical user interface of terminal B have the same orientation. The size of the graphical user interface of terminal B is smaller than that of the graphical user interface of terminal A. The foreground image contained in the image to be placed is a six-pointed star, and the background image contained in the image to be placed is an ordinary background pattern (for example, a blue striped background pattern or a blank background).

[0050] Step S21, receiving a target area image from a second terminal, wherein the target area image is a partial image covered by the first terminal and obtained by the second terminal from the second image based on a relative attribute relationship between the first terminal and the second terminal;

[0051] After the first terminal and the second terminal are connected, placing the first terminal and the second terminal on top of each other will directly trigger the image display function. As for the connection method, the present invention does not impose strict restrictions. For example: when the first terminal and the second terminal are connected via Bluetooth, the first terminal and the second terminal need to be paired and the connection is confirmed.

[0052] In addition, since there are multiple types of sensors in the terminal device sensor, the physical position of the terminal device itself can be measured, which may include but is not limited to: a proximity sensor (used to identify the distance between different terminal devices to determine whether the first terminal and the second terminal are stacked), an accelerometer and a geomagnetic field sensor (used to identify the position of the terminal device). Through the above-mentioned multiple types of sensors and whether the graphical user interfaces of different terminals are oriented in the same direction, the relative attribute relationship between the first terminal and the second terminal (which may include: relative position relationship and relative angle relationship) can be determined. After determining the relative position relationship and relative angle relationship between the first terminal and the second terminal, combined with the size relationship between the graphical user interface of the first terminal and the graphical user interface of the second terminal, it is possible to obtain the partial image covered by the graphical user interface of the first terminal from the second image, that is, the target area image.

[0053] Still like Figure 3 As shown, after determining the relative position relationship and relative angle relationship between terminal B and terminal A, combined with the size relationship between the graphical user interface of terminal B and the graphical user interface of terminal A, it is possible to obtain the partial image covered by the graphical user interface of terminal B from the canvas displayed by terminal A, that is, the target area image.

[0054] Step S22: Replace the background image in the first image with the target area image to obtain a composite image.

[0055] The first terminal can receive the target area image from the second terminal, and then replace the background image in the first image with the target area image in real time to obtain a real-time composite image. This eliminates the need for frequent image data transmission between the first terminal and the second terminal, and allows the user interface of the first terminal to preview in real time whether the composite image effect meets the preset requirements. In addition, when the user is previewing the composite image effect, the background image of the first terminal displays in real time the display content of the covered target area image on the second device, creating an illusion of "transparency", so the foreground image can be accurately placed at the target position in the second image. Still like Figure 3 As shown, terminal B can receive the target area image from terminal A, and then replace the background image in the image to be placed with the target area image in real time to obtain a real-time composite image.

[0056] Through the above steps, a connection can be established between the first terminal and the second terminal, the first terminal is used to display the first image, the second terminal is used to display the second image, the first terminal and the second terminal are placed overlapping each other and the first terminal is located above the second terminal, by receiving the target area image from the second terminal, the target area image is obtained by the second terminal based on the relative attribute relationship between the first terminal and the second terminal, from the second image, the partial image covered by the first terminal, and the background image in the first image is replaced with the target area image to obtain a composite image, so as to achieve the purpose of avoiding frequent transmission of image data and frequent image synthesis processing between different terminals, thereby achieving the technical effect of effectively reducing the amount of image data transmission, reducing the operational complexity of image synthesis, and enhancing the operational flexibility and intuitiveness of image synthesis, thereby solving the technical problems of the processing method for synthesizing pictures stored on different terminals provided in the related art, which has a cumbersome operation process, low processing efficiency, and long time consumption.

[0057] Optionally, the above image processing method may further include the following execution steps:

[0058] Step S23, in response to a touch operation performed on the graphical user interface of the first terminal, updating the first image.

[0059] The above touch operation may include but is not limited to: single-click operation, double-click operation, sliding operation, re-press operation, long-press operation, etc. The first image may be updated by responding to the touch operation performed on the graphical user interface of the first terminal. That is, the user may change the above first image in real time by performing a touch operation on the graphical user interface of the first terminal. For example: the user performs a sliding touch operation on the graphical user interface of the first terminal, and changes the above first image in real time based on the sliding direction of the sliding touch operation (i.e., sliding to the left, sliding to the right, etc.). For another example: the user performs a click touch operation on the virtual direction button (i.e., virtual left direction button, virtual right direction button, etc.) displayed in the graphical user interface of the first terminal, and changes the above first image in real time based on the click touch operation.

[0060] Optionally, the above image processing method may further include the following execution steps:

[0061] Step S24, in response to the control operation performed on the first terminal, updating the target area image.

[0062] The control operation may be an operation of moving the first terminal above the second terminal. The target area image may be updated in response to the control operation performed on the first terminal. That is, the target area image covered by the first terminal in the second image is updated in real time so as to accurately place the foreground image at the target position in the second image. Figure 3As shown, by moving terminal B above terminal A, not only can the target area image covered by terminal B in the canvas displayed by terminal A be updated in real time, but terminal B can also receive the updated target area image from terminal A, and then replace the background image in the image to be placed with the updated target area image in real time to obtain an updated composite image.

[0063] Optionally, the above image processing method may further include the following execution steps:

[0064] Step S25: in response to the first terminal moving out of the display range of the graphical user interface of the second terminal, restoring the display of the background image in the first image.

[0065] When the first terminal fails to find the first image that meets the preset requirements (that is, the preview composite image effect fails to meet the preset requirements), the first terminal can be directly moved out of the display range of the graphical user interface of the second terminal. At this time, not only will the second image displayed on the second terminal not be changed or affected, but the original background image can also be restored in the first image. That is, the original first image is restored in the graphical user interface of the first terminal. Figure 3 As shown, after terminal B is moved out of the display range of the graphical user interface of terminal A, not only the canvas displayed on terminal A will not be changed or affected in any way, but also the original background image can be restored to display in the image to be placed.

[0066] In this embodiment, another image processing method running on the above mobile terminal is provided. Figure 4 is a flowchart of another image processing method according to one embodiment of the present invention. Figure 4 As shown, the method comprises the following steps:

[0067] Step S40, establishing a connection between the first terminal and the second terminal, wherein the first terminal is used to display the first image, the second terminal is used to display the second image, the first terminal and the second terminal are placed overlapping each other, and the first terminal is located above the second terminal;

[0068] The first terminal can be used to display a first image, and the second terminal can be used to display a second image. The first image can include a foreground image and a background image. Taking a landscape photo of a person as an example, the foreground image can be a person image, and the background image can be a landscape image. When it is necessary to merge the foreground image in the first image displayed by the first terminal into the second image displayed by the second terminal, the first terminal and the second terminal can be placed overlapping each other and the first terminal can be located above the second terminal. At this time, the graphical user interface of the first terminal and the graphical user interface of the second terminal have the same orientation. The size relationship between the graphical user interface of the first terminal and the graphical user interface of the second terminal is not strictly limited here. For example: the size of the graphical user interface of the first terminal can be smaller than the size of the graphical user interface of the second terminal. For another example: the size of the graphical user interface of the first terminal can be equal to the size of the graphical user interface of the second terminal.

[0069] Step S41, based on the relative attribute relationship between the first terminal and the second terminal, acquiring a target area image from the second image, wherein the target area image is a portion of the second image covered by the first terminal;

[0070] After the first terminal and the second terminal are connected, placing the first terminal and the second terminal on top of each other will directly trigger the image display function. As for the connection method, the present invention does not impose strict restrictions. For example: when the first terminal and the second terminal are connected via Bluetooth, the first terminal and the second terminal need to be paired and the connection is confirmed.

[0071] Step S42: sending the target area image to the first terminal, so that the first terminal replaces the background image in the first image with the target area image to obtain a composite image.

[0072] The first terminal can receive the target area image from the second terminal, and then replace the background image in the first image with the target area image in real time to obtain a real-time composite image. In this way, there is no need to frequently transmit image data between the first terminal and the second terminal, and the composite image effect can be previewed in real time on the image user interface of the first terminal to see whether it meets the preset requirements. In addition, when the user previews the composite image effect, since the background image of the first terminal displays the display content of the covered target area image on the second device in real time, it creates an illusion of "transparency", so the foreground image can be accurately placed at the target position in the second image.

[0073] Through the above steps, a connection can be established between the first terminal and the second terminal, the first terminal is used to display the first image, the second terminal is used to display the second image, the first terminal and the second terminal are placed overlapping each other and the first terminal is located above the second terminal, and a target area image is obtained from the second image based on the relative attribute relationship between the first terminal and the second terminal, the target area image is a portion of the second image covered by the first terminal, and the target area image is sent to the first terminal, so that the first terminal replaces the background image in the first image with the target area image to obtain a composite image, thereby achieving the purpose of avoiding frequent transmission of image data and frequent image synthesis processing between different terminals, thereby achieving the technical effect of effectively reducing the amount of image data transmission, reducing the operational complexity of image synthesis, and enhancing the operational flexibility and intuitiveness of image synthesis, thereby solving the technical problems of the processing method provided in the related art for synthesizing pictures stored on different terminals, the operation process of which is relatively cumbersome, the processing efficiency is low, and the time is long.

[0074] Optionally, in step S41, based on the relative attribute relationship between the first terminal and the second terminal, acquiring the target area image from the second image may include the following execution steps:

[0075] Step S410, obtaining a relative attribute relationship, wherein the relative attribute relationship includes: a relative position relationship and a relative angle relationship between the first terminal and the second terminal;

[0076] Step S411, determining first size information and second size information, wherein the first size information is a display size of a graphical user interface of a first terminal, and the second size information is a display size of a graphical user interface of a second terminal;

[0077] Step S412: Acquire a target area image from the second image by using the relative position relationship, the relative angle relationship, the first size information and the second size information.

[0078] Since there are multiple types of sensors in the terminal device sensor, the physical position of the terminal device itself can be measured, which may include but is not limited to: a proximity sensor (used to identify the distance between different terminal devices to determine whether the first terminal and the second terminal are stacked), an accelerometer and a geomagnetic field sensor (used to identify the position of the terminal device). Through the above-mentioned multiple types of sensors and whether the graphical user interfaces of different terminals are oriented in the same direction, the relative attribute relationship between the first terminal and the second terminal (which may include: relative position relationship and relative angle relationship) can be determined. After determining the relative position relationship and relative angle relationship between the first terminal and the second terminal, combined with the size relationship between the graphical user interface of the first terminal and the graphical user interface of the second terminal (that is, the display size of the graphical user interface of the first terminal and the display size of the graphical user interface of the second terminal), it is possible to obtain the partial image covered by the graphical user interface of the first terminal from the second image, that is, the target area image.

[0079] Optionally, the above image processing method may further include the following execution steps:

[0080] Step S43 , in response to a touch operation performed on the graphical user interface of the second terminal, synthesizing the foreground image in the first image into the second image.

[0081] The above touch operation may include but is not limited to: double-click operation, re-press operation, long press operation, etc. By responding to the touch operation performed on the graphical user interface of the second terminal, the foreground image in the first image can be synthesized into the second image. In an optional embodiment, when a suitable first image is found among all the images stored in the first terminal, and a suitable display position is synchronously found in the graphical user interface of the second terminal, the user performs a double-click touch operation in the graphical user interface of the second terminal, thereby synthesizing the foreground image in the first image into the second image. Still as Figure 3 As shown, when a suitable image to be placed is found among all the images stored in terminal B, and a suitable display position is simultaneously found on the canvas displayed by terminal A, the user performs a double-click touch operation on the canvas displayed by terminal A, thereby synthesizing the hexagonal star displayed in the image to be placed onto the canvas displayed by terminal A.

[0082] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0083] In this embodiment, an image processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0084] Figure 5 is a structural block diagram of an image processing device according to one embodiment of the present invention. Figure 5 As shown, the device includes: a connection module 10, used to establish a connection between a first terminal and a second terminal, wherein the first terminal is used to display a first image, the second terminal is used to display a second image, the first terminal and the second terminal are placed overlapping each other, and the first terminal is located above the second terminal; a receiving module 12, used to receive a target area image from the second terminal, wherein the target area image is a partial image covered by the first terminal and obtained from the second image by the second terminal based on a relative attribute relationship between the first terminal and the second terminal; a processing module 14, used to replace the background image in the first image with the target area image to obtain a composite image.

[0085] Optionally, the processing module 14 is further configured to update the first image in response to a touch operation performed on a graphical user interface of the first terminal.

[0086] Optionally, the processing module 14 is further configured to update the target area image in response to a control operation performed on the first terminal.

[0087] Optionally, the processing module 14 is further configured to restore the display of the background image in the first image in response to the first terminal moving out of the display range of the graphical user interface of the second terminal.

[0088] In this embodiment, another image processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0089] Figure 6 is a structural block diagram of another image processing device according to one embodiment of the present invention. Figure 6 As shown, the device includes: a connection module 20, used to establish a connection between a first terminal and a second terminal, wherein the first terminal is used to display a first image, and the second terminal is used to display a second image, the first terminal and the second terminal are placed overlapping each other, and the first terminal is located above the second terminal; a processing module 22, used to obtain a target area image from the second image based on a relative attribute relationship between the first terminal and the second terminal, wherein the target area image is a portion of the second image covered by the first terminal; a sending module 24, used to send the target area image to the first terminal, so that the first terminal replaces the background image in the first image with the target area image to obtain a composite image.

[0090] Optionally, the processing module 22 is used to obtain a relative attribute relationship, wherein the relative attribute relationship includes: a relative position relationship and a relative angle relationship between the first terminal and the second terminal; determining first size information and second size information, wherein the first size information is a display size of a graphical user interface of the first terminal, and the second size information is a display size of a graphical user interface of the second terminal; and obtaining a target area image from the second image using the relative position relationship, the relative angle relationship, the first size information, and the second size information.

[0091] Optionally, the processing module 22 is further configured to synthesize the foreground image in the first image into the second image in response to a touch operation performed on the graphical user interface of the second terminal.

[0092] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0093] An embodiment of the present invention further provides a non-volatile storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0094] Optionally, in this embodiment, the non-volatile storage medium may be configured to store a computer program for performing the following steps:

[0095] S1, establishing a connection between a first terminal and a second terminal, wherein the first terminal is used to display a first image, the second terminal is used to display a second image, the first terminal and the second terminal are overlapped with each other, and the first terminal is located above the second terminal;

[0096] S2, receiving a target area image from a second terminal, wherein the target area image is a partial image covered by the first terminal obtained from the second image by the second terminal based on a relative attribute relationship between the first terminal and the second terminal;

[0097] S3, replacing the background image in the first image with the target area image to obtain a composite image.

[0098] Optionally, in this embodiment, the non-volatile storage medium may also be configured to store a computer program for performing the following steps:

[0099] S1, establishing a connection between a first terminal and a second terminal, wherein the first terminal is used to display a first image, the second terminal is used to display a second image, the first terminal and the second terminal are overlapped with each other, and the first terminal is located above the second terminal;

[0100] S2, based on the relative attribute relationship between the first terminal and the second terminal, acquiring a target area image from the second image, wherein the target area image is a portion of the second image covered by the first terminal;

[0101] S3, sending the target area image to the first terminal, so that the first terminal replaces the background image in the first image with the target area image to obtain a composite image.

[0102] Optionally, in this embodiment, the above-mentioned non-volatile storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0103] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0104] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0105] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0106] S1, establishing a connection between a first terminal and a second terminal, wherein the first terminal is used to display a first image, the second terminal is used to display a second image, the first terminal and the second terminal are overlapped with each other, and the first terminal is located above the second terminal;

[0107] S2, receiving a target area image from a second terminal, wherein the target area image is a partial image covered by the first terminal obtained from the second image by the second terminal based on a relative attribute relationship between the first terminal and the second terminal;

[0108] S3, replacing the background image in the first image with the target area image to obtain a composite image.

[0109] Optionally, in this embodiment, the processor may also be configured to perform the following steps through a computer program:

[0110] S1, establishing a connection between a first terminal and a second terminal, wherein the first terminal is used to display a first image, the second terminal is used to display a second image, the first terminal and the second terminal are overlapped with each other, and the first terminal is located above the second terminal;

[0111] S2, based on the relative attribute relationship between the first terminal and the second terminal, acquiring a target area image from the second image, wherein the target area image is a portion of the second image covered by the first terminal;

[0112] S3, sending the target area image to the first terminal, so that the first terminal replaces the background image in the first image with the target area image to obtain a composite image.

[0113] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0114] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0115] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0116] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0117] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0118] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0119] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0120] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. An image processing method, It is characterized in that include: Establishing a connection between a first terminal and a second terminal, wherein the first terminal is used to display a first image, the second terminal is used to display a second image, the first terminal and the second terminal are overlapped with each other, and the first terminal is located above the second terminal; receiving a target area image from the second terminal, wherein the target area image is a partial image covered by the first terminal and acquired by the second terminal from the second image based on a relative attribute relationship between the first terminal and the second terminal, wherein the relative attribute relationship includes: a relative position relationship and a relative angle relationship between the first terminal and the second terminal; The background image in the first image is replaced by the target area image to obtain a composite image.

2. The image processing method according to claim 1, It is characterized in that The image processing method further comprises: In response to a touch operation performed on a graphical user interface of the first terminal, the first image is updated.

3. The image processing method according to claim 1, It is characterized in that The image processing method further comprises: In response to a control operation performed on the first terminal, the target area image is updated.

4. The image processing method according to claim 1, It is characterized in that The image processing method further comprises: In response to the first terminal moving out of the display range of the graphical user interface of the second terminal, the background image is restored to be displayed in the first image.

5. An image processing method, It is characterized in that include: Establishing a connection between a first terminal and a second terminal, wherein the first terminal is used to display a first image, the second terminal is used to display a second image, the first terminal and the second terminal are overlapped with each other, and the first terminal is located above the second terminal; Based on the relative attribute relationship between the first terminal and the second terminal, acquiring a target area image from the second image, wherein the target area image is a partial image of the second image covered by the first terminal, wherein the relative attribute relationship includes: a relative position relationship and a relative angle relationship between the first terminal and the second terminal; The target area image is sent to the first terminal, so that the first terminal replaces the background image in the first image with the target area image to obtain a composite image.

6. The image processing method according to claim 5, It is characterized in that Based on the relative attribute relationship between the first terminal and the second terminal, acquiring the target area image from the second image includes: Acquiring the relative attribute relationship; Determine first size information and second size information, wherein the first size information is a display size of a graphical user interface of the first terminal, and the second size information is a display size of a graphical user interface of the second terminal; The target area image is acquired from the second image by using the relative position relationship, the relative angle relationship, the first size information, and the second size information.

7. The image processing method according to claim 5, It is characterized in that The image processing method further comprises: In response to a touch operation performed on a graphical user interface of the second terminal, a foreground image in the first image is synthesized into the second image.

8. An image processing device, It is characterized in that include: a connection module, configured to establish a connection between a first terminal and a second terminal, wherein the first terminal is configured to display a first image, the second terminal is configured to display a second image, the first terminal and the second terminal are overlapped with each other, and the first terminal is located above the second terminal; a receiving module, configured to receive a target area image from the second terminal, wherein the target area image is a partial image covered by the first terminal and acquired by the second terminal from the second image based on a relative attribute relationship between the first terminal and the second terminal, wherein the relative attribute relationship includes: a relative position relationship and a relative angle relationship between the first terminal and the second terminal; A processing module is used to replace the background image in the first image with the target area image to obtain a composite image.

9. An image processing device, It is characterized in that include: a connection module, configured to establish a connection between a first terminal and a second terminal, wherein the first terminal is configured to display a first image, the second terminal is configured to display a second image, the first terminal and the second terminal are overlapped with each other, and the first terminal is located above the second terminal; a processing module, configured to acquire a target area image from the second image based on a relative attribute relationship between the first terminal and the second terminal, wherein the target area image is a partial image of the second image covered by the first terminal, wherein the relative attribute relationship includes: a relative position relationship and a relative angle relationship between the first terminal and the second terminal; The sending module is used to send the target area image to the first terminal, so that the first terminal replaces the background image in the first image with the target area image to obtain a composite image.

10. A non-volatile storage medium, It is characterized in that The storage medium stores a computer program, wherein the computer program is configured to execute the image processing method described in any one of claims 1 to 4 or the image processing method described in any one of claims 5 to 7 when running.

11. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to run the computer program to execute the image processing method described in any one of claims 1 to 4 or the image processing method described in any one of claims 5 to 7.

Citation Information

Patent Citations

  • Picture synthesis projection method, main control device and accessory equipment

    CN107360407A

  • Shooting method and device, terminal equipment and storage medium

    CN113489903A