[go: up one dir, main page]

CN116343253A - CAD drawing length unit and pixel value proportion identification, acquisition and calculation method - Google Patents

CAD drawing length unit and pixel value proportion identification, acquisition and calculation method Download PDF

Info

Publication number
CN116343253A
CN116343253A CN202310233220.8A CN202310233220A CN116343253A CN 116343253 A CN116343253 A CN 116343253A CN 202310233220 A CN202310233220 A CN 202310233220A CN 116343253 A CN116343253 A CN 116343253A
Authority
CN
China
Prior art keywords
ratio
calculating
cad drawing
pixel value
identifying
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.)
Pending
Application number
CN202310233220.8A
Other languages
Chinese (zh)
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.)
Suzhou Weishitong Intelligent Technology Co ltd
Original Assignee
Suzhou Weishitong Intelligent Technology Co ltd
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 Suzhou Weishitong Intelligent Technology Co ltd filed Critical Suzhou Weishitong Intelligent Technology Co ltd
Priority to CN202310233220.8A priority Critical patent/CN116343253A/en
Publication of CN116343253A publication Critical patent/CN116343253A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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

  • Image Analysis (AREA)

Abstract

The invention discloses a method for identifying, acquiring and calculating the ratio of a CAD drawing length unit to a pixel value, which comprises the following operation steps: cutting out the area to be identified, corroding and binarizing to make the scale line on the image obvious, detecting the outline, filtering the outline with too small and too large, judging whether the outline is rectangular, and reserving the rectangle to be predicted; feeding into a model for detection; after the detection is finished, the non-compliance number and the rectangle are filtered, the pixel ratio is calculated, and the comparison value result is taken as the average value of three random samples, so that the result is obtained. The invention relates to a method for identifying, acquiring and calculating the ratio of a CAD drawing length unit to a pixel value, which automatically acquires the pixel value on the CAD drawing and the number of corresponding pixel points on the drawing by using an AI method, thereby calculating the ratio of the pixel points to the length of an actual space and automatically calculating the length of the actual space represented by a building CAD image pixel.

Description

一种CAD图纸长度单位与像素值比例的识别、获取与计算方法A Method for Recognition, Acquisition and Calculation of Length Unit and Pixel Value Ratio of CAD Drawings

技术领域technical field

本发明涉及计算机软件领域,特别涉及一种CAD图纸长度单位与像素值比例的识别、获取与计算方法。The invention relates to the field of computer software, in particular to a method for identifying, acquiring and calculating the ratio between length units and pixel values of CAD drawings.

背景技术Background technique

CAD图纸长度单位与像素值比例的识别、获取与计算方法是一种进行CAD图纸与实际比例计算的方法,用AI的方法,自动化的获取CAD图纸上的像素值并获取其在图纸上相对应的像素点个数,从而计算出像素点与实际空间的长度比例,随着科技的不断发展,人们对于CAD图纸长度单位与像素值比例的识别、获取与计算方法的制造工艺要求也越来越高。The identification, acquisition and calculation method of the length unit and pixel value ratio of CAD drawings is a method for calculating the ratio between CAD drawings and the actual ratio. Using the AI method, the pixel values on the CAD drawings are automatically obtained and their correspondence on the drawings is obtained. The number of pixels, so as to calculate the length ratio of pixels to the actual space. With the continuous development of science and technology, people have more and more requirements for the manufacturing process of identifying, obtaining and calculating the length unit and pixel value ratio of CAD drawings. high.

现有的CAD图纸长度单位与像素值比例的识别、获取与计算方法在使用时存在一定的弊端,目前对CAD图纸像素值与实际空间的长度的比例的计算,依赖于photoshop等专业软件,需要人手工对像素值进行标定,难以满足现有的自动化需求,给实际的使用过程带来了一定的不利影响,为此,我们提出一种CAD图纸长度单位与像素值比例的识别、获取与计算方法。The existing CAD drawing length unit and pixel value ratio identification, acquisition and calculation methods have certain disadvantages in use. At present, the calculation of the ratio of CAD drawing pixel value to the actual space length depends on professional software such as photoshop, which requires Manual calibration of pixel values is difficult to meet the existing automation needs, and has brought certain adverse effects to the actual use process. Therefore, we propose a method for identifying, acquiring and calculating the ratio between length units and pixel values of CAD drawings method.

发明内容Contents of the invention

针对现有技术的不足,本发明提供了一种CAD图纸长度单位与像素值比例的识别、获取与计算方法,用AI的方法,自动化的获取CAD图纸上的像素值并获取其在图纸上相对应的像素点个数,从而计算出像素点与实际空间的长度比例,对建筑类CAD图像像素代表的实际空间的长度进行自动化计算,可以有效解决背景技术中的问题。Aiming at the deficiencies of the prior art, the present invention provides a method for identifying, acquiring and calculating the ratio between the length unit and the pixel value of a CAD drawing, using the method of AI to automatically acquire the pixel value on the CAD drawing and obtain its corresponding value on the drawing. The number of corresponding pixels, so as to calculate the length ratio of the pixels to the actual space, and automatically calculate the length of the actual space represented by the pixels of the architectural CAD image, can effectively solve the problems in the background technology.

为实现上述目的,本发明采取的技术方案为:一种CAD图纸长度单位与像素值比例的识别、获取与计算方法,包括以下操作步骤:In order to achieve the above object, the technical solution adopted by the present invention is: a method for identifying, obtaining and calculating the ratio of length unit and pixel value of a CAD drawing, comprising the following steps:

S1:思路整理:带有数字的标尺线区域,大多是由矩形框定的,对矩形框定位识别,再对矩形内的数字进行识别;S1: Arranging ideas: the area of the scale line with numbers is mostly bounded by a rectangle, locate and identify the rectangle, and then identify the numbers in the rectangle;

S2:区域切分:切分出需要识别的区域,一方面用于区域定位,另一方面为了节省计算资源;S2: Region Segmentation: Segment the region that needs to be identified, on the one hand for regional positioning, and on the other hand to save computing resources;

S3:图像增强预处理:经过腐蚀,二值化,使得图像上的标尺线变得明显,之后检测轮廓,过滤过小过大轮廓后,判断轮廓是不是矩形,对非矩阵的轮廓以及中间无内容的轮廓进行过滤,保留下将要进行预测的矩形;S3: Image enhancement preprocessing: After corrosion and binarization, the scale line on the image becomes obvious, then detects the contour, filters the too small and too large contours, and judges whether the contour is a rectangle. For non-matrix contours and no middle The outline of the content is filtered, and the rectangle to be predicted is reserved;

S4:进行数字检测:为了提高识别的准确率,逐一将矩形改变长宽比和填充后,送入模型检测;S4: Perform digital detection: In order to improve the accuracy of recognition, change the aspect ratio and fill the rectangles one by one, and send them to the model detection;

S5:获取与计算:检测结束后,过滤掉不合规的数字以及矩形后,计算像素比值,对比值结果取三次随机抽样的均值,获得结果。S5: Acquisition and calculation: After the detection is completed, the non-compliant numbers and rectangles are filtered out, and the pixel ratio is calculated, and the comparison value is obtained by taking the average of three random samplings.

作为本申请一种优选的技术方案,所述S4步骤中送入模型检测采用是Paddle框架的paddlepaddleocr模型,包括文字检测和识别部分。As a preferred technical solution of the present application, in the step S4, the input model detection adopts the paddlepaddleocr model of the Paddle framework, including text detection and recognition parts.

作为本申请一种优选的技术方案,所述S4步骤中送入模型检测可以采用其他深度学习框架的调优的ctpn+crnn模型或其他文字/数字识别模型。As a preferred technical solution of the present application, the input model detection in the step S4 can adopt the tuned ctpn+crnn model or other character/number recognition models of other deep learning frameworks.

作为本申请一种优选的技术方案,具体包括以下操作步骤:As a preferred technical solution of the present application, it specifically includes the following steps:

A1:将带有标尺线和标尺线数值的CAD图纸传入本算法当中;A1: Pass the CAD drawings with scale lines and scale line values into this algorithm;

A2:使用本算法的方法,先切分出需要识别的区域;A2: Using the method of this algorithm, first segment out the area to be identified;

A3:对图像增强后做轮廓检测,检测和筛选出矩形轮廓后,将矩形形状变换和填充后逐一送入PaddlePaddleocr检测数字;A3: Do contour detection after image enhancement, detect and filter out the rectangle contour, transform and fill the rectangle shape and send them to PaddlePaddleocr detection numbers one by one;

A4:过滤掉非正规CAD数字后,根据数字和矩形长度上的像素个数,可以计算出CAD图纸中单位像素与实际建筑的距离的比例关系,对多个数字的比例关系结果抽样三次计算均值,即可得到最终结果。A4: After filtering out the irregular CAD numbers, according to the number of pixels on the number and the length of the rectangle, the proportional relationship between the distance between the unit pixel in the CAD drawing and the actual building can be calculated, and the proportional relationship results of multiple numbers are sampled three times to calculate the average , to get the final result.

作为本申请一种优选的技术方案,所述A1-A4步骤中流程为图像切割,预处理,找轮廓,过滤与判断轮廓形状,过滤无内容矩形,模型检测,计算像素比值,筛选像素比值,抽样取均值,结束。As a preferred technical solution of the present application, the processes in the steps A1-A4 are image cutting, preprocessing, finding contours, filtering and judging contour shapes, filtering rectangles without content, model detection, calculating pixel ratios, and screening pixel ratios, Sampling takes the mean value and ends.

作为本申请一种优选的技术方案,所述A1-A4步骤自动化获取CAD图纸的像素值比例。As a preferred technical solution of the present application, the steps A1-A4 automatically obtain the pixel value ratio of the CAD drawing.

作为本申请一种优选的技术方案,所述S1-S5步骤中对建筑类CAD图像像素代表的实际空间的长度进行自动化计算。As a preferred technical solution of the present application, in the steps S1-S5, the length of the actual space represented by the pixels of the architectural CAD image is automatically calculated.

作为本申请一种优选的技术方案,所述S1-S5步骤中主要在于对矩形框定位识别,再对矩形内的数字进行识别。As a preferred technical solution of the present application, the steps S1-S5 are mainly to locate and recognize the rectangular frame, and then recognize the numbers in the rectangle.

与现有技术相比,本发明提供了一种CAD图纸长度单位与像素值比例的识别、获取与计算方法,具备以下有益效果:该一种CAD图纸长度单位与像素值比例的识别、获取与计算方法,用AI的方法,自动化的获取CAD图纸上的像素值并获取其在图纸上相对应的像素点个数,从而计算出像素点与实际空间的长度比例,对建筑类CAD图像像素代表的实际空间的长度进行自动化计算,能自动化获取CAD图纸的像素值比例,摈弃传统需要专业软件的方式,使用者需要将带有标尺线和标尺线数值的CAD图纸传入本算法当中,使用本算法的方法,先切分出需要识别的区域,再对图像增强后做轮廓检测,检测和筛选出矩形轮廓后,将矩形形状变换和填充后逐一送入PaddlePaddleocr检测数字,过滤掉非正规CAD数字后,根据数字和矩形长度上的像素个数,可以计算出CAD图纸中单位像素与实际建筑的距离的比例关系,对多个数字的比例关系结果抽样三次计算均值,即可得到最终结果,整个CAD图纸长度单位与像素值比例的识别、获取与计算方法更为简单,操作方便,使用的效果相对于传统方式更好。Compared with the prior art, the present invention provides a method for identifying, acquiring and calculating the ratio of the length unit of the CAD drawing to the pixel value, which has the following beneficial effects: the identification, acquisition and calculation of the ratio of the length unit of the CAD drawing to the pixel value The calculation method uses the method of AI to automatically obtain the pixel value on the CAD drawing and the number of corresponding pixel points on the drawing, so as to calculate the length ratio between the pixel point and the actual space, and represent the pixel of the architectural CAD image The length of the actual space can be automatically calculated, and the pixel value ratio of the CAD drawing can be automatically obtained. Abandoning the traditional method of requiring professional software, the user needs to import the CAD drawing with the ruler line and the value of the ruler line into this algorithm. Using this Algorithm method, first cut out the area that needs to be recognized, and then do contour detection after image enhancement, after detecting and screening out the rectangular contour, transform and fill the rectangular shape and send them to PaddlePaddleocr to detect numbers one by one, and filter out irregular CAD numbers Finally, according to the number of pixels on the number and the length of the rectangle, the proportional relationship between the distance between the unit pixel in the CAD drawing and the actual building can be calculated, and the result of the proportional relationship between multiple numbers is sampled three times to calculate the mean value, and the final result can be obtained. The identification, acquisition and calculation method of the length unit and pixel value ratio of CAD drawings is simpler, more convenient to operate, and the effect of use is better than the traditional method.

附图说明Description of drawings

图1为本发明一种CAD图纸长度单位与像素值比例的识别、获取与计算方法的整体流程示意图。Fig. 1 is a schematic diagram of the overall process of the identification, acquisition and calculation method of the length unit and pixel value ratio of a CAD drawing according to the present invention.

实施方式Implementation

下面将结合附图和具体实施方式对本发明的技术方案进行清楚、完整地描述,但是本领域技术人员将会理解,下列所描述的实施例是本发明一部分实施例,而不是全部的实施例,仅用于说明本发明,而不应视为限制本发明的范围。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。实施例中未注明具体条件者,按照常规条件或制造商建议的条件进行。所用试剂或仪器未注明生产厂商者,均为可以通过市售购买获得的常规产品。The technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings and specific embodiments, but those skilled in the art will understand that the following described embodiments are some embodiments of the present invention, rather than all embodiments. It is only used to illustrate the present invention and should not be construed as limiting the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention. Those who do not indicate the specific conditions in the examples are carried out according to the conventional conditions or the conditions suggested by the manufacturer. The reagents or instruments used were not indicated by the manufacturer, and they were all conventional products that could be purchased from the market.

在本发明的描述中,需要说明的是,术语“中心”、“上”、“下”、“左”、“右”、“竖直”、“水平”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。此外,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" etc. The indicated orientation or positional relationship is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred device or element must have a specific orientation, or in a specific orientation. construction and operation, therefore, should not be construed as limiting the invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and should not be construed as indicating or implying relative importance.

在本发明的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本发明中的具体含义。In the description of the present invention, it should be noted that, unless otherwise clearly stipulated and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be a fixed connection or a detachable connection. Connected, or integrally connected; it can be mechanically connected or electrically connected; it can be directly connected or indirectly connected through an intermediary, and it can be the internal communication of two components. Those of ordinary skill in the art can understand the specific meanings of the above terms in the present invention in specific situations.

如图1所示,一种CAD图纸长度单位与像素值比例的识别、获取与计算方法,包括以下操作步骤:As shown in Figure 1, a method for identifying, acquiring and calculating the ratio between the length unit and the pixel value of a CAD drawing includes the following steps:

S1:思路整理:带有数字的标尺线区域,大多是由矩形框定的,对矩形框定位识别,再对矩形内的数字进行识别;S1: Arranging ideas: the area of the scale line with numbers is mostly bounded by a rectangle, locate and identify the rectangle, and then identify the numbers in the rectangle;

S2:区域切分:切分出需要识别的区域,一方面用于区域定位,另一方面为了节省计算资源;S2: Region Segmentation: Segment the region that needs to be identified, on the one hand for regional positioning, and on the other hand to save computing resources;

S3:图像增强预处理:经过腐蚀,二值化,使得图像上的标尺线变得明显,之后检测轮廓,过滤过小过大轮廓后,判断轮廓是不是矩形,对非矩阵的轮廓以及中间无内容的轮廓进行过滤,保留下将要进行预测的矩形;S3: Image enhancement preprocessing: After corrosion and binarization, the scale line on the image becomes obvious, then detects the contour, filters the too small and too large contours, and judges whether the contour is a rectangle. For non-matrix contours and no middle The outline of the content is filtered, and the rectangle to be predicted is reserved;

S4:进行数字检测:为了提高识别的准确率,逐一将矩形改变长宽比和填充后,送入模型检测;S4: Perform digital detection: In order to improve the accuracy of recognition, change the aspect ratio and fill the rectangles one by one, and send them to the model detection;

S5:获取与计算:检测结束后,过滤掉不合规的数字以及矩形后,计算像素比值,对比值结果取三次随机抽样的均值,获得结果,用AI的方法,自动化的获取CAD图纸上的像素值并获取其在图纸上相对应的像素点个数,从而计算出像素点与实际空间的长度比例,对建筑类CAD图像像素代表的实际空间的长度进行自动化计算。S5: Acquisition and calculation: After the detection is completed, after filtering out the non-compliant numbers and rectangles, calculate the pixel ratio, and take the average of three random samplings for the comparison value results, and obtain the results, and use the AI method to automatically obtain the CAD drawings. Pixel value and obtain its corresponding pixel number on the drawing, so as to calculate the length ratio of the pixel point to the actual space, and automatically calculate the length of the actual space represented by the pixel of the architectural CAD image.

进一步的,S4步骤中送入模型检测采用是Paddle框架的paddlepaddleocr模型,包括文字检测和识别部分。Further, the input model detection in step S4 adopts the paddlepaddleocr model of the Paddle framework, including text detection and recognition parts.

进一步的,S4步骤中送入模型检测可以采用其他深度学习框架的调优的ctpn+crnn模型或其他文字/数字识别模型。Further, in the step S4, the input model detection can adopt the tuned ctpn+crnn model of other deep learning frameworks or other character/number recognition models.

进一步的,具体包括以下操作步骤:Further, it specifically includes the following steps:

A1:将带有标尺线和标尺线数值的CAD图纸传入本算法当中;A1: Pass the CAD drawings with scale lines and scale line values into this algorithm;

A2:使用本算法的方法,先切分出需要识别的区域;A2: Using the method of this algorithm, first segment out the area to be identified;

A3:对图像增强后做轮廓检测,检测和筛选出矩形轮廓后,将矩形形状变换和填充后逐一送入PaddlePaddleocr检测数字;A3: Do contour detection after image enhancement, detect and filter out the rectangle contour, transform and fill the rectangle shape and send them to PaddlePaddleocr detection numbers one by one;

A4:过滤掉非正规CAD数字后,根据数字和矩形长度上的像素个数,可以计算出CAD图纸中单位像素与实际建筑的距离的比例关系,对多个数字的比例关系结果抽样三次计算均值,即可得到最终结果。A4: After filtering out the irregular CAD numbers, according to the number of pixels on the number and the length of the rectangle, the proportional relationship between the distance between the unit pixel in the CAD drawing and the actual building can be calculated, and the proportional relationship results of multiple numbers are sampled three times to calculate the average , to get the final result.

进一步的,A1-A4步骤中流程为图像切割,预处理,找轮廓,过滤与判断轮廓形状,过滤无内容矩形,模型检测,计算像素比值,筛选像素比值,抽样取均值,结束。Further, the process in steps A1-A4 is image cutting, preprocessing, finding contours, filtering and judging contour shapes, filtering rectangles without content, model detection, calculating pixel ratios, screening pixel ratios, sampling to get the mean value, and ending.

进一步的,A1-A4步骤自动化获取CAD图纸的像素值比例。Further, steps A1-A4 automatically obtain the pixel value ratio of the CAD drawing.

进一步的,S1-S5步骤中对建筑类CAD图像像素代表的实际空间的长度进行自动化计算。Further, in steps S1-S5, the length of the actual space represented by the pixels of the architectural CAD image is automatically calculated.

进一步的,S1-S5步骤中主要在于对矩形框定位识别,再对矩形内的数字进行识别。Further, the steps S1-S5 are mainly to locate and recognize the rectangular frame, and then recognize the numbers in the rectangle.

工作原理:用AI的方法,自动化的获取CAD图纸上的像素值并获取其在图纸上相对应的像素点个数,从而计算出像素点与实际空间的长度比例,对建筑类CAD图像像素代表的实际空间的长度进行自动化计算;Working principle: Use AI method to automatically obtain the pixel value on the CAD drawing and obtain the corresponding pixel number on the drawing, so as to calculate the length ratio between the pixel point and the actual space, and represent the pixel of the architectural CAD image Automatically calculate the length of the actual space;

使用者需要将带有标尺线和标尺线数值的CAD图纸传入本算法当中,使用本算法的方法,先切分出需要识别的区域,再对图像增强后做轮廓检测,检测和筛选出矩形轮廓后,将矩形形状变换和填充后逐一送入PaddlePaddleocr检测数字,过滤掉非正规CAD数字后,根据数字和矩形长度上的像素个数,可以计算出CAD图纸中单位像素与实际建筑的距离的比例关系,对多个数字的比例关系结果抽样三次计算均值,即可得到最终结果。The user needs to import the CAD drawing with the ruler line and the value of the ruler line into this algorithm. Using the method of this algorithm, first cut out the area to be recognized, and then perform contour detection after image enhancement, and detect and filter out the rectangle. After the outline, transform and fill the rectangle shape and send it to PaddlePaddleocr to detect the numbers one by one. After filtering out the irregular CAD numbers, the distance between the unit pixel in the CAD drawing and the actual building can be calculated according to the number of pixels on the number and the length of the rectangle. Proportional relationship, the proportional relationship results of multiple numbers are sampled three times to calculate the mean, and the final result can be obtained.

需要说明的是,在本文中,诸如第一和第二(一号、二号)等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second (number one, number two), etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between such entities or operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

以上显示和描述了本发明的基本原理和主要特征和本发明的优点。本行业的技术人员应该了解,本发明不受上述实施例的限制,上述实施例和说明书中描述的只是说明本发明的原理,在不脱离本发明精神和范围的前提下,本发明还会有各种变化和改进,这些变化和改进都落入要求保护的本发明范围内。The basic principles and main features of the present invention and the advantages of the present invention have been shown and described above. Those skilled in the industry should understand that the present invention is not limited by the above-mentioned embodiments. What are described in the above-mentioned embodiments and the description only illustrate the principle of the present invention. Without departing from the spirit and scope of the present invention, the present invention will also have Variations and improvements are possible, which fall within the scope of the claimed invention.

Claims (8)

1. The method for identifying, acquiring and calculating the ratio of the length unit to the pixel value of the CAD drawing is characterized by comprising the following steps of: the method comprises the following operation steps:
s1: and (3) idea arrangement: the scale line area with the numbers is mostly defined by a rectangular frame, the rectangular frame is positioned and identified, and then the numbers in the rectangle are identified;
s2: region segmentation: the areas to be identified are segmented, and the areas are used for positioning the areas on one hand and saving computing resources on the other hand;
s3: image enhancement preprocessing: after corrosion and binarization, the scale line on the image becomes obvious, then the outline is detected, whether the outline is rectangular or not is judged after the too small and too large outline is filtered, the outline which is not a matrix and the outline without content in the middle are filtered, and the rectangle to be predicted is reserved;
s4: digital detection is carried out: in order to improve the recognition accuracy, changing the length-width ratio and filling the rectangles one by one, and then sending the rectangles into a model for detection;
s5: and (3) obtaining and calculating: after the detection is finished, the non-compliance number and the rectangle are filtered, the pixel ratio is calculated, and the comparison value result is taken as the average value of three random samples, so that the result is obtained.
2. The method for identifying, acquiring and calculating the ratio of the length unit to the pixel value of the CAD drawing according to claim 1, wherein the method comprises the following steps: the step S4 is to send the model detection to adopt a paddlepaddleocr model which is a Paddle frame, and the method comprises a character detection and recognition part.
3. The method for identifying, acquiring and calculating the ratio of the length unit to the pixel value of the CAD drawing according to claim 1, wherein the method comprises the following steps: the model detection sent in the step S4 can adopt a ctpn+crnn model or other character/number recognition models of the tuning of other deep learning frameworks.
4. The method for identifying, acquiring and calculating the ratio of the length unit to the pixel value of the CAD drawing according to claim 1, wherein the method comprises the following steps: the method specifically comprises the following operation steps:
a1: the CAD drawing with the scale line and the scale line value is transmitted into the algorithm;
a2: the method of the algorithm is used for firstly cutting out the area to be identified;
a3: performing contour detection after image enhancement, detecting and screening rectangular contours, transforming and filling the rectangular shapes, and sending the rectangular shapes into PaddlePaddleocr detection numbers one by one;
a4: and after the denormal CAD numbers are filtered, according to the numbers and the number of pixels on the rectangular length, the proportional relation between the unit pixels and the distance of the actual building in the CAD drawing can be calculated, and the proportional relation result of a plurality of numbers is sampled three times to calculate the average value, so that the final result can be obtained.
5. The method for identifying, acquiring and calculating the ratio of the length unit to the pixel value of the CAD drawing according to claim 4, wherein: the process of the step A1-A4 is image cutting, preprocessing, contour finding, filtering and judging contour shape, filtering rectangle without content, detecting a model, calculating pixel ratio, screening pixel ratio, sampling and taking average value, and ending.
6. The method for identifying, acquiring and calculating the ratio of the length unit to the pixel value of the CAD drawing according to claim 4, wherein: and the steps A1-A4 automatically acquire the pixel value proportion of the CAD drawing.
7. The method for identifying, acquiring and calculating the ratio of the length unit to the pixel value of the CAD drawing according to claim 1, wherein the method comprises the following steps: and in the steps S1-S5, automatically calculating the length of the actual space represented by the building CAD image pixels.
8. The method for identifying, acquiring and calculating the ratio of the length unit to the pixel value of the CAD drawing according to claim 1, wherein the method comprises the following steps: the steps S1-S5 mainly comprise positioning and identifying rectangular frames and then identifying numbers in the rectangles.
CN202310233220.8A 2023-03-13 2023-03-13 CAD drawing length unit and pixel value proportion identification, acquisition and calculation method Pending CN116343253A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310233220.8A CN116343253A (en) 2023-03-13 2023-03-13 CAD drawing length unit and pixel value proportion identification, acquisition and calculation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310233220.8A CN116343253A (en) 2023-03-13 2023-03-13 CAD drawing length unit and pixel value proportion identification, acquisition and calculation method

Publications (1)

Publication Number Publication Date
CN116343253A true CN116343253A (en) 2023-06-27

Family

ID=86888777

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310233220.8A Pending CN116343253A (en) 2023-03-13 2023-03-13 CAD drawing length unit and pixel value proportion identification, acquisition and calculation method

Country Status (1)

Country Link
CN (1) CN116343253A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117455860A (en) * 2023-10-26 2024-01-26 宁波市宇星水表有限公司 Water meter delivery data monitoring management system
CN117711010A (en) * 2024-01-09 2024-03-15 北京理正软件股份有限公司 Automatic recognition method and recognition system for engineering drawing tab

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104457627A (en) * 2014-12-18 2015-03-25 云南省农业科学院蚕桑蜜蜂研究所 Method for utilizing Photoshop for precisely measuring area of plane of irregular object
WO2018032626A1 (en) * 2016-08-19 2018-02-22 上海葡萄纬度科技有限公司 Teaching toy kit and number identification method thereof
CN113742810A (en) * 2020-05-28 2021-12-03 杭州群核信息技术有限公司 Scale identification method and three-dimensional model building system based on copy graph
CN114742881A (en) * 2022-05-16 2022-07-12 佛山欧神诺云商科技有限公司 2D house type graph actual proportion calculation method, device, system and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104457627A (en) * 2014-12-18 2015-03-25 云南省农业科学院蚕桑蜜蜂研究所 Method for utilizing Photoshop for precisely measuring area of plane of irregular object
WO2018032626A1 (en) * 2016-08-19 2018-02-22 上海葡萄纬度科技有限公司 Teaching toy kit and number identification method thereof
CN113742810A (en) * 2020-05-28 2021-12-03 杭州群核信息技术有限公司 Scale identification method and three-dimensional model building system based on copy graph
CN114742881A (en) * 2022-05-16 2022-07-12 佛山欧神诺云商科技有限公司 2D house type graph actual proportion calculation method, device, system and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117455860A (en) * 2023-10-26 2024-01-26 宁波市宇星水表有限公司 Water meter delivery data monitoring management system
CN117455860B (en) * 2023-10-26 2024-04-09 宁波市宇星水表有限公司 Water meter delivery data monitoring management system
CN117711010A (en) * 2024-01-09 2024-03-15 北京理正软件股份有限公司 Automatic recognition method and recognition system for engineering drawing tab

Similar Documents

Publication Publication Date Title
CN116343253A (en) CAD drawing length unit and pixel value proportion identification, acquisition and calculation method
CN111275697B (en) Battery silk-screen quality detection method based on ORB feature matching and LK optical flow method
CN104732192B (en) A kind of architectural drawing wall recognition methods and device
CN108764234B (en) Liquid level meter reading identification method based on inspection robot
CN111666824B (en) Indicator recognition method for mobile robots based on color attributes and machine learning
CN107133962A (en) A kind of diamond saw blade extracting thermal crack method based on rim detection
CN111896549A (en) A system and method for monitoring building cracks based on machine learning
CN113888446B (en) Intelligent detection method for bending line of sheet metal structural part
CN114494240A (en) Ballastless track slab crack measurement method based on multi-scale cooperation deep learning
CN114119466A (en) Aluminium foil surface defect detection method, device, equipment and computer storage medium
CN112734662A (en) Machine vision detection method and system for bevel gear abrasion
CN115656182A (en) Defect detection method of plate point cloud based on tensor voting principal component analysis
CN201653377U (en) Cable sleeve joint thread quality detecting system
CN111461076A (en) Smoke detection method and detection system combined with frame difference method and neural network
CN108550142A (en) A kind of tooth hole inspection method and hole inspection and device
CN109459925B (en) A method for hand-drawn identification and parameter tuning of PID control data
CN114022412B (en) A method for detecting cigarette auxiliary material paper defects based on deep learning visual inspection
CN108898080B (en) Ridge line neighborhood evaluation model-based crack connection method
CN112508084B (en) Machine vision detection method based on fuzzy similarity measurement in complex industrial environment
CN205301075U (en) Survey impact specimen fracture fibre section rate system
CN118483234A (en) A method for detecting defects in electric meter casing based on machine vision
CN118608479A (en) A metal weld defect detection method based on multimodal fusion and defect detection network framework
CN110060339B (en) Three-dimensional modeling method based on cloud computing graphic image
CN117576632A (en) Multi-mode AI large model-based power grid monitoring fire early warning system and method
US20240169510A1 (en) Surface defect detection model training method, and surface defect detection method and system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20230627