CN109523601A - A method of test paper color cast correction effect is improved using partial correction - Google Patents

A method of test paper color cast correction effect is improved using partial correction Download PDF

Info

Publication number
CN109523601A
CN109523601A CN201811357901.0A CN201811357901A CN109523601A CN 109523601 A CN109523601 A CN 109523601A CN 201811357901 A CN201811357901 A CN 201811357901A CN 109523601 A CN109523601 A CN 109523601A
Authority
CN
China
Prior art keywords
color
value
color lump
lump
white
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.)
Pending
Application number
CN201811357901.0A
Other languages
Chinese (zh)
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.)
Shenzhen Hieroglyph Technology Co Ltd
Original Assignee
Shenzhen Hieroglyph 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 Shenzhen Hieroglyph Technology Co Ltd filed Critical Shenzhen Hieroglyph Technology Co Ltd
Priority to CN201811357901.0A priority Critical patent/CN109523601A/en
Publication of CN109523601A publication Critical patent/CN109523601A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • 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/20021Dividing image into blocks, subimages or windows

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Spectrometry And Color Measurement (AREA)

Abstract

The invention discloses a kind of methods for improving test paper color cast correction effect using partial correction, it is comprised the following steps: one, acquiring test strips image by camera;Two, image is carried out by cutting by visual pattern processing module;Three, the white space that removal test strips periphery may be affected, the small figure after cutting to image region to be checked carry out gaussian filtering process and mark;Four, the average colour cast mapping ratio and value of chromatism of white three color lumps in periphery are calculated;Five, using white blocks be averaged colour cast mapping ratio and value of chromatism reduction calculate reagent block color value;Six, the reagent block color value after correcting is matched with the comparison of default color value, obtains testing result;Calibration result is more accurate, closer to legitimate reading.

Description

A method of test paper color cast correction effect is improved using partial correction
Technical field
The present invention relates to test paper color cast correction technical fields, and in particular to a kind of to improve test paper colour cast school using partial correction The method of plus effect.
Background technique
Urine examination is carried out compared to going to hospital to do urine examination using test paper, is reduced check cost, is saved the review time, is in i.e. It can operate, it is convenient, time saving, laborsaving, economical.The main method of urine examination at present is the examination on test paper after dripping leaching urine by test paper Agent block, which reacts, causes color change, and corresponding symptom is judged by the color after variation.According to pass through camera, mobile phone pair Test paper take pictures the method for comparison, precise calibration cannot be carried out to colour cast problem, so that color detection result inaccuracy;If adopting Global shooting is carried out with to test paper, the method for color cast correction is carried out by single standard color block, can not rule out due to brightness disproportionation The factors such as even cause the problem of color cast correction inaccuracy.;To sum up, reagent can just be made by only carrying out effective color cast correction to image Block has reference value, just can guarantee the accuracy of testing result, it is therefore necessary to which color cast correction can be effectively improved by finding one kind The method of effect.
The method of traditional color cast correction is: within the scope of full figure, carrying out color cast correction for standard color block, then by colour cast Coefficient is applied to other reagent blocks of full figure;The shortcomings that full figure corrects is cannot to cope with the fact that uneven illumination is even well;When When illumination brightness disproportionation, the colour cast phenomenon of each regional area is inconsistent, therefore uses unified colour cast coefficient, can be made The accuracy of full figure correction reduces, and influences testing result.
Summary of the invention
In view of the defects and deficiencies of the prior art, the present invention intends to provide a kind of simple structure and reasonable design, make With the convenient method for improving test paper color cast correction effect using partial correction, calibration result is accurate, closer to legitimate reading.
To achieve the above object, the technical solution adopted by the present invention is that: it is comprised the following steps:
One, test strips image is acquired by camera;
Two, image is carried out by cutting by visual pattern processing module;
Three, the white space that removal test strips periphery may be affected, the small figure after cutting to image region to be checked carry out high This filtering processing and mark;
Four, the average colour cast mapping ratio and value of chromatism of white three color lumps in periphery are calculated;
Five, using white blocks be averaged colour cast mapping ratio and value of chromatism reduction calculate reagent block color value;
Six, the reagent block color value after correcting is matched with the comparison of default color value, obtains testing result.
Further, the test strips are equipped with to be checked piece, reagent block, reference block;Reference block is located to be checked piece of week It encloses;Reagent block is located on to be checked piece of diagonal line;
Further, in step 2 image cutting rule are as follows: setting fixed range to test strips image carry out gridding Cutting;
Further, the average colour cast mapping ratio of three color lumps is calculated in step 4 and value of chromatism comprises the following steps:
A, it chooses and needs white three color lumps in the periphery of the color lump A of color cast correction, respectively color lump B, color lump C, color lump D;
B, 5 points are chosen in color lump B and are used as sample point, selection rule for point at color lump cornerwise 1/4 and two it is right The intersection point of linea angulata;
C, the RGB color value of 5 points is calculated into average, that is, is defined as the representative RGB color value of color lump B;
D, it similarly calculates the representative RGB color value of color lump C and color lump D, then calculates color lump B, color lump C, color lump D and be averaged RGB color value
E, in average RGB color valueThe maximum channel of middle selection numerical value, defining the value is Maxval;IfFor largest passages value Maxval, by setting parameter beta,Make the number ratios (1:1:1) in three channels, I.e.Be calculated β,Parameter value, then the RGB color value of white base stock is reflected Penetrate ratio be (1: β:);IfOrLargest passages value Maxval, calculation method withWhen for largest passages value Maxval It is identical;
F, since the RGB standard value of white is (255.255.255), value of chromatism Δ f=Maxval-255 can be calculated;By In color lump B, color lump C, color lump D, the symbolic animal of the birth year neighbouring region in test strips color lump A, these three whites of color lump B, color lump C, color lump D can be used Color lump mapping ratio (1: β:) and value of chromatism Δ f be applied to color lump A color cast correction;
Further, in step 5, using white blocks be averaged colour cast mapping ratio and value of chromatism reduction calculate reagent block color Value comprises the following steps:
A, 5 sample points are chosen in color lump A and calculate RGB average value
B, value is (Ra, Ga, Ba) after defining the triple channel RGB color value correction of color lump A, then calculation formula is as follows:
After adopting the above scheme, a kind of side for improving test paper color cast correction effect using partial correction of the present invention Method has the advantage that
1, it around each reagent block, arranges multiple with reference to color lump;By the reference color lump first to reagent block periphery into The calculating of row mapping coefficient reapplies on the color cast correction of reagent block, keeps mapping coefficient more acurrate;
2, each reagent block only needs to use the reference color lump of subrange, even if global illumination is uneven, also without interruption;
3, the calibration result of each reagent block is more accurate, closer to legitimate reading.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention without any creative labor, may be used also for those of ordinary skill in the art To obtain other drawings based on these drawings.
Fig. 1 is the structural schematic diagram of test strips of the present invention.
Specific embodiment
With reference to the accompanying drawing, the present invention is further illustrated.
Embodiment: referring to shown in Fig. 1, white space 1 is equipped with around the test strips;Test strips are equipped with to be checked Block, reagent block, reference block;Reference block is located at around to be checked piece;Reagent block is located on to be checked piece of diagonal line;Color lump a, color lump C, color lump g, color lump i, color lump m, color lump o, color lump s, color lump u are reagent block;Color lump b, color lump d, color lump f, color lump h, color lump J, color lump l, color lump n, color lump p, color lump r, color lump t, color lump v, color lump x are reference block;Color lump e, color lump k, color lump q, color lump w It is to be checked piece;
A method of test paper color cast correction effect being improved using partial correction, it is comprised the following steps:
One, test strips image is acquired by camera;
Two, image is carried out by cutting by visual pattern processing module;Since the size of test strips is known fixed, bottom The positions and dimensions of slot test paper rest area are also known fixed, can carry out grid to test strips image by setting fixed range Change cutting;
Three, the white space 1 that removal test strips periphery may be affected, the small figure after cutting to image region to be checked carry out high This filtering processing and mark;
Four, the average colour cast mapping ratio and value of chromatism of white three color lumps in periphery are calculated:
1, tri- color lump b, color lump d, color lump e color lumps are taken respectively;
2,5 points are chosen in color lump b and are used as sample point, selection rule for point at color lump cornerwise 1/4 and two it is right The intersection point of linea angulata;
3, the RGB color value of 5 points is calculated into average, that is, is defined as the representative RGB color value of b color lump;
4, it similarly calculates the representative RGB color value of color lump d and color lump e, then calculates color lump b, color lump d, color lump e and be averaged RGB color value
5, in average RGB color valueThe maximum channel of middle selection numerical value, defining the value is Maxval;If R1 be largest passages value Maxval, by setting parameter beta,Make the number ratios (1:1:1) in three channels, I.e.Be calculated β,Parameter value, then the RGB color value of white base stock is reflected Penetrate ratio be (1: β:);IfOrWhen largest passages value Maxval, calculation method withFor largest passages value Maxval Shi Xiangtong;
6, since the RGB standard value of white is (255.255.255), value of chromatism Δ f=Maxval-255 can be calculated;By In color lump a, color lump b, color lump d, the symbolic animal of the birth year neighbouring region in test strips color lump e, the mapping ratio of b, d, e tri- white color lumps can be used (1: β:) and value of chromatism Δ f be applied to color lump a color cast correction;
Five, using white blocks be averaged colour cast mapping ratio and value of chromatism reduction calculate reagent block color value:
1,5 sample points are chosen in color lump a and calculate RGB average value
2, value is (Ra, Ga, Ba) after defining the triple channel RGB color value correction of color lump a, then calculation formula is as follows:
3, the color of color lump c, color lump g, color lump i, color lump m, color lump o, color lump s, color lump u be may also correct for according to above step Inclined RGB color value;
Six, the reagent block color value after correcting is matched with the comparison of default color value, obtains testing result.
The above is merely illustrative of the technical solution of the present invention, rather than limits those of ordinary skill in the art to this hair The other modifications or equivalent replacement that bright technical solution is made, as long as it does not depart from the spirit and scope of the technical scheme of the present invention, It is intended to be within the scope of the claims of the invention.

Claims (5)

1. a kind of method for improving test paper color cast correction effect using partial correction, it is characterised in that it is comprised the following steps:
One, test strips image is acquired by camera;
Two, image is carried out by cutting by visual pattern processing module;
Three, the white space that removal test strips periphery may be affected, the small figure after cutting to image region to be checked carry out Gauss filter Wave processing and mark;
Four, the average colour cast mapping ratio and value of chromatism of white three color lumps in periphery are calculated;
Five, using white blocks be averaged colour cast mapping ratio and value of chromatism reduction calculate reagent block color value;
Six, the reagent block color value after correcting is matched with the comparison of default color value, obtains testing result.
2. a kind of method for improving test paper color cast correction effect using partial correction according to claim 1, feature exist To be checked piece, reagent block, reference block are equipped in the test strips;Reference block is located at around to be checked piece;Reagent block be located to On the diagonal line for examining block.
3. a kind of method for improving test paper color cast correction effect using partial correction according to claim 1 or 2, feature It is the rule of image cutting in step 2 are as follows: setting fixed range carries out gridding cutting to test strips image.
4. a kind of method for improving test paper color cast correction effect using partial correction according to claim 1, feature exist The average colour cast mapping ratio of three color lumps is calculated in step 4 and value of chromatism comprises the following steps:
A, it chooses and needs white three color lumps in the periphery of the color lump A of color cast correction, respectively color lump B, color lump C, color lump D;
B, 5 points are chosen in color lump B as sample point, selection rule is point and two diagonal lines at color lump cornerwise 1/4 Intersection point;
C, the RGB color value of 5 points is calculated into average, that is, is defined as the representative RGB color value of color lump B;
D, the representative RGB color value of color lump C and color lump D is similarly calculated, the average RGB of color lump B, color lump C, color lump D are then calculated Color value
E, in average RGB color valueThe maximum channel of middle selection numerical value, defining the value is Maxval;IfFor largest passages value Maxval, by setting parameter beta,Make the number ratios (1:1:1) in three channels, i.e.,Be calculated β,Parameter value, then the mapping of the RGB color value of white base stock Ratio isIfOrLargest passages value Maxval, calculation method withFor largest passages value Maxval Shi Xiangtong;
F, since the RGB standard value of white is (255.255.255), value of chromatism Δ f=Maxval-255 can be calculated;Due to color Block B, color lump C, color lump D, the symbolic animal of the birth year neighbouring region in test strips color lump A can use these three white color lumps of color lump B, color lump C, color lump D Mapping ratioIt is applied to the color cast correction of color lump A with value of chromatism Δ f.
5. a kind of method for improving test paper color cast correction effect using partial correction according to claim 1 or 4, feature Be in step 5, be averaged colour cast mapping ratio using white blocks and value of chromatism reduction to calculate reagent block color value include following step It is rapid:
A, 5 sample points are chosen in color lump A and calculate RGB average value
B, value is (Ra, Ga, Ba) after defining the triple channel RGB color value correction of color lump A, then calculation formula is as follows:
CN201811357901.0A 2018-11-15 2018-11-15 A method of test paper color cast correction effect is improved using partial correction Pending CN109523601A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811357901.0A CN109523601A (en) 2018-11-15 2018-11-15 A method of test paper color cast correction effect is improved using partial correction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811357901.0A CN109523601A (en) 2018-11-15 2018-11-15 A method of test paper color cast correction effect is improved using partial correction

Publications (1)

Publication Number Publication Date
CN109523601A true CN109523601A (en) 2019-03-26

Family

ID=65777854

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811357901.0A Pending CN109523601A (en) 2018-11-15 2018-11-15 A method of test paper color cast correction effect is improved using partial correction

Country Status (1)

Country Link
CN (1) CN109523601A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102196274A (en) * 2011-05-10 2011-09-21 西安理工大学 Automatic white balance method based on color mapping
CN105223196A (en) * 2015-10-16 2016-01-06 长春孚宗科技股份有限公司 A kind of urinalysis method based on intelligent terminal
CN105388147A (en) * 2015-10-21 2016-03-09 深圳市宝凯仑生物科技有限公司 Detection method for body fluid based on special test paper
CN105812762A (en) * 2016-03-23 2016-07-27 武汉鸿瑞达信息技术有限公司 Automatic white balance method for processing image color cast
CN106546581A (en) * 2016-11-02 2017-03-29 长沙云知检信息科技有限公司 Detection paper card intelligent checking system and detection paper card intelligent analysis method
DE202017106020U1 (en) * 2017-10-04 2018-01-01 Hangzhou Alltest Biotech Co., Ltd. A test device for liquid

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102196274A (en) * 2011-05-10 2011-09-21 西安理工大学 Automatic white balance method based on color mapping
CN105223196A (en) * 2015-10-16 2016-01-06 长春孚宗科技股份有限公司 A kind of urinalysis method based on intelligent terminal
CN105388147A (en) * 2015-10-21 2016-03-09 深圳市宝凯仑生物科技有限公司 Detection method for body fluid based on special test paper
CN105812762A (en) * 2016-03-23 2016-07-27 武汉鸿瑞达信息技术有限公司 Automatic white balance method for processing image color cast
CN106546581A (en) * 2016-11-02 2017-03-29 长沙云知检信息科技有限公司 Detection paper card intelligent checking system and detection paper card intelligent analysis method
DE202017106020U1 (en) * 2017-10-04 2018-01-01 Hangzhou Alltest Biotech Co., Ltd. A test device for liquid

Similar Documents

Publication Publication Date Title
AU2006264799B2 (en) Method and device for analysing berries
CN101621705B (en) Method and apparatus for automatic white balance
CN104132897B (en) A kind of nitrogenous measuring method of plant leaf blade based on handheld device and device
CN108760767A (en) Large-size LCD Screen defect inspection method based on machine vision
DE102015210440A1 (en) Image inspection device, image inspection method, image inspection program, computer readable recording medium and recording device
CN111062991A (en) Method and device for positioning inspection target of photovoltaic scene and readable storage medium
CN105740856A (en) Method for reading readings of pointer instrument based on machine vision
CN102680481B (en) Detection method for cotton fiber impurities
CN109520706A (en) Automobile fuse box assembly detection system, image-recognizing method and screw hole positioning mode
CN108960231B (en) Machine vision-based thin pointer dial identification reading method
CN110660060B (en) OLED screen color mixing defect detection method, terminal equipment and computer readable medium
CN111624203A (en) Relay contact alignment non-contact measurement method based on machine vision
CN110660352A (en) Point-to-point correction method, device and system for LED display screen and storage medium
CN104954772A (en) Image adjacent-grey pixel selection algorithm applied to automatic white balance algorithm
CN105180732A (en) Steel band tape scale error measuring method
CN103196653A (en) Method and device of light source detection
CN110740314B (en) Method and system for correcting defective pixel of color line array camera
CN114267267B (en) Bright and dark seam repairing method, device and system for virtual pixel LED display screen
CN115147410A (en) Multi-color block packaging film covering defect detection method
CN113870146B (en) Correction method for false color of color camera image edge
CN207283689U (en) A kind of dead pixels of image sensor surveys means for correcting
CN109523601A (en) A method of test paper color cast correction effect is improved using partial correction
CN109853267A (en) A kind of method of quick Fabrication digit printing colour atla
CN110689586B (en) Tongue image identification method in traditional Chinese medicine intelligent tongue diagnosis and portable correction color card used for same
US9507115B2 (en) Method for determining the edges of an overlapping region between a color filter and a black matrix

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190326

RJ01 Rejection of invention patent application after publication