CN110412257B - Test paper block positioning method combining manual calibration and star ray algorithm - Google Patents

Test paper block positioning method combining manual calibration and star ray algorithm Download PDF

Info

Publication number
CN110412257B
CN110412257B CN201910660135.3A CN201910660135A CN110412257B CN 110412257 B CN110412257 B CN 110412257B CN 201910660135 A CN201910660135 A CN 201910660135A CN 110412257 B CN110412257 B CN 110412257B
Authority
CN
China
Prior art keywords
test paper
paper block
image
ray
algorithm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910660135.3A
Other languages
Chinese (zh)
Other versions
CN110412257A (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.)
Shenzhen Fangfangbao Technology Co ltd
Original Assignee
Shenzhen Fangfangbao 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 Fangfangbao Technology Co ltd filed Critical Shenzhen Fangfangbao Technology Co ltd
Priority to CN201910660135.3A priority Critical patent/CN110412257B/en
Publication of CN110412257A publication Critical patent/CN110412257A/en
Application granted granted Critical
Publication of CN110412257B publication Critical patent/CN110412257B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/48Biological material, e.g. blood, urine; Haemocytometers
    • G01N33/50Chemical analysis of biological material, e.g. blood, urine; Testing involving biospecific ligand binding methods; Immunological testing
    • G01N33/52Use of compounds or compositions for colorimetric, spectrophotometric or fluorometric investigation, e.g. use of reagent paper and including single- and multilayer analytical elements

Abstract

The invention discloses a test paper block positioning method combining manual calibration and a star ray algorithm. The method can conveniently realize the positioning of the dry chemical test paper block in the image shot by the urine detector by simultaneously combining a manual mode and an algorithm automatic mode. The method specifically comprises the following steps: firstly, setting a default monitoring area in an image; secondly, manually clicking to obtain the initial central position of the image acquisition frame; thirdly, automatically detecting the edge position of the test paper block by using a star ray algorithm; and fourthly, manually adjusting and optimizing the accurate edge position of the test paper block in the later period. The invention provides a convenient and accurate method, which can quickly realize the accurate positioning of the test paper block in the test paper image.

Description

Test paper block positioning method combining manual calibration and star ray algorithm
Technical Field
The invention relates to the field of health management, in particular to a test paper block positioning method combining manual calibration and a star ray algorithm.
Background
With the improvement of the living standard and the change of the living style of people at present, the number of people suffering from chronic non-infectious diseases is rapidly increased, and the early screening and daily management of the chronic diseases become a great problem and challenge for family health and public health; by adding the reagent blocks for detecting multiple indexes of a body on the test strip, the health condition of the human body can be accurately judged, and the test strip has good clinical significance for screening and monitoring kidney function, liver function, inflammation, diabetes and other diseases.
The urine detection by using the test paper is a common method for medical detection, and mainly comprises the steps of adding a chemical reagent on a reagent block, carrying out chemical reaction with human secretion substances in urine to generate color change, judging the content of corresponding substances in the urine according to the color change condition and degree of the reagent block, and further detecting and judging diseases; the test paper has the advantages of convenience, rapidness, no pain, no wound, low cost, simple operation and the like, and increasingly becomes the first choice for disease screening and daily detection.
The current technology for analyzing the urine test paper mainly comprises the steps of shooting an image through a camera or reading a color value through a color sensor, analyzing and matching the image and the color value, finding out corresponding index content concentration, matching corresponding suspected symptoms, treatment suggestions and the like, and therefore, the accuracy of image acquisition and reagent block positioning for subsequent judgment is important.
The method for shooting images by using a camera (or a smart phone) to identify colors in the current market has the following defects:
1. during each detection, the positions of the test strip and the test paper block are slightly changed, and the image can not be directly cut by adopting a fixed position method. Therefore, inaccurate cutting is likely to occur, which leads to incomplete test paper blocks, or the non-test paper block is introduced to cause inaccurate detection results;
2. by adopting the method of reducing the cutting frame, a large number of useful pixels on the test paper block are wasted, and the calculation of the color average value is not accurate;
3. the color segmentation method is adopted in the image to obtain the test paper block, so that errors are easily caused by the interference of color cast and shadow of the camera;
4. and calculating the position of the test paper block by using a projection method, and requiring that the test paper blocks in each line are aligned with high precision. Some deviation leads to incorrect algorithm results;
5. optical lenses, especially fisheye lenses, are subject to radial distortion of varying degrees; at this time, the method of positioning the test block based on the line detection, the gradient projection, and the like in the image is ineffective. Also, due to small amplitude position variations of the test pieces, it is difficult to predict the distortion amplitude for each test piece.
Aiming at the problems, the patent provides a test paper block positioning method combining manual calibration and a star ray algorithm. The method combines the advantages of high precision of human eyes and automatic detection of the algorithm on the premise of ensuring that the user experience is not influenced. The method can realize rapid, convenient and accurate positioning of the outer frame of the test paper block.
Disclosure of Invention
The invention aims to provide a test paper block positioning method combining manual calibration and a star ray algorithm aiming at the defects and shortcomings of the prior art. In order to achieve the purpose, the invention adopts the technical scheme that: a test paper block positioning method combining manual calibration and a star ray algorithm comprises the following modules: setting a default monitoring area in the test paper image, manually clicking to obtain the initial central position of the image acquisition frame, automatically detecting the edge of the test paper block by using a star ray algorithm, and manually adjusting and optimizing the edge position of the test paper block at the later stage.
Further, the test paper block positioning method combining manual calibration and the star ray algorithm comprises the following steps of: the position of the area range where the test strip is located is recorded in advance through manual observation, then the area position coordinates are stored, when the test strip image is displayed on a mobile phone, the original image is directly cut and displayed according to the position coordinates, and the area except the test strip block is removed.
Further, the test paper block positioning method combining manual calibration and the star ray algorithm comprises the following steps of automatically detecting the edges of the test paper blocks by using the star ray algorithm: 1) converting the color image into a grayscale image; 2) emitting 18 rays to the periphery at the initial central point position of the test paper block obtained in the previous step, wherein the included angle of each ray is 20 degrees; 3) for the current ray LiTraversing the image pixel by pixel outward along the ray direction starting from the center point 0; 4) along the ray LiWhen the image passes through the central point 0 to four weeks, once the gradient value of the pixel is larger than the threshold value, a key point is obtained; 5) connecting all 18 key points to obtain the outer boundary of the test paper block; 6) tong (Chinese character of 'tong')And analyzing the positions of the key points to obtain the external boundary coordinates of the test paper block.
1) Further, the test paper block positioning method combining manual calibration and the star ray algorithm comprises the following steps of manually adjusting and optimizing the edge position of the test paper block in the later stage: for test paper blocks which are not accurately positioned by a star ray algorithm under the condition of few cases, the procedure of optimizing the external boundary of the test paper blocks through manual adjustment in the later stage is as follows: 1) the position of the outer frame of the test paper block is integrally moved through fingertip touch; 2) and (4) carrying out accurate position adjustment on each boundary of the outer frame of each test paper block by using fingers, so that each boundary is completely overlapped with the real boundary.
Compared with the prior art, the invention has the beneficial effects that: on the premise of ensuring that the user experience is not influenced, the method combines the advantages of high accuracy of human eyes and automatic detection of an algorithm. The method can realize rapid, convenient and accurate positioning of the outer frame of the test paper block.
Drawings
FIG. 1 is a schematic block diagram of the present invention;
FIG. 2 is a schematic diagram of the intersection of 18 equiangular rays emitted from the touch point and a location of greater image gradient values;
FIG. 3 is a schematic diagram of a screen showing a red dot form when an initial center is manually clicked;
FIG. 4 is a schematic diagram of manually adjusting the outer boundary of a test block to coincide with a real boundary;
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Examples
Referring to fig. 1, a test paper block positioning method combining manual calibration and a star ray algorithm includes the following modules: the method comprises the steps of setting a module 1 of a default monitoring area in an image, manually clicking a module 2 of obtaining an initial central position of an image acquisition frame, automatically detecting an edge position of a test paper block by utilizing a star ray algorithm, and manually adjusting and optimizing an accurate edge position of the test paper block at a later stage by utilizing a star ray algorithm, wherein the modules are sequentially connected.
The module 1 for setting the default monitoring area in the image means that before the urine detector is used, the possible range of the area where the test strip is located is recorded by manually arranging the test strip and shooting the image for many times in advance through manual observation, and then the position coordinates of the area are stored. When the test paper strip image is displayed on the mobile phone, the original image is directly cut and displayed according to the position coordinates of the area range, and the area except the test paper block is removed. By cutting the image, the content of the test paper image displayed on the mobile phone can be all key areas most concerned by the user, so that the size of the test paper block on the mobile phone screen is enlarged to the utmost extent. When manual interaction is carried out in subsequent steps, the operation difficulty can be reduced, and the position accuracy is improved.
The module 2 for obtaining the initial central position of the image acquisition frame through manual clicking means that a user obtains the initial central position of the outer frame corresponding to each test paper block through manual clicking on a mobile phone screen. The specific process is as follows: the user touches the screen of the smart phone through the finger tip and clicks the approximate center position of each test paper block in the image. The system automatically records the center position point and displays the center position point in a red dot form on the screen of the mobile phone. Then, the user verifies by the human eye whether the center position is within the test block area. If yes, the selection of the center point of the test paper block is finished. Otherwise, the test paper block needs to be clicked again for selection. If the phenomenon that the central point of a certain test paper block is missed is observed, supplementary calibration is needed. If the position of a certain central point is observed to be more than a threshold value (40% of the width value of the test paper block) away from the real central position of the test paper block, the position of the central point is adjusted through manual movement.
The module 3 for automatically detecting the edge position of the test paper block by using the star ray algorithm is used for automatically detecting the edge of the test paper block by using the star ray algorithm, and as shown in fig. 2, the specific flow is as follows:
1) converting the color image of the test strip shot by the urine detector into a gray image (the conversion process is known and not described any further);
2) and emitting 18 rays to the periphery on the basis of the position of the initial central point of each test paper block obtained by manual marking. The included angle between every two adjacent rays is 20 degrees, the included angles are uniformly distributed, and the included angles sequentially have the following values according to the anticlockwise direction: 0 °, 20 °, 40 °, 60 °, 80 °, 100 °, 120 °, 140 °, 160 °, 180 °, 200 °, 220 °, 240 °, 260 °, 280 °, 300 °, 320 °, 340 °;
3) for the current ray LiAnd traversing the gray level image from the central point 0 to the periphery pixel by pixel along the ray direction, and calculating the gradient amplitude of the position of each pixel point. The gradient magnitude is calculated as follows:
Figure GDA0003573343470000061
wherein G (x, y) represents a gradient magnitude at an (x, y) location in the image; i (x, y) represents the pixel intensity value at the (x, y) position in the image;
4) setting gradient threshold for edge detection
Figure GDA0003573343470000062
Along the current ray LiWhen going outward from the center point o, the first pixel satisfying the following condition is encountered, and it is considered as the key point KiThat is, the position of the boundary of the test paper block:
Figure GDA0003573343470000063
5) all the key points K of the raysiAnd connecting in the counterclockwise direction to obtain a group of contour point sequences. The contour point sequence is the outer boundary of the test paper block;
6) in the contour point sequence, finding out contour points respectively positioned at the top, the bottom, the left and the right, thereby further obtaining the positions of four edges of the rectangular outer frame of the test paper block;
the module 4 for manually adjusting and optimizing the accurate edge position of the test paper block in the later period refers to the phenomenon that for few situations, the star ray algorithm detects that the edge of the test paper block is abnormal, so that key points on the edge are lost or the positioning is inaccurate. At this time, the detection frame can be manually adjusted to compensate. The specific process is as follows:
1) integrally moving a frame rectangle of a certain test paper block to enable the center point of the frame rectangle to be superposed with the real center position of the test paper block;
2) for each test paper block rectangular frame, if a certain boundary of the test paper block rectangular frame is not coincident with the real boundary, a finger is used for touching and moving on a mobile phone interface, and the position of the boundary to the real boundary is manually adjusted to realize coincidence;
3) and storing the position information of all the frames, and thus, completing the test paper block positioning method.

Claims (5)

1. A test paper block positioning method combining manual calibration and a star ray algorithm is characterized in that a default monitoring area is calculated and set in a test paper image, and the method comprises the following modules:
(1) manually clicking to obtain the initial central position of the image acquisition frame;
(2) automatically detecting the edge of the test paper block by using a star ray algorithm; the star ray algorithm is characterized in that: the process for automatically detecting the edges of the test paper blocks by using the star ray algorithm comprises the following steps: 1) converting the color image into a grayscale image; 2) emitting 18 rays to the periphery at the initial central point position of the test paper block obtained in the previous step, wherein the included angle of each ray is 20 degrees; 3) for the current ray LiTraversing the image pixel by pixel outward along the ray direction starting from the center point 0; 4) along the ray LiWhen the image passes through the central point 0 to four weeks, once the gradient value of the pixel is larger than the threshold value, a key point is obtained; 5) connecting all 18 key points to obtain the outer boundary of the test paper block; 6) by passingAnalyzing the position of the key point to obtain the external boundary coordinate of the test paper block;
(3) manually adjusting and optimizing the edge position of the test paper block at the later stage;
(4) the modules are connected in sequence.
2. The test paper block positioning method combining manual calibration and a star ray algorithm according to claim 1, wherein: the user operates according to the following flow: firstly, setting an area where a test paper block is located on a smart phone according to a pre-stored position, and cutting off images outside the area; then, clicking the center position of each test paper block on a mobile phone screen through fingertip touch to obtain the approximate position of the test paper block; then, an automated positioning algorithm, the star ray algorithm, is started to be run; the method takes the initial central point of each test paper block as a starting point, and emits 18 rays with equal included angles to the periphery; stopping each ray when the ray touches the boundary of the test paper block to obtain a key point; then connecting all 18 key points to obtain a rectangular boundary of the test paper block; finally, manually calibrating the boundary positioning result of the star ray algorithm for the first time, and finely adjusting the boundary of the test paper block to obtain a final result.
3. The test paper block positioning method combining manual calibration and a star ray algorithm according to claim 1, wherein: the process of setting the default image monitoring area comprises the following steps: the position of the area range where the test strip is located is recorded in advance through manual observation, then the area position coordinates are stored, when the test strip image is displayed on a mobile phone, the original image is directly cut and displayed according to the position coordinates, and the area except the test strip block is removed.
4. The test paper block positioning method combining manual calibration and a star ray algorithm according to claim 1, wherein: the process of manually clicking to obtain the initial central position of the image acquisition frame comprises the following steps: a user touches a screen of the smart phone through a fingertip, clicks the approximate center position of each test paper block, records the center position point, and displays the center position point in a red dot form on the screen of the smart phone; the user can verify whether the central position is in the test paper block area or not by eyes or whether the test paper block is missing or not, and then delete or supplement the test paper block in a targeted manner or adjust the central position by manual movement.
5. The test paper block positioning method combining manual calibration and a star ray algorithm according to claim 1, wherein: for test paper blocks which are not accurately positioned by a star ray algorithm under the condition of few cases, the procedure of optimizing the external boundary of the test paper blocks through manual adjustment in the later stage is as follows: 1) the position of the outer frame of the test paper block is integrally moved through fingertip touch; 2) and (4) carrying out accurate position adjustment on each boundary of the outer frame of each test paper block by using fingers, so that each boundary is completely overlapped with the real boundary.
CN201910660135.3A 2019-07-22 2019-07-22 Test paper block positioning method combining manual calibration and star ray algorithm Active CN110412257B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910660135.3A CN110412257B (en) 2019-07-22 2019-07-22 Test paper block positioning method combining manual calibration and star ray algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910660135.3A CN110412257B (en) 2019-07-22 2019-07-22 Test paper block positioning method combining manual calibration and star ray algorithm

Publications (2)

Publication Number Publication Date
CN110412257A CN110412257A (en) 2019-11-05
CN110412257B true CN110412257B (en) 2022-05-03

Family

ID=68362263

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910660135.3A Active CN110412257B (en) 2019-07-22 2019-07-22 Test paper block positioning method combining manual calibration and star ray algorithm

Country Status (1)

Country Link
CN (1) CN110412257B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112287065B (en) * 2020-12-30 2021-03-09 成都四方伟业软件股份有限公司 Method and device for solving dotting and penetrating problems of large Unity3D model
CN112581474B (en) * 2021-02-22 2021-05-18 常州微亿智造科技有限公司 Industrial component visual edge detection method based on sinusoidal scanning
CN112767428A (en) * 2021-03-15 2021-05-07 宁波明星科技发展有限公司 Artificial auxiliary positioning method for image edge

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103076876A (en) * 2012-11-22 2013-05-01 西安电子科技大学 Character input device and method based on eye-gaze tracking and speech recognition
CN103901175A (en) * 2014-04-23 2014-07-02 爱威科技股份有限公司 Test paper location method and system
CN103927014A (en) * 2014-04-21 2014-07-16 广州杰赛科技股份有限公司 Character input method and device
CN105388147A (en) * 2015-10-21 2016-03-09 深圳市宝凯仑生物科技有限公司 Detection method for body fluid based on special test paper
CN106168853A (en) * 2016-06-23 2016-11-30 中国科学技术大学 A kind of free space wear-type gaze tracking system
CN106546581A (en) * 2016-11-02 2017-03-29 长沙云知检信息科技有限公司 Detection paper card intelligent checking system and detection paper card intelligent analysis method
CN108205395A (en) * 2018-01-16 2018-06-26 安徽慧视金瞳科技有限公司 A kind of calibration point centre coordinate precise positioning method
CN109900688A (en) * 2019-03-08 2019-06-18 深圳市象形字科技股份有限公司 A kind of indicator paper block of the accurate positioning of urine detection
CN109978780A (en) * 2019-03-12 2019-07-05 深圳市象形字科技股份有限公司 A kind of uroscopy instrument test paper image color correction method
CN110007068A (en) * 2019-03-25 2019-07-12 桂林优利特医疗电子有限公司 A kind of urine drip detection method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2457462B (en) * 2008-02-13 2012-11-14 Leif Levon Display lamp device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103076876A (en) * 2012-11-22 2013-05-01 西安电子科技大学 Character input device and method based on eye-gaze tracking and speech recognition
CN103927014A (en) * 2014-04-21 2014-07-16 广州杰赛科技股份有限公司 Character input method and device
CN103901175A (en) * 2014-04-23 2014-07-02 爱威科技股份有限公司 Test paper location method and system
CN105388147A (en) * 2015-10-21 2016-03-09 深圳市宝凯仑生物科技有限公司 Detection method for body fluid based on special test paper
CN106168853A (en) * 2016-06-23 2016-11-30 中国科学技术大学 A kind of free space wear-type gaze tracking system
CN106546581A (en) * 2016-11-02 2017-03-29 长沙云知检信息科技有限公司 Detection paper card intelligent checking system and detection paper card intelligent analysis method
CN108205395A (en) * 2018-01-16 2018-06-26 安徽慧视金瞳科技有限公司 A kind of calibration point centre coordinate precise positioning method
CN109900688A (en) * 2019-03-08 2019-06-18 深圳市象形字科技股份有限公司 A kind of indicator paper block of the accurate positioning of urine detection
CN109978780A (en) * 2019-03-12 2019-07-05 深圳市象形字科技股份有限公司 A kind of uroscopy instrument test paper image color correction method
CN110007068A (en) * 2019-03-25 2019-07-12 桂林优利特医疗电子有限公司 A kind of urine drip detection method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种改进的基于人脸图像的瞳孔精确检测方法;姜太平 等;《小型微型计算机系统》;20180415;第39卷(第4期);第842-846页 *

Also Published As

Publication number Publication date
CN110412257A (en) 2019-11-05

Similar Documents

Publication Publication Date Title
CN110412257B (en) Test paper block positioning method combining manual calibration and star ray algorithm
CN109859203B (en) Defect tooth image identification method based on deep learning
US11315245B2 (en) Semi-automated system for real-time wound image segmentation and photogrammetry on a mobile platform
CN104200480B (en) A kind of image blur evaluation method and system applied to intelligent terminal
WO2017067023A1 (en) Method for detecting body fluid based on special test paper
CN104132897B (en) A kind of nitrogenous measuring method of plant leaf blade based on handheld device and device
WO2020108225A1 (en) Fingerprint acquisition method and related apparatus
US9468377B2 (en) Portable medical device and method for quantitative retinal image analysis through a smartphone
US8285039B2 (en) Image processor
CN103954334B (en) Fully automatic image pickup type water meter verification system and operating method thereof
CN105205437B (en) Side face detection method and device based on contouring head verifying
CN108257187B (en) Camera-projector system calibration method
CN106535740A (en) Grading corneal fluorescein staining
CN102988052A (en) Method and system for measuring foot length
CN106236016B (en) A kind of in-situ projection method for vein imaging
CN113487510A (en) Method, system and equipment for detecting needle point position for automatic liquid preparation of robot
CN108601509A (en) Image processing apparatus, image processing method and program
CN111767756A (en) Method for automatically detecting facial flaws
CN107239743B (en) automatic detection method for scale mark reading based on projection method
WO2021082636A1 (en) Region of interest detection method and apparatus, readable storage medium and terminal device
CN105380590A (en) Device with eye position detection function and achieving method thereof
KR20180049302A (en) Tongue region extraction method and image processing apparatus for performing the method
CN103750810A (en) Method and device for performing characteristic analysis for images acquired by electronic colposcope
CN102880355B (en) Based on touch hot spot extracting method and the system of camera location
CN111091910B (en) Intelligent evaluation system based on painting clock test

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