CN117095186B - Color card identification method and device, electronic equipment and storage medium - Google Patents

Color card identification method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117095186B
CN117095186B CN202311049595.5A CN202311049595A CN117095186B CN 117095186 B CN117095186 B CN 117095186B CN 202311049595 A CN202311049595 A CN 202311049595A CN 117095186 B CN117095186 B CN 117095186B
Authority
CN
China
Prior art keywords
color
block
color block
blocks
class
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202311049595.5A
Other languages
Chinese (zh)
Other versions
CN117095186A (en
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Moore Threads Technology Co Ltd
Original Assignee
Moore Threads Technology Co Ltd
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 Moore Threads Technology Co Ltd filed Critical Moore Threads Technology Co Ltd
Priority to CN202311049595.5A priority Critical patent/CN117095186B/en
Publication of CN117095186A publication Critical patent/CN117095186A/en
Application granted granted Critical
Publication of CN117095186B publication Critical patent/CN117095186B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • G06V10/763Non-hierarchical techniques, e.g. based on statistics of modelling distributions
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Image Analysis (AREA)
  • Color Image Communication Systems (AREA)

Abstract

The disclosure relates to a color card identification method and device, an electronic device and a storage medium, wherein the method comprises the following steps: performing color lump recognition on the color lump image to obtain a recognized color lump, wherein the color lump image comprises two color lump areas in the same color lump tool; determining a first color block and a second color block in the color blocks according to the coordinates of the color blocks, wherein the distance between the first color block and the second color block meets a distance condition; clustering all color blocks by taking the first color block and the second color block as clustering center points respectively to obtain a first class color block and a second class color block; the first class color block and the second class color block are divided into two areas. The embodiment of the disclosure can be convenient for rapidly and accurately distinguishing the color blocks of the two areas, and realizes the accurate division of the areas to which the color blocks belong.

Description

Color card identification method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a color card identification method and device, an electronic device and a storage medium.
Background
An image signal Processing (ISP, image Signal Processing) algorithm can extract high quality digital images from raw data captured by an image sensor, such as a CMOS or CCD. The clear and accurate image is obtained by denoising, enhancing and optimizing the original data. ISP algorithms are widely used in various application scenarios related to image acquisition, such as smart phones, cameras, security monitoring, medical image processing, and autopilot.
The color correction matrix module (Color Correction Matrix, CCM) is a very important module in the ISP process flow. Because the response of the image sensor to the three primary colors is greatly different from human eyes and Crosstalk (cross talk) exists between pixels, the image data output by the image sensor can be restored to the true color which accords with human eyes after passing through a CCM module.
In the process of correcting the color through the CCM module, the CCM value needs to be calculated through a color card, wherein the color card is a preset card comprising a plurality of color blocks, each color block has preset colors, the colors of the color blocks are different, a wide color range is covered as much as possible through the plurality of color blocks (24 color blocks are commonly used) for selecting, comparing and communicating the colors, and the unification of color standards is realized in a certain range.
In this process, the image sensor is usually used to capture the color chart, however, for some color charts with more functions, there are often multiple different color chart areas to implement different color correction functions, and if only one color chart area is used for a certain correction, the different color chart areas need to be distinguished, however, the accuracy of the existing color chart area identification method is lower.
Disclosure of Invention
The disclosure provides a color card identification technical scheme.
According to an aspect of the present disclosure, there is provided a color chart identification method, including:
Performing color lump recognition on the color lump image to obtain a recognized color lump, wherein the color lump image comprises two color lump areas in the same color lump tool;
determining a first color block and a second color block in the color blocks according to the coordinates of the color blocks, wherein the distance between the first color block and the second color block meets a distance condition;
clustering all color blocks by taking the first color block and the second color block as clustering center points respectively to obtain a first class color block and a second class color block;
The first class color block and the second class color block are divided into two areas.
In one possible implementation manner, the determining the first color block and the second color block in the color blocks according to the coordinates of the color blocks includes:
And determining two color blocks with the farthest distance from all the color blocks according to the coordinates of the color blocks, and taking the two color blocks as a first color block and a second color block.
In one possible implementation manner, the determining the first color block and the second color block in the color blocks according to the coordinates of the color blocks includes:
Respectively determining color blocks with minimum and maximum values of the ordinate according to the ordinate of the center point of the color block;
determining an uppermost row of color blocks and a lowermost row of color blocks based on the ordinate minimum and maximum values;
Based on the abscissa of the center point of the color blocks, the color block in the uppermost row is selected as a first color block, and the color block in the lowermost row is selected as a second color block.
In one possible implementation manner, the determining the top row of color blocks and the bottom row of color blocks based on the minimum value and the maximum value of the ordinate includes:
Determining, as the uppermost line of color patches, color patches having values of the ordinate within a first range based on the ordinate minimum, the first range including: decreasing the ordinate minimum by one half a color block size to the ordinate minimum plus one half a color block size;
Determining, based on the ordinate maximum, color patches having values of the ordinate within a second range, as a lowermost line of color patches, the second range comprising: the ordinate maximum decreases by one half the color tile size to the ordinate maximum plus one half the color tile size.
In one possible implementation manner, the selecting, based on the abscissa of the center point of the color patches, the color patch in the top row of color patches as the first color patch and the color patch in the bottom row of color patches as the second color patch includes:
Taking the color block with the smallest abscissa in the color block of the uppermost row as a first color block, and taking the color block with the largest abscissa in the color block of the lowermost row as the first color block; or alternatively, the first and second heat exchangers may be,
Taking the color block with the largest abscissa in the color block of the uppermost row as a first color block, and taking the color block with the smallest abscissa in the color block of the lowermost row as the first color block; or alternatively, the first and second heat exchangers may be,
Based on the abscissa of the center point of the color blocks, the color block in the uppermost row is selected as a first color block, and the color block in the lowermost row is selected as a second color block.
In one possible implementation manner, the clustering all color blocks with the first color block and the second color block as clustering center points to obtain a first class color block and a second class color block includes:
and clustering all color blocks based on the positions of the color blocks by taking the first color block and the second color block as clustering center points to obtain a first class color block and a second class color block.
In one possible implementation manner, the clustering all color blocks with the first color block and the second color block as clustering center points to obtain a first class color block and a second class color block includes:
for all color blocks, respectively calculating the distances from each color block to two clustering center points;
classifying each color block into a class corresponding to a clustering center point with the smallest distance to obtain a first class color block and a second class color block;
according to the positions of the first-class color blocks and the second-class color blocks, the centroids of the first-class color blocks and the second-class color blocks are respectively determined and used as new clustering center points of the first-class color blocks and the second-class color blocks;
and iteratively executing the process of calculating the distance to determine the new clustering center point until the iteration stop condition is met, and obtaining the reclassified first-class color blocks and second-class color blocks.
According to an aspect of the present disclosure, there is provided a color chart identification apparatus including:
the color lump identification module is used for carrying out color lump identification on the color lump image to obtain an identified color lump, and the color lump image comprises two color lump areas in the same color lump tool;
the center point determining module is used for determining a first color block and a second color block in the color blocks according to the coordinates of the color blocks, and the distance between the first color block and the second color block meets the distance condition;
the clustering module is used for clustering all color blocks by taking the first color block and the second color block as clustering center points respectively to obtain a first class color block and a second class color block;
And the region dividing module is used for dividing the first class color block and the second class color block into two regions.
In one possible implementation manner, the center point determining module is configured to:
And determining two color blocks with the farthest distance from all the color blocks according to the coordinates of the color blocks, and taking the two color blocks as a first color block and a second color block.
In one possible implementation manner, the center point determining module is configured to:
Respectively determining color blocks with minimum and maximum values of the ordinate according to the ordinate of the center point of the color block;
determining an uppermost row of color blocks and a lowermost row of color blocks based on the ordinate minimum and maximum values;
Based on the abscissa of the center point of the color blocks, the color block in the uppermost row is selected as a first color block, and the color block in the lowermost row is selected as a second color block.
In one possible implementation manner, the center point determining module is configured to:
Determining, as the uppermost line of color patches, color patches having values of the ordinate within a first range based on the ordinate minimum, the first range including: decreasing the ordinate minimum by one half a color block size to the ordinate minimum plus one half a color block size;
Determining, based on the ordinate maximum, color patches having values of the ordinate within a second range, as a lowermost line of color patches, the second range comprising: the ordinate maximum decreases by one half the color tile size to the ordinate maximum plus one half the color tile size.
In one possible implementation manner, the center point determining module is configured to:
Taking the color block with the smallest abscissa in the color block of the uppermost row as a first color block, and taking the color block with the largest abscissa in the color block of the lowermost row as the first color block; or alternatively, the first and second heat exchangers may be,
Taking the color block with the largest abscissa in the color block of the uppermost row as a first color block, and taking the color block with the smallest abscissa in the color block of the lowermost row as the first color block; or alternatively, the first and second heat exchangers may be,
Based on the abscissa of the center point of the color blocks, the color block in the uppermost row is selected as a first color block, and the color block in the lowermost row is selected as a second color block.
In one possible implementation manner, the clustering module is configured to:
and clustering all color blocks based on the positions of the color blocks by taking the first color block and the second color block as clustering center points to obtain a first class color block and a second class color block.
In one possible implementation manner, the clustering module is configured to:
for all color blocks, respectively calculating the distances from each color block to two clustering center points;
classifying each color block into a class corresponding to a clustering center point with the smallest distance to obtain a first class color block and a second class color block;
according to the positions of the first-class color blocks and the second-class color blocks, the centroids of the first-class color blocks and the second-class color blocks are respectively determined and used as new clustering center points of the first-class color blocks and the second-class color blocks;
and iteratively executing the process of calculating the distance to determine the new clustering center point until the iteration stop condition is met, and obtaining the reclassified first-class color blocks and second-class color blocks.
According to an aspect of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to perform the above method.
According to an aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method.
In the embodiment of the disclosure, color lump identification is performed on a color lump image, and after the identified color lump is obtained, a first color lump and a second color lump in the color lump are determined according to the coordinates of the color lump, wherein the distance between the first color lump and the second color lump meets the distance condition; clustering all color blocks by taking the first color block and the second color block as clustering center points respectively to obtain a first class color block and a second class color block; the first class color block and the second class color block are divided into two areas. Therefore, the first color blocks and the second color blocks meeting the distance condition are selected as the clustering center points, all the color blocks are clustered, the color blocks of the two areas can be conveniently and accurately distinguished, and the accurate division of the areas where the color blocks belong is realized.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the technical aspects of the disclosure.
Fig. 1 shows a schematic diagram of a color chart image output by an image sensor before and after CCM correction.
Fig. 2 shows a schematic diagram of a color chart image of a multifunctional color chart comprising upper and lower areas.
Fig. 3 shows a flowchart of a color chart identification method according to an embodiment of the present disclosure.
Fig. 4 shows a block diagram of a color chart identification device according to an embodiment of the present disclosure.
Fig. 5 shows a block diagram of an electronic device, according to an embodiment of the disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the disclosure will be described in detail below with reference to the drawings. In the drawings, like reference numbers indicate identical or functionally similar elements. Although various aspects of the embodiments are illustrated in the accompanying drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, numerous specific details are set forth in the following detailed description in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements, and circuits well known to those skilled in the art have not been described in detail in order not to obscure the present disclosure.
The CCM image correction is used for correcting the spectral response of the image sensor, and the corrected image is more in line with the real color perceived by human eyes, and fig. 1 shows a schematic diagram of the color card image output by the image sensor before and after CCM correction. The partial image (a) in fig. 1 is a color chart image output before CCM correction, and the partial image (b) in fig. 1 is a color chart image output after CCM correction.
CCM is a 3×3 matrix, and when calculating the CCM matrix value of an image sensor, the image sensor is usually photographed against a color chart, and then the average R, G, B of each color block in the color chart image is subjected to polynomial fitting with the R, G, B target value of each color block of the X-Rite standard, so as to obtain the optimized CCM matrix coefficient.
Current color cards tend to be more functional, and as an example, fig. 2 shows a schematic diagram of a color card image of a multifunctional color card including upper and lower areas. In this figure, in addition to the lower conventional 24 color blocks, there are upper creative enhancement color blocks for adding novel color effects to the video, image, such as creative cool-warm tones, etc. Through the color card, the color correction and creative enhancement tasks can be completed, and the color card is very helpful for video production and post-processing editing efficiency.
After the image automatically recognizes all color blocks, how to automatically distinguish the upper half color block from the lower half color block, and performing CCM value tuning only on the lower half color block or the upper half color block is a common engineering problem.
In the related art, for distinguishing the upper half and the lower half color patches, a threshold Ty is usually preset in the Y direction of an image coordinate system (the upper left corner of the image is the origin), and a color patch center point is the upper half when the Y coordinate value is smaller than Ty; otherwise, if the y coordinate value of the center point of a certain color block is larger than Ty, the color block belongs to the lower half. However, the position of the color card in the image always changes during each shooting, so that the manually set Ty may not be in line with the actual situation, and thus the accuracy is low when the current color block is erroneously judged to be the upper half or the lower half.
In the embodiment of the disclosure, color lump identification is performed on a color lump image, and after the identified color lump is obtained, a first color lump and a second color lump in the color lump are determined according to coordinates of the color lump, wherein the distance between the first color lump and the second color lump meets a distance condition; clustering all color blocks by taking the first color block and the second color block as clustering center points respectively to obtain a first class color block and a second class color block; the first class color block and the second class color block are divided into two areas. Therefore, the first color blocks and the second color blocks meeting the distance condition are selected as the clustering center points, all the color blocks are clustered, the color blocks of the two areas can be conveniently and accurately distinguished, and the accurate division of the areas where the color blocks belong is realized.
Fig. 3 shows a flowchart of a color chart identification method according to an embodiment of the present disclosure, as shown in fig. 3, the method includes:
In step S11, performing color lump recognition on a color lump image, so as to obtain a recognized color lump, wherein the color lump image comprises two color lump areas in the same color lump tool;
The color chart image is an image captured by the image sensor on the color chart, and in the disclosure, the color chart image may include two color chart areas, for example, in the image shown in fig. 2, the color chart includes an upper area and a lower area, the lower area includes 24 color patches, the upper area includes 26 color patches, and the two color patches correspond to different color calibration functions. In order to facilitate the subsequent color lump identification, when the color lump is shot by the image sensor, the image sensor can be made to shoot the color lump just opposite to the color lump so as to avoid that the difference between the relative position of the color lump in the image and the relative position of the actual color lump is larger due to the perspective effect of near-large and far-small, thereby being convenient for accurately distinguishing the two color lump areas based on the position of the color lump in the image.
In this step, the identification of the color patches may be complete identification of all the color patches in the color card image, so that the areas to which the color patches belong are subsequently divided based on the locations of the color patches. The specific identification mode can be various, in one example, the identification can be performed on an automatic or semi-automatic basis, for example, after the partial color blocks are initially identified through an algorithm, the rest color blocks are identified through manual labeling; in another example, all color patches may be identified based on a fully automatic identification approach. In one example, the color blocks may be identified by way of threshold segmentation based on differences in pixel values of the color blocks from background pixel values; in another example, the color block can be identified according to the change of the gray value of the edge of the color block by a segmentation mode based on edge detection; in another example, color patches may also be identified based on a deep learning algorithm by encoding image features using a neural network, which may be, for example, a convolutional neural network, a residual neural network, or the like.
In step S12, determining a first color patch and a second color patch in the color patches according to the coordinates of the color patches, wherein a distance between the first color patch and the second color patch satisfies a distance condition;
The coordinates of the color block are the coordinates of the color block in the image coordinate system, specifically, the coordinates of the center point of the color block, or the coordinates of a certain corner point of the color block, which is not specifically limited in the disclosure.
The distance between the first color block and the second color block is the distance between the first color block and the second color block on the image, and it should be noted that in the embodiment of the present disclosure, the distance between the first color block and the second color block may not be required to be found, but the distance between the color blocks may be determined according to the coordinate values of the color blocks, for example, whether the color block belongs to the top row or the bottom row may be determined according to the y value of the color block, and then, according to the x value of the color block, which position of the color block in the color card is determined, that is, the distance between the color blocks is determined, which may be specifically referred to a possible implementation manner provided in the present disclosure, which will not be repeated here.
There may be a variety of distance conditions, and in one possible implementation, the distance condition may be the two color patches that are furthest apart from all the color patches; in another possible implementation manner, when the position relationship of the two color card areas is an up-down adjacent relationship, the distance condition may be that the longitudinal distance in all color blocks is farthest; in another possible implementation manner, when the position relationship of the two color card areas is a left-right adjacent relationship, the distance condition may be that the lateral distance in all color patches is farthest; in another possible implementation, the distance condition may be that the longitudinal distance is furthest and the lateral distance is furthest among all color patches.
The distances of the color patches may be compared in terms of coordinates of the color patches, e.g., the size of the different color patch distances may be determined based on comparing the size of the x-coordinates of the color patches and the size of the y-coordinates; in addition, the distance of the color block can be determined directly according to the coordinates of the color block, and then the distance of the color block can be compared. The distance of the color block can also be a Euclidean distance determined based on the coordinates of the color block, and the Euclidean distance is the straight line distance of the center point of the color block in Euclidean space.
In step S13, clustering all color blocks by using the first color block and the second color block as clustering center points, to obtain a first class color block and a second class color block;
The clustering process is to determine color blocks belonging to the same class as the first color block and determine color blocks belonging to the same class as the second color block, so as to obtain the first class color block and the second class color block.
The clustering process may specifically be performed according to the positions of color blocks, and in one possible implementation manner, the clustering is performed on all color blocks by using the first color block and the second color block as clustering center points, to obtain a first class color block and a second class color block, including: and clustering all color blocks based on the positions of the color blocks by taking the first color block and the second color block as clustering center points to obtain a first class color block and a second class color block.
In this implementation, based on the position of the color blocks, the color blocks close to the first color block are clustered into the first class color blocks, the color blocks close to the second color block are clustered into the second class color blocks, and because the distance between the first color block and the second color block is far, the color blocks of the two areas can be conveniently and rapidly distinguished, and the accurate division of the areas to which the color blocks belong is realized.
In one possible implementation manner, the clustering all color blocks with the first color block and the second color block as clustering center points to obtain a first class color block and a second class color block includes: for all color blocks, respectively calculating the distances from each color block to two clustering center points; classifying each color block into a class corresponding to a clustering center point with the smallest distance to obtain a first class color block and a second class color block; according to the positions of the first-class color blocks and the second-class color blocks, the centroids of the first-class color blocks and the second-class color blocks are respectively determined and used as new clustering center points of the first-class color blocks and the second-class color blocks; and iteratively executing the process of calculating the distance to determine the new clustering center point until the iteration stop condition is met, and obtaining the reclassified first-class color blocks and second-class color blocks.
The iteration stop condition may be, for example, that the iteration reaches a preset number of times, and in one example, since two cluster center points meeting the distance condition have been selected through step S12, the algorithm will quickly converge, and usually only 3 iterations are needed to accurately cluster the color patches of the two color card areas into 2 categories. Therefore, the iteration times can be preset to be 3 times, and the iteration can be stopped after the iteration times reach 3 times, and the first-class color block and the second-class color block are output. Furthermore, the iteration condition may be other conditions, for example, reaching a predetermined iteration time, or the like.
In this implementation, the first class of color patches is the color patch closest to the cluster center point of the first class, and the second class of color patches is the color patch closest to the cluster center point of the second class, and since two cluster center points conforming to the distance condition have been selected through step S12, the center points of two different color card areas can be clustered quickly.
In step S14, the first-class color block and the second-class color block are divided into two areas.
After the first class color block and the second class color block are obtained, the color blocks can be respectively divided into two areas according to the coordinates of the two classes of color blocks. For example, for the color chart image shown in fig. 2, two types of color patches may be divided into upper and lower areas according to the y value of the color chart.
In a possible implementation, in the case that the distance condition is two color patches farthest from the distance condition, then the determining, according to coordinates of the color patches, a first color patch and a second color patch in the color patches includes: and determining two color blocks with the farthest distance from all the color blocks according to the coordinates of the color blocks, and taking the two color blocks as a first color block and a second color block.
For example, the color block of the top row and the color block of the bottom row can be determined according to the y value of the color block, then two pairs of color blocks with diagonal relation in the color card are determined according to the x value of the color block, and one pair of color blocks with the largest difference of x values can be identified as the two color blocks with the farthest distances in all the color blocks. In addition, the distance between the two coordinates can be directly calculated according to the coordinates of the central points of the two color blocks, so that the two color blocks with the farthest distances in all the color blocks can be further determined.
Practice shows that two color blocks farthest from each other in the color chart necessarily belong to different color chart areas, in the implementation manner, two color blocks farthest from each other in all color blocks are determined according to the coordinates of the color blocks and serve as a first color block and a second color block, so that the center point of clustering is the two color blocks farthest from each other in all color blocks, therefore, the color blocks of the two areas can be accurately clustered to the center point of the closest cluster, so that the color blocks of different areas can be accurately distinguished, and the accuracy of distinguishing the color chart areas is improved.
In one possible implementation manner, when the position relationship of the two color card areas is an up-down adjacent relationship, and when the distance condition is that the longitudinal distance is the farthest among all color blocks, then the determining, according to the coordinates of the color blocks, the first color block and the second color block in the color blocks includes: respectively determining color blocks with minimum and maximum values of the ordinate according to the ordinate of the center point of the color block; determining an uppermost row of color blocks and a lowermost row of color blocks based on the ordinate minimum and maximum values; based on the abscissa of the center point of the color blocks, the color block in the uppermost row is selected as a first color block, and the color block in the lowermost row is selected as a second color block.
When the position relationship of the two color card areas is an up-down adjacent relationship, when the clustering center point is respectively positioned in the uppermost row of color blocks and the lowermost row of color blocks, the clustering efficiency is faster based on the position, and the clustering result is more accurate, so that the uppermost row of color blocks and the lowermost row of color blocks can be determined based on the maximum value and the minimum value of the ordinate of the center point of the color blocks, then, the color blocks in the uppermost row of color blocks can be selected as the first color blocks, and the color blocks in the lowermost row of color blocks can be selected as the second color blocks. Therefore, the longitudinal distance of the selected clustering center point is larger, so that the clustering efficiency based on the position is faster, and the clustering result is more accurate.
In one example, any color tile in the top row of color tiles may be selected as a first color tile, and any color tile in the bottom row of color tiles may be selected as a second color tile; in another example, the color block with the smallest abscissa in the color block of the uppermost row is taken as the first color block, and the color block with the largest abscissa in the color block of the lowermost row is taken as the first color block; or, taking the color block with the largest abscissa in the color block of the uppermost row as a first color block, and taking the color block with the smallest abscissa in the color block of the lowermost row as the first color block; or, based on the abscissa of the center point of the color blocks, selecting the color block in the color block of the uppermost row as a first color block, and selecting the color block in the color block of the lowermost row as a second color block. Therefore, a pair of color blocks positioned at the diagonal end points in the rectangular frame formed by the two color card areas can be selected as clustering center points, and the two clustering center points are sufficiently large in distance in the longitudinal direction and sufficiently large in the transverse direction, so that the clustering efficiency based on the positions is higher, and the clustering result is more accurate. And the process is realized based on the abscissa and the ordinate of the center point of the color block, and the distance between the color blocks is not required to be calculated by using the coordinate values, so that the efficiency of determining the cluster center point is improved.
In one possible implementation manner, the determining the top row of color blocks and the bottom row of color blocks based on the minimum value and the maximum value of the ordinate includes: determining, as the uppermost line of color patches, color patches having values of the ordinate within a first range based on the ordinate minimum, the first range including: decreasing the ordinate minimum by one half a color block size to the ordinate minimum plus one half a color block size; determining, based on the ordinate maximum, color patches having values of the ordinate within a second range, as a lowermost line of color patches, the second range comprising: the ordinate maximum decreases by one half the color tile size to the ordinate maximum plus one half the color tile size.
Considering the influence of the photographing angle, the ordinate of the color block of the uppermost line tends to be not identical, and the ordinate of the color block of the lowermost line tends to be not identical, so that when determining the color block of the uppermost line, color blocks whose value of the ordinate is within a first range may be determined based on the minimum value of the ordinate, and as the color block of the uppermost line, the end point of the first range may be the minimum value of the ordinate ±1/2 of the color block longitudinal dimension. The verification result shows that when the color block of the uppermost line is determined based on the first range, the color block of the uppermost line can be accurately distinguished, other color blocks cannot be misjudged as the color block of the uppermost line, and the accuracy is high.
Likewise, in determining the lowest line of color patches, color patches having values in the second range of the ordinate may be determined based on the minimum value of the ordinate, where the second range may end at the maximum value of the ordinate + -1/2 of the longitudinal size of the color patch as the lowest line of color patches. The verification result shows that when the lowest color block is determined based on the second range, the lowest color block can be accurately distinguished, other color blocks cannot be misjudged as the lowest color block, and the accuracy is high.
It should be noted that, in the embodiment of the present disclosure, the origin of the image coordinate system is located at the upper left corner of the image, the longitudinal direction is the Y axis, and the Y value gradually increases from top to bottom; the transverse direction is the X axis, and the value of X gradually increases from left to right. The maximum value of the color block ordinate is thus used to determine the color block of the lowest row and the minimum value of the color block ordinate is used to determine the color block of the uppermost row.
In an embodiment of the disclosure, a color block with a value in a first range of the ordinate is determined as the color block of the uppermost row by being based on the minimum value of the ordinate; based on the ordinate maximum, color patches having values in the second range of the ordinate are determined as the color patches of the lowest line. Therefore, the color blocks in the uppermost row and the color blocks in the lowermost row can be accurately determined, the possibility of missing the color blocks is reduced, the subsequent clustering of the color blocks based on the color blocks in the uppermost row and the color blocks in the lowermost row is facilitated, the clustering efficiency and the clustering accuracy are improved, and the color card area distinguishing efficiency and the color card area distinguishing accuracy are improved.
In one possible implementation manner, the color chart identification method may be performed by electronic devices such as a terminal device and a server, where the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, and the method may be implemented by a processor invoking computer readable instructions stored in a memory.
In addition, the disclosure further provides a color chart identification device, an electronic device, a computer readable storage medium and a program, which can be used for implementing any color chart identification method provided by the disclosure, and corresponding technical schemes and descriptions and corresponding records of method parts are omitted.
Fig. 4 shows a block diagram of a color chart identification apparatus according to an embodiment of the present disclosure, and as shown in fig. 4, the apparatus 40 includes:
The color lump identification module 41 is used for carrying out color lump identification on a color lump image to obtain an identified color lump, wherein the color lump image comprises two color lump areas in the same color lump tool;
A center point determining module 42, configured to determine a first color patch and a second color patch in the color patches according to coordinates of the color patches, where a distance between the first color patch and the second color patch meets a distance condition;
The clustering module 43 is configured to cluster all color blocks with the first color block and the second color block as clustering center points, so as to obtain a first class color block and a second class color block;
The area dividing module 44 is configured to divide the first class color block and the second class color block into two areas.
In one possible implementation manner, the center point determining module is configured to:
And determining two color blocks with the farthest distance from all the color blocks according to the coordinates of the color blocks, and taking the two color blocks as a first color block and a second color block.
In one possible implementation manner, the center point determining module is configured to:
Respectively determining color blocks with minimum and maximum values of the ordinate according to the ordinate of the center point of the color block;
determining an uppermost row of color blocks and a lowermost row of color blocks based on the ordinate minimum and maximum values;
Based on the abscissa of the center point of the color blocks, the color block in the uppermost row is selected as a first color block, and the color block in the lowermost row is selected as a second color block.
In one possible implementation manner, the center point determining module is configured to:
Determining, as the uppermost line of color patches, color patches having values of the ordinate within a first range based on the ordinate minimum, the first range including: decreasing the ordinate minimum by one half a color block size to the ordinate minimum plus one half a color block size;
Determining, based on the ordinate maximum, color patches having values of the ordinate within a second range, as a lowermost line of color patches, the second range comprising: the ordinate maximum decreases by one half the color tile size to the ordinate maximum plus one half the color tile size.
In one possible implementation manner, the center point determining module is configured to:
Taking the color block with the smallest abscissa in the color block of the uppermost row as a first color block, and taking the color block with the largest abscissa in the color block of the lowermost row as the first color block; or alternatively, the first and second heat exchangers may be,
Taking the color block with the largest abscissa in the color block of the uppermost row as a first color block, and taking the color block with the smallest abscissa in the color block of the lowermost row as the first color block; or alternatively, the first and second heat exchangers may be,
Based on the abscissa of the center point of the color blocks, the color block in the uppermost row is selected as a first color block, and the color block in the lowermost row is selected as a second color block.
In one possible implementation manner, the clustering module is configured to:
and clustering all color blocks based on the positions of the color blocks by taking the first color block and the second color block as clustering center points to obtain a first class color block and a second class color block.
In one possible implementation manner, the clustering module is configured to:
for all color blocks, respectively calculating the distances from each color block to two clustering center points;
classifying each color block into a class corresponding to a clustering center point with the smallest distance to obtain a first class color block and a second class color block;
according to the positions of the first-class color blocks and the second-class color blocks, the centroids of the first-class color blocks and the second-class color blocks are respectively determined and used as new clustering center points of the first-class color blocks and the second-class color blocks;
and iteratively executing the process of calculating the distance to determine the new clustering center point until the iteration stop condition is met, and obtaining the reclassified first-class color blocks and second-class color blocks.
In some embodiments, functions or modules included in an apparatus provided by the embodiments of the present disclosure may be used to perform a method described in the foregoing method embodiments, and specific implementations thereof may refer to descriptions of the foregoing method embodiments, which are not repeated herein for brevity.
The disclosed embodiments also provide a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method. The computer readable storage medium may be a volatile or nonvolatile computer readable storage medium.
The embodiment of the disclosure also provides an electronic device, which comprises: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to perform the above method.
Embodiments of the present disclosure also provide a computer program product comprising computer readable code, or a non-transitory computer readable storage medium carrying computer readable code, which when run in a processor of an electronic device, performs the above method.
The electronic device may be provided as a terminal, server or other form of device.
Fig. 5 illustrates a block diagram of an electronic device 800, according to an embodiment of the disclosure. For example, the electronic device 800 may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, or the like.
Referring to fig. 5, an electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen between the electronic device 800 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operational mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the electronic device 800. For example, the sensor assembly 814 may detect an on/off state of the electronic device 800, a relative positioning of the components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in position of the electronic device 800 or a component of the electronic device 800, the presence or absence of a user's contact with the electronic device 800, an orientation or acceleration/deceleration of the electronic device 800, and a change in temperature of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a photosensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the electronic device 800 and other devices, either wired or wireless. The electronic device 800 may access a wireless network based on a communication standard, such as a wireless network (Wi-Fi), a second generation mobile communication technology (2G), a third generation mobile communication technology (3G), a fourth generation mobile communication technology (4G), long Term Evolution (LTE) of a universal mobile communication technology, a fifth generation mobile communication technology (5G), or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 804 including computer program instructions executable by processor 820 of electronic device 800 to perform the above-described methods.
The present disclosure may be a system, method, and/or computer program product. The computer program product may include a computer readable storage medium having computer readable program instructions embodied thereon for causing a processor to implement aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: portable computer disks, hard disks, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static Random Access Memory (SRAM), portable compact disk read-only memory (CD-ROM), digital Versatile Disks (DVD), memory sticks, floppy disks, mechanical coding devices, punch cards or in-groove structures such as punch cards or grooves having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media, as used herein, are not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., optical pulses through fiber optic cables), or electrical signals transmitted through wires.
The computer readable program instructions described herein may be downloaded from a computer readable storage medium to a respective computing/processing device or to an external computer or external storage device over a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers and/or edge servers. The network interface card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium in the respective computing/processing device.
The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as SMALLTALK, C ++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions may be executed entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present disclosure are implemented by personalizing electronic circuitry, such as programmable logic circuitry, field Programmable Gate Arrays (FPGAs), or Programmable Logic Arrays (PLAs), with state information of computer readable program instructions, which can execute the computer readable program instructions.
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable medium having the instructions stored therein includes an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The computer program product may be realized in particular by means of hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied as a computer storage medium, and in another alternative embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), or the like.
The foregoing description of various embodiments is intended to highlight differences between the various embodiments, which may be the same or similar to each other by reference, and is not repeated herein for the sake of brevity.
It will be appreciated by those skilled in the art that in the above-described method of the specific embodiments, the written order of steps is not meant to imply a strict order of execution but rather should be construed according to the function and possibly inherent logic of the steps.
If the technical scheme of the application relates to personal information, the product applying the technical scheme of the application clearly informs the personal information processing rule before processing the personal information and obtains the autonomous agreement of the individual. If the technical scheme of the application relates to sensitive personal information, the product applying the technical scheme of the application obtains individual consent before processing the sensitive personal information, and simultaneously meets the requirement of 'explicit consent'. For example, a clear and remarkable mark is set at a personal information acquisition device such as a camera to inform that the personal information acquisition range is entered, personal information is acquired, and if the personal voluntarily enters the acquisition range, the personal information is considered as consent to be acquired; or on the device for processing the personal information, under the condition that obvious identification/information is utilized to inform the personal information processing rule, personal authorization is obtained by popup information or a person is requested to upload personal information and the like; the personal information processing rule may include information such as a personal information processor, a personal information processing purpose, a processing mode, and a type of personal information to be processed.
The foregoing description of the embodiments of the present disclosure has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the improvement of technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A color chart identification method, comprising:
Performing color lump recognition on the color lump image to obtain a recognized color lump, wherein the color lump image comprises two color lump areas in the same color lump tool;
determining a first color block and a second color block in the color blocks according to the coordinates of the color blocks, wherein the distance between the first color block and the second color block meets a distance condition;
clustering all color blocks by taking the first color block and the second color block as clustering center points respectively to obtain a first class color block and a second class color block;
dividing the first class color block and the second class color block into two areas;
and clustering all color blocks by taking the first color block and the second color block as clustering center points respectively to obtain a first class color block and a second class color block, wherein the method comprises the following steps:
based on the locations of the color patches, color patches that are closer to the first color patch are clustered into a first class of color patches, and color patches that are closer to the second color patch are clustered into a second class of color patches.
2. The method of claim 1, wherein determining a first color patch and a second color patch of the color patches based on coordinates of the color patches comprises:
And determining two color blocks with the farthest distance from all the color blocks according to the coordinates of the color blocks, and taking the two color blocks as a first color block and a second color block.
3. The method of claim 1, wherein determining a first color patch and a second color patch of the color patches based on coordinates of the color patches comprises:
Respectively determining color blocks with minimum and maximum values of the ordinate according to the ordinate of the center point of the color block;
determining an uppermost row of color blocks and a lowermost row of color blocks based on the ordinate minimum and maximum values;
Based on the abscissa of the center point of the color blocks, the color block in the uppermost row is selected as a first color block, and the color block in the lowermost row is selected as a second color block.
4. A method according to claim 3, wherein the values of the ordinate progressively increase from top to bottom and the values of the abscissa progressively increase from left to right, the determining the top and bottom rows of color blocks based on the ordinate minimum and maximum values comprising:
Determining, as the uppermost line of color patches, color patches having values of the ordinate within a first range based on the ordinate minimum, the first range including: decreasing the ordinate minimum by one half a color block size to the ordinate minimum plus one half a color block size;
Determining, based on the ordinate maximum, color patches having values of the ordinate within a second range, as a lowermost line of color patches, the second range comprising: the ordinate maximum decreases by one half the color tile size to the ordinate maximum plus one half the color tile size.
5. A method according to claim 3, wherein selecting the color block in the top row of color blocks as the first color block and the color block in the bottom row of color blocks as the second color block based on the abscissa of the center point of the color blocks comprises:
taking the color block with the smallest abscissa in the color block of the uppermost row as a first color block, and taking the color block with the largest abscissa in the color block of the lowermost row as a second color block; or alternatively, the first and second heat exchangers may be,
The color block with the largest abscissa in the color block of the uppermost row is taken as a first color block, and the color block with the smallest abscissa in the color block of the lowermost row is taken as a second color block.
6. The method according to claim 1, wherein clustering all color blocks with the first color block and the second color block as clustering center points to obtain a first class color block and a second class color block includes:
and clustering all color blocks based on the positions of the color blocks by taking the first color block and the second color block as clustering center points to obtain a first class color block and a second class color block.
7. The method according to claim 1, wherein clustering all color blocks with the first color block and the second color block as clustering center points to obtain a first class color block and a second class color block includes:
for all color blocks, respectively calculating the distances from each color block to two clustering center points;
classifying each color block into a class corresponding to a clustering center point with the smallest distance to obtain a first class color block and a second class color block;
according to the positions of the first-class color blocks and the second-class color blocks, the centroids of the first-class color blocks and the second-class color blocks are respectively determined and used as new clustering center points of the first-class color blocks and the second-class color blocks;
And iteratively executing the process of calculating the distance from each color block to the two clustering center points to serve as the new clustering center points of the first-class color block and the second-class color block until the iteration stop condition is met, and obtaining the reclassified first-class color block and second-class color block.
8. A color chart identification device, comprising:
the color lump identification module is used for carrying out color lump identification on the color lump image to obtain an identified color lump, and the color lump image comprises two color lump areas in the same color lump tool;
the center point determining module is used for determining a first color block and a second color block in the color blocks according to the coordinates of the color blocks, and the distance between the first color block and the second color block meets the distance condition;
the clustering module is used for clustering all color blocks by taking the first color block and the second color block as clustering center points respectively to obtain a first class color block and a second class color block;
the area dividing module is used for dividing the first class color block and the second class color block into two areas;
the clustering module is used for clustering color blocks close to the first color block into first class color blocks and clustering color blocks close to the second color block into second class color blocks based on the positions of the color blocks.
9. An electronic device, comprising:
A processor;
a memory for storing processor-executable instructions;
Wherein the processor is configured to invoke the instructions stored in the memory to implement the method of any of claims 1 to 7.
10. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of any of claims 1 to 7.
CN202311049595.5A 2023-08-18 2023-08-18 Color card identification method and device, electronic equipment and storage medium Active CN117095186B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311049595.5A CN117095186B (en) 2023-08-18 2023-08-18 Color card identification method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311049595.5A CN117095186B (en) 2023-08-18 2023-08-18 Color card identification method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117095186A CN117095186A (en) 2023-11-21
CN117095186B true CN117095186B (en) 2024-07-05

Family

ID=88774707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311049595.5A Active CN117095186B (en) 2023-08-18 2023-08-18 Color card identification method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117095186B (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080101693A1 (en) * 2006-10-26 2008-05-01 Intelligence Frontier Media Laboratory Ltd Video image based tracking system for identifying and tracking encoded color surface
JP5267422B2 (en) * 2009-10-28 2013-08-21 セイコーエプソン株式会社 Image processing method and program, and image processing apparatus
US9183641B2 (en) * 2014-02-10 2015-11-10 State Farm Mutual Automobile Insurance Company System and method for automatically identifying and matching a color of a structure's external surface
CN110189329B (en) * 2019-04-03 2022-12-13 创新先进技术有限公司 System and method for locating patch regions of a color chip
CN112102441B (en) * 2020-09-14 2024-07-23 上海米哈游天命科技有限公司 Color card manufacturing method, device, electronic equipment and storage medium
CN113840135B (en) * 2021-09-03 2023-10-20 大连中科创达软件有限公司 Color cast detection method, device, equipment and storage medium
CN115761270A (en) * 2022-11-23 2023-03-07 上海闻泰电子科技有限公司 Color card detection method and device, electronic equipment and storage medium
CN116578225A (en) * 2023-05-23 2023-08-11 北京字跳网络技术有限公司 Image processing method, apparatus, device, computer readable storage medium, and product

Also Published As

Publication number Publication date
CN117095186A (en) 2023-11-21

Similar Documents

Publication Publication Date Title
CN104156947B (en) Image partition method, device and equipment
CN111126108B (en) Training and image detection method and device for image detection model
CN112219224B (en) Image processing method and device, electronic equipment and storage medium
CN111435432B (en) Network optimization method and device, image processing method and device and storage medium
CN105095881A (en) Method, apparatus and terminal for face identification
US11450021B2 (en) Image processing method and apparatus, electronic device, and storage medium
CN112967264A (en) Defect detection method and device, electronic equipment and storage medium
CN105528765A (en) Method and device for processing image
CN112927122A (en) Watermark removing method, device and storage medium
CN113261011B (en) Image processing method and device, electronic equipment and storage medium
CN108171222B (en) Real-time video classification method and device based on multi-stream neural network
CN112184787A (en) Image registration method and device, electronic equipment and storage medium
CN111311588B (en) Repositioning method and device, electronic equipment and storage medium
CN113538310A (en) Image processing method and device, electronic equipment and storage medium
CN107730443B (en) Image processing method and device and user equipment
CN110826463B (en) Face recognition method and device, electronic equipment and storage medium
CN117095186B (en) Color card identification method and device, electronic equipment and storage medium
CN111567034A (en) Exposure compensation method, device and computer readable storage medium
CN111507131B (en) Living body detection method and device, electronic equipment and storage medium
WO2021136979A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN109271863B (en) Face living body detection method and device
CN113689362B (en) Image processing method and device, electronic equipment and storage medium
CN105391942B (en) Automatic photographing method and device
CN111382734B (en) Method and device for detecting and identifying telephone number and storage medium
CN117058255B (en) Color card identification method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant