WO2014114223A1 - 场景识别方法及装置 - Google Patents

场景识别方法及装置 Download PDF

Info

Publication number
WO2014114223A1
WO2014114223A1 PCT/CN2014/070994 CN2014070994W WO2014114223A1 WO 2014114223 A1 WO2014114223 A1 WO 2014114223A1 CN 2014070994 W CN2014070994 W CN 2014070994W WO 2014114223 A1 WO2014114223 A1 WO 2014114223A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
scene
pixel ratio
hdr
preset
Prior art date
Application number
PCT/CN2014/070994
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 华为终端有限公司
Priority to JP2015532298A priority Critical patent/JP6160004B2/ja
Priority to EP14743188.6A priority patent/EP2854389B1/en
Publication of WO2014114223A1 publication Critical patent/WO2014114223A1/zh
Priority to US14/581,868 priority patent/US9530054B2/en
Priority to US15/366,551 priority patent/US9934438B2/en

Links

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
    • H04N23/741Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors
    • 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

Definitions

  • the present invention claims the Chinese patent application filed on January 24, 2013, the Chinese Patent Application No. 201310027728.9, entitled “Scenario Identification Method and Apparatus", the entire contents of which are incorporated herein by reference. .
  • the present invention relates to the field of image technologies, and in particular, to a scene recognition method and apparatus.
  • the H i gh-Dynam i c Range (HDR) scene refers to a scene whose scene dynamic range is larger than the dynamic range of the picture.
  • the HDR synthesis algorithm is needed for image synthesis to obtain high quality images of the image. Therefore, it is important to accurately determine whether the scene of the image is an HDR scene for forming a high quality picture in an HDR scene. Summary of the invention
  • the present invention provides a scene recognition method and apparatus, which can improve the accuracy of identifying an image of a scene as an HDR scene.
  • the present invention provides a scene recognition method, the method comprising: acquiring an image and sensor data corresponding to the image; and performing non-high dynamic illumination rendering of the scene of the image according to the sensing data. Scene determination;
  • an image feature of the image is extracted
  • the extracting the image feature of the image is: extracting a dark region pixel ratio of the image according to an image histogram distribution of the image For example, the brightness ratio of the bright area, the intensity of the dark area histogram change, and the intensity of the bright area histogram change.
  • the determining, according to the image feature, whether the image is an HDR scene comprises: determining, according to the image feature, Whether the image is underexposed, and whether the image is overexposed; when the image is underexposed and the bright pixel ratio of the image is not less than a minimum value of a bright pixel ratio when a preset HDR scene is selected, and/or When the image is overexposed and the dark area pixel ratio of the image is not less than the minimum value of the dark area pixel ratio in the preset HDR scene, the scene of the image is an HDR scene.
  • the determining, according to the image feature, whether the image is underexposed, and determining whether the image is overexposed is: When the dark area pixel ratio is not less than a preset dark area pixel ratio threshold, the image is underexposed; when the dark area histogram changes sharply, the intensity is not less than a preset dark area histogram change severity a threshold value and the dark area pixel ratio is not less than a minimum value of a dark area pixel ratio when the intensity of the dark area histogram change reaches a threshold value, the image is underexposed; when the bright area pixel ratio is not When the brightness is smaller than the preset brightness ratio of the bright area pixel, the image is overexposed; when the intensity of the bright area histogram changes is not less than a preset brightness value of the bright area histogram change and the bright area The image is overexposed when the pixel ratio is not less than the minimum value of the brightness ratio of the bright area when the
  • the determining whether the image is HDR according to the image feature further includes: determining, when the image is underexposed and the bright area pixel ratio of the image is not less than a minimum value of a bright area pixel ratio when the HDR scene is preset, and the image is not exposed
  • the scene of the image is the first HDR scene; when the image is overexposed And determining that the scene of the image is a second HDR scene when the dark area pixel ratio of the image is not less than a minimum value of a dark area pixel ratio when the HDR scene is preset, and the image is not underexposed;
  • the image is underexposed and the bright area pixel ratio of the image is not less than a minimum value of the bright area pixel ratio when the HDR scene is preset, and when the image is overexposed and the dark area pixel ratio of the image is not less than When the minimum value of the dark area pixel ratio is
  • the method further includes: performing a sample processing on the image.
  • the present invention provides a scene recognition apparatus, the apparatus comprising: an acquisition unit, configured to acquire an image and sensor data corresponding to the image; and a first determining unit, configured to perform, according to the sensing data The scene of the image is subjected to non-high dynamic illumination rendering HDR scene determination; an extracting unit, configured to extract an image feature of the image when the scene of the image cannot be determined to be a non-HDR scene; and a second determining unit, configured to The image feature determines whether the scene of the image is an HDR scene.
  • the extracting unit is configured to: extract a dark area pixel ratio, a bright area pixel ratio, and a dark area histogram of the image according to an image histogram distribution of the image. The intensity of the change and the intensity of the change in the histogram of the bright area.
  • the second determining unit includes: a determining module and a determining module; Determining whether the image is underexposed, and determining whether the image is overexposed; the determining module is configured to: when the image is underexposed and the pixel ratio of the bright region of the image is not less than a preset
  • the scene of the image is an HDR scene.
  • the determining module is specifically configured to: when the dark area pixel ratio is not less than a preset dark area pixel ratio threshold Determining that the image is underexposed; when the dark region histogram changes sharply not less than a preset dark region histogram change severity threshold and the dark region pixel ratio is not less than a preset dark region histogram Determining that the image is underexposed when the intensity of the change in the darkness reaches a minimum value of the dark area pixel ratio; and determining the image when the brightness ratio of the bright area is not less than a preset brightness ratio of the bright area pixel Exposure; when the brightness of the bright area histogram changes not less than the preset brightness value of the bright area histogram change and the pixel ratio of the bright area is not less than the preset bright area histogram change severity reaches a threshold When the minimum value of the pixel ratio of the bright area is determined, the image is overexposed.
  • the determining module is further configured to: when the image is underexposed And determining that the scene of the image is the first HDR scene when the ratio of the bright area pixels of the image is not less than the minimum value of the ratio of the bright area pixels in the preset HDR scene; When the image is overexposed and the dark area pixel ratio of the image is not less than the minimum value of the dark area pixel ratio in the preset HDR scene, and the image is not underexposed, the scene of the image is determined to be the second HDR scene.
  • the scene of the image is determined to be the third HDR scene.
  • the apparatus further includes: an image processing unit, configured to: before the extracting unit extracts an image feature of the image, Sample processing.
  • the invention provides a terminal comprising the apparatus of any of the second aspects.
  • whether the image is a non-HDR scene by using the sensing data can effectively improve the speed of the determination scene.
  • the image is used to determine the scene of the image, and the scene of the determination image can be effectively improved. Is the accuracy of the HDR scene.
  • FIG. 1 is a flowchart of a scene recognition method according to Embodiment 1 of the present invention.
  • FIG. 1 is a schematic structural diagram of a scene recognition apparatus according to Embodiment 2 of the present invention
  • FIG. 3 is a schematic structural diagram of a terminal having a photographing function according to Embodiment 3 of the present invention.
  • FIG. 1 is a flowchart of a scene recognition method according to Embodiment 1 of the present invention.
  • the execution subject of the scene recognition method is a terminal having a photographing function.
  • the scene recognition method includes the following steps: Step S101: Acquire an image and sensor data corresponding to the image.
  • the image is a preview image when the terminal is photographed
  • the sensor data is sensor data acquired by the sensor when the preview image is acquired.
  • data such as exposure time, average brightness and sensitivities (ISO) obtained by sensors.
  • Step S102 Perform non-HDR scene determination on the scene of the image according to the sensing data.
  • the terminal first determines whether the scene of the image acquired at this time is a non-HDR scene according to the acquired sensing data.
  • the acquired sensor data conforms to the criteria of the non-HDR scene, it can be determined that the scene of the image is a non-HDR scene. For example, if the obtained exposure time is too long, the ISO value is too large, or the average brightness is too small, indicating that the current scene of the image is night or low illumination, it can be confirmed that the scene of the image is a non-HDR scene.
  • Step S103 When it is not determined whether the scene of the image is a non-HDR scene, the image feature of the image is extracted.
  • each image corresponds to an image histogram
  • the dark region pixel ratio (low ⁇ ratio ), the bright region pixel ratio (high sum ratio ), and the dark region histogram change are extracted according to the image histogram distribution corresponding to the image.
  • the severity (low-diff-hist) and the intensity of the bright histogram change (high-diff-hist) so that the terminal further determines whether the scene of the image is an HDR scene based on the extracted image features.
  • Step S104 Determine whether the scene of the image is an HDR scene according to the image feature.
  • the threshold used in determining whether the image is an HDR scene is preset in the terminal, and the thresholds include: dark region pixel ratio threshold (sumThreshold low), bright region The pixel scale value (Threshold high), the dark area histogram change severity threshold (DIFFThreshold low), the bright area histogram change severity threshold (DIFFThreshold _ high), low-dtff _ hist reaches DIFFThreshold _ low dark
  • the minimum value of the area pixel HDR _ SUM _ THRESHOLD LOW MIN _ FOR _ DIFF
  • the minimum value of the bright area pixel when high _diff_hist i to DIFFThreshold high HDR_SUM THRESHOLD _HIGH _MIN _FOR_DIFF ) ?
  • HDR scene dark area pixel ratio Minimum value ⁇ _read_THSa OLD LOW_MIN The minimum value of the bright pixel ratio ( HDR - SUM - THRESHOLD _ HIGH _MIN ) in the HDR scene.
  • the specific size of each threshold may be set according to different configurations of different terminals. The size of the threshold is not specifically limited in the present invention.
  • the terminal will judge based on the extracted image features based on the above-mentioned preset threshold.
  • the terminal first determines whether the image is underexposed, and at the same time determines whether the image is overexposed.
  • the image may be determined to be underexposed: the low sum ratio is not less than s umThreshol d low;
  • Low _diff _hist is not 'DIFFThreshold low and low sum ratio is not ' HDR _ SUM _ THRESHOLD LOW MIN _ FOR _ DIFF.
  • the image may be overexposed: high _ sum _ ratio ⁇ 'h ⁇ sumThreshold _ high;
  • the scene of the image may be determined as HDR scene.
  • condition 1 The image is under zero and the high sum ratio is not less than HDR _ SUM _ THRESHOLD _ HIGH _MIN (hereinafter referred to as condition 1);
  • condition 2 The image is over B and the low _ sum _ ratio is not less than HDR _ SUM _ THRESHOLD LOW _MIN (hereinafter referred to as condition 2).
  • the dynamic range of the current image is not enough to represent the dynamic range of the real scene, so it is an HDR scene.
  • the scene of the image is determined to be the first HDR scene.
  • the scene of the image is determined to be the second HDR scene.
  • the scene of the image is determined to be a third HDR scene.
  • the scene of the image is determined to be a non-HDR scene.
  • the scene of the image is the third HDR scene
  • the photographing is performed for HDR synthesis
  • three-frame image synthesis is performed according to the determined third HDR scene, one frame is normally exposed, one frame is darkly exposed, and one frame is exposed to light exposure to be synthesized. image.
  • HDR synthesis is not required when photographing, and corresponding processing is performed according to other scenes.
  • the image may be subjected to a sample-like process prior to extracting the image features of the image.
  • the actual pixel of the image is 1920 ⁇ 1080 pixels, and the pixels of the image are reduced to 640 x 360 pixels before the image features are extracted. This reduces the time consuming when extracting image features, thereby increasing the speed of recognizing the scene.
  • first determining whether the image is a non-HDR scene according to the sensing data corresponding to the image can effectively improve the speed of the determination scene, and when the determination is impossible according to the sensing data, the image feature is used to determine The scene of the image can effectively improve the accuracy of determining whether the scene of the image is an HDR scene, thereby improving the quality of the picture taken in the HDR scene.
  • FIG. 2 is a schematic structural diagram of a scene recognition apparatus according to Embodiment 2 of the present invention.
  • the scene recognition device is placed in a terminal having a photographing function, and is used to implement the scene recognition method provided in Embodiment 1 of the present invention.
  • the scene recognition apparatus includes: an obtaining unit 210, a first determining unit 220, and extracting Unit 230 and second determining unit 240.
  • the obtaining unit 210 is configured to acquire an image and sensor data corresponding to the image.
  • the image is a preview image when the terminal is photographed
  • the sensor data is sensor data acquired by the sensor when the preview image is acquired. For example, the exposure time, average brightness, and I SO data obtained by the sensor.
  • the first determining unit 220 is configured to perform non-HDR scene determination on the scene of the image according to the sensing data.
  • the first determining unit 220 initially determines whether the scene of the image acquired at this time is a non-HDR scene according to the acquired sensing data.
  • the acquired sensor data conforms to the standard of the non-HDR scene, it can be determined that the scene of the image is a non-HDR scene. For example, if the obtained exposure time is too long, the I SO value is too large, or the average brightness is too small, indicating that the current scene of the image is night or low illumination, it can be confirmed that the scene of the image is a non-HDR scene.
  • the first determining unit 220 can only determine that the scene of the image is not an HDR scene according to the sensing data, and it is also possible to determine whether the scene of the image is not a non-HDR scene, and therefore, when the first determining unit 220 is based on the sensing When the data cannot determine whether the scene of the image is a non-HDR scene, further judgment by other units is required.
  • the extracting unit 230 is configured to extract an image feature of the image if the first determining unit 220 cannot determine whether the scene of the image is a non-HDR scene based on the sensing data.
  • each image corresponds to one image histogram
  • the extracting unit 230 extracts a dark pixel ratio (low ⁇ ratio ) of the image according to the image histogram distribution corresponding to the image, and a bright pixel ratio (high—m ⁇ ratio).
  • the severity of the dark region histogram change (low _diff _hist ) and the intensity of the bright region histogram change (high_diff-hist) so that the second determining unit 240 further determines whether the scene of the image is based on the extracted image features. It is an HDR scene.
  • the second determining unit 240 is configured to determine whether the image is an HDR scene based on the image characteristics.
  • the second determining unit 240 is preset with a threshold for determining whether the image is an HDR scene, and the thresholds include: a dark region pixel ratio threshold (sumThreshold low), and a bright region pixel ratio is wide.
  • the minimum value of the dark area pixel ratio in HDR scene ⁇ _read_THSa _ LOW_MIN HDR The minimum value of the bright pixel scale of the scene ( HDR - SUM - THRESHOLD _ HIGH _MIN ).
  • the specific size of each threshold may be set according to different configurations of different terminals. The size of the threshold is not specifically limited in the present invention.
  • the second determining unit 240 will judge based on the extracted image features based on the above-described preset threshold values.
  • the second determining unit 240 includes: a determining module 241 and a determining module 242.
  • the judging module 241 judges whether the image is underexposed, and at the same time determines whether the image is overexposed.
  • the image may be determined to be underexposed: the low sum ratio is not less than s umThreshol d low;
  • Low _diff _hist is not 'DIFFThreshold low and low sum ratio is not ' HDR _ SUM _ THRESHOLD LOW MIN _ FOR _ DIFF.
  • the image may be overexposed: high _ sum _ ratio ⁇ 'h ⁇ sumThreshold _ high;
  • the determination module 242 After confirming whether the image is underexposed or overexposed, the determination module 242 makes further determinations.
  • the determining module 242 is configured to determine that the scene of the image is an HDR scene when the extracted image feature satisfies at least one of the following conditions.
  • condition 2 The image is under zero and the high sum ratio is not less than HDR _ SUM _ THRESHOLD _ HIGH _MIN (hereinafter referred to as condition 1); The image is over B and the low _ sum _ ratio is not less than HDR _ SUM _ THRESHOLD LOW _MIN (hereinafter referred to as condition 2).
  • the determining module 242 is further configured to: when the image feature of the image satisfies the condition 1 and the image is not exposed, determine the scene of the image as the first HDR scene; when the image feature of the image satisfies the condition 2 and the image is not underexposed, determining the image The scene is a second HDR scene; when the image features of the image satisfy the condition 1 and the condition 2 at the same time, the scene of the determined image is the third HDR scene; when the image features of the image do not satisfy the condition 1 and the condition 2 at the same time, the scene of the image is determined.
  • the determining module 242 is further configured to: when the image feature of the image satisfies the condition 1 and the image is not exposed, determine the scene of the image as the first HDR scene; when the image feature of the image satisfies the condition 2 and the image is not underexposed, determining the image The scene is a second HDR scene; when the image features of the image satisfy the condition 1 and the condition 2 at the same time, the
  • the second determining unit 240 further determines the type of the HDR scene after determining that the scene of the image is an HDR scene, and can provide more accurate data for performing HDR synthesis on the image in the HDR scene, for example, the intensity of the exposure frame number, etc., thereby effectively improving The quality of the picture taken in the HDR scene.
  • the two-frame synthesis may be performed according to the determined first HDR scene, and one frame is normally exposed. A frame is exposed to the light to synthesize the picture.
  • the two frames may be combined according to the determined second HDR scene, one frame is normally exposed, and one frame is darkly exposed to synthesize the picture.
  • the three-frame synthesis may be performed according to the determined third HDR scene, one frame is normally exposed, one frame is darkly exposed, and one frame is brightly exposed to synthesize the picture.
  • the scene recognition apparatus may further include: an image processing unit 350.
  • the image processing unit 250 is configured to perform image processing on the image before the extraction unit 230 extracts image features of the image.
  • the actual pixel of the image is 1920 X 1080 pixels, and the pixels of the image are reduced to 640 X 360 pixels before the image features are extracted, so that when the image features are extracted, the time consumption can be reduced, thereby increasing the speed of recognizing the scene.
  • the scene recognition device provided by the second embodiment of the present invention firstly according to the number of sensors corresponding to the image According to whether the image is a non-HDR scene, the speed of the determination scene can be effectively improved.
  • the image is used to determine the scene of the image, which can effectively improve the accuracy of determining whether the scene of the image is an HDR scene. Thereby improving the quality of pictures taken in an HDR scene.
  • the above obtaining unit 210 may be specifically a camera and a sensor.
  • the above units other than the obtaining unit 210 may be embedded in the hardware of the terminal or in the memory of the terminal, or may be stored in the memory of the terminal in a software form, so that the processor calls the execution of the operations corresponding to the above modules.
  • the processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
  • the embodiment of the present invention further provides a terminal, where the terminal includes the scene recognition apparatus provided in Embodiment 2 of the present invention.
  • the terminal can have camera functions, such as mobile phones, tablets, and the like.
  • FIG. 3 is a schematic structural diagram of a terminal having a photographing function according to Embodiment 3 of the present invention.
  • the terminal includes a camera 310, a sensor 320, a memory 330, and a processor 340 coupled to the camera 310, the sensor 320, and the memory 330, respectively.
  • the terminal may also include a common component such as an antenna, a baseband processing component, a medium RF processing component, an input/output device, and the like, and the embodiment of the present invention does not impose any limitation herein.
  • the camera 310 is used to acquire an image.
  • the sensor 320 is configured to acquire sensing data corresponding to the image acquired by the camera 310.
  • a set of program codes is stored in the memory 330, and the processor 340 is configured to call the program code stored in the memory 330 for performing the following operations:
  • the extracting the image feature of the image is specifically: extracting a dark area pixel ratio, a bright area pixel ratio, a dark area histogram change intensity, and a bright area according to an image histogram distribution of the image. The severity of the histogram change.
  • the step of determining whether the image is an HDR scene according to the image feature comprises:
  • determining whether the image is underexposed according to the image feature, and determining whether the image is overexposed is:
  • the dark area pixel ratio is not less than a preset dark area pixel ratio threshold, determining that the image is underexposed; when the dark area histogram changes sharply is not less than a preset dark area histogram changes drastically
  • the image is underexposed when the degree of the dark region and the pixel ratio of the dark region is not less than a minimum value of the dark region pixel ratio when the preset dark region histogram changes sharply;
  • the pixel ratio of the area is not less than the preset brightness ratio of the bright area pixel, the image is overexposed; when the brightness of the bright area histogram changes is not less than the preset brightness of the bright area histogram change
  • the image of the bright area is determined to be not less than a minimum value of a pixel ratio of the bright area when the brightness of the bright area histogram changes to a preset value, and the image is overexposed.
  • the step of determining whether the image is an HDR scene according to the image feature further comprises: a bright region pixel when the image is underexposed and a bright pixel ratio of the image is not less than a preset HDR scene When the minimum value of the ratio, and the image is not exposed, determining that the scene of the image is a first HDR scene; when the image is overexposed and the dark area pixel ratio of the image is not less than a preset HDR scene When the minimum value of the dark area pixel ratio is, and the image is not underexposed, the scene of the image is determined to be a second HDR scene; when the image is underexposed and the brightness ratio of the bright area of the image is not less than a preset When the HDR scene has a minimum value of the bright area pixel ratio, and when the image is overexposed and the dark area pixel ratio of the image is not smaller than a minimum value of the dark area pixel ratio in the preset HDR scene, The scene of the image is a third HDR scene.
  • processor 340 calls the program code in the memory 330 to perform the following operations:
  • the image is subjected to a sample processing.
  • the terminal having the photographing function provided by the third embodiment of the present invention first determines whether the image is a non-HDR scene according to the sensing data corresponding to the image, and can effectively improve the speed of determining the scene, and then utilizes the image feature when the sensing data cannot be determined.
  • the scene in which the image is judged can effectively improve the accuracy of determining whether the scene of the image is an HDR scene, thereby improving the quality of the picture taken in the HDR scene.
  • RAM random access memory
  • ROM read only memory
  • electrically programmable ROM electrically erasable programmable ROM
  • registers hard disk, removable disk, CD-ROM, or any other form of storage known in the art. In the medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

本发明涉及一种场景识别方法及装置。该场景识别方法包括:获取图像及所述图像对应的传感数据;根据所述传感数据对所述图像的场景进行非高动态光照渲染HDR场景确定;当不能确定所述图像的场景是否为非HDR场景时,提取所述图像的图像特征;根据所述图像特征确定所述图像的场景是否为HDR场景。

Description

场景识别方法及装置 本申请要求于 2013 年 1 月 24 日提交中国专利局, 申请号为 201310027728.9、 发明名称为 "场景识别方法及装置" 的中国专利申请, 其 全部内容通过引用结合在本申请中。
技术领域
本发明涉及图像技术领域, 尤其涉及一种场景识别方法及装置。
背景技术
高动态光照渲染( H i gh-Dynam i c Range , HDR )场景是指场景动态范 围大于图片动态范围的场景。在 HDR场景下需要釆用 HDR合成算法进行图 像合成以得到图像高质量的图片。 因此能否准确判断图像的场景是否是 HDR场景对于在 HDR场景下能否形成高质量的图片至关重要。 发明内容
有鉴于此, 本发明提供了一种场景识别方法及装置, 能够提高识别图 像的场景是否是 HDR场景的准确率。
在第一方面, 本发明提供了一种场景识别方法, 该方法包括: 获取图像及所述图像对应的传感数据; 根据所述传感数据对所述图像的场景进行非高动态光照渲染 HDR场景 确定;
当不能确定所述图像的场景是否为非 HDR场景时, 提取所述图像的图 像特征;
根据所述图像特征确定所述图像的场景是否为 HDR场景。 在第一方面的第一种可能的实现方式中,所述提取所述图像的图像特 征具体为: 根据所述图像的图像直方图分布提取所述图像的暗区像素比 例、 亮区像素比例、 暗区直方图变化的剧烈程度及亮区直方图变化的剧烈 程度。
结合第一方面的第一种可能的实现方式, 在第二种可能实现的方式 中, 所述根据所述图像特征确定所述图像是否为 HDR场景的步骤包括: 根 据所述图像特征判断所述图像是否欠曝, 以及判断所述图像是否过曝; 当 所述图像欠曝且所述图像的亮区像素比例不小于预先设定的 HDR场景时亮 区像素比例的最小值时, 和 /或当所述图像过曝且所述图像的暗区像素比 例不小于预先设定的 HDR场景时暗区像素比例的最小值时, 所述图像的场 景为 HDR场景。 结合第一方面的第二种可能的实现方式, 在第三种可能实现的方式 中, 所述根据所述图像特征判断所述图像是否欠曝, 以及判断所述图像是 否过曝具体为: 当所述暗区像素比例不小于预先设定的暗区像素比例阔值 时, 确定所述图像欠曝; 当所述暗区直方图变化剧烈程度不小于预先设定 的暗区直方图变化剧烈程度阔值且所述暗区像素比例不小于预先设定的 暗区直方图变化剧烈程度达到阔值时暗区像素比例的最小值时,确定所述 图像欠曝; 当所述亮区像素比例不小于预先设定的亮区像素比例阔值时, 确定所述图像过曝; 当所述亮区直方图变化剧烈程度不小于预先设定的亮 区直方图变化剧烈程度阔值且所述亮区像素比例不小于预先设定的亮区 直方图变化剧烈程度达到阔值时亮区像素比例的最小值时,确定所述图像 过曝。 结合第一方面的第二种可能的实现方式或结合第一方面的第三种可 能的实现方式, 在第四种可能实现的方式中, 所述根据所述图像特征确定 所述图像是否为 HDR场景的步骤还包括: 当所述图像欠曝且所述图像的亮 区像素比例不小于预先设定的 HDR场景时亮区像素比例的最小值时, 且所 述图像不过曝时, 确定所述图像的场景为第一 HDR场景; 当所述图像过曝 且所述图像的暗区像素比例不小于预先设定的 HDR场景时暗区像素比例的 最小值时, 且所述图像不欠曝时, 确定所述图像的场景为第二 HDR场景; 当所述图像欠曝且所述图像的亮区像素比例不小于预先设定的 HDR场景时 亮区像素比例的最小值时,且当所述图像过曝且所述图像的暗区像素比例 不小于预先设定的 HDR场景时暗区像素比例的最小值时, 确定所述图像的 场景为第三 HDR场景。 结合第一方面或结合第一方面的第一种可能的实现方式或结合第一 方面的第二种可能的实现方式或结合第一方面的第三种可能的实现方式 或结合第一方面的第四种可能的实现方式, 在第五种可能实现的方式中, 在所述提取所述图像的图像特征之前, 所述方法还包括: 对所述图像进行 下釆样处理。 在第二方面, 本发明提供一种场景识别装置, 该装置包括: 获取单元, 用于获取图像及所述图像对应的传感数据; 第一确定单元,用于根据所述传感数据对所述图像的场景进行非高动 态光照渲染 HDR场景确定; 提取单元, 用于当不能确定所述图像的场景是否为非 HDR场景时, 提 取所述图像的图像特征; 第二确定单元, 用于根据所述图像特征确定所述图像的场景是否为 HDR场景。 在第二方面的第一种可能的实现方式中, 所述提取单元具体用于: 根 据所述图像的图像直方图分布提取所述图像的暗区像素比例、亮区像素比 例、 暗区直方图变化的剧烈程度及亮区直方图变化的剧烈程度。
结合二方面的第一种可能的实现方式, 在第二种可能实现的方式中, 所述第二确定单元包括: 判断模块和确定模块; 所述判断模块用于根据所 述图像特征判断所述图像是否欠曝, 以及判断所述图像是否过曝; 所述确 定模块用于: 当图像欠曝且所述图像的亮区像素比例不小于预先设定的
HDR场景时亮区像素比例的最小值时,和 /或当所述图像过曝且所述图像的 暗区像素比例不小于预先设定的 HDR场景时暗区像素比例的最小值时, 所 述图像的场景为 HDR场景。
结合第二方面的第二种可能的实现方式, 在第三种可能实现的方式 中, 所述判断模块具体用于: 当所述暗区像素比例不小于预先设定的暗区 像素比例阔值时, 确定所述图像欠曝; 当所述暗区直方图变化剧烈程度不 小于预先设定的暗区直方图变化剧烈程度阔值且所述暗区像素比例不小 于预先设定的暗区直方图变化剧烈程度达到阔值时暗区像素比例的最小 值时, 确定所述图像欠曝; 当所述亮区像素比例不小于预先设定的亮区像 素比例阔值时, 确定所述图像过曝; 当所述亮区直方图变化剧烈程度不小 于预先设定的亮区直方图变化剧烈程度阔值且所述亮区像素比例不小于 预先设定的亮区直方图变化剧烈程度达到阔值时亮区像素比例的最小值 时, 确定所述图像过曝。
结合第二方面的第二种可能的实现方式或结合第二方面的第三种可 能的实现方式, 在第四种可能实现的方式中, 所述确定模块还用于: 当所述图像欠曝且所述图像的亮区像素比例不小于预先设定的 HDR场 景时亮区像素比例的最小值时, 且所述图像不过曝时, 确定所述图像的场 景为第一 HDR场景; 当所述图像过曝且所述图像的暗区像素比例不小于预先设定的 HDR场 景时暗区像素比例的最小值时, 且所述图像不欠曝时, 确定所述图像的场 景为第二 HDR场景; 当所述图像欠曝且所述图像的亮区像素比例不小于预先设定的 HDR场 景时亮区像素比例的最小值时,且当所述图像过曝且所述图像的暗区像素 比例不小于预先设定的 HDR场景时暗区像素比例的最小值时, 确定所述图 像的场景为第三 HDR场景。
结合第二方面或结合第二方面的第一种可能的实现方式或结合第二 方面的第二种可能的实现方式或结合第二方面的第三种可能的实现方式 或结合第二方面的第四种可能的实现方式, 在第五种可能实现的方式中, 所述装置还包括: 图像处理单元, 用于在所述提取单元提取所述图像的图 像特征之前, 对所述图像进行下釆样处理。 在第三方面, 本发明提供一种终端, 该终端包括第二方面中任一所述 的装置。
通过上述方案,利用传感数据判断图像是否是非 HDR场景可有效提高 判断场景的速度, 在根据传感数据无法进行判断时, 再利用图像特征进行 判断图像的场景, 能够有效提高判断图像的场景是否是 HDR 场景的准确 率。 附图说明
图 1为本发明实施例一提供的一种场景识别方法的流程图;
图 1为本发明实施例二提供的一种场景识别装置的结构示意图; 图 3为本发明实施例三提供的一种具有拍照功能的终端的结构示意图。
具体实施方式
为了使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本 发明作进一步地详细描述, 显然, 所描述的实施例仅仅是本发明一部份实施 例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在 没有做出创造性劳动前提下所获得的所有其它实施例, 都属于本发明保护的 范围。 下面以图 1为例详细说明本发明实施例一提供的一种场景识别方法,图 1 为本发明实施例一提供的一种场景识别方法的流程图。 该场景识别方法的执 行主体为具有拍照功能的终端。 如图 1所示, 该场景识别方法包括以下步骤: 步骤 S101 , 获取图像及该图像对应的传感数据。
其中, 该图像为终端拍照时的预览图像, 传感数据为获取预览图像时通 过传感器获取的传感数据。 如, 通过传感器获取的曝光时间, 平均亮度及感 光度 ( Inter n t iona I S tandards Organiza t ion , ISO )等数据。
步骤 S102, 根据传感数据对图像的场景进行非 HDR场景确定。
终端首先根据获取的传感数据初步判断此时获取的图像的场景是否为非 HDR场景。 当获取到的传感数据符合非 HDR场景的标准时, 则可确定该图像的 场景为非 HDR场景。 例如, 获取到的曝光时间太长, ISO值太大或平均亮度太 小, 说明图像当前的场景为夜晚或者低照度的场景下, 则可确认此时图像的 场景为非 HDR场景。
需要说明的是, 根据传感数据只能判断出图像的场景不是 HDR场景, 还 有可能判断不出图像的场景是不是非 HDR场景, 因此当根据传感数据无法确 定图像的场景是否是非 HDR场景时, 需要通过其它步骤进行进一步判断。
步骤 S103, 当不能确定图像的场景是否为非 HDR场景时, 提取图像的图 像特征。
具体的, 每个图像会对应一个的图像直方图, 根据图像对应的图像直方 图分布提取图像的暗区像素比例 ( low 匪 ratio ) , 亮区像素比例 ( high sum ratio ), 暗区直方图变化的剧烈程度 ( low—diff—hist )及亮区直 方图变化的剧烈程度( high— diff—hist ), 以便于终端根据这些提取的图像特征 进一步判断该图像的场景是否是 HDR场景。
步骤 S104 , 根据图像特征确定图像的场景是否为 HDR场景。
首先需要说明的是, 终端中预先设置用于判断图像是否是 HDR场景时所 用到的阔值, 这些阔值包括: 暗区像素比例阔值( sumThreshold low ), 亮区 像素比例阔值 ( 匿 Threshold high ) , 暗区直方图变化剧烈程度阔值 ( DIFFThreshold low ) , 亮 区 直 方 图 变 化 剧 烈 程 度 阔 值 ( DIFFThreshold _ high ) , low—dtff _ hist达到 DIFFThreshold _ low时暗区像素 的最小值( HDR _ SUM _ THRESHOLD LOW MIN _ FOR _ DIFF ),当 high _diff—hist i 到 DIFFThreshold high 时 亮 区 像 素 的 最 小 值 ( HDR_SUM THRESHOLD _HIGH _MIN _FOR_DIFF )? HDR 场景时暗区像素比例 的最小值 匪_讀 _TH薩 OLD _LOW—MIN HDR 场景时亮区像素比例的 最小值( HDR - SUM - THRESHOLD _ HIGH _MIN )。 每个阔值的具体大小可才艮据不 同终端的不同配置设定不同的值, 对于阔值的大小本发明不做具体限定。
终端将基于上述预先设定的阈值, 根据提取到图像特征进行判断。 终端 首先判断图像是否欠曝, 同时判断图像是否过曝。
当提取的图像特征至少满足下列条件之一时, 则可确定该图像欠曝: low sum ratio不小于 s umThreshol d low;
low _diff _hist 不 ' 于 DIFFThreshold low 且 low sum ratio 不 ' 于 HDR _ SUM _ THRESHOLD LOW MIN _ FOR _ DIFF。
这是因为满足以上条件之一时, 图像的亮度直方图分布聚集在暗区或者 在暗区变化较激烈, 所以欠曝。
当提取的图像特征至少满足下列条件之一时, 则可确定该图像过曝: high _ sum _ ratio ^ 'h ^~ sumThreshold _ high;
high—diff—hist ^ ' "f" DIFFThreshold _ high JL high _ sum _ ratio ^ ' "f" HDR— SUM _ THRESHOLD _ HIGH _ MIN _ FOR _ DIFF。
这是因为满足以上条件之一时, 图像的亮度直方图分布聚集在亮区或者 在亮区变化较激烈, 所以过曝。
在确认图像是否欠曝及过曝之后, 进行进一步判断。
当提取的图像特征至少满足下列条件之一时, 则可确定该图像的场景为 HDR场景。
图像欠 0暴且 high sum ratio不小于 HDR _ SUM _ THRESHOLD _ HIGH _MIN (以下简称条件一);
图像过 B暴且 low _ sum _ ratio不小于 HDR _ SUM _ THRESHOLD LOW _MIN (以 下简称条件二)。
满足以上条件之一时说明当前图像的动态范围不足以表现真实场景的动 态范围, 所以是 HDR场景。
当图像特征在满足条件一或条件二或同时满足条件一和条件二时的 HDR 场景还是存在区别的。 为能够对图像合成提供更精准的数据, 还需要对 HDR 场景进行分类。 如表 1所示, 其为判断 HDR场景类别的逻辑关系表。
Figure imgf000009_0002
Figure imgf000009_0001
从表 1 可以看出, 当图像的图像特征满足条件一且图像不过曝时, 确定 该图像的场景为第一 HDR场景。 当图像的图像特征满足条件二且图像不欠曝 时, 确定该图像的场景为第二 HDR场景。 当图像的图像特征同时满足条件一 和条件二时, 确定该图像的场景为第三 HDR场景。 当图像的图像特征同时不 满足条件一和条件二时, 确定该图像的场景为非 HDR场景。
在判断图像的场景为 HDR场景之后进一步判断 HDR场景的类型, 能够为 对 HDR场景下的图像进行 HDR合成时提供更加精准的数据, 如, 曝光所需图 像的帧数及曝光强度等, 从而有效提高在 HDR场景下拍照的图片质量。
具体的, 从表 1中还可以看出, 当确定图像的场景为第一 HDR场景, 则 在拍照进行 HDR合成时, 根据确定的第一 HDR场景进行两帧图像合成, 一帧 正常曝光, 一帧往亮曝来合成图片。 当确定图像的场景为第二 HDR场景, 则 在拍照进行 HDR合成时, 根据确定的第二 HDR场景进行两帧图像合成, 一帧 正常曝光, 一帧往暗曝来合成图片。 当确定图像的场景为第三 HDR场景, 则 在拍照进行 HDR合成时, 根据确定的第三 HDR场景进行三帧图像合成, 一帧 正常曝光, 一帧往暗曝, 一帧往亮曝来合成图片。 另外, 当确定图像的场景 为非 HDR场景时, 在拍照时不需要进行 HDR合成, 则根据其它的场景进行相 应的处理。 通过进一步判断不同类型的 HDR场景, 可才艮据不同类型的 HDR场 景对后续进行的 HDR合成提供相应的曝光帧数及强度, 以提高在每个类型的 H D R场景下拍照的图片质量。
优选地, 为了降低提取图像特征的耗时, 可以在提取图像的图像特征之 前对图像进行降釆样处理。 例如, 图像的实际像素为 1920 χ 1080像素, 在提 取图像特征之前将该图像的像素降低到 640 x 360像素, 这样在提取图像特征 时, 能够减少耗时, 从而提高识别场景的速度。
利用本发明实施例一提供的场景识别方法, 首先根据图像对应的传感数 据判断图像是否是非 HDR场景可有效提高判断场景的速度, 在根据传感数据 无法进行判断时, 再利用图像特征进行判断图像的场景, 能够有效提高判断 图像的场景是否是 HDR场景的准确率, 从而提高在 HDR场景下拍照的图片质 量。
下面以图 2为例详细说明本发明实施例二提供的一种场景识别装置,图 2 为本发明实施例二提供的一种场景识别装置的结构示意图。 该场景识别装置 置于具有拍照功能的终端, 用以实现本发明实施例一提供的场景识别方法。 如图 2所示, 该场景识别装置包括: 获取单元 210, 第一确定单元 220, 提取 单元 230和第二确定单元 240。
获取单元 21 0用于获取图像及该图像对应的传感数据。
其中, 该图像为终端拍照时的预览图像, 传感数据为获取预览图像时通 过传感器获取的传感数据。 如, 通过传感器获取的曝光时间, 平均亮度及 I SO 等数据。
第一确定单元 220用于根据传感数据对图像的场景进行非 HDR场景确定。 第一确定单元 220根据获取的传感数据初步判断此时获取的图像的场景 是否为非 HDR场景。 当获取到的传感数据符合非 HDR场景的标准时, 则可确 定该图像的场景为非 HDR场景。 例如, 获取到的曝光时间太长, I SO值太大或 平均亮度太小, 说明图像当前的场景为夜晚或者低照度的场景下, 则可确认 此时图像的场景为非 HDR场景。
需要说明的是, 第一确定单元 220根据传感数据只能判断出图像的场景 不是 HDR场景, 还有可能判断不出图像的场景是不是非 HDR场景, 因此当第 一确定单元 220根据传感数据无法确定图像的场景是否是非 HDR场景时, 需 要通过其它单元进行进一步判断。
提取单元 230用于如果第一确定单元 220根据传感数据不能确定图像的 场景是否为非 HDR场景, 提取图像的图像特征。
具体的, 每个图像会对应一个的图像直方图, 提取单元 230根据图像对 应的图像直方图分布提取图像的暗区像素比例( low 匪 ratio ),亮区像素比 例 ( high— m— ratio ), 暗区直方图变化的剧烈程度 ( low _diff _hist )及亮区 直方图变化的剧烈程度( high— diff—hist ), 以便于第二确定单元 240根据这些 提取的图像特征进一步判断该图像的场景是否是 HDR场景。
第二确定单元 240用于根据图像特征确定图像是否为 HDR场景。
首先需要说明的是, 第二确定单元 240 中预先设置有用于判断图像是否 是 HDR 场景时所用到的阔值, 这些阔值包括: 暗区像素比例阔值 ( sumThreshold low ), 亮区像素比例阔值( wJ¾m^oW_ z/g z ), 暗区直方图 变化剧烈程度阔值 ( DIFFThreshold low ), 亮区直方图变化剧烈程度阔值 ( DIFFThreshold _ high ) , low—dtff _ hist达到 DIFFThreshold _ low时暗区像素 的最小值( HDR _ SUM _ THRESHOLD LOW MIN _ FOR _ DIFF ),当 high _diff—hist i 到 DIFFThreshold high 时 亮 区 像 素 的 最 小 值 ( HDR_SUM THRESHOLD _HIGH _MIN _FOR_DIFF )? HDR 场景时暗区像素比例 的最小值 匪_讀 _TH薩 OLD _LOW—MIN HDR 场景时亮区像素比例的 最小值( HDR - SUM - THRESHOLD _ HIGH _MIN )。 每个阔值的具体大小可才艮据不 同终端的不同配置设定不同的值, 对于阔值的大小本发明不做具体限定。
第二确定单元 240将基于上述预先设定的阔值, 根据提取到图像特征进 行判断。
进一步的, 第二确定单元 240包括: 判断模块 241和确定模块 242。
首先, 判断模块 241判断图像是否欠曝, 同时判断图像是否过曝。
当提取的图像特征至少满足下列条件之一时, 则可确定该图像欠曝: low sum ratio不小于 s umThreshol d low;
low _diff _hist 不 ' 于 DIFFThreshold low 且 low sum ratio 不 ' 于 HDR _ SUM _ THRESHOLD LOW MIN _ FOR _ DIFF。
当提取的图像特征至少满足下列条件之一时, 则可确定该图像过曝: high _ sum _ ratio ^ 'h ^~ sumThreshold _ high;
high—diff—hist ^ ' "f" DIFFThreshold _ high JL high _ sum _ ratio ^ ' "f" HDR— SUM _ THRESHOLD _ HIGH _ MIN _ FOR _ DIFF。
在确认图像是否欠曝及过曝之后, 确定模块 242进行进一步判断。
确定模块 242用于当提取的图像特征至少满足下列条件之一时, 确定该 图像的场景为 HDR场景。
图像欠 0暴且 high sum ratio不小于 HDR _ SUM _ THRESHOLD _ HIGH _MIN (以下简称条件一); 图像过 B暴且 low _ sum _ ratio不小于 HDR _ SUM _ THRESHOLD LOW _MIN (以 下简称条件二)。
当图像特征在满足条件一或条件二或同时满足条件一和条件二时的 HDR 场景还是存在区别的。 为能够对图像合成提供更精准的数据, 还需要对 HDR 场景进行分类。
因此, 确定模块 242还用于当图像的图像特征满足条件一且图像不过曝 时, 确定图像的场景为第一 HDR场景; 当图像的图像特征满足条件二且图像 不欠曝时, 确定图像的场景为第二 HDR场景; 当图像的图像特征同时满足条 件一和条件二时, 确定图像的场景为第三 HDR场景; 当图像的图像特征同时 不满足条件一和条件二时, 确定图像的场景为非 HDR场景,
第二确定单元 240在判断图像的场景为 HDR场景之后进一步判断 HDR场 景的类型, 能够为对 HDR场景下的图像进行 HDR合成时提供更加精准的数据, 如, 曝光帧数强度等, 从而有效提高在 HDR场景下拍照的图片质量。
具体的, 通过确定模块 242的判断之后, 在拍照合成图片时, 当确定模 块 242确定图像的场景为第一 HDR场景时, 可根据确定的第一 HDR场景进行 两帧合成, 一帧正常曝光, 一帧往亮曝来合成图片。 当确定模块 242 确定图 像的场景为第二 HDR场景时, 可根据确定的第二 HDR场景进行两帧合成, 一 帧正常曝光, 一帧往暗曝来合成图片。 当确定模块 242 确定图像的场景为第 三 HDR场景时, 可根据确定的第三 HDR场景进行三帧合成, 一帧正常曝光, 一帧往暗曝, 一帧往亮曝来合成图片。
优选地, 为了降低提取图像特征的耗时, 该场景识别装置还可以包括: 图像处理单元 350。该图像处理单元 250用于在提取单元 230提取图像的图像 特征之前对图像进行下釆样处理。例如, 图像的实际像素为 1920 X 1080像素, 在提取图像特征之前将该图像的像素降低到 640 X 360像素, 这样在提取图像 特征时, 能够减少耗时, 从而提高识别场景的速度。
利用本发明实施例二提供的场景识别装置, 首先根据图像对应的传感数 据判断图像是否是非 HDR场景可有效提高判断场景的速度, 在根据传感数据 无法进行判断时, 再利用图像特征进行判断图像的场景, 能够有效提高判断 图像的场景是否是 HDR场景的准确率, 从而提高在 HDR场景下拍照的图片质 量。
在硬件实现上, 以上获取单元 210可以具体为摄像头和传感器。 以上除 获取单元 210 以外的其它单元可以以硬件形式内嵌于或独立于终端的处理器 中, 也可以以软件形式存储于终端的存储器中, 以便于处理器调用执行以上 各个模块对应的操作。 该处理器可以为中央处理单元(CPU )、 微处理器、 单 片机等。
本发明实施例还提供一种终端, 该终端包括本发明实施例二提供的场景 识别装置。 该终端可以具有拍照功能, 如手机, 平板电脑等。
如图 3 所示, 其为本发明实施例三提供的一种具有拍照功能的终端的结 构示意图。 该终端包括摄像头 310、 传感器 320, 存储器 330以及分别与摄像 头 310、 传感器 320, 存储器 330连接的处理器 340。 当然, 终端还可以包括 天线、 基带处理部件、 中射频处理部件、 输入输出装置等通用部件, 本发明 实施例在此不做任何限制。
其中, 摄像头 310用于获取图像。 传感器 320用于获取 3摄像头 310获 取的图像所对应的传感数据。
存储器 330中存储一组程序代码, 且处理器 340用于调用存储器 330中 存储的程序代码, 用于执行以下操作:
获取图像及所述图像对应的传感数据; 根据所述传感数据对所述图像的场景进行非高动态光照渲染 HDR场景确 定;
当所述传感数据不能确定所述图像的场景是否为非 HDR场景时, 提取所述 图像的图像特征; 根据所述图像特征确定所述图像的场景是否为 HDR场景。
进一步地, 所述提取所述图像的图像特征具体为: 根据所述图像的图像直方图分布提取所述图像的暗区像素比例、 亮区像 素比例、 暗区直方图变化的剧烈程度及亮区直方图变化的剧烈程度。
进一步地, 所述根据所述图像特征确定所述图像是否为 HDR场景的步骤包 括:
根据所述图像特征判断所述图像是否欠曝 同时判断所述图像是否过曝; 当图像欠曝且所述图像的亮区像素比例小于预先设定的 HDR场景时亮区 像素比例的最小值时, 和 /或当所述图像过曝且所述图像的暗区像素比例不小 于预先设定的 HDR场景时暗区像素比例的最小值时, 所述图像的场景为 HDR场 景。
进一步地, 所述根据所述图像特征判断所述图像是否欠曝, 以及判断所 述图像是否过曝具体为:
当所述暗区像素比例不小于预先设定的暗区像素比例阔值时, 确定所述 图像欠曝; 当所述暗区直方图变化剧烈程度不小于预先设定的暗区直方图变化剧烈 程度阔值且所述暗区像素比例不小于预先设定的暗区直方图变化剧烈程度达 ^ 'J阔值时暗区像素比例的最小值时, 确定所述图像欠曝; 当所述亮区像素比例不小于预先设定的亮区像素比例阔值时, 确定所述 图像过曝; 当所述亮区直方图变化剧烈程度不小于预先设定的亮区直方图变化剧烈 程度阔值且所述亮区像素比例不小于预先设定的亮区直方图变化剧烈程度达 到阔值时亮区像素比例的最小值时, 确定所述图像过曝。 进一步地, 所述根据所述图像特征确定所述图像是否为 HDR场景的步骤还 包括: 当所述图像欠曝且所述图像的亮区像素比例不小于预先设定的 HDR场景 时亮区像素比例的最小值时, 且所述图像不过曝时, 确定所述图像的场景为 第一 HDR场景; 当所述图像过曝且所述图像的暗区像素比例不小于预先设定的 HDR场景 时暗区像素比例的最小值时, 且所述图像不欠曝时, 确定所述图像的场景为 第二 HDR场景; 当所述图像欠曝且所述图像的亮区像素比例不小于预先设定的 HDR场景 时亮区像素比例的最小值时, 且当所述图像过曝且所述图像的暗区像素比例 不小于预先设定的 HDR 场景时暗区像素比例的最小值时, 确定所述图像的场 景为第三 HDR场景。
进一步地, 所述处理器 340调用所述存储器 330中的程序代码, 还用以 执行以下操作:
对所述图像进行下釆样处理。
利用本发明实施例三提供的具有拍照功能的终端, 首先根据图像对应的 传感数据判断图像是否是非 HDR场景可有效提高判断场景的速度, 在根据传 感数据无法进行判断时, 再利用图像特征进行判断图像的场景, 能够有效提 高判断图像的场景是否是 HDR场景的准确率, 从而提高在 HDR场景下拍照的 图片质量。
本领域的普通技术人员应该还可以进一步意识到, 结合本文中所公开的 实施例描述的各示例的单元及算法步骤, 能够以电子硬件、 计算机软件或者 二者的结合来实现, 为了清楚地说明硬件和软件的可互换性, 在上述说明中 已经按照功能一般性地描述了各示例的组成及步骤。 这些功能究竟以硬件还 是软件方式来执行, 取决于技术方案的特定应用和设计约束条件。 本领域的 普通技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能, 但是这种实现不应认为超出本发明的范围。
结合本文中所公开的实施例描述的方法或算法的步骤可以用硬件、 处理 器执行的软件模块, 或者二者的结合来实施。 软件模块可以置于随机存储器
( RAM )、 内存、 只读存储器(ROM )、 电可编程 R0M、 电可擦除可编程 R0M、 寄 存器、 硬盘、 可移动磁盘、 CD-R0M、 或技术领域内所公知的任意其它形式的 存储介质中。
以上所述的具体实施方式, 对本发明的目的、 技术方案和有益效果进行 了进一步详细说明, 所应理解的是, 以上所述仅为本发明的具体实施方式而 已, 并不用于限定本发明的保护范围, 凡在本发明的精神和原则之内, 所做 的任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权 利 要求 书
1、 一种场景识别方法, 其特征在于, 所述方法包括: 获取图像及所述图像对应的传感数据;
根据所述传感数据对所述图像的场景进行非高动态光照渲染 HDR场景确 定;
当不能确定所述图像的场景是否为非 HDR场景时, 提取所述图像的图像特 征;
根据所述图像特征确定所述图像的场景是否为 HDR场景。
2、 根据权利要求 1所述的方法, 其特征在于, 所述提取所述图像的图像特 征具体为: 根据所述图像的图像直方图分布提取所述图像的暗区像素比例、 亮区像素 比例、 暗区直方图变化的剧烈程度及亮区直方图变化的剧烈程度。
3、 根据权利要求 2所述的方法, 其特征在于, 所述根据所述图像特征确定 所述图像是否为 HDR场景的步骤包括: 根据所述图像特征判断所述图像是否欠曝, 以及判断所述图像是否过曝; 当所述图像欠曝且所述图像的亮区像素比例不小于预先设定的 HDR场景时 亮区像素比例的最小值时, 和 /或当所述图像过曝且所述图像的暗区像素比例不 小于预先设定的 HDR场景时暗区像素比例的最小值时, 所述图像的场景为 HDR场 景。
4、 根据权利要求 3所述的方法, 其特征在于, 所述根据所述图像特征判断 所述图像是否欠曝, 以及判断所述图像是否过曝具体为: 当所述暗区像素比例不小于预先设定的暗区像素比例阔值时, 确定所述图 像欠曝; 当所述暗区直方图变化剧烈程度不小于预先设定的暗区直方图变化剧烈 程度阔值且所述暗区像素比例不小于预先设定的暗区直方图变化剧烈程度达到 阔值时暗区像素比例的最小值时, 确定所述图像欠曝; 当所述亮区像素比例不小于预先设定的亮区像素比例阔值时, 确定所述图 像过曝; 当所述亮区直方图变化剧烈程度不小于预先设定的亮区直方图变化剧烈 程度阔值且所述亮区像素比例不小于预先设定的亮区直方图变化剧烈程度达到 阔值时亮区像素比例的最小值时, 确定所述图像过曝。
5、 根据权利要求 3或 4所述的方法, 其特征在于, 所述根据所述图像特征 确定所述图像是否为 HDR场景的步骤还包括: 当所述图像欠曝且所述图像的亮区像素比例不小于预先设定的 HDR场景时 亮区像素比例的最小值时, 且所述图像不过曝时, 确定所述图像的场景为第一 HDR场景; 当所述图像过曝且所述图像的暗区像素比例不小于预先设定的 HDR场景时 暗区像素比例的最小值时, 且所述图像不欠曝时, 确定所述图像的场景为第二 HDR场景; 当所述图像欠曝且所述图像的亮区像素比例不小于预先设定的 HDR场景时 亮区像素比例的最小值时, 且当所述图像过曝且所述图像的暗区像素比例不小 于预先设定的 HDR场景时暗区像素比例的最小值时, 确定所述图像的场景为第三 HDR场景。
6、 根据权利要求 1-5任一所述的方法, 其特征在于, 在所述提取所述图像 的图像特征之前, 所述方法还包括: 对所述图像进行下釆样处理。
7、 一种场景识别装置, 其特征在于, 所述装置包括: 获取单元, 用于获取图像及所述图像对应的传感数据; 第一确定单元, 用于根据所述传感数据对所述图像的场景进行非高动态光 照渲染 HDR场景确定; 提取单元, 用于当不能确定所述图像的场景是否为非 HDR场景时, 提取所 述图像的图像特征; 第二确定单元, 用于根据所述图像特征确定所述图像的场景是否为 HDR场 景。
8、 根据权利要求 7所述的装置, 其特征在于, 所述提取单元具体用于: 根据所述图像的图像直方图分布提取所述图像的暗区像素比例、 亮区像素 比例、 暗区直方图变化的剧烈程度及亮区直方图变化的剧烈程度。
9、 根据权利要求 8所述的装置, 其特征在于, 所述第二确定单元包括: 判 断模块和确定模块; 所述判断模块用于根据所述图像特征判断所述图像是否欠曝, 以及判断所 述图像是否过曝; 所述确定模块用于: 当图像欠曝且所述图像的亮区像素比例不 d、于预先设定的 HDR场景时亮区 像素比例的最小值时, 和 /或当所述图像过曝且所述图像的暗区像素比例不小于 预先设定的 HDR场景时暗区像素比例的最小值时, 所述图像的场景为 HDR场景。
10、 根据权利要求 9所述的装置, 其特征在于, 所述判断模块具体用于: 当所述暗区像素比例不小于预先设定的暗区像素比例阔值时, 确定所述图 像欠曝; 当所述暗区直方图变化剧烈程度不小于预先设定的暗区直方图变化剧烈 程度阔值且所述暗区像素比例不小于预先设定的暗区直方图变化剧烈程度达到 阔值时暗区像素比例的最小值时, 确定所述图像欠曝; 当所述亮区像素比例不小于预先设定的亮区像素比例阔值时, 确定所述图 像过曝; 当所述亮区直方图变化剧烈程度不小于预先设定的亮区直方图变化剧烈 程度阔值且所述亮区像素比例不小于预先设定的亮区直方图变化剧烈程度达到 阔值时亮区像素比例的最小值时, 确定所述图像过曝。
11、 根据权利要求 9或 10所述的装置, 其特征在于, 所述确定模块还用于: 当所述图像欠曝且所述图像的亮区像素比例不小于预先设定的 HDR场景时 亮区像素比例的最小值时, 且所述图像不过曝时, 确定所述图像的场景为第一 HDR场景; 当所述图像过曝且所述图像的暗区像素比例不小于预先设定的 HDR场景时 暗区像素比例的最小值时, 且所述图像不欠曝时, 确定所述图像的场景为第二 HDR场景; 当所述图像欠曝且所述图像的亮区像素比例不小于预先设定的 HDR场景时 亮区像素比例的最小值时, 且当所述图像过曝且所述图像的暗区像素比例不小 于预先设定的 HDR场景时暗区像素比例的最小值时, 确定所述图像的场景为第三 HDR场景。
12、 根据权利要求 7-11任一所述的装置, 其特征在于, 所述装置还包括: 图像处理单元, 用于在所述提取单元提取所述图像的图像特征之前, 对所 述图像进行下釆样处理。
13、 一种终端, 其特征在于, 所述终端包括权利要求 7-12任一所述的装置。
PCT/CN2014/070994 2013-01-24 2014-01-21 场景识别方法及装置 WO2014114223A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2015532298A JP6160004B2 (ja) 2013-01-24 2014-01-21 シーン認識方法および装置
EP14743188.6A EP2854389B1 (en) 2013-01-24 2014-01-21 Scene recognition method and apparatus
US14/581,868 US9530054B2 (en) 2013-01-24 2014-12-23 Scene recognition method and apparatus
US15/366,551 US9934438B2 (en) 2013-01-24 2016-12-01 Scene recognition method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310027728.9 2013-01-24
CN201310027728.9A CN103973988B (zh) 2013-01-24 2013-01-24 场景识别方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/581,868 Continuation US9530054B2 (en) 2013-01-24 2014-12-23 Scene recognition method and apparatus

Publications (1)

Publication Number Publication Date
WO2014114223A1 true WO2014114223A1 (zh) 2014-07-31

Family

ID=51226932

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/070994 WO2014114223A1 (zh) 2013-01-24 2014-01-21 场景识别方法及装置

Country Status (5)

Country Link
US (2) US9530054B2 (zh)
EP (1) EP2854389B1 (zh)
JP (1) JP6160004B2 (zh)
CN (1) CN103973988B (zh)
WO (1) WO2014114223A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10033962B2 (en) 2016-10-20 2018-07-24 Thomson Licensing Method and device for inverse tone mapping
US11375128B2 (en) * 2017-10-30 2022-06-28 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for obtaining exposure compensation values of high dynamic range image, terminal device and non-transitory computer-readable storage medium

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9584733B2 (en) * 2010-09-30 2017-02-28 Apple Inc. High dynamic range transition
CN103973988B (zh) * 2013-01-24 2018-02-02 华为终端(东莞)有限公司 场景识别方法及装置
CN105828065B (zh) * 2015-01-08 2017-11-21 中国移动通信集团浙江有限公司 一种视频画面过曝检测方法及装置
CN104883504B (zh) * 2015-06-05 2018-06-01 广东欧珀移动通信有限公司 开启智能终端上高动态范围hdr功能的方法及装置
CN107534737B (zh) * 2015-08-31 2020-11-17 华为技术有限公司 一种拍摄图片的方法及装置
CN105141857B (zh) * 2015-09-21 2018-12-11 广东欧珀移动通信有限公司 图像处理方法和装置
CN106067177B (zh) * 2016-06-15 2020-06-26 深圳市万普拉斯科技有限公司 Hdr场景侦测方法和装置
KR102594201B1 (ko) * 2016-09-22 2023-10-27 삼성디스플레이 주식회사 영상 처리 방법 및 이를 수행하는 표시 장치
CN109510946B (zh) * 2017-09-15 2020-07-17 展讯通信(上海)有限公司 Hdr场景检测方法及系统
KR102463965B1 (ko) 2018-01-04 2022-11-08 삼성디스플레이 주식회사 유기 발광 표시 장치 및 이의 구동 방법
CN109194946B (zh) * 2018-09-30 2021-07-20 Oppo广东移动通信有限公司 数据处理方法及装置、电子设备及存储介质
CN109639996B (zh) * 2019-01-23 2023-06-06 努比亚技术有限公司 高动态场景成像方法、移动终端及计算机可读存储介质
JP2021006937A (ja) * 2019-06-27 2021-01-21 キヤノン株式会社 画像処理装置、画像処理方法及びプログラム
US20220397675A1 (en) * 2019-07-09 2022-12-15 Sony Semiconductor Solutions Corporation Imaging systems, devices and methods
CN110443766B (zh) * 2019-08-06 2022-05-31 厦门美图之家科技有限公司 图像处理方法、装置、电子设备及可读存储介质
CN111444825A (zh) * 2020-03-25 2020-07-24 四川长虹电器股份有限公司 一种利用直方图判断图像场景的方法
CN112543286A (zh) * 2020-11-27 2021-03-23 展讯通信(上海)有限公司 一种用于终端的图像生成方法及装置、存储介质、终端
CN113747062B (zh) * 2021-08-25 2023-05-26 Oppo广东移动通信有限公司 Hdr场景检测方法与装置、终端及可读存储介质
CN114374798A (zh) * 2022-01-10 2022-04-19 Tcl通讯科技(成都)有限公司 场景识别方法、装置、电子设备和计算机可读存储介质
CN115767262B (zh) * 2022-10-31 2024-01-16 华为技术有限公司 拍照方法及电子设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101166240A (zh) * 2006-10-19 2008-04-23 索尼株式会社 图像处理装置、成像装置、图像处理方法
CN101909511A (zh) * 2008-01-09 2010-12-08 奥林巴斯株式会社 场景变化检测装置以及场景变化检测程序
CN102111560A (zh) * 2009-12-26 2011-06-29 比亚迪股份有限公司 一种自动曝光装置及其方法

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3639627B2 (ja) * 1995-02-03 2005-04-20 キヤノン株式会社 画像合成装置
JPH08256303A (ja) * 1995-03-17 1996-10-01 Canon Inc 画像処理装置
US5929908A (en) * 1995-02-03 1999-07-27 Canon Kabushiki Kaisha Image sensing apparatus which performs dynamic range expansion and image sensing method for dynamic range expansion
JPH09107499A (ja) * 1995-10-11 1997-04-22 Canon Inc 撮像装置及びその画像処理方法
US6879731B2 (en) * 2003-04-29 2005-04-12 Microsoft Corporation System and process for generating high dynamic range video
US7612804B1 (en) * 2005-02-15 2009-11-03 Apple Inc. Methods and apparatuses for image processing
JP4306750B2 (ja) * 2007-03-14 2009-08-05 ソニー株式会社 撮像装置、撮像方法、露光制御方法、プログラム
CN104618659A (zh) * 2007-07-25 2015-05-13 坎德拉微系统(S)私人有限公司 用于成像系统的曝光控制
JP5012333B2 (ja) * 2007-08-30 2012-08-29 コニカミノルタアドバンストレイヤー株式会社 画像処理装置および画像処理方法ならびに撮像装置
US8248481B2 (en) * 2009-04-08 2012-08-21 Aptina Imaging Corporation Method and apparatus for motion artifact removal in multiple-exposure high-dynamic range imaging
JP5445235B2 (ja) * 2010-03-09 2014-03-19 ソニー株式会社 画像処理装置、画像処理方法およびプログラム
JP2011244053A (ja) * 2010-05-14 2011-12-01 Nikon Corp 画像処理装置、撮像装置、及び画像処理プログラム
US8717547B2 (en) 2010-09-30 2014-05-06 Alcon Research, Ltd Production process for an interface unit and a group of such interface units
JP5713643B2 (ja) * 2010-11-18 2015-05-07 キヤノン株式会社 撮像装置、撮像装置の制御方法、プログラム及び記憶媒体
JP2012109900A (ja) * 2010-11-19 2012-06-07 Aof Imaging Technology Ltd 撮影装置、撮影方法、およびプログラム
JP5713752B2 (ja) * 2011-03-28 2015-05-07 キヤノン株式会社 画像処理装置、及びその制御方法
US8717457B2 (en) * 2012-08-14 2014-05-06 Canon Kabushiki Kaisha Adaptive spectral imaging for video capture
CN103973988B (zh) * 2013-01-24 2018-02-02 华为终端(东莞)有限公司 场景识别方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101166240A (zh) * 2006-10-19 2008-04-23 索尼株式会社 图像处理装置、成像装置、图像处理方法
CN101909511A (zh) * 2008-01-09 2010-12-08 奥林巴斯株式会社 场景变化检测装置以及场景变化检测程序
CN102111560A (zh) * 2009-12-26 2011-06-29 比亚迪股份有限公司 一种自动曝光装置及其方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2854389A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10033962B2 (en) 2016-10-20 2018-07-24 Thomson Licensing Method and device for inverse tone mapping
US11375128B2 (en) * 2017-10-30 2022-06-28 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for obtaining exposure compensation values of high dynamic range image, terminal device and non-transitory computer-readable storage medium

Also Published As

Publication number Publication date
JP6160004B2 (ja) 2017-07-12
CN103973988B (zh) 2018-02-02
EP2854389A4 (en) 2015-10-07
EP2854389A1 (en) 2015-04-01
US20150110356A1 (en) 2015-04-23
US9530054B2 (en) 2016-12-27
EP2854389B1 (en) 2018-05-30
CN103973988A (zh) 2014-08-06
US9934438B2 (en) 2018-04-03
US20170083767A1 (en) 2017-03-23
JP2015532070A (ja) 2015-11-05

Similar Documents

Publication Publication Date Title
WO2014114223A1 (zh) 场景识别方法及装置
CN108335279B (zh) 图像融合和hdr成像
JP4234195B2 (ja) 画像分割方法および画像分割システム
US9407831B2 (en) Intelligent auto-exposure bracketing
WO2019183813A1 (zh) 一种拍摄方法及设备
US7551797B2 (en) White balance adjustment
JP4834725B2 (ja) 赤目補正において虹彩色を組み込む方法及び装置
US20090273685A1 (en) Foreground/Background Segmentation in Digital Images
KR102263537B1 (ko) 전자 장치와, 그의 제어 방법
WO2017215527A1 (zh) Hdr场景侦测方法、装置和计算机存储介质
CN107481186B (zh) 图像处理方法、装置、计算机可读存储介质和计算机设备
WO2017020382A1 (zh) 拍照控制方法、拍照控制装置及终端
WO2017206444A1 (zh) 一种成像差异检测方法、装置及计算机存储介质
WO2017114399A1 (zh) 逆光拍照方法和装置
US10972676B2 (en) Image processing method and electronic device capable of optimizing hdr image by using depth information
WO2019029573A1 (zh) 图像虚化方法、计算机可读存储介质和计算机设备
WO2021175116A1 (zh) 拍摄场景识别控制方法、装置及拍摄设备
CN107682611B (zh) 对焦的方法、装置、计算机可读存储介质和电子设备
WO2010116478A1 (ja) 画像処理装置および画像処理方法、画像処理プログラム
WO2019129041A1 (zh) 一种亮度调节方法、装置、终端及计算机可读存储介质
CN112183454B (zh) 图像检测方法及装置、存储介质、终端
JP2009063674A (ja) 撮像装置及びフラッシュ制御方法
CN110868549B (zh) 一种曝光控制方法、装置及电子设备
CN113747062A (zh) Hdr场景检测方法与装置、终端及可读存储介质
KR20110067700A (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: 14743188

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2014743188

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2015532298

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE