Method, device and equipment for redrawing size mark attention and computer readable storage medium

By determining and redrawing the target dimension marking in the dimension drawing, the interpretation difficulties caused by inconsistent unit system are solved, the conversion and display of different unit systems are realized, and the labeling efficiency of the dimension drawing is improved.

CN119559299APending Publication Date: 2025-03-04NANJING XIYIN ECOMMERCE CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411665859.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

In scenarios such as international cooperation projects, due to the inconsistent unit system, users may encounter difficulties in interpreting dimension drawings, and the existing technology is difficult to effectively solve this problem.

Method used

By determining the original dimension marking area in the pre-processed dimension drawing, and determining the target dimension marking based on the original dimension marking in the area, based on the dimension marking requirements of the dimension drawing, the target dimension marking is redrawn in the dimension drawing to achieve conversion and display of different unit systems.

Benefits of technology

It improves the labeling efficiency of the dimension drawing, can display the original dimension mark and the converted target dimension mark at the same time, meets the needs of different unit systems, and solves the interpretation difficulties caused by inconsistent unit systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119559299A_ABST
    Figure CN119559299A_ABST
Patent Text Reader

Abstract

The invention discloses a method, a device and equipment for redrawing size marking attention and a computer readable storage medium. The method comprises the following steps: determining an original size marking area in a pre-processed size map; determining a target size mark to be redrawn according to the original size mark in the original size mark area; and redrawing the target size mark in the size map based on the size mark requirement of the size map. Through the method, the marking efficiency of the size diagram can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to the field of image processing technology. More specifically, the present disclosure relates to a method, device, apparatus and computer-readable storage medium for dimensioning and redrawing. Background Art

[0002] In the fields of retail, engineering design, manufacturing and construction, dimensional drawings are often used to clarify the size and proportion of objects. Traditional dimensional drawings are usually marked with a single unit system, such as inch / foot for the imperial system and cm / m for the metric system. In some scenarios where the unit system is not uniform (such as international cooperation projects), this may cause users to have difficulty in interpreting dimensional drawings. Therefore, it is necessary to redraw the dimension annotations so that they can display the corresponding unit system.

[0003] In view of this, there is an urgent need to provide a method for redrawing dimension marks to improve the marking efficiency of dimension drawings. Summary of the invention

[0004] In order to at least solve one or more of the technical problems mentioned above, the present disclosure proposes a method, a device, a equipment and a computer-readable storage medium for dimensioning and highlighting in multiple aspects.

[0005] In a first aspect, the present disclosure provides a method for redrawing a dimension, comprising: determining an original dimension area in a preprocessed dimension drawing; determining a target dimension to be redrawn based on the original dimension in the original dimension area; and redrawing the target dimension in the dimension drawing based on the dimension requirements of the dimension drawing.

[0006] In some embodiments, before determining the original dimension annotation in the preprocessed dimension map, the method further includes: obtaining an initial dimension map; converting the initial dimension map into a grayscale dimension map; and performing denoising on the grayscale dimension map to obtain the preprocessed dimension map.

[0007] In some embodiments, determining the original dimension annotation area in the preprocessed dimension image includes: using optical character recognition technology to extract text information in the dimension image in the detection frame; identifying the original dimension annotation in the text information; and determining the original dimension annotation area based on parameter information of the detection frame corresponding to the original dimension annotation.

[0008] In some embodiments, the parameter information of the detection frame includes the center coordinates of the detection frame, the height of the detection frame, the width of the detection frame, and the counterclockwise rotation angle of the detection frame.

[0009] In some embodiments, the redrawing of the target dimension annotation in the dimension drawing based on the dimension annotation requirement of the dimension drawing includes: removing the original dimension annotation; and redrawing the original dimension annotation and the target dimension annotation in the original annotation area.

[0010] In some embodiments, the target dimension annotation is redrawn in the original annotation area.

[0011] In some embodiments, removing the original dimension annotation includes: obtaining parameter information of a detection box corresponding to the original dimension annotation area; determining a removal area based on a preset adjustment ratio and the parameter information; and repairing and redrawing the removal area to remove the original dimension annotation.

[0012] In a second aspect, the present disclosure also provides a device for redrawing dimensioning, including: an original dimensioning area determination module, used to determine the original dimensioning area in the preprocessed dimensioning drawing; a target dimensioning determination module, used to determine the target dimensioning to be redrawn based on the original dimensioning in the original dimensioning area; and a redrawing module, used to redraw the target dimensioning in the dimensioning drawing based on the dimensioning requirements of the dimensioning drawing.

[0013] In a third aspect, the present disclosure also provides a device for dimension marking and redrawing, comprising: a processor; a memory storing program instructions for dimension marking and redrawing, wherein when the program instructions are executed by the processor, the method described above is implemented.

[0014] In a fourth aspect, the present disclosure further provides a computer-readable storage medium storing computer program instructions for dimensioning and redrawing. When the computer program instructions are executed by a processor, the method as described above is implemented.

[0015] Through the method, device, equipment and computer-readable storage medium for redrawing dimensioning provided above, the disclosed embodiment determines the original dimensioning area in the preprocessed dimensioning drawing, and determines the target dimensioning to be redrawn based on the original dimensioning in the area. Finally, based on the dimensioning requirements of the dimensioning drawing, the target dimensioning is marked in the dimensioning drawing. Through the above steps, the marking efficiency of the dimensioning drawing can be improved. Furthermore, in some embodiments, the target dimensioning redrawn in the dimensioning drawing can simultaneously display the original dimensioning and the dimensioning converted from the original dimensioning, meeting the usage requirements of different units in various scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] By reading the detailed description below with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0017] Figure 1 An exemplary flow chart showing a method for redrawing a dimension mark according to an embodiment of the present disclosure is shown;

[0018] Figure 2 An exemplary flow chart showing a method for redrawing a dimension mark according to another embodiment of the present disclosure;

[0019] Figure 3 An exemplary flow chart showing a method for dimensioning and redrawing according to another embodiment of the present disclosure;

[0020] Figure 4 An exemplary flow chart showing a method for redrawing dimensions according to some other embodiments of the present disclosure;

[0021] Figure 5 A comparison diagram showing the effect of redrawing the size marks in other embodiments of the present disclosure is shown;

[0022] Figure 6 An exemplary block diagram showing a device with dimensionally marked emphasis on an embodiment of the present disclosure;

[0023] Figure 7 An exemplary structural block diagram of a device with dimension marking and emphasis drawing according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0025] It should be understood that the terms "include" and "comprising" used in the specification and claims of the present disclosure indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0026] It should also be understood that the terms used in this disclosure are only for the purpose of describing specific embodiments and are not intended to limit the disclosure. As used in this disclosure and claims, the singular forms of "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should also be further understood that the term "and / or" used in this disclosure and claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations.

[0027] As used in this specification and claims, the term "if" may be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]," depending on the context.

[0028] The specific implementation of the present disclosure is described in detail below with reference to the accompanying drawings.

[0029] Reference Figure 1 , to describe Figure 1 The method 100 for redrawing the dimension mark shown. At step S101, the original dimension mark area in the pre-processed dimension map is determined. In some embodiments, the dimension map refers to a drawing or diagram showing the detailed size and proportion of an object or article, which is often marked with the size information of the article, including the size value and unit. The pre-processed dimension map refers to the image obtained after the initial dimension map is subjected to pre-processing processes such as grayscale and denoising. Among them, the grayscale process can reduce the color information in the initial dimension map, thereby reducing the computational complexity. The denoising process can remove the noise in the initial dimension map, thereby improving the accuracy of the subsequent extraction of the original dimension mark. The original dimension mark area refers to the area where the original dimension information in the dimension map is located. For the convenience of distinguishing and understanding, the original dimension information in the dimension map is referred to as the original dimension mark below. Generally, in addition to the original dimension mark, the dimension map may also contain other contents such as text and logos. These contents are not within the scope of consideration for redrawing the mark. Therefore, for the original dimension mark that needs to be redrawn in the dimension map, it is necessary to determine it by text information extraction and character recognition. The original dimension mark area can be determined in the process of identifying and extracting text information.

[0030] Furthermore, as a feasible implementation method, when extracting text information from the dimension map, optical character recognition technology (OCR for short) can be used. That is, first define a detection frame for each area of ​​the image. Then, character recognition is performed on the area within the detection frame to extract the text information therein. The original dimension annotation that needs to be redrawn is identified by keyword matching and context analysis of the text information. The area within the detection frame corresponding to the original dimension annotation is the original dimension annotation area. In the above process, the detection frame can uniquely identify the text information in the area within the frame, accurately locate the position of the text in the dimension map, and facilitate the subsequent character segmentation and recognition of the text in the frame.

[0031] It should be noted that the basis for determining the original dimension that needs to be redrawn can be that the current original dimension only contains one unit system, or does not contain the preset target unit system. The unit system can be imperial units or metric units, and the units can be displayed in uppercase, lowercase, or abbreviations. For example, in some dimension drawings, the imperial unit will use "in" instead of "inch", and other commonly used units include "foot" and "feet", while the metric units will have "mm", "cm", "dm", "m", etc.

[0032] Next, at step S102, the target dimension to be redrawn is determined based on the original dimension in the original dimension area. When determining the target dimension, it is necessary to first clarify the original unit system of the original dimension and the target unit system to be converted. For example, the original unit system is metric and the target unit system is imperial; or the original unit system is imperial and the target unit system is metric.

[0033] Furthermore, the converted target unit dimension value can be calculated based on the preset unit system conversion relationship and the dimension value of the original dimension annotation. The unit system conversion relationship includes the conversion between the original unit system and the target unit system. In a feasible implementation, the unit system conversion relationship can be pre-stored in a conversion relationship database. The database contains conversion coefficients between different units, for example: 1m=100cm, 1in=2.54cm, etc. After extracting the dimension value of the original dimension annotation, select the corresponding conversion relationship according to its original unit system and establish the calculation logic: target unit dimension value=original dimension annotation×conversion coefficient. Finally, the original dimension annotation and the calculated target unit dimension value are saved together for subsequent marking and redrawing. For example, taking the conversion from metric to imperial as an example, the original dimension annotation before conversion is "25cm", then the converted target unit dimension value should be "9.84in".

[0034] Finally, the process proceeds to step S103. Based on the dimensioning requirements of the dimension drawing, the target dimensioning is redrawn in the dimension drawing. In some embodiments, the dimensioning requirements of the dimension drawing include the font, annotation position, text direction, annotation size, and annotation content (i.e., whether only the target unit system is marked or the target unit system and the original unit system are marked at the same time). In one embodiment, when the target dimensioning is redrawn in the dimension drawing, the original dimensioning needs to be removed first, and then it is marked in the original dimensioning area according to the annotation requirements. The content on the new annotation has both the original dimensioning and the dimensioning converted from the original dimensioning. Optionally, in another embodiment, the target dimensioning can be redrawn after or before the original dimensioning without removing the original dimensioning. Further, in order to ensure that the annotated size is clear and easy to read, the annotated content can also be automatically optimized, such as adjusting its font display color or line thickness, so that it is more in line with the drawing specifications. The re-annotated image can be saved as a new file, and its file format can be any format such as JPEG, PNG, TIFF, etc.

[0035] In addition, in another feasible implementation, after marking the target dimension data, it can also be verified to ensure that the content re-marked in the dimension drawing and the position of the content in the dimension drawing are accurate. If the verification passes, it is directly saved. If the verification fails, the content with the marking error is fed back to the corresponding management personnel. When performing the verification, the dimension data is extracted again from the redrawn dimension drawing and the corresponding analysis is performed. The redrawn dimension data is compared with the original target dimension data and the target dimension data one by one to check whether the values ​​and units are consistent. Further, check whether the marked position is consistent with the predetermined position to ensure that the marking is not blocked or misplaced. If it is found that the verification fails, record the specific error information, including a detailed description of the inconsistent dimension data or the wrong marking position. Generate standardized feedback information based on the recorded information, explain the problem and attach corresponding diagrams or data. Submit the feedback information to the relevant management personnel via email or project management system to ensure timely processing. If the verification passes, it is confirmed that the redrawn dimension drawing meets the requirements, and the dimension drawing that passes the verification is saved.

[0036] Through the above steps, the re-marking of dimension drawings is highly automated. From image preprocessing, unit detection, dimension conversion to redrawing pictures, the entire process does not require human intervention, which greatly improves work efficiency. In engineering projects that need to process a large number of dimension drawings, such as retail, architectural design, mechanical manufacturing, industrial design and other fields, it can save a lot of manpower and time.

[0037] Reference Figure 2 ,like Figure 2 The method 200 of dimensioning redrawing is shown. The steps included in the method are performed at Figure 1Before step S101, it includes: in step S201, obtaining a dimension map file and parsing an initial dimension map. In some embodiments, the format of the dimension map file can be JPEG, PNG, TIFF, etc. When the dimension map file to be processed is obtained, it can be parsed with the help of image processing libraries (such as OpenCV, PIL, etc.) in some programming software. Through parsing, the initial dimension map whose color and dimension information in the map have not been processed can be obtained. These initial dimension maps also need to be grayed and denoised to reduce the difficulty of extracting text information.

[0038] Next, at step S202, the initial size image is converted into a grayscale image. In some embodiments, the initial size image is a color image. Since its color information is too rich, it often interferes with the extraction of text information. In this regard, the initial size image is grayscaled here to remove the color information therein so as to obtain a grayscale image with lower computational complexity. In a grayscale image, each pixel is represented by a grayscale value, and the grayscale value range is between 0 and 255. Among them, 0 represents black, 255 represents white, and values ​​between 0 and 255 represent different shades of gray.

[0039] Furthermore, as a feasible implementation method, a weighted average can be used to calculate the grayscale value, so as to achieve the purpose of graying the image of the initial size. The pixel value of each pixel in the original initial size image is represented by three channel values ​​of red (R), green (G), and blue (B). Different weight values ​​are assigned to these three channel values ​​in advance, and the pixel value of each pixel will obtain its corresponding grayscale value after weighted average operation. Among them, the weight value of the channel value can be set according to the influencing factors that are conducive to text information extraction. Optionally, in other feasible implementation methods, the maximum or minimum value of the three RGB values ​​can also be taken as the grayscale value. The grayscale image is obtained after graying, which simplifies the representation of color information in the initial size image, and is more conducive to subsequent image preprocessing and information extraction.

[0040] At step S203, the grayscale image is denoised to obtain a pre-processed size map. In some embodiments, the grayscale image obtained after grayscale processing also needs to be denoised to reduce the random noise therein so that the image is clearer and more realistic. As a feasible implementation, when the grayscale image is denoised, a median filtering denoising method can be used. When processing a certain pixel in the image, first select a neighborhood window containing the pixel and its surrounding pixels. Then sort all the pixel values ​​in the neighborhood window, find the median therein and replace it with the pixel value currently being processed. The above process will be performed pixel by pixel on the entire grayscale image. Optionally, in other feasible implementations, mean filtering or Gaussian blurring can also be used to remove noise in the image.

[0041] The size map obtained after the above denoising process will have more obvious edges and details, which will help the subsequent text information extraction task and improve the accuracy of the task.

[0042] Reference Figure 3 , Figure 3 The dimension marking method 300 shown in the figure can be combined with the above Figure 1 A specific embodiment of the method 100 described herein. Figure 1 The description also applies to the following Figure 3 A description of each step. Figure 3 In the method 300 for redrawing dimension marks shown, in step S310, the original dimension mark area in the preprocessed dimension map is determined. In some embodiments, step S310 also includes: at step S311, using optical character recognition technology to extract text information in the dimension map in the detection frame. Optical character recognition technology can convert text information in a picture into editable and searchable text information. When using optical character recognition technology to extract text information, corresponding detection frames are delineated for the areas in the dimension map. Then, the characters in the detection frame are segmented, and the features of each character, such as shape, line and outline, are extracted, compared with the pre-stored character features, and the characters are identified according to the context of the text. Subsequently, each identified character is structured, such as arranging the dimension data, unit and position mark into a format that is easy to analyze. Then, the extracted and parsed text information is output for subsequent use and analysis. It should be noted that the specific position of the detection frame is used to divide characters or texts. The detection frame is determined by four sets of parameter information, including the center coordinates of the detection frame, the height of the detection frame, the width of the detection frame, and the counterclockwise rotation angle of the detection frame.

[0043] Next, at step S312, the original dimension annotations in the text information are identified. In some embodiments, the original dimension annotations in the extracted text information are also identified to further determine whether they need to be re-annotated. As a feasible implementation method, the original dimension annotations can be identified by keyword matching. For example, a group of size-related keywords are predefined, such as "cm", "m", "mm", "inch", "size", "length", "width", "height", etc. Usually, the dimension unit is accompanied by a numerical value. Therefore, the combination of numbers and dimension units in the text information can be determined by combining the numerical setting keywords and using the corresponding regular expressions. Furthermore, in order to ensure the accuracy of the recognition results, natural language processing technology can also be used to determine whether the combination is a dimension annotation unit through context analysis. After the above processing process, the original dimension annotations in the text information can be accurately identified.

[0044] Further, at step S313, the original dimensioning area is determined according to the parameter information of the detection frame corresponding to the original dimensioning. In some embodiments, not all original dimensioning needs to be redrawn. For example, a situation where redrawing is not required includes dimension values ​​of two units at the same time (for example, "2inches / 5.08cm"). The situation where redrawing is required is the original dimensioning that only contains one of the imperial unit or the metric unit (for example, "10cm" or "1inch"). In a feasible implementation, a unit list can be created to record the units that appear in all detection frames. Check all the contents in the detection frame. If the content in a detection frame is a mixed unit (for example, millimeters and inches appear at the same time), it is marked as content that does not need to be redrawn. On the contrary, if the content in the detection frame is content that only contains one unit system, it is marked as content to be redrawn. Determining the content to be redrawn through the above steps can improve the accuracy of dimensional data recognition and redrawing, and reduce the possibility of human error.

[0045] When the original dimension annotation contains only one unit system of dimension values, the original dimension annotation area is determined by the parameter information of the corresponding detection box. In the previous process of extracting text information, each detection box has corresponding center coordinates (x, y), detection box width w, height h, and detection box counterclockwise rotation angle θ. When determining the original dimension annotation area, it is sufficient to directly obtain the parameter information (x, y, w, h, θ) of the detection box corresponding to the original dimension annotation.

[0046] In addition, the operations performed at step S320 and step S330 can be performed with Figure 1 The described steps S102 and S103 are the same or similar and will not be described in detail here.

[0047] Reference Figure 4 ,like Figure 4 The method 400 of redrawing the dimension mark is shown. It can be combined with the above Figure 1 Therefore, the above description can also be applied to the following Figure 4 Description of each step. Wherein, at step S410, the original dimensioning area in the preprocessed dimensioning drawing is determined. At step S420, the target dimensioning to be redrawn is determined based on the original dimensioning in the original dimensioning area. At step S430, based on the dimensioning requirements of the dimensioning drawing, the target dimensioning is redrawn in the dimensioning drawing. In some instances, step S430 also includes: at step S431, the original dimensioning is removed.

[0048] It should be noted that the subsequent repair and redrawing process needs to refer to the contextual information around the area where the content to be redrawn is located. If there is too little reference information around, redrawing errors may occur due to too little known information. On the contrary, if there is too much reference information around, the repair and redrawing process will often take up a lot of resources. Therefore, when removing the original dimension annotations, it is necessary not only to ensure that all original dimension annotations can be completely removed, but also to ensure that the removed area will not affect the subsequent redrawing process. Therefore, the size of the removed area is crucial. To this end, in this step, it is first necessary to obtain the parameter information of the detection frame corresponding to the original dimension annotation. Specifically, the representation of the detection frame can be (x, y, w, h, θ), where (x, y) is the center coordinate of the detection frame, (w, h) represents the width and height of the detection frame respectively, and θ is the angle of the detection frame rotated counterclockwise. The above parameters can uniquely identify the detection frame of the original dimension annotation.

[0049] Further, it is necessary to reset the removal area based on the parameter information of the detection frame, and the removal area will also be used as the subsequent redrawing area. In a feasible implementation, the coverage of the detection frame can be adjusted according to the preset adjustment ratio and parameter information. Optionally, the preset adjustment ratio can be to expand the width and height of the detection frame by 40%, and the adjustment ratio can be adjusted according to the redrawing requirements, which is not limited here. The adjusted detection frame is represented by (x, y, 1.4*w, 1.4*h, θ). It should be noted that the preset adjustment ratio of expanding the width and height of the detection frame by 40% is the optimal adjustment ratio obtained by the developer after multiple experiments. For the case where the preset adjustment ratio includes the original dimension annotation and the converted target dimension annotation, the removal area obtained after the adjustment is convenient for the subsequent complete removal of the original annotation size, and can also be used as a redrawing area that only needs to introduce local information for reference. In addition, in another feasible implementation, if only the converted target dimension annotation needs to be redrawn, the preset adjustment ratio does not need to be set according to the value of 40%, but a smaller value can be selected to provide a more reasonable redrawing area.

[0050] Next, the removed area needs to be repaired and redrawn to achieve the purpose of removing the original dimension annotation. As a feasible implementation method, image restoration technology can be used to mask the area of ​​the coverage range. Taking the image redrawing model Lama (a model name) as an example, the Lama model automatically identifies the coverage area of ​​the detection frame and performs mask processing on it. The Lama model is then used to extract the contextual relationship and features of the image in the area covered by the detection frame in the image, and the corresponding filling content is generated based on the context information of the area to cover the original content, thereby achieving the purpose of removing the original dimension annotation. Since the filling content of the detection frame coverage area is generated based on the context information near it, it will not destroy the original image structure, and at the same time make the repaired image look more natural and coherent, which is convenient for the subsequent redrawing of the target dimension annotation.

[0051] Finally, at step S432, based on the dimensioning requirements, the target dimensioning is redrawn in the original annotation area. In some embodiments, the corresponding annotation execution conditions can be generated according to the annotation requirements, and then the target dimensioning is redrawn in the original annotation area according to the execution conditions. It can be understood that different practical scenarios often have different annotation requirements. For example, the dimensioning of mechanical parts may require accuracy to several decimal places and tolerances; clothing design drawings, product drawings, packaging drawings, etc. may require not only dimension data but also corresponding dimension lines. In this regard, in order to make the re-annotated target dimension data meet the annotation requirements, as a feasible implementation method, the annotation requirements of the current dimension drawing can be obtained, such as font, font size, font color, whether to mark tolerances, whether to mark dimension lines, etc. Convert it into a corresponding annotation execution condition. Make the subsequent target dimension data annotations automatically executed according to the annotation execution condition. Optionally, in another feasible implementation method, the annotation execution condition of the dimension drawing can also be saved as a template. For the subsequent annotation work of this type of dimension drawing, the corresponding template can be directly called to perform the corresponding annotation work. In addition, the annotation position is determined according to the adjusted parameter information of the detection box corresponding to the original annotation area.

[0052] Furthermore, based on the determined annotation position and annotation execution conditions, the annotation tool or annotation software can be called to redraw the target dimension annotation in the dimension drawing according to the annotation execution conditions. By redrawing the dimension annotation in the dimension drawing, it can display the dimension data of two units at the same time, meeting the use requirements of different measurement units in actual application scenarios. In addition, the redrawn dimension annotation can still be in the original position, ensuring the readability and aesthetics of the dimension drawing.

[0053] To more intuitively understand the technical effects that this disclosure can present, please refer to Figure 5. Figure 5 In the left half of the image, the original dimensions of the item include "9cm" and "18cm" in metric units. Figure 5 As shown in the right half of the image, the dimension marking of the item includes both the original dimension marking in metric units and the target dimension marking in imperial units after conversion: "9cm / 3.54in", "18cm / 7.09in".

[0054] Reference Figure 6 The disclosed embodiment also provides a dimensioning redrawing device 600, including: an original dimensioning area determination module 610, used to determine the original dimensioning area in the preprocessed dimensioning drawing; a target dimensioning determination module 620, used to determine the target dimensioning to be redrawn based on the original dimensioning in the original dimensioning area; and a redrawing module 630, used to redraw the target dimensioning in the dimensioning drawing based on the dimensioning requirements of the dimensioning drawing.

[0055] Reference Figure 7 , Figure 7 is a schematic diagram showing a system for dimensioning and redrawing according to an embodiment of the present disclosure. Figure 7 As shown, the system 700 may include a device 701 for dimension marking and redrawing according to an embodiment of the present disclosure, as well as its peripheral devices and external networks, to achieve the aforementioned combination. Figure 1 - Figure 4 A method for dimensioning redrawing according to an embodiment of the present disclosure is described.

[0056] like Figure 7 As shown in , the device 701 for dimension marking and redrawing may include a CPU 711, which may be a general-purpose CPU, a dedicated CPU, or other information processing and program execution unit. Further, the device 701 for dimension marking and redrawing may also include a large-capacity memory 712 and a read-only memory ROM 713, wherein the large-capacity memory 712 may be configured to store various types of data. In the disclosed embodiment, it may include a dimension map, initial dimension data, target dimension data, etc. In addition, the ROM 713 may be configured to store the initialization of each functional module of the device 701 for dimension marking and redrawing, the basic input / output driver of the system, and the data required to boot the operating system.

[0057] Furthermore, the system 700 may also include other hardware platforms or components, such as the tensor processing unit (TPU) 714, the image processing unit (GPU) 715, the field programmable gate array (FPGA) 716, and the machine learning unit (MLU) 717. It is understood that although a variety of hardware platforms or components are shown in the system 700, they are merely exemplary and not restrictive, and those skilled in the art may add or remove corresponding hardware according to actual needs.

[0058] The device 701 for dimension marking and redrawing also includes a communication interface 718, so that it can be connected to a local area network / wireless local area network (LAN / WLAN) 705 through the communication interface 718, and then connected to a local server 706 or to the Internet ("Internet") 705 through the LAN / WLAN. Alternatively or additionally, the device 701 for dimension marking and redrawing of the disclosed embodiment can also be directly connected to the Internet or a cellular network through the communication interface 718 based on wireless communication technology, such as wireless communication technology based on the third generation ("3G"), the fourth generation ("4G") or the fifth generation ("5G") . In some application scenarios, the test device 601 for frame rate can also access a server 708 of an external network and a possible database 709 as needed to obtain various known data such as dimension drawings, initial dimension data, annotation requirements, etc.

[0059] The peripheral devices of the device 701 for dimension marking and redrawing may include a display device 702, an input device 703, and a data transmission interface 704. In one embodiment, the display device 702 may include, for example, one or more speakers and / or one or more visual displays, which are configured to provide voice prompts and / or image video displays for the operation process or final result of the device for dimension marking and redrawing disclosed in the present invention. The input device 703 may include, for example, a keyboard, a capture camera, or other input buttons or controls, which are configured to receive input or user instructions for detecting the call status. The data transmission interface 704 may include, for example, a serial interface, a parallel interface or a universal serial bus interface ("USB"), a small computer system interface ("SCSI"), a serial ATA, a FireWire ("FireWire"), a PCI Express, and a high-definition multimedia interface ("HDMI"), etc., which are configured for data transmission and interaction with other devices or systems. According to the scheme disclosed in the present invention, the data transmission interface 704 can transmit text information, dimension diagrams, target dimension data, etc. The CPU 711, the mass storage 712, the read-only memory ROM 713, the TPU 714, the GPU 715, the FPGA 716, the MLU 717 and the communication interface 718 of the device 701 for dimension marking and redrawing disclosed herein can be connected to each other through a bus 719, and data interaction with peripheral devices can be achieved through the bus. In one embodiment, through the bus 719, the CPU 711 can control other hardware components and peripheral devices in the device 701 for dimension marking and redrawing.

[0060] It should also be understood that any module, unit, component, server, computer, terminal or device that executes instructions of the disclosed examples may include or otherwise access computer-readable media, such as storage media, computer storage media or data storage devices (removable and / or non-removable) such as disks, optical disks or tapes. Computer storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules or other data.

[0061] The present disclosure also discloses a computer-readable storage medium, in which program instructions are stored, and the program instructions are suitable for being loaded and executed by a processor: determining the original dimensioning area in the preprocessed dimensioning drawing; determining the target dimensioning to be redrawn according to the original dimensioning in the original dimensioning area; redrawing the target dimensioning in the dimensioning drawing based on the dimensioning requirements of the dimensioning drawing. Based on this, when the scheme of the present disclosure is embodied in the form of a software product (computer-readable storage medium), the software product can be stored in a memory, which can include several instructions to enable a computer device (such as a personal computer, a server or a network device, etc.) to perform some or all steps of the method described in the embodiment of the present disclosure. The aforementioned memory may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a flash drive, a read-only memory ROM, a random access memory ("Random Access Memory", abbreviated as RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0062] Although multiple embodiments of the present disclosure have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art may think of many changes, modifications, and alternatives without departing from the thought and spirit of the present disclosure. It should be understood that in the process of practicing the present disclosure, various alternatives to the embodiments of the present disclosure described herein may be adopted. The attached claims are intended to define the scope of protection of the present disclosure, and therefore cover equivalents or alternatives within the scope of these claims.

Claims

1. A method for redrawing a dimension mark, characterized in that: include: Determine the original dimensioning area in the preprocessed dimension drawing; Determining a target dimension to be redrawn according to the original dimension in the original dimension area; Based on the dimensioning requirement of the dimension drawing, the target dimensioning is redrawn in the dimension drawing.

2. The method according to claim 1, characterized in that Before determining the original dimension annotation in the preprocessed dimension drawing, the method further includes: Get the initial size map; Converting the initial size map into a grayscale size map; The grayscale size map is subjected to denoising processing to obtain the preprocessed size map.

3. The method according to claim 1, characterized in that Determining the original dimensioning area in the preprocessed dimension drawing includes: Using optical character recognition technology, extracting text information from the dimension image in the detection frame; Identifying original dimension annotations in the text information; The original dimension annotation area is determined according to parameter information of a detection frame corresponding to the original dimension annotation.

4. The method according to claim 3, characterized in that: The parameter information of the detection frame includes the center coordinates of the detection frame, the height of the detection frame, the width of the detection frame, and the counterclockwise rotation angle of the detection frame.

5. The method according to claim 1, characterized in that The redrawing of the target dimension annotation in the dimension drawing based on the dimension annotation requirement of the dimension drawing includes: removing the original dimensioning; The original dimension annotation and the target dimension annotation are redrawn in the original annotation area.

6. The method according to claim 5, characterized in that The target dimension annotation is redrawn in the original annotation area.

7. The method according to claim 5, characterized in that The removing of the original dimension annotation comprises: Obtain parameter information of a detection box corresponding to the original dimensioned area; Determining an elimination area based on a preset adjustment ratio and the parameter information; The eliminated area is repaired and redrawn to remove the original dimensioning.

8. A device for dimensioning and redrawing, characterized in that: include: An original dimensioning area determination module is used to determine the original dimensioning area in the preprocessed dimension drawing; A target dimensioning determination module, used to determine a target dimensioning to be redrawn according to the original dimensioning in the original dimensioning area; A redrawing module is used to redraw the target dimension annotation in the dimension drawing based on the dimension annotation requirement of the dimension drawing.

9. A device for dimensioning and redrawing, characterized in that: include: processor; A memory storing program instructions for dimension marking and redrawing, wherein when the program instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions for dimensioning and redrawing. When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.