Image processing method and electronic equipment

By acquiring multiple initial images with different viewing angles in AR glasses and using image processing models to remove the foreground and reconstruct the background, the problem of background occlusion in AR glasses in complex environments is solved, and the recognition and tracking of clear backgrounds and target objects are achieved.

CN118537263APending Publication Date: 2024-08-23BOE TECHNOLOGY GROUP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310184974.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-20
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In complex environments, it is difficult for AR glasses to obtain pure background images because the background is blocked by moving objects, which affects the recognition and tracking of target objects.

Method used

By acquiring multiple initial images with different viewing angles, the image processing model is used to remove the foreground and reconstruct the background, generate a pure background image, and remove non-target objects in the target image to obtain a clear target object image.

Benefits of technology

It achieves the elimination of interfering objects in complex environments, obtains pure background images and clear target object images, and improves the recognition and tracking effects of AR glasses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537263A
    Figure CN118537263A
Patent Text Reader

Abstract

The invention discloses an image processing method and electronic equipment, and the image processing method comprises the steps: obtaining an initial image which is shot by AR equipment; and removing a foreground of the initial image, and performing background reconstruction on a foreground region to generate a first processed image. According to the image processing method provided by the invention, interference objects can be eliminated in a complex environment, so that a pure background image is obtained, and the background image can be reconstructed and updated in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to an image processing method and an electronic device. Background Art

[0002] Augmented Reality (AR) is the fusion of virtual images and real images, which makes human visual senses feel as if they are in the scene. At the same time, wearing AR glasses can also interact with reality in real time. Summary of the invention

[0003] The present disclosure provides an image processing method, which is applied to an electronic device. The image processing method includes:

[0004] Acquire an initial image, where the initial image is captured by an AR device;

[0005] The foreground of the initial image is removed, and the background of the foreground area is reconstructed to generate a first processed image.

[0006] In some embodiments, the image processing method further comprises:

[0007] Acquire a target image, wherein the foreground of the target image includes a target object and a non-target object;

[0008] Based on the first processed image and the target image, non-target objects in the target image are removed to obtain a second processed image, wherein the foreground of the second processed image includes the target object, and the background of the second processed image includes at least one of the following: the background of the target image, and part or all of the first processed image.

[0009] In some implementations, the step of removing the foreground of the initial image and reconstructing the background of the foreground area to generate the first processed image includes:

[0010] The initial image is input into an image processing model obtained by pre-training, and the first processed image is output, wherein the image processing model is used to remove the foreground of the input image according to the depth difference between the foreground and the background in the input image, and to reconstruct the background of the foreground area according to the background information of the input image.

[0011] In some embodiments, before the step of inputting the initial image into the pre-trained image processing model and outputting the first processed image, the step further includes:

[0012] Acquire a training sample set, the training sample set comprising: a sample initial image and a sample background image corresponding to the sample initial image, wherein the background of the sample initial image is provided with a foreground occlusion, the background of the sample background image is not provided with a foreground occlusion, and the background of the sample initial image is at least partially identical to the background of the sample background image;

[0013] Input the sample initial image into the model to be trained, and output a predicted background image;

[0014] The model to be trained is trained according to the predicted background image and the sample background image, and the model to be trained obtained by the training is determined as the image processing model.

[0015] In some implementations, the step of training the model to be trained according to the predicted background image and the sample background image includes:

[0016] Inputting the predicted background image and the sample background image into a preset loss function to calculate a loss value;

[0017] With the goal of minimizing the loss value, the parameters of the model to be trained are adjusted to train the model to be trained.

[0018] In some embodiments, the model to be trained is a DeOccNet network model or a convolutional neural network model.

[0019] In some implementations, the step of removing non-target objects in the target image based on the first processed image and the target image to obtain a second processed image includes:

[0020] According to the first processed image, pixel filling is performed on the occluded area in the target image to obtain a filled processed image, wherein the occluded area is an area in the target image that is occluded by the non-target object;

[0021] The second processed image is obtained according to the filled processed image.

[0022] In some implementations, the step of obtaining the second processed image according to the filled processed image includes at least one of the following:

[0023] Performing homogenization processing on the background area in the filled processed image to obtain the second processed image;

[0024] The pixels located at the edge of the pixel filling area in the filling processing image are subjected to predetermined processing to obtain the second processed image, and the predetermined processing is used to display the outline of the non-target object in the second processed image.

[0025] In some implementations, the step of removing non-target objects in the target image based on the first processed image and the target image to obtain a second processed image includes:

[0026] extracting an image of the target object in the target image;

[0027] The image of the target object is synthesized with the first processed image to obtain the second processed image.

[0028] In some implementations, there are multiple initial images, and the shooting angles of the multiple initial images are different.

[0029] In some implementations, the electronic device is a server, and the server is connected to the AR device; or

[0030] The electronic device is the AR device.

[0031] In some implementations, the electronic device is the AR device, and before the step of removing the foreground of the initial image and reconstructing the background of the foreground area to generate the first processed image, the step further includes:

[0032] Get the current network environment data;

[0033] The step of removing the foreground of the initial image and reconstructing the background of the foreground area to generate a first processed image includes:

[0034] When the network environment data does not meet the preset conditions, the foreground of the initial image is removed, and the background of the foreground area is reconstructed to generate a first processed image.

[0035] In some implementations, the step of removing the foreground of the initial image and reconstructing the background of the foreground area to generate the first processed image further includes:

[0036] When the network environment data satisfies the preset condition, the initial image is sent to a server, so that the server removes the foreground of the initial image, reconstructs the background of the foreground area, generates a first processed image, and sends the first processed image to the AR device; and

[0037] A first processed image sent by the server is received.

[0038] The present disclosure provides an image processing device, which is applied to an electronic device, and the image processing device includes:

[0039] An acquisition module is configured to acquire an initial image, where the initial image is captured by an AR device;

[0040] The first generating module is configured to remove the foreground of the initial image and reconstruct the background of the foreground area to generate a first processed image.

[0041] The present disclosure provides an electronic device, comprising:

[0042] Processor; and

[0043] A memory for storing instructions executable by the processor, wherein the processor is configured to execute the instructions to implement the method as described in any embodiment.

[0044] In some implementations, the electronic device is an AR device, and the AR device includes:

[0045] AR glasses; and

[0046] The shooting module includes multiple cameras, and the multiple camera arrays are distributed on the frame of the AR glasses and are used to shoot images with different viewing angles.

[0047] The present disclosure provides a non-transitory computer-readable storage medium. When instructions in the non-transitory computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method described in any one of the embodiments.

[0048] The present disclosure provides a computer program, comprising a computer readable code. When the computer readable code is executed on a computing processing device, the computing processing device is enabled to execute the method as described in any one of the embodiments.

[0049] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the specific implementation methods of the present disclosure are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. It should be noted that the proportions in the drawings are only for illustration and do not represent the actual proportions.

[0051] Figure 1A flowchart of the steps of an image processing method provided by the present disclosure is shown;

[0052] Figure 2 A schematic diagram showing the generation of a first processed image from an initial image;

[0053] Figure 3 A flow chart of steps for generating a second processed image is shown;

[0054] Figure 4 A schematic diagram of a scene for tracking a target object is shown;

[0055] Figure 5 A schematic diagram showing the first method of generating a second processed image;

[0056] Figure 6 A schematic diagram showing a second method for generating a second processed image is shown;

[0057] Figure 7 A flow chart of steps for obtaining an image processing model is shown;

[0058] Figure 8 An architecture diagram of a DeOccNet network model is shown;

[0059] Fig. 9 The architecture diagrams of two convolutional neural networks are shown;

[0060] Fig.10 A signal flow chart of an image processing method is shown;

[0061] Fig.11 A structural block diagram of an image processing device provided by the present disclosure is shown;

[0062] Fig.12 A structural block diagram of an electronic device is shown;

[0063] Fig.13 A schematic diagram of AR glasses is shown. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0065] In environments with large traffic or many moving objects such as exhibitions or scenic spots, if you want to use AR glasses to shoot the background, it is difficult to obtain a pure background image because the background is blocked by moving objects.

[0066] To solve the above problems, refer to Figure 1 A flowchart of the steps of an image processing method provided by the present disclosure is shown, and the image processing method is applied to electronic devices, such as AR devices or servers, such as Figure 1 As shown, the image processing method comprises the following steps:

[0067] Step S01: Acquire an initial image, where the initial image is captured by an AR device.

[0068] Step S02: removing the foreground of the initial image and reconstructing the background of the foreground area to generate a first processed image.

[0069] When the electronic device is an AR device, the AR device may be provided with a shooting module, and the AR device obtains the initial image through the shooting module. When the electronic device is a server, the server may be connected to the AR device, receive the initial image shot and sent by the AR device, and thus obtain the initial image.

[0070] The number of the initial images may be one or more. When the number of the initial images is one, the electronic device may remove the foreground of the initial image and reconstruct the background according to the background information around the foreground in the initial image, thereby generating the first processed image.

[0071] When there are multiple initial images, for example, multiple cameras (such as RGB cameras) can be set on the AR device to shoot multiple initial images of different perspectives. Since the shooting perspectives of the multiple initial images are different, the light blocked in a certain perspective may be captured in other perspectives. Therefore, the complementary information between the multiple initial images can be used to reconstruct the blocked background in the foreground area, thereby removing the foreground and generating the first processed image. In this way, the foreground occlusion is eliminated based on the initial images of multiple perspectives, and the background image is reconstructed, so that the environment can be fully collected and analyzed, and a better de-occlusion effect can be achieved.

[0072] For example, refer to Figure 2 In an environment with many moving objects such as exhibitions or scenic spots, an AR device can capture a set of initial images with different perspectives. Figure 2There are foreground occlusions in the two initial images shown. Afterwards, the electronic device acquires these initial images, and then removes the foreground of the initial images, and reconstructs the background of the foreground removed area, thereby generating a pure background image without occlusion, that is, a first processed image. The first processed image can be used for background display on an AR device, or for scenes such as object recognition, photographing, or tracking.

[0073] The image processing method provided by the present disclosure can eliminate interfering objects in a complex environment to obtain a pure background image, and can reconstruct and update the background image in real time.

[0074] In an environment with many moving objects such as exhibitions or scenic spots, if AR glasses are needed to identify, photograph or track selected target objects, they are easily disturbed by the surrounding moving objects, causing a chaotic picture and a failure to highlight the key points, ultimately affecting the recognition effect or display effect.

[0075] In order to solve the above problems, in some embodiments, referring to Figure 3 , the above image processing method may further include:

[0076] Step S11: Acquire a target image, where the foreground of the target image includes a target object and a non-target object.

[0077] Among them, the target image can be captured by an AR device. For example, the target image can be one of multiple initial images, and the target image can also be an image stored in the AR device, etc., which is not limited in this disclosure.

[0078] The target object may be an object in the target image that needs to be identified, photographed, observed, or tracked, and the non-target object may be an object in the foreground of the target image other than the target object. For example, the target object and the non-target object may be specified by the user of the AR device, or may be determined by other means, which is not limited in the present disclosure.

[0079] Step S12: According to the first processed image and the target image, non-target objects in the target image are removed to obtain a second processed image, wherein the foreground of the second processed image includes the target object, and the background of the second processed image includes at least one of the following: the background of the target image, and part or all of the first processed image.

[0080] By removing non-target objects, the foreground of the second processed image only has the target object, eliminating the interference of surrounding non-target objects, making it easier to identify, photograph or track the target object in real time, thereby improving the recognition effect or display effect.

[0081] Reference Figure 4A schematic diagram of a scene for tracking a target object is shown. When a user wears AR glasses to view, after identifying the target object to be tracked, non-target objects within the field of view of the AR glasses are removed to eliminate interference from non-target objects, thereby facilitating tracking of the target object.

[0082] In specific implementation, step S12 may have multiple implementations. For example, in some implementations, step S12 may specifically include:

[0083] Step S21: performing pixel filling on an occluded area in the target image according to the first processed image to obtain a filled processed image, wherein the occluded area is an area in the target image that is occluded by a non-target object.

[0084] Reference Figure 5 The display information of the occluded area can be replaced and filled by the display information of the corresponding occluded area position in the first processed image, thereby achieving the removal of non-target objects. The display information may include depth information and brightness information.

[0085] Step S22: Obtain a second processed image based on the filled processed image.

[0086] In this implementation, the background of the second processed image includes: the background of the target image, and a portion of the first processed image (ie, the portion filled into the occluded area).

[0087] Optionally, step S22 may specifically include: performing homogenization processing on the background area in the filled processed image to obtain a second processed image.

[0088] For example, the grayscale average value of the pixels in the designated area can be used as the grayscale value of the central pixel of the designated area, so that the background area can be homogenized. The designated area is located in the background area. Through homogenization, the pixel filling area in the second processed image can be naturally transitioned with the surrounding area, thereby improving the display effect of the background area.

[0089] Optionally, step S22 may specifically include: performing predetermined processing on pixels located at the edge of the pixel filling area in the filling processing image to obtain a second processed image, wherein the predetermined processing is used to display the outline of the non-target object in the second processed image.

[0090] Exemplarily, the predetermined processing may be a high-brightness or low-brightness processing, etc., which is not limited in the present disclosure. By displaying the outline of the non-target object, it is possible to avoid the target object from colliding with the eliminated non-target object.

[0091] In some other implementations, step S12 may specifically include: first extracting an image of the target object in the target image; and then synthesizing the image of the target object with the first processed image to obtain a second processed image.

[0092] Reference Figure 6 , the target object in the target image can be firstly cut out to extract the image of the target object in the target image; then the image of the target object is synthesized with the first processed image to obtain a second processed image.

[0093] In some implementations, step S02 may specifically include:

[0094] Step S31: The initial image is input into an image processing model obtained by pre-training, and a first processed image is output, wherein the image processing model is used to remove the foreground of the input image according to the depth difference between the foreground and the background in the input image, and to reconstruct the background of the foreground area according to the background information of the input image.

[0095] In specific implementation, the sample data can be pre-trained by deep learning to obtain an image processing model. Among them, deep learning is a new research direction in the field of machine learning. It is introduced into machine learning to make it closer to the original goal - artificial intelligence. Deep learning is to learn the inherent laws and representation levels of sample data. The information obtained in the learning process is of great help in the interpretation of data such as text, images and sounds. The ultimate goal of deep learning is to enable machines to have analytical learning capabilities like humans and to recognize data such as text, images and sounds. Using the pre-trained image processing model, the first processed image can have a better de-occlusion effect and can be widely used in various practical scenarios.

[0096] In a specific implementation, when there are multiple initial images, multiple initial images with different shooting angles can be input into the image processing model to output a synthesized pure background image, namely, the first processed image.

[0097] In order to obtain the above image processing model, in some embodiments, refer to Figure 7 , before step S31, the following steps may also be included:

[0098] Step S41: Obtain a training sample set, the training sample set including: a sample initial image and a sample background image corresponding to the sample initial image, wherein the background of the sample initial image is set with foreground occlusion, the background of the sample background image is not set with foreground occlusion, and the background of the sample initial image is at least partially identical to the background of the sample background image.

[0099] Step S42: Input the sample initial image into the model to be trained and output the predicted background image.

[0100] Step S43: training the model to be trained according to the predicted background image and the sample background image, and determining the trained model to be trained as the image processing model.

[0101] The number of the sample initial images may be one or more. When the number of the sample initial images is one, the trained image processing model can remove foreground occlusion and reconstruct the background according to the context information contained in the single-view sample initial image. In this case, the shooting angle of the sample background image may be the same as that of the sample initial image.

[0102] When there are multiple sample initial images, for example, the shooting perspectives of the multiple sample initial images are different, the trained image processing model can remove foreground occlusion and reconstruct the background according to the complementary information between the multiple sample initial images. In this case, the sample background image can be shot at a central perspective, for example.

[0103] It should be noted that the sample initial image and the sample background image can be obtained by photographing a real scene using AR glasses, and the positions and pitch angles of the sample initial image and the sample background image photographed by the AR glasses are the same. In addition, the sample initial image and the sample background image can also be generated by rendering a simulated scene using software (such as 3dsMax).

[0104] In some implementations, step S43 may specifically include the following steps:

[0105] Step S51: input the predicted background image and the sample background image into a preset loss function to calculate the loss value, wherein the loss function may be a cross entropy loss function or a root mean square error loss function.

[0106] Step S52: With the goal of minimizing the loss value, the parameters of the model to be trained are adjusted to train the model to be trained.

[0107] In specific implementation, when the loss value reaches a preset value, or the number of training times reaches a specified number, the training of the model to be trained can be terminated, and the model to be trained obtained by training is the image processing model.

[0108] In some implementations, the model to be trained is a DeOccNet network model.

[0109] Among them, the DeOccNet network is a deep learning network based on encoder-decoder. Figure 8 The architecture diagram of the DeOccNet network model is shown in Figure 2. Figure 8As shown in the figure, multiple input images with different perspectives (such as sample initial images, or initial images) can be cascaded into the DeOccNet network at the channel level, and then the residual hole pyramid resASPP module in the DeOccNet network performs hierarchical feature extraction, and then a 4-layer autoencoder (EB1 to EB4) is used to merge space and angle, and then decoded to obtain the final output image.

[0110] Through the DeOccNet network model, a larger receptive field can be achieved and high-level semantic features of the input image can be extracted. Multiple input images with different perspectives can be cascaded at the channel level as the input of the network, and the complementary information of each perspective can be fully utilized. The complementary information between multiple input images can be used to reconstruct the occluded background objects, and finally the foreground occlusion can be removed and the background can be reconstructed. The image recognition model trained with the DeOccNet network model can improve the training efficiency and achieve excellent deocclusion effect.

[0111] In some embodiments, the model to be trained is a convolutional neural network model.

[0112] Reference Fig. 9 The convolutional neural network architecture diagram is shown in the figure above. The convolutional neural network shown in the figure above includes an input layer, multiple hidden layers and an output layer connected in sequence, where the circles represent neurons. The convolutional neural network shown in the figure below includes an input layer, a convolution layer, a pooling layer and a fully connected layer connected in sequence.

[0113] Among them, the convolutional neural network is based on the local connection between neurons and the hierarchical organization of image transformation. Neurons with the same parameters are applied to different positions of the previous layer of the neural network to obtain a translation-invariant neural network structure. The error gradient is used to design and train the convolutional neural network, which can train an image recognition model with better performance.

[0114] The image processing method provided by the present disclosure, the action subject can be an AR device and / or an electronic device such as a server, and the scheme will be exemplarily described below in conjunction with the action subject.

[0115] In the first example, the electronic device is a server, and the server is connected to the AR device. In this example, each step in the above image processing method is performed by the server.

[0116] In specific implementation, the server can obtain the initial image uploaded by the AR device through WIFI. After generating the first processed image, the server can transmit the first processed image back to the AR device for background display, etc., and after generating the second processed image, the server can transmit the second processed image back to the AR device for identification, photographing or tracking, etc.

[0117] Among them, recognition, such as object recognition, face recognition, license plate recognition, etc., is performed by analyzing and processing the second processed image, obtaining relevant information of the object from the database according to the processing result, and then displaying the information at the corresponding position on the AR glasses screen through rendering, so that the superposition effect of the object information and the target object can be seen.

[0118] In the second example, the electronic device is an AR device. In this example, each step in the above image processing method is performed by the AR device.

[0119] In this example, before step S02, the following steps may be further included: obtaining current network environment data. Accordingly, step S02 may specifically include: when the network environment data does not meet the preset conditions, removing the foreground of the initial image and reconstructing the background of the foreground area to generate a first processed image.

[0120] The network environment data may include, for example, the current network speed, network speed fluctuation data, etc. The preset conditions may include, for example, a network speed threshold, a network speed fluctuation threshold, etc., which are not limited in the present disclosure.

[0121] Furthermore, step S02 may also include: when the network environment data meets preset conditions, sending the initial image to the server so that the server removes the foreground of the initial image and reconstructs the background of the foreground area, generates a first processed image, and sends the first processed image to the AR device; and receiving the first processed image sent by the server.

[0122] Reference Fig.10 , the AR device can first obtain the current network environment data. When the network environment is not good (that is, the network environment data does not meet the preset conditions), the computing and processing module in the AR device can be used to perform each step in the image processing method. When the network environment is good (that is, the network environment data meets the preset conditions), the AR device can transmit the captured initial image to the cloud server, and the server removes the foreground of the initial image and reconstructs the background of the foreground area to generate a first processed image, and returns the first processed image to the AR device. Since the computing and processing performance of the cloud server is better than that of the local AR device, using the server as an electronic device to perform each step in the image processing method can increase the image processing speed.

[0123] The present disclosure also provides an image processing device, which is applied to electronic devices such as Fig.11 As shown, the image processing device comprises:

[0124] An acquisition module 1101 is configured to acquire an initial image, where the initial image is captured by an AR device;

[0125] The first generating module 1102 is configured to remove the foreground of the initial image and reconstruct the background of the foreground area to generate a first processed image.

[0126] In some implementations, the image processing apparatus may further include a second generating module, wherein the second generating module is specifically configured to:

[0127] Acquire a target image, wherein the foreground of the target image includes a target object and a non-target object;

[0128] Based on the first processed image and the target image, non-target objects in the target image are removed to obtain a second processed image, wherein the foreground of the second processed image includes the target object, and the background of the second processed image includes at least one of the following: the background of the target image, and part or all of the first processed image.

[0129] In some implementations, the first generating module 1102 is specifically configured to:

[0130] The initial image is input into an image processing model obtained by pre-training, and the first processed image is output, wherein the image processing model is used to remove the foreground of the input image according to the depth difference between the foreground and the background in the input image, and to reconstruct the background of the foreground area according to the background information of the input image.

[0131] Regarding the image processing device, the specific manner in which each module performs operations has been described in detail in the implementation of the relevant image processing method, and will not be elaborated here.

[0132] The device embodiments described above are merely illustrative, wherein 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, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0133] The present disclosure also provides an electronic device, including: a processor; and a memory for storing processor-executable instructions, wherein the processor is configured to execute the instructions to implement the method provided in any embodiment.

[0134] In some implementations, the electronic device is a server, which can be connected to the AR device.

[0135] In some embodiments, the electronic device is an AR device, and the AR device can be connected to a server.

[0136] Reference Fig.12 A framework diagram of an electronic device is shown. Fig.12 As shown, the electronic device includes a computing processing module 1201, which is configured to execute instructions to perform the method provided in any embodiment and network transmission, and further includes one or more processors; and a storage module 1202 represented by a memory, which is used to store instructions executable by the computing processing module 1201, such as application programs. The application program stored in the memory may include one or more modules, each corresponding to a set of instructions.

[0137] In some embodiments, the electronic device is an AR device, such as Fig.12 As shown, the AR device may further include a display module 1203, a voice module 1204, a battery module 1205, and a shooting module 1206. The shooting module 1206 is configured to shoot and collect images, the display module 1203 is configured to display images, the voice module 1204 is configured for voice interaction, and the battery module 1205 is configured to supply power to the entire electronic device.

[0138] In some implementations, the AR device includes AR glasses, and the camera module 1206 includes multiple cameras. Fig.13 A schematic diagram of AR glasses is shown, Fig.13 As shown, multiple camera arrays are distributed on the frame of AR glasses to capture images from different perspectives. Multiple cameras can capture the current scene from different perspectives, thereby obtaining complementary information from different perspectives and improving the accuracy of background reconstruction in occluded areas.

[0139] exist Fig.13 In the figure, there are 9 RGB cameras on the frame of the AR glasses, arranged in 3 rows and 3 columns, simulating the arrangement of array cameras.

[0140] The present disclosure also provides a non-transitory computer-readable storage medium. When instructions in the non-transitory computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method provided in any embodiment.

[0141] The non-transient computer-readable storage medium provided by the present disclosure may be, for example, a memory including instructions, and the instructions may be executed by a processor of an electronic device to complete the method provided in any embodiment. For example, the non-transient computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0142] The present disclosure also provides a computer program, comprising a computer readable code, which, when executed on a computing processing device, enables the computing processing device to execute the method as described in any one of the embodiments.

[0143] The readable program code in the computer program product can be executed by a processor of an electronic device to complete the method provided in any embodiment. Optionally, the program code can be stored in a storage medium of the electronic device, which can be a non-transient computer-readable storage medium, for example, the non-transient computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0144] In the present disclosure, “plurality” means two or more, and “at least one” means one or more, unless otherwise clearly and specifically defined.

[0145] In the present disclosure, the orientation or positional relationship indicated by the terms "upper" and "lower" are based on the orientation or positional relationship shown in the accompanying drawings and are only for the convenience of describing the present disclosure and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present disclosure.

[0146] As used herein, the terms "comprises," "includes," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, product, or device. In the absence of further limitations, an element defined by the phrase "includes a ..." does not exclude the presence of additional identical elements in the process, method, commodity, or device that includes the element.

[0147] References herein to "one embodiment," "some embodiments," "exemplary embodiments," "one or more embodiments," "example," "an example," "some examples," etc., are intended to indicate that a particular feature, structure, material, or characteristic associated with the embodiment or example is included in at least one embodiment or example of the present disclosure. Schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics may be included in any one or more embodiments or examples in any appropriate manner.

[0148] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0149] When describing some embodiments, the expressions "coupled" and "connected" may be used. For example, when describing some embodiments, the term "connected" may be used to indicate that two or more components are in direct physical or electrical contact with each other. As another example, when describing some embodiments, the term "coupled" may be used to indicate that two or more components are in direct physical or electrical contact. However, the term "coupled" or "communicatively coupled" may also refer to two or more components that are not in direct contact with each other, but still cooperate or interact with each other. The embodiments disclosed herein are not necessarily limited to the contents of this document.

[0150] “At least one of A, B, and C” has the same meaning as “at least one of A, B, or C” and both include the following combinations of A, B, and C: A only, B only, C only, the combination of A and B, the combination of A and C, the combination of B and C, and the combination of A, B, and C.

[0151] “A and / or B” includes the following three combinations: A only, B only, and a combination of A and B.

[0152] As used herein, the term "if" is optionally interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined that" or "if [a stated condition or event] is detected" are optionally interpreted to mean "upon determining that" or "in response to determining that" or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.

[0153] The use of "for" or "configured to" herein is meant to be open and inclusive language that does not exclude devices adapted or configured to perform additional tasks or steps.

[0154] The use of "based on" or "according to" herein is meant to be open and inclusive. A process, step, calculation or other action based on one or more of the conditions or values ​​may, in practice, be based on other conditions or exceed the values ​​described. A process, step, calculation or other action based on one or more of the conditions or values ​​may, in practice, be based on other conditions or exceed the values ​​described.

[0155] As used herein, "about," "substantially," or "approximately" includes the stated value and an average value that is within an acceptable range of variation from the particular value as determined by one of ordinary skill in the art taking into account the measurements in question and the errors associated with the measurement of the particular quantity (i.e., the limitations of the measurement system).

[0156] As used herein, "parallel", "perpendicular", "equal", and "flush" include the situations described and situations similar to the situations described, the range of which is within an acceptable deviation range, wherein the acceptable deviation range is as determined by a person of ordinary skill in the art taking into account the measurement in question and the errors associated with the measurement of a particular quantity (i.e., the limitations of the measurement system). For example, "parallel" includes absolute parallelism and approximate parallelism, wherein the acceptable deviation range for approximate parallelism may be, for example, a deviation within 5°; "perpendicular" includes absolute perpendicularity and approximate perpendicularity, wherein the acceptable deviation range for approximate perpendicularity may also be, for example, a deviation within 5°. "Equal" includes absolute equality and approximate equality, wherein the acceptable deviation range for approximate equality may be, for example, that the difference between the two being equal is less than or equal to 5% of either one. "Flush" includes absolute flushness and approximate flushness, wherein the acceptable deviation range for approximate flushness may be, for example, that the distance between the two being flush is less than or equal to 5% of the size of either one.

[0157] It will be understood that when a layer or an element is referred to as being on another layer or substrate, it can be directly on the other layer or substrate, or intervening layers may be present between the layer or element and the other layer or substrate.

[0158] Exemplary embodiments are described herein with reference to cross-sectional views and / or plan views that are idealized exemplary drawings. In the drawings, the thickness of layers and regions are exaggerated for clarity. Therefore, variations in shape relative to the drawings due to, for example, manufacturing techniques and / or tolerances are conceivable. Therefore, the exemplary embodiments should not be interpreted as being limited to the shapes of the regions shown herein, but include shape deviations due to, for example, manufacturing. For example, an etched region shown as a rectangle will typically have curved features. Therefore, the regions shown in the drawings are schematic in nature, and their shapes are not intended to illustrate the actual shape of regions of the device, and are not intended to limit the scope of the exemplary embodiments.

[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present disclosure.

Claims

1. An image processing method, applied to an electronic device, the image processing method comprising: Acquire an initial image, where the initial image is captured by an AR device; The foreground of the initial image is removed, and the background of the foreground area is reconstructed to generate a first processed image.

2. The image processing method according to claim 1, further comprising: Acquire a target image, wherein the foreground of the target image includes a target object and a non-target object; Based on the first processed image and the target image, non-target objects in the target image are removed to obtain a second processed image, wherein the foreground of the second processed image includes the target object, and the background of the second processed image includes at least one of the following: the background of the target image, and part or all of the first processed image.

3. The image processing method according to claim 1, wherein: The step of removing the foreground of the initial image and reconstructing the background of the foreground area to generate a first processed image includes: The initial image is input into an image processing model obtained by pre-training, and the first processed image is output, wherein the image processing model is used to remove the foreground of the input image according to the depth difference between the foreground and the background in the input image, and to reconstruct the background of the foreground area according to the background information of the input image.

4. The image processing method according to claim 3, wherein: Before the step of inputting the initial image into the image processing model obtained by pre-training and outputting the first processed image, the step further includes: Acquire a training sample set, the training sample set comprising: a sample initial image and a sample background image corresponding to the sample initial image, wherein the background of the sample initial image is provided with a foreground occlusion, the background of the sample background image is not provided with a foreground occlusion, and the background of the sample initial image is at least partially identical to the background of the sample background image; Input the sample initial image into the model to be trained, and output a predicted background image; The model to be trained is trained according to the predicted background image and the sample background image, and the model to be trained obtained by the training is determined as the image processing model.

5. The image processing method according to claim 4, wherein: The step of training the model to be trained according to the predicted background image and the sample background image comprises: Inputting the predicted background image and the sample background image into a preset loss function to calculate a loss value; With the goal of minimizing the loss value, the parameters of the model to be trained are adjusted to train the model to be trained.

6. The image processing method according to claim 4, wherein: The model to be trained is a DeOccNet network model or a convolutional neural network model.

7. The image processing method according to claim 2, wherein: The step of removing non-target objects in the target image according to the first processed image and the target image to obtain a second processed image comprises: According to the first processed image, pixel filling is performed on the occluded area in the target image to obtain a filled processed image, wherein the occluded area is an area in the target image that is occluded by the non-target object; The second processed image is obtained according to the filled processed image.

8. The image processing method according to claim 7, wherein: The step of obtaining the second processed image according to the filled processed image comprises at least one of the following: Performing homogenization processing on the background area in the filled processed image to obtain the second processed image; The pixels located at the edge of the pixel filling area in the filling processing image are subjected to predetermined processing to obtain the second processed image, and the predetermined processing is used to display the outline of the non-target object in the second processed image.

9. The image processing method according to claim 2, wherein: The step of removing non-target objects in the target image according to the first processed image and the target image to obtain a second processed image comprises: extracting an image of the target object in the target image; The image of the target object is synthesized with the first processed image to obtain the second processed image.

10. The image processing method according to any one of claims 1 to 9, wherein: There are multiple initial images, and the shooting angles of the multiple initial images are different from each other.

11. The image processing method according to any one of claims 1 to 9, wherein: The electronic device is a server, and the server is connected to the AR device; The electronic device is the AR device.

12. The image processing method according to any one of claims 1 to 9, wherein: The electronic device is the AR device, and before the step of removing the foreground of the initial image and reconstructing the background of the foreground area to generate the first processed image, the electronic device further includes: Get the current network environment data; The step of removing the foreground of the initial image and reconstructing the background of the foreground area to generate a first processed image includes: When the network environment data does not meet the preset conditions, the foreground of the initial image is removed, and the background of the foreground area is reconstructed to generate a first processed image.

13. The image processing method according to claim 12, wherein: The step of removing the foreground of the initial image and reconstructing the background of the foreground area to generate the first processed image also includes: When the network environment data satisfies the preset condition, the initial image is sent to a server, so that the server removes the foreground of the initial image, reconstructs the background of the foreground area, generates a first processed image, and sends the first processed image to the AR device; and A first processed image sent by the server is received.

14. An electronic device comprising: processor; as well as A memory for storing the processor-executable instructions, wherein the processor is configured to execute the instructions to implement the method according to any one of claims 1 to 13.

15. The electronic device according to claim 14, wherein the electronic device is an AR device, and the AR device comprises: AR glasses; as well as The shooting module includes multiple cameras, and the multiple camera arrays are distributed on the frame of the AR glasses and are used to shoot images with different viewing angles.

Citation Information

Patent Citations

  • Photo generation method and device

    CN111107261A

  • Image generation method and device, equipment and storage medium

    CN115131464A