CN105701762B - Picture processing method and electronic equipment - Google Patents
Picture processing method and electronic equipment Download PDFInfo
- Publication number
- CN105701762B CN105701762B CN201511021346.0A CN201511021346A CN105701762B CN 105701762 B CN105701762 B CN 105701762B CN 201511021346 A CN201511021346 A CN 201511021346A CN 105701762 B CN105701762 B CN 105701762B
- Authority
- CN
- China
- Prior art keywords
- picture
- image
- processing
- layer
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 22
- 238000000034 method Methods 0.000 claims abstract description 31
- 230000002194 synthesizing effect Effects 0.000 claims abstract description 27
- 238000010586 diagram Methods 0.000 description 16
- 230000003993 interaction Effects 0.000 description 10
- 230000006870 function Effects 0.000 description 8
- 238000004590 computer program Methods 0.000 description 7
- 230000015572 biosynthetic process Effects 0.000 description 2
- 230000009977 dual effect Effects 0.000 description 2
- 238000003786 synthesis reaction Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/14—Transformations for image registration, e.g. adjusting or mapping for alignment of images
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Studio Devices (AREA)
Abstract
The embodiment of the invention discloses a picture processing method, which is applied to electronic equipment, wherein the electronic equipment at least comprises two image acquisition units, and the method comprises the following steps: acquiring a first image; acquiring a second picture by using an image acquisition unit; processing the second picture according to a preset rule, and identifying to obtain a first part of the second picture; and setting the first image in a first part of the second picture, and synthesizing to obtain a target picture. The embodiment of the invention also discloses the electronic equipment.
Description
Technical Field
The present invention relates to a picture processing technology in the field of image processing, and in particular, to a picture processing method and an electronic device.
Background
Along with the popularization, the popularization and the development of electronic products, the electronic products have more and more functions, stronger and stronger performance and richer experience, and bring convenience to the life of people. At present, some mobile phones have a double-front-facing camera configuration, and a user can use the double-front-facing camera to perform self-shooting.
However, the functions of the existing dual front cameras can only realize the functions described above. The functions are simple for users, the experience effect of the users is poor,
disclosure of Invention
In order to solve the above technical problems, embodiments of the present invention are expected to provide a picture processing method and an electronic device, so as to solve the problem that an electronic device with two cameras in the prior art cannot synthesize one image into a designated portion of another image, greatly reduce operation difficulty, facilitate operation of a user, and improve interaction capability between the user and the electronic device.
The technical scheme of the invention is realized as follows:
a picture processing method is applied to an electronic device, the electronic device at least comprises two image acquisition units, and the method comprises the following steps:
acquiring a first image;
acquiring a second picture by using an image acquisition unit;
processing the second picture according to a preset rule, and identifying to obtain a first part of the second picture;
and setting the first image in a first part of the second picture, and synthesizing to obtain a target picture.
Optionally, the processing the second picture according to a preset rule, and identifying to obtain a first portion of the second picture, includes:
acquiring a preset parameter capable of representing the depth information of the second picture;
and processing the second picture based on the preset rule according to the preset parameters to obtain a foreground part and a background part of the second picture.
Optionally, the setting the first image in the first portion of the second picture, and synthesizing to obtain the target picture includes:
setting the first image in the middle of the foreground part and the background part of the second picture, and synthesizing the first image and the second picture to obtain the target picture; wherein the first portion is a middle portion of a foreground portion and a background portion of the second picture.
Optionally, the second picture includes: the step of setting the first image in the middle of the foreground part and the background part of the second image and synthesizing the first image with the second image to obtain the target image includes:
adding a middle layer between the layer where the foreground part of the second picture is located and the layer where the background part of the second picture is located;
and setting the first image in the middle image layer, and synthesizing the first image and the second image to obtain the target image.
Optionally, the acquiring the first image includes:
acquiring a third picture comprising a target object;
and processing the third picture to obtain the first image aiming at the target object.
An electronic device comprising two image acquisition units, the electronic device further comprising: the device comprises an acquisition unit, an identification unit and a processing unit, wherein:
the acquisition unit is used for acquiring a first image;
the image acquisition unit is used for acquiring a second picture;
the identification unit is used for processing the second picture according to a preset rule and identifying to obtain a first part of the second picture;
and the processing unit is used for setting the first image in the first part of the second picture and synthesizing to obtain a target picture.
Optionally, the identification unit includes: a first acquisition module and a first processing module, wherein:
the first obtaining module is used for obtaining preset parameters capable of representing the depth of field information of the second picture;
and the first processing module is used for processing the second picture based on the preset rule according to the preset parameter to obtain a foreground part and a background part of the second picture.
Optionally, the processing unit is specifically configured to:
inserting the first picture between a foreground part and a background part of the second picture, and synthesizing the first picture and the second picture to obtain the target picture; wherein the first portion is a middle portion of a foreground portion and a background portion of the second picture.
Optionally, the second picture includes: the map layer that the part of prospect is located and the map layer that the part of background is located, the processing unit includes: an adding module and a second processing module, wherein:
the adding module is used for adding a middle layer between the layer where the foreground part of the second picture is located and the layer where the background part of the second picture is located;
the second processing module is configured to set the first image in the middle layer, and synthesize the first image with the second image to obtain the target image.
Optionally, the obtaining unit specifically includes: a second acquisition module and a third processing module, wherein:
the second acquisition module is used for acquiring a third picture comprising a target object;
and processing the third picture to obtain the first image aiming at the target object.
The image processing method and the electronic device provided by the embodiment of the invention comprise the steps of acquiring a first image, and acquiring a second image by using two image acquisition units; processing the second picture according to a preset rule, and identifying to obtain a first part of the second picture; setting the first image in a first part of the second picture, and synthesizing to obtain a target picture; therefore, the camera can directly process the collected pictures, the target image in one picture is synthesized into the specified part of another image, the problem that the electronic equipment with double cameras in the prior art cannot synthesize one image into the specified part of another picture is solved, the operation difficulty is greatly reduced, the operation of a user is facilitated, and meanwhile, the interaction capacity of the user and the electronic equipment is improved.
Drawings
Fig. 1 is a schematic flowchart of a picture processing method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another image processing method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of another image processing method according to an embodiment of the present invention;
FIG. 4a is a diagram illustrating a first image according to an embodiment of the present invention;
FIG. 4b is a diagram of a second picture according to an embodiment of the present invention;
fig. 4c is a schematic diagram of a target picture obtained after processing and combining the first image and the second picture according to an embodiment of the present invention;
FIG. 4d is a schematic diagram of another embodiment of the present invention providing a first image;
fig. 5 is a flowchart illustrating a picture processing method according to another embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another electronic device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another electronic device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to another embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
An embodiment of the present invention provides a picture processing method, which is applied to an electronic device, where the electronic device at least includes two image capturing units, and as shown in fig. 1, the method includes the following steps:
In particular, the step of acquiring the first image may be implemented by an electronic device. The first image may be an image obtained in advance and already stored in the electronic device, for example, may be received by other application software on the electronic device, or may be currently obtained by the image acquisition unit. The first image may be an image directly obtained, or may be a first image obtained by obtaining a picture of a specific object and then processing the picture with the specific object.
And 102, acquiring a second picture by utilizing two image acquisition units.
In particular, the step of acquiring the second picture by using two image capturing units may be implemented by an electronic device. The two image capturing units may preferably be located on the same side of the electronic device, and the two image capturing units may be two cameras, i.e. two front cameras or two rear cameras, located on the same side of the electronic device on the electronic device. Wherein the second picture may be captured by one of the two image capturing units. If the first image or the picture of obtaining the first image is obtained by the image acquisition unit currently, the first image and the second image are acquired by using the same image acquisition unit of the two image acquisition units.
And 103, processing the second picture according to a preset rule, and identifying to obtain a first part of the second picture.
Specifically, the step of processing the second picture according to the preset rule, and the identification of the first part of the second picture may be implemented by the electronic device. According to the preset rule, the depth of field information of the second picture can be obtained, and further the foreground part and the background part of the second picture can be obtained. The first portion is not a certain region in the picture understood on the plane in the second picture, but exists in the second picture with spatial perspective, and preferably, the first portion may be a middle portion of a foreground portion and a background portion of the second picture.
And 104, arranging the first image on the first part of the second picture, and synthesizing to obtain a target picture.
Specifically, the step of setting the first image to the first portion of the second picture and synthesizing the target picture may be implemented by the electronic device. After the first portion of the second picture, that is, the foreground portion and the background portion of the second picture, are obtained according to the preset rule, the first image may be set in the middle portion of the foreground portion and the background portion of the second picture, and then the processed pictures are synthesized to obtain the target picture.
The picture processing method provided by the embodiment of the invention comprises the steps of acquiring a first picture, and acquiring a second picture by using two image acquisition units; processing the second picture according to a preset rule, and identifying to obtain a first part of the second picture; setting the first image in a first part of the second picture, and synthesizing to obtain a target picture; therefore, the camera can directly process the collected pictures, the target image in one picture is synthesized into the specified part of another image, the problem that the electronic equipment with double cameras in the prior art cannot synthesize one image into the specified part of another picture is solved, the operation difficulty is greatly reduced, the operation of a user is facilitated, and meanwhile, the interaction capacity of the user and the electronic equipment is improved.
An embodiment of the present invention provides a picture processing method, which is applied to an electronic device, where the electronic device at least includes two image capturing units, and the two image capturing units may be a first image capturing unit and a second image capturing unit, and as shown in fig. 2, the method includes the following steps:
Specifically, if the first image is currently obtained by the image capturing unit, or a picture for the specific object is obtained first, and then the picture with the specific object is processed to obtain the first image, the image capturing unit that captures the first image or the picture for the specific object is the first image capturing unit.
Specifically, for two image acquisition units of the electronic device, the first image acquisition unit is used for acquiring a second picture, and the second image acquisition unit analyzes and processes the acquired second picture to obtain preset parameters of the second picture, so as to identify a foreground part and a background part of the second picture.
And 204, the electronic equipment processes the second picture according to preset parameters and preset rules to obtain a foreground part and a background part of the second picture.
Wherein the first portion is a middle portion of the foreground portion and the background portion of the second picture.
Specifically, the second image capturing unit that does not capture an image in the electronic device may analyze preset parameters of the second image captured by the first image capturing unit to obtain a foreground portion and a background portion of the second image.
And step 205, the electronic device sets the first image in the middle of the foreground part and the background part of the second picture, and synthesizes the first image with the second picture to obtain a target picture.
Specifically, the second image capturing unit that does not capture an image in the electronic device performs image processing on the second image captured by the first image capturing unit to obtain a layer related to the foreground portion and a layer related to the background portion, respectively, then sets the obtained first image in the middle of the layer corresponding to the foreground portion and the layer corresponding to the background portion, and then performs synthesis processing on the processed images to finally obtain the target image.
It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.
The picture processing method provided by the embodiment of the invention comprises the steps of acquiring a first picture, and acquiring a second picture by using two image acquisition units; processing the second picture according to a preset rule, and identifying to obtain a first part of the second picture; setting the first image in a first part of the second picture, and synthesizing to obtain a target picture; therefore, the camera can directly process the collected pictures, the target image in one picture is synthesized into the specified part of another image, the problem that the electronic equipment with double cameras in the prior art cannot synthesize one image into the specified part of another picture is solved, the operation difficulty is greatly reduced, the operation of a user is facilitated, and meanwhile, the interaction capacity of the user and the electronic equipment is improved.
The embodiment of the invention provides a picture processing method, which is applied to electronic equipment, wherein the electronic equipment at least comprises two image acquisition units, the two image acquisition units can be a first image acquisition unit and a second image acquisition unit, and a second picture comprises: referring to fig. 3, the method includes the following steps:
Specifically, the first image in this embodiment may be an image obtained in advance and already stored in the electronic device, for example, may be an image received by an application software on the electronic device, such as a QQ tool, a wechat tool, or the like, and may also be an image currently acquired by the first image acquisition unit.
And step 304, the electronic device processes the second picture according to the preset parameters and based on the preset rules to obtain a foreground part and a background part of the second picture.
And 305, adding a middle layer between the layer where the foreground part of the second picture is located and the layer where the background part of the second picture is located by the electronic equipment.
Wherein the first portion is a middle portion of the foreground portion and the background portion of the second picture.
Specifically, the layer where the foreground portion of the second picture is located may be a first layer, the layer where the background portion of the second picture is located may be a second layer, and a middle layer newly added to the second picture may be a third layer; a third layer may be added between the first layer and the second layer to add a middle layer between the layer where the foreground portion of the second picture is located and the layer where the background portion is located.
And step 306, the electronic device sets the first image in the middle layer, and synthesizes the first image with the second image to obtain a target image.
Specifically, the first image may be inserted into the newly added third layer to implement that the first image is arranged in the middle layer, and then the first layer, the second layer, and the third layer are subjected to synthesis processing, so that the target picture may be obtained. For example, as shown in fig. 4a to 4C, fig. 4a is a first image obtained in this embodiment, fig. 4B is a second image acquired by a first image acquisition unit in this embodiment, and fig. 4C is a target image formed after the first image is disposed in a middle layer of the second image and merged, where in fig. 4C, an image layer where a is located is the first image layer, an image layer where B is located is the second image layer, and an image layer where C is located is a third image layer, that is, a newly added middle image layer. The target picture may be obtained by adding a third layer between the layer where the a of the second picture is located and the layer where the B of the second picture is located, then setting the first image on the third layer, and synthesizing the first image with the first layer and the second layer.
It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.
The picture processing method provided by the embodiment of the invention comprises the steps of acquiring a first picture, and acquiring a second picture by using two image acquisition units; processing the second picture according to a preset rule, and identifying to obtain a first part of the second picture; setting the first image in a first part of the second picture, and synthesizing to obtain a target picture; therefore, the camera can directly process the collected pictures, the target image in one picture is synthesized into the specified part of another image, the problem that the electronic equipment with double cameras in the prior art cannot synthesize one image into the specified part of another picture is solved, the operation difficulty is greatly reduced, the operation of a user is facilitated, and meanwhile, the interaction capacity of the user and the electronic equipment is improved.
The embodiment of the invention provides a picture processing method, which is applied to electronic equipment, wherein the electronic equipment at least comprises two image acquisition units, the two image acquisition units can be a first image acquisition unit and a second image acquisition unit, and a second picture comprises: referring to fig. 4, the method includes the following steps:
Specifically, the first image in this embodiment may be obtained by acquiring a picture for a specific object by using the first image acquisition unit, and then performing matting processing on the picture with the specific object to obtain the first image. The image processing tool can be used for carrying out the matting processing on the image with the specific object, wherein the matting processing on the image with the specific object can be realized by the electronic equipment, and can also be carried out by adopting the image processing tool. It should be noted that, the specific way of performing the matting processing on the picture with the specific object to obtain the first image is not limited herein, and any scheme that can achieve the matting of the image from the picture is feasible in the prior art.
And step 402, the electronic device processes the third picture to obtain a first image for the target object.
And step 403, the electronic device acquires a second picture by using two image acquisition units.
And 405, the electronic equipment processes the second picture according to preset parameters and preset rules to obtain a foreground part and a background part of the second picture.
And step 406, the electronic device adds a middle layer between the layer where the foreground part of the second picture is located and the layer where the background part of the second picture is located.
Wherein the first portion is a middle portion of the foreground portion and the background portion of the second picture.
Step 407, the electronic device sets the first image in the middle layer, and synthesizes the first image with the second image to obtain a target image.
For example, as shown in fig. 4b, 4c, and 4d, fig. 4a is a third picture with a target object acquired by the first acquisition unit, and the first image may be obtained after the target object in fig. 4a is subjected to a matting process; fig. 4d is a first image obtained in this embodiment, fig. 4B is a second image acquired by a first image acquisition unit in this embodiment, and fig. 4C is a target image formed after the first image is disposed in a middle layer of the second image and merged, where in fig. 4C, an image layer where a is located is the first layer, an image layer where B is located is the second layer, and an image layer where C is located is the third layer, that is, a newly added middle layer. The target picture may be obtained by adding a third layer between the layer where a of the second picture is located and the layer where B is located, then setting a first image obtained by performing matting on the third picture corresponding to fig. 4a on the third layer, and synthesizing the first image with the first layer and the second layer.
The following electronic devices are exemplified as a mobile phone with front dual cameras: acquiring a third picture including a target object as a portrait and another portrait picture with a background picture, namely a second picture, by using double front-facing cameras on the mobile phone, wherein the third picture and the second picture can be shot by a first front-facing camera on the mobile phone, then acquiring preset parameters of the second picture shot by the first front-facing camera by using a second front-facing camera on the mobile phone, and acquiring a foreground part and a background part of the corresponding pictures according to the preset parameters of the second picture; wherein, the foreground part of the second picture can be a portrait, and the background part of the second picture can be a background picture; meanwhile, an image processing tool in the electronic equipment can perform matting processing on the obtained third picture to obtain a target object image, namely a first image; then finding layers where foreground parts of the second picture are located, namely a first layer and layers where the background parts are located, namely a second layer, adding a middle layer, namely a third layer, between the first layer and the second layer, and setting a portrait in the first image, namely the third picture, obtained through processing on the third layer; and then, synthesizing the first image layer, the second image layer and the third image layer of the second image, wherein the synthesized image is the image of which the portrait in the third image is behind the portrait of the original second image. The image processing tool can be used for carrying out the matting processing on the image with the specific object, wherein the matting processing on the image with the specific object can be realized by the electronic equipment, and can also be carried out by adopting the image processing tool. It should be noted that, the specific way of performing the matting processing on the picture with the specific object to obtain the first image is not limited herein, and any scheme that can achieve the matting of the image from the picture is feasible in the prior art.
It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.
The picture processing method provided by the embodiment of the invention comprises the steps of acquiring a first picture, and acquiring a second picture by using two image acquisition units; processing the second picture according to a preset rule, and identifying to obtain a first part of the second picture; setting the first image in a first part of the second picture, and synthesizing to obtain a target picture; therefore, the camera can directly process the collected pictures, the target image in one picture is synthesized into the specified part of another image, the problem that the electronic equipment with double cameras in the prior art cannot synthesize one image into the specified part of another picture is solved, the operation difficulty is greatly reduced, the operation of a user is facilitated, and meanwhile, the interaction capacity of the user and the electronic equipment is improved.
An embodiment of the present invention provides an electronic device, which can be applied to the image processing method provided in the embodiments corresponding to fig. 1 to 3 and 5, and as shown in fig. 6, the electronic device includes: a first image acquisition unit 51, a second image acquisition unit 52, an acquisition unit 53, a recognition unit 54 and a processing unit 55, wherein:
an acquiring unit 53 for acquiring a first image.
The first image capturing unit 51 and the second image capturing unit 52 are both used for acquiring a second picture.
The identifying unit 54 is configured to process the second picture according to a preset rule, and identify to obtain a first portion of the second picture.
And the processing unit 55 is configured to set the first image in the first portion of the second picture, and synthesize the target picture.
The electronic equipment provided by the embodiment of the invention acquires a first image and acquires a second image by using two image acquisition units; processing the second picture according to a preset rule, and identifying to obtain a first part of the second picture; setting the first image in a first part of the second picture, and synthesizing to obtain a target picture; therefore, the camera can directly process the collected pictures, the target image in one picture is synthesized into the specified part of another image, the problem that the electronic equipment with double cameras in the prior art cannot synthesize one image into the specified part of another picture is solved, the operation difficulty is greatly reduced, the operation of a user is facilitated, and meanwhile, the interaction capacity of the user and the electronic equipment is improved.
Further, referring to fig. 7, the recognition unit 54 includes: a first obtaining module 541 and a first processing module 542, wherein:
the first obtaining module 541 is configured to obtain a preset parameter capable of representing depth information of the second picture.
And the first processing module is used for processing the second picture based on a preset rule according to a preset parameter to obtain a foreground part and a background part of the second picture.
Specifically, the processing unit 55 is specifically configured to execute the following steps:
and inserting the first picture between the foreground part and the background part of the second picture, and synthesizing the first picture and the second picture to obtain a target picture.
Wherein the first portion is a middle portion of the foreground portion and the background portion of the second picture.
More specifically, the second picture includes: as shown in fig. 8, the processing unit 55 includes: an adding module 551 and a second processing module 552, wherein:
the adding module 551 is configured to add a middle layer between a layer where a foreground portion of the second picture is located and a layer where a background portion of the second picture is located.
The second processing module 552 is configured to set the first image in the middle layer, and synthesize the first image with the second image to obtain the target image.
Further, as shown in fig. 9, the obtaining unit 53 specifically includes: a second obtaining module 531 and a third processing module 532, wherein:
the second obtaining module 531 is configured to obtain a third picture including the target object.
A third processing module 532, configured to process the third picture to obtain a first image for the target object.
It should be noted that in this embodiment, the interaction process between each unit and each module may refer to the interaction process in the picture processing method provided in the embodiments corresponding to fig. 1 to 3 and 5, and details are not described here.
The electronic equipment provided by the embodiment of the invention acquires a first image and acquires a second image by using two image acquisition units; processing the second picture according to a preset rule, and identifying to obtain a first part of the second picture; setting the first image in a first part of the second picture, and synthesizing to obtain a target picture; therefore, the camera can directly process the collected pictures, the target image in one picture is synthesized into the specified part of another image, the problem that the electronic equipment with double cameras in the prior art cannot synthesize one image into the specified part of another picture is solved, the operation difficulty is greatly reduced, the operation of a user is facilitated, and meanwhile, the interaction capacity of the user and the electronic equipment is improved.
In practical applications, the first image capturing Unit 51, the second image capturing Unit 52, the obtaining Unit 53, the second obtaining module 531, the third Processing module 532, the identifying Unit 54, the first obtaining module 541, the first Processing module 542, the Processing Unit 55, the adding module 551 and the second Processing module 552 may be implemented by a Central Processing Unit (CPU), a Microprocessor (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.
Claims (8)
1. A picture processing method is applied to an electronic device, the electronic device at least comprises two image acquisition units, and the method comprises the following steps:
acquiring a first image;
acquiring a second picture by using an image acquisition unit;
processing the second picture according to a preset rule, and identifying to obtain a first part of the second picture;
setting the first image on a first part of the second picture, and synthesizing to obtain a target picture;
wherein, the processing the second picture according to the preset rule, and identifying to obtain the first part of the second picture comprises:
processing the second picture according to a preset rule, and identifying to obtain a foreground part and a background part of the second picture;
the setting the first image in a first part of the second picture and synthesizing to obtain a target picture includes:
and setting the first image in the middle part of the foreground part and the background part of the second picture, and synthesizing the first image and the second picture to obtain the target picture.
2. The method according to claim 1, wherein the processing the second picture according to a preset rule to identify a foreground portion and a background portion of the second picture comprises:
acquiring a preset parameter capable of representing the depth information of the second picture;
and processing the second picture based on the preset rule according to the preset parameters to obtain a foreground part and a background part of the second picture.
3. The method of claim 2, wherein the second picture comprises: the step of setting the first image in the middle of the foreground part and the background part of the second image and synthesizing the first image with the second image to obtain the target image includes:
adding a middle layer between the layer where the foreground part of the second picture is located and the layer where the background part of the second picture is located;
and setting the first image in the middle image layer, and synthesizing the first image and the second image to obtain the target image.
4. The method of claim 1, wherein said acquiring a first image comprises:
acquiring a third picture comprising a target object;
and processing the third picture to obtain the first image aiming at the target object.
5. An electronic device, comprising two image capturing units, the electronic device further comprising: the device comprises an acquisition unit, an identification unit and a processing unit, wherein:
the acquisition unit is used for acquiring a first image;
the image acquisition unit is used for acquiring a second picture;
the identification unit is used for processing the second picture according to a preset rule and identifying to obtain a first part of the second picture;
the processing unit is used for setting the first image in a first part of the second picture and synthesizing to obtain a target picture;
the identification unit is specifically configured to process the second picture according to a preset rule, and identify a foreground part and a background part of the second picture;
the processing unit is specifically configured to set the first image in a middle portion of a foreground portion and a background portion of the second picture, and synthesize the first image and the second picture to obtain the target picture.
6. The electronic device according to claim 5, wherein the identification unit includes: a first acquisition module and a first processing module, wherein:
the first obtaining module is used for obtaining preset parameters capable of representing the depth of field information of the second picture;
and the first processing module is used for processing the second picture based on the preset rule according to the preset parameter to obtain a foreground part and a background part of the second picture.
7. The electronic device of claim 6, wherein the second picture comprises: the map layer that the part of prospect is located and the map layer that the part of background is located, the processing unit includes: an adding module and a second processing module, wherein:
the adding module is used for adding a middle layer between the layer where the foreground part of the second picture is located and the layer where the background part of the second picture is located;
the second processing module is configured to set the first image in the middle layer, and synthesize the first image with the second image to obtain the target image.
8. The electronic device according to claim 5, wherein the obtaining unit specifically includes: a second acquisition module and a third processing module, wherein:
the second acquisition module is used for acquiring a third picture comprising a target object;
and processing the third picture to obtain the first image aiming at the target object.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511021346.0A CN105701762B (en) | 2015-12-30 | 2015-12-30 | Picture processing method and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511021346.0A CN105701762B (en) | 2015-12-30 | 2015-12-30 | Picture processing method and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105701762A CN105701762A (en) | 2016-06-22 |
CN105701762B true CN105701762B (en) | 2020-03-24 |
Family
ID=56226697
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201511021346.0A Active CN105701762B (en) | 2015-12-30 | 2015-12-30 | Picture processing method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105701762B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106791389B (en) * | 2016-12-16 | 2021-04-20 | 宇龙计算机通信科技(深圳)有限公司 | Image processing method, image processing device and terminal |
CN107071275B (en) * | 2017-03-22 | 2020-07-14 | 珠海大横琴科技发展有限公司 | Image synthesis method and terminal |
CN107087107B (en) * | 2017-05-05 | 2019-11-29 | 中国科学院计算技术研究所 | Image processing apparatus and method based on dual camera |
CN109035288B (en) * | 2018-07-27 | 2024-04-16 | 北京市商汤科技开发有限公司 | Image processing method and device, equipment and storage medium |
CN109064390B (en) * | 2018-08-01 | 2023-04-07 | Oppo(重庆)智能科技有限公司 | Image processing method, image processing device and mobile terminal |
CN109492364A (en) * | 2018-09-25 | 2019-03-19 | 罗源县凤山镇企业服务中心 | A kind of the intelligent unlocking method and terminal of mobile terminal |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104680480A (en) * | 2013-11-28 | 2015-06-03 | 腾讯科技(上海)有限公司 | Image processing method and device |
CN105187722A (en) * | 2015-09-15 | 2015-12-23 | 努比亚技术有限公司 | Depth-of-field adjustment method and apparatus, terminal |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20010031068A1 (en) * | 2000-04-14 | 2001-10-18 | Akihiro Ohta | Target detection system using radar and image processing |
CN102999943B (en) * | 2012-12-21 | 2016-04-13 | 吴心妮 | Image processing method and system |
CN104917965A (en) * | 2015-05-28 | 2015-09-16 | 努比亚技术有限公司 | Shooting method and device |
-
2015
- 2015-12-30 CN CN201511021346.0A patent/CN105701762B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104680480A (en) * | 2013-11-28 | 2015-06-03 | 腾讯科技(上海)有限公司 | Image processing method and device |
CN105187722A (en) * | 2015-09-15 | 2015-12-23 | 努比亚技术有限公司 | Depth-of-field adjustment method and apparatus, terminal |
Non-Patent Citations (1)
Title |
---|
高效图像合成技术研究;吴昊;《中国博士学位论文全文数据库 工程科技辑》;20140515(第5期);第20-25页、图2.10 * |
Also Published As
Publication number | Publication date |
---|---|
CN105701762A (en) | 2016-06-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105701762B (en) | Picture processing method and electronic equipment | |
JP6154075B2 (en) | Object detection and segmentation method, apparatus, and computer program product | |
CN110012209B (en) | Panoramic image generation method and device, storage medium and electronic equipment | |
JP6355746B2 (en) | Image editing techniques for devices | |
US10674066B2 (en) | Method for processing image and electronic apparatus therefor | |
EP2947627B1 (en) | Light field image depth estimation | |
CN105320695B (en) | Picture processing method and device | |
US20130169760A1 (en) | Image Enhancement Methods And Systems | |
CN105247567B (en) | A kind of image focusing device, method, system and non-transient program storage device again | |
CN104135611A (en) | Method and device for photographing with split-screen function | |
CN110062157B (en) | Method and device for rendering image, electronic equipment and computer readable storage medium | |
CN108776822B (en) | Target area detection method, device, terminal and storage medium | |
CN103412954A (en) | Virtual dynamic magazine using augmented reality technique | |
CN113949808B (en) | Video generation method and device, readable medium and electronic equipment | |
CN105447846B (en) | Image processing method and electronic equipment | |
CN108965769B (en) | Video display method and device | |
CN105827932A (en) | Image synthesis method and mobile terminal | |
CN112954212B (en) | Video generation method, device and equipment | |
WO2016192467A1 (en) | Method and device for playing videos | |
CN115457024A (en) | Method and device for processing cryoelectron microscope image, electronic equipment and storage medium | |
US10282633B2 (en) | Cross-asset media analysis and processing | |
CN114390206A (en) | Shooting method and device and electronic equipment | |
CN108540715B (en) | Picture processing method, electronic equipment and computer readable storage medium | |
CN112887611A (en) | Image processing method, device, equipment and storage medium | |
CN113473012A (en) | Virtualization processing method and device and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |