CN116152562B - Method and system for rapid color classification of color structured light image - Google Patents

Method and system for rapid color classification of color structured light image Download PDF

Info

Publication number
CN116152562B
CN116152562B CN202310177430.XA CN202310177430A CN116152562B CN 116152562 B CN116152562 B CN 116152562B CN 202310177430 A CN202310177430 A CN 202310177430A CN 116152562 B CN116152562 B CN 116152562B
Authority
CN
China
Prior art keywords
color
stripe
classification
light image
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
CN202310177430.XA
Other languages
Chinese (zh)
Other versions
CN116152562A (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.)
BEIJING LANGSHI INSTRUMENT CO LTD
Original Assignee
BEIJING LANGSHI INSTRUMENT 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 BEIJING LANGSHI INSTRUMENT CO LTD filed Critical BEIJING LANGSHI INSTRUMENT CO LTD
Priority to CN202310177430.XA priority Critical patent/CN116152562B/en
Publication of CN116152562A publication Critical patent/CN116152562A/en
Application granted granted Critical
Publication of CN116152562B publication Critical patent/CN116152562B/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/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Evolutionary Computation (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Spectrometry And Color Measurement (AREA)

Abstract

The invention discloses a method and a system for rapid color classification of a color structured light image, wherein the method comprises the following steps: global denoising is carried out on the color structure light image to obtain a processed color structure light image; according to the hue formula of the HSB color model and a preset dynamic threshold, performing preliminary stripe color classification on the processed color structure light image to obtain a primarily classified color stripe type, wherein the method comprises the following steps: the classification of the stripe color is successful and the classification of the stripe color is failed; performing neighborhood related color classification on all the class fringes with failed fringe color classification to obtain adjusted fringe color classification, and performing traversing adjustment on the fringes of the class with failed fringe color classification to obtain a color structure light image with initial color classification; and performing multi-pass color reclassification on the color structure light images classified by the initial colors to obtain color structure light images classified by the final colors. The method has the advantages of high accuracy, strong robustness, low algorithm complexity and high speed.

Description

Method and system for rapid color classification of color structured light image
Technical Field
The invention relates to the technical field of color structured light, in particular to a method and a system for rapidly classifying colors of color structured light images.
Background
The color structured light is structured light based on color space coding, and the color structured light image is composed of stripes or area blocks of different colors. The rapid and accurate color classification of the color structured light image is conducive to three-dimensional reconstruction. In the prior art, the color classification method of the color structure light image is mainly divided into the following two types:
(1) Cluster-based methods. By clustering the RGB of each color stripe, a color classification function is performed.
(2) A method based on hue angle threshold. Color stripe RGB space is converted into a space such as HSB (Hue, saturation) or HIS (Hue, saturation), hue H (Hue) is obtained, and a threshold is set to classify colors.
However, clustering-based methods require multiple loops and iterations, which can consume significant time costs. For example, the classical algorithm K-means, firstly sets K initial cluster centers according to the number K of colors, secondly calculates the distance from each sample to the initial cluster center, and recalculates its cluster center according to each category, and continuously repeats the following two steps until a certain termination condition is reached. The period is computationally intensive and is cycled through multiple times, so color classification based on this approach would be very time consuming. And the existing color classification method based on the clustering thought also increases the complexity of the algorithm in the optimization direction. In addition, compared with the method for classifying the thresholds in the RGB space only, the method for classifying the color fringes is more in line with the spectrum principle and higher in accuracy, but different in threshold value set by projecting the color fringes onto different objects, and poor in robustness; secondly, because the spectral responses of most color cameras and the projection device are different, the difference between the actual shooting color and the ideal color is larger, and the phenomenon of color crosstalk (i.e. mutual invasion between adjacent stripes with different colors) is accompanied, the correct color classification cannot be achieved by setting a fixed threshold value, so that the subsequent three-dimensional reconstruction is influenced.
Disclosure of Invention
Therefore, the invention provides a rapid color classification method and system for a color structured light image, which has low algorithm complexity, high classification speed and higher classification accuracy, can adapt to color structured light projected on the surface of more objects, has stronger robustness, and is beneficial to the judgment and three-dimensional reconstruction of subsequent stripe gradation so as to solve the problems in the background technology.
In order to achieve the above purpose, the present invention provides the following technical solutions:
in a first aspect, an embodiment of the present invention provides a method for rapid color classification of a color structured light image, including:
global denoising is carried out on the color structure light image to obtain a processed color structure light image;
according to the hue formula of the HSB color model and a preset dynamic threshold value, carrying out preliminary stripe color classification on the processed color structure light image to obtain a primarily classified color stripe type, wherein the stripe color type comprises the following steps: the classification of the stripe color is successful and the classification of the stripe color is failed;
performing neighborhood related color classification on all the class fringes with failed fringe color classification to obtain adjusted fringe color classification, and obtaining a color structure light image with initial color classification after traversing and adjusting the fringes of the class with failed fringe color classification;
and performing multi-pass color reclassification on the color structure light images classified by the initial colors to obtain color structure light images classified by the final colors.
Preferably, the algorithm of the global denoising process includes: mean filtering algorithm, median filtering algorithm, gaussian filtering algorithm and bilateral filtering algorithm.
Preferably, the process of performing preliminary fringe color classification on the processed color structure light image includes: extracting the central point of each color stripe according to a preset stripe central point extraction method, calculating the central point chromaticity of each color stripe based on a hue formula of an HSB color model, obtaining the central point chromaticity of each color stripe, and classifying the central point chromaticity of each color stripe according to a preset dynamic threshold value to obtain the color stripe category of the primary classification.
Preferably, the preset dynamic threshold is a dynamic setting according to a center point gray value range of the color stripe.
Preferably, the neighborhood related color classification is color classification adjustment of color classification of the stripe according to chromaticity of surrounding pixel points of center point of the stripe of the classification failed in color classification of the stripe, and the process includes: selecting an m multiplied by n neighborhood window by taking the center point of the class stripe with failed stripe color classification as the center point of the neighborhood, calculating the chromaticity of each pixel point in the neighborhood window according to the hue formula of the HSB color model, classifying the chromaticity of each pixel point according to a preset dynamic threshold value, counting the class of each pixel point, and selecting the mode of the class as the new stripe color class of the class stripe with failed stripe color classification.
Preferably, the multi-pass color reclassification is stripe color classification performed again after performing crosstalk processing on stripes with color crosstalk in the color structure light image of the initial color classification, and the process includes: traversing the color category of each stripe in the color structure light image classified by the initial color, judging whether color crosstalk exists in each traversed stripe, if so, performing gray value minus a crosstalk process of a preset value on a color channel of which the corresponding stripe is interfered, traversing all stripes and performing crosstalk process on the stripes with the color crosstalk, and classifying the colors of all the stripes again according to a hue formula of the HSB color model and a preset dynamic threshold value.
Preferably, the judgment condition for the presence of color crosstalk of the stripes is: if k adjacent stripes of the current stripe are the same in color, then the stripe has color crosstalk.
In a second aspect, an embodiment of the present invention provides a color structured light image rapid color classification system, including:
the preprocessing module is used for carrying out global denoising processing on the color structure light image to obtain a processed color structure light image;
the primary color classification module is used for performing primary stripe color classification on the processed color structure light image according to a hue formula of the HSB color model and a preset dynamic threshold value to obtain a primary classified color stripe type, and the stripe color type comprises: the classification of the stripe color is successful and the classification of the stripe color is failed;
the color adjustment module is used for carrying out neighborhood related color classification on all the class fringes with failed fringe color classification to obtain adjusted fringe color classification, and obtaining a color structure light image of initial color classification after finishing fringe traversal adjustment of all the classes with failed fringe color classification;
and the final color classification module is used for carrying out multi-pass color reclassification on the color structure light images classified by the initial colors to obtain the color structure light images classified by the final colors.
In a third aspect, an embodiment of the present invention provides a computer apparatus, including: the system comprises at least one processor and a memory communicatively connected with the at least one processor, wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform a method for fast color classification of color structured light images according to the first aspect of the embodiments of the present invention.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium storing computer instructions for causing a computer to perform a method for fast color classification of color structured light images according to the first aspect of the embodiments of the present invention.
The technical scheme of the invention has the following advantages:
the invention provides a method and a system for rapid color classification of a color structured light image, wherein the method comprises the following steps: global denoising is carried out on the color structure light image to obtain a processed color structure light image; according to the hue formula of the HSB color model and a preset dynamic threshold value, carrying out preliminary stripe color classification on the processed color structure light image to obtain a primarily classified color stripe type, wherein the stripe color type comprises the following steps: the classification of the stripe color is successful and the classification of the stripe color is failed; performing neighborhood related color classification on all the class fringes with failed fringe color classification to obtain adjusted fringe color classification, and obtaining a color structure light image with initial color classification after traversing and adjusting the fringes of the class with failed fringe color classification; and performing multi-pass color reclassification on the color structure light images classified by the initial colors to obtain color structure light images classified by the final colors. The classification method and the system have the advantages of high color classification accuracy, strong robustness, low algorithm complexity and high speed, and are beneficial to the subsequent judgment and three-dimensional reconstruction of the fringe order.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for rapid color classification of a color structured light image according to an embodiment of the present invention;
FIG. 2 is a diagram of the color stripe categories of the preliminary classification provided in an embodiment of the present invention;
FIG. 3 is a schematic diagram of the presence of color crosstalk for stripes provided in an embodiment of the present invention;
FIG. 4 is a block diagram of a rapid color classification system for color structured light images provided in an embodiment of the present invention;
FIG. 5 is a block diagram of one specific example of a computer device provided in an embodiment of the present invention.
Detailed Description
In order to make the present invention better understood by those skilled in the art, the following description will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments, but not intended to limit the scope of the present disclosure. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
In addition, the technical features of the different embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
Example 1
The embodiment of the invention provides a rapid color classification method of a color structured light image, as shown in fig. 1, comprising the following steps:
step S1: and performing global denoising treatment on the color structured light image to obtain a processed color structured light image.
In this embodiment, the algorithm of the global denoising process includes: the mean filtering algorithm, median filtering algorithm, gaussian filtering algorithm, and bilateral filtering algorithm are given by way of example only and are not limiting. The global denoising treatment is carried out on the whole color structured light image, so that the local gray value of the image is smoother, and the follow-up color classification accuracy is improved.
Step S2: according to the hue formula of the HSB color model and a preset dynamic threshold value, carrying out preliminary stripe color classification on the processed color structure light image to obtain a primarily classified color stripe type, wherein the stripe color type comprises the following steps: the classification of the stripe color is successful and the classification of the stripe color is failed.
In this embodiment, the process of obtaining the color stripe category of the preliminary classification includes:
step S21: extracting the center points of the stripes of the processed color structure light image according to a preset stripe center point extraction method to obtain the center point of each color stripe; it should be noted that, the extraction method of the preset stripe center point is a conventional technology, and is not limited herein.
Step S22: and calculating the center point chromaticity of each color stripe based on the hue formula of the HSB color model to obtain the center point chromaticity of each color stripe.
In this embodiment, the standard formula of the hue H of the HSB color model is:
where max and min represent the maximum and minimum of the pixel RGB values at a point in the image. The range of the hue H is 0 ° ~360 ° In the hue circle of the plane formed by the two-phase liquid crystal display device, different central angles are oppositeEach angle represents a color, which should be of a different color class. Due to the color tone H totally 360 ° The theory can be classified into 360 colors, however, due to the influence of various factors such as the spectral response of the camera, the object surface color, the background light, and the limited range of computer representation, the practically classifiable color classes are 6, including: red, green, blue, cyan, magenta and yellow, i.e. the most colour types are available for the colour structured light. Thus, for the hue circle, the color categories are rotated counterclockwise from red by 0 ° Or 360 degrees ° Yellow is 60 ° Green is 120 ° Cyan is 180 ° Blue is 240 ° 300 for magenta °
Step S23: and classifying the chromaticity of the central point of each color stripe according to a preset dynamic threshold value to obtain the initially classified color stripe type.
In this embodiment, the preset dynamic threshold is a dynamic setting according to the gray value range of the center point of the color stripe. It should be noted that, on the basis of the color corresponding angle of the hue circle, the setting of the preset dynamic threshold is performed by setting the gray value, that is, the brightness, of the center point of the color stripe in the color structural light image to be actually classified, instead of the fixed threshold. By means of dynamically setting the threshold, self-adaptive adjustment of the threshold is formed, and color classification is carried out according to the adjusted threshold, so that the classification accuracy is improved. In practical application, the larger the brightness is, the easier the color is identified, the smaller the influence is, and the wider the threshold value can be set; the lower the brightness, the more affected by ambient light and object surface color, and the less the threshold range setting is needed. For example, if the gray value of the center point of the color stripe to be classified is less than 50, the yellow classification threshold may be 55 ° ~65 ° Between them; if the gray value is greater than 150, the yellow classification threshold is 50 ° ~60 ° The above is merely illustrative, and the gray values of other colors and the classification threshold are set in the same way.
In this embodiment, the categories of successful classification of the stripe color include: red, green, blue, cyan, magenta, and yellow; the marks are respectively as follows: red is class 1, green is class 2, blue is class 3, cyan is class 4, magenta is class 5 and yellow is class 6; the failure category of the color classification of the stripes is not the failure category of the categories, the stripes of the categories are difficult to distinguish for human eyes, the color structural light image is marked as 0 category because of large modulation or shadow and shielding position, and the color structural light image is subjected to the steps, so that the obtained color stripe category diagram of the initial classification is shown in fig. 2.
Step S3: and carrying out neighborhood related color classification on all the class fringes with failed fringe color classification to obtain adjusted fringe color classification, and obtaining a color structure light image with initial color classification after finishing fringe traversal adjustment of all the classes with failed fringe color classification.
In this embodiment, the neighborhood related color classification is color classification adjustment of color classification of the stripe according to chromaticity of surrounding pixel points of a center point of the stripe of the class (class 0) where the color classification of the stripe fails, and the process includes: selecting an m multiplied by n neighborhood window by taking the center point of the class stripe with failed stripe color classification as the center point of the neighborhood, calculating the chromaticity of each pixel point in the neighborhood window according to the hue formula of the HSB color model, classifying the chromaticity of each pixel point according to a preset dynamic threshold value, counting the class of each pixel point, and selecting the mode of the class as the new stripe color class of the class stripe with failed stripe color classification.
Step S4: and performing multi-pass color reclassification on the color structure light images classified by the initial colors to obtain color structure light images classified by the final colors.
In this embodiment, the multi-pass color reclassification is stripe color classification performed again after performing crosstalk processing on stripes with color crosstalk in the color structure light image of the initial color classification, where the process includes:
step S41: traversing the color category of each stripe in the color structure light image of the initial color category, judging whether color crosstalk exists in each traversed stripe, and if the color crosstalk exists in the stripe, performing crosstalk processing of subtracting a preset value from a gray value of a color channel of the corresponding stripe, wherein the color channel is interfered. The processing of subtracting the preset value from the gray value is performed on the color channel that is subject to interference, and only one or more of the RGB channels having the color crosstalk stripes are processed, and the other channels are unchanged.
In this embodiment, the row or column traversal of the color class of each stripe in the color structured light image is a multi-pass traversal, where the row or column traversal is set according to the distribution of each stripe in the color structured light image.
In this embodiment, the judgment conditions for the presence of color crosstalk of the stripes are: if k adjacent stripes of the current stripe are the same in color, then the stripe has color crosstalk. It should be noted that the value of k is not limited, and may be set to 1 or any positive integer, and is adaptively modified according to practical applications.
In a specific embodiment, as shown in fig. 3, when k is 1, in the process of traversing the color class of each stripe in the color structure light image classified by the initial color, the current stripe class to be analyzed is obtained, which can be known as 2 classes, namely green, and when the class of 1 stripe color adjacent to the center point of the stripe is 1 class, namely red, at the same time, the class of the current stripe to be analyzed is interfered by the stripe of the adjacent 1 class, namely red, the gray value of the red channel in the RGB channel is increased, and is easily misclassified as 6 classes, namely yellow, so that the gray value of the red channel needs to be reduced, namely, crosstalk processing of subtracting a preset value from the red channel is performed. The numerical value setting and crosstalk processing methods involved in the above-described process are merely illustrative, and are not limited thereto.
Step S42: after traversing all the stripes and performing crosstalk treatment on the stripes with color crosstalk, classifying the colors of all the stripes according to a hue formula of the HSB color model and a preset dynamic threshold value.
The rapid color classification method for the color structured light image has the advantages of low algorithm complexity, high classification speed, higher classification accuracy, stronger robustness and contribution to the subsequent judgment and three-dimensional reconstruction of the fringe order, and can be suitable for color structured light projected on the surface of more objects.
Example 2
An embodiment of the present invention provides a fast color classification system for a color structured light image, as shown in fig. 4, including:
the preprocessing module is used for carrying out global denoising processing on the color structure light image to obtain a processed color structure light image; this module performs the method described in step S1 in embodiment 1, and will not be described here again.
The primary color classification module is used for performing primary stripe color classification on the processed color structure light image according to a hue formula of the HSB color model and a preset dynamic threshold value to obtain a primary classified color stripe type, and the stripe color type comprises: the classification of the stripe color is successful and the classification of the stripe color is failed; this module performs the method described in step S2 in embodiment 1, and will not be described here.
The color adjustment module is used for carrying out neighborhood related color classification on all the class fringes with failed fringe color classification to obtain adjusted fringe color classification, and obtaining a color structure light image of initial color classification after finishing fringe traversal adjustment of all the classes with failed fringe color classification; this module performs the method described in step S3 in embodiment 1, and will not be described here.
The final color classification module is used for carrying out multi-pass color reclassification on the color structure light images classified by the initial colors to obtain color structure light images classified by the final colors; this module performs the method described in step S4 in embodiment 1, and will not be described here.
The rapid color classification system for the color structured light image provided by the invention has the advantages of high color classification accuracy, strong robustness, low algorithm complexity and high speed, and is beneficial to subsequent judgment and three-dimensional reconstruction of the fringe order.
Example 3
An embodiment of the present invention provides a computer device, as shown in fig. 5, including: at least one processor 501, at least one communication interface 503, a memory 504, and at least one communication bus 502. The communication bus 502 is used to implement connection communication between these components, and the communication interface 503 may include a display screen and a keyboard, and the optional communication interface 503 may further include a standard wired interface and a wireless interface. The memory 504 may be a high-speed volatile random access memory, a non-volatile memory, or at least one memory device located remotely from the processor 501. Wherein the processor 501 may perform the color structured light image rapid color classification method of embodiment 1. A set of program codes is stored in the memory 504, and the processor 501 calls the program codes stored in the memory 504 for performing the color structured light image rapid color classification method of embodiment 1.
The communication bus 502 may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The communication bus 502 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one line is shown in fig. 5, but not only one bus or one type of bus.
Wherein the Memory 504 may include Volatile Memory (RAM), such as random access Memory (Random Access Memory); the Memory may also include a nonvolatile Memory (Non-volatile Memory), such as a Flash Memory (Flash Memory), a Hard Disk (HDD) or a Solid State Drive (SSD); memory 504 may also include a combination of the types of memory described above.
The processor 501 may be a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP) or a combination of CPU and NP.
The processor 501 may further include a hardware chip, among others. The hardware chip may be an Application-specific integrated circuit (ASIC), a programmable logic device (Programmable Logic Device, PLD), or a combination thereof. The PLD may be a complex programmable logic device (Complex Programmable Logic Device, CPLD for short), a field programmable gate array (Field Programmable Gate Array, FPGA for short), general-purpose array logic (Generic Array Logic, GAL for short), or any combination thereof.
Preferably, the memory 504 is also used to store program instructions. The processor 501 may invoke program instructions to implement the method for performing the fast color classification of color structured light images in embodiment 1 as in the present invention.
The embodiment of the invention also provides a computer readable storage medium, and the computer readable storage medium stores computer executable instructions thereon, wherein the computer executable instructions can execute the color structured light image rapid color classification method of the embodiment 1. The storage medium may be a magnetic Disk, an optical disc, a Read Only Memory (ROM), a random access Memory (Random Access Memory RAM), a Flash Memory (Flash Memory), a Hard Disk (HDD), a solid state Disk (Solid State Drive SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
It is apparent that the above examples are given by way of illustration only and are not limiting of the embodiments. Other variations or modifications of the above teachings will be apparent to those of ordinary skill in the art. It is not necessary here nor is it exhaustive of all embodiments. And obvious variations or modifications thereof are contemplated as falling within the scope of the present invention.

Claims (8)

1. A method for rapid color classification of a color structured light image, comprising:
global denoising is carried out on the color structure light image to obtain a processed color structure light image;
according to the hue formula of the HSB color model and a preset dynamic threshold value, carrying out preliminary stripe color classification on the processed color structure light image to obtain a primarily classified stripe color class, wherein the stripe color class comprises the following components: the classification of the stripe color is successful and the classification of the stripe color is failed;
performing neighborhood related color classification on all the class fringes with failed fringe color classification to obtain adjusted fringe color classification, and obtaining a color structure light image with initial color classification after traversing and adjusting the fringes of the class with failed fringe color classification; wherein, the neighborhood related color classification is color classification adjustment of color classification of the stripe according to chromaticity of surrounding pixel points of a center point of the stripe of the class where the color classification of the stripe fails, and the process comprises: selecting an m multiplied by n neighborhood window by taking the center point of the class stripe with failed stripe color classification as the center point of the neighborhood, calculating the chromaticity of each pixel point in the neighborhood window according to the hue formula of the HSB color model, classifying the chromaticity of each pixel point according to a preset dynamic threshold value, counting the class of each pixel point, and selecting the mode of the class as the new stripe color class of the class stripe with failed stripe color classification;
performing multi-pass color reclassification on the color structure light images classified by the initial colors to obtain color structure light images classified by the final colors; the multi-pass color reclassification is performed again after crosstalk processing is performed on stripes with color crosstalk in a color structure light image of an initial color classification, and the process comprises the following steps: traversing the color category of each stripe in the color structure light image classified by the initial color, judging whether color crosstalk exists in each traversed stripe, if so, performing gray value minus a crosstalk process of a preset value on a color channel of which the corresponding stripe is interfered, traversing all stripes and performing crosstalk process on the stripes with the color crosstalk, and classifying the colors of all the stripes again according to a hue formula of the HSB color model and a preset dynamic threshold value.
2. The method of claim 1, wherein the algorithm for global denoising comprises: mean filtering algorithm, median filtering algorithm, gaussian filtering algorithm and bilateral filtering algorithm.
3. The method of claim 1, wherein the preliminary stripe color classification of the processed color structured-light image comprises: extracting the central point of each color stripe according to a preset stripe central point extraction method, calculating the central point chromaticity of each color stripe based on a hue formula of an HSB color model, obtaining the central point chromaticity of each color stripe, and classifying the central point chromaticity of each color stripe according to a preset dynamic threshold value to obtain the color class of the stripe which is primarily classified.
4. A method of rapid color classification of color structured light images according to claim 3 wherein said preset dynamic threshold is a dynamic setting based on a range of center point gray values of color fringes.
5. The method for rapid color classification of color structured light image according to claim 1, wherein the condition for judging that color crosstalk exists in the stripes is: if k adjacent stripes of the current stripe are the same in color, then the stripe has color crosstalk.
6. A color structured light image rapid color classification system comprising:
the preprocessing module is used for carrying out global denoising processing on the color structure light image to obtain a processed color structure light image;
the primary color classification module is used for performing primary stripe color classification on the processed color structure light image according to a hue formula of the HSB color model and a preset dynamic threshold value to obtain a primary stripe color class, and the stripe color class comprises: the classification of the stripe color is successful and the classification of the stripe color is failed;
the color adjustment module is used for carrying out neighborhood related color classification on all the class fringes with failed fringe color classification to obtain adjusted fringe color classification, and obtaining a color structure light image of initial color classification after finishing fringe traversal adjustment of all the classes with failed fringe color classification; wherein, the neighborhood related color classification is color classification adjustment of color classification of the stripe according to chromaticity of surrounding pixel points of a center point of the stripe of the class where the color classification of the stripe fails, and the process comprises: selecting an m multiplied by n neighborhood window by taking the center point of the class stripe with failed stripe color classification as the center point of the neighborhood, calculating the chromaticity of each pixel point in the neighborhood window according to the hue formula of the HSB color model, classifying the chromaticity of each pixel point according to a preset dynamic threshold value, counting the class of each pixel point, and selecting the mode of the class as the new stripe color class of the class stripe with failed stripe color classification;
the final color classification module is used for performing multi-pass color reclassification on the color structure light images classified by the initial colors to obtain color structure light images classified by the final colors; the multi-pass color reclassification is performed again after crosstalk processing is performed on stripes with color crosstalk in a color structure light image of an initial color classification, and the process comprises the following steps: traversing the color category of each stripe in the color structure light image classified by the initial color, judging whether color crosstalk exists in each traversed stripe, if so, performing gray value minus a crosstalk process of a preset value on a color channel of which the corresponding stripe is interfered, traversing all stripes and performing crosstalk process on the stripes with the color crosstalk, and classifying the colors of all the stripes again according to a hue formula of the HSB color model and a preset dynamic threshold value.
7. A computer device, comprising: at least one processor, and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the color structured light image rapid color classification method of any of claims 1-5.
8. A computer readable storage medium having stored thereon computer instructions for causing a computer to perform the color structured light image rapid color classification method of any of claims 1-5.
CN202310177430.XA 2023-02-23 2023-02-23 Method and system for rapid color classification of color structured light image Active CN116152562B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310177430.XA CN116152562B (en) 2023-02-23 2023-02-23 Method and system for rapid color classification of color structured light image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310177430.XA CN116152562B (en) 2023-02-23 2023-02-23 Method and system for rapid color classification of color structured light image

Publications (2)

Publication Number Publication Date
CN116152562A CN116152562A (en) 2023-05-23
CN116152562B true CN116152562B (en) 2023-08-01

Family

ID=86350519

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310177430.XA Active CN116152562B (en) 2023-02-23 2023-02-23 Method and system for rapid color classification of color structured light image

Country Status (1)

Country Link
CN (1) CN116152562B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101840575B (en) * 2010-04-30 2012-01-11 长春理工大学 Method for converting De Bruijn color structure light image into weighted and directed diagraph model and simplifying weighted and directed diagraph model
CN102184555A (en) * 2011-04-01 2011-09-14 长春理工大学 Color clustering method for central color fringes of De Bruijn color structure light coding image
CN106251376B (en) * 2016-08-12 2019-08-06 南京航空航天大学 One kind is towards colored structures pumped FIR laser and edge extracting method
CN106340023B (en) * 2016-08-22 2019-03-05 腾讯科技(深圳)有限公司 The method and apparatus of image segmentation
CN112183237A (en) * 2020-09-10 2021-01-05 天津大学 Automatic white blood cell classification method based on color space adaptive threshold segmentation
CN114359014A (en) * 2020-09-30 2022-04-15 安霸国际有限合伙企业 Dynamic driver mechanism for rolling shutter sensor to obtain structured light patterns

Also Published As

Publication number Publication date
CN116152562A (en) 2023-05-23

Similar Documents

Publication Publication Date Title
Bianco et al. Color constancy using CNNs
KR102516360B1 (en) A method and apparatus for detecting a target
CN107454969B (en) Obstacle detection method and device
Gao et al. Sand-dust image restoration based on reversing the blue channel prior
Banić et al. Improving the white patch method by subsampling
US9317784B2 (en) Image processing apparatus, image processing method, and program
CN104637031A (en) Eye image processing method and device
CN109740721A (en) Wheat head method of counting and device
CN117611590B (en) Defect contour composite detection method, device, equipment and storage medium
CN107392211B (en) Salient target detection method based on visual sparse cognition
US10497106B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium having recorded thereon a program for performing the image processing method
CN112699760B (en) Face target area detection method, device and equipment
CN116152562B (en) Method and system for rapid color classification of color structured light image
CN111667509B (en) Automatic tracking method and system for moving target under condition that target and background colors are similar
CN113379611B (en) Image processing model generation method, processing method, storage medium and terminal
CN116320334A (en) Projection picture color correction method, apparatus, projection device and storage medium
Chen et al. Candidate region acquisition optimization algorithm based on multi-granularity data enhancement
CN112801112A (en) Image binarization processing method, device, medium and equipment
Xu et al. No reference measurement of contrast distortion and optimal contrast enhancement
Kar et al. Statistical approach for color image detection
CN108133475B (en) Detection method of local focus blurred image
Zhang et al. Background subtraction based on pixel clustering
CN118379295B (en) Hyperspectral anomaly detection method based on registration
US20220392074A1 (en) Method for image processing by means of a neural network and method for training a neural network
JP7496935B2 (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND IMAGE PROCESSING PROGRAM

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