Middle-mounted switch cabinet three-dimensional model construction method, system and equipment based on diffusion model
Based on the method of diffusion models, the image information and the position position information of the machine position are used to build a virtual camera rail railing, combined with the video diffusion frame model and the neuroma radiation field network model, solving the cost of equipment costs for the three -dimensional model construction of traditional technologies in the mid -type switch cabinet model construction The problems of high, complex operation and poor visual effects have achieved efficient and simple three -dimensional model construction and visual effects.
Patent Information
- Application Number
- CN202411489079.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-01-24
AI Technical Summary
In traditional technology, the equipment for building a three-dimensional model of a mid-mounted switch cabinet is expensive, complex in operation and cumbersome in modeling, resulting in poor visual effects of the generated three-dimensional model.
Using a method based on the diffusion model, the image information and position position information of the mid -type switching cabinet in the collection and switch cabinet are used to build a virtual camera shooting track, and use the video diffusion -inserted frame model and the neural radiation field network model for image synthesis and texture grid fitting , Generate three -dimensional models.
The cost of equipment is reduced, the operating process is simplified, the visual effects of the three -dimensional model are improved, and the efficient construction of the three -dimensional model of the mid -type switch cabinet is achieved.
Smart Images

Figure CN119359922A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, system and device for constructing a three-dimensional model of a center-mounted switch cabinet based on a diffusion model. Background Art
[0002] Center-mounted switchgear is an important equipment for distribution networks to ensure safe and reliable power operation. Center-mounted switchgear in urban distribution networks accounts for up to 70% of all types of switchgear and has the largest stock.
[0003] In order to realize the intelligent inspection of the central switch cabinet, it is proposed to use intelligent devices such as robots or drones for autonomous inspection and operation and maintenance. In order to enable the intelligent devices to replace manual intelligent autonomous inspection, it is necessary to optimize, test and simulate the control parameters of the intelligent devices through the three-dimensional model of the central switch cabinet.
[0004] In traditional technology, the construction of the three-dimensional model of the central switchgear mainly adopts special equipment such as three-dimensional point cloud scanning system and depth camera to collect modeling data. Not only is the equipment cost expensive, but the operation is also relatively complicated. In addition, a large amount of image information is required in the modeling process for image processing recognition and model fitting, which makes the construction of the three-dimensional model extremely inconvenient and cumbersome, and further leads to poor visual effect of the generated three-dimensional model.
[0005] Therefore, a method, system and equipment for constructing a three-dimensional model of a center-mounted switchgear based on a diffusion model are proposed. Summary of the invention
[0006] To solve the above problems, the present invention provides a method, system and equipment for constructing a three-dimensional model of a center-mounted switch cabinet based on a diffusion model, so as to solve the problems of high cost, inconvenient operation and complicated modeling in the traditional technology of constructing a three-dimensional model of a center-mounted switch cabinet.
[0007] In a first aspect, the present invention provides a method for constructing a three-dimensional model of a centrally mounted switch cabinet based on a diffusion model, comprising:
[0008] Collect image information of the central switch cabinet and obtain the position and posture information of the image acquisition device;
[0009] According to the camera position information, a virtual camera shooting track around the central switch cabinet is constructed, and virtual shooting points are selected on the virtual camera shooting track by a denoising diffusion implicit model sampler to obtain virtual position information of the virtual shooting points;
[0010] Constructing an initial video diffusion interpolation model based on the diffusion model, and training the initial video diffusion interpolation model through a data set to obtain a video diffusion interpolation model;
[0011] Based on the video diffusion interpolation model, interpolation processing is performed according to the image information, the camera position information and the virtual position information to obtain virtual perspective image information;
[0012] According to the image information and the virtual perspective image information, image synthesis is performed through a neural radiation field network model to obtain a pre-merged image, and the feature vector of the pre-merged image is extracted. Three-dimensional linear interpolation is performed into the constructed switch cabinet cube model, and texture mesh fitting is performed to generate a three-dimensional model of a centrally mounted switch cabinet.
[0013] Preferably, the step of collecting image information of the centrally mounted switch cabinet and obtaining machine position and posture information of the image acquisition device includes:
[0014] Under uniform lighting conditions, panoramic images of at least two cabinet surfaces of the central switch cabinet are collected to construct image information;
[0015] The three-dimensional point coordinates, yaw angle and pitch angle of the image acquisition device are obtained through a three-dimensional coordinate reconstruction algorithm to construct the position and posture information of the image acquisition device.
[0016] Preferably, the step of constructing a virtual camera shooting track around the central switch cabinet according to the camera position posture information, and selecting virtual shooting points on the virtual camera shooting track by a denoising diffusion implicit model sampler to obtain virtual posture information of the virtual shooting points includes:
[0017] Obtain the first shooting point P1 (x1, y1, z1, θ1, φ1) and the second shooting point P2 (x2, y2, z2, θ2, φ2) in the camera position information; wherein x1 is the x-axis coordinate value of the first shooting point, y1 is the y-axis coordinate value of the first shooting point, z1 is the z-axis coordinate value of the first shooting point, θ1 is the yaw angle value of the first shooting point, and φ1 is the pitch angle value of the first shooting point; x2 is the x-axis coordinate value of the second shooting point, y2 is the y-axis coordinate value of the second shooting point, z2 is the z-axis coordinate value of the second shooting point, θ2 is the yaw angle value of the second shooting point, and φ2 is the pitch angle value of the second shooting point;
[0018] In the three-dimensional coordinate system, obtain the position information (y1, z1) and (y2, z2) of the first shooting point P1 and the second shooting point P2 on the yz plane; draw the projections l1 and l2 of the actual shooting direction of the image acquisition device on the yz plane according to the pitch angle value φ1 of the first shooting point and the pitch angle value φ2 of the second shooting point, and obtain the intersection point M0 of l1 and l2;
[0019] Calculate the first distance between the first shooting point P1 and the intersection point M0, and the second distance between the second shooting point P2 and the intersection point M0 respectively; select a shooting point with a longer distance as a reference point, draw a connecting line segment between the first shooting point P1 and the second shooting point P2, and take the midpoint of the connecting line segment as a normal line, obtain the intersection point O' with the projection l' of the reference point on the yz plane, and use it as the updated origin O' of the three-dimensional coordinate system, and update the first shooting point P'1 and the second shooting point P'2;
[0020] According to the first shooting point P′1 and the second shooting point P′2, a horizontal virtual camera shooting track based on the yz plane is constructed;
[0021] According to the updated origin O', based on the horizontal virtual camera shooting track, the x-axis orientation of the virtual camera shooting track is analyzed to obtain the virtual camera shooting track in three-dimensional space;
[0022] The virtual shooting points are selected along the shooting track of the virtual camera through the denoising diffusion implicit model sampler to obtain the three-dimensional coordinates of the virtual shooting points. The yaw angle and pitch angle of the virtual shooting points are constructed by collecting the orientation angle of the virtual shooting points facing the updated origin to obtain the virtual posture information.
[0023] Preferably, the steps of respectively calculating a first distance between the first shooting point P1 and the intersection point M0, and a second distance between the second shooting point P2 and the intersection point M0; selecting a shooting point with a longer distance as a reference point, drawing a connecting line segment between the first shooting point P1 and the second shooting point P2, taking the midpoint of the connecting line segment as a normal, obtaining an intersection point O' with a projection l' of the reference point on the yz plane as an updated origin O' of the three-dimensional coordinate system, and updating the first shooting point P'1 and the second shooting point P'2 include:
[0024] The shooting point at a longer distance is set as the second shooting point P2, and the second shooting point P2 is used as the reference point;
[0025] Draw the intersection point O' of the normal line and the projection l' of the reference point on the yz plane as the updated origin O' of the three-dimensional coordinate system, and update the first shooting point P'1 (x'1, y'1, z'1, θ1, φ1) and the second shooting point P'2 (0, y'2, z'2, θ2, φ2); wherein x'1 is the x-axis coordinate value of the first shooting point relative to the updated origin O', y'1 is the y-axis coordinate value of the first shooting point relative to the updated origin O', z'1 is the z-axis coordinate value of the first shooting point relative to the updated origin O', y'2 is the y-axis coordinate value of the second shooting point relative to the updated origin O', and z'2 is the z-axis coordinate value of the second shooting point relative to the updated origin O'.
[0026] Preferably, the step of analyzing the x-axis orientation of the virtual camera shooting track based on the horizontal virtual camera shooting track according to the updated origin O' to obtain the virtual camera shooting track in three-dimensional space comprises:
[0027] The second shooting point P′2 is set as a preset point, the line segment O′P′2 and the line segment O′P′1 are constructed, and the angle α between the line segment O′P′2 and the line segment O′P′1 is obtained;
[0028] Set the angular velocity ω of the image acquisition device on the horizontal virtual shooting track yz ;
[0029] Get the x-axis position x of the virtual camera shooting track c ;
[0030]
[0031] Among them, a n ,ω n is a random constant, n is the serial number of the random constant, a0 and ω0 are initial constants, t is the time for the image acquisition device to move from the preset point, t = α / ω yz .
[0032] Preferably, the step of performing frame interpolation processing based on the video diffusion interpolation model according to the image information, camera position information and virtual position information to obtain virtual perspective image information includes:
[0033] Based on the virtual camera shooting track, mark the first shooting point P′1 and the second shooting point P′2;
[0034] Acquire virtual shooting points and corresponding virtual posture information between the first shooting point P′1 and the second shooting point P′2, and between the second shooting point P′2 and the first shooting point P′1;
[0035] The video diffusion interpolation model generates virtual viewing angle image information corresponding to the virtual shooting point according to the preprocessed image information and the virtual posture information.
[0036] Preferably, the step of performing image synthesis through a neural radiation field network model according to the image information and the virtual perspective image information, obtaining a pre-merged image, extracting a feature vector of the pre-merged image, performing three-dimensional linear interpolation into the constructed switch cabinet cube model, performing texture grid fitting, and generating a three-dimensional model of a center-mounted switch cabinet includes:
[0037] Input the image information and the corresponding camera position information, the virtual perspective image information and the corresponding virtual position information into the neural radiation field network model;
[0038] The neural radiation field network model constructs an image generation space according to the machine position information and the virtual position information;
[0039] Selecting a sampling point in the image generation space, and obtaining particle information of the sampling point in the image information and the virtual perspective image information, superimposing the particle information of the same sampling point, and constructing the color information and transparency information of the pixel point corresponding to the sampling point in the pre-merged image; by selecting multiple sampling points in the image generation space, obtaining the color information and transparency information of the corresponding pixel point, and generating the pre-merged image;
[0040] The particle information includes light density and RGB color information of the sampling point in the image.
[0041] Preferably, the step of performing image synthesis through a neural radiation field network model according to the image information and the virtual perspective image information, obtaining a pre-merged image, extracting a feature vector of the pre-merged image, performing three-dimensional linear interpolation into the constructed switch cabinet cube model, performing texture grid fitting, and generating a three-dimensional model of a center-mounted switch cabinet includes:
[0042] Construct a cubic model of a center-mounted switchgear cabinet;
[0043] Performing tetrahedral meshing on the cube model, wherein each texture mesh is a tetrahedral structure;
[0044] Extracting feature vectors of the pre-merged image and interpolating them into a grid of the cube model through three-dimensional linear interpolation;
[0045] Calculating the signed distance function value between the vertices in the texture mesh and the feature vector, adjusting the vertices and mesh boundaries of the texture mesh, identifying the object area and the non-object area in the texture mesh, and discarding the non-object area in the texture mesh;
[0046] After each texture mesh is fitted, a three-dimensional model of the center-mounted switch cabinet is obtained.
[0047] In a second aspect, the present invention provides a system for constructing a three-dimensional model of a centrally mounted switch cabinet based on a diffusion model, comprising:
[0048] An image acquisition module is used to acquire image information of a centrally mounted switch cabinet and obtain position information of an image acquisition device;
[0049] A virtual point generation module is used to construct a virtual camera shooting track around the central switch cabinet according to the camera position information, and select virtual shooting points on the virtual camera shooting track through a denoising diffusion implicit model sampler to obtain virtual position information of the virtual shooting points;
[0050] A model building module, used to build an initial video diffusion interpolation model based on the diffusion model, and train the initial video diffusion interpolation model through a data set to obtain a video diffusion interpolation model;
[0051] A virtual image generation module, configured to perform frame insertion processing based on a video diffusion frame insertion model according to the image information, camera position information and virtual position information to obtain virtual perspective image information;
[0052] The three-dimensional model generation module is used to perform image synthesis through a neural radiation field network model according to the image information and virtual perspective image information, obtain a pre-merged image, extract the feature vector of the pre-merged image, perform three-dimensional linear interpolation into the constructed switch cabinet cube model, perform texture grid fitting, and generate a three-dimensional model of a centrally mounted switch cabinet.
[0053] Preferably, the step of collecting image information of the centrally mounted switch cabinet and obtaining machine position and posture information of the image acquisition device includes:
[0054] Panoramic images of at least two cabinet faces of a centrally mounted switch cabinet under uniform lighting conditions to construct image information;
[0055] The three-dimensional point coordinates, yaw angle and pitch angle of the image acquisition device are obtained through a three-dimensional coordinate reconstruction algorithm to construct the position and posture information of the image acquisition device.
[0056] Preferably, the step of constructing a virtual camera shooting track around the central switch cabinet according to the camera position posture information, and selecting virtual shooting points on the virtual camera shooting track by a denoising diffusion implicit model sampler to obtain virtual posture information of the virtual shooting points includes:
[0057] Obtain the first shooting point P1 (x1, y1, z1, θ1, φ1) and the second shooting point P2 (x2, y2, z2, θ2, φ2) in the camera position information; wherein x1 is the x-axis coordinate value of the first shooting point, y1 is the y-axis coordinate value of the first shooting point, z1 is the z-axis coordinate value of the first shooting point, θ1 is the yaw angle value of the first shooting point, and φ1 is the pitch angle value of the first shooting point; x2 is the x-axis coordinate value of the second shooting point, y2 is the y-axis coordinate value of the second shooting point, z2 is the z-axis coordinate value of the second shooting point, θ2 is the yaw angle value of the second shooting point, and φ2 is the pitch angle value of the second shooting point;
[0058] In the three-dimensional coordinate system, obtain the position information (y1, z1) and (y2, z2) of the first shooting point P1 and the second shooting point P2 on the yz plane; draw the projections l1 and l2 of the actual shooting direction of the image acquisition device on the yz plane according to the pitch angle value φ1 of the first shooting point and the pitch angle value φ2 of the second shooting point, and obtain the intersection point M0 of l1 and l2;
[0059] Calculate the first distance between the first shooting point P1 and the intersection point M0, and the second distance between the second shooting point P2 and the intersection point M0 respectively; select a shooting point with a longer distance as a reference point, draw a connecting line segment between the first shooting point P1 and the second shooting point P2, and take the midpoint of the connecting line segment as a normal line, obtain the intersection point O' with the projection l' of the reference point on the yz plane, and use it as the updated origin O' of the three-dimensional coordinate system, and update the first shooting point P'1 and the second shooting point P'2;
[0060] According to the first shooting point P′1 and the second shooting point P′2, a horizontal virtual camera shooting track based on the yz plane is constructed;
[0061] According to the updated origin O', based on the horizontal virtual camera shooting track, the x-axis orientation of the virtual camera shooting track is analyzed to obtain the virtual camera shooting track in three-dimensional space;
[0062] The virtual shooting points are selected along the shooting track of the virtual camera through the denoising diffusion implicit model sampler to obtain the three-dimensional coordinates of the virtual shooting points. The yaw angle and pitch angle of the virtual shooting points are constructed by collecting the orientation angle of the virtual shooting points facing the updated origin to obtain the virtual posture information.
[0063] Preferably, the steps of respectively calculating a first distance between the first shooting point P1 and the intersection point M0, and a second distance between the second shooting point P2 and the intersection point M0; selecting a shooting point with a longer distance as a reference point, drawing a connecting line segment between the first shooting point P1 and the second shooting point P2, taking the midpoint of the connecting line segment as a normal, obtaining an intersection point O' with a projection l' of the reference point on the yz plane as an updated origin O' of the three-dimensional coordinate system, and updating the first shooting point P'1 and the second shooting point P'2 include:
[0064] The shooting point at a longer distance is set as the second shooting point P2, and the second shooting point P2 is used as the reference point;
[0065] Draw the intersection point O' of the normal line and the projection l' of the reference point on the yz plane as the updated origin O' of the three-dimensional coordinate system, and update the first shooting point P'1 (x'1, y'1, z'1, θ1, φ1) and the second shooting point P'2 (0, y'2, z'2, θ2, φ2); wherein x'1 is the x-axis coordinate value of the first shooting point relative to the updated origin O', y'1 is the y-axis coordinate value of the first shooting point relative to the updated origin O', z'1 is the z-axis coordinate value of the first shooting point relative to the updated origin O', y'2 is the y-axis coordinate value of the second shooting point relative to the updated origin O', and z'2 is the z-axis coordinate value of the second shooting point relative to the updated origin O'.
[0066] Preferably, the step of analyzing the x-axis orientation of the virtual camera shooting track based on the horizontal virtual camera shooting track according to the updated origin O' to obtain the virtual camera shooting track in three-dimensional space comprises:
[0067] The second shooting point P′2 is set as a preset point, the line segment O′P′2 and the line segment O′P′1 are constructed, and the angle α between the line segment O′P′2 and the line segment O′P′1 is obtained;
[0068] Set the angular velocity ω of the image acquisition device on the horizontal virtual shooting track yz ;
[0069] Get the x-axis position x of the virtual camera shooting track c ;
[0070]
[0071] Among them, a n ,ω n is a random constant, n is the serial number of the random constant, a0 and ω0 are initial constants, t is the time for the image acquisition device to move from the preset point, t = α / ω yz .
[0072] Preferably, the step of performing frame interpolation processing based on the video diffusion interpolation model according to the image information, camera position information and virtual position information to obtain virtual perspective image information includes:
[0073] Based on the virtual camera shooting track, mark the first shooting point P′1 and the second shooting point P′2;
[0074] Acquire virtual shooting points and corresponding virtual posture information between the first shooting point P′1 and the second shooting point P′2, and between the second shooting point P′2 and the first shooting point P′1;
[0075] The video diffusion interpolation model generates virtual viewing angle image information corresponding to the virtual shooting point according to the preprocessed image information and the virtual posture information.
[0076] Preferably, the step of performing image synthesis through a neural radiation field network model according to the image information and the virtual perspective image information, obtaining a pre-merged image, extracting a feature vector of the pre-merged image, performing three-dimensional linear interpolation into the constructed switch cabinet cube model, performing texture grid fitting, and generating a three-dimensional model of a center-mounted switch cabinet includes:
[0077] Input the image information and the corresponding camera position information, the virtual perspective image information and the corresponding virtual position information into the neural radiation field network model;
[0078] The neural radiation field network model constructs an image generation space according to the machine position information and the virtual position information;
[0079] Selecting a sampling point in the image generation space, and obtaining particle information of the sampling point in the image information and the virtual perspective image information, superimposing the particle information of the same sampling point, and constructing the color information and transparency information of the pixel point corresponding to the sampling point in the pre-merged image; by selecting multiple sampling points in the image generation space, obtaining the color information and transparency information of the corresponding pixel point, and generating the pre-merged image;
[0080] The particle information includes light density and RGB color information of the sampling point in the image.
[0081] Preferably, the step of performing image synthesis through a neural radiation field network model according to the image information and the virtual perspective image information, obtaining a pre-merged image, extracting a feature vector of the pre-merged image, performing three-dimensional linear interpolation into the constructed switch cabinet cube model, performing texture grid fitting, and generating a three-dimensional model of a center-mounted switch cabinet includes:
[0082] Construct a cubic model of a center-mounted switchgear cabinet;
[0083] Performing tetrahedral meshing on the cube model, wherein each texture mesh is a tetrahedral structure;
[0084] Extracting feature vectors of the pre-merged image and interpolating them into a grid of the cube model through three-dimensional linear interpolation;
[0085] Calculating the signed distance function value between the vertices in the texture mesh and the feature vector, adjusting the vertices and mesh boundaries of the texture mesh, identifying the object area and the non-object area in the texture mesh, and discarding the non-object area in the texture mesh;
[0086] After each texture mesh is fitted, a three-dimensional model of the center-mounted switch cabinet is obtained.
[0087] The third invention, the present invention provides an electronic device, comprising: a camera, a posture sensor and a processor; wherein,
[0088] The image acquisition device is used to acquire image information of the central switch cabinet;
[0089] The posture sensor is used to collect the machine position posture information of the image acquisition device;
[0090] The processor is used to implement the method for constructing a three-dimensional model of a center-mounted switch cabinet based on a diffusion model, and obtain a three-dimensional model of the center-mounted switch cabinet.
[0091] The present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the method for constructing a three-dimensional model of a centrally mounted switch cabinet based on a diffusion model is implemented.
[0092] Compared with traditional technologies, the beneficial effects of the present invention are as follows: a method, system and device for constructing a three-dimensional model of a center-mounted switch cabinet based on a diffusion model proposed in the present invention does not require the use of three-dimensional point cloud scanning systems, depth cameras and other image acquisition equipment, which solves the problems of high equipment cost and inconvenient operation in traditional technologies. The acquired image information and camera position information are processed and input into the video diffusion interpolation model, so that virtual perspective image information based on the virtual camera shooting track can be generated according to a small amount of image information, which solves the inconvenience of collecting a large amount of image information during the modeling process. In addition, the image information and virtual perspective image information are automatically processed according to the neural radiation field network model and the texture grid, thereby realizing the construction of a three-dimensional model of the center-mounted switch cabinet. While optimizing the model construction process, the visual effect of the model is effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0094] Figure 1 A schematic diagram of a process for constructing a three-dimensional model of a center-mounted switch cabinet based on a diffusion model;
[0095] Figure 2 It is an analysis diagram of the intersection M0 of the virtual shooting point based on the yz plane of a method for constructing a three-dimensional model of a central switch cabinet based on a diffusion model;
[0096] Figure 3It is an analysis diagram of the updated origin O' of the virtual shooting point of a method for constructing a three-dimensional model of a central switch cabinet based on a diffusion model;
[0097] Figure 4 This is an analysis diagram of the angle α between the line segment O′P′2 and the line segment O′P′1 of the track photographed by a virtual camera in a method for constructing a three-dimensional model of a centrally mounted switch cabinet based on a diffusion model;
[0098] Figure 5 A structural schematic diagram of a system for building a three-dimensional model of a center-mounted switchgear based on a diffusion model. DETAILED DESCRIPTION
[0099] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present invention can be combined with each other without conflict.
[0100] The following detailed description is an exemplary description, which is intended to provide further detailed description of the present invention. Unless otherwise specified, all technical terms used in the present invention have the same meaning as those generally understood by those skilled in the art to which the present invention belongs. The terms used in the present invention are only for describing specific embodiments, and are not intended to limit the exemplary embodiments according to the present invention.
[0101] Embodiment 1:
[0102] The embodiment of the present invention provides a method for constructing a three-dimensional model of a central switch cabinet based on a diffusion model, referring to Figure 1 ,include:
[0103] The image information of the central switch cabinet is collected by the camera, and the position information of the camera is obtained;
[0104] Filter out interference factors in image information and obtain pre-processed image information;
[0105] According to the camera position information, a virtual camera shooting track around the central switch cabinet is constructed, and virtual shooting points are selected on the virtual camera shooting track through the DDIM (Denoising Diffusion Implicit Model) sampler to obtain the virtual position information of the virtual shooting points.
[0106] An initial SVD (Stable Video Diffusion) interpolation model is constructed based on the diffusion model, and the initial SVD interpolation model is trained using the Objaverse dataset to obtain the SVD interpolation model.
[0107] Based on the SVD interpolation model, interpolation processing is performed according to the pre-processed image information, camera position information and virtual position information to obtain virtual perspective image information;
[0108] According to the image information and virtual perspective image information, image synthesis is performed through the neural radiation field network model to obtain the pre-merged image, and the feature vector of the pre-merged image is extracted. The three-dimensional linear interpolation is performed into the constructed switch cabinet cube model, and texture mesh fitting is performed to generate a three-dimensional model of the central switch cabinet.
[0109] In the above embodiments, the image information of the center-mounted switch cabinet and the camera's position and posture information are collected by the camera, a virtual camera shooting track around the center-mounted switch cabinet is constructed, and a virtual shooting point is selected on the virtual camera shooting track through the DDIM sampler to obtain the virtual posture information of the virtual shooting point, and interpolation processing is performed based on the SVD interpolation model to obtain virtual perspective image information; the image information and the virtual perspective image information are synthesized through the neural radiation field network model to obtain a pre-merged image, extract the feature vector of the pre-merged image, and perform three-dimensional linear interpolation into the constructed switch cabinet cube model, perform texture mesh fitting, and generate a three-dimensional model of the center-mounted switch cabinet.
[0110] In the above embodiments, an initial SVD frame interpolation model is constructed based on the diffusion model, and the initial SVD frame interpolation model is trained using the Objaverse data set to obtain the SVD frame interpolation model.
[0111] In the above embodiments, the virtual shooting points are constructed around the central switch cabinet, thereby achieving the acquisition of the surrounding image of the central switch cabinet.
[0112] The beneficial effects of the above technology are: based on the SVD interpolation model generated by the diffusion model, the virtual perspective image information corresponding to the virtual shooting point is obtained, and the image information and the virtual perspective image information are processed through the neural radiation field network model and the texture grid to obtain the three-dimensional model of the center-mounted switch cabinet; compared with the traditional technology, the above method does not need to adopt three-dimensional point cloud scanning systems, depth cameras and other image acquisition equipment, which solves the problems of high equipment cost and inconvenient operation in traditional technologies. The acquired image information and camera position information are processed and input into the SVD interpolation model, so that the virtual perspective image information based on the virtual camera shooting track can be generated according to a small amount of image information, which solves the inconvenience of collecting a large amount of image information for modeling, and the image information and the virtual perspective image information are automatically processed according to the neural radiation field network model and the texture grid, so as to realize the construction of the three-dimensional model of the center-mounted switch cabinet, and effectively improve the visual effect of the model while optimizing the model construction process.
[0113] Embodiment 2:
[0114] The embodiment of the present invention provides a method for constructing a three-dimensional model of a center-mounted switch cabinet based on a diffusion model, comprising the steps of: collecting image information of the center-mounted switch cabinet through a camera, and obtaining camera position information; comprising:
[0115] Under uniform lighting conditions, panoramic images of at least two cabinet surfaces of the central switch cabinet are collected to construct image information;
[0116] The COLMAP algorithm is used to obtain the camera's three-dimensional point coordinates, yaw angle, and pitch angle to construct the camera's position and posture information.
[0117] In the above embodiments, the panoramic image is collected under uniform lighting conditions, which can effectively reduce the complex shadows of the target cabinet caused by complex lighting and other debris, and reduce or even avoid the geometric distortion of the cabinet virtual viewing angle caused by irregular shadows.
[0118] In the above embodiments, the panoramic image includes key elements of the central switch cabinet, including: the switch on the front of the cabinet, the pressure plate, the dial, and the nameplate.
[0119] In the above embodiments, the image information includes 2-5 panoramic images.
[0120] In the above embodiments, the three-dimensional point coordinates of the camera are used to represent the spatial coordinates of the camera for image acquisition, and the yaw angle and pitch angle of the camera are used to represent the light direction information when the camera is shooting.
[0121] Embodiment 3:
[0122] The embodiment of the present invention provides a method for constructing a three-dimensional model of a center-mounted switch cabinet based on a diffusion model, comprising the steps of: constructing a virtual camera shooting track around the center-mounted switch cabinet according to the camera position information, and selecting virtual shooting points on the virtual camera shooting track through a denoising diffusion implicit model sampler to obtain virtual position information of the virtual shooting points; comprising:
[0123] Get the first shooting point P1 (x1, y1, z1, θ1, φ1) and the second shooting point P2 (x2, y2, z2, θ2, φ2) in the camera position information; where x1 is the x-axis coordinate value of the first shooting point, y1 is the y-axis coordinate value of the first shooting point, z1 is the z-axis coordinate value of the first shooting point, θ1 is the yaw angle value of the first shooting point, and φ1 is the pitch angle value of the first shooting point; x2 is the x-axis coordinate value of the second shooting point, y2 is the y-axis coordinate value of the second shooting point, z2 is the z-axis coordinate value of the second shooting point, θ2 is the yaw angle value of the second shooting point, and φ2 is the pitch angle value of the second shooting point;
[0124] In the three-dimensional coordinate system, obtain the position information (y1, z1) and (y2, z2) of the first shooting point P1 and the second shooting point P2 on the yz plane; draw the projections l1 and l2 of the actual shooting direction of the camera on the yz plane according to the pitch angle value φ1 of the first shooting point and the pitch angle value φ2 of the second shooting point, and obtain the intersection point M0 of l1 and l2;
[0125] Calculate the first distance between the first shooting point P1 and the intersection point M0, and the second distance between the second shooting point P2 and the intersection point M0 respectively; select the shooting point with a longer distance as the reference point, draw the connecting line segment between the first shooting point P1 and the second shooting point P2, and take the midpoint of the connecting line segment as the normal line, obtain the intersection point O' with the projection l' of the reference point on the yz plane, and use it as the updated origin O' of the three-dimensional coordinate system, and update the first shooting point P'1 and the second shooting point P'2;
[0126] According to the first shooting point P′1 and the second shooting point P′2, a horizontal camera shooting track based on the yz plane is constructed;
[0127] According to the updated origin O', the x-axis orientation of the camera shooting track is analyzed to obtain the camera shooting track in three-dimensional space;
[0128] The virtual shooting point is selected along the camera shooting track through the DDIM sampler to obtain the three-dimensional coordinates of the virtual shooting point. The yaw angle and pitch angle of the virtual shooting point are constructed by collecting the orientation angle of the virtual shooting point facing the updated origin to obtain the virtual posture information.
[0129] In the above embodiment, the first shooting point P1 (x1, y1, z1, θ1, φ1) and the second shooting point P2 (x2, y2, z2, θ2, φ2) in the camera position information are obtained. Figure 2 , respectively obtain the position information (y1, z1) and (y2, z2) of the first shooting point P1 and the second shooting point P2 on the yz plane; draw the projections l1 and l2 of the actual shooting direction of the camera based on the yz plane according to the pitch angle value φ1 of the first shooting point and the pitch angle value φ2 of the second shooting point, and obtain the intersection point M0 of l1 and l2;
[0130] Calculate the first distance between the first shooting point P1 and the intersection point M0, and the second distance between the second shooting point P2 and the intersection point M0 respectively; select the shooting point with a longer distance as the reference point, and Figure 3 , draw the connecting line segment between the first shooting point P1 and the second shooting point P2, and take the midpoint of the connecting line segment as the normal line, obtain the intersection point O' with the projection l' of the reference point on the yz plane as the updated origin O' of the three-dimensional coordinate system, and update the first shooting point P'1 and the second shooting point P'2;
[0131] In the above embodiment, a horizontal virtual camera shooting track based on the yz plane is constructed according to the first shooting point P′1 and the second shooting point P′2; and according to the updated origin O', the x-axis orientation of the virtual camera shooting track is analyzed to obtain the virtual camera shooting track in three-dimensional space; the virtual shooting point is selected along the virtual camera shooting track through the DDIM sampler to obtain the three-dimensional coordinates of the virtual shooting point, and by collecting the orientation angle of the virtual shooting point facing the updated origin, the yaw angle and pitch angle of the virtual shooting point are constructed to obtain the virtual posture information.
[0132] In the above embodiments, the DDIM (Denoising Diffusion Implicit Model) sampler is a denoising diffusion implicit model sampler.
[0133] In the above embodiments, the yaw angle and pitch angle of the virtual shooting point are constructed by adding a random small offset to the orientation angle of the virtual shooting point facing the update origin.
[0134] The beneficial effects of the above technology are: through the first shooting point and the second shooting point in the camera position information, the horizontal virtual camera shooting track is obtained, and the x-axis orientation of the virtual camera shooting track is calculated, thereby obtaining the virtual camera shooting track in three-dimensional space; through the DDIM sampler, the selection of virtual shooting points on the virtual camera shooting track is realized, and the virtual posture information is obtained according to the three-dimensional coordinates of the virtual shooting points and the orientation angle facing the update origin; in the above technical solution, the camera position information is used to obtain the virtual camera shooting track, virtual shooting points and virtual posture information, so that the SVD interpolation model in the subsequent steps can generate corresponding virtual perspective image information.
[0135] Embodiment 4:
[0136] The embodiment of the present invention provides a method for constructing a three-dimensional model of a centrally mounted switch cabinet based on a diffusion model, comprising the steps of: respectively calculating a first distance between a first shooting point P1 and an intersection point M0, and a second distance between a second shooting point P2 and the intersection point M0; selecting a shooting point with a longer distance as a reference point, drawing a connecting line segment between the first shooting point P1 and the second shooting point P2, taking the midpoint of the connecting line segment as a normal, obtaining an intersection point O' with a projection l' of the reference point on the yz plane, and taking the intersection point O' as an updated origin O' of the three-dimensional coordinate system, and updating the first shooting point P'1 and the second shooting point P'2; comprising:
[0137] The shooting point at a longer distance is set as the second shooting point P2, and the second shooting point P2 is used as the reference point;
[0138] Draw the intersection point O' of the normal line and the projection l' of the reference point on the yz plane as the updated origin O' of the three-dimensional coordinate system, and update the first shooting point P'1 (x'1, y'1, z'1, θ1, φ1) and the second shooting point P'2 (0, y'2, z'2, θ2, φ2); wherein x'1 is the x-axis coordinate value of the first shooting point relative to the updated origin O', y'1 is the y-axis coordinate value of the first shooting point relative to the updated origin O', z'1 is the z-axis coordinate value of the first shooting point relative to the updated origin O', y'2 is the y-axis coordinate value of the second shooting point relative to the updated origin O', and z'2 is the z-axis coordinate value of the second shooting point relative to the updated origin O'.
[0139] In the above embodiment, when the second distance is greater than the first distance, the second shooting point P2 is used as the reference point; the intersection O' of the normal line and the projection l' of the reference point on the yz plane is drawn as the updated origin O' of the three-dimensional coordinate system, and the first shooting point P'1 (x'1, y'1, z'1, θ1, φ1) and the second shooting point P'2 (0, y'2, z'2, θ2, φ2) are updated.
[0140] Embodiment 5:
[0141] The embodiment of the present invention provides a method for constructing a three-dimensional model of a center-mounted switch cabinet based on a diffusion model, comprising the steps of: analyzing the x-axis orientation of the virtual camera shooting track based on the horizontal virtual camera shooting track according to the updated origin O', and obtaining the virtual camera shooting track in the three-dimensional space; comprising:
[0142] The second shooting point P′2 is set as a preset point, the line segment O′P′2 and the line segment O′P′1 are constructed, and the angle α between the line segment O′P′2 and the line segment O′P′1 is obtained;
[0143] Set the angular velocity ω of the camera on the horizontal camera shooting track yz ;
[0144] Get the x-axis position x of the camera's shooting track c ;
[0145]
[0146] Among them, a n ,ω n is a random constant, n is the serial number of the random constant, a0 and ω0 are initial constants, t is the time for the camera to move from the preset point, t = α / ω yz .
[0147] In the above embodiments, reference Figure 4 , by obtaining the angle α between the line segment O′P′2 and the line segment O′P′1 and the angular velocity ω of the camera on the horizontal virtual camera shooting trackyz , calculate the movement time of the camera on the horizontal virtual camera shooting track, and obtain the x-axis orientation of the virtual camera shooting track through the combination of multiple sine functions.
[0148] Embodiment 6:
[0149] An embodiment of the present invention provides a method for constructing a three-dimensional model of a center-mounted switch cabinet based on a diffusion model, comprising:
[0150] The shooting track of the horizontal virtual camera based on the yz plane is a perfect circle, built around the central switch cabinet;
[0151] The constructed virtual camera shooting track passes through the first shooting point and the second shooting point.
[0152] In the above embodiments, the horizontal virtual camera shooting track is a perfect circle, so that the acquired virtual shooting points are arranged around the central switch cabinet, thereby realizing the acquisition of virtual perspective image information around the central switch cabinet.
[0153] In the above embodiment, the virtual camera shooting track passes through the first shooting point and the second shooting point, so that in the subsequent steps, virtual perspective image information corresponding to the virtual shooting point is generated according to the image information corresponding to the first shooting point and the second shooting point.
[0154] Embodiment 7:
[0155] The embodiment of the present invention provides a method for constructing a three-dimensional model of a centrally mounted switch cabinet based on a diffusion model, comprising: based on a video diffusion interpolation model, interpolation processing is performed according to image information, camera position information and virtual position information to obtain virtual perspective image information; comprising:
[0156] Based on the virtual camera shooting track, mark the first shooting point P′1 and the second shooting point P′2;
[0157] Acquire virtual shooting points and corresponding virtual posture information between the first shooting point P′1 and the second shooting point P′2, and between the second shooting point P′2 and the first shooting point P′1;
[0158] The SVD interpolation model generates virtual perspective image information corresponding to the virtual shooting point based on the preprocessed image information and virtual pose information.
[0159] In the above embodiments, the SVD (Stable Video Diffusion) frame insertion model is an open source video generation model.
[0160] In the above embodiments, the first shooting point and the second shooting point are marked on the virtual camera shooting track, and the SVD interpolation model generates virtual perspective image information from the first shooting point to the second shooting point and from the second shooting point to the first shooting point according to the preprocessed image information and the virtual posture information.
[0161] The beneficial effects of the above technology are: the SVD interpolation model realizes the generation of virtual perspective image information corresponding to the virtual shooting point based on the preprocessed image information, and further realizes the acquisition of multiple angle image information of the centrally mounted switch cabinet. The SVD interpolation model generates images under the constraints of the preprocessed image information and the virtual posture information, thereby improving the accuracy of the generated virtual perspective image information.
[0162] Embodiment 8:
[0163] The present invention provides a method for constructing a three-dimensional model of a center-mounted switch cabinet based on a diffusion model, comprising the steps of: performing image synthesis through a neural radiation field network model according to image information and virtual perspective image information, obtaining a pre-merged image, extracting a feature vector of the pre-merged image, performing three-dimensional linear interpolation into a constructed switch cabinet cube model, performing texture grid fitting, and generating a three-dimensional model of the center-mounted switch cabinet; comprising:
[0164] Input the image information and the corresponding camera position information, the virtual view image information and the corresponding virtual position information into the neural radiation field network model;
[0165] The neural radiation field network model constructs the image generation space based on the camera position information and virtual position information;
[0166] Select a sampling point in the image generation space, obtain the particle information of the sampling point in the image information and the virtual perspective image information, superimpose the particle information of the same sampling point, and construct the color information and transparency information of the pixel point corresponding to the sampling point in the pre-merged image; select multiple sampling points in the image generation space, obtain the color information and transparency information of the corresponding pixel point, and generate the pre-merged image;
[0167] Particle information, including the light density and RGB color information of the sampling point in the image.
[0168] In the above embodiments, the light density is the transmittance and absorptivity of the light.
[0169] In the above embodiments, the neural radiation field network model constructs an image generation space based on the machine position posture information and the virtual posture information, selects sampling points in the image generation space, obtains the particle information of the sampling points in the image information and the virtual perspective image information, and superimposes the particle information to generate the color information and transparency information of the pixel points in the pre-merged image corresponding to the sampling points, and obtains the color information and transparency information of all the pixels in the pre-merged image by traversing and selecting sampling points in the image generation space to generate a pre-merged image.
[0170] In the above embodiments, the neural radiation field network model superimposes the particle information of the sampling point in the image information and the virtual perspective image information to achieve volume rendering.
[0171] The beneficial effects of the above technology are: the neural radiation field network model selects sampling points in the image generation space, and obtains the particle information of the sampling points in the image information and the virtual perspective image information for superposition, thereby realizing the acquisition of the color information and transparency information of the pixel points in the pre-merged image, and then generating a pre-merged image; the above technical scheme realizes the merging of image information and virtual perspective image information through the neural radiation field network model, and based on the synthesis of pixel points, effectively improves the image quality of the pre-merged image, which facilitates the construction of a three-dimensional model of a centrally mounted switch cabinet in subsequent steps.
[0172] Embodiment 9:
[0173] The present invention provides a method for constructing a three-dimensional model of a center-mounted switch cabinet based on a diffusion model, comprising the steps of: performing image synthesis through a neural radiation field network model according to image information and virtual perspective image information, obtaining a pre-merged image, extracting a feature vector of the pre-merged image, performing three-dimensional linear interpolation into a constructed switch cabinet cube model, performing texture grid fitting, and generating a three-dimensional model of the center-mounted switch cabinet; comprising:
[0174] Construct a cubic model of a center-mounted switchgear cabinet;
[0175] Tetrahedral meshing is performed on the cubic model, where each grid is a tetrahedral structure;
[0176] Extract the feature vector of the pre-merged image and interpolate it into the grid of the cube model through three-dimensional linear interpolation;
[0177] Calculate the signed distance function value between the vertices and the feature vectors in the mesh, adjust the vertices and mesh boundaries of the mesh, identify the object area and non-object area in the mesh, and discard the non-object area in the mesh;
[0178] After each grid is fitted, a three-dimensional model of the central switch cabinet is obtained.
[0179] In the above embodiments, the texture grid may be implemented as a DMTet grid.
[0180] In the above embodiments, a cube model of a center-mounted switch cabinet is constructed and tetrahedron meshing is performed, the feature vector of the pre-merged image is extracted, three-dimensional linear interpolation is performed into the mesh of the cube model, the signed distance function values between the vertices and the feature vectors in the mesh are calculated, the vertices and mesh boundaries of the mesh are adjusted to make the mesh fit the feature vector of the pre-merged image, and the non-object areas in the mesh are discarded. After fitting each mesh in the cube model, a three-dimensional model of the center-mounted switch cabinet is obtained.
[0181] The beneficial effects of the above technology are: through the texture grid, the three-dimensional linear interpolation of the feature vector of the pre-merged image is carried out into the grid of the cube model, and the grid fitting is performed, thereby realizing the generation of a three-dimensional model of a center-mounted switch cabinet, and through the tetrahedral meshing processing, the refined processing in the modeling process is realized, effectively improving the model quality of the generated three-dimensional model.
[0182] Embodiment 10:
[0183] The present invention provides a three-dimensional model construction system for a central switch cabinet based on a diffusion model. Figure 5 ,include:
[0184] An image acquisition module is used to acquire image information of a centrally mounted switch cabinet and obtain position information of an image acquisition device;
[0185] A virtual point generation module is used to construct a virtual camera shooting track around the central switch cabinet according to the camera position information, and select virtual shooting points on the virtual camera shooting track through a denoising diffusion implicit model sampler to obtain virtual position information of the virtual shooting points;
[0186] A model building module is used to build an initial video diffusion interpolation model based on the diffusion model, and train the initial video diffusion interpolation model through a data set to obtain a video diffusion interpolation model;
[0187] A virtual image generation module is used to perform frame insertion processing based on a video diffusion frame insertion model according to image information, camera position information and virtual position information to obtain virtual perspective image information;
[0188] The three-dimensional model generation module is used to perform image synthesis through the neural radiation field network model according to image information and virtual perspective image information, obtain the pre-merged image, extract the feature vector of the pre-merged image, perform three-dimensional linear interpolation into the constructed switch cabinet cube model, perform texture grid fitting, and generate a three-dimensional model of the central switch cabinet.
[0189] In the above embodiments, the image acquisition module acquires image information of the center-mounted switch cabinet through a camera, and filters out interference factors in the image information through an image preprocessing module to obtain preprocessed image information; the virtual point generation module constructs a camera shooting track around the center-mounted switch cabinet by acquiring the camera's position information, and selects virtual shooting points on the camera shooting track through a DDIM sampler to obtain virtual pose information of the virtual shooting points; the virtual image generation module performs interpolation processing based on the SVD interpolation model to obtain virtual perspective image information; the three-dimensional model generation module performs image synthesis on the image information and the virtual perspective image information through a neural radiation field network model to obtain a pre-merged image, and extracts the feature vector of the pre-merged image, and performs three-dimensional linear interpolation into the constructed switch cabinet cube model, performs texture mesh fitting, and generates a three-dimensional model of the center-mounted switch cabinet.
[0190] In the above embodiments, the model construction module constructs an initial SVD interpolation model based on the diffusion model, and trains the initial SVD interpolation model through the Objaverse data set to obtain the SVD interpolation model.
[0191] The beneficial effects of the above technology are: the virtual image generation module in the system generates virtual perspective image information corresponding to the virtual shooting point based on the SVD interpolation model, and obtains the three-dimensional model of the central switch cabinet according to the image information and the virtual perspective image information through the three-dimensional model generation module; compared with the traditional technology, the above system does not need to adopt three-dimensional point cloud scanning system, depth camera and other image acquisition equipment, which solves the problems of high equipment cost and inconvenient operation in traditional technology, and processes the acquired image information and camera position information, and inputs them into the SVD interpolation model, so as to generate virtual perspective image information based on the virtual camera shooting track according to a small amount of image information, which solves the inconvenience of modeling in traditional technology that requires the collection of a large amount of image information, and automatically processes the image information and the virtual perspective image information according to the neural radiation field network model and the texture grid, thereby realizing the construction of the three-dimensional model of the central switch cabinet, and effectively improving the visual effect of the model while optimizing the model construction process.
[0192] Embodiment 11:
[0193] The present invention provides an electronic device, comprising: a camera, a posture sensor and a processor; wherein:
[0194] A camera, used to collect image information of a center-mounted switch cabinet;
[0195] Posture sensor, used to collect the camera’s position information;
[0196] The processor is used to implement the method described in any of the above embodiments to obtain a three-dimensional model of a center-mounted switch cabinet.
[0197] In the above embodiments, the processor processes the image information collected by the camera and the machine position and posture information collected by the posture sensor to generate a three-dimensional model of the central switch cabinet.
[0198] In the above embodiments, the obtained three-dimensional model of the central switch cabinet can be used to build a three-dimensional model of the distribution network and a three-dimensional model of the material warehouse in the power scenario, and is used for intelligent management and control of power materials.
[0199] Embodiment 12:
[0200] A computer storage medium includes: a computer program, which implements the method described in any of the above embodiments when the computer program is executed by a processor.
[0201] In the above embodiments, when the computer program is executed by the processor, a three-dimensional model of the center-mounted switch cabinet is generated.
[0202] It is known from common technical knowledge that the present invention can be implemented by other embodiments that do not deviate from its spirit or essential features. Therefore, the above disclosed embodiments are only illustrative in all respects and are not exclusive. All changes within the scope of the present invention or within the scope equivalent to the present invention are included in the present invention.
[0203] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented 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.
[0204] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0205] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0206] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0207] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for constructing a three-dimensional model of a central switch cabinet based on a diffusion model, characterized in that: include: Collect image information of the central switch cabinet and obtain the position and posture information of the image acquisition device; According to the camera position information, a virtual camera shooting track around the central switch cabinet is constructed, and virtual shooting points are selected on the virtual camera shooting track by a denoising diffusion implicit model sampler to obtain virtual position information of the virtual shooting points; Constructing an initial video diffusion interpolation model based on the diffusion model, and training the initial video diffusion interpolation model through a data set to obtain a video diffusion interpolation model; Based on the video diffusion interpolation model, interpolation processing is performed according to the image information, the camera position information and the virtual position information to obtain virtual perspective image information; According to the image information and the virtual perspective image information, image synthesis is performed through a neural radiation field network model to obtain a pre-merged image, and the feature vector of the pre-merged image is extracted. Three-dimensional linear interpolation is performed into the constructed switch cabinet cube model, and texture mesh fitting is performed to generate a three-dimensional model of a centrally mounted switch cabinet.
2. The method for constructing a three-dimensional model of a centrally mounted switch cabinet based on a diffusion model according to claim 1, characterized in that: The step of collecting image information of the central switch cabinet and obtaining machine position and posture information of the image acquisition device includes: Under uniform lighting conditions, collect panoramic images of at least two cabinet surfaces of the central switch cabinet to construct image information; The three-dimensional point coordinates, yaw angle and pitch angle of the image acquisition device are obtained through a three-dimensional coordinate reconstruction algorithm to construct the camera position and posture information of the image acquisition device.
3. The method for constructing a three-dimensional model of a central switch cabinet based on a diffusion model according to claim 1, characterized in that: The step of constructing a virtual camera shooting track around the central switch cabinet according to the camera position information, and selecting virtual shooting points on the virtual camera shooting track by a denoising diffusion implicit model sampler to obtain virtual position information of the virtual shooting points includes: Obtain the first shooting point P1 (x1, y1, z1, θ1, φ1) and the second shooting point P2 (x2, y2, z2, θ2, φ2) in the camera position information; wherein x1 is the x-axis coordinate value of the first shooting point, y1 is the y-axis coordinate value of the first shooting point, z1 is the z-axis coordinate value of the first shooting point, θ1 is the yaw angle value of the first shooting point, and φ1 is the pitch angle value of the first shooting point; x2 is the x-axis coordinate value of the second shooting point, y2 is the y-axis coordinate value of the second shooting point, z2 is the z-axis coordinate value of the second shooting point, θ2 is the yaw angle value of the second shooting point, and φ2 is the pitch angle value of the second shooting point; In the three-dimensional coordinate system, obtain the position information (y1, z1) and (y2, z2) of the first shooting point P1 and the second shooting point P2 on the yz plane; draw the projections l1 and l2 of the actual shooting direction of the image acquisition device on the yz plane according to the pitch angle value φ1 of the first shooting point and the pitch angle value φ2 of the second shooting point, and obtain the intersection point M0 of l1 and l2; Calculate the first distance between the first shooting point P1 and the intersection point M0, and the second distance between the second shooting point P2 and the intersection point M0 respectively; select a shooting point with a longer distance as a reference point, draw a connecting line segment between the first shooting point P1 and the second shooting point P2, and take the midpoint of the connecting line segment as a normal line, obtain the intersection point O' with the projection l' of the reference point on the yz plane, and use it as the updated origin O' of the three-dimensional coordinate system, and update the first shooting point P1' and the second shooting point P2'; According to the first shooting point P1′ and the second shooting point P2′, a horizontal virtual camera shooting track based on the yz plane is constructed; According to the updated origin O', based on the horizontal virtual camera shooting track, the x-axis orientation of the virtual camera shooting track is analyzed to obtain the virtual camera shooting track in three-dimensional space; The virtual shooting points are selected along the shooting track of the virtual camera through the denoising diffusion implicit model sampler to obtain the three-dimensional coordinates of the virtual shooting points. The yaw angle and pitch angle of the virtual shooting points are constructed by collecting the orientation angle of the virtual shooting points facing the updated origin to obtain the virtual posture information.
4. The method for constructing a three-dimensional model of a centrally mounted switch cabinet based on a diffusion model according to claim 3, characterized in that: The steps of respectively calculating a first distance between the first shooting point P1 and the intersection point M0, and a second distance between the second shooting point P2 and the intersection point M0; selecting a shooting point with a longer distance as a reference point, drawing a connecting line segment between the first shooting point P1 and the second shooting point P2, taking the midpoint of the connecting line segment as a normal, obtaining an intersection point O' with a projection l' of the reference point on the yz plane as an updated origin O' of the three-dimensional coordinate system, and updating the first shooting point P'1 and the second shooting point P'2 include: The shooting point at a longer distance is set as the second shooting point P2, and the second shooting point P2 is used as the reference point; Draw the intersection point O' of the normal line and the projection l' of the reference point on the yz plane as the updated origin O' of the three-dimensional coordinate system, and update the first shooting point P'1 (x' i , y′ i , z′ i , θ1, φ1) and the second shooting point P′2(0, y′2, z′2, θ2, φ2); wherein, x′1 is the x-axis coordinate value of the first shooting point relative to the update origin O', y′1 is the y-axis coordinate value of the first shooting point relative to the update origin O', z′1 is the z-axis coordinate value of the first shooting point relative to the update origin O', y′2 is the y-axis coordinate value of the second shooting point relative to the update origin O', and z′2 is the z-axis coordinate value of the second shooting point relative to the update origin O'.
5. The method for constructing a three-dimensional model of a centrally mounted switch cabinet based on a diffusion model according to claim 3, characterized in that: The step of analyzing the x-axis orientation of the virtual camera shooting track based on the horizontal virtual camera shooting track according to the updated origin O' to obtain the virtual camera shooting track in three-dimensional space comprises: The second shooting point P′2 is set as a preset point, the line segment O′P′2 and the line segment O′P′1 are constructed, and the angle α between the line segment O′P′2 and the line segment O′P′1 is obtained; Set the angular velocity ω of the image acquisition device on the horizontal virtual shooting track yz ; Get the x-axis position x of the virtual camera shooting track c ; Among them, a n ,ω n is a random constant, n is the serial number of the random constant, a0 and ω0 are initial constants, t is the time for the image acquisition device to move from the preset point, t = α / ωy z .
6. The method for constructing a three-dimensional model of a centrally mounted switch cabinet based on a diffusion model according to claim 4, characterized in that: The step of performing frame insertion processing based on the video diffusion frame insertion model according to the image information, the camera position information and the virtual position information to obtain the virtual perspective image information includes: Based on the virtual camera shooting track, mark the first shooting point P′1 and the second shooting point P′2; Acquire virtual shooting points and corresponding virtual posture information between the first shooting point P′1 and the second shooting point P′2, and between the second shooting point P′2 and the first shooting point P′1; The video diffusion interpolation model generates virtual viewing angle image information corresponding to the virtual shooting point according to the preprocessed image information and the virtual posture information.
7. The method for constructing a three-dimensional model of a centrally mounted switch cabinet based on a diffusion model according to claim 1, characterized in that: The steps of synthesizing images through a neural radiation field network model according to the image information and the virtual perspective image information, obtaining a pre-merged image, extracting a feature vector of the pre-merged image, performing three-dimensional linear interpolation into the constructed switch cabinet cube model, performing texture mesh fitting, and generating a three-dimensional model of a center-mounted switch cabinet include: Input the image information and the corresponding camera position information, the virtual perspective image information and the corresponding virtual position information into the neural radiation field network model; The neural radiation field network model constructs an image generation space according to the machine position information and the virtual position information; Selecting a sampling point in the image generation space, and obtaining particle information of the sampling point in the image information and the virtual perspective image information, superimposing the particle information of the same sampling point, and constructing the color information and transparency information of the pixel point corresponding to the sampling point in the pre-merged image; by selecting multiple sampling points in the image generation space, obtaining the color information and transparency information of the corresponding pixel point, and generating the pre-merged image; The particle information includes light density and RGB color information of the sampling point in the image.
8. The method for constructing a three-dimensional model of a centrally mounted switch cabinet based on a diffusion model according to claim 1, characterized in that: The steps of synthesizing images through a neural radiation field network model according to the image information and the virtual perspective image information, obtaining a pre-merged image, extracting a feature vector of the pre-merged image, performing three-dimensional linear interpolation into the constructed switch cabinet cube model, performing texture mesh fitting, and generating a three-dimensional model of a center-mounted switch cabinet include: Construct a cubic model of a center-mounted switchgear cabinet; Performing tetrahedral meshing on the cube model, wherein each texture mesh is a tetrahedral structure; Extracting feature vectors of the pre-merged image and interpolating them into a grid of the cube model through three-dimensional linear interpolation; Calculating the signed distance function value between the vertices in the texture mesh and the feature vector, adjusting the vertices and mesh boundaries of the texture mesh, identifying the object area and the non-object area in the texture mesh, and discarding the non-object area in the texture mesh; After each texture mesh is fitted, a three-dimensional model of the center-mounted switch cabinet is obtained.
9. A three-dimensional model construction system for a central switch cabinet based on a diffusion model, characterized in that: include: An image acquisition module is used to acquire image information of a centrally mounted switch cabinet and obtain position information of an image acquisition device; A virtual point generation module is used to construct a virtual camera shooting track around the central switch cabinet according to the camera position information, and select virtual shooting points on the virtual camera shooting track through a denoising diffusion implicit model sampler to obtain virtual position information of the virtual shooting points; A model building module, used to build an initial video diffusion interpolation model based on the diffusion model, and train the initial video diffusion interpolation model through a data set to obtain a video diffusion interpolation model; A virtual image generation module, configured to perform frame insertion processing based on a video diffusion frame insertion model according to the image information, camera position information and virtual position information to obtain virtual perspective image information; The three-dimensional model generation module is used to perform image synthesis through a neural radiation field network model according to the image information and virtual perspective image information, obtain a pre-merged image, extract the feature vector of the pre-merged image, perform three-dimensional linear interpolation into the constructed switch cabinet cube model, perform texture grid fitting, and generate a three-dimensional model of a centrally mounted switch cabinet.
10. A system for constructing a three-dimensional model of a central switch cabinet based on a diffusion model according to claim 9, characterized in that: The step of collecting image information of the central switch cabinet and obtaining machine position and posture information of the image acquisition device includes: Panoramic images of at least two cabinet faces of a centrally mounted switch cabinet under uniform lighting conditions to construct image information; The three-dimensional point coordinates, yaw angle and pitch angle of the image acquisition device are obtained through a three-dimensional coordinate reconstruction algorithm to construct the camera position and posture information of the image acquisition device.
11. The system for constructing a three-dimensional model of a centrally mounted switch cabinet based on a diffusion model according to claim 9, characterized in that: The step of constructing a virtual camera shooting track around the central switch cabinet according to the camera position information, and selecting virtual shooting points on the virtual camera shooting track by a denoising diffusion implicit model sampler to obtain virtual position information of the virtual shooting points includes: Obtain the first shooting point P1 (x1, y1, z1, θ1, φ1) and the second shooting point P2 (x2, y2, z2, θ2, φ2) in the camera position information; wherein x1 is the x-axis coordinate value of the first shooting point, y1 is the y-axis coordinate value of the first shooting point, z1 is the z-axis coordinate value of the first shooting point, θ1 is the yaw angle value of the first shooting point, and φ1 is the pitch angle value of the first shooting point; x2 is the x-axis coordinate value of the second shooting point, y2 is the y-axis coordinate value of the second shooting point, z2 is the z-axis coordinate value of the second shooting point, θ2 is the yaw angle value of the second shooting point, and φ2 is the pitch angle value of the second shooting point; In the three-dimensional coordinate system, obtain the position information (y1, z1) and (y2, z2) of the first shooting point P1 and the second shooting point P2 on the yz plane; draw the projections l1 and l2 of the actual shooting direction of the image acquisition device on the yz plane according to the pitch angle value φ1 of the first shooting point and the pitch angle value φ2 of the second shooting point, and obtain the intersection point M0 of l1 and l2; Calculate the first distance between the first shooting point P1 and the intersection point M0, and the second distance between the second shooting point P2 and the intersection point M0 respectively; select a shooting point with a longer distance as a reference point, draw a connecting line segment between the first shooting point P1 and the second shooting point P2, and take the midpoint of the connecting line segment as a normal line, obtain the intersection point O' with the projection l' of the reference point on the yz plane, and use it as the updated origin O' of the three-dimensional coordinate system, and update the first shooting point P1' and the second shooting point P2'; According to the first shooting point P1′ and the second shooting point P2′, a horizontal virtual camera shooting track based on the yz plane is constructed; According to the updated origin O', based on the horizontal virtual camera shooting track, the x-axis orientation of the virtual camera shooting track is analyzed to obtain the virtual camera shooting track in three-dimensional space; The virtual shooting points are selected along the shooting track of the virtual camera through the denoising diffusion implicit model sampler to obtain the three-dimensional coordinates of the virtual shooting points. The yaw angle and pitch angle of the virtual shooting points are constructed by collecting the orientation angle of the virtual shooting points facing the updated origin to obtain the virtual posture information.
12. A system for constructing a three-dimensional model of a central switch cabinet based on a diffusion model according to claim 11, characterized in that: The steps of respectively calculating a first distance between the first shooting point P1 and the intersection point M0, and a second distance between the second shooting point P2 and the intersection point M0; selecting a shooting point with a longer distance as a reference point, drawing a connecting line segment between the first shooting point P1 and the second shooting point P2, taking the midpoint of the connecting line segment as a normal, obtaining an intersection point O' with a projection l' of the reference point on the yz plane as an updated origin O' of the three-dimensional coordinate system, and updating the first shooting point P'1 and the second shooting point P'2 include: The shooting point at a longer distance is set as the second shooting point P2, and the second shooting point P2 is used as the reference point; Draw the intersection point O' of the normal line and the projection l' of the reference point on the yz plane as the updated origin O' of the three-dimensional coordinate system, and update the first shooting point P'1 (x' i , y′ i , z′ i , θ1, φ1) and the second shooting point P′2(0, y′2, z′2, θ2, φ2); wherein x′1 is the x-axis coordinate value of the first shooting point relative to the update origin O′, y′ i is the y-axis coordinate value of the first shooting point relative to the update origin O', z'1 is the z-axis coordinate value of the first shooting point relative to the update origin O', y'2 is the y-axis coordinate value of the second shooting point relative to the update origin O', and z'2 is the z-axis coordinate value of the second shooting point relative to the update origin O'.
13. The system for constructing a three-dimensional model of a central switch cabinet based on a diffusion model according to claim 11, characterized in that: The step of analyzing the x-axis orientation of the virtual camera shooting track based on the horizontal virtual camera shooting track according to the updated origin O' to obtain the virtual camera shooting track in three-dimensional space comprises: The second shooting point P′2 is set as a preset point, the line segment O′P′2 and the line segment O′P′1 are constructed, and the angle α between the line segment O′P′2 and the line segment O′P′1 is obtained; Set the angular velocity ω of the image acquisition device on the horizontal virtual shooting track yz ; Get the x-axis position x of the virtual camera shooting track c ; Among them, a n ,ω n is a random constant, n is the serial number of the random constant, a0 and ω0 are initial constants, t is the time for the image acquisition device to move from the preset point, t = α / ω yz .
14. The system for constructing a three-dimensional model of a central switch cabinet based on a diffusion model according to claim 12, characterized in that: The step of performing frame insertion processing based on the video diffusion frame insertion model according to the image information, the camera position information and the virtual position information to obtain the virtual perspective image information includes: Based on the virtual camera shooting track, mark the first shooting point P′1 and the second shooting point P′2; Acquire virtual shooting points and corresponding virtual posture information between the first shooting point P′1 and the second shooting point P′2, and between the second shooting point P′2 and the first shooting point P′1; The video diffusion interpolation model generates virtual viewing angle image information corresponding to the virtual shooting point according to the preprocessed image information and the virtual posture information.
15. The system for constructing a three-dimensional model of a central switch cabinet based on a diffusion model according to claim 9, characterized in that: The steps of synthesizing images through a neural radiation field network model according to the image information and the virtual perspective image information, obtaining a pre-merged image, extracting a feature vector of the pre-merged image, performing three-dimensional linear interpolation into the constructed switch cabinet cube model, performing texture mesh fitting, and generating a three-dimensional model of a center-mounted switch cabinet include: Input the image information and the corresponding camera position information, the virtual perspective image information and the corresponding virtual position information into the neural radiation field network model; The neural radiation field network model constructs an image generation space according to the machine position information and the virtual position information; Selecting a sampling point in the image generation space, and obtaining particle information of the sampling point in the image information and the virtual perspective image information, superimposing the particle information of the same sampling point, and constructing the color information and transparency information of the pixel point corresponding to the sampling point in the pre-merged image; by selecting multiple sampling points in the image generation space, obtaining the color information and transparency information of the corresponding pixel point, and generating the pre-merged image; The particle information includes light density and RGB color information of the sampling point in the image.
16. The system for constructing a three-dimensional model of a central switch cabinet based on a diffusion model according to claim 9, characterized in that: The steps of synthesizing images through a neural radiation field network model according to the image information and the virtual perspective image information, obtaining a pre-merged image, extracting a feature vector of the pre-merged image, performing three-dimensional linear interpolation into the constructed switch cabinet cube model, performing texture mesh fitting, and generating a three-dimensional model of a center-mounted switch cabinet include: Construct a cubic model of a center-mounted switchgear cabinet; Performing tetrahedral meshing on the cube model, wherein each texture mesh is a tetrahedral structure; Extracting feature vectors of the pre-merged image and interpolating them into a grid of the cube model through three-dimensional linear interpolation; Calculating the signed distance function value between the vertices in the texture mesh and the feature vector, adjusting the vertices and mesh boundaries of the texture mesh, identifying the object area and the non-object area in the texture mesh, and discarding the non-object area in the texture mesh; After each texture mesh is fitted, a three-dimensional model of the center-mounted switch cabinet is obtained.
17. An electronic device, characterized in that: include: Camera, posture sensor and processor; among them, The image acquisition device is used to acquire image information of the central switch cabinet; The posture sensor is used to collect the machine position posture information of the image acquisition device; The processor is used to implement the method according to any one of claims 1 to 8 to obtain a three-dimensional model of a center-mounted switch cabinet.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the method according to any one of claims 1 to 8 is implemented.