A ship thickness measurement sketch data extraction method, system and electronic device
Patent Information
- Application Number
- CN202611079965.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-08-18
AI Technical Summary
[0003]在相关技术中,为了提高船舶测厚草图的数字化效率,一般采用工程图纸识别技术开展图纸自动化解析,但现有的工程图纸识别技术需立足于通用工程图纸或船舶设备图纸研发,其图像处理手段较为单一且算法配置固定僵化,因此难以适配船舶测厚草图的复杂成像工况,进而影响针对船舶测厚草图的数字化提取效果
[0016] The present invention discloses a method, system, and electronic device for extracting ship thickness measurement sketch data. First, the original image is preprocessed to obtain a binarized image, effectively removing scanning noise, enhancing line and background contrast, and reducing misjudgments caused by poor image quality. Next, based on the binarized image, edge detection and contour extraction are used to divide the sketch into multiple structural blocks and obtain their metadata and sub-region images. This decomposes the originally mixed global drawing into independent local regions, avoiding interference between different regions, while retaining the metadata of each structural block in the original image to provide position and orientation information. Then, a multimodal large model is used to perform category recognition on the sub-region images of each block to determine its structural category, achieving data extraction from the drawing without... Based on the perception of functional areas, and according to the structural category, a corresponding data recognition strategy is determined, enabling different structural blocks to be matched with the most suitable algorithm combination and processing logic for their corresponding drawing types. Furthermore, a targeted recognition workflow is constructed based on the data recognition strategy, and specialized data extraction is performed to ensure that key block element data in each structural block can be accurately identified and extracted by the most suitable method, thereby reducing false positives and false negatives. Finally, based on the metadata of all structural blocks, the extracted block element data is spatially transformed and a structured data report is generated, unifying image information scattered across different structural blocks and with different coordinate systems to the same coordinate system and establishing a correlation, ensuring that the block element data remains spatially consistent. In summary, this invention solves the problem of low extraction accuracy caused by single image processing and rigid algorithm configuration in existing technologies by dividing the area and classifying and matching suitable data recognition strategies.
Smart Images

Figure CN122598205A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ship drawing recognition technology, and more specifically, to a method, system, and electronic device for extracting ship thickness measurement sketch data. Background Technology
[0002] Ship thickness measurement sketches are core data for hull plate thickness inspection. These drawings integrate various heterogeneous information, including measurement points, thickness values, rib markings, bulkhead and outer plate outlines, aggregate structure, and omitted annotations. They serve as the data foundation for hull corrosion assessment and repair plan development. Currently, thickness measurement data is typically digitized through manual drawing interpretation and data entry.
[0003] In related technologies, in order to improve the digitization efficiency of ship thickness measurement sketches, engineering drawing recognition technology is generally used to carry out automated analysis of drawings. However, existing engineering drawing recognition technology needs to be based on the development of general engineering drawings or ship equipment drawings. Its image processing methods are relatively simple and the algorithm configuration is fixed and rigid. Therefore, it is difficult to adapt to the complex imaging conditions of ship thickness measurement sketches, thus affecting the digitization extraction effect of ship thickness measurement sketches. Summary of the Invention
[0004] The problem addressed by this invention is how to improve the accuracy of data extraction from ship thickness measurement sketches.
[0005] To address the above problems, this invention provides a method, system, and electronic device for extracting ship thickness sketch data.
[0006] In a first aspect, the present invention provides a method for extracting ship thickness sketch data, comprising: The original image of the ship thickness measurement sketch is acquired, and the original image is preprocessed to obtain a binarized image of the ship thickness measurement sketch. Based on the binarized image, the ship thickness measurement sketch is divided into multiple structural blocks by edge detection and contour extraction, and the metadata of the structural blocks in the ship thickness measurement sketch and the sub-region image of the structural blocks in the original image are obtained. By using a multimodal large model, the sub-region images corresponding to each structural plate are classified to determine the structural category of each structural plate. Based on the structural category of the structural plate, determine the data identification strategy for the structural plate; Based on the data recognition strategy of the structural blocks, a recognition workflow for the structural blocks is constructed, and through the recognition workflow, specific data extraction is performed on the sub-region images corresponding to the structural blocks to obtain the block element data corresponding to the structural blocks; Based on the metadata of all the structural blocks, spatial data transformation is performed on the block element data of all the structural blocks to generate a structured data report of the ship thickness measurement sketch.
[0007] Optionally, the preprocessing of the original image to obtain a binarized image of the ship thickness sketch includes: The original image is sequentially processed by grayscale conversion, noise reduction, contrast enhancement, and line enhancement to obtain an enhanced image of the original image; Each pixel in the enhanced image is subjected to adaptive threshold binarization to obtain the pixel category of each pixel. Based on the pixel category of each pixel, the enhanced image is converted into the binarized image.
[0008] Optionally, the step of dividing the ship thickness measurement sketch into multiple structural sections based on the binarized image through edge detection and contour extraction, and obtaining the metadata of the structural sections in the ship thickness measurement sketch and the sub-region image of the corresponding structural section in the original image, includes: Perform Canny edge detection on the binarized image to obtain an edge detection map; Contour tracking is performed on the edge detection map to obtain multiple closed contours; The binarized image is subjected to a probabilistic Hough transform to obtain multiple line segments, and each line segment is divided into a horizontal line segment or a vertical line segment according to the angle direction of each line segment. A grid is constructed based on the intersection points of the horizontal and vertical line segments; The closed contour is fused with the divided grid to obtain multiple boundary polygons, wherein each boundary polygon corresponds to one of the structural blocks; The rotation angle of the minimum bounding rectangle of the boundary polygon of each structural plate and the position information of the minimum bounding rectangle in the ship thickness measurement sketch are used as the metadata of the structural plate. Based on the boundary polygon of each structural plate, a sub-region image corresponding to each structural plate is extracted from the original image, wherein the sub-region images corresponding to each structural plate do not overlap.
[0009] Optionally, the step of performing category recognition on the sub-region image corresponding to each structural plate using a multimodal large model to determine the structural category of each structural plate includes: The sub-region image corresponding to each of the structural blocks is input into the multimodal large model along with a preset text command, and the multimodal large model outputs a JSON format string. Based on the JSON format string, determine the category label and category confidence of the structural module; The structural category of the structural plate is determined based on the category label and the category confidence level. The structural categories include any one of the following: outer plate unfolding diagram, deck plan, bulkhead diagram, rib marking area, and thickness measurement data table.
[0010] Optionally, determining the data identification strategy for the structural plate based on its structural category includes: Based on the structural category of the structural module, the identification sub-algorithm and algorithm execution order corresponding to the structural category are obtained by querying the preset category-workflow mapping table; The identification sub-algorithm and the execution order of the algorithm are used as the data identification strategy for the structural blocks; Wherein, when the structure category is the outer plate unfolded view or the deck plan view, the structure category identification sub-algorithm includes an outer contour detection sub-algorithm, a bone material detection sub-algorithm, a thickness measurement point identification sub-algorithm, and an OCR character recognition sub-algorithm; When the structure category is the bulkhead diagram, the structure category identification sub-algorithm includes an outer contour detection sub-algorithm, a thickness measurement point identification sub-algorithm, and an OCR character recognition sub-algorithm; When the structure category is the rib scale area, the structure category recognition sub-algorithm includes the rib ruler detection sub-algorithm and the OCR character recognition sub-algorithm; When the structure category is the thickness measurement data table, the recognition sub-algorithm for the structure category includes an OCR character recognition sub-algorithm.
[0011] Optionally, the data recognition strategy based on the structural blocks involves constructing a recognition workflow for the structural blocks, and using this workflow to extract specific data from the sub-region images corresponding to the structural blocks, thereby obtaining the block element data corresponding to the structural blocks, including: Based on the recognition sub-algorithm and the execution order of the algorithm, the sub-algorithm interface and data transmission channel are invoked to generate the recognition workflow for the structural blocks; Through the recognition workflow, the recognition sub-algorithm of the structural block is called to process the sub-region image according to the execution order of the algorithm, so as to obtain the output result of the recognition sub-algorithm corresponding to the structural block, and the output result is integrated into the block element data corresponding to the structural block.
[0012] Optionally, the step of calling the recognition sub-algorithm of the structural block to process the sub-region image and obtain the output result of the recognition sub-algorithm corresponding to the structural block includes: When the outer contour detection sub-algorithm is invoked, the main components in the sub-region image corresponding to the structural plate are identified to obtain the outer contour data of the main components in the sub-region image, and the outer contour data is used as the output result of the outer contour detection sub-algorithm. When the bone material detection sub-algorithm is invoked, the YOLO target detection model is used to identify and fit the bone material in the sub-region image corresponding to the structural plate to obtain the bone material data in the sub-region image, and the bone material data is used as the output result of the bone material detection sub-algorithm. When the thickness measurement point recognition sub-algorithm is invoked, the thickness measurement point positions in the sub-region image corresponding to the structural plate are identified through the OCR recognition model to obtain thickness measurement point data, and the thickness measurement point data is used as the output result of the thickness measurement point recognition sub-algorithm. When the OCR character recognition sub-algorithm is invoked, the text region in the sub-region image corresponding to the structural block is recognized to obtain text data, and the text data is used as the output result of the OCR character recognition sub-algorithm. When the rib gauge detection sub-algorithm is invoked, the rib gauge graphic in the sub-region image corresponding to the structural plate is identified to obtain rib data, and the rib data is used as the output result of the rib gauge detection sub-algorithm.
[0013] Optionally, the step of performing spatial data transformation on the plate element data of all the structural plates based on the metadata of all the structural plates to generate a structured data report of the ship thickness measurement sketch includes: Based on the rotation angle and position information in the metadata of the structural plate, the plate element data of the structural plate is converted into spatial data in the global coordinate system of the ship; The spatial data corresponding to all the structural plates are merged to generate a structured data report of the ship thickness measurement sketch.
[0014] Secondly, the present invention provides a system for extracting ship thickness sketch data, comprising: An image processing unit is used to acquire the original image of the ship thickness measurement sketch and preprocess the original image to obtain a binarized image of the ship thickness measurement sketch. The plate segmentation unit is used to divide the ship thickness measurement sketch into multiple structural plates based on the binarized image by edge detection and contour extraction, and to obtain the metadata of the structural plates in the ship thickness measurement sketch and the sub-region image of the structural plates in the original image. The category recognition unit is used to perform category recognition on the sub-region image corresponding to each of the structural blocks using a multimodal large model, and to determine the structural category of each structural block; The strategy determination unit is used to determine the data identification strategy of the structural plate according to the structural category of the structural plate; The data extraction unit is used to construct the identification workflow of the structural blocks based on the data identification strategy of the structural blocks, and to perform special data extraction on the sub-region images corresponding to the structural blocks through the identification workflow to obtain the block element data corresponding to the structural blocks. The data conversion unit is used to perform spatial data conversion on the plate element data of all the structural plates based on the metadata of all the structural plates, and generate a structured data report of the ship thickness measurement sketch.
[0015] Thirdly, the present invention provides an electronic device, comprising: a processor and a memory, wherein the memory is used to store a computer program; When the computer program is loaded by the processor, it causes the processor to execute the ship thickness sketch data extraction method as described above.
[0016] The present invention discloses a method, system, and electronic device for extracting ship thickness measurement sketch data. First, the original image is preprocessed to obtain a binarized image, effectively removing scanning noise, enhancing line and background contrast, and reducing misjudgments caused by poor image quality. Next, based on the binarized image, edge detection and contour extraction are used to divide the sketch into multiple structural blocks and obtain their metadata and sub-region images. This decomposes the originally mixed global drawing into independent local regions, avoiding interference between different regions, while retaining the metadata of each structural block in the original image to provide position and orientation information. Then, a multimodal large model is used to perform category recognition on the sub-region images of each block to determine its structural category, achieving data extraction from the drawing without... Based on the perception of functional areas, and according to the structural category, a corresponding data recognition strategy is determined, enabling different structural blocks to be matched with the most suitable algorithm combination and processing logic for their corresponding drawing types. Furthermore, a targeted recognition workflow is constructed based on the data recognition strategy, and specialized data extraction is performed to ensure that key block element data in each structural block can be accurately identified and extracted by the most suitable method, thereby reducing false positives and false negatives. Finally, based on the metadata of all structural blocks, the extracted block element data is spatially transformed and a structured data report is generated, unifying image information scattered across different structural blocks and with different coordinate systems to the same coordinate system and establishing a correlation, ensuring that the block element data remains spatially consistent. In summary, this invention solves the problem of low extraction accuracy caused by single image processing and rigid algorithm configuration in existing technologies by dividing the area and classifying and matching suitable data recognition strategies. Attached Figure Description
[0017] Figure 1This is a flowchart illustrating the ship thickness sketch data extraction method according to an embodiment of the present invention. Figure 2 This is a schematic diagram of a ship thickness sketch data extraction system according to another embodiment of the present invention. Detailed Implementation
[0018] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the accompanying drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0019] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0020] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to"; the term "based on" means "at least partially based on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments"; and the term "optionally" means "optional embodiments". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first," "second," etc., mentioned in this invention are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0021] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0022] Combination Figure 1 As shown in the figure, an embodiment of the present invention provides a method for extracting ship thickness sketch data, including: The original image of the ship thickness measurement sketch is acquired, and the original image is preprocessed to obtain a binarized image of the ship thickness measurement sketch.
[0023] Specifically, ship thickness measurement sketches are usually color or grayscale images obtained through scanning or photography. Therefore, it is necessary to convert the original input ship thickness measurement sketches into binary images. Through preprocessing operations such as denoising, contrast enhancement, and line enhancement, interference factors such as scanning artifacts, crease shadows, and background noise introduced during image acquisition can be effectively eliminated. At the same time, key structural features such as lines, text, and thickness measurement point symbols in the drawing can be highlighted, providing a clear and low-noise input foundation for subsequent image segmentation.
[0024] Based on the binarized image, the ship thickness measurement sketch is divided into multiple structural blocks by edge detection and contour extraction, and the metadata of the structural blocks in the ship thickness measurement sketch and the sub-region image of the structural blocks in the original image are obtained.
[0025] Specifically, the complex ship thickness measurement sketch is decomposed into multiple independent, non-overlapping structural sections. A single thickness measurement sketch often contains regions with different functions, such as the outer plate unfolded diagram, rib scale area, and thickness measurement data table. Due to the significant differences in features among these regions, processing them as a whole can easily lead to mutual interference. Through edge detection and contour extraction, the boundary polygons of each structural section can be automatically identified based on the table borders, separators, and closed boundaries of the drawing itself, and the metadata of each section (such as position and rotation angle) can be recorded. At the same time, the corresponding sub-region images are cropped from the original image. This allows for independent processing of each structural section in subsequent steps, avoiding feature confusion between regions and providing a spatial basis for differentiated algorithm scheduling.
[0026] By using a multimodal large model, the sub-region images corresponding to each structural plate are classified to determine the structural category of each structural plate.
[0027] Specifically, using a multimodal large-scale model fine-tuned for ship thickness measurement drawings, the system automatically determines the structural type of each structural panel, such as outer plating unfolded drawings, deck plans, bulkhead drawings, rib marking areas, or thickness measurement data tables. Different structural categories contain completely different data elements and have entirely different identification focuses. For example, outer plating unfolded drawings require a focus on extracting rib lines and thickness measurement points, while rib marking areas primarily focus on marking lines and rib numbers. By classifying according to structural categories, the system can identify the type of drawing area being processed, providing a basis for selecting appropriate identification strategies and avoiding misclassification of different types by a uniform algorithm.
[0028] Based on the structural category of the structural plate, a data identification strategy for the structural plate is determined.
[0029] Specifically, based on the identified structural categories, the most suitable data recognition scheme is matched for each structural panel. Different categories of structural panels require different recognition sub-algorithms and their execution order. For example, for a structural panel classified as an outer plate unfolded diagram, the outer contour needs to be detected first to determine the spatial range, then the core material needs to be detected, followed by the identification of thickness measurement points and their thickness values, and finally, text information needs to be added. For thickness measurement data tables, only text recognition needs to be performed. Therefore, by mapping structural categories to data recognition strategies, the recognition task for each structural panel can use the most suitable algorithm combination and execution process, thereby ensuring comprehensive extraction while avoiding unnecessary computational overhead and significantly improving the accuracy of key data extraction.
[0030] Based on the data recognition strategy of the structural blocks, a recognition workflow for the structural blocks is constructed, and through the recognition workflow, specific data is extracted from the sub-region images corresponding to the structural blocks to obtain the block element data corresponding to the structural blocks.
[0031] Specifically, the determined data recognition strategy is transformed into an executable recognition workflow, and the specific extraction of various elements within the structural blocks is completed. By constructing the workflow, the sub-algorithms included in the data recognition strategy can be organized in a predetermined order, and the transfer of data between sub-algorithms can be standardized. After executing the recognition workflow, all block element data contained in the block can be extracted from the sub-region image, such as the outline polygon, bone segments, image coordinates and thickness values of thickness measurement points, text content, rib gauge parameters, etc. This ensures that each block element data is processed by the algorithm most capable of handling it, greatly reducing the probability of missed detections and false detections.
[0032] Based on the metadata of all the structural blocks, spatial data transformation is performed on the block element data of all the structural blocks to generate a structured data report of the ship thickness measurement sketch.
[0033] Specifically, feature data scattered across multiple sections, each with its own independent image coordinate system, is uniformly transformed into the ship's global coordinate system and integrated into a structured output. Since the sub-region images of each section are cropped from the original images, their coordinates are offset and rotated relative to the original images, and there is a lack of spatial correlation between different sections. By utilizing the metadata of each structural section, the features in each section are mapped to a unified global physical coordinate system or three-dimensional spatial coordinate system. The resulting structured data reports, such as three-dimensional geometric model files or CSV tables, can be directly used for downstream work such as ship corrosion assessment and maintenance plan development, realizing the transformation from drawings to digital data.
[0034] The ship thickness measurement sketch data extraction method of the present invention firstly preprocesses the original image to obtain a binarized image, effectively removing scanning noise, enhancing line and background contrast, and reducing misjudgments caused by poor image quality. Next, based on the binarized image, edge detection and contour extraction are used to divide the sketch into multiple structural blocks and obtain their metadata and sub-region images. This decomposes the originally mixed global drawing into independent local regions, avoiding interference between different regions, while retaining the metadata of each structural block in the original image to provide position and orientation information. Then, a multimodal large model is used to perform category recognition on the sub-region images of each block to determine its structural category, realizing the classification of different functional areas of the drawing. Based on domain perception, this invention determines corresponding data recognition strategies according to structural categories, enabling different structural blocks to be matched with the most suitable algorithm combinations and processing logic for their respective drawing types. Furthermore, based on the data recognition strategies, a targeted recognition workflow is constructed and specialized data extraction is performed, ensuring that key block element data in each structural block can be accurately identified and extracted using the most appropriate methods, thereby reducing false positives and false negatives. Finally, based on the metadata of all structural blocks, the extracted block element data undergoes spatial data transformation and a structured data report is generated. This unifies image information scattered across different structural blocks and with different coordinate systems, transforming it to the same coordinate system and establishing associations, ensuring spatial consistency of block element data. In summary, this invention solves the problem of low extraction accuracy caused by single image processing and rigid algorithm configurations in existing technologies by dividing regions and classifying and matching suitable data recognition strategies.
[0035] Optionally, the preprocessing of the original image to obtain a binarized image of the ship thickness sketch includes: The original image is sequentially processed by grayscale conversion, noise reduction, contrast enhancement, and line enhancement to obtain an enhanced image of the original image; Each pixel in the enhanced image is subjected to adaptive threshold binarization to obtain the pixel category of each pixel. Based on the pixel category of each pixel, the enhanced image is converted into the binarized image.
[0036] Specifically, the original image is first subjected to grayscale conversion, denoising, contrast enhancement, and line enhancement processes sequentially to obtain an enhanced image. Specifically, grayscale conversion converts the color image into a single-channel grayscale image, reducing subsequent computation. Denoising employs a combination of adaptive Gaussian filtering and fast nonlocal mean denoising. In this embodiment, the Gaussian filter kernel size is set to 5×5 pixels, and the standard deviation is automatically estimated based on the local noise level of the image to smooth the Gaussian noise introduced by the scan. The fast nonlocal mean denoising search window is set to 21×21 pixels, the neighborhood window to 7×7 pixels, and the smoothing intensity parameter is set to 10 to 15 to remove texture noise from the drawing while preserving line boundaries. The contrast enhancement process employs a combination of limited contrast adaptive histogram equalization and global gamma correction. First, the denoised image is divided into non-overlapping grid blocks. Within each grid block, limited contrast adaptive histogram equalization is performed independently. In this embodiment, the cropping threshold is set to 1.5 to suppress noise amplification caused by excessively high local contrast. Then, global gamma correction is performed on the processed image, with a gamma value set to 1.2 to 1.5 to uniformly adjust the overall brightness, making the background more uniform and the foreground features (lines, symbols, and text) more prominent. Line enhancement processing comprises two branches: multi-scale Gaussian difference filtering and Hessian matrix line structure enhancement. Firstly, the contrast-enhanced image is filtered using different Gaussian kernel standard deviations, and the Gaussian filtering results at adjacent scales are subtracted pairwise to obtain a multi-scale Gaussian difference response map. This multi-scale Gaussian difference response map can amplify line structures of varying thicknesses. Secondly, the Hessian matrix of each pixel in the image is calculated, yielding two eigenvalues. By analyzing the characteristics of point structures (both eigenvalues are small) and line structures (one eigenvalue is close to zero, and the other has a large absolute value), a line structure enhancement filter is constructed, generating a line probability map. Finally, the Gaussian difference response map and the line probability map are weighted and fused with a weight of 0.5:0.5 to obtain the final enhanced image.After obtaining the enhanced image, adaptive threshold binarization is performed on each pixel in the enhanced image. A neighborhood window is taken with the current pixel as the center, and the gray mean m and gray standard deviation s of all pixels in the neighborhood window are calculated. The adaptive binarization threshold of the pixel is determined according to the threshold calculation formula T = m + k×s, where T is the binarization threshold, m is the gray mean of all pixels in the neighborhood window, s is the gray standard deviation of all pixels in the neighborhood window, and k is a preset offset constant (the value of k is usually in the range of -0.2 to 0.2, and the specific value can be dynamically adjusted according to the local contrast of the drawing). Then, the original gray value of the current pixel is compared with the calculated binarization threshold T. If the original gray value is greater than or equal to T, the pixel category of the current pixel is determined as a foreground pixel (assigned a value of 255); otherwise, it is determined as a background pixel (assigned a value of 0). Finally, based on the pixel category determined for each pixel in the enhanced image, the foreground or background values of all pixels are assigned and combined according to their original spatial positions, thereby converting the entire enhanced image into a binary image. In the binary image, key structures such as lines, text, and thickness measurement symbols are presented as white foregrounds, while background noise, creases, shadows, etc. are filtered out as black backgrounds.
[0037] In this embodiment of the invention, by sequentially performing grayscale conversion, denoising, contrast enhancement, line enhancement, and adaptive threshold binarization on the original image, the recognizability of key structures can be improved in a targeted manner based on the imaging characteristics of ship thickness measurement sketches, such as low contrast, high noise, and dense fine lines. At the same time, the binarization threshold is dynamically calculated adaptively based on local grayscale statistical features, providing high-quality basic image data for subsequent drawing area segmentation. This fundamentally reduces misidentification and missed identification caused by image quality defects, thereby improving the overall accuracy and robustness of ship thickness measurement sketch data extraction.
[0038] Optionally, the step of dividing the ship thickness measurement sketch into multiple structural sections based on the binarized image through edge detection and contour extraction, and obtaining the metadata of the structural sections in the ship thickness measurement sketch and the sub-region image of the corresponding structural section in the original image, includes: Perform Canny edge detection on the binarized image to obtain an edge detection map; Contour tracking is performed on the edge detection map to obtain multiple closed contours; The binarized image is subjected to a probabilistic Hough transform to obtain multiple line segments, and each line segment is divided into a horizontal line segment or a vertical line segment according to the angle direction of each line segment. A grid is constructed based on the intersection points of the horizontal and vertical line segments; The closed contour is fused with the divided grid to obtain multiple boundary polygons, wherein each boundary polygon corresponds to one of the structural blocks; The rotation angle of the minimum bounding rectangle of the boundary polygon of each structural plate and the position information of the minimum bounding rectangle in the ship thickness measurement sketch are used as the metadata of the structural plate. Based on the boundary polygon of each structural plate, a sub-region image corresponding to each structural plate is extracted from the original image, wherein the sub-region images corresponding to each structural plate do not overlap.
[0039] Specifically, based on the binarized image, the ship thickness measurement sketch is divided into multiple structural sections through edge detection and contour extraction, and the metadata of each structural section in the ship thickness measurement sketch and the corresponding sub-region image in the original image are obtained. First, Canny edge detection is performed on the binarized image. In this embodiment, the low threshold can be set to 50 and the high threshold can be set to 150 to obtain an edge detection map, which can highlight all strong edge positions in the image. Next, a contour tracking algorithm (such as the Suzuki-Abe contour tracking algorithm) is executed on the edge detection map to extract multiple closed contours. The closed contours correspond to the continuous boundaries formed by table frames, outer boundaries, and internal closed regions in the binarized image. Simultaneously, a probabilistic Hough transform is performed on the binarized image. In this embodiment, the parameters can be set to a distance resolution of 1 pixel, an angle resolution of π / 180 radians, an accumulator threshold of 50, a minimum line segment length of 30 pixels, and a maximum break gap of 10 pixels, thereby extracting multiple straight line segments. Then, based on the angular direction of each straight line segment, straight line segments with an absolute angle value less than or equal to 5° are divided into horizontal line segments, and straight line segments with an absolute angle value greater than or equal to 85° are divided into vertical line segments. After obtaining the sets of horizontal and vertical line segments, the intersection points of each horizontal and vertical line segment are calculated. Based on the spatial distribution of the intersection points, a grid covering the entire image is constructed. This grid reflects the area boundaries naturally formed by regular lines such as table lines, rib scale lines, and longitudinal rib markings in the ship thickness measurement sketch. The extracted closed contours are fused with the aforementioned mesh. For each mesh cell and the region defined by each closed contour, its convex hull is calculated to eliminate concave and jagged boundaries. Adjacent convex hulls with the same orientation are then merged based on geometric constraints such as rectangularity, area, and aspect ratio, resulting in multiple boundary polygons, each corresponding to an independent structural block. For each structural block's boundary polygon, its minimum bounding rectangle is calculated. The rotation angle of this minimum bounding rectangle and its position information in the ship thickness sketch (including the coordinates of its upper left vertex, width, and height) are used as the metadata of the structural block, recording its spatial orientation and distribution within the entire drawing. Finally, based on the boundary polygons of each structural block, corresponding sub-region images are cropped from the original ship thickness sketch image (i.e., the original image without binarization). Since the boundary polygons do not overlap, the extracted sub-region images also do not overlap spatially, ensuring that the image content of each structural block is independent, complete, and free from mutual interference.
[0040] In this embodiment of the invention, through the aforementioned edge detection, contour tracking, line extraction, mesh construction, and boundary polygon fusion, the ship thickness measurement sketch can be automatically decomposed into multiple spatially independent and non-overlapping structural blocks, and the rotation angle and position information of each block can be recorded. This avoids mutual interference between features of different functional areas, eliminates boundary deviations caused by manual selection or fixed mesh division, and provides an accurate spatial segmentation basis and coordinate transformation basis for subsequent category recognition and special data extraction, significantly improving the separation accuracy and segmentation efficiency of structural blocks in complex drawings.
[0041] Optionally, the step of performing category recognition on the sub-region image corresponding to each structural plate using a multimodal large model to determine the structural category of each structural plate includes: The sub-region image corresponding to each of the structural blocks is input into the multimodal large model along with a preset text command, and the multimodal large model outputs a JSON format string. Based on the JSON format string, determine the category label and category confidence of the structural module; The structural category of the structural plate is determined based on the category label and the category confidence level. The structural categories include any one of the following: outer plate unfolding diagram, deck plan, bulkhead diagram, rib marking area, and thickness measurement data table.
[0042] Specifically, firstly, the sub-region image corresponding to each structural plate, along with a pre-defined fixed-format text instruction, is input into a multimodal large-scale model specifically fine-tuned for the ship thickness measurement drawing domain. The multimodal large-scale model uses Qwen3-VL-32B as its base model and employs a low-rank adaptation method for fine-tuning on the ship thickness measurement drawing dataset, updating only a small number of adaptation parameters. This allows it to learn the domain features of ship thickness measurement drawings while retaining pre-trained knowledge. The pre-defined text instruction can be: "Please identify the structural type of the ship thickness measurement drawing plate in the image, selecting from 'outer plating unfolded view,' 'deck plan view,' 'bullet view,' 'rib marking area,' and 'thickness measurement data table.'" After receiving the sub-region image and text instruction, the multimodal large-scale model outputs a JSON-formatted string, which at least contains a category label and a category confidence vector. Then, the JSON-formatted string is parsed to extract the category label and corresponding category confidence of the structural plate. Finally, based on the category label (e.g., outer plate unfolded drawing) and the category confidence level (e.g., 0.96), if the confidence level is higher than a preset threshold (e.g., 0.7), the category label is directly determined as the structural category of the structural plate; if the confidence level is lower than the threshold, manual review or a default category can be triggered. The structural category is limited to any one of the following: outer plate unfolded drawing, deck plan, bulkhead drawing, rib scale area, and thickness measurement data table. The above structural categories cover the most common functional areas in ship thickness measurement sketches.
[0043] In this embodiment of the invention, by inputting the sub-regional images of each structural plate and fixed-format text instructions into a multimodal large model finely tuned in the field of ship thickness measurement drawings, and parsing its output JSON format string to obtain category labels and confidence levels, it can automatically identify five common structural plates, including outer plate unfolded drawings, deck plan drawings, bulkhead drawings, rib scale areas, and thickness measurement data tables. This enables the perception of different functional areas of the drawings, providing a reliable basis for the differentiated selection of subsequent data identification strategies. It avoids the incompatibility problem caused by using a uniform algorithm for all areas, thereby improving the targeting and accuracy of complex ship thickness measurement sketch data extraction from the source.
[0044] Optionally, determining the data identification strategy for the structural plate based on its structural category includes: Based on the structural category of the structural module, the identification sub-algorithm and algorithm execution order corresponding to the structural category are obtained by querying the preset category-workflow mapping table; The identification sub-algorithm and the execution order of the algorithm are used as the data identification strategy for the structural blocks; Wherein, when the structure category is the outer plate unfolded view or the deck plan view, the structure category identification sub-algorithm includes an outer contour detection sub-algorithm, a bone material detection sub-algorithm, a thickness measurement point identification sub-algorithm, and an OCR character recognition sub-algorithm; When the structure category is the bulkhead diagram, the structure category identification sub-algorithm includes an outer contour detection sub-algorithm, a thickness measurement point identification sub-algorithm, and an OCR character recognition sub-algorithm; When the structure category is the rib scale area, the structure category recognition sub-algorithm includes the rib ruler detection sub-algorithm and the OCR character recognition sub-algorithm; When the structure category is the thickness measurement data table, the recognition sub-algorithm for the structure category includes an OCR character recognition sub-algorithm.
[0045] Specifically, firstly, based on the identified structural categories of the structural modules, the pre-built category-workflow mapping table is queried. This table stores, in key-value pairs, the correspondence between different structural categories and the set of required identification sub-algorithms, as well as the execution order of each sub-algorithm. By querying the category-workflow mapping table, the sequence of identification sub-algorithms and their execution order corresponding to the structural category are obtained, and this sequence is used as the data identification strategy for the structural modules.
[0046] Specifically, when the structural category is an outer plating unfolded drawing or a deck plan, these two types of drawings contain the complete hull outline, dense distribution of ribs (longitudinal ribs and stiffeners), and numerous thickness measurement points, along with rib numbers and structural annotations. The corresponding recognition sub-algorithms, executed in the following order, include: an outer contour detection sub-algorithm, a rib detection sub-algorithm, a thickness measurement point recognition sub-algorithm, and an OCR character recognition sub-algorithm. The algorithm execution order for the outer plating unfolded drawing or deck plan follows a logical hierarchy: first, determining the spatial range (outer contour); then, extracting the linear structure (ribs); next, locating key thickness measurement points and their thickness values; and finally, supplementing textual information. When the structural category is a bulkhead drawing, the bulkhead drawing is typically a planar or near-planar structure, not containing ribs such as longitudinal ribs. Therefore, its corresponding recognition sub-algorithms include an outer contour detection sub-algorithm, a thickness measurement point recognition sub-algorithm, and an OCR character recognition sub-algorithm, omitting the rib detection sub-algorithm. When the structure category is a rib marking area, since the main function of the rib marking area is to provide a scale relationship between rib numbers and physical locations, without involving contours, rib material, or thickness measurement points, its corresponding recognition sub-algorithm includes a rib ruler detection sub-algorithm and an OCR character recognition sub-algorithm. The rib ruler detection sub-algorithm is responsible for detecting the scale line spacing and scale, while the OCR character recognition sub-algorithm is responsible for recognizing the rib number. When the structure category is a thickness measurement data table, this area only contains text data arranged in rows and columns, without graphic elements. Its corresponding recognition sub-algorithm only includes an OCR character recognition sub-algorithm, which directly performs end-to-end recognition of the text within the cells. Through this classification mapping mechanism, each structural module can obtain a customized combination of recognition sub-algorithms and execution order, avoiding redundant algorithm execution or the omission of key features.
[0047] In this embodiment of the invention, by pre-setting a category-workflow mapping table and querying the corresponding identification sub-algorithm and execution order according to the structural category, the most suitable algorithm combination and execution process can be automatically matched for different structural categories represented by outer plate unfolding diagram, deck plan diagram, bulkhead diagram, rib scale area and thickness measurement data table. This avoids redundant calculations or omission of key features caused by fixed and rigid algorithm configuration, realizes on-demand and precise scheduling of algorithm resources, significantly improves the targeting and efficiency of data extraction, and effectively reduces the risk of identification errors caused by algorithm mismatch.
[0048] Optionally, the data recognition strategy based on the structural blocks involves constructing a recognition workflow for the structural blocks, and using this workflow to extract specific data from the sub-region images corresponding to the structural blocks, thereby obtaining the block element data corresponding to the structural blocks, including: Based on the recognition sub-algorithm and the execution order of the algorithm, the sub-algorithm interface and data transmission channel are invoked to generate the recognition workflow for the structural blocks; Through the recognition workflow, the recognition sub-algorithm of the structural block is called to process the sub-region image according to the execution order of the algorithm, so as to obtain the output result of the recognition sub-algorithm corresponding to the structural block, and the output result is integrated into the block element data corresponding to the structural block.
[0049] Specifically, in this invention, a recognition workflow is constructed based on a predetermined data recognition strategy, and this workflow is used to extract specific data from the sub-region images corresponding to the structural blocks. First, according to the recognition sub-algorithm sequence and execution order obtained from the category-workflow mapping table, the application programming interfaces (APIs) of each pre-encapsulated recognition sub-algorithm are called, and a data transfer channel is established between the sub-algorithms, thereby generating a recognition workflow instance object for the structural block. This workflow instance object contains a sequentially arranged list of sub-algorithm calls, the input data interface required by each sub-algorithm (e.g., the sub-region image corresponding to the structural block, the output result of the previous sub-algorithm), and the output data storage structure after each sub-algorithm is executed. Then, by executing this recognition workflow, the corresponding recognition sub-algorithms are called sequentially according to the predetermined algorithm execution order to process the sub-region images corresponding to the structural blocks. After all sub-algorithms have been called in the execution order, the output results of each recognition sub-algorithm are structurally encapsulated and integrated into the block element data corresponding to the structural block for use in subsequent spatial data conversion steps.
[0050] In this embodiment of the invention, by generating a targeted recognition workflow by calling the sub-algorithm interface and data transmission channel according to the recognition sub-algorithm and execution order, and executing each sub-algorithm in sequence to perform specialized processing on the sub-region image, the invention can decompose the recognition task of different structural blocks into a cascading call of suitable sub-algorithms, ensuring that each element (outer contour, skeleton, thickness measurement point, text, rib gauge) is processed by the most suitable algorithm. At the same time, the information reuse between sub-algorithms is realized through the data transmission channel (such as skeleton extraction being constrained by the outer contour), thereby significantly improving the completeness and accuracy of data extraction and avoiding the problem that general algorithms are insufficient in processing multiple heterogeneous elements in ship thickness measurement sketches.
[0051] Optionally, the step of calling the recognition sub-algorithm of the structural block to process the sub-region image and obtain the output result of the recognition sub-algorithm corresponding to the structural block includes: When the outer contour detection sub-algorithm is invoked, the main components in the sub-region image corresponding to the structural plate are identified to obtain the outer contour data of the main components in the sub-region image, and the outer contour data is used as the output result of the outer contour detection sub-algorithm. When the bone material detection sub-algorithm is invoked, the YOLO target detection model is used to identify and fit the bone material in the sub-region image corresponding to the structural plate to obtain the bone material data in the sub-region image, and the bone material data is used as the output result of the bone material detection sub-algorithm. When the thickness measurement point recognition sub-algorithm is invoked, the thickness measurement point positions in the sub-region image corresponding to the structural plate are identified through the OCR recognition model to obtain thickness measurement point data, and the thickness measurement point data is used as the output result of the thickness measurement point recognition sub-algorithm. When the OCR character recognition sub-algorithm is invoked, the text region in the sub-region image corresponding to the structural block is recognized to obtain text data, and the text data is used as the output result of the OCR character recognition sub-algorithm. When the rib gauge detection sub-algorithm is invoked, the rib gauge graphic in the sub-region image corresponding to the structural plate is identified to obtain rib data, and the rib data is used as the output result of the rib gauge detection sub-algorithm.
[0052] Specifically, when the outer contour detection sub-algorithm is called, Canny edge detection is first performed on the sub-region image corresponding to the structural plate to obtain the edge map. Then, the contour tracking algorithm is used to extract all closed boundaries. Convex hull detection is performed on each closed contour to remove internal holes and small interferences. Next, the structural contours of the main components (such as cabins, outer plates, etc.) are selected based on area and shape priors. Finally, the polygon approximation algorithm is used to simplify the nodes of the selected contours to restore the outer shape boundary of the main components. The set of polygon vertices of the outer shape boundary is output as the outer contour data.
[0053] When the bone material detection sub-algorithm is invoked, the YOLO object detection model trained on the ship bone material symbol dataset is used to infer the sub-region image. Through the YOLO object detection model, the bounding box position, category (such as longitudinal bone or reinforcing rib), and rotation direction angle of each bone material are predicted simultaneously. Then, within the bounding box of each detected bone material, local line segments are extracted and fitted along the long axis of the bone material to generate the coordinates of the endpoints of the line segments representing the bone material, and the coordinates of the endpoints of the line segments are output as the bone material data.
[0054] When the thickness measurement point recognition sub-algorithm is invoked, the circular thickness measurement points are first located in the sub-region image (usually by extracting the circular symbols through Hough circle transform), and the enclosing rectangular region corresponding to each thickness measurement point is determined. Then, the OCR recognition model is invoked to recognize the numerical characters within the enclosing rectangular region to obtain the thickness reading string. After filtering the thickness reading string according to rules (keeping only the numbers and decimal points), the thickness value is obtained. At the same time, the center coordinates of the thickness measurement point in the image are recorded. Finally, the image coordinates of each thickness measurement point and its corresponding thickness value are output as the thickness measurement point data.
[0055] When the OCR character recognition sub-algorithm is invoked, the PaddleOCR end-to-end text recognition network is used to process the sub-region image. Its detection part uses a differentiable binarization algorithm to locate the text line, and uses a convolutional recurrent neural network and a connection-based temporal classification architecture to predict the sequence content of the text line, directly outputting the character sequence and its bounding box coordinates. For recognition results with confidence scores lower than a preset threshold, the local image is normalized and cross-correlated with a pre-stored library of handwritten digits and special symbols to correct or supplement the output of the main network. Finally, the complete text content and its location information are output as text data.
[0056] When the rib gauge detection sub-algorithm is invoked, the sub-region image is first vertically projected, the number of foreground pixels in each column is counted, and the left and right boundaries of the rib gauge are located based on the significant peak of the projection histogram. Within the located area, all scale lines are found using horizontal line detection, and the vertical axis direction of the rib gauge is determined. The pixel spacing between adjacent horizontal scale lines is extracted, and the average spacing is calculated by statistically analyzing the median or mean. Combined with prior knowledge (such as the actual rib spacing), the scale between the pixels and the actual physical length is calculated. At the same time, the OCR character recognition function is invoked in the area next to the scale lines to identify the starting or key rib numbers on the gauge, determine the rib number reference, and finally output the scale, reference number, and scale line position parameters as rib data.
[0057] In this embodiment of the invention, various types of element data are extracted from the sub-region image of the ship thickness sketch by detecting the outer contour, the rib material, the thickness measurement point, the OCR character, and the rib gauge, respectively. This ensures that the outer contour polygon boundary is continuous and complete, the direction of the rib material line segment is accurate, the coordinates of the thickness measurement point correspond to the thickness value, the text content is recognized with high confidence, and the proportional relationship of the rib gauge is accurately calculated. This provides structurally complete and accurate plate element data for subsequent spatial data conversion, reducing data extraction errors caused by single algorithms or feature mismatch.
[0058] Optionally, the step of performing spatial data transformation on the plate element data of all the structural plates based on the metadata of all the structural plates to generate a structured data report of the ship thickness measurement sketch includes: Based on the rotation angle and position information in the metadata of the structural plate, the plate element data of the structural plate is converted into spatial data in the global coordinate system of the ship; The spatial data corresponding to all the structural plates are merged to generate a structured data report of the ship thickness measurement sketch.
[0059] Specifically, the extracted panel element data is spatially transformed based on the metadata of all structural panels, and a structured data report is generated. Specifically, for the outer contour data of the structural panels, the outer contour data is converted into spatial contour data in the ship's global coordinate system based on the rotation angle and position information in the metadata. The rotation angle of the minimum bounding rectangle and the position information of this minimum bounding rectangle in the ship's thickness measurement sketch (including the coordinates of the upper left vertex, width, and height of the minimum bounding rectangle) are obtained from the structural panel's metadata. Since the outer contour data is a set of two-dimensional image coordinate points (i.e., the vertices of the outer contour polygon), these coordinate points are located in the local coordinate system of the sub-region image corresponding to the structural panel, with its origin typically being the upper left corner of the sub-region image. To transform the outer contour data to the ship's global coordinate system, a rotation matrix is first constructed, and the coordinates of each vertex are rotated and corrected using the opposite of the rotation angle to eliminate the tilt effect of the structural plate in the original image. Then, through translation transformation, the rotated vertex coordinates are mapped from the local coordinate system of the sub-region image to the original image coordinate system, with the translation amount determined by the coordinates of the upper left vertex in the position information. Next, using the pixel-to-actual physical size scale obtained from the rib data, the pixel coordinates in the original image coordinate system are converted into two-dimensional flattened physical coordinates in millimeters or meters. For structural plates with non-curved surfaces (such as rib scale areas or thickness measurement tables), the spatial transformation of the outer contour data is thus completed, resulting in two-dimensional spatial contour data in the ship's global coordinate system. For structural panels with curved surfaces (such as the outer plate unfolded diagram), it is necessary to further perform equal-area or equal-distance inverse mapping of the two-dimensional flattened physical coordinates through the control grid formed by the rib lines and longitudinal lines to obtain the three-dimensional curved surface parameter coordinates of the hull. Then, substitute them into the preset hull curved surface equation to obtain the local three-dimensional coordinates. Finally, according to the position of the structural panel in the overall layout of the ship, add rotation and translation transformations to obtain the three-dimensional spatial contour data in the global coordinate system of the ship.
[0060] For the rib position data of the structural plates, a linear mapping relationship between global rib position numbers and actual physical positions is established based on the scale line spacing and reference number in the rib position data. Based on this linear mapping relationship, arbitrary pixel coordinates are converted into corresponding rib position numbers and physical positions. First, a linear mapping relationship between image pixel coordinates and actual physical lengths is established based on the scale obtained from the rib position ruler detection (e.g., 0.5 mm per pixel). Then, using the identified starting rib position number and its pixel position in the image as a reference point, and combining the direction of the rib scale lines (usually vertical or horizontal) and the average pixel spacing between adjacent scale lines, a correspondence function between global rib position numbers and actual physical positions (usually in millimeters or meters, representing the longitudinal distance from the hull baseline or the lateral distance from the midships) is constructed. For any pixel in the image, by calculating the pixel offset of that pixel relative to the reference point, dividing it by the pixel value of the scale line spacing, and then multiplying it by the actual rib position spacing (usually 500 mm or 600 mm), the corresponding rib position number (which may be a non-integer, represented by linear interpolation) and its physical position can be obtained. This correspondence is stored in the form of a lookup table or mathematical function, which is used for spatial coordinate transformation of other segment element data such as thickness measurement point data and text annotation data. At the same time, the rib position data itself is also recorded as a set of scale information in the ship's global coordinate system, which is used to mark the rib position interval of each thickness measurement point in the final structured data report.
[0061] For the aggregate data of the structural plate, based on the rotation angle and position information in the metadata, the aggregate data is converted into spatial aggregate line segment data in the ship's global coordinate system. First, for the two endpoint coordinates of each aggregate line segment, the same coordinate transformation process as for the outer contour data is performed sequentially. Specifically, the endpoints are rotated and corrected according to the rotation angle in the structural plate's metadata, and then translated according to the coordinates of the upper left corner vertex in the position information, mapping the endpoint coordinates from the local coordinate system of the sub-region image to the original image coordinate system. Next, using the pixel-to-physical-size scale obtained from the rib data, the pixel coordinates in the original image coordinate system are converted into two-dimensional flattened physical coordinates. For aggregates on non-curved structural plates, the converted two-dimensional flattened physical coordinates serve as the endpoint coordinates of the spatial aggregate line segments, directly used to generate spatial aggregate line segment data in the ship's global coordinate system. For the skeletons (such as longitudinal skeletons) on curved structural plates (such as the outer plate unfolded diagram), it is also necessary to obtain the three-dimensional curved surface parameter coordinates by inverse mapping the two-dimensional flattened physical coordinates through the control mesh, substitute them into the hull surface equation to obtain the three-dimensional coordinates, and then obtain the spatial skeleton line segment data in the ship's global coordinate system through rotation and translation. All skeleton line segments maintain their original connection relationship after transformation, forming a spatial wireframe structure that fits the hull surface.
[0062] For the thickness measurement point data of the structural plates, based on the rotation angle and position information in the metadata, and relying on rib size mapping and hull surface interpolation, the three-dimensional point positions are solved to obtain thickness measurement point data with thickness attributes in the ship's global coordinate system. During spatial transformation, firstly, following the same coordinate transformation process as the outer contour data, based on the rotation angle and position information in the structural plate's metadata, the center coordinates of each thickness measurement point are transformed from the local coordinate system of the sub-region image to the original image coordinate system. Then, combined with the scale in the rib data, the two-dimensional flattened physical coordinates are obtained. For thickness measurement points located on planar structural plates (such as bulkhead diagrams or deck plan diagrams), these two-dimensional flattened physical coordinates are the final planar position coordinates, and the thickness value is directly associated and stored as the attribute value of that point. For thickness measurement points located on curved structural plates (such as the outer plate unfolded diagram), it is necessary to further determine the rib number and longitudinal bone position of the point based on the rib position mapping relationship. Using the rib lines and longitudinal bone lines extracted from the structural plate as control meshes, bilinear interpolation or equal-area inverse mapping is performed on the two-dimensional flattened physical coordinates to obtain the three-dimensional curved surface parameter coordinates of the hull. Then, these parameter coordinates are substituted into the preset hull surface equations (such as the outer plate shape values represented by NURBS surfaces or B-spline surfaces) to solve for the three-dimensional coordinates of the thickness measurement point in the local hull coordinate system. Finally, based on the position of the structural plate in the overall ship layout (such as port side, starboard side, midships, bow, etc.), a pre-set rotation matrix and translation vector are applied to transform the local three-dimensional coordinates to the ship's global coordinate system to obtain the final spatial thickness measurement point coordinates. The thickness value is then stored as a scalar attribute of the spatial point to ensure that the spatial position of each thickness measurement point corresponds to its thickness value and conforms to the actual geometry of the hull.
[0063] For the text data of the structural blocks, based on the location information in the metadata, the text data is mapped to annotation data in the ship's global coordinate system. The purpose of spatial transformation of the text data is to map the text annotations to appropriate positions in the ship's global coordinate system so that they can be used as annotations or attribute labels in the structured data report. During the transformation, firstly, for each text block of the text data, the center point or corner point of its bounding box is taken as a representative point. The representative point is rotated and corrected according to the rotation angle in the metadata of the structural block, and then translated to the original image coordinate system according to the coordinates of the upper left corner vertex in the location information. Next, the pixel coordinates are converted into two-dimensional flattened physical coordinates using the scale bar in the rib data. For text on non-curved structural blocks (such as the header text in the thickness measurement data table, the rib number in the rib scale area), this two-dimensional flattened physical coordinate is used as the two-dimensional position of the text annotation in the ship's global coordinate system. For text on curved structural plates (such as the inner bottom plate and longitudinal bulkheads marked in the outer plate unfolding diagram), it is also necessary to obtain the three-dimensional surface parameter coordinates by inverse mapping the two-dimensional flattened physical coordinates through the control mesh and substitute them into the hull surface equation to obtain the annotation position in three-dimensional space. Then, the thickness value or other attribute information is associated as an additional field of the text. After the coordinate transformation is completed, each text block is recorded as an annotation data object in the ship's global coordinate system, containing the text content, spatial coordinates (two-dimensional or three-dimensional), font size estimate, and the identifier of the structural plate to which it belongs. Finally, it is presented as an annotation layer in the structured data report (such as a three-dimensional geometric model file), or the text content is associated with the corresponding thickness measurement point or structural component in the tabular report.
[0064] Combination Figure 2 As shown, another embodiment of the present invention provides a ship thickness sketch data extraction system, comprising: An image processing unit is used to acquire the original image of the ship thickness measurement sketch and preprocess the original image to obtain a binarized image of the ship thickness measurement sketch. The plate segmentation unit is used to divide the ship thickness measurement sketch into multiple structural plates based on the binarized image by edge detection and contour extraction, and to obtain the metadata of the structural plates in the ship thickness measurement sketch and the sub-region image of the structural plates in the original image. The category recognition unit is used to perform category recognition on the sub-region image corresponding to each of the structural blocks using a multimodal large model, and to determine the structural category of each structural block; The strategy determination unit is used to determine the data identification strategy of the structural plate according to the structural category of the structural plate; The data extraction unit is used to construct the identification workflow of the structural blocks based on the data identification strategy of the structural blocks, and to perform special data extraction on the sub-region images corresponding to the structural blocks through the identification workflow to obtain the block element data corresponding to the structural blocks. The data conversion unit is used to perform spatial data conversion on the plate element data of all the structural plates based on the metadata of all the structural plates, and generate a structured data report of the ship thickness measurement sketch.
[0065] The ship thickness sketch data extraction system of the present invention has the same advantages over the prior art as the ship thickness sketch data extraction method described above, and will not be repeated here.
[0066] Another embodiment of the present invention provides an electronic device comprising: a processor and a memory, wherein the memory is used to store a computer program; When the computer program is loaded by the processor, it causes the processor to execute the ship thickness sketch data extraction method as described above.
[0067] The electronic device of the present invention has the same advantages over the prior art as the above-mentioned ship thickness sketch data extraction method, and will not be repeated here.
[0068] While the present invention has been disclosed above, its scope of protection is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, and all such changes and modifications will fall within the scope of protection of the present invention.
Claims
1. A method for extracting ship thickness sketch data, characterized in that, include: The original image of the ship thickness measurement sketch is acquired, and the original image is preprocessed to obtain a binarized image of the ship thickness measurement sketch. Based on the binarized image, the ship thickness measurement sketch is divided into multiple structural blocks by edge detection and contour extraction, and the metadata of the structural blocks in the ship thickness measurement sketch and the sub-region image of the structural blocks in the original image are obtained. By using a multimodal large model, the sub-region images corresponding to each structural plate are classified to determine the structural category of each structural plate. Based on the structural category of the structural plate, determine the data identification strategy for the structural plate; Based on the data recognition strategy of the structural blocks, a recognition workflow for the structural blocks is constructed, and through the recognition workflow, specific data extraction is performed on the sub-region images corresponding to the structural blocks to obtain the block element data corresponding to the structural blocks; Based on the metadata of all the structural blocks, spatial data transformation is performed on the block element data of all the structural blocks to generate a structured data report of the ship thickness measurement sketch.
2. The method for extracting ship thickness sketch data according to claim 1, characterized in that, The preprocessing of the original image to obtain the binarized image of the ship thickness sketch includes: The original image is sequentially processed by grayscale conversion, noise reduction, contrast enhancement, and line enhancement to obtain an enhanced image of the original image; Each pixel in the enhanced image is subjected to adaptive threshold binarization to obtain the pixel category of each pixel. Based on the pixel category of each pixel, the enhanced image is converted into the binarized image.
3. The method for extracting ship thickness sketch data according to claim 1, characterized in that, Based on the binarized image, the ship thickness measurement sketch is divided into multiple structural sections through edge detection and contour extraction. Metadata of each structural section in the ship thickness measurement sketch and the corresponding sub-region image of each structural section in the original image are then obtained, including: Perform Canny edge detection on the binarized image to obtain an edge detection map; Contour tracking is performed on the edge detection map to obtain multiple closed contours; The binarized image is subjected to a probabilistic Hough transform to obtain multiple line segments, and each line segment is divided into a horizontal line segment or a vertical line segment according to the angle direction of each line segment. A grid is constructed based on the intersection points of the horizontal and vertical line segments; The closed contour is fused with the divided grid to obtain multiple boundary polygons, wherein each boundary polygon corresponds to one of the structural blocks; The rotation angle of the minimum bounding rectangle of the boundary polygon of each structural plate and the position information of the minimum bounding rectangle in the ship thickness measurement sketch are used as the metadata of the structural plate. Based on the boundary polygon of each structural plate, a sub-region image corresponding to each structural plate is extracted from the original image, wherein the sub-region images corresponding to each structural plate do not overlap.
4. The method for extracting ship thickness sketch data according to claim 1, characterized in that, The step of using a multimodal large model to perform category recognition on the sub-region image corresponding to each structural plate to determine the structural category of each structural plate includes: The sub-region image corresponding to each of the structural blocks is input into the multimodal large model along with a preset text command, and the multimodal large model outputs a JSON format string. Based on the JSON format string, determine the category label and category confidence of the structural module; The structural category of the structural plate is determined based on the category label and the category confidence level. The structural categories include any one of the following: outer plate unfolding diagram, deck plan, bulkhead diagram, rib marking area, and thickness measurement data table.
5. The method for extracting ship thickness sketch data according to claim 4, characterized in that, The step of determining the data identification strategy for the structural modules based on their structural categories includes: Based on the structural category of the structural module, the identification sub-algorithm and algorithm execution order corresponding to the structural category are obtained by querying the preset category-workflow mapping table; The identification sub-algorithm and the execution order of the algorithm are used as the data identification strategy for the structural blocks; Wherein, when the structure category is the outer plate unfolded view or the deck plan view, the structure category identification sub-algorithm includes an outer contour detection sub-algorithm, a bone material detection sub-algorithm, a thickness measurement point identification sub-algorithm, and an OCR character recognition sub-algorithm; When the structure category is the bulkhead diagram, the structure category identification sub-algorithm includes an outer contour detection sub-algorithm, a thickness measurement point identification sub-algorithm, and an OCR character recognition sub-algorithm; When the structure category is the rib scale area, the structure category recognition sub-algorithm includes the rib ruler detection sub-algorithm and the OCR character recognition sub-algorithm; When the structure category is the thickness measurement data table, the recognition sub-algorithm for the structure category includes an OCR character recognition sub-algorithm.
6. The method for extracting ship thickness sketch data according to claim 5, characterized in that, The data recognition strategy based on the structural blocks constructs a recognition workflow for the structural blocks, and through the recognition workflow, performs specialized data extraction on the sub-region images corresponding to the structural blocks to obtain the block element data corresponding to the structural blocks, including: Based on the recognition sub-algorithm and the execution order of the algorithm, the sub-algorithm interface and data transmission channel are invoked to generate the recognition workflow for the structural blocks; Through the recognition workflow, the recognition sub-algorithm of the structural block is called to process the sub-region image according to the execution order of the algorithm, so as to obtain the output result of the recognition sub-algorithm corresponding to the structural block, and the output result is integrated into the block element data corresponding to the structural block.
7. The method for extracting ship thickness sketch data according to claim 6, characterized in that, The step of calling the recognition sub-algorithm of the structural block to process the sub-region image and obtaining the output result of the recognition sub-algorithm corresponding to the structural block includes: When the outer contour detection sub-algorithm is invoked, the main components in the sub-region image corresponding to the structural plate are identified to obtain the outer contour data of the main components in the sub-region image, and the outer contour data is used as the output result of the outer contour detection sub-algorithm. When the bone material detection sub-algorithm is invoked, the YOLO target detection model is used to identify and fit the bone material in the sub-region image corresponding to the structural plate to obtain the bone material data in the sub-region image, and the bone material data is used as the output result of the bone material detection sub-algorithm. When the thickness measurement point recognition sub-algorithm is invoked, the thickness measurement point positions in the sub-region image corresponding to the structural plate are identified through the OCR recognition model to obtain thickness measurement point data, and the thickness measurement point data is used as the output result of the thickness measurement point recognition sub-algorithm. When the OCR character recognition sub-algorithm is invoked, the text region in the sub-region image corresponding to the structural block is recognized to obtain text data, and the text data is used as the output result of the OCR character recognition sub-algorithm. When the rib gauge detection sub-algorithm is invoked, the rib gauge graphic in the sub-region image corresponding to the structural plate is identified to obtain rib data, and the rib data is used as the output result of the rib gauge detection sub-algorithm.
8. The method for extracting ship thickness sketch data according to claim 3, characterized in that, The step of performing spatial data transformation on the segment element data of all structural segments based on their metadata, and generating a structured data report of the ship thickness measurement sketch, includes: Based on the rotation angle and position information in the metadata of the structural plate, the plate element data of the structural plate is converted into spatial data in the global coordinate system of the ship; The spatial data corresponding to all the structural plates are merged to generate a structured data report of the ship thickness measurement sketch.
9. A system for extracting ship thickness sketch data, characterized in that, include: An image processing unit is used to acquire the original image of the ship thickness measurement sketch and preprocess the original image to obtain a binarized image of the ship thickness measurement sketch. The plate segmentation unit is used to divide the ship thickness measurement sketch into multiple structural plates based on the binarized image by edge detection and contour extraction, and to obtain the metadata of the structural plates in the ship thickness measurement sketch and the sub-region image of the structural plates in the original image. The category recognition unit is used to perform category recognition on the sub-region image corresponding to each of the structural blocks using a multimodal large model, and to determine the structural category of each structural block; The strategy determination unit is used to determine the data identification strategy of the structural plate according to the structural category of the structural plate; The data extraction unit is used to construct the identification workflow of the structural blocks based on the data identification strategy of the structural blocks, and to perform special data extraction on the sub-region images corresponding to the structural blocks through the identification workflow to obtain the block element data corresponding to the structural blocks. The data conversion unit is used to perform spatial data conversion on the plate element data of all the structural plates based on the metadata of all the structural plates, and generate a structured data report of the ship thickness measurement sketch.
10. An electronic device, characterized in that, include: Processor and memory, the memory being used to store computer programs; When the computer program is loaded by the processor, it causes the processor to execute the ship thickness sketch data extraction method as described in any one of claims 1-8.