CN113188592A - Urine flow velocity and flow identification method - Google Patents

Urine flow velocity and flow identification method Download PDF

Info

Publication number
CN113188592A
CN113188592A CN202110388565.1A CN202110388565A CN113188592A CN 113188592 A CN113188592 A CN 113188592A CN 202110388565 A CN202110388565 A CN 202110388565A CN 113188592 A CN113188592 A CN 113188592A
Authority
CN
China
Prior art keywords
urine
flow
flow velocity
identification method
sampling
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
CN202110388565.1A
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.)
Youtai Technology Taizhou Co ltd
Original Assignee
Youtai Technology Taizhou 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 Youtai Technology Taizhou Co ltd filed Critical Youtai Technology Taizhou Co ltd
Priority to CN202110388565.1A priority Critical patent/CN113188592A/en
Publication of CN113188592A publication Critical patent/CN113188592A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D21/00Measuring or testing not otherwise provided for
    • G01D21/02Measuring two or more variables by means not covered by a single other subclass

Abstract

The invention relates to the field of biological detection, in particular to a urine flow velocity and flow identification method, which comprises the following steps: 1) the urine imaging sensor is used for shooting the urine flow in the closestool in real time, reading video stream, processing each frame of data, carrying out difference comparison on each frame of video and an original state by a frame difference method, and recording the initial time and position of the urine flow; 2) tracking the shape and the motion trail of the urine by a thermal imaging sensor to determine a tracking point; 3) and calculating the speed of the tracking point according to the initial time and the position difference of the tracking point, and obtaining the urine flow speed. The invention provides a method for identifying urine flow and flow velocity, which can effectively identify the urine flow velocity and flow in the sampling process of a urine detection closestool through video processing, and further identify and monitor the health condition of a user according to the urine flow velocity and flow of the user.

Description

Urine flow velocity and flow identification method
Technical Field
The invention relates to the field of biomedicine, in particular to a urine flow velocity and flow identification method.
Background
The flow velocity and the flow of urine usually reflect certain health conditions of a human body, and meanwhile, in the automatic detection process of the urine, the health conditions of the human body can be judged in an auxiliary manner through the flow velocity and the flow of the urine.
Disclosure of Invention
The purpose of the invention is: a technology for detecting the flow speed and flow of urine in real time can detect the flow speed and flow of urine in real time in a sampling process.
The technical solution of the invention is as follows: a urine flow velocity and flow identification method comprises the following steps: 1) the urine imaging sensor is used for shooting the urine flow in the closestool in real time, reading video stream, processing each frame of data, carrying out difference comparison on each frame of video and an original state by a frame difference method, and recording the initial time and position of the urine flow; 2) tracking the shape and the motion trail of the urine by a thermal imaging sensor to determine a tracking point; 3) and calculating the speed of the tracking point according to the initial time and the position difference of the tracking point, and obtaining the urine flow speed.
Preferably, the method further comprises the following steps: 4) carrying out image binarization on the image identified in the step 1); 5) after the binary image is obtained, calculating pixel points according to the edge of the image so as to obtain the perimeter and the area; 6) the urine flow rate is calculated from the cross-sectional area of the urine column.
Preferably, the step 1) comprises the following steps: 11) converting each frame of data into a gray-scale image; 12) denoising each frame of picture; 13) eliminating the static image part by comparing the difference value of each frame of image with the original state, acquiring a moving target, identifying urine, and determining to identify by taking the initial point of the urine as a tracking point; 14) initial state and time of the urine tracking point are recorded.
Preferably, in the step 1), the urine edge is identified by adopting the following modes: 15) calculating the gradient strength and direction of each pixel point; 16) eliminating spurious responses brought by edge detection; 17) a first threshold and a second threshold are set, wherein values above the first threshold are all detected as edges and values below the second threshold are all detected as non-edges. For the middle pixel point, if the middle pixel point is adjacent to the pixel point determined as the edge, the edge is determined; otherwise, the edge is not;
18) and inhibiting the isolated weak edge, and finally finishing the edge detection.
Preferably, after the edges are identified, the image is subjected to binarization processing to obtain the urine shape track.
Preferably, the initial point of the urine is taken as a tracking point for identification.
Preferably, the velocity V of the tracking point is calculated based on the initial time of occurrence and the position difference of the tracking point:
Figure BDA0003015565280000021
where Δ s is the distance the liquid particle flows during the time Δ t.
Preferably, before the step 6), the method further comprises the following steps:
and (4) comparing the difference with the original state in real time, judging that the urine identification is finished when the video picture is static or the video picture is the same as the original state, and continuing to the step 6) after the urine identification is finished.
Preferably, the calculation of the circumference and the area of the urine is carried out according to the following steps:
after obtaining the binary image, the urine column cross section can be regarded as a circular area S ═ pi · r 2;
wherein pi represents the circumference ratio, and the circle radius is r;
alternatively, the cylindrical urine surface may be regarded as a rectangle having an area S ═ ab equal to the length of the rectangle and b equal to the width of the rectangle.
Preferably, the urine flow is calculated according to the following formula:
Q=SV;
wherein Q is urine flow, S is distance, and V is flow velocity.
Compared with the prior art, the invention has the beneficial effects that: the invention provides a method for identifying urine flow and flow velocity, which can effectively identify the urine flow velocity and flow in the sampling process of a urine detection closestool through video processing, and further identify and monitor the health condition of a user according to the urine flow velocity and flow of the user.
Drawings
Fig. 1 is a schematic structural diagram of a first embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a sampling valve according to a first embodiment of the present invention.
Fig. 3 is an exploded view of fig. 2.
Fig. 4 is a top view of fig. 2.
Fig. 5 is a sectional view taken along line B of fig. 4.
Fig. 6 is a schematic view of the piston of fig. 5 moving upward.
FIG. 7 is a schematic diagram of the sample port and flush port of the sample valve of FIG. 2.
Fig. 8 is a schematic view of the structure of the micro-fluid pump.
Fig. 9 is a cross-sectional view taken along line C of fig. 8.
FIG. 10 is a schematic view of the installation structure of the sampling valve in the first embodiment.
Fig. 11 is a schematic structural diagram of a second embodiment of the present invention.
FIG. 12 is a schematic structural diagram of a urine trace imaging sensor according to the second embodiment.
FIG. 13 is a schematic view of a sampling rod simulation according to the second embodiment.
FIG. 14 is a schematic structural diagram of a sampling rod of a third embodiment of the robot arm.
FIG. 15 is a schematic view of a contracted structure of a sampling rod of a third embodiment of the mechanical arm.
Fig. 16 is a flow chart of a urine tracking method in the third embodiment.
FIG. 17 is a schematic view of the mounting structure of the sampling rod of the third embodiment of the robot arm.
FIG. 18 is a schematic view of the mounting structure of a urine test paper cassette in the fourth embodiment.
FIG. 19 is a schematic view showing the structure of a urine test paper cassette in the fourth embodiment.
FIG. 20 is a flowchart showing a urine detection method according to the fourth embodiment.
Detailed Description
The invention will be described in more detail below with reference to the accompanying drawings:
the invention provides a urine sampling closestool capable of automatically sampling and detecting urine, which can automatically sample and detect urine, and particularly provides the following embodiments for illustration, but the invention is not limited to the following embodiments:
example one
As shown in figure 1, a urine single-point detection sampling system comprises a sampling closestool A, wherein a urine recognition sensor is arranged on the sampling closestool, the urine recognition sensor is arranged as a temperature sensor B1, a urine sampling device is arranged below a temperature sensor B1, the urine sampling device in the embodiment is arranged as a urine sampling valve C1, the urine sampling valve C1 is arranged on the inner wall of the front part of the closestool, and the sensing range of the temperature sensor B1 covers the urine sampling valve.
Further, temperature sensor B1 sets up to infrared temperature sensor, infrared temperature sensor sets up the toilet lid side of sample closestool, infrared temperature sensor to at least a bunch of red light of urine sample valve transmission is used for the perception sample valve department whether to be provided with the urine.
Furthermore, a pressure sensor D is arranged on the side face of the toilet cover of the sampling toilet.
As shown in fig. 2 and 4, the urine sampling valve C1 comprises a liquid taking disc 1, a plurality of sampling small holes 5 are formed in the liquid taking disc to form a filter screen, a piston cylinder 3 is arranged below the filter screen, a thimble disc 4 is arranged in the piston cylinder 3, a plurality of thimbles 7 matched with the sampling small holes 5 are arranged on the thimble disc 4, and a propelling device 8 is arranged below the thimble disc 4 and used for propelling the thimbles 7 to penetrate into or penetrate out of the sampling small holes 5.
As shown in fig. 3 and 5, a piston 6 adapted to the inner wall of the piston cylinder is further arranged below the thimble plate 4, one end of the piston 6 is fixedly connected with the thimble plate, the other end of the piston is connected with a propulsion device 8, and the propulsion device 8 is used for driving the piston 6 to reciprocate in the piston cylinder.
As shown in fig. 6 and 7, further, the exterior of the piston cylinder is provided with a sampling port 9 and a flushing port 10.
As shown in fig. 3, further, the propelling device includes a rotating motor 11, a screw rod 12 is connected to an upper portion of the rotating motor 11, a piston connecting rod 13 is connected to the other end of the screw rod 12, and the other end of the piston connecting rod 13 is connected to the piston 6. Further, a protective shell 33 is further included, and the propelling device 8, the sampling port 9 and the flushing port 10 are integrated in the protective shell 33.
Further, the protective casing is provided with a lead outlet 14 for leading out a sampling pipe 16 communicating with the sampling port 9 and a flushing pipe 30 communicating with the flushing port 10. The installation mode is as follows: the filter screen and the piston cylinder are assembled through threads to clamp the toilet bowl wall, so that the whole sampling valve is fixed. The sampling device can be stably fixed on the closestool, and effective, automatic and convenient sampling is realized. In other embodiments, different assembling modes can be adopted, and the sampling device can be applied to the closestool as long as the sampling device can be conveniently assembled on the closestool.
Further, a heat dissipation window 15 is arranged at one end of the protective casing 33 close to the propulsion unit.
Further, the sampling port 9 is communicated with a sampling micropump a1 through a sampling pipe 16, the sampling micropump a1 comprises a liquid inlet a2, the liquid inlet a2 is communicated with a first chamber a4 through a first check valve A3, the first chamber a4 is communicated with a second chamber a5, the second chamber a5 is communicated with a third chamber A6, and the third chamber A6 is communicated with a liquid outlet A8 through a second check valve a 7;
the inner walls of the first chamber and the third chamber are respectively provided with at least one piezoelectric ceramic piece A9, the pressure of the first chamber A4 and the pressure of the third chamber A6 are changed by the piezoelectric ceramic piece A9 through vibration, the inner wall of the second chamber A5 is communicated with the outside of the micro pump through at least one through hole, and a waterproof breathable film A11 is arranged on the through hole; the sampling micropump A1 is communicated with the urine detection device through a pipeline. In this embodiment, the second chamber a5 of the sampling micro pump is a liquid settling chamber. The second chamber A5 is separated from air by a waterproof and breathable film A11, namely the air pressure of the second chamber A5 is always the same as the atmospheric pressure, and the second chamber A5 is a liquid sealed space; the piezoelectric ceramic piece of the first chamber sucks urine into the second chamber A5, the liquid level sensor identifies that the liquid level of the urine in the second chamber reaches a required value, the piezoelectric ceramic piece of the first chamber A4 stops working, and after the urine in the first chamber A4 is kept still to be separated from air, the piezoelectric ceramic piece of the third chamber A6 extracts the urine. (in this embodiment, the case where one check valve is used for each of the first chamber and the third chamber is not shown, and for the sake of brief description, this drawing shows only the case where two check valves are used for each of the first chamber and the third chamber).
Further, the edge of the liquid taking disc 1 protrudes outwards to fix the urine sampling valve.
Further, the liquid taking disc 1 and the piston cylinder 3 are fastened in a rotating fit mode through threads.
The propulsion device is provided as a cylinder. The reciprocating motion of the piston is realized, and the technical effects of liquid taking and discharging are realized.
The working principle is as shown in fig. 5 and fig. 6: when in work: 1. the piston is controlled by a motor to move downwards until the sampling port is exposed, namely the sampling small hole 5 is formed, the filter screen is separated from the thimble, urine enters the piston cylinder (shown in figure 5) after being filtered by the filter screen, and the sampling micropump is connected with the sampling port to extract the urine; 2. after urine collection is finished, clean water enters the piston cylinder through the flushing port to be flushed; 3. after the washing is completed, the motor controls the piston to move upwards until the filter screen is tightly attached to the thimble (as shown in fig. 6).
Referring to fig. 8 to 9, in this embodiment, on the basis of the first or second embodiment, a check valve is added to each of the first chamber and the third chamber, the first chamber a4 is communicated with the second chamber a5 through the third check valve a18, and the second chamber a5 is communicated with the third chamber a6 through the fourth check valve a 19. Taking the third chamber as an example, the third chamber is composed of a one-way valve A7, a one-way valve A19 and a piezoelectric ceramic piece A9, wherein the installation directions of the one-way valve A7 and the one-way valve A19 are opposite. The working principle is as follows: after the power is switched on, the piezoelectric ceramic plate starts to vibrate, when the pressure in the cavity is lower than the atmospheric pressure, the check valve A19 is opened due to the action of the atmospheric pressure, the check valve A7 is closed, and liquid is sucked from the check valve A19; when the vibration is carried out until the pressure in the chamber is stronger than the atmospheric pressure, the check valve A7 is opened due to the action of the atmospheric pressure, the check valve A19 is tightly closed, and the liquid is extruded from the check valve A7.
The present embodiment employs the following urine sampling method, comprising the steps of:
1) the infrared temperature sensor measures and records the temperature value of the sampling valve by taking time t as a unit;
2) when the difference between the temperature value at the moment t +1 and the temperature value at the moment t is compared with a preset value:
if the difference of the temperature values is larger than the preset value, controlling a sampling valve to perform liquid absorption sampling;
if the difference between the temperature values is less than the preset value, continuing to step 1).
Before the step 1), the method also comprises the following steps:
01) measuring and recording the pressure value by using a pressure sensor and taking time t as a unit;
02) comparing the difference between the pressure value at the t +1 moment and the pressure value at the t moment with a preset value:
if the difference of the pressure values is larger than a preset value, entering the step 1);
if the difference between the pressure values is less than the preset value, continue to step 01).
When the sampling valve works, the infrared temperature sensor emits a beam of infrared light to the sampling valve port to sense whether urine is in the sampling valve port or not, if the temperature change in the sampling valve port is identified, the urine is discharged, and the sampling valve automatically opens the valve to collect the urine sample.
The preset range of the pressure value in this embodiment may be set to 20kg-130kg, and in other embodiments, other ranges may be adopted to achieve the same effect.
In addition to the first embodiment, the present invention also provides a second embodiment:
example two:
in the embodiment, as shown in fig. 11, a toilet bowl detection device implemented in another way is provided, in which a toilet lid is disposed on a sampling toilet bowl, the toilet lid includes a toilet seat, a toilet seat is disposed above the toilet seat, an arc-shaped sampling rod F is disposed below the toilet seat, a rotation power mechanism F1 is disposed at an end of the arc-shaped sampling rod F to drive the arc-shaped sampling rod to rotate up and down, a sampling port F2 is disposed on the arc-shaped sampling rod, and the sampling port F2 is connected to a urine detection device through a sampling micropump;
a urine track imaging sensor B2 is arranged on the closestool gasket, and the urine track imaging sensor B2 collects information below the closestool gasket.
Further, the urine trace imaging sensor B2 is provided as a thermal imaging camera.
The thermal imaging device is provided with a thermal imaging camera in the embodiment, and in other embodiments, the thermal imaging device can also be provided with a CCD image sensor or other sensors capable of collecting urine tracks.
Further, a pressure sensor D is arranged on the toilet cover gasket.
Further, the rotary power device is provided as a rotary electric machine.
In this embodiment, the mechanism of the present invention is described with respect to a toilet lid only, but in other embodiments, it may be provided as a unitary urine toilet, or may be better implemented in other ways.
For the second embodiment, the urine identification method is adopted for identifying the urine, and specifically comprises the following steps:
1) storing a motion track of a sampling port on an arc-shaped sampling rod as a preset track, and taking the surface of the motion track of the sampling port as a coordinate surface;
2) identifying a urine track through a urine track imaging sensor, and projecting the track on the coordinate surface;
3) acquiring an intersection point coordinate A of the preset track and the projection track according to the projection track of the urine track on the coordinate plane;
4) controlling the rotating power mechanism to move to the intersection point coordinate for sampling;
5) and (5) repeating the steps 2) to 4) until the sampling amount reaches the required detection amount.
In step 2), the method further comprises the following steps:
21) judging whether a urine test instruction is received or not, and if not, returning to an initial state; if a urine test instruction is received, continuing the next step;
22) judging whether a pressure sensing value needs to be acquired, if so, performing a step 23), and if not, performing a step 3);
23) and judging whether the pressure value acquired by the pressure sensor is within the estimated value range, if so, performing the step 3), and if not, sending a warning instruction.
In other embodiments, step 22) may be omitted, and prior to urine tracking, it may be directly identified whether the pressure value collected by the pressure sensor is within the expected range.
In this embodiment, according to the principle of thermal imaging camera two-dimensional imaging discernment urine orbit come automatic sampling. After the thermal imaging camera identifies the urine track, the rotating power mechanism rotates the sampling rod to the urine track for sampling. Because the sampling rod can only move in a fixed angle in one plane, the real-time tracking sampling of urine can be realized by projecting on the plane after urine identification.
Fig. 12 shows a thermal imaging camera capable of two-dimensional imaging, which has a field angle W.
When the urine sampler works, as shown in fig. 13, the thermal imaging camera obtains two-dimensional thermal images and temperature values according to different temperatures, and then obtains urine tracks through algorithm comparison and analysis, as shown in fig. 13, the track of the sampling rod is QYG, and when the thermal imaging camera identifies that the urine tracks are random tracks MN1, the power mechanism rotates the sampling rod to the position A to collect urine samples; when the urine track MN1 gradually approaches any random urine track MN2, the rotary power mechanism will control the sampling rod to collect urine samples from A to B.
EXAMPLE III
In addition to the above two examples, the present invention also provides example three: as shown in fig. 17, a urine detection toilet cover comprises a toilet seat, a first urine trace imaging sensor B4 is disposed on the toilet seat on one side of the toilet seat, and a second urine trace imaging sensor B5 is disposed at the front end of the toilet seat; a mechanical arm sampling rod F3 is arranged below the toilet gasket. A third urine track imaging sensor B6 is also arranged on the toilet lid gasket, and the third urine track imaging sensor B6 is arranged opposite to the first urine track imaging sensor B4. In this embodiment, the urine trace imaging sensor is arranged in this way, and in other embodiments, the urine trace imaging sensor may be located at different positions, for example, only one sensor is disposed at one side of the toilet bowl, or two sensors are disposed at two opposite sides of the toilet bowl, as long as the same effect can be achieved,
in this embodiment, the first to third urine track imaging sensors are configured as thermal imaging cameras. Place the thermal imaging camera in two different directions for the thermal imaging makes a video recording and can get the urine orbit, three-dimensional coordinate, thereby control urine thief rod F3 carries out the urine tracking. Other embodiments may choose to use other numbers of urine trace imaging sensors as desired.
In this embodiment, in other embodiments, the first to third urine track imaging sensors may be configured as a CCD image sensor or an ultrasonic sensor to achieve the same technical effect.
The pressure sensor D is arranged on the closestool cover, and before urine detection and tracking in the sampling process, the pressure sensor can be judged in advance to receive signals, and then tracking and sampling are carried out, so that the accuracy of urine tracking can be further realized.
As shown in fig. 14 and 15, the end of the mechanical arm sampling rod F3 is provided with a sampling port F2, and the mechanical arm sampling rod comprises a first moving arm F31, a second moving arm F32 and a third moving arm F33; the first moving arm F31 is rotatable about a first axis of rotation, the second moving arm F32 is rotatable about a second axis of movement, and the third moving arm F33 is rotatable about a third axis of movement, and the third moving arm F33 is provided with a sampling port. The third moving arm F33 is connected to a fourth moving arm F34, the fourth moving arm F34 is rotatable about a fourth axis, and the fourth moving arm F34 is connected to a sampling port F2, the sampling port being rotatable about a fifth axis. In the state at ordinary times, like the drawing mechanical arm shrink at toilet lid bottom inboard, during operation, the mechanical arm passes through rotary motion through each motion arm, and control mechanical arm F33 stretches out and draws back simultaneously, can realize the automatic sample of urine device.
In this embodiment, the mechanical sampling arm is sampled in a fine manner in a five-axis manner, and in other embodiments, sampling may be performed in a three-axis manner, that is, in a manner of retaining F31, F32, and F33, so as to achieve the same technical effect.
In the present embodiment, only the toilet lid is taken as an example for illustration, and in other embodiments, the automatic urine sampling can be performed by directly forming a toilet or the like.
Referring to fig. 16, for the present embodiment, the following urine tracking method is adopted to perform a specific sampling of urine, including the following steps:
preparing for identification:
before recording or shooting a video, judging whether the state of a camera is opened or shielded, and then testing the working state of the video.
(II) information recording:
the first frame before, or beginning with, the video recording and the photograph is taken as the background or original state of the entire input. Then, video recording or photographing is started.
(III) urine identification:
after the video or the photo of the finder is finished, the video stream is read, and each frame of data is processed. Firstly, the gray scale image is converted to perform Gaussian filtering transformation.
Wherein the grey map conversion can be processed with current open source algorithms, such as cv2.cvtcolor ().
The gaussian filter can be directly processed by the current open source method cv2.gaussian, or can be processed according to the following formula.
The linear filter can effectively suppress noise and smooth images.
A two-dimensional gaussian function is as follows:
Figure BDA0003015565280000091
where (x, y) is a point coordinate, which may be considered an integer in image processing; σ is the standard deviation. To obtain a template of a gaussian filter, the gaussian function can be discretized, and the obtained gaussian function value is used as the coefficient of the template. And then the image processing is carried out by applying the image processing method to the image.
Thereafter, each frame of the video is compared with the original state (background) in a frame difference method to determine the initial state of urine, and the initial time is recorded.
The specific frame difference method is as follows:
two frames of images are continuously selected in a video image sequence, ft (x, y) is a t-th frame of image, ft-τ(x, y) is the t- τ th frame image, the frame difference expression is:
Dτ(x,y)=|ft(x,y)-ft-τ(x,y)|
to Dτ(x, y) binarization:
Figure BDA0003015565280000092
where T is a threshold determined by the scenario.
In the process of detecting a moving object by using a detection method, only a moving part is displayed in an image, and a static part is eliminated in the image. After Gaussian filtering, the difference between the video and the original state is compared, and whether the difference is consistent with the original state is judged; if yes, the process returns to the previous step, and if not, the subsequent process is performed.
(IV) contour recognition:
the perimeter calculation can be performed by using an edge detection algorithm to perform urine track contour identification. Also, RGB values of urine color may be extracted.
Contour recognition may employ open source edge detection algorithms and functions.
For example: canny edge detection algorithm cv2.Canny () and
sobel edge detection function cv2.Sobel () to identify urine image edges;
using cv2.arclength () and
area cv2.contourarea () to calculate urine shape area and circumference;
RGB values of urine color were measured using cv2.cvtcolor () color space fitting and cv2.inrange ().
Besides the open source algorithm, the following formula can be specifically adopted for processing:
and calculating the gradient strength and the direction of each pixel point in the image by using an edge detection algorithm-Canny edge detection algorithm.
In the image, the degree and direction of change in the gray-scale value are expressed by gradients. It can obtain gradient values g in different directions by dot-multiplying a sobel or other operatorsx(m,n),gy(m, n) the integrated gradient calculates the gradient value and the gradient direction by the following formulas:
Figure BDA0003015565280000101
Non-Maximum Suppression (Non-Maximum Suppression) is applied to eliminate spurious responses due to edge detection. The width of the edge is made to be 1 pixel point as much as possible: if a pixel belongs to the edge, the gradient value of the pixel in the gradient direction is the largest. Otherwise, it is not an edge, and the gray value is set to 0.
Figure BDA0003015565280000102
A Double-Threshold (Double-Threshold) detection is applied to determine true and potential edges. Two thresholds (thresholds) are set, maxVal and minVal respectively. Where all above maxVal are detected as edges and all below minval are detected as non-edges. For the middle pixel point, if the middle pixel point is adjacent to the pixel point determined as the edge, the edge is determined; otherwise, it is not edge. And finally finishing edge detection by suppressing isolated weak edges.
In addition, the edges are further clarified by image binarization.
All pixels with the gray levels larger than or equal to the threshold are judged to belong to the specific object, the gray level of the pixels is 255 for representation, otherwise the pixels are excluded from the object area, the gray level is 0, and the pixels represent the background or the exceptional object area.
The perimeter, area of the urine shape can be calculated after the border is obtained.
After the binary image is obtained, pixel point calculation can be performed according to the image edge, so that the perimeter and the area are obtained.
The calculation of the perimeter is based on the number of extracted image edge pixel points.
The cross section of the urine column can be regarded as a circular area S ═ pi · r2 (pi denotes the circumference ratio and the circle radius r).
The urine cylindrical surface can be regarded as a rectangular area S ═ ab; a is the length of the rectangle and b is the width of the rectangle.
And then, the color of the urine can be extracted, the RGB value of the urine is extracted, and the RGB color value is traversed and compared to obtain the color state.
(V) tracking point identification:
after the difference comparison with the original state is carried out, the identification with the initial point of the urine as a tracking point can be confirmed. The specific tracking point confirmation method is as follows, taking the original state as time t, and taking the first frame of urine appearance as time t + τ, which is the frame difference between the two time points:
Dτ(x,y)=|ft+τ(x,y)-ft(x,y)|
then the target shape of the urine is obtained by using the judgment condition of the shape detection.
Besides, the establishment of the tracker cv2.tracker _ create ()
And setting a tracking target to realize tracking by taking the difference (update) of the picture as a target.
(VI) calculating the flow rate:
and calculating the speed of the tracking point based on the initial occurrence time and the position difference of the tracking point.
Figure BDA0003015565280000121
Where S is the distance and V is the flow velocity.
Of course, the processing can also be performed in an open source manner: the trajectory can also be drawn in segments by detecting the relative displacement amount cv2. phasecorrect between two images having the same content.
The flow rate was then calculated according to the following steps:
Figure BDA0003015565280000122
where S is the distance and V is the flow velocity.
In the urine tracking problem, the movement can be regarded as a uniform acceleration or uniform deceleration movement with an initial velocity of 0.
Taking a certain frame of urine as time k and the last state as time k
Therefore, when k is 1, there is an acceleration
Figure BDA0003015565280000123
Namely have
Figure BDA0003015565280000131
(seventh) flow identification:
after the difference comparison with the original state is carried out, when the video picture is still or the same as the original state, the end of the urine identification can be judged, and the end time is recorded. Urine length can be obtained from the start time comparison. Thus, the urine flow rate can be calculated from the cross-sectional area of the urine liquid column.
Q=SV
Where Δ s is the distance the liquid particle flows during Δ t.
(eighth) trajectory prediction
The Kalman kalman filtering method can also be used to confirm the tracking point, determine the flow rate and predict the track. The kalman filter cv, create kalman may be specifically adopted for processing, and the specific processing may also be performed according to the following manner:
kalman kalman filtering method
Taking a certain frame of urine as time k and the last state as time kAt this time, the initial point of urine has a state
Figure BDA0003015565280000132
vk=vk-τ+uk-τX τ, wherein pkIndicating the current position, vkIndicates the current flow rate, ukThen acceleration is assumed.
Then
Figure BDA0003015565280000133
Make it
Figure BDA0003015565280000134
Figure BDA0003015565280000135
In the urine tracking problem, the movement can be regarded as a uniform acceleration or uniform deceleration movement with an initial velocity of 0.
Therefore, when k is 1, there is an acceleration
Figure BDA0003015565280000141
Namely have
Figure BDA0003015565280000142
Thus obtaining the state of two points
Figure BDA0003015565280000143
And then tracking can be performed.
Therefore, a formula of the predicted tracking point can be obtained,
Formula 1:
Figure BDA0003015565280000144
formula 2: sigma k-=F∑k-τFT+Q
Where Q is a covariance matrix representing noise.
We have found thatThe transformation relation between the real state and the observed state is denoted as h (·), y (k) ═ h [ x ·)k]+vkIs provided with
Figure BDA0003015565280000145
R is the measured known noise covariance. Then there is a correction set of equations:
formula 3:
Figure BDA0003015565280000146
formula 4:
Figure BDA0003015565280000151
formula 5:
Figure BDA0003015565280000152
based on these five formulas, we can track and correct the position and velocity of the tracking point frame by frame. In this way, a prediction of velocity (flow rate) and trajectory can be obtained.
The during operation is through discerning the urine shape to and the prediction of urine orbit, can in time trail the urine sample, simultaneously through detecting urine velocity of flow and flow, realizes urine detection's further perfect.
Example four
In the fourth embodiment, the automated urine detection is described, and after the urine sampling is completed, the urine detection cartridge is used to specifically detect urine in the toilets according to the first to third embodiments, specifically, the urine detection is performed according to the following method, including the following steps:
1) receiving a urine detection instruction;
2) judging whether the urine detection box is placed correctly, and if not, stopping urine detection;
if yes, continuing to step 3);
3) reading an identification label on the urine detection box, and judging whether the identification label belongs to an effective urine detection box; if the urine detection box belongs to the valid urine detection box, sending a detectable instruction to perform urine detection; if the urine detection box is invalid, a limit detection instruction and/or a warning instruction are/is sent.
The step 3) comprises the following steps:
31) judging whether the urine detection box is matched with stored database information or not according to the identification label, and continuing the next step if the urine detection box is matched with the stored database information; if not, sending out a limit detection instruction and/or a warning instruction;
32) judging whether the urine detection box is within the valid period or not according to the identification label, and if so, carrying out urine detection; if not, a warning instruction is sent out;
after each urine detection, storing the detection result in a database;
in this embodiment, a separate database is created for each individual urine test cartridge, and all test results detected by the test cartridge are stored.
When the urine detection test paper box is taken out, the information taken out of the test paper box is recorded and stored in the database according to the label information. Judging whether the urine detection box has a taking-out record or not according to the identification label, if not, continuing the urine detection, and if so, sending a detection limiting instruction and/or a warning instruction; in this embodiment, the structure of the first to third embodiments may be adopted to automatically sample urine, and then the sampling micro pump a1 takes the sample onto the urine detection device, and the urine detection paper box is used to automatically detect urine. And the adoption takes electronic tags's urine to detect test paper box, can realize the discernment of urine detection test paper box, the conveying of urine detection test paper, store and retrieve.
The test paper box is divided into a test paper storage area and a test paper recovery area, the specific structure of the test paper box can adopt a similar structure in a CN212159816U file, wherein the test paper storage area comprises a desiccant filling area, and the test paper storage area has the advantages of sealing, avoiding light, preventing moisture and the like, and provides a good storage environment for the test paper.
As shown in fig. 18 and 19, the test paper box housing encloses an RFID or NFC electronic tag 15, and can store factory information, use information, and the like detected using the test paper box. Through writing in the information of electronic chip in advance when leaving the factory, can make every test paper box have the uniqueness, combine the card reader module on the detection device, after the user puts into the test paper box, can read and record the information in this test paper box electronic tags, thereby realize following functions such as test paper box ID number, type, capacity (hold detection test paper number), detectable item, time of leaving the factory etc. information:
through the structural design of the scheme, the equipment can start detection only when a user correctly puts a test paper box, and the electronic tag information of the test paper box cannot be normally read by the equipment when the test paper box is not put or is not placed according to a correct mode;
if the user wants to start urine detection, the device judges a test paper box after receiving an instruction, and if the electronic tag information is not read, the user is reminded at a software end to correctly put the test paper box;
if the electronic tag information is read, comparing the read test paper box information with database storage information, if the test paper box information cannot be matched with the database storage information, indicating that the test paper box is a non-original genuine product, reminding a user at a software end and limiting detection;
after the correct test paper box information is read, uploading the test paper box information to a server, and providing a consumable allowance prompt for a user at a software end according to the capacity of the test paper box;
during detection, according to the type of the test paper box, a corresponding algorithm is selected, the detection test paper is identified and analyzed, and a detection result is provided, so that different types of urine detection such as urine routine, heavy metal, drugs and the like can be realized on one device;
due to the particularity of the urine test paper, the urine test paper can slowly lose efficacy along with time when exposed to the air, the using time of the test paper box can be recorded, and when the test paper box is not used up till the expiration date, a user is reminded to replace the new test paper box at a software end;
meanwhile, due to the structural particularity of the urine detection test paper box, when a user takes the test paper box out of the equipment, the test paper box is defaulted to be discarded, the test paper box is not allowed to be put into the equipment again for detection, when the test paper box is taken out, the equipment uploads the recorded test paper box data to a server database, when a new test paper box is put in, information such as an ID code of the new test paper box is compared with the database, and if the test paper box is reused, the user is reminded at a mobile phone end and detection is limited;
if necessary, after each detection, the detection result can be written into the electronic tag for recording, and when the test paper in the detection box is used up, all the detection results of the test paper box can be recorded in the electronic tag.
The during operation puts into the urine detection box in detecting the closestool, and the user can start the detection through handheld terminal start-up software or applet, detects closestool discernment urine detection box record information to with information feedback to relevant system, through the linkage of system and user handheld terminal, confirm the detection information, then start the detection, store the testing result.
The above-mentioned embodiments are only preferred embodiments of the present invention, and all equivalent changes and modifications made within the scope of the claims of the present invention should be covered by the claims of the present invention.

Claims (10)

1. A urine flow velocity and flow identification method is characterized by comprising the following steps:
1) the urine imaging sensor is used for shooting the urine flow in the closestool in real time, identifying the urine flow state and recording the initial time and position of the urine flow;
2) tracking the shape and the motion trail of the urine by a thermal imaging sensor to determine a tracking point;
3) and calculating the speed of the tracking point according to the initial time and the position difference of the tracking point, and obtaining the urine flow speed.
2. The urine flow velocity and flow identification method of claim 1, further comprising the steps of:
4) carrying out image binarization on the image identified in the step 1);
5) after obtaining the binary image, calculating pixel points according to the edge of the image so as to obtain the perimeter of the urine edge and the area of the urine;
6) the urine flow rate is calculated from the cross-sectional area of the urine column.
3. The urine flow velocity and flow identification method according to claim 1, wherein the step 1) comprises the following steps:
11) converting each frame of data into a gray-scale image;
12) denoising each frame of picture;
13) eliminating the static image part by comparing the difference value of each frame of image with the original state, acquiring a moving target, identifying urine, and determining to identify by taking the initial point of the urine as a tracking point;
14) initial state and time of the urine tracking point are recorded.
4. The urine flow velocity and flow identification method according to claim 2, wherein in the step 5), the further identification of the urine edge is realized by adopting the following way:
15) calculating the gradient strength and direction of each pixel point;
16) eliminating spurious responses brought by edge detection;
17) a first threshold and a second threshold are set, wherein values above the first threshold are all detected as edges and values below the second threshold are all detected as non-edges. For the middle pixel point, if the middle pixel point is adjacent to the pixel point determined as the edge, the edge is determined; otherwise, the edge is not;
18) and inhibiting the isolated weak edge, and finally finishing the edge detection.
5. The urine flow velocity and flow identification method according to claim 4, wherein the step 5) further comprises the steps of:
and extracting RGB values of the urine, and traversing and comparing the RGB color values to obtain a urine color state.
6. The urine flow velocity and flow rate identification method according to claim 1, wherein: and identifying by taking the initial point of the urine as a tracking point.
7. The urine flow velocity and flow rate identification method according to claim 1, wherein: based on the initial time of occurrence and the position difference of the tracking point, the tracking point velocity V is calculated according to the following formula:
Figure FDA0003015565270000021
where Δ s is the distance the liquid particle flows during the time Δ t.
8. The urine flow velocity and flow rate identification method according to claim 2, wherein: between the step 6) and the step 5), the method further comprises the following steps:
and comparing the difference with the original state and the previous frame image in real time, judging that the urine identification is finished when the video picture is still or the difference is the same as the original state, and continuing to the step 6) after judging that the urine identification is finished.
9. The urine flow velocity and flow rate identification method according to claim 2, wherein: in the step 7), the cross-sectional area of the urine is calculated according to the following steps:
after the border is taken, the cross section of the urine column is considered as circular:
the calculation of urine area S was performed according to the following procedure:
after obtaining the binary map, the area S ═ pi · r 2;
where π represents the circumference ratio and the radius of the circle is r.
10. The urine flow velocity and flow rate identification method as claimed in claim 9, wherein: in the step 7), the step of the method comprises the following steps,
the urine flow is calculated according to the following formula:
Q=SV;
wherein Q is urine flow, S is cross-sectional area, and V is flow velocity.
CN202110388565.1A 2021-04-12 2021-04-12 Urine flow velocity and flow identification method Pending CN113188592A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110388565.1A CN113188592A (en) 2021-04-12 2021-04-12 Urine flow velocity and flow identification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110388565.1A CN113188592A (en) 2021-04-12 2021-04-12 Urine flow velocity and flow identification method

Publications (1)

Publication Number Publication Date
CN113188592A true CN113188592A (en) 2021-07-30

Family

ID=76975382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110388565.1A Pending CN113188592A (en) 2021-04-12 2021-04-12 Urine flow velocity and flow identification method

Country Status (1)

Country Link
CN (1) CN113188592A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4051431A (en) * 1975-01-03 1977-09-27 Richard Wolf Gmbh Apparatus for measuring rates of urine flow electrically
JP2010223772A (en) * 2009-03-24 2010-10-07 Toto Ltd Urination information measuring device
CN102879301A (en) * 2012-09-26 2013-01-16 哈尔滨理工大学 Method for detecting instantaneous velocity and instantaneous flow length of fluidity of liquid metal
JP2013090748A (en) * 2011-10-25 2013-05-16 Toto Ltd Urination information measuring apparatus
CN104036522A (en) * 2014-04-16 2014-09-10 嘉兴博海信息科技有限公司 Water flowing speed monitoring method based on moving target identification in videos
US20170086728A1 (en) * 2014-05-12 2017-03-30 Kesem Health Pty Ltd Apparatus, system and method for measuring urine flow and/or quantity
JP2017217228A (en) * 2016-06-08 2017-12-14 株式会社島津製作所 Urine volume measurement device and urine volume measurement method
CN111445444A (en) * 2020-03-11 2020-07-24 中南大学 Molten iron flow velocity detection method based on polarization characteristics
US20210090270A1 (en) * 2018-11-16 2021-03-25 Central South University Method and system for detecting flow velocity of high-temperature molten fluid

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4051431A (en) * 1975-01-03 1977-09-27 Richard Wolf Gmbh Apparatus for measuring rates of urine flow electrically
JP2010223772A (en) * 2009-03-24 2010-10-07 Toto Ltd Urination information measuring device
JP2013090748A (en) * 2011-10-25 2013-05-16 Toto Ltd Urination information measuring apparatus
CN102879301A (en) * 2012-09-26 2013-01-16 哈尔滨理工大学 Method for detecting instantaneous velocity and instantaneous flow length of fluidity of liquid metal
CN104036522A (en) * 2014-04-16 2014-09-10 嘉兴博海信息科技有限公司 Water flowing speed monitoring method based on moving target identification in videos
US20170086728A1 (en) * 2014-05-12 2017-03-30 Kesem Health Pty Ltd Apparatus, system and method for measuring urine flow and/or quantity
JP2017217228A (en) * 2016-06-08 2017-12-14 株式会社島津製作所 Urine volume measurement device and urine volume measurement method
US20210090270A1 (en) * 2018-11-16 2021-03-25 Central South University Method and system for detecting flow velocity of high-temperature molten fluid
CN111445444A (en) * 2020-03-11 2020-07-24 中南大学 Molten iron flow velocity detection method based on polarization characteristics

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王玉 等: "曲波特征加权遥感图像统计分割原理与方法", 北京邮电大学出版社, pages: 50 - 52 *

Similar Documents

Publication Publication Date Title
CN107204012B (en) Reducing power consumption for time-of-flight depth imaging
CN108833857B (en) Goods shelf monitoring method and system and goods shelf
US9002096B2 (en) Method and apparatus for determining a liquid level in a container using imaging
KR100480780B1 (en) Method and apparatus for tracking an object from video data
EP3265781A1 (en) Method and apparatus for processing spectral images
US20110222754A1 (en) Sequential approach for automatic defect recognition
EP3190546A3 (en) Target orientation estimation using depth sensing
JP2016514251A (en) Motion direction and speed estimation with camera assistance
CN113189320A (en) Urine single-point detection sampling system and sampling method
CN105930852B (en) A kind of bubble image-recognizing method
Livanos et al. Intelligent navigation and control of a prototype autonomous underwater vehicle for automated inspection of aquaculture net pen cages
WO2019153934A1 (en) System and method for quantitatively analyzing dry chemical test strip by means of mobile terminal
CN108481327A (en) A kind of positioning device, localization method and the robot of enhancing vision
JP2008282386A (en) Object detector, object detection method, and object detection program
CN113188592A (en) Urine flow velocity and flow identification method
CN113188848A (en) Urine tracking method
CN113189322A (en) Urine tracking sampling detection toilet lid, toilet and urine tracking method
CN113189321A (en) Urine detection method
US8824548B2 (en) Object detecting with 1D range sensors
CN115661057A (en) Industrial nondestructive testing system and method based on cloud edge cooperation and deep learning
WO2016050767A1 (en) Focusing method
JP7425279B2 (en) Dirt prediction system
CN106023630B (en) The method and device thereof of automatic discrimination parking position
CN110020572B (en) People counting method, device and equipment based on video image and storage medium
Denzler et al. Real-time pedestrian tracking in natural scenes

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