WO2017166726A1 - 智能拍照方法及装置 - Google Patents

智能拍照方法及装置 Download PDF

Info

Publication number
WO2017166726A1
WO2017166726A1 PCT/CN2016/098193 CN2016098193W WO2017166726A1 WO 2017166726 A1 WO2017166726 A1 WO 2017166726A1 CN 2016098193 W CN2016098193 W CN 2016098193W WO 2017166726 A1 WO2017166726 A1 WO 2017166726A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
obstacle
module
information
area
Prior art date
Application number
PCT/CN2016/098193
Other languages
English (en)
French (fr)
Inventor
刘华一君
陈涛
吴珂
Original Assignee
北京小米移动软件有限公司
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 北京小米移动软件有限公司 filed Critical 北京小米移动软件有限公司
Publication of WO2017166726A1 publication Critical patent/WO2017166726A1/zh

Links

Images

Classifications

    • G06T5/77
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • 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/62Control of parameters via user interfaces
    • G06T3/18
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20092Interactive image processing based on input by user
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping

Definitions

  • the present disclosure relates to the field of image processing, and in particular, to a smart photographing method and apparatus.
  • the user When the user takes a picture, there are often some obstacles in the photo. For example, the user only wants to take pictures of the blue sky. At this time, a bird also appears in the camera. The user wants to take a picture without a bird having only a blue sky. At this time, the bird is Obstacle in the photo. The obstacles in these photos plague the user. In related technologies, the user can post-process the photos through the drawing software to remove the obstacles in the photos, but the process of removing obstacles through post-processing photos is cumbersome and efficient. low.
  • the present disclosure provides a smart photographing method and apparatus.
  • the technical solution is as follows:
  • a smart photographing method comprising: acquiring an image photographed by a camera; acquiring an obstacle in the image; and in an obstacle region corresponding to the obstacle The information is erased; the obstacle area after the information is erased is repaired; since the electronic device automatically detects and erases the obstacle in the image, and repairs the erased area in the image, Automatically clearing obstacles in the image when photographing, solving the problem in the related art that the obstacles in the picture need to be removed by post-processing photos, simplifying the operation of the user and improving the user experience.
  • the acquiring an obstacle in the image includes: acquiring an object in the image having the same shape as a predetermined obstacle; or acquiring a pixel color difference between the pixel and the image background in the image is greater than a predetermined difference
  • An object whose value is a threshold; the object to be acquired is used as an obstacle of the image; or, the acquired object is marked and displayed, and the selected object from the object displayed by the mark is used as an obstacle.
  • the displaying the acquired object is marked, and the selected object from the object displayed by the mark is used as an obstacle, including: displaying the deletion control at the object recognized in the image, and Deleting the object that the control is triggered is determined as an obstacle in the image; or, in the image, the mark displays the recognized object, and the object triggered by the long press is determined as an obstacle in the image;
  • the detected obstacles are highlighted to the user, so that the user can select the area to be erased by the corresponding triggering manner, which simplifies the determination of obstacles. The way of things.
  • the erasing information in the obstacle region corresponding to the obstacle includes: identifying an outline of the obstacle, and forming a line of the obstacle contour as a gray color between adjacent pixel points a line composed of pixel points whose degree difference is greater than a predetermined difference threshold value; an area defined by the contour of the obstacle is used as the obstacle area, and information in the obstacle area is erased; The extraction of the contour determines the area to be erased based on the obstacle contour, that is, the obstacle area, and erases the information in the area.
  • the repairing the obstacle area after erasing the information comprises: acquiring geographic location information when the image is captured, and querying the same type of image with the same location information as the geographic location information; A patched reference image of the image is filtered out of the similar image, the similarity between the image and the patched reference image is greater than a similarity threshold; and the obstacle region in the image is compared according to the patched reference image Repairing; because the patched reference image of the image is filtered out from the similar image that is queried, the obstacle region in the image is repaired according to the repaired reference image, so that not only the intelligent erasure of the obstacle in the image can be completed, Obtaining a complete image that does not contain obstacles can also make the content of the repaired area more realistic and restore the realism of the image.
  • the repairing the obstacle area in the image according to the repair reference image comprises: acquiring compensation image information from an area corresponding to the obstacle in the repair reference map, using The compensated image information repairs the obstacle region in the image.
  • the repairing the obstacle area after erasing information comprises: stretching and deforming an image background around the obstacle area to fill and repair the obstacle area;
  • the similar image is repaired to repair the obstacle area in the image, since the content of the image background is similar, the deformation of the image background is used to repair the obstacle area, and the content of the obstacle area after the repair is reduced. unexpected.
  • a smart photographing apparatus comprising: a first acquisition module configured to acquire an image captured by a camera; and a second acquisition module configured to acquire the first acquisition An obstacle in the image acquired by the module; the erasing module is configured to erase information in the obstacle region corresponding to the obstacle acquired by the second acquiring module; the repairing module is configured to wipe The obstacle area after the information is repaired.
  • the second obtaining module includes: an acquiring sub-module, configured to acquire an object having the same shape as a predetermined obstacle in the image acquired by the first acquiring module; or acquiring the first acquiring module Obtaining, in the obtained image, an object whose pixel color difference between the pixel and the image background is greater than a predetermined difference threshold; the determining submodule configured to use the object acquired by the acquiring submodule as an obstacle of the image; or Marking the object acquired by the acquiring sub-module, and selecting the selected object from the object displayed by the mark as an obstacle.
  • the determining sub-module is further configured to: mark a display deletion control at the object recognized in the image, and determine an object that is triggered to be triggered as an obstacle in the image; or The mark in the image shows the recognized object, and the object triggered by the long press is determined as an obstacle in the image.
  • the erasing module includes: an identifying submodule configured to identify an outline of the obstacle, and the line forming the obstacle contour is a gray level difference between the adjacent pixel points greater than a predetermined difference a line consisting of threshold pixels And an erasing sub-module configured to erase the information in the obstacle area by using an area defined by the contour of the obstacle as the obstacle area.
  • the repairing module includes: a query submodule configured to acquire geographic location information when the image is captured, and query a similar image of the same location as the geographic location information; and the screening submodule is configured to The patched reference image of the image is filtered out from the similar image queried by the query sub-module, and the similarity between the image and the patched reference image is greater than a similarity threshold; the repair sub-module is configured according to the The patch reference image selected by the screening sub-module repairs the obstacle region in the image.
  • the repair submodule is further configured to acquire, from the patch referenced by the screening submodule, the compensated image information in the region corresponding to the obstacle in the patch reference image, and use the compensated image information to the image The obstacle area in the repair is repaired.
  • the repairing module further includes: a filling sub-module configured to stretch-deform the image background around the obstacle region to fill and repair the obstacle region.
  • a smart photographing apparatus comprising:
  • a memory for storing the processor executable instructions
  • processor is configured to:
  • the obstacle area after erasing the information is repaired.
  • FIG. 1 is a flowchart of a smart photographing method according to an exemplary embodiment
  • FIG. 2A is a flowchart of a smart photographing method according to another exemplary embodiment
  • 2B is a flowchart of a method for acquiring an obstacle in an image, according to an exemplary embodiment
  • 2C is a schematic diagram showing an area where an obstacle is located, according to an exemplary embodiment
  • 2D is a schematic diagram of erasing information within an obstacle region, according to an exemplary embodiment
  • FIG. 2E is a flowchart of a method for repairing an obstacle region after erasing information according to an exemplary embodiment
  • 2F illustrates a patched reference image according to an exemplary embodiment
  • 2G is an image obtained by patching an image with a patch image according to an exemplary embodiment
  • 2H shows an image taken by a camera according to an exemplary embodiment
  • FIG. 2I is a schematic diagram showing a mark display deletion control at an object recognized in an image according to an exemplary embodiment
  • 2J is a schematic diagram showing an object recognized by a mark in an image, according to an exemplary embodiment
  • FIG. 3 is a block diagram of a smart camera device according to an exemplary embodiment
  • FIG. 4 is a block diagram of a smart photographing apparatus according to another exemplary embodiment
  • FIG. 5 is a block diagram of an apparatus for smart photographing, according to an exemplary embodiment.
  • FIG. 1 is a flowchart of a smart photographing method applied to an electronic device including a camera, which may be a smart phone, a tablet computer, a camera, a camera, according to an exemplary embodiment.
  • the smart photographing method can include the following steps.
  • step 101 an image taken by the camera is acquired.
  • step 102 an obstacle in the image is acquired.
  • step 103 the information in the obstacle area corresponding to the obstacle is erased.
  • step 104 the obstacle area after the erasure information is repaired.
  • the smart photographing method acquires an image captured by a camera, acquires an obstacle in the image, and erases information in the obstacle region corresponding to the obstacle, and The obstacle area after erasing the information is repaired. Since the electronic device automatically detects and erases obstacles in the image and repairs the erased area in the image, the automatic removal of obstacles in the image during photographing is realized, and the related art needs to be solved. Post-processing photos remove the obstacles in the image, simplifying the user's operation and improving the user experience.
  • the electronic device provides a smart camera control to the user, and the smart camera control is used to trigger the electronic device to enter the obstacle smart erase mode.
  • the electronic device can erase the obstacle in the image captured by the camera when the user is taking a photo, and can also erase the obstacle in the image obtained by the user.
  • FIG. 2A is a flowchart of a smart photographing method, which is applied to an electronic device including a camera, which may be a smart phone, a tablet, a video camera, according to another exemplary embodiment.
  • a camera which may be a smart phone, a tablet, a video camera, according to another exemplary embodiment.
  • the smart photographing method can include the following steps.
  • step 201 an image taken by the camera is acquired, and an obstacle in the image is acquired.
  • acquiring obstacles in the image can be achieved by several sub-steps as shown in Figure 2B.
  • step 201a an object in the image having the same shape as the predetermined obstacle is acquired.
  • the predetermined obstacle shape can be set by the system developer or by the user. For example, if the user can pre-set the wire mesh as an obstacle, the electronic device needs to acquire an object in the image that is similar in shape to the wire mesh. For another example, the user can also pre-set the bird as an obstacle, and the electronic device needs to acquire an object in the image that is similar in shape to the bird.
  • the shape of the obstacle may be set according to the shape of the user's graffiti, or the object whose user history is set as the obstacle may be used as an obstacle.
  • an object in the image that is similar in shape to the predetermined obstacle shape is greater than a predetermined threshold, such that for the same type of obstacle, the number of locally stored predetermined obstacle shapes corresponding to the type of obstacle is reduced.
  • a predetermined threshold such that for the same type of obstacle, the number of locally stored predetermined obstacle shapes corresponding to the type of obstacle is reduced.
  • the electronic device can store only the shape of several actions of the bird as the obstacle shape. For example, the bird's shape when flying, the shape of the bird when the bird is inhabited, and so on.
  • step 201b the acquired object is taken as an obstacle to the image.
  • step 202 the contour of the obstacle is identified, and the line forming the obstacle contour is a line composed of pixel points whose gradation difference between adjacent pixel points is greater than a predetermined difference threshold.
  • Identifying the contour of the obstacle in the area where the obstacle is located in the image specifically, calculating the gradation difference between each pixel in the area and its adjacent pixel, and the gradation difference is greater than the predetermined difference threshold
  • the pixels are determined as edge pixels, and the lines formed by these edge pixels are the lines forming the contour of the obstacle.
  • the area in which the obstacle is referred to herein refers to the area in the image that contains the obstacle, and the size of the area is usually equal to or only slightly larger than the shape of the obstacle.
  • FIG. 2C is a schematic diagram showing an area where an obstacle is located, according to an exemplary embodiment.
  • the system developer sets the trash can as an obstacle, and the area where the obstacle garbage can is located may be the area 21 in the image, so that the obstacle garbage can and the shadow of the garbage can be used as an obstacle in the subsequent process.
  • the area is erased together.
  • the predetermined difference threshold is usually set by the system developer.
  • the value of the predetermined difference threshold is not specifically limited in this embodiment, and may be determined according to actual conditions.
  • step 203 the area enclosed by the outline of the obstacle is used as an obstacle area, and the information in the obstacle area is erased.
  • FIG. 2C is an original image taken by the camera, and the region 21 in the image is contour-recognized, and the region defined by the contour of the obstacle is an obstacle region, that is, the shadow in FIG. 2D.
  • FIG. 2D is a schematic diagram of erasing information within the obstacle area, according to an exemplary embodiment. In erasing the information in the obstacle area, it is only necessary to erase the area 21a of the shaded portion in Fig. 2D without erasing the complementary area 21b of the area 21a in the area 21.
  • step 204 the obstacle area after the information is erased is repaired.
  • This step can be implemented by several sub-steps as shown in Figure 2E.
  • step 204a the geographical location information at the time of capturing the image is acquired, and the same type of image in which the shooting location is the same as the geographical location information is inquired.
  • Obtaining geographic location information can be achieved in a variety of ways, such as through Global Positioning System (GPS), Beidou positioning system, etc. to obtain geographic location information.
  • GPS Global Positioning System
  • Beidou positioning system etc.
  • the manner in which the geographic location information is acquired when the image is captured is not specifically limited in this embodiment, and may be determined according to actual conditions.
  • the image referred to herein as the geographical location information refers to an image stored in the server that is also captured at the geographic location. For example, when the user's geographic location information when shooting an image is Beijing Tiananmen, the server searches for the image stored at the server in Beijing Tiananmen.
  • a homogeneous image refers to an image containing an object similar to an object in a captured image.
  • FIG. 2C For example, still see FIG. 2C for the image taken by the user, and FIG. 2D is the image after the information of the obstacle area is erased.
  • the image taken at the acquisition server is an image near the Leaning Tower of Pisa.
  • the original image taken by the user includes the Leaning Tower of Pisa in Fig. 2C, and the image in the vicinity of the Leaning Tower of Pisa is inquired in the server to query the image containing the Leaning Tower of Pisa.
  • These images containing the Leaning Tower of Pisa are similar images.
  • step 204b the patched reference image of the image is filtered out from the queried similar image, and the similarity between the image and the patched reference image is greater than the similarity threshold.
  • the similarity calculation is performed on the image and the original image taken by the camera.
  • the image having the similarity greater than the similarity threshold is determined as the candidate patch reference image, and the candidate patch reference image having the greatest similarity to the original image is determined as the patch reference image.
  • the user when the user captures an image and obtains the geographical position information in FIG. 2C, it is near the Leaning Tower of Pisa.
  • the image is searched from the server for the similar image near the Leaning Tower of Pisa, and the filtered reference image is as shown in FIG. 2F.
  • the similarity threshold is set by the system developer.
  • the value of the similarity threshold is not specifically limited in this embodiment, and may be determined according to actual conditions.
  • step 204c the obstacle area in the image is repaired according to the repaired reference image.
  • the compensated image information is acquired from the region corresponding to the obstacle in the patch reference image, and the obstacle region in the image is repaired by the compensated image information.
  • Identifying an area corresponding to the obstacle in the reference image by image recognition technology, and identifying the pixel around the area is the same as the pixel around the obstacle area in the image, and acquiring image information of the area as compensation image information, Compensating the image information to repair the obstacle area in the image.
  • the repaired image is obtained as shown in FIG. 2G, and the obstacle area is according to the reference image FIG. 2F.
  • the area where the image information is repaired is the area 21a.
  • the smart photographing method acquires an image captured by a camera, acquires an obstacle in the image, and erases information in the obstacle region corresponding to the obstacle, and Rub Repair the obstacle area after the information. Since the electronic device automatically detects and erases obstacles in the image and repairs the erased area in the image, the automatic removal of obstacles in the image during photographing is realized, and the related art needs to be solved. Post-processing photos remove the obstacles in the image, simplifying the user's operation and improving the user experience.
  • the obstacle region after erasing the information when repairing the obstacle region after erasing the information, it may also be implemented by stretching and deforming the image background around the obstacle region to fill and repair the obstacle region.
  • the image taken by the camera when the user sets the bird as an obstacle, acquires an obstacle area in the image, and erases the obstacle area.
  • the background image around the obstacle area is obtained, for example, the image of the image around the bird obstacle in the image is taken as a white cloud, and the white cloud image is stretched and formed into obstacles.
  • the image of the object area has the same shape to fill the obstacle area, and the repaired image is as shown in Fig. 2H(2).
  • an object whose pixel color difference between the pixel and the image background in the image is greater than a predetermined difference threshold is acquired, and the acquired object is used as an obstacle of the image.
  • the pixel difference between the pixel of the object and the background of the image is detected, and when the pixel difference is greater than the predetermined difference threshold, the object is regarded as an obstacle.
  • the user wants to get an image of a white paper, and there is a black dot on the white paper in the image taken on the white paper.
  • the electronic device detects that the pixel difference between the black dot and the white background is greater than a predetermined threshold, and the black dot is used as an obstacle of the image.
  • the detected edge lines constitute the contour of the object to determine the object in the image. It is to be understood by those skilled in the art that how to determine an object in an image is not described in this embodiment.
  • an object having the same shape as a predetermined obstacle in the image is acquired, and the acquired object is marked and displayed, and the selected object from the object displayed by the mark is used as an obstacle.
  • an object detected in the image having the same shape as the predetermined obstacle is displayed, and is provided to the user for selection, and the object selected by the user is used as an obstacle.
  • an object that obtains a pixel color difference between a pixel and an image background in the image that is greater than a predetermined difference threshold is obtained, and the acquired object is marked and displayed, and the selected object from the object displayed by the mark is used as obstacle.
  • an object whose pixel color difference between the pixel and the image background in the image is greater than a predetermined difference threshold is displayed, and is provided to the user for selection, and the object selected by the user is used as an obstacle.
  • marking the acquired object and displaying the selected object from the object displayed by the marker As obstacles, it can be achieved in the following ways.
  • the mark displayed on the object recognized in the image displays a delete control, and the object whose delete control is triggered is determined as an obstacle in the image.
  • FIG. 2I is a schematic diagram showing a mark display deletion control at an object recognized in an image according to an exemplary embodiment.
  • the delete control 22 is displayed at the object recognized based on the predetermined obstacle shape of the bird, and the delete control 23 is displayed at the object determined according to the predetermined obstacle shape of the garbage can.
  • the object corresponding to the delete control is determined as an obstacle.
  • the identified object is marked in the image, and the object triggered by the long press is determined as an obstacle in the image.
  • FIG. 2J is a schematic diagram showing an object recognized by a mark in an image according to an exemplary embodiment. As shown in FIG. 2J, the recognized object is marked with a dotted line frame 24, and the user can display the dotted line according to the dotted line.
  • Block 24 determines an object detected by the electronic device that may be an obstacle. The user selects an object to be erased from the long-press trigger, and the electronic device determines the object that is triggered by the long press as an obstacle in the image.
  • acquiring an obstacle in the image may also be achieved by acquiring a selected area, extracting an outline of the obstacle in the selected area, and defining the area defined by the obstacle outline as an obstacle area.
  • the user can manually increase the obstacle area of the image. Specifically, the user selects an area in the image, and the electronic device extracts the contour of the obstacle in the selected area, and the area defined by the obstacle contour is used as an obstacle. Area of matter.
  • the contour of the obstacle extracted from the selected area is added as a predetermined obstacle shape to the local predetermined obstacle shape library, so that the subsequent electronic device can specify the obstacle that the user in the image has designated to erase. Perform a test to obtain an obstacle area.
  • FIG. 3 is a block diagram of a smart camera device, which is applied to an electronic device including a camera, which may be a smart phone, a tablet computer, a video camera, a camera, etc., according to an exemplary embodiment.
  • the smart camera device can include a first acquisition module 310, a second acquisition module 320, an erase module 330, and a patch module 340.
  • the first obtaining module 310 is configured to acquire an image captured by the camera.
  • the second obtaining module 320 is configured to acquire an obstacle in the image acquired by the first acquiring module 310.
  • the erasing module 330 is configured to erase information in the obstacle region corresponding to the obstacle acquired by the second acquiring module 320.
  • the patching module 340 is configured to patch the obstacle area after the information is erased.
  • the smart camera device acquires an image captured by the camera, acquires an obstacle in the image, and erases information in the obstacle region corresponding to the obstacle.
  • the obstacle area after erasing the information is repaired. Since the electronic device automatically detects and erases obstacles in the image and repairs the erased area in the image, the automatic removal of obstacles in the image during photographing is realized, and the related art needs to be solved. Post-processing photos remove the obstacles in the image, simplifying the user's operation and improving the user experience.
  • FIG. 4 is a block diagram of a smart camera device applied to an electronic device including a camera, which may be a smartphone, a tablet, a camera, a camera, according to another exemplary embodiment.
  • the smart camera device can include a first acquisition module 410, a second acquisition module 420, an erase module 430, and a patch module 440.
  • the first obtaining module 410 is configured to acquire an image captured by the camera.
  • the second obtaining module 420 is configured to acquire an obstacle in the image acquired by the first acquiring module 410.
  • the erasing module 430 is configured to erase information in the obstacle region corresponding to the obstacle acquired by the second acquiring module 420.
  • the patching module 440 is configured to patch the obstacle area after the information is erased.
  • the second obtaining module 420 includes: an obtaining submodule 420a and a determining submodule 420b.
  • the obtaining sub-module 420a is configured to acquire an object having the same shape as the predetermined obstacle in the image acquired by the first acquiring module 410; or obtain the pixel color difference between the pixel in the image acquired by the first acquiring module 410 and the background of the image is greater than An object that is predetermined for the difference threshold.
  • the predetermined obstacle shape can be set by the system developer or by the user.
  • an object in the image that is similar in shape to the predetermined obstacle shape is greater than a predetermined threshold, such that for the same type of obstacle, the number of locally stored predetermined obstacle shapes corresponding to the type of obstacle is reduced.
  • the determining sub-module 420b is configured to use the object acquired by the obtaining sub-module 420a as an obstacle of the image; or, to mark the object acquired by the acquiring sub-module 420a, the selected object from the object displayed by the mark As an obstacle.
  • the determining sub-module 420b is further configured to mark the display deletion control at the object recognized in the image, and determine the object that the deletion control is triggered as an obstacle in the image;
  • the identified object is marked in the image, and the object triggered by the long press is determined as an obstacle in the image.
  • the erasing module 430 includes: an identifying submodule 430a and an erasing submodule 430b.
  • the identification sub-module 430a is configured to identify an outline of the obstacle, and the line forming the contour of the obstacle is a phase A line composed of pixel points whose gradation difference between adjacent pixels is larger than a predetermined difference threshold.
  • Identifying the contour of the obstacle in the area where the obstacle is located in the image specifically, calculating the gradation difference between each pixel in the area and its adjacent pixel, and the gradation difference is greater than the predetermined difference threshold
  • the pixels are determined as edge pixels, and the lines formed by these edge pixels are the lines forming the contour of the obstacle.
  • the area in which the obstacle is referred to herein refers to the area in the image that contains the obstacle, and the size of the area is usually equal to or only slightly larger than the shape of the obstacle.
  • the predetermined difference threshold is usually set by the system developer.
  • the value of the predetermined difference threshold is not specifically limited in this embodiment, and may be determined according to actual conditions.
  • the erasing sub-module 430b is configured to use an area defined by the outline of the obstacle as an obstacle area, and erase information in the obstacle area.
  • the area enclosed by the outline of the obstacle is used as an obstacle area, which can reduce the deletion of the area other than the obstacle when the obstacle is erased.
  • the patching module 440 includes: a query submodule 440a, a screening submodule 440b, and a patching submodule 440c.
  • the query sub-module 440a is configured to acquire geographic location information when the image is captured, and query the same type of image with the same shooting location as the geographic location information.
  • Obtaining geographic location information can be achieved in a variety of ways, such as through Global Positioning System (GPS), Beidou positioning system, etc. to obtain geographic location information.
  • GPS Global Positioning System
  • Beidou positioning system etc.
  • the manner in which the geographic location information is acquired when the image is captured is not specifically limited in this embodiment, and may be determined according to actual conditions.
  • the image referred to herein as the geographical location information refers to an image stored in the server that is also captured at the geographic location. For example, when the user's geographic location information when shooting an image is Beijing Tiananmen, the server searches for the image stored at the server in Beijing Tiananmen.
  • a homogeneous image refers to an image containing an object similar to an object in a captured image.
  • the screening sub-module 440b is configured to filter out the patched reference image of the image from the similar image queried by the query sub-module 440a, and the similarity between the image and the patched reference image is greater than the similarity threshold.
  • the similarity calculation is performed on the image and the original image taken by the camera.
  • the image having the similarity greater than the similarity threshold is determined as the candidate patch reference image, and the candidate patch reference image having the greatest similarity to the original image is determined as the patch reference image.
  • the similarity threshold is set by the system developer.
  • the value of the similarity threshold is not specifically limited in this embodiment, and may be determined according to actual conditions.
  • the patch sub-module 440c is configured to repair the obstacle region in the image according to the patch reference image selected by the screening sub-module 440b.
  • the compensated image information is acquired from the region corresponding to the obstacle in the patch reference image, and the obstacle region in the image is repaired by the compensated image information.
  • Identifying the area corresponding to the obstacle in the reference image by image recognition technology, and identifying the area of the area The surrounding pixels are the same as the pixels around the obstacle area in the image, and the image information of the area is acquired as compensation image information, and the obstacle area in the image is repaired by the compensation image information.
  • the repair sub-module 440c is further configured to filter, from the screening sub-module 440b, the region corresponding to the obstacle in the patch reference image to obtain compensation image information, and use the compensated image information to repair the obstacle region in the image. .
  • the patching module 440 further includes: a filler submodule 440d.
  • the filling sub-module 440d is configured to stretch-deform the image background around the obstacle region to fill the patching obstacle region.
  • the smart camera device acquires an image captured by the camera, acquires an obstacle in the image, and erases information in the obstacle region corresponding to the obstacle.
  • the obstacle area after erasing the information is repaired. Since the electronic device automatically detects and erases obstacles in the image and repairs the erased area in the image, the automatic removal of obstacles in the image during photographing is realized, and the related art needs to be solved. Post-processing photos remove the obstacles in the image, simplifying the user's operation and improving the user experience.
  • the object that is triggered by the deletion control is determined as an obstacle in the image by marking the display deletion control at the object recognized in the image; or the object displayed by the marker in the image is long
  • the triggered object is determined as an obstacle in the image; since the electronic device highlights the detected obstacle to the user, so that the user can select the area to be erased by the corresponding triggering manner, simplifying the determination of the obstacle The way.
  • the line forming the contour of the obstacle is a line composed of pixel points whose gray level difference between adjacent pixel points is greater than a predetermined difference threshold; defining the contour of the obstacle The area is used as an obstacle area, and the information in the obstacle area is erased; the contour of the obstacle is extracted, and the area to be erased, that is, the obstacle area is determined according to the obstacle contour, and the area is The information is erased.
  • the geographic location information when the captured image is acquired is used to query the same type of image with the same location information as the geographic location information; the repaired reference image of the image is filtered out from the similar image that is queried, and the image and the repaired reference image are The similarity between the two is greater than the similarity threshold; the obstacle region in the image is repaired according to the repaired reference image; since the patched reference image of the image is filtered out from the queried similar image, according to the patched reference image in the image The obstacle area is repaired, so that not only the intelligent erasure of the obstacle in the image can be completed, the complete image without the obstacle is obtained, and the repaired area content can be compared to restore the real content, and the image is maintained. Realism.
  • the compensated image information is acquired from the region corresponding to the obstacle in the repair reference map, and the obstacle region in the image is repaired by the compensated image information.
  • the obstacle is deformed by stretching the background of the image around the obstacle area to fill the obstacle The area is realized.
  • the content of the background of the image is similar. Therefore, the deformation of the background of the image is used to repair the obstacle area, and the repair is reduced. The abruptness of the contents of the rear obstacle area.
  • An exemplary embodiment of the present disclosure provides a smart photographing apparatus capable of implementing the smart photographing method provided by the present disclosure, the smart photographing apparatus comprising: a processor, a memory for storing processor executable instructions;
  • processor is configured to:
  • FIG. 5 is a block diagram of an apparatus for smart photographing, according to an exemplary embodiment.
  • the device 500 may be a camera-equipped device such as a smart phone, a tablet computer, a video camera, a camera, or the like, and may also be a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, and a personal number.
  • apparatus 500 can include one or more of the following components: processing component 502, memory 504, power component 506, multimedia component 508, audio component 510, input/output (I/O) interface 512, sensor component 514, And a communication component 516.
  • Processing component 502 typically controls the overall operation of device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • Processing component 502 can include one or more processors 520 to execute instructions to perform all or part of the steps of the above described methods.
  • processing component 502 can include one or more modules to facilitate interaction between component 502 and other components.
  • processing component 502 can include a multimedia module to facilitate interaction between multimedia component 508 and processing component 502.
  • Memory 504 is configured to store various types of data to support operation at device 500. Examples of such data include instructions for any application or method operating on device 500, contact data, phone book data, messages, pictures, videos, and the like.
  • the memory 504 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM Electrically erasable programmable read only memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Disk Disk or Optical Disk.
  • Power component 506 provides power to various components of device 500.
  • Power component 506 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for device 500.
  • the multimedia component 508 includes a screen between the device 500 and the user that provides an output interface.
  • the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes a One or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may sense not only the boundary of the touch or sliding action, but also the duration and pressure associated with the touch or slide operation.
  • the multimedia component 508 includes a front camera and/or a rear camera. When the device 500 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 510 is configured to output and/or input an audio signal.
  • audio component 510 includes a microphone (MIC) that is configured to receive an external audio signal when device 500 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode.
  • the received audio signal may be further stored in memory 504 or transmitted via communication component 516.
  • audio component 510 also includes a speaker for outputting an audio signal.
  • the I/O interface 512 provides an interface between the processing component 502 and the peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.
  • Sensor assembly 514 includes one or more sensors for providing device 500 with various aspects of status assessment.
  • sensor assembly 514 can detect an open/closed state of device 500, a relative positioning of components, such as the display and keypad of device 500, and sensor component 514 can also detect a change in position of one component of device 500 or device 500. The presence or absence of user contact with device 500, device 500 orientation or acceleration/deceleration, and temperature variation of device 500.
  • Sensor assembly 514 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
  • Sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 514 can also include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 516 is configured to facilitate wired or wireless communication between device 500 and other devices.
  • the device 500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof.
  • communication component 516 receives broadcast signals or broadcast associated information from an external broadcast management system via a broadcast channel.
  • the communication component 516 also includes a near field communication (NFC) module to facilitate short range communication.
  • NFC near field communication
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • apparatus 500 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor, or other electronic component implementation for performing the above methods.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A gate array
  • controller microcontroller, microprocessor, or other electronic component implementation for performing the above methods.
  • non-transitory computer readable storage medium comprising instructions, such as a memory 504 comprising instructions executable by processor 520 of apparatus 500 to perform the above method.
  • the non-transitory computer readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
  • a non-transitory computer readable storage medium when instructions in the storage medium are executed by a processor of apparatus 500, enables apparatus 500 to perform the steps illustrated in Figures 1, 2A, 2B, and 2E.

Abstract

本公开揭示了一种智能拍照方法及装置,属于图像处理领域。所述智能拍照方法包括:获取摄像头拍摄的图像;获取所述图像中的障碍物;对所述障碍物所对应的障碍物区域内的信息进行擦除;对擦除信息后的所述障碍物区域进行修补。本公开解决了相关技术中通过后期处理照片清除障碍物的方式过程繁琐以及工作效率低的技术问题;达到了简化用户操作,提高用户体验的效果。

Description

智能拍照方法及装置
本申请基于申请号为CN 201610201760.8、申请日为2016年3月31日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及图像处理领域,特别涉及一种智能拍照方法及装置。
背景技术
随着电子设备的功能的飞速发展,现如今用户常使用电子设备上的拍照功能进行拍照。
用户在拍照时,照片中经常出现一些障碍物,比如用户只想对湛蓝的天空进行拍照,此时一只飞鸟也出现在摄像头中,用户希望拍摄的照片中没有飞鸟只有蓝天,此时飞鸟就是照片中的障碍物。这些照片中的障碍物困扰着用户,相关技术中,用户可以通过绘图软件对照片的进行后期处理,将照片中障碍物清除,但这种通过后期处理照片清除障碍物的方式过程繁琐,工作效率低。
发明内容
本公开提供一种智能拍照方法及装置。所述技术方案如下:
根据本公开实施例的第一方面,提供一种智能拍照方法,所述方法包括:获取摄像头拍摄的图像;获取所述图像中的障碍物;对所述障碍物所对应的障碍物区域内的信息进行擦除;对擦除信息后的所述障碍物区域进行修补;由于是由电子设备对图像中的障碍物进行自动检测以及擦除,并对图像中擦除区域进行修补,实现了在拍照时自动化地对图像中障碍物的清除,解决了相关技术中需要通过后期处理照片清除图片中的障碍物的问题,简化了用户的操作,提高了用户体验。
可选地,所述获取所述图像中的障碍物,包括:获取所述图像中与预定障碍物形状相同的物体;或者,获取所述图像中像素与图像背景之间的像素色差大于预定差值阈值的物体;将获取出的所述物体作为所述图像的障碍物;或者,对获取出的所述物体进行标记显示,将从标记显示的物体中被选中的物体作为障碍物。
可选地,所述对获取出的所述物体进行标记显示,将从标记显示的物体中被选中的物体作为障碍物,包括:在所述图像中识别出的物体处标记显示删除控件,将删除控件被触发的物体确定为所述图像中的障碍物;或者,在所述图像中标记显示识别出的物体,将被长按触发的物体确定为所述图像中的障碍物;由于电子设备将检测出来的障碍物突出展示给用户,以使得用户可通过对应的触发方式来选择需要进行擦除的区域,简化了确定障碍 物的方式。
可选地,所述对所述障碍物所对应的障碍物区域内的信息进行擦除,包括:识别障碍物的轮廓,形成所述障碍物轮廓的线条为与相邻像素点之间的灰度差值大于预定差值阈值的像素点组成的线条;将所述障碍物的轮廓圈定的区域作为所述障碍物区域,对所述障碍物区域内的信息进行擦除;实现了对障碍物轮廓的提取,根据障碍物轮廓确定需要进行擦除的区域,也即障碍物区域,对该区域内的信息进行擦除。
可选地,所述对擦除信息后的所述障碍物区域进行修补,包括:获取拍摄所述图像时的地理位置信息,查询拍摄地点与所述地理位置信息相同的同类图像;从查询到的同类图像中筛选出所述图像的修补参照图像,所述图像与所述修补参照图像之间的相似度大于相似度阈值;根据所述修补参照图像对所述图像中的所述障碍物区域进行修补;由于从查询到的同类图像中筛选出图像的修补参照图像,根据该修补参照图像对图像中的述障碍物区域进行了修补,这样不仅可以完成对图像中障碍物的智能擦除,得到不包含障碍物的完整图像,还可以使得修补后的区域内容比较还原真实的内容,保持了图像的真实感。
可选地,所述根据所述修补参照图像对所述图像中的所述障碍物区域进行修补,包括:从所述修补参照图中与所述障碍物对应的区域获取补偿图像信息,利用所述补偿图像信息对所述图像中的所述障碍物区域进行修补。
可选地,所述对擦除信息后的所述障碍物区域进行修补,包括:将所述障碍物区域周围的图像背景进行拉伸变形,以填充修补所述障碍物区域;实现了在无法获取到同类图像对图像中的障碍物区域进行修补时,由于图像背景的内容相近,因此利用对图像背景的拉伸变形,以实现对障碍物区域的修补,降低了修补后障碍物区域内容的突兀。
根据本公开实施例的第二方面,提供一种智能拍照装置,所述装置包括:第一获取模块,被配置为获取摄像头拍摄的图像;第二获取模块,被配置为获取所述第一获取模块获取到的图像中的障碍物;擦除模块,被配置为对所述第二获取模块获取到的障碍物所对应的障碍物区域内的信息进行擦除;修补模块,被配置为对擦除信息后的所述障碍物区域进行修补。
可选地,所述第二获取模块,包括:获取子模块,被配置为获取所述第一获取模块获取到的图像中与预定障碍物形状相同的物体;或者,获取所述第一获取模块获取到的图像中像素与图像背景之间的像素色差大于预定差值阈值的物体;确定子模块,被配置为将所述获取子模块获取出的所述物体作为所述图像的障碍物;或者,对所述获取子模块获取出的所述物体进行标记显示,将从标记显示的物体中被选中的物体作为障碍物。
可选地,所述确定子模块还被配置为:在所述图像中识别出的物体处标记显示删除控件,将删除控件被触发的物体确定为所述图像中的障碍物;或者,在所述图像中标记显示识别出的物体,将被长按触发的物体确定为所述图像中的障碍物。
可选地,所述擦除模块,包括:识别子模块,被配置为识别障碍物的轮廓,形成所述障碍物轮廓的线条为与相邻像素点之间的灰度差值大于预定差值阈值的像素点组成的线 条;擦除子模块,被配置为将所述障碍物的轮廓圈定的区域作为所述障碍物区域,对所述障碍物区域内的信息进行擦除。
可选地,所述修补模块,包括:查询子模块,被配置为获取拍摄所述图像时的地理位置信息,查询拍摄地点与所述地理位置信息相同的同类图像;筛选子模块,被配置为从所述查询子模块查询到的同类图像中筛选出所述图像的修补参照图像,所述图像与所述修补参照图像之间的相似度大于相似度阈值;修补子模块,被配置为根据所述筛选子模块筛选出的修补参照图像对所述图像中的所述障碍物区域进行修补。
可选地,所述修补子模块,还被配置为从所述筛选子模块筛选出的修补参照图中与所述障碍物对应的区域获取补偿图像信息,利用所述补偿图像信息对所述图像中的所述障碍物区域进行修补。
可选地,所述修补模块,还包括:填充子模块,被配置为将所述障碍物区域周围的图像背景进行拉伸变形,以填充修补所述障碍物区域。
根据本公开实施例的第三方面,提供一种智能拍照装置,所述装置包括:
处理器;
用于存储所述处理器可执行指令的存储器;
其中,所述处理器被配置为:
获取摄像头拍摄的图像;
获取所述图像中的障碍物;
对所述障碍物所对应的障碍物区域内的信息进行擦除;
对擦除信息后的所述障碍物区域进行修补。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并于说明书一起用于解释本公开的原理。
图1是根据一示例性实施例示出的一种智能拍照方法的流程图;
图2A是根据另一示例性实施例示出的一种智能拍照方法的流程图;
图2B是根据一示例性实施例示出的一种获取图像中的障碍物方法的流程图;
图2C是根据一示例性实施例示出的一种障碍物所在的区域的示意图;
图2D是根据一示例性实施例示出的对障碍物区域内的信息进行擦除的示意图;
图2E是根据一示例性实施例示出的一种对擦除信息后的障碍物区域进行修补的方法的流程图;
图2F根据一示例性实施例示出的一修补参照图像;
图2G根据一示例性实施例示出的一利用修补图像对图像进行修补得到的图像;
图2H根据一示例性实施例示出的一摄像头拍摄的图像;
图2I根据一示例性实施例示出的一在图像中识别出的物体处标记显示删除控件的示意图;
图2J是根据一示例性实施例示出的以在图像中标记显示识别出的物体的示意图;
图3是根据一示例性实施例示出的一种智能拍照装置的框图;
图4是根据另一示例性实施例示出的一种智能拍照装置的框图;
图5是根据一示例性实施例示出的一种用于智能拍照的装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
图1是根据一示例性实施例示出的一种智能拍照方法的流程图,该智能拍照方法应用于包含摄像头的电子设备中,这里所讲的电子设备可以为智能手机、平板电脑、摄像机、照相机等具备摄像功能的设备。该智能拍照方法可以包括如下几个步骤。
在步骤101中,获取摄像头拍摄的图像。
在步骤102中,获取该图像中的障碍物。
在步骤103中,对障碍物所对应的障碍物区域内的信息进行擦除。
在步骤104中,对擦除信息后的该障碍物区域进行修补。
综上所述,本公开实施例中提供的智能拍照方法,通过获取摄像头拍摄的图像,获取该图像中的障碍物,对该障碍物所对应的障碍物区域内的信息进行擦除,并对擦除信息后的障碍物区域进行修补。由于是由电子设备对图像中的障碍物进行自动检测以及擦除,并对图像中擦除区域进行修补,实现了在拍照时自动化地对图像中障碍物的清除,解决了相关技术中需要通过后期处理照片清除图片中的障碍物的问题,简化了用户的操作,提高了用户体验。
一般来讲,电子设备向用户提供了智能拍照控件,该智能拍照控件用于触发该电子设备进入障碍物智能擦除模式。当电子设备进入障碍物智能擦除模式时,电子设备可以对用户正在拍照时摄像头拍摄的图像中的障碍物进行擦除,还可以对用户完成拍照得到的图像中的障碍物进行擦除。
图2A是根据另一示例性实施例示出的一种智能拍照方法的流程图,该智能拍照方法应用于包含摄像头的电子设备中,这里所讲的电子设备可以为智能手机、平板电脑、摄像机、照相机等具备摄像功能的设备。该智能拍照方法可以包括如下几个步骤。
在步骤201中,获取摄像头拍摄的图像,获取该图像中的障碍物。
可选地,获取图像中的障碍物可以通过如图2B所示的几个子步骤实现。
在步骤201a中,获取图像中与预定障碍物形状相同的物体。
预定障碍物形状可以由系统开发人员设定,也可以由用户设定。比如,用户可以预先设定铁丝网为障碍物,则电子设备需要获取图像中与铁丝网形状相似的物体。再比如,用户还可以预先设定小鸟为障碍物,则电子设备需要获取图像中与小鸟的形状相似的物体。可选地,当由用户设定障碍物时,可以根据用户涂鸦的形状来设定障碍物的形状,也可以将用户历史设为障碍物的物体作为障碍物。
可选地,获取图像中与预定障碍物形状相似度大于预定阈值的物体,以使得对于同一类型的障碍物,减少本地存储的与该类型障碍物对应的预定障碍物形状的数量。举例来讲,系统开发人员设定小鸟为障碍物,则电子设备可只存储小鸟的几个动作的形状作为障碍物形状。比如,小鸟在飞行时该小鸟的形状,小鸟栖息时该小鸟的形状等等。
在步骤201b中,将获取出的物体作为该图像的障碍物。
在步骤202中,识别障碍物的轮廓,形成障碍物轮廓的线条为与相邻像素点之间的灰度差值大于预定差值阈值的像素点组成的线条。
对图像中障碍物所在的区域进行障碍物的轮廓的识别,具体地,计算该区域中每个像素点与其相邻像素点之间的灰度差值,将灰度差值大于预定差值阈值的像素点确定为边缘像素点,这些边缘像素点组成的线条即为形成障碍物轮廓的线条。
这里所讲的障碍物所在的区域是指图像中包含该障碍物的区域,通常该区域的大小等于或仅略大于障碍物形状的大小。举例来讲,如图2C所示,图2C是根据一示例性实施例示出的一种障碍物所在的区域的示意图。系统开发人员设定垃圾箱为障碍物,则该障碍物垃圾箱所在的区域可以为图像中的区域21,使得在后续过程中能够将障碍物垃圾箱以及阳光下该垃圾箱的影子作为障碍物区域,一同进行擦除。
需要说明的一点是,预定差值阈值通常由系统开发人员设定,本实施例对预定差值阈值的数值不作具体限定,可根据实际情况确定。
在步骤203中,将障碍物的轮廓圈定的区域作为障碍物区域,对障碍物区域内的信息进行擦除。
将障碍物的轮廓圈定的区域作为障碍物区域,这样可以减少在擦除障碍物时,对障碍物以外的区域进行删除。举例来讲,仍旧参见图2C,图2C为摄像头拍摄的原始图像,在对该图像中的区域21进行轮廓识别,将该障碍物的轮廓圈定的区域为障碍物区域,也即图2D中阴影部分的区域21a,图2D是根据一示例性实施例示出的对障碍物区域内的信息进行擦除的示意图。在擦除障碍物区域内的信息时,仅需要擦除图2D中的阴影部分的区域21a,而不需要擦除区域21中区域21a的补集区域21b。
在步骤204中,对擦除信息后的障碍物区域进行修补。
本步骤可以通过如图2E所示的几个子步骤实现。
在步骤204a中,获取拍摄图像时的地理位置信息,查询拍摄地点与地理位置信息相同的同类图像。
获取地理位置信息可以通过多种方式实现,比如通过全球定位系统(英文:Global Positioning System,GPS)、北斗定位系统等来获取地理位置信息。本实施例对拍摄图像时获取地理位置信息的方式不作具体限定,可根据实际情况确定。
这里所讲的与地理位置信息相同的图像,是指服务器中存储的同样也是在该地理位置进行拍摄得到的图像。举例来讲,用户在拍摄图像时的地理位置信息为北京天安门,则在服务器中查询服务器存储的拍摄地点为北京天安门的图像。同类图像是指包含与拍摄图像中的物体相似的物体的图像。
举例来讲,仍旧参见图2C为用户进行拍摄得到的图像,图2D为障碍物区域的信息进行擦除后的图像。当用户在拍摄图像时的地理位置信息为比萨斜塔附近,则获取服务器中存储的拍摄地点为比萨斜塔附近的图像。用户拍摄的原始图像图2C中包含比萨斜塔,则在服务器中查询到拍摄地点为比萨斜塔附近的图像中查询包含比萨斜塔的图像,这些包含比萨斜塔的图像即为同类图像。
在步骤204b中,从查询到的同类图像中筛选出图像的修补参照图像,图像与该修补参照图像之间的相似度大于相似度阈值。
对于查询到的同类图像中的每一个图像,对该图像与摄像头拍摄的原始图像进行相似度计算。将相似度大于相似度阈值的图像确定为候选修补参照图像,将与上述原始图像相似度最大的候选修补参照图像确定为修补参照图像。
举例来讲,用户拍摄图像得到图2C时的地理位指信息为比萨斜塔附近,从服务器中查询拍摄地点为比萨斜塔附近的同类图像中,筛选出的修补参照图像如图2F所示。
一般来讲,相似度阈值由系统开发人员设定,本实施例对相似度阈值的数值不作具体限定,可根据实际情况确定。
在步骤204c中,根据修补参照图像对图像中的障碍物区域进行修补。
具体地,从修补参照图像中与障碍物对应的区域获取补偿图像信息,利用该补偿图像信息对图像中的障碍物区域进行修补。
通过图像识别技术识别修补参照图像中与障碍物对应的区域,识别出的该区域周围的像素点与图像中障碍物区域周围的像素点相同,获取该区域的图像信息作为补偿图像信息,利用该补偿图像信息对图像中的障碍物区域进行修补。
举例来讲,利用参考图像图2F对障碍物区域的图像信息进行删除后的图2D进行修补,则得到修补后的图像如图2G所示,该图像中根据参考图像图2F对障碍物区域的图像信息进行修复的区域为区域21a。
综上所述,本公开实施例中提供的智能拍照方法,通过获取摄像头拍摄的图像,获取该图像中的障碍物,对该障碍物所对应的障碍物区域内的信息进行擦除,并对擦 除信息后的障碍物区域进行修补。由于是由电子设备对图像中的障碍物进行自动检测以及擦除,并对图像中擦除区域进行修补,实现了在拍照时自动化地对图像中障碍物的清除,解决了相关技术中需要通过后期处理照片清除图片中的障碍物的问题,简化了用户的操作,提高了用户体验。
可选地,在对擦除信息后的障碍物区域进行修补时,还可以通过以下方式实现:将该障碍物区域周围的图像背景进行拉伸变形,以填充修补该障碍物区域。
举例来讲,如图2H(1)所示为摄像头拍摄的图像,用户设定小鸟为障碍物时,获取该图像中的障碍物区域,对障碍物区域进行擦除。在对擦除信息后的障碍物区域进行修补时,获取该障碍物区域周围的背景图像,比如获取从图像中小鸟障碍物周围的图像背景为白云,将该白云图像进行拉伸变形成与障碍物区域形状相同的图像以填充该障碍物区域,修补后的图像如图2H(2)所示。
可选地,在获取图像中的障碍物时,还可以通过以下几种方式实现。
在一种可能的实现方式中,获取图像中像素与图像背景之间的像素色差大于预定差值阈值的物体,将获取出的物体作为该图像的障碍物。
也就是说,对于图像中的每一个物体,检测该物体的像素与该图像背景之间的像素差,当像素差大于预定差值阈值时,则将该物体作为障碍物。举例来讲,用户想要获得一张白纸的图像,在对白纸进行拍摄得到的图像中白纸上还有一个黑色圆点。电子设备会检测到该黑色圆点与白色背景之间像素差大于预定阈值,将该黑色圆点作为图像的障碍物。
对于如何确定图像中的物体可以通过多种方式实现,比如对图像进行边缘检测,检测出的边缘线条组成物体的轮廓从而确定图像中的物体。对于如何确定图像中的物体是本领域普通技术人员所能够实现的,本实施例对此不再赘述。
在一种可能的实现方式中,获取图像中与预定障碍物形状相同的物体,对获取出的物体进行标记显示,将从标记显示的物体中被选中的物体作为障碍物。
也就是说,将图像中检测出的与预定障碍物形状相同的物体进行显示,提供给用户进行选择,将用户选中的物体作为障碍物。
在一种可能的实现方式中,获取图像中像素与图像背景之间的像素色差大于预定差值阈值的物体,对获取出的物体进行标记显示,将从标记显示的物体中被选中的物体作为障碍物。
也就是说,对图像中像素与图像背景之间的像素色差大于预定差值阈值的物体进行显示,提供给用户进行选择,将用户选中的物体作为障碍物。
可选地,对获取出的物体进行标记显示,将从标记显示的物体中被选中的物体作 为障碍物,可以通过以下几种方式实现。
在一种可能的实现方式中,在图像中识别出的物体处标记显示删除控件,将删除控件被触发的物体确定为图像中的障碍物。
举例来讲,系统开发人员设定小鸟和垃圾箱为障碍物,则电子设备可以根据与小鸟对应的预定障碍物形状和与垃圾箱对应的预定障碍物形状对图像中的物体进行识别。如图2I所示,图2I是根据一示例性实施例示出的一在图像中识别出的物体处标记显示删除控件的示意图。在根据小鸟的预定障碍物形状识别出的物体处显示删除控件22,在根据垃圾箱的预定障碍物形状确定的物体处显示删除控件23。当检测到删除控件被触发时,将与该删除控件对应的物体确定为障碍物。
在另一种可能的实现方式中,在图像中标记显示识别出的物体,将被长按触发的物体确定为图像中的障碍物。
举例来讲,系统开发人员设定小鸟和垃圾箱为障碍物,则电子设备可以根据与小鸟对应的预定障碍物形状和与垃圾箱对应的预定障碍物形状对图像中的物体进行识别。图2J是根据一示例性实施例示出的以在图像中标记显示识别出的物体的示意图,如图2J所示,将识别出的物体用虚线框24进行标记显示,用户可根据可显示的虚线框24确定由电子设备检测出的可能是障碍物的物体。用户从中选择中需要进行擦除的物体进行长按触发,电子设备将被长按触发的物体确定为图像中的障碍物。
可选地,获取图像中的障碍物还可以通过以下方式实现:获取被选定的区域,提取该选定区域内障碍物的轮廓,将该障碍物轮廓圈定的区域作为障碍物区域。
也就是说,用户可以手动增加图像的障碍物区域,具体地,用户对在图像中选定一个区域,电子设备提取该选定区域内障碍物的轮廓,将该障碍物轮廓圈定的区域作为障碍物区域。
可选地,将从选定区域内提取的障碍物的轮廓作为预定障碍物形状添加到本地的预定障碍物形状库中,以使得后续电子设备可对图像中用户曾经指定进行擦除的障碍物进行检测,获取障碍物区域。
下述为本公开装置实施例,可以用于执行本公开方法实施例。对于本公开装置实施例中未披露的细节,请参照本公开方法实施例。
图3是根据一示例性实施例示出的一种智能拍照装置的框图,该智能拍照装置应用于包含摄像头的电子设备中,这里所讲的电子设备可以为智能手机、平板电脑、摄像机、照相机等具备摄像功能的设备。该智能拍照装置可以包括:第一获取模块310、第二获取模块320、擦除模块330和修补模块340。
第一获取模块310,被配置为获取摄像头拍摄的图像。
第二获取模块320,被配置为获取第一获取模块310获取到的图像中的障碍物。
擦除模块330,被配置为对第二获取模块320获取到的障碍物所对应的障碍物区域内的信息进行擦除。
修补模块340,被配置为对擦除信息后的障碍物区域进行修补。
综上所述,本公开实施例中提供的智能拍照装置,通过获取摄像头拍摄的图像,获取该图像中的障碍物,对该障碍物所对应的障碍物区域内的信息进行擦除,并对擦除信息后的障碍物区域进行修补。由于是由电子设备对图像中的障碍物进行自动检测以及擦除,并对图像中擦除区域进行修补,实现了在拍照时自动化地对图像中障碍物的清除,解决了相关技术中需要通过后期处理照片清除图片中的障碍物的问题,简化了用户的操作,提高了用户体验。
图4是根据另一示例性实施例示出的一种智能拍照装置的框图,该智能拍照装置应用于包含摄像头的电子设备中,这里所讲的电子设备可以为智能手机、平板电脑、摄像机、照相机等具备摄像功能的设备。该智能拍照装置可以包括:第一获取模块410、第二获取模块420、擦除模块430和修补模块440。
第一获取模块410,被配置为获取摄像头拍摄的图像。
第二获取模块420,被配置为获取第一获取模块410获取到的图像中的障碍物。
擦除模块430,被配置为对第二获取模块420获取到的障碍物所对应的障碍物区域内的信息进行擦除。
修补模块440,被配置为对擦除信息后的障碍物区域进行修补。
可选地,第二获取模块420,包括:获取子模块420a和确定子模块420b。
获取子模块420a,被配置为获取第一获取模块410获取到的图像中与预定障碍物形状相同的物体;或者,获取第一获取模块410获取到图像中像素与图像背景之间的像素色差大于预定差值阈值的物体。
预定障碍物形状可以由系统开发人员设定,也可以由用户设定。可选地,获取图像中与预定障碍物形状相似度大于预定阈值的物体,以使得对于同一类型的障碍物,减少本地存储的与该类型障碍物对应的预定障碍物形状的数量。
确定子模块420b,被配置为将获取子模块420a获取出的物体作为该图像的障碍物;或者,对获取子模块420a获取出的物体进行标记显示,将从标记显示的物体中被选中的物体作为障碍物。
可选地,确定子模块420b,还被配置为在图像中识别出的物体处标记显示删除控件,将删除控件被触发的物体确定为该图像中的障碍物;
或者,在该图像中标记显示识别出的物体,将被长按触发的物体确定为该图像中的障碍物。
可选地,擦除模块430,包括:识别子模块430a和擦除子模块430b。
识别子模块430a,被配置为识别障碍物的轮廓,形成该障碍物轮廓的线条为与相 邻像素点之间的灰度差值大于预定差值阈值的像素点组成的线条。
对图像中障碍物所在的区域进行障碍物的轮廓的识别,具体地,计算该区域中每个像素点与其相邻像素点之间的灰度差值,将灰度差值大于预定差值阈值的像素点确定为边缘像素点,这些边缘像素点组成的线条即为形成障碍物轮廓的线条。
这里所讲的障碍物所在的区域是指图像中包含该障碍物的区域,通常该区域的大小等于或仅略大于障碍物形状的大小。
需要说明的一点是,预定差值阈值通常由系统开发人员设定,本实施例对预定差值阈值的数值不作具体限定,可根据实际情况确定。
擦除子模块430b,被配置为将该障碍物的轮廓圈定的区域作为障碍物区域,对该障碍物区域内的信息进行擦除。
将障碍物的轮廓圈定的区域作为障碍物区域,这样可以减少在擦除障碍物时,对障碍物以外的区域进行删除。
可选地,修补模块440,包括:查询子模块440a、筛选子模块440b和修补子模块440c。
查询子模块440a,被配置为获取拍摄图像时的地理位置信息,查询拍摄地点与该地理位置信息相同的同类图像。
获取地理位置信息可以通过多种方式实现,比如通过全球定位系统(英文:Global Positioning System,GPS)、北斗定位系统等来获取地理位置信息。本实施例对拍摄图像时获取地理位置信息的方式不作具体限定,可根据实际情况确定。
这里所讲的与地理位置信息相同的图像,是指服务器中存储的同样也是在该地理位置进行拍摄得到的图像。举例来讲,用户在拍摄图像时的地理位置信息为北京天安门,则在服务器中查询服务器存储的拍摄地点为北京天安门的图像。同类图像是指包含与拍摄图像中的物体相似的物体的图像。
筛选子模块440b,被配置为从查询子模块440a查询到的同类图像中筛选出图像的修补参照图像,该图像与修补参照图像之间的相似度大于相似度阈值。
对于查询到的同类图像中的每一个图像,对该图像与摄像头拍摄的原始图像进行相似度计算。将相似度大于相似度阈值的图像确定为候选修补参照图像,将与上述原始图像相似度最大的候选修补参照图像确定为修补参照图像。
一般来讲,相似度阈值由系统开发人员设定,本实施例对相似度阈值的数值不作具体限定,可根据实际情况确定。
修补子模块440c,被配置为根据筛选子模块440b筛选出的修补参照图像对图像中的障碍物区域进行修补。
具体地,从修补参照图像中与障碍物对应的区域获取补偿图像信息,利用该补偿图像信息对图像中的障碍物区域进行修补。
通过图像识别技术识别修补参照图像中与障碍物对应的区域,识别出的该区域周 围的像素点与图像中障碍物区域周围的像素点相同,获取该区域的图像信息作为补偿图像信息,利用该补偿图像信息对图像中的障碍物区域进行修补。
可选地,修补子模块440c,还被配置为从筛选子模块440b筛选出修补参照图中与该障碍物对应的区域获取补偿图像信息,利用该补偿图像信息对图像中的障碍物区域进行修补。
可选地,修补模块440,还包括:填充子模块440d。
填充子模块440d,被配置为将障碍物区域周围的图像背景进行拉伸变形,以填充修补障碍物区域。
综上所述,本公开实施例中提供的智能拍照装置,通过获取摄像头拍摄的图像,获取该图像中的障碍物,对该障碍物所对应的障碍物区域内的信息进行擦除,并对擦除信息后的障碍物区域进行修补。由于是由电子设备对图像中的障碍物进行自动检测以及擦除,并对图像中擦除区域进行修补,实现了在拍照时自动化地对图像中障碍物的清除,解决了相关技术中需要通过后期处理照片清除图片中的障碍物的问题,简化了用户的操作,提高了用户体验。
可选地,通过在图像中识别出的物体处标记显示删除控件,将删除控件被触发的物体确定为该图像中的障碍物;或者,在该图像中标记显示识别出的物体,将被长按触发的物体确定为该图像中的障碍物;由于电子设备将检测出来的障碍物突出展示给用户,以使得用户可通过对应的触发方式来选择需要进行擦除的区域,简化了确定障碍物的方式。
可选地,通过识别障碍物的轮廓,形成该障碍物轮廓的线条为与相邻像素点之间的灰度差值大于预定差值阈值的像素点组成的线条;将该障碍物的轮廓圈定的区域作为障碍物区域,对该障碍物区域内的信息进行擦除;实现了对障碍物轮廓的提取,根据障碍物轮廓确定需要进行擦除的区域,也即障碍物区域,对该区域内的信息进行擦除。
可选地,通过获取拍摄图像时的地理位置信息,查询拍摄地点与该地理位置信息相同的同类图像;从查询到的同类图像中筛选出该图像的修补参照图像,该图像与该修补参照图像之间的相似度大于相似度阈值;根据该修补参照图像对该图像中的障碍物区域进行修补;由于从查询到的同类图像中筛选出图像的修补参照图像,根据该修补参照图像对图像中的述障碍物区域进行了修补,这样不仅可以完成对图像中障碍物的智能擦除,得到不包含障碍物的完整图像,还可以使得修补后的区域内容比较还原真实的内容,保持了图像的真实感。
可选地,通过从修补参照图中与障碍物对应的区域获取补偿图像信息,利用该补偿图像信息对图像中的障碍物区域进行修补。
可选地,通过将障碍物区域周围的图像背景进行拉伸变形,以填充修补该障碍物 区域;实现了在无法获取到同类图像对图像中的障碍物区域进行修补时,由于图像背景的内容相近,因此利用对图像背景的拉伸变形,以实现对障碍物区域的修补,降低了修补后障碍物区域内容的突兀。
本公开一示例性实施例提供了一种智能拍照装置,能够实现本公开提供的智能拍照方法,该智能拍照装置包括:处理器、用于存储处理器可执行指令的存储器;
其中,处理器被配置为:
获取摄像头拍摄的图像;
获取该图像中的障碍物;
对该障碍物所对应的障碍物区域内的信息进行擦除;
对擦除信息后的障碍物区域进行修补。
图5是根据一示例性实施例示出的一种用于智能拍照的装置的框图。例如,装置500可以是智能手机、平板电脑、摄像机、照相机等具备摄像功能的设备,还可以是计算机、数字广播终端、消息收发设备、游戏控制台、平板设备、医疗设备、健身设备、个人数字助理等具备摄像功能的设备。
参照图5,装置500可以包括以下一个或多个组件:处理组件502,存储器504,电源组件506,多媒体组件508,音频组件510,输入/输出(I/O)的接口512,传感器组件514,以及通信组件516。
处理组件502通常控制装置500的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件502可以包括一个或多个处理器520来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件502可以包括一个或多个模块,便于处理组件502和其他组件之间的交互。例如,处理组件502可以包括多媒体模块,以方便多媒体组件508和处理组件502之间的交互。
存储器504被配置为存储各种类型的数据以支持在装置500的操作。这些数据的示例包括用于在装置500上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器504可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件506为装置500的各种组件提供电力。电源组件506可以包括电源管理系统,一个或多个电源,及其他与为装置500生成、管理和分配电力相关联的组件。
多媒体组件508包括在所述装置500和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一 个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件508包括一个前置摄像头和/或后置摄像头。当装置500处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件510被配置为输出和/或输入音频信号。例如,音频组件510包括一个麦克风(MIC),当装置500处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器504或经由通信组件516发送。在一些实施例中,音频组件510还包括一个扬声器,用于输出音频信号。
I/O接口512为处理组件502和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件514包括一个或多个传感器,用于为装置500提供各个方面的状态评估。例如,传感器组件514可以检测到装置500的打开/关闭状态,组件的相对定位,例如所述组件为装置500的显示器和小键盘,传感器组件514还可以检测装置500或装置500一个组件的位置改变,用户与装置500接触的存在或不存在,装置500方位或加速/减速和装置500的温度变化。传感器组件514可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件514还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件514还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件516被配置为便于装置500和其他设备之间有线或无线方式的通信。装置500可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件516经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件516还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,装置500可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器504,上述指令可由装置500的处理器520执行以完成上述方法。 例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
一种非临时性计算机可读存储介质,当所述存储介质中的指令由装置500的处理器执行时,使得装置500能够执行如图1、图2A、图2B和图2E所示的步骤。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。

Claims (15)

  1. 一种智能拍照方法,其特征在于,所述方法包括:
    获取摄像头拍摄的图像;
    获取所述图像中的障碍物;
    对所述障碍物所对应的障碍物区域内的信息进行擦除;
    对擦除信息后的所述障碍物区域进行修补。
  2. 根据权利要求1所述的方法,其特征在于,所述获取所述图像中的障碍物,包括:
    获取所述图像中与预定障碍物形状相同的物体;或者,获取所述图像中像素与图像背景之间的像素色差大于预定差值阈值的物体;
    将获取出的所述物体作为所述图像的障碍物;或者,对获取出的所述物体进行标记显示,将从标记显示的物体中被选中的物体作为障碍物。
  3. 根据权利要求2所述的方法,其特征在于,所述对获取出的所述物体进行标记显示,将从标记显示的物体中被选中的物体作为障碍物,包括:
    在所述图像中识别出的物体处标记显示删除控件,将删除控件被触发的物体确定为所述图像中的障碍物;
    或者,
    在所述图像中标记显示识别出的物体,将被长按触发的物体确定为所述图像中的障碍物。
  4. 根据权利要求1所述的方法,其特征在于,所述对所述障碍物所对应的障碍物区域内的信息进行擦除,包括:
    识别障碍物的轮廓,形成所述障碍物轮廓的线条为与相邻像素点之间的灰度差值大于预定差值阈值的像素点组成的线条;
    将所述障碍物的轮廓圈定的区域作为所述障碍物区域,对所述障碍物区域内的信息进行擦除。
  5. 根据权利要求1至4中任一所述的方法,其特征在于,所述对擦除信息后的所述障碍物区域进行修补,包括:
    获取拍摄所述图像时的地理位置信息,查询拍摄地点与所述地理位置信息相同的同类图像;
    从查询到的同类图像中筛选出所述图像的修补参照图像,所述图像与所述修补参照图像之间的相似度大于相似度阈值;
    根据所述修补参照图像对所述图像中的所述障碍物区域进行修补。
  6. 根据权利要求5中所述的方法,其特征在于,所述根据所述修补参照图像对所述图像中的所述障碍物区域进行修补,包括:
    从所述修补参照图中与所述障碍物对应的区域获取补偿图像信息,利用所述补偿图像信息对所述图像中的所述障碍物区域进行修补。
  7. 根据权利要求1至4中任一所述的方法,其特征在于,所述对擦除信息后的所述障碍物区域进行修补,包括:
    将所述障碍物区域周围的图像背景进行拉伸变形,以填充修补所述障碍物区域。
  8. 一种智能拍照装置,其特征在于,所述装置包括:
    第一获取模块,被配置为获取摄像头拍摄的图像;
    第二获取模块,被配置为获取所述第一获取模块获取到的图像中的障碍物;
    擦除模块,被配置为对所述第二获取模块获取到的障碍物所对应的障碍物区域内的信息进行擦除;
    修补模块,被配置为对擦除信息后的所述障碍物区域进行修补。
  9. 根据权利要求8所述的装置,其特征在于,所述第二获取模块,包括:
    获取子模块,被配置为获取所述第一获取模块获取到的图像中与预定障碍物形状相同的物体;或者,获取所述第一获取模块获取到的图像中像素与图像背景之间的像素色差大于预定差值阈值的物体;
    确定子模块,被配置为将所述获取子模块获取出的所述物体作为所述图像的障碍物;或者,对所述获取子模块获取出的所述物体进行标记显示,将从标记显示的物体中被选中的物体作为障碍物。
  10. 根据权利要求9所述的装置,其特征在于,所述确定子模块还被配置为:
    在所述图像中识别出的物体处标记显示删除控件,将删除控件被触发的物体确定为所述图像中的障碍物;
    或者,在所述图像中标记显示识别出的物体,将被长按触发的物体确定为所述图像中的障碍物。
  11. 根据权利要求8所述的装置,其特征在于,所述擦除模块,包括:
    识别子模块,被配置为识别障碍物的轮廓,形成所述障碍物轮廓的线条为与相邻像素点之间的灰度差值大于预定差值阈值的像素点组成的线条;
    擦除子模块,被配置为将所述障碍物的轮廓圈定的区域作为所述障碍物区域,对所述 障碍物区域内的信息进行擦除。
  12. 根据权利要求8至11中任一所述的装置,其特征在于,所述修补模块,包括:
    查询子模块,被配置为获取拍摄所述图像时的地理位置信息,查询拍摄地点与所述地理位置信息相同的同类图像;
    筛选子模块,被配置为从所述查询子模块查询到的同类图像中筛选出所述图像的修补参照图像,所述图像与所述修补参照图像之间的相似度大于相似度阈值;
    修补子模块,被配置为根据所述筛选子模块筛选出的修补参照图像对所述图像中的所述障碍物区域进行修补。
  13. 根据权利要求12所述的装置,其特征在于,所述修补子模块,还被配置为从所述筛选子模块筛选出的修补参照图中与所述障碍物对应的区域获取补偿图像信息,利用所述补偿图像信息对所述图像中的所述障碍物区域进行修补。
  14. 根据权利要求8至11中任一所述的装置,其特征在于,所述修补模块,还包括:
    填充子模块,被配置为将所述障碍物区域周围的图像背景进行拉伸变形,以填充修补所述障碍物区域。
  15. 一种智能拍照装置,其特征在于,所述装置包括:
    处理器;
    用于存储所述处理器可执行指令的存储器;
    其中,所述处理器被配置为:
    获取摄像头拍摄的图像;
    获取所述图像中的障碍物;
    对所述障碍物所对应的障碍物区域内的信息进行擦除;
    对擦除信息后的所述障碍物区域进行修补。
PCT/CN2016/098193 2016-03-31 2016-09-06 智能拍照方法及装置 WO2017166726A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610201760.8A CN105763812B (zh) 2016-03-31 2016-03-31 智能拍照方法及装置
CN201610201760.8 2016-03-31

Publications (1)

Publication Number Publication Date
WO2017166726A1 true WO2017166726A1 (zh) 2017-10-05

Family

ID=56347072

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/098193 WO2017166726A1 (zh) 2016-03-31 2016-09-06 智能拍照方法及装置

Country Status (4)

Country Link
US (1) US20170287188A1 (zh)
EP (1) EP3226204B1 (zh)
CN (1) CN105763812B (zh)
WO (1) WO2017166726A1 (zh)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105763812B (zh) * 2016-03-31 2019-02-19 北京小米移动软件有限公司 智能拍照方法及装置
CN106791393B (zh) * 2016-12-20 2019-05-17 维沃移动通信有限公司 一种拍摄方法及移动终端
CN106651762A (zh) * 2016-12-27 2017-05-10 努比亚技术有限公司 一种照片处理方法、装置及终端
CN106851098A (zh) * 2017-01-20 2017-06-13 努比亚技术有限公司 一种图像处理方法及移动终端
CN106791449B (zh) * 2017-02-27 2020-02-11 努比亚技术有限公司 照片拍摄方法及装置
CN106937055A (zh) * 2017-03-30 2017-07-07 维沃移动通信有限公司 一种图像处理方法及移动终端
CN107240068A (zh) * 2017-05-23 2017-10-10 北京小米移动软件有限公司 图片处理方法及装置
CN107437268A (zh) * 2017-07-31 2017-12-05 广东欧珀移动通信有限公司 拍照方法、装置、移动终端和计算机存储介质
CN107734260A (zh) * 2017-10-26 2018-02-23 维沃移动通信有限公司 一种图像处理方法及移动终端
CN108076290B (zh) * 2017-12-20 2021-01-22 维沃移动通信有限公司 一种图像处理方法及移动终端
CN108447105A (zh) * 2018-02-02 2018-08-24 微幻科技(北京)有限公司 一种全景图像的处理方法及装置
CN108566516B (zh) * 2018-05-14 2020-07-31 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及移动终端
CN108765380A (zh) * 2018-05-14 2018-11-06 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及移动终端
CN108494996B (zh) * 2018-05-14 2021-01-15 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及移动终端
CN108765321B (zh) * 2018-05-16 2021-09-07 Oppo广东移动通信有限公司 拍照修复方法、装置、存储介质及终端设备
CN109361874B (zh) * 2018-12-19 2021-05-14 维沃移动通信有限公司 一种拍照方法及终端
CN110728639B (zh) * 2019-09-29 2023-07-21 三星电子(中国)研发中心 图片修复方法及系统
CN110933299B (zh) * 2019-11-18 2022-03-25 深圳传音控股股份有限公司 一种图像处理方法、装置及计算机存储介质
CN114697514A (zh) * 2020-12-28 2022-07-01 北京小米移动软件有限公司 一种图像处理方法、装置、终端及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006330800A (ja) * 2005-05-23 2006-12-07 Nippon Telegr & Teleph Corp <Ntt> 画像合成システム、画像合成方法、この方法のプログラム
CN101617339A (zh) * 2007-02-15 2009-12-30 索尼株式会社 图像处理装置和图像处理方法
CN101938604A (zh) * 2009-07-02 2011-01-05 联想(北京)有限公司 一种图像处理方法及照相机
CN104113694A (zh) * 2014-07-24 2014-10-22 深圳市中兴移动通信有限公司 物体运动轨迹的拍摄装置方法及拍摄终端
CN104349045A (zh) * 2013-08-09 2015-02-11 联想(北京)有限公司 一种图像采集方法及电子设备
CN104580882A (zh) * 2014-11-03 2015-04-29 宇龙计算机通信科技(深圳)有限公司 拍照的方法及其装置
CN105763812A (zh) * 2016-03-31 2016-07-13 北京小米移动软件有限公司 智能拍照方法及装置

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7260273B2 (en) * 2003-08-08 2007-08-21 Seiko Epson Corporation System and method of editing a digital image to remove unwanted artifacts, objects and the like
US20050129324A1 (en) * 2003-12-02 2005-06-16 Lemke Alan P. Digital camera and method providing selective removal and addition of an imaged object
TWI241127B (en) * 2004-08-27 2005-10-01 Univ Nat Cheng Kung Image-capturing device and method for removing strangers
US8023766B1 (en) * 2007-04-30 2011-09-20 Hewlett-Packard Development Company, L.P. Method and system of processing an image containing undesirable pixels
US8768070B2 (en) * 2008-06-27 2014-07-01 Nokia Corporation Method, apparatus and computer program product for providing image modification
CN102117412B (zh) * 2009-12-31 2013-03-27 北大方正集团有限公司 图像识别方法和装置
CN103905716B (zh) * 2012-12-27 2017-08-18 三星电子(中国)研发中心 拍摄照片时动态处理取景画面的照相设备及方法
CN103400136B (zh) * 2013-08-13 2016-09-28 苏州大学 基于弹性匹配的目标识别方法
CN104486546B (zh) * 2014-12-19 2017-11-10 广东欧珀移动通信有限公司 拍照的方法、装置及移动终端
CN104978582B (zh) * 2015-05-15 2018-01-30 苏州大学 基于轮廓弦角特征的遮挡目标识别方法
CN105069454A (zh) * 2015-08-24 2015-11-18 广州视睿电子科技有限公司 图像识别的方法及装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006330800A (ja) * 2005-05-23 2006-12-07 Nippon Telegr & Teleph Corp <Ntt> 画像合成システム、画像合成方法、この方法のプログラム
CN101617339A (zh) * 2007-02-15 2009-12-30 索尼株式会社 图像处理装置和图像处理方法
CN101938604A (zh) * 2009-07-02 2011-01-05 联想(北京)有限公司 一种图像处理方法及照相机
CN104349045A (zh) * 2013-08-09 2015-02-11 联想(北京)有限公司 一种图像采集方法及电子设备
CN104113694A (zh) * 2014-07-24 2014-10-22 深圳市中兴移动通信有限公司 物体运动轨迹的拍摄装置方法及拍摄终端
CN104580882A (zh) * 2014-11-03 2015-04-29 宇龙计算机通信科技(深圳)有限公司 拍照的方法及其装置
CN105763812A (zh) * 2016-03-31 2016-07-13 北京小米移动软件有限公司 智能拍照方法及装置

Also Published As

Publication number Publication date
US20170287188A1 (en) 2017-10-05
EP3226204B1 (en) 2020-12-09
CN105763812B (zh) 2019-02-19
EP3226204A1 (en) 2017-10-04
CN105763812A (zh) 2016-07-13

Similar Documents

Publication Publication Date Title
WO2017166726A1 (zh) 智能拍照方法及装置
CN106557768B (zh) 对图片中的文字进行识别的方法及装置
KR101821750B1 (ko) 이미지 처리 방법 및 장치
US10452890B2 (en) Fingerprint template input method, device and medium
KR101727169B1 (ko) 이미지 필터를 생성하기 위한 방법 및 장치
WO2016192325A1 (zh) 视频文件的标识处理方法及装置
CN110619350B (zh) 图像检测方法、装置及存储介质
RU2643464C2 (ru) Способ и устройство для классификации изображений
KR102545408B1 (ko) 차폐된 이미지 검출 방법, 장치 및 매체
WO2017080084A1 (zh) 字体添加方法及装置
KR20170033807A (ko) 파노라마 사진의 생성 방법 및 장치
CN107292901B (zh) 边缘检测方法及装置
CN106469446B (zh) 深度图像的分割方法和分割装置
CN112396675A (zh) 图像处理方法、装置及存储介质
CN113079311B (zh) 图像获取方法及装置、电子设备、存储介质
CN110874829B (zh) 图像处理方法及装置、电子设备及存储介质
CN113761275A (zh) 视频预览动图生成方法、装置、设备及可读存储介质
CN107682623B (zh) 拍照方法及装置
CN112346606A (zh) 一种图片处理方法、装置及存储介质
CN112132762A (zh) 一种数据处理方法、装置和录音设备
CN112954110A (zh) 图像处理方法、装置及存储介质
CN110809119A (zh) 拍摄方法、拍摄装置及计算机可读存储介质
CN113138387B (zh) 图像采集方法、装置、移动终端及存储介质
CN110876013B (zh) 确定图像分辨率的方法及装置、电子设备及存储介质
CN110019894B (zh) 一种位置查找方法及装置

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16896496

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16896496

Country of ref document: EP

Kind code of ref document: A1