CN111531581B - Industrial robot fault action detection method and system based on vision - Google Patents
Industrial robot fault action detection method and system based on vision Download PDFInfo
- Publication number
- CN111531581B CN111531581B CN202010342989.XA CN202010342989A CN111531581B CN 111531581 B CN111531581 B CN 111531581B CN 202010342989 A CN202010342989 A CN 202010342989A CN 111531581 B CN111531581 B CN 111531581B
- Authority
- CN
- China
- Prior art keywords
- industrial robot
- image
- video frame
- frame sequence
- real
- 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
Links
- 230000009471 action Effects 0.000 title claims abstract description 100
- 238000001514 detection method Methods 0.000 title claims abstract description 43
- 238000000034 method Methods 0.000 claims abstract description 29
- 238000003709 image segmentation Methods 0.000 claims description 27
- 230000007257 malfunction Effects 0.000 claims description 11
- 239000000284 extract Substances 0.000 claims description 9
- 238000000605 extraction Methods 0.000 claims description 7
- 230000008569 process Effects 0.000 abstract description 12
- 230000009286 beneficial effect Effects 0.000 description 8
- 230000002159 abnormal effect Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 3
- 238000003745 diagnosis Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000005065 mining Methods 0.000 description 2
- 230000032683 aging Effects 0.000 description 1
- 238000007621 cluster analysis Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000001125 extrusion Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 239000002184 metal Substances 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J9/00—Programme-controlled manipulators
- B25J9/16—Programme controls
- B25J9/1694—Programme controls characterised by use of sensors other than normal servo-feedback from position, speed or acceleration sensors, perception control, multi-sensor controlled systems, sensor fusion
- B25J9/1697—Vision controlled systems
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J19/00—Accessories fitted to manipulators, e.g. for monitoring, for viewing; Safety devices combined with or specially adapted for use in connection with manipulators
- B25J19/0095—Means or methods for testing manipulators
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J9/00—Programme-controlled manipulators
- B25J9/16—Programme controls
- B25J9/1656—Programme controls characterised by programming, planning systems for manipulators
- B25J9/1661—Programme controls characterised by programming, planning systems for manipulators characterised by task planning, object-oriented languages
Landscapes
- Engineering & Computer Science (AREA)
- Robotics (AREA)
- Mechanical Engineering (AREA)
- Manipulator (AREA)
Abstract
Description
技术领域technical field
本发明涉及智能制造的技术领域,具体涉及一种基于视觉的工业机器人故障动作检测方法及系统。The invention relates to the technical field of intelligent manufacturing, in particular to a vision-based detection method and system for industrial robot fault actions.
背景技术Background technique
工业机器人是集自动化,机械,嵌入式,液压,电气等硬件及其控制软件在内组成的复杂系统。其可以代替工人从事一些危险和复杂的重复性劳动。由于工业机器人精度高且无需休息,其已经广泛应用于制造业。然而,随着工业机器人的大量应用,工业机器人伤人事件时有发生。导致工业机器人安全事故的主要原因有人为因素和机器人自身故障。其中机器人自身误动作导致的安全事故占据了一半以上的比例。人为因素可以通过加强管理和培训进行控制,而机器人自身误动作导致的安全问题需要通过技术手段进行解决。由于信号干扰,器件老化,金属疲劳等各种原因,机器人误动作在机器人作业过程中大量存在。机器人误动作轻则造成机器人运动失调,导致挤压、碰撞事故,重则威胁到附近人员的生命安全。特别是在人机协作场景下,机器人安全问题至关重要。Industrial robot is a complex system composed of automation, machinery, embedded, hydraulic, electrical and other hardware and its control software. It can replace workers in some dangerous and complicated repetitive labor. Industrial robots have been widely used in the manufacturing industry due to their high precision and no need for rest. However, with the extensive application of industrial robots, incidents of industrial robots hurting people happen from time to time. The main causes of industrial robot safety accidents are human factors and the failure of the robot itself. Among them, the safety accidents caused by the robot's own misoperation accounted for more than half of the proportion. Human factors can be controlled through enhanced management and training, while safety issues caused by robot misoperations need to be resolved through technical means. Due to various reasons such as signal interference, device aging, and metal fatigue, there are a large number of robot misoperations during the robot operation process. Misoperation of the robot can cause the robot to move out of balance, lead to extrusion and collision accidents, and seriously threaten the lives of nearby personnel. Especially in the context of human-robot collaboration, the issue of robot safety is of paramount importance.
授权公告号为CN106625724B的中国专利公开了一种面向云控制平台的工业机器人本体安全控制方法,首先,根据工业机器人所在现场情况从云控制平台下载相应等级的安全保护逻辑至安全保护模块;其次,通过安全保护逻辑对工业机器人各轴及末端的实时状态信息进行计算分析,当出现异常状态时发出报警信息并控制机器人停止运动;最后,利用安全保护逻辑对云控制平台发出的控制指令进行分析,判断其是否会使工业机器人的位置姿态超出安全保护范围,最终作出隔离或者执行控制指令的判断。The Chinese patent with the authorized announcement number CN106625724B discloses a method for controlling the safety of an industrial robot on a cloud control platform. First, download the corresponding level of security protection logic from the cloud control platform to the security protection module according to the site conditions of the industrial robot; secondly, Calculate and analyze the real-time state information of each axis and end of the industrial robot through the safety protection logic, send an alarm message and control the robot to stop moving when an abnormal state occurs; finally, use the safety protection logic to analyze the control commands issued by the cloud control platform, Judging whether it will make the position and posture of the industrial robot exceed the safety protection range, and finally make a judgment of isolation or execution of control instructions.
公开号为CN101509839的中国专利公开了一种基于离群点挖掘的集群工业机器人故障诊断方法,包括如下步骤:The Chinese patent whose publication number is CN101509839 discloses a method for fault diagnosis of cluster industrial robots based on outlier mining, including the following steps:
1)采用多输入通道数据采集卡获取集群工业机器人的运行状态数据;所述运行状态数据包括:总消耗功率、基座振动、各电机的功率及工作电流、旋转关节的角速度、任务执行结果;1) Using a multi-input channel data acquisition card to obtain the operating state data of the cluster industrial robot; the operating state data includes: total power consumption, base vibration, power and operating current of each motor, angular velocity of the rotary joint, and task execution results;
2)将获得的运行状态数据按统一格式整理归类,通过添加数据标识区分数据来源及数据类型,然后传输到系统数据库进行保存;2) Organize and classify the obtained running status data in a unified format, distinguish the data source and data type by adding data identifiers, and then transfer to the system database for storage;
3)对集群工业机器人的运行状态数据进行聚类分析,利用离群点挖掘方法计算每台工业机器人的离群因子得出其离群程度,并根据离群程度分离出离群点,进一步确定离群点所代表的个体工业机器人是否出现故障,并通过异常运行参数的种类判断出机器人出现故障的具体部位,获得故障诊断结果;3) Carry out cluster analysis on the running status data of clustered industrial robots, use the outlier point mining method to calculate the outlier factor of each industrial robot to obtain its outlier degree, and separate outlier points according to the outlier degree, and further determine Whether the individual industrial robot represented by the outlier point is faulty, and the specific part of the robot fault is judged by the type of abnormal operating parameters, and the fault diagnosis result is obtained;
4)将包括工业机器人的运行状态数据、故障诊断结果在内的信息存储到系统数据库中,并通过专用显示端口直接显示数据,作为管理、维修和更新工业机器人的依据。4) Store information including operating status data and fault diagnosis results of industrial robots in the system database, and directly display the data through a dedicated display port as a basis for managing, maintaining and updating industrial robots.
现有技术中需要采用多个数据采集装置采集工业机器人的状态信息,对多个数据采集装置采集工业机器人的状态信息进行处理从而判断工业机器人是否状态异常,检测过程较为复杂,且成本较高。In the prior art, it is necessary to use multiple data acquisition devices to collect the status information of the industrial robot, and process the status information collected by the multiple data acquisition devices to determine whether the status of the industrial robot is abnormal. The detection process is relatively complicated and the cost is high.
发明内容Contents of the invention
本发明的目的在于克服现有技术中的缺点,提供一种基于视觉的工业机器人故障动作检测方法及系统,具有采用非接触式的方式发现工业机器人本体突发故障,避免在人机协作时发生机器人伤人的安全事故、检测过程简单准确的优点。The purpose of the present invention is to overcome the shortcomings in the prior art, to provide a vision-based industrial robot fault action detection method and system, which can detect sudden faults of the industrial robot body in a non-contact manner, and avoid occurrence of faults during human-machine cooperation. The advantages of safety accidents caused by robots hurting people, and the detection process are simple and accurate.
本发明的目的是通过以下技术方案来实现的:一种基于视觉的工业机器人故障动作检测方法,包括以下步骤,The purpose of the present invention is achieved by the following technical solutions: a vision-based industrial robot failure action detection method, comprising the following steps,
S1:采集工业机器人标准作业视频,建立工业机器人标准作业模式视频帧序列;S1: Collect the standard operation video of the industrial robot, and establish the video frame sequence of the standard operation mode of the industrial robot;
S2:实时采集工业机器人作业图像,获取工业机器人实时动作图像;S2: Real-time collection of industrial robot operation images, to obtain real-time action images of industrial robots;
S3:将工业机器人实时动作图像与工业机器人标准作业模式视频帧序列进行匹配,判断工业机器人标准作业模式视频帧序列中是否存在与工业机器人实时动作图像近似匹配的图像,若是,执行S2,若否,执行S4;S3: Match the real-time action image of the industrial robot with the video frame sequence of the standard operating mode of the industrial robot, and judge whether there is an image approximately matching the real-time action image of the industrial robot in the video frame sequence of the standard operating mode of the industrial robot. If yes, execute S2, if not , execute S4;
S4:控制工业机器人急停。S4: Control the emergency stop of the industrial robot.
本发明的有益效果是,本方法具有采用非接触式的方式实时采集工业机器人作业图像,将工业机器人实时动作图像与工业机器人标准作业模式视频帧序列进行匹配,判断工业机器人标准作业模式视频帧序列中是否存在与工业机器人实时动作图像近似匹配的图像,若是,判断工业机器人工作姿态正常;若否,判断工业机器人工作姿态异常并控制工业机器人急停,无需数据采集装置采集工业机器人各轴及末端的实时状态信息或工业机器人的运行状态数据,检测过程简单准确且成本较低。The beneficial effect of the present invention is that the method has the advantages of adopting a non-contact mode to collect the operation images of the industrial robot in real time, matching the real-time action image of the industrial robot with the video frame sequence of the standard operation mode of the industrial robot, and judging the video frame sequence of the standard operation mode of the industrial robot Whether there is an image that approximately matches the real-time action image of the industrial robot, if so, judge that the working posture of the industrial robot is normal; if not, judge that the working posture of the industrial robot is abnormal and control the emergency stop of the industrial robot. Real-time status information of real-time status information or operating status data of industrial robots, the detection process is simple and accurate and the cost is low.
进一步,所述S1具体包括以下步骤,Further, the S1 specifically includes the following steps,
S11:采集工业机器人标准作业视频;S11: collect standard operation videos of industrial robots;
S12:对所述工业机器人标准作业视频进行T视频帧提取,形成视频帧序列;S12: Extract T video frames from the standard operation video of the industrial robot to form a video frame sequence;
S13:提取所述视频帧序列中包含工业机器人一个周期的动作图像的帧,建立工业机器人作业模式视频帧序列;S13: Extracting the frame of the video frame sequence containing a cycle of the action image of the industrial robot, and establishing the video frame sequence of the industrial robot operation mode;
S14:对所述工业机器人作业模式视频帧序列进行图像分割,分离工业机器人图像,建立工业机器人标准作业模式视频帧序列。S14: Carry out image segmentation on the video frame sequence of the industrial robot operation mode, separate the industrial robot image, and establish a video frame sequence of the industrial robot standard operation mode.
采用上述进一步方案的有益效果是,采集工业机器人标准作业视频,对工业机器人标准作业视频进行T视频帧提取,形成视频帧序列。为了方便采集视频,该视频帧序列并不仅仅包括一个周期作业的工业机器人图像,因此需要对视频帧序列进行切割,提取视频帧序列中包含工业机器人一个周期的动作图像的帧,建立工业机器人作业模式视频帧序列。为了方便增加工业机器人动作检测的准确性,需要对工业机器人作业模式视频帧序列进行图像分割,分离工业机器人图像,建立工业机器人标准作业模式视频帧序列。The beneficial effect of adopting the above further solution is that the standard operation video of the industrial robot is collected, and T video frame extraction is performed on the standard operation video of the industrial robot to form a sequence of video frames. In order to facilitate the collection of video, the video frame sequence does not only include an image of an industrial robot operating periodically, so it is necessary to cut the video frame sequence, extract the frame of the video frame sequence containing a cycle of the industrial robot's action image, and establish an industrial robot operation Pattern video frame sequence. In order to increase the accuracy of industrial robot motion detection, it is necessary to segment the video frame sequence of the industrial robot operation mode, separate the industrial robot image, and establish the video frame sequence of the industrial robot standard operation mode.
进一步,所述S13具体包括以下步骤,Further, said S13 specifically includes the following steps,
S131:视频帧序列为<I1,I2,…In>,Ik,k∈N为图像帧,每一帧图像包含工业机器人的一个作业动作,标记工作机器人一个工作周期的起始帧Is和结束帧Ie;S131: The video frame sequence is <I 1 , I 2 ,…I n >, I k , k∈N are image frames, each frame of image contains an operation action of the industrial robot, and marks the starting frame of a working cycle of the working robot I s and end frame I e ;
S132:提取工作机器人一个工作周期的图像帧,生成工业机器人作业模式视频帧序列<Is,Is+1,…Ie>。S132: Extract image frames of one working cycle of the working robot, and generate a sequence of video frames <I s , I s+1 , . . . I e > in the working mode of the industrial robot.
采用上述进一步方案的有益效果是,为了方便采集视频,在采集工业机器人标准作业视频时,并不严格要求从一个周期的开始的时刻进行采集,因此,该视频帧序列并不仅仅包括一个周期作业的工业机器人图像,因此需要对视频帧序列进行切割,提取视频帧序列中包含工业机器人一个周期的动作图像的帧,建立工业机器人作业模式视频帧序列。通过标记工作机器人一个工作周期的起始帧Is和结束帧Ie来提取工作机器人一个工作周期的图像帧,生成工业机器人作业模式视频帧序列<Is,Is+1,…Ie>。The beneficial effect of adopting the above-mentioned further solution is that, in order to facilitate the collection of video, when collecting the standard operation video of industrial robots, it is not strictly required to collect from the beginning of a cycle. Therefore, the video frame sequence does not only include a cycle of operation. Therefore, it is necessary to cut the video frame sequence, extract the frames containing the action image of one cycle of the industrial robot in the video frame sequence, and establish the video frame sequence of the industrial robot operation mode. By marking the start frame I s and the end frame I e of a working cycle of the working robot to extract the image frames of a working cycle of the working robot, and generate the video frame sequence of the industrial robot working mode <I s , I s+1 ,…I e > .
进一步,所述S14中图像分割具体包括,Further, the image segmentation in S14 specifically includes,
S141:确定工业机器人的颜色Cr;S141: Determine the color C r of the industrial robot;
S142:I为包含工业机器人的作业图像,P为I中的任意像素,判断P的颜色值是否在Cr为中心的δ领域内,若是,执行S143,若否,执行S144;S142: I is an operation image including an industrial robot, P is any pixel in I, judge whether the color value of P is in the δ field centered on C r , if yes, execute S143, if not, execute S144;
S143:将P的颜色值设置为黑色;S143: Set the color value of P to black;
S144:将P的颜色值设置为白色。S144: Set the color value of P to white.
采用上述进一步方案的有益效果是,为了避免在工业机器人实时动作图像与工业机器人标准作业模式视频帧序列进行匹配时,背景图像造成误判,需要将工业机器人标准作业模式视频帧序列中每一帧的工业机器人图像提取出来,与工业机器人实时动作图像中的工业机器人图像进行匹配,提高工业机器人故障动作检测的准确性。The beneficial effect of adopting the above-mentioned further solution is that in order to avoid misjudgment caused by the background image when the real-time action image of the industrial robot is matched with the video frame sequence of the standard operating mode of the industrial robot, it is necessary to convert each frame in the video frame sequence of the standard operating mode of the industrial robot to The industrial robot image is extracted and matched with the industrial robot image in the real-time action image of the industrial robot to improve the accuracy of the fault action detection of the industrial robot.
进一步,所述S3具体包括以下步骤。Further, the S3 specifically includes the following steps.
S31:初始化实时动作图像的序号变量q0=-1;S31: Initialize the serial number variable q 0 of the real-time action image =-1;
S32:查找工业机器人标准作业模式视频帧序列中是否存在与工业机器人实时动作图像近似匹配的图像,若是,执行S33,若否,执行S4;S32: Find whether there is an image approximately matching the real-time action image of the industrial robot in the video frame sequence of the standard operation mode of the industrial robot, if yes, execute S33, if not, execute S4;
S33:记录工业机器人标准作业模式视频帧序列中与工业机器人实时动作图像近似匹配的图像的序列号q1;S33: Record the serial number q 1 of the image approximately matching the real-time action image of the industrial robot in the video frame sequence of the standard operation mode of the industrial robot;
S34:若q1=-1Vq1=q0+1,则令q0=q1,其中,V为运算符号,表示或运算,执行S2。S34: If q 1 =-1Vq 1 =q 0 +1, set q 0 =q 1 , where V is an operation symbol, representing an OR operation, and execute S2.
进一步,所述S32具体包括,Further, said S32 specifically includes,
S321:初始化工业机器人标准作业模式视频帧序列中图像帧序号q1,q1=s;S321: Initialize the image frame sequence number q 1 in the video frame sequence in the standard operation mode of the industrial robot, q 1 =s;
S322:计算工业机器人实时动作图像与工业机器人标准作业模式视频帧序列中图像帧Iq1的差值,所述的图像差值计算方法为:S322: Calculate the difference between the real-time action image of the industrial robot and the image frame Iq1 in the video frame sequence of the standard operating mode of the industrial robot, the image difference calculation method is:
其中,d(I1,I2)表示图像I1和图像I2之间的差值,m×n表示图像的分辨率,I1(i,j)表示图像I1的第i行、第j列像素的颜色值,I2(i,j)表示图像I2的第i行、第j列像素的颜色值;Among them, d(I 1 , I 2 ) represents the difference between image I 1 and image I 2 , m×n represents the resolution of the image, and I 1 (i, j) represents the i - th row and the The color value of the j-column pixel, I 2 (i, j) represents the color value of the i-th row and j-th column pixel of the image I 2 ;
S323:判断差值是否小于阈值D,若是,执行S325,若否,执行S324;S323: Determine whether the difference is smaller than the threshold D, if yes, execute S325, if not, execute S324;
S324:令q1=q1+1,执行S322;S324: Let q 1 =q 1 +1, execute S322;
S325:判断工业机器人标准作业模式视频帧序列中序列号为q1的图像为工业机器人实时动作图像的近似匹配图像。S325: Determine that the image with the sequence number q 1 in the video frame sequence of the standard operation mode of the industrial robot is an approximate matching image of the real-time action image of the industrial robot.
一种基于视觉的工业机器人故障动作检测系统,包括,A vision-based industrial robot fault action detection system, including,
图像采集装置,用于采集工业机器人标准作业视频,还用于实时采集工业机器人实时动作图像;The image acquisition device is used to collect the standard operation video of the industrial robot, and is also used to collect the real-time action image of the industrial robot in real time;
故障检测装置,用于接收图像采集装置采集的工业机器人标准作业视频建立工业机器人标准作业模式视频帧序列,还用于接收图像采集装置实时采集的工业机器人实时动作图像,将工业机器人实时动作图像与工业机器人标准作业模式视频帧序列进行匹配,判断工业机器人标准作业模式视频帧序列中是否存在与工业机器人实时动作图像近似匹配的图像,判断工业机器人标准作业模式视频帧序列中不存在与工业机器人实时动作图像近似匹配的图像后发送急停控制信号;The fault detection device is used to receive the standard operation video of the industrial robot collected by the image acquisition device to establish the video frame sequence of the standard operation mode of the industrial robot, and is also used to receive the real-time action image of the industrial robot collected by the image acquisition device in real time, and combine the real-time action image of the industrial robot with the The video frame sequence of the standard operating mode of the industrial robot is matched to determine whether there is an image that approximately matches the real-time action image of the industrial robot in the video frame sequence of the standard operating mode of the industrial robot. The emergency stop control signal is sent after the action image approximately matches the image;
控制器,用于故障检测装置发送的急停控制信号并控制工业机器人停止工作。The controller is used for the emergency stop control signal sent by the fault detection device and controls the industrial robot to stop working.
采用上述进一步方案的有益效果是,本系统具有采用非接触式的方式实时采集工业机器人作业图像,通过故障检测装置将工业机器人实时动作图像与工业机器人标准作业模式视频帧序列进行匹配,判断工业机器人标准作业模式视频帧序列中是否存在与工业机器人实时动作图像近似匹配的图像,若是,判断工业机器人工作姿态正常;若否,判断工业机器人工作姿态异常,并通过控制器控制工业机器人急停,无需数据采集装置采集工业机器人各轴及末端的实时状态信息或工业机器人的运行状态数据,检测过程简单准确且成本较低。The beneficial effect of adopting the above-mentioned further scheme is that the system can collect the operation images of the industrial robots in real time in a non-contact manner, and match the real-time action images of the industrial robots with the video frame sequence of the standard operation mode of the industrial robots through the fault detection device to judge the industrial robot. Whether there is an image that approximately matches the real-time action image of the industrial robot in the video frame sequence of the standard operation mode, if so, judge that the working posture of the industrial robot is normal; if not, judge that the working posture of the industrial robot is abnormal, and control the industrial robot to emergency stop through the controller The data acquisition device collects the real-time state information of each axis and end of the industrial robot or the operating state data of the industrial robot. The detection process is simple and accurate and the cost is low.
进一步,所述故障检测装置包括工业机器人标准作业视频建立单元、图像分割单元及图像匹配单元,Further, the fault detection device includes an industrial robot standard operation video establishment unit, an image segmentation unit and an image matching unit,
所述工业机器人标准作业视频建立单元用于对工业机器人标准作业视频进行T视频帧提取,形成视频帧序列,还用于提取视频帧序列中包含工业机器人一个周期的动作图像的帧,建立工业机器人作业模式视频帧序列,所述工业机器人作业模式视频帧序列中每一帧包含工业机器人的一个作业动作;The standard operation video building unit of the industrial robot is used to extract T video frames from the standard operation video of the industrial robot to form a video frame sequence, and is also used to extract frames containing a cycle of the action image of the industrial robot in the video frame sequence to establish an industrial robot Operation mode video frame sequence, each frame in the video frame sequence of the industrial robot operation mode contains an operation action of the industrial robot;
所述图像分割单元用于提取机器工业机器人作业模式视频帧序列的每一帧图像中的工业机器人图像,并发送至工业机器人标准作业视频建立单元;The image segmentation unit is used to extract the industrial robot image in each frame of the video frame sequence of the machine industrial robot operation mode, and send it to the industrial robot standard operation video establishment unit;
所述工业机器人标准作业视频建立单元用于接收图像分割单元提取的每一帧的工业机器人图像,生成工业机器人标准作业视频;The industrial robot standard operation video establishment unit is used to receive the industrial robot image of each frame extracted by the image segmentation unit, and generate the industrial robot standard operation video;
所述图像分割单元还用于提取工业机器人实时动作图像中的工业机器人图像;The image segmentation unit is also used to extract the industrial robot image in the real-time action image of the industrial robot;
所述图像匹配单元用于将工业机器人实时动作图像与工业机器人标准作业模式视频帧序列中的图像进行匹配,判断工业机器人标准作业模式视频帧序列中是否存在与工业机器人实时动作图像近似匹配的图像,并判断工业机器人标准作业模式视频帧序列中不存在与工业机器人实时动作图像近似匹配的图像后发送急停控制信号。The image matching unit is used to match the real-time motion image of the industrial robot with the image in the video frame sequence of the standard operation mode of the industrial robot, and judge whether there is an image approximately matching the real-time motion image of the industrial robot in the video frame sequence of the standard operation mode of the industrial robot , and determine that there is no image that approximately matches the real-time action image of the industrial robot in the video frame sequence of the standard operating mode of the industrial robot, and then send an emergency stop control signal.
采用上述进一步方案的有益效果是,图像采集装置采集工业机器人标准作业视频,工业机器人标准作业视频建立单元对工业机器人标准作业视频进行T视频帧提取,形成视频帧序列。为了方便采集视频,该视频帧序列并不仅仅包括一个周期作业的工业机器人图像,因此需要对视频帧序列进行切割,提取视频帧序列中包含工业机器人一个周期的动作图像的帧,建立工业机器人作业模式视频帧序列。为了方便增加工业机器人动作检测的准确性,需要图像分割单元对工业机器人作业模式视频帧序列进行图像分割,分离工业机器人图像,工业机器人标准作业视频建立单元根据图像分割单元处理后的图像建立工业机器人标准作业模式视频帧序列。The beneficial effect of adopting the above further solution is that the image acquisition device collects the standard operation video of the industrial robot, and the standard operation video establishment unit of the industrial robot extracts T video frames from the standard operation video of the industrial robot to form a sequence of video frames. In order to facilitate the collection of video, the video frame sequence does not only include an image of an industrial robot operating periodically, so it is necessary to cut the video frame sequence, extract the frame of the video frame sequence containing a cycle of the industrial robot's action image, and establish an industrial robot operation Pattern video frame sequence. In order to increase the accuracy of industrial robot motion detection, the image segmentation unit is required to segment the video frame sequence of the industrial robot’s operation mode to separate the industrial robot image, and the industrial robot standard operation video establishment unit establishes the industrial robot based on the image processed by the image segmentation unit Standard operating mode video frame sequence.
进一步,所述图像分割单元提取工业机器人图像包括以下步骤,Further, the image segmentation unit extracting the industrial robot image includes the following steps,
S141:确定工业机器人的颜色Cr;S141: Determine the color C r of the industrial robot;
S142:I为包含工业机器人的作业图像,P为I中的任意像素,判断P的颜色值是否在Cr为中心的δ领域内,若是,执行S143,若否,执行S144;S142: I is an operation image including an industrial robot, P is any pixel in I, judge whether the color value of P is in the δ field centered on C r , if yes, execute S143, if not, execute S144;
S143:将P的颜色值设置为黑色;S143: Set the color value of P to black;
S144:将P的颜色值设置为白色。S144: Set the color value of P to white.
采用上述进一步方案的有益效果是,为了避免图像匹配单元将工业机器人实时动作图像与工业机器人标准作业模式视频帧序列进行匹配时,背景图像造成误判,需要将工业机器人标准作业模式视频帧序列中每一帧的工业机器人图像提取出来,与工业机器人实时动作图像中的工业机器人图像进行匹配,提高工业机器人故障动作检测的准确性。The beneficial effect of adopting the above-mentioned further scheme is that, in order to prevent the background image from causing misjudgment when the image matching unit matches the real-time motion image of the industrial robot with the video frame sequence of the standard operating mode of the industrial robot, it is necessary to include the video frame sequence of the standard operating mode of the industrial robot. The industrial robot image of each frame is extracted and matched with the industrial robot image in the real-time action image of the industrial robot to improve the accuracy of the industrial robot fault action detection.
进一步,所述图像匹配单元还用于判断工业机器人标准作业模式视频帧序列中存在与工业机器人实时动作图像近似匹配的图像后记录工业机器人标准作业模式视频帧序列中与工业机器人实时动作图像近似匹配的图像的序列号q1。Further, the image matching unit is also used to determine that there is an image approximately matching the real-time action image of the industrial robot in the video frame sequence of the standard operating mode of the industrial robot, and then record the video frame sequence of the standard operating mode of the industrial robot to approximately match the real-time action image of the industrial robot The sequence number q 1 of the image.
采用上述进一步方案的有益效果是,图像匹配单元还用于判断工业机器人标准作业模式视频帧序列中存在与工业机器人实时动作图像近似匹配的图像后记录工业机器人标准作业模式视频帧序列中与工业机器人实时动作图像近似匹配的图像的序列号q1,方便操作人员根据图像记录的序列号q1及工业机器人实时工作状态,判断图像匹配单元的准确性。The beneficial effect of adopting the above-mentioned further solution is that the image matching unit is also used to judge that there is an image that approximately matches the real-time action image of the industrial robot in the video frame sequence of the standard operation mode of the industrial robot, and then record the image matching the video frame sequence of the standard operation mode of the industrial robot with the industrial robot. The sequence number q 1 of the image that the real-time action image approximately matches is convenient for the operator to judge the accuracy of the image matching unit according to the sequence number q 1 recorded in the image and the real-time working status of the industrial robot.
附图说明Description of drawings
图1为本发明的实施例1的一种基于视觉的工业机器人故障动作检测系统的示意图;Fig. 1 is the schematic diagram of a kind of vision-based industrial robot malfunction detection system of embodiment 1 of the present invention;
图2为本发明用于展示工业机器人故障动作检测的流程示意图;Fig. 2 is the schematic flow chart that the present invention is used to show industrial robot fault motion detection;
图3为本发明用于展示建立工业机器人标准作业模式视频帧序列流程的示意图;Fig. 3 is the schematic diagram that the present invention is used for showing the video frame sequence process of establishing the industrial robot standard operating mode;
图4为本发明用于展示工业机器人实时动作图像近似匹配流程的示意图。FIG. 4 is a schematic diagram of the present invention for displaying an approximate matching process of real-time action images of industrial robots.
具体实施方式Detailed ways
下面结合附图进一步详细描述本发明的技术方案,但本发明的保护范围不局限于以下。The technical solution of the present invention will be further described in detail below in conjunction with the accompanying drawings, but the protection scope of the present invention is not limited to the following.
实施例1Example 1
参照图1、2,一种基于视觉的工业机器人故障动作检测系统,包括,Referring to Figures 1 and 2, a vision-based industrial robot fault action detection system includes,
图像采集装置,用于采集工业机器人标准作业视频,还用于实时采集工业机器人实时动作图像;值得说明的是,本实施例中,图像采集装置为高清摄像机;The image acquisition device is used to collect the standard operation video of the industrial robot, and is also used to collect real-time action images of the industrial robot in real time; it is worth noting that, in this embodiment, the image acquisition device is a high-definition camera;
故障检测装置,用于接收图像采集装置采集的工业机器人标准作业视频建立工业机器人标准作业模式视频帧序列,还用于接收图像采集装置实时采集的工业机器人实时动作图像,将工业机器人实时动作图像与工业机器人标准作业模式视频帧序列进行匹配,判断工业机器人标准作业模式视频帧序列中是否存在与工业机器人实时动作图像近似匹配的图像,判断工业机器人标准作业模式视频帧序列中不存在与工业机器人实时动作图像近似匹配的图像后发送急停控制信号;The fault detection device is used to receive the standard operation video of the industrial robot collected by the image acquisition device to establish the video frame sequence of the standard operation mode of the industrial robot, and is also used to receive the real-time action image of the industrial robot collected by the image acquisition device in real time, and combine the real-time action image of the industrial robot with the The video frame sequence of the standard operating mode of the industrial robot is matched to determine whether there is an image that approximately matches the real-time action image of the industrial robot in the video frame sequence of the standard operating mode of the industrial robot. The emergency stop control signal is sent after the action image approximately matches the image;
控制器,用于故障检测装置发送的急停控制信号并控制工业机器人停止工作。The controller is used for the emergency stop control signal sent by the fault detection device and controls the industrial robot to stop working.
具体的,本系统具有采用非接触式的方式实时采集工业机器人作业图像,通过故障检测装置将工业机器人实时动作图像与工业机器人标准作业模式视频帧序列进行匹配,判断工业机器人标准作业模式视频帧序列中是否存在与工业机器人实时动作图像近似匹配的图像,若是,判断工业机器人工作姿态正常;若否,判断工业机器人工作姿态异常,并通过控制器控制工业机器人急停,无需数据采集装置采集工业机器人各轴及末端的实时状态信息或工业机器人的运行状态数据,检测过程简单准确且成本较低。Specifically, this system adopts a non-contact method to collect the operation images of industrial robots in real time, matches the real-time action images of industrial robots with the video frame sequence of the standard operation mode of the industrial robot through the fault detection device, and judges the video frame sequence of the standard operation mode of the industrial robot. Whether there is an image that approximately matches the real-time action image of the industrial robot, if yes, judge that the working posture of the industrial robot is normal; if not, judge that the working posture of the industrial robot is abnormal, and control the emergency stop of the industrial robot through the controller. The real-time status information of each axis and end or the operating status data of industrial robots, the detection process is simple and accurate and the cost is low.
参照图1,值得说明的是,故障检测装置包括工业机器人标准作业视频建立单元、图像分割单元及图像匹配单元。下面依次对三个单元进行说明。Referring to Fig. 1, it is worth noting that the fault detection device includes an industrial robot standard operation video establishment unit, an image segmentation unit and an image matching unit. The three units are described in turn below.
参照图3,工业机器人标准作业视频建立单元用于对工业机器人标准作业视频进行T视频帧提取,值得说明的是,T视频帧提取是指,视频帧序列中相邻两个帧之间的相隔时间为T,形成视频帧序列,<I1,I2,…In>,Ik,k∈N为图像帧。工业机器人标准作业视频建立单元还用于提取视频帧序列中包含工业机器人一个周期的动作图像的帧,建立工业机器人作业模式视频帧序列<Is,Is+1,…Ie>,其中,Is和Ie分别为工作机器人一个工作周期的起始帧Is和结束帧Ie,,工业机器人作业模式视频帧序列中每一帧包含工业机器人的一个作业动作。Referring to Figure 3, the industrial robot standard operation video establishment unit is used to perform T video frame extraction on the industrial robot standard operation video. It is worth noting that the T video frame extraction refers to the interval between two adjacent frames in the video frame sequence The time is T, forming a sequence of video frames, <I 1 , I 2 ,…I n >, I k , k∈N are image frames. The video building unit for the standard operation of the industrial robot is also used to extract frames containing a cycle of motion images of the industrial robot in the video frame sequence, and establish a video frame sequence of the industrial robot operation mode <I s , I s+1 ,...I e >, wherein, I s and I e are the start frame I s and the end frame I e of a working cycle of the working robot, respectively, and each frame in the video frame sequence of the industrial robot operation mode contains an operation action of the industrial robot.
值得说明的是,本实施例中,采用人工标注的方式,确定工作机器人一个工作周期的起始帧Is和结束帧Ie。在另一个实施中,可以采取另外的方式确定工作机器人一个工作周期的起始帧Is和结束帧Ie,例如,先确定工作机器人一个工作周期的起始图像为起始帧Is,确定与该起始帧Is相隔一个周期N时间的图像为结束帧Ie。在另一个实施例中,还可以采取另外的方式确定工作机器人一个工作周期的起始帧Is和结束帧Ie,例如,先确定工作机器人一个工作周期的起始图像为起始帧Is,寻找与该起始帧Is相隔时间大于时间阈值且与该起始帧Is的图像相似度大于相似阈值的图像为结束帧Ie。It is worth noting that, in this embodiment, the starting frame I s and the ending frame I e of a working cycle of the working robot are determined by manual marking. In another implementation, another method can be adopted to determine the start frame I s and the end frame I e of a working cycle of the working robot, for example, first determine the starting image of a working cycle of the working robot as the starting frame I s , and determine The image that is separated from the start frame I s by a cycle N time is the end frame I e . In another embodiment, another method can be adopted to determine the start frame I s and the end frame I e of a working cycle of the working robot, for example, first determine the starting image of a working cycle of the working robot as the starting frame I s , looking for an image whose time interval from the start frame I s is greater than the time threshold and whose image similarity with the start frame I s is greater than the similarity threshold is the end frame I e .
图像分割单元用于提取机器工业机器人作业模式视频帧序列的每一帧图像中的工业机器人图像,并发送至工业机器人标准作业视频建立单元。The image segmentation unit is used to extract the industrial robot image in each frame image of the machine industrial robot operation mode video frame sequence, and send it to the industrial robot standard operation video establishment unit.
值得说明的是,图像分割单元提取工业机器人图像包括以下步骤,It is worth noting that the image segmentation unit extracting the industrial robot image includes the following steps,
S141:确定工业机器人的颜色Cr;S141: Determine the color C r of the industrial robot;
S142:I为包含工业机器人的作业图像,P为I中的任意像素,判断P的颜色值是否在Cr为中心的δ领域内,若是,执行S143,若否,执行S144;S142: I is an operation image including an industrial robot, P is any pixel in I, judge whether the color value of P is in the δ field centered on C r , if yes, execute S143, if not, execute S144;
S143:将P的颜色值设置为黑色;S143: Set the color value of P to black;
S144:将P的颜色值设置为白色。S144: Set the color value of P to white.
从而实现对工业机器人作业图像的二值化处理,将工业机器人与背景分离,提高工业机器人故障动作检测的准确性。In this way, the binarization processing of the operation image of the industrial robot is realized, the industrial robot is separated from the background, and the accuracy of the fault action detection of the industrial robot is improved.
工业机器人标准作业视频建立单元用于接收图像分割单元提取的每一帧的工业机器人图像,生成工业机器人标准作业视频。The industrial robot standard operation video building unit is used to receive the industrial robot image of each frame extracted by the image segmentation unit, and generate the industrial robot standard operation video.
图像分割单元还用于提取工业机器人实时动作图像中的工业机器人图像。The image segmentation unit is also used to extract the industrial robot image in the real-time action image of the industrial robot.
参照图4,图像匹配单元用于将工业机器人实时动作图像与工业机器人标准作业模式视频帧序列中的图像进行匹配,判断工业机器人标准作业模式视频帧序列中是否存在与工业机器人实时动作图像近似匹配的图像,并判断工业机器人标准作业模式视频帧序列中不存在与工业机器人实时动作图像近似匹配的图像后发送急停控制信号。图像匹配单元还用于判断工业机器人标准作业模式视频帧序列中存在与工业机器人实时动作图像近似匹配的图像后记录工业机器人标准作业模式视频帧序列中与工业机器人实时动作图像近似匹配的图像的序列号q1。Referring to Figure 4, the image matching unit is used to match the real-time action images of the industrial robot with the images in the video frame sequence of the standard operating mode of the industrial robot, and judge whether there is an approximate match between the video frame sequence of the standard operating mode of the industrial robot and the real-time action image of the industrial robot After judging that there is no image that approximately matches the real-time action image of the industrial robot in the video frame sequence of the standard operating mode of the industrial robot, an emergency stop control signal is sent. The image matching unit is also used to judge that there is an image approximately matching the real-time action image of the industrial robot in the video frame sequence of the standard operating mode of the industrial robot, and then record the sequence of the image approximately matching the real-time action image of the industrial robot in the video frame sequence of the standard operating mode of the industrial robot No. q 1 .
值得说明的是,图像匹配单元将工业机器人实时动作图像与工业机器人标准作业模式视频帧序列中的图像进行匹配具体包括以下步骤,It is worth noting that the image matching unit matches the real-time action images of the industrial robot with the images in the video frame sequence of the standard operating mode of the industrial robot, specifically including the following steps,
S31:初始化实时动作图像的序号变量q0=-1;S31: Initialize the serial number variable q 0 of the real-time action image =-1;
S32:查找工业机器人标准作业模式视频帧序列中是否存在与工业机器人实时动作图像近似匹配的图像,若是,执行S33,若否,发送急停控制信号至控制器;S32: Find whether there is an image approximately matching the real-time action image of the industrial robot in the video frame sequence of the standard operation mode of the industrial robot, if yes, execute S33, if not, send an emergency stop control signal to the controller;
S33:记录工业机器人标准作业模式视频帧序列中与工业机器人实时动作图像近似匹配的图像的序列号q1;S33: Record the serial number q 1 of the image approximately matching the real-time action image of the industrial robot in the video frame sequence of the standard operation mode of the industrial robot;
S34:若q1=-1Vq1=q0+1,则令q0=q1,其中,V为运算符号,表示或运算,进行下一帧工业机器人实时动作图像的匹配。S34: If q 1 =-1Vq 1 =q 0 +1, then set q 0 =q 1 , where V is an operation symbol, representing an OR operation, and matching the real-time action image of the next frame of industrial robot.
还值得说明的是,S32具体包括,It is also worth noting that S32 specifically includes,
S321:初始化工业机器人标准作业模式视频帧序列中图像帧序号q1,q1=s;S321: Initialize the image frame sequence number q 1 in the video frame sequence in the standard operation mode of the industrial robot, q 1 =s;
S322:计算工业机器人实时动作图像与工业机器人标准作业模式视频帧序列中图像帧Iq1的差值,所述的图像差值计算方法为:S322: Calculate the difference between the real-time action image of the industrial robot and the image frame Iq1 in the video frame sequence of the standard operating mode of the industrial robot, the image difference calculation method is:
其中,d(I1,I2)表示图像I1和图像I2之间的差值,m×n表示图像的分辨率,I1(i,j)表示图像I1的第i行、第j列像素的颜色值,I2(i,j)表示图像I2的第i行、第j列像素的颜色值;Among them, d(I 1 , I 2 ) represents the difference between image I 1 and image I 2 , m×n represents the resolution of the image, and I 1 (i, j) represents the i - th row and the The color value of the j-column pixel, I 2 (i, j) represents the color value of the i-th row and j-th column pixel of the image I 2 ;
S323:判断差值是否小于阈值D,若是,执行S325,若否,执行S324;S323: Determine whether the difference is smaller than the threshold D, if yes, execute S325, if not, execute S324;
S324:令q1=q1+1,执行S322;S324: Let q 1 =q 1 +1, execute S322;
S325:判断工业机器人标准作业模式视频帧序列中序列号为q1的图像为工业机器人实时动作图像的近似匹配图像,执行S33。S325: Determine that the image with the sequence number q 1 in the video frame sequence of the standard operation mode of the industrial robot is an approximate matching image of the real-time action image of the industrial robot, and execute S33.
还值得说明的是,为了方便操作人员根据图像记录的序列号q1及工业机器人实时工作状态,判断图像匹配单元的准确性,图像匹配单元记录工业机器人标准作业模式视频帧序列中与工业机器人实时动作图像近似匹配的图像的序列号q1,操作人员可通过外接人机交互装置(例如显示屏、鼠标及键盘)查询序列号q1,并结合工业机器人实时作业动作进行判断。It is also worth noting that, in order to facilitate the operator to judge the accuracy of the image matching unit according to the serial number q 1 recorded in the image and the real-time working status of the industrial robot, the image matching unit records the real-time information in the video frame sequence of the standard operating mode of the industrial robot and the industrial robot. The sequence number q 1 of the image that the action image approximately matches, the operator can query the sequence number q 1 through an external human-computer interaction device (such as a display screen, mouse, and keyboard), and make a judgment in combination with the real-time operation action of the industrial robot.
值得说明的是,本实施例中,控制器通过与工业机器人控制柜通信,控制器工业机器人急停;在另一个实施例中,控制器可直接与工业机器人的通电线路中的电控开关连接,通过控制电控开关的断开,控制工业机器人急停。It is worth noting that, in this embodiment, the controller communicates with the industrial robot control cabinet, and the controller stops the industrial robot in an emergency; in another embodiment, the controller can be directly connected to the electric control switch in the power line of the industrial robot , by controlling the disconnection of the electric control switch, the emergency stop of the industrial robot is controlled.
还值得说明的是,本实施例中,故障检测装置的硬件装置可包括中央处理单元(Central Processing Unit,CPU),还可包括其他通用处理器、数字信号处理器(DigitalSignal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It is also worth noting that in this embodiment, the hardware device of the fault detection device may include a central processing unit (Central Processing Unit, CPU), and may also include other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), dedicated Integrated Circuit (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
故障检测装置的硬件装置还包括存储器。存储器可以是处理器的内部存储单元,例如处理器的硬盘或内存。存储器也可以是处理器的外部存储设备,例如处理器上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。存储器还可以既包括处理器的内部存储单元也包括外部存储设备。存储器用于存储计算机程序以及处理器所需的其他程序和数据。存储器还可以用于暂时地存储已经输出或者将要输出的数据。The hardware device of the fault detection device also includes a memory. The memory may be an internal storage unit of the processor, such as a hard disk or internal memory of the processor. The memory can also be an external storage device of the processor, such as a plug-in hard disk equipped on the processor, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash memory card (Flash Card), etc. . Memory may also include both internal storage units of the processor and external storage devices. Memory is used to store computer programs and other programs and data required by the processor. The memory can also be used to temporarily store data that has been output or will be output.
还值得说明的是,本实施例中,控制器的硬件装置可包括中央处理单元(CentralProcessing Unit,CPU),还可包括其他通用处理器、数字信号处理器(Digital SignalProcessor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It is also worth noting that in this embodiment, the hardware device of the controller may include a central processing unit (Central Processing Unit, CPU), and may also include other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
控制器的硬件装置还包括存储器。存储器可以是处理器的内部存储单元,例如处理器的硬盘或内存。存储器也可以是处理器的外部存储设备,例如处理器上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。存储器还可以既包括处理器的内部存储单元也包括外部存储设备。存储器用于存储计算机程序以及处理器所需的其他程序和数据。存储器还可以用于暂时地存储已经输出或者将要输出的数据。The hardware device of the controller also includes a memory. The memory may be an internal storage unit of the processor, such as a hard disk or internal memory of the processor. The memory can also be an external storage device of the processor, such as a plug-in hard disk equipped on the processor, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash memory card (Flash Card), etc. . Memory may also include both internal storage units of the processor and external storage devices. Memory is used to store computer programs and other programs and data required by the processor. The memory can also be used to temporarily store data that has been output or will be output.
实施例2Example 2
参照图2,一种基于视觉的工业机器人故障动作检测方法,包括以下步骤,Referring to Fig. 2, a kind of vision-based industrial robot malfunction detection method comprises the following steps,
S1:采集工业机器人标准作业视频,建立工业机器人标准作业模式视频帧序列;S1: Collect the standard operation video of the industrial robot, and establish the video frame sequence of the standard operation mode of the industrial robot;
S2:实时采集工业机器人作业图像,获取工业机器人实时动作图像;S2: Real-time collection of industrial robot operation images, to obtain real-time action images of industrial robots;
S3:将工业机器人实时动作图像与工业机器人标准作业模式视频帧序列进行匹配,判断工业机器人标准作业模式视频帧序列中是否存在与工业机器人实时动作图像近似匹配的图像,若是,执行S2,若否,执行S4;S3: Match the real-time action image of the industrial robot with the video frame sequence of the standard operating mode of the industrial robot, and judge whether there is an image approximately matching the real-time action image of the industrial robot in the video frame sequence of the standard operating mode of the industrial robot. If yes, execute S2, if not , execute S4;
S4:控制工业机器人急停。S4: Control the emergency stop of the industrial robot.
具体的,本方法具有采用非接触式的方式实时采集工业机器人作业图像,将工业机器人实时动作图像与工业机器人标准作业模式视频帧序列进行匹配,判断工业机器人标准作业模式视频帧序列中是否存在与工业机器人实时动作图像近似匹配的图像,若是,判断工业机器人工作姿态正常;若否,判断工业机器人工作姿态异常并控制工业机器人急停,无需数据采集装置采集工业机器人各轴及末端的实时状态信息或工业机器人的运行状态数据,检测过程简单准确且成本较低。Specifically, the method has the steps of collecting the operation image of the industrial robot in real time in a non-contact manner, matching the real-time action image of the industrial robot with the video frame sequence of the standard operation mode of the industrial robot, and judging whether there is any difference in the video frame sequence of the standard operation mode of the industrial robot. The image of the real-time action image of the industrial robot is approximately matched. If yes, it is judged that the working posture of the industrial robot is normal; Or the operating status data of industrial robots, the detection process is simple and accurate and the cost is low.
下面依次对每个步骤进行详细说明。Each step is described in detail below in turn.
参照图3,S1具体包括以下步骤,Referring to Figure 3, S1 specifically includes the following steps,
S11:采集工业机器人标准作业视频;S11: collect standard operation videos of industrial robots;
S12:对工业机器人标准作业视频进行T视频帧提取,形成视频帧序列;其中,值得说明的是,T视频帧提取是指,视频帧序列中相邻两个帧之间的相隔时间为T;S12: Perform T video frame extraction on the standard operation video of the industrial robot to form a video frame sequence; where it is worth noting that the T video frame extraction means that the interval between two adjacent frames in the video frame sequence is T;
S13:提取视频帧序列中包含工业机器人一个周期的动作图像的帧,建立工业机器人作业模式视频帧序列;S13: Extracting the frame of the motion image of one cycle of the industrial robot in the video frame sequence, and establishing the video frame sequence of the industrial robot operation mode;
S14:对工业机器人作业模式视频帧序列进行图像分割,分离工业机器人图像,建立工业机器人标准作业模式视频帧序列。S14: Carry out image segmentation on the video frame sequence of the industrial robot operation mode, separate the industrial robot image, and establish the video frame sequence of the industrial robot standard operation mode.
具体的,采集工业机器人标准作业视频,对工业机器人标准作业视频进行T视频帧提取,形成视频帧序列。为了方便采集视频,该视频帧序列并不仅仅包括一个周期作业的工业机器人图像,因此需要对视频帧序列进行切割,提取视频帧序列中包含工业机器人一个周期的动作图像的帧,建立工业机器人作业模式视频帧序列。为了方便增加工业机器人动作检测的准确性,需要对工业机器人作业模式视频帧序列进行图像分割,分离工业机器人图像,建立工业机器人标准作业模式视频帧序列。Specifically, the standard operation video of the industrial robot is collected, and T video frame extraction is performed on the standard operation video of the industrial robot to form a sequence of video frames. In order to facilitate the collection of video, the video frame sequence does not only include an image of an industrial robot operating periodically, so it is necessary to cut the video frame sequence, extract the frame of the video frame sequence containing a cycle of the industrial robot's action image, and establish an industrial robot operation Pattern video frame sequence. In order to increase the accuracy of industrial robot motion detection, it is necessary to segment the video frame sequence of the industrial robot operation mode, separate the industrial robot image, and establish the video frame sequence of the industrial robot standard operation mode.
值得说明的是,S13具体包括以下步骤,It is worth noting that S13 specifically includes the following steps,
S131:视频帧序列为<I1,I2,…In>,Ik,k∈N为图像帧,每一帧图像包含工业机器人的一个作业动作,标记工作机器人一个工作周期的起始帧Is和结束帧Ie;S131: The video frame sequence is <I 1 , I 2 ,…I n >, I k , k∈N are image frames, each frame of image contains an operation action of the industrial robot, and marks the starting frame of a working cycle of the working robot I s and end frame I e ;
S132:提取工作机器人一个工作周期的图像帧,生成工业机器人作业模式视频帧序列<Is,Is+1,…Ie>。S132: Extract image frames of one working cycle of the working robot, and generate a sequence of video frames <I s , I s+1 , . . . I e > in the working mode of the industrial robot.
还值得说明的是,本实施例中,采用人工标注的方式,确定工作机器人一个工作周期的起始帧Is和结束帧Ie。在另一个实施中,可以采取另外的方式确定工作机器人一个工作周期的起始帧Is和结束帧Ie,例如,先确定工作机器人一个工作周期的起始图像为起始帧Is,确定与该起始帧Is相隔一个周期N时间的图像为结束帧Ie。在另一个实施例中,还可以采取另外的方式确定工作机器人一个工作周期的起始帧Is和结束帧Ie,例如,先确定工作机器人一个工作周期的起始图像为起始帧Is,寻找与该起始帧Is相隔时间大于时间阈值且与该起始帧Is的图像相似度大于相似阈值的图像为结束帧Ie。It is also worth noting that in this embodiment, the starting frame I s and the ending frame I e of a working cycle of the working robot are determined by manual marking. In another implementation, another method can be adopted to determine the start frame I s and the end frame I e of a working cycle of the working robot, for example, first determine the starting image of a working cycle of the working robot as the starting frame I s , and determine The image that is separated from the start frame I s by a cycle N time is the end frame I e . In another embodiment, another method can be adopted to determine the start frame I s and the end frame I e of a working cycle of the working robot, for example, first determine the starting image of a working cycle of the working robot as the starting frame I s , looking for an image whose time interval from the start frame I s is greater than the time threshold and whose image similarity with the start frame I s is greater than the similarity threshold is the end frame I e .
还值得说明的是,S14中图像分割具体包括,It is also worth noting that the image segmentation in S14 specifically includes,
S141:确定工业机器人的颜色Cr;S141: Determine the color C r of the industrial robot;
S142:I为包含工业机器人的作业图像,P为I中的任意像素,判断P的颜色值是否在Cr为中心的δ领域内,若是,执行S143,若否,执行S144;S142: I is an operation image including an industrial robot, P is any pixel in I, judge whether the color value of P is in the δ field centered on C r , if yes, execute S143, if not, execute S144;
S143:将P的颜色值设置为黑色;S143: Set the color value of P to black;
S144:将P的颜色值设置为白色。S144: Set the color value of P to white.
从而实现对工业机器人作业图像的二值化处理,将工业机器人与背景分离。In this way, the binarization processing of the operation image of the industrial robot is realized, and the industrial robot is separated from the background.
S2具体包括,S2 specifically includes,
实时采集工业机器人作业图像,对工业机器人作业图像进行图像分割,获取工业机器人实时动作图像。Collect the operation images of industrial robots in real time, perform image segmentation on the operation images of industrial robots, and obtain real-time action images of industrial robots.
值得说明的是,S2中进行图像分割包括以下步骤,It is worth noting that image segmentation in S2 includes the following steps,
S21:确定工业机器人的颜色Cr;S21: Determine the color C r of the industrial robot;
S22:I为包含工业机器人的作业图像,P为I中的任意像素,判断P的颜色值是否在Cr为中心的δ领域内,若是,执行S143,若否,执行S144;S22: I is an operation image including an industrial robot, P is any pixel in I, judge whether the color value of P is in the δ field centered on C r , if yes, execute S143, if not, execute S144;
S23:将P的颜色值设置为黑色;S23: set the color value of P to black;
S24:将P的颜色值设置为白色。S24: Set the color value of P to white.
通过步骤S14的图像分割步骤及S2中的图像分割步骤,第一,减少了背景图像在S3中图像匹配过程中的影响;第二,减少了工业机器人本身的颜色与工业机器人标准作业视频中的工业机器人本身的颜色之间的差异的影响,提高了S3中图像匹配的准确性,同时提高了本方法的通用性。Through the image segmentation step in step S14 and the image segmentation step in S2, first, the influence of the background image in the image matching process in S3 is reduced; second, the color of the industrial robot itself and the color of the industrial robot standard operation video are reduced. The influence of the difference between the colors of the industrial robot itself improves the accuracy of image matching in S3, while improving the generality of the method.
参照图4,值得说明的是,S3具体包括以下步骤。Referring to Fig. 4, it is worth noting that S3 specifically includes the following steps.
S31:初始化实时动作图像的序号变量q0=-1;S31: Initialize the serial number variable q 0 of the real-time action image =-1;
S32:查找工业机器人标准作业模式视频帧序列中是否存在与工业机器人实时动作图像近似匹配的图像,若是,执行S33,若否,执行S4;S32: Find whether there is an image approximately matching the real-time action image of the industrial robot in the video frame sequence of the standard operation mode of the industrial robot, if yes, execute S33, if not, execute S4;
S33:记录工业机器人标准作业模式视频帧序列中与工业机器人实时动作图像近似匹配的图像的序列号q1;S33: Record the serial number q 1 of the image approximately matching the real-time action image of the industrial robot in the video frame sequence of the standard operation mode of the industrial robot;
S34:若q1=-1Vq1=q0+1,则令q0=q1,其中,V为运算符号,表示或运算,执行S2。S34: If q 1 =-1Vq 1 =q 0 +1, set q 0 =q 1 , where V is an operation symbol, representing an OR operation, and execute S2.
还值得说明的是,S32具体包括,It is also worth noting that S32 specifically includes,
S321:初始化工业机器人标准作业模式视频帧序列中图像帧序号q1,q1=s;S321: Initialize the image frame sequence number q 1 in the video frame sequence in the standard operation mode of the industrial robot, q 1 =s;
S322:计算工业机器人实时动作图像与工业机器人标准作业模式视频帧序列中图像帧Iq1的差值,所述的图像差值计算方法为:S322: Calculate the difference between the real-time action image of the industrial robot and the image frame Iq1 in the video frame sequence of the standard operating mode of the industrial robot, the image difference calculation method is:
其中,d(I1,I2)表示图像I1和图像I2之间的差值,m×n表示图像的分辨率,I1(i,j)表示图像I1的第i行、第j列像素的颜色值,I2(i,j)表示图像I2的第i行、第j列像素的颜色值;Among them, d(I 1 , I 2 ) represents the difference between image I 1 and image I 2 , m×n represents the resolution of the image, and I 1 (i, j) represents the i - th row and the The color value of the j-column pixel, I 2 (i, j) represents the color value of the i-th row and j-th column pixel of the image I 2 ;
S323:判断差值是否小于阈值D,若是,执行S325,若否,执行S324;S323: Determine whether the difference is smaller than the threshold D, if yes, execute S325, if not, execute S324;
S324:令q1=q1+1,执行S322;S324: Let q 1 =q 1 +1, execute S322;
S325:判断工业机器人标准作业模式视频帧序列中序列号为q1的图像为工业机器人实时动作图像的近似匹配图像,执行S33。S325: Determine that the image with the sequence number q 1 in the video frame sequence of the standard operation mode of the industrial robot is an approximate matching image of the real-time action image of the industrial robot, and execute S33.
具体的,为了方便操作人员根据图像记录的序列号q1及工业机器人实时工作状态,判断本方法的准确性,记录工业机器人标准作业模式视频帧序列中与工业机器人实时动作图像近似匹配的图像的序列号q1,操作人员可通过查询序列号q1,并结合工业机器人实时作业动作进行判断。Specifically, in order to facilitate operators to judge the accuracy of the method according to the serial number q 1 recorded in the image and the real-time working status of the industrial robot, record the images in the video frame sequence of the standard operation mode of the industrial robot that approximately match the real-time action image of the industrial robot The serial number q 1 , the operator can judge by querying the serial number q 1 and combining the real-time operation actions of the industrial robot.
以上仅是本发明的优选实施方式,应当理解本发明并非局限于本文所披露的形式,不应看作是对其他实施例的排除,而可用于各种其他组合、修改和环境,并能够在本文构想范围内,通过上述教导或相关领域的技术或知识进行改动。而本领域人员所进行的改动和变化不脱离本发明的精神和范围,则都应在本发明所附权利要求的保护。The above are only preferred embodiments of the present invention, and it should be understood that the present invention is not limited to the forms disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be used in It is within the contemplation of this document with modification from the above teachings or skill or knowledge in the relevant art. The modifications and changes made by those skilled in the art without departing from the spirit and scope of the present invention should be protected by the appended claims of the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010342989.XA CN111531581B (en) | 2020-04-27 | 2020-04-27 | Industrial robot fault action detection method and system based on vision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010342989.XA CN111531581B (en) | 2020-04-27 | 2020-04-27 | Industrial robot fault action detection method and system based on vision |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111531581A CN111531581A (en) | 2020-08-14 |
CN111531581B true CN111531581B (en) | 2023-02-03 |
Family
ID=71970285
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010342989.XA Active CN111531581B (en) | 2020-04-27 | 2020-04-27 | Industrial robot fault action detection method and system based on vision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111531581B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115958609B (en) * | 2023-03-16 | 2023-07-14 | 山东卓朗检测股份有限公司 | Instruction data safety early warning method based on intelligent robot automatic control system |
CN118977276B (en) * | 2024-09-27 | 2025-03-04 | 南京晓庄学院 | Robot motion trail monitoring method based on machine vision |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6356671B1 (en) * | 1991-07-05 | 2002-03-12 | Fanuc Ltd. | Image processing method for an industrial visual sensor |
JP2013258542A (en) * | 2012-06-12 | 2013-12-26 | Idec Corp | Robot control system, moving image transfer method, and moving image transfer program |
CN104050771A (en) * | 2013-03-13 | 2014-09-17 | 霍尼韦尔国际公司 | System and method of anomaly detection |
JP2017121685A (en) * | 2016-01-07 | 2017-07-13 | 富士通株式会社 | Manufacturing abnormality determination method, manufacturing abnormality determination program, and manufacturing apparatus |
CN108972593A (en) * | 2018-09-07 | 2018-12-11 | 顺德职业技术学院 | Control method and system under a kind of industrial robot system |
-
2020
- 2020-04-27 CN CN202010342989.XA patent/CN111531581B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6356671B1 (en) * | 1991-07-05 | 2002-03-12 | Fanuc Ltd. | Image processing method for an industrial visual sensor |
JP2013258542A (en) * | 2012-06-12 | 2013-12-26 | Idec Corp | Robot control system, moving image transfer method, and moving image transfer program |
CN104050771A (en) * | 2013-03-13 | 2014-09-17 | 霍尼韦尔国际公司 | System and method of anomaly detection |
JP2017121685A (en) * | 2016-01-07 | 2017-07-13 | 富士通株式会社 | Manufacturing abnormality determination method, manufacturing abnormality determination program, and manufacturing apparatus |
CN108972593A (en) * | 2018-09-07 | 2018-12-11 | 顺德职业技术学院 | Control method and system under a kind of industrial robot system |
Also Published As
Publication number | Publication date |
---|---|
CN111531581A (en) | 2020-08-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20200102188A1 (en) | Elevator system component analysis | |
CN111531580B (en) | Vision-based multi-task robot fault detection method and system | |
CN110889339B (en) | Head and shoulder detection-based dangerous area grading early warning method and system | |
CN111531581B (en) | Industrial robot fault action detection method and system based on vision | |
CN107688795A (en) | A kind of monitoring method and terminal of power system video image | |
CN111149129A (en) | Abnormality detection device and abnormality detection method | |
CN111476685A (en) | Behavior analysis method, device and equipment | |
CN111552269B (en) | A multi-industrial robot safety detection method and system based on attitude estimation | |
CN116883383A (en) | Method and system for detecting structural abnormality of pantograph of train based on embedded front end | |
CN112666911A (en) | Cooperative control system | |
CN110796039B (en) | Face flaw detection method and device, electronic equipment and storage medium | |
CN110597165B (en) | Steel piling monitoring system and steel piling monitoring method | |
US20230386014A1 (en) | Model generation device for visual inspection and visual inspection device | |
CN110708519B (en) | An Interactive Monitoring Method for Industrial Field Environment | |
CN117114420B (en) | Image recognition-based industrial and trade safety accident risk management and control system and method | |
CN116682162A (en) | A robot detection algorithm based on real-time video stream | |
US11321656B2 (en) | Difference extracting device | |
CN111531582B (en) | A vision-based industrial robot fault detection method and system | |
CN111368726B (en) | Construction site operation face personnel number statistics method, system, storage medium and device | |
CN112818515A (en) | Gate leakage detection system and method | |
CN117077040B (en) | Large-scale complex equipment fault diagnosis and prediction system based on machine learning | |
CN118196086B (en) | Intelligent identification method, device, equipment and storage medium for out-of-place switching on/off | |
CN118172579B (en) | Electrical cabinet assembly detection method, system and medium based on machine vision | |
CN113743224B (en) | Method and system for monitoring wearing of safety belt of ascending operator based on edge calculation | |
WO2024065189A1 (en) | Method, system, apparatus, electronic device, and storage medium for evaluating work task |
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: 20231008 Address after: No. 28 Manao 5th Road, Zhashan Street, Caidian District, Wuhan City, Hubei Province, 430000 Patentee after: Wuhan Zhongshe Robot Technology Co.,Ltd. Address before: 430000 No.206 Guanggu 1st Road, Donghu New Technology Development Zone, Wuhan, Hubei Province Patentee before: WUHAN INSTITUTE OF TECHNOLOGY |
|
TR01 | Transfer of patent right | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: A Vision based Fault Action Detection Method and System for Industrial Robots Granted publication date: 20230203 Pledgee: Wuhan Rural Commercial Bank Co.,Ltd. Caidian sub branch Pledgor: Wuhan Zhongshe Robot Technology Co.,Ltd. Registration number: Y2020420000011 |
|
PE01 | Entry into force of the registration of the contract for pledge of patent right |