An image processing method and device based on a digital twin model
By using digital twin model processing methods, image contours are extracted and repaired, solving the problem of incomplete objects in 3D scenes and achieving higher-precision image display.
Patent Information
- Application Number
- CN202311812588.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-12-26
AI Technical Summary
Existing technologies, when constructing 3D scenes, may result in discrepancies between the displayed scene and reality due to the fact that the received images may only contain a portion of the scene or the equipment and objects used for shooting may be incomplete, making it difficult to adapt to business needs.
By using an image processing method based on a digital twin model, the outline of the object in the image to be displayed is extracted, it is determined whether there are any missing parts, and the pre-set digital twin model and historical image data are used for repair processing to generate a complete image outline for display.
It improves the accuracy and effect of 3D scene display, ensures that the displayed objects and scenes are consistent with reality, and improves the display quality of images.
Smart Images

Figure CN117876268B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition and processing, and in particular to an image processing method and apparatus based on a digital twin model. Background Technology
[0002] With the development of technology, online applications are becoming increasingly diverse, one of which is the display of multi-dimensional data. By collecting different business images, converting them into 3D scenes, and adding corresponding business data, the barriers between business and data can be broken down.
[0003] After acquiring business images, the general process is to identify the outlines of various objects or devices within the image, and then perform 3D modeling based on the identified outlines to generate a visualizeable 3D scene for users to view.
[0004] However, since the received images may only show a portion of the scene or the equipment and objects being photographed may be incomplete, the subsequently constructed 3D scene may be missing, resulting in a discrepancy between the displayed scene and the actual scene, making it difficult to adapt to business needs. Summary of the Invention
[0005] This invention proposes an image processing method and apparatus based on a digital twin model, which can solve one or more of the above-mentioned technical problems.
[0006] A first aspect of this invention provides an image processing method based on a digital twin model, the method comprising:
[0007] After obtaining the image to be displayed and the display requirement information respectively, the outline of the object to be displayed is extracted from the image to be displayed to obtain the image outline;
[0008] Determine whether the image outline is missing based on the features of the object to be displayed in the display requirements information;
[0009] If it is determined that the image outline is missing, a preset digital twin model is invoked to repair the image outline using stored historical image data, so that the user can use the repaired image outline for image display.
[0010] In one possible implementation of the first aspect, determining whether the image outline is missing based on the descriptive features of the object to be displayed within the display requirement information includes:
[0011] If the object corresponding to the image outline is an environmental object, feature information about the coordinates of the object to be displayed is extracted from the display requirement information;
[0012] The coordinate region of the object is determined based on the feature information, and the contour region is determined from the image contour.
[0013] If the area of the coordinate region is the same as that of the contour region, then the image contour is determined to be without defects.
[0014] If the area of the coordinate region is different from that of the contour region, then the image contour is determined to be missing.
[0015] In one possible implementation of the first aspect, determining whether the image outline is missing based on the descriptive features of the object to be displayed within the display requirement information includes:
[0016] If the object corresponding to the image outline is a physical device, feature information about the shape of the object to be displayed is extracted from the display requirement information;
[0017] The size parameters of the object are determined using the feature information, and the contour parameters are extracted from the image contour.
[0018] If the size parameter is the same as the contour parameter, then the image contour is determined to be without defects.
[0019] If the size parameter is different from the contour parameter, then the image contour is determined to be missing.
[0020] In one possible implementation of the first aspect, extracting the outline of the object to be displayed from the image to be displayed to obtain the image outline includes:
[0021] After identifying the object outline in the image to be displayed, image segmentation is performed on the image to be displayed to obtain the object image;
[0022] After optimizing the object image to obtain an optimized image, contour extraction processing is performed on the optimized image to obtain the image contour. The optimization processing includes smoothing, noise reduction, and anti-aliasing.
[0023] In one possible implementation of the first aspect, the step of invoking a preset digital twin model to repair the image contour using stored historical image data includes:
[0024] When it is determined that the data update time of the preset database is less than the preset time, the preset digital twin model is invoked to search for historical image data in the database according to the characteristics of the object to be displayed. The data update time is the interval between the last update time node of the preset database and the current time node.
[0025] Image features are extracted from the historical image data and used to complete the image contour. The image features include image color, image shape, and image size.
[0026] In one possible implementation of the first aspect, after the step of invoking a preset digital twin model to repair the image contour using stored historical image data, the method further includes:
[0027] After obtaining a 3D model by performing 3D modeling using the repaired image contours, the user's data to be displayed is obtained.
[0028] After adding the data to be displayed to the 3D model, the 3D model containing the data is displayed.
[0029] In one possible implementation of the first aspect, after the step of invoking a preset digital twin model to repair the image contour using stored historical image data, the method further includes:
[0030] Obtain the background image input by the user, and merge the repaired image outline with the background image to obtain a merged image.
[0031] A second aspect of the present invention provides an image processing apparatus based on a digital twin model, the apparatus comprising:
[0032] The contour extraction module is used to extract the contour of the object to be displayed from the image to be displayed after obtaining the image to be displayed and the display requirement information respectively, so as to obtain the image contour.
[0033] The missing detection module is used to determine whether the image outline is missing based on the features of the object to be displayed in the display requirement information;
[0034] The repair processing module is used to call a preset digital twin model to repair the image contour using stored historical image data if it is determined that the image contour is missing, so that the user can call the repaired image contour for image display.
[0035] In one possible implementation of the second aspect, determining whether the image outline is missing based on the descriptive features of the object to be displayed within the display requirement information includes:
[0036] If the object corresponding to the image outline is an environmental object, feature information about the coordinates of the object to be displayed is extracted from the display requirement information;
[0037] The coordinate region of the object is determined based on the feature information, and the contour region is determined from the image contour.
[0038] If the area of the coordinate region is the same as that of the contour region, then the image contour is determined to be without defects.
[0039] If the area of the coordinate region is different from that of the contour region, then the image contour is determined to be missing.
[0040] In one possible implementation of the second aspect, determining whether the image outline is missing based on the descriptive features of the object to be displayed within the display requirement information includes:
[0041] If the object corresponding to the image outline is a physical device, feature information about the shape of the object to be displayed is extracted from the display requirement information;
[0042] The size parameters of the object are determined using the feature information, and the contour parameters are extracted from the image contour.
[0043] If the size parameter is the same as the contour parameter, then the image contour is determined to be without defects.
[0044] If the size parameter is different from the contour parameter, then the image contour is determined to be missing.
[0045] In one possible implementation of the second aspect, extracting the outline of the object to be displayed from the image to be displayed to obtain the image outline includes:
[0046] After identifying the object outline in the image to be displayed, image segmentation is performed on the image to be displayed to obtain the object image;
[0047] After optimizing the object image to obtain an optimized image, contour extraction processing is performed on the optimized image to obtain the image contour. The optimization processing includes smoothing, noise reduction, and anti-aliasing.
[0048] In one possible implementation of the second aspect, the invocation of a preset digital twin model to repair the image contour using stored historical image data includes:
[0049] When it is determined that the data update time of the preset database is less than the preset time, the preset digital twin model is invoked to search for historical image data in the database according to the characteristics of the object to be displayed. The data update time is the interval between the last update time node of the preset database and the current time node.
[0050] Image features are extracted from the historical image data and used to complete the image contour. The image features include image color, image shape, and image size.
[0051] In one possible implementation of the second aspect, the apparatus further includes:
[0052] The 3D modeling module is used to obtain a 3D model by performing 3D modeling on the repaired image contours, and then obtain the user's data to be displayed.
[0053] The display model module is used to add the data to be displayed to the 3D model and then display the 3D model containing the data.
[0054] In one possible implementation of the second aspect, the apparatus further includes:
[0055] The merging module is used to acquire the background image input by the user, and merge the repaired image outline with the background image to obtain a merged image.
[0056] Compared with existing technologies, the image processing method and apparatus based on a digital twin model provided by this invention have the following advantages: After acquiring the image to be displayed and the display requirement information respectively, this invention can extract the outline of the object to be displayed from the image to be displayed to obtain the image outline; if it is determined that the image outline is missing based on the features of the object to be displayed in the display requirement information, then a preset digital twin model is called to repair the image outline using the stored historical image data, which can improve the object to be displayed, thereby improving the accuracy of the displayed object and scene, and thus improving the image display effect. Attached Figure Description
[0057] Figure 1 This is a flowchart illustrating an image processing method based on a digital twin model according to an embodiment of the present invention;
[0058] Figure 2 This is a schematic diagram of the structure of an image processing device based on a digital twin model provided in an embodiment of the present invention. Detailed Implementation
[0059] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0060] To address the aforementioned issues, the following specific embodiments will provide a detailed description and explanation of an image processing method based on a digital twin model provided in this application.
[0061] Reference Figure 1 The diagram shows a flowchart of an image processing method based on a digital twin model provided by an embodiment of the present invention.
[0062] As an example, the image processing method based on the digital twin model may include:
[0063] S11. After obtaining the image to be displayed and the display requirement information respectively, extract the outline of the object to be displayed from the image to be displayed to obtain the image outline.
[0064] In one embodiment, the image to be displayed and the display requirement information can be obtained separately. The image to be displayed can be an image that needs to be shown, for example, if a user needs to display an image of a project, the image to be displayed could be a site image of the project, an image of a bridge under construction, etc.
[0065] The display requirements information can be descriptive information related to the displayed images, such as the project address, the size, dimensions, and shape of the object to be displayed, the display time, the display area, the size of the display screen, and the layers of the image.
[0066] As an example, step S11 may include the following sub-steps:
[0067] S111. After recognizing the object outline of the image to be displayed, perform image segmentation on the image to be displayed to obtain the object image.
[0068] S112. After optimizing the object image to obtain an optimized image, the optimized image is subjected to contour extraction processing to obtain an image contour. The optimization processing includes smoothing, noise reduction and anti-aliasing.
[0069] In one embodiment, the image to be displayed may include images of objects, such as equipment, engineering buildings, construction objects, etc.; at the same time, the image to be displayed may also include the background of the site or scene where the object is located, such as the environment in which the object is located, the surrounding environment, or specifically the background of the image.
[0070] In an optional embodiment, a pre-trained model can be used to identify the image based on features such as color, texture, and shape, to obtain the region of the object in the image, determine the position coordinates of the region within the image, and perform image segmentation based on the position coordinates to obtain an object image of the object.
[0071] In one embodiment, the present invention can determine the segmentation category by displaying demand information and extract the corresponding entire object region for further targeted segmentation.
[0072] Alternatively, segmentation can be performed based on other deep learning segmentation algorithms such as entity segmentation and panoptic segmentation.
[0073] After segmentation, the image may have some deviation, and the edges of the object image may have fine ripples. To eliminate these ripples, the image can be optimized.
[0074] In an optional embodiment, the optimization process may include: smoothing, noise reduction, and anti-aliasing.
[0075] Because segmented object images may contain various defects, they may have different problems, leading to issues such as low clarity, blurriness, and numerous jagged edges during subsequent image recognition and display. To improve the segmented object images...
[0076] In an optional embodiment, the smoothing process specifically involves using a preset Gaussian filter to smooth the image. This smoothing process can improve the image's clarity, thereby enhancing the subsequent recognition effect.
[0077] In one embodiment, the denoising process specifically involves: first identifying the noise regions of the image; then filling the noise regions with the corresponding color.
[0078] In practice, you can first filter out the noise blocks in the image and fill these noise block areas with a color that matches the object area (for example, if the object is a bridge under construction, its area is gray, so the noise block can be filled with gray; or if the object is a mountain range with a cable being laid, its area is dark green, so the noise block can be filled with dark green). This way, you can eliminate small local noise blocks without affecting the image clarity. Moreover, by locating and removing noise in the corresponding areas, you can better maintain the integrity of the image.
[0079] In one embodiment, the anti-aliasing process specifically involves: performing a blur operator operation on the image to obtain segmentation line regions, binarizing the segmentation line regions to obtain image segmentation lines, and then removing the jagged edges of the image according to the image segmentation lines.
[0080] Specifically, the image can first be blurred to create a softer dividing line outline in the area of the object. Then, the dividing line area can be binarized to produce a softer and smoother dividing line.
[0081] This invention addresses the problem of jagged edges in images by adding smoothing processing to the image edges, thereby improving the accuracy of subsequent recognition.
[0082] After optimization, the optimized object image can be subjected to contour extraction. In order to accurately extract the object's contour, in one embodiment, the contour extraction process specifically involves:
[0083] The magnitude and direction of the optimized image are calculated using the first-order partial derivative finite difference method.
[0084] The amplitude is processed by non-maximum suppression and double threshold detection, and the direction is connected to form the contour edge according to the processed amplitude. The preset extraction algorithm is called to extract the contour information from the contour edge according to the preset contour threshold, so as to obtain the object contour.
[0085] Specifically, after smoothing the image using a Gaussian filter, the magnitude and direction of the gradient can be calculated using the first-order partial derivative finite difference. Then, non-maximum suppression is applied to the gradient magnitude, and edges are detected and connected using a double threshold algorithm.
[0086] Optionally, since the background of the image is relatively complex and the object image is in a relatively blurry area with a weak outline, the size of the dual threshold can be adjusted. This threshold range can effectively extract weak edge contour information.
[0087] In one alternative implementation, the Canny algorithm can be used for multi-level edge extraction. The Canny algorithm has a good effect on extracting multi-level strong and weak edge information and has a significant advantage in running speed.
[0088] Building upon this, R-Canny (Looping Canny algorithm) can be used for further processing. This involves adding a looping operation to the standard Canny algorithm, performing multi-level, layer-by-layer edge extraction. By employing a looping operation to extract edges again from the edge image, the effectiveness of weak edge extraction is further improved.
[0089] It should be noted that the above value ranges can be adjusted according to actual needs.
[0090] S12. Determine whether the image outline is missing based on the features of the object to be displayed in the display requirement information.
[0091] After extracting the object outline corresponding to the object to be displayed from the image to be displayed, it is necessary to determine whether the object outline is missing, because the image to be displayed uploaded by the user may be taken by the user himself, and the object in the photo may only contain half or part of its outline, so the object is missing.
[0092] If an object is missing, it's difficult to reflect the complete appearance of the object being displayed, resulting in a poor presentation. Therefore, it's advisable to first determine if the object's outline is missing, and if so, to repair it in subsequent steps.
[0093] In an alternative embodiment, the object that the user wants to display can be a place, area, or site, such as a cable in xx mountain, a mining market in xx, a construction site in xx, or a bridge in xx.
[0094] Since the object on display is a place or site, it can be determined whether the object is missing based on its geographical location-related characteristics.
[0095] As an example, determining whether the image outline is missing based on the descriptive features of the object to be displayed within the display requirement information may include the following sub-steps:
[0096] S21. If the object corresponding to the image outline is an environmental object, extract feature information about the coordinates of the object to be displayed from the display requirement information.
[0097] S22. Determine the coordinate region of the object based on the feature information, and determine the contour region from the image contour.
[0098] S23. If the area of the coordinate region is the same as that of the contour region, then the image contour is determined to be without defects.
[0099] S24. If the area of the coordinate region is not the same as that of the contour region, then it is determined that the image contour is missing.
[0100] In one embodiment, if the object corresponding to the image outline is an environmental object (i.e., the environment, site, or place of a region), the coordinates of the object to be displayed can be extracted from the display requirement information, specifically the regional coordinates of the object, and used as the feature information of the object.
[0101] For example, if the object being displayed is a renovated shopping mall between xx First Street and xx Second Street, then its area coordinates are the coordinates of the points between xx First Street and xx Second Street; or if the object being displayed is a pedestrian overpass between xx Road and xx Road, then its area coordinates are the coordinates of the points between xx Road and xx Road.
[0102] Next, the coordinates of the object can be determined based on the feature information to define the entire region, thus obtaining the coordinate region. At the same time, the region of the image contour within the image can be determined based on the size of the image contour, thus obtaining the contour region.
[0103] Since the coordinate region and the contour region have different reference objects—the coordinate region is the actual local area, and the contour region is the area of the image—the two need to be converted so that they can be under the same reference system for subsequent comparison and judgment.
[0104] In one implementation, the contour region can be converted. Specifically, this conversion can involve identifying each vertex of the contour region and then determining the actual position of each vertex. Specifically, the contour region can be matched with a third-party map application to determine its position within the application, and then the position of each vertex within that application can be determined. The area of the contour region is then calculated based on the coordinates of each vertex. Simultaneously, the area of the contour region is calculated using the coordinates of the coordinate region. This allows for area calculation and comparison of the two regions under the same latitude coordinate system.
[0105] In another implementation, the coordinate region can be converted. Specifically, the scale and size of the image of the object to be displayed can be obtained first to get the image dimensions. Then, the area of the contour region corresponding to the image contour under this image size can be calculated to obtain the area of the contour region.
[0106] Similarly, the coordinates of the coordinate region can be determined in the third-party map application. Then, the image is cropped in the third-party map application according to the size of the object image to be displayed to obtain the image corresponding to the coordinate region. The area of the coordinate region in its corresponding area is calculated to obtain the area of the coordinate region.
[0107] At this point, both regions are calculated at the same image size and latitude, and their areas can be compared to determine if there are any missing areas.
[0108] Next, the comparison results of the two areas can be determined. If the area corresponding to the coordinate region is the same as the area corresponding to the contour region, it means that the object contour in the image to be displayed is the complete outline of the object, and the extracted image contour is complete. Conversely, if the area corresponding to the coordinate region is different from the area corresponding to the contour region, it means that the object contour in the image to be displayed is not the complete outline of the object, and the extracted image contour is incomplete.
[0109] In an optional embodiment, the object to be displayed by the user can be a device or physical item, such as the transmission component of an engine, the power component of a vehicle, or the counterweight of a construction site.
[0110] Since the object on display is a physical item, its shape, structure, and other related characteristics can be used to determine whether the object is missing.
[0111] As an example, determining whether the image outline is missing based on the descriptive features of the object to be displayed within the display requirement information may include the following sub-steps:
[0112] S31. If the object corresponding to the image outline is a physical device, extract feature information about the shape of the object to be displayed from the display requirement information.
[0113] S32. Use the feature information to determine the size parameters of the object, and extract the contour parameters from the image contour.
[0114] S33. If the size parameter is the same as the contour parameter, then it is determined that the image contour is not missing.
[0115] S34. If the size parameter is not the same as the contour parameter, then it is determined that the image contour is missing.
[0116] In one embodiment, if the object corresponding to the image outline is a physical item or physical equipment (i.e., it could be a suspension component of a vehicle, a production equipment component of a project, or a recycling component of a quality inspection device, etc.), the shape or structure description information of the object to be displayed can be extracted from the display requirement information. Specifically, the shape or structure size of the object is used as the feature information of the object.
[0117] Next, the specific dimensions of the physical object can be extracted from the feature information to obtain the object's size parameters; similarly, the contour parameters can be obtained by detecting the parameters of the image contour in the image to be displayed.
[0118] Since the size parameter is the actual size of the object and the contour parameter is the size of the object within the image, they need to be converted so that they can be used in the same reference frame for subsequent comparison and judgment.
[0119] In one implementation, the contour parameters of the image can be converted into the dimensions of the actual object using a conventional conversion method. Alternatively, the contour parameters can be proportionally converted according to a preset ratio to obtain the converted contour parameters. Then, the dimension parameters and the converted contour parameters can be compared to determine their length, width, and height.
[0120] If the size parameter and the contour parameter are the same, it means that the object contour in the image to be displayed is the complete picture of the object, and the structure and shape of the object contour are the same as the structure and shape of the actual object. It can be determined that the extracted image contour is also complete. Conversely, if the size parameter and the contour parameter are different, it means that the object contour in the image to be displayed is not the complete picture of the object, and the structure and shape of the object contour are different from the structure and shape of the actual object. It can be determined that the image contour is incomplete.
[0121] S13. If it is determined that the image outline is missing, a preset digital twin model is invoked to repair the image outline using the stored historical image data, so that the user can call the repaired image outline for image display.
[0122] If an image is found to have missing outlines, and the missing image is used for display, the displayed object will deviate from the actual object, resulting in a poor display effect.
[0123] At this point, a preset digital twin model can be invoked to repair the image outline using the stored historical image data, thereby restoring the full appearance of the object. The repaired image outline can then be used for image display to improve the image display effect.
[0124] Since digital twin models have relevant data about objects and use that data to construct virtual objects and scenes, when the outline of an image is missing, the virtual objects generated by the twin model can be used to repair the object, thereby achieving image and object restoration.
[0125] In another alternative embodiment, if it is determined that the image outline is not missing, the image outline can be used directly for image display.
[0126] In one embodiment, the preset digital twin model is constructed and generated from prior data or user-preset data. Moreover, the prior data is complete, and the virtual outline or virtual object generated by the model is relatively complete, so the model has a complete object outline.
[0127] As an example, the step of invoking a preset digital twin model to repair the image contour using stored historical image data may include the following sub-steps:
[0128] S131. When it is determined that the data update time of the preset database is less than the preset time, the preset digital twin model is called to search for historical image data in the database according to the characteristics of the object to be displayed. The data update time is the interval between the last update time node of the preset database and the current time node.
[0129] S132. Extract image features from the historical image data and use the image features to complete the image outline. The image features include image color, image shape, and image size.
[0130] In one implementation, it is necessary to first determine the update time of the database corresponding to the preset digital twin model. The update duration refers to the interval between the last time the data was updated or replaced and the current time.
[0131] If the update duration exceeds the preset duration, it indicates that the database corresponding to the preset digital twin model has not been updated for some time. The data in the database may deviate from reality, the virtual model generated by the preset digital twin model may deviate from reality, and the repaired image may also have deviations.
[0132] If the data update time of the preset database is less than the preset time, it means that the database corresponding to the preset digital twin model has been updated, and the data update is fast and can match reality.
[0133] At this point, a preset digital twin model can be invoked to search for corresponding data in the database according to the characteristics of the object to be displayed (such as the coordinates or shape and size described above), thereby obtaining image data of the same size or the same coordinate area, and obtaining historical image data.
[0134] At this point, image features can be extracted from historical image data, and these features can be used to complete the image outline, specifically the image color, image shape, and image size.
[0135] Alternatively, the image outline can be adjusted according to historical image data, or the image outline of the image to be displayed can be replaced with the image outline of historical image data to obtain the repaired image outline.
[0136] In one embodiment, to improve the effect of subsequent image display, as an example, after the step of calling a preset digital twin model to repair the image contour using stored historical image data, the method further includes:
[0137] S41. After obtaining the 3D model by performing 3D modeling using the repaired image contour, obtain the user's data to be displayed.
[0138] S42. After adding the data to be displayed to the three-dimensional model, display the three-dimensional model containing the data.
[0139] Specifically, after obtaining the repaired image outline, a 3D model can be obtained by using the repaired image outline for 3D modeling, at which point the data that the user needs to display can be obtained.
[0140] Data can be added to the 3D model, either as labels or other tags. Finally, the 3D model containing the data is displayed.
[0141] 3D models can further enhance the presentation of data. For example, if the image to be displayed is the suspension bracket of a car, a 3D model of the suspension bracket can be generated based on its outline. Then, the dimensions and other data of the suspension bracket to be displayed can be added to the 3D model before it is displayed.
[0142] In one embodiment, if the user needs to further enhance the display effect, as an example, after the step of calling a preset digital twin model to repair the image contour using stored historical image data, the method further includes:
[0143] S51. Obtain the background image input by the user, and merge the repaired image outline with the background image to obtain a merged image.
[0144] Specifically, the background image input by the user can be obtained. This background image is used when displaying the 3D model. It can be a background image of different colors. The image outline can be fused with the background image to obtain a fused image. When constructing the 3D model, the 3D model can have a background image. When displaying the model, the background image can also be displayed, thereby meeting the user's display needs.
[0145] In this embodiment, the present invention provides an image processing method based on a digital twin model. Its advantages are as follows: After acquiring the image to be displayed and the display requirement information, the present invention can extract the outline of the object to be displayed from the image to be displayed to obtain the image outline; based on the features of the object to be displayed in the display requirement information, if it is determined that the image outline is missing, a preset digital twin model is invoked to repair the image outline using stored historical image data, thereby improving the accuracy of the displayed object and scene, and enhancing the image display effect.
[0146] This invention also provides an image processing apparatus based on a digital twin model, see [link to relevant documentation]. Figure 2 The diagram shows a schematic representation of an image processing device based on a digital twin model according to an embodiment of the present invention.
[0147] As an example, the image processing device based on the digital twin model may include:
[0148] The contour extraction module 201 is used to extract the contour of the object to be displayed from the image to be displayed after acquiring the image to be displayed and the display requirement information respectively, so as to obtain the image contour.
[0149] The missing detection module 202 is used to determine whether the image outline is missing based on the features of the object to be displayed in the display requirement information;
[0150] The repair processing module 203 is used to call a preset digital twin model to repair the image contour using stored historical image data if it is determined that the image contour is missing, so that the user can call the repaired image contour for image display.
[0151] Optionally, determining whether the image outline is missing based on the descriptive features of the object to be displayed within the display requirement information includes:
[0152] If the object corresponding to the image outline is an environmental object, feature information about the coordinates of the object to be displayed is extracted from the display requirement information;
[0153] The coordinate region of the object is determined based on the feature information, and the contour region is determined from the image contour.
[0154] If the area of the coordinate region is the same as that of the contour region, then the image contour is determined to be without defects.
[0155] If the area of the coordinate region is different from that of the contour region, then the image contour is determined to be missing.
[0156] Optionally, determining whether the image outline is missing based on the descriptive features of the object to be displayed within the display requirement information includes:
[0157] If the object corresponding to the image outline is a physical device, feature information about the shape of the object to be displayed is extracted from the display requirement information;
[0158] The size parameters of the object are determined using the feature information, and the contour parameters are extracted from the image contour.
[0159] If the size parameter is the same as the contour parameter, then the image contour is determined to be without defects.
[0160] If the size parameter is different from the contour parameter, then the image contour is determined to be missing.
[0161] Optionally, the step of extracting the outline of the object to be displayed from the image to be displayed, to obtain the image outline, includes:
[0162] After identifying the object outline in the image to be displayed, image segmentation is performed on the image to be displayed to obtain the object image;
[0163] After optimizing the object image to obtain an optimized image, contour extraction processing is performed on the optimized image to obtain the image contour. The optimization processing includes smoothing, noise reduction, and anti-aliasing.
[0164] Optionally, the step of calling a preset digital twin model to repair the image contour using stored historical image data includes:
[0165] When it is determined that the data update time of the preset database is less than the preset time, the preset digital twin model is invoked to search for historical image data in the database according to the characteristics of the object to be displayed. The data update time is the interval between the last update time node of the preset database and the current time node.
[0166] Image features are extracted from the historical image data and used to complete the image contour. The image features include image color, image shape, and image size.
[0167] Optionally, the device further includes:
[0168] The 3D modeling module is used to obtain a 3D model by performing 3D modeling on the repaired image contours, and then obtain the user's data to be displayed.
[0169] The display model module is used to add the data to be displayed to the 3D model and then display the 3D model containing the data.
[0170] Optionally, the device further includes:
[0171] The merging module is used to acquire the background image input by the user, and merge the repaired image outline with the background image to obtain a merged image.
[0172] Those skilled in the art will understand that, for ease of description and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0173] Furthermore, this application also provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the image processing method based on a digital twin model as described in the above embodiments.
[0174] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a computer-executable program for causing a computer to perform the image processing method based on a digital twin model as described in the above embodiments.
[0175] Those skilled in the art will understand that embodiments of this application may also include computer program products. Therefore, this application may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0176] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), devices, and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0177] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0178] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0179] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. An image processing method based on a digital twin model, characterized in that, The method includes: After obtaining the image to be displayed and the display requirement information respectively, the outline of the object to be displayed is extracted from the image to be displayed to obtain the image outline; Determine whether the image outline is missing based on the features of the object to be displayed in the display requirements information; If it is determined that the image outline is missing, a preset digital twin model is invoked to repair the image outline using the stored historical image data, so that the user can call the repaired image outline for image display. Determining whether the image outline is missing based on the descriptive features of the object to be displayed within the display requirement information includes: If the object corresponding to the image outline is an environmental object, feature information about the coordinates of the object to be displayed is extracted from the display requirement information, wherein the feature information is the position coordinates of the environmental object; The coordinate region of the object is determined based on the feature information, and the contour region is determined from the image contour. If the area of the coordinate region is the same as that of the contour region, then it is determined that the image contour is not missing. The operation of determining whether the area of the coordinate region and the area of the contour region are the same includes: matching the contour region with a third-party map application, determining the position of the contour region in the third-party map application, determining the position of each vertex of the contour region in the third-party map application, calculating the area of the contour region based on the position coordinates of each vertex, calculating the area of the coordinate region using the coordinates of the coordinate region, and comparing whether the area of the contour region and the area of the coordinate region are the same. or, The image size is obtained by acquiring the scale and size of the image of the object to be displayed. The area of the outline region under the image size is calculated to obtain the area of the outline region. The coordinates of the coordinate region are determined in the third-party map application. The image is cropped in the third-party map application according to the size of the image of the object to be displayed to obtain the image corresponding to the coordinate region. The area of the image corresponding to the coordinate region is calculated to obtain the area of the coordinate region. The area of the outline region and the area of the coordinate region are compared to see if they are the same. If the area of the coordinate region is different from that of the contour region, then it is determined that the image contour is missing. or; Determining whether the image outline is missing based on the descriptive features of the object to be displayed within the display requirement information includes: If the object corresponding to the image outline is a physical device, feature information about the shape of the object to be displayed is extracted from the display requirement information; The size parameters of the object are determined using the feature information, and the contour parameters are extracted from the image contour. If the size parameter is the same as the contour parameter, then it is determined that the image contour is not missing. The operation of determining whether the size parameter and the contour parameter are the same includes: performing a proportional conversion on the contour parameter according to a preset ratio value to obtain the converted contour parameter, and comparing whether the length, width and height parameters of the size parameter and the converted contour parameter are the same. If the size parameter is different from the contour parameter, then the image contour is determined to be missing.
2. The image processing method based on a digital twin model according to claim 1, characterized in that, The step of extracting the outline of the object to be displayed from the image to be displayed, to obtain the image outline, includes: After identifying the object outline in the image to be displayed, image segmentation is performed on the image to be displayed to obtain the object image; After optimizing the object image to obtain an optimized image, contour extraction processing is performed on the optimized image to obtain the image contour. The optimization processing includes smoothing, noise reduction, and anti-aliasing.
3. The image processing method based on a digital twin model according to claim 1, characterized in that, The process of invoking a preset digital twin model to repair the image contour using stored historical image data includes: When it is determined that the data update time of the preset database is less than the preset time, the preset digital twin model is invoked to search for historical image data in the database according to the characteristics of the object to be displayed. The data update time is the interval between the last update time node of the preset database and the current time node. Image features are extracted from the historical image data and used to complete the image contour. The image features include image color, image shape, and image size.
4. The image processing method based on a digital twin model according to any one of claims 1-3, characterized in that, After the step of invoking a preset digital twin model to repair the image contour using stored historical image data, the method further includes: After obtaining a 3D model by performing 3D modeling using the repaired image contours, the user's data to be displayed is obtained. After adding the data to be displayed to the 3D model, the 3D model containing the data is displayed.
5. The image processing method based on a digital twin model according to any one of claims 1-3, characterized in that, After the step of invoking a preset digital twin model to repair the image contour using stored historical image data, the method further includes: Obtain the background image input by the user, and merge the repaired image outline with the background image to obtain a merged image.
6. An image processing device based on a digital twin model, characterized in that, The device includes: The contour extraction module is used to extract the contour of the object to be displayed from the image to be displayed after obtaining the image to be displayed and the display requirement information respectively, so as to obtain the image contour. The missing detection module is used to determine whether the image outline is missing based on the features of the object to be displayed in the display requirement information; The repair processing module is used to call a preset digital twin model to repair the image outline using stored historical image data if it is determined that the image outline is missing, so that the user can call the repaired image outline for image display. Determining whether the image outline is missing based on the descriptive features of the object to be displayed within the display requirement information includes: If the object corresponding to the image outline is an environmental object, feature information about the coordinates of the object to be displayed is extracted from the display requirement information; The coordinate region of the object is determined based on the feature information, and the contour region is determined from the image contour. If the area of the coordinate region is the same as that of the contour region, then the image contour is determined to be without defects. If the area of the coordinate region is different from that of the contour region, then it is determined that the image contour is missing. or; Determining whether the image outline is missing based on the descriptive features of the object to be displayed within the display requirement information includes: If the object corresponding to the image outline is a physical device, feature information about the shape of the object to be displayed is extracted from the display requirement information; The size parameters of the object are determined using the feature information, and the contour parameters are extracted from the image contour. If the size parameter is the same as the contour parameter, then the image contour is determined to be without defects. If the size parameter is different from the contour parameter, then the image contour is determined to be missing.
7. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the image processing method based on a digital twin model as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer-executable program, which is used to cause a computer to perform the image processing method based on a digital twin model as described in any one of claims 1-5.
Citation Information
Patent Citations
Inscription restoration method based on contour feature description of Chinese character image
CN105069766A
Digital twin model correction method based on deep neural network
CN110851966A
Digital twinning method and system based on 3D model matching
CN113822993A
Three-dimensional model completion and restoration method and system based on point cloud vectorization skeleton matching
CN115953563A
Power station parametric modeling method and device and electronic equipment
CN116597091A
