Photographing processing method and device and computer storage medium

By performing layer processing and layer fusion on the images in the camera preview interface, the problem of background redundancy or subject cropping caused by focus adjustment was solved, and the ratio of the subject to the background was adjusted independently, improving the photo effect and user experience.

CN121367818APending Publication Date: 2026-01-20XIAN TIANLONG COMM TECH CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511234092.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2026-01-20

AI Technical Summary

Technical Problem

Existing camera and mobile phone photography functions have issues with adjusting the ratio of people to backgrounds, such as background redundancy or people being cropped when adjusting the focus, which affects the user's photography experience.

Method used

By processing the camera preview image in layers, adjusting the background layer and the foreground object layer separately, and supporting operations such as scaling and moving, the final image is generated through layer blending and image restoration techniques.

Benefits of technology

It enables independent adjustment of the ratio between the subject and the background, avoiding background redundancy or subject cropping issues caused by focus adjustment, thus improving photo quality and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121367818A_ABST
    Figure CN121367818A_ABST
Patent Text Reader

Abstract

The invention provides a photographing processing method and device and a computer storage medium. The photographing processing method comprises the steps that a first picture displayed in a preview interface of a current camera is obtained, and the first picture is obtained by collecting a real scene through the camera; layering the first picture to obtain a first background layer and a first foreground object layer; according to the editing instruction, processing the first background layer and / or the first foreground object layer to obtain a second picture, and displaying the second picture on a preview interface; and storing the second picture in response to a photographing instruction of the user. Through the photographing processing method, individual proportion adjustment can be carried out for the character or the background, the personalized requirement of a user for coordinated composition between the character and the background is met, the problem of background redundancy or character cutting caused by focal length adjustment is avoided, and the photographing effect and the user experience are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of simulation of Internet of Things devices, and in particular to a photographing processing method, device and computer storage medium. BACKGROUND

[0002] In the current mobile Internet era, the photographing function of mobile terminals such as mobile phones is used very frequently. In the actual photographing process, users often face the problem that the composition ratio is difficult to accurately control. For example, when the distance between the person and the background scene is too close, the photographed picture may appear that the person occupies a large proportion of the picture, and the background scene is excessively blocked, so that the originally intended scenic elements cannot be fully presented. When the distance between the person and the background is too far, the person may appear too small in the picture, thin and lack of coordination with the background.

[0003] At present, the mainstream camera and mobile phone photographing function can usually only realize the overall scaling of the person and the background by adjusting the focal length when dealing with the above problems. This adjustment method has obvious limitations: if the focal length is reduced in order to photograph the whole person, the background picture may be too empty and the redundant elements may be increased; if the focal length is enlarged in order to highlight the background details, the person part may be cropped and cannot be fully presented, which affects the user's photographing experience. SUMMARY

[0004] To solve the above technical problems, the present application provides a photographing processing method, device and computer storage medium.

[0005] To solve the above technical problems, the present application provides a photographing processing method, which comprises:

[0006] obtaining a first picture displayed in a preview interface of a current camera, wherein the first picture is obtained by the camera collecting a real scene;

[0007] performing layered processing on the first picture to obtain a first background layer and a first foreground object layer;

[0008] processing the first background layer and / or the first foreground object layer according to an editing instruction to obtain a second picture, and displaying the second picture in the preview interface;

[0009] in response to a photographing instruction of a user, saving the second picture.

[0010] The processing of the first background layer and / or the first foreground object layer to obtain the second picture comprises:

[0011] performing layer fusion on the first background layer and / or the first foreground object layer after processing to obtain a fusion pixel point set.

[0012] generate the second picture according to the fusion pixel point set and a display area of the camera preview interface.

[0013] The generating the second picture according to the fusion pixel point set and the display area of the camera preview interface comprises:

[0014] determining whether a coordinate range of the fusion pixel point set covers all display areas of the preview interface;

[0015] If not, performing image inpainting on the uncovered area to obtain a repaired pixel point set of the uncovered area;

[0016] generating the second picture according to the repaired pixel point set and the fusion pixel point set.

[0017] The performing image inpainting on the uncovered area comprises:

[0018] obtaining a neighboring picture frame of the first picture collected by the camera;

[0019] extracting a neighboring pixel point set corresponding to an area at a same position as the uncovered area in the neighboring picture frame;

[0020] performing image inpainting on the uncovered area based on the neighboring pixel point set.

[0021] The performing image inpainting on the uncovered area comprises:

[0022] obtaining a pixel feature within a preset range of a boundary between the first background layer and the uncovered area;

[0023] searching for a third picture matching the first background layer based on the pixel feature;

[0024] performing image inpainting on the uncovered area based on the third picture.

[0025] The processing the first background layer and / or the first foreground object layer comprises:

[0026] in response to a movement operation of the user on the first background layer or the first foreground object layer, obtaining a movement distance of a finger of the user on the preview interface;

[0027] determining an offset vector according to the movement distance;

[0028] moving a position of a pixel point in the first background layer and / or the first foreground object layer based on the offset vector.

[0029] The processing of the first background layer and / or the first foreground object layer comprises:

[0030] In response to the zoom operation of the user on the first foreground object layer or the first background layer, the initial distance, the initial connection angle of the double fingers of the user on the screen, and the real-time distance, the real-time connection angle of the double fingers after the zoom operation are obtained;

[0031] A zoom factor is determined according to the initial distance and the real-time distance;

[0032] A rotation angle is determined according to the initial connection angle and the real-time connection angle;

[0033] A second pixel point set is generated according to the zoom factor, the rotation angle, and the pixel characteristics of a first pixel point set, wherein the first pixel point set comprises at least part of the pixel points of the first foreground object layer or at least part of the pixel points of the first background layer.

[0034] When the zoom operation is a zoom-out operation, the pixel range of the second pixel point set is smaller than the pixel range of the first pixel point set;

[0035] When the zoom operation is a zoom-in operation, the pixel range of the second pixel point set is larger than the pixel range of the first pixel point set.

[0036] To solve the above technical problem, the application further provides a photographing processing device, which comprises a memory and a processor coupled with the memory; wherein the memory is used for storing program data, and the processor is used for executing the program data to realize the photographing processing method as described above.

[0037] To solve the above technical problem, the application further provides a computer storage medium, which is used for storing program data, and the program data is used to realize the photographing processing method as described above when executed by a computer.

[0038] Compared with the prior art, the application has the beneficial effects that: by first performing layering processing on the first picture currently displayed by the preview interface, the first background layer and the first foreground object layer are obtained, the background layer and the foreground object layer of the first picture can be independently adjusted, for example, the person in the foreground object layer is independently zoomed, displaced, and the like, the proportion of the foreground object layer and the background layer can be adjusted, the user can independently adjust the person or the background, in the adjustment of the composition, the proportion of the person or the background is independently adjusted, the individualized demand of the user for the coordinated composition between the person and the background is met, the problem of background redundancy or person cropping caused by focal length adjustment is avoided, and the photographing effect and the user experience are significantly improved. BRIEF DESCRIPTION OF DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained from these drawings without any creative effort.

[0040] Wherein:

[0041] Figure 1 is a flowchart of a photographing processing method provided by the present application;

[0042] Figure 2 is a schematic diagram of a preview interface in an embodiment provided by the present application;

[0043] Figure 3 is a schematic diagram of a picture in a preview interface in an embodiment provided by the present application;

[0044] Figure 4 is a schematic diagram of a second picture in a preview interface in another embodiment provided by the present application;

[0045] Figure 5 is a flowchart of a photographing processing method in another embodiment provided by the present application;

[0046] Figure 6 is a structural schematic diagram of an embodiment of a photographing processing apparatus provided by the present application;

[0047] Figure 7 is a structural schematic diagram of an embodiment of a photographing processing device provided by the present application;

[0048] Figure 8 is a structural schematic diagram of an embodiment of a computer storage medium provided by the present application. DETAILED DESCRIPTION

[0049] The technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without any creative effort belong to the scope of protection of the present application.

[0050] The terms "first", "second", "third", "fourth" and the like in the description and in the claims of the present application, if any, are used for distinguishing between similar objects talking about the apparatus, and are not necessarily used to describe a particular sequential or chronological order. It is to be understood that the use of these terms herein is to be taken in their broadest possible sense and the use of these terms in the description and claims of the present application is not intended to limit the particular order in which the steps of the methods occur but rather to define the sequence of the steps of the methods. Further, the terms "comprise" and "have" and their variations, if any, are used in their broadest sense to include both explicit and implicit described features. It is to be understood that the terms "comprise", "comprising", "have", "having", "include", "including" and "contain", "containing" as used herein, are used in their broadest sense and are used in conjunction with their corresponding verb, to mean that the other method steps, materials, acts or equivalents thereof described herein are included (even if not explicitly listed), but not to the exclusion of additional method steps, materials, acts or equivalents that might be utilized.

[0051] Referring to Figure 1 , Figure 1 is a flowchart of a photographing processing method provided by the present application.

[0052] The photographing processing method of the present application is applied to a photographing processing apparatus. The photographing processing apparatus of the present application can be a server, a terminal device, or a system comprising a server and a terminal device. Accordingly, each part of the photographing processing apparatus, such as each unit, sub-unit, module, and sub-module, can be disposed in the server, the terminal device, or the server and the terminal device respectively.

[0053] Further, the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster comprising a plurality of servers, or as a single server. When the server is software, it can be implemented as a plurality of software or software modules, such as software or software modules for providing a distributed server, or as a single software or software module, which is not limited here.

[0054] As Figure 1 shown, the specific steps are as follows:

[0055] Step S11: obtaining a first picture displayed in a preview interface of a current camera, wherein the first picture is obtained by the camera from a real scene.

[0056] In the embodiments of the present application, the camera can be a digital camera or a camera in a mobile terminal such as a mobile phone. The camera in a mobile phone is taken as an example for description in the embodiments of the present application.

[0057] When taking photos with a mobile phone, there is a preview interface on the phone screen. The real-time scene captured by the camera is presented on the preview interface on the screen in real time. The scene that the camera is pointing at, including people, background, light and other elements, is displayed on the preview interface on the phone screen in the form of dynamic images.

[0058] Users can visually preview the approximate effect of the photo to be taken, such as the position of the person, the composition of the background, and the presentation of colors. When users interact with the image displayed in the preview interface before shooting, the corresponding changes will be reflected in the preview interface in real time.

[0059] Please see Figure 2 , Figure 2 This is a schematic diagram of the preview interface in one embodiment provided in this application, as shown below. Figure 2 As shown, a "Layered Editing" function button is displayed in the preview interface. When the user uses the camera function, clicking this function button will cause the mobile terminal to respond to the user's click command and enter the layered editing mode. First, the image currently displayed in the preview interface, i.e., the first image, will be acquired and edited.

[0060] Step S12: Perform layer processing on the first image to obtain a first background layer and a first foreground object layer.

[0061] In this embodiment of the application, after obtaining the first image, the first image is processed by layering, dividing the first image into a background layer and a foreground object layer, that is, obtaining the first background layer and the first foreground object layer. The background layer may include relatively distant elements such as the sky, trees, buildings, desktop, walls, and curtains. The foreground object layer generally refers to the main subject element that is highlighted in the image, such as people, animals or other objects that serve as the visual focus in the photo.

[0062] Step S13: According to the editing instructions, process the first background layer and / or the first foreground object layer to obtain the second image, and display the second image on the preview interface.

[0063] In this embodiment of the application, in the layered editing mode, after the first image is processed into a first background layer and a first foreground object layer, the user can perform editing operations on the first background layer and / or the first foreground object layer in the preview interface. In response to the user's editing operation, an editing instruction is generated, and the first background layer and / or the first foreground object layer are processed according to the editing instruction to obtain a second image. The processed second image is displayed in real time in the preview interface.

[0064] Processing the first background layer and / or the first foreground object layer refers to scaling, moving, or performing other operations on the first background layer and / or the first foreground object layer.

[0065] Specifically, after the first picture is layered, the user can click the first background layer and the first foreground object layer respectively on the mobile phone screen to perform editing operations.

[0066] In an optional embodiment, the processing of the first background layer and / or the first foreground object layer comprises: in response to a movement operation of the user on the first background layer or the first foreground object layer, obtaining a movement distance of a finger of the user on the preview interface; determining an offset vector according to the movement distance; and moving the positions of the pixel points in the first background layer and / or the first foreground object layer based on the offset vector.

[0067] In the embodiments of the present application, the editing operation is a movement operation, and the user selects the first background layer or the first foreground object layer by a single finger. The movement operation can be performed on the selected first background layer or first foreground object layer by the movement of the finger. In response to the movement operation, the first foreground object layer or the first background layer is moved to a corresponding position. Specifically, the movement distance of the finger is calculated by monitoring the movement track of the finger on the screen, and an offset vector including a movement direction and a movement length is generated according to the movement distance. The coordinate positions of the pixel points in the first background layer and / or the first foreground object layer are adjusted by the offset vector.

[0068] After the user completes the movement operation, the system calculates the coordinate positions of the pixel points in the first foreground object layer in the preview interface, and moves the pixel points in the first background layer and / or the first foreground object layer to the corresponding coordinate positions to realize the individual movement of the first background layer and / or the first foreground object layer.

[0069] In an optional embodiment, the processing of the first background layer and / or the first foreground object layer comprises: in response to a zoom operation of the user on the first foreground object layer or the first background layer, obtaining an initial distance and an initial connection angle of two fingers of the user on the screen, and a real-time distance and a real-time connection angle of the two fingers after the zoom operation; determining a zoom factor according to the initial distance and the real-time distance; determining a rotation angle according to the initial connection angle and the real-time connection angle; and generating a second pixel point set according to the zoom factor and the rotation angle and the pixel features of a first pixel point set, wherein the first pixel point set comprises at least part of the pixel points of the first foreground object layer or at least part of the pixel points of the first background layer.

[0070] In the embodiments of the present application, the editing operation is a zoom operation, and the user can perform the zoom operation on the first background layer and / or the first foreground object layer by the opening and closing operation of the two fingers on the screen. The user can select a to-be-processed region in the preview interface, and all the pixel points in the to-be-processed region constitute a first pixel point set.

[0071] The to-be-processed region is the entire region or a partial region where the first background layer is located, or the entire region or a partial region where the first foreground object layer is located, and therefore the first pixel point set includes at least some pixel points of the first foreground object layer or at least some pixel points of the first background layer.

[0072] When scaling, a scaling factor is determined by monitoring the initial distance and real-time distance of the two fingers of the user on the screen, and a rotation angle is determined by monitoring the initial connection angle and real-time connection angle of the two fingers of the user.

[0073] A second pixel point set is generated according to the scaling factor, the rotation angle, and the pixel features of the first pixel point set. Specifically, the coordinates of each pixel point in the first pixel point set are adjusted according to the scaling factor and the rotation angle. For example, the coordinates of a certain point in the first pixel point set in the preview interface are (x, y), the scaling factor is k, and the coordinates of the point after adjustment are (kx, ky). The pixel point is rotated around a fixed center according to the rotation angle. The coordinates of the pixel point after rotation can be calculated through a trigonometric function.

[0074] The second pixel point set is obtained by adjusting the coordinates of each pixel point in the first pixel point set. Layer fusion is performed according to the pixel point set obtained after processing, such as the second pixel point set, and a second picture is generated.

[0075] When generating the second pixel point set, in addition to changing the coordinates of each pixel point in the first pixel point set, new pixel points are generated or some pixel points are deleted in combination with the pixel features of the pixel points in the pixel point set, to obtain the second pixel point set.

[0076] When the scaling operation is a zoom-out operation, the pixel points in the first pixel point set will move closer to each other during adjustment, and the distance between some pixel points will be too close or even overlap. At this time, some pixel points are deleted according to a preset rule to obtain the second pixel point set. For example, the average value of each sliding window is calculated or a specific pixel point of each sliding window is selected, and multiple pixel points in the sliding window are fused into one pixel point to reduce the number of pixel points and avoid redundancy or distortion due to excessive pixel density.

[0077] When the scaling operation is a zoom-out operation, the pixel range of the second pixel point set is smaller than the pixel range of the first pixel point set.

[0078] When the scaling operation is a zoom-in operation, the distance between the pixel points in the first pixel point set is enlarged, and pixel vacancies will appear. New pixel points are generated by an interpolation algorithm and inserted into the vacancies to obtain the second pixel point set. The generated new pixel points refer to the pixel features of the surrounding pixel points.

[0079] When the zoom operation is a zoom-in operation, the pixel range of the second pixel point set is greater than the pixel range of the first pixel point set.

[0080] In an optional embodiment, the first background layer and / or the first foreground object layer are processed to obtain a second picture, including: after processing the first background layer and / or the first foreground object layer, performing layer fusion to obtain a fused pixel point set; and generating the second picture according to the fused pixel point set and a display area of the preview interface.

[0081] In the embodiments of the present application, after processing the first background layer and / or the first foreground object layer, such as zooming, moving, etc., layer fusion is achieved by fusing the pixel point sets corresponding to the processed first background layer and the first foreground object, respectively, to obtain a fused pixel point set.

[0082] After processing the first background layer and / or the first foreground object layer, respectively, there can be a partially overlapped region, and pixel information of each pixel point is determined according to a preset rule, for a region not overlapped in the two layers, pixel information of the corresponding layer itself is retained, and for an overlapped region in the two layers, pixel information of the foreground object layer is retained according to a foreground priority principle, to obtain a fused pixel point set.

[0083] The second picture is generated according to the fused pixel point set and a display area of the preview interface of the camera, specifically including: judging whether a coordinate range of the fused pixel point set covers all display areas of the preview interface; if not, performing image inpainting on an uncovered area to obtain an inpainted pixel point set of the uncovered area; and generating the second picture according to the inpainted pixel point set and the fused pixel point set.

[0084] In the embodiments of the present application, since the first foreground object layer and the first background layer are processed separately, some blank areas can appear in the fusion process, please refer to Figure 3 , Figure 3 is a schematic diagram of a picture in a preview interface in an embodiment provided by the present application, as shown in Figure 3 The first foreground object layer is moved to the left end of the preview interface by a certain distance, the processed first foreground object layer and the first background layer are directly fused, and there are some blank areas in the generated picture, which affects the shooting effect, therefore, the blank areas need to be inpainted.

[0085] Before inpainting, whether there are blank areas is judged by judging whether a coordinate range of the fused pixel point set covers all display areas of the preview interface.

[0086] If the coordinate range of the fused pixel point set cannot cover all display regions in the preview interface, there is a blank region, and the uncovered region is repaired to obtain a repaired pixel point set corresponding to the uncovered region.

[0087] The second picture is generated based on the repaired pixel point set and the fused pixel point set. Please refer to Figure 4 , Figure 4 is a schematic diagram of the second picture in the preview interface in another embodiment provided in the present application, as shown in Figure 4 , the blank region in Figure 3 is repaired to obtain the second picture displayed in the preview interface. The blank region in Figure 3 is filled, avoiding the influence of the blank region on the photographing effect, ensuring the integrity of the image in the preview interface, avoiding visual blank caused by incomplete pixel point coverage, and maintaining the coherence of the picture after separate adjustment of the foreground object layer or the background layer. The dashed line position is the position of the original foreground object layer, which is not displayed in actual application.

[0088] In an optional embodiment, the image repair on the uncovered region includes: acquiring an adjacent picture frame of the first picture collected by the camera; extracting an adjacent pixel point set corresponding to a region in the adjacent picture frame and located at the same position as the uncovered region; and performing image repair on the uncovered region based on the adjacent pixel point set.

[0089] In the embodiments of the present application, the image repair on the uncovered region is completed by using an adjacent picture frame adjacent to the first picture. The adjacent pixel point set at the position of the uncovered region in the adjacent picture frame is extracted, and the adjacent pixel point set is used for repair. Specifically, a content-aware filling method can be used to acquire the boundary of the first background layer and the uncovered region, extract a boundary pixel point set around the boundary in the first background layer, calculate the pixel similarity between the boundary pixel point set and the adjacent pixel point set, select the most matched pixel information in the adjacent pixel point set according to the pixel similarity, and fill the uncovered region.

[0090] In another optional embodiment, the image repair on the uncovered region includes: acquiring pixel features within a preset range of the boundary of the first background layer and the uncovered region; finding a third picture matched with the first background layer based on the pixel features; and performing image repair on the uncovered region based on the third picture.

[0091] In the embodiment of the present application, first, the pixel features in a preset range at the boundary between the first background layer and the uncovered area are collected, such as the texture, color distribution, and edge gradient of the pixels in the preset range, and the third picture closest to the pixel features is retrieved in the database through an image matching algorithm. The database can be a user album, a cloud album, and a picture library on the network. The uncovered area is repaired according to the third picture, the pixel information corresponding to the pixel points with the highest similarity in the third picture is extracted, and the pixel information is filled into the uncovered area.

[0092] Step S14: in response to the photographing instruction of the user, the second picture is saved.

[0093] In the embodiment of the present application, in response to the operation of the user pressing the shutter, that is, the photographing button, a photographing instruction is generated, and the second picture is saved in the album according to the photographing instruction. When the second picture is saved, the original first background layer and the first foreground object layer are stored, and the transformation parameters in the processing process are stored. The original first background layer, the first foreground object layer, and the transformation parameters are high-resolution synthesized, and the synthesized second picture is saved in the album.

[0094] By first performing layering processing on the first picture currently displayed on the preview interface, the first background layer and the first foreground object layer are obtained. The background layer and the foreground object layer of the first picture can be adjusted independently, for example, the person in the foreground object layer is processed independently, such as scaling, displacement, and the like. The proportion of the foreground object layer and the background layer can be adjusted, and the user can adjust the person or the background. In the adjustment of the composition, the proportion of the person or the background is adjusted independently, which meets the personalized needs of the user for the coordination of the person and the background in the composition, avoids the problem of background redundancy or person cropping caused by focus adjustment, and significantly improves the photographing effect and the user experience.

[0095] Those skilled in the art can understand that in the above method of the specific implementation manner, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0096] Please refer to Figure 5 , Figure 5 is a flowchart of a photographing processing method in another embodiment provided by the present application, as Figure 5 shown, the photographing method comprises:

[0097] Step S21: after the user starts the layering editing mode, the system acquires the first picture currently displayed on the camera preview interface;

[0098] Step S22, the first picture is segmented into a foreground object layer and a background layer according to a real-time segmentation module, wherein the real-time segmentation module can be a portrait segmentation model based on MobileNetV3 (feature extractor) + DeepLabv3 (segmentation head);

[0099] Step S23, the foreground object layer and / or the background layer are processed by a deformation algorithm, wherein when the user triggers zooming using two fingers, the deformation algorithm is processed based on an affine transformation matrix algorithm, when the user triggers moving using a single finger, the deformation algorithm is processed based on a displacement vector, when the user stretches the foreground object layer and / or the background layer, the deformation algorithm is processed based on region selection and mesh deformation (for example, moving least squares method), and real-time rendering is performed based on an open graphics library;

[0100] Step S24, it is judged whether a blank area appears, if yes, step 25 is executed, and if no, step S26 is executed;

[0101] Step S25, the blank area is repaired, and after the repair is completed, step S26 is executed, wherein the repair includes fast repair based on a content-aware filling algorithm and high-quality repair based on a generative adversarial network;

[0102] Step S26, in response to a photographing operation of the user, the processed picture is saved, wherein saving the picture includes layered saving, that is, the original background layer, the foreground object layer and the processing parameters are stored respectively; and the picture can also be saved by being synthesized at a high resolution.

[0103] To implement the above photographing processing method, the application further provides a photographing processing device, please refer to Figure 6 , Figure 6 is a structural schematic diagram of an embodiment of the photographing processing device provided by the application.

[0104] The photographing processing device 500 of the embodiment includes:

[0105] The acquisition module 51 is configured to acquire a first picture displayed in a preview interface of a current camera, wherein the first picture is obtained by the camera collecting a real scene;

[0106] The layered module 52 is configured to perform layered processing on the first picture to obtain a first background layer and a first foreground object layer;

[0107] The processing module 53 is configured to process the first background layer and / or the first foreground object layer according to an editing instruction to obtain a second picture, and display the second picture in the preview interface;

[0108] The saving module 54 is configured to save the second picture in response to a photographing instruction of the user.

[0109] To implement the photographing processing method, the application further provides a photographing processing device, please refer to Figure 7 , Figure 7 is a structural schematic diagram of an embodiment of the photographing processing device provided by the application.

[0110] The photographing processing device 400 of the embodiment comprises a processor 41, a memory 42, an input / output device 43 and a bus 44.

[0111] The processor 41, the memory 42 and the input / output device 43 are connected with the bus 44 respectively, the memory 42 stores program data, and the processor 41 is used to execute the program data to realize the photographing processing method described in the above embodiment.

[0112] In the embodiment of the application, the processor 41 can also be called as a CPU (Central Processing Unit). The processor 41 can be an integrated circuit chip with signal processing capability. The processor 41 can also be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor 41 can also be any conventional processor.

[0113] The application further provides a computer storage medium, please continue to refer to Figure 8 , Figure 8 is a structural schematic diagram of an embodiment of the computer storage medium provided by the application. The computer storage medium 600 stores a computer program 61. The computer program 61 is used to realize the photographing processing method of the above embodiment when being executed by a processor.

[0114] The embodiments of the present application are realized in the form of software function units and sold or used as independent products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or the whole or part of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0115] The above description is only the embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation using the content of the specification and drawings, or direct or indirect application in other related technical fields, is also included in the patent protection scope of the present application.

Claims

1. A photographing processing method characterized by comprising: The photographing processing method comprises: obtaining a first picture displayed in a preview interface of a current camera, wherein the first picture is obtained by the camera collecting a real scene; performing layered processing on the first picture to obtain a first background layer and a first foreground object layer; processing the first background layer and / or the first foreground object layer according to an editing instruction to obtain a second picture, and displaying the second picture in the preview interface; in response to a photographing instruction of a user, saving the second picture.

2. The photographing process method of claim 1, wherein, The processing of the first background layer and / or the first foreground object layer to obtain the second picture comprises: after processing the first background layer and / or the first foreground object layer, performing layer fusion to obtain a fusion pixel point set; generating the second picture according to the fusion pixel point set and a display area of the camera preview interface.

3. The photographing process method of claim 2, wherein, The generating of the second picture according to the fusion pixel point set and the display area of the camera preview interface comprises: judging whether a coordinate range of the fusion pixel point set covers all display areas of the preview interface; if not, performing image inpainting on an uncovered area to obtain an inpainted pixel point set of the uncovered area; generating the second picture according to the inpainted pixel point set and the fusion pixel point set.

4. The photographing process method of claim 3, wherein, The image inpainting on the uncovered area comprises: obtaining a neighboring picture frame of the first picture collected by the camera; extracting a neighboring pixel point set corresponding to an area at a same position as the uncovered area in the neighboring picture frame; performing image inpainting on the uncovered area based on the neighboring pixel point set.

5. The photographing process method of claim 3, wherein, The image inpainting on the uncovered area comprises: obtaining pixel features within a preset range of a boundary between the first background layer and the uncovered area; finding a third picture matched with the first background layer based on the pixel features; performing image inpainting on the uncovered area based on the third picture.

6. The photographing process method of claim 1, wherein, The processing of the first background layer and / or the first foreground object layer comprises: in response to a moving operation of the user on the first background layer or the first foreground object layer, obtaining a moving distance of a finger of the user on the preview interface; determining an offset vector according to the moving distance; moving positions of pixel points in the first background layer and / or the first foreground object layer based on the offset vector.

7. The photographing process method of claim 1, wherein, The processing of the first background layer and / or the first foreground object layer comprises: in response to a zooming operation of the user on the first foreground object layer or the first background layer, obtaining an initial distance and an initial connection angle of two fingers of the user on the screen, and real-time distance and real-time connection angle of the two fingers after the zooming operation; determining a zooming factor according to the initial distance and the real-time distance; determining a rotation angle according to the initial connection angle and the real-time connection angle; generating a second pixel point set according to the zooming factor and the rotation angle and pixel features of a first pixel point set, wherein the first pixel point set comprises at least part of pixel points of the first foreground object layer or at least part of pixel points of the first background layer.

8. The photographing processing method of claim 7, wherein when the zoom operation is a zoom-out operation, a pixel range of the second set of pixel points is smaller than a pixel range of the first set of pixel points; when the zoom operation is a zoom-in operation, the pixel range of the second set of pixel points is larger than the pixel range of the first set of pixel points.

9. A photographing processing apparatus characterized by comprising: The photographing processing device comprises a memory and a processor coupled with the memory; wherein the memory is configured to store program data, and the processor is configured to execute the program data to implement the photographing processing method according to any one of claims 1 to 8.

10. A computer storage medium, characterized in that, The computer storage medium is configured to store program data, which when executed by a computer, is configured to implement the photographing processing method according to any one of claims 1 to 8.