WO2019047046A1 - Photographing method and user terminal - Google Patents
Photographing method and user terminal Download PDFInfo
- Publication number
- WO2019047046A1 WO2019047046A1 PCT/CN2017/100631 CN2017100631W WO2019047046A1 WO 2019047046 A1 WO2019047046 A1 WO 2019047046A1 CN 2017100631 W CN2017100631 W CN 2017100631W WO 2019047046 A1 WO2019047046 A1 WO 2019047046A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- photographic subject
- background image
- subject
- user terminal
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio 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/272—Means for inserting a foreground image in a background image, i.e. inlay, outlay
Definitions
- the present invention relates to the field of multimedia technologies, and in particular, to a photographing method and a user terminal.
- the configuration of cameras on electronic devices has become a standard in the industry, such as digital cameras, camcorders, mobile phones, tablet computers, etc. These user terminals equipped with cameras have become photographs for people to record life. Preferred.
- the shooting can be divided into photographing and photographing.
- the imaging effect of the photographing is mostly static image, and the imaging effect of the camera is mostly a dynamic image.
- the user terminal when taking a picture, when the user confirms the photo information, for example, after pressing the shooting button, the user terminal will condense the light onto the photosensitive device, and the photosensitive device converts the optical signal into an electrical signal to obtain a corresponding photo information.
- Electronic image The resulting electronic image is converted from an analog signal to a digital signal by an analog-to-digital converter, and the digital signal is compressed by the microprocessor and converted into a specific format, such as the Joint Photographic Experts Group (JPEG) format. , complete the photo.
- JPEG Joint Photographic Experts Group
- the image obtained according to the above process is the same as the image captured by the camera. If the background in the image is not what the user wants, the user can process the background in the image through some image processing software. At present, the precondition for processing the background of an image is that the image has been saved, but the user finally wants to obtain the processed image. Therefore, the previously saved image does not have much effect, but it will occupy a certain storage space. Moreover, the user terminal determines the image to be processed from the plurality of saved images according to the selection instruction input by the user, and then processes the image to be processed according to the processing instruction input by the user, which is passive for the user terminal.
- the embodiment of the invention provides a shooting method and a user terminal, which performs background processing during the shooting process, which can save storage space and improve the intelligence of the user terminal.
- an embodiment of the present invention provides a shooting method, including:
- the adjusted image is output and saved.
- an embodiment of the present invention provides a user terminal, including:
- a processing unit configured to extract a photographic subject image from the captured image output by the shooting preview interface, where the captured image includes the photographic subject image and the photographic background image;
- the processing unit is further configured to acquire a target background image that matches the image of the photographic subject, and replace the captured background image with the target background image;
- the processing unit is further configured to adjust the image of the photographic subject and/or the target background image
- the output unit is configured to output and save the adjusted image when a shooting instruction is received.
- an embodiment of the present invention provides a user terminal, including a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, wherein the memory is used to store the computer.
- a program, the computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of the first aspect of the embodiments of the present invention.
- an embodiment of the present invention provides a user terminal, including at least one processing element (or chip) for performing the method according to the first aspect of the embodiments of the present invention.
- an embodiment of the present invention provides a program, when executed by a processor, is used to perform the method according to the first aspect of the embodiments of the present invention.
- an embodiment of the present invention provides a program product, such as a computer readable storage medium, where the computer storage medium stores a computer program, the computer program including program instructions, when executed by a processor The processor performs the method of the first aspect of the embodiments of the present invention.
- the background processing during the shooting process can be realized, which can save storage space and improve the intelligence of the user terminal. Sex.
- FIG. 1 is a schematic diagram of a network architecture to which an embodiment of the present invention is applied;
- FIG. 2 is a schematic flow chart of a photographing method according to an embodiment of the present invention.
- FIG. 3 is a schematic diagram of a photographing interface provided by an embodiment of the present invention.
- FIG. 4 is a schematic diagram of a background replacement provided by an embodiment of the present invention.
- FIG. 5 is a schematic flowchart diagram of another shooting method according to an embodiment of the present invention.
- FIG. 6 is a schematic diagram of a logical structure of a user terminal according to an embodiment of the present invention.
- FIG. 7 is a schematic diagram of an entity structure of a user terminal according to an embodiment of the present invention.
- FIG. 1 is a schematic diagram of a network architecture according to an embodiment of the present invention.
- the network architecture diagram includes a plurality of user terminals and servers. It should be noted that the form and number of the user terminals and servers shown in FIG. 1 do not constitute a pair. Definition of inventive embodiments.
- the server may send a request for acquiring a background image, and the server may feed back the background image to the user terminal in response to the request.
- the number of background images acquired by the user terminal to the server is not limited to one, and the background image may be static or dynamic.
- the user terminal of the embodiment of the present invention is configured with a camera, and the configured camera may be a front camera, a rear camera, a dual camera, a pinhole camera, etc., and the user terminal may include, but is not limited to, a digital camera, a video camera, Mobile phones, tablets, personal computers, smart wearable devices, and more.
- the user terminal introduces a mobile phone as an example.
- the photographing method and the user terminal provided by the embodiment of the present invention can be applied to a scene photographed by a camera.
- the user terminal extracts a photographed image from the photographed image output by the photographing preview interface.
- the captured image includes the photographic subject image and the captured background image, acquires a target background image that matches the photographic subject image, and captures the shot
- the background image is replaced with the target background image, and the subject image and/or the target background image are adjusted, and when an imaging instruction is received, the scene of the adjusted image is output and saved.
- the background image is replaced during the shooting process, and the background is saved and the background is saved. This saves storage space and improves the intelligence of the user terminal. For the user, the operation steps can be reduced and the user experience can be improved.
- the image involved in the embodiment of the present invention may be static or dynamic.
- a static image is taken as an example, and the processing process of the dynamic image and the static image is similar.
- the object to be photographed in the embodiment of the present invention may be a person, an animal, an article, a flower, a bird, or the like.
- a portion other than the subject in a picture is a photographing background.
- the subject can be determined according to the proportion of each part, and the portion with a large proportion can be regarded as a subject, and the other portion is regarded as a shooting background.
- FIG. 2 is a schematic flowchart of a shooting method according to an embodiment of the present invention, including but not limited to the following steps:
- Step S201 In the case where the camera application is started, the photographic subject image is extracted from the captured image output from the shooting preview interface.
- the camera application may be a camera application that is provided by the user terminal, that is, a camera application that is provided by the system, or a camera application that is downloaded from the application store, which is not limited in the embodiment of the present invention.
- the user terminal launches the camera application upon receiving a start command input for the camera application.
- the startup instruction may be an icon of the camera application clicked or double-clicked by the user, or may be a shortcut button corresponding to pressing the camera application, or may be a voice instruction for starting the camera application or the like.
- the camera application is started, and the display interface of the user terminal becomes a shooting interface.
- the interface of the shooting interface can be seen in FIG. 2 .
- the white area is the shooting preview interface for displaying the captured image captured by the camera
- the top black area is the shooting option, including flash, timing, color and other options
- the bottom black area includes shooting Type options, image options, camera options, shooting buttons.
- the photographing interface diagram shown in FIG. 2 further includes a background replacement option, which is not indicated in FIG. 2, and may be located in the top black area or in the bottom black area, and the specific position is set by the manufacturer of the user terminal. set. Need to explain The photographing interface shown in FIG. 2 is only used as an example, and the content displayed and the proportion of each area do not constitute a limitation on the embodiment of the present invention, and the content displayed and the proportion of each area are The manufacturer's settings for the user terminal.
- the camera captures a captured image
- the user terminal outputs the captured image in the shooting preview interface.
- the background replacement option corresponds to the need for background replacement
- the user terminal extracts a subject image from the output captured image.
- the captured image is composed of a subject image and a photographed background image. Taking a person image as an example, a person in the person image is a subject, and a part other than the person is a photographing background.
- the user terminal identifies a photographic subject from the output captured image according to a recognition algorithm, and extracts a photographic subject image corresponding to the photographic subject.
- the recognition algorithm is an intelligent recognition algorithm capable of recognizing a photographic subject in a captured image, thereby facilitating extraction of a photographic subject image corresponding to the photographic subject, for example, using a recognition algorithm to identify a person, according to The feature of the character image defines the edge position of the character, and the character image is extracted. It is simple and convenient to extract the image of the subject according to the recognition algorithm, but the accuracy of the extraction depends on the recognition degree of the algorithm. The higher the recognition degree of the algorithm, the higher the accuracy of the extraction.
- the user terminal determines a photographic subject area from the captured image according to an area selection instruction for the captured image, and extracts a photographic subject image from the photographic subject area.
- the area selection instruction may be input by a user. For example, the user selects and delineates an area in the captured image, the area includes the image of the subject, but the area may further include other images, so further extraction from the area is needed.
- the subject image is taken out.
- the area selection instruction may also be automatically recognized by the user terminal, identify an approximate area occupied by the image of the photographic subject, and then further identify an area occupied by the photographic subject image, thereby facilitating extraction of the photographic subject image. .
- Step S202 Acquire a target background image that matches the image of the photographic subject, and replace the captured background image with the target background image.
- the user terminal acquires a target background image that matches the image of the photographic subject, and replaces the captured background image with the target background image.
- the target background image can be static, also Can be dynamic.
- the target background image may be a background image with blanks, and the blanks may be used for filling of the photographic subject image to be fused with the photographic subject image.
- the target background image may also be a background image without leaving a blank.
- the photographic subject image may be placed above the target background image, that is, the photographic subject image will overlap. Covered, for the user, this part of the target background image is not visible.
- the user terminal may directly acquire the target background image from a server corresponding to the camera application.
- the user terminal may send the extracted image of the photographic subject to the server, select one of the plurality of background images stored in the database as the target background image, and send the selected target background image to the target terminal image
- the user terminal may select one of the plurality of background images as the target background image by some algorithms.
- the server can also determine the target background image from the matching records in the database.
- the user terminal may acquire, from a server corresponding to the camera application, a background image set that matches the image of the photographic subject, according to a selection instruction input for the background image set.
- the target background image is determined in the background image collection.
- the image of the subject is a person image
- the set of background images matching the image of the person may be a set of landscape background images, that is, the server provides a plurality of landscape background images for the character image, and the user may obtain images from the plurality of landscape backgrounds. Select one as the target background image.
- the user terminal may provide some images stored by the local end and use the images as background images for the user to select, and then determine a target background image according to a selection instruction input by the user for the image inputs.
- the user terminal may rotate the shooting background image to obtain a background image, and use the background image as a target background image.
- the angle of rotation is not limited in the embodiment of the invention.
- the manner of obtaining the target background image does not limit the embodiment of the present invention, and the target background image may be acquired in other manners.
- FIG. 4 is a schematic diagram of a background replacement provided by an embodiment of the present invention.
- the background replacement process in FIG. 4 is that the white shooting background image is replaced with the gray target background image, and the subject image has not changed, and the user has not input the shooting instruction at this time. It should be noted that FIG. 4 is only for exemplification and does not constitute a limitation on the embodiments of the present invention.
- Step S203 Adjust the subject image and/or the target background image.
- the user terminal adjusts the photographic subject image and/or the target background image to better fuse the photographic subject image and the target background image, so that the fused image effect is better.
- the user moves and/or deflects the user terminal such that the distance and/or angle between the original photographic subject corresponding to the photographic subject image and the camera of the user terminal changes, thereby affecting The subject image outputted on the photographing preview interface.
- the user adjusts the subject image by moving and/or deflecting the user terminal such that the subject image blends better with the target background image.
- the method for adjusting the image of the photographic subject according to the distance and/or the angle between the original photographic subject and the camera corresponding to the photographic subject image is not limited in the implementation of the present invention.
- the user moves the user terminal without changing the image of the photographic subject, but changes the target background image, according to the original photographic object corresponding to the photographic subject image and the camera
- the method of adjusting the target background image is not limited in the implementation of the present invention.
- the user terminal adjusts the photographic subject image or the target background image according to an adjustment instruction input by a user.
- the adjustment instruction may be input to the image of the photographic subject, and the image of the photographic subject is adjusted according to the adjustment instruction; or may be input for the target background image, and the adjustment instruction is adjusted according to the adjustment instruction.
- the target background image may be input to the image of the photographic subject, and the image of the photographic subject is adjusted according to the adjustment instruction; or may be input for the target background image, and the adjustment instruction is adjusted according to the adjustment instruction.
- the target background image may be input to the image of the photographic subject, and the image of the photographic subject is adjusted according to the adjustment instruction; or may be input for the target background image, and the adjustment instruction is adjusted according to the adjustment instruction.
- the target background image may be input for the target background image.
- Step S204 When the shooting instruction is received, the adjusted image is output and saved.
- the user terminal outputs and saves the adjusted image when receiving the shooting instruction.
- the user adjusts the photographic subject image and/or the target background image to find a desired compositing effect, and when the user determines a desired compositing effect, a shooting instruction or a physics input for the shooting button in the shooting preview interface
- a shooting instruction or a physics input for the shooting button in the shooting preview interface Shoot the shooting command input by the button, that is, click or press the shooting button or physical shooting button.
- the user terminal When receiving the shooting instruction, the user terminal outputs the adjusted image and saves the adjusted image, that is, outputs and saves the composite image. In this way, the user terminal only needs to save the final synthesized image without saving the image to be processed, thereby saving storage space.
- the user terminal may send the adjusted image to a server corresponding to the camera application, so that the server records a composite effect, and the user terminal adopts The target background image.
- the user terminal may process the color, noise, and the like of the composite image to make the image effect of the composite image better.
- the synthesized person image is subjected to a beauty treatment
- the synthesized food image is subjected to a touch-up processing or the like.
- a target background image matching the photographic subject image is acquired by starting the camera application, and the background is captured.
- the image is replaced with the target background image, the subject image and/or the target background image are adjusted, and when the photographing instruction input for the photographing preset interface is received, the adjusted image is output and saved, thereby realizing the background during shooting Processing can save storage space and improve the intelligence of the user terminal.
- FIG. 5 is a schematic flowchart diagram of another shooting method according to an embodiment of the present invention, including but not limited to the following steps:
- Step S501 In the case where the camera application is started, the photographic subject image is extracted from the captured image output by the shooting preview interface.
- step S501 in the embodiment shown in FIG. 5 reference may be made to the description of step S201 in the embodiment shown in FIG. 2, and details are not described herein again.
- Step S502 Acquire a background image set matching the image of the photographic subject from a server corresponding to the camera application.
- the user terminal sends an acquisition request to a server corresponding to the camera application, where the acquisition request is used to request the server to provide a background image set that matches the image of the photographic subject, and the server receives the acquisition request. And feeding back, to the user terminal, a background image set that matches the image of the photographic subject in response to the acquisition request.
- the server may search for a background image set matching the image of the photographic subject in the preset correspondence table according to the type of the photographic subject image.
- the preset correspondence table includes a correspondence relationship between a type of the image of the photographic subject and a background image set corresponding thereto, and the image type of the photographic subject may include a person, an animal, a food, an item, and the like.
- the type of the subject image is a character
- the background image set matching the character image may be a landscape background image collection.
- Step S503 Determine a target background image from the background image set according to a selection instruction input for the background image set.
- the user terminal determines a target background image from the background image set according to a selection instruction input by the user for the background image set, that is, determines a target background image according to the selection instruction. Place The target background image is a background image selected by the user.
- Step S504 replacing the shooting background image with the target background image.
- the user terminal replaces the shooting background image with the target background image. See the background replacement diagram shown in FIG. 4 .
- Step S505 Adjust the photographic subject image and/or the target background image according to a distance and/or an angle between the original photographic subject and the camera corresponding to the photographic subject image.
- the user terminal adjusts the photographic subject image and/or the target background image according to a distance and/or an angle between the original photographic subject corresponding to the photographic subject image and the camera.
- the user moves and/or deflects the user terminal such that the distance and/or angle between the original photographic subject corresponding to the photographic subject image and the camera of the user terminal changes, and the user terminal can change according to the distance and/or Or an angle to adjust the subject image and/or the target background image.
- the user moves and/or deflects the user terminal to adjust the subject image and/or the target background image to find the desired composite effect.
- Step S506 When the shooting instruction is received, the adjusted image is output and saved.
- step S506 in the embodiment shown in FIG. 5, reference may be made to the description of step S204 in the embodiment shown in FIG. 2, and details are not described herein again.
- the server corresponding to the camera application provides the user terminal with a background image set that matches the image of the photographic subject for selection by the user, thereby determining the target background image for the user terminal to perform background replacement. deal with.
- FIG. 6 is a schematic diagram of a logical structure of a user terminal according to an embodiment of the present invention.
- the user terminal 60 shown in FIG. 6 includes a processing unit 601 and an output unit 602.
- the processing unit 601 is configured to extract a photographic subject image from the captured image output by the shooting preview interface, where the captured image includes the photographic subject image and the photographic background image.
- the camera application may be a camera application that is provided by the user terminal 60, that is, a camera application that is provided by the system, or a camera application that is downloaded from the application store, which is not limited in the embodiment of the present invention. .
- the user terminal 60 activates the camera application upon receiving a start command input for the camera application.
- the startup command may be an icon of the camera application clicked or double-clicked by the user, or may be a shortcut button corresponding to pressing the camera application, or may be used to start the Voice commands for camera applications and more.
- the camera application is started, and the display interface of the user terminal 60 becomes a shooting interface.
- the interface of the shooting interface can be seen in FIG. 2 .
- the white area is the shooting preview interface for displaying the captured image captured by the camera
- the top black area is the shooting option, including flash, timing, color and other options
- the bottom black area includes shooting Type options, image options, camera options, shooting buttons.
- the photographing interface diagram shown in FIG. 2 further includes a background replacement option, which is not indicated in FIG. 2, and may be located in the top black area or in the bottom black area, and the specific position is set by the manufacturer of the user terminal. set.
- the photographing interface shown in FIG. 2 is only used as an example, and the content displayed and the proportion of each area do not constitute a limitation on the embodiment of the present invention, and the content and the proportion of each area are displayed. Set by the manufacturer of the user terminal.
- the camera captures a captured image
- the output unit 602 outputs the captured image in the shooting preview interface.
- the processing unit 601 extracts a photographic subject image from the output captured image.
- the captured image is composed of a subject image and a photographed background image. Taking a person image as an example, a person in the person image is a subject, and a part other than the person is a photographing background.
- the processing unit 601 identifies a photographic subject from the output captured image according to the recognition algorithm, and extracts a photographic subject image corresponding to the photographic subject.
- the recognition algorithm is an intelligent recognition algorithm capable of recognizing a photographic subject in a captured image, thereby facilitating extraction of a photographic subject image corresponding to the photographic subject, for example, using a recognition algorithm to identify a person, according to The feature of the character image defines the edge position of the character, and the character image is extracted. It is simple and convenient to extract the image of the subject according to the recognition algorithm, but the accuracy of the extraction depends on the recognition degree of the algorithm. The higher the recognition degree of the algorithm, the higher the accuracy of the extraction.
- the processing unit 601 determines a photographic subject area from the captured image according to an area selection instruction for the captured image, and extracts a photographic subject image from the photographic subject area.
- the area selection instruction may be input by a user. For example, the user selects and delineates an area in the captured image, the area includes the image of the subject, but the area may further include other images, so further extraction from the area is needed.
- the subject image is taken out.
- the area selection instruction may also be automatically recognized by the processing unit 601, and the image of the subject is identified. The approximate area occupied, and then the processing unit 601 further recognizes the area occupied by the image of the subject, thereby facilitating the extraction of the image of the subject.
- the processing unit 601 is further configured to acquire a target background image that matches the image of the photographic subject, and replace the captured background image with the target background image.
- the processing unit 601 acquires a target background image that matches the image of the photographic subject, and replaces the captured background image with the target background image.
- the target background image may be static or dynamic.
- the target background image may be a background image with blanks, and the blanks may be used for filling of the photographic subject image to be fused with the photographic subject image.
- the target background image may also be a background image without leaving a blank.
- the photographic subject image may be placed above the target background image, that is, the photographic subject image will overlap. Covered, for the user, this part of the target background image is not visible.
- the processing unit 601 may directly acquire the target background image from a server corresponding to the camera application.
- the user terminal 60 may send the extracted image of the photographic subject to the server, select one of the plurality of background images stored in the database as the target background image, and send the selected target background image To the user terminal 60.
- the server may select one of the plurality of background images as the target background image by some algorithms.
- the server can also determine the target background image from the matching records in the database.
- the processing unit 601 may acquire, from a server corresponding to the camera application, a background image set that matches the image of the photographic subject, according to a selection instruction input for the background image set.
- the target background image is determined from the background image collection.
- the image of the subject is a person image
- the set of background images matching the image of the person may be a set of landscape background images, that is, the server provides a plurality of landscape background images for the character image, and the user may obtain images from the plurality of landscape backgrounds. Select one as the target background image.
- the user terminal 60 may provide some images stored by the local end and use the images as background images for the user to select, and then the processing unit 601 determines the target according to the selection instruction input by the user for the image inputs. Background image.
- the processing unit 601 can perform the shooting background image Rotate to get a background image, which is used as the target background image.
- the angle of rotation is not limited in the embodiment of the invention.
- the manner of obtaining the target background image does not limit the embodiment of the present invention, and the target background image may be acquired in other manners.
- FIG. 4 is a schematic diagram of a background replacement provided by an embodiment of the present invention.
- the background replacement process in FIG. 4 is that the white shooting background image is replaced with the gray target background image, and the subject image has not changed, and the user has not input the shooting instruction at this time. It should be noted that FIG. 4 is only for exemplification and does not constitute a limitation on the embodiments of the present invention.
- the processing unit 601 is further configured to adjust the image of the photographic subject and/or the target background image.
- the processing unit 601 adjusts the image of the photographic subject and/or the target background image to better fuse the photographic subject image and the target background image, so that the fused image is better.
- the user moves and/or deflects the user terminal 60 such that the distance and/or angle between the original photographic subject corresponding to the photographic subject image and the camera of the user terminal changes.
- a subject image that is output on the shooting preview interface is affected.
- the user adjusts the subject image by moving and/or deflecting the user terminal 60 so that the subject image is better fused with the target background image.
- the method for the processing unit 601 to adjust the image of the photographic subject according to the distance and/or the angle between the original photographic subject and the camera corresponding to the photographic subject image is not limited in the implementation of the present invention.
- the user moves the user terminal 60 without changing the image of the photographic subject, but changes the target background image, and the processing unit 601 is based on the original photographic object corresponding to the photographic subject image.
- the method of adjusting the target background image by the distance from the camera is not limited in the implementation of the present invention.
- the processing unit 601 adjusts the photographic subject image or the target background image according to an adjustment instruction input by a user.
- the adjustment instruction may be input to the image of the photographic subject, and the image of the photographic subject is adjusted according to the adjustment instruction; or may be input for the target background image, and the adjustment instruction is adjusted according to the adjustment instruction.
- the target background image may be input to the image of the photographic subject, and the image of the photographic subject is adjusted according to the adjustment instruction; or may be input for the target background image, and the adjustment instruction is adjusted according to the adjustment instruction.
- the target background image may be input to the image of the photographic subject, and the image of the photographic subject is adjusted according to the adjustment instruction; or may be input for the target background image, and the adjustment instruction is adjusted according to the adjustment instruction.
- the target background image may be input for the target background image.
- the output unit 602 is configured to output and save the adjusted image when the shooting instruction is received image.
- the output unit 602 When the user terminal 60 receives the shooting instruction, the output unit 602 outputs and saves the adjusted image.
- the user adjusts the photographic subject image and/or the target background image to find a desired compositing effect, and when the user determines a desired compositing effect, a shooting instruction or a physics input for the shooting button in the shooting preview interface
- a shooting instruction or a physics input for the shooting button in the shooting preview interface Shoot the shooting command input by the button, that is, click or press the shooting button or physical shooting button.
- the output unit 602 outputs the adjusted image and saves the adjusted image, that is, outputs and saves the composite image. In this way, the user terminal only needs to save the final synthesized image without saving the image to be processed, thereby saving storage space.
- the user terminal 60 may transmit the adjusted image to a server corresponding to the camera application, so that the server records a composite effect, and the user terminal 60 The target background image employed.
- the processing unit 601 may process the color, noise, and the like of the composite image to make the image effect of the composite image better.
- the synthesized person image is subjected to a beauty treatment
- the synthesized food image is subjected to a touch-up processing or the like.
- the user terminal shown in FIG. 6 can implement background processing during shooting, which can save storage space and improve the intelligence of the user terminal.
- FIG. 7 is a schematic diagram of a logical structure of a user terminal according to an embodiment of the present invention.
- User terminal 70 may include communication bus 710, wireless communication module 720, output device 730, interface module 740, power module 750, processor 760, input device 770, memory 780, and the like.
- Figure 7 illustrates a user terminal having various components, but it should be understood that not all of the components presented may be implemented, and more or fewer components may be implemented instead.
- the communication bus 710 is used to implement connection communication between these components.
- Wireless communication module 720 typically includes one or more components for enabling wireless communication between user terminal 70 and a wireless communication system or network.
- the wireless communication module 720 may include a broadcast receiving unit, a mobile communication unit, a wireless internet unit, a short-range communication unit, a location information unit, and the like.
- the output device 730 is for outputting text, voice, video, and the like, and includes a display unit 731, an audio output unit 732, and the like.
- the display unit 731 is configured to display information processed by the user terminal 70 or the processor 760.
- the display unit 731 includes a user interface, a graphical user interface, and the like, and presents each to the user.
- the audio output unit 732 is configured to convert audio data received by the wireless communication module 720 or stored in the memory 780 when the user terminal is in a call signal receiving mode, a call mode, a recording mode, a voice recognition mode, a broadcast receiving mode, and the like. It is an audio signal and is output as sound.
- the output device 730 is configured to output a shooting preview interface, a captured image (including a subject image and a captured background image), a background image set, a target background image, a composite image, and the like.
- the interface module 740 is used to implement the connection of the user terminal 70 with an external device, and may include a wired or wireless headphone port, an external power port, a wired or wireless data port, a memory card port, an audio input/output port, and the like.
- the power module 750 is used to provide the required power to the various components of the user terminal 70.
- the processor 760 is used to control various operations of the user terminal and implementation of various functions. In the embodiment of the present invention, the processor 760 is used for background replacement processing.
- the input device 770 is configured to receive various operations of the user as well as audio or video signals, including an A/V input unit 771 and a user input unit 772, and the like.
- the A/V input unit 771 is configured to receive an audio or video signal, and may include a camera and a microphone.
- the image information captured by the camera is displayed by the display unit 731 under the control of the processor 760.
- the user input unit 772 is configured to receive various operations input by the user, such as a pressing operation, a sliding operation, etc., and identify the sliding operations, generate corresponding commands, and transmit the corresponding commands to the processor 760, and the processor 760 controls the execution of the corresponding operations or The implementation of the corresponding function.
- Memory 780 stores program code for processor 760 to perform processing or control operations, or temporarily stores certain data, such as contacts, images, video, and the like.
- the memory 780 may be a high speed RAM memory or a non-volatile memory such as at least one disk memory.
- the processor 760 calls the program code stored in the memory 780 to perform the following operations:
- control output device 730 outputs and saves the adjusted image.
- processor 760 calls the program code stored in the memory 780 to perform the extraction of the image of the captured object from the captured image output by the shooting preview interface, the following operations are specifically performed:
- the photographic subject is recognized from the captured image output from the shooting preview interface according to the recognition algorithm, and the photographic subject image corresponding to the photographic subject is extracted.
- processor 760 calls the program code stored in the memory 780 to perform the extraction of the image of the captured object from the captured image output by the shooting preview interface, the following operations are specifically performed:
- the photographic subject area is determined from the captured image based on an area selection command for the captured image outputted by the shooting preview interface, and the photographic subject image is extracted from the photographic subject area.
- processor 760 calls the program code stored in the memory 780 to perform the acquisition of the target background image that matches the image of the photographic subject, the following operations are specifically performed:
- a target background image is determined from the set of background images based on a selection instruction input for the set of background images.
- processor 760 calls the program code stored in the memory 780 to perform adjustment of the photographic subject image and/or the target background image, specifically performing the following operations:
- the photographic subject image and/or the target background image are adjusted according to a distance and/or an angle between the original photographic subject corresponding to the photographic subject image and the camera.
- the embodiment of the present invention further provides a computer readable storage medium having a computer program, the computer program comprising program instructions, when executed by the processor, causing the processor to execute as shown in FIG. 2 and FIG. 5. The method shown.
- Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another.
- a storage medium may be any available media that can be accessed by a computer.
- the computer readable medium may include a random access memory (RAM), a read-only memory (ROM), and an electrically erasable programmable read-only memory (Electrically Erasable Programmable).
- EEPROM Electrically Error Read-Only Memory
- CD-ROM Compact Disc Read-Only Memory
- Any connection may suitably be a computer readable medium.
- the software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, Then coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, wireless and microwave are included in the fixing of the associated medium.
- DSL Digital Subscriber Line
- a disk and a disc include a compact disc (CD), a laser disc, a compact disc, a digital versatile disc (DVD), a floppy disk, and a Blu-ray disc, wherein the disc is usually magnetically copied, and the disc is The laser is used to optically replicate the data. Combinations of the above should also be included within the scope of the computer readable media.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
Abstract
Provided are a photographing method and user terminal, said method comprising: when starting a camera application, extracting an image of a photographed subject from a photographing image outputted by a photographing preview interface, said photographing image comprising said image of the photographed subject and a photographing background image; obtaining a target background image matching the image of the photographed subject, and substituting the photographing background image with said target background image; adjusting the image of the photographed subject and/or the target background image; if a photographing instruction is received, outputting and saving the adjusted image. The embodiments of the present invention enable background processing during the process of photographing, save storage space, and improve the intelligence of a user terminal.
Description
本发明涉及多媒体技术领域,尤其涉及一种拍摄方法及用户终端。The present invention relates to the field of multimedia technologies, and in particular, to a photographing method and a user terminal.
随着电子技术的快速发展,在电子设备上配置摄像头已经成为行业标配,例如,数码相机、摄像机、手机、平板电脑等,这些配置有摄像头的用户终端已经成为人们拍摄用以记录生活点滴的首选。根据成像效果可以将拍摄分为拍照和摄像,拍照的成像效果大部分是静态图像,摄像的成像效果大部分是动态图像。With the rapid development of electronic technology, the configuration of cameras on electronic devices has become a standard in the industry, such as digital cameras, camcorders, mobile phones, tablet computers, etc. These user terminals equipped with cameras have become photographs for people to record life. Preferred. According to the imaging effect, the shooting can be divided into photographing and photographing. The imaging effect of the photographing is mostly static image, and the imaging effect of the camera is mostly a dynamic image.
通常,进行拍照时,当用户确认拍照信息后,例如按下拍摄按钮后,用户终端会将光线会聚到感光器件上,由该感光器件将光信号转变为电信号,得到对应于当前拍照信息的电子图像。再通过模数转换器将得到的电子图像从模拟信号转换到数字信号,并由微处理器对数字信号进行压缩并转化为特定的格式,例如联合图像专家组(Joint Photographic Experts Group,JPEG)格式,完成拍照。Generally, when taking a picture, when the user confirms the photo information, for example, after pressing the shooting button, the user terminal will condense the light onto the photosensitive device, and the photosensitive device converts the optical signal into an electrical signal to obtain a corresponding photo information. Electronic image. The resulting electronic image is converted from an analog signal to a digital signal by an analog-to-digital converter, and the digital signal is compressed by the microprocessor and converted into a specific format, such as the Joint Photographic Experts Group (JPEG) format. , complete the photo.
按照上述流程得到的图像与摄像头所采集的图像相同,若该图像中的背景并不是用户想要的,那么用户可通过一些图像处理软件对该图像中的背景进行处理。目前,对某个图像的背景进行处理的前提条件是该图像已保存,但是用户最终想得到的是处理后的图像,因此,之前保存的图像作用不大,反而会占用一定的存储空间。并且,用户终端根据用户输入的选择指令从多个已保存的图像中确定待处理图像,再根据用户输入的处理指令对待处理图像进行处理,对用户终端而言,较为被动。The image obtained according to the above process is the same as the image captured by the camera. If the background in the image is not what the user wants, the user can process the background in the image through some image processing software. At present, the precondition for processing the background of an image is that the image has been saved, but the user finally wants to obtain the processed image. Therefore, the previously saved image does not have much effect, but it will occupy a certain storage space. Moreover, the user terminal determines the image to be processed from the plurality of saved images according to the selection instruction input by the user, and then processes the image to be processed according to the processing instruction input by the user, which is passive for the user terminal.
发明内容Summary of the invention
本发明实施例提供一种拍摄方法及用户终端,在拍摄过程中进行背景处理,可以节省存储空间,提高用户终端的智能性。The embodiment of the invention provides a shooting method and a user terminal, which performs background processing during the shooting process, which can save storage space and improve the intelligence of the user terminal.
第一方面,本发明实施例提供一种拍摄方法,包括:In a first aspect, an embodiment of the present invention provides a shooting method, including:
在启动相机应用程序的情况下,从拍摄预览界面输出的拍摄图像中提取拍摄对象图像,所述拍摄图像包括所述拍摄对象图像和拍摄背景图像;
Extracting a photographic subject image from the captured image output by the shooting preview interface, the captured image including the photographic subject image and the photographic background image;
获取与所述拍摄对象图像相匹配的目标背景图像,并将所述拍摄背景图像替换为所述目标背景图像;Obtaining a target background image that matches the image of the photographic subject, and replacing the captured background image with the target background image;
调整所述拍摄对象图像和/或所述目标背景图像;Adjusting the subject image and/or the target background image;
在接收到拍摄指令的情况下,输出并保存调整后的图像。When the shooting command is received, the adjusted image is output and saved.
第二方面,本发明实施例提供一种用户终端,包括:In a second aspect, an embodiment of the present invention provides a user terminal, including:
处理单元,用于在启动相机应用程序的情况下,从拍摄预览界面输出的拍摄图像中提取拍摄对象图像,所述拍摄图像包括所述拍摄对象图像和拍摄背景图像;a processing unit, configured to extract a photographic subject image from the captured image output by the shooting preview interface, where the captured image includes the photographic subject image and the photographic background image;
所述处理单元,还用于获取与所述拍摄对象图像相匹配的目标背景图像,并将所述拍摄背景图像替换为所述目标背景图像;The processing unit is further configured to acquire a target background image that matches the image of the photographic subject, and replace the captured background image with the target background image;
所述处理单元,还用于调整所述拍摄对象图像和/或所述目标背景图像;The processing unit is further configured to adjust the image of the photographic subject and/or the target background image;
输出单元,用于在接收到拍摄指令的情况下,输出并保存调整后的图像。The output unit is configured to output and save the adjusted image when a shooting instruction is received.
第三方面,本发明实施例提供一种用户终端,包括处理器、输入设备、输出设备和存储器,所述处理器、输入设备、输出设备和存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,执行本发明实施例第一方面所述的方法。In a third aspect, an embodiment of the present invention provides a user terminal, including a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, wherein the memory is used to store the computer. A program, the computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of the first aspect of the embodiments of the present invention.
第四方面,本发明实施例提供一种用户终端,包括用于执行本发明实施例第一方面所述的方法的至少一个处理元件(或芯片)。In a fourth aspect, an embodiment of the present invention provides a user terminal, including at least one processing element (or chip) for performing the method according to the first aspect of the embodiments of the present invention.
第五方面,本发明实施例提供一种程序,该程序在被处理器执行时用于执行本发明实施例第一方面所述的方法。In a fifth aspect, an embodiment of the present invention provides a program, when executed by a processor, is used to perform the method according to the first aspect of the embodiments of the present invention.
第六方面,本发明实施例提供一种程序产品,例如计算机可读存储介质,所述计算机存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行本发明实施例第一方面所述的方法。In a sixth aspect, an embodiment of the present invention provides a program product, such as a computer readable storage medium, where the computer storage medium stores a computer program, the computer program including program instructions, when executed by a processor The processor performs the method of the first aspect of the embodiments of the present invention.
可见,在以上各个方面,在拍摄过程中,通过保留拍摄图像中的拍摄对象图像,将拍摄背图像替换为目标背景图像,实现拍摄过程中的背景处理,可以节省存储空间,提高用户终端的智能性。It can be seen that in the above aspects, during the shooting process, by retaining the image of the subject in the captured image, replacing the captured back image with the target background image, the background processing during the shooting process can be realized, which can save storage space and improve the intelligence of the user terminal. Sex.
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施
例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will be implemented
The drawings used in the examples are briefly described. It is obvious that the drawings in the following description are only some embodiments of the present invention, and those skilled in the art, without any creative work, Other drawings can be obtained from these figures.
图1是应用本发明实施例的网络架构示意图;1 is a schematic diagram of a network architecture to which an embodiment of the present invention is applied;
图2是本发明实施例提供的一种拍摄方法的流程示意图;2 is a schematic flow chart of a photographing method according to an embodiment of the present invention;
图3是本发明实施例提供的拍摄界面示意图;3 is a schematic diagram of a photographing interface provided by an embodiment of the present invention;
图4是本发明实施例提供的背景替换示意图;4 is a schematic diagram of a background replacement provided by an embodiment of the present invention;
图5是本发明实施例提供的另一种拍摄方法的流程示意图;FIG. 5 is a schematic flowchart diagram of another shooting method according to an embodiment of the present invention; FIG.
图6是本发明实施例提供的用户终端的逻辑结构示意图;FIG. 6 is a schematic diagram of a logical structure of a user terminal according to an embodiment of the present invention;
图7是本发明实施例提供的用户终端的实体结构示意图。FIG. 7 is a schematic diagram of an entity structure of a user terminal according to an embodiment of the present invention.
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
请参见图1,是应用本发明实施例的网络架构示意图,该网络架构示意图包括多个用户终端和服务器,需要说明的是,图1所示的用户终端和服务器的形态和数量并不构成对本发明实施例的限定。用户终端在连接网络(无线网络、数据网络)的情况下,可向服务器发送获取背景图像的请求,服务器可响应该请求,向用户终端反馈背景图像。需要说明的是,用户终端向服务器获取的背景图像的数量不限于一个,并且背景图像可以是静态的,也可以是动态的。FIG. 1 is a schematic diagram of a network architecture according to an embodiment of the present invention. The network architecture diagram includes a plurality of user terminals and servers. It should be noted that the form and number of the user terminals and servers shown in FIG. 1 do not constitute a pair. Definition of inventive embodiments. When the user terminal connects to the network (wireless network, data network), the server may send a request for acquiring a background image, and the server may feed back the background image to the user terminal in response to the request. It should be noted that the number of background images acquired by the user terminal to the server is not limited to one, and the background image may be static or dynamic.
本发明实施例所涉及的用户终端配置有摄像头,所配置的摄像头可以是前置摄像头、后置摄像头、双摄像头、针孔摄像头等等,所述用户终端可以包括但不限于数码相机、摄像机、手机、平板电脑(pad)、个人计算机、智能可穿戴设备等等。本发明实施例中,用户终端以手机为例进行介绍。The user terminal of the embodiment of the present invention is configured with a camera, and the configured camera may be a front camera, a rear camera, a dual camera, a pinhole camera, etc., and the user terminal may include, but is not limited to, a digital camera, a video camera, Mobile phones, tablets, personal computers, smart wearable devices, and more. In the embodiment of the present invention, the user terminal introduces a mobile phone as an example.
本发明实施例提供的拍摄方法及用户终端,可以应用于通过摄像头进行拍摄的场景,例如,用户终端在启动相机应用程序的情况下,从拍摄预览界面输出的拍摄图像中提取拍摄对象图像,所述拍摄图像包括所述拍摄对象图像和拍摄背景图像,获取与所述拍摄对象图像相匹配的目标背景图像,并将所述拍摄
背景图像替换为所述目标背景图像,调整所述拍摄对象图像和/或所述目标背景图像,在接收到拍摄指令的情况下,输出并保存调整后的图像的场景。本发明实施例在拍摄过程中,对背景图像进行替换,而不用先保存再处理背景,这样可以节省存储空间,提高用户终端的智能性,对用户而言,可以减少操作步骤,提升用户体验。The photographing method and the user terminal provided by the embodiment of the present invention can be applied to a scene photographed by a camera. For example, when the user terminal starts the camera application, the user terminal extracts a photographed image from the photographed image output by the photographing preview interface. The captured image includes the photographic subject image and the captured background image, acquires a target background image that matches the photographic subject image, and captures the shot
The background image is replaced with the target background image, and the subject image and/or the target background image are adjusted, and when an imaging instruction is received, the scene of the adjusted image is output and saved. In the embodiment of the present invention, the background image is replaced during the shooting process, and the background is saved and the background is saved. This saves storage space and improves the intelligence of the user terminal. For the user, the operation steps can be reduced and the user experience can be improved.
本发明实施例所涉及的图像可以是静态的,也可以是动态的,为了便于理解,以静态的图像为例进行介绍,动态图像与静态图像的处理过程类似。The image involved in the embodiment of the present invention may be static or dynamic. For ease of understanding, a static image is taken as an example, and the processing process of the dynamic image and the static image is similar.
本发明实施例所涉及的拍摄对象可以是人、动物、物品、花鸟虫草等等,通常,一幅图中除拍摄对象之外的部分是拍摄背景。对于风景类图像不好确定拍摄对象的情况,可根据各部分所占的比例来确定拍摄对象,可将所占比例大的部分视为拍摄对象,其他部分视为拍摄背景。The object to be photographed in the embodiment of the present invention may be a person, an animal, an article, a flower, a bird, or the like. Generally, a portion other than the subject in a picture is a photographing background. In the case where the scenery image is not well-determined, the subject can be determined according to the proportion of each part, and the portion with a large proportion can be regarded as a subject, and the other portion is regarded as a shooting background.
下面将结合附图2-附图5对本发明实施例提供的拍摄方法进行详细介绍。The photographing method provided by the embodiment of the present invention will be described in detail below with reference to FIG. 2 to FIG.
请参见图2,是本发明实施例提供的一种拍摄方法的流程示意图,包括但不限于以下步骤:FIG. 2 is a schematic flowchart of a shooting method according to an embodiment of the present invention, including but not limited to the following steps:
步骤S201:在启动相机应用程序的情况下,从拍摄预览界面输出的拍摄图像中提取拍摄对象图像。Step S201: In the case where the camera application is started, the photographic subject image is extracted from the captured image output from the shooting preview interface.
其中,相机应用程序可以是用户终端自带的相机应用程序,即***自带的相机应用程序,也可以是从应用商店下载的相机应用程序,具体是哪种在本发明实施例中不作限定。The camera application may be a camera application that is provided by the user terminal, that is, a camera application that is provided by the system, or a camera application that is downloaded from the application store, which is not limited in the embodiment of the present invention.
用户终端在接收到针对所述相机应用程序输入的启动指令时,启动所述相机应用程序。所述启动指令可以是用户点击或双击所述相机应用程序的图标,也可以是按压所述相机应用程序对应的快捷按钮,还可以是用于启动所述相机应用程序的语音指令等等。The user terminal launches the camera application upon receiving a start command input for the camera application. The startup instruction may be an icon of the camera application clicked or double-clicked by the user, or may be a shortcut button corresponding to pressing the camera application, or may be a voice instruction for starting the camera application or the like.
启动所述相机应用程序,此时所述用户终端的显示界面变为拍摄界面,所述拍摄界面的界面示意图可参见图2所示。请参见图2所示的拍摄界面示意图,其中,白色区域为拍摄预览界面,用于显示摄像头采集的拍摄图像;顶部黑色区域为拍摄选项,包括闪光、定时、色调等选项;底部黑色区域包括拍摄类型选项、图片选项、摄像头选项、拍摄按钮。需要说明的是,图2所示的拍摄界面示意图还包括背景替换选项,未在图2中标明,可能位于顶部黑色区域,也可能位于底部黑色区域,具***置由所述用户终端的制造厂商设定。需要说明
的是,图2所示的拍摄界面仅用于举例,所展示的内容以及各个区域所占的比例并不构成对本发明实施例的限定,具体所展示的内容以及各个区域所占的比例由所述用户终端的制造厂商设定。The camera application is started, and the display interface of the user terminal becomes a shooting interface. The interface of the shooting interface can be seen in FIG. 2 . Please refer to the schematic diagram of the shooting interface shown in Figure 2, where the white area is the shooting preview interface for displaying the captured image captured by the camera; the top black area is the shooting option, including flash, timing, color and other options; the bottom black area includes shooting Type options, image options, camera options, shooting buttons. It should be noted that the photographing interface diagram shown in FIG. 2 further includes a background replacement option, which is not indicated in FIG. 2, and may be located in the top black area or in the bottom black area, and the specific position is set by the manufacturer of the user terminal. set. Need to explain
The photographing interface shown in FIG. 2 is only used as an example, and the content displayed and the proportion of each area do not constitute a limitation on the embodiment of the present invention, and the content displayed and the proportion of each area are The manufacturer's settings for the user terminal.
在启动所述相机应用程序的情况下,摄像头采集拍摄图像,所述用户终端在所述拍摄预览界面中输出所述拍摄图像。若所述背景替换选项对应于需要进行背景替换,则所述用户终端从输出的所述拍摄图像中提取拍摄对象图像。一般而言,所述拍摄图像由拍摄对象图像和拍摄背景图像组成,以一幅人物图像为例,该人物图像中的人物即为拍摄对象,除人物之外的部分即为拍摄背景。In the case of launching the camera application, the camera captures a captured image, and the user terminal outputs the captured image in the shooting preview interface. If the background replacement option corresponds to the need for background replacement, the user terminal extracts a subject image from the output captured image. Generally, the captured image is composed of a subject image and a photographed background image. Taking a person image as an example, a person in the person image is a subject, and a part other than the person is a photographing background.
在一种可能实现的方式中,所述用户终端根据识物算法从输出的所述拍摄图像中识别出拍摄对象,并提取所述拍摄对象对应的拍摄对象图像。所述识物算法是一种智能的识物算法,能够对拍摄图像中的拍摄对象进行识别,进而便于提取所述拍摄对象对应的拍摄对象图像,例如,采用识物算法识别出是人物,根据人物图像的特征圈定人物的边缘位置,进而提取出人物图像。根据识物算法提取拍摄对象图像,简单便捷,不过提取的准确性依赖于算法的识别度,算法的识别度越高,提取的准确性越高。In a possible implementation manner, the user terminal identifies a photographic subject from the output captured image according to a recognition algorithm, and extracts a photographic subject image corresponding to the photographic subject. The recognition algorithm is an intelligent recognition algorithm capable of recognizing a photographic subject in a captured image, thereby facilitating extraction of a photographic subject image corresponding to the photographic subject, for example, using a recognition algorithm to identify a person, according to The feature of the character image defines the edge position of the character, and the character image is extracted. It is simple and convenient to extract the image of the subject according to the recognition algorithm, but the accuracy of the extraction depends on the recognition degree of the algorithm. The higher the recognition degree of the algorithm, the higher the accuracy of the extraction.
在一种可能实现的方式中,所述用户终端根据针对所述拍摄图像的区域选择指令,从所述拍摄图像中确定出拍摄对象区域,从所述拍摄对象区域中提取拍摄对象图像。所述区域选择指令可以用户输入的,例如,用户在所述拍摄图像中选择圈定一个区域,该区域包括所述拍摄对象图像,但是该区域可能还包括其他图像,因此需进一步从该区域中提取出所述拍摄对象图像。所述区域选择指令也可以是所述用户终端自动识别的,识别出所述拍摄对象图像占用的大概区域,然后再进一步识别出所述拍摄对象图像占用的区域,从而便于提取所述拍摄对象图像。通过在确定拍摄对象区域之后再提取拍摄对象图像,可以缩小提取范围,有利于提高提取的准确性。In a possible implementation manner, the user terminal determines a photographic subject area from the captured image according to an area selection instruction for the captured image, and extracts a photographic subject image from the photographic subject area. The area selection instruction may be input by a user. For example, the user selects and delineates an area in the captured image, the area includes the image of the subject, but the area may further include other images, so further extraction from the area is needed. The subject image is taken out. The area selection instruction may also be automatically recognized by the user terminal, identify an approximate area occupied by the image of the photographic subject, and then further identify an area occupied by the photographic subject image, thereby facilitating extraction of the photographic subject image. . By extracting the image of the subject after determining the region of the subject, the extraction range can be narrowed, which is advantageous for improving the accuracy of the extraction.
上述两种提取拍摄对象图像的方式并不构成对本发明实施例的限定,还可以采用其他方式提取拍摄对象图像。The above two methods of extracting the image of the subject are not limited to the embodiment of the present invention, and the image of the subject may be extracted by other means.
步骤S202:获取与所述拍摄对象图像相匹配的目标背景图像,并将所述拍摄背景图像替换为所述目标背景图像。Step S202: Acquire a target background image that matches the image of the photographic subject, and replace the captured background image with the target background image.
所述用户终端获取与所述拍摄对象图像相匹配的目标背景图像,并将所述拍摄背景图像替换为所述目标背景图像。所述目标背景图像可以是静态的,也
可以是动态的。所述目标背景图像可以是留有空白的背景图像,这些空白的地方可用于所述拍摄对象图像的填充,以便与所述拍摄对象图像融合。所述目标背景图像也可以是未留有空白的背景图像,与所述拍摄对象图像融合时,所述拍摄对象图像可置于所述目标背景图像之上,即所述拍摄对象图像将重叠部分覆盖了,对用户而言,看不到所述目标背景图像中的这部分。The user terminal acquires a target background image that matches the image of the photographic subject, and replaces the captured background image with the target background image. The target background image can be static, also
Can be dynamic. The target background image may be a background image with blanks, and the blanks may be used for filling of the photographic subject image to be fused with the photographic subject image. The target background image may also be a background image without leaving a blank. When fused with the photographic subject image, the photographic subject image may be placed above the target background image, that is, the photographic subject image will overlap. Covered, for the user, this part of the target background image is not visible.
在一种可能实现的方式中,所述用户终端可直接向所述相机应用程序对应的服务器获取所述目标背景图像。所述用户终端可将提取的所述拍摄对象图像发送至所述服务器,由所述服务器在数据库存储的多个背景图像中选择一个作为目标背景图像,并将选择的所述目标背景图像发送至所述用户终端。所述服务器可通过一些算法在多个背景图像中选择一个作为目标背景图像。所述服务器还可以通过数据库中的匹配记录确定目标背景图像。In a possible implementation manner, the user terminal may directly acquire the target background image from a server corresponding to the camera application. The user terminal may send the extracted image of the photographic subject to the server, select one of the plurality of background images stored in the database as the target background image, and send the selected target background image to the target terminal image The user terminal. The server may select one of the plurality of background images as the target background image by some algorithms. The server can also determine the target background image from the matching records in the database.
在一种可能实现的方式中,所述用户终端可从所述相机应用程序对应的服务器中获取与所述拍摄对象图像相匹配的背景图像集合,根据针对所述背景图像集合输入的选择指令从背景图像集合中确定目标背景图像。例如,所述拍摄对象图像为人物图像,与人物图像相匹配的背景图像集合可以是风景背景图像集合,即所述服务器为人物图像提供多个风景背景图像,用户可从这多个风景背景图像中选择一个作为目标背景图像。In a possible implementation manner, the user terminal may acquire, from a server corresponding to the camera application, a background image set that matches the image of the photographic subject, according to a selection instruction input for the background image set. The target background image is determined in the background image collection. For example, the image of the subject is a person image, and the set of background images matching the image of the person may be a set of landscape background images, that is, the server provides a plurality of landscape background images for the character image, and the user may obtain images from the plurality of landscape backgrounds. Select one as the target background image.
在一种可能实现的方式中,所述用户终端可提供本端存储的一些图像并将这些图像作为背景图像供用户选择,然后根据用户针对这些图像输入的选择指令确定目标背景图像。In a possible implementation manner, the user terminal may provide some images stored by the local end and use the images as background images for the user to select, and then determine a target background image according to a selection instruction input by the user for the image inputs.
在一种可能实现的方式中,所述用户终端可对所述拍摄背景图像进行旋转得到一个背景图像,将这个背景图像作为目标背景图像。旋转的角度在本发明实施例中不作限定。In a possible implementation manner, the user terminal may rotate the shooting background image to obtain a background image, and use the background image as a target background image. The angle of rotation is not limited in the embodiment of the invention.
上述几种获取目标背景图像的方式并不构成对本发明实施例的限定,还可以采用其他方式获取目标背景图像。The manner of obtaining the target background image does not limit the embodiment of the present invention, and the target background image may be acquired in other manners.
请参见图4,是本发明实施例提供的背景替换示意图。图4中的背景替换过程为:白色的拍摄背景图像替换为灰色的目标背景图像,而拍摄对象图像未发生变化,并且此时用户还未输入拍摄指令。需要说明的是,图4所示仅用于举例,并不构成对本发明实施例的限定。FIG. 4 is a schematic diagram of a background replacement provided by an embodiment of the present invention. The background replacement process in FIG. 4 is that the white shooting background image is replaced with the gray target background image, and the subject image has not changed, and the user has not input the shooting instruction at this time. It should be noted that FIG. 4 is only for exemplification and does not constitute a limitation on the embodiments of the present invention.
步骤S203:调整所述拍摄对象图像和/或所述目标背景图像。
Step S203: Adjust the subject image and/or the target background image.
所述用户终端调整所述拍摄对象图像和/或所述目标背景图像,以更好地融合所述拍摄对象图像和所述目标背景图像,使融合后的图像效果更好。The user terminal adjusts the photographic subject image and/or the target background image to better fuse the photographic subject image and the target background image, so that the fused image effect is better.
在一种可能实现的方式中,用户移动和/或偏转所述用户终端,使得所述拍摄对象图像对应的原始拍摄对象与所述用户终端的摄像头之间距离和/或角度发生变化,进而影响在所述拍摄预览界面输出的所述拍摄对象图像。用户通过移动和/或偏转所述用户终端来调整所述拍摄对象图像,以便所述拍摄对象图像与所述目标背景图像更好地融合。具体根据所述拍摄对象图像对应的原始拍摄对象与所述摄像头之间的距离和/或角度调整所述拍摄对象图像的方法在本发明实施中不作限定。In a possible implementation manner, the user moves and/or deflects the user terminal such that the distance and/or angle between the original photographic subject corresponding to the photographic subject image and the camera of the user terminal changes, thereby affecting The subject image outputted on the photographing preview interface. The user adjusts the subject image by moving and/or deflecting the user terminal such that the subject image blends better with the target background image. The method for adjusting the image of the photographic subject according to the distance and/or the angle between the original photographic subject and the camera corresponding to the photographic subject image is not limited in the implementation of the present invention.
在一种可能实现的方式中,用户移动所述用户终端,不改变所述拍摄对象图像,而是改变所述目标背景图像,根据所述拍摄对象图像对应的原始拍摄对象与所述摄像头之间的距离调整所述目标背景图像的方法在本发明实施中不作限定。In a possible implementation manner, the user moves the user terminal without changing the image of the photographic subject, but changes the target background image, according to the original photographic object corresponding to the photographic subject image and the camera The method of adjusting the target background image is not limited in the implementation of the present invention.
在一种可能实现的方式中,所述用户终端根据用户输入的调整指令调整所述拍摄对象图像或所述目标背景图像。所述调整指令可以是针对所述拍摄对象图像输入的,此时根据所述调整指令调整所述拍摄对象图像;也可以是针对所述目标背景图像输入的,此时根据所述调整指令调整所述目标背景图像。In a possible implementation manner, the user terminal adjusts the photographic subject image or the target background image according to an adjustment instruction input by a user. The adjustment instruction may be input to the image of the photographic subject, and the image of the photographic subject is adjusted according to the adjustment instruction; or may be input for the target background image, and the adjustment instruction is adjusted according to the adjustment instruction. The target background image.
上述几种调整方式并不构成对本发明实施例的限定,还可以采用其他方式进行调整。The above adjustment manners do not constitute a limitation on the embodiments of the present invention, and may be adjusted in other manners.
步骤S204:在接收到拍摄指令的情况下,输出并保存调整后的图像。Step S204: When the shooting instruction is received, the adjusted image is output and saved.
所述用户终端在接收到拍摄指令的情况下,输出并保存调整后的图像。The user terminal outputs and saves the adjusted image when receiving the shooting instruction.
用户调整所述拍摄对象图像和/或所述目标背景图像以寻找所需的合成效果,在用户确定所需的合成效果时,针对所述拍摄预览界面中的拍摄按钮输入的拍摄指令或针对物理拍摄按键输入的拍摄指令,即点击或按压所述拍摄按钮或物理拍摄按键。所述用户终端在接收所述拍摄指令时,将调整后的图像输出并保存所述调整后的图像,即输出并保存合成图像。这样,用户终端只需保存最终合成的图像,而无需保存待处理的图像,可以节省存储空间。The user adjusts the photographic subject image and/or the target background image to find a desired compositing effect, and when the user determines a desired compositing effect, a shooting instruction or a physics input for the shooting button in the shooting preview interface Shoot the shooting command input by the button, that is, click or press the shooting button or physical shooting button. When receiving the shooting instruction, the user terminal outputs the adjusted image and saves the adjusted image, that is, outputs and saves the composite image. In this way, the user terminal only needs to save the final synthesized image without saving the image to be processed, thereby saving storage space.
在输出并保存所述调整后的图像之后,所述用户终端可将所述调整后的图像发送至所述相机应用程序对应的服务器,以便所述服务器记录合成效果,以及所述用户终端所采用的所述目标背景图像。
After outputting and saving the adjusted image, the user terminal may send the adjusted image to a server corresponding to the camera application, so that the server records a composite effect, and the user terminal adopts The target background image.
在输出并保存所述调整后的图像之前,所述用户终端可对合成图像的色彩、噪音等进行处理,以使合成图像的图像效果更好。例如,对合成的人物图像进行美颜处理,对合成的美食图像进行润色处理等。Before outputting and saving the adjusted image, the user terminal may process the color, noise, and the like of the composite image to make the image effect of the composite image better. For example, the synthesized person image is subjected to a beauty treatment, and the synthesized food image is subjected to a touch-up processing or the like.
在图2所描述的实施例中,通过在启动相机应用程序的情况下,从拍摄预览界面输出的拍摄图像中提取拍摄对象图像,获取与拍摄对象图像相匹配的目标背景图像,并将拍摄背景图像替换为目标背景图像,调整拍摄对象图像和/或目标背景图像,并在接收到针对拍摄预设界面输入的拍摄指令的情况下,输出并保存调整后的图像,从而实现拍摄过程中的背景处理,可以节省存储空间,提高用户终端的智能性。In the embodiment described in FIG. 2, by extracting a photographic subject image from a captured image output from the shooting preview interface, a target background image matching the photographic subject image is acquired by starting the camera application, and the background is captured. The image is replaced with the target background image, the subject image and/or the target background image are adjusted, and when the photographing instruction input for the photographing preset interface is received, the adjusted image is output and saved, thereby realizing the background during shooting Processing can save storage space and improve the intelligence of the user terminal.
请参见图5,是本发明实施例提供的另一种拍摄方法的流程示意图,包括但不限于以下步骤:FIG. 5 is a schematic flowchart diagram of another shooting method according to an embodiment of the present invention, including but not limited to the following steps:
步骤S501:在启动相机应用程序的情况下,从拍摄预览界面输出的拍摄图像中提取拍摄对象图像。Step S501: In the case where the camera application is started, the photographic subject image is extracted from the captured image output by the shooting preview interface.
图5所示实施例中的步骤S501的描述可参见图2所示实施例中的步骤S201的描述,在此不再赘述。For the description of step S501 in the embodiment shown in FIG. 5, reference may be made to the description of step S201 in the embodiment shown in FIG. 2, and details are not described herein again.
步骤S502:从所述相机应用程序对应的服务器中获取与所述拍摄对象图像相匹配的背景图像集合。Step S502: Acquire a background image set matching the image of the photographic subject from a server corresponding to the camera application.
所述用户终端向所述相机应用程序对应的服务器发送获取请求,该获取请求用于请求所述服务器提供与所述拍摄对象图像相匹配的背景图像集合,所述服务器在接收到该获取请求时,向所述用户终端反馈与所述拍摄对象图像相匹配的背景图像集合,以响应该获取请求。The user terminal sends an acquisition request to a server corresponding to the camera application, where the acquisition request is used to request the server to provide a background image set that matches the image of the photographic subject, and the server receives the acquisition request. And feeding back, to the user terminal, a background image set that matches the image of the photographic subject in response to the acquisition request.
所述服务器可根据所述拍摄对象图像的类型在预设对应表中查找与所述拍摄对象图像相匹配的背景图像集合。其中,所述预设对应表包括拍摄对象图像类型与其对应的背景图像集合之间的对应关系,拍摄对象图像类型可以包括人物、动物、食物、物品等。例如,所述拍摄对象图像的类型为人物,与人物图像相匹配的背景图像集合可以是风景背景图像集合。The server may search for a background image set matching the image of the photographic subject in the preset correspondence table according to the type of the photographic subject image. The preset correspondence table includes a correspondence relationship between a type of the image of the photographic subject and a background image set corresponding thereto, and the image type of the photographic subject may include a person, an animal, a food, an item, and the like. For example, the type of the subject image is a character, and the background image set matching the character image may be a landscape background image collection.
步骤S503:根据针对所述背景图像集合输入的选择指令从所述背景图像集合中确定目标背景图像。Step S503: Determine a target background image from the background image set according to a selection instruction input for the background image set.
所述用户终端根据用户针对所述背景图像集合输入的选择指令从所述背景图像集合中确定目标背景图像,即根据所述选择指令确定目标背景图像。所
述目标背景图像即为用户所选择的一个背景图像。The user terminal determines a target background image from the background image set according to a selection instruction input by the user for the background image set, that is, determines a target background image according to the selection instruction. Place
The target background image is a background image selected by the user.
步骤S504:将所述拍摄背景图像替换为所述目标背景图像。Step S504: replacing the shooting background image with the target background image.
所述用户终端将所述拍摄背景图像替换为所述目标背景图像,可参见图4所示的背景替换示意图。The user terminal replaces the shooting background image with the target background image. See the background replacement diagram shown in FIG. 4 .
步骤S505:根据所述拍摄对象图像对应的原始拍摄对象与摄像头之间的距离和/或角度调整所述拍摄对象图像和/或所述目标背景图像。Step S505: Adjust the photographic subject image and/or the target background image according to a distance and/or an angle between the original photographic subject and the camera corresponding to the photographic subject image.
所述用户终端根据所述拍摄对象图像对应的原始拍摄对象与摄像头之间的距离和/或角度调整所述拍摄对象图像和/或所述目标背景图像。The user terminal adjusts the photographic subject image and/or the target background image according to a distance and/or an angle between the original photographic subject corresponding to the photographic subject image and the camera.
用户移动和/或偏转所述用户终端,使得所述拍摄对象图像对应的原始拍摄对象与所述用户终端的摄像头之间距离和/或角度发生变化,所述用户终端可根据变化的距离和/或角度来调整所述拍摄对象图像和/或所述目标背景图像。换言之,用户移动和/或偏转所述用户终端来调整所述拍摄对象图像和/或所述目标背景图像,以寻找所需的合成效果。The user moves and/or deflects the user terminal such that the distance and/or angle between the original photographic subject corresponding to the photographic subject image and the camera of the user terminal changes, and the user terminal can change according to the distance and/or Or an angle to adjust the subject image and/or the target background image. In other words, the user moves and/or deflects the user terminal to adjust the subject image and/or the target background image to find the desired composite effect.
步骤S506:在接收到拍摄指令的情况下,输出并保存调整后的图像。Step S506: When the shooting instruction is received, the adjusted image is output and saved.
图5所示实施例中的步骤S506的描述可参见图2所示实施例中的步骤S204的描述,在此不再赘述。For the description of step S506 in the embodiment shown in FIG. 5, reference may be made to the description of step S204 in the embodiment shown in FIG. 2, and details are not described herein again.
在图5所描述的实施例中,由相机应用程序对应的服务器向用户终端提供与拍摄对象图像相匹配的背景图像集合,以供用户选择,从而确定出目标背景图像,以便用户终端进行背景替换处理。In the embodiment depicted in FIG. 5, the server corresponding to the camera application provides the user terminal with a background image set that matches the image of the photographic subject for selection by the user, thereby determining the target background image for the user terminal to perform background replacement. deal with.
请参见图6,是本发明实施例提供的用户终端的逻辑结构示意图。图6所示的用户终端60包括处理单元601和输出单元602。FIG. 6 is a schematic diagram of a logical structure of a user terminal according to an embodiment of the present invention. The user terminal 60 shown in FIG. 6 includes a processing unit 601 and an output unit 602.
所述处理单元601,用于在启动相机应用程序的情况下,从拍摄预览界面输出的拍摄图像中提取拍摄对象图像,所述拍摄图像包括所述拍摄对象图像和拍摄背景图像。The processing unit 601 is configured to extract a photographic subject image from the captured image output by the shooting preview interface, where the captured image includes the photographic subject image and the photographic background image.
其中,相机应用程序可以是用户终端60自带的相机应用程序,即***自带的相机应用程序,也可以是从应用商店下载的相机应用程序,具体是哪种在本发明实施例中不作限定。The camera application may be a camera application that is provided by the user terminal 60, that is, a camera application that is provided by the system, or a camera application that is downloaded from the application store, which is not limited in the embodiment of the present invention. .
用户终端60在接收到针对所述相机应用程序输入的启动指令时,启动所述相机应用程序。所述启动指令可以是用户点击或双击所述相机应用程序的图标,也可以是按压所述相机应用程序对应的快捷按钮,还可以是用于启动所述
相机应用程序的语音指令等等。The user terminal 60 activates the camera application upon receiving a start command input for the camera application. The startup command may be an icon of the camera application clicked or double-clicked by the user, or may be a shortcut button corresponding to pressing the camera application, or may be used to start the
Voice commands for camera applications and more.
启动所述相机应用程序,此时所述用户终端60的显示界面变为拍摄界面,所述拍摄界面的界面示意图可参见图2所示。请参见图2所示的拍摄界面示意图,其中,白色区域为拍摄预览界面,用于显示摄像头采集的拍摄图像;顶部黑色区域为拍摄选项,包括闪光、定时、色调等选项;底部黑色区域包括拍摄类型选项、图片选项、摄像头选项、拍摄按钮。需要说明的是,图2所示的拍摄界面示意图还包括背景替换选项,未在图2中标明,可能位于顶部黑色区域,也可能位于底部黑色区域,具***置由所述用户终端的制造厂商设定。需要说明的是,图2所示的拍摄界面仅用于举例,所展示的内容以及各个区域所占的比例并不构成对本发明实施例的限定,具体所展示的内容以及各个区域所占的比例由所述用户终端的制造厂商设定。The camera application is started, and the display interface of the user terminal 60 becomes a shooting interface. The interface of the shooting interface can be seen in FIG. 2 . Please refer to the schematic diagram of the shooting interface shown in Figure 2, where the white area is the shooting preview interface for displaying the captured image captured by the camera; the top black area is the shooting option, including flash, timing, color and other options; the bottom black area includes shooting Type options, image options, camera options, shooting buttons. It should be noted that the photographing interface diagram shown in FIG. 2 further includes a background replacement option, which is not indicated in FIG. 2, and may be located in the top black area or in the bottom black area, and the specific position is set by the manufacturer of the user terminal. set. It should be noted that the photographing interface shown in FIG. 2 is only used as an example, and the content displayed and the proportion of each area do not constitute a limitation on the embodiment of the present invention, and the content and the proportion of each area are displayed. Set by the manufacturer of the user terminal.
在启动所述相机应用程序的情况下,摄像头采集拍摄图像,所述输出单元602在所述拍摄预览界面中输出所述拍摄图像。若所述背景替换选项对应于需要进行背景替换,则所述处理单元601从输出的所述拍摄图像中提取拍摄对象图像。一般而言,所述拍摄图像由拍摄对象图像和拍摄背景图像组成,以一幅人物图像为例,该人物图像中的人物即为拍摄对象,除人物之外的部分即为拍摄背景。In the case where the camera application is launched, the camera captures a captured image, and the output unit 602 outputs the captured image in the shooting preview interface. If the background replacement option corresponds to the need for background replacement, the processing unit 601 extracts a photographic subject image from the output captured image. Generally, the captured image is composed of a subject image and a photographed background image. Taking a person image as an example, a person in the person image is a subject, and a part other than the person is a photographing background.
在一种可能实现的方式中,所述处理单元601根据识物算法从输出的所述拍摄图像中识别出拍摄对象,并提取所述拍摄对象对应的拍摄对象图像。所述识物算法是一种智能的识物算法,能够对拍摄图像中的拍摄对象进行识别,进而便于提取所述拍摄对象对应的拍摄对象图像,例如,采用识物算法识别出是人物,根据人物图像的特征圈定人物的边缘位置,进而提取出人物图像。根据识物算法提取拍摄对象图像,简单便捷,不过提取的准确性依赖于算法的识别度,算法的识别度越高,提取的准确性越高。In a possible implementation manner, the processing unit 601 identifies a photographic subject from the output captured image according to the recognition algorithm, and extracts a photographic subject image corresponding to the photographic subject. The recognition algorithm is an intelligent recognition algorithm capable of recognizing a photographic subject in a captured image, thereby facilitating extraction of a photographic subject image corresponding to the photographic subject, for example, using a recognition algorithm to identify a person, according to The feature of the character image defines the edge position of the character, and the character image is extracted. It is simple and convenient to extract the image of the subject according to the recognition algorithm, but the accuracy of the extraction depends on the recognition degree of the algorithm. The higher the recognition degree of the algorithm, the higher the accuracy of the extraction.
在一种可能实现的方式中,所述处理单元601根据针对所述拍摄图像的区域选择指令,从所述拍摄图像中确定出拍摄对象区域,从所述拍摄对象区域中提取拍摄对象图像。所述区域选择指令可以用户输入的,例如,用户在所述拍摄图像中选择圈定一个区域,该区域包括所述拍摄对象图像,但是该区域可能还包括其他图像,因此需进一步从该区域中提取出所述拍摄对象图像。所述区域选择指令也可以是所述处理单元601自动识别的,识别出所述拍摄对象图像
占用的大概区域,然后所述处理单元601再进一步识别出所述拍摄对象图像占用的区域,从而便于提取所述拍摄对象图像。通过在确定拍摄对象区域之后再提取拍摄对象图像,可以缩小提取范围,有利于提高提取的准确性。In a possible implementation manner, the processing unit 601 determines a photographic subject area from the captured image according to an area selection instruction for the captured image, and extracts a photographic subject image from the photographic subject area. The area selection instruction may be input by a user. For example, the user selects and delineates an area in the captured image, the area includes the image of the subject, but the area may further include other images, so further extraction from the area is needed. The subject image is taken out. The area selection instruction may also be automatically recognized by the processing unit 601, and the image of the subject is identified.
The approximate area occupied, and then the processing unit 601 further recognizes the area occupied by the image of the subject, thereby facilitating the extraction of the image of the subject. By extracting the image of the subject after determining the region of the subject, the extraction range can be narrowed, which is advantageous for improving the accuracy of the extraction.
上述两种提取拍摄对象图像的方式并不构成对本发明实施例的限定,还可以采用其他方式提取拍摄对象图像。The above two methods of extracting the image of the subject are not limited to the embodiment of the present invention, and the image of the subject may be extracted by other means.
所述处理单元601,还用于获取与所述拍摄对象图像相匹配的目标背景图像,并将所述拍摄背景图像替换为所述目标背景图像。The processing unit 601 is further configured to acquire a target background image that matches the image of the photographic subject, and replace the captured background image with the target background image.
所述处理单元601获取与所述拍摄对象图像相匹配的目标背景图像,并将所述拍摄背景图像替换为所述目标背景图像。所述目标背景图像可以是静态的,也可以是动态的。所述目标背景图像可以是留有空白的背景图像,这些空白的地方可用于所述拍摄对象图像的填充,以便与所述拍摄对象图像融合。所述目标背景图像也可以是未留有空白的背景图像,与所述拍摄对象图像融合时,所述拍摄对象图像可置于所述目标背景图像之上,即所述拍摄对象图像将重叠部分覆盖了,对用户而言,看不到所述目标背景图像中的这部分。The processing unit 601 acquires a target background image that matches the image of the photographic subject, and replaces the captured background image with the target background image. The target background image may be static or dynamic. The target background image may be a background image with blanks, and the blanks may be used for filling of the photographic subject image to be fused with the photographic subject image. The target background image may also be a background image without leaving a blank. When fused with the photographic subject image, the photographic subject image may be placed above the target background image, that is, the photographic subject image will overlap. Covered, for the user, this part of the target background image is not visible.
在一种可能实现的方式中,所述处理单元601可直接向所述相机应用程序对应的服务器获取所述目标背景图像。所述用户终端60可将提取的所述拍摄对象图像发送至所述服务器,由所述服务器在数据库存储的多个背景图像中选择一个作为目标背景图像,并将选择的所述目标背景图像发送至所述用户终端60。所述服务器可通过一些算法在多个背景图像中选择一个作为目标背景图像。所述服务器还可以通过数据库中的匹配记录确定目标背景图像。In a possible implementation manner, the processing unit 601 may directly acquire the target background image from a server corresponding to the camera application. The user terminal 60 may send the extracted image of the photographic subject to the server, select one of the plurality of background images stored in the database as the target background image, and send the selected target background image To the user terminal 60. The server may select one of the plurality of background images as the target background image by some algorithms. The server can also determine the target background image from the matching records in the database.
在一种可能实现的方式中,所述处理单元601可从所述相机应用程序对应的服务器中获取与所述拍摄对象图像相匹配的背景图像集合,根据针对所述背景图像集合输入的选择指令从背景图像集合中确定目标背景图像。例如,所述拍摄对象图像为人物图像,与人物图像相匹配的背景图像集合可以是风景背景图像集合,即所述服务器为人物图像提供多个风景背景图像,用户可从这多个风景背景图像中选择一个作为目标背景图像。In a possible implementation manner, the processing unit 601 may acquire, from a server corresponding to the camera application, a background image set that matches the image of the photographic subject, according to a selection instruction input for the background image set. The target background image is determined from the background image collection. For example, the image of the subject is a person image, and the set of background images matching the image of the person may be a set of landscape background images, that is, the server provides a plurality of landscape background images for the character image, and the user may obtain images from the plurality of landscape backgrounds. Select one as the target background image.
在一种可能实现的方式中,所述用户终端60可提供本端存储的一些图像并将这些图像作为背景图像供用户选择,然后所述处理单元601根据用户针对这些图像输入的选择指令确定目标背景图像。In a possible implementation manner, the user terminal 60 may provide some images stored by the local end and use the images as background images for the user to select, and then the processing unit 601 determines the target according to the selection instruction input by the user for the image inputs. Background image.
在一种可能实现的方式中,所述处理单元601可对所述拍摄背景图像进行
旋转得到一个背景图像,将这个背景图像作为目标背景图像。旋转的角度在本发明实施例中不作限定。In a possible implementation manner, the processing unit 601 can perform the shooting background image
Rotate to get a background image, which is used as the target background image. The angle of rotation is not limited in the embodiment of the invention.
上述几种获取目标背景图像的方式并不构成对本发明实施例的限定,还可以采用其他方式获取目标背景图像。The manner of obtaining the target background image does not limit the embodiment of the present invention, and the target background image may be acquired in other manners.
请参见图4,是本发明实施例提供的背景替换示意图。图4中的背景替换过程为:白色的拍摄背景图像替换为灰色的目标背景图像,而拍摄对象图像未发生变化,并且此时用户还未输入拍摄指令。需要说明的是,图4所示仅用于举例,并不构成对本发明实施例的限定。FIG. 4 is a schematic diagram of a background replacement provided by an embodiment of the present invention. The background replacement process in FIG. 4 is that the white shooting background image is replaced with the gray target background image, and the subject image has not changed, and the user has not input the shooting instruction at this time. It should be noted that FIG. 4 is only for exemplification and does not constitute a limitation on the embodiments of the present invention.
所述处理单元601,还用于调整所述拍摄对象图像和/或所述目标背景图像。The processing unit 601 is further configured to adjust the image of the photographic subject and/or the target background image.
所述处理单元601调整所述拍摄对象图像和/或所述目标背景图像,以更好地融合所述拍摄对象图像和所述目标背景图像,使融合后的图像效果更好。The processing unit 601 adjusts the image of the photographic subject and/or the target background image to better fuse the photographic subject image and the target background image, so that the fused image is better.
在一种可能实现的方式中,用户移动和/或偏转所述用户终端60,使得所述拍摄对象图像对应的原始拍摄对象与所述用户终端的摄像头之间距离和/或角度发生变化,进而影响在所述拍摄预览界面输出的所述拍摄对象图像。用户通过移动和/或偏转所述用户终端60来调整所述拍摄对象图像,以便所述拍摄对象图像与所述目标背景图像更好地融合。具体所述处理单元601根据所述拍摄对象图像对应的原始拍摄对象与所述摄像头之间的距离和/或角度调整所述拍摄对象图像的方法在本发明实施中不作限定。In a possible implementation manner, the user moves and/or deflects the user terminal 60 such that the distance and/or angle between the original photographic subject corresponding to the photographic subject image and the camera of the user terminal changes. A subject image that is output on the shooting preview interface is affected. The user adjusts the subject image by moving and/or deflecting the user terminal 60 so that the subject image is better fused with the target background image. Specifically, the method for the processing unit 601 to adjust the image of the photographic subject according to the distance and/or the angle between the original photographic subject and the camera corresponding to the photographic subject image is not limited in the implementation of the present invention.
在一种可能实现的方式中,用户移动所述用户终端60,不改变所述拍摄对象图像,而是改变所述目标背景图像,所述处理单元601根据所述拍摄对象图像对应的原始拍摄对象与所述摄像头之间的距离调整所述目标背景图像的方法在本发明实施中不作限定。In a possible implementation manner, the user moves the user terminal 60 without changing the image of the photographic subject, but changes the target background image, and the processing unit 601 is based on the original photographic object corresponding to the photographic subject image. The method of adjusting the target background image by the distance from the camera is not limited in the implementation of the present invention.
在一种可能实现的方式中,所述处理单元601根据用户输入的调整指令调整所述拍摄对象图像或所述目标背景图像。所述调整指令可以是针对所述拍摄对象图像输入的,此时根据所述调整指令调整所述拍摄对象图像;也可以是针对所述目标背景图像输入的,此时根据所述调整指令调整所述目标背景图像。In a possible implementation manner, the processing unit 601 adjusts the photographic subject image or the target background image according to an adjustment instruction input by a user. The adjustment instruction may be input to the image of the photographic subject, and the image of the photographic subject is adjusted according to the adjustment instruction; or may be input for the target background image, and the adjustment instruction is adjusted according to the adjustment instruction. The target background image.
上述几种调整方式并不构成对本发明实施例的限定,还可以采用其他方式进行调整。The above adjustment manners do not constitute a limitation on the embodiments of the present invention, and may be adjusted in other manners.
输出单元602,用于在接收到拍摄指令的情况下,输出并保存调整后的图
像。The output unit 602 is configured to output and save the adjusted image when the shooting instruction is received
image.
所述用户终端60在接收到拍摄指令的情况下,所述输出单元602输出并保存调整后的图像。When the user terminal 60 receives the shooting instruction, the output unit 602 outputs and saves the adjusted image.
用户调整所述拍摄对象图像和/或所述目标背景图像以寻找所需的合成效果,在用户确定所需的合成效果时,针对所述拍摄预览界面中的拍摄按钮输入的拍摄指令或针对物理拍摄按键输入的拍摄指令,即点击或按压所述拍摄按钮或物理拍摄按键。所述用户终端60在接收所述拍摄指令时,所述输出单元602将调整后的图像输出并保存所述调整后的图像,即输出并保存合成图像。这样,用户终端只需保存最终合成的图像,而无需保存待处理的图像,可以节省存储空间。The user adjusts the photographic subject image and/or the target background image to find a desired compositing effect, and when the user determines a desired compositing effect, a shooting instruction or a physics input for the shooting button in the shooting preview interface Shoot the shooting command input by the button, that is, click or press the shooting button or physical shooting button. When the user terminal 60 receives the shooting instruction, the output unit 602 outputs the adjusted image and saves the adjusted image, that is, outputs and saves the composite image. In this way, the user terminal only needs to save the final synthesized image without saving the image to be processed, thereby saving storage space.
在输出并保存所述调整后的图像之后,所述用户终端60可将所述调整后的图像发送至所述相机应用程序对应的服务器,以便所述服务器记录合成效果,以及所述用户终端60所采用的所述目标背景图像。After outputting and saving the adjusted image, the user terminal 60 may transmit the adjusted image to a server corresponding to the camera application, so that the server records a composite effect, and the user terminal 60 The target background image employed.
在输出并保存所述调整后的图像之前,所述处理单元601可对合成图像的色彩、噪音等进行处理,以使合成图像的图像效果更好。例如,对合成的人物图像进行美颜处理,对合成的美食图像进行润色处理等。Before outputting and saving the adjusted image, the processing unit 601 may process the color, noise, and the like of the composite image to make the image effect of the composite image better. For example, the synthesized person image is subjected to a beauty treatment, and the synthesized food image is subjected to a touch-up processing or the like.
图6所示的用户终端,可以实现拍摄过程中的背景处理,可以节省存储空间,提高用户终端的智能性。The user terminal shown in FIG. 6 can implement background processing during shooting, which can save storage space and improve the intelligence of the user terminal.
请参见图7,是本发明实施例提供的用户终端的逻辑结构示意图。用户终端70可以包括通信总线710、无线通信模块720、输出设备730、接口模块740、电源模块750、处理器760、输入设备770和存储器780等等。图7展现了具有各种组件的用户终端,但是应理解的是,并不要求实施所有展现的组件,可以替代地实施更多或更少的组件。其中,通信总线710用于实现这些组件之间的连接通信。FIG. 7 is a schematic diagram of a logical structure of a user terminal according to an embodiment of the present invention. User terminal 70 may include communication bus 710, wireless communication module 720, output device 730, interface module 740, power module 750, processor 760, input device 770, memory 780, and the like. Figure 7 illustrates a user terminal having various components, but it should be understood that not all of the components presented may be implemented, and more or fewer components may be implemented instead. Among them, the communication bus 710 is used to implement connection communication between these components.
无线通信模块720通常包括一个或多个组件,用于实现用户终端70与无线通信***或网络之间的无线通信。无线通信模块720可以包括广播接收单元、移动通信单元、无线互联网单元、短程通信单元和位置信息单元等等。 Wireless communication module 720 typically includes one or more components for enabling wireless communication between user terminal 70 and a wireless communication system or network. The wireless communication module 720 may include a broadcast receiving unit, a mobile communication unit, a wireless internet unit, a short-range communication unit, a location information unit, and the like.
输出设备730用于输出文字、语音、视频等数据,包括显示单元731和音频输出单元732等等。其中,显示单元731用于显示用户终端70或处理器760处理的信息。显示单元731包括用户界面、图形用户界面等等,向用户展现各
种信息。音频输出单元732用于在用户终端处于呼叫信号接收模式、通话模式、记录模式、语音识别模式、广播接收模式等模式下时,将无线通信模块720接收的或者在存储器780中存储的音频数据转换为音频信号并输出为声音。应用在本发明实施例中,输出设备730用于输出拍摄预览界面、拍摄图像(包括拍摄对象图像和拍摄背景图像)、背景图像集合、目标背景图像、合成图像等等。The output device 730 is for outputting text, voice, video, and the like, and includes a display unit 731, an audio output unit 732, and the like. The display unit 731 is configured to display information processed by the user terminal 70 or the processor 760. The display unit 731 includes a user interface, a graphical user interface, and the like, and presents each to the user.
Kind of information. The audio output unit 732 is configured to convert audio data received by the wireless communication module 720 or stored in the memory 780 when the user terminal is in a call signal receiving mode, a call mode, a recording mode, a voice recognition mode, a broadcast receiving mode, and the like. It is an audio signal and is output as sound. In the embodiment of the present invention, the output device 730 is configured to output a shooting preview interface, a captured image (including a subject image and a captured background image), a background image set, a target background image, a composite image, and the like.
接口模块740用于实现用户终端70与外部装置的连接,可以包括有线或无线耳机端口、外部电源端口、有线或无线数据端口、存储卡端口、音频输入/输出端口等等。The interface module 740 is used to implement the connection of the user terminal 70 with an external device, and may include a wired or wireless headphone port, an external power port, a wired or wireless data port, a memory card port, an audio input/output port, and the like.
电源模块750用于向用户终端70的各个组件提供所需的电量。The power module 750 is used to provide the required power to the various components of the user terminal 70.
处理器760用于控制用户终端的各种操作以及各项功能的实现。应用在本发明实施例中,处理器760用于背景替换处理。The processor 760 is used to control various operations of the user terminal and implementation of various functions. In the embodiment of the present invention, the processor 760 is used for background replacement processing.
输入设备770用于接收用户的各项操作以及音频或视频信号,包括A/V输入单元771和用户输入单元772等等。其中,A/V输入单元771用于接收音频或视频信号,可以包括相机和麦克风,相机采集的图像信息在处理器760的控制下由显示单元731显示。用户输入单元772用于接收用户输入的各种操作,例如按压操作、滑动操作等,并对这些滑动操作进行识别、生成相应的命令传递至处理器760,由处理器760控制相应操作的执行或相应功能的实现。The input device 770 is configured to receive various operations of the user as well as audio or video signals, including an A/V input unit 771 and a user input unit 772, and the like. The A/V input unit 771 is configured to receive an audio or video signal, and may include a camera and a microphone. The image information captured by the camera is displayed by the display unit 731 under the control of the processor 760. The user input unit 772 is configured to receive various operations input by the user, such as a pressing operation, a sliding operation, etc., and identify the sliding operations, generate corresponding commands, and transmit the corresponding commands to the processor 760, and the processor 760 controls the execution of the corresponding operations or The implementation of the corresponding function.
存储器780存储着用于处理器760执行处理或控制操作的程序代码,或者暂时存储某些数据,例如通信录、图像、视频等等。存储器780可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。 Memory 780 stores program code for processor 760 to perform processing or control operations, or temporarily stores certain data, such as contacts, images, video, and the like. The memory 780 may be a high speed RAM memory or a non-volatile memory such as at least one disk memory.
具体地,处理器760调用存储器780中存储的程序代码,执行以下操作:Specifically, the processor 760 calls the program code stored in the memory 780 to perform the following operations:
在启动相机应用程序的情况下,从拍摄预览界面输出的拍摄图像中提取拍摄对象图像,所述拍摄图像包括所述拍摄对象图像和拍摄背景图像;Extracting a photographic subject image from the captured image output by the shooting preview interface, the captured image including the photographic subject image and the photographic background image;
获取与所述拍摄对象图像相匹配的目标背景图像,并将所述拍摄背景图像替换为所述目标背景图像;Obtaining a target background image that matches the image of the photographic subject, and replacing the captured background image with the target background image;
调整所述拍摄对象图像和/或所述目标背景图像;Adjusting the subject image and/or the target background image;
在输入设备770接收到拍摄指令的情况下,控制输出设备730输出并保存调整后的图像。
In the case where the input device 770 receives the shooting instruction, the control output device 730 outputs and saves the adjusted image.
可选地,处理器760调用存储器780中存储的程序代码执行从拍摄预览界面输出的拍摄图像中提取拍摄对象图像时,具体执行以下操作:Optionally, when the processor 760 calls the program code stored in the memory 780 to perform the extraction of the image of the captured object from the captured image output by the shooting preview interface, the following operations are specifically performed:
根据识物算法从拍摄预览界面输出的拍摄图像中识别出拍摄对象,并提取所述拍摄对象对应的拍摄对象图像。The photographic subject is recognized from the captured image output from the shooting preview interface according to the recognition algorithm, and the photographic subject image corresponding to the photographic subject is extracted.
可选地,处理器760调用存储器780中存储的程序代码执行从拍摄预览界面输出的拍摄图像中提取拍摄对象图像时,具体执行以下操作:Optionally, when the processor 760 calls the program code stored in the memory 780 to perform the extraction of the image of the captured object from the captured image output by the shooting preview interface, the following operations are specifically performed:
根据针对拍摄预览界面输出的拍摄图像的区域选择指令,从所述拍摄图像中确定出拍摄对象区域,从所述拍摄对象区域中提取拍摄对象图像。The photographic subject area is determined from the captured image based on an area selection command for the captured image outputted by the shooting preview interface, and the photographic subject image is extracted from the photographic subject area.
可选地,处理器760调用存储器780中存储的程序代码执行获取与所述拍摄对象图像相匹配的目标背景图像时,具体执行以下操作:Optionally, when the processor 760 calls the program code stored in the memory 780 to perform the acquisition of the target background image that matches the image of the photographic subject, the following operations are specifically performed:
从所述相机应用程序对应的服务器中获取与所述拍摄对象图像相匹配的背景图像集合;Obtaining a background image set matching the image of the photographic subject from a server corresponding to the camera application;
根据针对所述背景图像集合输入的选择指令从所述背景图像集合中确定目标背景图像。A target background image is determined from the set of background images based on a selection instruction input for the set of background images.
可选地,处理器760调用存储器780中存储的程序代码执行调整所述拍摄对象图像和/或所述目标背景图像时,具体执行以下操作:Optionally, when the processor 760 calls the program code stored in the memory 780 to perform adjustment of the photographic subject image and/or the target background image, specifically performing the following operations:
根据所述拍摄对象图像对应的原始拍摄对象与摄像头之间的距离和/或角度调整所述拍摄对象图像和/或所述目标背景图像。The photographic subject image and/or the target background image are adjusted according to a distance and/or an angle between the original photographic subject corresponding to the photographic subject image and the camera.
本发明实施例还提供一种计算机可读存储介质,该计算机可读存储介质有计算机程序,该计算机程序包括程序指令,该程序指令当被处理器执行时使处理器执行如图2和图5所示的方法。The embodiment of the present invention further provides a computer readable storage medium having a computer program, the computer program comprising program instructions, when executed by the processor, causing the processor to execute as shown in FIG. 2 and FIG. 5. The method shown.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为根据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should understand that the present invention is not limited by the described action sequence. Because certain steps may be performed in other sequences or concurrently in accordance with the present invention. In the following, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above embodiments, the descriptions of the various embodiments are different, and the details that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删
减。The steps in the method of the embodiment of the present invention may be sequentially adjusted, merged, and deleted according to actual needs.
Less.
本发明实施例装置中的单元可以根据实际需要进行合并、划分和删减。本领域的技术人员可以将本说明书中描述的不同实施例以及不同实施例的特征进行结合或组合。The units in the apparatus of the embodiment of the present invention may be combined, divided, and deleted according to actual needs. Those skilled in the art can combine or combine the different embodiments described in the specification and the features of the different embodiments.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本发明可以用硬件实现,或固件实现,或它们的组合方式来实现。当使用软件实现时,可以将上述功能存储在计算机可读介质中或作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是计算机能够存取的任何可用介质。以此为例但不限于:计算机可读介质可以包括随机存取存储器(Random Access Memory,RAM)、只读存储器(Read-Only Memory,ROM)、电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质。此外。任何连接可以适当的成为计算机可读介质。例如,如果软件是使用同轴电缆、光纤光缆、双绞线、数字用户线(Digital Subscriber Line,DSL)或者诸如红外线、无线电和微波之类的无线技术从网站、服务器或者其他远程源传输的,那么同轴电缆、光纤光缆、双绞线、DSL或者诸如红外线、无线和微波之类的无线技术包括在所属介质的定影中。如本发明所使用的,盘(Disk)和碟(disc)包括压缩光碟(CD)、激光碟、光碟、数字通用光碟(DVD)、软盘和蓝光光碟,其中盘通常磁性的复制数据,而碟则用激光来光学的复制数据。上面的组合也应当包括在计算机可读介质的保护范围之内。Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented in hardware, firmware implementation, or a combination thereof. When implemented in software, the functions described above may be stored in or transmitted as one or more instructions or code on a computer readable medium. Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage medium may be any available media that can be accessed by a computer. For example, but not limited to, the computer readable medium may include a random access memory (RAM), a read-only memory (ROM), and an electrically erasable programmable read-only memory (Electrically Erasable Programmable). Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM) or other optical disc storage, disk storage media or other magnetic storage devices, or can be used to carry or store an instruction or data structure. The desired program code and any other medium that can be accessed by the computer. Also. Any connection may suitably be a computer readable medium. For example, if the software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, Then coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, wireless and microwave are included in the fixing of the associated medium. As used in the present invention, a disk and a disc include a compact disc (CD), a laser disc, a compact disc, a digital versatile disc (DVD), a floppy disk, and a Blu-ray disc, wherein the disc is usually magnetically copied, and the disc is The laser is used to optically replicate the data. Combinations of the above should also be included within the scope of the computer readable media.
总之,以上所述仅为本发明技术方案的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
In summary, the above description is only a preferred embodiment of the technical solution of the present invention, and is not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
Claims (10)
- 一种拍摄方法,其特征在于,包括:A photographing method, comprising:在启动相机应用程序的情况下,从拍摄预览界面输出的拍摄图像中提取拍摄对象图像,所述拍摄图像包括所述拍摄对象图像和拍摄背景图像;Extracting a photographic subject image from the captured image output by the shooting preview interface, the captured image including the photographic subject image and the photographic background image;获取与所述拍摄对象图像相匹配的目标背景图像,并将所述拍摄背景图像替换为所述目标背景图像;Obtaining a target background image that matches the image of the photographic subject, and replacing the captured background image with the target background image;调整所述拍摄对象图像和/或所述目标背景图像;Adjusting the subject image and/or the target background image;在接收到拍摄指令的情况下,输出并保存调整后的图像。When the shooting command is received, the adjusted image is output and saved.
- 根据权利要求1所述的方法,其特征在于,所述从拍摄预览界面输出的拍摄图像中提取拍摄对象图像,包括:The method according to claim 1, wherein the extracting the image of the subject from the captured image output by the shooting preview interface comprises:根据识物算法从拍摄预览界面输出的拍摄图像中识别出拍摄对象,并提取所述拍摄对象对应的拍摄对象图像。The photographic subject is recognized from the captured image output from the shooting preview interface according to the recognition algorithm, and the photographic subject image corresponding to the photographic subject is extracted.
- 根据权利要求1所述的方法,其特征在于,所述从拍摄预览界面输出的拍摄图像中提取拍摄对象图像,包括:The method according to claim 1, wherein the extracting the image of the subject from the captured image output by the shooting preview interface comprises:根据针对拍摄预览界面输出的拍摄图像的区域选择指令,从所述拍摄图像中确定出拍摄对象区域,从所述拍摄对象区域中提取拍摄对象图像。The photographic subject area is determined from the captured image based on an area selection command for the captured image outputted by the shooting preview interface, and the photographic subject image is extracted from the photographic subject area.
- 根据权利要求1所述的方法,其特征在于,所述获取与所述拍摄对象图像相匹配的目标背景图像,包括:The method according to claim 1, wherein the acquiring a target background image that matches the image of the photographic subject comprises:从所述相机应用程序对应的服务器中获取与所述拍摄对象图像相匹配的背景图像集合;Obtaining a background image set matching the image of the photographic subject from a server corresponding to the camera application;根据针对所述背景图像集合输入的选择指令从所述背景图像集合中确定目标背景图像。A target background image is determined from the set of background images based on a selection instruction input for the set of background images.
- 根据权利要求1所述的方法,其特征在于,所述调整所述拍摄对象图像和/或所述目标背景图像,包括:The method according to claim 1, wherein the adjusting the subject image and/or the target background image comprises:根据所述拍摄对象图像对应的原始拍摄对象与摄像头之间的距离和/或角度调整所述拍摄对象图像和/或所述目标背景图像。The photographic subject image and/or the target background image are adjusted according to a distance and/or an angle between the original photographic subject corresponding to the photographic subject image and the camera.
- 一种用户终端,其特征在于,包括:A user terminal, comprising:处理单元,用于在启动相机应用程序的情况下,从拍摄预览界面输出的拍 摄图像中提取拍摄对象图像,所述拍摄图像包括所述拍摄对象图像和拍摄背景图像;Processing unit for shooting from the shooting preview interface when the camera application is launched Extracting a subject image in the captured image, the captured image including the subject image and the photographing background image;所述处理单元,还用于获取与所述拍摄对象图像相匹配的目标背景图像,并将所述拍摄背景图像替换为所述目标背景图像;The processing unit is further configured to acquire a target background image that matches the image of the photographic subject, and replace the captured background image with the target background image;所述处理单元,还用于调整所述拍摄对象图像和/或所述目标背景图像;The processing unit is further configured to adjust the image of the photographic subject and/or the target background image;输出单元,用于在接收到拍摄指令的情况下,输出并保存调整后的图像。The output unit is configured to output and save the adjusted image when a shooting instruction is received.
- 根据权利要求6所述的用户终端,其特征在于,所述处理单元用于获取与所述拍摄对象图像相匹配的目标背景图像时,具体用于从所述相机应用程序对应的服务器中获取与所述拍摄对象图像相匹配的背景图像集合,根据针对所述背景图像集合输入的选择指令从所述背景图像集合中确定目标背景图像。The user terminal according to claim 6, wherein the processing unit is configured to acquire a target background image that matches the image of the photographic subject, specifically for acquiring from a server corresponding to the camera application. The set of background images matched by the photographic subject image determines a target background image from the background image set according to a selection instruction input for the background image set.
- 根据权利要求6所述的用户终端,其特征在于,所述处理单元用于调整所述拍摄对象图像和/或所述目标背景图像时,具体用于根据所述拍摄对象图像对应的原始拍摄对象与摄像头之间的距离和/或角度调整所述拍摄对象图像和/或所述目标背景图像。The user terminal according to claim 6, wherein when the processing unit is configured to adjust the image of the photographic subject and/or the target background image, specifically for the original photographic object corresponding to the photographic subject image The subject image and/or the target background image are adjusted by a distance and/or an angle between the camera.
- 一种用户终端,其特征在于,包括处理器、输入设备、输出设备和存储器,所述处理器、输入设备、输出设备和存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,执行如权利要求1-5任一项所述的方法。A user terminal, comprising: a processor, an input device, an output device, and a memory, wherein the processor, the input device, the output device, and the memory are connected to each other, wherein the memory is used to store a computer program, the computer The program includes program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1-5.
- 一种计算机可读存储介质,其特征在于,所述计算机存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行如权利要求1-5任一项所述的方法。 A computer readable storage medium, characterized in that the computer storage medium stores a computer program, the computer program comprising program instructions, the program instructions, when executed by a processor, causing the processor to execute as claimed in claim 1. The method of any of item 5.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201780096500.1A CN111316627B (en) | 2017-09-06 | 2017-09-06 | Shooting method, user terminal and computer readable storage medium |
PCT/CN2017/100631 WO2019047046A1 (en) | 2017-09-06 | 2017-09-06 | Photographing method and user terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2017/100631 WO2019047046A1 (en) | 2017-09-06 | 2017-09-06 | Photographing method and user terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019047046A1 true WO2019047046A1 (en) | 2019-03-14 |
Family
ID=65633450
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/100631 WO2019047046A1 (en) | 2017-09-06 | 2017-09-06 | Photographing method and user terminal |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111316627B (en) |
WO (1) | WO2019047046A1 (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110163810A (en) * | 2019-04-08 | 2019-08-23 | 腾讯科技(深圳)有限公司 | A kind of image processing method, device and terminal |
CN111917979A (en) * | 2020-07-27 | 2020-11-10 | 维沃移动通信有限公司 | Multimedia file output method and device, electronic equipment and readable storage medium |
CN112468868A (en) * | 2020-11-27 | 2021-03-09 | 广州富港生活智能科技有限公司 | Shooting background replacing method and device of automatic shooting equipment |
CN113469164A (en) * | 2021-07-02 | 2021-10-01 | 深圳市火乐科技发展有限公司 | Background image display method and device, storage medium and electronic equipment |
CN117097987A (en) * | 2023-10-16 | 2023-11-21 | 深圳市云希谷科技有限公司 | Method and equipment for automatically correcting camera |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112037227B (en) | 2020-09-09 | 2024-02-20 | 脸萌有限公司 | Video shooting method, device, equipment and storage medium |
CN112422825A (en) * | 2020-11-16 | 2021-02-26 | 珠海格力电器股份有限公司 | Intelligent photographing method, device, equipment and computer readable medium |
CN112954210B (en) * | 2021-02-08 | 2023-04-18 | 维沃移动通信(杭州)有限公司 | Photographing method and device, electronic equipment and medium |
CN112954286B (en) * | 2021-02-25 | 2023-06-13 | 当趣网络科技(杭州)有限公司 | Photographing processing method and system based on projector, electronic equipment and medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2006033511A1 (en) * | 2004-09-24 | 2006-03-30 | Mtekvision Co., Ltd. | Image compositing method and apparatus |
CN103366352A (en) * | 2012-03-30 | 2013-10-23 | 北京三星通信技术研究有限公司 | Device and method for producing image with background being blurred |
CN105791661A (en) * | 2014-12-22 | 2016-07-20 | 深圳富泰宏精密工业有限公司 | Shooting system and method |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103856617A (en) * | 2012-12-03 | 2014-06-11 | 联想(北京)有限公司 | Photographing method and user terminal |
CN103442181B (en) * | 2013-09-06 | 2017-10-13 | 努比亚技术有限公司 | A kind of image processing method and image processing equipment |
CN105554362A (en) * | 2014-10-31 | 2016-05-04 | 中兴通讯股份有限公司 | Method for carrying out shooting by mobile terminal and mobile terminal |
CN105100491B (en) * | 2015-08-11 | 2018-06-01 | 努比亚技术有限公司 | A kind of apparatus and method for handling photo |
US9948893B2 (en) * | 2015-11-18 | 2018-04-17 | Avaya Inc. | Background replacement based on attribute of remote user or endpoint |
CN105376496A (en) * | 2015-12-14 | 2016-03-02 | 广东欧珀移动通信有限公司 | Photographing method and device |
CN105704383A (en) * | 2016-03-24 | 2016-06-22 | 徐亚红 | Interesting image shooting method |
CN106231195A (en) * | 2016-08-15 | 2016-12-14 | 乐视控股(北京)有限公司 | A kind for the treatment of method and apparatus of taking pictures of intelligent terminal |
CN106534683B (en) * | 2016-11-09 | 2019-10-25 | 尚云(广州)信息科技有限公司 | Intelligent camera replaces the method and its system of Background in real time |
-
2017
- 2017-09-06 CN CN201780096500.1A patent/CN111316627B/en active Active
- 2017-09-06 WO PCT/CN2017/100631 patent/WO2019047046A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2006033511A1 (en) * | 2004-09-24 | 2006-03-30 | Mtekvision Co., Ltd. | Image compositing method and apparatus |
CN103366352A (en) * | 2012-03-30 | 2013-10-23 | 北京三星通信技术研究有限公司 | Device and method for producing image with background being blurred |
CN105791661A (en) * | 2014-12-22 | 2016-07-20 | 深圳富泰宏精密工业有限公司 | Shooting system and method |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110163810A (en) * | 2019-04-08 | 2019-08-23 | 腾讯科技(深圳)有限公司 | A kind of image processing method, device and terminal |
CN110163810B (en) * | 2019-04-08 | 2023-04-25 | 腾讯科技(深圳)有限公司 | Image processing method, device and terminal |
CN111917979A (en) * | 2020-07-27 | 2020-11-10 | 维沃移动通信有限公司 | Multimedia file output method and device, electronic equipment and readable storage medium |
CN112468868A (en) * | 2020-11-27 | 2021-03-09 | 广州富港生活智能科技有限公司 | Shooting background replacing method and device of automatic shooting equipment |
CN113469164A (en) * | 2021-07-02 | 2021-10-01 | 深圳市火乐科技发展有限公司 | Background image display method and device, storage medium and electronic equipment |
CN117097987A (en) * | 2023-10-16 | 2023-11-21 | 深圳市云希谷科技有限公司 | Method and equipment for automatically correcting camera |
CN117097987B (en) * | 2023-10-16 | 2024-02-06 | 深圳市云希谷科技有限公司 | Method and equipment for automatically correcting camera |
Also Published As
Publication number | Publication date |
---|---|
CN111316627A (en) | 2020-06-19 |
CN111316627B (en) | 2022-09-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019047046A1 (en) | Photographing method and user terminal | |
US11245933B2 (en) | Method and server for generating image data by using multiple cameras | |
CN111491102B (en) | Detection method and system for photographing scene, mobile terminal and storage medium | |
CN109756671B (en) | Electronic device for recording images using multiple cameras and method of operating the same | |
WO2022042776A1 (en) | Photographing method and terminal | |
US10419661B2 (en) | Shooting method and shooting device | |
KR102495763B1 (en) | Electronic device and method for correcting images corrected by a first image processing mode in external electronic device using a second image processing mode | |
EP3288267A1 (en) | System and method for generating a photograph with variable image quality | |
US11941368B2 (en) | Method for providing text translation managing data related to application, and electronic device thereof | |
US10885609B2 (en) | Electronic device for processing image based on priority and method for operating thereof | |
US20210383588A1 (en) | Electronic device and method of providing user interface for emoji editing while interworking with camera function by using said electronic device | |
US11144197B2 (en) | Electronic device performing function according to gesture input and operation method thereof | |
US11416974B2 (en) | Image processing method and electronic device supporting the same | |
CN109151318B (en) | Image processing method and device and computer storage medium | |
KR20200117695A (en) | Electronic device and method for controlling camera using external electronic device | |
CN105072335B (en) | A kind of photographic method and user terminal | |
US11126322B2 (en) | Electronic device and method for sharing image with external device using image link information | |
CN108259767B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
US20220385814A1 (en) | Method for generating plurality of content items and electronic device therefor | |
JP2001112021A (en) | Image pickup system, its control method, storage medium, image pickup section and information processor | |
US11380096B2 (en) | Electronic device for performing image processing and method thereof | |
KR20170028593A (en) | Method and program for making moving image | |
CN115516494A (en) | Method for generating image and electronic device thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17924213 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17924213 Country of ref document: EP Kind code of ref document: A1 |