WO2016011871A1 - Shooting method, shooting device, and computer storage medium - Google Patents

Shooting method, shooting device, and computer storage medium Download PDF

Info

Publication number
WO2016011871A1
WO2016011871A1 PCT/CN2015/082398 CN2015082398W WO2016011871A1 WO 2016011871 A1 WO2016011871 A1 WO 2016011871A1 CN 2015082398 W CN2015082398 W CN 2015082398W WO 2016011871 A1 WO2016011871 A1 WO 2016011871A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
background
currently
normal
brightness
Prior art date
Application number
PCT/CN2015/082398
Other languages
French (fr)
Chinese (zh)
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 WO2016011871A1 publication Critical patent/WO2016011871A1/en

Links

Images

Classifications

    • 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

Definitions

  • the present invention relates to the field of imaging technology, and in particular, to a photographing method, a photographing apparatus, and a computer storage medium.
  • Star-track shooting refers to the shooting mode in which the shooting device captures the running trajectory of the star through continuous exposure for a long time.
  • the exposure time usually takes 20 to 60 minutes, and the photosensitive hardware capable of supporting long-time exposure is expensive.
  • professional camera devices such as SLR cameras are equipped with the aforementioned photosensitive hardware, and for digital cameras such as digital Cameras, mobile phones, tablets, etc. cannot be equipped with such expensive photosensitive hardware.
  • the Chinese Patent Application No. 201410112654.3 discloses a method for photographing a mobile terminal.
  • the camera captures an image every preset time, and performs image synthesis according to the current image and the brightness information of the past image to generate a composite image.
  • the photographing device is made to perform long-time exposure without relying on the photosensitive hardware, and the technique of image synthesis is used to simulate long-time exposure, and the star-track photographing function is realized on the digital photographing device.
  • an embodiment of the present invention provides a photographing method, a photographing apparatus, and a computer storage medium, aiming at eliminating interference caused by sudden changes in ambient light on a photographing process. Improve the shooting effect.
  • the embodiment of the invention provides a shooting method, and the method includes:
  • the synthesizing the currently output image and the base image into a composite image includes:
  • the pixels of the base image at the same position are replaced with the pixels of the currently output image to obtain the composite image.
  • the determining whether the background of the currently outputted image is normal includes:
  • the determining whether the brightness of the currently outputted image exceeds a preset multiple of the statistical value includes:
  • the determining whether the background of the currently outputted image is normal includes:
  • the base image when the first synthesis is performed, the base image is a first output normal background image or a preset image; when not first synthesized, the base image is a previously synthesized composite image.
  • the background abnormality of the currently output image is determined, and the image is discarded.
  • the number of bright spots is the number of pixel points in the image whose brightness value is greater than a predetermined threshold
  • the acquiring the currently outputted image includes: collecting one image at a preset time; or acquiring the image in real time.
  • the embodiment of the invention further provides a photographing device, which comprises an obtaining module, a judging module, a synthesizing module and a display module, wherein:
  • Obtaining a module configured to obtain an image of the current output
  • a determining module configured to determine whether a background of the currently outputted image is normal
  • a synthesis module configured to determine a base image, and if the background of the currently output image is normal, synthesize the currently output image and the base image into a composite image
  • a display module configured to display a composite image.
  • the synthesizing module is configured to:
  • the pixels of the base image at the same position are replaced with the pixels of the currently output image to obtain the composite image.
  • the determining module is configured to:
  • the determining module is configured to:
  • the determining module is configured to:
  • the base image is a first output normal background image or a preset image; when the synthesizing module is not first synthesized, the basic image is The composite image that was previously synthesized.
  • the determining module is configured to: when it is determined that the brightness of the currently output image is greater than a preset value or exceed a preset multiple of the statistical value, determine a background abnormality of the currently output image, and discard the image.
  • the number of bright spots is the number of pixel points in the image whose brightness value is greater than a predetermined threshold
  • the determining module is configured to: when it is determined that the number of bright spots is greater than a preset value or exceed a preset multiple of the statistical value, determine a background abnormality of the currently output image, and discard the image.
  • the acquiring module is configured to collect one image at a preset time; or collect the image in real time.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the foregoing photographing method.
  • the photographing method, device and computer storage medium provided by the embodiments of the present invention detect the background of the currently outputted image, and only combine the image with the base image when the background is detected to be normal, thereby eliminating
  • the abnormal image of the background prevents the image of the background anomaly from being synthesized into the final composite image and affects the photo quality, thereby eliminating the interference caused by the sudden change of the ambient light and improving the shooting effect.
  • FIG. 1 is a flow chart of an embodiment of a photographing method of the present invention
  • FIG. 2 is a block diagram showing the structure of an embodiment of a photographing apparatus of the present invention.
  • Figure 3 is a flow chart showing another embodiment of the photographing method of the present invention.
  • the photographing method of the embodiment of the invention is mainly applied to star-track shooting, and the star-track photographing is used for photographing the motion trajectory of the stars, and the formation of the motion trajectory is caused by the relative motion between the photographer and the photographing target, and therefore can also be applied.
  • the sudden change of ambient light in this embodiment mainly means that the ambient light suddenly becomes bright, and in other application scenarios, the ambient light may suddenly become dark.
  • the following examples are described in detail by taking star track shooting as an example.
  • FIG. 1 is a flowchart of an embodiment of a photographing method provided by the present invention. As shown in FIG. 1, the method includes:
  • Step S301 Acquire an image currently output
  • the collected image may be collected at intervals or collected in real time.
  • Step S302 determining whether the background of the currently outputted image is normal
  • Step S303 determining a base image if the background of the currently outputted image is normal
  • Step S304 synthesize the currently output image and the base image into a composite image
  • the base image when the first synthesis is performed, the base image is a first output normal background image or a preset image; when not first synthesized, the base image is a previously synthesized composite image.
  • Step S305 displaying a composite image
  • this step it may be displayed in real time or at regular intervals.
  • FIG. 3 is a flowchart of another embodiment of a photographing method provided by the present invention.
  • the photographing method includes the following steps:
  • Step S101 collecting an image every preset time and outputting
  • the imaging device collects the image through the camera interval and outputs the image.
  • the interval time is the exposure time, and can be set to 40S to 60S, 5S to 10S, and the like.
  • Step S102 determining whether the background of the currently outputted image is normal
  • the photographing device determines whether the brightness of the currently outputted image is greater than a preset value or exceeds a preset value of the statistical value; if so, determining that the background of the image is abnormal; otherwise, determining that the background of the image is normal.
  • a threshold value may be preset, the sum of the luminances of all the pixels in the currently output image, or the average brightness of the image is calculated, and then the calculation is obtained. The sum of the brightness, or the average brightness is compared with a preset threshold. If the threshold is higher than the threshold, the background is abnormal, otherwise the background is normal.
  • the statistical value may be compared with a statistical value, and if the statistical value is exceeded by 1 to 2 times, the background abnormality is determined, otherwise the background is normal; the statistical value is obtained by the shooting device statistical base image or the brightness of the image of the background normal output in the past.
  • the statistical value can be the average value, the median, and the like.
  • the photographing device may also determine whether the number of bright points in the currently outputted image is greater than a preset value or exceed a preset multiple of the statistical value; if yes, determine that the background of the image is abnormal; otherwise, determine the background of the image. normal. Specifically, the photographing device calculates the number of bright points in the currently output image, where the bright point is a pixel point whose brightness value is greater than the threshold value, and then compares the calculated number of bright points with the preset number of bright point numbers, if the preset value is compared If the size is large, the background is abnormal, otherwise the background is normal. Alternatively, it may be compared with a statistical value.
  • the statistical value is exceeded by 1 to 2 times, the background abnormality is determined, otherwise the background is normal; the statistical value is the number of bright spots in the image of the basic image of the photographing device or the image with normal background output in the past.
  • the obtained value which can be the average value, the median, and the like.
  • step S103 When it is determined that the background of the currently output image is abnormal, the process proceeds to step S103; otherwise, the process proceeds to step S104.
  • Step S103 discarding the currently outputted image
  • step S102 the detection of the next image output is continued.
  • Step S104 determining a base image, synthesizing the currently output image and the base image into a composite image, and using the composite image as a base image for the next synthesis;
  • the image is synthesized.
  • the base image is first determined.
  • the base image is the first output of the background normal image or the preset image.
  • the currently output image is the start of shooting
  • the preset image before shooting can be used as the base image; or there is no preset image, the first image with normal background is not synthesized, and the second background with normal background is output.
  • the composition processing is performed only at the time of image, and at this time, the image of the first output with a normal background is used as the base image.
  • the composite image obtained by the previous synthesis is determined as the base image of the synthesis.
  • the synthesis process is performed. Specifically, taking the star track shooting as an example, the photographing device determines whether the brightness of the pixel of the image currently outputted at the same position is greater than the brightness of the pixel of the base image; if so, replacing the pixel of the base image of the same position with the pixel of the currently output image According to this, image synthesis is performed, a composite image is generated, and the composite image is used as a base image for the next image synthesis.
  • Step S105 displaying the composite image in real time
  • the composite image is displayed on the display screen in real time, and the process returns to step S102 to continue detecting the next image to be output, and preparing for the next image synthesis.
  • image acquisition and image synthesis are performed synchronously to facilitate the user to view the currently generated composite image in real time; before each image is acquired and image synthesis is performed, it is detected whether the background of the currently output image is normal. If it is abnormal, discard the currently acquired image without synthesizing, and only combine the normal background image with the base image, thereby eliminating the background abnormal image and preventing the background abnormal image from being synthesized into the final composite image.
  • the quality of the photos eliminates the interference caused by sudden changes in ambient light and improves the shooting effect.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the foregoing photographing method.
  • the photographing apparatus may be a general digital camera such as a card camera, or may be a terminal device such as a mobile phone or a tablet computer having a camera function.
  • the photographing device includes an output module, an obtaining unit 201, a judging module 202, and a synthesizing module. 203 and display module 204.
  • Output Module Configured to capture images and output them.
  • the image is collected by the camera interval, and the interval time is the exposure time.
  • the interval time is the exposure time.
  • it can be set to 40S to 60S, 5S to 10S, and the like.
  • the obtaining module 201 is configured to obtain an image currently output by the output module
  • the determining module 202 configured to determine whether the background of the currently output image is normal. If the determination result is yes, the image is sent to the synthesis module; if the determination result is no, the image is discarded.
  • the determining module 202 determines whether the brightness of the currently outputted image is greater than a preset value or exceeds a preset multiple of the statistical value; if so, determining that the background of the image is abnormal; otherwise, determining that the background of the image is normal.
  • a threshold value may be preset, and the determining module 202 calculates the sum of the brightness of all the pixels in the currently output image, or the average brightness of the image, and then calculates the sum of the obtained brightness, or the average brightness and the preset threshold. The limit is compared. If the threshold is higher than the threshold, the background is abnormal. Otherwise, the background is normal. Alternatively, it may be compared with a statistical value.
  • the statistical value is 1 to 2 times, the background abnormality is determined; otherwise, the background is normal; the statistical value is obtained by judging the brightness of the base image or the image of the normal background image output in the past.
  • the statistical value can be the average value, the median, and the like.
  • the determining module 202 may also determine whether the number of bright points in the currently outputted image is greater than a preset value or exceed a preset multiple of the statistical value; if yes, determine that the background of the image is abnormal; otherwise, determine the image.
  • the background is normal.
  • the determining module 202 calculates the number of bright points in the currently output image, where the bright point is a pixel point whose brightness value is greater than the threshold, and then compares the calculated number of bright points with the preset number of bright points, if the preset is compared If the value is large, the background is abnormal, otherwise the background is normal. Alternatively, it may be compared with a statistical value.
  • the statistical value is 1 to 2 times, the background abnormality is determined, otherwise the background is determined to be normal; the statistical value is the judgment module 202.
  • the synthesizing module 203 is configured to determine a base image, synthesize the currently output background normal image and the base image into a composite image, and use the composite image as a base image for the next synthesis.
  • the synthesizing module 203 first determines the base image.
  • the base image is the first output of the background normal image or the preset image.
  • the preset image before shooting may be used as the base image; or there is no preset image, and the image with the first background normal may not be synthesized.
  • the synthesis processing is performed when the second image with the normal background is output, and at this time, the image of the first output with the normal background is used as the base image.
  • the composite image obtained by the previous synthesis is determined as the base image of the synthesis.
  • the synthesizing module 203 determines whether the brightness of the pixel of the image currently outputted at the same position is greater than the brightness of the pixel of the base image; if so, replacing the pixel of the base image of the same position with the image of the current output.
  • the pixels are subjected to image synthesis, a composite image is generated, and the composite image is used as a base image for the next image synthesis.
  • the display module 204 is configured to display a composite image synthesized during shooting in real time.
  • image acquisition and image synthesis are performed synchronously to facilitate the user to view the currently generated composite image in real time.
  • the output module, the obtaining unit 201, the determining module 202, the synthesizing module 203, and the display module 204 may each be a central processing unit (CPU) or a digital signal processing (DSP). Or a microprocessor (MPU, Micro Processor Unit), or a Field Programmable Gate Array (FPGA); the CPU, DSP, MPU, and FPGA can be built in the data query system. Unified.
  • CPU central processing unit
  • DSP digital signal processing
  • FPGA Field Programmable Gate Array
  • the photographing apparatus of the present invention first detects whether the background of the currently outputted image is normal before each image is output and performs image synthesis. If the image is abnormal, the currently collected image is not synthesized, and only the background is normal. The image is combined with the base image to eliminate the background anomaly image, preventing the background anomaly image from being synthesized into the final composite image and affecting the photo quality, eliminating the interference caused by the sudden change of the ambient light, and improving the shooting. effect.
  • the photographing device provided in the above embodiment is only illustrated by the division of the above functional modules when performing the star-track shooting. In actual applications, the above-mentioned function assignment can be completed by different functional modules as needed.
  • the imaging device provided by the foregoing embodiment is the same as the embodiment of the imaging method, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.

Abstract

A shooting method, a shooting device, and a computer storage medium. The method comprises: acquiring a currently output image; determining whether the background of the currently output image is normal; determining a basic image if the background of the currently output image is normal; synthesizing the currently output image and the basic image into a synthetic image; and displaying the synthetic image.

Description

拍摄方法、拍摄装置和计算机存储介质Shooting method, shooting device, and computer storage medium 技术领域Technical field
本发明涉及摄像技术领域,尤其是涉及一种拍摄方法、拍摄装置和计算机存储介质。The present invention relates to the field of imaging technology, and in particular, to a photographing method, a photographing apparatus, and a computer storage medium.
背景技术Background technique
星轨拍摄,是指拍摄装置通过长时间持续曝光,拍摄出星星的运行轨迹的拍摄模式。进行星轨拍摄时,曝光时间通常需要20~60分钟,而能够支持长时间曝光的感光硬件都比较昂贵,只有专业的摄像装置如单反相机才配备有前述感光硬件,而对于数码拍摄装置如数码相机、手机、平板电脑等则不可能配备如此昂贵的感光硬件。Star-track shooting refers to the shooting mode in which the shooting device captures the running trajectory of the star through continuous exposure for a long time. When shooting a star track, the exposure time usually takes 20 to 60 minutes, and the photosensitive hardware capable of supporting long-time exposure is expensive. Only professional camera devices such as SLR cameras are equipped with the aforementioned photosensitive hardware, and for digital cameras such as digital Cameras, mobile phones, tablets, etc. cannot be equipped with such expensive photosensitive hardware.
申请号为201410112654.3的中国专利公开了一种移动终端的拍摄方法,通过摄像头每隔预设时间采集一张图像,根据当前的图像与过去的图像的亮度信息进行图像合成,生成合成图像。从而,使得拍摄装置不依赖感光硬件来进行长时间曝光,而是采用图像合成的技术来模拟长时间曝光,在数码拍摄装置上实现了星轨拍摄功能。The Chinese Patent Application No. 201410112654.3 discloses a method for photographing a mobile terminal. The camera captures an image every preset time, and performs image synthesis according to the current image and the brightness information of the past image to generate a composite image. Thereby, the photographing device is made to perform long-time exposure without relying on the photosensitive hardware, and the technique of image synthesis is used to simulate long-time exposure, and the star-track photographing function is realized on the digital photographing device.
由于星轨拍摄的持续时间较长,在进行星轨拍摄过程中,通常有突发情况的干扰,如有汽车经过拍摄现场,汽车灯光导致拍摄现场的环境光突然变亮,此时会采集到背景异常的图像,从而会影响最终的合成图像的质量,降低拍摄效果。Due to the long duration of the star-track shooting, there are usually sudden disturbances during the star-track shooting. If a car passes through the shooting scene, the ambient light of the shooting scene suddenly becomes brighter, and it will be collected. The background is an abnormal image, which affects the quality of the final composite image and reduces the shooting effect.
发明内容Summary of the invention
为解决现有存在的技术问题,本发明实施例在于提供一种拍摄方法、拍摄装置和计算机存储介质,旨在消除环境光突变对拍摄过程造成的干扰, 提高拍摄效果。In order to solve the existing technical problems, an embodiment of the present invention provides a photographing method, a photographing apparatus, and a computer storage medium, aiming at eliminating interference caused by sudden changes in ambient light on a photographing process. Improve the shooting effect.
本发明实施例提出一种拍摄方法,所述方法包括:The embodiment of the invention provides a shooting method, and the method includes:
获取当前输出的图像;Get the current output image;
判断当前输出的图像的背景是否正常;Determining whether the background of the currently output image is normal;
如果当前输出的图像的背景正常,确定基础图像;Determining the base image if the background of the currently outputted image is normal;
将当前输出的图像与所述基础图像合成为合成图像;Combining the currently output image with the base image into a composite image;
显示合成图像。Display the composite image.
上述方案中,所述将当前输出的图像与基础图像合成为合成图像,包括:In the above solution, the synthesizing the currently output image and the base image into a composite image includes:
判断同一位置当前输出的图像的像素的亮度是否大于所述基础图像的像素的亮度;Determining whether the brightness of the pixel of the image currently outputted at the same position is greater than the brightness of the pixel of the base image;
若是,则将同一位置所述基础图像的像素替换为当前输出的图像的像素,得到所述合成图像。If so, the pixels of the base image at the same position are replaced with the pixels of the currently output image to obtain the composite image.
上述方案中,所述判断当前输出的图像的背景是否正常,包括:In the above solution, the determining whether the background of the currently outputted image is normal includes:
判断当前输出的图像的亮度是否大于预设值或超过统计值预设倍数;Determining whether the brightness of the currently outputted image is greater than a preset value or exceeding a preset multiple of the statistical value;
若否,则判定当前输出的图像的背景正常。If not, it is determined that the background of the currently output image is normal.
上述方案中,所述判断当前输出的图像的亮度是否超过统计值预设倍数,包括:In the above solution, the determining whether the brightness of the currently outputted image exceeds a preset multiple of the statistical value includes:
计算当前输出的图像的亮度,获取所述基础图像或之前输出的背景正常的图像的亮度的统计值;Calculating a brightness of the currently output image, and acquiring a statistical value of brightness of the base image or a previously output background normal image;
判断当前输出的图像的亮度是否超过所述统计值预设倍数。It is judged whether the brightness of the currently outputted image exceeds the preset multiple of the statistical value.
上述方案中,所述判断当前输出的图像的背景是否正常,包括:In the above solution, the determining whether the background of the currently outputted image is normal includes:
判断当前输出的图像中的亮点数是否大于预设值或超过统计值预设倍数;Determining whether the number of bright points in the currently outputted image is greater than a preset value or exceeding a preset multiple of the statistical value;
若否,则判定当前输出的图像的背景正常。 If not, it is determined that the background of the currently output image is normal.
上述方案中,当首次进行合成时,所述基础图像为第一张输出的背景正常的图像或预设的图像;当非首次进行合成时,所述基础图像为前一次合成的合成图像。In the above solution, when the first synthesis is performed, the base image is a first output normal background image or a preset image; when not first synthesized, the base image is a previously synthesized composite image.
上述方案中,当判断为当前输出的图像的亮度大于预设值或超过统计值预设倍数时,确定当前输出的图像的背景异常,舍弃该图像。In the above solution, when it is determined that the brightness of the currently output image is greater than a preset value or exceeds a preset multiple of the statistical value, the background abnormality of the currently output image is determined, and the image is discarded.
上述方案中,所述亮点数为图像中亮度值大于预定阈值的像素点的数量;In the above solution, the number of bright spots is the number of pixel points in the image whose brightness value is greater than a predetermined threshold;
当判断所述亮点数大于预设值或超过统计值预设倍数时,确定当前输出的图像的背景异常,舍弃该图像。When it is determined that the number of bright spots is greater than a preset value or exceeds a preset multiple of the statistical value, it is determined that the background of the currently output image is abnormal, and the image is discarded.
上述方案中,所述获取当前输出的图像,包括:每隔预设时间采集一张所述图像;或者,实时采集所述图像。In the above solution, the acquiring the currently outputted image includes: collecting one image at a preset time; or acquiring the image in real time.
本发明实施例还提出一种拍摄装置,所述装置包括获取模块、判断模块、合成模块和显示模块,其中:The embodiment of the invention further provides a photographing device, which comprises an obtaining module, a judging module, a synthesizing module and a display module, wherein:
获取模块,配置为获取当前输出的图像;Obtaining a module configured to obtain an image of the current output;
判断模块,配置为判断当前输出的图像的背景是否正常;a determining module configured to determine whether a background of the currently outputted image is normal;
合成模块,配置为确定基础图像,如果当前输出的图像的背景正常,则将当前输出的图像与基础图像合成为合成图像;a synthesis module configured to determine a base image, and if the background of the currently output image is normal, synthesize the currently output image and the base image into a composite image;
显示模块,配置为显示合成图像。A display module configured to display a composite image.
上述方案中,所述合成模块配置为:In the above solution, the synthesizing module is configured to:
判断同一位置当前输出的图像的像素的亮度是否大于所述基础图像的像素的亮度;Determining whether the brightness of the pixel of the image currently outputted at the same position is greater than the brightness of the pixel of the base image;
若是,则将同一位置所述基础图像的像素替换为当前输出的图像的像素,得到所述合成图像。If so, the pixels of the base image at the same position are replaced with the pixels of the currently output image to obtain the composite image.
上述方案中,所述判断模块配置为:In the above solution, the determining module is configured to:
判断当前输出的图像的亮度是否大于预设值或超过统计值预设倍数; Determining whether the brightness of the currently outputted image is greater than a preset value or exceeding a preset multiple of the statistical value;
若否,则判定当前输出的图像的背景正常。If not, it is determined that the background of the currently output image is normal.
上述方案中,所述判断模块配置为:In the above solution, the determining module is configured to:
计算当前输出的图像的亮度,获取所述基础图像或过去输出的背景正常的图像的亮度的统计值;Calculating a brightness of the currently outputted image, and acquiring a statistical value of brightness of the base image or a background image of a normal background output in the past;
判断当前输出的图像的亮度是否超过所述统计值预设倍数;Determining whether the brightness of the currently outputted image exceeds a preset multiple of the statistical value;
若否,则判定当前输出的图像的背景正常。If not, it is determined that the background of the currently output image is normal.
上述方案中,所述判断模块配置为:In the above solution, the determining module is configured to:
判断当前输出的图像中的亮点数是否大于预设值或超过统计值预设倍数;Determining whether the number of bright points in the currently outputted image is greater than a preset value or exceeding a preset multiple of the statistical value;
若否,则判定当前输出的图像的背景正常。If not, it is determined that the background of the currently output image is normal.
上述方案中,当所述合成模块首次进行合成时,所述基础图像为第一张输出的背景正常的图像或预设的图像;当所述合成模块非首次进行合成时,所述基础图像为前一次合成的合成图像。In the above solution, when the synthesizing module performs the first synthesis, the base image is a first output normal background image or a preset image; when the synthesizing module is not first synthesized, the basic image is The composite image that was previously synthesized.
上述方案中,所述判断模块配置为:判断为当前输出的图像的亮度大于预设值或超过统计值预设倍数时,确定当前输出的图像的背景异常,舍弃该图像。In the above solution, the determining module is configured to: when it is determined that the brightness of the currently output image is greater than a preset value or exceed a preset multiple of the statistical value, determine a background abnormality of the currently output image, and discard the image.
上述方案中,所述亮点数为图像中亮度值大于预定阈值的像素点的数量;In the above solution, the number of bright spots is the number of pixel points in the image whose brightness value is greater than a predetermined threshold;
所述判断模块配置为:判断所述亮点数大于预设值或超过统计值预设倍数时,确定当前输出的图像的背景异常,舍弃该图像。The determining module is configured to: when it is determined that the number of bright spots is greater than a preset value or exceed a preset multiple of the statistical value, determine a background abnormality of the currently output image, and discard the image.
上述方案中,所述获取模块,用于每隔预设时间采集一张所述图像;或者,实时采集所述图像。In the above solution, the acquiring module is configured to collect one image at a preset time; or collect the image in real time.
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述的拍摄方法。 The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the foregoing photographing method.
本发明实施例所提供的拍摄方法、装置及计算机存储介质,通过对当前输出的图像的背景进行检测,只有当检测到其背景正常时,才将该图像与基础图像进行合成处理,从而剔除了背景异常的图像,防止将背景异常的图像合成到最终的合成图像中而影响照片质量,消除了环境光突变对拍摄过程造成的干扰,提高了拍摄效果。The photographing method, device and computer storage medium provided by the embodiments of the present invention detect the background of the currently outputted image, and only combine the image with the base image when the background is detected to be normal, thereby eliminating The abnormal image of the background prevents the image of the background anomaly from being synthesized into the final composite image and affects the photo quality, thereby eliminating the interference caused by the sudden change of the ambient light and improving the shooting effect.
附图说明DRAWINGS
图1是本发明的拍摄方法一实施例的流程图;1 is a flow chart of an embodiment of a photographing method of the present invention;
图2是本发明的拍摄装置一实施例的结构框图;2 is a block diagram showing the structure of an embodiment of a photographing apparatus of the present invention;
图3是本发明的拍摄方法另一实施例的流程图。Figure 3 is a flow chart showing another embodiment of the photographing method of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明实施例的拍摄方法主要应用于星轨拍摄,星轨拍摄用于拍摄星星的运动轨迹,而运动轨迹的形成,是由拍摄者和拍摄目标之间的相对运动所致,因此也可以应用于类似的应用场景。本实施例中的环境光突变主要指环境光突然变亮,在其它应用场景中,也可能是环境光突然变暗。下述实施例以星轨拍摄为例进行详细说明。The photographing method of the embodiment of the invention is mainly applied to star-track shooting, and the star-track photographing is used for photographing the motion trajectory of the stars, and the formation of the motion trajectory is caused by the relative motion between the photographer and the photographing target, and therefore can also be applied. For a similar application scenario. The sudden change of ambient light in this embodiment mainly means that the ambient light suddenly becomes bright, and in other application scenarios, the ambient light may suddenly become dark. The following examples are described in detail by taking star track shooting as an example.
参见图1,为本发明提供的拍摄方法一实施例的流程图,如图1所示,所述方法包括:1 is a flowchart of an embodiment of a photographing method provided by the present invention. As shown in FIG. 1, the method includes:
步骤S301:获取当前输出的图像;Step S301: Acquire an image currently output;
本步骤中,可以在星轨拍摄开始后,通过摄像头采集图像并输出该图像时,获取到该图像;所述采集图像可以为间隔采集、也可以为实时采集。 In this step, after the start of the star track shooting, when the image is acquired by the camera and the image is output, the image is acquired; the collected image may be collected at intervals or collected in real time.
步骤S302:判断当前输出的图像的背景是否正常;Step S302: determining whether the background of the currently outputted image is normal;
本步骤中,为防止在拍摄过程中环境光发生突变,如汽车经过拍摄现场时,汽车的灯光导致拍摄现场忽然变亮,此时采集到的图像的背景就会很亮,产生过曝的情形,需要判断当前输出的图像是否正常。In this step, in order to prevent sudden changes in ambient light during shooting, such as when the car passes through the shooting scene, the lighting of the car causes the shooting scene to suddenly become brighter, and the background of the captured image will be brighter, resulting in overexposure. It is necessary to judge whether the currently output image is normal.
步骤S303:如果当前输出的图像的背景正常,确定基础图像;Step S303: determining a base image if the background of the currently outputted image is normal;
本步骤中,如果当前输出的图像的背景不正常,则舍弃该图像。In this step, if the background of the currently output image is not normal, the image is discarded.
步骤S304:将当前输出的图像与基础图像合成为合成图像;Step S304: synthesize the currently output image and the base image into a composite image;
本步骤中,当首次进行合成时,所述基础图像为第一张输出的背景正常的图像或预设的图像;当非首次进行合成时,所述基础图像为前一次合成的合成图像。In this step, when the first synthesis is performed, the base image is a first output normal background image or a preset image; when not first synthesized, the base image is a previously synthesized composite image.
步骤S305:显示合成图像;Step S305: displaying a composite image;
本步骤中,可以为实时显示、也可以为每隔一定时间显示。In this step, it may be displayed in real time or at regular intervals.
参见图3,为本发明提供的拍摄方法另一实施例流程图,所述拍摄方法包括以下步骤:3 is a flowchart of another embodiment of a photographing method provided by the present invention. The photographing method includes the following steps:
步骤S101:每隔预设时间采集一张图像并输出;Step S101: collecting an image every preset time and outputting;
星轨拍摄开始后,拍摄装置通过摄像头间隔的采集图像并输出该图像,间隔时间即为曝光时间,可设为40S~60S、5S~10S等。After the start of the star track shooting, the imaging device collects the image through the camera interval and outputs the image. The interval time is the exposure time, and can be set to 40S to 60S, 5S to 10S, and the like.
步骤S102:判断当前输出的图像的背景是否正常;Step S102: determining whether the background of the currently outputted image is normal;
拍摄过程中,当环境光发生突变,如汽车经过拍摄现场时,汽车的灯光导致拍摄现场忽然变亮,此时采集到的图像的背景就会很亮,产生过曝的情形。During the shooting, when the ambient light changes suddenly, such as when the car passes through the shooting scene, the lighting of the car causes the shooting scene to suddenly become brighter. At this time, the background of the captured image will be very bright, resulting in overexposure.
在一些实施例中,拍摄装置判断当前输出的图像的亮度是否大于预设值或超过统计值预设倍数;若是,则判定该图像的背景异常;否则,判定该图像的背景正常。具体的,可以预先设置一个门限值,计算当前输出的图像中所有像素的亮度之和、或者计算图像的平均亮度,然后将计算获得 的亮度之和、或者平均亮度与预设的门限值进行比较,若比门限值高则判定背景异常,否则判定背景正常。或者,也可以与统计值进行比较,若超过统计值1~2倍则判定背景异常,否则判定背景正常;该统计值即拍摄装置统计基础图像或过去输出的背景正常的图像的亮度而获得的数值,该统计值可以是平均值、中位数等。In some embodiments, the photographing device determines whether the brightness of the currently outputted image is greater than a preset value or exceeds a preset value of the statistical value; if so, determining that the background of the image is abnormal; otherwise, determining that the background of the image is normal. Specifically, a threshold value may be preset, the sum of the luminances of all the pixels in the currently output image, or the average brightness of the image is calculated, and then the calculation is obtained. The sum of the brightness, or the average brightness is compared with a preset threshold. If the threshold is higher than the threshold, the background is abnormal, otherwise the background is normal. Alternatively, it may be compared with a statistical value, and if the statistical value is exceeded by 1 to 2 times, the background abnormality is determined, otherwise the background is normal; the statistical value is obtained by the shooting device statistical base image or the brightness of the image of the background normal output in the past. Value, the statistical value can be the average value, the median, and the like.
在另一些实施例中,拍摄装置也可以判断当前输出的图像中的亮点数是否大于预设值或超过统计值预设倍数;若是,则判定该图像的背景异常;否则,判定该图像的背景正常。具体的,拍摄装置计算出当前输出的图像中亮点的数量,所述亮点即亮度值大于阈值的像素点,然后将计算出的亮点数量与预设的亮点数量值进行比较,若比预设值大则判定背景异常,否则判定背景正常。或者,也可以与统计值进行比较,若超过统计值1~2倍则判定背景异常,否则判定背景正常;该统计值即拍摄装置统计基础图像或过去输出的背景正常的图像中的亮点数量而获得的数值,该统计值可以是平均值、中位数等。In other embodiments, the photographing device may also determine whether the number of bright points in the currently outputted image is greater than a preset value or exceed a preset multiple of the statistical value; if yes, determine that the background of the image is abnormal; otherwise, determine the background of the image. normal. Specifically, the photographing device calculates the number of bright points in the currently output image, where the bright point is a pixel point whose brightness value is greater than the threshold value, and then compares the calculated number of bright points with the preset number of bright point numbers, if the preset value is compared If the size is large, the background is abnormal, otherwise the background is normal. Alternatively, it may be compared with a statistical value. If the statistical value is exceeded by 1 to 2 times, the background abnormality is determined, otherwise the background is normal; the statistical value is the number of bright spots in the image of the basic image of the photographing device or the image with normal background output in the past. The obtained value, which can be the average value, the median, and the like.
当判定当前输出的图像的背景异常,则进入步骤S103;否则,进入步骤S104。When it is determined that the background of the currently output image is abnormal, the process proceeds to step S103; otherwise, the process proceeds to step S104.
步骤S103:舍弃当前输出的图像;Step S103: discarding the currently outputted image;
若当前输出的图像的背景异常,则舍弃该图像,不予合成,以免影响合成图像的效果。同时返回步骤S102,继续对输出的下一张图像进行检测判断。If the background of the currently output image is abnormal, the image is discarded and not synthesized, so as not to affect the effect of the composite image. At the same time, returning to step S102, the detection of the next image output is continued.
步骤S104:确定基础图像,将当前输出的图像与该基础图像合成为合成图像,并将该合成图像作为下一次合成的基础图像;Step S104: determining a base image, synthesizing the currently output image and the base image into a composite image, and using the composite image as a base image for the next synthesis;
若当前输出的图像为背景正常的图像,则对该图像进行合成处理。If the currently outputted image is an image with a normal background, the image is synthesized.
具体的,首先确定基础图像。当首次进行合成时,基础图像为第一张输出的背景正常的图像或预设的图像。例如,当前输出的图像为拍摄开始 后输出的第一张背景正常的图像,则可以将拍摄前预设的图像作为基础图像;或者没有预设图像,不对第一张背景正常的图像进行合成处理,当输出背景正常的第二张图像时才进行合成处理,此时则将第一张输出的背景正常的图像作为基础图像。此后再进行合成时,则将前一次合成得到的合成图像确定为本次合成的基础图像。Specifically, the base image is first determined. When the composition is first performed, the base image is the first output of the background normal image or the preset image. For example, the currently output image is the start of shooting After the first normal background image is output, the preset image before shooting can be used as the base image; or there is no preset image, the first image with normal background is not synthesized, and the second background with normal background is output. The composition processing is performed only at the time of image, and at this time, the image of the first output with a normal background is used as the base image. When the synthesis is performed thereafter, the composite image obtained by the previous synthesis is determined as the base image of the synthesis.
确定基础图像后则进行合成处理。具体的,以星轨拍摄为例,拍摄装置判断同一位置当前输出的图像的像素的亮度是否大于基础图像的像素的亮度;若是,则将同一位置基础图像的像素替换为当前输出的图像的像素,据此进行图像合成,生成合成图像,并将该合成图像作为下一次图像合成的基础图像。After the basic image is determined, the synthesis process is performed. Specifically, taking the star track shooting as an example, the photographing device determines whether the brightness of the pixel of the image currently outputted at the same position is greater than the brightness of the pixel of the base image; if so, replacing the pixel of the base image of the same position with the pixel of the currently output image According to this, image synthesis is performed, a composite image is generated, and the composite image is used as a base image for the next image synthesis.
步骤S105:实时显示该合成图像;Step S105: displaying the composite image in real time;
生成合成图像后,在显示屏上实时显示该合成图像,同时返回步骤S102继续对输出的下一张图像进行检测判断,准备下一次图像的合成。After the composite image is generated, the composite image is displayed on the display screen in real time, and the process returns to step S102 to continue detecting the next image to be output, and preparing for the next image synthesis.
本实施例在拍摄过程中,图像采集和图像合成同步进行,以方便用户实时查看当前生成的合成图像;在每采集输出一张图像,进行图像合成前,检测判断当前输出的图像的背景是否正常,若异常,则舍弃当前采集的图像不予合成,只将背景正常的图像与基础图像进行合成处理,从而剔除了背景异常的图像,防止将背景异常的图像合成到最终的合成图像中而影响照片质量,消除了环境光突变对拍摄过程造成的干扰,提高了拍摄效果。In this embodiment, during image capture, image acquisition and image synthesis are performed synchronously to facilitate the user to view the currently generated composite image in real time; before each image is acquired and image synthesis is performed, it is detected whether the background of the currently output image is normal. If it is abnormal, discard the currently acquired image without synthesizing, and only combine the normal background image with the base image, thereby eliminating the background abnormal image and preventing the background abnormal image from being synthesized into the final composite image. The quality of the photos eliminates the interference caused by sudden changes in ambient light and improves the shooting effect.
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述的拍摄方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the foregoing photographing method.
参见图2,提出本发明的拍摄装置一实施例,该拍摄装置可以是普通数码相机如卡片相机等,也可以是具有摄像功能的手机、平板电脑等终端设备。所述拍摄装置包括输出模块、获取单元201、判断模块202、合成模块 203和显示模块204。Referring to FIG. 2, an embodiment of the photographing apparatus of the present invention is provided. The photographing apparatus may be a general digital camera such as a card camera, or may be a terminal device such as a mobile phone or a tablet computer having a camera function. The photographing device includes an output module, an obtaining unit 201, a judging module 202, and a synthesizing module. 203 and display module 204.
输出模块:配置为采集图像并予以输出。其通过摄像头间隔的采集图像,间隔时间即为曝光时间,如可设为40S~60S、5S~10S等。Output Module: Configured to capture images and output them. The image is collected by the camera interval, and the interval time is the exposure time. For example, it can be set to 40S to 60S, 5S to 10S, and the like.
获取模块201,配置为获取输出模块当前输出的图像;The obtaining module 201 is configured to obtain an image currently output by the output module;
判断模块202:配置为当前输出的图像的背景是否正常。若判断结果为是,则将该图像发送给合成模块;若判断结果为否,则舍弃该图像。The determining module 202: configured to determine whether the background of the currently output image is normal. If the determination result is yes, the image is sent to the synthesis module; if the determination result is no, the image is discarded.
拍摄过程中,当环境光发生突变,如汽车经过拍摄现场时,汽车的灯光导致拍摄现场忽然变亮,此时采集到的图像的背景就会很亮,产生过曝的情形。During the shooting, when the ambient light changes suddenly, such as when the car passes through the shooting scene, the lighting of the car causes the shooting scene to suddenly become brighter. At this time, the background of the captured image will be very bright, resulting in overexposure.
在一些实施例中,判断模块202判断当前输出的图像的亮度是否大于预设值或超过统计值预设倍数;若是,则判定该图像的背景异常;否则,判定该图像的背景正常。具体的,可以预先设置一个门限值,判断模块202计算当前输出的图像中所有像素的亮度之和、或图像的平均亮度,然后将计算获得的亮度之和、或平均亮度与预设的门限值进行比较,若比门限值高则判定背景异常,否则判定背景正常。或者,也可以与统计值进行比较,若超过统计值1~2倍则判定背景异常,否则判定背景正常;该统计值即判断模块统计基础图像或过去输出的背景正常的图像的亮度而获得的数值,该统计值可以是平均值、中位数等。In some embodiments, the determining module 202 determines whether the brightness of the currently outputted image is greater than a preset value or exceeds a preset multiple of the statistical value; if so, determining that the background of the image is abnormal; otherwise, determining that the background of the image is normal. Specifically, a threshold value may be preset, and the determining module 202 calculates the sum of the brightness of all the pixels in the currently output image, or the average brightness of the image, and then calculates the sum of the obtained brightness, or the average brightness and the preset threshold. The limit is compared. If the threshold is higher than the threshold, the background is abnormal. Otherwise, the background is normal. Alternatively, it may be compared with a statistical value. If the statistical value is 1 to 2 times, the background abnormality is determined; otherwise, the background is normal; the statistical value is obtained by judging the brightness of the base image or the image of the normal background image output in the past. Value, the statistical value can be the average value, the median, and the like.
在另一些实施例中,判断模块202也可以判断当前输出的图像中的亮点数是否大于预设值或超过统计值预设倍数;若是,则判定该图像的背景异常;否则,判定该图像的背景正常。具体的,判断模块202计算出当前输出的图像中亮点的数量,所述亮点即亮度值大于阈值的像素点,然后将计算出的亮点数量与预设的亮点数量值进行比较,若比预设值大则判定背景异常,否则判定背景正常。或者,也可以与统计值进行比较,若超过统计值1~2倍则判定背景异常,否则判定背景正常;该统计值即判断模块202 统计基础图像或过去输出的背景正常的图像中的亮点数量而获得的数值,该统计值可以是平均值、中位数等。In other embodiments, the determining module 202 may also determine whether the number of bright points in the currently outputted image is greater than a preset value or exceed a preset multiple of the statistical value; if yes, determine that the background of the image is abnormal; otherwise, determine the image. The background is normal. Specifically, the determining module 202 calculates the number of bright points in the currently output image, where the bright point is a pixel point whose brightness value is greater than the threshold, and then compares the calculated number of bright points with the preset number of bright points, if the preset is compared If the value is large, the background is abnormal, otherwise the background is normal. Alternatively, it may be compared with a statistical value. If the statistical value is 1 to 2 times, the background abnormality is determined, otherwise the background is determined to be normal; the statistical value is the judgment module 202. A numerical value obtained by counting the number of bright spots in the base image or the image of the background normal output in the past, and the statistical value may be an average value, a median, or the like.
合成模块203:配置为确定基础图像,将当前输出的背景正常的图像与该基础图像合成为合成图像,并将该合成图像作为下一次合成的基础图像The synthesizing module 203 is configured to determine a base image, synthesize the currently output background normal image and the base image into a composite image, and use the composite image as a base image for the next synthesis.
具体的,合成模块203首先确定基础图像。当首次进行合成时,确定基础图像为第一张输出的背景正常的图像或预设的图像。例如,当前输出的图像为拍摄开始后输出的第一张背景正常的图像,则可以将拍摄前预设的图像作为基础图像;或者没有预设图像,不对第一张背景正常的图像进行合成处理,当输出背景正常的第二张图像时才进行合成处理,此时则将第一张输出的背景正常的图像作为基础图像。此后再进行合成时,则将前一次合成得到的合成图像确定为本次合成的基础图像。Specifically, the synthesizing module 203 first determines the base image. When the composition is first performed, it is determined that the base image is the first output of the background normal image or the preset image. For example, if the currently outputted image is the first normal background image output after the start of shooting, the preset image before shooting may be used as the base image; or there is no preset image, and the image with the first background normal may not be synthesized. The synthesis processing is performed when the second image with the normal background is output, and at this time, the image of the first output with the normal background is used as the base image. When the synthesis is performed thereafter, the composite image obtained by the previous synthesis is determined as the base image of the synthesis.
确定基础图像后则进行合成处理。具体的,以星轨拍摄为例,合成模块203判断同一位置当前输出的图像的像素的亮度是否大于基础图像的像素的亮度;若是,则将同一位置基础图像的像素替换为当前输出的图像的像素,据此进行图像合成,生成合成图像,并将该合成图像作为下一次图像合成的基础图像。After the basic image is determined, the synthesis process is performed. Specifically, taking the star track shooting as an example, the synthesizing module 203 determines whether the brightness of the pixel of the image currently outputted at the same position is greater than the brightness of the pixel of the base image; if so, replacing the pixel of the base image of the same position with the image of the current output. The pixels are subjected to image synthesis, a composite image is generated, and the composite image is used as a base image for the next image synthesis.
显示模块204:配置为实时显示拍摄过程中合成的合成图像。The display module 204 is configured to display a composite image synthesized during shooting in real time.
本实施例在拍摄过程中,图像采集和图像合成同步进行,以方便用户实时查看当前生成的合成图像。In the embodiment, during image capture, image acquisition and image synthesis are performed synchronously to facilitate the user to view the currently generated composite image in real time.
上述方法实施例中的技术特征在本装置均对应适用,这里不再重述。The technical features in the above method embodiments are applicable to the device, and are not repeated here.
在实际应用中,所述输出模块、获取单元201、判断模块202、合成模块203和显示模块204均可由中央处理单元(CPU,Central Processing Unit)、或数字信号处理(DSP,Digital Signal Processor)、或微处理器(MPU,Micro Processor Unit)、或现场可编程门阵列(FPGA,Field Programmable Gate Array)等来实现;所述CPU、DSP、MPU、FPGA均可内置于数据查询系 统中。In an actual application, the output module, the obtaining unit 201, the determining module 202, the synthesizing module 203, and the display module 204 may each be a central processing unit (CPU) or a digital signal processing (DSP). Or a microprocessor (MPU, Micro Processor Unit), or a Field Programmable Gate Array (FPGA); the CPU, DSP, MPU, and FPGA can be built in the data query system. Unified.
从而,本发明的拍摄装置,在每采集输出一张图像,进行图像合成前,首先检测判断当前输出的图像的背景是否正常,若异常,则舍弃当前采集的图像不予合成,只将背景正常的图像与基础图像进行合成处理,从而剔除了背景异常的图像,防止将背景异常的图像合成到最终的合成图像中而影响照片质量,消除了环境光突变对拍摄过程造成的干扰,提高了拍摄效果。Therefore, the photographing apparatus of the present invention first detects whether the background of the currently outputted image is normal before each image is output and performs image synthesis. If the image is abnormal, the currently collected image is not synthesized, and only the background is normal. The image is combined with the base image to eliminate the background anomaly image, preventing the background anomaly image from being synthesized into the final composite image and affecting the photo quality, eliminating the interference caused by the sudden change of the ambient light, and improving the shooting. effect.
需要说明的是:上述实施例提供的拍摄装置在进行星轨拍摄时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成。另外,上述实施例提供的拍摄装置与拍摄方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that the photographing device provided in the above embodiment is only illustrated by the division of the above functional modules when performing the star-track shooting. In actual applications, the above-mentioned function assignment can be completed by different functional modules as needed. In addition, the imaging device provided by the foregoing embodiment is the same as the embodiment of the imaging method, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
本领域普通技术人员可以理解,实现上述实施例方法中的全部或部分步骤可以通过程序来控制相关的硬件完成,所述的程序可以存储于一计算机可读取存储介质中,所述的存储介质可以是ROM/RAM、磁盘、光盘等。It will be understood by those skilled in the art that all or part of the steps of the foregoing embodiments may be implemented by a program to control related hardware, and the program may be stored in a computer readable storage medium, the storage medium. It can be ROM/RAM, magnetic disk, optical disk, and the like.
以上参照附图说明了本发明的优选实施例,并非因此局限本发明的权利范围。本领域技术人员不脱离本发明的范围和实质,可以有多种变型方案实现本发明,比如作为一个实施例的特征可用于另一实施例而得到又一实施例。凡在运用本发明的技术构思之内所作的任何修改、等同替换和改进,均应在本发明的权利范围之内。 The preferred embodiments of the present invention have been described above with reference to the drawings, and are not intended to limit the scope of the invention. A person skilled in the art can implement the invention in various variants without departing from the scope and spirit of the invention. For example, the features of one embodiment can be used in another embodiment to obtain a further embodiment. Any modifications, equivalent substitutions and improvements made within the technical concept of the invention are intended to be included within the scope of the invention.

Claims (19)

  1. 一种拍摄方法,所述方法包括:A method of photographing, the method comprising:
    获取当前输出的图像;Get the current output image;
    判断当前输出的图像的背景是否正常;Determining whether the background of the currently output image is normal;
    如果当前输出的图像的背景正常,确定基础图像;Determining the base image if the background of the currently outputted image is normal;
    将当前输出的图像与基础图像合成为合成图像;Combining the currently output image with the base image into a composite image;
    显示合成图像。Display the composite image.
  2. 根据权利要求1所述的拍摄方法,其中,所述将当前输出的图像与基础图像合成为合成图像,包括:The photographing method according to claim 1, wherein the synthesizing the currently output image and the base image into a composite image comprises:
    判断同一位置当前输出的图像的像素的亮度是否大于所述基础图像的像素的亮度;Determining whether the brightness of the pixel of the image currently outputted at the same position is greater than the brightness of the pixel of the base image;
    若是,则将同一位置所述基础图像的像素替换为当前输出的图像的像素,得到所述合成图像。If so, the pixels of the base image at the same position are replaced with the pixels of the currently output image to obtain the composite image.
  3. 根据权利要求1或2所述的拍摄方法,其中,所述判断当前输出的图像的背景是否正常,包括:The photographing method according to claim 1 or 2, wherein the determining whether the background of the currently outputted image is normal includes:
    判断当前输出的图像的亮度是否大于预设值或超过统计值预设倍数;Determining whether the brightness of the currently outputted image is greater than a preset value or exceeding a preset multiple of the statistical value;
    若否,则判定当前输出的图像的背景正常。If not, it is determined that the background of the currently output image is normal.
  4. 根据权利要求3所述的拍摄方法,其中,所述判断当前输出的图像的亮度是否超过统计值预设倍数,包括:The photographing method according to claim 3, wherein the determining whether the brightness of the currently outputted image exceeds a preset multiple of the statistical value comprises:
    计算当前输出的图像的亮度,获取所述基础图像或之前输出的背景正常的图像的亮度的统计值;Calculating a brightness of the currently output image, and acquiring a statistical value of brightness of the base image or a previously output background normal image;
    判断当前输出的图像的亮度是否超过所述统计值预设倍数。It is judged whether the brightness of the currently outputted image exceeds the preset multiple of the statistical value.
  5. 根据权利要求1或2所述的拍摄方法,其中,所述判断当前输出的图像的背景是否正常,包括:The photographing method according to claim 1 or 2, wherein the determining whether the background of the currently outputted image is normal includes:
    判断当前输出的图像中的亮点数是否大于预设值或超过统计值预设倍 数;Determine whether the number of bright points in the currently output image is greater than a preset value or exceeds a preset value of the statistical value. number;
    若否,则判定当前输出的图像的背景正常。If not, it is determined that the background of the currently output image is normal.
  6. 根据权利要求1所述的拍摄方法,其中,当首次进行合成时,所述基础图像为第一张输出的背景正常的图像或预设的图像;The photographing method according to claim 1, wherein the base image is a first normal background image or a preset image when the composition is first performed;
    当非首次进行合成时,所述基础图像为前一次合成的合成图像。When the synthesis is not performed for the first time, the base image is the composite image of the previous synthesis.
  7. 根据权利要求3所述的拍摄方法,其中,当判断为当前输出的图像的亮度大于预设值或超过统计值预设倍数时,确定当前输出的图像的背景异常,舍弃该图像。The photographing method according to claim 3, wherein when it is determined that the brightness of the currently outputted image is greater than a preset value or exceeds a preset value of the statistical value, the background abnormality of the currently outputted image is determined, and the image is discarded.
  8. 根据权利要求5所述的拍摄方法,其中,所述亮点数为图像中亮度值大于预定阈值的像素点的数量;The photographing method according to claim 5, wherein the number of bright spots is a number of pixel points in the image whose brightness value is greater than a predetermined threshold;
    当判断所述亮点数大于预设值或超过统计值预设倍数时,确定当前输出的图像的背景异常,舍弃该图像。When it is determined that the number of bright spots is greater than a preset value or exceeds a preset multiple of the statistical value, it is determined that the background of the currently output image is abnormal, and the image is discarded.
  9. 根据权利要求1所述的拍摄方法,其中,所述获取当前输出的图像,包括:每隔预设时间采集一张所述图像;或者,实时采集所述图像。The photographing method according to claim 1, wherein the acquiring the currently outputted image comprises: acquiring one image at a preset time; or acquiring the image in real time.
  10. 一种拍摄装置,所述装置包括获取模块、判断模块、合成模块和显示模块,其中:A photographing apparatus, comprising: an acquisition module, a judgment module, a synthesis module, and a display module, wherein:
    获取模块,配置为获取当前输出的图像;Obtaining a module configured to obtain an image of the current output;
    判断模块,配置为判断当前输出的图像的背景是否正常;a determining module configured to determine whether a background of the currently outputted image is normal;
    合成模块,配置为确定基础图像,如果当前输出的图像的背景正常,则将当前输出的图像与所述基础图像合成为合成图像;a synthesis module configured to determine a base image, and if the background of the currently output image is normal, synthesize the currently output image and the base image into a composite image;
    显示模块,配置为显示合成图像。A display module configured to display a composite image.
  11. 根据权利要求10所述的拍摄装置,其中,所述合成模块配置为:The photographing apparatus according to claim 10, wherein the synthesizing module is configured to:
    判断同一位置当前输出的图像的像素的亮度是否大于所述基础图像的像素的亮度;Determining whether the brightness of the pixel of the image currently outputted at the same position is greater than the brightness of the pixel of the base image;
    若是,则将同一位置所述基础图像的像素替换为当前输出的图像的像 素,得到所述合成图像。If yes, replace the pixels of the base image in the same position with the image of the currently output image. The synthetic image is obtained.
  12. 根据权利要求10或11所述的拍摄装置,其中,所述判断模块配置为:The photographing apparatus according to claim 10 or 11, wherein the judging module is configured to:
    判断当前输出的图像的亮度是否大于预设值或超过统计值预设倍数;Determining whether the brightness of the currently outputted image is greater than a preset value or exceeding a preset multiple of the statistical value;
    若否,则判定当前输出的图像的背景正常。If not, it is determined that the background of the currently output image is normal.
  13. 根据权利要求12所述的拍摄装置,其中,所述判断模块配置为:The photographing apparatus according to claim 12, wherein the judging module is configured to:
    计算当前输出的图像的亮度,获取所述基础图像或之前输出的背景正常的图像的亮度的统计值;Calculating a brightness of the currently output image, and acquiring a statistical value of brightness of the base image or a previously output background normal image;
    判断当前输出的图像的亮度是否超过所述统计值预设倍数;Determining whether the brightness of the currently outputted image exceeds a preset multiple of the statistical value;
    若否,则判定当前输出的图像的背景正常。If not, it is determined that the background of the currently output image is normal.
  14. 根据权利要求10或11所述的拍摄装置,其中,所述判断模块配置为:The photographing apparatus according to claim 10 or 11, wherein the judging module is configured to:
    判断当前输出的图像中的亮点数是否大于预设值或超过统计值预设倍数;Determining whether the number of bright points in the currently outputted image is greater than a preset value or exceeding a preset multiple of the statistical value;
    若否,则判定当前输出的图像的背景正常。If not, it is determined that the background of the currently output image is normal.
  15. 根据权利要求10所述的拍摄装置,其中,当所述合成模块首次进行合成时,所述基础图像为第一张输出的背景正常的图像或预设的图像;The photographing apparatus according to claim 10, wherein, when the synthesizing module performs the first synthesis, the base image is a first output normal background image or a preset image;
    当所述合成模块非首次进行合成时,所述基础图像为前一次合成的合成图像。When the synthesis module is not first synthesized, the base image is a composite image that was previously synthesized.
  16. 根据权利要求12所述的拍摄装置,其中,所述判断模块配置为:判断为当前输出的图像的亮度大于预设值或超过统计值预设倍数时,确定当前输出的图像的背景异常,舍弃该图像。The photographing apparatus according to claim 12, wherein the determining module is configured to: determine that the background of the currently outputted image is abnormal when the brightness of the currently outputted image is greater than a preset value or exceeds a preset multiple of the statistical value, and discard The image.
  17. 根据权利要求14所述的拍摄装置,其中,所述亮点数为图像中亮度值大于预定阈值的像素点的数量;The photographing apparatus according to claim 14, wherein the number of bright spots is a number of pixel points in the image whose brightness value is greater than a predetermined threshold;
    所述判断模块,配置为:判断所述亮点数大于预设值或超过统计值预 设倍数时,确定当前输出的图像的背景异常,舍弃该图像。The determining module is configured to: determine that the number of bright spots is greater than a preset value or exceed a statistical value When the multiple is set, the background abnormality of the currently output image is determined, and the image is discarded.
  18. 根据权利要求10所述的拍摄装置,其中,所述获取模块,配置为:每隔预设时间采集一张所述图像;或者,实时采集所述图像。The photographing apparatus according to claim 10, wherein the acquiring module is configured to: collect one image at a preset time; or collect the image in real time.
  19. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述权利要求1至9任一项所述的拍摄方法。 A computer storage medium having stored therein computer executable instructions for performing the photographing method of any of the preceding claims 1 to 9.
PCT/CN2015/082398 2014-07-22 2015-06-25 Shooting method, shooting device, and computer storage medium WO2016011871A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410351395.X 2014-07-22
CN201410351395.XA CN104113693B (en) 2014-07-22 2014-07-22 Image pickup method and filming apparatus

Publications (1)

Publication Number Publication Date
WO2016011871A1 true WO2016011871A1 (en) 2016-01-28

Family

ID=51710317

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/082398 WO2016011871A1 (en) 2014-07-22 2015-06-25 Shooting method, shooting device, and computer storage medium

Country Status (2)

Country Link
CN (1) CN104113693B (en)
WO (1) WO2016011871A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114374796A (en) * 2021-12-31 2022-04-19 北京瞰瞰智能科技有限公司 Image processing method and device, image sensor and vehicle

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104113693B (en) * 2014-07-22 2016-04-06 努比亚技术有限公司 Image pickup method and filming apparatus
CN113810587B (en) * 2020-05-29 2023-04-18 华为技术有限公司 Image processing method and device
CN112261294B (en) * 2020-10-21 2022-08-26 维沃移动通信有限公司 Shooting method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005123824A (en) * 2003-10-15 2005-05-12 Nippon Hoso Kyokai <Nhk> Video object locus composing apparatus, method and program thereof
CN103888683A (en) * 2014-03-24 2014-06-25 深圳市中兴移动通信有限公司 Mobile terminal and shooting method thereof
CN103905730A (en) * 2014-03-24 2014-07-02 深圳市中兴移动通信有限公司 Shooting method of mobile terminal and mobile terminal
CN104113693A (en) * 2014-07-22 2014-10-22 深圳市中兴移动通信有限公司 Shooting method and shooting device
CN104113692A (en) * 2014-07-22 2014-10-22 深圳市中兴移动通信有限公司 Image shooting method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1221138C (en) * 2003-10-08 2005-09-28 北京中星微电子有限公司 Image synthesizing and treating method
JP2006174188A (en) * 2004-12-17 2006-06-29 Casio Comput Co Ltd Motion picture recording apparatus and motion picture recording method
JP5131257B2 (en) * 2009-08-27 2013-01-30 カシオ計算機株式会社 Display control apparatus and display control program
JP5895409B2 (en) * 2011-09-14 2016-03-30 株式会社リコー Imaging device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005123824A (en) * 2003-10-15 2005-05-12 Nippon Hoso Kyokai <Nhk> Video object locus composing apparatus, method and program thereof
CN103888683A (en) * 2014-03-24 2014-06-25 深圳市中兴移动通信有限公司 Mobile terminal and shooting method thereof
CN103905730A (en) * 2014-03-24 2014-07-02 深圳市中兴移动通信有限公司 Shooting method of mobile terminal and mobile terminal
CN104113693A (en) * 2014-07-22 2014-10-22 深圳市中兴移动通信有限公司 Shooting method and shooting device
CN104113692A (en) * 2014-07-22 2014-10-22 深圳市中兴移动通信有限公司 Image shooting method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114374796A (en) * 2021-12-31 2022-04-19 北京瞰瞰智能科技有限公司 Image processing method and device, image sensor and vehicle
CN114374796B (en) * 2021-12-31 2023-10-31 北京瞰瞰智能科技有限公司 Image processing method and device, image sensor and vehicle

Also Published As

Publication number Publication date
CN104113693B (en) 2016-04-06
CN104113693A (en) 2014-10-22

Similar Documents

Publication Publication Date Title
CN111684788A (en) Image processing method and device
JP5843454B2 (en) Image processing apparatus, image processing method, and program
US20110255786A1 (en) Method and apparatus for determining flicker in the illumination of a subject
CN110290323B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
JP6593629B2 (en) Image processing apparatus, solid-state imaging device, and electronic device
JP6300118B2 (en) Imaging apparatus, flicker detection method, and program
TW201103317A (en) Response to detection of blur in an image
WO2016011871A1 (en) Shooting method, shooting device, and computer storage medium
JP6096298B2 (en) Backlight correction method, apparatus and terminal
JP2007265125A (en) Content display
JP6304605B2 (en) Imaging apparatus, flicker detection method, and program
JP6191517B2 (en) Detection apparatus, detection program, and detection method
WO2016011872A1 (en) Image photographing method and apparatus and computer storage medium
WO2016026465A1 (en) Shooting method, shooting device, and corresponding computer program and medium
EP2541932A1 (en) Quality checking in video monitoring system.
WO2016029465A1 (en) Image processing method and apparatus and electronic device
JP7263626B2 (en) Reduce flickering of multiple light sources in images
JP2012159781A5 (en) Control device, display control method, and program
JP2018107705A (en) Imaging apparatus, control method and program and recording medium for the imaging apparatus
JP2016054423A (en) Imaging device, method for controlling the same, and program
TWI420899B (en) Image processing apparatus and image processing method and storage medium
JP2017069741A (en) Imaging apparatus, flicker detection method and program
US10965877B2 (en) Image generating method and electronic apparatus
JP2016189521A (en) Image signal processing apparatus, image signal processing method, and program
Sindelar et al. Space-variant image deblurring on smartphones using inertial sensors

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: 15824730

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 23/06/2017)

122 Ep: pct application non-entry in european phase

Ref document number: 15824730

Country of ref document: EP

Kind code of ref document: A1