WO2017128914A1 - 一种拍摄方法及装置 - Google Patents

一种拍摄方法及装置 Download PDF

Info

Publication number
WO2017128914A1
WO2017128914A1 PCT/CN2016/112478 CN2016112478W WO2017128914A1 WO 2017128914 A1 WO2017128914 A1 WO 2017128914A1 CN 2016112478 W CN2016112478 W CN 2016112478W WO 2017128914 A1 WO2017128914 A1 WO 2017128914A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
display
photographing
similarity
parameter
Prior art date
Application number
PCT/CN2016/112478
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 WO2017128914A1 publication Critical patent/WO2017128914A1/zh

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/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/76Circuitry for compensating brightness variation in the scene by influencing the image signals

Definitions

  • the present application relates to photographing technology, and in particular, to a photographing method and apparatus.
  • an embodiment of the present invention provides a photographing method and apparatus.
  • the second image is captured when the similarity of the second image to the first image is greater than or equal to a threshold.
  • the method further includes:
  • the first prompt information is different from the second prompt information.
  • the displaying, by the first display parameter, the first image on the preview interface comprises:
  • the first image is displayed on the preview interface in accordance with the set transparency.
  • the calculating the similarity between the second image and the first image includes:
  • the displaying, by the setting, the first image on the preview interface according to the set transparency includes:
  • the bottom layer will produce a JPG format image saved in the gallery, and will capture the preview image of the first image;
  • the first image with the transparency set on the bottom layer is displayed on the preview interface.
  • the calculating the similarity between the second image and the first image includes:
  • the dividing the two histograms respectively includes:
  • the two histograms are each divided into at least one region; wherein each region has the same relative position in the two histograms.
  • the calculating a vector corresponding to the two histograms respectively includes:
  • the gray level of all the areas in each histogram is taken as the vector corresponding to each histogram.
  • the method further includes:
  • the second image of the shot is saved.
  • the first display parameter and the second display parameter each include at least one of: a transparency parameter, a color parameter, and a display effect parameter; the first display parameter is different from the second display parameter. .
  • the acquiring includes: acquiring an image based on a framing range and an angle, and displaying the image on the preview interface in real time;
  • the photographing includes photographing the preview screen of the current time, and buffering or saving the photographed photograph.
  • the embodiment of the invention further provides a photographing device, the device comprising:
  • a shooting unit configured to take a first image
  • a display unit configured to display the first image on the preview interface according to the first display parameter
  • a preview unit configured to acquire a second image
  • the display unit is configured to display the second image on the first image according to a second display parameter, and preview the second image on the preview interface;
  • a processing unit configured to calculate a similarity between the second image and the first image
  • the photographing unit is configured to photograph the second image when a similarity between the second image and the first image is greater than or equal to a threshold value.
  • the device further includes:
  • a prompting unit configured to display first prompt information when the similarity between the second image and the first image is greater than or equal to a threshold; when the similarity between the second image and the first image is less than When the threshold value is displayed, the second prompt information is displayed; the first prompt information and the second prompt The information is different.
  • the display unit is configured to display the first image on the preview interface according to the set transparency.
  • the display unit is configured to capture a first image, and the bottom layer generates an image in JPG format and saves the image in the gallery, and intercepts the preview image of the first image; and sets the transparency of the first image to The default transparency value; the first image with the transparency set on the bottom layer is displayed on the preview interface.
  • the processing unit is configured to acquire a histogram of the second image and the first image; respectively divide a region of the two histograms, and calculate a vector corresponding to the two histograms respectively ; Calculate the similarity of two vectors.
  • the processing unit is configured to divide the two histograms into at least one region; wherein each region has the same relative position in the two histograms.
  • the processing unit is configured to perform gray level calculation for each region in each histogram
  • the gray level of all the areas in each histogram is taken as the vector corresponding to each histogram.
  • the device further includes:
  • a saving unit configured to save the second image captured.
  • the first display parameter and the second display parameter each include at least one of: a transparency parameter, a color parameter, and a display effect parameter; the first display parameter is different from the second display parameter. .
  • the preview unit is configured to acquire an image based on the framing range and the angle, and display the image on the preview interface in real time;
  • the photographing unit is configured to photograph the preview screen of the current time, and the photographing unit will shoot The photos that come in are cached or saved.
  • the first image is captured, and the first image is displayed on the preview interface according to the first display parameter; the second image is collected, and the second image is displayed in an overlapping manner according to the second display parameter.
  • the similarity of the image is greater than or equal to the threshold, the second image is captured.
  • the first image is an image taken by the user, and when other passers-by wants to take the same effect as the first image, only the second image needs to be adjusted, when the similarity between the second image and the first image is greater than or equal to the threshold At the time, the second image is taken, which improves the satisfaction of the passerby for the user to take pictures, improves the user experience, and increases the competitiveness of the product.
  • Figure 1 is a block diagram of the electrical structure of the camera
  • FIG. 2 is a schematic flowchart of a photographing method according to Embodiment 1 of the present invention.
  • FIG. 3 is a schematic flowchart of a photographing method according to Embodiment 2 of the present invention.
  • FIG. 4 is a schematic flowchart of a photographing method according to Embodiment 3 of the present invention.
  • FIG. 5 is a schematic structural diagram of a photographing apparatus according to Embodiment 4 of the present invention.
  • FIG. 6 is a schematic structural diagram of a photographing apparatus according to Embodiment 5 of the present invention.
  • FIG. 7 is a schematic diagram of effects according to an embodiment of the present invention.
  • Figure 1 is a block diagram of the electrical structure of the camera.
  • the photographic lens 1211 is composed of a plurality of optical lenses for forming a subject image, and is a single focus mirror Head or zoom lens.
  • the photographic lens 1211 is movable in the optical axis direction under the control of the lens driver 1221, and the lens driver 1221 controls the focus position of the photographic lens 1211 in accordance with a control signal from the lens driving control circuit 1222, and can also be controlled in the case of the zoom lens. Focus distance.
  • the lens drive control circuit 1222 performs drive control of the lens driver 1221 in accordance with a control command from the microcomputer 1217.
  • An imaging element 1212 is disposed on the optical axis of the photographic lens 1211 near the position of the subject image formed by the photographic lens 1211.
  • the imaging element 1212 is for capturing an image of a subject and acquiring captured image data.
  • Photodiodes constituting each pixel are arranged two-dimensionally and in a matrix on the imaging element 1212. Each photodiode generates a photoelectric conversion current corresponding to the amount of received light, and the photoelectric conversion current is charged by a capacitor connected to each photodiode.
  • the front surface of each pixel is provided with a Bayer array of RGB color filters.
  • the imaging element 1212 is connected to the imaging circuit 1213.
  • the imaging circuit 1213 performs charge accumulation control and image signal readout control in the imaging element 1212, and performs waveform shaping after reducing the reset noise of the read image signal (analog image signal). Further, gain improvement or the like is performed to obtain an appropriate signal level.
  • the imaging circuit 1213 is connected to an A/D converter 1214 that performs analog-to-digital conversion on the analog image signal and outputs a digital image signal (hereinafter referred to as image data) to the bus 1227.
  • A/D converter 1214 that performs analog-to-digital conversion on the analog image signal and outputs a digital image signal (hereinafter referred to as image data) to the bus 1227.
  • the bus 1227 is a transmission path for transmitting various data read or generated inside the camera.
  • the A/D converter 1214 is connected to the bus 1227, and an image processor 1215, a JPEG processor 1216, a microcomputer 1217, a SDRAM (Synchronous Dynamic Random Access Memory) 1218, and a memory interface are also connected. (hereinafter referred to as memory I/F) 1219, LCD (Liquid Crystal Display) driver 1220.
  • memory I/F memory I/F
  • LCD Liquid Crystal Display
  • the image processor 1215 performs OB subtraction on image data based on the output of the imaging element 1212.
  • Various image processing such as processing, white balance adjustment, color matrix calculation, gamma conversion, color difference signal processing, noise removal processing, simultaneous processing, edge processing, and the like.
  • the JPEG processor 1216 compresses the image data read out from the SDRAM 1218 in accordance with the JPEG compression method when the image data is recorded on the recording medium 1225. Further, the JPEG processor 1216 performs decompression of JPEG image data for image reproduction display.
  • the file recorded on the recording medium 1225 is read, and after the compression processing is performed in the JPEG processor 1216, the decompressed image data is temporarily stored in the SDRAM 1218 and displayed on the LCD 1226.
  • the JPEG method is adopted as the image compression/decompression method.
  • the compression/decompression method is not limited thereto, and other compression/decompression methods such as MPEG, TIFF, and H.264 may be used.
  • the microcomputer 1217 functions as a control unit of the entire camera, and collectively controls various processing sequences of the camera.
  • the microcomputer 1217 is connected to the operation unit 1223 and the flash memory 1224.
  • the operating unit 1223 includes, but is not limited to, a physical button or a virtual button, and the entity or virtual button may be a power button, a camera button, an edit button, a dynamic image button, a reproduction button, a menu button, a cross button, an OK button, a delete button, an enlarge button
  • the operation controls such as various input buttons and various input keys detect the operational state of these operation controls.
  • the detection result is output to the microcomputer 1217. Further, a touch panel is provided on the front surface of the LCD 1226 as a display, and the touch position of the user is detected, and the touch position is output to the microcomputer 1217.
  • the microcomputer 1217 executes various processing sequences corresponding to the user's operation in accordance with the detection result from the operation position of the operation unit 1223.
  • the flash memory 1224 stores programs for executing various processing sequences of the microcomputer 1217.
  • the microcomputer 1217 performs overall control of the camera in accordance with the program. Further, the flash memory 1224 stores various adjustment values of the camera, and the microcomputer 1217 reads out the adjustment value, and performs control of the camera in accordance with the adjustment value.
  • the SDRAM 1218 is an electrically rewritable volatile memory for temporarily storing image data or the like.
  • the SDRAM 1218 temporarily stores image data output from the A/D converter 1214 and
  • the processed image data is processed by the image processor 1215, the JPEG processor 1216, and the like.
  • the memory interface 1219 is connected to the recording medium 1225, and performs control for writing image data and a file header attached to the image data to the recording medium 1225 and reading out from the recording medium 1225.
  • the recording medium 1225 is, for example, a recording medium such as a memory card that can be detachably attached to the camera body.
  • the recording medium 1225 is not limited thereto, and may be a hard disk or the like built in the camera body.
  • the LCD driver 1210 is connected to the LCD 1226, and stores image data processed by the image processor 1215 in the SDRAM 1218.
  • the image data stored in the SDRAM 1218 is read and displayed on the LCD 1226, or the image data stored in the JPEG processor 1216 is compressed.
  • the JPEG processor 1216 reads the compressed image data of the SDRAM 1218, decompresses it, and displays the decompressed image data through the LCD 1226.
  • the LCD 1226 is configured to display an image on the back of the camera body.
  • the LCD 1226 LCD is not limited thereto, and various display panels (LCD 1226) such as an organic EL may be used.
  • various display panels such as an organic EL may be used.
  • the present invention is not limited thereto, and various display panels such as an organic EL may be used.
  • FIG. 2 is a schematic flowchart of a photographing method according to Embodiment 1 of the present invention.
  • the photographing method in this example is applied to a photographing device. As shown in FIG. 2, the photographing method includes the following steps:
  • Step 201 Capture a first image, and display the first image on the preview interface according to the first display parameter.
  • the photographing device may be a separate camera structure, or may be a camera structure disposed in an electronic device (such as a mobile communication terminal, a PDA, an IPAD, etc.).
  • the shooting device has at least two shooting modes, the first one is a normal shooting mode, in which the user can directly take a picture of the preview after starting the camera.
  • the second type is a passer-by shot mode in which, after the user activates the camera, the first image is first captured, and the first image is an image of the framing range and angle desired by the user. After the first image is taken, the first image is followed by A display parameter is displayed on the preview interface to facilitate the passerby to compare the first image with the first image.
  • the first display parameter may be, but is not limited to, the following parameters: a transparency parameter, a color parameter, and a display effect parameter.
  • Step 202 Acquire a second image, display the second image on the first image according to a second display parameter, and preview the second image on the preview interface.
  • the camera device collects the second image in real time, and displays the second image on the first image according to the second display parameter, and on the preview interface.
  • the second image is previewed.
  • the acquisition and shooting are two different operations.
  • the image is displayed on the preview interface in real time, and the shooting is performed on the preview image of the current time.
  • the photos taken are usually cached or saved.
  • the second display parameter may be, but is not limited to, the following parameters: a transparency parameter, a color parameter, and a display effect parameter.
  • the second display parameter is different from the first display parameter, such that the first image and the second image can be distinguished on the preview interface, and the previewed second image is compared with the first image.
  • Step 203 Calculate a similarity between the second image and the first image.
  • each image can generate a grayscale histogram. If the histograms of the two images are close, they can be considered similar. Thus, embodiments of the present invention utilize a histogram of two images to compare similarities.
  • the specific algorithm is as follows:
  • Step 204 When the similarity between the second image and the first image is greater than or equal to a threshold, the second image is captured.
  • the threshold value can be flexibly set.
  • the similarity between the second image and the first image is greater than or equal to a threshold value, it indicates that the second image is the shooting orientation and angle desired by the user.
  • the shooting button is triggered to perform the second image.
  • the button may be a physical physical button on the camera or a touch-type virtual button that is present on the camera screen.
  • FIG. 3 is a schematic flowchart of a photographing method according to a second embodiment of the present invention.
  • the photographing method in the present example is applied to a photographing device. As shown in FIG. 3, the photographing method includes the following steps:
  • Step 301 Capture a first image, and display the first image on the preview interface according to the first display parameter.
  • the photographing device may be a separate camera structure, or may be a camera structure disposed in an electronic device (such as a mobile communication terminal, a PDA, an IPAD, etc.).
  • the shooting device has at least two shooting modes, the first one is a normal shooting mode, in which the user can directly take a picture of the preview after starting the camera.
  • the second type is the passer-by shooting mode.
  • the shooting mode after the user starts the camera, the first image is first taken, and the first image is the user. The image of the desired range and angle of view. After the first image is taken, the first image is displayed on the preview interface according to the first display parameter, so that the passerby can compare the first image when the second image is taken.
  • the first display parameter may include at least one of the following: a transparency parameter, a color parameter, and a display effect parameter.
  • the bottom layer will produce a JPG format image saved in the gallery, and will capture the preview image of the first image;
  • the first image with the transparency set on the bottom layer is displayed on the preview interface.
  • the first image is taken, and the bottom layer will produce a JPG image saved in the gallery, and the preview image of the first image will be intercepted (grab the preview data and saved); then, the transparency of the first image is set.
  • the preset transparency value such as 50%
  • the first image with the transparency set on the bottom layer is displayed on the preview interface as a reference image, wherein the reference image is used for reference to passers-by and assists passers-by to take pictures.
  • Step 302 Acquire a second image, display the second image on the first image according to a second display parameter, and preview the second image on the preview interface.
  • the camera device collects the second image in real time, and displays the second image on the first image according to the second display parameter, and on the preview interface.
  • the second image is previewed.
  • the acquisition and shooting are two different operations, the acquisition is for preview, the acquisition includes: acquiring an image based on the framing range and the angle, and displaying the image on the preview interface in real time; the shooting includes the current moment
  • the preview screen is taken to capture or save the captured photos. For example, after capturing an image of a certain range and angle, the image is displayed on the preview interface in real time, and the shooting is performed on the preview image of the current time, and the captured photos are generally cached or saved.
  • the second display parameter may include at least one of the following: a transparency parameter, a color parameter, and a display effect parameter.
  • the second display parameter is different from the value of the first display parameter, such that the first image and the second image can be distinguished on the preview interface, and the previewed second image is compared with the first image.
  • Step 303 Calculate a similarity between the second image and the first image.
  • each image can generate a grayscale histogram. If the histograms of the two images are close, they can be considered similar. Thus, embodiments of the present invention utilize a histogram of two images to compare similarities.
  • the specific algorithm is as follows:
  • Step 304 When the similarity between the second image and the first image is greater than or equal to a threshold, displaying first prompt information; when the similarity between the second image and the first image is less than a threshold The second prompt information is displayed; the first prompt information is different from the second prompt information.
  • the second image when the first image is displayed in the preview interface with 50% transparency, the second image is previewed and displayed on the preview interface, and then the similarity between the two images is obtained.
  • the threshold such as 80%
  • the first prompt information such as a green pattern
  • the second prompt information such as a red pattern
  • the shooting button can be clicked.
  • the shooting button is grayed out and cannot be triggered, and the passerby can adjust the shooting angle until the first prompt information is displayed on the screen.
  • Step 305 When the similarity between the second image and the first image is greater than or equal to a threshold, the second image is captured.
  • the threshold value can be flexibly set.
  • the similarity between the second image and the first image is greater than or equal to a threshold value, it indicates that the second image is the shooting orientation and angle desired by the user.
  • the shooting button is triggered to perform the second image.
  • the button may be a physical physical button on the camera or a touch-type virtual button that is present on the camera screen.
  • FIG. 4 is a schematic flowchart of a photographing method according to a third embodiment of the present invention.
  • the photographing method in the present example is applied to a photographing device. As shown in FIG. 4, the photographing method includes the following steps:
  • Step 401 Capture a first image, and display the first image on the preview interface according to the set transparency.
  • the photographing device may be a separate camera structure, or may be a camera structure disposed in an electronic device (such as a mobile communication terminal, a PDA, an IPAD, etc.).
  • the shooting device has at least two shooting modes, the first one is a normal shooting mode, in which the user can directly take a picture of the preview after starting the camera.
  • the second type is a passer-by shot mode in which, after the user activates the camera, the first image is first captured, and the first image is an image of the framing range and angle desired by the user. After the first image is taken, the first image is displayed on the preview interface according to the first display parameter, so that the passerby can help the second image when the second image is taken. Line comparison.
  • the first image is taken, and the bottom layer will produce a JPG image saved in the gallery, and the preview image of the first image will be intercepted (grab the preview data and saved); then, the transparency of the first image is set. For a certain value, such as 50%; the first image with the transparency set on the bottom layer is displayed on the preview interface, giving reference to passers-by and assisting passers-by to take pictures.
  • Step 402 Acquire a second image, display the second image on the first image according to a second display parameter, and preview the second image on the preview interface.
  • the camera device collects the second image in real time, and displays the second image on the first image according to the second display parameter, and on the preview interface.
  • the second image is previewed.
  • the acquisition and shooting are two different operations.
  • the image is displayed on the preview interface in real time, and the shooting is performed on the preview image of the current time.
  • the photos taken are usually cached or saved.
  • the second display parameter may be, but is not limited to, the following parameters: a transparency parameter, a color parameter, and a display effect parameter.
  • the second display parameter is different from the first display parameter, such that the first image and the second image can be distinguished on the preview interface, and the previewed second image is compared with the first image.
  • Step 403 Acquire a histogram of the second image and the first image; respectively divide the two histograms into regions, and calculate vectors corresponding to the two histograms respectively; calculate similarities between the two vectors.
  • each image can generate a grayscale histogram. If the histograms of the two images are close, they can be considered similar. Thus, embodiments of the present invention utilize a histogram of two images to compare similarities.
  • the specific algorithm is as follows:
  • the histogram can be divided into 64 regions, each of which is a continuous four gray levels;
  • Step 404 When the similarity between the second image and the first image is greater than or equal to a threshold, displaying first prompt information; when the similarity between the second image and the first image is less than a threshold The second prompt information is displayed; the first prompt information is different from the second prompt information.
  • the second image when the first image is displayed on the preview interface with 50% transparency, the second image is previewed and displayed on the preview interface, and then the judgment is performed according to the similarity degree of the two images, if the similarity reaches or exceeds
  • the threshold value for example, 80% displays the first prompt information (such as a green pattern), and if not, the second prompt information (such as a red pattern) is displayed, and the shooting button can be clicked only when the first prompt information is displayed.
  • the shooting button is grayed out and cannot be triggered, and the passerby can adjust the shooting angle until the first prompt information is displayed on the screen.
  • Step 405 When the similarity between the second image and the first image is greater than or equal to a threshold At the time, the second image is captured.
  • the threshold value can be flexibly set.
  • the similarity between the second image and the first image is greater than or equal to a threshold value, it indicates that the second image is the shooting orientation and angle desired by the user.
  • the shooting button is triggered to perform the second image.
  • the button may be a physical physical button on the camera or a touch-type virtual button that is present on the camera screen.
  • Step 406 Save the second image of the shooting.
  • FIG. 5 is a schematic structural diagram of a photographing apparatus according to Embodiment 4 of the present invention. As shown in FIG. 5, the apparatus includes:
  • a photographing unit 51 configured to capture a first image
  • the display unit 52 is configured to display the first image on the preview interface according to the first display parameter
  • a preview unit 53 configured to acquire a second image
  • the display unit 52 is further configured to display the second image on the first image according to the second display parameter, and preview the second image on the preview interface;
  • the processing unit 54 is configured to calculate a similarity between the second image and the first image
  • the photographing unit 51 is further configured to photograph the second image when a similarity between the second image and the first image is greater than or equal to a threshold.
  • FIG. 6 is a schematic structural diagram of a photographing apparatus according to Embodiment 5 of the present invention, as shown in FIG.
  • the device includes:
  • a shooting unit 61 configured to capture a first image
  • a display unit 62 configured to display the first image on the preview interface according to the first display parameter
  • a preview unit 63 configured to acquire a second image
  • the display unit 62 is further configured to display the second image on the first image according to a second display parameter, and preview the second image on the preview interface;
  • the processing unit 64 is configured to calculate a similarity between the second image and the first image
  • the photographing unit 61 is further configured to photograph the second image when a similarity between the second image and the first image is greater than or equal to a threshold.
  • the device also includes:
  • the prompting unit 65 is configured to display first prompt information when the similarity between the second image and the first image is greater than or equal to a threshold value; when the similarity between the second image and the first image is less than When the threshold value is displayed, the second prompt information is displayed; the first prompt information is different from the second prompt information.
  • the display unit 62 is further configured to display the first image on the preview interface according to the set transparency.
  • the processing unit 64 is further configured to acquire a histogram of the second image and the first image; respectively divide the two histogram regions, and calculate a vector corresponding to the two histograms respectively; The similarity of vectors.
  • the device also includes:
  • the saving unit 66 is configured to save the second image captured.
  • the disclosed method and smart device may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner such as: multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed.
  • the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one second processing unit, or each unit may be separately used as one unit, or two or more units may be integrated into one unit;
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.

Abstract

本发明公开了一种拍摄方法及装置,包括:拍摄第一图像,将所述第一图像按照第一显示参数显示在预览界面上;采集第二图像,将所述第二图像按照第二显示参数重叠显示在所述第一图像上,并在所述预览界面上对所述第二图像进行预览;计算所述第二图像与所述第一图像的相似度;当所述第二图像与所述第一图像的相似度大于等于门限值时,对所述第二图像进行拍摄。

Description

一种拍摄方法及装置 技术领域
本申请涉及拍摄技术,尤其涉及一种拍摄方法及装置。
背景技术
在很多场景下,例如用户在外游玩时,经常会遇到如下情况:请路人帮忙拍照,但是很多时候拍出来的照片不是自己想要的那种角度和效果,但是往往也不好意思要求别人重拍,最终得不到自己喜欢的照片。
目前还没有一种相机或使用相机的移动终端或使用相机的其它电子设备能提供自动帮助他人为用户拍摄出想要的照片。
发明内容
为解决上述技术问题,本发明实施例提供了一种拍摄方法及装置。
本发明实施例提供的拍摄方法,包括:
拍摄第一图像,将所述第一图像按照第一显示参数显示在预览界面上;
采集第二图像,将所述第二图像按照第二显示参数重叠显示在所述第一图像上,并在所述预览界面上对所述第二图像进行预览;
计算所述第二图像与所述第一图像的相似度;
当所述第二图像与所述第一图像的相似度大于或等于门限值时,对所述第二图像进行拍摄。
作为一种实施方式,所述方法还包括:
当所述第二图像与所述第一图像的相似度大于或等于门限值时,显示第一提示信息;
当所述第二图像与所述第一图像的相似度小于门限值时,显示第二提示信息;
所述第一提示信息与所述第二提示信息不同。
作为一种实施方式,所述将所述第一图像按照第一显示参数显示在预览界面上,包括:
将所述第一图像按照设置的透明度显示在预览界面上。
作为一种实施方式,所述计算所述第二图像与所述第一图像的相似度,包括:
获取所述第二图像和所述第一图像的直方图;
对两个直方图分别区域划分,并计算所述两个直方图分别对应的向量;
计算两个向量的相似度。
作为一种实施方式,所述将所述第一图像按照设置的透明度显示在预览界面上,包括:
拍摄第一图像,底层会生产一张JPG格式的图像保存在图库中,同时会截取第一图像的预览图像;
将第一图像的透明度设置为预设透明度值;
底层将设置好透明度的第一图像显示在预览界面上。
作为一种实施方式,所述计算所述第二图像与所述第一图像的相似度,包括:
获取所述第二图像和所述第一图像的直方图;
对两个直方图分别区域划分,并计算所述两个直方图分别对应的向量;
计算两个向量的相似度。
作为一种实施方式,所述对两个直方图分别区域划分,包括:
将所述两个直方图均划分成至少一个区域;其中,每一个区域在所述两个直方图中所对应的相对位置相同。
作为一种实施方式,所述计算所述两个直方图分别对应的向量,包括:
分别针对每一个直方图中的每一个区域,进行灰度等级的计算;
将每一个直方图中全部区域的灰度等级,作为每一个直方图所对应的向量。
作为一种实施方式,所述方法还包括:
保存拍摄的所述第二图像。
作为一种实施方式,所述第一显示参数和所述第二显示参数均至少包括以下之一:透明度参数、颜色参数、显示效果参数;所述第一显示参数与第二显示参数的数值不同。
作为一种实施方式,所述采集包括:基于取景范围和角度获取到图像,将图像实时显示在预览界面上;
所述拍摄包括针对当前时刻的预览画面进行拍摄,将拍摄出来的照片进行缓存或保存。
本发明实施例还提供了一种拍摄装置,所述装置包括:
拍摄单元,配置为拍摄第一图像;
显示单元,配置为将所述第一图像按照第一显示参数显示在预览界面上;
预览单元,配置为采集第二图像;
所述显示单元,配置为将所述第二图像按照第二显示参数重叠显示在所述第一图像上,并在所述预览界面上对所述第二图像进行预览;
处理单元,配置为计算所述第二图像与所述第一图像的相似度;
所述拍摄单元,配置为当所述第二图像与所述第一图像的相似度大于或等于门限值时,对所述第二图像进行拍摄。
作为一种实施方式,所述装置还包括:
提示单元,配置为当所述第二图像与所述第一图像的相似度大于或等于门限值时,显示第一提示信息;当所述第二图像与所述第一图像的相似度小于门限值时,显示第二提示信息;所述第一提示信息与所述第二提示 信息不同。
作为一种实施方式,所述显示单元,配置为将所述第一图像按照设置的透明度显示在预览界面上。
本发明实施例中,所述显示单元,配置为拍摄第一图像,底层会生产一张JPG格式的图像保存在图库中,同时会截取第一图像的预览图像;将第一图像的透明度设置为预设透明度值;底层将设置好透明度的第一图像显示在预览界面上。
作为一种实施方式,所述处理单元,配置为获取所述第二图像和所述第一图像的直方图;对两个直方图分别区域划分,并计算所述两个直方图分别对应的向量;计算两个向量的相似度。
作为一种实施方式,所述处理单元,配置为将所述两个直方图均划分成至少一个区域;其中,每一个区域在所述两个直方图中所对应的相对位置相同。
作为一种实施方式,所述处理单元,配置为分别针对每一个直方图中的每一个区域,进行灰度等级的计算;
将每一个直方图中全部区域的灰度等级,作为每一个直方图所对应的向量。
作为一种实施方式,所述装置还包括:
保存单元,配置为保存拍摄的所述第二图像。
作为一种实施方式,所述第一显示参数和所述第二显示参数均至少包括以下之一:透明度参数、颜色参数、显示效果参数;所述第一显示参数与第二显示参数的数值不同。
作为一种实施方式,所述预览单元,配置为基于取景范围和角度获取到图像,将图像实时显示在预览界面上;
所述拍摄单元,配置为针对当前时刻的预览画面进行拍摄,将拍摄出 来的照片进行缓存或保存。
本发明实施例的技术方案中,拍摄第一图像,将所述第一图像按照第一显示参数显示在预览界面上;采集第二图像,将所述第二图像按照第二显示参数重叠显示在所述第一图像上,并在所述预览界面上对所述第二图像进行预览;计算所述第二图像与所述第一图像的相似度;当所述第二图像与所述第一图像的相似度大于等于门限值时,对所述第二图像进行拍摄。这里,第一图像为用户拍摄出来的图像,其他路人想要拍摄出来与第一图像相同的效果时,只需调整第二图像,当第二图像与第一图像的相似度大于等于门限值时,则对第二图像进行拍摄,提高了路人为用户帮忙拍照的满意度,提升了用户体验效果,增加了商品的竞争力。
附图说明
图1为相机的电气结构框图;
图2为本发明实施例一的拍摄方法的流程示意图;
图3为本发明实施例二的拍摄方法的流程示意图;
图4为本发明实施例三的拍摄方法的流程示意图;
图5为本发明实施例四的拍摄装置的结构组成示意图;
图6为本发明实施例五的拍摄装置的结构组成示意图;
图7为本发明实施例的效果示意图。
具体实施方式
为了能够更加详尽地了解本申请的特点与技术内容,下面结合附图对本申请的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请。
图1为相机的电气结构框图。
摄影镜头1211由用于形成被摄体像的多个光学镜头构成,为单焦点镜 头或变焦镜头。摄影镜头1211在镜头驱动器1221的控制下能够在光轴方向上移动,镜头驱动器1221根据来自镜头驱动控制电路1222的控制信号,控制摄影镜头1211的焦点位置,在变焦镜头的情况下,也可控制焦点距离。镜头驱动控制电路1222按照来自微型计算机1217的控制命令进行镜头驱动器1221的驱动控制。
在摄影镜头1211的光轴上、由摄影镜头1211形成的被摄体像的位置附近配置有摄像元件1212。摄像元件1212用于对被摄体像摄像并取得摄像图像数据。在摄像元件1212上二维且呈矩阵状配置有构成各像素的光电二极管。各光电二极管产生与受光量对应的光电转换电流,该光电转换电流由与各光电二极管连接的电容器进行电荷蓄积。各像素的前表面配置有拜耳排列的RGB滤色器。
摄像元件1212与摄像电路1213连接,该摄像电路1213在摄像元件1212中进行电荷蓄积控制和图像信号读出控制,对该读出的图像信号(模拟图像信号)降低重置噪声后进行波形整形,进而进行增益提高等以成为适当的信号电平。
摄像电路1213与A/D转换器1214连接,该A/D转换器1214对模拟图像信号进行模数转换,向总线1227输出数字图像信号(以下称之为图像数据)。
总线1227是用于传送在相机的内部读出或生成的各种数据的传送路径。在总线1227连接着上述A/D转换器1214,此外还连接着图像处理器1215、JPEG处理器1216、微型计算机1217、SDRAM(Synchronous Dynamic random access memory,同步动态随机存取内存)1218、存储器接口(以下称之为存储器I/F)1219、LCD(Liquid Crystal Display,液晶显示器)驱动器1220。
图像处理器1215对基于摄像元件1212的输出的图像数据进行OB相减 处理、白平衡调整、颜色矩阵运算、伽马转换、色差信号处理、噪声去除处理、同时化处理、边缘处理等各种图像处理。JPEG处理器1216在将图像数据记录于记录介质1225时,按照JPEG压缩方式压缩从SDRAM1218读出的图像数据。此外,JPEG处理器1216为了进行图像再现显示而进行JPEG图像数据的解压缩。进行解压缩时,读出记录在记录介质1225中的文件,在JPEG处理器1216中实施了解压缩处理后,将解压缩的图像数据暂时存储于SDRAM1218中并在LCD1226上进行显示。另外,在本实施方式中,作为图像压缩解压缩方式采用的是JPEG方式,然而压缩解压缩方式不限于此,当然可以采用MPEG、TIFF、H.264等其他的压缩解压缩方式。
微型计算机1217发挥作为该相机整体的控制部的功能,统一控制相机的各种处理序列。微型计算机1217连接着操作单元1223和闪存1224。
操作单元1223包括但不限于实体按键或者虚拟按键,该实体或虚拟按键可以为电源按钮、拍照键、编辑按键、动态图像按钮、再现按钮、菜单按钮、十字键、OK按钮、删除按钮、放大按钮等各种输入按钮和各种输入键等操作控件,检测这些操作控件的操作状态。
将检测结果向微型计算机1217输出。此外,在作为显示器的LCD1226的前表面设有触摸面板,检测用户的触摸位置,将该触摸位置向微型计算机1217输出。微型计算机1217根据来自操作单元1223的操作位置的检测结果,执行与用户的操作对应的各种处理序列。
闪存1224存储用于执行微型计算机1217的各种处理序列的程序。微型计算机1217根据该程序进行相机整体的控制。此外,闪存1224存储相机的各种调整值,微型计算机1217读出调整值,按照该调整值进行相机的控制。
SDRAM1218是用于对图像数据等进行暂时存储的可电改写的易失性存储器。该SDRAM1218暂时存储从A/D转换器1214输出的图像数据和在 图像处理器1215、JPEG处理器1216等中进行了处理后的图像数据。
存储器接口1219与记录介质1225连接,进行将图像数据和附加在图像数据中的文件头等数据写入记录介质1225和从记录介质1225中读出的控制。记录介质1225例如为能够在相机主体上自由拆装的存储器卡等记录介质,然而不限于此,也可以是内置在相机主体中的硬盘等。
LCD驱动器1210与LCD1226连接,将由图像处理器1215处理后的图像数据存储于SDRAM1218,需要显示时,读取SDRAM1218存储的图像数据并在LCD1226上显示,或者,JPEG处理器1216压缩过的图像数据存储于SDRAM1218,在需要显示时,JPEG处理器1216读取SDRAM1218的压缩过的图像数据,再进行解压缩,将解压缩后的图像数据通过LCD1226进行显示。
LCD1226配置在相机主体的背面进行图像显示。该LCD1226LCD,然而不限于此,也可以采用有机EL等各种显示面板(LCD1226),然而不限于此,也可以采用有机EL等各种显示面板。
基于上述相机的电气结构示意图,提出本发明拍摄方法各个实施例。
图2为本发明实施例一的拍摄方法的流程示意图,本示例中的拍摄方法应用于拍摄装置,如图2所示,所述拍摄方法包括以下步骤:
步骤201:拍摄第一图像,将所述第一图像按照第一显示参数显示在预览界面上。
本发明实施例中,拍摄装置可以是单独的相机结构,也可以是设置在电子设备(如移动通信终端、PDA、IPAD等)中的相机结构。拍摄装置至少具有两种拍摄模式,第一种是普通的拍摄模式,在该拍摄模式下,用户启动相机后,直接对预览的图像进行拍摄即可。第二种是路人帮拍模式,在该拍摄模式下,用户启动相机后,首先拍摄第一图像,第一图像为用户想要的取景范围和角度的图像。第一图像拍摄完成后,第一图像则按照第 一显示参数显示在预览界面上,方便路人帮忙拍摄第二图像时与第一图像进行比对。
本发明实施例中,第一显示参数可以但不限于是以下参数:透明度参数、颜色参数、显示效果参数。
步骤202:采集第二图像,将所述第二图像按照第二显示参数重叠显示在所述第一图像上,并在所述预览界面上对所述第二图像进行预览。
本发明实施例中,第一图像拍摄完成后,摄像装置实时采集第二图像,将所述第二图像按照第二显示参数重叠显示在所述第一图像上,并在所述预览界面上对所述第二图像进行预览。这里,采集和拍摄是两个不同的操作,采集是针对于预览而言,采集某一取景范围和角度的图像后,将图像实时显示在预览界面上,而拍摄是针对当前时刻的预览画面进行拍摄,拍摄出来的照片一般会被缓存或保存。
本发明实施例中,第二显示参数可以但不限于是以下参数:透明度参数、颜色参数、显示效果参数。第二显示参数与第一显示参数不同,这样,可以在预览界面上区分第一图像和第二图像,并将预览的第二图像与第一图像进行比对。
步骤203:计算所述第二图像与所述第一图像的相似度。
本发明实施例中,每张图像都可以生成其灰度图像直方图(histogram)。如果两张图像的直方图很接近,就可以认为它们很相似。因此,本发明实施例利用两幅图像的直方图来进行相似度的比较。具体算法如下:
1、获得输入灰度图像的直方图分布;
2、将直方图划分为64个区,每个区为连续的4个灰度等级;
3、对每个区的4个值进行求和运算,得到1个数据,如此,会得到64个数据,即为该幅图像的一个向量;
4、根据1-3,将输入的两幅图像转化为了2个向量,记为A、B;
5、计算两个向量的相似度,可以用皮尔逊相关系数或者余弦相似度计算,这里采用余弦相似度计算。下面介绍余弦相似度:
对于两个向量,可以把它们当作空间中的两条线段,都是从原点([0,0,...])出发,指向不同的方向。两条线段之间形成一个夹角,如果夹角为0度,意味着方向相同、线段重合;如果夹角为90度,意味着形成直角,方向完全不相似;如果夹角为180度,意味着方向正好相反。因此,我们可以通过夹角的大小,来判断向量的相似程度。夹角越小,就代表越相似。
步骤204:当所述第二图像与所述第一图像的相似度大于等于门限值时,对所述第二图像进行拍摄。
本发明实施例中,门限值可以灵活设置,门限值越高,则表明要求的拍摄效果越精准,即第二图像与第一图像的相似度越高,理想情况下,门限值可以设置为100%,这时,第二图像与第一图像取景范围和角度完全一致。当所述第二图像与所述第一图像的相似度大于等于门限值时,则表明第二图像即为用户想要的拍摄方位和角度,此时,触发拍摄按钮,对第二图像进行拍摄。该按钮可以是拍摄装置上的实体物理按钮,也可以是存在于拍摄装置屏幕上的触摸式虚拟按钮。
图3为本发明实施例二的拍摄方法的流程示意图,本示例中的拍摄方法应用于拍摄装置,如图3所示,所述拍摄方法包括以下步骤:
步骤301:拍摄第一图像,将所述第一图像按照第一显示参数显示在预览界面上。
本发明实施例中,拍摄装置可以是单独的相机结构,也可以是设置在电子设备(如移动通信终端、PDA、IPAD等)中的相机结构。拍摄装置至少具有两种拍摄模式,第一种是普通的拍摄模式,在该拍摄模式下,用户启动相机后,直接对预览的图像进行拍摄即可。第二种是路人帮拍模式,在该拍摄模式下,用户启动相机后,首先拍摄第一图像,第一图像为用户 想要的取景范围和角度的图像。第一图像拍摄完成后,第一图像则按照第一显示参数显示在预览界面上,方便路人帮忙拍摄第二图像时与第一图像进行比对。
本发明实施例中,第一显示参数可以至少包括以下之一:透明度参数、颜色参数、显示效果参数。
所述将所述第一图像按照设置的透明度显示在预览界面上,包括:
拍摄第一图像,底层会生产一张JPG格式的图像保存在图库中,同时会截取第一图像的预览图像;
将第一图像的透明度设置为预设透明度值;
底层将设置好透明度的第一图像显示在预览界面上。
具体实现时,拍摄第一图像,底层会生产一张JPG格式的图像保存在图库中,同时会截取第一图像的预览图像(抓取预览数据并保存);然后,将第一图像的透明度设置为预设透明度值,如50%;底层将设置好透明度的第一图像显示在预览界面上,作为参考图像,其中,参考图像用于给路人作参考,辅助路人进行拍照。
步骤302:采集第二图像,将所述第二图像按照第二显示参数重叠显示在所述第一图像上,并在所述预览界面上对所述第二图像进行预览。
本发明实施例中,第一图像拍摄完成后,摄像装置实时采集第二图像,将所述第二图像按照第二显示参数重叠显示在所述第一图像上,并在所述预览界面上对所述第二图像进行预览。这里,采集和拍摄是两个不同的操作,采集是针对于预览而言,所述采集包括:基于取景范围和角度获取到图像,将图像实时显示在预览界面上;所述拍摄包括针对当前时刻的预览画面进行拍摄,将拍摄出来的照片进行缓存或保存。比如,采集某一取景范围和角度的图像后,将图像实时显示在预览界面上,而拍摄是针对当前时刻的预览画面进行拍摄,拍摄出来的照片一般会被缓存或保存。
本发明实施例中,第二显示参数可以包括以下至少之一:透明度参数、颜色参数、显示效果参数。第二显示参数与第一显示参数的数值不同,这样,可以在预览界面上区分第一图像和第二图像,并将预览的第二图像与第一图像进行比对。
步骤303:计算所述第二图像与所述第一图像的相似度。
本发明实施例中,每张图像都可以生成其灰度图像直方图(histogram)。如果两张图像的直方图很接近,就可以认为它们很相似。因此,本发明实施例利用两幅图像的直方图来进行相似度的比较。具体算法如下:
1、获得输入灰度图像的直方图分布;
2、将直方图划分为64个区,每个区为连续的4个灰度等级;
3、对每个区的4个值进行求和运算,得到1个数据,如此,会得到64个数据,即为该幅图像的一个向量;
4、根据1-3,将输入的两幅图像转化为了2个向量,记为A、B;
5、计算两个向量的相似度,可以用皮尔逊相关系数或者余弦相似度计算,这里采用余弦相似度计算。下面介绍余弦相似度:
对于两个向量,可以把它们当作空间中的两条线段,都是从原点([0,0,...])出发,指向不同的方向。两条线段之间形成一个夹角,如果夹角为0度,意味着方向相同、线段重合;如果夹角为90度,意味着形成直角,方向完全不相似;如果夹角为180度,意味着方向正好相反。因此,我们可以通过夹角的大小,来判断向量的相似程度。夹角越小,就代表越相似。
步骤304:当所述第二图像与所述第一图像的相似度大于等于门限值时,显示第一提示信息;当所述第二图像与所述第一图像的相似度小于门限值时,显示第二提示信息;所述第一提示信息与所述第二提示信息不同。
参照图7,本发明实施例中,当第一图像以50%的透明度显示在预览界面时,预览界面上还预览显示第二图像,这时会根据这两图像的相似程度 进行判定,如果相似度达到或者超过门限值,如80%则显示第一提示信息(如绿色的图案),没有达到则显示第二提示信息(如红色的图案),只有在显示第一提示信息的情况下才可以点击拍摄按钮,在第二提示信息的情况下拍摄按钮显示灰色并且不能够被触发,路人可以调整拍摄角度直到屏幕显示第一提示信息便可进行拍摄。
步骤305:当所述第二图像与所述第一图像的相似度大于等于门限值时,对所述第二图像进行拍摄。
本发明实施例中,门限值可以灵活设置,门限值越高,则表明要求的拍摄效果越精准,即第二图像与第一图像的相似度越高,理想情况下,门限值可以设置为100%,这时,第二图像与第一图像取景范围和角度完全一致。当所述第二图像与所述第一图像的相似度大于等于门限值时,则表明第二图像即为用户想要的拍摄方位和角度,此时,触发拍摄按钮,对第二图像进行拍摄。该按钮可以是拍摄装置上的实体物理按钮,也可以是存在于拍摄装置屏幕上的触摸式虚拟按钮。
图4为本发明实施例三的拍摄方法的流程示意图,本示例中的拍摄方法应用于拍摄装置,如图4所示,所述拍摄方法包括以下步骤:
步骤401:拍摄第一图像,将所述第一图像按照设置的透明度显示在预览界面上。
本发明实施例中,拍摄装置可以是单独的相机结构,也可以是设置在电子设备(如移动通信终端、PDA、IPAD等)中的相机结构。拍摄装置至少具有两种拍摄模式,第一种是普通的拍摄模式,在该拍摄模式下,用户启动相机后,直接对预览的图像进行拍摄即可。第二种是路人帮拍模式,在该拍摄模式下,用户启动相机后,首先拍摄第一图像,第一图像为用户想要的取景范围和角度的图像。第一图像拍摄完成后,第一图像则按照第一显示参数显示在预览界面上,方便路人帮忙拍摄第二图像时与第一图像进 行比对。
具体实现时,拍摄第一图像,底层会生产一张JPG格式的图像保存在图库中,同时会截取第一图像的预览图像(抓取预览数据并保存);然后,将第一图像的透明度设置为某一值,如50%;底层将设置好透明度的第一图像显示在预览界面上,给路人作参考,辅助路人进行拍照。
步骤402:采集第二图像,将所述第二图像按照第二显示参数重叠显示在所述第一图像上,并在所述预览界面上对所述第二图像进行预览。
本发明实施例中,第一图像拍摄完成后,摄像装置实时采集第二图像,将所述第二图像按照第二显示参数重叠显示在所述第一图像上,并在所述预览界面上对所述第二图像进行预览。这里,采集和拍摄是两个不同的操作,采集是针对于预览而言,采集某一取景范围和角度的图像后,将图像实时显示在预览界面上,而拍摄是针对当前时刻的预览画面进行拍摄,拍摄出来的照片一般会被缓存或保存。
本发明实施例中,第二显示参数可以但不限于是以下参数:透明度参数、颜色参数、显示效果参数。第二显示参数与第一显示参数不同,这样,可以在预览界面上区分第一图像和第二图像,并将预览的第二图像与第一图像进行比对。
步骤403:获取所述第二图像和所述第一图像的直方图;对两个直方图分别区域划分,并计算所述两个直方图分别对应的向量;计算两个向量的相似度。
本发明实施例中,每张图像都可以生成其灰度图像直方图(histogram)。如果两张图像的直方图很接近,就可以认为它们很相似。因此,本发明实施例利用两幅图像的直方图来进行相似度的比较。具体算法如下:
1、获得输入灰度图像的直方图分布;
2、将所述两个直方图均划分成至少一个区域;其中,每一个区域在所 述两个直方图中所对应的相对位置相同。具体的,可以将直方图划分为64个区,每个区为连续的4个灰度等级;
3、分别针对每一个直方图中的每一个区域,进行灰度等级的计算;将每一个直方图中全部区域的灰度等级,作为每一个直方图所对应的向量。具体的,可以为:对每个区的4个值进行求和运算,得到1个数据,如此,会得到64个数据,即为该幅图像的一个向量;
4、根据1-3,将输入的两幅图像转化为了2个向量,记为A、B;
5、计算两个向量的相似度,可以用皮尔逊相关系数或者余弦相似度计算,这里采用余弦相似度计算。下面介绍余弦相似度:
对于两个向量,可以把它们当作空间中的两条线段,都是从原点([0,0,...])出发,指向不同的方向。两条线段之间形成一个夹角,如果夹角为0度,意味着方向相同、线段重合;如果夹角为90度,意味着形成直角,方向完全不相似;如果夹角为180度,意味着方向正好相反。因此,我们可以通过夹角的大小,来判断向量的相似程度。夹角越小,就代表越相似。
步骤404:当所述第二图像与所述第一图像的相似度大于等于门限值时,显示第一提示信息;当所述第二图像与所述第一图像的相似度小于门限值时,显示第二提示信息;所述第一提示信息与所述第二提示信息不同。
本发明实施例中,当第一图像以50%的透明度显示在预览界面时,预览界面上还预览显示第二图像,这时会根据这两图像的相似程度进行判定,如果相似度达到或者超过门限值,如80%则显示第一提示信息(如绿色的图案),没有达到则显示第二提示信息(如红色的图案),只有在显示第一提示信息的情况下才可以点击拍摄按钮,在第二提示信息的情况下拍摄按钮显示灰色并且不能够被触发,路人可以调整拍摄角度直到屏幕显示第一提示信息便可进行拍摄。
步骤405:当所述第二图像与所述第一图像的相似度大于等于门限值 时,对所述第二图像进行拍摄。
本发明实施例中,门限值可以灵活设置,门限值越高,则表明要求的拍摄效果越精准,即第二图像与第一图像的相似度越高,理想情况下,门限值可以设置为100%,这时,第二图像与第一图像取景范围和角度完全一致。当所述第二图像与所述第一图像的相似度大于等于门限值时,则表明第二图像即为用户想要的拍摄方位和角度,此时,触发拍摄按钮,对第二图像进行拍摄。该按钮可以是拍摄装置上的实体物理按钮,也可以是存在于拍摄装置屏幕上的触摸式虚拟按钮。
步骤406:保存拍摄的所述第二图像。
本发明实施例中,拍摄完两张图像后,仅提取第二图像并保存,并删除缓存的第一图像。
图5为本发明实施例四的拍摄装置的结构组成示意图,如图5所示,所述装置包括:
拍摄单元51,用于拍摄第一图像;
显示单元52,用于将所述第一图像按照第一显示参数显示在预览界面上;
预览单元53,用于采集第二图像;
所述显示单元52,还用于将所述第二图像按照第二显示参数重叠显示在所述第一图像上,并在所述预览界面上对所述第二图像进行预览;
处理单元54,用于计算所述第二图像与所述第一图像的相似度;
所述拍摄单元51,还用于当所述第二图像与所述第一图像的相似度大于等于门限值时,对所述第二图像进行拍摄。
本领域技术人员应当理解,图5所示的拍摄装置中的各单元的实现功能可参照前述拍摄方法的相关描述而理解。
图6为本发明实施例五的拍摄装置的结构组成示意图,如图6所示, 所述装置包括:
拍摄单元61,用于拍摄第一图像;
显示单元62,用于将所述第一图像按照第一显示参数显示在预览界面上;
预览单元63,用于采集第二图像;
所述显示单元62,还用于将所述第二图像按照第二显示参数重叠显示在所述第一图像上,并在所述预览界面上对所述第二图像进行预览;
处理单元64,用于计算所述第二图像与所述第一图像的相似度;
所述拍摄单元61,还用于当所述第二图像与所述第一图像的相似度大于等于门限值时,对所述第二图像进行拍摄。
所述装置还包括:
提示单元65,用于当所述第二图像与所述第一图像的相似度大于等于门限值时,显示第一提示信息;当所述第二图像与所述第一图像的相似度小于门限值时,显示第二提示信息;所述第一提示信息与所述第二提示信息不同。
所述显示单元62,还用于将所述第一图像按照设置的透明度显示在预览界面上。
所述处理单元64,还用于获取所述第二图像和所述第一图像的直方图;对两个直方图分别区域划分,并计算所述两个直方图分别对应的向量;计算两个向量的相似度。
所述装置还包括:
保存单元66,用于保存拍摄的所述第二图像。
本领域技术人员应当理解,图6所示的拍摄装置中的各单元的实现功能可参照前述拍摄方法的相关描述而理解。
本发明实施例所记载的技术方案之间,在不冲突的情况下,可以任意 组合。
在本发明所提供的几个实施例中,应该理解到,所揭露的方法和智能设备,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。
另外,在本发明各实施例中的各功能单元可以全部集成在一个第二处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。

Claims (20)

  1. 一种拍摄方法,所述方法包括:
    拍摄第一图像,将所述第一图像按照第一显示参数显示在预览界面上;
    采集第二图像,将所述第二图像按照第二显示参数重叠显示在所述第一图像上,并在所述预览界面上对所述第二图像进行预览;
    计算所述第二图像与所述第一图像的相似度;
    当所述第二图像与所述第一图像的相似度大于或等于门限值时,对所述第二图像进行拍摄。
  2. 根据权利要求1所述的拍摄方法,其中,所述方法还包括:
    当所述第二图像与所述第一图像的相似度大于或等于门限值时,显示第一提示信息;
    当所述第二图像与所述第一图像的相似度小于门限值时,显示第二提示信息;
    所述第一提示信息与所述第二提示信息不同。
  3. 根据权利要求1所述的拍摄方法,其中,所述将所述第一图像按照第一显示参数显示在预览界面上,包括:
    将所述第一图像按照设置的透明度显示在预览界面上。
  4. 根据权利要求3所述的拍摄方法,其中,所述将所述第一图像按照设置的透明度显示在预览界面上,包括:
    拍摄第一图像,底层会生产一张JPG格式的图像保存在图库中,同时会截取第一图像的预览图像;
    将第一图像的透明度设置为预设透明度值;
    底层将设置好透明度的第一图像显示在预览界面上。
  5. 根据权利要求1所述的拍摄方法,其中,所述计算所述第二图像与 所述第一图像的相似度,包括:
    获取所述第二图像和所述第一图像的直方图;
    对两个直方图分别区域划分,并计算所述两个直方图分别对应的向量;
    计算两个向量的相似度。
  6. 根据权利要求5所述的拍摄方法,其中,所述对两个直方图分别区域划分,包括:
    将所述两个直方图均划分成至少一个区域;其中,每一个区域在所述两个直方图中所对应的相对位置相同。
  7. 根据权利要求6所述的拍摄方法,其中,所述计算所述两个直方图分别对应的向量,包括:
    分别针对每一个直方图中的每一个区域,进行灰度等级的计算;
    将每一个直方图中全部区域的灰度等级,作为每一个直方图所对应的向量。
  8. 根据权利要求1至7任一项所述的拍摄方法,其中,所述方法还包括:
    保存拍摄的所述第二图像。
  9. 根据权利要求1所述的拍摄方法,其中,所述第一显示参数和所述第二显示参数均至少包括以下之一:透明度参数、颜色参数、显示效果参数;所述第一显示参数与第二显示参数的数值不同。
  10. 根据权利要求1所述的拍摄方法,其中,
    所述采集包括:基于取景范围和角度获取到图像,将图像实时显示在预览界面上;
    所述拍摄包括针对当前时刻的预览画面进行拍摄,将拍摄出来的照片进行缓存或保存。
  11. 一种拍摄装置,其中,所述装置包括:
    拍摄单元,配置为拍摄第一图像;
    显示单元,配置为将所述第一图像按照第一显示参数显示在预览界面上;
    预览单元,配置为采集第二图像;
    所述显示单元,配置为将所述第二图像按照第二显示参数重叠显示在所述第一图像上,并在所述预览界面上对所述第二图像进行预览;
    处理单元,配置为计算所述第二图像与所述第一图像的相似度;
    所述拍摄单元,配置为当所述第二图像与所述第一图像的相似度大于或等于门限值时,对所述第二图像进行拍摄。
  12. 根据权利要求11所述的拍摄装置,其中,所述装置还包括:
    提示单元,配置为当所述第二图像与所述第一图像的相似度大于或等于门限值时,显示第一提示信息;当所述第二图像与所述第一图像的相似度小于门限值时,显示第二提示信息;所述第一提示信息与所述第二提示信息不同。
  13. 根据权利要求11所述的拍摄装置,其中,所述显示单元,配置为将所述第一图像按照设置的透明度显示在预览界面上。
  14. 根据权利要求13所述的拍摄装置,其中,所述显示单元,配置为拍摄第一图像,底层会生产一张JPG格式的图像保存在图库中,同时会截取第一图像的预览图像;将第一图像的透明度设置为预设透明度值;底层将设置好透明度的第一图像显示在预览界面上。
  15. 根据权利要求11所述的拍摄装置,其中,所述处理单元,配置为获取所述第二图像和所述第一图像的直方图;对两个直方图分别区域划分,并计算所述两个直方图分别对应的向量;计算两个向量的相似度。
  16. 根据权利要求15所述的拍摄装置,其中,所述处理单元,配置为将所述两个直方图均划分成至少一个区域;其中,每一个区域在所述两个 直方图中所对应的相对位置相同。
  17. 根据权利要求16所述的拍摄装置,其中,所述处理单元,配置为分别针对每一个直方图中的每一个区域,进行灰度等级的计算;
    将每一个直方图中全部区域的灰度等级,作为每一个直方图所对应的向量。
  18. 根据权利要求11至17任一项所述的拍摄装置,其中,所述装置还包括:
    保存单元,配置为保存拍摄的所述第二图像。
  19. 根据权利要求11所述的拍摄装置,其中,所述第一显示参数和所述第二显示参数均至少包括以下之一:透明度参数、颜色参数、显示效果参数;所述第一显示参数与第二显示参数的数值不同。
  20. 根据权利要求11所述的拍摄装置,其中,
    所述预览单元,配置为基于取景范围和角度获取到图像,将图像实时显示在预览界面上;
    所述拍摄单元,配置为针对当前时刻的预览画面进行拍摄,将拍摄出来的照片进行缓存或保存。
PCT/CN2016/112478 2016-01-27 2016-12-27 一种拍摄方法及装置 WO2017128914A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610057439.7A CN105554394A (zh) 2016-01-27 2016-01-27 一种拍摄方法及装置
CN201610057439.7 2016-01-27

Publications (1)

Publication Number Publication Date
WO2017128914A1 true WO2017128914A1 (zh) 2017-08-03

Family

ID=55833312

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/112478 WO2017128914A1 (zh) 2016-01-27 2016-12-27 一种拍摄方法及装置

Country Status (2)

Country Link
CN (1) CN105554394A (zh)
WO (1) WO2017128914A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979487A (zh) * 2022-05-27 2022-08-30 联想(北京)有限公司 图像处理方法、装置及电子设备和存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105554394A (zh) * 2016-01-27 2016-05-04 努比亚技术有限公司 一种拍摄方法及装置
CN106453886B (zh) * 2016-09-30 2019-07-26 维沃移动通信有限公司 一种移动终端的拍照方法及移动终端
WO2020102976A1 (zh) * 2018-11-20 2020-05-28 深圳市大疆创新科技有限公司 云台调整方法、云台调整设备、移动平台及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101453605A (zh) * 2007-12-07 2009-06-10 佳能株式会社 摄像设备及其控制方法
WO2009087499A1 (en) * 2008-01-08 2009-07-16 Sony Ericsson Mobile Communications Ab Using a captured background image for taking a photograph
CN104113697A (zh) * 2014-08-01 2014-10-22 广东欧珀移动通信有限公司 协同拍照处理方法和装置、拍照处理方法和装置
CN104125396A (zh) * 2014-06-24 2014-10-29 小米科技有限责任公司 图像拍摄方法和装置
CN105554394A (zh) * 2016-01-27 2016-05-04 努比亚技术有限公司 一种拍摄方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101453605A (zh) * 2007-12-07 2009-06-10 佳能株式会社 摄像设备及其控制方法
WO2009087499A1 (en) * 2008-01-08 2009-07-16 Sony Ericsson Mobile Communications Ab Using a captured background image for taking a photograph
CN104125396A (zh) * 2014-06-24 2014-10-29 小米科技有限责任公司 图像拍摄方法和装置
CN104113697A (zh) * 2014-08-01 2014-10-22 广东欧珀移动通信有限公司 协同拍照处理方法和装置、拍照处理方法和装置
CN105554394A (zh) * 2016-01-27 2016-05-04 努比亚技术有限公司 一种拍摄方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979487A (zh) * 2022-05-27 2022-08-30 联想(北京)有限公司 图像处理方法、装置及电子设备和存储介质

Also Published As

Publication number Publication date
CN105554394A (zh) 2016-05-04

Similar Documents

Publication Publication Date Title
WO2016023406A1 (zh) 物体运动轨迹的拍摄方法、移动终端和计算机存储介质
WO2016011859A1 (zh) 拍摄光绘视频的方法、移动终端和计算机存储介质
WO2017050125A1 (zh) 拍摄角度提示方法和装置、终端和计算机存储介质
US8334907B2 (en) Photographing method and apparatus using face pose estimation of face
WO2016004819A1 (zh) 一种拍摄方法、拍摄装置和计算机存储介质
US20070222858A1 (en) Monitoring system, monitoring method and program therefor
US20130222635A1 (en) Digital photographing apparatus and method of controlling the same
WO2017128914A1 (zh) 一种拍摄方法及装置
WO2016008359A1 (zh) 物体运动轨迹图像的合成方法、装置及计算机存储介质
WO2017080348A2 (zh) 一种基于场景的拍照装置、方法、计算机存储介质
JP2010041435A (ja) 撮像装置及びその制御方法
US20150356356A1 (en) Apparatus and method of providing thumbnail image of moving picture
JP2010021921A (ja) 電子カメラおよび画像処理プログラム
EP2890116B1 (en) Method of displaying a photographing mode by using lens characteristics, computer-readable storage medium of recording the method and an electronic apparatus
JPWO2018235382A1 (ja) 撮像装置、撮像装置の制御方法、及び撮像装置の制御プログラム
KR20110090098A (ko) 디지털 영상 처리 장치 및 그 제어 방법
WO2016019786A1 (zh) 物体运动轨迹拍摄方法、系统及计算机存储介质
JP4632417B2 (ja) 撮像装置、及びその制御方法
JP6099973B2 (ja) 被写体領域追跡装置、その制御方法及びプログラム
WO2017071560A1 (zh) 图片处理方法及装置
KR20160011533A (ko) 이미지 촬영 장치, 이미지 촬영 방법 및 비일시적 기록매체
JP6450107B2 (ja) 画像処理装置及び画像処理方法、プログラム、記憶媒体
JP2014225763A (ja) 撮像装置及びその制御方法、プログラム、並びに記憶媒体
JP2013207634A (ja) 撮像装置
KR101905813B1 (ko) 영상비교장치

Legal Events

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

Ref document number: 16887785

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16887785

Country of ref document: EP

Kind code of ref document: A1