Search

CN-121499406-B - Method and device for real-time correction of same-color system for outdoor instant colorimetric detection

CN121499406BCN 121499406 BCN121499406 BCN 121499406BCN-121499406-B

Abstract

The invention provides a method and a device for real-time correction of a homochromatic system for outdoor instant colorimetric detection, relates to the technical field of colorimetric detection, and aims to overcome the defect of low accuracy of a detection result caused by influence of ambient light. The method comprises the steps of carrying out image acquisition on a paper-based sensor assembled with a color system correction color card under ambient light to obtain an image to be identified, identifying the image to be identified, dynamically determining a color value correction mapping relation by combining real-time ambient light based on a first RGB color value of each color system included in the color system correction color card in the image to be identified and a second RGB color value of each color system included in the color system correction color card in a preset image, correcting a third RGB color value of a color development area on the paper-based sensor in the image to be identified based on the color value correction mapping relation to obtain corrected RGB color values, and determining a detection result of a sample to be detected based on the corrected RGB color values.

Inventors

  • LIU YACHAO
  • XUE QING
  • HE ZHANGJIN
  • CAO FENGJING
  • JIANG RENXIANG
  • DONG DAMING

Assignees

  • 北京市农林科学院智能装备技术研究中心

Dates

Publication Date
20260508
Application Date
20260113

Claims (10)

  1. 1. The method for real-time correction of the same color system for outdoor instant colorimetric detection is characterized by comprising the following steps of: The method comprises the steps of carrying out image acquisition on a paper-based sensor assembled with a same-color system correction color card under ambient light to obtain an image to be identified, wherein the same-color system correction color card comprises a plurality of color gradient areas of the color system, the color gradient range corresponding to the color gradient area of each color system is determined based on the color variation range of a sample to be detected after color development on the paper-based sensor, the difference value between the color values of the color system corresponding to two adjacent color gradient areas on the same-color system correction color card is larger than a preset difference value, the color gradient areas of the color system are uniformly arranged on the same-color system correction color card in a circumferential mode, the paper-based sensor is a sensor for color development after sampling of the sample to be detected, and the color gradient range of the color gradient area of the color system is related to the color gradient area of the sample to be detected after color development on the paper-based sensor; Identifying the image to be identified, and dynamically determining a color value correction mapping relation by combining real-time ambient light based on a first RGB color value of each color system included in the same-color system correction color card in the image to be identified and a second RGB color value of each color system included in the same-color system correction color card in a preset image, wherein the preset image is an image obtained by carrying out image acquisition on the same-color system correction color card under a preset standard light source; correcting a third RGB color value of a color development area on the paper-based sensor in the image to be identified based on the color value correction mapping relation to obtain a corrected RGB color value; And determining a detection result of the sample to be detected based on the corrected RGB color values.
  2. 2. The method for real-time calibration of the same color system for outdoor real-time colorimetric detection according to claim 1, wherein the dynamically determining the color value calibration map based on the first RGB color values of each color system included in the same color system calibration color card in the image to be identified and the second RGB color values of each color system included in the same color system calibration color card in the preset image in combination with real-time ambient light comprises: equally dividing the color gradient region of each color system included in the same-color system correction color card into a plurality of color blocks, and equally extracting a preset number of color blocks from the color gradient region of each color system; And dynamically determining the color value correction mapping relation by combining real-time ambient light based on the first RGB color values of the preset number of color blocks corresponding to each color system included in the same-color system correction color card in the image to be identified and the second RGB color values of the preset number of color blocks corresponding to each color system included in the same-color system correction color card in the preset image.
  3. 3. The method for real-time correction of the same color system for outdoor instant colorimetric detection according to claim 2, wherein the correcting the third RGB color values of the color development area on the paper-based sensor in the image to be identified based on the color value correction mapping relation to obtain corrected RGB color values comprises: determining a first reference area of which the color system is the same as/similar to that of the color development area from the same-color system correction color card in the image to be recognized based on the third RGB color values of the color development area; And correcting the third RGB color value based on a first RGB color value of the first reference area and a second RGB color value of a second reference area in the preset image to obtain corrected RGB color values, wherein the first reference area and the second reference area are the same area of the same color system correction color card in different images.
  4. 4. The method for real-time correction of the same color system for outdoor instant colorimetric detection according to claim 3, wherein the correcting the third RGB color value based on the first RGB color value of the first reference area and the second RGB color value of the second reference area in the preset image to obtain the corrected RGB color value includes: Determining a target color block from a preset number of color blocks corresponding to the first reference area based on the third RGB color value of the color development area, wherein the first RGB color value of the target color block is most similar to the third RGB color value; determining a plurality of adjacent color blocks by taking the target color block as a reference, wherein the plurality of color blocks comprise the target color block and color blocks on two sides/the same side of the target color block; And correcting the third RGB color value based on the first RGB color values of the plurality of color blocks in the first reference area and the second RGB color values of the plurality of color blocks in the second reference area to obtain corrected RGB color values.
  5. 5. The method according to claim 1, wherein the color value correction mapping relation is represented by a correction matrix, the correction matrix is constructed by any one of a first order polynomial, a second order polynomial and a root polynomial, the correction matrix is dynamically determined based on a first RGB color value of each color system included in the color chart of the color correction of the same color system in the image to be identified and a second RGB color value of each color system included in the color chart of the color correction of the same color system in a preset image, and the correction matrix is dynamically determined by combining with real-time ambient light.
  6. 6. The method for real-time correction of the same color system for outdoor instant colorimetric detection according to claim 1, wherein the determining the detection result of the sample to be detected based on the corrected RGB color values comprises: converting the corrected RGB color values into Lab color values or HSV color values; And determining a detection result of the sample to be detected based on the Lab color value or the HSV color value.
  7. 7. The device for real-time correction of the same color system for outdoor instant colorimetric detection is characterized by comprising an image acquisition module, an image recognition module, a correction module and a detection module; The image acquisition module is used for acquiring images of a paper-based sensor assembled with a same-color system correction color card under ambient light to obtain an image to be identified, the same-color system correction color card comprises a plurality of color gradient areas of the color system, the color gradient range corresponding to the color gradient area of each color system is determined based on the color variation range of a sample to be detected after color development on the paper-based sensor, the difference value between the color values of the color system corresponding to two adjacent color gradient areas on the same-color system correction color card is larger than a preset difference value, the color gradient areas of the color system are uniformly arranged on the same-color system correction color card in a circumferential form, the paper-based sensor is a sensor for color development of the sample to be detected after sampling, and the color gradient range of the color gradient area of the color system is related to the color variation range of the color development area of the sample to be detected after color development on the paper-based sensor; The image recognition module is used for recognizing the image to be recognized, and based on a first RGB color value of each color system included in the color system correction color card in the image to be recognized and a second RGB color value of each color system included in the color system correction color card in a preset image, the color value correction mapping relation is dynamically determined by combining with real-time ambient light, and the preset image is an image obtained by image acquisition of the color system correction color card under a preset standard light source; The correction module is used for correcting a third RGB color value of a color development area on the paper-based sensor in the image to be identified based on the color value correction mapping relation to obtain a corrected RGB color value; the detection module is used for determining a detection result of the sample to be detected based on the corrected RGB color values.
  8. 8. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor, when executing the computer program, implements the method for real-time correction of the same color system for outdoor real-time colorimetric detection as claimed in any one of claims 1 to 6.
  9. 9. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the method for real-time correction of the same color system for outdoor real-time colorimetric detection as claimed in any one of claims 1 to 6.
  10. 10. A computer program product comprising a computer program which, when executed by a processor, implements the method for real-time correction of the co-color system for outdoor point-of-care colorimetric detection as claimed in any one of claims 1 to 6.

Description

Method and device for real-time correction of same-color system for outdoor instant colorimetric detection Technical Field The invention relates to the technical field of colorimetric detection, in particular to a method and a device for real-time correction of a homochromatic system for outdoor instant colorimetric detection. Background Colorimetric detection is a qualitative and quantitative analysis method based on color reaction, and has wide application in the fields of food safety, water quality detection, environmental monitoring, biomedicine and the like. With the rapid development of paper-based sensors, a colorimetric detection technology for real-time in-situ outdoor based on a paper-based platform (i.e. a paper-based sensor) and photographing equipment is gradually developed. Therefore, the on-site rapid detection can be realized, and the application range of colorimetric detection is greatly expanded. However, in outdoor scenes, colorimetric detection is inevitably affected by ambient light. And the illumination intensity of the ambient light fluctuates with time, weather and place changes, and the fluctuation can directly influence the color presentation of the image obtained by the photographing device photographing the paper-based sensor. For example, the RGB values of the extracted color-developed areas often differ significantly when photographed on sunny and overcast days, and on the morning and afternoon by the same paper-based sensor. Whereas linear model establishment between color and concentration of colorimetric models is typically done under laboratory standard light sources, there is a large difference in illumination of outdoor ambient light from standard light sources. Therefore, the outdoor environment light can be caused to change the color temperature and the intensity of the paper-based color development area in the photographing equipment, the corresponding relation between the original color and the concentration of the object to be detected is destroyed, and the prediction model established under the standard light source is disabled, so that the accuracy of the detection result is reduced. Disclosure of Invention The invention provides a method and a device for real-time correction of a same color system for outdoor instant colorimetric detection, which are used for solving the defect of lower accuracy of a detection result caused by the influence of ambient light when the outdoor scene is subjected to colorimetric detection based on a paper-based sensor in the prior art, and realizing the aims of reducing the influence of ambient light and improving the accuracy of the detection result when the outdoor scene is subjected to colorimetric detection based on the paper-based sensor. The invention provides a real-time correction method of a homochromatic system for outdoor instant colorimetric detection, which comprises the following steps of. Image acquisition is carried out on a paper-based sensor assembled with a same-color system correction color card under ambient light to obtain an image to be identified, the same-color system correction color card comprises a plurality of color gradient areas of color systems, the color gradient range corresponding to each color gradient area of the color system is determined based on the color variation range of a sample to be detected after color development on the paper-based sensor, the difference value between color values of the color systems corresponding to two adjacent color gradient areas on the same-color system correction color card is larger than a preset difference value, the color gradient areas of the color systems are uniformly arranged on the same-color system correction color card, and the paper-based sensor is a sensor for color development after sampling the sample to be detected; Identifying an image to be identified, and dynamically determining a color value correction mapping relation by combining real-time ambient light based on a first RGB color value of each color system included in a color system correction color card in the image to be identified and a second RGB color value of each color system included in a color system correction color card in a preset image, wherein the preset image is an image obtained by carrying out image acquisition on the color system correction color card under a preset standard light source; correcting a third RGB color value of a color development area on a paper-based sensor in an image to be identified based on a color value correction mapping relation to obtain a corrected RGB color value; and determining a detection result of the sample to be detected based on the corrected RGB color values. According to the method for real-time correction of the same color system for outdoor real-time colorimetric detection provided by the invention, based on the first RGB color value of each color system included in the same color system correction color card in the image to be identified