[go: up one dir, main page]

CN115235948A - Liquid viscosity measurement system based on computer vision identification - Google Patents

Liquid viscosity measurement system based on computer vision identification Download PDF

Info

Publication number
CN115235948A
CN115235948A CN202210813556.7A CN202210813556A CN115235948A CN 115235948 A CN115235948 A CN 115235948A CN 202210813556 A CN202210813556 A CN 202210813556A CN 115235948 A CN115235948 A CN 115235948A
Authority
CN
China
Prior art keywords
detection
computer
computer vision
viscosity measurement
measurement system
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
CN202210813556.7A
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.)
University of Jinan
Shandong Non Metallic Material Research Institute
Original Assignee
University of Jinan
Shandong Non Metallic Material Research Institute
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 University of Jinan, Shandong Non Metallic Material Research Institute filed Critical University of Jinan
Priority to CN202210813556.7A priority Critical patent/CN115235948A/en
Publication of CN115235948A publication Critical patent/CN115235948A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N11/00Investigating flow properties of materials, e.g. viscosity, plasticity; Analysing materials by determining flow properties
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications

Landscapes

  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to a liquid viscosity measurement system based on computer vision recognition, which belongs to the technical field of viscosity measurement under the detection and measurement technology, and designs and builds an image acquisition hardware structure, comprising the following steps: the system comprises a constant-temperature water tank, a surface light source, a cloud deck, an industrial camera, a stepping motor and a computer, wherein video images are collected and detected through the industrial camera, cross-platform computer vision library OpenCV image collection processing and computer vision technology are applied under a Windows operating system, after gray processing is carried out on collected images, identification of scale marks is achieved through a straight-line segment detection algorithm, and identification and detection of motion liquid levels are achieved through an improved ViBe motion target detection algorithm. Experiments show that the system is accurate and reliable in detection in a reliable environment and meets the requirement of on-line monitoring on real-time performance; the man-machine interaction performance is good, the intelligent degree and the detection efficiency of the viscometer are effectively improved, and the actual use value is high.

Description

基于计算机视觉识别的液体粘度测量系统Liquid Viscosity Measurement System Based on Computer Vision Recognition

技术领域technical field

本发明属于检测计量技术下粘度测量技术领域,尤其涉及一种基于计算机视觉识别技术的液体粘度测量系统。The invention belongs to the technical field of viscosity measurement under detection and measurement technology, and in particular relates to a liquid viscosity measurement system based on computer vision recognition technology.

背景技术Background technique

本部分的陈述仅仅是提供了与本发明相关的背景技术信息,不必然构成在先技术。The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

粘度即粘性程度的大小,是流体的一种固有属性,用来表示流体流动的难易程度,在重力或者某个外力的作用下,流体的流动过程会发生连续的变形,液体运动的相互作用力即表现为液体的粘性,流体分子间相互作用力的大小表征为流体粘度的大小。不同的物质具有不同的粘度,同一物质在不同温度下的粘度也不同。粘度的测量有动力粘度、运动粘度两种绝对粘度度量方法,绝对测量法需要粘度计的加工非常精准,而且测量操作过程繁琐,测量精度低。毛细管粘度计基于毛细管法测量流体粘度,是众多粘度测量方法中应用较多的测量方法。毛细管法基于Poiseuille定律(毛细管粘度法的基本方程,简称泊肃叶定律)的基本原理,即粘性流体在自身重力作用下在毛细管中下降,一定体积的流体流过毛细管所用的时间与流体的粘度之间存在着相对应的关系。通过测量流体流过毛细管的时间与毛细管标定的仪器常数相乘的积,得出流体的运动粘度。这类粘度计在使用中,由于不同的条件特点和不同的测量对象,结构会略有差别,主要常见的是乌式、芬式毛细管粘度计。Viscosity is the degree of viscosity, which is an inherent property of the fluid. It is used to indicate the difficulty of fluid flow. Under the action of gravity or an external force, the flow process of the fluid will undergo continuous deformation, and the interaction of liquid motion will occur. The force is expressed as the viscosity of the liquid, and the magnitude of the interaction force between the fluid molecules is characterized by the magnitude of the fluid viscosity. Different substances have different viscosities, and the same substance has different viscosities at different temperatures. There are two absolute viscosity measurement methods for viscosity measurement: dynamic viscosity and kinematic viscosity. The absolute measurement method requires very precise processing of the viscometer, and the measurement operation process is cumbersome and the measurement accuracy is low. Capillary viscometer is based on the capillary method to measure fluid viscosity, which is the most widely used measurement method in many viscosity measurement methods. The capillary method is based on the basic principle of Poiseuille's law (the basic equation of the capillary viscosity method, referred to as Poiseuille's law), that is, the viscous fluid drops in the capillary under the action of its own gravity, and the time it takes for a certain volume of fluid to flow through the capillary is related to the viscosity of the fluid. There is a corresponding relationship between them. The kinematic viscosity of the fluid is obtained by measuring the product of the time the fluid flows through the capillary multiplied by the instrument constant for which the capillary is calibrated. In the use of this type of viscometer, the structure will be slightly different due to different conditions and different measurement objects. The most common ones are U-type and Finn-type capillary viscometers.

当测量粘度较大的液体时,液体在管中下降速度较为缓慢,时间过长,且测量的结果需要人工进行计算,会严重耗费操作人员的精力和时间。因此,粘度测量正逐步向自动化测量方向发展。When measuring a liquid with a high viscosity, the liquid descends slowly in the tube, and the time is too long, and the measurement result needs to be calculated manually, which will seriously consume the operator's energy and time. Therefore, viscosity measurement is gradually developing in the direction of automatic measurement.

发明内容SUMMARY OF THE INVENTION

为了克服上述不足,本发明提供了合适的基于计算机视觉识别技术的粘度测量系统,设计图像采集、图像采集处理、计时计算系统,通过计算机实现对运动液位的检测跟踪,判别液位是否流经粘度计计时球的上下刻度线,得出计时时间,进而通过相对法,按照公式v=C*t计算得出,式中,v表示液体的运动粘度;C表示粘度计常数;t表示一定体积的液体流经毛细管所用的时间。该系统可减轻实验人员的工作负担,提高检定精度与检测效率,同时增加经济效益,具有很高的创新性和实际意义。In order to overcome the above deficiencies, the present invention provides a suitable viscosity measurement system based on computer vision recognition technology, designs image acquisition, image acquisition processing, timing calculation system, realizes detection and tracking of the moving liquid level through a computer, and determines whether the liquid level flows through the The upper and lower scale lines of the viscometer timing ball are used to obtain the timing time, and then the relative method is used to calculate it according to the formula v=C*t, where v represents the kinematic viscosity of the liquid; C represents the viscometer constant; t represents a certain volume the time it takes for the liquid to flow through the capillary. The system can reduce the workload of the experimenter, improve the verification accuracy and detection efficiency, and at the same time increase the economic benefit, which has high innovation and practical significance.

为实现上述目的,本发明的一个或多个实施例提供了如下技术方案:To achieve the above object, one or more embodiments of the present invention provide the following technical solutions:

一种基于计算机视觉识别的液体粘度测量系统,包括:恒温水箱、面光源、云台、工业相机、步进电机和计算机,面光源和云台分别位于恒温水箱的相对的两侧;工业相机通过活动支架滑动安装在云台上,构成图像采集系统,云台的下部设置步进电机,步进电机驱动活动支架上下滑动,工业相机在活动支架的水平面上左右移动;毛细管粘度计通过测量支架固定在透明循环的恒温水箱内,工业相机拍摄到的帧图像传输至计算机,计算机上安装有图像采集处理与计时计算控制单元模块,计算机接收工业相机拍摄的帧图像,进行刻度线的判定与运动液位的识别;待测试液在毛细管粘度计内做自由落体运动由上而下经过计时球上的上刻度线时,计算机做出判定并开始计时;在待测试液经过计时球上的下刻度线时,停止计时;计算得出间隔时间后,根据公式计算得到待测试液的运动粘度。A liquid viscosity measurement system based on computer vision recognition, comprising: a constant temperature water tank, a surface light source, a pan/tilt, an industrial camera, a stepping motor and a computer, the surface light source and the pan/tilt are located on opposite sides of the constant temperature water tank; the industrial camera passes through the The movable bracket is slidably installed on the PTZ to form an image acquisition system. The lower part of the PTZ is equipped with a stepper motor, which drives the movable bracket to slide up and down, and the industrial camera moves left and right on the horizontal plane of the movable bracket; the capillary viscometer is fixed by the measuring bracket In the transparent circulating constant temperature water tank, the frame image captured by the industrial camera is transmitted to the computer, and the image acquisition processing and timing calculation control unit module is installed on the computer. Position identification; when the liquid to be tested is in free fall in the capillary viscometer and passes the upper scale line on the timing ball from top to bottom, the computer makes a judgment and starts timing; when the liquid to be tested passes through the lower scale line on the timing ball When the interval time is calculated, stop the timing; after calculating the interval time, calculate the kinematic viscosity of the liquid to be tested according to the formula.

进一步的技术方案,计算机通过创建相机获得帧图像,然后转换为Open CV可识别的图像格式,将彩色图像转换为灰度图,划定感兴趣区域,在感兴趣区域里利用Canny算子对灰度处理后的图像进行边缘检测,再进行刻度线的检测与运动液位的检测。In a further technical solution, the computer obtains the frame image by creating a camera, and then converts it into an image format recognizable by Open CV, converts the color image into a grayscale image, delineates the area of interest, and uses the Canny operator in the area of interest to compare the grayscale. The edge detection is carried out on the processed image, and then the detection of the scale line and the detection of the moving liquid level are carried out.

进一步的技术方案,对于毛细管粘度计的计时球处刻度线的识别检测,所用算法为直线段检测算法;对于毛细管粘度计内的运动液位的检测跟踪,所用算法为改进的ViBe运动目标检测算法。ViBe即背景建模(Visual Background extaoctor),是一种像素级视频背景建模或前景检测的算法,其检测效果优于帧间差分法等主流检测算法,对电脑内存占用相对较少。但当运动目标运动速度相差较大时,可能会出现鬼影而造成目标检测不全。因此,对其进行适当改进以减少漏检错检等情况的发生。Further technical solutions, for the identification and detection of the scale line at the timing ball of the capillary viscometer, the algorithm used is a linear segment detection algorithm; for the detection and tracking of the moving liquid level in the capillary viscometer, the algorithm used is the improved ViBe moving target detection algorithm. . ViBe (Visual Background extaoctor) is a pixel-level video background modeling or foreground detection algorithm. Its detection effect is better than that of mainstream detection algorithms such as inter-frame difference method, and it occupies relatively less computer memory. However, when the moving speed of the moving target differs greatly, ghost images may appear, resulting in incomplete target detection. Therefore, it should be appropriately improved to reduce the occurrence of missed detection and false detection.

进一步的技术方案,首先,运用改进的ViBe运动目标检测算法,采用多帧图像使用改进三帧差分法构建ViBe算法的背景模型原型,在原型中添加了相邻元素变化值。依据当前帧图像与背景模型差值作为背景复杂程度的调整因子,以调整背景模型和阈值。检测后的结果与改进三帧差分法进行逻辑与运算和后处理操作,完成对粘度计中运动液面的检测。For a further technical solution, firstly, using the improved ViBe moving target detection algorithm, using multiple frames of images and using the improved three-frame difference method to construct the background model prototype of the ViBe algorithm, and adding the adjacent element change values to the prototype. The background model and the threshold are adjusted according to the difference between the current frame image and the background model as an adjustment factor for the complexity of the background. The detected results are combined with the improved three-frame difference method to perform logical AND operation and post-processing operations to complete the detection of the moving liquid level in the viscometer.

进一步的技术方案,面光源和恒温水箱为一体结构,云台在设置时不与恒温水箱接触,工业相机拍摄到的帧图像由千兆网线传输至计算机。In a further technical solution, the surface light source and the constant temperature water tank are integrated, the pan/tilt is not in contact with the constant temperature water tank during setting, and the frame images captured by the industrial camera are transmitted to the computer by a gigabit network cable.

进一步的技术方案,工业相机优选海康工业面阵相机作为图像采集设备,待测试液的运动粘度在计算机的显示屏上呈现。In a further technical solution, the industrial camera preferably uses a Hikvision industrial area scan camera as the image acquisition device, and the kinematic viscosity of the liquid to be tested is displayed on the display screen of the computer.

进一步的技术方案,毛细管粘度计为已经通过检定并且具有永久性标识的粘度计。In a further technical solution, the capillary viscometer is a viscometer that has passed the test and has a permanent mark.

以上一个或多个技术方案存在以下有益效果:One or more of the above technical solutions have the following beneficial effects:

本发明技术方案可以通过计算机完成粘度测量时的计时工作,并且能够达到国家计量规程中的指标要求。通过计算机视觉技术,能够准确的识别并标定毛细管粘度计的上下刻度线,为检定过程提供有价值的参考。通过对运动液位的识别跟踪,检测液位经过毛细管粘度计上下计时刻线的时间,并得出时间间隔,从而计算出在测试液粘度。The technical scheme of the present invention can complete the timing work of viscosity measurement through a computer, and can meet the index requirements in the national measurement regulations. Through computer vision technology, the upper and lower scale lines of the capillary viscometer can be accurately identified and calibrated, providing a valuable reference for the verification process. Through the identification and tracking of the moving liquid level, the time when the liquid level passes through the upper and lower timing lines of the capillary viscometer is detected, and the time interval is obtained to calculate the viscosity of the test liquid.

本发明技术方案所搭建的检测环境与检测方法,具有规范操作要求,实验人员可将盛有待测试液的毛细管粘度计固定置于恒温水槽内,通过PC调整工业相机位置即可开始检测,无需重新调整环境等操作。The detection environment and detection method established by the technical solution of the present invention have standardized operation requirements. The experimenter can fix the capillary viscometer containing the liquid to be tested in the constant temperature water tank, and then adjust the position of the industrial camera through the PC to start the detection, without the need for re-testing. Adjust the environment, etc.

本发明技术方案图像采集处理部分采用开放源代码计算机视觉类库OpenCV作为本设计的核心部分,该库的所有代码都经过优化,计算效率很高,运行效率更快。该图像采集处理技术满足了本设计的要求,实现了图像采集处理和计算机视觉的功能。The image acquisition and processing part of the technical solution of the present invention adopts the open source code computer vision class library OpenCV as the core part of the design. All codes of the library are optimized, and the calculation efficiency is high and the operation efficiency is faster. The image acquisition and processing technology meets the requirements of this design and realizes the functions of image acquisition and processing and computer vision.

本发明技术方案的目标检测算法采用改进的ViBe算法,其不仅具有原ViBe算法易于实现、运行效率高等优点,而且在本方案中还能消除虚假目标(鬼影)、目标与背景融合等问题。The target detection algorithm of the technical solution of the present invention adopts the improved ViBe algorithm, which not only has the advantages of easy implementation and high operation efficiency of the original ViBe algorithm, but also can eliminate false targets (ghost images), target and background fusion and other problems in this solution.

本发明技术方案测量装置简单,对环境的适应性强,误差影响因素少,依靠先进的机器视觉和图像采集处理算法可以达到较高的测量精度。The technical scheme of the invention has the advantages of simple measurement device, strong adaptability to the environment, few error influencing factors, and high measurement accuracy can be achieved by relying on advanced machine vision and image acquisition and processing algorithms.

本发明附加方面的优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will become apparent from the description which follows, or may be learned by practice of the invention.

附图说明Description of drawings

构成本发明的一部分的说明书附图用来提供对本发明的进一步理解,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。The accompanying drawings forming a part of the present invention are used to provide further understanding of the present invention, and the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, and do not constitute an improper limitation of the present invention.

图1为本发明实施例所用的毛细管粘度计的示意图;Fig. 1 is the schematic diagram of the capillary viscometer used in the embodiment of the present invention;

图2为本发明实施例的液体粘度测量系统的结构示意图;2 is a schematic structural diagram of a liquid viscosity measurement system according to an embodiment of the present invention;

图3为本发明实施例的工业相机拍摄图像区域的示意图;3 is a schematic diagram of an image area captured by an industrial camera according to an embodiment of the present invention;

图4为本发明实施例的图像采集处理流程框图;FIG. 4 is a block diagram of an image acquisition processing flow according to an embodiment of the present invention;

图5为本发明实施例的改进ViBe运动目标检测算法框图;5 is a block diagram of an improved ViBe moving target detection algorithm according to an embodiment of the present invention;

图中,1为毛细管粘度计,2为恒温水箱,3为面光源,4为云台,5为工业相机,6为步进电机,7为计算机,8为上刻度线,9为下刻度线,10为计时球。In the figure, 1 is a capillary viscometer, 2 is a constant temperature water tank, 3 is a surface light source, 4 is a gimbal, 5 is an industrial camera, 6 is a stepping motor, 7 is a computer, 8 is an upper scale line, and 9 is a lower scale line , 10 is the timing ball.

具体实施方式Detailed ways

应该指出,以下详细说明都是示例性的,旨在对本发明提供进一步的说明。除非另有指明,本文使用的所有技术和科学术语具有与本发明所属技术领域的普通技术人员通常理解的相同含义。It should be noted that the following detailed description is exemplary and intended to provide further explanation of the invention. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

需要注意的是,这里所使用的术语仅是为了描述具体实施方式,而非意图限制根据本发明的示例性实施方式。如在这里所使用的,除非上下文另外明确指出,否则单数形式也意图包括复数形式,此外,还应当理解的是,当在本说明书中使用术语“包含”和/或“包括”时,其指明存在特征、步骤、操作、器件、组件和/或它们的组合。It should be noted that the terminology used herein is for the purpose of describing specific embodiments only, and is not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly dictates otherwise, the singular is intended to include the plural as well, furthermore, it is to be understood that when the terms "comprising" and/or "including" are used in this specification, it indicates that There are features, steps, operations, devices, components and/or combinations thereof.

如图1所示,为本发明实施例所用的毛细管粘度计的示意图,毛细管粘度计1是一种基于毛细管法测量流体粘度的粘度计,为已经通过检定并且具有永久性标识的粘度计。As shown in FIG. 1 , which is a schematic diagram of the capillary viscometer used in the embodiment of the present invention, the capillary viscometer 1 is a viscometer based on the capillary method to measure the viscosity of fluids, and is a viscometer that has passed the verification and has a permanent mark.

如图2所示,为本发明实施例的液体粘度测量系统的结构示意图。一种基于计算机视觉识别的液体粘度测量系统,包括:恒温水箱2、面光源3、云台4、工业相机5、步进电机6和计算机7,面光源3和云台4分别位于恒温水箱2的相对的两侧。面光源3和恒温水箱2为一体结构,底部共用一个底面板,保证面光源3和恒温水箱2在测试过程中的稳定性,面光源3和恒温水箱2构成液体粘度测量系统所要求的环境,面光源3和恒温水箱2二者可单独拆卸和更换,以适应不同的环境要求。As shown in FIG. 2 , it is a schematic structural diagram of a liquid viscosity measurement system according to an embodiment of the present invention. A liquid viscosity measurement system based on computer vision recognition, comprising: a constant temperature water tank 2, a surface light source 3, a pan/tilt 4, an industrial camera 5, a stepping motor 6 and a computer 7, the surface light source 3 and the pan/tilt 4 are respectively located in the constant temperature water tank 2 the opposite sides. The surface light source 3 and the constant temperature water tank 2 are integrated in structure, and the bottom shares a bottom panel to ensure the stability of the surface light source 3 and the constant temperature water tank 2 during the test process. The surface light source 3 and the constant temperature water tank 2 constitute the environment required by the liquid viscosity measurement system. Both the surface light source 3 and the constant temperature water tank 2 can be disassembled and replaced independently to adapt to different environmental requirements.

工业相机5通过活动支架滑动安装在云台4上,构成图像采集系统,云台4的下部设置步进电机6,步进电机6驱动活动支架上下滑动,用于调整工业相机5的高度,工业相机5在活动支架的水平面上可以左右移动,便于对各种规格和样式的毛细管粘度计1进行精准的图像拍摄。受不同类型的毛细管粘度计1的长短以及计时球10位置不同的限制,固定的图像采集系统适应性有限,因此本设计开发了一种可适应不同类型的毛细管粘度计1的可调节实时图像采集系统。工业相机5优选海康工业面阵相机作为图像采集设备,与普通相机相比,此海康工业相机的存储量大,摄像头视野调节范围大,并可直接调用;海康工业相机分辨率为500万,采集帧率24帧/s。由于循环恒温水在恒温水箱2工作时有细微的振动,为避免这种细微振动对图像采集的影响,云台4在设置时不与恒温水箱2接触。调试并固定云台4的高度、以及工业相机5与毛细管粘度计1的距离,使得图像采集设备可以采集到覆盖了完整计时球10附近范围的清晰图像,单幅图像的尺寸为2448像素×2048像素。如图3所示,为本发明实施例的工业相机拍摄图像区域的示意图,通过高度和水平位置的调整,保证工业相机5可以完整地采集到计时球10上的上刻度线8和下刻度线9处的图像。The industrial camera 5 is slidably installed on the gimbal 4 through the movable bracket to form an image acquisition system. The lower part of the gimbal 4 is provided with a stepper motor 6, and the stepper motor 6 drives the movable bracket to slide up and down to adjust the height of the industrial camera 5. The camera 5 can be moved left and right on the horizontal plane of the movable bracket, which is convenient for taking accurate images of the capillary viscometer 1 of various specifications and styles. Limited by the length of different types of capillary viscometers 1 and the different positions of timing balls 10, the fixed image acquisition system has limited adaptability, so this design develops an adjustable real-time image acquisition that can adapt to different types of capillary viscometers 1 system. For industrial camera 5, Hikvision industrial area scan camera is preferred as the image acquisition device. Compared with ordinary cameras, this Hikvision industrial camera has a large storage capacity, a large adjustment range of the camera's field of view, and can be directly called; the resolution of Hikvision industrial camera is 500 10,000, the acquisition frame rate is 24 frames/s. Since the circulating constant temperature water has a slight vibration when the constant temperature water tank 2 is working, in order to avoid the influence of this slight vibration on the image acquisition, the pan/tilt 4 is not in contact with the constant temperature water tank 2 during setting. Debug and fix the height of the pan/tilt 4 and the distance between the industrial camera 5 and the capillary viscometer 1, so that the image acquisition device can collect a clear image covering the complete range of the timing ball 10. The size of a single image is 2448 pixels × 2048 pixel. As shown in FIG. 3 , it is a schematic diagram of an image area captured by an industrial camera according to an embodiment of the present invention. By adjusting the height and horizontal position, it is ensured that the industrial camera 5 can completely capture the upper scale line 8 and the lower scale line on the timing ball 10 Image at 9.

毛细管粘度计1通过测量支架固定在透明循环的恒温水箱2内,亮度稳定的面光源3提供合适的背景光,工业相机5可通过步进电机6的控制纵向自由调节以适应不同的高度。工业相机5拍摄到的帧图像由千兆网线传输至计算机7,由计算机7完成测量、计时和计算工作后,得出待测试液的粘度。The capillary viscometer 1 is fixed in the transparent circulating constant temperature water tank 2 through the measuring bracket, the surface light source 3 with stable brightness provides suitable background light, and the industrial camera 5 can be freely adjusted vertically through the control of the stepping motor 6 to adapt to different heights. The frame image captured by the industrial camera 5 is transmitted to the computer 7 by a gigabit network cable. After the computer 7 completes the measurement, timing and calculation, the viscosity of the liquid to be tested is obtained.

计算机7上安装有图像采集处理与计时计算控制单元模块,计算机7作为图像采集处理与计时计算的控制单元,接收工业相机5拍摄的帧图像,对其进行刻度线的判定与运动液位的识别。待测试液在毛细管粘度计1内做自由落体运动由上而下经过计时球10上的上刻度线8时,计算机7做出判定并开始计时;在待测试液经过计时球10上的下刻度线9时,停止计时;计算得出间隔时间后,根据公式计算得到待测试液的运动粘度,并在计算机7的显示屏上呈现。An image acquisition processing and timing calculation control unit module is installed on the computer 7. As a control unit for image acquisition processing and timing calculation, the computer 7 receives the frame image captured by the industrial camera 5, and carries out the determination of the scale line and the identification of the moving liquid level. . When the liquid to be tested does a free fall motion in the capillary viscometer 1 and passes the upper scale line 8 on the timing ball 10 from top to bottom, the computer 7 makes a judgment and starts timing; when the liquid to be tested passes through the lower scale on the timing ball 10 At line 9, stop timing; after calculating the interval time, calculate the kinematic viscosity of the liquid to be tested according to the formula, and present it on the display screen of the computer 7.

如图4所示,为本发明实施例的图像采集处理流程框图。图像采集处理与计时计算单元主要在Visual Studio 2019中通过C++算法语句实现。计算机7通过创建相机获得帧图像,然后转换为Open CV可识别的图像格式,将彩色图像转换为灰度图,划定感兴趣区域(ROI),在感兴趣区域里利用Canny算子对灰度处理后的图像进行边缘检测,能够准确获取液位图像边缘,再进行刻度线的检测与运动液位的检测。As shown in FIG. 4 , it is a block diagram of an image acquisition processing flow according to an embodiment of the present invention. The image acquisition processing and timing calculation unit is mainly implemented in Visual Studio 2019 through C++ algorithm statements. Computer 7 obtains a frame image by creating a camera, then converts it to an image format recognizable by Open CV, converts the color image to a grayscale image, defines a region of interest (ROI), and uses the Canny operator in the region of interest to compare the grayscale. The processed image is subjected to edge detection, which can accurately obtain the edge of the liquid level image, and then perform the detection of the scale line and the detection of the moving liquid level.

对于毛细管粘度计1的计时球10处刻度线的识别检测,所用算法为直线段检测算法(LSD算法,Line Segment Detector)。该算法能在较短的时间内获得较高精度的直线段检测结果,检测速度快,而且无需参数调节,利用错误控制的方法,提高直线检测的准确度。For the identification and detection of the tick marks at the timing ball 10 of the capillary viscometer 1, the algorithm used is the linear segment detection algorithm (LSD algorithm, Line Segment Detector). The algorithm can obtain high-precision straight-line segment detection results in a short period of time, with fast detection speed and without parameter adjustment. The method of error control is used to improve the accuracy of straight-line detection.

对于毛细管粘度计1内的运动液位的检测跟踪,运用改进的ViBe运动目标检测算法,如图5所示,为本发明实施例的改进ViBe运动目标检测算法框图。基于所采集的视频序列,采用多帧图像使用改进三帧差分法构建ViBe算法的背景模型原型,在原型中添加了相邻元素变化值。依据当前帧图像与背景模型差值作为背景复杂程度的调整因子,以调整背景模型和阈值,并进行中值滤波;改进三帧差分法包括:三帧差分处理、膨胀处理、逻辑或运算和形态学滤波。前景检测是在视频图像序列中识别运动目标(前景目标)和静态部分的过程,即在图像序列中识别出计时球内的运动液面和静态背景。检测后的结果与三帧差分法进行逻辑与运算和后处理操作(形态学滤波),完成对粘度计中运动液面的检测。For the detection and tracking of the moving liquid level in the capillary viscometer 1, the improved ViBe moving target detection algorithm is used, as shown in FIG. 5, which is a block diagram of the improved ViBe moving target detection algorithm according to the embodiment of the present invention. Based on the collected video sequence, the background model prototype of ViBe algorithm is constructed by using multi-frame images and the improved three-frame difference method, and the change value of adjacent elements is added to the prototype. According to the difference between the current frame image and the background model as the adjustment factor of the background complexity, to adjust the background model and threshold, and perform median filtering; the improved three-frame difference method includes: three-frame difference processing, expansion processing, logical OR operation and morphology learn filtering. Foreground detection is the process of identifying moving objects (foreground objects) and static parts in a video image sequence, that is, identifying the moving liquid surface and static background in the timing ball in the image sequence. Logical AND operation and post-processing operation (morphological filtering) are performed on the detected results and the three-frame difference method to complete the detection of the moving liquid level in the viscometer.

在检测过程中,本发明能在实验环境方面得到保证,在噪声较少或无噪声的前提下,无需过多预处理而造成数据运算量过大,以及计算机算力不够而形成的误差。In the detection process, the present invention can guarantee the experimental environment, under the premise of less noise or no noise, there is no need for excessive preprocessing, resulting in excessive data calculation amount and errors caused by insufficient computer computing power.

本领域技术人员应该明白,上述本发明的各模块或各步骤可以用通用的计算机装置来实现,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。本发明不限制于任何特定的硬件和软件的结合。Those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by the computing device, so that they can be stored in a storage device. The device is executed by a computing device, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps in them are fabricated into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.

以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

上述虽然结合附图对本发明的具体实施方式进行了描述,但并非对本发明保护范围的限制,所属领域技术人员应该明白,在本发明的技术方案的基础上,本领域技术人员不需要付出创造性劳动即可做出的各种修改或变形仍在本发明的保护范围以内。Although the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, they do not limit the scope of protection of the present invention. Those skilled in the art should understand that on the basis of the technical solutions of the present invention, those skilled in the art do not need to pay creative efforts. Various modifications or deformations that can be made are still within the protection scope of the present invention.

Claims (8)

1. The liquid viscosity measurement system based on computer vision discernment, characterized by, includes: the device comprises a constant-temperature water tank (2), a surface light source (3), a cradle head (4), an industrial camera (5), a stepping motor (6) and a computer (7), wherein the surface light source (3) and the cradle head (4) are respectively positioned on two opposite sides of the constant-temperature water tank (2); the industrial camera (5) is slidably mounted on the cradle head (4) through the movable support to form an image acquisition system, the stepping motor (6) is arranged at the lower part of the cradle head (4), the movable support is driven by the stepping motor (6) to slide up and down, and the industrial camera (5) moves left and right on the horizontal plane of the movable support; the capillary viscometer (1) is fixed in a transparent circulating constant-temperature water tank (2) through a measuring bracket, a frame image shot by an industrial camera (5) is transmitted to a computer (7), an image acquisition processing and timing calculation control unit module is installed on the computer (7), and the computer (7) receives the frame image shot by the industrial camera (5) and judges scale lines and identifies a motion liquid level; when the liquid to be tested does free falling motion in the capillary viscometer (1) and passes through an upper scale mark (8) on the timing ball (10) from top to bottom, the computer (7) makes a judgment and starts timing; when the liquid to be tested passes through the lower scale mark (9) on the timing ball (10), stopping timing; and after the interval time is obtained through calculation, calculating the kinematic viscosity of the liquid to be tested according to a formula.
2. The liquid viscosity measurement system based on computer vision recognition according to claim 1, wherein the computer (7) obtains a frame image by creating a camera, converts the frame image into an image format recognizable by Open CV, converts a color image into a gray scale image, delimits an area of interest, performs edge detection on the image after gray scale processing in the area of interest by using Canny operator, and then performs detection of scale marks and detection of moving liquid level.
3. The computer vision recognition-based liquid viscosity measurement system according to claim 2, characterized in that for the recognition detection of the scale lines at the timing ball (10) of the capillary viscometer (1), the algorithm used is a straight line segment detection algorithm; for the detection and tracking of the moving liquid level in the capillary viscometer (1), the adopted algorithm is an improved ViBe moving target detection algorithm; the ViBe, namely background modeling, is an algorithm for pixel-level video background modeling or foreground detection, and when the motion speed of a moving target is greatly different, ghost images can appear to cause incomplete target detection, so that the ViBe is improved to reduce the occurrence of missed detection and error detection.
4. The computer vision recognition-based liquid viscosity measurement system according to claim 3, wherein an improved ViBe moving object detection algorithm is applied, a background model prototype of the ViBe algorithm is constructed by using a multi-frame image and an improved three-frame difference method, and adjacent element change values are added to the prototype; taking the difference value of the current frame image and the background model as an adjusting factor of the background complexity degree to adjust the background model and the threshold value; and carrying out logical AND operation and post-processing operation on the detected result and an improved three-frame difference method to finish the detection of the motion liquid level in the viscometer.
5. The computer vision recognition-based liquid viscosity measurement system of claim 4, wherein the improved three-frame difference method comprises: three-frame difference processing, dilation processing, logical or operations, and morphological filtering.
6. The computer vision recognition-based liquid viscosity measurement system according to claim 1, wherein the surface light source (3) and the constant temperature water tank (2) are of an integral structure, the pan-tilt (4) is not in contact with the constant temperature water tank (2) when being set, and a frame image shot by the industrial camera (5) is transmitted to the computer (7) through a gigabit network.
7. The computer vision recognition based liquid viscosity measurement system according to claim 1, characterized in that an industrial camera (5), preferably a Haikang industrial area-array camera, is used as an image acquisition device, and the kinematic viscosity of the liquid to be tested is presented on a display screen of a computer (7).
8. The computer vision recognition based liquid viscosity measurement system according to claim 1, characterized in that the capillary viscometer (1) is a viscometer that has passed certification and has a permanent identification.
CN202210813556.7A 2022-07-11 2022-07-11 Liquid viscosity measurement system based on computer vision identification Pending CN115235948A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210813556.7A CN115235948A (en) 2022-07-11 2022-07-11 Liquid viscosity measurement system based on computer vision identification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210813556.7A CN115235948A (en) 2022-07-11 2022-07-11 Liquid viscosity measurement system based on computer vision identification

Publications (1)

Publication Number Publication Date
CN115235948A true CN115235948A (en) 2022-10-25

Family

ID=83674424

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210813556.7A Pending CN115235948A (en) 2022-07-11 2022-07-11 Liquid viscosity measurement system based on computer vision identification

Country Status (1)

Country Link
CN (1) CN115235948A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116474157A (en) * 2023-04-28 2023-07-25 广州迅合医疗科技有限公司 Preparation method and system of hard tissue biological adhesive for continuous adhesion in wet environment
CN116589652A (en) * 2023-04-28 2023-08-15 广州迅合医疗科技有限公司 Preparation method and system of soft tissue biological adhesive based on polyurethane
CN116908051A (en) * 2023-06-21 2023-10-20 广州市嘉雁粘合剂有限公司 Hot melt adhesive flow property detection method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109932282A (en) * 2017-12-19 2019-06-25 中国科学院沈阳自动化研究所 High temperature molten slag online visual monitoring system and method
CN112179808A (en) * 2020-09-22 2021-01-05 山东非金属材料研究所 Automatic calibrating device and method for standard capillary viscometer
US20210334995A1 (en) * 2020-04-23 2021-10-28 Wexenergy Innovations Llc System and method of measuring distances related to an object utilizing ancillary objects
CN113740207A (en) * 2021-09-15 2021-12-03 陕西省计量科学研究院 Machine vision-based viscosity detection system and method
CN114062198A (en) * 2021-11-10 2022-02-18 山东非金属材料研究所 Automatic calibration system and method for Ubbelohde viscometer

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109932282A (en) * 2017-12-19 2019-06-25 中国科学院沈阳自动化研究所 High temperature molten slag online visual monitoring system and method
US20210334995A1 (en) * 2020-04-23 2021-10-28 Wexenergy Innovations Llc System and method of measuring distances related to an object utilizing ancillary objects
CN112179808A (en) * 2020-09-22 2021-01-05 山东非金属材料研究所 Automatic calibrating device and method for standard capillary viscometer
CN113740207A (en) * 2021-09-15 2021-12-03 陕西省计量科学研究院 Machine vision-based viscosity detection system and method
CN114062198A (en) * 2021-11-10 2022-02-18 山东非金属材料研究所 Automatic calibration system and method for Ubbelohde viscometer

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
孙清涛 等: "基于改进三帧差法的微小目标运动轨迹检测方法研究", 《装备制造技术》, no. 3, 31 March 2019 (2019-03-31), pages 135 - 137 *
王春丹: "基于改进ViBe运动目标检测算法的研究", 《中国优秀硕士学位论文全文数据库信息科技辑》, no. 7, 15 July 2021 (2021-07-15), pages 138 - 289 *
赵钦君 等: "一种基于时空信息的多目标检测新算法", 《仪器仪表学报》, no. 4, 31 December 2011 (2011-12-31), pages 877 - 882 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116474157A (en) * 2023-04-28 2023-07-25 广州迅合医疗科技有限公司 Preparation method and system of hard tissue biological adhesive for continuous adhesion in wet environment
CN116589652A (en) * 2023-04-28 2023-08-15 广州迅合医疗科技有限公司 Preparation method and system of soft tissue biological adhesive based on polyurethane
CN116474157B (en) * 2023-04-28 2023-09-15 广州迅合医疗科技有限公司 Preparation method and system of hard tissue biological adhesive for continuous adhesion in wet environment
CN116589652B (en) * 2023-04-28 2023-10-27 广州迅合医疗科技有限公司 A preparation method and system for soft tissue bioadhesive based on polyurethane
CN116908051A (en) * 2023-06-21 2023-10-20 广州市嘉雁粘合剂有限公司 Hot melt adhesive flow property detection method
CN116908051B (en) * 2023-06-21 2023-12-29 广州市嘉雁粘合剂有限公司 Hot melt adhesive flow property detection method

Similar Documents

Publication Publication Date Title
CN115235948A (en) Liquid viscosity measurement system based on computer vision identification
WO2021179679A1 (en) Automobile dashboard testing system and testing method based on machine vision
CN105181082B (en) A kind of liquid-level detecting method and device based on visible laser and image procossing
CN103558229B (en) A kind of MURA vision automatic testing method of TFT-LCD processing procedure and device
CN106248686A (en) Glass surface defects based on machine vision detection device and method
CN106403853A (en) Stone material surface roughness on-line detection device and stone material surface roughness on-line detection method
CN103175792B (en) A water environment monitoring device based on machine vision
CN102889907B (en) Flow monitoring device and flow monitoring method based on visual inspection
CN104697903A (en) Real liquid drop process portable contact angle and interface tension testing method and apparatus thereof
CN110991360A (en) Robot inspection point location intelligent configuration method based on visual algorithm
CN116893124A (en) Automatic detection device and method for capillary viscometer based on machine vision
CN101561383A (en) Computer vision-based system and computer-vision based method for automatically measuring viscosity of colored liquid
CN102564927A (en) Urine holographic detecting method and equipment
CN110553813A (en) method for determining local wind resistance test interval of wind window based on PIV (particle image velocimetry) experiment
CN108805954B (en) Projection chromatography three-dimensional blood flow velocity measurement device and method
CN107067423A (en) A kind of micro- method for becoming monitoring of the historical relic body for being applied to open environmental effect
CN114565848A (en) Liquid medicine level detection method and system in complex scene
CN111141746B (en) A method and system for automatic detection of the length of pen refill tail oil
CN112378797A (en) Full-automatic indentation measuring device and method
CN209606340U (en) Defect detection system for accumulated material at the bottom of transparent medicine bottle
CN112289154A (en) Machine vision teaching system and method for Newton's ring experiment
CN114062198B (en) Automatic calibration system and method for Ubbelohde viscometer
CN208873165U (en) a face recognition device
CN115035071A (en) Visual detection method for black spot defect of PAD light guide plate
CN115976749A (en) Rotary hook installation and positioning system and rotary hook installation and positioning method

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