Three-dimensional video fusion method and device and electronic equipment

By selecting target points with large HSV color differences in three-dimensional video fusion to align and determine the target color, the problem of low color accuracy caused by noise sensitivity in the existing technology is solved, and the alignment accuracy and color accuracy of three-dimensional video fusion are improved.

CN118587399AActive Publication Date: 2024-09-03HANGZHOU EZVIZ SOFTWARE CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202410997034.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-09-03
Estimated Expiration
2044-07-23

AI Technical Summary

Technical Problem

When the existing 3D video fusion method has shadows, dark areas or low resolution in the 2D image, the linear transformation algorithm is sensitive to data noise, resulting in poor alignment between the 3D model and the 2D image and low color accuracy.

Method used

By obtaining the initial three-dimensional space model and two-dimensional image, select the target three-dimensional points and pixels whose HSV color difference is greater than the threshold, align and determine the target HSV color based on these points, and generate the target three-dimensional space model.

Benefits of technology

The alignment accuracy and color accuracy in the 3D video fusion process are improved, and the deviation between the final 3D model color and the actual color is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587399A
    Figure CN118587399A
Patent Text Reader

Abstract

The invention provides a three-dimensional video fusion method and device and electronic equipment. According to the method, the initial three-dimensional space model and the two-dimensional image are aligned based on the initial three-dimensional space model and the multiple points with the HSV colors suddenly changed selected in the two-dimensional image, multiple point pairs are obtained, each point pair comprises a three-dimensional point in the initial three-dimensional space model and a pixel point in the two-dimensional image, and the HSV colors of the three-dimensional space model and the pixel point in the two-dimensional image are suddenly changed for each point pair. And determining a target HSV color of the three-dimensional point based on the reference HSV color of the pixel point in the point pair, and finally generating a target three-dimensional space model according to the target HSV colors of all the three-dimensional points, thereby completing fusion of the three-dimensional video. According to the method, the initial three-dimensional space model and the two-dimensional image are aligned through the points of which the HSV colors are suddenly changed, the alignment precision is improved, the target HSV color of the three-dimensional point is determined according to the reference HSV color of the pixel point in each point pair, and the color of the finally generated target three-dimensional space model is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video fusion technology, and in particular to a three-dimensional video fusion method, device and electronic equipment. Background Art

[0002] The current 3D video fusion method usually stitches the collected images into a panoramic picture, and uses a linear transformation algorithm to establish a mapping relationship between the 3D model and the 2D image, that is, to complete the alignment of the 3D model and the 2D image, and then assigns the color of the 2D image to each corresponding feature point in the 3D model to achieve 3D video fusion. For the above method, since the linear transformation algorithm is very sensitive to data noise, when there are shadows, dark areas, or low picture resolution in the 2D image, it will directly affect the alignment effect of the 3D model and the 2D image, resulting in low color accuracy in the 3D video fusion process. Summary of the invention

[0003] In view of this, the present application provides a 3D video fusion method, device and electronic device to improve the color accuracy in the 3D video fusion process.

[0004] The technical solutions provided by this application are as follows: According to an embodiment of the first aspect of the present application, a three-dimensional video fusion method is proposed, the method comprising: Obtain an initial three-dimensional space model, the initial three-dimensional space model includes multiple three-dimensional points, each three-dimensional point corresponds to an initial HSV color; Obtain a two-dimensional image, the two-dimensional image includes multiple pixels, and each pixel corresponds to a reference HSV color; Selecting a plurality of target 3D points from the plurality of 3D points, wherein a difference between an initial HSV color corresponding to each target 3D point and an initial HSV color corresponding to an adjacent 3D point is greater than a first threshold; Selecting multiple target pixel points from the multiple pixel points, the difference between the reference HSV color corresponding to each target pixel point and the reference HSV color corresponding to the adjacent pixel point is greater than a second threshold; Aligning the initial three-dimensional space model with the two-dimensional image based on the multiple target three-dimensional points and the multiple target pixel points to obtain a plurality of point pairs, each point pair including a three-dimensional point in the initial three-dimensional space model and a pixel point in the two-dimensional image; For each point pair in the plurality of point pairs, determining a target HSV color corresponding to a three-dimensional point in the point pair based on a reference HSV color corresponding to a pixel point in the point pair; A target three-dimensional space model is generated based on the target HSV colors corresponding to the three-dimensional points included in each point pair.

[0005] Optionally, the obtaining of the initial three-dimensional space model includes: Collecting distance data of the current scene through a laser transmitter, wherein the distance data refers to the distance between the laser transmitter and a three-dimensional point corresponding to a reference object included in the current scene; The color reflection data of the current scene is collected by a pulse transmitter, wherein the color reflection data refers to the color data obtained after the pulse emitted by the pulse transmitter is reflected by the three-dimensional point corresponding to the reference object; the laser transmitter and the pulse transmitter are configured with the same emission frequency and dot matrix density; The initial three-dimensional space model is determined according to the distance data and the color reflection data.

[0006] Optionally, selecting a plurality of target three-dimensional points from the plurality of three-dimensional points includes: Determine a plurality of reference three-dimensional points from the plurality of three-dimensional points included in the initial three-dimensional space model, wherein a difference between an initial HSV color corresponding to each reference three-dimensional point and an initial HSV color corresponding to an adjacent three-dimensional point is greater than a first threshold; According to a preset alignment accuracy, multiple target 3D points are selected from multiple reference 3D points; The selecting a plurality of target pixel points from a plurality of pixel points of the two-dimensional image comprises: Determine a plurality of reference pixels from a plurality of pixels included in the two-dimensional image, wherein a difference between a reference HSV color corresponding to each reference pixel and a reference HSV color corresponding to an adjacent pixel is greater than a second threshold; According to a preset alignment accuracy, multiple target pixel points are selected from multiple reference pixel points; The alignment accuracy is used to indicate the number of the target three-dimensional points and the target pixel points.

[0007] Optionally, aligning the initial three-dimensional space model with the two-dimensional image based on the multiple target three-dimensional points and the multiple target pixel points includes: For each target 3D point, determine the target pixel point corresponding to the target 3D point according to the initial HSV color corresponding to the target 3D point, the initial HSV colors corresponding to the 3D points adjacent to the target 3D point, and the reference HSV colors corresponding to each target pixel point; The initial three-dimensional space model is aligned with the two-dimensional image according to the correspondence between each target three-dimensional point and the target pixel point.

[0008] Optionally, for each target 3D point, determining the target pixel point corresponding to the target 3D point according to the initial HSV color corresponding to the target 3D point, the initial HSV colors corresponding to the 3D points adjacent to the target 3D point, and the reference HSV colors corresponding to each target pixel point includes: For each target 3D point, if it is determined that the difference between the initial HSV color corresponding to the target 3D point and the reference HSV color corresponding to any target pixel point is less than the third threshold, and the difference between the initial HSV color difference corresponding to the target 3D point and the reference HSV color difference corresponding to the target pixel point is less than the fourth threshold, then the target pixel point is determined to be the target pixel point corresponding to the target 3D point; Among them, the initial HSV color difference refers to the difference between the initial HSV color corresponding to the target 3D point and the initial HSV color corresponding to the adjacent 3D point, and the reference HSV color difference refers to the difference between the reference HSV color corresponding to the target pixel point and the reference HSV color corresponding to the adjacent pixel point.

[0009] Optionally, the point pair includes a mutation point pair and a non-mutation point pair, and the mutation point pair refers to a point pair consisting of the target three-dimensional point and the target pixel point; for each point pair in the plurality of point pairs, determining the target HSV color corresponding to the three-dimensional point in the point pair based on the reference HSV color corresponding to the pixel point in the point pair includes: For each mutation point pair, the reference HSV color corresponding to the pixel point in the mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the mutation point pair; For each non-mutation point pair, the reference HSV color corresponding to the pixel point in the non-mutation point pair or the average value of the reference HSV color corresponding to the pixel point in the non-mutation point pair and the initial HSV color of the three-dimensional point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair.

[0010] Optionally, for each non-mutation point pair, taking a reference HSV color corresponding to a pixel point in the non-mutation point pair or an average value of a reference HSV color corresponding to a pixel point in the non-mutation point pair and an initial HSV color of a three-dimensional point in the non-mutation point pair as a target HSV color corresponding to the three-dimensional point in the non-mutation point pair, includes: For each non-mutation point pair, determining the hue difference between the pixel point in the non-mutation point pair and the three-dimensional point; If the hue difference value is less than or equal to the preset hue difference threshold, the reference HSV color corresponding to the pixel point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair; If the hue difference value is greater than the preset hue difference threshold, the average value of the reference HSV color corresponding to the pixel point in the non-mutation point pair and the initial HSV color of the three-dimensional point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair.

[0011] According to an embodiment of the second aspect of the present application, a three-dimensional video fusion device is provided, the device comprising: An acquisition unit, used for acquiring an initial three-dimensional space model, the initial three-dimensional space model includes a plurality of three-dimensional points, each of which corresponds to an initial HSV color; Obtain a two-dimensional image, the two-dimensional image includes multiple pixels, and each pixel corresponds to a reference HSV color; A selection unit, configured to select a plurality of target three-dimensional points from the plurality of three-dimensional points, wherein a difference between an initial HSV color corresponding to each target three-dimensional point and an initial HSV color corresponding to an adjacent three-dimensional point is greater than a first threshold; Selecting multiple target pixel points from the multiple pixel points, the difference between the reference HSV color corresponding to each target pixel point and the reference HSV color corresponding to the adjacent pixel point is greater than a second threshold; an alignment unit, configured to align the initial three-dimensional space model with the two-dimensional image based on the multiple target three-dimensional points and the multiple target pixel points to obtain a plurality of point pairs, each point pair including a three-dimensional point in the initial three-dimensional space model and a pixel point in the two-dimensional image; a determining unit, configured to determine, for each point pair in the plurality of point pairs, a target HSV color corresponding to a three-dimensional point in the point pair based on a reference HSV color corresponding to a pixel point in the point pair; A target three-dimensional space model is generated based on the target HSV colors corresponding to the three-dimensional points included in each point pair.

[0012] Optionally, the acquiring unit is specifically used for: Collecting distance data of the current scene through a laser transmitter, wherein the distance data refers to the distance between the laser transmitter and a three-dimensional point corresponding to a reference object included in the current scene; The color reflection data of the current scene is collected by a pulse transmitter, wherein the color reflection data refers to the color data obtained after the pulse emitted by the pulse transmitter is reflected by the three-dimensional point corresponding to the reference object; the laser transmitter and the pulse transmitter are configured with the same emission frequency and dot matrix density; Determine the initial three-dimensional space model according to the distance data and the color reflection data; And / or, the selection unit is specifically used for: Determine a plurality of reference three-dimensional points from the plurality of three-dimensional points included in the initial three-dimensional space model, wherein a difference between an initial HSV color corresponding to each reference three-dimensional point and an initial HSV color corresponding to an adjacent three-dimensional point is greater than a first threshold; According to a preset alignment accuracy, multiple target 3D points are selected from multiple reference 3D points; The selecting a plurality of target pixel points from a plurality of pixel points of the two-dimensional image comprises: Determine a plurality of reference pixels from a plurality of pixels included in the two-dimensional image, wherein a difference between a reference HSV color corresponding to each reference pixel and a reference HSV color corresponding to an adjacent pixel is greater than a second threshold; According to a preset alignment accuracy, multiple target pixel points are selected from multiple reference pixel points; Wherein, the alignment accuracy is used to indicate the number of the target three-dimensional points and the target pixel points; And / or, the alignment unit is specifically used for: For each target 3D point, determine the target pixel point corresponding to the target 3D point according to the initial HSV color corresponding to the target 3D point, the initial HSV colors corresponding to the 3D points adjacent to the target 3D point, and the reference HSV colors corresponding to each target pixel point; Aligning the initial three-dimensional space model with the two-dimensional image according to a correspondence between each target three-dimensional point and a target pixel point; And / or, the alignment unit is specifically used for: For each target 3D point, if it is determined that the difference between the initial HSV color corresponding to the target 3D point and the reference HSV color corresponding to any target pixel point is less than the third threshold, and the difference between the initial HSV color difference corresponding to the target 3D point and the reference HSV color difference corresponding to the target pixel point is less than the fourth threshold, then the target pixel point is determined to be the target pixel point corresponding to the target 3D point; The initial HSV color difference refers to the difference between the initial HSV color corresponding to the target 3D point and the initial HSV color corresponding to the adjacent 3D point, and the reference HSV color difference refers to the difference between the reference HSV color corresponding to the target pixel and the reference HSV color corresponding to the adjacent pixel; And / or, the point pair includes a mutation point pair and a non-mutation point pair, and the mutation point pair refers to a point pair consisting of the target three-dimensional point and the target pixel point; and the determining unit is specifically used for: For each mutation point pair, the reference HSV color corresponding to the pixel point in the mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the mutation point pair; For each non-mutation point pair, the reference HSV color corresponding to the pixel point in the non-mutation point pair or the average value of the reference HSV color corresponding to the pixel point in the non-mutation point pair and the initial HSV color of the three-dimensional point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair; And / or, the determining unit is specifically configured to: For each non-mutation point pair, determine the hue difference between the pixel point in the non-mutation point pair and the three-dimensional point; If the hue difference value is less than or equal to the preset hue difference threshold, the reference HSV color corresponding to the pixel point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair; If the hue difference value is greater than the preset hue difference threshold, the average value of the reference HSV color corresponding to the pixel point in the non-mutation point pair and the initial HSV color of the three-dimensional point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair.

[0013] According to an embodiment of the third aspect of the present application, an electronic device is proposed, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the program.

[0014] As can be seen from the above technical solutions, the present application aligns the initial three-dimensional space model with the two-dimensional image based on multiple target three-dimensional points selected from the initial three-dimensional space model and multiple target pixel points selected from the two-dimensional image, and obtains multiple point pairs, wherein the target three-dimensional points and target pixel points are points where the HSV color mutates, and each point pair includes a three-dimensional point in the initial three-dimensional space model and a pixel point in the two-dimensional image. Further, for each point pair, the target HSV color corresponding to the three-dimensional point is determined based on the reference HSV color corresponding to the pixel point in the point pair, and finally the target three-dimensional space model is generated according to the target HSV colors corresponding to all three-dimensional points, thereby completing the fusion of the three-dimensional video. The initial three-dimensional space model and the two-dimensional image are aligned by aligning the initial three-dimensional space model and the two-dimensional image at the points where the HSV color mutates, thereby improving the alignment accuracy, and the target HSV color corresponding to the three-dimensional point is determined by the reference HSV color corresponding to the pixel point in each point pair, so that the color of the target three-dimensional space model finally generated is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0016] Figure 1 A flowchart of a three-dimensional video fusion method provided in an embodiment of the present application; Figure 2 A schematic diagram of the process of collecting distance data of the current scene provided in an embodiment of the present application; Figure 3A A schematic diagram of the RGB color model provided in the embodiment of the present application; Figure 3B A schematic diagram of the HSV color model provided in the embodiment of the present application; Figure 4A schematic diagram of the structure of an electronic device provided in an embodiment of the present application; Figure 5 A structural diagram of a three-dimensional video fusion device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.

[0018] Three-dimensional video fusion technology is a technology that integrates video images (two-dimensional images) with three-dimensional models, realizing the combination of virtual scenes and real-time video images. It is widely used in many fields such as security and smart home.

[0019] After acquiring a two-dimensional image and establishing a three-dimensional model, the current three-dimensional video fusion technology usually establishes a mapping relationship between the three-dimensional model and the two-dimensional image through a linear transformation algorithm, and aligns the three-dimensional model with the two-dimensional image according to the mapping relationship established by the linear transformation algorithm. After completing the alignment of the three-dimensional model and the two-dimensional image, each pixel in the two-dimensional image corresponds to a three-dimensional point in the three-dimensional model, and the color attribute of each pixel in the two-dimensional image, such as RGB color, is assigned to the three-dimensional point corresponding to the pixel in the three-dimensional model, and finally a three-dimensional model with color is obtained, completing the fusion of the three-dimensional video.

[0020] However, the linear transformation algorithm is very sensitive to data noise. When there are shadows or dark areas in the two-dimensional image, or the resolution of the acquired two-dimensional image is low, the mapping relationship between the three-dimensional model established by the linear transformation algorithm and the two-dimensional image is less accurate, resulting in a decrease in the alignment accuracy between the two-dimensional image and the three-dimensional model, and ultimately causing the color of the obtained three-dimensional model to deviate significantly from the actual color.

[0021] Based on this, the present application proposes a three-dimensional video fusion method to improve the alignment accuracy of the two-dimensional image and the three-dimensional model, and reduce the deviation between the color of the final three-dimensional model and the actual color.

[0022] Please refer to Figure 1 , Figure 1 A flowchart of a three-dimensional video fusion method provided in an embodiment of the present application, the method comprising: Step 101, obtaining an initial three-dimensional space model, the initial three-dimensional space model includes a plurality of three-dimensional points, each of which corresponds to an initial HSV color.

[0023] In this embodiment, the initial three-dimensional space model is a three-dimensional model with initial HSV colors. The initial three-dimensional space model is composed of a plurality of three-dimensional points, and each three-dimensional point corresponds to an initial HSV color.

[0024] In this embodiment, the method can be applied to the controller of an electronic device. The initial three-dimensional space model can be collected by a physical module deployed in the electronic device, or it can be collected by other devices and sent to the electronic device. This application does not impose any restrictions on this.

[0025] As an embodiment, the initial three-dimensional space model is collected by a physical module deployed in the electronic device. The specific method of obtaining the initial three-dimensional space model may include: Collecting distance data of the current scene through a laser transmitter, the distance data refers to the distance between the laser transmitter and a three-dimensional point corresponding to a reference object included in the current scene; The color reflection data of the current scene is collected through the pulse transmitter. The color reflection data refers to the color data obtained after the pulse emitted by the pulse transmitter is reflected by the three-dimensional point corresponding to the reference object; the laser transmitter and the pulse transmitter are configured with the same emission frequency and dot matrix density; An initial three-dimensional space model is determined based on the distance data and the color reflection data.

[0026] In this embodiment, the emission frequencies and dot density of the deployed laser emitters and pulse emitters can be configured to be the same in advance, and the laser emitter collects the distance data between the three-dimensional point corresponding to the reference object (i.e., the object in the current scene) and the laser emitter, and the pulse emitter collects the color data obtained after the three-dimensional point corresponding to the reference object in the current scene reflects the pulse emitted by the pulse emitter. Further, the initial three-dimensional space model with the initial HSV color is determined according to the distance data and color data corresponding to each three-dimensional point in the current scene.

[0027] Exemplarily, since RGB colors are generally used instead of HSV colors in electronic devices, the electronic device that executes the three-dimensional model fusion method proposed in this embodiment can be a camera device configured with a LiDAR dot matrix laser transceiver module and an RGB band pulse (such as a color LED) transceiver module. The LiDAR dot matrix laser transceiver module collects the distance data of the current scene, and the RGB band pulse transceiver module collects the color data of the current scene. What is finally determined is a three-dimensional space model with RGB colors. At this time, the RGB colors can be further converted into HSV colors.

[0028] Specifically, the process of collecting distance data of the current scene through the LiDAR dot matrix laser transceiver module may include: The LiDAR laser transmitter emits laser pulses in the form of a dot laser beam. The laser pulses will be reflected back after contacting objects in the space. When the LiDAR laser receiver receives the reflected signal, it records the flight time of the laser, that is, the time from emission to receipt of reflection, which is recorded as TOF.

[0029] According to TOF, the distance data between the object in the space and the LiDAR dot matrix laser transceiver module can be calculated by the formula: distance d=TOF*3*10^8.

[0030] Furthermore, a point cloud is established through the obtained set of distance data to obtain the distance data corresponding to each three-dimensional point in the current scene.

[0031] Combine the following Figure 2 The process of collecting distance data of the current scene through the LiDAR dot matrix laser transceiver module is briefly introduced.

[0032] Please refer to Figure 2 , Figure 2 A schematic diagram of the process of collecting distance data of the current scene provided in an embodiment of the present application.

[0033] like Figure 2 As shown, a control module (such as a controller in an electronic device) controls the LiDAR driver to drive the laser transmitter to generate a laser pulse signal in the form of a dot matrix laser beam, and diffuses the generated laser pulse signal through a pulse diffuser to ensure that the laser pulse can cover a wider area.

[0034] The diffused dot matrix laser will be reflected after contacting the target object. The reflected dot matrix laser will be captured by the laser detector after passing through the lens. By further processing the data received by the laser detector, the distance data between the target object and the LiDAR dot matrix laser transceiver module can be obtained.

[0035] Point cloud data is generated based on the distance data of the three-dimensional points corresponding to the target object. The point cloud data includes information such as the shape, position and distance of the target object.

[0036] The generated power data is finally transmitted back to the control module for subsequent processing.

[0037] This concludes Figure 2 Description of the acquisition process for the mid-range data.

[0038] In this embodiment, the process of collecting color data of the current scene through the RGB band pulse transceiver module may include: The RGB pulse transmitter emits pulses containing the three primary color bands of red, green and blue. After the pulses come into contact with objects in the space, they will reflect light of different intensities in each color band.

[0039] When receiving the reflected light signal, the RGB pulse receiver (such as a photodetector) determines the light intensity of the light signal, detects the light intensity of the reflected light signal in each color frequency band, and determines the color data of the three-dimensional point corresponding to the object in space.

[0040] Furthermore, a point cloud is established through the obtained set of color data to obtain color data corresponding to each three-dimensional point in the current scene.

[0041] Since the pulse emission frequency and dot density of the LiDAR laser transmitter and the RGB pulse transmitter are set to be the same in advance, the initial three-dimensional space model with RGB colors can be determined according to the distance data and color data corresponding to each three-dimensional point in the current scene.

[0042] In this embodiment, after the initial three-dimensional space model with RGB colors is obtained, the RGB data corresponding to each three-dimensional point can be converted into initial HSV data.

[0043] Please refer to Figure 3A as well as Figure 3B , Figure 3A A schematic diagram of the RGB color model provided in the embodiment of the present application, Figure 3B A schematic diagram of the HSV color model provided in an embodiment of the present application.

[0044] like Figure 3A As shown in the figure, the RGB color model is a color representation method based on the three primary colors of red, green, and blue. Various colors can be mixed by adjusting the proportions of these three basic colors.

[0045] like Figure 3B As shown, the HSV color model is based on the color wheel. Hue represents the position of the color in the rainbow, saturation represents the purity or grayscale of the color, and value represents the brightness of the color. This method of describing color is more intuitive.

[0046] In this embodiment, the conversion formula for converting the RGB color model to the HSV color model may include: R'=R / 255 G'=G / 255 B'=B / 255 C max =max(R',G',B') C min =min(R',G',B') Δ=C max -C min tone:

[0047] Saturation:

[0048] Brightness: V=C max At this point, the description of step 101 ends, and step 102 is executed next.

[0049] Step 102: Acquire a two-dimensional image, where the two-dimensional image includes a plurality of pixels, and each pixel corresponds to a reference HSV color.

[0050] In this embodiment, the two-dimensional image may be collected by a physical module deployed in the electronic device, or may be collected by other devices and sent to the electronic device, and this application does not impose any restrictions on this.

[0051] In this embodiment, the acquired two-dimensional image is a colored image, and the two-dimensional image is composed of a plurality of pixels, and each pixel corresponds to a reference HSV color.

[0052] It should be noted that since electronic devices usually record colors in RGB color mode, if each pixel of the acquired two-dimensional image corresponds to an RGB color, the RGB color can be converted into a reference HSV color according to the formula for converting the RGB color into the HSV color in step 101.

[0053] At this point, the description of step 102 ends, and step 103 is executed next.

[0054] Step 103: Select multiple target 3D points from the multiple 3D points, and the difference between the initial HSV color corresponding to each target 3D point and the initial HSV color corresponding to the adjacent 3D point is greater than a first threshold.

[0055] In this embodiment, multiple target three-dimensional points can be selected from the three-dimensional points included in the initial three-dimensional space model obtained in step 101. The target three-dimensional point refers to a three-dimensional point whose initial HSV color corresponding to the point and the initial HSV color corresponding to the adjacent three-dimensional point have a difference greater than a first threshold. In other words, the target three-dimensional point refers to a three-dimensional point in the initial three-dimensional space model where the initial HSV color undergoes a mutation.

[0056] The selection of the target three-dimensional point will be described in detail below and will not be repeated here.

[0057] At this point, the description of step 103 ends, and step 104 is executed next.

[0058] Step 104 , selecting a plurality of target pixels from the plurality of pixels, wherein the difference between the reference HSV color corresponding to each target pixel and the reference HSV color corresponding to an adjacent pixel is greater than a second threshold.

[0059] In this embodiment, multiple target pixel points can be selected from the pixel points included in the two-dimensional image obtained in step 102. The target pixel point refers to a pixel point whose reference HSV color corresponding to the pixel point and the reference HSV color corresponding to the adjacent pixel point have a difference greater than a second threshold. In other words, the target pixel point refers to a pixel point in the two-dimensional image where the reference HSV color undergoes a sudden change.

[0060] As an embodiment, a specific method of selecting multiple target three-dimensional points from multiple three-dimensional points may include: Determine a plurality of reference three-dimensional points from the plurality of three-dimensional points included in the initial three-dimensional space model, wherein a difference between an initial HSV color corresponding to each reference three-dimensional point and an initial HSV color corresponding to an adjacent three-dimensional point is greater than a first threshold; According to a preset alignment accuracy, multiple target 3D points are selected from multiple reference 3D points; Exemplarily, a specific method of selecting a plurality of target pixel points from a plurality of pixel points of a two-dimensional image may include: Determine a plurality of reference pixels from a plurality of pixels included in the two-dimensional image, wherein a difference between a reference HSV color corresponding to each reference pixel and a reference HSV color corresponding to an adjacent pixel is greater than a second threshold; According to a preset alignment accuracy, multiple target pixel points are selected from multiple reference pixel points; The alignment accuracy is used to indicate the number of target 3D points and target pixels.

[0061] In this embodiment, after presetting the first threshold and the second threshold, multiple reference three-dimensional points that satisfy the initial HSV value mutation can be determined from the multiple three-dimensional points included in the initial three-dimensional space model, and multiple reference pixel points that satisfy the reference HSV value mutation can be determined from the multiple pixel points included in the two-dimensional image.

[0062] It is easy to understand that since it is necessary to subsequently align the three-dimensional space model with the two-dimensional image based on the three-dimensional points with sudden changes in HSV values ​​in the initial three-dimensional space model and the pixel points with sudden changes in HSV values ​​in the two-dimensional image, the more three-dimensional points and pixel points involved in the alignment process, the higher the alignment accuracy and the better the alignment effect. However, the participation of too many three-dimensional points and pixel points in the alignment process places extremely high requirements on the computing power and resources of the controller of the electronic device. Therefore, the alignment accuracy can be pre-set according to the computing power of the electronic device controller and the accuracy requirements in actual applications. The alignment accuracy is used to indicate the number of target three-dimensional points and target pixel points participating in the alignment process of the three-dimensional model and the two-dimensional image.

[0063] In this embodiment, the target 3D points and target pixel points can be selected from multiple reference 3D points and multiple reference pixel points at the same interval. The higher the alignment accuracy, the more target 3D points and target pixel points are selected, and the smaller the interval between the selected target 3D points and target pixel points is.

[0064] For example, assuming that the number of reference 3D points and reference pixel points determined is 100, and the preset alignment accuracy is 50, that is, 50 reference 3D points are selected as target 3D points, and 50 reference pixel points are selected as target pixel points. At this time, the selection method can be to select a target 3D point from every other point of the 100 reference 3D points to obtain 50 target 3D points; select a target pixel point from every other point of the 100 reference pixel points to obtain 50 target pixel points. It is easy to understand that the higher the alignment accuracy, the smaller the interval between the selected points; the lower the accuracy, the larger the interval between the selected points.

[0065] In this embodiment, after determining the reference three-dimensional points that satisfy the initial HSV value mutation and the reference pixel points that satisfy the reference HSV value mutation, the number of target three-dimensional points and target pixel points that need to participate in the alignment process can be further determined according to the preset alignment accuracy, and the corresponding number of target three-dimensional points can be obtained from the reference three-dimensional points that satisfy the initial HSV value mutation, and the corresponding number of target pixel points can be obtained from the reference pixel points that satisfy the reference HSV value mutation.

[0066] At this point, the description of step 104 ends, and step 105 is executed next.

[0067] Step 105, aligning the initial 3D space model with the 2D image based on multiple target 3D points and multiple target pixel points to obtain multiple point pairs, each point pair including a 3D point in the initial 3D space model and a pixel point in the 2D image.

[0068] In this embodiment, the initial three-dimensional space model and the two-dimensional image are aligned according to the multiple target three-dimensional points and the multiple target pixel points obtained in step 103 and step 104. After the alignment, multiple point pairs are obtained, and each point pair includes a three-dimensional point in the initial three-dimensional space model and a pixel point in the two-dimensional image, indicating that the three-dimensional point in the initial three-dimensional space model and the pixel point in the two-dimensional image actually correspond to the same point in the current scene.

[0069] As an embodiment, a method for aligning an initial three-dimensional space model with a two-dimensional image based on a plurality of target three-dimensional points and a plurality of target pixel points may include: For each target 3D point, determine the target pixel point corresponding to the target 3D point according to the initial HSV color corresponding to the target 3D point, the initial HSV colors corresponding to the 3D points adjacent to the target 3D point, and the reference HSV colors corresponding to each target pixel point; According to the correspondence between each target 3D point and the target pixel point, the initial 3D space model is aligned with the 2D image.

[0070] In this embodiment, the target pixel point corresponding to the target 3D point can be determined based on the initial HSV color corresponding to the target 3D point, the initial HSV colors corresponding to the 3D points adjacent to the target 3D point, and the reference HSV colors corresponding to each target pixel point.

[0071] After the correspondence between each target three-dimensional point and the target pixel point is determined, the initial three-dimensional space model and the two-dimensional image can be aligned according to the correspondence between the multiple target three-dimensional points and the target pixel points.

[0072] As an embodiment, for each target 3D point, according to the initial HSV color corresponding to the target 3D point, the initial HSV colors corresponding to the 3D points adjacent to the target 3D point, and the reference HSV colors corresponding to each target pixel point, a specific method for determining the target pixel point corresponding to the target 3D point may include: For each target 3D point, if it is determined that the difference between the initial HSV color corresponding to the target 3D point and the reference HSV color corresponding to any target pixel point is less than the third threshold, and the difference between the initial HSV color difference corresponding to the target 3D point and the reference HSV color difference corresponding to the target pixel point is less than the fourth threshold, then the target pixel point is determined to be the target pixel point corresponding to the target 3D point; Among them, the initial HSV color difference refers to the difference between the initial HSV color corresponding to the target 3D point and the initial HSV color corresponding to the adjacent 3D point, and the reference HSV color difference refers to the difference between the reference HSV color corresponding to the target pixel point and the reference HSV color corresponding to the adjacent pixel point.

[0073] In this embodiment, for each target three-dimensional point, the initial HSV color corresponding to the target three-dimensional point can be determined first, and target pixel points whose difference between the reference HSV color and the initial HSV color corresponding to the target three-dimensional point is less than a third threshold are selected from all target pixel points. The reference HSV colors corresponding to these target pixel points are similar to the initial HSV colors corresponding to the target three-dimensional point, indicating that these target pixel points may be the target pixel points corresponding to the target three-dimensional point.

[0074] Furthermore, the difference between the initial HSV color corresponding to the target 3D point and the initial HSV color corresponding to the adjacent 3D point is detected, and the difference is recorded as the initial HSV color difference. At the same time, the difference between the reference HSV color corresponding to each target pixel point close to the initial HSV color corresponding to the target 3D point and the reference HSV color corresponding to the adjacent pixel point is detected, and the difference is recorded as the reference HSV color difference.

[0075] It is easy to understand that if the difference between the initial HSV color difference and the reference HSV color difference is less than the fourth threshold, that is, the difference between the initial HSV color difference and the reference HSV color difference is very small, it indicates that not only the HSV color of the target pixel is similar to that of the target three-dimensional point, but also the HSV color difference between it and the adjacent pixel is similar to the color difference between the target three-dimensional point and the adjacent three-dimensional point, indicating that the target pixel is the target pixel corresponding to the target three-dimensional point.

[0076] After determining the correspondence between each target three-dimensional point and the target pixel point according to the above method, the initial three-dimensional space model and the two-dimensional image are aligned according to the correspondence between each target three-dimensional point and the target pixel point, so as to obtain the correspondence between each three-dimensional point in the initial three-dimensional space model and the pixel point in the two-dimensional image, that is, to obtain multiple point pairs, each point pair including a three-dimensional point in the three-dimensional space model and a pixel point in the two-dimensional image.

[0077] At this point, the description of step 105 ends, and step 106 is executed next.

[0078] Step 106 : for each point pair in the plurality of point pairs, determine a target HSV color corresponding to a three-dimensional point in the point pair based on a reference HSV color corresponding to a pixel point in the point pair.

[0079] In this embodiment, for each point pair obtained in step 105, the target HSV color corresponding to the three-dimensional point in the point pair can be determined according to the reference HSV color corresponding to the pixel point in the point pair.

[0080] As an embodiment, the point pair includes a mutation point pair and a non-mutation point pair, and the mutation point pair refers to a point pair consisting of a target three-dimensional point and a target pixel point; for each point pair, a method for determining a target HSV color corresponding to a three-dimensional point in the point pair based on a reference HSV color corresponding to a pixel point in the point pair may include: For each mutation point pair, the reference HSV color corresponding to the pixel point in the mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the mutation point pair; For each non-mutation point pair, the reference HSV color corresponding to the pixel point in the non-mutation point pair or the average value of the reference HSV color corresponding to the pixel point in the non-mutation point pair and the initial HSV color of the three-dimensional point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair.

[0081] In this embodiment, the determined multiple point pairs are divided into mutation point pairs and non-mutation point pairs, wherein the mutation point pairs refer to point pairs consisting of target three-dimensional points and target pixel points, and the non-mutation point pairs refer to point pairs consisting of non-target three-dimensional points and non-target pixel points.

[0082] For different types of point pairs, the methods for determining the target HSV color corresponding to the three-dimensional point in the point pair are also different.

[0083] Specifically, since the mutation point pairs are obtained by screening in step 105 during alignment, the alignment accuracy is relatively high. Therefore, for the mutation point pairs, the reference HSV color corresponding to the target pixel point in the mutation point pair can be directly used as the target HSV color corresponding to the target three-dimensional point in the point pair.

[0084] For a non-mutation point pair, the reference HSV color corresponding to the pixel point in the non-mutation point pair or the average value of the reference HSV color corresponding to the pixel point in the non-mutation point pair and the initial HSV color of the three-dimensional point in the non-mutation point pair can be used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair.

[0085] As an embodiment, for each non-mutation point pair, a hue difference between a pixel point in the non-mutation point pair and a three-dimensional point is determined; If the hue difference value is less than or equal to the preset hue difference threshold, the reference HSV color corresponding to the pixel point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair; If the hue difference is greater than the preset hue difference threshold, the average value of the reference HSV color corresponding to the pixel point in the non-mutation point pair and the initial HSV color of the three-dimensional point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair.

[0086] In this embodiment, for each non-mutation point pair, the hue difference between the pixel point and the three-dimensional point in the non-mutation point pair can be determined first. If the hue difference is less than or equal to the preset hue difference threshold, it indicates that the color difference between the pixel point and the three-dimensional point in the non-mutation point pair is not much. At this time, the reference HSV color corresponding to the pixel point can be directly used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair.

[0087] If the determined hue difference value is greater than the preset hue difference threshold, it indicates that the color difference between the pixel point and the three-dimensional point in the non-mutation point pair is large. At this time, the average value of the reference HSV color corresponding to the pixel point in the non-mutation point pair and the initial HSV color of the three-dimensional point in the non-mutation point pair can be used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair to balance the HSV color.

[0088] At this point, the description of step 106 ends, and step 107 is executed next.

[0089] Step 107: Generate a target three-dimensional space model based on the target HSV colors corresponding to the three-dimensional points included in each point pair.

[0090] In this embodiment, after determining the target HSV color corresponding to each 3D point, a target 3D space model is generated according to the target HSV color corresponding to each 3D point, that is, the fusion of the 3D video is completed, and a target 3D space model with more accurate color is obtained.

[0091] It should be noted that, since the color model commonly used in electronic devices is the RGB color model, the target HSV color can be converted into RGB color and then the target three-dimensional space model is generated to obtain a three-dimensional space model carrying RGB color that is more suitable for processing by electronic devices.

[0092] As an embodiment, the conversion formula for converting HSV color to RGB color may include: C=V×S X = C × (1-|(H / 60°) mod 2-1|) m=VC

[0093] (R,G,B)=((R'+m)×255,(G'+m)×255,(B'+m)×255) This concludes the description of step 107.

[0094] This concludes Figure 1 Description of the process of the three-dimensional video fusion method.

[0095] This application aligns the initial three-dimensional space model with the two-dimensional image based on multiple target three-dimensional points selected from the initial three-dimensional space model and multiple target pixel points selected from the two-dimensional image, and obtains multiple point pairs, wherein the target three-dimensional points and target pixel points are points where the HSV color mutates, and each point pair includes a three-dimensional point in the initial three-dimensional space model and a pixel point in the two-dimensional image. Further, for each point pair, the target HSV color corresponding to the three-dimensional point is determined based on the reference HSV color corresponding to the pixel point in the point pair, and finally the target three-dimensional space model is generated according to the target HSV color corresponding to all three-dimensional points, thereby completing the fusion of three-dimensional video. The initial three-dimensional space model and the two-dimensional image are aligned by aligning the initial three-dimensional space model and the two-dimensional image at the points where the HSV color mutates, thereby improving the alignment accuracy, and the target HSV color corresponding to the three-dimensional point is determined by the reference HSV color corresponding to the pixel point in each point pair, so that the color of the target three-dimensional space model finally generated is more accurate.

[0096] Furthermore, the current method of implementing 3D video fusion technology requires real-time image acquisition, splicing, point alignment, and color coverage operations, and the execution frequency of the four operations is 24HZ (the frequency at which the human eye produces continuous visual effects). This application divides video fusion into two steps. Since a 3D space model with color in the space is obtained, when an object in the space changes, only the part where the HSV changes can be updated, reducing the update frequency. Only the color value coverage needs to maintain a frequency of 24HZ, thereby reducing the requirements for the controller's computing performance.

[0097] At the same time, the color value acquisition process in the scheme proposed in this application is basically a comparison and averaging operation, without the need for complex algorithm calculations, and the calculation complexity is lower. In addition, this scheme distributes the work of collecting color attributes to the LiDAR module by preliminarily collecting color attributes and subsequently covering the color of the video screen, further reducing the computing performance requirements for each module.

[0098] Please refer to Figure 4 , Figure 4 It is a schematic structural diagram of an electronic device proposed in an embodiment of the present application. At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and of course may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a terminal interaction device at the logical level. Of course, in addition to the software implementation method, this application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0099] Please refer to Figure 5 , Figure 5 is a structural diagram of a three-dimensional video fusion device proposed in an embodiment of the present application. Figure 5 As shown, the three-dimensional video fusion device may include an acquisition unit 501, a selection unit 502, an alignment unit 503 and a determination unit 504. Specifically, the device includes: An acquisition unit 501 is used to acquire an initial three-dimensional space model, where the initial three-dimensional space model includes a plurality of three-dimensional points, each of which corresponds to an initial HSV color; Obtain a two-dimensional image, the two-dimensional image includes multiple pixels, and each pixel corresponds to a reference HSV color; A selection unit 502 is used to select a plurality of target 3D points from a plurality of 3D points, wherein a difference between an initial HSV color corresponding to each target 3D point and an initial HSV color corresponding to an adjacent 3D point is greater than a first threshold; Selecting multiple target pixels from the multiple pixels, the difference between the reference HSV color corresponding to each target pixel and the reference HSV color corresponding to the adjacent pixel being greater than a second threshold; An alignment unit 503 is used to align the initial 3D space model with the 2D image based on the multiple target 3D points and the multiple target pixel points to obtain multiple point pairs, each point pair including a 3D point in the initial 3D space model and a pixel point in the 2D image; A determination unit 504 is configured to determine, for each point pair in the plurality of point pairs, a target HSV color corresponding to a three-dimensional point in the point pair based on a reference HSV color corresponding to a pixel point in the point pair; Generate a target 3D space model based on the target HSV colors corresponding to all 3D points.

[0100] Optionally, the acquiring unit 501 is specifically configured to: Collecting distance data of the current scene through a laser transmitter, the distance data refers to the distance between the laser transmitter and a three-dimensional point corresponding to a reference object included in the current scene; The color reflection data of the current scene is collected through the pulse transmitter. The color reflection data refers to the color data obtained after the pulse emitted by the pulse transmitter is reflected by the three-dimensional point corresponding to the reference object; the laser transmitter and the pulse transmitter are configured with the same emission frequency and dot matrix density; Determine an initial three-dimensional space model based on the distance data and the color reflection data; And / or, the selection unit 502 is specifically used for: Determine a plurality of reference three-dimensional points from the plurality of three-dimensional points included in the initial three-dimensional space model, wherein a difference between an initial HSV color corresponding to each reference three-dimensional point and an initial HSV color corresponding to an adjacent three-dimensional point is greater than a first threshold; According to a preset alignment accuracy, multiple target 3D points are selected from multiple reference 3D points; Select multiple target pixel points from multiple pixel points of a two-dimensional image, including: Determine a plurality of reference pixels from a plurality of pixels included in the two-dimensional image, wherein a difference between a reference HSV color corresponding to each reference pixel and a reference HSV color corresponding to an adjacent pixel is greater than a second threshold; According to a preset alignment accuracy, multiple target pixel points are selected from multiple reference pixel points; Among them, the alignment accuracy is used to indicate the number of target 3D points and target pixel points; And / or, the alignment unit 503 is specifically used for: For each target 3D point, determine the target pixel point corresponding to the target 3D point according to the initial HSV color corresponding to the target 3D point, the initial HSV colors corresponding to the 3D points adjacent to the target 3D point, and the reference HSV colors corresponding to each target pixel point; According to the correspondence between each target 3D point and the target pixel point, the initial 3D space model is aligned with the 2D image; And / or, the alignment unit 503 is specifically used for: For each target 3D point, if it is determined that the difference between the initial HSV color corresponding to the target 3D point and the reference HSV color corresponding to any target pixel point is less than the third threshold, and the difference between the initial HSV color difference corresponding to the target 3D point and the reference HSV color difference corresponding to the target pixel point is less than the fourth threshold, then the target pixel point is determined to be the target pixel point corresponding to the target 3D point; Among them, the initial HSV color difference refers to the difference between the initial HSV color corresponding to the target 3D point and the initial HSV color corresponding to the adjacent 3D point, and the reference HSV color difference refers to the difference between the reference HSV color corresponding to the target pixel and the reference HSV color corresponding to the adjacent pixel; And / or, the point pair includes a mutation point pair and a non-mutation point pair, and the mutation point pair refers to a point pair consisting of a target three-dimensional point and a target pixel point; the determination unit 504 is specifically used for: For each mutation point pair, the reference HSV color corresponding to the pixel point in the mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the mutation point pair; For each non-mutation point pair, the reference HSV color corresponding to the pixel point in the non-mutation point pair or the average value of the reference HSV color corresponding to the pixel point in the non-mutation point pair and the initial HSV color of the three-dimensional point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair; And / or, the determining unit 504 is specifically configured to: For each non-mutation point pair, determining the hue difference between the pixel point in the non-mutation point pair and the three-dimensional point; If the hue difference value is less than or equal to the preset hue difference threshold, the reference HSV color corresponding to the pixel point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair; If the hue difference is greater than the preset hue difference threshold, the average value of the reference HSV color corresponding to the pixel point in the non-mutation point pair and the initial HSV color of the three-dimensional point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair.

[0101] So far, completed Figure 5 Description of the three-dimensional video fusion device.

[0102] Correspondingly, in this embodiment, the embodiment of the present application also provides a computer-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed, the method disclosed in the above example of the present application can be implemented.

[0103] Exemplarily, the computer-readable storage medium may be any electronic, magnetic, optical or other physical storage device that may contain or store information, such as executable instructions, data, etc. For example, the computer-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof.

[0104] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of protection of the present application.

Claims

1. A three-dimensional video fusion method, characterized in that: The method includes: Obtain an initial three-dimensional space model, the initial three-dimensional space model includes multiple three-dimensional points, each three-dimensional point corresponds to an initial HSV color; Obtain a two-dimensional image, the two-dimensional image includes multiple pixels, and each pixel corresponds to a reference HSV color; Selecting a plurality of target 3D points from the plurality of 3D points, wherein a difference between an initial HSV color corresponding to each target 3D point and an initial HSV color corresponding to an adjacent 3D point is greater than a first threshold; Selecting multiple target pixel points from the multiple pixel points, the difference between the reference HSV color corresponding to each target pixel point and the reference HSV color corresponding to the adjacent pixel point is greater than a second threshold; Aligning the initial three-dimensional space model with the two-dimensional image based on the multiple target three-dimensional points and the multiple target pixel points to obtain a plurality of point pairs, each point pair including a three-dimensional point in the initial three-dimensional space model and a pixel point in the two-dimensional image; For each point pair in the plurality of point pairs, determining a target HSV color corresponding to a three-dimensional point in the point pair based on a reference HSV color corresponding to a pixel point in the point pair; A target three-dimensional space model is generated based on the target HSV colors corresponding to the three-dimensional points included in each point pair.

2. The method according to claim 1, characterized in that The obtaining of the initial three-dimensional space model comprises: Collecting distance data of the current scene through a laser transmitter, wherein the distance data refers to the distance between the laser transmitter and a three-dimensional point corresponding to a reference object included in the current scene; The color reflection data of the current scene is collected by a pulse transmitter, wherein the color reflection data refers to the color data obtained after the pulse emitted by the pulse transmitter is reflected by the three-dimensional point corresponding to the reference object; the laser transmitter and the pulse transmitter are configured with the same emission frequency and dot matrix density; The initial three-dimensional space model is determined according to the distance data and the color reflection data.

3. The method according to claim 1, characterized in that: The selecting a plurality of target three-dimensional points from the plurality of three-dimensional points comprises: Determine a plurality of reference three-dimensional points from the plurality of three-dimensional points included in the initial three-dimensional space model, wherein a difference between an initial HSV color corresponding to each reference three-dimensional point and an initial HSV color corresponding to an adjacent three-dimensional point is greater than a first threshold; According to a preset alignment accuracy, multiple target 3D points are selected from multiple reference 3D points; The selecting a plurality of target pixel points from a plurality of pixel points of the two-dimensional image comprises: Determine a plurality of reference pixels from a plurality of pixels included in the two-dimensional image, wherein a difference between a reference HSV color corresponding to each reference pixel and a reference HSV color corresponding to an adjacent pixel is greater than a second threshold; According to a preset alignment accuracy, multiple target pixel points are selected from multiple reference pixel points; The alignment accuracy is used to indicate the number of the target three-dimensional points and the target pixel points.

4. The method according to claim 1, characterized in that: The aligning the initial three-dimensional space model with the two-dimensional image based on the multiple target three-dimensional points and the multiple target pixel points comprises: For each target 3D point, determine the target pixel point corresponding to the target 3D point according to the initial HSV color corresponding to the target 3D point, the initial HSV colors corresponding to the 3D points adjacent to the target 3D point, and the reference HSV colors corresponding to each target pixel point; The initial three-dimensional space model is aligned with the two-dimensional image according to the correspondence between each target three-dimensional point and the target pixel point.

5. The method according to claim 4, characterized in that The method of determining, for each target 3D point, a target pixel point corresponding to the target 3D point according to an initial HSV color corresponding to the target 3D point, initial HSV colors corresponding to 3D points adjacent to the target 3D point, and reference HSV colors corresponding to each target pixel point, includes: For each target 3D point, if it is determined that the difference between the initial HSV color corresponding to the target 3D point and the reference HSV color corresponding to any target pixel point is less than the third threshold, and the difference between the initial HSV color difference corresponding to the target 3D point and the reference HSV color difference corresponding to the target pixel point is less than the fourth threshold, then the target pixel point is determined to be the target pixel point corresponding to the target 3D point; Among them, the initial HSV color difference refers to the difference between the initial HSV color corresponding to the target 3D point and the initial HSV color corresponding to the adjacent 3D point, and the reference HSV color difference refers to the difference between the reference HSV color corresponding to the target pixel point and the reference HSV color corresponding to the adjacent pixel point.

6. The method according to claim 1, characterized in that The point pairs include mutation point pairs and non-mutation point pairs, and the mutation point pairs refer to point pairs consisting of the target three-dimensional point and the target pixel point; for each point pair in the plurality of point pairs, determining the target HSV color corresponding to the three-dimensional point in the point pair based on the reference HSV color corresponding to the pixel point in the point pair includes: For each mutation point pair, the reference HSV color corresponding to the pixel point in the mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the mutation point pair; For each non-mutation point pair, the reference HSV color corresponding to the pixel point in the non-mutation point pair or the average value of the reference HSV color corresponding to the pixel point in the non-mutation point pair and the initial HSV color of the three-dimensional point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair.

7. The method according to claim 6, characterized in that The method of taking, for each non-mutation point pair, a reference HSV color corresponding to a pixel point in the non-mutation point pair or an average value of a reference HSV color corresponding to a pixel point in the non-mutation point pair and an initial HSV color of a three-dimensional point in the non-mutation point pair as a target HSV color corresponding to the three-dimensional point in the non-mutation point pair, comprises: For each non-mutation point pair, determine the hue difference between the pixel point in the non-mutation point pair and the three-dimensional point; If the hue difference value is less than or equal to the preset hue difference threshold, the reference HSV color corresponding to the pixel point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair; If the hue difference value is greater than the preset hue difference threshold, the average value of the reference HSV color corresponding to the pixel point in the non-mutation point pair and the initial HSV color of the three-dimensional point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair.

8. A three-dimensional video fusion device, characterized in that:The device includes: An acquisition unit, used for acquiring an initial three-dimensional space model, the initial three-dimensional space model includes a plurality of three-dimensional points, each of which corresponds to an initial HSV color; Obtain a two-dimensional image, the two-dimensional image includes multiple pixels, and each pixel corresponds to a reference HSV color; A selection unit, configured to select a plurality of target three-dimensional points from the plurality of three-dimensional points, wherein a difference between an initial HSV color corresponding to each target three-dimensional point and an initial HSV color corresponding to an adjacent three-dimensional point is greater than a first threshold; Selecting multiple target pixel points from the multiple pixel points, the difference between the reference HSV color corresponding to each target pixel point and the reference HSV color corresponding to the adjacent pixel point is greater than a second threshold; an alignment unit, configured to align the initial three-dimensional space model with the two-dimensional image based on the multiple target three-dimensional points and the multiple target pixel points to obtain a plurality of point pairs, each point pair including a three-dimensional point in the initial three-dimensional space model and a pixel point in the two-dimensional image; a determining unit, configured to determine, for each point pair in the plurality of point pairs, a target HSV color corresponding to a three-dimensional point in the point pair based on a reference HSV color corresponding to a pixel point in the point pair; A target three-dimensional space model is generated based on the target HSV colors corresponding to the three-dimensional points included in each point pair.

9. The device according to claim 8, characterized in that The acquisition unit is specifically used for: Collecting distance data of the current scene through a laser transmitter, wherein the distance data refers to the distance between the laser transmitter and a three-dimensional point corresponding to a reference object included in the current scene; The color reflection data of the current scene is collected by a pulse transmitter, wherein the color reflection data refers to the color data obtained after the pulse emitted by the pulse transmitter is reflected by the three-dimensional point corresponding to the reference object; the laser transmitter and the pulse transmitter are configured with the same emission frequency and dot matrix density; Determine the initial three-dimensional space model according to the distance data and the color reflection data; And / or, the selection unit is specifically used for: Determine a plurality of reference three-dimensional points from the plurality of three-dimensional points included in the initial three-dimensional space model, wherein a difference between an initial HSV color corresponding to each reference three-dimensional point and an initial HSV color corresponding to an adjacent three-dimensional point is greater than a first threshold; According to a preset alignment accuracy, multiple target 3D points are selected from multiple reference 3D points; The selecting a plurality of target pixel points from a plurality of pixel points of the two-dimensional image comprises: Determine a plurality of reference pixels from a plurality of pixels included in the two-dimensional image, wherein a difference between a reference HSV color corresponding to each reference pixel and a reference HSV color corresponding to an adjacent pixel is greater than a second threshold; According to a preset alignment accuracy, multiple target pixel points are selected from multiple reference pixel points; Wherein, the alignment accuracy is used to indicate the number of the target three-dimensional points and the target pixel points; And / or, the alignment unit is specifically used for: For each target 3D point, determine the target pixel point corresponding to the target 3D point according to the initial HSV color corresponding to the target 3D point, the initial HSV colors corresponding to the 3D points adjacent to the target 3D point, and the reference HSV colors corresponding to each target pixel point; Aligning the initial three-dimensional space model with the two-dimensional image according to a correspondence between each target three-dimensional point and a target pixel point; And / or, the alignment unit is specifically used for: For each target 3D point, if it is determined that the difference between the initial HSV color corresponding to the target 3D point and the reference HSV color corresponding to any target pixel point is less than the third threshold, and the difference between the initial HSV color difference corresponding to the target 3D point and the reference HSV color difference corresponding to the target pixel point is less than the fourth threshold, then the target pixel point is determined to be the target pixel point corresponding to the target 3D point; The initial HSV color difference refers to the difference between the initial HSV color corresponding to the target 3D point and the initial HSV color corresponding to the adjacent 3D point, and the reference HSV color difference refers to the difference between the reference HSV color corresponding to the target pixel and the reference HSV color corresponding to the adjacent pixel; And / or, the point pair includes a mutation point pair and a non-mutation point pair, and the mutation point pair refers to a point pair consisting of the target three-dimensional point and the target pixel point; and the determining unit is specifically used for: For each mutation point pair, the reference HSV color corresponding to the pixel point in the mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the mutation point pair; For each non-mutation point pair, the reference HSV color corresponding to the pixel point in the non-mutation point pair or the average value of the reference HSV color corresponding to the pixel point in the non-mutation point pair and the initial HSV color of the three-dimensional point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair; And / or, the determining unit is specifically configured to: For each non-mutation point pair, determine the hue difference between the pixel point in the non-mutation point pair and the three-dimensional point; If the hue difference value is less than or equal to the preset hue difference threshold, the reference HSV color corresponding to the pixel point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair; If the hue difference value is greater than the preset hue difference threshold, the average value of the reference HSV color corresponding to the pixel point in the non-mutation point pair and the initial HSV color of the three-dimensional point in the non-mutation point pair is used as the target HSV color corresponding to the three-dimensional point in the non-mutation point pair.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Face feature point real-time detection method and detection system based on three-dimensional reconstruction

    CN109766866A

  • Face reconstruction method and equipment based on key point recognition

    CN115239885A

  • Point cloud registration method, system and device based on multi-source fusion and storage medium

    CN116152310A

  • Image processing method and device, equipment and storage medium

    CN116977544A

  • Image conversion method, device, equipment, medium and program product

    CN117873415A