CN108961345A - A kind of effective determination method and determining device of color in Urine test paper - Google Patents

A kind of effective determination method and determining device of color in Urine test paper Download PDF

Info

Publication number
CN108961345A
CN108961345A CN201810556166.XA CN201810556166A CN108961345A CN 108961345 A CN108961345 A CN 108961345A CN 201810556166 A CN201810556166 A CN 201810556166A CN 108961345 A CN108961345 A CN 108961345A
Authority
CN
China
Prior art keywords
value
color
test paper
image
color value
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.)
Granted
Application number
CN201810556166.XA
Other languages
Chinese (zh)
Other versions
CN108961345B (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.)
Shenyang Has Kang Pharmaceutical Technology Co Ltd
Original Assignee
Shenyang Has Kang Pharmaceutical 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 Shenyang Has Kang Pharmaceutical Technology Co Ltd filed Critical Shenyang Has Kang Pharmaceutical Technology Co Ltd
Priority to CN201810556166.XA priority Critical patent/CN108961345B/en
Publication of CN108961345A publication Critical patent/CN108961345A/en
Application granted granted Critical
Publication of CN108961345B publication Critical patent/CN108961345B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Investigating Or Analysing Biological Materials (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention provides the determination methods and determining device of color effective in a kind of Urine test paper, and wherein method includes: that Urine test paper image is divided into multiple images region centered on initial samples point;Calculate the color value mean value of pixel in preset range around initial samples point;For each neighbor pixel of initial samples point, the value of chromatism between the color value of neighbor pixel and reference color value is calculated, and is judged whether according to the size relation of value of chromatism and preset threshold using the neighbor pixel as new sampled point;When neighbor pixel is confirmed as new sampled point, the step of determining value of chromatism is executed, until determining sampled point all in image-region;The corresponding color of color value mean value is determined as effective color by the color value mean value for calculating multiple sampled points.The embodiment of the present invention can be improved the accuracy of identified effective color, to improve the detection accuracy of urinary fractions concentration.

Description

A kind of effective determination method and determining device of color in Urine test paper
Technical field
The present invention relates to Urine test paper color analysis technical fields, more particularly to color effective in a kind of Urine test paper Determine method and determining device.
Background technique
Urine test paper is a kind of for testing the test paper of heterogeneity concentration in urine.Urine test paper is usually in a strip shape, bottom Color is white, and multiple test paper color lumps are arranged in every Urine test paper, and multiple test paper color lumps are used for heterogeneity in urine Concentration is detected.During analyzing the constituent concentration of each test paper color lump using software, need first to acquire the figure of Urine test paper Picture, then by the color of test paper patch image each in image and standard colour contrast, with each constituent concentration of determination.
Before the color of test paper patch image and standard colour contrast, need first to determine effective face of each test paper patch image Color, due to being influenced by test paper color lump Facing material, it is poor to exist in the pixel color that test paper patch image different location obtains Not, it therefore cannot only be assessed by effective color of the color of independent pixel to whole test paper patch image.Determine examination When effective color of paper patch image, a sampled point is usually first determined in test paper patch image collected, in image Upper determination one boxed area comprising the sampled point pixel, i.e. effective coverage, then by calculating all pixels in effective coverage Color mean value, determine effective color of test paper patch image.
In existing image processing process, when determining effective coverage, gray scale often is converted by test paper patch image Image, then determine based on the gray level image after conversion the boundary of effective coverage.But this method of determination is by test paper color lump figure As when being converted into gray level image, due to there was only luminance information in gray level image, effective colouring information is on the one hand caused to lose, it is another Aspect image processing equipment may obscure the background image of the higher gray level image of brightness value and white, cause identified Effective coverage inaccuracy, and then lead to not determine accurate effective color from test paper patch image, influence urinary fractions The detection of concentration.
Summary of the invention
The embodiment of the present invention is designed to provide in a kind of Urine test paper the effectively determination method and determining device of color, Accurate effective color is determined from test paper patch image to realize.Specific technical solution is as follows:
In a first aspect, the embodiment of the invention provides a kind of determination method of color effective in Urine test paper, the method Include:
For acquired Urine test paper image, centered on initial samples point, the Urine test paper image is divided into more A image-region, each described image region include a test paper patch image;
The color value mean value for calculating pixel in preset range around the initial samples point makees gained color value mean value For reference color value;
For each neighbor pixel of the initial samples point, calculate the neighbor pixel color value and the ginseng Examine the value of chromatism between color value;
According to the size relation of the value of chromatism of the neighbor pixel and preset threshold, judge whether the neighbor pixel As new sampled point;
When the neighbor pixel is confirmed as new sampled point, execute described for each of the initial samples point Neighbor pixel, the step of calculating the value of chromatism between the color value of the neighbor pixel and the reference color value, until Determine sampled point all in described image region;
The color value mean value of multiple sampled points determined by calculating, is determined as this for the corresponding color of the color value mean value Effective color of test paper patch image.
Optionally, described to be directed to acquired Urine test paper image, centered on initial samples point, by the Urine test paper figure As being divided into multiple images region, before each described image region includes a test paper patch image, the method also includes:
Urine test paper image is obtained, and is determined in the Urine test paper image, the initial samples point of each image-region.
Optionally, described to be directed to acquired Urine test paper image, centered on initial samples point, by the Urine test paper figure As being divided into after multiple images region, the method also includes: gaussian filtering is carried out to described image region.
Optionally, each neighbor pixel for the initial samples point, calculates the face of the neighbor pixel Value of chromatism between color value and the reference color value, comprising:
By preset formula, the value of chromatism between the color value of the neighbor pixel and the reference color value is calculated;
The preset formula are as follows:
In formula, C1Indicate the color value of the neighbor pixel;C2Indicate the reference color value;C1, RIndicate described adjacent The R channel components of the color value of pixel;C2,RIndicate the R channel components of the reference color value;C1,GIndicate the adjacent picture The G channel components of the color value of vegetarian refreshments;C2,GIndicate the G channel components of the reference color value;C1,BIndicate the adjacent pixel The channel B component of the color value of point;C2,BIndicate the channel B component of the reference color value;
Indicate the Euclidean distance between the color value of the neighbor pixel and the reference color value, i.e. value of chromatism.
Optionally, described according to the value of chromatism of the neighbor pixel and the size relation of preset threshold, judge whether by The neighbor pixel is as new sampled point, comprising:
When the value of chromatism of the neighbor pixel is less than the preset threshold, the neighbor pixel is determined as new Sampled point.
Optionally, in the determination Urine test paper image, the initial samples point of each image-region, comprising:
For each image-region in the Urine test paper image, the pixel in described image region middle position will be located at Point is determined as the initial samples point.
Second aspect, the embodiment of the invention provides a kind of determining device of color effective in Urine test paper, described devices Include:
Region division module, for being directed to acquired Urine test paper image, centered on initial samples point, by the urine Test paper image is divided into multiple images region, and each described image region includes a test paper patch image;
Color value mean value computation module, for calculating the color value of pixel in preset range around the initial samples point Mean value, using gained color value mean value as reference color value;
Value of chromatism computing module calculates the adjacent picture for being directed to each neighbor pixel of the initial samples point Value of chromatism between the color value of vegetarian refreshments and the reference color value;
Judgment module, for judging whether according to the value of chromatism of the neighbor pixel and the size relation of preset threshold Using the neighbor pixel as new sampled point;
Sampled point determining module, for promoting value of chromatism meter when the neighbor pixel is confirmed as new sampled point Calculate module and execute each neighbor pixel for being directed to the initial samples point, calculate the color value of the neighbor pixel with The step of value of chromatism between the reference color value, until determining sampled point all in described image region;
Effective color determination module, for calculating the color value mean value of identified multiple sampled points, by the color value The corresponding color of mean value is determined as effective color of the test paper patch image.
Optionally, described device further include:
Initial samples point determining module for obtaining Urine test paper image, and determines in the Urine test paper image, each to scheme As the initial samples point in region.
Gaussian filtering module, for carrying out gaussian filtering to described image region.
Optionally, the value of chromatism computing module, is specifically used for:
By preset formula, the value of chromatism between the color value of the neighbor pixel and the reference color value is calculated.
The preset formula are as follows:
In formula, C1Indicate the color value of the neighbor pixel;C2Indicate the reference color value;C1,RIndicate described adjacent The R channel components of the color value of pixel;C2,RIndicate the R channel components of the reference color value;C1,GIndicate the adjacent picture The G channel components of the color value of vegetarian refreshments;C2,GIndicate the G channel components of the reference color value;C1,BIndicate the adjacent pixel The channel B component of the color value of point;C2,BIndicate the channel B component of the reference color value;
Indicate the Euclidean distance between the color value of the neighbor pixel and the reference color value, i.e. value of chromatism.
Optionally, the judgment module, is specifically used for:
When the value of chromatism of neighbor pixel is less than preset threshold, neighbor pixel is determined as to new sampled point.
Optionally, the initial samples point determining module, is specifically used for:
For each image-region in Urine test paper image, the pixel in image-region middle position will be located at, be determined as Initial samples point.
The third aspect, the embodiment of the invention provides a kind of electronic equipment, including processor, communication interface, memory and Communication bus, wherein the processor, the communication interface, the memory are completed each other by the communication bus Communication;The machine readable storage medium is stored with the machine-executable instruction that can be executed by the processor, the processing Device is promoted by the machine-executable instruction: realizing effective color in the Urine test paper of first aspect of embodiment of the present invention offer Determine the method and step of method.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage medium, the computer-readable storage Dielectric memory contains computer program, and the computer program is executed by processor the urine of first aspect of embodiment of the present invention offer The method and step of the determination method of effective color in liquid test paper.
The determination method and determining device of effective color in a kind of Urine test paper provided in an embodiment of the present invention, first with initial Centered on sampled point, acquired Urine test paper image is divided into multiple images region, then determine for each image-region Effective color, that is, the corresponding color of each sampled point color mean value does not need to convert gray level image for test paper patch image again, Effective colouring information loss is avoided, the accuracy of identified effectively color is improved, to improve the inspection of urinary fractions concentration Survey accuracy.Certainly, it implements any of the products of the present invention or method must be not necessarily required to reach all the above excellent simultaneously Point.
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 for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of the determination method of effective color in Urine test paper provided in an embodiment of the present invention;
Fig. 2 is the schematic diagram of Urine test paper image;
Fig. 3 is a kind of structural schematic diagram of the determining device of effective color in Urine test paper provided in an embodiment of the present invention;
Fig. 4 is the effectively another structural representation of the determining device of color in Urine test paper provided in an embodiment of the present invention Figure;
Fig. 5 is a kind of structural schematic diagram of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
As shown in Figure 1, the process can the embodiment of the invention provides a kind of determination method of color effective in Urine test paper With the following steps are included:
S101 centered on initial samples point, Urine test paper image is divided into more for acquired Urine test paper image A image-region, each image-region include a test paper patch image.
In the embodiment of the present invention, so it is easy to understand that may include multiple test paper color lump figures in a width Urine test paper image Picture, thus effective color of the embodiment of the present invention determines that method can be for each test paper color lump figure in Urine test paper image Picture.In order to determine that effective color of each test paper color lump, the embodiment of the present invention can will be urinated centered on initial samples point respectively Liquid test paper image is divided into multiple images region, wherein each image-region can have fixed size, also, the figure As including a test paper patch image in region, that is, the partitioning standards of image-region can be in a width Urine test paper image The number of test paper color lump, when test paper color lump number is more, the image-region of division is more;When test paper color lump number is fewer, The image-region of division is fewer.
As shown in Fig. 2, generally comprising a two dimensional code in acquired Urine test paper image, there are four fixed for tool in the two dimensional code Site, for determining the coordinate of Urine test paper image.Therefore, in the coordinate for determining Urine test paper image by four anchor points Afterwards, the initial samples point of above-mentioned each image-region can be easily set according to coordinate.Certainly, there is also three for existing two dimensional code The case where a anchor point, but this has no effect on the determination of Urine test paper image coordinate.In Fig. 2, the color of each test paper color lump passes through The point of different densities indicates that the density of point is higher, shows that the color of the test paper color lump is deeper, and the density of point is lower, shows the examination The color of paper color lump is more shallow.
Image is made of pixel, therefore, can be in image-region during determining initial samples point Initial samples point of some pixel as the image-region.
As a kind of optional embodiment of the embodiment of the present invention, before step S101, available Urine test paper image, And determine the initial samples point of each image-region in Urine test paper image.Specifically, it can will be located at image-region middle position Pixel, be determined as sampled point.In conjunction with coordinate above, for example, if the size of an image-region is 25 × 25, i.e., The image-region is made of 25 × 25 pixels, then can be by the picture at the 13rd column of the 13rd row for being located at the image-region coordinate Vegetarian refreshments is determined as sampled point;If the size of an image-region is 24 × 25, i.e., the image-region is by 24 × 25 pixels It constitutes, then the pixel at the 13rd column of the 12nd row for being located at the image-region coordinate can be determined as sampled point;If one The size of image-region is 25 × 24, i.e. the image-region is made of 25 × 24 pixels, then can will be located at the image district Pixel at the 12nd column of the 13rd row of domain coordinate is determined as sampled point.
As another optional embodiment of the embodiment of the present invention, after step S101, can to each image-region into Row gaussian filtering, the purpose of gaussian filtering are in order to make divided image-region become more smooth, after gaussian filtering Image-region, mathematically, gaussian filtering is the process being weighted and averaged to pixel each in image, thus pass through Image after gaussian filtering, noise are reduced, and intuitively image becomes more smooth.
S102 calculates the color value mean value of pixel in preset range around initial samples point, by gained color value mean value As reference color value.
It, can be to obtain each pixel in the preset range around sampled point after determining sampled point in the embodiment of the present invention Color value.For example, the preset range can be a rectangular area.It is easily understood that image-region is also by pixel Composition, then above-mentioned rectangular area range can be determined as unit of pixel.For example, preset range is 5 × 5, i.e., with sampling Centered on point, rectangular area composed by 25 pixels in total.It should be noted that the occurrence of above-mentioned preset range can be with It is determined with actual samples demand, for example, it is also possible to which above-mentioned preset range is determined as 4 × 4 or 10 × 10.
Each pixel of image-region all has corresponding color value, which can specifically refer to the RGB face of pixel Color value.RGB color, be by red (R), green (G), blue (B) three Color Channels variation and they between each other Superposition to obtain miscellaneous color.Color value mean value is that the color value of each pixel in above-mentioned preset range is asked flat It is being obtained after mean value as a result, reflect the mean size of pixel color value in a certain range, therefore can be calculated above-mentioned The color value mean value arrived is as reference color value.
S103 calculates the color value and reference color of neighbor pixel for each neighbor pixel of initial samples point Value of chromatism between value.
That sampled point has adjacent pixel with being readily appreciated that, specifically, sampled point have 8 it is adjacent Pixel is located at top, upper right, right side, bottom right, lower section, lower-left, left side, the upper left of sampled point.In S102, really Make reference color value, therefore in the present embodiment step, can by the color value of above-mentioned 8 each neighbor pixels respectively with reference Color value is compared, to determine the value of chromatism between the color value of each neighbor pixel and reference color value.
As a kind of optional embodiment of the embodiment of the present invention, which can be calculated by preset formula Color value and reference color value between value of chromatism.
Above-mentioned preset formula are as follows:
In formula, C1Indicate the color value of neighbor pixel;C2Indicate reference color value;C1,RIndicate the color of neighbor pixel The R channel components of value;C2,RIndicate the R channel components of reference color value;C1,GIndicate the channel G point of the color value of neighbor pixel Amount;C2,GIndicate the G channel components of reference color value;C1,BIndicate the channel B component of the color value of neighbor pixel;C2,BIt indicates The channel B component of reference color value; Indicate the Euclidean distance between the color value and reference color value of neighbor pixel, i.e. value of chromatism.
S104 judges whether according to the size relation of the value of chromatism of neighbor pixel and preset threshold by the adjacent pixel Point is as new sampled point.
In the embodiment of the present invention, in the value of chromatism being calculated between the color value of each neighbor pixel and reference color value Later, each value of chromatism can be compared with preset threshold, is determined whether using neighbor pixel as new sampled point.
Above-mentioned preset threshold can be set according to image-region color and the contrast situation of background colour, specifically, work as image When field color and background color contrast are big, then preset threshold is correspondingly set big;When image-region color and background color contrast Hour, then preset threshold is correspondingly set small.As it can be seen that the purpose for changing threshold size is different new of quantity in order to obtain Sampled point.It should be noted that those skilled in the art can sampled point new according to determination when Stringency and image district Domain color and the contrast situation of background colour etc. flexibly set above-mentioned preset threshold, for example, threshold value is set when determining that Stringency is high Fixed is small, and when determining that Stringency is low, threshold value is set big.
As a kind of optional embodiment of the embodiment of the present invention, when the value of chromatism of neighbor pixel is less than preset threshold When, which can be determined as to new sampled point;When the value of chromatism of neighbor pixel is greater than or equal to preset threshold When, then the neighbor pixel is not determined as to new sampled point.
S105 executes each adjacent picture for being directed to initial samples point when neighbor pixel is confirmed as new sampled point Vegetarian refreshments, the step of calculating the value of chromatism between the color value of neighbor pixel and reference color value, until determining image-region In all sampled point.
In the embodiment of the present invention, when neighbor pixel is confirmed as new sampled point, since the new sampled point is same With neighbor pixel, therefore above-mentioned steps S103~S104 can be executed again, to determine in image-region more New sampled point can then determine sampled point all in image-region by constantly calculating.
S106 calculates the color value mean value of identified multiple sampled points, the corresponding color of color value mean value is determined as Effective color of the test paper patch image.
Multiple sampled points are determined, since these multiple sampled points also have corresponding color value, and the color of sampled point It is close, therefore their color value mean value can be calculated again.It, can be by the corresponding face of color value mean value by above-mentioned calculating process Color is determined as effective color of the test paper patch image.
For each test paper patch image in Urine test paper image, can effective color through the embodiment of the present invention it is true Determine method, determines respective effective color.
The determination method of effective color in a kind of Urine test paper provided in an embodiment of the present invention is first with initial samples point Acquired Urine test paper image is divided into multiple images region, then determines effective color for each image-region by the heart, That is, the corresponding color of each sampled point color mean value, does not need to convert gray level image for test paper patch image again, avoid effectively Colouring information loss improves the accuracy of identified effectively color, to improve the detection accuracy of urinary fractions concentration.
A kind of specific embodiment of the determining device of effective color in Urine test paper provided in an embodiment of the present invention, with Fig. 1 Shown process is corresponding, is one kind of the determining device of effective color in the Urine test paper of the embodiment of the present invention with reference to Fig. 3, Fig. 3 Structural schematic diagram, comprising:
Region division module 201, for being directed to acquired Urine test paper image, centered on initial samples point, by urine Test paper image is divided into multiple images region, and each image-region includes a test paper patch image.
Color value mean value computation module 202, for calculating the color value of pixel in preset range around initial samples point Mean value, using gained color value mean value as reference color value.
Value of chromatism computing module 203 calculates neighbor pixel for being directed to each neighbor pixel of initial samples point Value of chromatism between color value and reference color value.
Judgment module 204, for according to the value of chromatism of neighbor pixel and the size relation of preset threshold, judge whether by The neighbor pixel is as new sampled point.
Sampled point determining module 205, for promoting value of chromatism to calculate when neighbor pixel is confirmed as new sampled point Module 203 executes each neighbor pixel for being directed to initial samples point, calculates the color value and reference color value of neighbor pixel Between value of chromatism the step of, until determine sampled point all in image-region.
Effective color determination module 206, it is for calculating the color value mean value of identified multiple sampled points, color value is equal It is worth effective color that corresponding color is determined as the test paper patch image.
Optionally, on the basis of apparatus structure shown in Fig. 3, with reference to Fig. 4, the device further include:
Initial samples point determining module 207 for obtaining Urine test paper image, and determines in Urine test paper image, each to scheme As the initial samples point in region.
Gaussian filtering module 208, for carrying out gaussian filtering to image-region.
Optionally, above-mentioned value of chromatism computing module 203, is specifically used for:
By preset formula, the value of chromatism between the color value of the neighbor pixel and reference color value is calculated.
Above-mentioned preset formula are as follows:
In formula, C1Indicate the color value of neighbor pixel;C2Indicate reference color value;C1,RIndicate the color of neighbor pixel The R channel components of value;C2,RIndicate the R channel components of reference color value;C1,GIndicate the channel G point of the color value of neighbor pixel Amount;C2,GIndicate the G channel components of reference color value;C1,BIndicate the channel B component of the color value of neighbor pixel;C2,BIt indicates The channel B component of reference color value;
Indicate the Euclidean distance between the color value and reference color value of neighbor pixel, i.e. value of chromatism.
Optionally, above-mentioned judgment module 204, is specifically used for:
When the value of chromatism of neighbor pixel is less than preset threshold, neighbor pixel is determined as to new sampled point.
Optionally, above-mentioned initial samples point determining module 207, is specifically used for:
For each image-region in Urine test paper image, the pixel in image-region middle position will be located at, be determined as Initial samples point.
The determining device of effective color in a kind of Urine test paper provided in an embodiment of the present invention is first with initial samples point Acquired Urine test paper image is divided into multiple images region, then determines effective color for each image-region by the heart, That is, the corresponding color of each sampled point color mean value, does not need to convert gray level image for test paper patch image again, avoid effectively Colouring information loss improves the accuracy of identified effectively color, to improve the detection accuracy of urinary fractions concentration.
The embodiment of the invention also provides a kind of electronic equipment, as shown in figure 5, include processor 301, communication interface 302, Memory 303 and communication bus 304, wherein processor 301, communication interface 302, memory 303 are complete by communication bus 304 At mutual communication,
Memory 303, for storing computer program;
Processor 301 when for executing the program stored on memory 303, realizes following steps:
For acquired Urine test paper image, centered on initial samples point, Urine test paper image is divided into multiple figures As region, each image-region includes a test paper patch image;
The color value mean value for calculating pixel in preset range around initial samples point, using gained color value mean value as ginseng Examine color value;
For each neighbor pixel of initial samples point, calculate between the color value of neighbor pixel and reference color value Value of chromatism;
According to the size relation of the value of chromatism of neighbor pixel and preset threshold, judge whether using the neighbor pixel as New sampled point;
When neighbor pixel is confirmed as new sampled point, each neighbor pixel for being directed to initial samples point is executed, The step of calculating the value of chromatism between the color value and reference color value of neighbor pixel, until determining own in image-region Sampled point;
The color value mean value of multiple sampled points determined by calculating, is determined as the test paper for the corresponding color of color value mean value Effective color of patch image.
Electronic equipment provided in an embodiment of the present invention, first centered on initial samples point, by acquired Urine test paper figure Effective color is determined as being divided into multiple images region, then for each image-region, that is, each sampled point color mean value is corresponding Color does not need to convert gray level image for test paper patch image again, avoids effective colouring information and loses, determined by raising The accuracy of effective color, to improve the detection accuracy of urinary fractions concentration.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, abbreviation PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, abbreviation EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc.. Only to be indicated with a thick line in figure, it is not intended that an only bus or a type of bus convenient for indicating.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, abbreviation RAM), also may include Nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.Optionally, memory may be used also To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, Abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (Digital Signal Processing, abbreviation DSP), specific integrated circuit (Application Specific Integrated Circuit, abbreviation ASIC), field programmable gate array (Field-Programmable Gate Array, Abbreviation FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components.
The embodiment of the invention also provides a kind of computer readable storage medium, it is stored in computer readable storage medium Computer program, to execute following steps:
For acquired Urine test paper image, centered on initial samples point, Urine test paper image is divided into multiple figures As region, each image-region includes a test paper patch image;
The color value mean value for calculating pixel in preset range around initial samples point, using gained color value mean value as ginseng Examine color value;
For each neighbor pixel of initial samples point, calculate between the color value of neighbor pixel and reference color value Value of chromatism;
According to the size relation of the value of chromatism of neighbor pixel and preset threshold, judge whether using the neighbor pixel as New sampled point;
When neighbor pixel is confirmed as new sampled point, each neighbor pixel for being directed to initial samples point is executed, The step of calculating the value of chromatism between the color value and reference color value of neighbor pixel, until determining own in image-region Sampled point;
The color value mean value of multiple sampled points determined by calculating, is determined as the test paper for the corresponding color of color value mean value Effective color of patch image.
Computer readable storage medium provided in an embodiment of the present invention will be acquired first centered on initial samples point Urine test paper image is divided into multiple images region, then determines effective color for each image-region, that is, each sampled point color The corresponding color of mean value does not need to convert gray level image for test paper patch image again, avoids effective colouring information loss, mentions The accuracy of effective color determined by height, to improve the detection accuracy of urinary fractions concentration.
For device/electronic equipment/storage medium embodiment, since it is substantially similar to the method embodiment, so It is described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
It should be noted that the device of the embodiment of the present invention, electronic equipment and storage medium are using above-mentioned urine respectively Device, electronic equipment and the storage medium of the determination method of effective color in test paper, then effective color in above-mentioned Urine test paper It determines that all embodiments of method are suitable for the device, electronic equipment and storage medium, and can reach the same or similar Beneficial effect.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or equipment for including a series of elements not only includes those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or equipment institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including institute State in the process, method, article or equipment of element that there is also other identical elements.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (10)

1. a kind of determination method of effective color in Urine test paper, which is characterized in that the described method includes:
For acquired Urine test paper image, centered on initial samples point, the Urine test paper image is divided into multiple figures As region, each described image region includes a test paper patch image;
The color value mean value for calculating pixel in preset range around the initial samples point, using gained color value mean value as ginseng Examine color value;
For each neighbor pixel of the initial samples point, the color value for calculating the neighbor pixel refers to face with described Value of chromatism between color value;
According to the size relation of the value of chromatism of the neighbor pixel and preset threshold, judge whether using the neighbor pixel as New sampled point;
When the neighbor pixel is confirmed as new sampled point, execute described for each adjacent of the initial samples point Pixel, the step of calculating the value of chromatism between the color value of the neighbor pixel and the reference color value, until determining Sampled point all in described image region out;
The color value mean value of multiple sampled points determined by calculating, is determined as the test paper for the corresponding color of the color value mean value Effective color of patch image.
2. the method according to claim 1, wherein described be directed to acquired Urine test paper image, initially to adopt Centered on sampling point, before the Urine test paper image is divided into multiple images region, the method also includes:
Urine test paper image is obtained, and is determined in the Urine test paper image, the initial samples point of each image-region.
3. the method according to claim 1, wherein described be directed to acquired Urine test paper image, initially to adopt Centered on sampling point, after the Urine test paper image is divided into multiple images region, the method also includes: to described image Region carries out gaussian filtering.
4. the method according to claim 1, wherein each adjacent pixel for the initial samples point Point calculates the value of chromatism between the color value of the neighbor pixel and the reference color value, comprising:
By preset formula, the value of chromatism between the color value of the neighbor pixel and the reference color value is calculated;
The preset formula are as follows:
In formula, C1Indicate the color value of the neighbor pixel;C2Indicate the reference color value;C1, RIndicate the adjacent pixel The R channel components of the color value of point;C2, RIndicate the R channel components of the reference color value;C1, GIndicate the neighbor pixel Color value G channel components;C2, GIndicate the G channel components of the reference color value;C1, BIndicate the neighbor pixel The channel B component of color value;C2, BIndicate the channel B component of the reference color value;
Indicate the Euclidean distance between the color value of the neighbor pixel and the reference color value, i.e. value of chromatism.
5. the method according to claim 1, wherein the value of chromatism according to the neighbor pixel and default The size relation of threshold value judges whether using the neighbor pixel as new sampled point, comprising:
When the value of chromatism of the neighbor pixel is less than the preset threshold, the neighbor pixel is determined as to new sampling Point.
6. according to the method described in claim 2, it is characterized in that, in the determination Urine test paper image, each image district The initial samples point in domain, comprising:
For each image-region in the Urine test paper image, the pixel in described image region middle position will be located at, really It is set to the initial samples point.
7. the determining device of effective color in a kind of Urine test paper, which is characterized in that described device includes:
Region division module, for being directed to acquired Urine test paper image, centered on initial samples point, by the Urine test paper Image is divided into multiple images region, and each described image region includes a test paper patch image;
Color value mean value computation module, the color value for calculating pixel in preset range around the initial samples point are equal Value, using gained color value mean value as reference color value;
Value of chromatism computing module calculates the neighbor pixel for being directed to each neighbor pixel of the initial samples point Color value and the reference color value between value of chromatism;
Judgment module, for according to the value of chromatism of the neighbor pixel and the size relation of preset threshold, judging whether should Neighbor pixel is as new sampled point;
Sampled point determining module, for when the neighbor pixel is confirmed as new sampled point, promoting value of chromatism to calculate mould Block executes each neighbor pixel for being directed to the initial samples point, calculate the color value of the neighbor pixel with it is described The step of value of chromatism between reference color value, until determining sampled point all in described image region;
Effective color determination module, for calculating the color value mean value of identified multiple sampled points, by the color value mean value Corresponding color is determined as effective color of the test paper patch image.
8. device according to claim 7, which is characterized in that described device further include:
Initial samples point determining module for obtaining Urine test paper image, and determines in the Urine test paper image, each image district The initial samples point in domain.
9. a kind of electronic equipment, which is characterized in that including processor, communication interface, memory and communication bus, wherein described Processor, the communication interface, the memory complete mutual communication by the communication bus;
The memory, for storing computer program;
The processor when for executing the program stored on memory, realizes method described in any one of claims 1-6 Step.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium Program, the computer program realize method and step described in any one of claims 1-6 when being executed by processor.
CN201810556166.XA 2018-06-01 2018-06-01 Method and device for determining effective color in urine test paper Expired - Fee Related CN108961345B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810556166.XA CN108961345B (en) 2018-06-01 2018-06-01 Method and device for determining effective color in urine test paper

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810556166.XA CN108961345B (en) 2018-06-01 2018-06-01 Method and device for determining effective color in urine test paper

Publications (2)

Publication Number Publication Date
CN108961345A true CN108961345A (en) 2018-12-07
CN108961345B CN108961345B (en) 2021-02-23

Family

ID=64493311

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810556166.XA Expired - Fee Related CN108961345B (en) 2018-06-01 2018-06-01 Method and device for determining effective color in urine test paper

Country Status (1)

Country Link
CN (1) CN108961345B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109557093A (en) * 2018-12-18 2019-04-02 无锡益诺华科技发展有限公司 A kind of urine detection test paper color measuring algorithm
CN109685860A (en) * 2019-01-10 2019-04-26 青岛浦利医疗技术有限公司 Floccule color determines method and device
CN111243038A (en) * 2020-01-07 2020-06-05 西安芯瞳半导体技术有限公司 Graph comparison method and device based on color features and computer storage medium
CN111579505A (en) * 2020-04-23 2020-08-25 河南中烟工业有限责任公司 Cigarette packaging material color difference detection method based on digital image processing
CN113791065A (en) * 2021-09-10 2021-12-14 北京君征医疗科技有限公司 Test paper based on two-dimensional coding positioning and interpretation method
CN115309922A (en) * 2022-10-10 2022-11-08 露乐健康科技股份有限公司 Method for establishing test paper database and test paper detection method based on database

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101726251A (en) * 2009-11-13 2010-06-09 江苏大学 Automatic fruit identification method of apple picking robot on basis of support vector machine
CN104964973A (en) * 2015-07-08 2015-10-07 邓双胜 Test paper reading and analyzing method and system based on mobile terminal camera
CN105388147A (en) * 2015-10-21 2016-03-09 深圳市宝凯仑生物科技有限公司 Detection method for body fluid based on special test paper
CN105913441A (en) * 2016-04-27 2016-08-31 四川大学 Shadow removal method for improving target detection performance in video
CN106546581A (en) * 2016-11-02 2017-03-29 长沙云知检信息科技有限公司 Detection paper card intelligent checking system and detection paper card intelligent analysis method
CN107799184A (en) * 2017-11-05 2018-03-13 厦门波耐模型设计有限责任公司 A kind of self-service detection technique scheme of excreta and its implementation
CN107807121A (en) * 2017-10-20 2018-03-16 北京小米移动软件有限公司 The determination method and apparatus of testing result

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101726251A (en) * 2009-11-13 2010-06-09 江苏大学 Automatic fruit identification method of apple picking robot on basis of support vector machine
CN104964973A (en) * 2015-07-08 2015-10-07 邓双胜 Test paper reading and analyzing method and system based on mobile terminal camera
CN105388147A (en) * 2015-10-21 2016-03-09 深圳市宝凯仑生物科技有限公司 Detection method for body fluid based on special test paper
CN105913441A (en) * 2016-04-27 2016-08-31 四川大学 Shadow removal method for improving target detection performance in video
CN106546581A (en) * 2016-11-02 2017-03-29 长沙云知检信息科技有限公司 Detection paper card intelligent checking system and detection paper card intelligent analysis method
CN107807121A (en) * 2017-10-20 2018-03-16 北京小米移动软件有限公司 The determination method and apparatus of testing result
CN107799184A (en) * 2017-11-05 2018-03-13 厦门波耐模型设计有限责任公司 A kind of self-service detection technique scheme of excreta and its implementation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WANG CHUNHONG ET AL: "Research on Color Recognition of Urine Test Paper Based on Learning Vector Quantization (LVQ)", 《2012 SECOND INTERNATIONAL CONFERENCE ON INSTRUMENTATION, MEASUREMENT, COMPUTER, COMMUNICATION AND CONTROL》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109557093A (en) * 2018-12-18 2019-04-02 无锡益诺华科技发展有限公司 A kind of urine detection test paper color measuring algorithm
CN109685860A (en) * 2019-01-10 2019-04-26 青岛浦利医疗技术有限公司 Floccule color determines method and device
CN109685860B (en) * 2019-01-10 2020-12-01 青岛浦利医疗技术有限公司 Floccule color determination method and device
CN111243038A (en) * 2020-01-07 2020-06-05 西安芯瞳半导体技术有限公司 Graph comparison method and device based on color features and computer storage medium
CN111243038B (en) * 2020-01-07 2024-02-09 芯瞳半导体技术(山东)有限公司 Graphic comparison method and device based on color characteristics and computer storage medium
CN111579505A (en) * 2020-04-23 2020-08-25 河南中烟工业有限责任公司 Cigarette packaging material color difference detection method based on digital image processing
CN113791065A (en) * 2021-09-10 2021-12-14 北京君征医疗科技有限公司 Test paper based on two-dimensional coding positioning and interpretation method
CN115309922A (en) * 2022-10-10 2022-11-08 露乐健康科技股份有限公司 Method for establishing test paper database and test paper detection method based on database

Also Published As

Publication number Publication date
CN108961345B (en) 2021-02-23

Similar Documents

Publication Publication Date Title
CN108961345A (en) A kind of effective determination method and determining device of color in Urine test paper
CN108470334B (en) Method and device for collecting screen brightness and chromaticity
CN104853379B (en) A kind of quality of wireless network appraisal procedure and device
CN105069453A (en) Image correction method and apparatus
CN106412573A (en) Method and device for detecting lens stain
CN102980535B (en) Angle measurement method and device
CN108593645A (en) A kind of testing result of Urine test paper determines method and determining device
CN103559484B (en) The method for quickly identifying of measuring instrument graduation mark
US9064314B2 (en) Robust automatic determination and location of MacBeth color checker charts
CN104794704A (en) Calibration template and template detection method, device and terminal
CN106899985A (en) The appraisal procedure and device of a kind of network coverage
CN111640095B (en) Quantification method of cerebral micro hemorrhage and computer readable storage medium
CN110490839A (en) The method, apparatus and computer equipment of failure area in a kind of detection highway
CN105869175A (en) Image segmentation method and system
CN109639496A (en) A kind of localization method and device in radio network problems region
CN104553302B (en) A kind of grey balance calibration steps and device
CN104240228A (en) Detecting method and device for specific pictures applied to website
CN103175834A (en) Method and system for evaluating quality of digital pathological section
CN115063342A (en) Lens dead pixel detection method and device, electronic equipment and storage medium
CN106204531B (en) A kind of method of noise and marginal point in synchronous sense colors image
CN112465780B (en) Method and device for monitoring abnormal film thickness of insulating layer
CN112017163B (en) Image ambiguity detection method, device, electronic equipment and storage medium
CN109982368A (en) The azimuthal check method of cell, device, equipment and medium
WO2017080295A1 (en) Element positioning method and system
CN113838146B (en) Method and device for verifying calibration precision of camera module and testing camera module

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210223