WO2018058593A1 - Color identification method and device for target, and computer system - Google Patents

Color identification method and device for target, and computer system Download PDF

Info

Publication number
WO2018058593A1
WO2018058593A1 PCT/CN2016/101235 CN2016101235W WO2018058593A1 WO 2018058593 A1 WO2018058593 A1 WO 2018058593A1 CN 2016101235 W CN2016101235 W CN 2016101235W WO 2018058593 A1 WO2018058593 A1 WO 2018058593A1
Authority
WO
WIPO (PCT)
Prior art keywords
color
target
area
colors
maximum
Prior art date
Application number
PCT/CN2016/101235
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 富士通株式会社
Priority to CN201680087592.2A priority Critical patent/CN109416747B/en
Priority to PCT/CN2016/101235 priority patent/WO2018058593A1/en
Publication of WO2018058593A1 publication Critical patent/WO2018058593A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition

Definitions

  • the present invention relates to the field of image processing, and in particular, to a target color recognition method, apparatus, and computer system.
  • a target color recognition method comprising:
  • Figure 7 is a schematic diagram of a target color recognition device of Embodiment 2.
  • FIG. 9 is a schematic diagram of an implementation of the first computing unit 802 of the present embodiment.
  • the first computing unit 802 corresponds to FIG. 5 , and may include: a second computing unit 901 .
  • the second calculating unit 901 calculates an area of each of the first number of colors in the target area according to the color range table;
  • the third calculating unit 902 calculates the color of each of the first quantity of colors according to the respective areas of the first number of colors.
  • the area ratio; the second determining unit 903 uses the maximum color area ratio of the color area ratios as the maximum color area ratio of the first number of colors in the target area.
  • Embodiments of the present invention also provide a computer readable program, wherein the program causes the target color recognition device or computer system to perform the method described in Embodiment 1 when the program is executed in a target color recognition device or a computer system Target color recognition method.
  • One or more of the functional blocks described with respect to Figures 7-9 and/or one or more combinations of functional blocks may be implemented as a general purpose processor, digital signal processor (DSP) for performing the functions described herein.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • One or more of the functional blocks described with respect to Figures 7-9 and/or one or more combinations of functional blocks may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, multiple microprocessors One or more microprocessors in conjunction with DSP communication or any other such configuration.

Abstract

A color identification method and device for a target, and computer system. The method comprises: classifying, on the basis of a deep neural network, the color of a target in an image, and acquiring multiple color scores of the target (101); if the largest color score of the multiple color scores of the target is greater than a first threshold, then determining the color of the target as the color corresponding to the largest color score (102); and if the largest color score of the multiple color scores of the target is not greater than the first threshold, then performing color-based counting on the basis of a color range table, and determining the color of the target according to the color-based counting result (103). The present invention improves precision and accuracy of color identification of a target.

Description

目标颜色识别方法、装置以及计算机系统Target color recognition method, device and computer system 技术领域Technical field
本发明涉及图像处理领域,特别涉及一种目标颜色识别方法、装置以及计算机系统。The present invention relates to the field of image processing, and in particular, to a target color recognition method, apparatus, and computer system.
背景技术Background technique
目前,在监控图像中,针对目标的颜色分类或识别是很困难的,尤其是当目标被遮挡,或者目标具有不同颜色的许多组成部分,或者目标被光线干扰等情况下,正确地识别出该目标的颜色就显得更加困难。At present, it is very difficult to classify or identify the color of the target in the monitoring image, especially when the target is occluded, or the target has many components of different colors, or the target is interfered by light, etc., correctly The color of the target is even more difficult.
另一方面,颜色识别结果与图像中的对象类型密切相关,并且,图像中的主颜色往往不能给出符合人类视觉系统特性的合理的真相。以检测目标为监控图像中的卡车为例,该卡车的车身颜色为白色,车头颜色为绿色,在这种情况下,人类的视觉系统对该卡车的识别结果为绿色而并非该卡车的主颜色--白色。On the other hand, the color recognition result is closely related to the object type in the image, and the main color in the image often does not give a reasonable truth in accordance with the characteristics of the human visual system. For example, in the case where the detection target is a truck in a surveillance image, the color of the truck body is white, and the color of the front is green. In this case, the human visual system recognizes the truck as green instead of the main color of the truck. --white.
应该注意,上面对技术背景的介绍只是为了方便对本发明的技术方案进行清楚、完整的说明,并方便本领域技术人员的理解而阐述的。不能仅仅因为这些方案在本发明的背景技术部分进行了阐述而认为上述技术方案为本领域技术人员所公知。It should be noted that the above description of the technical background is only for the purpose of facilitating a clear and complete description of the technical solutions of the present invention, and is convenient for understanding by those skilled in the art. The above technical solutions are not considered to be well known to those skilled in the art simply because these aspects are set forth in the background section of the present invention.
发明内容Summary of the invention
发明人发现,由于用于目标颜色识别的样本的数量有限,而在目标颜色识别的过程中又存在诸多障碍,如背景技术所述,因此,当前的目标颜色识别方法的识别精度和准确性不高。The inventors have found that since the number of samples for target color recognition is limited, there are many obstacles in the process of target color recognition, as described in the background art, therefore, the recognition accuracy and accuracy of the current target color recognition method are not high.
本发明实施例提供一种目标颜色识别方法、装置以及计算机系统,其利用了深度神经网络(DNN,Deep Neural Network)输出的目标颜色分类分数,以提高目标颜色识别的精度和准确性。The embodiment of the invention provides a target color recognition method, device and computer system, which utilizes a target color classification score output by a deep neural network (DNN) to improve the accuracy and accuracy of target color recognition.
根据本实施例的第一方面,提供了一种目标颜色识别方法,其中,所述方法包括:According to a first aspect of the present invention, a target color recognition method is provided, wherein the method comprises:
基于深度神经网络对图像中的目标进行颜色分类,得到所述目标的多个颜色分数;Color-classifying objects in the image based on a deep neural network to obtain a plurality of color scores of the target;
如果所述目标的多个颜色分数中最大的颜色分数大于第一阈值,则确定所述目标 的颜色为所述最大的颜色分数对应的颜色;Determining if the largest color score of the plurality of color scores of the target is greater than the first threshold The color is the color corresponding to the maximum color score;
如果所述目标的多个颜色分数中最大的颜色分数不大于第一阈值,则基于颜色范围表对所述目标进行颜色统计,根据颜色统计结果确定所述目标的颜色。If the largest color score among the plurality of color scores of the target is not greater than the first threshold, the target is color-stated based on the color range table, and the color of the target is determined according to the color statistical result.
根据本实施例的第二方面,提供了一种目标颜色识别装置,其中,所述装置包括:According to a second aspect of the present invention, there is provided a target color recognition device, wherein the device comprises:
分类单元,其基于深度神经网络对图像中的目标进行颜色分类,得到所述目标的多个颜色分数;a classification unit that performs color classification on a target in an image based on a depth neural network to obtain a plurality of color scores of the target;
识别单元,其在所述目标的多个颜色分数中最大的颜色分数大于第一阈值时,确定所述目标的颜色为所述最大的颜色分数对应的颜色;在所述目标的多个颜色分数中最大的颜色分数不大于第一阈值时,基于颜色范围表对所述目标进行颜色统计,根据颜色统计结果确定所述目标的颜色。a recognition unit that determines that a color of the target is a color corresponding to the maximum color score when a maximum color score of the plurality of color scores of the target is greater than a first threshold; a plurality of color scores at the target When the largest color score in the middle is not greater than the first threshold, the target is color-stated based on the color range table, and the color of the target is determined according to the color statistical result.
根据本实施例的第三方面,提供了一种计算机系统,其中,所述计算机系统包括前述第二方面所述的装置。According to a third aspect of the present invention, there is provided a computer system, wherein the computer system comprises the apparatus of the aforementioned second aspect.
本发明实施例的有益效果在于:通过本发明实施例,能够提高目标颜色识别的精度和准确性。The beneficial effects of the embodiments of the present invention are that the accuracy and accuracy of the target color recognition can be improved by the embodiment of the present invention.
参照后文的说明和附图,详细公开了本发明的特定实施方式,指明了本发明的原理可以被采用的方式。应该理解,本发明的实施方式在范围上并不因而受到限制。在所附权利要求的条款的范围内,本发明的实施方式包括许多改变、修改和等同。Specific embodiments of the present invention are disclosed in detail with reference to the following description and the drawings, in which <RTIgt; It should be understood that the embodiments of the invention are not limited in scope. The embodiments of the present invention include many variations, modifications, and equivalents within the scope of the appended claims.
针对一种实施方式描述和/或示出的特征可以以相同或类似的方式在一个或更多个其它实施方式中使用,与其它实施方式中的特征相组合,或替代其它实施方式中的特征。Features described and/or illustrated with respect to one embodiment may be used in one or more other embodiments in the same or similar manner, in combination with, or in place of, features in other embodiments. .
应该强调,术语“包括/包含”在本文使用时指特征、整件、步骤或组件的存在,但并不排除一个或更多个其它特征、整件、步骤或组件的存在或附加。It should be emphasized that the term "comprising" or "comprises" or "comprising" or "comprising" or "comprising" or "comprising" or "comprises"
附图说明DRAWINGS
在本发明实施例的一个附图或一种实施方式中描述的元素和特征可以与一个或更多个其它附图或实施方式中示出的元素和特征相结合。此外,在附图中,类似的标号表示几个附图中对应的部件,并可用于指示多于一种实施方式中使用的对应部件。The elements and features described in one of the figures or one embodiment of the embodiments of the invention may be combined with the elements and features illustrated in one or more other figures or embodiments. In the accompanying drawings, like reference numerals refer to the
所包括的附图用来提供对本发明实施例的进一步的理解,其构成了说明书的一部分,用于例示本发明的实施方式,并与文字描述一起来阐释本发明的原理。显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲, 在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。在附图中:The accompanying drawings are included to provide a further understanding of the embodiments of the invention Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art Other drawings may also be obtained from these drawings without paying for inventive labor. In the drawing:
图1是实施例1的目标颜色识别方法的示意图;1 is a schematic diagram of a target color recognition method of Embodiment 1;
图2是一个图像的三个样本的示意图;Figure 2 is a schematic illustration of three samples of an image;
图3是对目标进行颜色统计以确定目标的颜色的示意图;Figure 3 is a schematic diagram of color statistics of a target to determine the color of the target;
图4是颜色范围表的一个示例的一部分的示意图;4 is a schematic diagram of a portion of an example of a color range table;
图5是确定最大颜色面积比的示意图;Figure 5 is a schematic view of determining the maximum color area ratio;
图6是实施例1的目标颜色识别方法的整体流程图;6 is an overall flowchart of a target color recognition method of Embodiment 1;
图7是实施例2的目标颜色识别装置的示意图;Figure 7 is a schematic diagram of a target color recognition device of Embodiment 2;
图8是实施例2的目标颜色识别装置的识别单元的示意图;8 is a schematic diagram of an identification unit of a target color recognition device of Embodiment 2;
图9是实施例2的目标颜色识别装置的识别单元的第一计算单元的示意图;9 is a schematic diagram of a first calculation unit of an identification unit of a target color recognition device of Embodiment 2;
图10是实施例3的计算机系统的示意图。Figure 10 is a schematic illustration of a computer system of the third embodiment.
具体实施方式detailed description
参照附图,通过下面的说明书,本发明的前述以及其它特征将变得明显。在说明书和附图中,具体公开了本发明的特定实施方式,其表明了其中可以采用本发明的原则的部分实施方式,应了解的是,本发明不限于所描述的实施方式,相反,本发明包括落入所附权利要求的范围内的全部修改、变型以及等同物。下面结合附图对本发明的各种实施方式进行说明。这些实施方式只是示例性的,不是对本发明的限制。The foregoing and other features of the present invention will be apparent from the The specific embodiments of the present invention are disclosed in the specification and the drawings, which are illustrated in the embodiment of the invention The invention includes all modifications, variations and equivalents falling within the scope of the appended claims. Various embodiments of the present invention will be described below with reference to the accompanying drawings. These embodiments are merely exemplary and are not limiting of the invention.
下面结合附图对本发明实施例进行说明。The embodiments of the present invention will be described below with reference to the accompanying drawings.
实施例1Example 1
本实施例提供了一种目标颜色识别方法,图1是该方法的示意图,如图1所示,该方法包括:This embodiment provides a target color recognition method, and FIG. 1 is a schematic diagram of the method. As shown in FIG. 1, the method includes:
步骤101:基于深度神经网络对图像中的目标进行颜色分类,得到所述目标的多个颜色分数;Step 101: Perform color classification on the target in the image based on the depth neural network to obtain multiple color scores of the target.
步骤102:如果所述目标的多个颜色分数中最大的颜色分数大于第一阈值,则确定所述目标的颜色为所述最大的颜色分数对应的颜色;Step 102: If the largest color score of the plurality of color scores of the target is greater than the first threshold, determining that the color of the target is a color corresponding to the maximum color score;
步骤103:如果所述目标的多个颜色分数中最大的颜色分数不大于第一阈值,则基于颜色范围表对所述目标进行颜色统计,根据颜色统计结果确定所述目标的颜色。Step 103: If the largest color score among the plurality of color scores of the target is not greater than the first threshold, perform color statistics on the target based on the color range table, and determine the color of the target according to the color statistical result.
在本实施例中,如前所述,由于目标的颜色识别结果与其类型密切相关。为了使 用与目标类型相关的附加形状、纹理信息等提取颜色信息,该方法可以使用深度神经网络作为特征提取器和分类器。对于深度神经网络的原理,可以参考现有技术,本实施例不再详细说明。In the present embodiment, as described above, the color recognition result of the target is closely related to its type. because Color information is extracted using additional shapes, texture information, etc. associated with the target type, which may use deep neural networks as feature extractors and classifiers. For the principle of the deep neural network, reference may be made to the prior art, which is not described in detail in this embodiment.
在本实施例中,在基于深度神经网络对图像中的目标进行颜色分类时,目标的颜色类别可以根据目标对象的通常颜色被定义为白色、黑色、黄色、红色、蓝色等。如果目标的颜色样本的数量足够,可以通过定义的具有某目标类型的颜色类别训练得到一个更加完善的分类模型,例如汽车(白色、黑色、黄色、红色、蓝色等)。在训练过程中,样本图像的S和V值(HSV颜色空间)将在小范围内被随机拉伸,同时,调整、模糊、翻转、噪声等方法可以被随机使用以丰富样本。图2示意了黑车的一个示例,其中,左边的一个图像为原始样本图像,右边的两个图像为随机数据增强的两个样本图像。In the present embodiment, when color-classifying an object in an image based on a depth neural network, the color category of the target may be defined as white, black, yellow, red, blue, or the like according to the normal color of the target object. If the number of color samples of the target is sufficient, a more complete classification model can be trained by defining a color category with a certain target type, such as a car (white, black, yellow, red, blue, etc.). During the training process, the S and V values (HSV color space) of the sample image will be randomly stretched in a small range. At the same time, methods such as adjustment, blur, flip, and noise can be randomly used to enrich the sample. Figure 2 illustrates an example of a black car in which one image on the left is the original sample image and the two images on the right are two sample images enhanced by random data.
在本实施例中,基于深度神经网络对图像中的目标进行颜色分类,可以得到该目标的多个颜色分数,如果该多个颜色分数中的最大颜色分数大于第一阈值(该分类器的阈值),则确定该目标的颜色为该最大颜色分数对应的颜色。然而,如果该多个颜色分数中的最大颜色分数不大于该第一阈值,按照目前的基于深度神经网络的分类方法,无法识别出该目标的颜色,或者,尽管通过其他辅助手段能对该目标的颜色进行进一步分类,但基于其样本的局限性,其分类结果也不能让人满意。In this embodiment, color classification of the target in the image based on the depth neural network may obtain multiple color scores of the target, if the maximum color score of the multiple color scores is greater than the first threshold (the threshold of the classifier) And determining that the color of the target is the color corresponding to the maximum color score. However, if the maximum color score of the plurality of color scores is not greater than the first threshold, according to the current depth neural network-based classification method, the color of the target cannot be recognized, or although the target can be The color is further classified, but based on the limitations of its sample, the classification results are not satisfactory.
例如,根据目标类型识别颜色类别能够输出一个更加合理的结果。然而,同时具有颜色和目标类型信息的图像样本非常昂贵,尤其是对于监控图像或者视频。尽管数据增强能够帮助丰富样本,然而其容量受限,一旦分类器尝试分类一个新的目标颜色,该分类器将会失效或产生完全错误的结果。For example, identifying a color category based on a target type can produce a more reasonable result. However, image samples with both color and target type information are very expensive, especially for monitoring images or video. Although data enhancement can help enrich the sample, its capacity is limited, and once the classifier attempts to classify a new target color, the classifier will fail or produce a completely wrong result.
在本实施例中,对于系统鲁棒性,使用了统计方法来辅助分析目标的颜色类别。如果该多个颜色分数中的最大颜色分数不大于该第一阈值,则基于颜色范围表对该目标进行颜色统计,并根据颜色统计结果确定该目标的颜色,解决了基于深度神经网络的分类方法无法准确地给出目标的颜色分类结果的问题。In this embodiment, for system robustness, statistical methods are used to aid in analyzing the color categories of the target. If the maximum color score of the plurality of color scores is not greater than the first threshold, color statistics are performed on the target based on the color range table, and the color of the target is determined according to the color statistical result, and the classification method based on the deep neural network is solved. The problem of the color classification result of the target cannot be accurately given.
在本实施例中,步骤103(基于颜色范围表对目标进行颜色统计,根据颜色统计结果确定所述目标的颜色)可以通过图3的方法实现,详见图3,该方法包括:In this embodiment, step 103 (color statisticing the target based on the color range table, and determining the color of the target according to the color statistical result) can be implemented by the method of FIG. 3, as shown in FIG. 3, the method includes:
步骤301:按照所述目标的多个颜色分数从高到低的顺序,选择第一数量的颜色;Step 301: Select a first quantity of colors according to a sequence of a plurality of color scores of the target from high to low;
步骤302:根据颜色范围表计算目标区域中该第一数量的颜色的最大颜色面积 比。Step 302: Calculate a maximum color area of the first quantity of colors in the target area according to the color range table. ratio.
由此,可以根据该最大颜色面积比确定该目标的颜色。如图3所示,该方法还可以包括:Thereby, the color of the target can be determined based on the maximum color area ratio. As shown in FIG. 3, the method may further include:
步骤303:如果该最大颜色面积比大于第二阈值,则确定该目标的颜色是具有该最大颜色面积比的颜色。Step 303: If the maximum color area ratio is greater than the second threshold, determine that the color of the target is the color having the maximum color area ratio.
在本实施例中,如图3所示,该方法还可以包括:In this embodiment, as shown in FIG. 3, the method may further include:
步骤304:获取目标区域,由此,在步骤302中,可以根据颜色范围表计算通过步骤304获取的目标区域中该第一数量的颜色的最大颜色面积比。Step 304: Acquire a target area, whereby, in step 302, a maximum color area ratio of the first number of colors in the target area acquired by step 304 may be calculated according to the color range table.
在本实施例中,如前所述,目标区域可以通过对目标进行检测获得,本实施例对检测方法不作限制,例如可以通过前述基于深度神经网络的分类方法对目标进行检测,获得该目标区域,也可以通过其他检测方法获得该目标区域。In this embodiment, as described above, the target area can be obtained by detecting the target. In this embodiment, the detection method is not limited. For example, the target may be detected by the foregoing classification method based on the depth neural network to obtain the target area. The target area can also be obtained by other detection methods.
在本实施例中,如图3所示,在获取了目标区域后,该方法还可以包括:In this embodiment, as shown in FIG. 3, after the target area is acquired, the method may further include:
步骤305:对上述目标区域进行调整,由此,在步骤302中,可以根据颜色范围表计算通过步骤305调整后的目标区域中该第一数量的颜色的最大颜色面积比。Step 305: Adjust the target area, and in step 302, calculate a maximum color area ratio of the first quantity of colors in the target area adjusted by step 305 according to the color range table.
在本实施例中,对该目标区域进行调整,例如进行收缩,可以去掉目标区域的边缘的非理想因素对识别结果的影响。然而,步骤305是可选的,在理想情况下,目标区域的边缘不存在非理想因素,此时可以省略步骤305。本实施例对调整的方法不作限制,通过该调整,可以得到新的目标区域,也即调整后的目标区域。In the present embodiment, the target area is adjusted, for example, contracted, and the influence of the non-ideal factors of the edge of the target area on the recognition result can be removed. However, step 305 is optional. In the ideal case, there is no non-ideal factor at the edge of the target area, and step 305 may be omitted at this time. This embodiment does not limit the method of adjustment. By this adjustment, a new target area, that is, an adjusted target area, can be obtained.
在本实施例中,颜色范围表是表征颜色范围的表格,该颜色范围的确定与实际工程中要求的颜色类别和颜色区分程度有关,可以根据标准和实际情况确定,本实施例对该颜色范围表不作限制。图4给出了颜色范围表的一个示例的一部分,表1为实验中所使用过的颜色阈值范围表(HSV区间)。In this embodiment, the color range table is a table for characterizing the color range, and the determination of the color range is related to the color classification and color discrimination required in the actual project, and can be determined according to the standard and the actual situation. The table is not limited. Figure 4 shows a portion of an example of a color range table, which is a color threshold range table (HSV interval) used in the experiment.
表1Table 1
Figure PCTCN2016101235-appb-000001
Figure PCTCN2016101235-appb-000001
在本实施例中,可以首先根据目标对象颜色从潘通色卡中选择颜色值;然后从这些潘通色卡值中得到初步的颜色范围;再使用颜色样本的颜色统计数据来提炼颜色范围来做成最终的颜色范围表。In this embodiment, the color value may be first selected from the Pantone color card according to the target object color; then the preliminary color range is obtained from the Pantone color card values; and the color range is further refined by using the color statistics of the color samples. Make the final color range table.
下面以黄色为例,说明黄色范围的确定流程:Let's take yellow as an example to illustrate the process of determining the yellow range:
首先,根据潘通色表,挑选出各种黄色的颜色值(HSV或RGB等),挑选过程根据所需要的目标颜色分类类别和细致程度。以图4所示的虚线框框出的颜色范围为例:First, according to the Pantone color table, various yellow color values (HSV or RGB, etc.) are selected, and the selection process classifies the category and the level of detail according to the desired target color. Take the color range enclosed by the dotted line shown in Figure 4 as an example:
R:Max-255Min-206;R: Max-255Min-206;
G:Max-237Min-157;G: Max-237Min-157;
B:Max-134Min-0。B: Max-134Min-0.
然后,遍历表中的黄色颜色,初步确定RGB颜色上下阈值,同理可确定出其它待分类颜色的上下阈值。Then, traversing the yellow color in the table, initially determining the upper and lower thresholds of the RGB color, and similarly determining the upper and lower thresholds of other colors to be classified.
其中,潘通色表的色彩定义是分散的,不是连续的区间段,通过这种方式遍历得到的阈值可能会出现过度包含的情况(实际上该阈值可能需要分段考虑)。Among them, the color definition of the Pantone color table is decentralized, not a continuous interval segment. The threshold obtained by traversing in this way may be excessively included (in fact, the threshold may need to be considered in stages).
另外,参考潘通色表主要是为了获得一个初始阈值,需要对其进行修正获得正确的颜色范围区间。In addition, the Pantone color table is mainly used to obtain an initial threshold, which needs to be corrected to obtain the correct color range interval.
例如,根据颜色上下阈值范围输出色块(以前述为例,色块数为134*80*49),过滤明显错误的色块数值。或者事先通过颜色空间的色彩过渡图,初步确定可能的问题区域,再做可视化输出,以减少工作量。For example, the color patch is output according to the upper and lower threshold ranges of the color (in the foregoing case, the number of patches is 134*80*49), and the color patch value that is obviously wrong is filtered. Or through the color transition map of the color space in advance, preliminary determination of possible problem areas, and then visual output to reduce the workload.
最后,对类别为黄色的样本截取黄色区块,统计相应的RGB颜色上下阈值,与前述结果比较,扩大前述结果中阈值的范围,但是依然需要检验最终阈值范围的正确性。Finally, the yellow block is intercepted for the yellow-category sample, and the corresponding RGB color upper and lower thresholds are counted. Compared with the foregoing results, the threshold range in the foregoing results is expanded, but the correctness of the final threshold range still needs to be verified.
通过以上方法,可以得到黄色范围,同理得到其他颜色范围,进而得到颜色范围表。Through the above method, the yellow range can be obtained, and other color ranges are obtained in the same way, thereby obtaining a color range table.
通过该颜色范围表,可以得到各个颜色的颜色范围,而根据各个颜色的颜色范围,可以计算得到各个颜色的颜色面积。Through the color range table, the color range of each color can be obtained, and according to the color range of each color, the color area of each color can be calculated.
在本实施例中,步骤302(根据颜色范围表计算目标区域中所述第一数量的颜色的最大颜色面积比)可以通过图5的方法实现,详见图5,该方法包括:In this embodiment, step 302 (calculating the maximum color area ratio of the first number of colors in the target area according to the color range table) may be implemented by the method of FIG. 5, as shown in FIG. 5, the method includes:
步骤501:根据颜色范围表计算目标区域中上述第一数量的颜色各自的面积; Step 501: Calculate, according to the color range table, respective areas of the first quantity of colors in the target area;
步骤502:根据上述第一数量的颜色各自的面积计算上述第一数量的颜色各自的颜色面积比;Step 502: Calculate respective color area ratios of the first quantity of colors according to respective areas of the first quantity of colors;
步骤503:将上述颜色面积比中最大的颜色面积比作为上述目标区域中上述第一数量的颜色的最大颜色面积比。Step 503: The ratio of the largest color area in the color area ratio is used as the maximum color area ratio of the first number of colors in the target area.
图6是根据本实施例的方法的整体流程图,下面以选择前三种颜色(步骤301)为例,结合图6对本实施例的方法进行说明。如图6所示,该方法包括:FIG. 6 is an overall flowchart of the method according to the present embodiment. The method of the present embodiment will be described below with reference to FIG. 6 by taking the first three colors (step 301) as an example. As shown in FIG. 6, the method includes:
步骤601:目标检测;Step 601: target detection;
步骤602:DNN目标颜色分类;Step 602: DNN target color classification;
步骤603:判断最大颜色分数(简称为最大分数)是否大于第一阈值;Step 603: Determine whether a maximum color score (referred to as a maximum score) is greater than a first threshold;
步骤604:颜色分割;Step 604: color segmentation;
步骤605:判断最大颜色面积(简称为最大面积)是否大于第二阈值。Step 605: Determine whether the maximum color area (referred to as the maximum area) is greater than a second threshold.
在步骤601中,对监控图像进行目标检测,可以采用基于深度神经网络的分类方法进行目标检测,也可以采用其他方法进行目标检测,通过目标检测,可以获得目标区域。In step 601, target detection is performed on the monitoring image, and the target detection may be performed by using a deep neural network-based classification method, or other methods may be used for target detection, and the target area may be obtained by target detection.
在步骤602中,使用基于深度神经网络的分类方法(简称为DNN分类器)对目标进行颜色分类,通过该分类方法,可以得到目标的多个颜色分数。该步骤可以通过前述步骤101来实现。In step 602, the target is color-classified using a deep neural network-based classification method (referred to as a DNN classifier), by which a plurality of color scores of the target can be obtained. This step can be implemented by the aforementioned step 101.
在步骤603中,判断是否存在满足颜色分类结果的颜色,如果最大颜色分数大于该第一阈值th1,也即,如果从DNN分类器的最后一个SoftMax层得到的最大颜色分数max_S大于第一阈值th1,则可以直接确定该目标的颜色属性,也即,认为该目标的颜色即为具有该最大颜色分数的颜色。该第一阈值th1为基于深度神经网络的分类方法所使用的阈值,其为经验值,例如为0.7。如果最大颜色分数都不能大于该第一阈值th1,则进入步骤604进行进一步处理。In step 603, it is determined whether there is a color that satisfies the color classification result, if the maximum color score is greater than the first threshold th1, that is, if the maximum color score max_S obtained from the last SoftMax layer of the DNN classifier is greater than the first threshold th1 Then, the color attribute of the target can be directly determined, that is, the color of the target is considered to be the color having the maximum color score. The first threshold th1 is a threshold used by a deep neural network based classification method, which is an empirical value, for example 0.7. If the maximum color score cannot be greater than the first threshold th1, then step 604 is entered for further processing.
在步骤604中,基于颜色范围表对上述目标进行颜色统计,以便根据颜色统计结果确定上述目标的颜色。该步骤可以通过前述步骤103来实现,本实施方式以从DNN分类器得到颜色分数靠前的前三种颜色为例,根据颜色范围表可以计算得到目标区域中的这三种颜色的最大颜色面积比max_A。In step 604, the above target is color-stated based on the color range table to determine the color of the target based on the color statistics. This step can be implemented by the foregoing step 103. The present embodiment takes the first three colors with the highest color scores from the DNN classifier as an example, and the maximum color area of the three colors in the target area can be calculated according to the color range table. Than max_A.
在一个实施方式中,可以根据目标的颜色类别选择最好的颜色空间,例如RGB,Lab,HSV。假设C为前三种颜色中的一种,颜色空间为HSV,那么,该颜色C的 面积由下式定义:In one embodiment, the best color space can be selected based on the color category of the target, such as RGB, Lab, HSV. Suppose C is one of the first three colors, the color space is HSV, then the color C The area is defined by:
C_area=SUM(I(c_h_min<H<c_h_max∩c_s_min<S<c_s_max∩c_v_min<V<c_v_max)=1)C_area=SUM(I(c_h_min<H<c_h_max∩c_s_min<S<c_s_max∩c_v_min<V<c_v_max)=1)
在这个式子中,I为目标区域的图像,c_*_*为从颜色范围表得到的颜色C的颜色范围。该颜色范围表根据目标对象颜色和潘通色卡做成,如前所述,此处不再赘述。通过这个式子可以看出,首先将图像I中满足H,S,V阈值条件的像素点标记为1,其它区域则标记为0,进而对图像矩阵求和,得到满足要求的像素点数目,即C_area值。In this formula, I is an image of the target area, and c_*_* is the color range of the color C obtained from the color range table. The color range table is made according to the target object color and the Pantone color card, as described above, and will not be described again here. It can be seen from this formula that first, the pixel points satisfying the H, S, and V threshold conditions in the image I are marked as 1, and the other regions are marked as 0, and then the image matrix is summed to obtain the number of pixels satisfying the requirements. That is the C_area value.
如果剩下的两种颜色分别为A和B,那么颜色C的面积比为:If the remaining two colors are A and B, then the area ratio of color C is:
C_ratio=C_area/SUM(A_area,B_area,C_area)C_ratio=C_area/SUM(A_area,B_area,C_area)
同理,可以得到颜色A和颜色B的面积比:A_ratio和B_ratio。Similarly, the area ratio of color A and color B can be obtained: A_ratio and B_ratio.
由此,可以得到最大颜色面积比:Thus, the maximum color area ratio can be obtained:
max_A=MAX(A_ratio,B_ratio,C_ratio)max_A=MAX(A_ratio,B_ratio,C_ratio)
也即,通过步骤604,可以得到选择出的该前三种颜色在目标区域中的面积,进而可以得到各颜色的颜色面积比,由此可以得到最大颜色面积比。That is, by step 604, the area of the selected first three colors in the target area can be obtained, and the color area ratio of each color can be obtained, thereby obtaining the maximum color area ratio.
步骤605是将通过步骤604得到的最大颜色面积比max_A与第二阈值th2进行比较,通过该第二阈值th2对该目标的颜色进行进一步的识别。该第二阈值th2是经验值,例如为0.5。如果最大颜色面积max_A大于该第二阈值th2,则认为具有该最大颜色面积max_A的颜色是该目标的颜色,否则认为,通过本实施例的方法也不能识别出该目标的颜色,结束处理。Step 605 compares the maximum color area ratio max_A obtained in step 604 with a second threshold value th2, and further identifies the color of the target by the second threshold value th2. The second threshold value th2 is an empirical value, for example 0.5. If the maximum color area max_A is larger than the second threshold value th2, the color having the maximum color area max_A is considered to be the color of the target. Otherwise, it is considered that the color of the target cannot be recognized by the method of the embodiment, and the processing is ended.
在本实施例中,如图6所示,可选的,该方法还可以包括:In this embodiment, as shown in FIG. 6, optionally, the method may further include:
步骤606:区域重塑。Step 606: Area reshaping.
该步骤可以通过前述步骤305来实现。在步骤606中,对从目标检测器(DNN分类器)得到的目标区域进行重新调整,在一个实施方式中,可以根据目标类型使用两个参数w和h对目标区域进行收缩,以降低背景对检测结果的影响。This step can be implemented by the aforementioned step 305. In step 606, the target area obtained from the target detector (DNN classifier) is re-adjusted. In one embodiment, the target area can be contracted using two parameters w and h according to the target type to reduce the background pair. The impact of the test results.
对于监控图像中的车辆,该w和h可以通过下式得到:For vehicles in the surveillance image, the w and h can be obtained by:
Figure PCTCN2016101235-appb-000002
Figure PCTCN2016101235-appb-000002
在上面的式子中,B_w和B_h为原始目标区域的宽和高,
Figure PCTCN2016101235-appb-000003
的值大约为[0.1 0.2],其表示相对于原始目标区域缩小的程度。对于其他目标类型,例如人,新的区域最好仅保留上衣(up cloth)区域,然后,调整目标区域,使得长边不大于80个像素。
In the above formula, B_w and B_h are the width and height of the original target area.
Figure PCTCN2016101235-appb-000003
The value is approximately [0.1 0.2], which indicates the degree of reduction relative to the original target area. For other target types, such as people, the new area preferably only retains the up cloth area, and then adjusts the target area so that the long side is no more than 80 pixels.
通过本实施例的方法,能够提高目标颜色识别的精度和准确性。With the method of the embodiment, the accuracy and accuracy of the target color recognition can be improved.
实施例2Example 2
本实施例提供了一种目标颜色识别装置,由于该装置解决问题的原理与实施例1的方法类似,因此其具体的实施可以参考实施例1的方法的实施,内容相同之处不再重复说明。The present embodiment provides a target color recognition device. The principle of the device is similar to that of the first embodiment. Therefore, the specific implementation may refer to the implementation of the method in the first embodiment. .
图7是本实施例的目标颜色识别装置的示意图,如图7所示,该装置700包括:分类单元701和识别单元702,该分类单元701基于深度神经网络对图像中的目标进行颜色分类,得到该目标的多个颜色分数;该识别单元702在该目标的多个颜色分数中最大的颜色分数大于第一阈值时,确定该目标的颜色为所述最大的颜色分数对应的颜色;在该目标的多个颜色分数中最大的颜色分数不大于第一阈值时,基于颜色范围表对该目标进行颜色统计,根据颜色统计结果确定该目标的颜色。7 is a schematic diagram of a target color recognition device of the present embodiment. As shown in FIG. 7, the device 700 includes: a classification unit 701 and an identification unit 702, which classifies colors of objects in an image based on a depth neural network. Obtaining a plurality of color scores of the target; the recognition unit 702 determines that the color of the target is the color corresponding to the maximum color score when the largest color score of the plurality of color scores of the target is greater than the first threshold; When the largest color score among the plurality of color scores of the target is not greater than the first threshold, the target is color-stated based on the color range table, and the color of the target is determined according to the color statistical result.
在本实施例中,分类单元701可以通过前述步骤101来实现,识别单元702可以通过前述步骤102-103来实现,其内容被合并于此,此处不再赘述。In this embodiment, the classification unit 701 can be implemented by the foregoing step 101. The identification unit 702 can be implemented by the foregoing steps 102-103, and the content thereof is incorporated herein, and details are not described herein again.
在本实施例的一个实施方式中,如图8所示,该识别单元702可以包括:第一选择单元801和第一计算单元802,该第一选择单元801按照上述目标的多个颜色分数从高到低的顺序,选择第一数量的颜色;该第一计算单元802根据颜色范围表计算目标区域中上述第一数量的颜色的最大颜色面积比。In an embodiment of the present embodiment, as shown in FIG. 8, the identification unit 702 may include: a first selection unit 801 and a first calculation unit 802, the first selection unit 801 according to the plurality of color scores of the target In a high to low order, a first number of colors are selected; the first calculating unit 802 calculates a maximum color area ratio of the first number of colors in the target area according to the color range table.
在本实施方式中,如图8所示,该识别单元702还可以包括:In this embodiment, as shown in FIG. 8, the identification unit 702 may further include:
第一确定单元803,其在上述最大颜色面积比大于第二阈值时,确定该目标的颜色为具有该最大颜色面积比的颜色。The first determining unit 803 determines that the color of the target is a color having the maximum color area ratio when the maximum color area ratio is greater than the second threshold.
在本实施方式中,第一选择单元801、第一计算单元802和第一确定单元803分别对应步骤301-303,其内容被合并于此,此处不再赘述。In this embodiment, the first selection unit 801, the first calculation unit 802, and the first determination unit 803 respectively correspond to steps 301-303, the contents of which are incorporated herein, and are not described herein again.
在本实施方式中,可选的,该识别单元702还可以包括:In this embodiment, optionally, the identifying unit 702 may further include:
第一获取单元804,其获取目标区域,以便上述第一计算单元802根据颜色范围表计算该第一获取单元获取的目标区域中上述第一数量的颜色的最大颜色面积比。The first obtaining unit 804 obtains a target area, so that the first calculating unit 802 calculates a maximum color area ratio of the first quantity of colors in the target area acquired by the first acquiring unit according to the color range table.
在本实施方式中,该第一获取单元对应步骤304,其内容被合并于此,此处不再赘述。In this embodiment, the first obtaining unit corresponds to step 304, and the content thereof is incorporated herein, and details are not described herein again.
在本实施方式中,如图8所示,可选的,该识别单元702还可以包括: In this embodiment, as shown in FIG. 8 , the identification unit 702 may further include:
第二获取单元805和调整单元806,该第二获取单元805获取目标区域,该调整单元806对第二获取单元805获取的该目标区域进行调整,以便上述第一计算单元802根据颜色范围表计算该调整单元806调整后的目标区域中上述第一数量的颜色的最大颜色面积比。The second obtaining unit 805 and the adjusting unit 806, the second acquiring unit 805 acquires a target area, and the adjusting unit 806 adjusts the target area acquired by the second acquiring unit 805, so that the first calculating unit 802 calculates according to the color range table. The adjusting unit 806 adjusts a maximum color area ratio of the first number of colors in the target area after the adjustment.
在本实施方式中,该第二获取单元805和该调整单元806分别对应步骤304-305,其内容被合并于此,此处不再赘述。此外,该第二获取单元805和该第一获取单元804可以合并。In this embodiment, the second obtaining unit 805 and the adjusting unit 806 respectively correspond to steps 304-305, and the contents thereof are incorporated herein, and details are not described herein again. In addition, the second obtaining unit 805 and the first obtaining unit 804 can be combined.
图9是本实施例的第一计算单元802的一个实施方式的示意图,如图9所示,在本实施方式中,该第一计算单元802对应图5,其可以包括:第二计算单元901、第三计算单元902和第二确定单元903。该第二计算单元901根据颜色范围表计算目标区域中上述第一数量的颜色各自的面积;该第三计算单元902根据上述第一数量的颜色各自的面积计算上述第一数量的颜色各自的颜色面积比;该第二确定单元903将上述颜色面积比中最大的颜色面积比作为上述目标区域中上述第一数量的颜色的最大颜色面积比。FIG. 9 is a schematic diagram of an implementation of the first computing unit 802 of the present embodiment. As shown in FIG. 9 , in the present embodiment, the first computing unit 802 corresponds to FIG. 5 , and may include: a second computing unit 901 . The third calculating unit 902 and the second determining unit 903. The second calculating unit 901 calculates an area of each of the first number of colors in the target area according to the color range table; the third calculating unit 902 calculates the color of each of the first quantity of colors according to the respective areas of the first number of colors. The area ratio; the second determining unit 903 uses the maximum color area ratio of the color area ratios as the maximum color area ratio of the first number of colors in the target area.
通过本实施例的装置,能够提高目标颜色识别的精度和准确性。With the apparatus of the embodiment, the accuracy and accuracy of the target color recognition can be improved.
实施例3Example 3
本实施例还提供了一种计算机系统,配置有如前所述的目标颜色识别装置700。This embodiment also provides a computer system configured with a target color recognition device 700 as previously described.
图10是本发明实施例的计算机系统1000的系统构成的示意框图。如图10所示,该计算机系统1000可以包括中央处理器1001和存储器1002;存储器1002耦合到中央处理器1001。值得注意的是,该图是示例性的;还可以使用其他类型的结构,来补充或代替该结构,以实现电信功能或其他功能。FIG. 10 is a schematic block diagram showing the system configuration of a computer system 1000 according to an embodiment of the present invention. As shown in FIG. 10, the computer system 1000 can include a central processor 1001 and a memory 1002; the memory 1002 is coupled to the central processor 1001. It should be noted that the figure is exemplary; other types of structures may be used in addition to or in place of the structure to implement telecommunications functions or other functions.
在一个实施方式中,目标颜色识别装置700的功能可以被集成到中央处理器1001中。其中,中央处理器1001可以被配置为实现实施例1所述的目标颜色识别方法。In one embodiment, the functionality of target color recognition device 700 can be integrated into central processor 1001. Wherein, the central processing unit 1001 can be configured to implement the target color recognition method described in Embodiment 1.
例如,该中央处理器1001可以被配置为进行如下控制:基于深度神经网络对图像中的目标进行颜色分类,得到所述目标的多个颜色分数;如果所述目标的多个颜色分数中最大的颜色分数大于第一阈值,则确定所述目标的颜色为所述最大的颜色分数对应的颜色;如果所述目标的多个颜色分数中最大的颜色分数不大于第一阈值,则基于颜色范围表对所述目标进行颜色统计,根据颜色统计结果确定所述目标的颜色。 For example, the central processing unit 1001 can be configured to perform control of color categorizing objects in an image based on a depth neural network to obtain a plurality of color scores of the target; if the target has a plurality of color scores The color score is greater than the first threshold, determining that the color of the target is the color corresponding to the maximum color score; if the largest color score of the plurality of color scores of the target is not greater than the first threshold, based on the color range table Color statistics are performed on the target, and the color of the target is determined according to the color statistical result.
在另一个实施方式中,目标颜色识别装置700可以与中央处理器1001分开配置,例如可以将目标颜色识别装置700配置为与中央处理器1001连接的芯片,通过中央处理器1001的控制来实现目标颜色识别装置700的功能。In another embodiment, the target color recognition device 700 can be configured separately from the central processing unit 1001. For example, the target color recognition device 700 can be configured as a chip connected to the central processing unit 1001, and the target is realized by the control of the central processing unit 1001. The function of the color recognition device 700.
如图10所示,该计算机系统1000还可以包括:输入单元1003、音频处理单元1004、显示器1005、电源1006。值得注意的是,计算机系统1000也并不是必须要包括图10中所示的所有部件;此外,计算机系统1000还可以包括图10中没有示出的部件,可以参考现有技术。As shown in FIG. 10, the computer system 1000 may further include an input unit 1003, an audio processing unit 1004, a display 1005, and a power source 1006. It should be noted that the computer system 1000 does not necessarily have to include all of the components shown in FIG. 10; in addition, the computer system 1000 may also include components not shown in FIG. 10, and reference may be made to the prior art.
如图10所示,中央处理器1001有时也称为控制器或操作控件,可以包括微处理器或其他处理器装置和/或逻辑装置,该中央处理器1001接收输入并控制计算机系统1000的各个部件的操作。As shown in FIG. 10, central processor 1001, also sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device that receives input and controls each of computer system 1000. The operation of the part.
其中,存储器1002,例如可以是缓存器、闪存、硬驱、可移动介质、易失性存储器、非易失性存储器或其它合适装置中的一种或更多种。可储存上述样板、阈值等信息,此外还可存储执行有关信息的程序。并且中央处理器1001可执行该存储器1002存储的该程序,以实现信息存储或处理等。其他部件的功能与现有类似,此处不再赘述。计算机系统1000的各部件可以通过专用硬件、固件、软件或其结合来实现,而不偏离本发明的范围。The memory 1002 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory, or other suitable device. The above templates, thresholds, and the like can be stored, and programs for executing related information can be stored. And the central processing unit 1001 can execute the program stored by the memory 1002 to implement information storage or processing and the like. The functions of other components are similar to those of the existing ones and will not be described here. The various components of computer system 1000 may be implemented by special purpose hardware, firmware, software or a combination thereof without departing from the scope of the invention.
通过本实施例的计算机系统,能够提高目标颜色识别的精度和准确性。With the computer system of the embodiment, the accuracy and accuracy of the target color recognition can be improved.
本发明实施例还提供一种计算机可读程序,其中当在目标颜色识别装置或计算机系统中执行所述程序时,所述程序使得所述目标颜色识别装置或计算机系统执行实施例1所述的目标颜色识别方法。Embodiments of the present invention also provide a computer readable program, wherein the program causes the target color recognition device or computer system to perform the method described in Embodiment 1 when the program is executed in a target color recognition device or a computer system Target color recognition method.
本发明实施例还提供一种存储有计算机可读程序的存储介质,其中所述计算机可读程序使得目标颜色识别装置或计算机系统执行实施例1所述的目标颜色识别方法。An embodiment of the present invention further provides a storage medium storing a computer readable program, wherein the computer readable program causes a target color recognition device or a computer system to perform the target color recognition method described in Embodiment 1.
本发明以上的装置和方法可以由硬件实现,也可以由硬件结合软件实现。本发明涉及这样的计算机可读程序,当该程序被逻辑部件所执行时,能够使该逻辑部件实现上文所述的装置或构成部件,或使该逻辑部件实现上文所述的各种方法或步骤。本发明还涉及用于存储以上程序的存储介质,如硬盘、磁盘、光盘、DVD、flash存储器等。The above apparatus and method of the present invention may be implemented by hardware or by hardware in combination with software. The present invention relates to a computer readable program that, when executed by a logic component, enables the logic component to implement the apparatus or components described above, or to cause the logic component to implement the various methods described above Or steps. The present invention also relates to a storage medium for storing the above program, such as a hard disk, a magnetic disk, an optical disk, a DVD, a flash memory, or the like.
结合本发明实施例描述的在目标颜色识别装置中的目标颜色识别方法可直接体 现为硬件、由处理器执行的软件模块或二者组合。例如,图7-9中所示的功能框图中的一个或多个和/或功能框图的一个或多个组合,既可以对应于计算机程序流程的各个软件模块,亦可以对应于各个硬件模块。这些软件模块,可以分别对应于图1、3-6所示的各个步骤。这些硬件模块例如可利用现场可编程门阵列(FPGA)将这些软件模块固化而实现。The target color recognition method in the target color recognition device described in connection with the embodiment of the present invention may be directly It is now hardware, a software module executed by a processor, or a combination of both. For example, one or more of the functional blocks shown in Figures 7-9 and/or one or more combinations of functional blocks may correspond to various software modules of a computer program flow, or to individual hardware modules. These software modules may correspond to the respective steps shown in Figures 1, 3-6, respectively. These hardware modules can be implemented, for example, by curing these software modules using a Field Programmable Gate Array (FPGA).
软件模块可以位于RAM存储器、闪存、ROM存储器、EPROM存储器、EEPROM存储器、寄存器、硬盘、移动磁盘、CD-ROM或者本领域已知的任何其它形式的存储介质。可以将一种存储介质耦接至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息;或者该存储介质可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。该软件模块可以存储在移动终端的存储器中,也可以存储在可插入移动终端的存储卡中。例如,若设备(例如移动终端)采用的是较大容量的MEGA-SIM卡或者大容量的闪存装置,则该软件模块可存储在该MEGA-SIM卡或者大容量的闪存装置中。The software module can reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art. A storage medium can be coupled to the processor to enable the processor to read information from, and write information to, the storage medium; or the storage medium can be an integral part of the processor. The processor and the storage medium can be located in an ASIC. The software module can be stored in the memory of the mobile terminal or in a memory card that can be inserted into the mobile terminal. For example, if a device (such as a mobile terminal) uses a larger capacity MEGA-SIM card or a large-capacity flash memory device, the software module can be stored in the MEGA-SIM card or a large-capacity flash memory device.
针对图7-9描述的功能框图中的一个或多个和/或功能框图的一个或多个组合,可以实现为用于执行本申请所描述功能的通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或其它可编程逻辑器件、分立门或晶体管逻辑器件、分立硬件组件、或者其任意适当组合。针对图7-9描述的功能框图中的一个或多个和/或功能框图的一个或多个组合,还可以实现为计算设备的组合,例如,DSP和微处理器的组合、多个微处理器、与DSP通信结合的一个或多个微处理器或者任何其它这种配置。One or more of the functional blocks described with respect to Figures 7-9 and/or one or more combinations of functional blocks may be implemented as a general purpose processor, digital signal processor (DSP) for performing the functions described herein. An application specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or any suitable combination thereof. One or more of the functional blocks described with respect to Figures 7-9 and/or one or more combinations of functional blocks may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, multiple microprocessors One or more microprocessors in conjunction with DSP communication or any other such configuration.
以上结合具体的实施方式对本发明进行了描述,但本领域技术人员应该清楚,这些描述都是示例性的,并不是对本发明保护范围的限制。本领域技术人员可以根据本发明的原理对本发明做出各种变型和修改,这些变型和修改也在本发明的范围内。 The present invention has been described in connection with the specific embodiments thereof, and it should be understood by those skilled in the art that A person skilled in the art can make various modifications and changes to the invention in accordance with the principles of the invention, which are also within the scope of the invention.

Claims (13)

  1. 一种目标颜色识别方法,其中,所述方法包括:A target color recognition method, wherein the method comprises:
    基于深度神经网络对图像中的目标进行颜色分类,得到所述目标的多个颜色分数;Color-classifying objects in the image based on a deep neural network to obtain a plurality of color scores of the target;
    如果所述目标的多个颜色分数中最大的颜色分数大于第一阈值,则确定所述目标的颜色为所述最大的颜色分数对应的颜色;If the largest color score of the plurality of color scores of the target is greater than the first threshold, determining that the color of the target is the color corresponding to the maximum color score;
    如果所述目标的多个颜色分数中最大的颜色分数不大于第一阈值,则基于颜色范围表对所述目标进行颜色统计,根据颜色统计结果确定所述目标的颜色。If the largest color score among the plurality of color scores of the target is not greater than the first threshold, the target is color-stated based on the color range table, and the color of the target is determined according to the color statistical result.
  2. 根据权利要求1所述的方法,其中,基于颜色范围表对所述目标进行颜色统计,包括:The method of claim 1, wherein color statistics are performed on the target based on a color range table, including:
    按照所述目标的多个颜色分数从高到低的顺序,选择第一数量的颜色;Selecting a first quantity of colors according to a sequence of a plurality of color scores of the target from high to low;
    根据颜色范围表计算目标区域中所述第一数量的颜色的最大颜色面积比。A maximum color area ratio of the first number of colors in the target area is calculated according to the color range table.
  3. 根据权利要求2所述的方法,其中,根据颜色统计结果确定所述目标的颜色,包括:The method of claim 2, wherein determining the color of the target based on the color statistics results comprises:
    如果所述最大颜色面积比大于第二阈值,则确定所述目标的颜色为具有所述最大颜色面积比的颜色。If the maximum color area ratio is greater than the second threshold, it is determined that the color of the target is the color having the maximum color area ratio.
  4. 根据权利要求2所述的方法,其中,基于颜色范围表对所述目标进行颜色统计,还包括:The method of claim 2, wherein the color statistics are performed on the target based on a color range table, further comprising:
    获取目标区域,以便根据颜色范围表计算获取的目标区域中所述第一数量的颜色的最大颜色面积比。The target area is obtained to calculate a maximum color area ratio of the first number of colors in the acquired target area according to the color range table.
  5. 根据权利要求2所述的方法,其中,基于颜色范围表对所述目标进行颜色统计,还包括:The method of claim 2, wherein the color statistics are performed on the target based on a color range table, further comprising:
    获取目标区域;Get the target area;
    对所述目标区域进行调整,以便根据颜色范围表计算调整后的目标区域中所述第一数量的颜色的最大颜色面积比。The target area is adjusted to calculate a maximum color area ratio of the first number of colors in the adjusted target area based on the color range table.
  6. 根据权利要求2所述的方法,其中,根据颜色范围表计算目标区域中所述第一数量的颜色的最大颜色面积比,包括:The method of claim 2, wherein calculating a maximum color area ratio of the first number of colors in the target area according to the color range table comprises:
    根据颜色范围表计算目标区域中所述第一数量的颜色各自的面积; Calculating respective areas of the first number of colors in the target area according to the color range table;
    根据所述第一数量的颜色各自的面积计算所述第一数量的颜色各自的颜色面积比;Calculating respective color area ratios of the first number of colors according to respective areas of the first number of colors;
    将所述颜色面积比中最大的颜色面积比作为所述目标区域中所述第一数量的颜色的最大颜色面积比。The ratio of the largest color area in the color area ratio is used as the maximum color area ratio of the first number of colors in the target area.
  7. 一种目标颜色识别装置,其中,所述装置包括:A target color recognition device, wherein the device comprises:
    分类单元,其基于深度神经网络对图像中的目标进行颜色分类,得到所述目标的多个颜色分数;a classification unit that performs color classification on a target in an image based on a depth neural network to obtain a plurality of color scores of the target;
    识别单元,其在所述目标的多个颜色分数中最大的颜色分数大于第一阈值时,确定所述目标的颜色为所述最大的颜色分数对应的颜色;在所述目标的多个颜色分数中最大的颜色分数不大于第一阈值时,基于颜色范围表对所述目标进行颜色统计,根据颜色统计结果确定所述目标的颜色。a recognition unit that determines that a color of the target is a color corresponding to the maximum color score when a maximum color score of the plurality of color scores of the target is greater than a first threshold; a plurality of color scores at the target When the largest color score in the middle is not greater than the first threshold, the target is color-stated based on the color range table, and the color of the target is determined according to the color statistical result.
  8. 根据权利要求7所述的装置,其中,所述识别单元包括:The apparatus of claim 7, wherein the identification unit comprises:
    第一选择单元,其按照所述目标的多个颜色分数从高到低的顺序,选择第一数量的颜色;a first selection unit that selects a first quantity of colors according to a sequence of a plurality of color scores of the target from high to low;
    第一计算单元,其根据颜色范围表计算目标区域中所述第一数量的颜色的最大颜色面积比。And a first calculating unit that calculates a maximum color area ratio of the first number of colors in the target area according to the color range table.
  9. 根据权利要求8所述的装置,其中,所述识别单元还包括:The device according to claim 8, wherein the identification unit further comprises:
    第一确定单元,其在所述最大颜色面积比大于第二阈值时,确定所述目标的颜色为具有所述最大颜色面积比的颜色。a first determining unit that determines that the color of the target is a color having the maximum color area ratio when the maximum color area ratio is greater than a second threshold.
  10. 根据权利要求8所述的装置,其中,所述识别单元还包括:The device according to claim 8, wherein the identification unit further comprises:
    第一获取单元,其获取目标区域,以便所述第一计算单元根据颜色范围表计算所述第一获取单元获取的目标区域中所述第一数量的颜色的最大颜色面积比。a first acquiring unit that acquires a target area, so that the first calculating unit calculates a maximum color area ratio of the first number of colors in the target area acquired by the first acquiring unit according to the color range table.
  11. 根据权利要求8所述的装置,其中,所述识别单元还包括:The device according to claim 8, wherein the identification unit further comprises:
    第二获取单元,其获取目标区域;a second obtaining unit that acquires a target area;
    调整单元,其对所述目标区域进行调整,以便所述第一计算单元根据颜色范围表计算所述调整单元调整后的目标区域中所述第一数量的颜色的最大颜色面积比。And an adjustment unit that adjusts the target area, so that the first calculating unit calculates a maximum color area ratio of the first quantity of colors in the adjusted target area of the adjustment unit according to the color range table.
  12. 根据权利要求8所述的装置,其中,所述第一计算单元包括:The apparatus of claim 8 wherein said first computing unit comprises:
    第二计算单元,其根据颜色范围表计算目标区域中所述第一数量的颜色各自的面积; a second calculating unit, which calculates an area of each of the first number of colors in the target area according to the color range table;
    第三计算单元,其根据所述第一数量的颜色各自的面积计算所述第一数量的颜色各自的颜色面积比;a third calculating unit that calculates a color area ratio of each of the first number of colors according to respective areas of the first number of colors;
    第二确定单元,其将所述颜色面积比中最大的颜色面积比作为所述目标区域中所述第一数量的颜色的最大颜色面积比。a second determining unit that uses a ratio of the largest color area of the color area ratios as a maximum color area ratio of the first number of colors in the target area.
  13. 一种计算机系统,其中,所述计算机系统包括权利要求7-12任一项所述的装置。 A computer system, wherein the computer system comprises the apparatus of any of claims 7-12.
PCT/CN2016/101235 2016-09-30 2016-09-30 Color identification method and device for target, and computer system WO2018058593A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201680087592.2A CN109416747B (en) 2016-09-30 2016-09-30 Target color recognition method and device and computer system
PCT/CN2016/101235 WO2018058593A1 (en) 2016-09-30 2016-09-30 Color identification method and device for target, and computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/101235 WO2018058593A1 (en) 2016-09-30 2016-09-30 Color identification method and device for target, and computer system

Publications (1)

Publication Number Publication Date
WO2018058593A1 true WO2018058593A1 (en) 2018-04-05

Family

ID=61763665

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/101235 WO2018058593A1 (en) 2016-09-30 2016-09-30 Color identification method and device for target, and computer system

Country Status (2)

Country Link
CN (1) CN109416747B (en)
WO (1) WO2018058593A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111340896B (en) * 2020-02-21 2023-10-27 北京迈格威科技有限公司 Object color recognition method, device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070195344A1 (en) * 2006-02-01 2007-08-23 Sony Corporation System, apparatus, method, program and recording medium for processing image
CN103440503A (en) * 2013-09-12 2013-12-11 青岛海信网络科技股份有限公司 Vehicle body color detection and identification method
CN103544480A (en) * 2013-10-17 2014-01-29 公安部第三研究所 Vehicle color recognition method
CN105160691A (en) * 2015-08-29 2015-12-16 电子科技大学 Color histogram based vehicle body color identification method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9269157B2 (en) * 2005-03-01 2016-02-23 Eyesmatch Ltd Methods for extracting objects from digital images and for performing color change on the object
CN100534642C (en) * 2007-09-24 2009-09-02 浙江大学 Fruit classifying method according to surface color
CN101436252A (en) * 2008-12-22 2009-05-20 北京中星微电子有限公司 Method and system for recognizing vehicle body color in vehicle video image
WO2012145909A1 (en) * 2011-04-28 2012-11-01 中国科学院自动化研究所 Method for detecting tampering with color digital image based on chroma of image
CN103208005A (en) * 2012-01-13 2013-07-17 富士通株式会社 Object recognition method and object recognition device
CN104123842B (en) * 2014-07-24 2016-04-20 北京中电兴发科技有限公司 A kind of method and apparatus of quick judgement automobile body color

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070195344A1 (en) * 2006-02-01 2007-08-23 Sony Corporation System, apparatus, method, program and recording medium for processing image
CN103440503A (en) * 2013-09-12 2013-12-11 青岛海信网络科技股份有限公司 Vehicle body color detection and identification method
CN103544480A (en) * 2013-10-17 2014-01-29 公安部第三研究所 Vehicle color recognition method
CN105160691A (en) * 2015-08-29 2015-12-16 电子科技大学 Color histogram based vehicle body color identification method

Also Published As

Publication number Publication date
CN109416747B (en) 2022-01-14
CN109416747A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
WO2020221177A1 (en) Method and device for recognizing image, storage medium and electronic device
CN108549874B (en) Target detection method, target detection equipment and computer-readable storage medium
WO2017092431A1 (en) Human hand detection method and device based on skin colour
WO2019114036A1 (en) Face detection method and device, computer device, and computer readable storage medium
WO2020107717A1 (en) Visual saliency region detection method and apparatus
JP6330385B2 (en) Image processing apparatus, image processing method, and program
WO2018040756A1 (en) Vehicle body colour identification method and device
CN107220624A (en) A kind of method for detecting human face based on Adaboost algorithm
US20160063305A1 (en) Image processing device and image processing method
CN108509902B (en) Method for detecting call behavior of handheld phone in driving process of driver
WO2019174276A1 (en) Method, device, equipment and medium for locating center of target object region
WO2015070723A1 (en) Eye image processing method and apparatus
KR101631012B1 (en) Image processing apparatus and image processing method
US20080170778A1 (en) Method and system for detection and removal of redeyes
US10380853B1 (en) Presence detection and detection localization
KR20180065889A (en) Method and apparatus for detecting target
CN104318262A (en) Method and system for replacing skin through human face photos
CN111275727B (en) Cell segmentation method, cell segmentation apparatus, and computer-readable storage medium
US20130329945A1 (en) Self-adaptive image-based obstacle detection method
WO2020038312A1 (en) Multi-channel tongue body edge detection device and method, and storage medium
KR101606476B1 (en) Apparatus and method for recognition signal light using multiple exposure image of camera
TW201730813A (en) Method and computer program product for processing image with depth information
CN101882223A (en) Assessment method of human body complexion
JP2016099668A (en) Learning method, learning device, image recognition method, image recognition device and program
WO2017054276A1 (en) Biometric identity verification method and device

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

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

Country of ref document: EP

Kind code of ref document: A1