CN110032971B - Foreign object detection method and detection system for mobile platform based on monocular camera - Google Patents

Foreign object detection method and detection system for mobile platform based on monocular camera Download PDF

Info

Publication number
CN110032971B
CN110032971B CN201910292288.7A CN201910292288A CN110032971B CN 110032971 B CN110032971 B CN 110032971B CN 201910292288 A CN201910292288 A CN 201910292288A CN 110032971 B CN110032971 B CN 110032971B
Authority
CN
China
Prior art keywords
platform
foreign
mobile platform
information
collected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910292288.7A
Other languages
Chinese (zh)
Other versions
CN110032971A (en
Inventor
翟耀光
樊卫华
黄樊晶
向雨竹
汤轩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Mowen Technology Co ltd
Original Assignee
Nanjing University of Science and Technology
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 Nanjing University of Science and Technology filed Critical Nanjing University of Science and Technology
Priority to CN201910292288.7A priority Critical patent/CN110032971B/en
Publication of CN110032971A publication Critical patent/CN110032971A/en
Application granted granted Critical
Publication of CN110032971B publication Critical patent/CN110032971B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

本发明公开了一种基于单目摄像头的移动平台异物检测方法及检测系统。该系统由包含单目摄像头的图像采集模块和主控器组成。首先,在周期性低速移动平台(如机械臂)安装图像采集模块,在移动平台的不同位置多次采集图像并进行处理,如确定存在异物,主控制器计算出异物的空间位置,尺寸和颜色等信息,并将计算结果发送至上级控制系统。本发明借助移动平台,使用单目摄像头获取目标的位置等信息,可以达到多目摄像头相同的效果,可应用于工业现场(如自动化流水线等)有无工件掉落或其他低速异物出现的检测。

Figure 201910292288

The invention discloses a mobile platform foreign object detection method and detection system based on a monocular camera. The system consists of an image acquisition module including a monocular camera and a main controller. First, an image acquisition module is installed on a periodic low-speed moving platform (such as a robotic arm), and images are collected at different positions of the mobile platform for multiple times and processed. For example, if it is determined that there is a foreign body, the main controller calculates the spatial position, size and color of the foreign body. and other information, and send the calculation results to the upper-level control system. With the help of a mobile platform, the invention uses a monocular camera to obtain information such as the position of the target, which can achieve the same effect as a multi-eye camera, and can be applied to the detection of whether a workpiece is dropped or other low-speed foreign objects in industrial sites (such as automated assembly lines).

Figure 201910292288

Description

基于单目摄像头的移动平台异物检测方法及检测系统Foreign object detection method and detection system for mobile platform based on monocular camera

技术领域technical field

本发明涉及机器视觉和图像处理领域,特别是一种出现异物时异物状态检测方法及检测系统。The invention relates to the field of machine vision and image processing, in particular to a foreign body state detection method and detection system when a foreign body occurs.

背景技术Background technique

使用计算机获取及处理图像的技术被称为机器视觉技术。确切地说,机器视觉就是使用光学非接触式感应设备自动接收并解释真实场景的图像以获得信息控制机器或流程。图像处理是使用计算机数据处理技术对图像数据进行处理并获取有效信息的技术。人类视觉最擅长于对复杂、非结构化的场景进行定性解释,但机器视觉则凭借速度、精度和可重复性等优势,擅长于对结构化场景进行定量测量,举例来说,在生产线上,机器视觉系统每分钟能够对数百个甚至数千个元件进行检测。配备适当分辨率的相机和光学元件后,机器视觉系统能够轻松检验小到人眼无法看到的物品细节特征。机器视觉在工业上的应用可以极大的减少成本和人力劳动。The technology that uses computers to acquire and process images is called machine vision technology. To be precise, machine vision is the use of optical non-contact sensing devices to automatically receive and interpret images of real scenes to obtain information to control machines or processes. Image processing is a technology that uses computer data processing technology to process image data and obtain effective information. Human vision is best at qualitatively interpreting complex, unstructured scenes, but machine vision is good at quantitatively measuring structured scenes with advantages such as speed, accuracy, and repeatability. For example, on a production line, Machine vision systems can inspect hundreds or even thousands of components per minute. Equipped with cameras and optics of the appropriate resolution, machine vision systems can easily inspect details of objects too small to be seen by the human eye. The application of machine vision in industry can greatly reduce costs and human labor.

一幅图像所包含的信息是至以十万甚至更高数量级衡量的大量像素点的数字信息;在单色图像中,每个像素点只包含一种灰度信息;在彩色图像中,每个像素点包含RGB三种颜色的亮度信息。处理如此巨量信息的过程相当的复杂,如果所有机器视觉的研究者都从最底层的处理方法进行研究,显然是低效的,也是不现实的。幸而在机器视觉领域,有强大且开源的OpenCV计算机视觉库存在,OpenCV是一个基于BSD许可(开源)发行的跨平台计算机视觉库,可以运行在Linux、Windows、Android和Mac OS操作系统上。它轻量级而且高效——由一系列C函数和少量C++类构成,同时提供了Python、Ruby、MATLAB等语言的接口,实现了图像处理和计算机视觉方面的很多通用算法。OpenCV提供了用于图像处理专用的数据结构和大量处理图像的库函数,为机器视觉的研究提供了极大的方便。The information contained in an image is the digital information of a large number of pixels measured in the order of one hundred thousand or more; in a monochrome image, each pixel contains only one kind of grayscale information; in a color image, each pixel The pixels contain the luminance information of the three colors of RGB. The process of processing such a huge amount of information is quite complicated. If all machine vision researchers study from the lowest level of processing methods, it is obviously inefficient and unrealistic. Fortunately, in the field of machine vision, there is a powerful and open source OpenCV computer vision library. OpenCV is a cross-platform computer vision library based on a BSD license (open source) and can run on Linux, Windows, Android and Mac OS operating systems. It is lightweight and efficient - it consists of a series of C functions and a small number of C++ classes, and provides interfaces in languages such as Python, Ruby, and MATLAB, and implements many general algorithms in image processing and computer vision. OpenCV provides special data structures for image processing and a large number of library functions for processing images, which provides great convenience for machine vision research.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于提供一种基于单目摄像头的掉落物检测方法及其检测系统,在本系统中,使用单目摄像头就可以获取低速异物的位置,尺寸和颜色等信息。The purpose of the present invention is to provide a falling object detection method and detection system based on a monocular camera, in which information such as the position, size and color of low-speed foreign objects can be obtained by using the monocular camera.

实现本发明目的的技术解决方案的方法部分为:一种基于单目摄像头的移动平台掉落物检测方法,包括以下步骤:The method part of the technical solution for realizing the object of the present invention is: a method for detecting dropped objects on a mobile platform based on a monocular camera, comprising the following steps:

步骤1、平台选定:选择搭载移动平台及平台运动过程中的至少2个关键位置点;Step 1. Platform selection: select at least 2 key positions in the process of carrying the mobile platform and the platform movement;

步骤2、获取参考:在无异物出现的前提下在所有关键位置采集环境图像信息作为参考图像;Step 2. Obtain reference: collect environmental image information at all key positions as a reference image under the premise of no foreign matter;

步骤3、图像采集:当移动平台运动到任意一个关键位置时,采集当前位置的环境图像信息;Step 3, image acquisition: when the mobile platform moves to any key position, the environmental image information of the current position is collected;

步骤4、图像处理:将采集到的环境图像信息与同一关键位置采集到的参考图像进行对比,确定有无异物出现;如果有异物出现,执行步骤5,否则回到步骤3,并在用户设置的周期覆盖更新参考图像;Step 4. Image processing: compare the collected environmental image information with the reference image collected at the same key position to determine whether there is foreign matter; if there is foreign matter, go to step 5, otherwise go back to step 3, and set it in the user settings. The periodic coverage updates the reference image;

步骤5、多点采集:移动平台到下一个关键位置,进行环境图像信息采集;Step 5. Multi-point collection: move the platform to the next key position to collect environmental image information;

步骤6、信息处理:综合至少两个关键位置采集到的图像信息,计算出异物的位置、尺寸和颜色。Step 6, information processing: Integrate the image information collected from at least two key positions to calculate the position, size and color of the foreign object.

一种基于单目摄像头的移动平台掉落物检测系统,包括图像采集模块、图像处理模块和信息分析模块,其中:A mobile platform drop detection system based on a monocular camera, comprising an image acquisition module, an image processing module and an information analysis module, wherein:

图像采集模块与图像处理模块相连以获取环境图像信息,通过光电传感器将获取到的光线模拟信息转化为数字RGB信息,并将该信息传输至图像处理模块,同时传输时间和位置标签;The image acquisition module is connected with the image processing module to obtain environmental image information, converts the obtained light analog information into digital RGB information through the photoelectric sensor, and transmits the information to the image processing module, and transmits time and position labels at the same time;

图像处理模块与信息分析模块相连,图像处理模块将带有时间和位置标签的环境图像信息储存至存储器,首先将当前环境图像信息进行色域转换后与无异物状态下的环境图像信息进行差异计算,并将结果进行二值化切割,最后经过去噪处理后进行连通域检测,经检测的结果传输至信息分析模块;The image processing module is connected with the information analysis module. The image processing module stores the environmental image information with time and position labels in the memory. First, the current environmental image information is converted into the color gamut and the difference calculation is performed with the environmental image information in the state of no foreign matter. , and the result is binarized and cut, and finally the connected domain is detected after denoising, and the detected result is transmitted to the information analysis module;

信息分析模块与上级控制系统及图像采集模块相连,用于对图像处理得到的信息进行处理汇总;首先根据连通域的检测结果进行异物存在性判别,如果存在异物,则控制图像采集模块在下一个关键位置点继续采集环境图像信息,再次确认异物是否存在,如果确定异物存在,则汇总多次采集到的信息计算出异物的位置、尺寸和颜色信息,上报上级控制系统进一步处理;如果不存在异物或第二次采集后发现异物不存在,则控制图像采集模块正常工作。The information analysis module is connected with the upper-level control system and the image acquisition module, and is used to process and summarize the information obtained by image processing; first, according to the detection results of the connected domain, the existence of foreign objects is judged. The location point continues to collect environmental image information, and reconfirms whether the foreign body exists. If it is determined that the foreign body exists, the information collected multiple times is collected to calculate the position, size and color information of the foreign body, and report to the superior control system for further processing; if there is no foreign body or After the second acquisition, it is found that the foreign body does not exist, and the image acquisition module is controlled to work normally.

与现有技术相比,本发明的显著优点为:(1)仅仅使用单目摄像头,就可以实现多目摄像头深度检测的效果;(2)允许冗余检测,不断对已有的结果进行修正,方便提高精度;(3)可以专门配置移动平台,也可以直接安装在已有的周期性运动低速平台上如焊接,装配机械臂上,适应性强;(4)图像采集模块允许扩展额外的自由度,实现灵活的多视角检测。Compared with the prior art, the present invention has the following significant advantages: (1) the effect of multi-camera depth detection can be achieved only by using a monocular camera; (2) redundant detection is allowed, and existing results are continuously corrected , it is convenient to improve the accuracy; (3) The mobile platform can be specially configured, or it can be directly installed on the existing periodic motion low-speed platform such as welding, assembling the robot arm, and has strong adaptability; (4) The image acquisition module allows to expand additional degrees of freedom, enabling flexible multi-view detection.

附图说明Description of drawings

图1是本发明基于单目摄像头的移动平台异物检测系统的结构图。FIG. 1 is a structural diagram of a mobile platform foreign object detection system based on a monocular camera of the present invention.

图2是本发明所述系统的典型外观结构。Figure 2 is a typical appearance structure of the system according to the present invention.

图3是图像采集模块的扩展1自由度安装方式。Figure 3 shows the expansion 1 degree of freedom installation method of the image acquisition module.

图4是图像采集模块的扩展2自由度安装方式。Figure 4 shows the extended 2-DOF installation method of the image acquisition module.

图5是本发明基于单目摄像头的移动平台异物检测方法的流程图。FIG. 5 is a flowchart of the method for detecting foreign objects on a mobile platform based on a monocular camera according to the present invention.

图6是安装在低自由度机械臂上工作的三维模型。Figure 6 is a three-dimensional model installed on a low-degree-of-freedom manipulator.

图7是异物空间位置的定位方法。FIG. 7 is a method for locating the spatial position of foreign objects.

图8是实施例1中关键位置A异物出现前后的视野状态Fig. 8 is the visual field state before and after the appearance of the foreign body at the key position A in Example 1

图9是实施例1中经过处理后关键位置A检测到异物存在的结果Fig. 9 is the result that the foreign matter is detected in the key position A after processing in Example 1

图10是实施例1中关键位置B异物出现前后的视野状态Fig. 10 is the visual field state before and after the appearance of the foreign body at the key position B in Example 1

图11是实施例1中经过处理后关键位置B检测到异物存在的结果Figure 11 is the result of detecting the presence of foreign matter at key position B after processing in Example 1

具体实施方式Detailed ways

下面结合说明书附图对本发明作进一步说明。The present invention will be further described below with reference to the accompanying drawings.

结合图5及图6,本发明基于单目摄像头的移动平台异物检测方法,步骤如下:5 and 6, the present invention is based on a monocular camera-based mobile platform foreign body detection method, the steps are as follows:

步骤1、平台选定:选择搭载移动平台及平台运动过程中的至少2个关键位置点;Step 1. Platform selection: select at least 2 key positions in the process of carrying the mobile platform and the platform movement;

移动平台在有限的时间内,会多次运动到同一空间位置和角度,方便图像采集模块从不同的角度观察同一被监控区域;The mobile platform will move to the same spatial position and angle multiple times within a limited time, which is convenient for the image acquisition module to observe the same monitored area from different angles;

步骤2、获取参考:在无异物出现的前提下在所有关键位置采集环境图像信息作为参考图像;Step 2. Obtain reference: collect environmental image information at all key positions as a reference image under the premise of no foreign matter;

设置参考图像更新的周期,例如每隔一定时间或每隔数个周期使用最新获取的没有异物存在的图像覆盖参考图像。如果更新周期过短,会增加计算负担,如果更新周期过长会因为环境轻微变化如一天中阳光强度变化造成误差累计影响判断效果;Set the update cycle of the reference image, for example, use the newly acquired image without foreign objects to cover the reference image every certain time or every several cycles. If the update period is too short, it will increase the computational burden. If the update period is too long, the error accumulation will affect the judgment effect due to slight changes in the environment, such as changes in sunlight intensity during the day;

步骤3、图像采集:当移动平台运动到任意一个关键位置时,采集当前位置的环境图像信息;Step 3, image acquisition: when the mobile platform moves to any key position, the environmental image information of the current position is collected;

在这里,将第一个运动到的关键位置点设为关键位置A,空间坐标为(xa,ya,za),图像采集模块的轴心角度为Da;Here, the key position point to be moved to is set as the key position A, the spatial coordinates are (xa, ya, za), and the axis angle of the image acquisition module is Da;

步骤4、图像处理:将采集到的环境图像信息与同一关键位置采集到的参考图像进行对比,确定有无异物出现;如果有异物出现,执行步骤5,否则回到步骤3,并在用户设置的周期覆盖更新参考图像;Step 4. Image processing: compare the collected environmental image information with the reference image collected at the same key position to determine whether there is foreign matter; if there is foreign matter, go to step 5, otherwise go back to step 3, and set it in the user settings. The periodic coverage updates the reference image;

通过不同周期同一关键位置采集到的图像信息进行对比并进行去噪处理后,可以快速确定视野内有无异物出现;After comparing the image information collected at the same key position in different periods and denoising, it can quickly determine whether there is foreign matter in the field of view;

步骤5、多点采集:移动平台移动到下一个关键位置,进行环境图像信息采集;Step 5. Multi-point collection: the mobile platform moves to the next key position to collect environmental image information;

在这里,将第二个运动到的关键位置点设为关键位置B,空间坐标为(xb,yb,zb),图像采集模块的轴心角度为Db.Here, set the second key position point to be moved to the key position B, the spatial coordinates are (xb, yb, zb), and the axis angle of the image acquisition module is Db.

步骤6、信息处理:综合至少两个关键位置采集到的图像信息,计算出异物的位置、尺寸和颜色。Step 6, information processing: Integrate the image information collected from at least two key positions to calculate the position, size and color of the foreign object.

通过对获取到的图像进行形态学处理的方法,可以得到异物位置坐标点T(xt,yt,zt)在关键位置A的视野中的位置相对于A点的方向向量为D1,即如图7所示,在关键位置B的视野中的位置相对于B点的方向向量为D2,结合点A的坐标和点B的坐标,可以得到空间直线AT和BT的方程,计算两条空间直线AT和BT的交点即可得到点T的坐标。考虑到实际定位过程中可能存在误差,导致计算得到的两条空间直线没有交点,如果发现两条空间直线没有交点,则取两条异面直线的公垂线的中点作为异物的空间位置点。By morphological processing of the acquired image, it can be obtained that the position of the foreign object position coordinate point T(xt, yt, zt) in the field of view of the key position A relative to the direction vector of point A is D1, as shown in Figure 7 As shown, the position in the visual field of the key position B relative to the direction vector of point B is D2. Combining the coordinates of point A and the coordinates of point B, the equations of the space straight lines AT and BT can be obtained, and the two space straight lines AT and BT can be calculated. The intersection of BT can get the coordinates of point T. Considering that there may be errors in the actual positioning process, resulting in no intersection between the two spatial straight lines calculated, if it is found that the two spatial straight lines do not intersect, take the midpoint of the common perpendiculars of the two different-plane straight lines as the spatial position point of the foreign object. .

由物体的空间位置点及步骤3和步骤5中获得的原始图像可以确定物体的大致尺寸和颜色等信息。Information such as the approximate size and color of the object can be determined from the spatial position points of the object and the original images obtained in steps 3 and 5.

如图1所示,本发明基于单目摄像头的移动平台异物检测系统,包括图像采集模块、图像处理模块和信息分析模块,其中:As shown in Figure 1, the mobile platform foreign body detection system based on the monocular camera of the present invention includes an image acquisition module, an image processing module and an information analysis module, wherein:

图像采集模块与图像处理模块相连以获取环境图像信息,通过光电传感器将获取到的光线模拟信息转化为数字RGB信息,并将该信息传输至图像处理模块,同时传输时间和位置标签;The image acquisition module is connected with the image processing module to obtain environmental image information, converts the obtained light analog information into digital RGB information through the photoelectric sensor, and transmits the information to the image processing module, and transmits time and position labels at the same time;

图像处理模块与信息分析模块相连,图像处理模块将带有时间和位置标签的环境图像信息储存至存储器;首先将当前环境图像信息进行色域转换后与无异物状态下的环境图像信息进行差异计算,并将结果进行二值化切割,最后经过去噪处理后进行连通域检测,经检测的结果传输至信息分析模块;The image processing module is connected with the information analysis module, and the image processing module stores the environmental image information with time and position labels in the memory; first, the current environmental image information is converted into the color gamut and the difference calculation is performed with the environmental image information in the state of no foreign matter. , and the result is binarized and cut, and finally the connected domain is detected after denoising, and the detected result is transmitted to the information analysis module;

信息分析模块与上级控制系统及图像采集模块相连,用于对图像处理得到的信息进行处理汇总;首先根据连通域的检测结果进行异物存在性判别,如果存在异物,则控制图像采集模块在下一个关键位置点继续采集环境图像信息,再次确认异物是否存在,如果确定异物存在,则汇总多次采集到的信息计算出异物的位置、尺寸和颜色信息,上报上级控制系统进一步处理;如果不存在异物或第二次采集后发现异物不存在,则控制图像采集模块正常工作。The information analysis module is connected with the upper-level control system and the image acquisition module, and is used to process and summarize the information obtained by image processing; first, according to the detection results of the connected domain, the existence of foreign objects is judged. The location point continues to collect environmental image information, and reconfirms whether the foreign body exists. If it is determined that the foreign body exists, the information collected multiple times is collected to calculate the position, size and color information of the foreign body, and report to the superior control system for further processing; if there is no foreign body or After the second acquisition, it is found that the foreign body does not exist, and the image acquisition module is controlled to work normally.

图2是本发明所述系统的典型外观结构,其中1为镜头,2为工业相机,3为固定底座,4为主控器,5,6为通信接口;图3是图像采集模块的扩展1自由度安装方式,图4是图像采集模块的扩展2自由度安装方式,其中7为包含舵机的水平转台,8为包含舵机的垂直转台,图3图4类型的图像采集模块用以扩展图像采集模块的视野。Fig. 2 is a typical appearance structure of the system according to the present invention, wherein 1 is a lens, 2 is an industrial camera, 3 is a fixed base, 4 is a main controller, 5 and 6 are communication interfaces; Fig. 3 is an extension of the image acquisition module 1 The installation method of degrees of freedom, Figure 4 is the expansion of the image acquisition module with 2 degrees of freedom installation, where 7 is the horizontal turntable including the steering gear, and 8 is the vertical turntable including the steering gear. The field of view of the image acquisition module.

如图2所示,该系统由图像采集模块和主控器组成,其中,1为镜头,2为工业摄像机,3为固定1和2的底座;4为主控器,使用嵌入式控制系统,搭载Linux系统,并具备基本的通信接口和网络功能,图1中的图像处理模块和信息分析模块以主控器软件的形式实现,5为DB9接口,用于串行通信,6为RJ45接口,用于网络通信。摄像机搭载平台可根据具体情况提供固定或扩展自由度的安装方式,扩展自由度越高,可检测的范围和角度就越大,扩展1自由度典型结构如图3所示,其中,7为水平转台,可以通过控制舵机精确转动,使得图像采集模块可以拥有更加宽阔的水平视野;扩展2自由度典型结构如图4所示,其中,8为竖直转台,可以通过控制舵机精确转动,使得图像采集模块可以拥有更加宽阔的竖直视野。As shown in Figure 2, the system consists of an image acquisition module and a main controller, where 1 is a lens, 2 is an industrial camera, 3 is a base for fixing 1 and 2; 4 is a main controller, using an embedded control system, It is equipped with Linux system and has basic communication interfaces and network functions. The image processing module and information analysis module in Figure 1 are implemented in the form of main controller software. 5 is the DB9 interface for serial communication, and 6 is the RJ45 interface. for network communication. The camera mounting platform can provide fixed or extended degrees of freedom installation according to specific conditions. The higher the extended degree of freedom, the larger the detectable range and angle. The typical structure of the extended 1 degree of freedom is shown in Figure 3, where 7 is the horizontal The turntable can be precisely rotated by controlling the steering gear, so that the image acquisition module can have a wider horizontal field of view; the typical structure of extended 2 degrees of freedom is shown in Figure 4, where 8 is a vertical turntable, which can be precisely rotated by controlling the steering gear, The image acquisition module can have a wider vertical field of view.

在使用本发明所述的系统时,首先选定周期性低速运动平台,例如在工业生产中常用的焊接,装配和码垛机械臂;如果工作位置没有符合条件的移动平台,可以为本系统专门配置周期性低速运动平台如低自由度的机械臂。选定工作平台后,将图像采集模块安装在工作平台的适当位置如末端,并通过数据线将图像采集模块与主控器相连,主控器可与图像采集模块同时搭载于工作平台上或安装在固定位置。主控器与工作平台的控制器之间需要设置通信通道,以便随时获取工作平台的位置信息,获取工作平台的位置信息的数据容量不大,可以单工工作,但是对实时性要求较高,不能有太大的延迟,推荐使用RS485串行通信协议。主控器与上级控制系统之间需要设置通信通道,发现异物时及时上报信息。When using the system of the present invention, first select a periodic low-speed moving platform, such as welding, assembling and palletizing robotic arms commonly used in industrial production; if there is no qualified moving platform at the working position, it can be specially designed for this system Configure periodic low-speed motion platforms such as low-degree-of-freedom robotic arms. After selecting the working platform, install the image acquisition module at the appropriate position of the working platform, such as the end, and connect the image acquisition module to the main controller through the data cable. The main controller and the image acquisition module can be mounted on the working platform at the same time or installed in a fixed position. A communication channel needs to be set up between the main controller and the controller of the working platform, so that the position information of the working platform can be obtained at any time. The data capacity of obtaining the position information of the working platform is not large, and it can work in a simplex, but it requires high real-time performance. There cannot be too much delay, it is recommended to use the RS485 serial communication protocol. A communication channel needs to be set up between the main controller and the upper-level control system, and information is reported in time when foreign objects are found.

下面结合具体实施例对本发明作进一步说明。The present invention will be further described below in conjunction with specific embodiments.

实施例1Example 1

通过实验验证本发明提出的一种基于单目摄像头的移动平台异物检测系统及其检测方法的性能,情况如下:The performance of a mobile platform foreign body detection system and its detection method based on a monocular camera proposed by the present invention is verified by experiments, and the situation is as follows:

1)实验条件1) Experimental conditions

将扩展1自由度的视觉采集模块安装于一个3自由度机械臂上,确定两个关键位置A(200,0,100)和B(0,200,100)(单位为mm,下同),首先采集环境信息,两个关键位置采集到的图像如图8(a)和图10(a),放置异物后,两个关键位置采集到的图像如图8(b)和图10(b),经过处理后得到图9和图11,由于图像采集模块事先经过标定,得到异物在关键位置A视野内方向为Dt1(181.016,462.152,-100),在关键位置B视野内方向为Dt2(420.525,222.554,-100).Install the extended 1-DOF visual acquisition module on a 3-DOF robotic arm, and determine two key positions A (200, 0, 100) and B (0, 200, 100) (unit is mm, the same below), first collect environmental information, two The images collected at two key positions are shown in Figure 8(a) and Figure 10(a). After placing the foreign body, the images collected at the two key positions are shown in Figure 8(b) and Figure 10(b). 9 and Figure 11, since the image acquisition module has been calibrated in advance, the direction of the foreign object in the field of view of key position A is Dt 1 (181.016, 462.152, -100), and the direction of the field of view in key position B is Dt 2 (420.525, 222.554, - 100).

可以看出,系统清晰准确的捕捉到了异物的状态。It can be seen that the system clearly and accurately captures the state of foreign objects.

2)结果分析2) Result analysis

经过计算可得关键位置A和关键位置B视野内异物所在的位置的方向的两条直线并没有交点,因此取两条直线的公垂线的中点作为异物位置的计算值,最终的结果为T(351,384,17)(仅保留了整数部分),经过手工测量,与实际位置的误差在±5mm之内,认为属于可信结果。After calculation, it can be obtained that the two straight lines in the direction of the position of the foreign object in the visual field of the key position A and the key position B have no intersection. Therefore, the midpoint of the public perpendicular line of the two straight lines is taken as the calculated value of the foreign object position, and the final result is T(351,384,17) (only the integer part is reserved), after manual measurement, the error with the actual position is within ±5mm, which is considered to be a reliable result.

在得到图9和图11后,取异物的形心像素坐标,在图8(b)和图10(b)对应位置取出像素的RGB值为(245,235,0)和(249,237,1),从RGB色域转化到HSV色域,H值分别为57.551和57.581,平均值57.566可以确定物体属于黄色。After obtaining Figure 9 and Figure 11, take the centroid pixel coordinates of the foreign object, and take out the RGB values of the pixels at the corresponding positions in Figure 8(b) and Figure 10(b) (245, 235, 0) and (249, 237, 1) , converted from the RGB color gamut to the HSV color gamut, the H values are 57.551 and 57.581 respectively, and the average value of 57.566 can determine that the object belongs to yellow.

计算得到异物位置后,结合图9和图11,可以计算出异物的最大尺寸不超过39mm,与实际情况相符。After calculating the position of the foreign object, combined with Figure 9 and Figure 11, it can be calculated that the maximum size of the foreign object does not exceed 39mm, which is consistent with the actual situation.

综上,出现异物位置T(351,384,17)(mm),HSV色调值57.566,最大尺寸39mm.To sum up, the foreign body position T(351,384,17)(mm), the HSV tone value is 57.566, and the maximum size is 39mm.

Claims (4)

1.一种基于单目摄像头的移动平台异物检测方法,其特征在于,包括以下步骤:1. a mobile platform foreign body detection method based on monocular camera, is characterized in that, comprises the following steps: 步骤1、平台选定:选择搭载移动平台及平台运动过程中的至少2个关键位置点;Step 1. Platform selection: select at least 2 key positions in the process of carrying the mobile platform and the platform movement; 步骤2、获取参考:在无异物出现的前提下在所有关键位置采集环境图像信息作为参考图像;Step 2. Obtain reference: collect environmental image information at all key positions as a reference image under the premise of no foreign matter; 步骤3、图像采集:当移动平台运动到任意一个关键位置时,采集当前位置的环境图像信息;Step 3, image acquisition: when the mobile platform moves to any key position, the environmental image information of the current position is collected; 步骤4、图像处理:将采集到的环境图像信息与同一关键位置采集到的参考图像进行对比,确定有无异物出现;如果有异物出现,执行步骤5,否则回到步骤3,并在用户设置的周期覆盖更新参考图像;Step 4. Image processing: compare the collected environmental image information with the reference image collected at the same key position to determine whether there is foreign matter; if there is foreign matter, go to step 5, otherwise go back to step 3, and set it in the user settings. The periodic coverage updates the reference image; 步骤5、多点采集:移动平台到下一个关键位置,进行环境图像信息采集;Step 5. Multi-point collection: move the platform to the next key position to collect environmental image information; 步骤6、信息处理:综合至少两个关键位置采集到的图像信息,计算出异物的位置、尺寸和颜色,具体为:Step 6. Information processing: Integrate the image information collected from at least two key positions to calculate the position, size and color of the foreign object, specifically: 根据获得的图像信息,得到异物相对于关键位置点的方向,即关键位置点和异物形心的连线的方程,两个关键位置点和异物形心的连线的方程的公共点即为异物的空间位置点,如果两条直线没有公共点,则取两条直线公垂线的中心点即得到异物的空间位置点;如果有超过两个的关键位置点,则计算所有直线两两交点或公垂线的中心点,计算平均值或中位值,得到异物的位置;同时,根据计算得到的异物的位置以及视野内部物体的外轮廓像素尺寸,由相似三角形法计算出物体的实际轮廓尺寸;由异物在视野中像素的RGB信息经过色域转换后得到异物的颜色。According to the obtained image information, the direction of the foreign body relative to the key position point is obtained, that is, the equation of the line connecting the key position point and the centroid of the foreign body, and the common point of the equation of the line connecting the two key position points and the centroid of the foreign body is the foreign body. If there is no common point between the two straight lines, take the center point of the common vertical line of the two straight lines to get the spatial position point of the foreign object; if there are more than two key position points, calculate the intersection of all the straight lines or The center point of the common vertical line, calculate the average or median value, and get the position of the foreign object; at the same time, according to the calculated position of the foreign object and the pixel size of the outer contour of the object in the field of view, calculate the actual contour size of the object by the similar triangle method ; The color of the foreign object is obtained after the RGB information of the foreign object in the field of view is converted by the color gamut. 2.根据权利要求1中所述的基于单目摄像头的移动平台异物检测方法,其特征在于,步骤1中所述选择搭载移动平台及平台运动过程中的至少2个关键位置点,具体为:2. according to the mobile platform foreign body detection method based on monocular camera described in claim 1, it is characterized in that, described in step 1, selects to carry at least 2 key position points in the mobile platform and platform movement process, is specifically: 首先选择用以搭载移动平台,该平台周期循环运动,运动过程中存在停顿过程或最低速度低于0.5m/s;First choose to carry a mobile platform, the platform moves cyclically, and there is a pause process or the minimum speed is lower than 0.5m/s during the movement; 在移动平台的运动轨迹中选择有停顿过程的位置点,如果全程没有停顿,则选择速度低于0.5m/s的位置点。In the motion trajectory of the mobile platform, select a position point with a pause process. If there is no pause in the whole process, select a position point with a speed lower than 0.5m/s. 3.根据权利要求1中所述的基于单目摄像头的移动平台异物检测方法,其特征在于:步骤3中,通过平台的控制器或位置传感器实时获取平台的位置信息,每当主控器检测到平台运动到关键位置点,则采集当前位置的环境图像信息。3. according to the mobile platform foreign body detection method based on monocular camera described in claim 1, it is characterized in that: in step 3, obtain the position information of the platform in real time by the controller or the position sensor of the platform, whenever the main controller detects When the platform moves to a key position, the environmental image information of the current position is collected. 4.根据权利要求1中所述的基于单目摄像头的移动平台异物检测方法,其特征在于,步骤4中所述将上一步中采集到的图像信息与同一关键位置采集到的参考图像进行对比,具体步骤为:4. The method for detecting foreign objects on a mobile platform based on a monocular camera according to claim 1, wherein the image information collected in the previous step is compared with the reference image collected at the same key position as described in step 4 , the specific steps are: 4.1将平台在不同的运动周期同一关键位置采集到的两幅图片进行色域转换,将彩色图片转化为灰度图片;4.1 Perform color gamut conversion on two pictures collected by the platform at the same key position in different motion cycles, and convert the color pictures into grayscale pictures; 4.2利用绝对值差算法absdiff求得两幅图片的灰度差异值;4.2 Use the absolute value difference algorithm absdiff to obtain the grayscale difference value of the two pictures; 4.3将差异值二值化切割,得到原始环境形态;4.3 Binarize and cut the difference value to obtain the original environmental shape; 4.4对4.3步得到的结果进行形态学去噪处理;4.4 Perform morphological denoising on the results obtained in step 4.3; 4.5将4.4步得到的结果进行连通域检测,得到连通域在视野中的位置分布并进行判定,如果存在连通域,则表明出现异物。4.5 Perform the connected domain detection on the results obtained in step 4.4 to obtain the location distribution of the connected domain in the visual field and make a judgment. If there is a connected domain, it means that there is a foreign body.
CN201910292288.7A 2019-04-12 2019-04-12 Foreign object detection method and detection system for mobile platform based on monocular camera Active CN110032971B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910292288.7A CN110032971B (en) 2019-04-12 2019-04-12 Foreign object detection method and detection system for mobile platform based on monocular camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910292288.7A CN110032971B (en) 2019-04-12 2019-04-12 Foreign object detection method and detection system for mobile platform based on monocular camera

Publications (2)

Publication Number Publication Date
CN110032971A CN110032971A (en) 2019-07-19
CN110032971B true CN110032971B (en) 2022-10-14

Family

ID=67238202

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910292288.7A Active CN110032971B (en) 2019-04-12 2019-04-12 Foreign object detection method and detection system for mobile platform based on monocular camera

Country Status (1)

Country Link
CN (1) CN110032971B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110910369A (en) * 2019-11-19 2020-03-24 珠海格力电器股份有限公司 Production line supervision method and device and storage medium
CN110954967A (en) * 2019-12-11 2020-04-03 江西莱利电气有限公司 Device and method for detecting foreign matters in fan
CN113012090B (en) * 2019-12-20 2024-03-01 中国科学院沈阳计算技术研究所有限公司 Multi-workpiece quality detection method and device based on movable camera
CN111626204B (en) * 2020-05-27 2022-01-11 汪海洋 Railway foreign matter invasion monitoring method and system
CN112785587B (en) * 2021-02-04 2024-05-31 上海电气集团股份有限公司 Foreign matter detection method, system, equipment and medium in stacking production process
CN114147704B (en) * 2021-11-18 2023-09-22 南京师范大学 Mechanical arm accurate positioning and grabbing method based on depth vision and incremental closed loop

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103258188A (en) * 2013-04-19 2013-08-21 上海应用技术学院 Moving target object detection tracking method based on cross-platform computer vision library
CN104590319A (en) * 2014-06-11 2015-05-06 北京交通大学 Device for foreign body invasion detection and method for foreign body invasion detection

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103258188A (en) * 2013-04-19 2013-08-21 上海应用技术学院 Moving target object detection tracking method based on cross-platform computer vision library
CN104590319A (en) * 2014-06-11 2015-05-06 北京交通大学 Device for foreign body invasion detection and method for foreign body invasion detection

Also Published As

Publication number Publication date
CN110032971A (en) 2019-07-19

Similar Documents

Publication Publication Date Title
CN110032971B (en) Foreign object detection method and detection system for mobile platform based on monocular camera
CN109297413B (en) Visual measurement method for large-scale cylinder structure
CN1238691C (en) Combined stereovision, color 3D digitizing and motion capture system
CN109443206B (en) System and method for measuring tail end pose of mechanical arm based on color spherical light source target
US20180003498A1 (en) Visual positioning system and method based on high reflective infrared identification
CN102788572B (en) Method, device and system for measuring attitude of engineering machinery lifting hook
TWI607814B (en) Flying Laser Marking System with Real-time 3D Modeling and Method Thereof
CN110378937B (en) Kinect camera-based industrial mechanical arm man-machine safety distance detection method
Hsu et al. Development of a faster classification system for metal parts using machine vision under different lighting environments
CN111487320A (en) 3D Ultrasound Imaging Method and System Based on 3D Optical Imaging Sensor
CN112706158B (en) Industrial Human-Computer Interaction System and Method Based on Vision and Inertial Navigation Positioning
JP7180783B2 (en) CALIBRATION METHOD FOR COMPUTER VISION SYSTEM AND 3D REFERENCE OBJECT USED FOR CALIBRATION METHOD
CN114140534A (en) Combined calibration method for laser radar and camera
CN109579698B (en) Intelligent cargo detection system and detection method thereof
CN108074266A (en) A kind of machine vision building method of robot
CN112001945A (en) Multi-robot monitoring method suitable for production line operation
CN104858877B (en) High-tension line drop switch changes the control method of control system automatically
CN113888715A (en) A method and system for three-dimensional reconstruction of blast furnace charge surface based on virtual multi-eye endoscope
CN111028298B (en) A converging binocular system for space transformation calibration of rigid body coordinate system
CN114549641B (en) System and method for detecting contact state of human hand and robot
CN113256721B (en) Indoor multi-person three-dimensional high-precision positioning method
EP3738725B1 (en) Measurement system, measurement device, measurement method, and measurement program
CN115847491A (en) Space on-orbit maintenance robot target autonomous measurement method
JP2616225B2 (en) Relative positioning method
JP7509535B2 (en) IMAGE PROCESSING APPARATUS, ROBOT SYSTEM, AND IMAGE PROCESSING 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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20230111

Address after: No. 23, Huashen Avenue, Yuhuatai District, Nanjing City, Jiangsu Province, 210012

Patentee after: Nanjing mowen Technology Co.,Ltd.

Address before: 210094 No. 200, Xiaolingwei, Jiangsu, Nanjing

Patentee before: NANJING University OF SCIENCE AND TECHNOLOGY

TR01 Transfer of patent right