WO2020124875A1 - 图片识别方法及装置 - Google Patents

图片识别方法及装置 Download PDF

Info

Publication number
WO2020124875A1
WO2020124875A1 PCT/CN2019/081800 CN2019081800W WO2020124875A1 WO 2020124875 A1 WO2020124875 A1 WO 2020124875A1 CN 2019081800 W CN2019081800 W CN 2019081800W WO 2020124875 A1 WO2020124875 A1 WO 2020124875A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
blue sky
pixels
area
mean
Prior art date
Application number
PCT/CN2019/081800
Other languages
English (en)
French (fr)
Inventor
饶洋
彭乐立
Original Assignee
深圳市华星光电半导体显示技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市华星光电半导体显示技术有限公司 filed Critical 深圳市华星光电半导体显示技术有限公司
Publication of WO2020124875A1 publication Critical patent/WO2020124875A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features

Definitions

  • This application relates to the field of picture recognition, in particular to a picture recognition method and device.
  • the existing blue sky picture recognition method is to calculate the image color temperature based on statistics, and this identification method is not applicable to the presence of a large area blue sky image in the target picture.
  • the color temperature of the image based on statistical calculation is generally 10000K+, and the color temperature value of the image corresponding to the real scene is often 5500K, which leads to a large error in the existing blue sky picture recognition method, and it is impossible to accurately perform the blue sky picture in the pre-selected picture. filter.
  • This application provides a picture recognition method and device to improve the accuracy of detecting blue sky pictures.
  • This application provides a picture recognition method, which includes:
  • the target picture when G1 is less than 80 and the ratio of (G2-G1) to G1 is greater than 0.1, the target picture is a non-blue sky picture; otherwise, the target picture is a blue sky picture.
  • the steps of scanning multiple sample pictures to obtain the target pictures in the sample pictures include:
  • the pre-selected picture is a non-target picture; otherwise, the pre-selected picture is the target picture.
  • the steps of scanning multiple preselected pictures to obtain the coordinates of the blue sky area in the HSV color space in the preselected pictures include:
  • the range of the first area in the HSV color space is:
  • the step of obtaining the grayscale mean G2 of the pixel points in the target picture whose Sobel mean is greater than the threshold includes:
  • the gray scale mean G2 of the first set is calculated.
  • the blue sky pixel area of the blue sky picture is:
  • the second set of pixels in the blue sky picture has a Sobel value greater than 0.9*C m .
  • the present application also proposes a picture recognition device, wherein the picture recognition device includes a pre-selection module, a first gray-scale calculation module, a second gray-scale calculation module, and a screening module;
  • the preselection module is used to scan multiple preselected pictures to obtain target pictures in the preselected pictures;
  • the first grayscale calculation module is used to scan the target picture to obtain the Sobel value A of each pixel in the target picture and the grayscale average G1 of all pixels;
  • the second grayscale calculation module is used to obtain the grayscale average G2 of the pixels in the target picture whose Sobel average is greater than a threshold;
  • the filtering module is used to filter the blue sky picture from the target picture according to the gray scale mean G1 of all pixels in the target image and the gray scale mean G2 of the pixels in the target picture whose Sobel mean is greater than a threshold Blue sky pixel area.
  • the target picture when G1 is less than 80 and the ratio of (G2-G1) to G1 is greater than 0.1, the target picture is a non-blue sky picture; otherwise, the target picture is a blue sky picture;
  • the set of pixels with a Sobel value greater than 0.9*C m in the blue sky picture is the blue sky pixel area.
  • the preselection module includes a first acquisition unit, a first calculation unit, a second calculation unit, and a preselection unit;
  • the first obtaining unit is used to scan multiple preselected pictures to obtain the coordinates of the blue sky area in the HSV color space in the preselected pictures;
  • the second calculating unit is used to calculate the proportion a of the pixels in the first area of the blue sky area to all the points in the blue sky area;
  • the preselection unit preselects the preselected picture
  • the pre-selected picture is a non-target picture; otherwise, the pre-selected picture is the target picture.
  • the range of the first area in the HSV color space is:
  • the first gray-scale calculation module includes a second acquisition unit, a third calculation unit, and a fourth calculation unit;
  • the second obtaining unit is configured to scan the target picture to obtain gray scale values of all pixels in the target picture in the three primary color space;
  • the third calculation unit is used to calculate the Sobel value A of each pixel in the target picture according to the Sobel calculation formula
  • the fourth calculation unit is used to calculate the grayscale mean G1 of all pixels in the target picture according to the Sobel value A of each pixel in the target picture.
  • the second grayscale calculation module includes a third acquisition unit, a grayscale calculation unit, and a grayscale mean calculation unit;
  • the third obtaining unit is configured to obtain a first set of pixels with a Sobel value greater than 127 according to the Sobel value A of each pixel in the target picture calculated in the third calculating unit;
  • the gray scale calculation unit is used to obtain the gray scale value of each pixel in the first set in the three primary color space;
  • the gray-scale mean calculation unit is used to calculate the gray-scale mean G2 of the first set according to the gray-scale value of each pixel in the three primary color space.
  • This application also proposes a picture recognition method, which includes:
  • a blue sky picture is identified from the target picture according to the gray scale mean G1 of all pixels in the target image and the gray scale mean G2 of the pixels in the target picture whose Sobel mean is greater than a threshold.
  • the steps of scanning multiple sample pictures to obtain the target pictures in the sample pictures include:
  • the pre-selected picture is a non-target picture; otherwise, the pre-selected picture is the target picture.
  • the steps of scanning multiple preselected pictures to obtain the coordinates of the blue sky area in the HSV color space in the preselected pictures include:
  • the range of the first area in the HSV color space is:
  • the step of obtaining the grayscale mean G2 of the pixel points in the target picture whose Sobel mean is greater than the threshold includes:
  • the gray scale mean G2 of the first set is calculated.
  • the blue sky pixel area of the blue sky picture is:
  • the second set of pixels in the blue sky picture has a Sobel value greater than 0.9*C m .
  • the present application provides a picture recognition method and device, including: scanning multiple preselected pictures to obtain a target picture in the preselected picture; scanning the target picture to obtain a Sobel value A for each pixel in the target picture And the grayscale mean G1 of all pixels; obtaining the grayscale mean G2 of the pixels in the target picture whose Sobel mean is greater than the threshold; identifying the blue sky picture from the target picture based on the grayscale mean G1 and the grayscale mean G2 .
  • This application increases the accuracy of detecting blue sky pictures by secondary screening of pre-selected pictures, and improves the screening efficiency of the blue sky pixel area.
  • Figure 1 is a diagram of the steps of the picture recognition method of this application.
  • FIG. 2 is a first structural diagram of the picture recognition device of the present application
  • FIG. 3 is a second structural diagram of the picture recognition device of the present application.
  • FIG. 1 is a step diagram of a picture recognition method of the present application.
  • the picture recognition method includes:
  • the step S10 includes:
  • S101 Scan multiple preselected pictures to obtain the coordinates of the blue sky area in the HSV color space in the preselected pictures;
  • S1011 Randomly select a certain number of pre-selected pictures, and use the first device to obtain blue sky areas in all the pre-selected pictures.
  • S1013 Obtain the coordinates of the blue sky area in the HSV color space according to the pixel coordinates of the blue sky area in the three primary color spaces.
  • the pixel coordinates of a pixel M in a blue sky area in a preselected picture in the three primary color space are (0, 0, 255).
  • the color of the pixel M in the color space of the three primary colors is blue.
  • the coordinate value of the pixel point M converted to the HSV color space by the formula is (240°, 100%, 100%).
  • the pixel S102 the coordinate in the blue region of the HSV color space, obtaining the pixel region in the first region Sobel mean blue B m, the first region and the blue region of the non-average Sobel C m ;
  • the first area in the selected blue sky area is a pre-selected blue sky pixel area, that is, all pixels located in the first area of the blue sky area are blue sky pixels.
  • the range of the first region in the HSV color space is:
  • the pre-selected picture is a non-target picture; otherwise, the pre-selected picture is the target picture.
  • This first screening step of the present application the mean C m Sobel
  • the Sobel mean pixel B m the first region of the non-blue pixels with the first region of the blue sky region is obtained
  • the ratio of pixel points in the first area of the blue sky area to all points in the blue sky area a and the target picture is selected from the pre-selected pictures.
  • the pre-selected picture when a is greater than 0.9 or B m is greater than 0.6*C m , the pre-selected picture is a non-target picture; otherwise, the pre-selected picture is the target picture.
  • the identification method of the present application corresponds to one of the pre-selected pictures.
  • S20 Scan the target picture to obtain the Sobel value A of each pixel in the target picture and the grayscale mean G1 of all pixels;
  • S201 Scan the target picture to obtain grayscale values of all pixels in the target picture in the three primary color space
  • This step is the second screening of the present application, based on the grayscale mean G1 of all the pixels in the target image and the grayscale mean G2 of the pixels in the target picture whose Sobel mean is greater than the threshold. filter.
  • the target picture when G1 is less than 80 and the ratio of (G2-G1) to G1 is greater than 0.1, the target picture is a non-blue sky picture; otherwise, the target picture is a blue sky picture.
  • the blue sky pixel area of the blue sky picture may be:
  • the second set of pixels in the blue sky picture has a Sobel value greater than 0.9*C m .
  • This application provides a picture recognition method, which includes: scanning multiple preselected pictures to obtain the target picture in the preselected picture; scanning the target picture to obtain the Sobel value A and all of the pixels in the target picture The grayscale mean G1 of the pixels; obtaining the grayscale mean G2 of the pixels in the target picture whose Sobel mean is greater than the threshold; identifying the blue sky picture from the target picture according to the grayscale mean G1 and the grayscale mean G2.
  • This application increases the accuracy of detecting blue sky pictures by secondary screening of pre-selected pictures, and improves the screening efficiency of the blue sky pixel area.
  • the present application also proposes a controller, which is used to execute several instructions stored in a memory to implement the above-mentioned picture recognition method.
  • the present application also proposes a picture recognition device 100, wherein the picture recognition device includes the above controller and a memory.
  • FIG. 2 is a first structural diagram of a picture recognition device of the present application.
  • the picture recognition device 100 further includes a pre-selection module 10, a first gray-scale calculation module 20, a second gray-scale calculation module 30, and a filtering module 40.
  • the controller uses the pre-selection module 10, the first gray-scale calculation module 20, the second gray-scale calculation module 30, and the filtering module 40 to perform the above-mentioned picture recognition method.
  • the pre-selection module 10 is used to scan multiple pre-selected pictures to obtain target pictures in the pre-selected pictures.
  • the first grayscale calculation module 20 is used to scan the target picture to obtain the Sobel value A of each pixel in the target picture and the grayscale average G1 of all pixels.
  • the second grayscale calculation module 30 is used to obtain the grayscale average G2 of the pixels in the target picture whose Sobel average is greater than a threshold.
  • the filtering module 40 is used to identify a blue sky picture from the target picture according to the gray scale mean G1 of all pixels in the target image and the gray scale mean G2 of the pixels in the target picture whose Sobel mean is greater than a threshold ;
  • the target picture when G1 is less than 80 and the ratio of (G2-G1) to G1 is greater than 0.1, the target picture is a non-blue sky picture; otherwise, the target picture is a blue sky picture.
  • the target image is a blue sky picture
  • the set of pixels with a Sobel value greater than 0.9*C m in the blue sky picture is the blue sky pixel area.
  • FIG. 3 is a second structural diagram of the image recognition device of the present application.
  • the preselection module 10 includes a first acquisition unit 101, a first calculation unit 102, a second calculation unit 103, and a preselection unit 104.
  • the first obtaining unit 101 is used to scan multiple preselected pictures to obtain the coordinates of the blue sky area in the HSV color space in the preselected pictures;
  • the first calculation unit 102 is configured to obtain the Sobel mean B m of the pixels in the first area of the blue sky area and the non-first area of the blue sky area according to the coordinates of the blue sky area in the HSV color space Sobel mean C m of pixels
  • the second calculating unit 103 is used to calculate the proportion a of the pixels in the first area of the blue sky area to all points in the blue sky area;
  • the pre-selection unit 104 selects the pre-selected picture.
  • the pre-selected picture when a is greater than 0.9 or B m is greater than 0.6*C m , the pre-selected picture is a non-target picture; otherwise, the pre-selected picture is the target picture.
  • the first grayscale calculation module 20 includes a second acquisition unit 201, a third calculation unit 202, and a fourth calculation unit 203.
  • the second obtaining unit 201 is configured to scan the target picture to obtain gray scale values of all pixels in the target picture in the three primary color space;
  • the third calculation unit 202 is configured to calculate the Sobel value A of each pixel in the target picture according to the Sobel operation formula
  • the fourth calculation unit 203 is used to calculate the grayscale mean G1 of all pixels in the target picture according to the Sobel value A of each pixel in the target picture.
  • the second grayscale calculation module 30 includes a third acquisition unit 301, a grayscale calculation unit 302, and a grayscale mean calculation unit 303.
  • the third obtaining unit 301 is configured to obtain the first Sobel value of pixels in the target picture greater than 127 according to the Sobel value A of each pixel in the target picture calculated by the third calculating unit 202 A collection
  • the grayscale calculation unit 302 is used to obtain the grayscale value of each pixel in the first set in the three primary color space;
  • the grayscale mean calculation unit 303 is used to calculate the grayscale mean G2 of the first set according to the grayscale value of each pixel in the three primary color space.
  • the present application also proposes a storage medium that stores a number of instructions that are used by the controller to implement the above picture recognition method.
  • the present application provides a picture recognition method and device, including: scanning multiple preselected pictures to obtain a target picture in the preselected picture; scanning the target picture to obtain a Sobel value A for each pixel in the target picture And the grayscale mean G1 of all pixels; obtaining the grayscale mean G2 of the pixels in the target picture whose Sobel mean is greater than the threshold; identifying the blue sky picture from the target picture based on the grayscale mean G1 and the grayscale mean G2 .
  • This application increases the accuracy of detecting blue sky pictures by secondary screening of pre-selected pictures, and improves the screening efficiency of the blue sky pixel area.

Abstract

本申请提供了一种图片识别方法及装置,包括:扫描多张预选图片,获取所述预选图片中的目标图片;扫描所述目标图片,获取所述目标图片中各像素点的索贝尔值A和所有像素点的灰阶均值G1;获取所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2;根据灰阶均值G1和灰阶均值G2,从所述目标图片中识别蓝天图片。

Description

图片识别方法及装置 技术领域
本申请涉及图片识别领域,特别涉及一种图片识别方法及装置。
背景技术
现有蓝天图片的识别方法为基于统计学计算影像色温,而此种鉴别方式对于目标图片中存在大面积蓝天图像不适用。基于统计学计算的影像色温一般在10000K+,而真实场景所对应的影像色温值常为5500K,导致现有蓝天图片的识别方法存在较大的误差,无法准确对预选图片中的蓝天图片进行准确的筛选。
技术问题
本申请提供一种图片识别方法及装置,以提高侦测蓝天图片的准确率。
技术解决方案
本申请提供了一种图片识别方法,其包括:
扫描多张预选图片,获取所述预选图片中的目标图片;
扫描所述目标图片,获取所述目标图片中各像素点的索贝尔值A和所有像素点的灰阶均值G1;
获取所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2;
根据所述目标图像中所有像素点的灰阶均值G1和所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2,从所述目标图片中识别蓝天图片;
其中,当G1小于80且(G2-G1)与G1的比值大于0.1时,所述目标图片为非蓝天图片;否则,所述目标图片为蓝天图片。
在本申请的图片识别方法中,扫描多张样品图片,获取所述样品图片中的目标图片的步骤包括:
扫描多张预选图片,获取所述预选图片中蓝天区域在HSV颜色空间的坐标;
根据所述蓝天区域在HSV颜色空间的坐标,获取所述蓝天区域第一区内的像素点的索贝尔均值B m、及非所述蓝天区域第一区内的像素点的索贝尔均值C m
计算所述蓝天区域第一区内的像素点占所述蓝天区域中所有点的比例a;
若a大于0.9或B m大于0.6*C m,则所述预选图片为非目标图片;否则,所述预选图片为所述目标图片。
在本申请的图片识别方法中,扫描多张预选图片,获取所述预选图片中蓝天区域在HSV颜色空间的坐标的步骤包括:
扫描多张预选图片,获取预选图片中蓝天区域在RGB颜色空间的像素坐标;
根据所述蓝天区域在RGB颜色空间的像素坐标,获取所述蓝天区域在HSV颜色空间的坐标。
在本申请的图片识别方法中,所述第一区在HSV颜色空间的范围为:
0.51≤H≤0.63,0.45≤V≤1,0.2≤V≤1,且S+V>1。
在本申请的图片识别方法中,获取所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2的步骤包括:
获取所述目标图片中像素点的索贝尔值大于127的第一集合;
获取所述第一集合中每一像素点的灰阶值;
根据每一像素点的灰阶值,计算所述第一集合的灰阶均值G2。
在本申请的图片识别方法中,所述蓝天图片的蓝天像素区为:
所述蓝天图片中像素点的索贝尔值大于0.9*C m的第二集合。
本申请还提出了一种图片识别装置,其中,所述图片识别装置包括预选模块、第一灰阶计算模块、第二灰阶计算模块及筛选模块;
所述预选模块用于扫描多张预选图片,获取所述预选图片中的目标图片;
所述第一灰阶计算模块用于扫描所述目标图片,获取所述目标图片中各像素点的索贝尔值A和所有像素点的灰阶均值G1;
所述第二灰阶计算模块用于获取所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2;
所述筛选模块用于根据所述目标图像中所有像素点的灰阶均值G1和所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2,从所述目标图片中筛选蓝天图片及蓝天像素区。
在本申请的图片识别装置中,当G1小于80且(G2-G1)与G1的比值大于0.1时,所述目标图片为非蓝天图片;否则,所述目标图片为蓝天图片;
其中,当所述目标图像为所述蓝天图片时,所述蓝天图片中像素点的索贝尔值大于0.9*C m的集合为所述蓝天像素区。
在本申请的图片识别装置中,所述预选模块包括第一获取单元、第一计算单元、第二计算单元及预选单元;
所述第一获取单元用于扫描多张预选图片,获取所述预选图片中蓝天区域在HSV颜色空间的坐标;
所述第一计算单元用于根据所述蓝天区域在HSV颜色空间的坐标,获取所述蓝天区域第一区内的像素点的索贝尔均值B m、及非所述蓝天区域第一区内的像素点的索贝尔均值C m
所述第二计算单元用于计算所述蓝天区域第一区内的像素点占所述蓝天区域中所有点的比例a;
所述预选单元对所述预选图片进行预选;
当a大于0.9或B m大于0.6*C m,则所述预选图片为非目标图片;否则,所述预选图片为所述目标图片。
在本申请的图片识别装置中,所述第一区在HSV颜色空间的范围为:
0.51≤H≤0.63,0.45≤V≤1,0.2≤V≤1,且S+V>1。
在本申请的图片识别装置中,所述第一灰阶计算模块包括第二获取单元、第三计算单元及第四计算单元;
所述第二获取单元用于扫描所述目标图片,获取所述目标图片中所有像素点在三原色颜色空间的灰阶值;
所述第三计算单元用于根据索贝尔运算公式计算所述目标图片中各像素点的索贝尔值A;
所述第四计算单元用于根据所述目标图片中各像素点的索贝尔值A,计算所述目标图片中所有像素点的灰阶均值G1。
在本申请的图片识别装置中,所述第二灰阶计算模块包括第三获取单元、灰阶计算单元及灰阶均值计算单元;
所述第三获取单元用于根据第三计算单元中计算的所述目标图片中各像素点的索贝尔值A,获取所述目标图片中像素点的索贝尔值大于127的第一集合;
所述灰阶计算单元用于获取所述第一集合中每一像素点在三原色颜色空间中的灰阶值;
所述灰阶均值计算单元用于根据每一像素点在三原色颜色空间中的灰阶值,计算所述第一集合的灰阶均值G2。
本申请还提出了一种图片识别方法,其包括:
扫描多张预选图片,获取所述预选图片中的目标图片;
扫描所述目标图片,获取所述目标图片中各像素点的索贝尔值A和所有像素点的灰阶均值G1;
获取所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2;
根据所述目标图像中所有像素点的灰阶均值G1和所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2,从所述目标图片中识别蓝天图片。
在本申请的图片识别方法中,扫描多张样品图片,获取所述样品图片中的目标图片的步骤包括:
扫描多张预选图片,获取所述预选图片中蓝天区域在HSV颜色空间的坐标;
根据所述蓝天区域在HSV颜色空间的坐标,获取所述蓝天区域第一区内的像素点的索贝尔均值B m、及非所述蓝天区域第一区内的像素点的索贝尔均值C m
计算所述蓝天区域第一区内的像素点占所述蓝天区域中所有点的比例a;
若a大于0.9或B m大于0.6*C m,则所述预选图片为非目标图片;否则,所述预选图片为所述目标图片。
在本申请的图片识别方法中,扫描多张预选图片,获取所述预选图片中蓝天区域在HSV颜色空间的坐标的步骤包括:
扫描多张预选图片,获取预选图片中蓝天区域在RGB颜色空间的像素坐标;
根据所述蓝天区域在RGB颜色空间的像素坐标,获取所述蓝天区域在HSV颜色空间的坐标。
在本申请的图片识别方法中,所述第一区在HSV颜色空间的范围为:
0.51≤H≤0.63,0.45≤V≤1,0.2≤V≤1,且S+V>1。
在本申请的图片识别方法中,获取所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2的步骤包括:
获取所述目标图片中像素点的索贝尔值大于127的第一集合;
获取所述第一集合中每一像素点的灰阶值;
根据每一像素点的灰阶值,计算第一集合的灰阶均值G2。
在本申请的图片识别方法中,所述蓝天图片的蓝天像素区为:
所述蓝天图片中像素点的索贝尔值大于0.9*C m的第二集合。
有益效果
本申请提供了一种图片识别方法及装置,包括:扫描多张预选图片,获取所述预选图片中的目标图片;扫描所述目标图片,获取所述目标图片中各像素点的索贝尔值A和所有像素点的灰阶均值G1;获取所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2;根据灰阶均值G1和灰阶均值G2,从所述目标图片中识别蓝天图片。本申请通过对预选图片进行二次筛选,增加了侦测蓝天图片的准确率,提高了蓝天像素区的筛选效率。
附图说明
为了更清楚地说明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单介绍,显而易见地,下面描述中的附图仅仅是发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请图片识别方法的步骤图;
图2为本申请图片识别装置的第一种结构图;
图3为本申请图片识别装置的第二种结构图。
本发明的实施方式
以下各实施例的说明是参考附加的图示,用以例示本发明可用以实施的特定实施例。本发明所提到的方向用语,例如[上]、[下]、[前]、[后]、[左]、[右]、[内]、[外]、[侧面]等,仅是参考附加图式的方向。因此,使用的方向用语是用以说明及理解本发明,而非用以限制本发明。在图中,结构相似的单元是用以相同标号表示。
请参阅图1,图1为本申请图片识别方法的步骤图。
所述图片识别方法包括:
S10、扫描多张预选图片,获取所述预选图片中的目标图片;
所述步骤S10包括:
S101、扫描多张预选图片,获取所述预选图片中蓝天区域在HSV颜色空间的坐标;
在本步骤中,包括:
S1011、随机抽选一定数量的预选图片,并使用第一装置获取所有预选图片中的蓝天区域。
S1012、使用第二装置获取所有预选图片中蓝天区域在三原色颜色空间的像素坐标。
S1013、根据所述蓝天区域在三原色颜色空间的像素坐标,获取所述蓝天区域在HSV颜色空间的坐标。
例如,某一张预选图片中蓝天区域的某一像素点M在三原色颜色空间的像素坐标为(0,0,255)。像素点M在三原色颜色空间所呈现的颜色为蓝色。
像素点M通过公式向HSV颜色空间转换后得到的坐标值为(240°,100%,100%)。
S102、根据所述蓝天区域在HSV颜色空间的坐标,获取所述蓝天区域第一区内的像素点的索贝尔均值B m、及非所述蓝天区域第一区内的像素点的索贝尔均值C m
在本步骤中,包括:
S1021、选定蓝天区域中的第一区为预选蓝天像素区,即位于所述蓝天区域第一区中的所有像素点都为蓝天像素。
在一种实施例中,所述第一区在HSV颜色空间的范围为:
0.51≤H≤0.63,0.45≤V≤1,0.2≤V≤1,且S+V>1。
S1022、根据索贝尔运算公式计算所述蓝天区域第一区内的像素点的索贝尔均值B m、以及非所述蓝天区域第一区内的像素点的索贝尔均值C m
S103、计算所述蓝天区域第一区内的像素点占所述蓝天区域中所有点的比例a;
在本步骤中,包括:
S1031、统计所述蓝天区域第一区内的像素点的数量;
S1032、统计所述蓝天区域内的所有像素点的数量;
S1032、计算所述蓝天区域第一区内的像素点占所述蓝天区域中所有点的比例a。
S104、若a大于0.9或B m大于0.6*C m,则所述预选图片为非目标图片;否则,所述预选图片为所述目标图片。
本步骤为本申请的第一次筛选,根据获得的所述蓝天区域第一区内的像素点的索贝尔均值B m、非所述蓝天区域第一区内的像素点的索贝尔均值C m、及所述蓝天区域第一区内的像素点占所述蓝天区域中所有点的比例a,从所述预选图片中筛选出所述目标图片。
在一种实施例中,当a大于0.9或B m大于0.6*C m,则所述预选图片为非目标图片;否则,所述预选图片为所述目标图片。
在步骤S102~S104中,本申请的识别方法所对应的是某一所述预选图片。
S20、扫描所述目标图片,获取所述目标图片中各像素点的索贝尔值A和所有像素点的灰阶均值G1;
在本步骤中,包括:
S201、扫描所述目标图片,获取所述目标图片中所有像素点在三原色颜色空间的灰阶值;
S202、根据索贝尔运算公式计算所述目标图片中各像素点的索贝尔值A;
S203、根据所述目标图片中各像素点的索贝尔值A,计算所述目标图片中所有像素点的灰阶均值G1。
S30、获取所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2;
在本步骤中,包括:
S301、根据步骤S202中计算的所述目标图片中各像素点的索贝尔值A,获取所述目标图片中像素点的索贝尔值大于127的第一集合;
S302、获取所述第一集合中每一像素点在三原色颜色空间中的灰阶值;
S303、根据每一像素点在三原色颜色空间中的灰阶值,计算所述第一集合的灰阶均值G2。
S40、根据所述目标图像中所有像素点的灰阶均值G1和所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2,从所述目标图片中识别蓝天图片。
本步骤为本申请的第二次筛选,根据所述目标图像中所有像素点的灰阶均值G1和所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2对比所述目标图片进行筛选。
在一种实施例中,当G1小于80且(G2-G1)与G1的比值大于0.1时,所述目标图片为非蓝天图片;否则,所述目标图片为蓝天图片。
在一种实施例中,当所述目标图片为蓝天时,所述蓝天图片的蓝天像素区可以为:
所述蓝天图片中像素点的索贝尔值大于0.9*C m的第二集合。
本申请提供了一种图片识别方法,包括:扫描多张预选图片,获取所述预选图片中的目标图片;扫描所述目标图片,获取所述目标图片中各像素点的索贝尔值A和所有像素点的灰阶均值G1;获取所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2;根据灰阶均值G1和灰阶均值G2,从所述目标图片中识别蓝天图片。本申请通过对预选图片进行二次筛选,增加了侦测蓝天图片的准确率,提高了蓝天像素区的筛选效率。
本申请还提出了一种控制器,所述控制器用于执行存储于存储器的若干指令,以实现上述的图片识别方法。
本申请还提出了一种图片识别装置100,其中,所述图片识别装置包括上述控制器和存储器。
请参阅图2,图2为本申请图片识别装置的第一种结构图。
所述图片识别装置100还包括预选模块10、第一灰阶计算模块20、第二灰阶计算模块30及筛选模块40。所述控制器通过所述预选模块10、所述第一灰阶计算模块20、所述第二灰阶计算模块30及所述筛选模块40用于执行上述图片识别方法。
所述预选模块10用于扫描多张预选图片,获取所述预选图片中的目标图片。
所述第一灰阶计算模块20用于扫描所述目标图片,获取所述目标图片中各像素点的索贝尔值A和所有像素点的灰阶均值G1。
所述第二灰阶计算模块30用于获取所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2。
所述筛选模块40用于根据所述目标图像中所有像素点的灰阶均值G1和所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2,从所述目标图片中识别蓝天图片;
在一种实施例中,当G1小于80且(G2-G1)与G1的比值大于0.1时,所述目标图片为非蓝天图片;否则,所述目标图片为蓝天图片。
其中,当所述目标图像为蓝天图片时,所述蓝天图片中像素点的索贝尔值大于0.9*C m的集合为所述蓝天像素区。
请参阅图3,图3为本申请图片识别装置的第二种结构图。
在一种实施例中,所述预选模块10包括第一获取单元101、第一计算单元102、第二计算单元103及预选单元104。
所述第一获取单元101用于扫描多张预选图片,获取所述预选图片中蓝天区域在HSV颜色空间的坐标;
所述第一计算单元102用于根据所述蓝天区域在HSV颜色空间的坐标,获取所述蓝天区域第一区内的像素点的索贝尔均值B m、及非所述蓝天区域第一区内的像素点的索贝尔均值C m
所述第二计算单元103用于计算所述蓝天区域第一区内的像素点占所述蓝天区域中所有点的比例a;
所述预选单元104对所述预选图片进行选择。
在一种实施例中,当a大于0.9或B m大于0.6*C m,则所述预选图片为非目标图片;否则,所述预选图片为所述目标图片。
在一种实施例中,所述第一灰阶计算模块20包括第二获取单元201、第三计算单元202及第四计算单元203。
所述第二获取单元201用于扫描所述目标图片,获取所述目标图片中所有像素点在三原色颜色空间的灰阶值;
所述第三计算单元202用于根据索贝尔运算公式计算所述目标图片中各像素点的索贝尔值A;
所述第四计算单元203用于根据所述目标图片中各像素点的索贝尔值A,计算所述目标图片中所有像素点的灰阶均值G1。
在一种实施例中,所述第二灰阶计算模块30包括第三获取单元301、灰阶计算单元302及灰阶均值计算单元303。
所述第三获取单元301用于根据所述第三计算单元202中计算的所述目标图片中各像素点的索贝尔值A,获取所述目标图片中像素点的索贝尔值大于127的第一集合;
所述灰阶计算单元302用于获取所述第一集合中每一像素点在三原色颜色空间中的灰阶值;
所述灰阶均值计算单元303用于根据每一像素点在三原色颜色空间中的灰阶值,计算所述第一集合的灰阶均值G2。
本申请还提出了一种存储介质,所述存储介质中存储若干指令,所述指令用于供控制器执行以实现上述图片识别方法。
本申请提供了一种图片识别方法及装置,包括:扫描多张预选图片,获取所述预选图片中的目标图片;扫描所述目标图片,获取所述目标图片中各像素点的索贝尔值A和所有像素点的灰阶均值G1;获取所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2;根据灰阶均值G1和灰阶均值G2,从所述目标图片中识别蓝天图片。本申请通过对预选图片进行二次筛选,增加了侦测蓝天图片的准确率,提高了蓝天像素区的筛选效率。
综上所述,虽然本发明已以优选实施例揭露如上,但上述优选实施例并非用以限制本发明,本领域的普通技术人员,在不脱离本发明的精神和范围内,均可作各种更动与润饰,因此本发明的保护范围以权利要求界定的范围为准。

Claims (18)

  1. 一种图片识别方法,其包括:
    扫描多张预选图片,获取所述预选图片中的目标图片;
    扫描所述目标图片,获取所述目标图片中各像素点的索贝尔值A和所有像素点的灰阶均值G1;
    获取所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2;
    根据所述目标图像中所有像素点的灰阶均值G1和所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2,从所述目标图片中识别蓝天图片;
    其中,当G1小于80且(G2-G1)与G1的比值大于0.1时,所述目标图片为非蓝天图片;否则,所述目标图片为蓝天图片。
  2. 根据权利要求1所述的图片识别方法,其中,扫描多张样品图片,获取所述样品图片中的目标图片的步骤包括:
    扫描多张预选图片,获取所述预选图片中蓝天区域在HSV颜色空间的坐标;
    根据所述蓝天区域在HSV颜色空间的坐标,获取所述蓝天区域第一区内的像素点的索贝尔均值B m、及非所述蓝天区域第一区内的像素点的索贝尔均值C m
    计算所述蓝天区域第一区内的像素点占所述蓝天区域中所有点的比例a;
    若a大于0.9或B m大于0.6*C m,则所述预选图片为非目标图片;否则,所述预选图片为所述目标图片。
  3. 根据权利要求2所述的图片识别方法,其中,扫描多张预选图片,获取所述预选图片中蓝天区域在HSV颜色空间的坐标的步骤包括:
    扫描多张预选图片,获取预选图片中蓝天区域在RGB颜色空间的像素坐标;
    根据所述蓝天区域在RGB颜色空间的像素坐标,获取所述蓝天区域在HSV颜色空间的坐标。
  4. 根据权利要求2所述的图片识别方法,其中,所述第一区在HSV颜色空间的范围为:
    0.51≤H≤0.63,0.45≤V≤1,0.2≤V≤1,且S+V>1。
  5. 根据权利要求1所述的图片识别方法,其中,获取所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2的步骤包括:
    获取所述目标图片中像素点的索贝尔值大于127的第一集合;
    获取所述第一集合中每一像素点的灰阶值;
    根据每一像素点的灰阶值,计算所述第一集合的灰阶均值G2。
  6. 根据权利要求1所述的图片识别方法,其中,所述蓝天图片的蓝天像素区为:
    所述蓝天图片中像素点的索贝尔值大于0.9*C m的第二集合。
  7. 一种图片识别装置,其中,所述图片识别装置包括预选模块、第一灰阶计算模块、第二灰阶计算模块及筛选模块;
    所述预选模块用于扫描多张预选图片,获取所述预选图片中的目标图片;
    所述第一灰阶计算模块用于扫描所述目标图片,获取所述目标图片中各像素点的索贝尔值A和所有像素点的灰阶均值G1;
    所述第二灰阶计算模块用于获取所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2;
    所述筛选模块用于根据所述目标图像中所有像素点的灰阶均值G1和所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2,从所述目标图片中筛选蓝天图片及蓝天像素区。
  8. 根据权利要求7所述的图片识别装置,其中,当G1小于80且(G2-G1)与G1的比值大于0.1时,所述目标图片为非蓝天图片;否则,所述目标图片为蓝天图片;
    其中,当所述目标图像为所述蓝天图片时,所述蓝天图片中像素点的索贝尔值大于0.9*C m的集合为所述蓝天像素区。
  9. 根据权利要求7所述的图片识别装置,其中,所述预选模块包括第一获取单元、第一计算单元、第二计算单元及预选单元;
    所述第一获取单元用于扫描多张预选图片,获取所述预选图片中蓝天区域在HSV颜色空间的坐标;
    所述第一计算单元用于根据所述蓝天区域在HSV颜色空间的坐标,获取所述蓝天区域第一区内的像素点的索贝尔均值B m、及非所述蓝天区域第一区内的像素点的索贝尔均值C m
    所述第二计算单元用于计算所述蓝天区域第一区内的像素点占所述蓝天区域中所有点的比例a;
    所述预选单元对所述预选图片进行预选;
    当a大于0.9或B m大于0.6*C m,则所述预选图片为非目标图片;否则,所述预选图片为所述目标图片。
  10. 根据权利要求7所述的图片识别装置,其中,所述第一区在HSV颜色空间的范围为:
    0.51≤H≤0.63,0.45≤V≤1,0.2≤V≤1,且S+V>1。
  11. 根据权利要求7所述的图片识别装置,其中,所述第一灰阶计算模块包括第二获取单元、第三计算单元及第四计算单元;
    所述第二获取单元用于扫描所述目标图片,获取所述目标图片中所有像素点在三原色颜色空间的灰阶值;
    所述第三计算单元用于根据索贝尔运算公式计算所述目标图片中各像素点的索贝尔值A;
    所述第四计算单元用于根据所述目标图片中各像素点的索贝尔值A,计算所述目标图片中所有像素点的灰阶均值G1。
  12. 根据权利要求7所述的图片识别装置,其中,所述第二灰阶计算模块包括第三获取单元、灰阶计算单元及灰阶均值计算单元;
    所述第三获取单元用于根据第三计算单元中计算的所述目标图片中各像素点的索贝尔值A,获取所述目标图片中像素点的索贝尔值大于127的第一集合;
    所述灰阶计算单元用于获取所述第一集合中每一像素点在三原色颜色空间中的灰阶值;
    所述灰阶均值计算单元用于根据每一像素点在三原色颜色空间中的灰阶值,计算所述第一集合的灰阶均值G2。
  13. 一种图片识别方法,其包括:
    扫描多张预选图片,获取所述预选图片中的目标图片;
    扫描所述目标图片,获取所述目标图片中各像素点的索贝尔值A和所有像素点的灰阶均值G1;
    获取所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2;
    根据所述目标图像中所有像素点的灰阶均值G1和所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2,从所述目标图片中识别蓝天图片。
  14. 根据权利要求13所述的图片识别方法,其中,扫描多张样品图片,获取所述样品图片中的目标图片的步骤包括:
    扫描多张预选图片,获取所述预选图片中蓝天区域在HSV颜色空间的坐标;
    根据所述蓝天区域在HSV颜色空间的坐标,获取所述蓝天区域第一区内的像素点的索贝尔均值B m、及非所述蓝天区域第一区内的像素点的索贝尔均值C m
    计算所述蓝天区域第一区内的像素点占所述蓝天区域中所有点的比例a;
    若a大于0.9或B m大于0.6*C m,则所述预选图片为非目标图片;否则,所述预选图片为所述目标图片。
  15. 根据权利要求14所述的图片识别方法,其中,扫描多张预选图片,获取所述预选图片中蓝天区域在HSV颜色空间的坐标的步骤包括:
    扫描多张预选图片,获取预选图片中蓝天区域在RGB颜色空间的像素坐标;
    根据所述蓝天区域在RGB颜色空间的像素坐标,获取所述蓝天区域在HSV颜色空间的坐标。
  16. 根据权利要求14所述的图片识别方法,其中,所述第一区在HSV颜色空间的范围为:
    0.51≤H≤0.63,0.45≤V≤1,0.2≤V≤1,且S+V>1。
  17. 根据权利要求13所述的图片识别方法,其中,获取所述目标图片中索贝尔均值大于阈值的像素点的灰阶均值G2的步骤包括:
    获取所述目标图片中像素点的索贝尔值大于127的第一集合;
    获取所述第一集合中每一像素点的灰阶值;
    根据每一像素点的灰阶值,计算所述第一集合的灰阶均值G2。
  18. 根据权利要求13所述的图片识别方法,其中,所述蓝天图片的蓝天像素区为:
    所述蓝天图片中像素点的索贝尔值大于0.9*C m的第二集合。
PCT/CN2019/081800 2018-12-21 2019-04-08 图片识别方法及装置 WO2020124875A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811569380.5A CN109712126B (zh) 2018-12-21 2018-12-21 图片识别方法及装置
CN201811569380.5 2018-12-21

Publications (1)

Publication Number Publication Date
WO2020124875A1 true WO2020124875A1 (zh) 2020-06-25

Family

ID=66257050

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/081800 WO2020124875A1 (zh) 2018-12-21 2019-04-08 图片识别方法及装置

Country Status (2)

Country Link
CN (1) CN109712126B (zh)
WO (1) WO2020124875A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140168445A1 (en) * 2009-06-03 2014-06-19 Flir Systems, Inc. Systems and methods of suppressing sky regions in images
CN103927720A (zh) * 2014-04-09 2014-07-16 厦门美图之家科技有限公司 一种天空图像的识别及优化方法
CN104715489A (zh) * 2015-03-30 2015-06-17 宁波高新区宁源科技服务有限公司 一种进行云判决的方法

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4042563B2 (ja) * 2002-12-27 2008-02-06 セイコーエプソン株式会社 画像ノイズの低減
CN100536523C (zh) * 2006-02-09 2009-09-02 佳能株式会社 用于图像分类的方法、设备
US20080079749A1 (en) * 2006-09-28 2008-04-03 Faraday Technology Corp. White balance method for image processing
CN102279973B (zh) * 2010-06-11 2013-03-20 中国兵器工业第二○五研究所 基于高梯度关键点的海天线检测方法
CN101936900A (zh) * 2010-06-12 2011-01-05 北京中科卓视科技有限责任公司 一种基于视频的能见度检测系统
US9256927B2 (en) * 2012-07-06 2016-02-09 Yissum Research Development Companyof The Hebrew University of Jerusalem Ltd. Method and apparatus for enhancing a digital photographic image
CN102982513B (zh) * 2012-12-04 2015-08-19 电子科技大学 一种基于纹理的自适应图像去雾方法
CN104834912B (zh) * 2015-05-14 2017-12-22 北京邮电大学 一种基于图像信息检测的天气识别方法及装置
CN105701785B (zh) * 2016-02-17 2018-08-21 天津大学 基于天空区域划分加权tv透射率优化的图像雾霾去除方法
CN107404640B (zh) * 2016-05-20 2018-12-25 北京集创北方科技股份有限公司 数字影像装置的白平衡校正方法及数字影像装置
CN106611419B (zh) * 2016-12-19 2019-06-21 西安电子科技大学 图像路面区域的提取方法
CN106954022B (zh) * 2017-03-08 2019-10-25 Oppo广东移动通信有限公司 图像处理方法、装置及终端
CN107154032B (zh) * 2017-04-20 2019-01-29 腾讯科技(深圳)有限公司 一种图像数据处理方法和装置
CN107317967B (zh) * 2017-07-27 2020-03-27 Oppo广东移动通信有限公司 图像处理方法、装置、移动终端及计算机可读存储介质

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140168445A1 (en) * 2009-06-03 2014-06-19 Flir Systems, Inc. Systems and methods of suppressing sky regions in images
CN103927720A (zh) * 2014-04-09 2014-07-16 厦门美图之家科技有限公司 一种天空图像的识别及优化方法
CN104715489A (zh) * 2015-03-30 2015-06-17 宁波高新区宁源科技服务有限公司 一种进行云判决的方法

Also Published As

Publication number Publication date
CN109712126B (zh) 2020-11-06
CN109712126A (zh) 2019-05-03

Similar Documents

Publication Publication Date Title
US8599270B2 (en) Computing device, storage medium and method for identifying differences between two images
RU2647623C1 (ru) Система и способ преобразования цвета rgb в rgbw
US10817723B2 (en) Image recognition system and information-display method thereof
US20080285846A1 (en) Image processing method, image zone detection method, image processing program, image zone detection program, image processing apparatus and image zone detection apparatus
KR20080113950A (ko) 감마 보정 곡선의 자동 산출 장치 및 방법
TW201413652A (zh) 影像優化方法以及使用此方法的系統
CN113516939B (zh) 亮度校正方法、装置、显示设备、计算设备及存储介质
US11030971B2 (en) Display device and image processing method for color correction based on image type
CN108205671A (zh) 图像处理方法及装置
CN110349097B (zh) 图像显着性的色彩增强方法及图像处理装置
US7706024B2 (en) Image processing apparatus
US20150356903A1 (en) Image display method
US20200160492A1 (en) Image Adjustment Method and Device, Image Display Method and Device, Non-Transitory Storage Medium
CN111523551A (zh) 蓝色目标的二值化方法、装置和设备
CN111079637A (zh) 田间图像中分割油菜花的方法、装置、设备及存储介质
CN112419950B (zh) 显示装置的显示差异判定方法、系统及显示装置
WO2021022820A1 (zh) 白平衡异常的确定方法、装置、存储介质及电子设备
WO2020124875A1 (zh) 图片识别方法及装置
US10574958B2 (en) Display apparatus and recording medium
CN113139921B (zh) 图像处理方法、显示装置、电子设备及存储介质
CN110782854B (zh) 电子设备及其阅读模式的识别方法
CN111317426A (zh) 一种内窥镜参数自适应调整方法和装置
CN111710279B (zh) 图像渲染方法及装置、显示设备、存储介质及电子设备
CN104505053A (zh) 显示信号转换方法和装置
WO2022120799A1 (zh) 图像处理方法、装置、电子设备及存储介质

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19899665

Country of ref document: EP

Kind code of ref document: A1