Image layering method and device and electronic equipment

Through AI technology, depth maps are generated and screen segmentation is performed. Combined with depth animation special effects, the accuracy and efficiency problems of depth map generation in image processing in the existing technology are solved, automatic image layer acquisition and editing is realized, and image processing is improved. Efficiency and accuracy.

CN118967721APending Publication Date: 2024-11-15WONDERSHARE TECHNOLOGY (HUNAN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411155643.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

When generating depth maps in image processing, the active method is expensive and bulky, while the passive method is not accurate, and there is a lack of an automatic and accurate method to acquire layer information of the image.

Method used

Using AI technology to calculate the original image through convolutional neural network, generate the depth image, and perform picture segmentation and semantic segmentation through the depth information of the depth image. Combined with the depth animation special effect technology, highlighting and hierarchical editing, the image is automatically generated. .

Benefits of technology

It realizes the rapid and accurate acquisition of layer information of the image, reduces the cumbersomeness and manual interaction of image processing, and improves the efficiency and accuracy of image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118967721A_ABST
    Figure CN118967721A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an image layering method, which comprises the following steps: calculating an original image through an AI technology to obtain a depth image; performing picture segmentation on the depth map according to the depth information of the depth map; and generating a layer of the image according to a picture segmentation result of the depth map. According to the image layering method provided by the embodiment of the invention, the depth map can be automatically and accurately generated through the AI technology, so that the layer information of the image can be quickly and accurately acquired. The embodiment of the invention further provides an image layering device and electronic equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image processing technology, and more specifically, to an image layering method, device, and electronic device. Background Art

[0002] When processing an image, it is usually necessary to create different layers, masks, etc. Existing image processing software usually creates layers and masks by generating depth maps.

[0003] There are many ways to generate depth maps, which can be roughly divided into two categories: active and passive: 1) Active methods: Active methods use an external light source (such as laser or structured light) to illuminate the object and calculate the depth based on the reflection of the light source. Active methods can usually generate high-precision depth maps, but they can be expensive and bulky; 2) Passive methods: Passive methods use natural light to generate depth maps. Passive methods are usually cheaper and lighter, but the depth maps they generate may not be as accurate as active methods. Summary of the invention

[0004] In response to the problems existing in the above-mentioned prior art, the embodiments of the present application provide an image layering method, device, and electronic device, which can automatically and accurately generate a depth map through AI technology, thereby quickly and accurately obtaining the layer information of the image.

[0005] In a first aspect, an embodiment of the present application provides an image layering method, comprising:

[0006] The original image is calculated using AI technology to obtain a depth map;

[0007] Performing screen segmentation on the depth map according to the depth information of the depth map; and

[0008] The layers of the image are generated according to the screen segmentation result of the depth map.

[0009] Furthermore, the calculation of the original image by using AI technology to obtain the depth map includes:

[0010] The AI ​​depth model is used to calculate the original image through a convolutional neural network to obtain the depth map.

[0011] Further, after performing screen segmentation on the depth map according to the depth information of the depth map, the method further includes:

[0012] Perform image semantic segmentation processing on the depth map to correct the screen segmentation result of the depth map.

[0013] Further, the performing screen segmentation on the depth map according to the depth information of the depth map includes:

[0014] The depth range of the depth map is divided to perform screen segmentation on the depth map.

[0015] Furthermore, after generating the layer of the image according to the screen segmentation result of the depth map, the method further includes:

[0016] The depth map is highlighted by using the depth animation special effects technology and according to the layer information of the image.

[0017] Furthermore, after highlighting the depth map by using the depth animation special effects technology and according to the layer information of the image, the method further includes:

[0018] The image is subjected to layered editing or masking processing according to the layer information of the image.

[0019] Furthermore, before the original image is calculated by the AI ​​technology to obtain the depth map, the method further includes:

[0020] Import the original image.

[0021] In a second aspect, an embodiment of the present application further provides an image layering device, including:

[0022] The depth map calculation module is used to calculate the original image through AI technology to obtain a depth map;

[0023] a screen segmentation module, configured to perform screen segmentation on the depth map according to the depth information of the depth map; and

[0024] The layer generation module is used to generate the layer of the image according to the screen segmentation result of the depth map.

[0025] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to implement the image layering method according to the first aspect when executing the program.

[0026] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, wherein the computer program is used to implement the image layering method according to the first aspect above.

[0027] The embodiments of the present application bring the following beneficial effects:

[0028] The image layering method provided in the embodiment of the present application parses the structural information of a PDF document, identifies the title of the PDF document, and automatically generates a bookmark directory for the PDF document according to the identified title of the PDF document, and finally adds the generated bookmark directory to the PDF document, which can solve the problem of being cumbersome and error-prone to manually adding a bookmark directory for a PDF document, thereby automatically generating a relatively accurate bookmark directory to improve the efficiency of users in browsing and searching for PDF document content. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.

[0030] Figure 1 A schematic diagram of a process flow of an image layering method provided in an embodiment of the present application;

[0031] Figure 2a to Figure 2c A schematic diagram of the application of the image layering method provided in the embodiment of the present application;

[0032] Figure 3 A structural block diagram of an image layering device provided in an embodiment of the present application;

[0033] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0034] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments described in the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0036] In the specification and claims of this application and the above-mentioned drawings, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "multiple" means two or more. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to the specific circumstances.

[0037] Figure 1 FIG. 1 is a flow chart of an image layering method according to an embodiment of the present application. Figure 1 As shown, the image layering method of the embodiment of the present application includes the following steps:

[0038] S101: Calculate the original image using AI technology to obtain a depth map;

[0039] Reference Figure 2b , a depth map is an image used to represent the three-dimensional information of a scene. In a depth map, the value of each pixel represents the depth or distance of the pixel in the visual scene, usually represented by a grayscale value, where brighter pixels represent closer objects and darker pixels represent farther objects. Depth maps can be used in various applications, such as three-dimensional reconstruction, image understanding, etc. The difference between a depth map and an ordinary image (RGB image) is that an ordinary image only records the color information of the object, while a depth map also records the depth information of the object. Therefore, a depth map can provide richer information than an ordinary image.

[0040] Most traditional image processing solutions rely on independent sensors to collect information to generate a depth map of the image. The image layering method provided in the embodiment of the present application uses AI (Artificial Intelligence) technology to calculate the original image without relying on external hardware to collect the depth information of the image, thereby automatically and quickly generating a depth map of the image.

[0041] S102: performing screen segmentation on the depth map according to the depth information of the depth map;

[0042] That is, after the depth map of the image is generated, it is necessary to perform screen segmentation on the depth map according to the depth information of the depth map, so as to facilitate the user to perform editing operations on different areas of the image.

[0043] S103: Generate layers of the image according to the screen segmentation result of the depth map.

[0044] Specifically, layers are like films containing elements such as text or graphics, which are stacked together in order to form the final effect of the page. Layers can accurately position elements on the page. You can add text, pictures, tables, plug-ins to a layer, and you can also nest layers in it.

[0045] After the depth map of the image is generated, it is necessary to segment the depth map according to the depth information of the depth map, so that the layers of the image can be automatically and quickly generated without the user having to manually draw a selection and create a layer.

[0046] Therefore, the image layering method provided in the embodiment of the present application calculates the original image through AI technology to obtain a depth map, and performs screen segmentation on the depth map based on the depth information of the depth map, and then generates image layers based on the screen segmentation results of the depth map. The image layering method provided in the embodiment of the present application can automatically and accurately generate a depth map through AI technology, thereby being able to quickly and accurately obtain the layer information of the image.

[0047] Furthermore, in some embodiments of the present application, the calculation of the original image by using AI technology to obtain the depth map includes:

[0048] The AI ​​depth model is used to calculate the original image through a convolutional neural network to obtain the depth map.

[0049] Specifically, Convolutional Neural Networks (CNN) is a type of feedforward neural network that includes convolution calculations and has a deep structure. It is one of the representative algorithms of deep learning.

[0050] In this step, you first need to import the AI ​​depth model, then build a convolutional neural network, train the convolutional neural network, and finally use the convolutional neural network to generate a depth map of the original image. Specifically, when the original image is input, the network will predict the depth information of the image based on the learned feature mapping relationship and generate the corresponding depth map. The depth map generated by the convolutional neural network has high accuracy, strong adaptability and high degree of automation.

[0051] It can be understood that the image layering method provided in the embodiment of the present application can also generate a depth map of the image through other artificial intelligence algorithms, such as recurrent neural networks and variational autoencoders.

[0052] Furthermore, in some embodiments of the present application, after performing screen segmentation on the depth map according to the depth information of the depth map, the method further includes:

[0053] Perform image semantic segmentation processing on the depth map to correct the screen segmentation result of the depth map.

[0054] Specifically, image semantic segmentation is a computer vision task whose goal is to segment an input image into multiple regions and assign a semantic category label to each pixel to indicate which object or region in the image the pixel belongs to.

[0055] Unlike other image segmentation tasks, image semantic segmentation not only focuses on segmenting images, but also understands the semantic meaning of different parts of the image. For example, in autonomous driving scenarios, image semantic segmentation can distinguish objects such as roads, vehicles, pedestrians, and traffic signs.

[0056] Therefore, the image layering method provided in the embodiment of the present application can intelligently analyze the features in the image scene through the semantic segmentation model, thereby further accurately correcting the image segmentation result of the depth map.

[0057] Further, in some embodiments of the present application, the performing screen segmentation on the depth map according to the depth information of the depth map includes:

[0058] The depth range of the depth map is divided to perform screen segmentation on the depth map.

[0059] That is, the depth range of the depth map can be divided according to a preset standard, so as to perform screen segmentation on the depth map of the image, thereby facilitating further rapid and accurate generation of image layers.

[0060] Further, refer to Figure 2c In some embodiments of the present application, after generating the layer of the image according to the screen segmentation result of the depth map, the method further includes:

[0061] The depth map is highlighted by using the depth animation special effects technology and according to the layer information of the image.

[0062] That is, the image layering method provided in the embodiment of the present application utilizes depth animation effects to highlight a certain range of the depth map of the image. This range is the layer, mask or selection created by the user. The user can use the slider of the image software to easily adjust the depth range and distance to accurately select different areas of the screen and implement layered color adjustment, editing and other operations. The highlighted selection will change with the change of the slider, weakening the concept of layers and masks, which is particularly friendly to novice users. Therefore, the image layering method provided in the embodiment of the present application abandons traditional layers, masks and other expressions, and uses dynamic effects and highlights to remind users of the currently created selection, and changes in real time with the slider, eliminating the cumbersome interaction methods of previous layers and masks.

[0063] Furthermore, in some embodiments of the present application, after highlighting the depth map according to the layer information of the image by using the depth animation special effects technology, the method further includes:

[0064] The image is subjected to layered editing or masking processing according to the layer information of the image.

[0065] Specifically, masking means blocking or covering. Part of the image is blocked, which is equivalent to a window. It is a separate layer, and the upper layer will block the lower layer. That is, the upper layer blocks the lower image, which has a blocking effect.

[0066] After the image layers are generated, users can perform layered editing or mask processing on the image. Traditional video editing and image processing methods require manual creation of layers and drawing of masks, etc., but using AI methods, this can be done automatically in just one step, which can improve the efficiency of image processing.

[0067] Further, refer to Figure 2a In some embodiments of the present application, before the original image is calculated by AI technology to obtain a depth map, the method further includes:

[0068] Import the original image.

[0069] That is, before the original image is calculated using AI technology to obtain a depth map, the user is required to import the original image to facilitate subsequent operations.

[0070] Figure 3 2 is a structural block diagram of the image layering device 200 provided in the embodiment of the present application. Figure 3 As shown, the image layering device 200 of the embodiment of the present application includes: a depth map calculation module 210, a picture segmentation module 220 and a layer generation module 230, wherein:

[0071] The depth map calculation module 210 is used to calculate the original image through AI technology to obtain a depth map;

[0072] A screen segmentation module 220, configured to perform screen segmentation on the depth map according to the depth information of the depth map; and

[0073] The layer generation module 230 is used to generate the layer of the image according to the screen segmentation result of the depth map.

[0074] The image layering device provided in the embodiment of the present application calculates the original image through AI technology to obtain a depth map, and performs screen segmentation on the depth map according to the depth information of the depth map, and then generates image layers according to the screen segmentation results of the depth map. Therefore, the image layering device provided in the embodiment of the present application can automatically and accurately generate a depth map through AI technology, thereby being able to quickly and accurately obtain the layer information of the image.

[0075] It should be noted that the specific implementation of the image layering device in the embodiment of the present application is similar to the specific implementation of the image layering method in the embodiment of the present application. Please refer to the description of the method part for details, and no further details will be given here.

[0076] Figure 4 Schematic diagram of the structure of an electronic device 300 according to an embodiment of the present application.

[0077] like Figure 4 As shown, the electronic device 300 includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from the storage part 302 to a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The CPU 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0078] The following components are connected to the I / O interface 305: an input section 306 including a keyboard, a mouse, etc.; an output section 307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed, so that a computer program read therefrom is installed into the storage section 308 as needed.

[0079] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a machine-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 a network through a communication section 309, and / or installed from a removable medium 311. When the computer program is executed by a central processing unit (CPU) 301, the above-mentioned functions defined in the electronic device of the present application are executed.

[0080] It should be noted that the computer-readable medium shown in the present application 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 electronic device, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, 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.

[0081] In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction-executing electronic device, apparatus, or device. In the present application, 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. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction-executing electronic device, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0082] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the processing receiving device, method and computer program product according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the aforementioned module, program segment, or a part of the 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 and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based electronic device that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0083] The units or modules involved in the embodiments described in this application may be implemented by software or hardware. The units or modules described may also be set in a processor, and the processor is used to implement the image layering method when executing the program:

[0084] The original image is calculated using AI technology to obtain a depth map;

[0085] Performing screen segmentation on the depth map according to the depth information of the depth map; and

[0086] The layers of the image are generated according to the screen segmentation result of the depth map.

[0087] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently and not be assembled into the electronic device. The above computer-readable storage medium stores one or more programs, and when the above programs are used by one or more processors to execute the image layering method described in the present application:

[0088] The original image is calculated using AI technology to obtain a depth map;

[0089] Performing screen segmentation on the depth map according to the depth information of the depth map; and

[0090] The layers of the image are generated according to the screen segmentation result of the depth map.

[0091] As another aspect, the present application further provides a computer program product, which may be included in the electronic device described in the above embodiment; or may exist independently and not be installed in the electronic device. The above computer program product stores one or more programs, and when the above programs are used by one or more processors to execute the image layering method described in the present application:

[0092] The original image is calculated using AI technology to obtain a depth map;

[0093] Performing screen segmentation on the depth map according to the depth information of the depth map; and

[0094] The layers of the image are generated according to the screen segmentation result of the depth map.

[0095] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. All equivalent structural changes made by using the contents of the present application specification and drawings under the application concept of the present application, or directly / indirectly used in other related technical fields are included in the patent protection scope of the present application.

Claims

1. An image layering method, characterized in that: include: The original image is calculated using AI technology to obtain a depth map; Performing screen segmentation on the depth map according to the depth information of the depth map; and The layers of the image are generated according to the screen segmentation result of the depth map.

2. The image layering method according to claim 1, characterized in that: The method of calculating the original image by using AI technology to obtain a depth map includes: The AI ​​depth model is used to calculate the original image through a convolutional neural network to obtain the depth map.

3. The image layering method according to claim 2, characterized in that: After performing screen segmentation on the depth map according to the depth information of the depth map, the method further includes: Perform image semantic segmentation processing on the depth map to correct the screen segmentation result of the depth map.

4. The image layering method according to claim 1, characterized in that: The performing screen segmentation on the depth map according to the depth information of the depth map includes: The depth range of the depth map is divided to perform screen segmentation on the depth map.

5. The image layering method according to claim 1, characterized in that: After generating the layer of the image according to the screen segmentation result of the depth map, the method further includes: The depth map is highlighted by using the depth animation special effects technology and according to the layer information of the image.

6. The image layering method according to claim 5, characterized in that: After highlighting the depth map by using the depth animation special effects technology and according to the layer information of the image, the method further includes: The image is subjected to layered editing or masking processing according to the layer information of the image.

7. The image layering method according to claim 1, characterized in that: Before the original image is calculated by the AI ​​technology to obtain the depth map, the method further includes: Import the original image.

8. An image layering device, characterized in that: include: The depth map calculation module is used to calculate the original image through AI technology to obtain a depth map; A screen segmentation module, used for performing screen segmentation on the depth map according to the depth information of the depth map; and The layer generation module is used to generate the layer of the image according to the screen segmentation result of the depth map.

9. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor is used to implement the image layering method according to any one of claims 1 to 7 when executing the program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is used to implement the image layering method according to any one of claims 1-7.