CN112468722A - Shooting method, device, equipment and storage medium - Google Patents

Shooting method, device, equipment and storage medium Download PDF

Info

Publication number
CN112468722A
CN112468722A CN202011306876.0A CN202011306876A CN112468722A CN 112468722 A CN112468722 A CN 112468722A CN 202011306876 A CN202011306876 A CN 202011306876A CN 112468722 A CN112468722 A CN 112468722A
Authority
CN
China
Prior art keywords
target
image
shooting
target object
glass
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011306876.0A
Other languages
Chinese (zh)
Other versions
CN112468722B (en
Inventor
李岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN202011306876.0A priority Critical patent/CN112468722B/en
Publication of CN112468722A publication Critical patent/CN112468722A/en
Application granted granted Critical
Publication of CN112468722B publication Critical patent/CN112468722B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof

Landscapes

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

Abstract

The invention discloses a shooting method, a shooting device, shooting equipment and a storage medium. By implementing the embodiment of the invention, the interference of the target object to the shot scene can be eliminated by removing the target object in the target image, the imaging quality of the finally generated target image can be improved, the image of the heart instrument can be obtained without the user's own image correction, and the shooting experience of the user is improved.

Description

Shooting method, device, equipment and storage medium
Technical Field
The present invention relates to the field of image recognition and data processing technologies, and in particular, to a shooting method, an apparatus, a device, and a storage medium.
Background
Along with the resolution ratio of the mobile terminal camera is higher and higher, it is more and more convenient to shoot, and the photo that shoots is more and more clear, uses mobile terminal to shoot and has been liked and paid attention to by the masses more. However, the following problems occur in a large part of the real life photographing scene: with the glass in between so that there is glass and/or a mirror image produced by the glass in the photograph.
The physical phenomenon of glass level crossing formation of image can be when taking a picture separating glass, and the scene of shooing produces the interference, and especially when taking at night, the mirror image that glass produced can be by the clear seizure of mobile terminal's camera to seriously disturb the scene of shooing, lead to the formation of image quality of shooing to descend, reduced user's shooting experience.
Disclosure of Invention
The embodiment of the invention aims to provide a shooting method, a shooting device, shooting equipment and a shooting storage medium, wherein a target image without a target object is obtained by identifying and removing the target object preset in a preview picture acquired by a terminal, so that the interference of the target object to a shot scene can be eliminated, the imaging quality of a finally generated target image is improved, and the shooting experience of a user is improved.
In order to achieve the above object, an embodiment of the present invention provides a shooting method applied to a terminal, including the following steps:
acquiring a preview picture acquired by the terminal;
when a preset target object is detected to exist in the preview picture, converting the shooting mode of the terminal into a purification mode;
after receiving a first shooting request, generating a first shooting image according to the preview picture;
and removing the target object in the first shot image to obtain a first target image.
Further, the target object includes at least one of an object on the target glass having a light transmittance lower than a target light transmittance, and a mirror image produced by the target glass;
wherein the target light transmittance is a light transmittance of the target glass.
Further, the removing the target object in the first shot image to obtain a first target image specifically includes:
inputting the first shot image into a pre-trained image purification model to obtain a first target image without the target object;
wherein the pre-trained image purification model is trained in the following way:
constructing an initial training model;
acquiring a plurality of original images containing the target object;
acquiring a plurality of trimming images without containing the target object, wherein the plurality of original images correspond to the plurality of trimming images one by one;
and taking the original image as the input of the initial training model, taking the finishing image corresponding to the input original image as the output of the initial training model, and performing iterative training on the training model until the initial training model is converged to obtain a trained image purification model.
Further, the shooting method further includes:
when detecting that no preset target object exists in the preview picture, converting the shooting mode of the terminal into a normal shooting mode;
and after receiving a second shooting request, generating a second target image according to the preview picture.
Further, the shooting method further includes:
when the target glass in the preview picture is detected to be colored transparent glass, converting the shooting mode of the terminal into a color restoration mode;
after receiving a third shooting request, generating a second shooting image according to the preview picture;
and restoring the target glass in the second shot image into colorless transparent glass to generate a third target image.
As a preferred embodiment of the present invention, an embodiment of the present invention further provides a shooting apparatus, applied to a terminal, including: the device comprises a preview module, a first detection module, a first processing module and an execution module;
the preview module is used for acquiring a preview picture acquired by the terminal;
the first detection module is used for converting the shooting mode of the terminal into a purification mode when detecting that a preset target object exists in the preview picture;
the first processing module is used for generating a first shooting image according to the preview picture after receiving a first shooting request;
the execution module is used for removing the target object in the first shot image to obtain a first target image.
Further, the target object includes at least one of an object on the target glass having a light transmittance lower than a target light transmittance, and a mirror image produced by the target glass;
wherein the target light transmittance is a light transmittance of the target glass.
Furthermore, the shooting device also comprises a third detection module, a third processing module and a color restoration module;
the third detection module is used for converting the shooting mode of the terminal into a color restoration mode when detecting that the target glass in the preview picture is colored transparent glass;
the third processing module is used for generating a second shot image according to the preview picture after receiving a third shooting request;
and the color restoration module is used for restoring the target glass in the second shot image into colorless transparent glass to generate a third target image.
In order to solve the same technical problem, the present invention further provides a shooting device including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the memory is coupled to the processor, and the processor implements any one of the shooting methods when executing the computer program.
In order to solve the same technical problem, the present invention further provides a computer-readable storage medium storing a computer program, wherein when the computer program runs, the apparatus on which the computer-readable storage medium is located is controlled to execute any one of the shooting methods.
The embodiment of the invention provides a shooting method, which is applied to a terminal, and comprises the steps of acquiring a preview picture acquired by the terminal, converting a shooting mode of the terminal into a purification mode when a preset target object exists in the preview picture, generating a first shot image according to the preview picture after receiving a first shooting request, and finally removing the target object in the first shot image to obtain a first target image.
The embodiment of the invention has the following beneficial effects:
1. the target object in the target image is removed, so that the interference of the target object to the shot scene can be eliminated;
2. target objects in the target image are removed, so that the imaging quality of the finally generated target image can be improved;
3. the image of the heart instrument can be obtained without the user repairing the picture, and the shooting experience of the user is improved.
Drawings
Fig. 1 is a schematic flowchart of an embodiment of a shooting method according to an embodiment of the present invention;
FIG. 2 is a schematic flowchart of an embodiment of a training method for an image cleansing model according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of another embodiment of a shooting method according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of another embodiment of a shooting method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an embodiment of a shooting device provided in an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an embodiment of an execution module of a shooting device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another embodiment of a shooting device provided in the embodiment of the present invention;
fig. 8 is a schematic structural diagram of another embodiment of a shooting device provided in an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an embodiment of a shooting device provided in an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating an embodiment of a shooting method according to an embodiment of the present invention, and as shown in fig. 1, the shooting method includes steps S101 to S104;
step S101, acquiring a preview picture acquired by the terminal;
step S102, when detecting that a preset target object exists in the preview picture, converting the shooting mode of the terminal into a purification mode;
step S103, after receiving a first shooting request, generating a first shooting image according to the preview picture;
and step S104, removing the target object in the first shot image to obtain a first target image.
In the embodiment of the invention, when a user opens a terminal camera each time, a preview picture acquired by the terminal camera is acquired in real time, the preview picture is identified in real time, whether a target object preset by the user exists in the preview picture is identified, and if the preview picture is detected to have the target object preset by the user, a shooting module of the terminal is converted into a purification mode; in the purification mode, the preview picture is continuously identified in real time, after a shooting request is received, the preview picture focused by the terminal camera is shot to generate a shot image containing a target object, and then in the purification mode, the shot image containing the target object is automatically subjected to target object removal processing to remove the target object in the shot image, so that a final target image without the target object is obtained.
As a preferred embodiment of the present invention, with the shooting method provided by the present invention, a person skilled in the art can easily think that, on the basis of being able to remove a target object in a shot photo, the target object in a shot video can also be removed, that is, the target object removal processing is performed on a picture in the shot video in real time, so that an image corresponding to each frame does not contain the target object, thereby obtaining a final video without a preset target object.
In the target object removal process, the target object is not directly removed, and a non-black or white background is left, but the color of the target object is adjusted to the original color of the object covered by the target object.
For example, when a user takes a picture in a scenic spot, the user cannot take a picture of a landscape without other tourists due to the fact that the traffic of people in the scenic spot is too large, at this time, by adopting the embodiment provided by the invention, the tourists are set as target objects in advance, then the camera of the terminal is used for focusing a scene to be taken, the terminal automatically generates the picture of the landscape without the tourists along with the shooting operation of the user, and the terminal automatically adjusts the color of the tourists to the color of the landscape covered by the terminal, so that the picture of the landscape appears as if no tourists exist.
Preferably, when a terminal is used for taking pictures or videos in daily life, the terminal is often separated from glass, and the final image is not clear due to the physical phenomenon that the glass generates mirror images and the possible stains on the glass, so that the target object to be taken cannot be seen clearly. Therefore, in one embodiment of the present invention, the target object includes at least one of an object having a transmittance lower than a target transmittance on a target glass, and a mirror image produced by the target glass; wherein the target light transmittance is a light transmittance of the target glass.
By taking an object with the light transmittance lower than the target light transmittance and a mirror image generated by the target glass in the preview picture as target objects, the shooting method provided by the embodiment of the invention can remove interference factors and realize that stains or the mirror image generated by the glass cannot be interfered in a final picture or video.
It should be noted that, an object with a transmittance lower than the transmittance of the target glass is regarded as a stain, and since the transmittance of the object is lower than the transmittance of the target glass, when a target object outside the window is photographed by the object, the target object is partially blurred, that is, the stain causes the local blur of the target object, so that the object with the transmittance lower than the transmittance of the target glass in the preview picture and a mirror image generated by the target glass are taken as the target object, which can eliminate the interference of the target object on the photographed scene, and can improve the imaging quality of the finally generated target picture or video, and a picture or video of a mood meter can be obtained without the user's own image correction, thereby improving the photographing experience of the user.
For example, when a user takes an object with light transmittance lower than that of a target glass and a mirror image generated by the target glass as a target object in advance and photographs a scene outside the glass through the glass, the terminal detects whether the target object exists in a preview picture, if so, the photographing mode of the terminal is switched to a purification mode, a photographed image is obtained after a photographing request is received, the object with light transmittance lower than that of the glass and the mirror image generated by the glass, namely stain and the mirror image of the glass are removed, and the effect of purifying interference is achieved, so that the scene photograph photographed through clean glass is obtained, the user does not need to subsequently repair the dirty glass or the mirror image generated by the glass, the time for repairing the user is saved, and the user experience is improved.
In an embodiment, the removing the target object in the first captured image to obtain a first target image specifically includes:
inputting the first shot image into a pre-trained image purification model to obtain a first target image without the target object;
referring to fig. 2, the method for training the pre-trained image-cleaning model includes steps S201 to S204;
step S201, constructing an initial training model;
step S202, acquiring a plurality of original images containing the target object;
step S203, acquiring a plurality of trimming images without the target object, wherein the plurality of original images correspond to the plurality of trimming images one by one;
and step S204, taking the original image as the input of the initial training model, taking the finishing image corresponding to the input original image as the output of the initial training model, and performing iterative training on the training model until the initial training model converges to obtain a trained image purification model.
In this embodiment, through an iterative learning function of computer deep learning, the target object in the target image can be automatically removed, so that the target image is obtained. Specifically, a CNN initial training model is used as an initial training model, a sample library is constructed, the sample library comprises a plurality of acquired original images containing the target object, the sample library also comprises a plurality of acquired trimming images not containing the target object, and the plurality of original images and the plurality of trimming images correspond to each other one by one; and then, training the CNN initial training model by adopting the sample library, taking the original image as the input of the initial training model, and taking the trimming image corresponding to the input original image as the output of the initial training model until the initial training model converges to obtain a trained image purification model.
The plurality of trimmed images not including the target object are acquired in the following manner: the original image can be obtained by trimming the original image through a trimming tool; the shooting can be carried out when no target object exists. For example, if the original image is a scene taken through a glass having stains and a mirror image, the finished image is a finished image in which the stains and the mirror image are removed by a finishing tool, or the finished image is a scene taken when the glass is moved at the same position. The trimming image is obtained on the basis of not changing the basic composition of the original image, namely, the trimming image is only different from the original image by the existence of a target object, and the elements such as the size, the composition, the shooting angle and the like of the image are the same.
The shot image containing the target object is purified through the pre-trained image purification model, so that the target image without the target object can be obtained, and the shot image shot by the terminal is automatically purified into the target image required by the user. Preferably, a plurality of pre-trained image purification models can be set in the terminal to purify different target objects in different shot images, so that the user experience is further improved.
In another embodiment, please refer to fig. 3, fig. 3 is a schematic flowchart of another embodiment of the photographing method according to the embodiment of the present invention, and the photographing method further includes steps S105 to S106;
step S105, when detecting that no preset target object exists in the preview picture, converting the shooting mode of the terminal into a normal shooting mode;
and step S106, after receiving a second shooting request, generating a second target image according to the preview picture.
When detecting that no preset target object exists in the preview picture, converting the shooting mode of the terminal into a normal shooting mode, and shooting the preview picture after receiving a shooting request in the normal shooting mode, so that a target object which a user wants to shoot can be directly obtained, namely the terminal has a function of automatically identifying the target object, and when the target object is identified in the preview picture, the target object is automatically removed to obtain a target image; when the target object is not identified in the preview picture, shooting is directly carried out without other operations, and the user experience is further improved.
For example, when the user is in a scenic spot and the preset target object is a visitor, the user wants to shoot a beautiful scene, and when no one passes through the scene, the terminal does not enter other modes and directly shoots in the normal shooting mode to obtain the most original unprocessed scene.
In another embodiment, please refer to fig. 4, fig. 4 is a schematic flowchart illustrating another embodiment of a shooting method according to an embodiment of the present invention, where the shooting method further includes steps S107 to S109;
step S107, when the target glass in the preview picture is detected to be colored transparent glass, converting the shooting mode of the terminal into a color restoration mode;
step S108, after receiving a third shooting request, generating a second shooting image according to the preview picture;
and step S109, restoring the target glass in the second shot image into colorless transparent glass to generate a third target image.
The embodiment of the invention also provides a method for identifying the glass color, and the target glass color in the shot image can be restored to the original color of the shot object to generate a final target image. For example, when a user previously takes an object with a light transmittance lower than a target light transmittance and a mirror image generated by the target glass on the target glass as a target object and photographs a scene outside the glass through the glass, the terminal detects whether the target object exists in a preview picture, and if the target object does not exist, the terminal enters a normal mode to directly photograph; if the target object exists but the colored glass is not detected, the shooting mode of the terminal is converted into a purification mode, a shooting image is obtained after a shooting request is received, the object with the light transmittance lower than that of the glass in the shooting image and a mirror image generated by the glass, namely dirt and the mirror image of the glass are removed, the interference purification effect is achieved, and therefore a landscape shot through the clean glass is obtained; if a target object exists and the glass is detected to be colored glass, a purification mode and a color restoration mode are simultaneously carried out, a shot image is obtained after a shooting request is received, the object with the light transmittance lower than that of the glass in the shot image and a mirror image generated by the glass, namely dirt and the mirror image of the glass are removed, the color of the colored glass is restored to be transparent and colorless, and finally a landscape shot through the clean, colorless and transparent glass is obtained. The mirror image generated by the dirty glass and the color of the glass do not need to be subjected to picture repairing by a user subsequently, the picture repairing time of the user is further saved, and the user experience is further improved.
Furthermore, whether the color restoration mode is started or not can be set by a user through self definition, and when the user wants to shoot the glass scene containing the color, the color restoration mode can be closed through the user, so that the glass scene containing the color can be obtained. In a similar way, whether various shooting modes of the terminal are started or not can be set by the user through user definition, and user experience is improved.
It should be noted that, color restoration of the captured image may be performed by using a trained color restoration model, or a preset color restoration program may be set for performing the color restoration, and any method capable of performing the color restoration of the captured image is within the scope of the present invention.
In summary, an embodiment of the present invention provides a shooting method, where a preview picture acquired by a terminal is obtained, then when a preset target object exists in the preview picture, a shooting mode of the terminal is converted into a purification mode, and after a first shooting request is received, a first shot image is generated according to the preview picture, and finally the target object in the first shot image is removed, so as to obtain a first target image. By implementing the embodiment of the invention, the interference of the target object to the shot scene can be eliminated by removing the target object in the target image, the imaging quality of the finally generated target image can be improved, the image of the heart instrument can be obtained without the user's own image correction, and the shooting experience of the user is improved.
According to the method described in the above embodiment, the embodiment will be further described from the perspective of a camera, which may be implemented as a separate entity or integrated in an electronic device, where the electronic device may include a mobile phone, a tablet computer, and the like.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an embodiment of a shooting apparatus according to the present invention, where the shooting apparatus includes a preview module 301, a first detection module 302, a first processing module 303, and an execution module 304;
the preview module 301 is configured to obtain a preview picture acquired by the terminal; the first detection module 302 is configured to, when detecting that a preset target object exists in the preview picture, convert a shooting mode of the terminal into a purification mode; the first processing module 303 is configured to generate a first captured image according to the preview image after receiving a first capturing request; the executing module 304 is configured to remove the target object in the first captured image, so as to obtain a first target image.
In the embodiment of the invention, when a user opens a terminal camera each time, a preview picture acquired by the terminal camera is acquired in real time through a preview module 301, the preview picture is identified in real time through a first detection module 302, whether a target object preset by the user exists in the preview picture is identified, and if the target object preset by the user exists in the preview picture, a shooting module of the terminal is converted into a purification mode; in the purification mode, the preview picture is continuously identified in real time through the first detection module 302, and after a shooting request is received through the first processing module 303, the preview picture focused by the terminal camera is shot to generate a shot image containing a target object; in the cleaning mode, the execution module 304 automatically performs target object removing processing on the shot image containing the target object to remove the target object in the shot image, so as to obtain a final target image without the target object.
As a preferred embodiment of the present invention, with the shooting apparatus provided in the present invention, a person skilled in the art can easily think that, on the basis that the execution module 304 can remove the target object in the shot picture, it should be possible to also remove the target object in the shot video with other modules, that is, the target object removal processing can be performed on the picture when the video is shot in real time with other functional modules, so that the image corresponding to each frame does not contain the target object, thereby obtaining a final video without a preset target object.
In the target object removal process, the target object is not directly removed, and a non-black or white background is left, but the color of the target object is adjusted to the original color of the object covered by the target object.
For example, when a user takes a picture in a scenic spot, the user cannot take a picture of a landscape without other tourists due to the fact that the traffic of people in the scenic spot is too large, at this time, by adopting the embodiment provided by the invention, the tourists are set as target objects in advance, then the camera of the terminal is used for focusing a scene to be taken, the terminal automatically generates the picture of the landscape without the tourists along with the shooting operation of the user, and the terminal automatically adjusts the color of the tourists to the color of the landscape covered by the terminal, so that the picture of the landscape appears as if no tourists exist.
Preferably, when a terminal is used for taking pictures or videos in daily life, the terminal is often separated from glass, and the final image is not clear due to the physical phenomenon that the glass generates mirror images and the possible stains on the glass, so that the target object to be taken cannot be seen clearly. Therefore, in one embodiment of the present invention, the target object includes at least one of an object having a transmittance lower than a target transmittance on a target glass, and a mirror image produced by the target glass; wherein the target light transmittance is a light transmittance of the target glass.
By taking an object with light transmittance lower than that of a target glass in a preview picture and a mirror image generated by the target glass as target objects, the shooting device provided by the embodiment of the invention can remove interference factors, and realize that stains or the mirror image generated by the glass cannot interfere in a final picture or video.
It should be noted that, an object with a transmittance lower than the transmittance of the target glass is regarded as a stain, and since the transmittance of the object is lower than the transmittance of the target glass, when a target object outside the window is photographed by the object, the target object is partially blurred, that is, the stain causes the local blur of the target object, so that the object with the transmittance lower than the transmittance of the target glass in the preview picture and a mirror image generated by the target glass are taken as the target object, which can eliminate the interference of the target object on the photographed scene, and can improve the imaging quality of the finally generated target picture or video, and a picture or video of a mood meter can be obtained without the user's own image correction, thereby improving the photographing experience of the user.
In an embodiment, please refer to fig. 6, fig. 6 is a schematic structural diagram of an embodiment of an execution module of a photographing apparatus according to an embodiment of the present invention, in which the execution module 304 includes a cleaning unit 3041;
the cleaning unit 3041 is configured to input the first captured image into a pre-trained image cleaning model, so as to obtain a first target image without the target object;
the method for training the pre-trained image cleaning model refers to the above method embodiment, and is not described herein again.
The shot image containing the target object is purified through the pre-trained image purification model, so that the target image without the target object can be obtained, and the shot image shot by the terminal is automatically purified into the target image required by the user. Preferably, a plurality of pre-trained image purification models can be set in the terminal to purify different target objects in different shot images, so that the user experience is further improved.
In another embodiment, please refer to fig. 7, fig. 7 is a schematic structural diagram of another embodiment of the photographing apparatus according to the embodiment of the present invention, and the photographing apparatus further includes a second detecting module 305 and a second processing module 306;
the second detecting module 305 is configured to, when detecting that a preset target object does not exist in the preview image, convert the shooting mode of the terminal into a normal shooting mode;
the second processing module 306 is configured to generate a second target image according to the preview image after receiving a second shooting request.
When the second detection module 305 detects that no preset target object exists in the preview picture, the shooting mode of the terminal is converted into a normal shooting mode, and after a shooting request is received in the normal shooting mode, the preview picture is shot through the second processing module 306, so that a target object which a user wants to shoot can be directly obtained, namely the terminal has a function of automatically identifying the target object, and when the target object is identified in the preview picture, the target object is automatically removed to obtain a target image; when the target object is not identified in the preview picture, shooting is directly carried out without other operations, and the user experience is further improved.
For example, when the user is in a scenic spot and the preset target object is a visitor, the user wants to shoot a beautiful scene, and when no one passes through the scene, the terminal does not enter other modes and directly shoots in the normal shooting mode to obtain the most original unprocessed scene.
In another embodiment, please refer to fig. 8, fig. 8 is a schematic structural diagram of another embodiment of the photographing apparatus according to the embodiment of the present invention, and the photographing apparatus further includes a third detecting module 307, a third processing module 308, and a color repairing module 309;
the third detecting module 307 is configured to, when it is detected that the target glass in the preview image is colored transparent glass, convert the shooting mode of the terminal into a color restoration mode;
the third processing module 308 is configured to generate a second captured image according to the preview image after receiving a third capturing request;
the color restoration module 309 is configured to restore the target glass in the second captured image to colorless transparent glass, and generate a third target image.
As a preferred embodiment of the present invention, the embodiment of the present invention may also restore the color of the target glass in the captured image to the original color of the captured object, and generate a final target image. For example, when the target object preset by the user is colored transparent glass, the third detection module 307 of the terminal will detect whether colored transparent glass exists in the preview picture, and if not, the terminal directly performs shooting in the normal mode; if colored transparent glass exists, the shooting mode of the terminal is converted into a color restoration mode, then when a shooting request is received in the color restoration mode, a shot image is generated according to the preview picture through a third processing module 308, and then the color of the target glass in the shot image is restored to the original color of the shot object through a color restoration module 309, so that a final target image is generated.
It should be noted that, color restoration of the captured image may be performed by using a trained color restoration model, or a preset color restoration program may be set for performing the color restoration, and any method capable of performing the color restoration of the captured image is within the scope of the present invention.
In a specific implementation, each of the modules and/or units may be implemented as an independent entity, or may be implemented as one or several entities by any combination, where the specific implementation of each of the modules and/or units may refer to the foregoing method embodiment, and specific achievable beneficial effects also refer to the beneficial effects in the foregoing method embodiment, which are not described herein again.
In addition, the embodiment of the invention also provides shooting equipment, and the equipment can be mobile terminals such as smart phones, tablet computers and the like. The shooting device comprises a processor and a memory. The processor is electrically connected with the memory.
The processor is a control center of the shooting equipment, is connected with various parts of the whole electronic equipment by various interfaces and lines, executes various functions of the shooting equipment and processes data by running or loading application programs stored in the memory and calling the data stored in the memory, and thus, the shooting equipment is monitored integrally.
In this embodiment, a processor in the shooting device loads instructions corresponding to processes of one or more application programs into a memory according to the following steps, and the processor runs the application programs stored in the memory, thereby implementing various functions:
acquiring a preview picture acquired by the terminal;
when a preset target object is detected to exist in the preview picture, converting the shooting mode of the terminal into a purification mode;
after receiving a first shooting request, generating a first shooting image according to the preview picture;
and removing the target object in the first shot image to obtain a first target image.
The shooting device can implement the steps in any embodiment of the shooting method provided by the embodiment of the present invention, and therefore, the beneficial effects that can be achieved by any shooting method provided by the embodiment of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a shooting device according to an embodiment of the present invention, and as shown in fig. 9, fig. 9 is a block diagram of a specific structure of the shooting device according to the embodiment of the present invention, where the shooting device may be used to implement the shooting method provided in the foregoing embodiment. The photographing apparatus 400 may be a mobile terminal such as a smart phone or a notebook computer.
The RF circuit 410 is used for receiving and transmitting electromagnetic waves, and implementing interconversion between the electromagnetic waves and electrical signals, thereby communicating with a communication network or other devices. RF circuitry 410 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The RF circuit 410 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices over a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The Wireless network may use various Communication standards, protocols, and technologies, including, but not limited to, Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (e.g., Institute of Electrical and Electronics Engineers (IEEE) standard IEEE802.11 a, IEEE802.11 b, IEEE802.11g, and/or IEEE802.11 n), voice over Internet Protocol (VoIP), world wide Internet Access (Microwave Access for micro), other suitable protocols for short-message Communication (wimax), and any other suitable protocols, and may even include those protocols that have not yet been developed.
The memory 420 may be configured to store software programs and modules, such as program instructions/modules corresponding to the shooting method in the foregoing embodiment, and the processor 480 executes various functional applications and data processing by running the software programs and modules stored in the memory 420, that is, when detecting that a preset target object exists in the preview screen, the shooting mode of the terminal is switched to a cleaning mode; after receiving a first shooting request, generating a first shooting image according to the preview picture; and removing the target object in the first shot image to obtain a first target image and the like. The memory 420 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 420 may further include memory located remotely from the processor 480, which may be connected to the capture device 400 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input unit 430 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 430 may include a touch-sensitive surface 431 as well as other input devices 432. The touch-sensitive surface 431, also referred to as a touch display screen or a touch pad, may collect touch operations by a user on or near the touch-sensitive surface 431 (e.g., operations by a user on or near the touch-sensitive surface 431 using any suitable object or attachment such as a finger, a stylus, etc.) and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface 431 may comprise both a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 480, and receives and executes commands sent from the processor 480. In addition, the touch-sensitive surface 431 may be implemented in various types, such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 430 may include other input devices 432 in addition to the touch-sensitive surface 431. In particular, other input devices 432 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 440 may be used to display information input by or provided to the user and various graphical user interfaces of the photographing apparatus 400, which may be configured by graphics, text, icons, video, and any combination thereof. The Display unit 440 may include a Display panel 441, and optionally, the Display panel 441 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 431 may overlay the display panel 441, and when a touch operation is detected on or near the touch-sensitive surface 431, the touch operation is transmitted to the processor 480 to determine the type of the touch event, and then the processor 480 provides a corresponding visual output on the display panel 441 according to the type of the touch event. Although the touch-sensitive surface 431 and the display panel 441 are shown as two separate components to implement input and output functions, in some embodiments, the touch-sensitive surface 431 and the display panel 441 may be integrated to implement input and output functions.
The capture device 400 may also include at least one sensor 450, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 441 according to the brightness of ambient light, and a proximity sensor that may generate an interrupt when the folder is closed or closed. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are also configured in the photographing apparatus 400, detailed descriptions thereof are omitted.
The audio circuit 460, speaker 461, microphone 462 may provide an audio interface between the user and the capture device 400. The audio circuit 460 may transmit the electrical signal converted from the received audio data to the speaker 461, and convert the electrical signal into a sound signal for output by the speaker 461; on the other hand, the microphone 462 converts the collected sound signal into an electric signal, which is received by the audio circuit 460 and converted into audio data, which is then processed by the audio data output processor 480, and then transmitted to, for example, another terminal via the RF circuit 410, or output to the memory 420 for further processing. The audio circuit 460 may also include an earbud jack to provide communication of peripheral headphones with the capture device 400.
The photographing apparatus 400 may assist the user in receiving a request, transmitting information, etc. through the transmission module 470 (e.g., Wi-Fi module), which provides the user with wireless broadband internet access. Although the transmission module 470 is shown in the drawing, it is understood that it does not belong to the essential constitution of the photographing apparatus 400 and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 480 is a control center of the photographing apparatus 400, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the photographing apparatus 400 and processes data by operating or executing software programs and/or modules stored in the memory 420 and calling data stored in the memory 420, thereby integrally monitoring the electronic apparatus. Optionally, processor 480 may include one or more processing cores; in some embodiments, processor 480 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 480.
The capture device 400 also includes a power supply 490 (e.g., a battery) that provides power to various components, which in some embodiments may be logically coupled to the processor 480 via a power management system to manage charging, discharging, and power consumption management functions via the power management system. The power supply 490 may also include one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and any like components.
Although not shown, the photographing apparatus 400 further includes a camera (e.g., a front camera, a rear camera), a bluetooth module, and the like, which will not be described herein. Specifically, in this embodiment, the display unit of the electronic device is a touch screen display, the mobile terminal further includes a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for:
acquiring a preview picture acquired by the terminal;
when a preset target object is detected to exist in the preview picture, converting the shooting mode of the terminal into a purification mode;
after receiving a first shooting request, generating a first shooting image according to the preview picture;
and removing the target object in the first shot image to obtain a first target image.
In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation of the above modules may refer to the foregoing method embodiments, which are not described herein again.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor. To this end, the present invention provides a storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps of any embodiment of the method for shooting provided by the present invention.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any of the shooting methods provided in the embodiments of the present invention, the beneficial effects that can be achieved by any of the shooting methods provided in the embodiments of the present invention can be achieved, for details, see the foregoing embodiments, and are not described herein again.
The above detailed description is provided for a shooting method, a shooting device, a shooting apparatus, a shooting device, and a shooting device storage medium provided in the embodiments of the present application, and a specific example is applied in the present application to explain the principles and the implementation of the present application, and the description of the above embodiments is only used to help understanding the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application. Moreover, it will be apparent to those skilled in the art that various modifications and adaptations can be made without departing from the principles of the invention, and such modifications and adaptations are intended to be within the scope of the invention.

Claims (10)

1. A shooting method is characterized by being applied to a terminal and comprising the following steps:
acquiring a preview picture acquired by the terminal;
when a preset target object is detected to exist in the preview picture, converting the shooting mode of the terminal into a purification mode;
after receiving a first shooting request, generating a first shooting image according to the preview picture;
and removing the target object in the first shot image to obtain a first target image.
2. The photographing method according to claim 1, wherein the target object includes at least one of an object having a light transmittance lower than a target light transmittance on a target glass, and a mirror image produced by the target glass;
wherein the target light transmittance is a light transmittance of the target glass.
3. The shooting method according to claim 1, wherein the removing of the target object in the first shot image to obtain a first target image specifically comprises:
inputting the first shot image into a pre-trained image purification model to obtain a first target image without the target object;
wherein the pre-trained image purification model is trained in the following way:
constructing an initial training model;
acquiring a plurality of original images containing the target object;
acquiring a plurality of trimming images without containing the target object, wherein the plurality of original images correspond to the plurality of trimming images one by one;
and taking the original image as the input of the initial training model, taking the finishing image corresponding to the input original image as the output of the initial training model, and performing iterative training on the training model until the initial training model is converged to obtain a trained image purification model.
4. The photographing method according to claim 1, wherein the photographing method further comprises:
when detecting that no preset target object exists in the preview picture, converting the shooting mode of the terminal into a normal shooting mode;
and after receiving a second shooting request, generating a second target image according to the preview picture.
5. The photographing method according to claim 2, wherein the photographing method further comprises:
when the target glass in the preview picture is detected to be colored transparent glass, converting the shooting mode of the terminal into a color restoration mode;
after receiving a third shooting request, generating a second shooting image according to the preview picture;
and restoring the target glass in the second shot image into colorless transparent glass to generate a third target image.
6. A shooting device is characterized by being applied to a terminal and comprising: the device comprises a preview module, a first detection module, a first processing module and an execution module;
the preview module is used for acquiring a preview picture acquired by the terminal;
the first detection module is used for converting the shooting mode of the terminal into a purification mode when detecting that a preset target object exists in the preview picture;
the first processing module is used for generating a first shooting image according to the preview picture after receiving a first shooting request;
the execution module is used for removing the target object in the first shot image to obtain a first target image.
7. The photographing apparatus according to claim 6, wherein the target object includes at least one of an object having a light transmittance lower than a target light transmittance on a target glass, and a mirror image produced by the target glass;
wherein the target light transmittance is a light transmittance of the target glass.
8. The camera of claim 7, further comprising a third detection module, a third processing module, and a color restoration module;
the third detection module is used for converting the shooting mode of the terminal into a color restoration mode when detecting that the target glass in the preview picture is colored transparent glass;
the third processing module is used for generating a second shot image according to the preview picture after receiving a third shooting request;
and the color restoration module is used for restoring the target glass in the second shot image into colorless transparent glass to generate a third target image.
9. A shooting device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the memory being coupled to the processor, and the processor, when executing the computer program, implementing the shooting method according to any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, wherein the computer program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the photographing method according to any one of claims 1 to 5.
CN202011306876.0A 2020-11-19 2020-11-19 Shooting method, device, equipment and storage medium Active CN112468722B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011306876.0A CN112468722B (en) 2020-11-19 2020-11-19 Shooting method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011306876.0A CN112468722B (en) 2020-11-19 2020-11-19 Shooting method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112468722A true CN112468722A (en) 2021-03-09
CN112468722B CN112468722B (en) 2022-05-06

Family

ID=74836357

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011306876.0A Active CN112468722B (en) 2020-11-19 2020-11-19 Shooting method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112468722B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113536891A (en) * 2021-05-10 2021-10-22 新疆爱华盈通信息技术有限公司 Pedestrian traffic statistical method, storage medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1225778A (en) * 1997-03-14 1999-08-11 索尼公司 Color corection device and color corection method, picture processing device, and picture processing method
CN103826065A (en) * 2013-12-12 2014-05-28 小米科技有限责任公司 Image processing method and apparatus
US20200051477A1 (en) * 2016-10-17 2020-02-13 Huawei Technologies Co., Ltd. Image Display Optimization Method and Apparatus
CN110855897A (en) * 2019-12-20 2020-02-28 维沃移动通信有限公司 Image shooting method and device, electronic equipment and storage medium
CN111010496A (en) * 2019-12-24 2020-04-14 维沃移动通信(杭州)有限公司 Image processing method and electronic equipment
CN111263071A (en) * 2020-02-26 2020-06-09 维沃移动通信有限公司 Shooting method and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1225778A (en) * 1997-03-14 1999-08-11 索尼公司 Color corection device and color corection method, picture processing device, and picture processing method
CN103826065A (en) * 2013-12-12 2014-05-28 小米科技有限责任公司 Image processing method and apparatus
US20200051477A1 (en) * 2016-10-17 2020-02-13 Huawei Technologies Co., Ltd. Image Display Optimization Method and Apparatus
CN110855897A (en) * 2019-12-20 2020-02-28 维沃移动通信有限公司 Image shooting method and device, electronic equipment and storage medium
CN111010496A (en) * 2019-12-24 2020-04-14 维沃移动通信(杭州)有限公司 Image processing method and electronic equipment
CN111263071A (en) * 2020-02-26 2020-06-09 维沃移动通信有限公司 Shooting method and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113536891A (en) * 2021-05-10 2021-10-22 新疆爱华盈通信息技术有限公司 Pedestrian traffic statistical method, storage medium and electronic equipment
CN113536891B (en) * 2021-05-10 2023-01-03 新疆爱华盈通信息技术有限公司 Pedestrian traffic statistical method, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN112468722B (en) 2022-05-06

Similar Documents

Publication Publication Date Title
CN106558025B (en) Picture processing method and device
CN107038681B (en) Image blurring method and device, computer readable storage medium and computer device
CN109743504B (en) Auxiliary photographing method, mobile terminal and storage medium
CN108038825B (en) Image processing method and mobile terminal
CN107959795B (en) Information acquisition method, information acquisition equipment and computer readable storage medium
EP3640732A1 (en) Method and terminal for acquire panoramic image
CN107948505B (en) Panoramic shooting method and mobile terminal
CN108259758B (en) Image processing method, image processing apparatus, storage medium, and electronic device
CN107241552B (en) Image acquisition method, device, storage medium and terminal
CN107749046B (en) Image processing method and mobile terminal
CN108924414B (en) Shooting method and terminal equipment
CN110099213A (en) A kind of image display control method and terminal
CN110266957B (en) Image shooting method and mobile terminal
CN107566746B (en) Photographing method and user terminal
CN108259743A (en) Panoramic picture image pickup method and electronic equipment
CN108320263A (en) A kind of method, device and mobile terminal of image procossing
CN111246102A (en) Shooting method, shooting device, electronic equipment and storage medium
CN107995417B (en) Photographing method and mobile terminal
CN110881105B (en) Shooting method and electronic equipment
CN109561255B (en) Terminal photographing method and device and storage medium
CN108616687A (en) A kind of photographic method, device and mobile terminal
CN110519503A (en) A kind of acquisition methods and mobile terminal of scan image
CN112468722B (en) Shooting method, device, equipment and storage medium
CN107798662B (en) Image processing method and mobile terminal
CN110855897B (en) Image shooting method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant