CN112360285B - Automatic door stereoscopic machine vision sensor and sensing method thereof - Google Patents
Automatic door stereoscopic machine vision sensor and sensing method thereof Download PDFInfo
- Publication number
- CN112360285B CN112360285B CN202011159434.8A CN202011159434A CN112360285B CN 112360285 B CN112360285 B CN 112360285B CN 202011159434 A CN202011159434 A CN 202011159434A CN 112360285 B CN112360285 B CN 112360285B
- Authority
- CN
- China
- Prior art keywords
- camera
- vision sensor
- machine vision
- automatic door
- door
- 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
- 238000000034 method Methods 0.000 title claims abstract description 28
- 238000003384 imaging method Methods 0.000 claims abstract description 17
- 230000009471 action Effects 0.000 claims description 6
- 238000012544 monitoring process Methods 0.000 claims description 6
- 230000003068 static effect Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- E—FIXED CONSTRUCTIONS
- E05—LOCKS; KEYS; WINDOW OR DOOR FITTINGS; SAFES
- E05F—DEVICES FOR MOVING WINGS INTO OPEN OR CLOSED POSITION; CHECKS FOR WINGS; WING FITTINGS NOT OTHERWISE PROVIDED FOR, CONCERNED WITH THE FUNCTIONING OF THE WING
- E05F15/00—Power-operated mechanisms for wings
- E05F15/70—Power-operated mechanisms for wings with automatic actuation
- E05F15/73—Power-operated mechanisms for wings with automatic actuation responsive to movement or presence of persons or objects
-
- E—FIXED CONSTRUCTIONS
- E05—LOCKS; KEYS; WINDOW OR DOOR FITTINGS; SAFES
- E05F—DEVICES FOR MOVING WINGS INTO OPEN OR CLOSED POSITION; CHECKS FOR WINGS; WING FITTINGS NOT OTHERWISE PROVIDED FOR, CONCERNED WITH THE FUNCTIONING OF THE WING
- E05F15/00—Power-operated mechanisms for wings
- E05F15/70—Power-operated mechanisms for wings with automatic actuation
- E05F15/79—Power-operated mechanisms for wings with automatic actuation using time control
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
- G06T7/85—Stereo camera calibration
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/90—Arrangement of cameras or camera modules, e.g. multiple cameras in TV studios or sports stadiums
-
- E—FIXED CONSTRUCTIONS
- E05—LOCKS; KEYS; WINDOW OR DOOR FITTINGS; SAFES
- E05F—DEVICES FOR MOVING WINGS INTO OPEN OR CLOSED POSITION; CHECKS FOR WINGS; WING FITTINGS NOT OTHERWISE PROVIDED FOR, CONCERNED WITH THE FUNCTIONING OF THE WING
- E05F15/00—Power-operated mechanisms for wings
- E05F15/70—Power-operated mechanisms for wings with automatic actuation
- E05F15/73—Power-operated mechanisms for wings with automatic actuation responsive to movement or presence of persons or objects
- E05F2015/767—Power-operated mechanisms for wings with automatic actuation responsive to movement or presence of persons or objects using cameras
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Power-Operated Mechanisms For Wings (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
Description
技术领域technical field
本发明属于自动门传感器技术领域,具体涉及一种自动门立体机器视觉传感器和一种自动门立体机器视觉传感器的传感方法。The invention belongs to the technical field of automatic door sensors, and in particular relates to a three-dimensional machine vision sensor for automatic doors and a sensing method for the three-dimensional machine vision sensor for automatic doors.
背景技术Background technique
目前在自动门的开关门方面有两种情况存在着问题,一种是人在门前静止时会自动开门,另一种是人平行走过门前时自动门会打开,然而事实上这两种情况都是不需要开门的。自动门的频繁开动会造成耗电量的增加和自动门折旧率的增加,减短自动门的寿命,使经济效益大大折损。At present, there are two problems in the opening and closing of the automatic door. One is that the door will automatically open when the person is still in front of the door, and the other is that the automatic door will open when the person walks in parallel. In both cases, there is no need to open the door. The frequent operation of automatic doors will increase the power consumption and the depreciation rate of automatic doors, shorten the life of automatic doors, and greatly reduce the economic benefits.
公开号为:CN105869241,主题名称为一种基于多普勒雷达的自适应自动门系统及其控制方法的发明专利,其技术方案公开了“该系统包括控制单元,人机交互终端、多普勒雷达、执行机构、电机编码器、手动按钮开关、视觉和声觉报警装置,所述多普勒雷达将动态目标信息输送至控制单元,所述电机编码器安装在电机轴上将电机转速信号输送至控制单元,所述控制单元输出开关门信息至控制自动门开启和关闭的执行机构,所述手动按钮开关和人机交互终端输出控制信号至控制单元,所述控制单元输出报警信号至视觉和声觉报警装置”。The publication number is: CN105869241, the subject name is an invention patent of an adaptive automatic door system based on Doppler radar and its control method, and its technical scheme discloses that "the system includes a control unit, a human-computer interaction terminal, a Doppler Radar, actuator, motor encoder, manual button switch, visual and audible alarm device, the Doppler radar transmits dynamic target information to the control unit, and the motor encoder is installed on the motor shaft to transmit the motor speed signal To the control unit, the control unit outputs door opening and closing information to the actuator that controls the opening and closing of the automatic door, the manual button switch and the human-computer interaction terminal output control signals to the control unit, and the control unit outputs alarm signals to the visual and Audible alarm device".
以上述发明专利为例,其虽然提及了自动化门,但是其技术方案与本发明不同。因此,针对上述问题,予以进一步改进。Taking the above invention patent as an example, although it mentions the automatic door, its technical solution is different from the present invention. Therefore, in view of the above problems, further improvements are made.
发明内容Contents of the invention
本发明的主要目的在于提供自动门立体机器视觉传感器及其传感方法,其通过双目立体机器视觉传感器检测判断物体的运动状态,从而避免物体静止时自动门开门和物体平行于自动门运动时自动门开门的两种情况,避免了自动门不必要的开动,从而延长了其使用时间,也提高了经济效益。The main purpose of the present invention is to provide an automatic door stereo machine vision sensor and its sensing method, which detects and judges the motion state of an object through a binocular stereo machine vision sensor, thereby avoiding the automatic door opening when the object is still and the object moving parallel to the automatic door The two situations of opening the automatic door avoid unnecessary actuation of the automatic door, thereby prolonging its service time and improving economic benefits.
本发明的另一目的在于提供自动门立体机器视觉传感器及其传感方法,其还可以检测多个物体运动,则可以通过多物体累计最早开门时间和最晚关门时间来计算开关门时间,物体可以通过多线程编程解决。Another object of the present invention is to provide a three-dimensional machine vision sensor for automatic doors and its sensing method, which can also detect the movement of multiple objects, then the door opening and closing time can be calculated by accumulating the earliest door opening time and the latest door closing time of multiple objects. It can be solved by multi-threaded programming.
为达到以上目的,本发明提供一种自动门立体机器视觉传感器的传感方法,用于检测物体(优选为人体)的运动状态从而自动门判断是否开门,包括以下步骤:In order to achieve the above object, the present invention provides a sensing method of a three-dimensional machine vision sensor for an automatic door, which is used to detect the motion state of an object (preferably a human body) so that the automatic door judges whether to open the door, comprising the following steps:
步骤S1:将包括第一摄像头和第二摄像头的双目立体机器视觉传感器安装于自动门,并且第一摄像头和第二摄像头均通过数据线与控制器电性连接;Step S1: installing a binocular stereo machine vision sensor including a first camera and a second camera on the automatic door, and both the first camera and the second camera are electrically connected to the controller through a data line;
步骤S2:通过物体在第一摄像头和第二摄像头上的成像的不同画面位置进行视差比对,以得到第一摄像头和第二摄像头的中心位置与物体之间的距离;Step S2: Parallax comparison is performed at different image positions of the object on the first camera and the second camera to obtain the distance between the center positions of the first camera and the second camera and the object;
步骤S3:双目立体机器视觉传感器以每秒若干帧的速度不断对所监测区域进行拍照,以获取物体在监测区域的运动状态,并且自动门根据物体的运动状态判断是否开门。Step S3: The binocular stereo machine vision sensor continuously takes pictures of the monitored area at a rate of several frames per second to obtain the motion state of the object in the monitored area, and the automatic door judges whether to open the door according to the motion state of the object.
作为上述技术方案的进一步优选的技术方案,步骤S1具体实施为以下步骤:As a further preferred technical solution of the above technical solution, step S1 is specifically implemented as the following steps:
步骤S1.1:第一摄像头和第二摄像头按照相同方向间隔预设的距离进行固定摆放;Step S1.1: The first camera and the second camera are fixedly placed at a preset distance in the same direction;
步骤S1.2:第一摄像头和第二摄像头之间预设的距离根据双目立体机器视觉传感器的监测区域进行设置;Step S1.2: The preset distance between the first camera and the second camera is set according to the monitoring area of the binocular stereo machine vision sensor;
步骤S1.3:双目立体机器视觉传感器按照标定方法进行相机标定。Step S1.3: The binocular stereo machine vision sensor performs camera calibration according to the calibration method.
作为上述技术方案的进一步优选的技术方案,步骤S2具体实施为以下步骤:As a further preferred technical solution of the above technical solution, step S2 is specifically implemented as the following steps:
步骤S2.1:相机标定后,双目立体机器视觉传感器获得同一物体在第一摄像头和第二摄像头分别成像后的画面位置;Step S2.1: After the camera is calibrated, the binocular stereo machine vision sensor obtains the image position of the same object imaged by the first camera and the second camera respectively;
步骤S2.2:由于第一摄像头和第二摄像头之间预设的距离,同一物体在第一摄像头和第二摄像头分别成像后的画面位置产生一定的视差;Step S2.2: Due to the preset distance between the first camera and the second camera, a certain parallax is generated in the image position of the same object after the first camera and the second camera respectively;
步骤S2.3:双目立体机器视觉传感器根据摄像头成像的像素位置进行视差比对,将标定的视差与距离进行匹配,以得到第一摄像头和第二摄像头的中心位置与物体之间的距离,并且标定为传感距离。Step S2.3: The binocular stereo machine vision sensor performs parallax comparison according to the pixel position of the camera imaging, and matches the calibrated parallax with the distance to obtain the distance between the center position of the first camera and the second camera and the object, And calibrated as the sensing distance.
作为上述技术方案的进一步优选的技术方案,步骤S3具体实施为以下步骤:As a further preferred technical solution of the above technical solution, step S3 is specifically implemented as the following steps:
步骤S3.1:双目立体机器视觉传感器在t1时刻检测到传感距离为s1,并且在成像上的横坐标为x1;Step S3.1: The binocular stereo machine vision sensor detects that the sensing distance is s1 at time t1, and the abscissa on the imaging is x1;
步骤S3.2:双目立体机器视觉传感器在t2时刻检测到传感距离为s2,并且在成像上的横坐标为x2;Step S3.2: The binocular stereo machine vision sensor detects that the sensing distance is s2 at time t2, and the abscissa on the imaging is x2;
步骤S3.3:判断x1和x2之间的偏移量是否达到设定的阈值X,以判断物体的运动状态;Step S3.3: judging whether the offset between x1 and x2 reaches the set threshold X, so as to judge the motion state of the object;
步骤S3.4:根据步骤S3.1和步骤S3.2获取的数据并且通过公式v=(s2-s1)/(t2-t1)获得物体的运动速度v,以判断物体是继续运动还是静止(当人静止的时候,s2=s1,速度v=0,计算物体将到达门的时间时会因为分母为0而报错,从而达到不开门的目的,此外,由于当物体靠近门时,s2<s1,则v<0,若v>0,则是因s2>s1,即物体正在远离门,也不开门);Step S3.4: According to the data obtained in step S3.1 and step S3.2 and by the formula v=(s2-s1)/(t2-t1), the moving speed v of the object is obtained to judge whether the object continues to move or remains still ( When the person is still, s2=s1, speed v=0, when calculating the time when the object will reach the door, an error will be reported because the denominator is 0, so as to achieve the purpose of not opening the door. In addition, because when the object is close to the door, s2<s1 , then v<0, if v>0, it is because s2>s1, that is, the object is moving away from the door and does not open the door);
步骤S3.5:根据运动速度v和传感距离s2获得物体达到自动门的时间t;Step S3.5: Obtain the time t when the object reaches the automatic door according to the moving speed v and the sensing distance s2;
步骤S3.6:根据预设的时间量Δt设置自动门的开门时间t-Δt和关门时间t+Δt;Step S3.6: Set the opening time t-Δt and closing time t+Δt of the automatic door according to the preset time amount Δt;
步骤S3.7:当有多个物体运动时,则通过多物体累计最早开门时间和最晚关门时间来计算开门时间和关门时间(多物体可以通过多线程编程解决)。Step S3.7: When multiple objects are moving, calculate the door opening time and closing time by accumulating the earliest opening time and the latest closing time of multiple objects (multiple objects can be solved by multi-threaded programming).
作为上述技术方案的进一步优选的技术方案,步骤S3.3具体实施为以下步骤:As a further preferred technical solution of the above technical solution, step S3.3 is specifically implemented as the following steps:
步骤S3.3.1:如果x1和x2之间的偏移量达到设定的阈值X,则判断物体为平行于自动门进行运动,并且不进行开门动作;Step S3.3.1: If the offset between x1 and x2 reaches the set threshold X, it is judged that the object is moving parallel to the automatic door, and the door opening action is not performed;
步骤S3.3.2:如果x1和x2之间的偏移量没有达到设定的阈值X,则判断物体向自动门方向进行前进运动(s2<s1)或后退运动(s2>s1)或静止(s2=s1),若物体为前进运动则执行步骤S3.4。Step S3.3.2: If the offset between x1 and x2 does not reach the set threshold X, it is judged that the object is moving forward (s2<s1) or moving backward (s2>s1) or stationary (s2) in the direction of the automatic door = s1), if the object is moving forward, execute step S3.4.
为达到以上目的,本发明还提供一种自动门立体机器视觉传感器,安装于自动门,包括双目立体机器传感器,双目立体机器传感器包括第一摄像头和第二摄像头,其中:In order to achieve the above object, the present invention also provides a stereoscopic machine vision sensor for automatic doors, which is installed on the automatic door and includes a binocular stereoscopic machine sensor. The binocular stereoscopic machine sensor includes a first camera and a second camera, wherein:
将包括第一摄像头和第二摄像头的双目立体机器视觉传感器安装于自动门,并且第一摄像头和第二摄像头均通过数据线与控制器电性连接;A binocular stereo machine vision sensor including a first camera and a second camera is installed on the automatic door, and the first camera and the second camera are electrically connected to the controller through a data line;
通过物体在第一摄像头和第二摄像头上的成像的不同画面位置进行视差比对,以得到第一摄像头和第二摄像头的中心位置与物体之间的距离;Parallax comparison is performed by different image positions of the object on the first camera and the second camera to obtain the distance between the center position of the first camera and the second camera and the object;
双目立体机器视觉传感器以每秒若干帧的速度不断对所监测区域进行拍照,以获取物体在监测区域的运动状态,并且自动门根据物体的运动状态判断是否开门。The binocular stereo machine vision sensor continuously takes pictures of the monitored area at a rate of several frames per second to obtain the motion status of objects in the monitored area, and the automatic door judges whether to open the door according to the motion status of the object.
作为上述技术方案的进一步优选的技术方案,第一摄像头和第二摄像头按照相同方向间隔预设的距离进行固定摆放;第一摄像头和第二摄像头之间预设的距离根据双目立体机器视觉传感器的监测区域进行设置;双目立体机器视觉传感器按照标定方法进行相机标定。As a further preferred technical solution of the above technical solution, the first camera and the second camera are fixedly placed at a preset distance in the same direction; the preset distance between the first camera and the second camera is based on binocular stereoscopic machine vision The monitoring area of the sensor is set; the binocular stereo machine vision sensor is calibrated according to the calibration method.
作为上述技术方案的进一步优选的技术方案,相机标定后,双目立体机器视觉传感器获得同一物体在第一摄像头和第二摄像头分别成像后的画面位置;由于第一摄像头和第二摄像头之间预设的距离,同一物体在第一摄像头和第二摄像头分别成像后的画面位置产生一定的视差;双目立体机器视觉传感器根据摄像头成像的像素位置进行视差比对,将标定的视差与距离进行匹配,以得到第一摄像头和第二摄像头的中心位置与物体之间的距离,并且标定为传感距离。As a further preferred technical solution of the above technical solution, after the camera is calibrated, the binocular stereo machine vision sensor obtains the picture position of the same object after the first camera and the second camera are imaged respectively; The same object has a certain parallax in the image position of the first camera and the second camera respectively; the binocular stereo machine vision sensor performs a parallax comparison according to the pixel position of the camera imaging, and matches the calibrated parallax with the distance , to obtain the distance between the center position of the first camera and the second camera and the object, and calibrate it as the sensing distance.
作为上述技术方案的进一步优选的技术方案,双目立体机器视觉传感器在t1时刻检测到传感距离为s1,并且在成像上的横坐标为x1;双目立体机器视觉传感器在t2时刻检测到传感距离为s2,并且在成像上的横坐标为x2;判断x1和x2之间的偏移量是否达到设定的阈值X,以判断物体的运动状态;根据获取的数据并且通过公式v=(s2-s1)/(t2-t1)获得物体的运动速度v,以判断物体是继续运动还是静止(当人静止的时候,s2=s1,速度v=0,计算物体将到达门的时间时会因为分母为0而报错,从而达到不开门的目的,此外,由于当物体靠近门时,s2<s1,则v<0,若v>0,则是因s2>s1,即物体正在远离门,也不开门);根据运动速度v和传感距离s2获得物体达到自动门的时间t;根据预设的时间量Δt设置自动门的开门时间t-Δt和关门时间t+Δt;当有多个物体运动时,则通过多物体累计最早开门时间和最晚关门时间来计算开门时间和关门时间(多物体可以通过多线程编程解决)。As a further preferred technical solution of the above technical solution, the binocular stereo machine vision sensor detects that the sensing distance is s1 at the moment t1, and the abscissa on the imaging is x1; The sensing distance is s2, and the abscissa on the imaging is x2; judge whether the offset between x1 and x2 reaches the set threshold X to judge the motion state of the object; according to the acquired data and through the formula v=( s2-s1)/(t2-t1) to obtain the moving speed v of the object to judge whether the object continues to move or remain still (when the person is still, s2=s1, speed v=0, when calculating the time when the object will reach the door, it will Because the denominator is 0, an error is reported, so as to achieve the goal of not opening the door. In addition, because when the object is close to the door, s2<s1, then v<0, if v>0, it is because s2>s1, that is, the object is moving away from the door. do not open the door); obtain the time t when the object reaches the automatic door according to the motion speed v and the sensing distance s2; set the opening time t-Δt and closing time t+Δt of the automatic door according to the preset time amount Δt; when there are multiple When the object is moving, the door opening time and closing time are calculated by accumulating the earliest opening time and the latest closing time of multiple objects (multiple objects can be solved by multi-threaded programming).
作为上述技术方案的进一步优选的技术方案,如果x1和x2之间的偏移量达到设定的阈值X,则判断物体为平行于自动门进行运动,并且不进行开门动作;As a further preferred technical solution of the above technical solution, if the offset between x1 and x2 reaches the set threshold X, it is judged that the object is moving parallel to the automatic door, and the door opening action is not performed;
如果x1和x2之间的偏移量没有达到设定的阈值X,则判断物体向自动门方向进行前进运动(s2<s1)或后退运动(s2>s1)或静止(s2=s1)。If the offset between x1 and x2 does not reach the set threshold X, it is judged that the object is moving forward (s2<s1) or moving backward (s2>s1) or stationary (s2=s1) towards the automatic door.
附图说明Description of drawings
图1是本发明的自动门立体机器视觉传感器及其传感方法的流程图。Fig. 1 is a flow chart of the automatic door stereo machine vision sensor and its sensing method of the present invention.
图2是本发明的自动门立体机器视觉传感器及其传感方法的物体移动示意图。Fig. 2 is a schematic diagram of object movement of the automatic door stereo machine vision sensor and its sensing method of the present invention.
具体实施方式Detailed ways
以下描述用于揭露本发明以使本领域技术人员能够实现本发明。以下描述中的优选实施例只作为举例,本领域技术人员可以想到其他显而易见的变型。在以下描述中界定的本发明的基本原理可以应用于其他实施方案、变形方案、改进方案、等同方案以及没有背离本发明的精神和范围的其他技术方案。The following description serves to disclose the present invention to enable those skilled in the art to carry out the present invention. The preferred embodiments described below are only examples, and those skilled in the art can devise other obvious variations. The basic principles of the present invention defined in the following description can be applied to other embodiments, variations, improvements, equivalents and other technical solutions without departing from the spirit and scope of the present invention.
参见附图的图1,图1是本发明的自动门立体机器视觉传感器及其传感方法的流程图,图2是本发明的自动门立体机器视觉传感器及其传感方法的物体移动示意图。Referring to Figure 1 of the accompanying drawings, Figure 1 is a flowchart of the automatic door stereo machine vision sensor and its sensing method of the present invention, and Figure 2 is a schematic diagram of object movement of the automatic door stereo machine vision sensor and its sensing method of the present invention.
在本发明的优选实施例中,本领域技术人员应注意,本发明所涉及的多线程编程、相机标定和摄像头等可被视为现有技术。In the preferred embodiment of the present invention, those skilled in the art should note that the multi-thread programming, camera calibration and camera involved in the present invention can be regarded as prior art.
优选实施例。preferred embodiment.
本实用新型公开了一种自动门立体机器视觉传感器的传感方法,用于检测物体(优选为人体)的运动状态从而自动门判断是否开门,包括以下步骤:The utility model discloses a sensing method of a three-dimensional machine vision sensor for an automatic door, which is used for detecting the motion state of an object (preferably a human body) so that the automatic door can judge whether to open the door. The method comprises the following steps:
步骤S1:将包括第一摄像头和第二摄像头的双目立体机器视觉传感器安装于自动门,并且第一摄像头和第二摄像头均通过数据线与控制器电性连接;Step S1: installing a binocular stereo machine vision sensor including a first camera and a second camera on the automatic door, and both the first camera and the second camera are electrically connected to the controller through a data line;
步骤S2:通过物体在第一摄像头和第二摄像头上的成像的不同画面位置进行视差比对,以得到第一摄像头和第二摄像头的中心位置与物体之间的距离;Step S2: Parallax comparison is performed at different image positions of the object on the first camera and the second camera to obtain the distance between the center positions of the first camera and the second camera and the object;
步骤S3:双目立体机器视觉传感器以每秒若干帧的速度不断对所监测区域进行拍照,以获取物体在监测区域的运动状态,并且自动门根据物体的运动状态判断是否开门。Step S3: The binocular stereo machine vision sensor continuously takes pictures of the monitored area at a rate of several frames per second to obtain the motion state of the object in the monitored area, and the automatic door judges whether to open the door according to the motion state of the object.
具体的是,步骤S1具体实施为以下步骤:Specifically, step S1 is specifically implemented as the following steps:
步骤S1.1:第一摄像头和第二摄像头按照相同方向间隔预设的距离进行固定摆放;Step S1.1: The first camera and the second camera are fixedly placed at a preset distance in the same direction;
步骤S1.2:第一摄像头和第二摄像头之间预设的距离根据双目立体机器视觉传感器的监测区域进行设置;Step S1.2: The preset distance between the first camera and the second camera is set according to the monitoring area of the binocular stereo machine vision sensor;
步骤S1.3:双目立体机器视觉传感器按照标定方法进行相机标定。Step S1.3: The binocular stereo machine vision sensor performs camera calibration according to the calibration method.
更具体的是,步骤S2具体实施为以下步骤:More specifically, step S2 is specifically implemented as the following steps:
步骤S2.1:相机标定后,双目立体机器视觉传感器获得同一物体在第一摄像头和第二摄像头分别成像后的画面位置;Step S2.1: After the camera is calibrated, the binocular stereo machine vision sensor obtains the image position of the same object imaged by the first camera and the second camera respectively;
步骤S2.2:由于第一摄像头和第二摄像头之间预设的距离,同一物体在第一摄像头和第二摄像头分别成像后的画面位置产生一定的视差;Step S2.2: Due to the preset distance between the first camera and the second camera, a certain parallax is generated in the image position of the same object after the first camera and the second camera respectively;
步骤S2.3:双目立体机器视觉传感器根据摄像头成像的像素位置进行视差比对,将标定的视差与距离进行匹配,以得到第一摄像头和第二摄像头的中心位置与物体之间的距离,并且标定为传感距离。Step S2.3: The binocular stereo machine vision sensor performs parallax comparison according to the pixel position of the camera imaging, and matches the calibrated parallax with the distance to obtain the distance between the center position of the first camera and the second camera and the object, And calibrated as the sensing distance.
进一步的是,步骤S3具体实施为以下步骤:Further, step S3 is specifically implemented as the following steps:
步骤S3.1:双目立体机器视觉传感器在t1时刻检测到传感距离为s1,并且在成像上的横坐标为x1;Step S3.1: The binocular stereo machine vision sensor detects that the sensing distance is s1 at time t1, and the abscissa on the imaging is x1;
步骤S3.2:双目立体机器视觉传感器在t2时刻检测到传感距离为s2,并且在成像上的横坐标为x2;Step S3.2: The binocular stereo machine vision sensor detects that the sensing distance is s2 at time t2, and the abscissa on the imaging is x2;
步骤S3.3:判断x1和x2之间的偏移量是否达到设定的阈值X,以判断物体的运动状态;Step S3.3: judging whether the offset between x1 and x2 reaches the set threshold X, so as to judge the motion state of the object;
步骤S3.4:根据步骤S3.1和步骤S3.2获取的数据并且通过公式v=(s2-s1)/(t2-t1)获得物体的运动速度v,以判断物体是继续运动还是静止(当人静止的时候,s2=s1,速度v=0,计算物体将到达门的时间时会因为分母为0而报错,从而达到不开门的目的,此外,由于当物体靠近门时,s2<s1,则v<0,若v>0,则是因s2>s1,即物体正在远离门,也不开门);Step S3.4: According to the data obtained in step S3.1 and step S3.2 and by the formula v=(s2-s1)/(t2-t1), the moving speed v of the object is obtained to judge whether the object continues to move or remains still ( When the person is still, s2=s1, speed v=0, when calculating the time when the object will reach the door, an error will be reported because the denominator is 0, so as to achieve the purpose of not opening the door. In addition, because when the object is close to the door, s2<s1 , then v<0, if v>0, it is because s2>s1, that is, the object is moving away from the door and does not open the door);
步骤S3.5:根据运动速度v和传感距离s2获得物体达到自动门的时间t;Step S3.5: Obtain the time t when the object reaches the automatic door according to the moving speed v and the sensing distance s2;
步骤S3.6:根据预设的时间量Δt设置自动门的开门时间t-Δt和关门时间t+Δt;Step S3.6: Set the opening time t-Δt and closing time t+Δt of the automatic door according to the preset time amount Δt;
步骤S3.7:当有多个物体运动时,则通过多物体累计最早开门时间和最晚关门时间来计算开门时间和关门时间(多物体可以通过多线程编程解决),如果没有多个目标时,则控制器直接控制自动门进行开关门。Step S3.7: When there are multiple objects moving, calculate the opening time and closing time by accumulating the earliest opening time and the latest closing time of multiple objects (multiple objects can be solved by multi-threaded programming), if there are no multiple targets , the controller directly controls the automatic door to open and close the door.
更进一步的是,步骤S3.3具体实施为以下步骤:Furthermore, step S3.3 is specifically implemented as the following steps:
步骤S3.3.1:如果x1和x2之间的偏移量达到设定的阈值X,则判断物体为平行于自动门进行运动,并且不进行开门动作;Step S3.3.1: If the offset between x1 and x2 reaches the set threshold X, it is judged that the object is moving parallel to the automatic door, and the door opening action is not performed;
步骤S3.3.2:如果x1和x2之间的偏移量没有达到设定的阈值X,则判断物体向自动门方向进行前进运动(s2<s1)或后退运动(s2>s1)或静止(s2=s1),若物体为前进运动则执行步骤S3.4。Step S3.3.2: If the offset between x1 and x2 does not reach the set threshold X, it is judged that the object is moving forward (s2<s1) or moving backward (s2>s1) or stationary (s2) in the direction of the automatic door = s1), if the object is moving forward, execute step S3.4.
优选地,步骤S3.6具体实施为以下步骤:Preferably, step S3.6 is specifically implemented as the following steps:
步骤S3.6.1:开门时间为:t-Δt;Step S3.6.1: The door opening time is: t-Δt;
步骤S3.6.2:关门时间为:t+Δt。Step S3.6.2: The closing time is: t+Δt.
本发明还公开了一种自动门立体机器视觉传感器,安装于自动门,包括双目立体机器传感器,双目立体机器传感器包括第一摄像头和第二摄像头,其中:The invention also discloses a three-dimensional machine vision sensor for automatic doors, which is installed on the automatic door and includes a binocular three-dimensional machine sensor. The binocular three-dimensional machine sensor includes a first camera and a second camera, wherein:
将包括第一摄像头和第二摄像头的双目立体机器视觉传感器安装于自动门,并且第一摄像头和第二摄像头均通过数据线与控制器电性连接;A binocular stereo machine vision sensor including a first camera and a second camera is installed on the automatic door, and the first camera and the second camera are electrically connected to the controller through a data line;
通过物体在第一摄像头和第二摄像头上的成像的不同画面位置进行视差比对,以得到第一摄像头和第二摄像头的中心位置与物体之间的距离;Parallax comparison is performed by different image positions of the object on the first camera and the second camera to obtain the distance between the center position of the first camera and the second camera and the object;
双目立体机器视觉传感器以每秒若干帧的速度不断对所监测区域进行拍照,以获取物体在监测区域的运动状态,并且自动门根据物体的运动状态判断是否开门。The binocular stereo machine vision sensor continuously takes pictures of the monitored area at a rate of several frames per second to obtain the motion status of objects in the monitored area, and the automatic door judges whether to open the door according to the motion status of the object.
具体的是,第一摄像头和第二摄像头按照相同方向间隔预设的距离进行固定摆放;第一摄像头和第二摄像头之间预设的距离根据双目立体机器视觉传感器的监测区域进行设置;双目立体机器视觉传感器按照标定方法进行相机标定。Specifically, the first camera and the second camera are fixedly placed at a preset distance in the same direction; the preset distance between the first camera and the second camera is set according to the monitoring area of the binocular stereo machine vision sensor; The binocular stereo machine vision sensor performs camera calibration according to the calibration method.
更具体的是,相机标定后,双目立体机器视觉传感器获得同一物体在第一摄像头和第二摄像头分别成像后的画面位置;由于第一摄像头和第二摄像头之间预设的距离,同一物体在第一摄像头和第二摄像头分别成像后的画面位置产生一定的视差;双目立体机器视觉传感器根据摄像头成像的像素位置进行视差比对,将标定的视差与距离进行匹配,以得到第一摄像头和第二摄像头的中心位置与物体之间的距离,并且标定为传感距离。More specifically, after the camera is calibrated, the binocular stereo machine vision sensor obtains the picture position of the same object after the first camera and the second camera respectively; due to the preset distance between the first camera and the second camera, the same object A certain parallax is generated at the image position of the first camera and the second camera respectively; the binocular stereo machine vision sensor performs a parallax comparison according to the pixel position of the camera imaging, and matches the calibrated parallax with the distance to obtain the first camera and the distance between the center position of the second camera and the object, and calibrated as the sensing distance.
进一步的是,双目立体机器视觉传感器在t1时刻检测到传感距离为s1,并且在成像上的横坐标为x1;双目立体机器视觉传感器在t2时刻检测到传感距离为s2,并且在成像上的横坐标为x2;判断x1和x2之间的偏移量是否达到设定的阈值X,以判断物体的运动状态;根据获取的数据并且通过公式v=(s2-s1)/(t2-t1)获得物体的运动速度v,以判断物体是继续运动还是静止(当人静止的时候,s2=s1,速度v=0,计算物体将到达门的时间时会因为分母为0而报错,从而达到不开门的目的,此外,由于当物体靠近门时,s2<s1,则v<0,若v>0,则是因s2>s1,即物体正在远离门,也不开门);根据运动速度v和传感距离s2获得物体达到自动门的时间t;根据预设的时间量Δt设置自动门的开门时间t-Δt和关门时间t+Δt;当有多个物体运动时,则通过多物体累计最早开门时间和最晚关门时间来计算开门时间和关门时间(多物体可以通过多线程编程解决)。Further, the binocular stereo machine vision sensor detects that the sensing distance is s1 at time t1, and the abscissa on the imaging is x1; the binocular stereo machine vision sensor detects that the sensing distance is s2 at time t2, and at The abscissa on the imaging is x2; judge whether the offset between x1 and x2 reaches the set threshold X to judge the motion state of the object; according to the acquired data and through the formula v=(s2-s1)/(t2 -t1) Obtain the moving speed v of the object to judge whether the object continues to move or stay still (when the person is still, s2=s1, speed v=0, when calculating the time when the object will reach the door, an error will be reported because the denominator is 0, So as to achieve the purpose of not opening the door, in addition, because when the object is close to the door, s2<s1, then v<0, if v>0, it is because s2>s1, that is, the object is moving away from the door, and the door will not be opened); according to the movement The speed v and the sensing distance s2 obtain the time t when the object reaches the automatic door; set the opening time t-Δt and closing time t+Δt of the automatic door according to the preset time amount Δt; when there are multiple objects moving, pass multiple Objects accumulate the earliest opening time and the latest closing time to calculate the opening time and closing time (multiple objects can be solved by multi-threaded programming).
更进一步的是,如果x1和x2之间的偏移量达到设定的阈值X,则判断物体为平行于自动门进行运动,并且不进行开门动作;Furthermore, if the offset between x1 and x2 reaches the set threshold X, it is judged that the object is moving parallel to the automatic door, and the door opening action is not performed;
如果x1和x2之间的偏移量没有达到设定的阈值X,则判断物体向自动门方向进行前进运动(s2<s1)或后退运动(s2>s1)或静止(s2=s1)。If the offset between x1 and x2 does not reach the set threshold X, it is judged that the object is moving forward (s2<s1) or moving backward (s2>s1) or stationary (s2=s1) towards the automatic door.
优选地,本发明的自动门立体机器视觉传感器还可以进行人脸识别,根据识别结果再开门;同时因为多目标检测,传感器能够进行人流量的检测;使安防考勤数字化、一体化,减少不必要的人力、物力和财力,同时也提高了统一管理的效率。Preferably, the automatic door stereo machine vision sensor of the present invention can also perform face recognition, and then open the door according to the recognition result; at the same time, because of multi-target detection, the sensor can detect the flow of people; it makes security and attendance digital and integrated, reducing unnecessary Human, material and financial resources, but also improve the efficiency of unified management.
值得一提的是,本发明专利申请涉及的多线程编程、相机标定和摄像头等技术特征应被视为现有技术,这些技术特征的具体结构、工作原理以及可能涉及到的控制方式、空间布置方式采用本领域的常规选择即可,不应被视为本发明专利的发明点所在,本发明专利不做进一步具体展开详述。It is worth mentioning that the technical features such as multi-threaded programming, camera calibration and camera involved in the patent application of the present invention should be regarded as prior art. The method can be conventionally selected in the field, and should not be regarded as the invention point of the patent of the present invention, and the patent of the present invention will not be further elaborated in detail.
对于本领域的技术人员而言,依然可以对前述各实施例所记载的技术方案进行修改,或对其中部分技术特征进行等同替换,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围。For those skilled in the art, it is still possible to modify the technical solutions described in the foregoing embodiments, or to perform equivalent replacements for some of the technical features. Any modifications made within the spirit and principles of the present invention, Equivalent replacements, improvements, etc., should all be included in the protection scope of the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011159434.8A CN112360285B (en) | 2020-10-27 | 2020-10-27 | Automatic door stereoscopic machine vision sensor and sensing method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011159434.8A CN112360285B (en) | 2020-10-27 | 2020-10-27 | Automatic door stereoscopic machine vision sensor and sensing method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112360285A CN112360285A (en) | 2021-02-12 |
CN112360285B true CN112360285B (en) | 2023-07-11 |
Family
ID=74510571
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011159434.8A Active CN112360285B (en) | 2020-10-27 | 2020-10-27 | Automatic door stereoscopic machine vision sensor and sensing method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112360285B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101180444A (en) * | 2005-04-19 | 2008-05-14 | 塞德斯股份公司 | Device for controlling a driven moving element, for example, a door |
CN204552434U (en) * | 2015-01-21 | 2015-08-12 | 安徽工程大学 | A kind of automatic door unit |
CN108198280A (en) * | 2017-12-11 | 2018-06-22 | 浙江捷尚人工智能研究发展有限公司 | Door control method, apparatus and system based on camera |
CN207776669U (en) * | 2017-05-27 | 2018-08-28 | 江苏建筑职业技术学院 | A kind of sliding door and backup unit |
CN109754415A (en) * | 2017-11-02 | 2019-05-14 | 郭宇铮 | A kind of vehicle-mounted panoramic solid sensory perceptual system based on multiple groups binocular vision |
WO2019162447A1 (en) * | 2018-02-23 | 2019-08-29 | Marantec Antriebs- Und Steuerungstechnik Gmbh & Co. Kg | Method for operating a door system, and door system |
CN110503760A (en) * | 2019-08-27 | 2019-11-26 | 海信集团有限公司 | Access control method and access control system |
CN209687184U (en) * | 2018-12-21 | 2019-11-26 | 信利光电股份有限公司 | A kind of automatic door unit |
-
2020
- 2020-10-27 CN CN202011159434.8A patent/CN112360285B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101180444A (en) * | 2005-04-19 | 2008-05-14 | 塞德斯股份公司 | Device for controlling a driven moving element, for example, a door |
CN204552434U (en) * | 2015-01-21 | 2015-08-12 | 安徽工程大学 | A kind of automatic door unit |
CN207776669U (en) * | 2017-05-27 | 2018-08-28 | 江苏建筑职业技术学院 | A kind of sliding door and backup unit |
CN109754415A (en) * | 2017-11-02 | 2019-05-14 | 郭宇铮 | A kind of vehicle-mounted panoramic solid sensory perceptual system based on multiple groups binocular vision |
CN108198280A (en) * | 2017-12-11 | 2018-06-22 | 浙江捷尚人工智能研究发展有限公司 | Door control method, apparatus and system based on camera |
WO2019162447A1 (en) * | 2018-02-23 | 2019-08-29 | Marantec Antriebs- Und Steuerungstechnik Gmbh & Co. Kg | Method for operating a door system, and door system |
CN209687184U (en) * | 2018-12-21 | 2019-11-26 | 信利光电股份有限公司 | A kind of automatic door unit |
CN110503760A (en) * | 2019-08-27 | 2019-11-26 | 海信集团有限公司 | Access control method and access control system |
Also Published As
Publication number | Publication date |
---|---|
CN112360285A (en) | 2021-02-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI481980B (en) | Electronic apparatus and navigation method thereof | |
JP5385893B2 (en) | POSITIONING SYSTEM AND SENSOR DEVICE | |
US7636105B2 (en) | Method and apparatus for providing motion control signals between a fixed camera and a PTZ camera | |
US20160189501A1 (en) | Security monitoring system and corresponding alarm triggering method | |
US20140300746A1 (en) | Image analysis method, camera apparatus, control apparatus, control method and storage medium | |
CN110068818A (en) | The working method of traffic intersection vehicle and pedestrian detection is carried out by radar and image capture device | |
Liu et al. | On directional k-coverage analysis of randomly deployed camera sensor networks | |
CN106559647B (en) | Door opening and closing detection device and method, people flow detection system and vehicle | |
KR101125233B1 (en) | Fusion technology-based security method and security system thereof | |
WO2011063616A1 (en) | Method and apparatus for moving object autotracking | |
US11176685B2 (en) | Image collection control method and device, and vehicle chassis image obtaining system | |
JP2015069253A (en) | Individual condition determination device, individual condition determination method, and individual condition determination program | |
JP2001338302A (en) | Monitoring device | |
CN110807345B (en) | Building evacuation method and building evacuation system | |
CN112360285B (en) | Automatic door stereoscopic machine vision sensor and sensing method thereof | |
US20060139164A1 (en) | Composite intrusion detection sensor | |
JP2007034561A (en) | Self-propelled vacuum cleaner and its program | |
CN117115986A (en) | Photovoltaic intelligent induction alarm device | |
JP6903955B2 (en) | Moving object state quantity estimation device and program | |
JP4002365B2 (en) | Combined monitoring device | |
JP6866621B2 (en) | Moving object state quantity estimation device and program | |
JP7527482B2 (en) | OBJECT DETECTION DEVICE AND OBJECT DETECTION METHOD | |
JP2006208626A5 (en) | ||
JP2007334515A (en) | Crime prevention device | |
KR101699821B1 (en) | Signal Transfering Method of Wireless Motion Sensor for Reducing Battery Consume and Method thereof |
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 |