CN113873135A - Image obtaining method and device, electronic equipment and storage medium - Google Patents

Image obtaining method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113873135A
CN113873135A CN202111296423.9A CN202111296423A CN113873135A CN 113873135 A CN113873135 A CN 113873135A CN 202111296423 A CN202111296423 A CN 202111296423A CN 113873135 A CN113873135 A CN 113873135A
Authority
CN
China
Prior art keywords
image
area
target
screen
synthesized
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.)
Pending
Application number
CN202111296423.9A
Other languages
Chinese (zh)
Inventor
曹莎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bright Jupiter Private Ltd
Original Assignee
Lemei Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Lemei Technology Co ltd filed Critical Lemei Technology Co ltd
Priority to CN202111296423.9A priority Critical patent/CN113873135A/en
Publication of CN113873135A publication Critical patent/CN113873135A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/57Mechanical or electrical details of cameras or camera modules specially adapted for being embedded in other devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/58Means for changing the camera field of view without moving the camera body, e.g. nutating or panning of optics or image sensors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/66Remote control of cameras or camera parts, e.g. by remote control devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/04Synchronising
    • H04N5/06Generation of synchronising signals
    • H04N5/067Arrangements or circuits at the transmitter end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/265Mixing

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

The embodiment of the invention provides an image obtaining method, an image obtaining device, electronic equipment and a storage medium, and relates to the technical field of image processing, wherein the method comprises the following steps: receiving an image acquisition instruction; based on the image acquisition instruction, synchronously calling a front camera interface and a rear camera interface of the electronic equipment, and synchronously starting the front camera and the rear camera to acquire images; displaying a first image acquired by a front camera in a first area of a screen of the electronic equipment, and displaying a second image acquired by a rear camera in a second area of the screen; when the image synthesis condition is satisfied, the first image and the second image are synthesized according to a synthesized image layout determined by the first area and the second area to obtain a synthesized image. By applying the image obtaining scheme provided by the embodiment of the invention, images of different scenes can be synchronously obtained.

Description

Image obtaining method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image obtaining method and apparatus, an electronic device, and a storage medium.
Background
At present, electronic equipment such as mobile phones and tablet computers are generally provided with cameras. After the user starts the camera configured by the electronic equipment, the camera configured by the electronic equipment can be oriented to the scene in which the user is interested to acquire images. If the scene in which the user is interested changes, the user generally changes the orientation of the camera configured in the electronic device by rotating the electronic device, so as to obtain images of different scenes.
The method for obtaining the images of different scenes needs manual operation of a user, and is complex in process and low in efficiency.
Disclosure of Invention
The embodiment of the invention aims to provide an image obtaining method, an image obtaining device, electronic equipment and a storage medium, so as to synchronously obtain images of different scenes. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides an image obtaining method, which is applied to an electronic device, where the electronic device is configured with a front camera and a rear camera, and the method includes:
receiving an image acquisition instruction;
based on the image acquisition instruction, synchronously calling a front camera interface and a rear camera interface of the electronic equipment, and synchronously starting the front camera and the rear camera to acquire images;
displaying a first image acquired by the front camera in a first area of a screen of the electronic equipment, and displaying a second image acquired by the rear camera in a second area of the screen;
and when the image synthesis condition is met, synthesizing the first image and the second image according to a synthesized image layout determined by the first area and the second area to obtain a synthesized image.
In a second aspect, an embodiment of the present invention further provides an image obtaining apparatus, which is applied to an electronic device, where the electronic device is configured with a front camera and a rear camera, and the apparatus includes:
the receiving unit is used for receiving an image acquisition instruction;
the starting unit is used for synchronously starting the front camera and the rear camera to carry out image acquisition by synchronously calling a front camera interface and a rear camera interface of the electronic equipment based on the image acquisition instruction;
the display unit is used for displaying a first image acquired by the front camera in a first area of a screen of the electronic equipment and displaying a second image acquired by the rear camera in a second area of the screen;
and a synthesizing unit configured to synthesize the first image and the second image according to a synthesized image layout determined by the first region and the second region to obtain a synthesized image when an image synthesis condition is satisfied.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the steps of the image obtaining method according to the first aspect when executing the program stored in the memory.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the image obtaining method according to the first aspect.
The embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, the electronic equipment synchronously starts the front camera and the rear camera to acquire images by synchronously calling the front camera interface and the rear camera interface, and synthesizes a first image acquired by the front camera and a second image acquired by the rear camera to obtain a synthesized image. Because the front camera and the rear camera are in different directions, when the scheme provided by the embodiment of the invention is applied to obtain the images, the images of different scenes can be synchronously obtained without rotating the electronic equipment by a user, so that the process of synchronously obtaining the images of different scenes is simplified, the probability of manual operation of the user is reduced, and the efficiency of obtaining the images is improved.
Moreover, the first image collected by the front camera and the second image collected by the rear camera are synthesized, so that images synchronously reflecting different scenes are obtained, automatic obtaining of the images aiming at the different scenes is realized, synthesized images of the different scenes are obtained without manual synthesis in the later period, and the efficiency of obtaining the images is further improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by referring to these drawings.
Fig. 1 is a schematic flowchart of a first image obtaining method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a screen display of an electronic device according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a second image obtaining method according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a composite image template according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating a first synchronous display of images of different scenes according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating a second synchronous display of images of different scenes according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a third method for synchronously displaying images of different scenes according to an embodiment of the present invention;
FIG. 8 is a flowchart illustrating a third image obtaining method according to an embodiment of the present invention;
FIG. 9 is a flowchart illustrating a fourth image obtaining method according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an image obtaining apparatus according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention are within the scope of the present invention.
An embodiment of the present invention provides a flowchart of a first image obtaining method, which is applied to an electronic device, where the electronic device is configured with a front camera and a rear camera, and as shown in fig. 1, the method includes the following steps:
and S101, receiving an image acquisition instruction.
And S102, based on the image acquisition instruction, synchronously calling a front camera interface and a rear camera interface of the electronic equipment, and synchronously starting the front camera and the rear camera to acquire images.
S103, displaying a first image acquired by the front camera in a first area of a screen of the electronic equipment, and displaying a second image acquired by the rear camera in a second area of the screen.
And S104, when the image synthesis condition is met, synthesizing the first image and the second image according to the synthetic image layout determined by the first area and the second area to obtain a synthetic image.
The electronic device in the embodiment of the present invention may include a mobile terminal, such as a mobile phone, a tablet computer, a notebook computer, a palm computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a vehicle-mounted device, a wearable device, an intelligent bracelet, a pedometer, and the like, and an electronic device, such as a Digital TV, a desktop computer, and the like, which may perform human-computer interaction; the front camera of the electronic device may include one or more cameras, and the rear camera may also include one or more cameras, which is not limited herein.
In step S101, the manner in which the electronic device receives the image capturing instruction may include, but is not limited to, the user sending the image capturing instruction to the electronic device by means of a click operation, a gesture operation, or fingerprint recognition. That is to say, the electronic device is triggered to generate an image acquisition instruction through the operation of the user, and since the electronic device is installed with image acquisition software, the image acquisition software can be started based on the image acquisition instruction, and the image acquisition software calls a camera of the electronic device to acquire an image after being started.
In step S102, after the electronic device acquires the image acquisition instruction, the electronic device responds to the image acquisition instruction, and synchronously calls the front camera interface and the rear camera interface of the electronic device, and starts the front camera and the rear camera to acquire images by calling the interfaces.
After the front camera and the rear camera are started to acquire images, the two cameras can continuously acquire the images under the condition that the front camera and the rear camera are not closed.
In step S103, in practical application, the electronic device displays the first image captured by the front camera in a first area of a screen of the electronic device, and displays the second image captured by the rear camera in a second area of the screen, that is, the screen of the electronic device can simultaneously display the images captured by the front camera and the rear camera.
Here, as shown in fig. 2, fig. 2 is a schematic screen display diagram of an electronic device according to an embodiment of the present invention; the electronic device 200 displays a first image (e.g., a self-portrait image of a user) captured by the front camera in a first area 210 of the screen of the electronic device, and displays a second image (e.g., a surrounding scene image) captured by the rear camera in a second area 220 of the screen, in other words, images of two different scenes, a front camera side scene and a rear camera side scene, are simultaneously displayed in the screen of the electronic device 200.
Specifically, the first area and the second area may be display areas without overlapping portions in a screen of the electronic device, or may be two display areas with overlapping portions, which is not limited herein.
In step S104, the image synthesis conditions are different depending on the specific application scene, and the image synthesis conditions will be described below for different application scenes.
In a scene where a single image is captured, the image synthesis conditions may be: when a user clicks a shooting key in a screen of the electronic equipment, the electronic equipment synthesizes the first image and the second image after responding to the operation of the shooting key to obtain a synthesized image, namely, the images of different scenes acquired by the front camera and the rear camera are synthesized into one image.
In a scene where a short video is captured, the image synthesis condition may be: the user clicks a shooting ending key in a screen of the electronic equipment, releases a long-time shooting pressing key or clicks a sending key and the like; and after responding to the operation of the key, the electronic equipment synthesizes the first image and the second image to obtain a synthesized image, namely, the images of different scenes acquired by the front camera and the rear camera are synthesized into one image.
In a scene where a user performs live video through an electronic device, the image synthesis conditions may be: the user clicks a start live button in the screen of the electronic device. After a live broadcast user clicks a live broadcast starting key, after the electronic equipment responds to the operation of the live broadcast starting key, the electronic equipment acquires a first image of a surrounding scene through a front-facing camera and acquires a second image of an image picture of the current live broadcast user through a rear-facing camera, then the electronic equipment synthesizes the first image and the second image to obtain a synthesized image of the surrounding scene image and the image picture of the user, which are displayed in the same image, and sends the multi-frame synthesized image to a live broadcast server, and the live broadcast server distributes the multi-frame synthesized image to each live broadcast client; therefore, under the video live broadcast scene, the image picture of the user information is inserted while the surrounding scene is live broadcast, and richer live broadcast display effect can be generated in the live broadcast client.
In the present embodiment, the aforementioned composite image layout may be determined in accordance with the size of the first region in the screen, the size of the second region in the screen, the relative positional relationship between the first region and the second region, and the like. The layout of the composite image determined by the first area and the second area includes, but is not limited to, determining the layout form of the composite image by the combination form of the first area and the second area; for example, the first region and the second region are two rectangular regions adjacent to each other left and right, and the layout of the composite image is a layout form in which the first image and the second image are displayed adjacent to each other left and right; the first area and the second area are two rectangular areas which are adjacent up and down, so that the layout of the composite image is a layout form of the first image and the second image which are adjacent up and down; the first area and the second area are two areas which are overlapped with each other and have different sizes, so that the layout of the composite image is a layout form in which the first image and the second image are overlapped with each other and displayed.
Here, the first region and the second region are two rectangular regions adjacent to each other right and left, for example, as shown in fig. 2, if the first region 210 and the second region 220 are two rectangular regions adjacent to each other right and left, the layout of the synthesized image is a layout form in which the first image and the second image are displayed adjacent to each other right and left, that is, the layout form of the synthesized image is the same as the layout form of both the first region 210 and the second region 220.
Steps S103 and S104 are explained below by way of a specific example with reference to fig. 2.
For example, if the front camera captures a first image on the front camera side with a resolution of 1920 × 1080 and the rear camera captures a second image on the rear camera side with a resolution of 800 × 600, the two types of cameras can continue to capture images without turning off the front camera and the rear camera, and the first image and the second image are captured and stored in the buffer of the electronic device 200 shown in fig. 2. It is assumed that the resolution of the synthesized image is 1920 × 1080, and the first region and the second region are laterally distributed in the screen of the electronic device 200, and are half regions in the screen respectively. In view of the above, when displaying images in the first area and the second area, the first image is read from the buffer storing the first image, the first image is displayed in the first area 210 based on the display principle, the second image is read from the buffer storing the second image, and the second image is displayed in the second area 220 based on the display principle. When the image synthesis condition is satisfied, for example, after the user clicks a shooting button in the electronic device 200, the resolution of the first image is reduced and half 960 × 540 of the synthesized image is adjusted, and the resolution of the second image is scaled and adjusted to half 960 × 540 of the synthesized image. The synthesized image layout determined by the first region 210 and the second region 220 is such that the two regions respectively occupy the left half and the right half of the screen of the electronic device 200, and at this time, the adjusted first image and the adjusted second image are image-synthesized with the adjusted first image being located on the left half of the synthesized image and the adjusted second image being located on the right half of the synthesized image, so as to obtain a synthesized image with a resolution of 1920 × 1080, and the synthesized image can be stored in the memory of the electronic device 200.
As can be seen from the above, when the scheme provided by the embodiment of the present invention is applied to obtain a composite image, the electronic device synchronously invokes the front camera interface and the rear camera interface to synchronously start the front camera and the rear camera to perform image acquisition, and synthesizes a first image acquired by the front camera and a second image acquired by the rear camera to obtain the composite image. Because the front camera and the rear camera are in different directions, when the scheme provided by the embodiment of the invention is applied to obtain the images, the images of different scenes can be synchronously obtained without rotating the electronic equipment by a user, so that the process of synchronously obtaining the images of different scenes is simplified, the probability of manual operation of the user is reduced, and the efficiency of obtaining the images is improved.
Moreover, the first image collected by the front camera and the second image collected by the rear camera are synthesized, so that images synchronously reflecting different scenes are obtained, automatic obtaining of the images aiming at the different scenes is realized, synthesized images of the different scenes are obtained without manual synthesis in the later period, and the efficiency of obtaining the images is further improved.
In one embodiment, referring to fig. 3, a flow diagram of a second image acquisition method is provided, the method comprising the steps of:
s301, receiving an image acquisition instruction.
S302, based on the image acquisition instruction, the front camera and the rear camera are synchronously started for image acquisition by synchronously calling the front camera interface and the rear camera interface of the electronic equipment.
S303, in response to a selection operation of the target composite image template in the electronic device, displaying the target composite image template in a screen of the electronic device.
The composite image template may be a layer mask, where the layer mask is a layer displayed on a screen of an electronic device, the composite image template may include an image display region capable of displaying an image acquired by a camera of the electronic device, and an additional display resource region, where the image display region is a transparent region in the composite image template, and the additional display resource region is an opaque region or a region with a certain transparency, and in the additional display resource region, different additional display resources including, but not limited to, text, dynamic icons, or dynamic expressions may be displayed.
In order to make the display effect of the composite image more abundant and diversified, in the scheme provided by this embodiment, different images acquired by the front camera and the rear camera of the electronic device are integrated into the image display area in the composite image template in subsequent steps, so that different additional display resources can be displayed when different images acquired by the front camera and the rear camera are simultaneously displayed.
In particular, the electronic device may provide a template set that includes a plurality of composite image templates. In response to a selection operation of a target composite image template in the electronic device, the target composite image template is displayed on the screen of the electronic device, that is, a user may select one of a plurality of composite image templates included in the template set as the target composite image template, and the electronic device may display the target composite image template selected by the user on the screen of the electronic device after responding to the selection operation. At this time, the target composite image template displayed on the screen of the electronic device does not include the images acquired by the front camera and the rear camera.
As shown in fig. 4, fig. 4 is a schematic diagram of a synthesized image template according to an embodiment of the present invention, a synthesized image template 410, a synthesized image template 420, a synthesized image template 430, a synthesized image template 440, and a synthesized image template 450 are displayed in a synthesized image template dialog box 400, wherein two display areas of the synthesized image template 410 are in a vertically adjacent symmetric form, two display areas of the synthesized image template 420 and the synthesized image template 450 are in an overlapped form, one display area of the synthesized image template 420 is in a circular form, one display area of the synthesized image template 450 is in a rectangular form, and different display areas of the synthesized image template 430 and the synthesized image template 440 are in a vertically asymmetric form. The user can select any template from the 5 kinds of composite image templates as a target composite image template, and after the electronic device responds to the selection operation, the template can be displayed in a screen of the electronic device. For example, the user may select the composite image template 420 as the target composite image template, and the electronic device may display the composite image template 420 on the screen of the electronic device in response to the selection operation.
S304, displaying the first image acquired by the front camera in a first target area corresponding to one image display area of the target composite image template in the screen, and displaying the second image acquired by the rear camera in a second target area corresponding to the other image display area of the target composite image template in the screen.
Specifically, since the position of each image display region in the target composite image template is usually determined, when the target composite image template is displayed on the screen of the electronic device, the position of the target region corresponding to each image display region in the target composite image template is also determined.
For example, if the target synthesized image template is the synthesized image template 410 in fig. 4, in which one image display region is located on the upper half side of the template and the other image display region is located on the lower half side of the template, when the synthesized image template 410 is displayed on the screen of the electronic device, the target region corresponding to the one image display region is located on the upper half side of the screen of the electronic device, and the target region corresponding to the other image display region is located on the lower half side of the screen of the electronic device.
There are many cases where the first image and the second image are displayed in the first target area and the second target area, respectively.
In one case, image display regions corresponding to images captured by different cameras in the composite image template may be set in advance, for example, when the target composite image template is the composite image template 410, it is specified that an image captured by a front camera corresponds to an upper half image display region, and an image captured by a rear camera corresponds to a lower half image display region, and when the first image and the second image are displayed on the screen of the electronic device, the first image may be displayed on the upper half region of the screen, which is the first target region, and the second image may be displayed on the lower half region of the screen, which is the second target region, according to a preset correspondence relationship.
In another case, the first image and the second image may be randomly displayed in a target area corresponding to two image display areas of the target composite image template in the screen. For example, when the target synthesized image template is the synthesized image template 410, the first image may be displayed in the upper half area of the screen, and the second image may be displayed in the lower half area of the screen, in which case, the upper half area of the screen is the first target area, and the lower half area of the screen is the second target area; the first image can be displayed in the lower half area of the screen, and the second image can be displayed in the upper half area of the screen, wherein the lower half area of the screen is the first target area, and the upper half area of the screen is the second target area.
In still another case, the user may designate regions corresponding to the image display regions of the target composite image template displayed on the screen as the first target region and the second target region. For example, when the target synthesized image template is the synthesized image template 410, the user may designate the upper half area of the screen as the first target area in which the first image is displayed, and the user may also designate the upper half area of the screen as the first target area in which the first image is displayed.
In addition, after the first image and the second image are respectively displayed in the first target area and the second target area of the screen, the user can also adjust the target areas where the first image and the second image are located according to the self requirement. For example, when the target composite image template is the composite image template 410, the first image is displayed in the upper half area of the screen and the second image is displayed in the lower half area of the screen, and in this case, the user can change the positions where the first image and the second image are displayed, display the first image in the lower half area of the screen and display the second image in the upper half area of the screen according to his or her needs.
In this embodiment, the first target area and the second target area may be image display areas without an overlapping portion in a screen of the electronic device, or may be two image display areas with an overlapping portion, which is not limited herein.
When the first target area and the second target area are image display areas having no overlapping portion, the first image is read from the buffer storing the first image when the first target area and the second target area display images, the first image is displayed in the first target area based on a display principle, the second image is read from the buffer storing the second image, and the second image is displayed in the second target area based on the display principle.
In a case where the first target area and the second target area are two image display areas having an overlapping portion, the first target area and the second target area may be displayed on different layers, for example, a layer on which an image displayed by the first target area is located is on a layer on which an image displayed by the second target area is located, or a layer on which an image displayed by the second target area is located is on a layer on which an image displayed by the first target area is located. Similarly, the first image and the second image may be displayed in the first target area and the second target area, respectively, based on the display principle, which is not described herein again.
It should be noted that, because the image layers where the first image and the second image are located are different, the adjusted first image may cover the partial area of the adjusted second image, or the adjusted second image may cover the partial area of the adjusted first image.
Alternatively, as shown in fig. 5, when the target composite image template 510 selected by the user is in a left-right layout format, the target composite image template 510 is displayed on the screen of the electronic device 500, the first image captured by the front camera is displayed in a first target area 511 corresponding to one image display area of the target composite image template 510 on the screen, and the second image captured by the rear camera is displayed in a second target area 512 corresponding to the other image display area of the target composite image template 510 on the screen.
Alternatively, as shown in fig. 6, when the target composite image template 610 selected by the user is in a top-bottom layout form, the target composite image template 610 is displayed in the screen of the electronic device 600, the first image captured by the front camera is displayed in a first target area 611 corresponding to one image display area of the target composite image template 610 in the screen, and the second image captured by the rear camera is displayed in a second target area 612 corresponding to another image display area of the target composite image template 610 in the screen.
Alternatively, as shown in fig. 7, when there is an overlapping portion between two image display areas in the target composite image template 710 selected by the user, the target composite image template 710 is displayed on the screen of the electronic device 700, the first image acquired by the front camera is displayed in a first target area 711 corresponding to the target composite image template 710 on the screen, and the second image acquired by the rear camera is displayed in a second target area 712 corresponding to the target composite image template 710 on the screen.
S305, when the image synthesis condition is met, synthesizing the target synthesized image template, the first image and the second image according to the synthesized image layout corresponding to the target synthesized image template to obtain a synthesized image.
As can be seen from the above, when the composite image is obtained by applying the scheme provided by the embodiment of the present invention, the electronic device may respond to the selection operation of the target composite image template and display the target composite image template in the screen, where the first image is displayed in the first target region corresponding to one image display region of the target composite image template in the screen, and the second image is displayed in the second target region corresponding to the other image display region of the target composite image template in the screen, so that the user does not need to manually divide the display regions of the first image and the second image in the screen, and the efficiency of image display is improved. And the electronic equipment can provide various different composite image templates, and a user can select different composite image templates as target composite image templates according to own preference, so that the interest of obtaining composite images is enhanced, and the styles of the obtained composite images are enriched.
In one embodiment, referring to fig. 8, a flow diagram of a third image acquisition method is provided, the method comprising the steps of:
s801, receiving an image acquisition instruction.
S802, based on the image acquisition instruction, the front camera and the rear camera are synchronously started to acquire images by synchronously calling the front camera interface and the rear camera interface of the electronic equipment.
S803, in response to a selection operation of the target composite image template in the electronic device, displaying the target composite image template in a screen of the electronic device.
S804, the first image acquired by the front camera is displayed in a first target area corresponding to one image display area of the target composite image template in the screen, and the second image acquired by the rear camera is displayed in a second target area corresponding to the other image display area of the target composite image template in the screen.
And S805, when the image synthesis condition is met, performing image processing on the first image according to the area parameter of the image display area and the image parameter of the synthesized image to obtain a third image.
The area parameter of the one image display area may include, but is not limited to, a size, a dimension, and the like of the image display area in the target synthesized image template, and the image parameter of the synthesized image may include, but is not limited to, a dimension, and the like of the synthesized image.
Specifically, the corresponding region parameter of the region corresponding to the first image in the synthesized image may be determined according to the region parameter of one image display region and the image parameter of the synthesized image.
When the size of the target composite image template is equal to the size of the synthesized image, the area parameter of the image display area is the same as the corresponding area parameter.
In a case where the size of the target composite image template does not coincide with the size of the synthesized image, a proportional relationship between the size of the target composite image template and the size of the synthesized image may be obtained, and the corresponding region parameter may be determined based on the proportional relationship, based on the region parameter of the image display region and the image parameter of the synthesized image.
For example, if the size of the target composite image template is 960 × 540, the size of the synthesized image is 1920 × 1080, and the size of the image display area is 480 × 540, it may be determined that the ratio between the size of the target composite image template and the size of the synthesized image is 1:2, and the size of the area corresponding to the first image in the synthesized image is 960 × 1080.
After the corresponding region parameter is determined, the first image may be subjected to image processing based on the corresponding region parameter and the image parameter of the first image, so as to obtain a third image with the image parameter corresponding to the corresponding region parameter.
Specifically, in one implementation, the first image may be subjected to image scaling processing, so as to obtain the third image. For example, if the size of the region corresponding to the first image in the synthesized image is 960 × 540 and the size of the first image is 1920 × 1080, the first image may be down-sampled to reduce the size of the first image to 960 × 540, and the reduced size first image is the third image.
In another implementation manner, image cropping processing may be performed on the first image, and the cropped first image is used as the third image.
And S806, performing image processing on the second image according to the area parameter and the image parameter of the other image display area to obtain a fourth image.
This step is similar to step S805 described above and will not be described in detail here.
S807, the target composite image template, the third image, and the fourth image are composited according to the positions of the one image display region and the other image display region in the target composite image template to obtain a composite image.
Specifically, the position of the image display region in the target composite image template is generally the same as the position of the region corresponding to the image display region in the composite image. For example, if one image display region is located on the upper half side of the target synthesis template, the region corresponding to the image display region is also located on the upper half side of the synthesis image in the synthesis image.
Based on this, the region in which the third image is displayed in the synthesized image can be determined in accordance with the position of the above-described one image display region in the target synthesized image template, and similarly, the region in which the fourth image is displayed in the synthesized image can be determined.
Therefore, the target composite image template, the third image and the fourth image are synthesized according to the positions of the third image and the fourth image in the composite image, and a composite image can be obtained.
Specifically, when the size of the target composite image template is the same as the size of the composite image, the target composite image template, the third image, and the fourth image may be directly synthesized, the third image may be displayed in the one image display area of the target composite image template, the fourth image may be displayed in the other image display area, and the combined target composite image template may be obtained as the composite image.
In the case that the size of the target composite image template is not the same as the size of the composite image, the size of the target composite image template may be first adjusted to the size of the composite image, and the target composite image template, the third image and the fourth image may be synthesized according to the positions of the third image and the fourth image in the composite image, so as to obtain the composite image.
In an embodiment, as shown in fig. 5, the one image display region and the other image display region are adjacent to each other in the target composite image template 510, and after the target composite image template 510, the third image with the size of 800 × 450 and the fourth image with the size of 800 × 450 are combined, a composite image with the size of 1600 × 900 may be obtained.
In an embodiment, as shown in fig. 7, the one image display area and the other image display area are two overlapped areas in the target composite image template 710, assuming that the screen resolution of the electronic device 700 is 1920 × 1080, the size of the target composite image template 510 is 1600 × 900, the image size of the synthesized image is also 1600 × 900, the one image display area of the target composite image template 510 is a circular area with a diameter of 1 inch, the circular area is a transparent area, and the size of the other image display area is 1600 × 900, where the image display area 712 and the target composite image template 510 have the same size.
Assuming that the front camera captures a first image with a size of 1920 x 1080 on the front camera side, the first image is resized to a circular image with a diameter of 1 inch, resulting in a third image. The rear camera acquires a second image with the size of 1920 × 1080 on one side of the rear camera, and the size of the second image is adjusted to 1600 × 900, so that a fourth image with the size of 800 × 450 is obtained.
In this embodiment, the layer where the target synthetic image template 710 is located is the lowest layer in the screen of the electronic device 700, an image display area and the target synthetic image template 710 have the same size, and the layer where the fourth image displayed in the image display area is located completely covers the layer where the target synthetic image template 710 is located; and the layer where the third image displayed in the other image display area is located is positioned on the layer where the image display area corresponding to the fourth image is located. The target composite image template 710, the third image and the fourth image are composited according to the positions of the one image display region and the other image display region in the target composite image template 710, so as to obtain a composite image with the size of 1600 × 900.
As can be seen from the above, when the composite image is obtained by applying the scheme provided by the embodiment of the present invention, the first image is subjected to image processing according to the area parameter of the one image display area and the image parameter of the synthesized image, so that a third image having the same size as the area for displaying the first image content in the composite image can be obtained, and similarly, a fourth image having the same size as the area for displaying the second image content in the composite image can be obtained, and the target composite image template, the third image and the fourth image are synthesized according to the positions of the two image display areas in the target composite image template, so that the composite image having the same image screen as the image displayed on the screen of the electronic device can be accurately obtained.
In one or more embodiments, the step S106 is a step of displaying a first image captured by the front camera in a first area of a screen of the electronic device, and displaying a second image captured by the rear camera in a second area of the screen, and includes:
identifying a target object in the second image, and performing background filling on an area where the target object is located according to background information to obtain a fifth image; and displaying the first image acquired by the front camera in a first area of a screen of the electronic equipment, and displaying the fifth image in a second area of the screen.
Wherein, the background information is: and the area of the second image except the area where the target object is located.
The target object may be a human, an animal, a building, or the like. In the case where the target object is a person, the target object is a person other than the user and the person the user desires to photograph.
The method for identifying the target object may include, but is not limited to, identifying the object in a second image acquired by a rear camera of the electronic device through an object identification model, deleting image information of the object in the second image after the electronic device identifies the object, filling an area corresponding to the object with image information of an area except for the area where the object is located in the second image, and obtaining a scene image not including the object, that is, a fifth image.
In an embodiment, after the image information of the identified target object in the second image is deleted, image filling may be performed on the area where the target object is located according to the spatial correlation between the image elements in the second image, so as to obtain a scene image that does not include the target object, that is, a fifth image.
Therefore, when the scheme provided by the embodiment of the invention is applied to obtain the composite image, the background filling can be carried out on the area where the target object is located according to the background information, so that the image information of the target object in the composite image can be removed, the obtained composite image is more neat and beautiful, and the user experience is improved.
In one or more embodiments, when the image synthesis condition is satisfied, before synthesizing the first image and the second image according to the synthesized image layout determined by the first region and the second region to obtain the synthesized image, the image obtaining method further includes at least one of:
and responding to a first parameter adjusting instruction of the first area, and adjusting the first area according to the parameter indicated by the first parameter adjusting instruction.
And responding to a second parameter adjusting instruction of the second area, and adjusting the second area according to the parameter indicated by the second parameter adjusting instruction.
In this embodiment, the first parameter adjustment instruction and the second parameter adjustment instruction may include, but are not limited to, an area adjustment instruction triggered by a gesture operation of a user on the electronic device, or the first parameter adjustment instruction and the second parameter adjustment instruction may also be used for selecting a corresponding size by clicking a size adjustment key on a screen of the electronic device for the user, so as to further adjust the size of the first area and/or the second area.
For example, in an embodiment, a user may touch a first area and/or a second area in the electronic screen by a finger, and based on a stretching or shrinking gesture of the user's finger in the screen of the electronic device, the electronic device adjusts the area size of the first area and/or the second area according to the gesture.
In another embodiment, a virtual sliding rod for adjusting the area is arranged in the screen of the electronic device, the user can manually move the virtual sliding rod, and based on the selected scale of the virtual sliding rod selected by the user, the electronic device adjusts the first area and/or the second area to the area size matched with the selected scale according to the selected scale.
As can be seen from the above, when the composite image is obtained by applying the scheme provided by the embodiment of the present invention, the first area may be adjusted according to the parameter indicated by the first parameter adjustment instruction, and the second area may be adjusted according to the parameter indicated by the second parameter adjustment instruction, so that the first area and the second area may be changed, the layout of the composite image determined by the first area and the second area may also be changed, and the image content presented by the finally obtained composite image may be changed. Therefore, by applying the scheme provided by the embodiment of the invention, the composite images in different combination forms can be flexibly and variously provided for the user, the scene image can be displayed in a personalized manner according to the user requirement, and the user experience is improved.
In one or more embodiments, in step S104, when the image synthesis condition is satisfied, before synthesizing the first image and the second image according to the synthesized image layout determined by the first region and the second region to obtain the synthesized image, the image obtaining method further includes at least one of:
and responding to a first focal length adjusting instruction of the front camera, and adjusting the first image according to the parameter indicated by the first focal length adjusting instruction.
And responding to a second focal length adjusting instruction of the rear camera, and adjusting the second image according to the parameters indicated by the second focal length adjusting instruction.
In this embodiment, the first focal length adjustment instruction and the second focal length adjustment instruction may include, but are not limited to, adjusting the focal length of the front camera and/or the focal length of the rear camera by a gesture operation of a user or by a way that the user clicks a focal length adjustment key of a screen of the electronic device, and adjusting the range size of the middle scene of the first image and/or the second image to obtain images in different scene ranges.
For example, in an embodiment, a user can touch the first area and/or the second area in the electronic screen through a finger, and based on a stretching or shrinking gesture of the user finger in the screen of the electronic device, the electronic device adjusts the focal length of the front camera and/or the rear camera according to the gesture.
In another embodiment, a focus-adjusted virtual slide bar is arranged in a screen of the electronic device, and a user can manually move the virtual slide bar, and based on a selected focus of the virtual slide bar selected by the user, the electronic device adjusts the front camera and/or the rear camera to a focus matched with the selected focus according to the selected focus, so as to acquire the first image and/or the second image of different scene ranges.
As can be seen from the above, when the composite image is obtained by applying the scheme provided by the embodiment of the present invention, the first image may be adjusted according to the parameter indicated by the first focal length adjustment instruction, and the second image may be adjusted according to the parameter indicated by the second focal length adjustment instruction, so that the image contents displayed by the first image and the second image may be changed, so that after the adjusted first image and second image are synthesized, different composite images may be obtained, composite images in different scene ranges are provided for a user, a scene image may be displayed in a personalized manner according to the user's needs, and user experience may be improved.
In one or more embodiments, after obtaining the composite image in step S104, the method further includes:
and acquiring a plurality of frames of the synthesized images synthesized in a preset time period.
And generating a target composite video including a plurality of frames of the composite images based on the composite sequence of each frame of the composite images.
The preset time period may be from 6 to 7, from 7 to 8, or other time periods.
As will be understood by those skilled in the art, one synthesized image corresponds to one synthesis timing, which may be a timing at which the first image and the second image are synthesized. Therefore, a multi-frame synthesized image whose synthesis timing belongs to the above-described preset time period can be obtained.
The synthesis order of the synthetic images may be the order of synthesis times corresponding to the synthetic images. And generating a target composite video comprising a plurality of frames of the composite images based on the sequence.
In this embodiment, when a user needs to acquire a composite video that enables a front-facing camera and a rear-facing camera to record simultaneously, for example, the user may click a recording button on a screen or send a sound control instruction for recording the video to an electronic device, and then acquire, by the electronic device, a number of a plurality of frames of the composite images that are synthesized within a preset time period (for example, 10 seconds) as 250 frames, so that the electronic device may generate the composite video including the 250 frames of the composite images based on a synthesis sequence of the 250 frames of the composite images.
In the embodiment of the invention, the obtained multi-frame synthetic images are obtained according to the synthetic sequence of each frame of synthetic image to obtain the synthetic video, so that the scene live synchronously obtained by the front camera and the rear camera of the electronic equipment can be really presented, and the instant film of the current scene condition is completely recorded.
The current electronic equipment such as a smart phone and a tablet computer is generally provided with a front camera and a rear camera, wherein the front camera is used for collecting images of a user, and the rear camera is used for collecting images of scenery; because the smart phone forms images through the front camera and the rear camera separately, when a user wants to shoot a subject and an object together, a mode of synthesizing images of the subject and the object at a later stage is generally needed, but the mode cannot record the subject and the object at the same time to show a real scene.
In order to solve the above technical problem, based on the above embodiment, referring to fig. 9, an embodiment of the present invention further provides a flowchart of a fourth image obtaining method, where the method includes the following steps:
and S901, synchronously starting a front camera and a rear camera of the electronic equipment to record videos.
In this embodiment, for example, the user opens the image processing software, and after the image processing software is started, the image processing software synchronously calls the calling interface of the front camera and the calling interface of the rear camera, that is, opens the front camera and the rear camera to shoot the video.
And S902, according to the target synthetic image template selected by the user, sleeving the images collected by the front camera and the rear camera into the target synthetic image template, and clicking to record to start recording the video.
Here, as shown in fig. 4, the user may select a composite image template suitable for himself from the composite image template dialog 400 according to the scene requirement, and apply the images recorded by the front camera and the rear camera, that is, combine the composite image module selected by the user with the images obtained by the front camera and the rear camera. And starting to record the video after the user clicks a recording key of the electronic equipment.
And S903, sleeving the pictures recorded by the front camera and the rear camera into the target synthesized image template to be synthesized and stored into a film when the shooting is stopped.
When the user clicks a recording stop button of the electronic device, that is, after recording is completed, the electronic device synthesizes each frame of image obtained after front and back image pickup with the synthesized image module to obtain a synthesized real-time movie, and then the electronic device stores the movie in an album of the electronic device.
In the embodiment of the invention, when the user adopts live broadcast software to carry out live broadcast and selects the rear camera of the electronic equipment to carry out framing, by adopting the technical scheme, the expression of the user can be synchronously displayed in the live broadcast software, and richer live broadcast display content effect is generated.
In another scene, when a plurality of persons take a picture, the person cannot enter the picture of the shot image in normal conditions, and by adopting the technical scheme, the person taking the picture and the person to be shot can be displayed in the picture of the shot image at the same time.
When the scheme provided by the embodiment of the invention is applied to obtain the composite image, the front camera interface and the rear camera interface of the electronic equipment are synchronously called, the front camera and the rear camera are started to acquire the images, the first image acquired by the front camera and the second image acquired by the rear camera are synthesized to obtain the composite image, the orientation of the camera configured on the electronic equipment is not required to be changed by a user in a mode of rotating the electronic equipment to obtain the images of different scenes, the technical problems that the manual operation of the user is required to obtain the images of different scenes in the related technology, the process is complicated, and the efficiency is low can be solved, so that the images of different scenes can be synchronously obtained.
In addition, the first image acquired by the front camera and the second image acquired by the rear camera are synthesized, so that images of different scenes can be automatically synthesized, the synthesized images of different scenes can be obtained without a manual post synthesis mode, and the real scene real situation can be conveniently and quickly displayed.
The embodiment of the invention also provides an image obtaining device corresponding to the image obtaining method. An image obtaining apparatus according to an embodiment of the present invention is described below.
As shown in fig. 10, the image obtaining apparatus is applied to an electronic device equipped with a front camera and a rear camera, and includes:
a receiving unit 1001 configured to receive an image acquisition instruction;
the starting unit 1002 is configured to synchronously start a front camera and a rear camera of the electronic device for image acquisition by synchronously calling the front camera interface and the rear camera interface based on the image acquisition instruction;
the display unit 1003 is configured to display a first image acquired by the front camera in a first area of a screen of the electronic device, and display a second image acquired by the rear camera in a second area of the screen;
a synthesizing unit 1004 configured to synthesize the first image and the second image in accordance with a synthesized image layout determined by the first region and the second region to obtain a synthesized image when an image synthesis condition is satisfied.
As can be seen from the above, when the scheme provided by the embodiment of the present invention is applied to obtain a composite image, the electronic device synchronously invokes the front camera interface and the rear camera interface to synchronously start the front camera and the rear camera to perform image acquisition, and synthesizes a first image acquired by the front camera and a second image acquired by the rear camera to obtain the composite image. Because the front camera and the rear camera are in different directions, when the scheme provided by the embodiment of the invention is applied to obtain the images, the images of different scenes can be synchronously obtained without rotating the electronic equipment by a user, so that the process of synchronously obtaining the images of different scenes is simplified, the probability of manual operation of the user is reduced, and the efficiency of obtaining the images is improved.
Moreover, the first image collected by the front camera and the second image collected by the rear camera are synthesized, so that images synchronously reflecting different scenes are obtained, automatic obtaining of the images aiming at the different scenes is realized, synthesized images of the different scenes are obtained without manual synthesis in the later period, and the efficiency of obtaining the images is further improved.
In one or more embodiments, the above image obtaining apparatus further includes:
a response unit configured to display a target composite image template in a screen of the electronic device in response to a selection operation of the target composite image template in the electronic device;
the display unit 1003 is specifically configured to:
displaying a first image acquired by the front camera in a first target area corresponding to one image display area of the target composite image template in the screen, and displaying a second image acquired by the rear camera in a second target area corresponding to the other image display area of the target composite image template in the screen;
the synthesis unit 1004 is specifically configured to:
and when the image synthesis condition is met, synthesizing the target synthesized image template, the first image and the second image according to the synthesized image layout corresponding to the target synthesized image template to obtain a synthesized image.
As can be seen from the above, when the composite image is obtained by applying the scheme provided by the embodiment of the present invention, the electronic device may respond to the selection operation of the target composite image template and display the target composite image template in the screen, where the first image is displayed in the first target region corresponding to one image display region of the target composite image template in the screen, and the second image is displayed in the second target region corresponding to the other image display region of the target composite image template in the screen, so that the user does not need to manually divide the display regions of the first image and the second image in the screen, and the efficiency of image display is improved. And the electronic equipment can provide various different composite image templates, and a user can select different composite image templates as target composite image templates according to own preference, so that the interest of obtaining composite images is enhanced, and the styles of the obtained composite images are enriched.
In one or more embodiments, the synthesis unit 1004 is specifically configured to:
when the image synthesis condition is met, performing image processing on the first image according to the area parameter of the image display area and the image parameter of the synthesized image to obtain a third image;
according to the area parameter of the other image display area and the image parameter, performing image processing on the second image to obtain a fourth image;
and synthesizing the target synthesized image template, the third image and the fourth image according to the positions of the image display area and the other image display area in the target synthesized image template to obtain the synthesized image.
As can be seen from the above, when the composite image is obtained by applying the scheme provided by the embodiment of the present invention, the first image is subjected to image processing according to the area parameter of the one image display area and the image parameter of the synthesized image, so that a third image having the same size as the area for displaying the first image content in the composite image can be obtained, and similarly, a fourth image having the same size as the area for displaying the second image content in the composite image can be obtained, and the target composite image template, the third image and the fourth image are synthesized according to the positions of the two image display areas in the target composite image template, so that the composite image having the same image screen as the image displayed on the screen of the electronic device can be accurately obtained.
In one or more embodiments, the display unit 1003 is specifically configured to:
identifying a target object in the second image, and performing background filling on an area where the target object is located according to background information to obtain a fifth image, wherein the background information is as follows: the area of the second image except the area where the target object is located;
and displaying the first image acquired by the front camera in a first area of a screen of the electronic equipment, and displaying the fifth image in a second area of the screen.
Therefore, when the scheme provided by the embodiment of the invention is applied to obtain the composite image, the background filling can be carried out on the area where the target object is located according to the background information, so that the image information of the target object in the composite image can be removed, the obtained composite image is more neat and beautiful, and the user experience is improved.
In one or more embodiments, the above image obtaining apparatus further includes at least one of:
a first adjusting unit, configured to respond to a first parameter adjusting instruction of the first area, and adjust the first area according to a parameter indicated by the first parameter adjusting instruction;
and the second adjusting unit is used for responding to a second parameter adjusting instruction of the second area and adjusting the second area according to the parameter indicated by the second parameter adjusting instruction.
As can be seen from the above, when the composite image is obtained by applying the scheme provided by the embodiment of the present invention, the first area may be adjusted according to the parameter indicated by the first parameter adjustment instruction, and the second area may be adjusted according to the parameter indicated by the second parameter adjustment instruction, so that the first area and the second area may be changed, the layout of the composite image determined by the first area and the second area may also be changed, and the image content presented by the finally obtained composite image may be changed. Therefore, by applying the scheme provided by the embodiment of the invention, the composite images in different combination forms can be flexibly and variously provided for the user, the scene image can be displayed in a personalized manner according to the user requirement, and the user experience is improved.
In one or more embodiments, the above image obtaining apparatus further includes at least one of:
the third adjusting unit is used for responding to a first focal length adjusting instruction of the front camera and adjusting the first image according to the parameter indicated by the first focal length adjusting instruction;
and the fourth adjusting unit is used for responding to a second focal length adjusting instruction of the rear camera and adjusting the second image according to the parameter adjustment indicated by the second focal length adjusting instruction.
As can be seen from the above, when the composite image is obtained by applying the scheme provided by the embodiment of the present invention, the first image may be adjusted according to the parameter indicated by the first focal length adjustment instruction, and the second image may be adjusted according to the parameter indicated by the second focal length adjustment instruction, so that the image contents displayed by the first image and the second image may be changed, so that after the adjusted first image and second image are synthesized, different composite images may be obtained, composite images in different scene ranges are provided for a user, a scene image may be displayed in a personalized manner according to the user's needs, and user experience may be improved.
In one or more embodiments, the above image obtaining apparatus further includes:
the acquisition unit is used for acquiring a plurality of frames of the synthesized images synthesized in a preset time period;
a generating unit configured to generate a target composite video including a plurality of frames of the composite images based on a composite order of the composite images for each frame.
As can be seen from the above, when the composite image is obtained by applying the scheme provided by the embodiment of the present invention, the composite video is obtained by using the obtained multiple frames of composite images according to the composite sequence of each frame of composite image, so that the scene situation synchronously obtained by the front camera and the rear camera of the electronic device can be truly presented, and the live video of the current scene situation is completely recorded.
An embodiment of the present invention further provides an electronic device, as shown in fig. 11, including a processor 1101, a communication interface 1102, a memory 1103 and a communication bus 1104, where the processor 1101, the communication interface 1102 and the memory 1103 complete mutual communication through the communication bus 1104,
a memory 1103 for storing a computer program;
the processor 1101 is configured to implement the following steps when executing the program stored in the memory 1103:
receiving an image acquisition instruction;
based on the image acquisition instruction, synchronously calling a front camera interface and a rear camera interface of the electronic equipment, and synchronously starting the front camera and the rear camera to acquire images;
displaying a first image acquired by the front camera in a first area of a screen of the electronic equipment, and displaying a second image acquired by the rear camera in a second area of the screen;
and when the image synthesis condition is met, synthesizing the first image and the second image according to a synthesized image layout determined by the first area and the second area to obtain a synthesized image.
Besides, the electronic device may also implement other image obtaining methods as described in the previous embodiment, and will not be described in detail here.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In still another embodiment provided by the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements any of the image obtaining methods in the above embodiments.
In a further embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the image acquisition methods of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the computer-readable storage medium, and the computer program product embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. An image obtaining method is applied to an electronic device, and the electronic device is provided with a front camera and a rear camera, and is characterized by comprising the following steps:
receiving an image acquisition instruction;
based on the image acquisition instruction, synchronously calling a front camera interface and a rear camera interface of the electronic equipment, and synchronously starting the front camera and the rear camera to acquire images;
displaying a first image acquired by the front camera in a first area of a screen of the electronic equipment, and displaying a second image acquired by the rear camera in a second area of the screen;
and when the image synthesis condition is met, synthesizing the first image and the second image according to a synthesized image layout determined by the first area and the second area to obtain a synthesized image.
2. The method of claim 1, wherein the first image captured by the front camera is displayed in a first area of a screen of the electronic device, and the second image captured by the rear camera is displayed in front of a second area of the screen, the method further comprising:
displaying a target composite image template in a screen of the electronic device in response to a selection operation of the target composite image template in the electronic device;
the displaying the first image acquired by the front camera in a first area of the screen of the electronic device and the displaying the second image acquired by the rear camera in a second area of the screen comprises:
displaying a first image acquired by the front camera in a first target area corresponding to one image display area of the target composite image template in the screen, and displaying a second image acquired by the rear camera in a second target area corresponding to the other image display area of the target composite image template in the screen;
when an image synthesis condition is satisfied, synthesizing the first image and the second image according to a synthesized image layout determined by the first region and the second region to obtain a synthesized image, including:
and when the image synthesis condition is met, synthesizing the target synthesized image template, the first image and the second image according to the synthesized image layout corresponding to the target synthesized image template to obtain a synthesized image.
3. The method of claim 2, wherein when the image synthesis condition is satisfied, synthesizing the target synthesized image template, the first image, and the second image according to the synthesized image layout corresponding to the target synthesized image template to obtain a synthesized image, comprises:
when the image synthesis condition is met, performing image processing on the first image according to the area parameter of the image display area and the image parameter of the synthesized image to obtain a third image;
according to the area parameter of the other image display area and the image parameter, performing image processing on the second image to obtain a fourth image;
and synthesizing the target synthesized image template, the third image and the fourth image according to the positions of the image display area and the other image display area in the target synthesized image template to obtain the synthesized image.
4. The method of claim 1, wherein displaying the first image captured by the front camera in a first area of a screen of the electronic device and the second image captured by the rear camera in a second area of the screen comprises:
identifying a target object in the second image, and performing background filling on an area where the target object is located according to background information to obtain a fifth image, wherein the background information is as follows: the area of the second image except the area where the target object is located;
and displaying the first image acquired by the front camera in a first area of a screen of the electronic equipment, and displaying the fifth image in a second area of the screen.
5. The method of any one of claims 1-3, further comprising at least one of:
responding to a first parameter adjusting instruction of the first area, and adjusting the first area according to a parameter indicated by the first parameter adjusting instruction;
and responding to a second parameter adjusting instruction of the second area, and adjusting the second area according to the parameter indicated by the second parameter adjusting instruction.
6. The method of any one of claims 1-3, further comprising at least one of:
responding to a first focal length adjusting instruction of the front camera, and adjusting the first image according to a parameter indicated by the first focal length adjusting instruction;
and responding to a second focal length adjusting instruction of the rear camera, and adjusting the second image according to the parameter adjustment indicated by the second focal length adjusting instruction.
7. The method of any of claims 1-3, wherein after obtaining the composite image, the method further comprises:
acquiring a plurality of frames of the synthesized image synthesized in a preset time period;
and generating a target composite video containing a plurality of frames of the composite images based on the composite sequence of each frame of the composite images.
8. An image obtaining apparatus applied to an electronic device provided with a front camera and a rear camera, the apparatus comprising:
the receiving unit is used for receiving an image acquisition instruction;
the starting unit is used for synchronously starting the front camera and the rear camera to carry out image acquisition by synchronously calling a front camera interface and a rear camera interface of the electronic equipment based on the image acquisition instruction;
the display unit is used for displaying a first image acquired by the front camera in a first area of a screen of the electronic equipment and displaying a second image acquired by the rear camera in a second area of the screen;
and a synthesizing unit configured to synthesize the first image and the second image according to a synthesized image layout determined by the first region and the second region to obtain a synthesized image when an image synthesis condition is satisfied.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 7 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN202111296423.9A 2021-11-03 2021-11-03 Image obtaining method and device, electronic equipment and storage medium Pending CN113873135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111296423.9A CN113873135A (en) 2021-11-03 2021-11-03 Image obtaining method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111296423.9A CN113873135A (en) 2021-11-03 2021-11-03 Image obtaining method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113873135A true CN113873135A (en) 2021-12-31

Family

ID=78986724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111296423.9A Pending CN113873135A (en) 2021-11-03 2021-11-03 Image obtaining method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113873135A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140192212A1 (en) * 2013-01-07 2014-07-10 Huawei Technologies Co., Ltd. Image Processing Method and Apparatus
JP2015080073A (en) * 2013-10-16 2015-04-23 株式会社デンソー Composite image generating apparatus
CN106027900A (en) * 2016-06-22 2016-10-12 维沃移动通信有限公司 Photographing method and mobile terminal
CN107231524A (en) * 2017-05-31 2017-10-03 珠海市魅族科技有限公司 Image pickup method and device, computer installation and computer-readable recording medium
CN107592459A (en) * 2017-09-22 2018-01-16 维沃移动通信有限公司 A kind of photographic method and mobile terminal
WO2019165938A1 (en) * 2018-03-02 2019-09-06 Oppo广东移动通信有限公司 Image collection method and apparatus, mobile terminal and storage medium
CN111182236A (en) * 2020-01-03 2020-05-19 惠州Tcl移动通信有限公司 Image synthesis method and device, storage medium and terminal equipment
US20210289263A1 (en) * 2019-06-10 2021-09-16 Hisense Visual Technology Co., Ltd. Data Transmission Method and Device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140192212A1 (en) * 2013-01-07 2014-07-10 Huawei Technologies Co., Ltd. Image Processing Method and Apparatus
JP2015080073A (en) * 2013-10-16 2015-04-23 株式会社デンソー Composite image generating apparatus
CN106027900A (en) * 2016-06-22 2016-10-12 维沃移动通信有限公司 Photographing method and mobile terminal
CN107231524A (en) * 2017-05-31 2017-10-03 珠海市魅族科技有限公司 Image pickup method and device, computer installation and computer-readable recording medium
CN107592459A (en) * 2017-09-22 2018-01-16 维沃移动通信有限公司 A kind of photographic method and mobile terminal
WO2019165938A1 (en) * 2018-03-02 2019-09-06 Oppo广东移动通信有限公司 Image collection method and apparatus, mobile terminal and storage medium
US20210289263A1 (en) * 2019-06-10 2021-09-16 Hisense Visual Technology Co., Ltd. Data Transmission Method and Device
CN111182236A (en) * 2020-01-03 2020-05-19 惠州Tcl移动通信有限公司 Image synthesis method and device, storage medium and terminal equipment

Similar Documents

Publication Publication Date Title
US8854491B2 (en) Metadata-assisted image filters
WO2017157272A1 (en) Information processing method and terminal
KR20140098009A (en) Method and system for creating a context based camera collage
CN111970532B (en) Video playing method, device and equipment
KR101528312B1 (en) Method for editing video and apparatus therefor
CN109218630B (en) Multimedia information processing method and device, terminal and storage medium
KR20110043612A (en) Image processing
CN113064684B (en) Virtual reality equipment and VR scene screen capturing method
WO2022161260A1 (en) Focusing method and apparatus, electronic device, and medium
CN114450969B (en) Video screen capturing method, terminal and computer readable storage medium
US20100118175A1 (en) Imaging Apparatus For Image Integration
JP7167244B2 (en) Occluded Image Detection Method, Apparatus, and Medium
US11211097B2 (en) Generating method and playing method of multimedia file, multimedia file generation apparatus and multimedia file playback apparatus
CN105516610A (en) Method and device for shooting local dynamic image
WO2023174223A1 (en) Video recording method and apparatus, and electronic device
CN114520877A (en) Video recording method and device and electronic equipment
CN102810048A (en) Display apparatus and method
CN113709545A (en) Video processing method and device, computer equipment and storage medium
CN112312190A (en) Video picture display method and device, electronic equipment and storage medium
CN109286760B (en) Entertainment video production method and terminal thereof
WO2023241377A1 (en) Video data processing method and device, equipment, system, and storage medium
WO2023174009A1 (en) Photographic processing method and apparatus based on virtual reality, and electronic device
CN113852757B (en) Video processing method, device, equipment and storage medium
CN113873135A (en) Image obtaining method and device, electronic equipment and storage medium
US20210377454A1 (en) Capturing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230818

Address after: 12 Dachenglian Road, Singapore # 04-01B (534233)

Applicant after: Bright Jupiter Private Ltd.

Address before: 120 Robinson Road # 13-01 Singapore

Applicant before: Lemei Technology Co.,Ltd.