一种枪支及散件三维模型数据库的建立方法及数据库系统A method and database system for establishing a three-dimensional model database of firearms and spare parts
技术领域technical field
本发明涉及枪支数据管理领域,特别涉及一种枪支及散件三维模型数据库的建立方法及数据库系统。The invention relates to the field of firearm data management, in particular to a method and database system for establishing a three-dimensional model database of firearms and spare parts.
背景技术Background technique
枪支具有强大的威力,每年我国海关缴获大量非法走私入境的大杀伤力枪支及枪弹,违法分子为了逃避执法监管,往往使用各种手法将枪支拆散、化整为零或改装后走私入境,这些枪支及零部件不容易辨认,例如辨认某个零件是否枪支的零部件?如果是,又属于哪一个型号枪支的哪个部件?我国现在还没有一个完整的枪支及其散件的数据库,这将导致需要花费大量人力物力进行甄别查证,给走私案件侦破工作带来了极大困难。在如今这个快速发展的数字化时代,将现实世界的物体快速准确的转换至计算机中,实现信息化识别和处理已经成为了一种热门方法。所以,一个枪支及散件三维模型数据库的建立方法和数据库系统对非法枪支及散件的管理、快速准确查找具有重要的意义。Guns are powerful. Every year, my country's customs seize a large number of mass-destruction guns and bullets that are illegally smuggled into China. In order to avoid law enforcement and supervision, criminals often use various methods to dismantle, break up, or modify the guns and smuggle them into China. And the parts are not easy to identify, for example, to identify whether a part is a part of a gun? If so, which part of which model of firearm does it belong to? my country still does not have a complete database of firearms and their parts, which will require a lot of manpower and material resources for screening and verification, which will bring great difficulties to the detection of smuggling cases. In today's fast-developing digital age, it has become a popular method to quickly and accurately convert real-world objects into computers to realize information-based recognition and processing. Therefore, the establishment method and database system of a three-dimensional model database of firearms and their spare parts are of great significance to the management and quick and accurate search of illegal firearms and spare parts.
申请号为201810047270.6的发明专利,公开了一种枪支安全管控系统。包括枪支上设置的跟踪定位模块、枪支存护器具或枪支保管位置上设置的人体生物特征传感器、枪支保管位置所设的移离位确认模块、后台监管指挥中心、授权监管平台和监控设备。申请号为CN201911111508.8的发明专利,提出了一种基于ZigBee协议的枪支管控方法。基于ZigBee协议的枪支管控方法能够实现对枪支的使用信息进行查询、统计,提高军队枪支管理效率,减少人工管理所出现的失误。The invention patent application number 201810047270.6 discloses a gun safety control system. It includes the tracking and positioning module set on the gun, the human biometric sensor set on the gun storage device or the gun storage position, the displacement confirmation module set at the gun storage position, the background supervision command center, the authorized supervision platform and the monitoring equipment. The invention patent application number CN201911111508.8 proposes a gun control method based on the ZigBee protocol. The gun control method based on the ZigBee protocol can realize the query and statistics of the use information of guns, improve the efficiency of gun management in the army, and reduce the mistakes in manual management.
以上专利都是针对枪支的安全管控而提出的,在枪支数据库这一块处于空白状态。本发明针对现有枪支数据库的空白,提供一种枪支及其散件 三维数据库建立方法及数据库系统,并且建立起多种三维模型数据库检索功能,以实现枪支及其散件的快速准确检验鉴定。The above patents are all proposed for the safety control of firearms, and are in a blank state in the firearms database. Aiming at the blank of the existing firearm database, the invention provides a method and database system for establishing a three-dimensional database of firearms and their parts, and establishes a variety of three-dimensional model database retrieval functions to realize rapid and accurate inspection and identification of firearms and their parts.
发明内容SUMMARY OF THE INVENTION
针对现有技术中的缺陷,本发明提出了一种枪支及散件三维模型数据库的建立方法及数据库系统。Aiming at the defects in the prior art, the present invention proposes a method and database system for establishing a three-dimensional model database of firearms and spare parts.
具体的,本发明提出了以下具体的实施例:Specifically, the present invention proposes the following specific embodiments:
本发明实施例还提出了一种枪支及散件三维模型数据库的建立方法,该方法包括:The embodiment of the present invention also provides a method for establishing a three-dimensional model database of firearms and loose parts, the method comprising:
采集枪支及散件的属性信息、平面图像信息以及三维结构模型;Collect attribute information, plane image information and three-dimensional structural models of guns and spare parts;
将所述属性信息、所述平面图像信息以及所述三维结构模型存在数据库中,形成枪支及散件数据库;Store the attribute information, the plane image information and the three-dimensional structural model in a database to form a firearms and spare parts database;
当接收到包含检索数据的检索要求时,基于所述检索数据在所述枪支及散件数据库中进行匹配,并将匹配得到的结果进行反馈。When a retrieval request including retrieval data is received, matching is performed in the firearms and spare parts database based on the retrieval data, and the matching result is fed back.
在一个具体的实施例中,In a specific embodiment,
所述枪支的属性信息包括:序号、质量、尺寸、口径、名称、结构、生产国、产商、型号、生产年代、表面标识、材质信息;The attribute information of the gun includes: serial number, quality, size, caliber, name, structure, country of manufacture, manufacturer, model, production year, surface identification, and material information;
所述散件的属性信息包括:序号、质量、尺寸、名称、结构、生产国、产商、型号、生产年代、表面标识、材质信息。The attribute information of the spare parts includes: serial number, quality, size, name, structure, country of manufacture, manufacturer, model, production age, surface identification, and material information.
在一个具体的实施例中,所述散件包括标准件与非标准件;In a specific embodiment, the loose parts include standard parts and non-standard parts;
所述标准件的三维结构模型是通过在预设三维模型库中选择相同类型的其他标准件进行参数修改得到的;或通过特征正向建模得到;或通过机械测量与正向建模结合的方法来进行建模得到;The three-dimensional structural model of the standard part is obtained by selecting other standard parts of the same type in the preset three-dimensional model library for parameter modification; or by forward modeling of features; or by combining mechanical measurement and forward modeling method to model;
所述非标准件的三维结构模型是先通过面结构光三维扫描仪获得点云数据,再经过图形工作站对所述点云数据进行图形处理重建得到三维结构数据,后将三维结构数据导入到三维建模软件经过建模处理得到;或通过手持式扫描仪进行扫描获得点云数据,然后采取Geomagic Design X软件对所述点云数据进行逆向建模以及特征处理得到形体数据,通过三维建模软件基于所述形体数据进行建模处理得到。The three-dimensional structure model of the non-standard part is obtained by first obtaining point cloud data through a surface structured light three-dimensional scanner, and then performing graphic processing and reconstruction on the point cloud data through a graphics workstation to obtain three-dimensional structure data, and then importing the three-dimensional structure data into the three-dimensional structure data. The modeling software is obtained through modeling processing; or point cloud data is obtained by scanning with a hand-held scanner, and then Geomagic Design X software is used to reverse the modeling and feature processing of the point cloud data to obtain shape data, which is then obtained through 3D modeling software. It is obtained by performing modeling processing based on the shape data.
在一个具体的实施例中,所述平面图像信息是基于对所述三维结构模型进行投影,以降低维数来得到。In a specific embodiment, the plane image information is obtained by projecting the three-dimensional structural model to reduce the dimension.
在一个具体的实施例中,所述平面图像信息是基于对所述三维结构模型进行投影,得到不少于6个视角的二维投影图;并对所述二维投影图先基于卷积神经网络对图像进行预处理,再使用尺度不变特征变换算法与ORB算法进行特征提取得到。In a specific embodiment, the plane image information is based on projecting the three-dimensional structural model to obtain a two-dimensional projection map with no less than 6 viewing angles; and the two-dimensional projection map is first based on a convolutional neural network The network preprocesses the image, and then uses the scale-invariant feature transformation algorithm and the ORB algorithm to extract features.
在一个具体的实施例中,还包括:In a specific embodiment, it also includes:
在获取到新增的所述属性信息、所述平面图像信息以及所述三维结构模型后,在所述枪支及散件数据库进行检索匹配;After acquiring the newly added attribute information, the plane image information and the three-dimensional structural model, search and match in the firearms and spare parts database;
若检索的结果为所述枪支及散件数据库中没有匹配的数据,则将获取到的所述属性信息、所述平面图像信息以及所述三维结构模型存储到枪支及散件数据库中。If the retrieval result is that there is no matching data in the firearms and spare parts database, the acquired attribute information, the plane image information and the three-dimensional structure model are stored in the firearms and spare parts database.
在一个具体的实施例中,还包括:In a specific embodiment, it also includes:
基于获取到所述属性信息、所述平面图像信息、所述三维结构模型对所述枪支及散件数据库进行数据更新;所述数据更新包括数据修改、数据补充以及数据删除。Based on the acquired attribute information, the plane image information, and the three-dimensional structure model, data update is performed on the firearms and spare parts database; the data update includes data modification, data supplementation, and data deletion.
在一个具体的实施例中,还包括:In a specific embodiment, it also includes:
基于所述枪支及散件数据库对枪支及散件的信息进行查询、统计、监督、分析。Based on the firearms and spare parts database, query, count, supervise and analyze the information of firearms and spare parts.
在一个具体的实施例中,所述检索包括:属性信息检索、平面图像信息匹配筛选、三维模型特征匹配筛选。In a specific embodiment, the retrieval includes: attribute information retrieval, plane image information matching screening, and three-dimensional model feature matching screening.
本发明实施例还提出了一种枪支及散件三维模型数据库系统,包括:The embodiment of the present invention also proposes a three-dimensional model database system for firearms and spare parts, including:
采集模块,用于采集枪支及散件的属性信息、平面图像信息以及三维结构模型;The acquisition module is used to collect the attribute information, plane image information and 3D structural model of guns and spare parts;
数据库模块,用于将所述属性信息、所述平面图像信息以及所述三维结构模型存在数据库中,形成枪支及散件数据库;a database module for storing the attribute information, the plane image information and the three-dimensional structure model in a database to form a firearms and spare parts database;
检索模块,用于当接收到包含检索数据的检索要求时,基于所述检索数据在所述枪支及散件数据库中进行匹配,并将匹配得到的结果进行反馈。The retrieval module is used for matching in the firearms and spare parts database based on the retrieval data when a retrieval request including retrieval data is received, and feeding back the result obtained by the matching.
以此,相较于现有技术,本发明的方案具有以下优点:In this way, compared with the prior art, the solution of the present invention has the following advantages:
(1)实现了枪支及其散件的三维重建;(2)建立了枪支及其散件的数据库,其中将属性信息、平面图像信息、三维结构模型等各种信息都涵盖其中;(3)在数据库检索功能上,丰富了检索的方法,有三种方法可供检索选择,提高检索功能的准确性和可靠性。(1) Realized 3D reconstruction of guns and their parts; (2) Established a database of guns and their parts, including attribute information, plane image information, 3D structural models and other information; (3) In terms of database retrieval function, the retrieval methods are enriched, and there are three methods for retrieval selection, which improves the accuracy and reliability of retrieval functions.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and therefore do not It should be regarded as a limitation of the scope, and for those of ordinary skill in the art, other related drawings can also be obtained according to these drawings without any creative effort.
图1为本发明实施例提出的一种枪支及散件数据库的建立方法的流程 示意图;Fig. 1 is the schematic flow chart of the establishment method of a kind of firearms and spare parts database proposed by the embodiment of the present invention;
图2为本发明实施例提出的一种枪支及散件三维模型数据库的建立方法中采集枪支及散件的属性信息、平面图像信息以及三维结构模型的框架示意图;2 is a schematic diagram of a framework for collecting attribute information, plane image information, and three-dimensional structural models of firearms and their spare parts in a method for establishing a three-dimensional model database of firearms and their spare parts according to an embodiment of the present invention;
图3为本发明实施例提出的一种枪支及散件三维模型数据库的建立方法中采集枪支及散件的属性信息、平面图像信息以及三维结构模型的基本组成框架示意图;3 is a schematic diagram of a basic composition framework for collecting attribute information, plane image information, and three-dimensional structural models of firearms and their spare parts in a method for establishing a three-dimensional model database of firearms and their spare parts proposed by an embodiment of the present invention;
图4为本发明实施例提出的一种枪支及散件三维模型数据库的建立方法中检索的框架示意图;4 is a schematic diagram of a retrieval frame in a method for establishing a three-dimensional model database of firearms and parts provided by an embodiment of the present invention;
图5为本发明实施例提出的一种枪支及散件三维模型数据库的结构示意图。FIG. 5 is a schematic structural diagram of a three-dimensional model database of firearms and loose parts according to an embodiment of the present invention.
具体实施方式detailed description
在下文中,将更全面地描述本公开的各种实施例。本公开可具有各种实施例,并且可在其中做出调整和改变。然而,应理解:不存在将本公开的各种实施例限于在此公开的特定实施例的意图,而是应将本公开理解为涵盖落入本公开的各种实施例的精神和范围内的所有调整、等同物和/或可选方案。Hereinafter, various embodiments of the present disclosure will be described more fully. The present disclosure is capable of various embodiments, and adaptations and changes may be made therein. It should be understood, however, that there is no intention to limit the various embodiments of the present disclosure to the specific embodiments disclosed herein, but the present disclosure should be construed to cover various embodiments falling within the spirit and scope of the present disclosure. All adjustments, equivalents and/or alternatives.
在本公开的各种实施例中使用的术语仅用于描述特定实施例的目的并且并非意在限制本公开的各种实施例。如在此所使用,单数形式意在也包括复数形式,除非上下文清楚地另有指示。除非另有限定,否则在这里使用的所有术语(包括技术术语和科学术语)具有与本公开的各种实施例所属领域普通技术人员通常理解的含义相同的含义。所述术语(诸如在一般使用的词典中限定的术语)将被解释为具有与在相关技术领域中的语境含义相同的含义并且将不被解释为具有理想化的含义或过于正式的含义, 除非在本公开的各种实施例中被清楚地限定。The terminology used in the various embodiments of the present disclosure is for the purpose of describing particular embodiments only and is not intended to limit the various embodiments of the present disclosure. As used herein, the singular is intended to include the plural as well, unless the context clearly dictates otherwise. Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of this disclosure belong. The terms (such as those defined in commonly used dictionaries) will be interpreted as having the same meaning as the contextual meaning in the relevant technical field and will not be interpreted as having an idealized or overly formal meaning, unless explicitly defined in various embodiments of the present disclosure.
实施例1Example 1
本发明实施例1公开了一种枪支及散件三维模型数据库的建立方法,如图1所示,该方法包括以下步骤:Embodiment 1 of the present invention discloses a method for establishing a three-dimensional model database of firearms and loose parts. As shown in FIG. 1 , the method includes the following steps:
步骤101、采集枪支及散件的属性信息、平面图像信息以及三维结构模型;Step 101: Collect attribute information, plane image information and three-dimensional structural model of guns and spare parts;
步骤102、将所述属性信息、所述平面图像信息以及所述三维结构模型存在数据库中,形成枪支及散件数据库;Step 102: Store the attribute information, the plane image information and the three-dimensional structure model in a database to form a firearms and spare parts database;
步骤103、当接收到包含检索数据的检索要求时,基于所述检索数据在所述枪支及散件数据库中进行匹配,并将匹配得到的结果进行反馈。Step 103: When a retrieval request including retrieval data is received, matching is performed in the firearms and spare parts database based on the retrieval data, and the result obtained by the matching is fed back.
在一个具体的实施例中,所述枪支的属性信息包括:序号、质量、尺寸、口径、名称、结构、生产国、产商、型号、生产年代、表面标识、材质信息;所述散件的属性信息包括:序号、质量、尺寸、名称、结构、生产国、产商、型号、生产年代、表面标识、材质信息。In a specific embodiment, the attribute information of the firearm includes: serial number, quality, size, caliber, name, structure, country of manufacture, manufacturer, model, age of manufacture, surface identification, and material information; The attribute information includes: serial number, quality, size, name, structure, country of manufacture, manufacturer, model, production year, surface identification, and material information.
具体的,数据库的建立方法主要就是进行多种数据的采集方法,如图2与图3所示,包括属性信息采集、三维结构扫描重建、三维结构点云特征信息采集、二维图像特征信息采集。其中属性信息采集负责采集枪支及散件的基础属性,绘制成文本信息。枪支信息数据的基础属性信息如下:对于枪支整枪,文本信息数据包括序号、质量、尺寸、口径、-、材质信息等信息,以及名称、结构、生产国、产商、型号、生产年代、表面标识等信息。对于散件,文本信息数据包括序号、质量、尺寸、、材质信息等信息,以及名称、结构、生产国、产商、型号、生产年代、表面标识等信息。此外,对于有些待检枪支,有些是已知的,有些是未知的,所以属性信息的采集是选择性的(能确定就填,不能确定就不填)。但是,以下几种属性信息是必须采集的:散件的质量和枪支的质量、长度、口径。Specifically, the database establishment method is mainly to collect various data, as shown in Figure 2 and Figure 3, including attribute information collection, 3D structure scanning and reconstruction, 3D structure point cloud feature information collection, and 2D image feature information collection . Among them, attribute information collection is responsible for collecting the basic attributes of guns and spare parts, and drawing them into text information. The basic attribute information of gun information data is as follows: For a complete gun, the text information data includes serial number, quality, size, caliber, -, material information and other information, as well as name, structure, country of production, manufacturer, model, production year, surface identification and other information. For loose parts, the text information data includes information such as serial number, quality, size, and material information, as well as information such as name, structure, country of manufacture, manufacturer, model, production age, and surface identification. In addition, for some firearms to be inspected, some are known and some are unknown, so the collection of attribute information is optional (if you can confirm it, fill it in, if you can't confirm it, do not fill in). However, the following attribute information must be collected: the quality of the parts and the quality, length, and caliber of the gun.
在一个具体的实施例中,所述散件包括标准件(如螺丝、弹簧、枪管等)与非标准件(如枪柄、枪管套筒等);由此,在对三维结构扫描重建开始时候要先对将枪支的散件进行分类,标准零件和非标准零件。In a specific embodiment, the loose parts include standard parts (such as screws, springs, barrels, etc.) and non-standard parts (such as gun handles, barrel sleeves, etc.); thus, when scanning and reconstructing three-dimensional structures At the beginning, it is necessary to classify the loose parts of the firearm, standard parts and non-standard parts.
所述标准件的三维结构模型是通过在预设三维模型库中选择相同类型的其他标准件进行参数修改得到的;或通过特征正向建模得到;或通过机械测量与正向建模结合的方法来进行建模得到;对于标准件,一部分如螺丝、螺母、螺栓等日常使用的小零件,这些零件在枪械拆解中占的总数较大,如果一个一个重新建模耗时长无意义,因此可以在Solidwork库中选取相同类型的标准件进行参数修改,生成所需要的零件。还有一部分标准件则是Solidwork库中没有的零件,这就需要通过简单特征正向建模来得到,如销钉等,对于这些能够一眼看出建模特征的零件,则可以采用机械测量与正向建模结合的方法来进行建模。The three-dimensional structural model of the standard part is obtained by selecting other standard parts of the same type in the preset three-dimensional model library for parameter modification; or by forward modeling of features; or by combining mechanical measurement and forward modeling It can be obtained by modeling; for standard parts, some small parts such as screws, nuts, bolts and other small parts used in daily life, these parts account for a large total in the dismantling of firearms. You can select the same type of standard parts in the Solidwork library to modify the parameters to generate the required parts. There are also some standard parts that are not in the Solidwork library, which need to be obtained by forward modeling of simple features, such as pins, etc. For these parts that can see the modeling features at a glance, mechanical measurement and normalization can be used. Modeling is carried out using a combined approach to modeling.
所述非标准件的三维结构模型是先通过面结构光三维扫描仪获得点云数据,再经过图形工作站对所述点云数据进行图形处理重建得到三维结构数据,后将三维结构数据导入到三维建模软件经过建模处理得到;或通过手持式扫描仪进行扫描获得点云数据,然后采取Geomagic Design X软件对所述点云数据进行逆向建模以及特征处理得到形体数据,通过三维建模软件基于所述形体数据进行建模处理得到。对于非标准件,局部复杂件,指的在某些局部领域存在复杂曲线的零件,如枪械的弹簧片。这些零件虽然能够看出建模特征,但是不易得到其局部曲线,因此可以使用面结构光三维扫描仪获得点云数据,经过图形工作站的图形处理重建得到三维结构数据后导入到Solidworks经过建模处理得到更精细的三维结构。还有整体复杂件,指的是整个零件多处有着复杂曲线曲面,无法看出建模特征的零件,如枪身等大型零件,对于这种无法测量难以进行特征处理的零件,则可以完全通过手持式扫描仪进行扫描获得点云数据STL文件,然后采取Geomagic Design X软件进行逆向建模以及特征处理可以得到形体数据,通过SolidWorks进行建模处理得到更精细的三维结构。The three-dimensional structure model of the non-standard part is obtained by first obtaining point cloud data through a surface structured light three-dimensional scanner, and then performing graphic processing and reconstruction on the point cloud data through a graphics workstation to obtain three-dimensional structure data, and then importing the three-dimensional structure data into the three-dimensional structure data. The modeling software is obtained through modeling processing; or point cloud data is obtained by scanning with a hand-held scanner, and then Geomagic Design X software is used to reverse the modeling and feature processing of the point cloud data to obtain shape data, which is then obtained through 3D modeling software. It is obtained by performing modeling processing based on the shape data. For non-standard parts and local complex parts, it refers to parts with complex curves in some local areas, such as the springs of firearms. Although the modeling features of these parts can be seen, it is not easy to obtain their local curves. Therefore, the point cloud data can be obtained by using a surface structured light 3D scanner, and the 3D structural data can be reconstructed through the graphics processing of the graphics workstation and then imported into Solidworks for modeling processing. A finer three-dimensional structure is obtained. There are also overall complex parts, which refer to parts with complex curves and surfaces in many parts of the whole part, and the modeling features cannot be seen, such as large parts such as gun bodies. The hand-held scanner scans to obtain point cloud data STL files, and then uses Geomagic Design X software for reverse modeling and feature processing to obtain shape data, and SolidWorks for modeling and processing to obtain finer three-dimensional structures.
由此,针对标准零件,如螺丝、弹簧、枪管等,利用机械建模软件绘制三维结构模型;针对非标零件,如枪柄、枪管套筒等,利用三维扫描技术重建三维结构模型(包括不限于线激光扫描和面结构光扫描)。三维结构模型存储进数据库的时要统一文件存储类型,要对每个三维结构模型进行基础属性文本介绍,写明枪支名称、枪支类别、零件名称,零件类别、材质、尺寸等基础信息。Therefore, for standard parts, such as screws, springs, barrels, etc., use mechanical modeling software to draw 3D structural models; for non-standard parts, such as gun handles, barrel sleeves, etc., use 3D scanning technology to reconstruct 3D structural models ( Including but not limited to line laser scanning and surface structured light scanning). When storing the 3D structure model in the database, the file storage type should be unified, and the basic attribute text should be introduced for each 3D structure model, and the basic information such as gun name, gun category, part name, part category, material, size, etc. should be written.
在进行枪支及其散件的三维重建时会得到它们的点云数据,点云数据是通过三维数据采集设备获得的,通过数据采集仪器测量物体表面的信息,并转换为三维坐标数据,就能得到对应的点云数据集合。在获得点云数据集合后,要对点云数据进行特征提取,点云特征提取的主要方法是在网格建模的基础上,通过网格模型的几何信息和拓扑信息来提取散件的特征点,有了物体表面的点云数据后就可以快速并准确地重建出三维结构模型。During the three-dimensional reconstruction of guns and their parts, their point cloud data will be obtained. The point cloud data is obtained by the three-dimensional data acquisition equipment. The information on the surface of the object is measured by the data acquisition instrument and converted into three-dimensional coordinate data. Get the corresponding point cloud data set. After obtaining the point cloud data set, it is necessary to perform feature extraction on the point cloud data. The main method of point cloud feature extraction is to extract the features of the scattered parts through the geometric information and topology information of the grid model on the basis of grid modeling. With the point cloud data on the surface of the object, the 3D structural model can be quickly and accurately reconstructed.
进一步的,三维结构扫描重建对散件进行面结构光扫描或线激光扫描至少包括:面结构光三维扫描仪、手持三维扫描仪、图形工作站、专业三维建模软件。Further, the surface structured light scanning or line laser scanning of the 3D structure scanning and reconstruction of the loose parts includes at least: a surface structured light 3D scanner, a handheld 3D scanner, a graphics workstation, and professional 3D modeling software.
面结构光三维扫描仪用于对零部件、枪弹进行数字化三维扫描,具有自动化、快速、高精度的优点,可以实现不同种类、不同结构的枪支零部件、枪弹的扫描,面结构光三维扫描仪由投影设备和相机组成。Surface structured light 3D scanner is used for digital 3D scanning of parts and bullets. It has the advantages of automation, speed and high precision. It can scan different types and structures of gun parts and bullets. Surface structured light 3D scanner Consists of projection equipment and cameras.
手持三维扫描仪属于线激光扫描仪,小巧方便携带,可以使操作员从任意角度扫描物体并拼接成360°的三维模型,具有极佳的扫描精确度和采集速度。可以根据枪支及散件的种类大小来选择不同的扫描仪。Handheld 3D scanners are line laser scanners, which are small and portable, allowing operators to scan objects from any angle and splicing them into a 360° 3D model, with excellent scanning accuracy and acquisition speed. Different scanners can be selected according to the type and size of guns and loose parts.
图形工作站具有强大的图形处理能力,安装有三维扫描仪配套的软件,根据从三维扫描仪获取的点云数据,经过图形处理重建得到三维结构数据。此时,得到的三维结构数据是比较粗糙的,而且可能有缺陷,将会被导入到专业三维建模软件,经过建模处理得到更精细的三维结构。同时, 在专业三维建模软件中可以直接得出散件的尺寸、体积,枪弹的长度、口径、体积。专业三维建模软件例如Solidworks、三维MAX、UG、ProE等,其他一些如Geomagic Studio、Geomagic Design X软件同样可以配合使用。三维结构的数据输出格式为通用的三维文件格式,例如stp、igs、stl等。The graphics workstation has powerful graphics processing capabilities, and is equipped with software supporting the 3D scanner. According to the point cloud data obtained from the 3D scanner, the 3D structural data is reconstructed through graphics processing. At this time, the obtained 3D structure data is relatively rough and may be defective, and will be imported into professional 3D modeling software, and a finer 3D structure will be obtained through modeling processing. At the same time, the size and volume of the parts, the length, caliber and volume of the bullet can be directly obtained in the professional 3D modeling software. Professional 3D modeling software such as Solidworks, 3D MAX, UG, ProE, etc., and other software such as Geomagic Studio and Geomagic Design X can also be used together. The data output format of the three-dimensional structure is a general three-dimensional file format, such as stp, igs, stl, etc.
同时,在进行枪支及其散件三维扫描时会得到它们的点云数据。通过三维扫描仪可以采集到物体的点云数据,然后转换为三维坐标数据,就能得到对应的点云数据集合。在获得点云数据集合后,要对点云数据进行特征提取,点云特征提取的主要方法是在网格建模的基础上,通过网格模型的几何信息和拓扑信息来提取散件的特征点,然后可以根据这些特征点生成特征线、特征面。三维点云数据的特征提取是数据库进行三维模型检索应用的基础。At the same time, point cloud data of guns and their parts are obtained when 3D scanning is performed. The point cloud data of the object can be collected by the 3D scanner, and then converted into 3D coordinate data, and the corresponding point cloud data set can be obtained. After obtaining the point cloud data set, it is necessary to perform feature extraction on the point cloud data. The main method of point cloud feature extraction is to extract the features of the scattered parts through the geometric information and topology information of the grid model on the basis of grid modeling. Points, and then you can generate feature lines and feature surfaces based on these feature points. The feature extraction of 3D point cloud data is the basis of the database for 3D model retrieval application.
在一个具体的实施例中,所述平面图像信息是基于对所述三维结构模型进行投影,以降低维数来得到。进一步的,所述平面图像信息是基于对所述三维结构模型进行投影,得到不少于6个视角的二维投影图;并对所述二维投影图先基于卷积神经网络对图像进行预处理,再使用尺度不变特征变换算法与ORB算法进行特征提取得到。In a specific embodiment, the plane image information is obtained by projecting the three-dimensional structural model to reduce the dimension. Further, the plane image information is based on projecting the three-dimensional structural model to obtain a two-dimensional projection map with no less than 6 viewing angles; and the two-dimensional projection map is first based on the convolutional neural network. Then use the scale-invariant feature transformation algorithm and the ORB algorithm to perform feature extraction.
此外,在重建出三维结构模型后需要使用投影技术来降低维数得到二维平面图形,投影是指把三维坐标转变为二维坐标的过程,这里使用的投影是透视投影,它的特点是所有投影线都从空间一点即视点或投影中心投射,距离视点近的物体比较大,而距离远的物体相对比较小。对三维结构模型使用透视投影时,要在不少于6个视角下的地方得到二维投影图。得到这些二维投影图后基于卷积神经网络对图像进行处理,然后使用尺度不变特征变换(SIFT)算法、ORB(Oriented FAST and Rotated BRIEF)算法等进行特征提取。即可以得到每个模型多个角度的二维图像特征点。In addition, after reconstructing the three-dimensional structural model, it is necessary to use projection technology to reduce the dimensionality to obtain two-dimensional plane graphics. Projection refers to the process of converting three-dimensional coordinates into two-dimensional coordinates. The projection used here is perspective projection, which is characterized by all the Projection lines are projected from a point in space, that is, the viewpoint or the projection center. Objects close to the viewpoint are relatively large, while objects farther away are relatively small. When using perspective projection on a 3D structural model, obtain a 2D projection at no less than 6 viewing angles. After obtaining these two-dimensional projection maps, the images are processed based on the convolutional neural network, and then the scale-invariant feature transformation (SIFT) algorithm and the ORB (Oriented FAST and Rotated BRIEF) algorithm are used for feature extraction. That is, two-dimensional image feature points of multiple angles of each model can be obtained.
进一步的,还包括:在获取到新增的所述属性信息、所述平面图像信息以及所述三维结构模型后,在所述枪支及散件数据库进行检索匹配;Further, it also includes: after acquiring the newly added attribute information, the plane image information and the three-dimensional structural model, searching and matching in the firearms and spare parts database;
若检索的结果为所述枪支及散件数据库中没有匹配的数据,则将获取到的所述属性信息、所述平面图像信息以及所述三维结构模型存储到枪支及散件数据库中。If the retrieval result is that there is no matching data in the firearms and spare parts database, the acquired attribute information, the plane image information and the three-dimensional structure model are stored in the firearms and spare parts database.
在一个具体的实施例中,基于获取到所述属性信息、所述平面图像信息、所述三维结构模型对所述枪支及散件数据库进行数据更新;所述数据更新包括数据修改、数据补充以及数据删除;此外,基于所述枪支及散件数据库对枪支及散件的信息进行查询、统计、监督、分析。In a specific embodiment, data updating is performed on the firearms and spare parts database based on the acquired attribute information, the planar image information, and the three-dimensional structural model; the data updating includes data modification, data supplementation, and Data deletion; in addition, based on the firearms and spare parts database, query, statistics, supervise and analyze the information of firearms and spare parts.
具体的,数据库中对于枪支及散件的信息管理也很重要,具体的包括如下管理过程:Specifically, the information management of firearms and spare parts in the database is also very important, including the following management processes:
(1)对于新增的枪支及散件,在枪支信息采集方法中输入其基础属性信息、平面图像信息以及三维结构扫描重建获取的三维结构信息,通过信息检索功能进行比对,查看数据库中的散件是否与上述采集信息匹配;如果没有发现匹配数据,在数据库新建该数据。(1) For newly added guns and spare parts, enter their basic attribute information, plane image information, and 3D structure information obtained by 3D structure scanning and reconstruction in the gun information collection method, compare them through the information retrieval function, and check the information in the database. Whether the parts match the above collected information; if no matching data is found, create the data in the database.
(2)根据现状的发展步伐,逐步对数据库的枪支及散件数据进行更新,包括数据修改、补充、删除等。(2) According to the development pace of the current situation, gradually update the firearms and spare parts data in the database, including data modification, addition, deletion, etc.
(3)数据库内可以对枪支及散件的信息进行查询、统计、监督、分析等,例如种类统计、结构统计、来源地统计等。(3) In the database, the information of firearms and spare parts can be inquired, counted, monitored, analyzed, etc., such as type statistics, structure statistics, source statistics, etc.
在一个具体的实施例中,如图4所示,所述检索包括:属性信息检索、平面图像信息匹配筛选、三维模型特征匹配筛选。In a specific embodiment, as shown in FIG. 4 , the retrieval includes: attribute information retrieval, plane image information matching screening, and three-dimensional model feature matching screening.
以下,对枪支散件在数据库的快速检索匹配方法进行详述:The following is a detailed description of the rapid retrieval and matching method of gun parts in the database:
对于待检索的枪支散件,在枪支信息采集上进行属性信息采集、平面图像信息采集,并利用三维结构扫描重建模块获取三维结构信息,得到零部件的质量M、最大长度L、体积V、二维图像特征集合P、三维结构点云特征信息T,对数据库里面的散件数据进行检索和比对。二维图像特征集合P指的是有多张不同角度、方向的图像所提取出来的特征集合,P={p
1,p
2,p
3...,p
k},k为图像的张数。特征提取的算法包括尺度不变特征转换 (SIFT)、局部特征(SURF)、k-means聚类算法等。三维结构点云信息是通过三维数据扫描仪得到的,通过扫描散件转换为三维坐标数据,就能得到其对应的点云数据集合。点云特征里面有散件表面关键的几何和拓扑信息,可以精确描述一个物体。特征提取就是指从目标点云数据中提取出那些能够表示物体几何特性或纹理特征的点,然后根据这些特征点逆向生成物体的过程。进行特征提取的主要目标就是这些形状特征点,这些特征点可以帮助我们在检索时快速与数据库中的数据进行匹配。
For the gun parts to be retrieved, collect attribute information and plane image information on the gun information collection, and use the three-dimensional structure scanning and reconstruction module to obtain the three-dimensional structure information, and obtain the mass M, maximum length L, volume V, two The 3D image feature set P and the 3D structure point cloud feature information T are used to retrieve and compare the bulk data in the database. The two-dimensional image feature set P refers to a feature set extracted from multiple images with different angles and directions, P={p 1 , p 2 , p 3 ..., p k }, k is the number of images . Feature extraction algorithms include scale-invariant feature transformation (SIFT), local feature (SURF), and k-means clustering algorithms. The three-dimensional structure point cloud information is obtained by a three-dimensional data scanner. By converting the scanned parts into three-dimensional coordinate data, the corresponding point cloud data set can be obtained. The point cloud feature contains the key geometric and topological information of the surface of the loose part, which can accurately describe an object. Feature extraction refers to the process of extracting those points that can represent the geometric characteristics or texture features of objects from the target point cloud data, and then generating objects inversely based on these feature points. The main target of feature extraction is these shape feature points, which can help us quickly match the data in the database during retrieval.
接下来说明几种方法,首先就是关键词基础信息文本检索,当知道某检验鉴定的枪支散件的一些基础信息时(如标识、种类、生产国、产商、型号、生产年代等信息),输入这些文本来与数据库中的信息进行比对直接相似度,当检索到一样的文本信息时则返回相似度最高的n个散件信息。如果知道零部件的质量M
1、最大长度L
1、体积V
1等数值信息,则可以寻找满足|M
1/M-1|<γ
M,|L
1/L-1|<γ
L,|V
1/V-1|<γ
V条件的所有散件集合{B},γ为误差控制系数,主要是考虑零部件的加工、测量、磨损等各种因素引起的误差,所以返回匹配分数最高的n个零部件信息。如果输入的是二维图像或者三维模型,数据库就会进行特征提取,将提取得到的二维图像特征信息或者三维结构点云特征信息,与数据库中的二维图像特征集合P或是三维结构点云特征信息T开展特征匹配,根据匹配分数高低将零部件排序,返回匹配分数最高的n个零部件信息。现有的特征匹配方法包括机器学习、深度学习、形态学处理等多种结合。最后由检验人员对返回来的n个零部件进行人工鉴定,包括基础属性、二维图像、三维形状特征等,判断是否匹配成功。
Next, several methods are explained. The first is the text retrieval of basic information of keywords. When you know some basic information of a certain inspection and identification of gun parts (such as identification, type, country of production, manufacturer, model, production age, etc.), These texts are input to compare the direct similarity with the information in the database, and when the same text information is retrieved, the n pieces of information with the highest similarity are returned. If you know the numerical information such as the mass M 1 , the maximum length L 1 , and the volume V 1 of the component, you can search for |M 1 /M-1|<γ M ,|L 1 /L-1|<γ L ,| V 1 /V-1|<γ V set of all parts {B}, γ is the error control coefficient, mainly considering the errors caused by various factors such as machining, measurement, and wear of the parts, so the returned matching score is the highest The n component information of . If the input is a 2D image or a 3D model, the database will perform feature extraction, and the extracted 2D image feature information or 3D structure point cloud feature information will be compared with the 2D image feature set P in the database or the 3D structure point. The cloud feature information T carries out feature matching, sorts the parts according to the matching score, and returns the information of the n parts with the highest matching score. Existing feature matching methods include a combination of machine learning, deep learning, and morphological processing. Finally, the inspectors manually identify the returned n components, including basic attributes, two-dimensional images, three-dimensional shape features, etc., to determine whether the matching is successful.
实施例2Example 2
本发明实施例2还公开了一种枪支及散件三维模型数据库系统,如图5所示,包括:Embodiment 2 of the present invention also discloses a three-dimensional model database system for firearms and loose parts, as shown in FIG. 5 , including:
采集模块201,用于采集枪支及散件的属性信息、平面图像信息以及三维结构模型;The collection module 201 is used to collect the attribute information, plane image information and three-dimensional structure model of the gun and its parts;
数据库模块202,用于将所述属性信息、所述平面图像信息以及所述三维结构模型存在数据库中,形成枪支及散件数据库;The database module 202 is used for storing the attribute information, the plane image information and the three-dimensional structure model in a database to form a firearms and spare parts database;
检索模块203,用于当接收到包含检索数据的检索要求时,基于所述检索数据在所述枪支及散件数据库中进行匹配,并将匹配得到的结果进行反馈。The retrieval module 203 is configured to perform matching in the firearms and spare parts database based on the retrieval data when a retrieval request including retrieval data is received, and feedback the result obtained by the matching.
所述枪支的属性信息包括:序号、质量、尺寸、口径、名称、结构、生产国、产商、型号、生产年代、表面标识、材质信息;The attribute information of the gun includes: serial number, quality, size, caliber, name, structure, country of manufacture, manufacturer, model, production year, surface identification, and material information;
所述散件的属性信息包括:序号、质量、尺寸、名称、结构、生产国、产商、型号、生产年代、表面标识、材质信息。The attribute information of the spare parts includes: serial number, quality, size, name, structure, country of manufacture, manufacturer, model, production age, surface identification, and material information.
枪支及散件数据库主要由数据库服务器和数据库系统管理软件组成。数据库服务器具有强大的存储能力、快速存取数据速度,根据应用需求、布置条件,可以为本地物理服务器,也可以为云服务器。服务器上装有数据库管理软件,例如Oracle,SQL Server,MySQL等。The firearms and spare parts database is mainly composed of database server and database system management software. The database server has powerful storage capacity and fast data access speed. According to application requirements and layout conditions, it can be a local physical server or a cloud server. Database management software such as Oracle, SQL Server, MySQL, etc. are installed on the server.
在一个具体的实施例中,所述散件包括标准件与非标准件;In a specific embodiment, the loose parts include standard parts and non-standard parts;
所述标准件的三维结构模型是通过在预设三维模型库中选择相同类型的其他标准件进行参数修改得到的;或通过特征正向建模得到;或通过机械测量与正向建模结合的方法来进行建模得到;The three-dimensional structural model of the standard part is obtained by selecting other standard parts of the same type in the preset three-dimensional model library for parameter modification; or by forward modeling of features; or by combining mechanical measurement and forward modeling method to model;
所述非标准件的三维结构模型是先通过面结构光三维扫描仪获得点云数据,再经过图形工作站对所述点云数据进行图形处理重建得到三维结构数据,后将三维结构数据导入到三维建模软件经过建模处理得到;或通过手持式扫描仪进行扫描获得点云数据,然后采取Geomagic Design X软件对所述点云数据进行逆向建模以及特征处理得到形体数据,通过三维建模软件基于所述形体数据进行建模处理得到。The three-dimensional structure model of the non-standard part is obtained by first obtaining point cloud data through a surface structured light three-dimensional scanner, and then performing graphic processing and reconstruction on the point cloud data through a graphics workstation to obtain three-dimensional structure data, and then importing the three-dimensional structure data into the three-dimensional structure data. The modeling software is obtained through modeling processing; or point cloud data is obtained by scanning with a handheld scanner, and then Geomagic Design X software is used to perform reverse modeling and feature processing on the point cloud data to obtain shape data, which is then obtained through 3D modeling software. It is obtained by performing modeling processing based on the shape data.
在一个具体的实施例中,所述平面图像信息是基于对所述三维结构模型进行投影,以降低维数来得到。In a specific embodiment, the plane image information is obtained by projecting the three-dimensional structural model to reduce the dimension.
在一个具体的实施例中,所述平面图像信息是基于对所述三维结构模型进行投影,得到不少于6个视角的二维投影图;并对所述二维投影图先基于卷积神经网络对图像进行预处理,再使用尺度不变特征变换算法与ORB算法进行特征提取得到。In a specific embodiment, the plane image information is based on projecting the three-dimensional structural model to obtain a two-dimensional projection map with no less than 6 viewing angles; and the two-dimensional projection map is first based on a convolutional neural network The network preprocesses the image, and then uses the scale-invariant feature transformation algorithm and the ORB algorithm to extract features.
在一个具体的实施例中,还包括:In a specific embodiment, it also includes:
新增模块,用于在获取到新增的所述属性信息、所述平面图像信息以及所述三维结构模型后,在所述枪支及散件数据库进行检索匹配;A new module is used for searching and matching in the firearms and spare parts database after acquiring the newly added attribute information, the plane image information and the three-dimensional structure model;
若检索的结果为所述枪支及散件数据库中没有匹配的数据,则将获取到的所述属性信息、所述平面图像信息以及所述三维结构模型存储到枪支及散件数据库中。If the retrieval result is that there is no matching data in the firearms and spare parts database, the acquired attribute information, the plane image information and the three-dimensional structure model are stored in the firearms and spare parts database.
在一个具体的实施例中,该系统还包括:In a specific embodiment, the system further includes:
更新模块,用于基于获取到所述属性信息、所述平面图像信息、所述三维结构模型对所述枪支及散件数据库进行数据更新;所述数据更新包括数据修改、数据补充以及数据删除。The updating module is used for data updating of the firearms and spare parts database based on the acquired attribute information, the plane image information and the three-dimensional structure model; the data updating includes data modification, data supplementation and data deletion.
基于所述枪支及散件数据库对枪支及散件的信息进行查询、统计、监督、分析。Based on the firearms and spare parts database, query, count, supervise and analyze the information of firearms and spare parts.
在一个具体的实施例中,所述检索包括:属性信息检索、平面图像信息匹配筛选、三维模型特征匹配筛选。In a specific embodiment, the retrieval includes: attribute information retrieval, plane image information matching screening, and three-dimensional model feature matching screening.
本领域技术人员可以理解附图只是一个优选实施场景的示意图,附图中的模块或流程并不一定是实施本发明所必须的。Those skilled in the art can understand that the accompanying drawing is only a schematic diagram of a preferred implementation scenario, and the modules or processes in the accompanying drawing are not necessarily necessary to implement the present invention.
本领域技术人员可以理解实施场景中的装置中的模块可以按照实施场景描述进行分布于实施场景的装置中,也可以进行相应变化位于不同于 本实施场景的一个或多个装置中。上述实施场景的模块可以合并为一个模块,也可以进一步拆分成多个子模块。Those skilled in the art can understand that the modules in the device in the implementation scenario may be distributed in the device in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the implementation scenario with corresponding changes. The modules of the above implementation scenarios may be combined into one module, or may be further split into multiple sub-modules.
上述本发明序号仅仅为了描述,不代表实施场景的优劣。The above serial numbers of the present invention are only for description, and do not represent the pros and cons of the implementation scenarios.
以上公开的仅为本发明的几个具体实施场景,但是,本发明并非局限于此,任何本领域的技术人员能思之的变化都应落入本发明的保护范围。The above disclosures are only a few specific implementation scenarios of the present invention, however, the present invention is not limited thereto, and any changes that can be conceived by those skilled in the art should fall within the protection scope of the present invention.