[go: up one dir, main page]

CN116358856A - Buckle detection method, device, equipment and storage medium - Google Patents

Buckle detection method, device, equipment and storage medium Download PDF

Info

Publication number
CN116358856A
CN116358856A CN202310342350.5A CN202310342350A CN116358856A CN 116358856 A CN116358856 A CN 116358856A CN 202310342350 A CN202310342350 A CN 202310342350A CN 116358856 A CN116358856 A CN 116358856A
Authority
CN
China
Prior art keywords
buckle
detection
installation
template
virtual
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.)
Granted
Application number
CN202310342350.5A
Other languages
Chinese (zh)
Other versions
CN116358856B (en
Inventor
曲佳惠
熊铁锤
许平振
罗民宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongfeng Nissan Passenger Vehicle Co
Original Assignee
Dongfeng Nissan Passenger Vehicle Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongfeng Nissan Passenger Vehicle Co filed Critical Dongfeng Nissan Passenger Vehicle Co
Priority to CN202310342350.5A priority Critical patent/CN116358856B/en
Publication of CN116358856A publication Critical patent/CN116358856A/en
Application granted granted Critical
Publication of CN116358856B publication Critical patent/CN116358856B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M13/00Testing of machine parts
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M17/00Testing of vehicles
    • G01M17/007Wheeled or endless-tracked vehicles
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Length Measuring Devices With Unspecified Measuring Means (AREA)

Abstract

The invention belongs to the technical field of vehicle design, and discloses a buckle detection method, a buckle detection device, buckle detection equipment and a storage medium. The method comprises the steps of constructing a detection template corresponding to a virtual buckle to be detected; moving the detection template to enable the pose of the detection template to be matched with the virtual buckle to be detected; identifying a buckle mounting plate corresponding to the virtual buckle to be detected based on the detection template; establishing an installation coordinate system on the buckle installation plate; and carrying out installation normalization detection on the virtual buckle to be detected based on the installation coordinate system and the detection template. Because the detection template corresponding to the virtual buckle to be detected can be moved, the detection template is matched with the virtual buckle to be detected, the buckle installation plate can be correctly identified, parameters such as the size and the thickness of the buckle installation plate can be correctly measured according to the installation coordinate system established on the buckle installation plate and the detection template, and whether other parts interfering with the buckle exist or not is determined, so that whether the automatic detection buckle accords with installation standardization or not is realized.

Description

卡扣检测方法、装置、设备及存储介质Buckle detection method, device, equipment and storage medium

技术领域technical field

本发明涉及车辆设计技术领域,尤其涉及一种卡扣检测方法、装置、设备及存储介质。The present invention relates to the technical field of vehicle design, in particular to a buckle detection method, device, equipment and storage medium.

背景技术Background technique

为了避免在实际投产时车辆的各项硬件不匹配,在车辆投产之前,一般会为车辆构建对应的车辆设计模型,模拟各项硬件的实际效果,而车辆中一般会设置大量的卡扣,为了避免在实际车辆装配过程中出现安装困难或卡扣过松的情况,需要对车辆设计模型中用到的卡扣参数进行规范性检测。In order to avoid the mismatch of various hardware of the vehicle when it is actually put into production, before the vehicle is put into production, a corresponding vehicle design model is generally built for the vehicle to simulate the actual effect of various hardware, and a large number of buckles are generally set in the vehicle. To avoid installation difficulties or too loose buckles during the actual vehicle assembly process, it is necessary to conduct normative testing on the buckle parameters used in the vehicle design model.

目前对卡扣进行规范性检测一般是由采用人工确认的方式进行检测,而车辆中卡扣数量较多,人工确认人力成本高、时效低,且容易出现漏检等现象。At present, the standard detection of buckles is generally carried out by manual confirmation. However, there are a large number of buckles in the vehicle, and manual confirmation has high labor costs, low timeliness, and is prone to missed inspections.

上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。The above content is only used to assist in understanding the technical solution of the present invention, and does not mean that the above content is admitted as prior art.

发明内容Contents of the invention

本发明的主要目的在于提供一种卡扣检测方法、装置、设备及存储介质,旨在解决现有技术无法自动对卡扣进行规范性检测的技术问题。The main purpose of the present invention is to provide a buckle detection method, device, equipment and storage medium, aiming to solve the technical problem that the prior art cannot automatically perform standardized detection of buckle.

为实现上述目的,本发明提供了一种卡扣检测方法,所述方法包括以下步骤:In order to achieve the above object, the present invention provides a buckle detection method, the method comprising the following steps:

构建待检测虚拟卡扣对应的检测模板;Build a detection template corresponding to the virtual buckle to be detected;

移动所述检测模板,以使所述检测模板与所述待检测虚拟卡扣匹配;moving the detection template so that the detection template matches the virtual buckle to be detected;

基于所述检测模板识别所述待检测虚拟卡扣对应的卡扣安装板件;Identifying the buckle installation plate corresponding to the virtual buckle to be detected based on the detection template;

在所述卡扣安装板件上建立安装坐标系;Establishing an installation coordinate system on the buckle installation plate;

基于所述安装坐标系及所述检测模板对所述待检测虚拟卡扣进行安装规范性检测。Based on the installation coordinate system and the detection template, an installation normative detection is performed on the virtual buckle to be detected.

可选的,所述构建待检测虚拟卡扣对应的检测模板的步骤之前,还包括:Optionally, before the step of constructing the detection template corresponding to the virtual buckle to be detected, it also includes:

在接收到检索关键字时,将所述检索关键字与配置表中的关键词进行匹配,确定待检测虚拟卡扣类型;When receiving the search keyword, match the search keyword with the keyword in the configuration table to determine the type of virtual buckle to be detected;

相应的,所述构建待检测虚拟卡扣对应的检测模板的步骤,包括:Correspondingly, the step of constructing a detection template corresponding to the virtual buckle to be detected includes:

获取所述待检测虚拟卡扣对应的卡扣类型;Obtain the buckle type corresponding to the virtual buckle to be detected;

根据所述卡扣类型查找所述待检测虚拟卡扣对应的检测模板。Searching for a detection template corresponding to the virtual buckle to be detected according to the buckle type.

可选的,所述移动所述检测模板,以使所述检测模板与所述待检测虚拟卡扣匹配的步骤,包括:Optionally, the step of moving the detection template so that the detection template matches the virtual buckle to be detected includes:

模拟移动所述检测模板,并通过局部一致性配准算法进行模型配准;Simulating moving the detection template, and performing model registration through a local consistency registration algorithm;

在通过所述局部一致性配准算法配准成功时,记录所述检测模板当前的模板位姿信息;When the registration is successful through the local consistency registration algorithm, record the current template pose information of the detection template;

根据所述模板位姿信息移动所述检测模板,以使所述检测模板与所述待检测虚拟卡扣匹配。The detection template is moved according to the template pose information, so that the detection template is matched with the virtual buckle to be detected.

可选的,所述模拟移动所述检测模板,并通过局部一致性配准算法进行模型配准的步骤之后,还包括:Optionally, after the step of simulating moving the detection template and performing model registration through a local consistency registration algorithm, it also includes:

若通过所述局部一致性配准算法配准失败,则通过局部相似性配准算法进行模型配准;If the registration fails through the local consistency registration algorithm, then perform model registration through the local similarity registration algorithm;

在通过所述局部相似性配准算法配准成功时,记录所述检测模板当前的模板位姿信息;When the registration is successful through the local similarity registration algorithm, record the current template pose information of the detection template;

根据所述模板位姿信息移动所述检测模板,以使所述检测模板与所述待检测虚拟卡扣匹配。The detection template is moved according to the template pose information, so that the detection template is matched with the virtual buckle to be detected.

可选的,所述基于所述检测模板识别所述待检测虚拟卡扣对应的卡扣安装板件的步骤,包括:Optionally, the step of identifying the buckle installation plate corresponding to the virtual buckle to be detected based on the detection template includes:

根据所述检测模板确定所述待检测虚拟卡扣对应的最小包容盒;determining the minimum containment box corresponding to the virtual buckle to be detected according to the detection template;

将所述最小包容盒与装配体中其他零件的最小包容盒进行匹配,确定疑似安装板件;Match the minimum containment box with the minimum containment boxes of other parts in the assembly to determine the suspected mounting plate;

计算各疑似安装板件与所述检测模板的模板端部之间的最小距离;Calculating the minimum distance between each suspected mounting plate and the template end of the detection template;

根据所述最小距离在所述疑似安装板件中选取卡扣安装板件。According to the minimum distance, a buckle installation board is selected from the suspected installation boards.

可选的,所述在所述卡扣安装板件上建立安装坐标系的步骤,包括:Optionally, the step of establishing an installation coordinate system on the snap-fit installation plate includes:

获取所述卡扣安装板件对应的安装孔点云,并通过所述安装孔点云拟合安装平面;Obtain the point cloud of the installation hole corresponding to the buckle installation plate, and fit the installation plane through the point cloud of the installation hole;

获取所述安装平面对应的法向量,并根据所述安装孔点云确定近似中心点;Obtaining the normal vector corresponding to the installation plane, and determining an approximate center point according to the point cloud of the installation hole;

根据所述近似中心点确定所述安装孔点云中的干扰点,并将所述干扰点从所述安装孔点云中移除;determining an interference point in the installation hole point cloud according to the approximate center point, and removing the interference point from the installation hole point cloud;

根据移除干扰点后的安装孔点云计算近似中心点,获得参考中心点;Calculate the approximate center point according to the installation hole point cloud after removing the interference point, and obtain the reference center point;

基于所述参考中心点及所述法向量构建安装坐标系。An installation coordinate system is constructed based on the reference center point and the normal vector.

可选的,所述基于所述安装坐标系及所述检测模板对所述待检测虚拟卡扣进行安装规范性检测的步骤,包括:Optionally, the step of performing installation normative inspection on the virtual buckle to be inspected based on the installation coordinate system and the inspection template includes:

基于所述安装坐标系确定所述卡扣安装板件对应的板件厚度及安装孔尺寸;Determining the thickness of the plate corresponding to the buckle mounting plate and the size of the mounting hole based on the installation coordinate system;

确定与所述检测模板相干涉的目标零件;determining a target part that interferes with the detection template;

逐个计算所述目标零件与所述检测模板中端部预设特征之间的最小距离;Calculating the minimum distance between the target part and the end preset feature in the detection template one by one;

根据所述板件厚度、所述安装孔尺寸及所述最小距离确定所述待检测虚拟卡扣的安装规范性检测结果。The installation normative detection result of the virtual buckle to be detected is determined according to the thickness of the board, the size of the installation hole and the minimum distance.

此外,为实现上述目的,本发明还提出一种卡扣检测装置,所述卡扣检测装置包括以下模块:In addition, in order to achieve the above purpose, the present invention also proposes a buckle detection device, which includes the following modules:

模板构建模块,用于构建待检测虚拟卡扣对应的检测模板;Template construction module, used to construct the detection template corresponding to the virtual buckle to be detected;

模板匹配模块,用于移动所述检测模板,以使所述检测模板与所述待检测虚拟卡扣匹配;a template matching module, configured to move the detection template, so that the detection template matches the virtual buckle to be detected;

板件识别模块,用于基于所述检测模板识别所述待检测虚拟卡扣对应的卡扣安装板件;A plate identification module, configured to identify the buckle installation plate corresponding to the virtual buckle to be detected based on the detection template;

坐标构建模块,用于在所述卡扣安装板件上建立安装坐标系;A coordinate building module, used to establish an installation coordinate system on the buckle installation plate;

卡扣检测模块,用于基于所述安装坐标系及所述检测模板对所述待检测虚拟卡扣进行安装规范性检测。A buckle detection module, configured to perform installation normative detection on the virtual buckle to be detected based on the installation coordinate system and the detection template.

此外,为实现上述目的,本发明还提出一种卡扣检测设备,所述卡扣检测设备包括:处理器、存储器及存储在所述存储器上并可在所述处理器上运行的卡扣检测程序,所述卡扣检测程序被处理器执行时实现如上所述的卡扣检测方法的步骤。In addition, in order to achieve the above object, the present invention also proposes a buckle detection device, which includes: a processor, a memory, and a buckle detection device stored in the memory and operable on the processor. A program, when the buckle detection program is executed by the processor, the steps of the above buckle detection method are implemented.

此外,为实现上述目的,本发明还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有卡扣检测程序,所述卡扣检测程序执行时实现如上所述的卡扣检测方法的步骤。In addition, in order to achieve the above object, the present invention also proposes a computer-readable storage medium, the computer-readable storage medium stores a buckle detection program, and when the buckle detection program is executed, the above-mentioned buckle detection is realized. method steps.

本发明通过构建待检测虚拟卡扣对应的检测模板;移动检测模板,以使检测模板与待检测虚拟卡扣匹配;基于检测模板识别待检测虚拟卡扣对应的卡扣安装板件;在卡扣安装板件上建立安装坐标系;基于安装坐标系及检测模板对待检测虚拟卡扣进行安装规范性检测。由于会移动待检测虚拟卡扣对应的检测模板,使得检测模板与待检测虚拟卡扣匹配,保证可正确识别到卡扣安装板件,再根据在卡扣安装板件上建立安装坐标系及检测模板即可正确测得卡扣安装板件的尺寸、厚度等参数,以及确定是否存在于卡扣干涉的其他零件,从而实现了自动检测卡扣是否符合安装规范性。The present invention constructs the detection template corresponding to the virtual buckle to be detected; moves the detection template so that the detection template matches the virtual buckle to be detected; identifies the buckle installation plate corresponding to the virtual buckle to be detected based on the detection template; The installation coordinate system is established on the installation board; based on the installation coordinate system and the detection template, the installation normative inspection is carried out for the virtual buckle to be detected. Since the detection template corresponding to the virtual buckle to be detected will be moved, the detection template will match the virtual buckle to be detected to ensure that the buckle installation plate can be correctly identified, and then according to the installation coordinate system established on the buckle installation plate and the detection The template can correctly measure the size, thickness and other parameters of the buckle installation plate, and determine whether there are other parts that interfere with the buckle, so as to realize the automatic detection of whether the buckle conforms to the installation specification.

附图说明Description of drawings

图1是本发明实施例方案涉及的硬件运行环境的电子设备的结构示意图;Fig. 1 is a schematic structural diagram of an electronic device in a hardware operating environment involved in the solution of an embodiment of the present invention;

图2为本发明卡扣检测方法第一实施例的流程示意图;Fig. 2 is a schematic flow chart of the first embodiment of the buckle detection method of the present invention;

图3为本发明一实施例的检测模板结构示意图;3 is a schematic structural diagram of a detection template according to an embodiment of the present invention;

图4为本发明卡扣检测方法第二实施例的流程示意图;Fig. 4 is a schematic flow chart of the second embodiment of the buckle detection method of the present invention;

图5为本发明一实施例的局部特征示意图;Fig. 5 is a schematic diagram of local features of an embodiment of the present invention;

图6为本发明一实施例的三角细分示意图;Fig. 6 is a schematic diagram of triangular subdivision according to an embodiment of the present invention;

图7为本发明一实施例的角特征示意图;Fig. 7 is a schematic diagram of corner features according to an embodiment of the present invention;

图8为本发明卡扣检测方法第三实施例的流程示意图;Fig. 8 is a schematic flow chart of the third embodiment of the buckle detection method of the present invention;

图9为本发明一实施例的安装孔点云示意图;Fig. 9 is a schematic diagram of a point cloud of an installation hole according to an embodiment of the present invention;

图10为本发明一实施例的坐标系构建点示意图;Fig. 10 is a schematic diagram of a coordinate system construction point according to an embodiment of the present invention;

图11为本发明卡扣检测装置第一实施例的结构框图。Fig. 11 is a structural block diagram of the first embodiment of the buckle detection device of the present invention.

本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose of the present invention, functional characteristics and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings.

具体实施方式Detailed ways

应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

参照图1,图1为本发明实施例方案涉及的硬件运行环境的卡扣检测设备结构示意图。Referring to FIG. 1 , FIG. 1 is a schematic structural diagram of a buckle detection device in a hardware operating environment involved in the solution of an embodiment of the present invention.

如图1所示,该电子设备可以包括:处理器1001,例如中央处理器(CentralProcessing Unit,CPU),通信总线1002、用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如无线保真(Wireless-Fidelity,WI-FI)接口)。存储器1005可以是高速的随机存取存储器(RandomAccess Memory,RAM),也可以是稳定的非易失性存储器(Non-Volatile Memory,NVM),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1 , the electronic device may include: a processor 1001 , such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002 , a user interface 1003 , a network interface 1004 , and a memory 1005 . Wherein, the communication bus 1002 is used to realize connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wireless-Fidelity (Wireless-Fidelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001 .

本领域技术人员可以理解,图1中示出的结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 1 does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine some components, or arrange different components.

如图1所示,作为一种存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及卡扣检测程序。As shown in FIG. 1 , the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a buckle detection program.

在图1所示的电子设备中,网络接口1004主要用于与网络服务器进行数据通信;用户接口1003主要用于与用户进行数据交互;本发明电子设备中的处理器1001、存储器1005可以设置在卡扣检测设备中,所述电子设备通过处理器1001调用存储器1005中存储的卡扣检测程序,并执行本发明实施例提供的卡扣检测方法。In the electronic device shown in Figure 1, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the electronic device of the present invention can be set in In the buckle detection device, the electronic device calls the buckle detection program stored in the memory 1005 through the processor 1001, and executes the buckle detection method provided by the embodiment of the present invention.

本发明实施例提供了一种卡扣检测方法,参照图2,图2为本发明一种卡扣检测方法第一实施例的流程示意图。An embodiment of the present invention provides a buckle detection method. Referring to FIG. 2 , FIG. 2 is a schematic flowchart of a first embodiment of a buckle detection method according to the present invention.

本实施例中,所述卡扣检测方法包括以下步骤:In this embodiment, the buckle detection method includes the following steps:

步骤S10:构建待检测虚拟卡扣对应的检测模板。Step S10: Construct a detection template corresponding to the virtual buckle to be detected.

需要说明的是,本实施例的执行主体可以是所述卡扣检测设备,所述卡扣检测设备可以是可进行车辆设计模型构建及检测的设备,如个人电脑、平板电脑或服务器等电子设备,也可以是其他可实现相同或相似功能的其他设备,本实施例对此不加以限制,在本实施例及下述各实施例中,以卡扣检测设备为例对本申请的卡扣检测方法进行说明。It should be noted that the execution subject of this embodiment may be the buckle detection device, and the buckle detection device may be a device capable of building and testing vehicle design models, such as electronic devices such as personal computers, tablet computers, or servers. , it can also be other devices that can realize the same or similar functions, which is not limited in this embodiment. In this embodiment and the following embodiments, the buckle detection method of the present application is described by taking the buckle detection device as an example. Be explained.

需要说明的是,待检测虚拟卡扣可以是在车辆设计模型中被指定需要进行规范性检测的虚拟卡扣,待检测虚拟卡扣可以由卡扣检测设备的管理人员根据实际需要进行指定。检测模板可以包括配准体及测量体,配准体用于与待检测卡扣进行配准,而测量体中标记有对卡扣进行检测时辅助用的预设特征,如孔部预设特征、端部预设特征等,在配准过程中,若对配准体进行旋转、平移时,则测量体也会跟随配准体进行旋转及平移等操作。It should be noted that the virtual buckle to be detected may be a virtual buckle designated in the vehicle design model for normative detection, and the virtual buckle to be detected may be designated by the management personnel of the buckle detection device according to actual needs. The detection template can include a registration body and a measurement body. The registration body is used for registration with the buckle to be detected, and the measurement body is marked with preset features for the detection of the buckle, such as the preset features of the hole , end preset features, etc. During the registration process, if the registration body is rotated or translated, the measuring body will also follow the registration body to perform operations such as rotation and translation.

为了便于理解,现结合图3进行说明,图3为本实施例的检测模板结构示意图,如图3所示,检测模板中包含配准体以及测量体,测量体上标注有孔部预设特征、端部位置以及端部预设特征。In order to facilitate understanding, it will now be described in conjunction with Figure 3. Figure 3 is a schematic structural diagram of the detection template of this embodiment. As shown in Figure 3, the detection template includes a registration body and a measurement body, and the measurement body is marked with preset features of the hole. , End Position, and End Preset Features.

进一步的,为了便于用户选取待检测虚拟卡扣,本实施例所述步骤S10之前,还可以包括:Further, in order to facilitate the user to select the virtual buckle to be detected, before step S10 described in this embodiment, it may also include:

在接收到检索关键字时,将所述检索关键字与配置表中的关键词进行匹配,确定待检测虚拟卡扣;When receiving the search keyword, match the search keyword with the keyword in the configuration table to determine the virtual buckle to be detected;

相应的,所述步骤S10,可以包括:Correspondingly, the step S10 may include:

获取所述待检测虚拟卡扣对应的卡扣类型;Obtain the buckle type corresponding to the virtual buckle to be detected;

根据所述卡扣类型查找所述待检测虚拟卡扣对应的检测模板。Searching for a detection template corresponding to the virtual buckle to be detected according to the buckle type.

需要说明的是,一辆车在进行设计时,会使用多种卡扣,且可能会使用多种不同类型的卡扣,而为了对使用的卡扣进行区分,可以采用“位置+零件种类+类型+编号”的方式区分车辆设计模型中所使用的多个卡扣,使用户可以通过输入检索关键字选取待检测虚拟卡扣,则此时卡扣检测设备在接收到检索关键字时,会将检索关键字与配置表中的关键词进行匹配,确定待检测虚拟卡扣。其中,配置表中可以存储有车辆设计模型中各卡扣的位置与卡扣唯一标识之间的关联关系,关键词可以是各卡扣的唯一标识。It should be noted that when a car is designed, it will use a variety of buckles, and may use a variety of different types of buckles. In order to distinguish the buckles used, "position + part type + "type + number" to distinguish multiple buckles used in the vehicle design model, so that users can select virtual buckles to be detected by inputting search keywords. At this time, when the buckle detection device receives the search keywords, it will Match the search keyword with the keyword in the configuration table to determine the virtual buckle to be detected. Wherein, the configuration table may store the relationship between the position of each buckle in the vehicle design model and the unique identification of the buckle, and the keyword may be the unique identification of each buckle.

例如:假设车辆设计模型中的卡扣存在4个,其对应的卡扣唯一标识分别为“head-Buckle-type1-1”、“head-Buckle-type2-2”、“body-Buckle-type1-1”、“body-Buckle-type1-2”,其中,“head”表示该卡扣用于车头部分,“body”,表示该卡扣用于车身部分,“Buckle”表示零件种类为卡扣,“type1”和“type2”表示卡扣类型,此时若用户输入的检索关键字为“head-Buckle”,则此时卡扣唯一标识分别为“head-Buckle-type1-1”、“head-Buckle-type2-2”的两个卡扣会被作为待检测虚拟卡扣;而若是用户输入的检索关键字为“type1”,则卡扣唯一标识分别为“head-Buckle-type1-1”和“body-Buckle-type1-1”的两个卡扣会被作为待检测虚拟卡扣。For example: Suppose there are four buckles in the vehicle design model, and the unique identifiers of the corresponding buckles are "head-Buckle-type1-1", "head-Buckle-type2-2", "body-Buckle-type1- 1", "body-Buckle-type1-2", where "head" indicates that the buckle is used for the front part of the car, "body" indicates that the buckle is used for the body part, and "Buckle" indicates that the part type is a buckle, "type1" and "type2" indicate the type of buckle. At this time, if the search keyword entered by the user is "head-Buckle", the unique identifier of the buckle is "head-Buckle-type1-1" and "head-Buckle" respectively. The two buckles of Buckle-type2-2" will be used as virtual buckles to be detected; and if the search keyword entered by the user is "type1", the unique identifiers of the buckles are "head-Buckle-type1-1" and The two buckles of "body-Buckle-type1-1" will be used as virtual buckles to be detected.

可以理解的是,由于车辆中可能设置大量的卡扣,针对每一个卡扣设置一个检测模板,工作量极大,且实际使用效果也较差,而车辆中其实是设置多种不同类型(不同尺寸、不同规格)的卡扣,同一类型的卡扣的卡扣参数其实是一致的,针对同一类型的卡扣其实可以采用同一检测模板进行检测,因此,可以预先根据卡扣类型设置对应的检测模板,以提高检测模板的重复利用率,此时,在需要检测时,根据待检测虚拟卡扣的卡扣类型查找对应的检测模板。It is understandable that since a large number of buckles may be installed in the vehicle, setting up a detection template for each buckle requires a huge amount of work, and the actual use effect is also poor, but the vehicle is actually equipped with many different types (different size, different specifications), the buckle parameters of the same type of buckle are actually the same, and the same detection template can be used for the detection of the same type of buckle. Therefore, the corresponding detection can be set in advance according to the buckle type Template to improve the reuse rate of the detection template. At this time, when detection is required, the corresponding detection template is searched according to the buckle type of the virtual buckle to be detected.

步骤S20:移动所述检测模板,以使所述检测模板与所述待检测虚拟卡扣匹配。Step S20: moving the detection template to match the detection template with the virtual buckle to be detected.

需要说明的是,移动检测模板,以使检测模板与待检测虚拟卡扣匹配可以是通过旋转、平移等操作移动检测模板中的配准体,从而令配准体的安装方向与姿态信息与待检测虚拟卡扣保持一致。It should be noted that moving the detection template to match the detection template with the virtual buckle to be detected may be to move the registration body in the detection template through operations such as rotation and translation, so that the installation direction and posture information of the registration body are consistent with the virtual buckle to be detected. The detection of virtual snaps remains consistent.

步骤S30:基于所述检测模板识别所述待检测虚拟卡扣对应的卡扣安装板件。Step S30: Identify the buckle installation plate corresponding to the virtual buckle to be detected based on the detection template.

需要说明的是,卡扣安装板件可以是安装卡扣时卡扣应夹紧的板件。基于检测模板识别待检测虚拟卡扣对应的卡扣安装板件可以是根据检测模板对车辆设计模型中的各零件进行筛选,确定在车辆设计模型中待检测虚拟卡扣所夹紧的板件。It should be noted that the buckle installation plate may be a plate that the buckle should clamp when the buckle is installed. Identifying the buckle mounting plate corresponding to the virtual buckle to be detected based on the detection template may be to screen each part in the vehicle design model according to the detection template, and determine the plate clamped by the virtual buckle to be detected in the vehicle design model.

在具体实现中,为了准确的识别待检测虚拟卡扣对应的卡扣安装板件,本实施例所述步骤S30,可以包括:In a specific implementation, in order to accurately identify the buckle installation plate corresponding to the virtual buckle to be detected, step S30 in this embodiment may include:

根据所述检测模板确定所述待检测虚拟卡扣对应的最小包容盒;determining the minimum containment box corresponding to the virtual buckle to be detected according to the detection template;

将所述最小包容盒与装配体中其他零件的最小包容盒进行匹配,确定疑似安装板件;Match the minimum containment box with the minimum containment boxes of other parts in the assembly to determine the suspected mounting plate;

计算各疑似安装板件与所述检测模板的模板端部之间的最小距离;Calculating the minimum distance between each suspected mounting plate and the template end of the detection template;

根据所述最小距离在所述疑似安装板件中选取卡扣安装板件。According to the minimum distance, a buckle installation board is selected from the suspected installation boards.

需要说明的是,根据检测模板确定待检测虚拟卡扣对应的最小包容盒可以是根据检测模板中部件空间位置的确定包容检测模板的最小包容盒。装配体可以是车辆设计模型,将最小包容盒与装配体中其他零件的最小包容盒进行匹配,确定疑似安装板件可以是将最小包容盒与装配体中其他零件的最小包容盒进行比较,将可能与待检测虚拟卡扣对应的最小包容盒可能发生干涉的最小包容盒中的零件作为疑似安装板件。It should be noted that the determination of the minimum containment box corresponding to the virtual buckle to be detected according to the detection template may be the minimum containment box containing the detection template determined according to the spatial position of the component in the detection template. The assembly can be a vehicle design model, matching the minimum containing box to the minimum containing boxes of other parts in the assembly, identifying suspected mounting panels can be comparing the minimum containing box to the minimum containing boxes of other parts in the assembly, the Parts in the minimum containment box that may interfere with the minimum containment box corresponding to the virtual buckle to be detected are used as suspected mounting plates.

在具体实现中,判断两个最小包容盒是否干涉,可以通过比较两个最小包容盒的最大限度及最小点之间的大小关系确定。In a specific implementation, judging whether two minimum containing boxes interfere can be determined by comparing the maximum and minimum points of the two minimum containing boxes.

例如:假设最小包容盒A的最小点为(x11,y11,z11),最大点为(x12,y12,z12);最小包容盒B的最小点为(x21,y21,z21),最大点为(x22,y22,z22);For example: Suppose the smallest point of the smallest containing box A is (x11, y11, z11), and the largest point is (x12, y12, z12); the smallest point of the smallest containing box B is (x21, y21, z21), and the largest point is ( x22,y22,z22);

若A与B干涉,则有((x21<x11<x22)且(y21<y11<y22)且(z21<z11<z22))或((x21<x12<x22)且(y21<y12<y22)且(z21<z12<z22))或((x11<x21<x12)且(y11<y21<y12)且(z11<z21<z12))或((x11<x22<x12)且(y11<y22<y12)且(z11<z22<z12))。If A interferes with B, then there are ((x21<x11<x22) and (y21<y11<y22) and (z21<z11<z22)) or ((x21<x12<x22) and (y21<y12<y22) and (z21<z12<z22)) or ((x11<x21<x12) and (y11<y21<y12) and (z11<z21<z12)) or ((x11<x22<x12) and (y11<y22< y12) and (z11<z22<z12)).

在实际使用中,若各疑似安装板件与检测模板的模板端部之间的最小距离均不为0,则可以将对应的最小距离最小的一个疑似安装板件作为卡扣安装板件;而若是仅有一个疑似安装板件与检测模板的模板端部之间的最小距离为0,则可以将对应的最小距离为0的疑似安装板件作为卡扣安装板件。In actual use, if the minimum distance between each suspected mounting plate and the template end of the detection template is not 0, then the suspected mounting plate with the smallest corresponding minimum distance can be used as the snap-fit mounting plate; and If the minimum distance between only one suspected mounting plate and the template end of the detection template is 0, the corresponding suspected mounting plate with the minimum distance of 0 can be used as the snap-fit mounting plate.

其中,若是存在两个或两个以上的疑似安装板件与检测模板的模板端部之间的最小距离为0,则可以确定待检测虚拟卡扣与除板件外的其他零件有干涉,此时可以判定卡扣状态异常。Wherein, if there are two or more suspected installation panels and the minimum distance between the template end of the detection template is 0, it can be determined that the virtual buckle to be detected interferes with other parts except the panel, and this It can be judged that the buckle status is abnormal.

步骤S40:在所述卡扣安装板件上建立安装坐标系。Step S40: establishing an installation coordinate system on the buckle installation board.

需要说明的是,在对卡扣进行安装规范性检测时,需要检测会与卡扣端部产生干涉的其他部件与卡扣端部之间的距离、卡扣的安装孔尺寸时是否符合规格,以及安装板件的厚度等参数,而为了便于检测卡扣安装板件上的安装孔的尺寸以及卡扣安装板件的厚度,需要在卡扣安装板件上建立安装坐标系。It should be noted that when carrying out standard installation inspections on the buckle, it is necessary to check whether the distance between other parts that interfere with the end of the buckle and the end of the buckle, and the size of the mounting hole of the buckle meet the specifications. And parameters such as the thickness of the mounting plate, and in order to facilitate the detection of the size of the mounting hole on the snap mounting plate and the thickness of the snap mounting plate, it is necessary to establish an installation coordinate system on the snap mounting plate.

步骤S50:基于所述安装坐标系及所述检测模板对所述待检测虚拟卡扣进行安装规范性检测。Step S50: Perform installation normative inspection on the virtual buckle to be inspected based on the installation coordinate system and the inspection template.

需要说明的是,基于安装坐标系及检测模板对待检测虚拟卡扣进行安装规范性检测可以是基于安装坐标系确定待检测虚拟卡扣对应的卡扣安装板件的安装孔尺寸及厚度,以及根据检测模板确定车辆设计模型中是否会存在与待检测卡扣产生接触或干涉的其他零件,从而确定待检测虚拟卡扣是否符合安装规范性。It should be noted that, based on the installation coordinate system and the detection template, the installation normative detection of the virtual buckle to be detected can be based on the installation coordinate system to determine the installation hole size and thickness of the buckle installation plate corresponding to the virtual buckle to be detected, and according to The detection template determines whether there are other parts that may contact or interfere with the buckle to be detected in the vehicle design model, so as to determine whether the virtual buckle to be detected conforms to the installation specification.

本实施例通过构建待检测虚拟卡扣对应的检测模板;移动检测模板,以使检测模板与待检测虚拟卡扣匹配;基于检测模板识别待检测虚拟卡扣对应的卡扣安装板件;在卡扣安装板件上建立安装坐标系;基于安装坐标系及检测模板对待检测虚拟卡扣进行安装规范性检测。由于会移动待检测虚拟卡扣对应的检测模板,使得检测模板与待检测虚拟卡扣匹配,保证可正确识别到卡扣安装板件,再根据在卡扣安装板件上建立安装坐标系及检测模板即可正确测得卡扣安装板件的尺寸、厚度等参数,以及确定是否存在于卡扣干涉的其他零件,从而实现了自动检测卡扣是否符合安装规范性。In this embodiment, the detection template corresponding to the virtual buckle to be detected is constructed; the detection template is moved to match the detection template with the virtual buckle to be detected; the buckle installation plate corresponding to the virtual buckle to be detected is identified based on the detection template; The installation coordinate system is established on the buckle installation plate; the installation normative inspection is carried out based on the installation coordinate system and the detection template of the virtual buckle to be detected. Since the detection template corresponding to the virtual buckle to be detected will be moved, the detection template will match the virtual buckle to be detected to ensure that the buckle installation plate can be correctly identified, and then according to the installation coordinate system established on the buckle installation plate and the detection The template can correctly measure the size, thickness and other parameters of the buckle installation plate, and determine whether there are other parts that interfere with the buckle, so as to realize the automatic detection of whether the buckle conforms to the installation specification.

参考图4,图4为本发明一种卡扣检测方法第二实施例的流程示意图。Referring to FIG. 4 , FIG. 4 is a schematic flowchart of a second embodiment of a buckle detection method according to the present invention.

基于上述第一实施例,本实施例卡扣检测方法的所述步骤S20,包括:Based on the first embodiment above, the step S20 of the buckle detection method in this embodiment includes:

步骤S201:模拟移动所述检测模板,并通过局部一致性配准算法进行模型配准。Step S201: Simulate moving the detection template, and perform model registration through a local consistency registration algorithm.

在实际使用中,模拟移动检测模板,并通过局部一致性配准算法进行模型配准可以是:In actual use, simulating a moving detection template and performing model registration through a local consistency registration algorithm can be:

①在内存中模拟移动检测模板,并计算移动后的检测模板与待检测虚拟卡扣每一个三角面的特征描述值,并对每个特征匹配值取整;①Simulate the moving detection template in the memory, and calculate the characteristic description value of each triangular surface of the moving detection template and the virtual buckle to be detected, and round up each characteristic matching value;

②分别对待检测虚拟卡扣和检测模板的特征匹配值构建直方图;② Construct histograms of the feature matching values of the virtual buckle to be detected and the detection template respectively;

③在直方图中查找特征匹配值相同且频率为1的一对三角面进行匹配;③ Find a pair of triangular surfaces with the same feature matching value and frequency of 1 in the histogram for matching;

④若待检测虚拟卡扣和检测模板仍未配准,则继续模拟移动检测模板,并重复③直至配准成功;④ If the virtual buckle to be detected and the detection template are still not registered, continue to simulate the mobile detection template, and repeat ③ until the registration is successful;

⑤若所有移动可能性均移动完毕,步骤④仍未实现配准,则判定配准失败。⑤If all moving possibilities have been moved and the registration has not been realized in step ④, it is determined that the registration fails.

为了便于理解,现结合图5进行说明,但不对本方案进行限定。图5为本实施例的局部特征示意图,如图5所示,三角面i的三个顶点分别为A、B、C,三边长度分别为a、b、c;i的法线与其邻接面的法向之夹角分别为k1、k2、k3;i的顶点与顶点的邻接面中心点的距离之和分别为的d1、d2、d3;则三角面i特征描述子为:(a,b,c,k1,k2,k3,d1,d2,d3),三角面i的特征匹配值为:a*k1*d1+b*k2*d2+c*k3*d3。For ease of understanding, description is now made in conjunction with FIG. 5 , but this solution is not limited. Figure 5 is a schematic diagram of the local features of this embodiment, as shown in Figure 5, the three vertices of the triangular face i are A, B, C, respectively, and the lengths of the three sides are respectively a, b, and c; the normal of i and its adjacent surface The included angles of the normal direction of i are k1, k2, k3 respectively; the sum of the distances between the vertex i and the center point of the adjoining surface of the vertex is d1, d2, d3 respectively; then the feature descriptor of triangular surface i is: (a,b ,c,k1,k2,k3,d1,d2,d3), the feature matching value of triangle i is: a*k1*d1+b*k2*d2+c*k3*d3.

在具体实现中,在执行步骤S201之前,还可以计算检测模板与待检测虚拟卡扣与检测模板的匹配分数,若匹配分数小于预设匹配阈值,则可以直接判定检测模板与待检测虚拟卡扣匹配,无须执行后续移动步骤;而若是匹配分数大于或等于预设匹配阈值。其中,预设匹配阈值可以由卡扣检测设备的管理人员预先进行设置,例如:将预设匹配阈值设置为0.05。In a specific implementation, before step S201 is executed, the matching score between the detection template and the virtual buckle to be detected and the detection template can also be calculated. If the matching score is less than the preset matching threshold, the detection template and the virtual buckle to be detected can be directly determined. match, no subsequent moving steps need to be performed; and if the matching score is greater than or equal to a preset matching threshold. Wherein, the preset matching threshold can be set in advance by the manager of the buckle detection device, for example, the preset matching threshold is set to 0.05.

步骤S202:在通过所述局部一致性配准算法配准成功时,记录所述检测模板当前的模板位姿信息。Step S202: When the registration is successful through the local consistency registration algorithm, record the current template pose information of the detection template.

可以理解的是,若通过所述局部一致性配准算法配准成功,则根据此时的检测模板当前的模板位姿信息移动检测模板,即可保证检测模板与待检测虚拟卡扣匹配。其中,模板位姿信息可以包括检测模板的安装方向与姿态信息。It can be understood that if the registration is successful through the local consistency registration algorithm, the detection template can be moved according to the current template pose information of the detection template at this time, so as to ensure that the detection template matches the virtual buckle to be detected. Wherein, the pose information of the template may include the installation direction and pose information of the detection template.

步骤S203:根据所述模板位姿信息移动所述检测模板,以使所述检测模板与所述待检测虚拟卡扣匹配。Step S203: Moving the detection template according to the pose information of the template, so that the detection template matches the virtual buckle to be detected.

在具体实现中,根据模板位姿信息移动检测模板可以是移动检测模板,使得检测模板中的配准体的安装方向及姿态信息与模板位姿信息中记录的一致,从而使得检测模板与待检测虚拟卡扣匹配。In a specific implementation, the mobile detection template can be a mobile detection template according to the template pose information, so that the installation direction and posture information of the registration body in the detection template are consistent with those recorded in the template pose information, so that the detection template is consistent with the to-be-detected Virtual snap matching.

在具体实现中,局部一致性配准算法是通过找到两个匹配目标上的局部特征,计算得从模板特征平移旋转到目标特征的变换矩阵的算法,算法整体执行速度快,但是对匹配目标的要求较高,需要匹配目标上存在一致的局部特征,此种方法虽然配准速度快,但是要求过于严苛,存在一定的配准失败可能性,为了在通过局部一致性配准算法配准失败时,依旧可以保证可使检测模板与待检测虚拟卡扣匹配,本实施例所述步骤S201之后,还可以包括:In the specific implementation, the local consistency registration algorithm is an algorithm that calculates the transformation matrix from the template feature translation and rotation to the target feature by finding two local features on the matching target. The overall execution speed of the algorithm is fast, but the matching target The requirements are high, and consistent local features need to be matched on the target. Although the registration speed of this method is fast, the requirements are too strict, and there is a certain possibility of registration failure. , it can still be ensured that the detection template can be matched with the virtual buckle to be detected. After step S201 described in this embodiment, it can also include:

若通过所述局部一致性配准算法配准失败,则通过局部相似性配准算法进行模型配准;If the registration fails through the local consistency registration algorithm, then perform model registration through the local similarity registration algorithm;

在通过所述局部相似性配准算法配准成功时,记录所述检测模板当前的模板位姿信息;When the registration is successful through the local similarity registration algorithm, record the current template pose information of the detection template;

根据所述模板位姿信息移动所述检测模板,以使所述检测模板与所述待检测虚拟卡扣匹配。The detection template is moved according to the template pose information, so that the detection template is matched with the virtual buckle to be detected.

需要说明的是,若通过局部一致性配准算法配准失败,则表示此时待检测虚拟卡扣可能不适用于判定较为严苛的局部一致性配准算法,则此时可以尝试采用局部相似性配准算法进行模型配准,同理,若是通过局部相似性配准算法配准成功,则依旧可以根据检测模板当前的模板位姿信息移动检测模板,令检测模板与待检测虚拟卡扣匹配。It should be noted that if the registration fails through the local consistency registration algorithm, it means that the virtual buckle to be detected may not be suitable for the more stringent local consistency registration algorithm at this time, so you can try to use local similarity Similarly, if the registration is successful through the local similarity registration algorithm, the detection template can still be moved according to the current template pose information of the detection template, so that the detection template matches the virtual buckle to be detected .

为了便于理解,现结合图6和7进行说明,但不对本方案进行限定。图6为本实施例的三角细分示意图,图7为角特征示意图。通过局部相似性配准算法进行模型配准可以是对待检测虚拟卡扣和检测模板上每一个三角面进行细分,单个小平面的最大边长为0.5mm(细分的目的是获得均匀分布的三角面,使得目标和模板的局部相似性更高,最大边长的具体至可根据实际需要进行调整),如图6所示;进行细分后,分别获取目标卡扣和卡扣模板上每一个三角面的中心点与法向向量;计算每个中心点20mm范围内每两两中心点之间的角特征α,β,γ,如图7所示,每对中心点(Ps和Pt)之间有:α=v×nt,β=u×(Pt-Ps)/d,γ=arctan(w×nt,u×nt);将每个中心点的四元特征值(α,β,γ,d,)封箱为直方图,根据直方图将相似特征对齐,并在对齐时记录检测模板当前的模板位姿信息。For ease of understanding, description is now made in conjunction with FIGS. 6 and 7 , but this solution is not limited. FIG. 6 is a schematic diagram of triangular subdivision in this embodiment, and FIG. 7 is a schematic diagram of corner features. Model registration through the local similarity registration algorithm can be subdivided for each triangular surface on the virtual buckle to be detected and the detection template. The maximum side length of a single small plane is 0.5mm (the purpose of subdivision is to obtain evenly distributed The triangular surface makes the local similarity between the target and the template higher, and the maximum side length can be adjusted according to actual needs), as shown in Figure 6; The center point and normal vector of a triangular surface; calculate the angular characteristics α, β, γ between every two center points within the range of 20mm of each center point, as shown in Figure 7, each pair of center points (P s and P t ) between: α=v×n t , β=u×(P t -P s )/d, γ=arctan(w×n t ,u×n t ); the quaternion of each central point The feature values (α, β, γ, d,) are boxed into a histogram, and similar features are aligned according to the histogram, and the current template pose information of the detection template is recorded during alignment.

本实施例通过模拟移动所述检测模板,并通过局部一致性配准算法进行模型配准;在通过所述局部一致性配准算法配准成功时,记录所述检测模板当前的模板位姿信息;根据所述模板位姿信息移动所述检测模板,以使所述检测模板与所述待检测虚拟卡扣匹配。由于是模拟移动检测模板,并通过预设的配准算法快速计算是否完成配准,在完成配准之后才真正移动检测模板,以使检测模板与待检测虚拟卡扣匹配,减少了对车辆设计模型的调整,加快了整体的执行效率。In this embodiment, the detection template is moved by simulation, and the model registration is performed through the local consistency registration algorithm; when the registration is successful through the local consistency registration algorithm, the current template pose information of the detection template is recorded ; Moving the detection template according to the pose information of the template, so that the detection template matches the virtual buckle to be detected. Because it simulates the moving detection template, and quickly calculates whether the registration is completed through the preset registration algorithm, the detection template is actually moved after the registration is completed, so that the detection template matches the virtual buckle to be detected, reducing the need for vehicle design The adjustment of the model speeds up the overall execution efficiency.

参考图8,图8为本发明一种卡扣检测方法第三实施例的流程示意图。Referring to FIG. 8 , FIG. 8 is a schematic flowchart of a third embodiment of a buckle detection method according to the present invention.

基于上述第一实施例,本实施例卡扣检测方法的所述步骤S40,包括:Based on the first embodiment above, the step S40 of the buckle detection method in this embodiment includes:

步骤S401:获取所述卡扣安装板件对应的安装孔点云,并通过所述安装孔点云拟合安装平面。Step S401: Obtain the point cloud of the installation hole corresponding to the snap-on installation plate, and fit the installation plane through the point cloud of the installation hole.

需要说明的是,获取卡扣安装板件对应的安装孔点云可以是获取卡扣安装板件上在孔部预设特征范围内的板件点云,即安装孔点云,其中,安装孔点云中可以包括安装孔边缘点以及干扰点。通过安装孔点云拟合安装平面可以是通过最小二乘法通过安装孔点云拟合一个安装平面。It should be noted that obtaining the point cloud of the mounting hole corresponding to the buckle mounting plate may be to obtain the point cloud of the plate on the buckle mounting plate within the preset feature range of the hole, that is, the point cloud of the mounting hole, wherein the mounting hole Edge points of mounting holes as well as interference points can be included in the point cloud. Fitting the installation plane through the point cloud of the installation hole may be fitting an installation plane through the point cloud of the installation hole by the least square method.

步骤S402:获取所述安装平面对应的法向量,并根据所述安装孔点云确定近似中心点。Step S402: Obtain the normal vector corresponding to the installation plane, and determine an approximate center point according to the point cloud of the installation hole.

需要说明的是,根据安装孔点云确定近似中心点可以是计算安装孔点云中包含的各个点的坐标的平均值,从而获得近似中心点。It should be noted that determining the approximate center point according to the point cloud of the installation hole may be calculating an average value of the coordinates of each point contained in the point cloud of the installation hole, so as to obtain the approximate center point.

步骤S403:根据所述近似中心点确定所述安装孔点云中的干扰点,并将所述干扰点从所述安装孔点云中移除。Step S403: Determine an interference point in the installation hole point cloud according to the approximate center point, and remove the interference point from the installation hole point cloud.

需要说明的是,干扰点可以分为安装平面上的干扰点,以及外边缘干扰点,根据近似中心点确定安装孔点云中安装平面上的干扰点可以是由安装孔点云C中任意点A向近似中心点o1平移预设距离得到点A2,以+n(安装平面对应的法向量的正方向)和-n(安装平面对应的法向量的负方向)为方向分别作线段A2B、A2C,若A2B或A2C与板件的距离为0则称A为干扰点;It should be noted that the interference points can be divided into interference points on the installation plane and outer edge interference points. According to the approximate center point, the interference points on the installation plane in the installation hole point cloud can be determined by any point in the installation hole point cloud C A is translated to the approximate center point o 1 by a preset distance to obtain point A 2 , and the line segment A is respectively drawn in the direction of +n (the positive direction of the normal vector corresponding to the installation plane) and -n (the negative direction of the normal vector corresponding to the installation plane) 2 B, A 2 C, if the distance between A 2 B or A 2 C and the plate is 0, A is called the interference point;

根据近似中心点确定安装孔点云中外边缘干扰点可以是由C中任意点A向近似中心点o1的反方向平移预设距离得到点A3,以点A3和o1为端点作线段L,若L与板件的最短距离为0,则称A为干扰点。Determine the interference point on the outer edge of the point cloud of the installation hole based on the approximate center point, which can be obtained by shifting the preset distance from any point A in C to the opposite direction of the approximate center point o 1 to obtain point A 3 , and use point A 3 and o 1 as endpoints to make a line segment L, if the shortest distance between L and the plate is 0, then A is called the interference point.

其中,预设距离可以由卡扣检测设备的管理人员根据实际需要预先进行设置,如将预设距离设置为0.5mm。Wherein, the preset distance can be set in advance by the manager of the buckle detection device according to actual needs, for example, the preset distance is set to 0.5 mm.

步骤S404:根据移除干扰点后的安装孔点云计算近似中心点,获得参考中心点。Step S404: Calculate an approximate center point according to the point cloud of the installation hole after removing the interference point, and obtain a reference center point.

需要说明的是,在移除掉干扰点之后,安装孔点云中剩余的点均是安装孔边缘点,此时可以再计算移除干扰点后的安装孔点云中各点坐标的平均值,以获得近似中心点,并将此时获得的近似中心点作为参考中心点,以便于进行后续计算。其中,参考中心点相对于上述步骤S402中获得的近似中心店更接近与真实的安装孔中心。It should be noted that after the interference points are removed, the remaining points in the point cloud of the installation hole are the edge points of the installation hole. At this time, the average value of the coordinates of each point in the point cloud of the installation hole after removing the interference points can be calculated , to obtain the approximate center point, and use the approximate center point obtained at this time as the reference center point for subsequent calculations. Wherein, the reference center point is closer to the real installation hole center than the approximate center point obtained in the above step S402.

为了便于理解,现结合图9进行说明,但不对本方案进行限定。图9为本实施例的安装孔点云示意图,如图9所示,图9中的O1为近似中心点,O2为参考中心点,图9中的浅色点为被筛除的干扰点,剩余的深色点为剩余的安装孔点云。For ease of understanding, description is now made in conjunction with FIG. 9 , but this solution is not limited. Fig. 9 is a schematic diagram of the installation hole point cloud of this embodiment, as shown in Fig. 9, O1 in Fig. 9 is an approximate center point, O2 is a reference center point, and the light-colored points in Fig. 9 are interference points to be screened out, The remaining dark points are the rest of the mounting hole point cloud.

步骤S405:基于所述参考中心点及所述法向量构建安装坐标系。Step S405: Construct an installation coordinate system based on the reference center point and the normal vector.

为了便于理解,现结合图10进行说明,图10为本实施例的坐标系构建点示意图,基于参考中心点及法向量构建安装坐标系可以是以参考中心点o2为起点,分别以+n(法向量的正方向)和-n(法向量的负方向)为方向平移预设平移距离获得点A、B,以A、B为端点作线段L2。对C的每个点作垂线与L2垂直,垂线与L2交点构成映射点集P,取映射点集中+n方向的最远映射点为坐标系原点o(如图10所示,将所有安装孔边缘点映射线段AB上,以AB上+n方向的最远映射点为坐标系原点o,o为安装平面上的点),然后采用欧几里得距离聚类法对P进行聚类,距离相近的映射点归为一类,则称同类映射点对应的安装孔边缘点为同层边缘点;对与o对应的同层边缘点求最小外接矩形,称矩形的长方向为Y,宽方向为X,之后以o为安装坐标系的原点,以n为z轴,以Y方向为y轴,X方向为x轴构建安装坐标系。其中,预设平移距离可以由卡扣检测设备的管理人员根据实际需要预先进行设置,例如:将预设平移距离设置为20mm。In order to facilitate understanding, it is now described in conjunction with Fig. 10. Fig. 10 is a schematic diagram of the coordinate system construction point of this embodiment. The construction of the installation coordinate system based on the reference center point and the normal vector can be based on the reference center point o 2 as the starting point, respectively with +n (the positive direction of the normal vector) and -n (the negative direction of the normal vector) are used as directions to translate the preset translation distance to obtain points A and B, and a line segment L 2 is made with A and B as endpoints. For each point of C, draw a vertical line perpendicular to L2 , and the intersection of the vertical line and L2 constitutes the mapping point set P, and take the farthest mapping point in the +n direction of the mapping point set as the origin o of the coordinate system (as shown in Figure 10, Map all the edge points of the installation holes on the line segment AB, take the farthest mapping point on AB in the +n direction as the origin o of the coordinate system, and o is the point on the installation plane), and then use the Euclidean distance clustering method to calculate P Clustering, the mapping points with similar distances are grouped into one category, then the edge points of the installation holes corresponding to the same type of mapping points are called edge points of the same layer; the minimum circumscribed rectangle is calculated for the edge points of the same layer corresponding to o, and the long direction of the rectangle is called Y, the width direction is X, then o is the origin of the installation coordinate system, n is the z axis, the Y direction is the y axis, and the X direction is the x axis to construct the installation coordinate system. Wherein, the preset translation distance can be set in advance by the manager of the buckle detection device according to actual needs, for example, the preset translation distance is set to 20mm.

在具体实现中,为了合理的确定待检测虚拟卡扣是否符合安装规范性,在本实施例中,所述步骤S50,可以包括:In a specific implementation, in order to reasonably determine whether the virtual buckle to be detected conforms to the installation specification, in this embodiment, the step S50 may include:

基于所述安装坐标系确定所述卡扣安装板件对应的板件厚度及安装孔尺寸;Determining the thickness of the plate corresponding to the buckle mounting plate and the size of the mounting hole based on the installation coordinate system;

确定与所述检测模板相干涉的目标零件;determining a target part that interferes with the detection template;

逐个计算所述目标零件与所述检测模板中端部预设特征之间的最小距离;Calculating the minimum distance between the target part and the end preset feature in the detection template one by one;

根据所述板件厚度、所述安装孔尺寸及所述最小距离确定所述待检测虚拟卡扣的安装规范性检测结果。The installation normative detection result of the virtual buckle to be detected is determined according to the thickness of the board, the size of the installation hole and the minimum distance.

需要说明的是,基于安装坐标系确定卡扣安装板件对应的安装孔尺寸可以是以安装孔坐标系原点o为起点,分别以+n和-n为方向平移20mm获得点A、B,以A、B为端点作线段L。对安装孔点云C中的每个点作垂线与L2垂直,垂线与L2交点构成映射点集P;采用欧氏聚类对P进行分割,获得C的分层点云集;通过计算不同层的最大内径值,找到C的最小内径层,之后可以分别使用圆弧法以及四点法计算测量值(测量值中包括安装孔的长和宽),在两种方法计算的测量值中选取接近卡扣规范参数中安装孔尺寸的测量值进行作为安装孔尺寸。It should be noted that, based on the installation coordinate system, the size of the installation hole corresponding to the buckle installation plate can be determined based on the origin o of the installation hole coordinate system, and the points A and B are obtained by moving 20mm in the direction of +n and -n respectively, and then A and B are endpoints and draw a line segment L. Make a vertical line perpendicular to L 2 for each point in the point cloud C of the installation hole, and the intersection point of the vertical line and L 2 constitutes the mapping point set P; use Euclidean clustering to segment P to obtain the hierarchical point cloud set of C; through Calculate the maximum inner diameter value of different layers, find the minimum inner diameter layer of C, and then use the arc method and the four-point method to calculate the measured value (the measured value includes the length and width of the installation hole), the measured value calculated by the two methods Select the measured value of the mounting hole size close to the buckle specification parameters as the mounting hole size.

其中,使用圆弧法计算测量值的步骤可以包括:根据安装孔最小内径点云与安装孔坐标系,分别取单侧点集中三点拟合圆,则两侧圆心分别为o1,o2,直径为d1、d2,圆心距为L;则安装孔长为L+d1/2+d2/2,宽为(d1+d2)/2;Among them, the step of using the arc method to calculate the measured value may include: according to the point cloud of the minimum inner diameter of the installation hole and the coordinate system of the installation hole, respectively take three points in the one-sided point set to fit the circle, then the centers of the circles on both sides are o1, o2, diameter are d1 and d2, and the center distance is L; then the length of the installation hole is L+d1/2+d2/2, and the width is (d1+d2)/2;

使用四点法计算测量值的步骤可以包括:根据安装孔最小内径点云与安装孔坐标系,在原点处创建垂直线段后,平移到靠近安装孔端点处,计算钣金与线段的最小距离点,则该点为安装孔端点;计算两对端点距离,可算得安装孔的长和宽。The steps of using the four-point method to calculate the measured value may include: according to the point cloud of the minimum inner diameter of the installation hole and the coordinate system of the installation hole, after creating a vertical line segment at the origin, translate to a point close to the end point of the installation hole, and calculate the minimum distance point between the sheet metal and the line segment , then this point is the endpoint of the mounting hole; the length and width of the mounting hole can be calculated by calculating the distance between two pairs of endpoints.

在具体实现中,基于安装坐标系确定卡扣安装板件对应的板件厚度可以是根据安装坐标系,对安装孔边缘点云采用AABB包容盒算法(也称为AABB包围盒算法),计算得最小包容盒;最小包容盒与安装坐标系z轴平行的边的长度即为板件厚度。当然,若是卡扣安装板件的安装钣金的特征属性中存在板厚参数,则也可以直接从特征属性中提取板件厚度。In a specific implementation, the determination of the plate thickness corresponding to the buckle mounting plate based on the installation coordinate system can be based on the installation coordinate system, using the AABB enclosing box algorithm (also known as the AABB bounding box algorithm) for the edge point cloud of the mounting hole to calculate Minimum containment box; the length of the side parallel to the z-axis of the minimum containment box is the thickness of the plate. Of course, if there is a plate thickness parameter in the feature attribute of the mounting sheet metal of the snap-fit mounting plate, the plate thickness can also be directly extracted from the feature attribute.

在实际使用中,根据板件厚度、安装孔尺寸及最小距离确定待检测虚拟卡扣的安装规范性检测结果可以是检测是否存在与所述检测模板中端部预设特征之间的最小距离小于或等于0的目标零件,若存在,则可以直接判定待检测虚拟卡扣的安装规范性检测结果为不符合卡扣安装规范性条件;若不存在,则可以继续判定板件厚度或安装孔尺寸是否处于安装规范性标准范围内,若不是,则可以判定待检测虚拟卡扣的安装规范性检测结果为不符合卡扣安装规范性条件。In actual use, according to the thickness of the board, the size of the installation hole and the minimum distance, the installation normative detection result of the virtual buckle to be detected can be determined as whether there is a minimum distance between the predetermined feature of the end in the detection template and the detection template is less than or a target part equal to 0, if it exists, it can be directly determined that the installation normative detection result of the virtual buckle to be detected does not meet the normative conditions for buckle installation; if it does not exist, it can continue to determine the thickness of the plate or the size of the installation hole Whether it is within the range of installation normative standards, if not, it can be determined that the installation normative detection result of the virtual buckle to be detected does not meet the normative conditions for buckle installation.

在具体实现中,为了便于用户查看安装规范性检测结果,还可以设置一UI界面,在UI界面中显示车辆设计模型及结果输出区,在UI界面中的结果输出区中,显示每个待检测虚拟卡扣的安装规范性检测结果,每个检测结果条目记录卡扣对应的板件厚度、安装孔尺寸及干涉性结果(即是否存在干涉的零件),其中,UI界面中的条目若被点击,则视图可以调整至该条目对应的卡扣所在位置,视图中标注了检查结果数值。具体的,为了更进一步提高可视性,在UI界面中还可以将不符合安装规范性要求的卡扣进行突出显示(如标注红圈)。In the specific implementation, in order to facilitate the user to view the inspection results of installation norms, a UI interface can also be set up to display the vehicle design model and the result output area in the UI interface. In the result output area in the UI interface, each The installation normative detection results of the virtual buckle, each test result item records the thickness of the board corresponding to the buckle, the size of the installation hole and the interference result (that is, whether there are interfering parts). Among them, if the item in the UI interface is clicked , then the view can be adjusted to the position of the buckle corresponding to the item, and the value of the inspection result is marked in the view. Specifically, in order to further improve visibility, buckles that do not meet installation normative requirements can also be highlighted on the UI interface (for example, marked with a red circle).

本实施例通过获取所述卡扣安装板件对应的安装孔点云,并通过所述安装孔点云拟合安装平面;获取所述安装平面对应的法向量,并根据所述安装孔点云确定近似中心点;根据所述近似中心点确定所述安装孔点云中的干扰点,并将所述干扰点从所述安装孔点云中移除;根据移除干扰点后的安装孔点云计算近似中心点,获得参考中心点;基于所述参考中心点及所述法向量构建安装坐标系。由于在构建坐标系时会先通过计算近似中心点将安装孔点云中的干扰点移除,保证构建的坐标系不会受干扰点的影响,从而确保了后续的尺寸及板厚计算的准确性。In this embodiment, by obtaining the point cloud of the installation hole corresponding to the buckle installation plate, and fitting the installation plane through the point cloud of the installation hole; obtaining the normal vector corresponding to the installation plane, and according to the point cloud of the installation hole Determine the approximate center point; determine the interference point in the installation hole point cloud according to the approximate center point, and remove the interference point from the installation hole point cloud; according to the installation hole point after removing the interference point Approximate the center point by cloud computing to obtain a reference center point; construct an installation coordinate system based on the reference center point and the normal vector. Since the interference points in the installation hole point cloud will be removed by calculating the approximate center point when constructing the coordinate system, it is ensured that the constructed coordinate system will not be affected by the interference points, thereby ensuring the accuracy of subsequent size and plate thickness calculations sex.

此外,本发明实施例还提出一种存储介质,所述存储介质上存储有卡扣检测程序,所述卡扣检测程序被处理器执行时实现如上文所述的卡扣检测方法的步骤。In addition, an embodiment of the present invention also proposes a storage medium, on which a buckle detection program is stored, and when the buckle detection program is executed by a processor, the steps of the buckle detection method as described above are implemented.

参照图11,图11为本发明卡扣检测装置第一实施例的结构框图。Referring to FIG. 11 , FIG. 11 is a structural block diagram of the first embodiment of the buckle detection device of the present invention.

如图11所示,本发明实施例提出的卡扣检测装置包括:As shown in Figure 11, the buckle detection device proposed by the embodiment of the present invention includes:

模板构建模块10,用于构建待检测虚拟卡扣对应的检测模板;Template construction module 10, for constructing the detection template corresponding to the virtual buckle to be detected;

模板匹配模块20,用于移动所述检测模板,以使所述检测模板与所述待检测虚拟卡扣匹配;Template matching module 20, configured to move the detection template, so that the detection template matches the virtual buckle to be detected;

板件识别模块30,用于基于所述检测模板识别所述待检测虚拟卡扣对应的卡扣安装板件;A plate identification module 30, configured to identify the buckle installation plate corresponding to the virtual buckle to be detected based on the detection template;

坐标构建模块40,用于在所述卡扣安装板件上建立安装坐标系;A coordinate construction module 40, configured to establish an installation coordinate system on the buckle installation plate;

卡扣检测模块50,用于基于所述安装坐标系及所述检测模板对所述待检测虚拟卡扣进行安装规范性检测。The buckle detection module 50 is configured to perform installation normative detection on the virtual buckle to be detected based on the installation coordinate system and the detection template.

本实施例通过构建待检测虚拟卡扣对应的检测模板;移动检测模板,以使检测模板与待检测虚拟卡扣匹配;基于检测模板识别待检测虚拟卡扣对应的卡扣安装板件;在卡扣安装板件上建立安装坐标系;基于安装坐标系及检测模板对待检测虚拟卡扣进行安装规范性检测。由于会移动待检测虚拟卡扣对应的检测模板,使得检测模板与待检测虚拟卡扣匹配,保证可正确识别到卡扣安装板件,再根据在卡扣安装板件上建立安装坐标系及检测模板即可正确测得卡扣安装板件的尺寸、厚度等参数,以及确定是否存在于卡扣干涉的其他零件,从而实现了自动检测卡扣是否符合安装规范性。In this embodiment, the detection template corresponding to the virtual buckle to be detected is constructed; the detection template is moved to match the detection template with the virtual buckle to be detected; the buckle installation plate corresponding to the virtual buckle to be detected is identified based on the detection template; The installation coordinate system is established on the buckle installation plate; the installation normative inspection is carried out based on the installation coordinate system and the detection template of the virtual buckle to be detected. Since the detection template corresponding to the virtual buckle to be detected will be moved, the detection template will match the virtual buckle to be detected to ensure that the buckle installation plate can be correctly identified, and then according to the installation coordinate system established on the buckle installation plate and the detection The template can correctly measure the size, thickness and other parameters of the buckle installation plate, and determine whether there are other parts that interfere with the buckle, so as to realize the automatic detection of whether the buckle conforms to the installation specification.

进一步的,所述模板构建模块10,还用于在接收到检索关键字时,将所述检索关键字与配置表中的关键词进行匹配,确定待检测虚拟卡扣;Further, the template construction module 10 is also configured to match the search keyword with keywords in the configuration table when receiving the search keyword, to determine the virtual buckle to be detected;

所述模板构建模块10,还用于获取所述待检测虚拟卡扣对应的卡扣类型;根据所述卡扣类型查找所述待检测虚拟卡扣对应的检测模板。The template construction module 10 is further configured to obtain the buckle type corresponding to the virtual buckle to be detected; and search for the detection template corresponding to the virtual buckle to be detected according to the buckle type.

进一步的,所述模板匹配模块20,还用于模拟移动所述检测模板,并通过局部一致性配准算法进行模型配准;在通过所述局部一致性配准算法配准成功时,记录所述检测模板当前的模板位姿信息;根据所述模板位姿信息移动所述检测模板,以使所述检测模板与所述待检测虚拟卡扣匹配。Further, the template matching module 20 is also used to simulate moving the detection template, and perform model registration through the local consistency registration algorithm; when the registration is successful through the local consistency registration algorithm, record the The current template pose information of the detection template; the detection template is moved according to the template pose information, so that the detection template matches the virtual buckle to be detected.

进一步的,所述模板匹配模块20,还用于若通过所述局部一致性配准算法配准失败,则通过局部相似性配准算法进行模型配准;在通过所述局部相似性配准算法配准成功时,记录所述检测模板当前的模板位姿信息;根据所述模板位姿信息移动所述检测模板,以使所述检测模板与所述待检测虚拟卡扣匹配。Further, the template matching module 20 is also used to perform model registration through the local similarity registration algorithm if the registration fails through the local similarity registration algorithm; When the registration is successful, record the current template pose information of the detection template; move the detection template according to the template pose information, so that the detection template matches the virtual buckle to be detected.

进一步的,所述板件识别模块30,还用于根据所述检测模板确定所述待检测虚拟卡扣对应的最小包容盒;将所述最小包容盒与装配体中其他零件的最小包容盒进行匹配,确定疑似安装板件;计算各疑似安装板件与所述检测模板的模板端部之间的最小距离;根据所述最小距离在所述疑似安装板件中选取卡扣安装板件。Further, the panel identification module 30 is also used to determine the minimum containment box corresponding to the virtual buckle to be detected according to the detection template; compare the minimum containment box with the minimum containment boxes of other parts in the assembly Matching, determining the suspected installation boards; calculating the minimum distance between each suspected installation board and the template end of the detection template; selecting a buckle installation board from the suspected installation boards according to the minimum distance.

进一步的,所述坐标构建模块40,还用于获取所述卡扣安装板件对应的安装孔点云,并通过所述安装孔点云拟合安装平面;获取所述安装平面对应的法向量,并根据所述安装孔点云确定近似中心点;根据所述近似中心点确定所述安装孔点云中的干扰点,并将所述干扰点从所述安装孔点云中移除;根据移除干扰点后的安装孔点云计算近似中心点,获得参考中心点;基于所述参考中心点及所述法向量构建安装坐标系。Further, the coordinate construction module 40 is also used to obtain the installation hole point cloud corresponding to the buckle installation plate, and fit the installation plane through the installation hole point cloud; obtain the normal vector corresponding to the installation plane , and determine the approximate center point according to the point cloud of the installation hole; determine the interference point in the point cloud of the installation hole according to the approximate center point, and remove the interference point from the point cloud of the installation hole; according to The point cloud of the installation hole after removing the interference point calculates an approximate center point to obtain a reference center point; an installation coordinate system is constructed based on the reference center point and the normal vector.

进一步的,所述卡扣检测模块50,还用于基于所述安装坐标系确定所述卡扣安装板件对应的板件厚度及安装孔尺寸;确定与所述检测模板相干涉的目标零件;逐个计算所述目标零件与所述检测模板中端部预设特征之间的最小距离;根据所述板件厚度、所述安装孔尺寸及所述最小距离确定所述待检测虚拟卡扣的安装规范性检测结果。Further, the buckle detection module 50 is also used to determine the board thickness and installation hole size corresponding to the buckle installation board based on the installation coordinate system; determine the target part that interferes with the detection template; Calculate the minimum distance between the target part and the end preset feature in the detection template one by one; determine the installation of the virtual buckle to be detected according to the thickness of the plate, the size of the installation hole and the minimum distance Normative test results.

应当理解的是,以上仅为举例说明,对本发明的技术方案并不构成任何限定,在具体应用中,本领域的技术人员可以根据需要进行设置,本发明对此不做限制。It should be understood that the above is only an example, and does not constitute any limitation to the technical solution of the present invention. In specific applications, those skilled in the art can make settings according to needs, and the present invention is not limited thereto.

需要说明的是,以上所描述的工作流程仅仅是示意性的,并不对本发明的保护范围构成限定,在实际应用中,本领域的技术人员可以根据实际的需要选择其中的部分或者全部来实现本实施例方案的目的,此处不做限制。It should be noted that the workflow described above is only illustrative and does not limit the protection scope of the present invention. In practical applications, those skilled in the art can select part or all of them to implement according to actual needs. The purpose of the scheme of this embodiment is not limited here.

另外,未在本实施例中详尽描述的技术细节,可参见本发明任意实施例所提供的卡扣检测方法,此处不再赘述。In addition, for technical details not described in detail in this embodiment, reference may be made to the buckle detection method provided in any embodiment of the present invention, which will not be repeated here.

此外,需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。Furthermore, it should be noted that in this document, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or system comprising a set of elements includes not only those elements, but also other elements not expressly listed, or elements inherent in such a process, method, article, or system. Without further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article or system comprising that element.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present invention are for description only, and do not represent the advantages and disadvantages of the embodiments.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如只读存储器(Read Only Memory,ROM)/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as a read-only memory (Read Only Memory) , ROM)/RAM, magnetic disk, optical disk), including several instructions to make a terminal device (which can be a mobile phone, computer, server, or network device, etc.) execute the methods described in various embodiments of the present invention.

以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process conversion made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technical fields , are all included in the scope of patent protection of the present invention in the same way.

Claims (10)

1. The buckle detection method is characterized by comprising the following steps of:
constructing a detection template corresponding to the virtual buckle to be detected;
moving the detection template to enable the detection template to be matched with the virtual buckle to be detected;
identifying a buckle installation plate corresponding to the virtual buckle to be detected based on the detection template;
establishing an installation coordinate system on the buckle installation plate;
and carrying out installation normalization detection on the virtual buckle to be detected based on the installation coordinate system and the detection template.
2. The method for detecting a buckle according to claim 1, wherein before the step of constructing the detection template corresponding to the virtual buckle to be detected, the method further comprises:
when a search keyword is received, matching the search keyword with keywords in a configuration table, and determining a virtual buckle to be detected;
correspondingly, the step of constructing the detection template corresponding to the virtual buckle to be detected comprises the following steps:
obtaining a buckle type corresponding to the virtual buckle to be detected;
and searching a detection template corresponding to the virtual buckle to be detected according to the buckle type.
3. The method of claim 1, wherein the step of moving the detection template to match the detection template with the virtual buckle to be detected comprises:
The detection template is moved in a simulation mode, and model registration is carried out through a local consistency registration algorithm;
recording current template pose information of the detection template when the registration is successful through the local consistency registration algorithm;
and moving the detection template according to the template pose information so as to enable the detection template to be matched with the virtual buckle to be detected.
4. The method of claim 3, wherein after the step of modeling the movement of the detection template and model registration by a local consistency registration algorithm, further comprising:
if the registration by the local consistency registration algorithm fails, carrying out model registration by the local similarity registration algorithm;
recording current template pose information of the detection template when the registration by the local similarity registration algorithm is successful;
and moving the detection template according to the template pose information so as to enable the detection template to be matched with the virtual buckle to be detected.
5. The clip detecting method according to claim 1, wherein the step of identifying the clip mounting plate corresponding to the virtual clip to be detected based on the detecting template includes:
Determining a minimum containing box corresponding to the virtual buckle to be detected according to the detection template;
matching the minimum containing box with the minimum containing boxes of other parts in the assembly body to determine suspected mounting plates;
calculating the minimum distance between each suspected installation plate and the template end part of the detection template;
and selecting a buckle mounting plate from the suspected mounting plates according to the minimum distance.
6. The clip detection method of claim 1, wherein the step of establishing a mounting coordinate system on the clip mounting plate comprises:
acquiring corresponding installation Kong Dianyun of the buckle installation plate, and fitting an installation plane through the installation Kong Dianyun;
acquiring a normal vector corresponding to the installation plane, and determining an approximate center point according to the installation Kong Dianyun;
determining an interference point in the installation Kong Dian cloud from the approximate center point and removing the interference point from the installation Kong Dianyun;
calculating an approximate center point according to the installation Kong Dianyun after the interference point is removed, and obtaining a reference center point;
and constructing an installation coordinate system based on the reference center point and the normal vector.
7. The method for detecting a buckle according to any one of claims 1 to 6, wherein the step of performing installation normalization detection on the virtual buckle to be detected based on the installation coordinate system and the detection template includes:
Determining the thickness of the plate corresponding to the buckle mounting plate and the size of the mounting hole based on the mounting coordinate system;
determining a target part interfering with the detection template;
calculating the minimum distance between the target part and the preset end characteristic in the detection template one by one;
and determining the installation standardization detection result of the virtual buckle to be detected according to the thickness of the plate, the size of the installation hole and the minimum distance.
8. The buckle detection device is characterized by comprising the following modules:
the template construction module is used for constructing a detection template corresponding to the virtual buckle to be detected;
the template matching module is used for moving the detection template so as to match the detection template with the virtual buckle to be detected;
the plate identifying module is used for identifying the buckle installation plate corresponding to the virtual buckle to be detected based on the detection template;
the coordinate construction module is used for establishing an installation coordinate system on the buckle installation plate;
and the buckle detection module is used for carrying out installation normalization detection on the virtual buckle to be detected based on the installation coordinate system and the detection template.
9. A buckle detection apparatus, characterized in that the buckle detection apparatus comprises: a processor, a memory and a buckle detection program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the buckle detection method according to any one of claims 1-7.
10. A computer-readable storage medium, wherein a buckle detection program is stored on the computer-readable storage medium, which when executed implements the steps of the buckle detection method according to any one of claims 1 to 7.
CN202310342350.5A 2023-03-31 2023-03-31 Buckle detection method, device, equipment and storage medium Active CN116358856B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310342350.5A CN116358856B (en) 2023-03-31 2023-03-31 Buckle detection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310342350.5A CN116358856B (en) 2023-03-31 2023-03-31 Buckle detection method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116358856A true CN116358856A (en) 2023-06-30
CN116358856B CN116358856B (en) 2026-01-27

Family

ID=86919746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310342350.5A Active CN116358856B (en) 2023-03-31 2023-03-31 Buckle detection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116358856B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117874846A (en) * 2023-12-19 2024-04-12 岚图汽车科技有限公司 Part structure detection method, device, equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110015648A1 (en) * 2009-07-16 2011-01-20 Hansen Medical, Inc. Endoscopic robotic catheter system
CN106062815A (en) * 2014-01-10 2016-10-26 珀金埃尔默细胞科技德国公司 Method and system for image correction using a quasiperiodic grid
CN108961221A (en) * 2018-06-15 2018-12-07 哈尔滨工业大学 A kind of aviation plug situ static image detection algorithm
CN108961326A (en) * 2018-07-03 2018-12-07 雅客智慧(北京)科技有限公司 An a kind of method for registering and electronic equipment for kind of tooth operation vision guided navigation
CN109840934A (en) * 2017-11-29 2019-06-04 深圳市掌网科技股份有限公司 A kind of the threedimensional model generation method and system of workpiece
CN111428367A (en) * 2020-03-25 2020-07-17 无锡先导智能装备股份有限公司 Workpiece mounting position detection method, workpiece mounting position detection device, computer equipment and storage medium
CN112734945A (en) * 2021-03-30 2021-04-30 上海交大智邦科技有限公司 Assembly guiding method, system and application based on augmented reality
CN114581632A (en) * 2021-12-07 2022-06-03 北京航天测控技术有限公司 Method, equipment and device for detecting assembly error of part based on augmented reality technology
CN114820599A (en) * 2022-06-27 2022-07-29 南通奥尔嘉橡塑有限公司 Injection molding buckle defect detection method and device based on computer vision

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110015648A1 (en) * 2009-07-16 2011-01-20 Hansen Medical, Inc. Endoscopic robotic catheter system
CN106062815A (en) * 2014-01-10 2016-10-26 珀金埃尔默细胞科技德国公司 Method and system for image correction using a quasiperiodic grid
CN109840934A (en) * 2017-11-29 2019-06-04 深圳市掌网科技股份有限公司 A kind of the threedimensional model generation method and system of workpiece
CN108961221A (en) * 2018-06-15 2018-12-07 哈尔滨工业大学 A kind of aviation plug situ static image detection algorithm
CN108961326A (en) * 2018-07-03 2018-12-07 雅客智慧(北京)科技有限公司 An a kind of method for registering and electronic equipment for kind of tooth operation vision guided navigation
CN111428367A (en) * 2020-03-25 2020-07-17 无锡先导智能装备股份有限公司 Workpiece mounting position detection method, workpiece mounting position detection device, computer equipment and storage medium
CN112734945A (en) * 2021-03-30 2021-04-30 上海交大智邦科技有限公司 Assembly guiding method, system and application based on augmented reality
CN114581632A (en) * 2021-12-07 2022-06-03 北京航天测控技术有限公司 Method, equipment and device for detecting assembly error of part based on augmented reality technology
CN114820599A (en) * 2022-06-27 2022-07-29 南通奥尔嘉橡塑有限公司 Injection molding buckle defect detection method and device based on computer vision

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117874846A (en) * 2023-12-19 2024-04-12 岚图汽车科技有限公司 Part structure detection method, device, equipment and storage medium
CN117874846B (en) * 2023-12-19 2025-08-08 岚图汽车科技有限公司 Part structure detection method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN116358856B (en) 2026-01-27

Similar Documents

Publication Publication Date Title
CN109741374B (en) Point cloud registration rotation transformation method, point cloud registration equipment and readable storage medium
CN110334390B (en) Method, device, storage medium and processor for external wall recognition in CAD
US20050114059A1 (en) Point cloud measuring system and method
CN114048539B (en) CAD file analysis and rule judgment method and related device
CN109241043B (en) Data quality detection method and device
CN114418951A (en) A kind of pad detection method, device, computer equipment and storage medium
CN102567565A (en) Cable parameter processing method and system utilizing same
CN113722836A (en) Welding size management method, system, equipment and medium
CN110909804B (en) Method, device, server and storage medium for detecting abnormal data of base station
CN118602948A (en) A quality inspection method, device and storage medium for vehicle parts
CN116358856A (en) Buckle detection method, device, equipment and storage medium
CN110751141A (en) A meter reading identification method, device, terminal equipment and storage medium
CN109948107A (en) Area surface integral calculation method, device, equipment and storage medium
CN115544620B (en) Methods, devices, equipment, and storage media for analyzing door and window schedules in drawings.
CN115422617A (en) Frame image size measuring method, device and medium based on CAD
CN114444185A (en) In-situ labeling identification method and device and electronic equipment
CN119557829A (en) A method, device, equipment and medium for fusion of data of Internet of Things
CN114065334A (en) Method and device for determining measurement position of virtual guiding rule and storage medium
CN114881503B (en) Method, device, equipment and storage medium for determining a score
CN117650994A (en) Asset mapping method and system based on network space mapping multisource fusion
CN115630159A (en) A privacy compliance detection method, device, system, equipment and storage medium
CN115802376A (en) Method and device for calibrating work parameter data, electronic equipment and storage medium
CN101398899B (en) System and method for auto- recognizing metal plate part edge type
CN111640164A (en) Method for quantifying visible domain of urban rail transit station identifier
CN117437602B (en) Dual-layer data calibration method, device, equipment and readable storage medium

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