Texture map generation method, depth camera, electronic device and storage medium
By generating a texture map including multiple scattered spots, the problem of inaccurate measurements when measuring complex target objects is solved, achieving higher measurement accuracy.
Patent Information
- Application Number
- CN202211023407.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-24
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2042-08-24
AI Technical Summary
Existing depth cameras are difficult to cover more details of the target object when measuring complex target objects, resulting in inaccurate measurements.
A texture map generation method is adopted to generate a texture map including multiple scattered spots by determining the projection area and obtaining the projection parameters. The number, size and shape type of scattered spots are adjusted according to the shape of the target object and the measurement requirements.
Through more detailed texture map projection, the shape of the target object can be better adapted to improve the accuracy of measurement.
Smart Images

Figure CN115420210B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of depth measurement technology, and in particular to a texture map generation method, a depth camera, an electronic device and a storage medium. Background Art
[0002] Depth cameras are widely used in three-dimensional imaging technology. Through depth cameras, not only can the target object be imaged in a plane, but also the depth information of the target object can be obtained and the size of the target object can be measured. Especially in the industrial field, the measurement of target objects usually faces complex application environments. The properties of the target objects to be measured are diverse, such as shape, location, etc., and the measurement accuracy requirements in different areas are also different. At present, the patterns projected by the depth camera are difficult to cover more details of the target object to be measured, which is prone to inaccurate measurements. Summary of the invention
[0003] One object of the present application is to provide a method for generating a texture map, a depth camera, an electronic device and a storage medium, which can cover more details of a target object to be measured and improve the accuracy of measurement.
[0004] According to one aspect of the present application, the present application provides a method for generating a texture map, the texture map being used for a depth camera, the texture map comprising a plurality of scattered spots, and the method for generating the texture map comprising:
[0005] Determining a projection area of the texture map;
[0006] Acquire projection parameters of the texture image, wherein the projection parameters include the number of the scattered spots, the size of a single scattered spot, and the shape type of the scattered spots;
[0007] In the projection area, a texture map of the scattered spots is generated according to the projection parameters.
[0008] In one aspect, the shape type of the scattered speckles includes one of Gaussian scattered speckles, elliptical scattered speckles, triangular scattered speckles and polygonal scattered speckles.
[0009] In one aspect, N is the number of the scattered spots, i is the row coordinate of the projection area, j is the column coordinate of the projection area, I0 is the initial light intensity, R is the size of the scattered spots, and x k ,y k is the position coordinate of the kth scattered spot, 1≤k≤N, N is a positive integer, I(i, j) is the texture intensity distribution of the scattered spot, then:
[0010]
[0011] In one aspect, when the shape type of the scattered spots is the elliptical scattered spots, it satisfies:
[0012] And θ = arctan[(jy k ) / (ix k )]
[0013] Wherein, a is the length of the major axis of the elliptical scattered spots, and b is the length of the minor axis of the elliptical scattered spots.
[0014] In one aspect, the projection area includes one of a triangular area, a circular area and a rectangular area.
[0015] In one aspect, the projection area is the rectangular area, the row coordinate range of the rectangular area is defined as x1 and x2, the column coordinate range of the rectangular area is defined as y1 and y2, i is the row coordinate of the projection area, j is the column coordinate of the projection area, then: x1≤i≤x2, y1≤j≤y2.
[0016] In one aspect, the projection area is the triangular area, the three vertices defining the triangular area are A, B, and C respectively, and any point in the triangular area is P, then:
[0017] Among them, 0≤u≤1, 0≤v≤1, 0≤u+v≤1.
[0018] In one aspect, the projection area is the circular area, the radius of the circular area is defined as r, and the coordinates of the center of the circular area are (xc, yc), then:
[0019]
[0020] In one aspect, before the step of determining the projection area of the texture map, the method further comprises:
[0021] A projection pattern is obtained, and the projection pattern is split into projection areas of a texture map of at least one shape.
[0022] In addition, in order to solve the above problems, the present application also provides a depth camera, the depth camera includes a lens assembly, the lens assembly includes a lens barrel and a light source, the light source is arranged in the lens barrel, the lens assembly also includes a texture plate, the texture plate is arranged in the lens barrel and is located in the light emitting direction of the light source, the surface of the texture plate is provided with a texture map, and the texture map is generated by the texture map generation method as described above;
[0023] The lens assembly also includes a circuit detector. A transparent conductive film is also provided on the surface of the texture plate. The transparent conductive film is connected to the circuit detector. The circuit detector is used to detect the resistance change of the transparent conductive film.
[0024] In addition, in order to solve the above problems, the present application also provides an electronic device, including:
[0025] a memory storing computer-readable instructions;
[0026] A processor, wherein the processor reads computer-readable instructions stored in a memory to execute any one of the texture map generation methods described above.
[0027] In addition, in order to solve the above problems, the present application also provides a storage medium on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes any of the texture map generation methods described above.
[0028] In the technical solution of the present application, a target object to be measured is measured by a texture map, and the texture map includes a plurality of scattered spots, which can cover more details of the target object. When generating a texture map, the projection parameters of the texture map are predetermined, and the projection area of the texture map is determined. A texture position distribution map of the scattered spots is generated by combining the position of the projection area and the projection parameters of the texture map. By projecting the texture position distribution map of the scattered spots onto the target object to be measured, it can better conform to the shape of the target object and better adapt the measurement to the shape of the target object, thereby improving the accuracy of the measurement.
[0029] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The above and other objects, features and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.
[0031] Figure 1 It is a flowchart of an embodiment of a method for generating a texture map in the present application.
[0032] Figure 2 This application Figure 1 Schematic diagram of the Gaussian scattered spots in the texture image.
[0033] Figure 3 This application Figure 1 Schematic diagram of the elliptical scattered spots in the texture image.
[0034] Figure 4 This application Figure 1Schematic diagram of the triangular scattered spots in the texture map.
[0035] Figure 5 This application Figure 1 Schematic diagram of the polygonal scattered spots in the texture map.
[0036] Figure 6 This application Figure 1 Schematic diagram of the rectangular projection area of the texture map.
[0037] Figure 7 This application Figure 1 Schematic diagram of the triangle projection area of the texture map.
[0038] Figure 8 This application Figure 1 Schematic diagram of the circular projection area of the texture map.
[0039] Fig. 9 It is a flowchart of another embodiment of the method for generating a texture map in the present application.
[0040] Fig.10 This application Fig. 9 A schematic diagram of an embodiment of a projected pattern.
[0041] Fig.11 This application Fig. 9 A schematic diagram of another embodiment of the projected pattern.
[0042] Fig.12 This application Fig. 9 Schematic diagram of the splitting of the projected pattern.
[0043] Fig.13 It is a structural schematic diagram of the lens assembly in this application.
[0044] Fig.14 It is a schematic diagram of the structure of the electronic device in this application.
[0045] The following are the descriptions of the reference numerals:
[0046] 10. External equipment; 20. Electronic equipment;
[0047] 210, processing unit; 220, storage unit; 2201, RAM; 2202, cache; 2203, ROM; 2204, utility; 2205, program module; 230, bus; 240, display; 250, I / O interface; 260, network adapter; 301, light source; 302, texture board; 303, projection lens. DETAILED DESCRIPTION
[0048] Although the present application can be easily embodied in different forms of embodiments, only some of the specific embodiments are shown in the drawings and described in detail in this specification. It should be understood that this description should be regarded as an exemplary illustration of the principles of the present application and is not intended to limit the present application to that described herein.
[0049] Thus, a feature indicated in this specification will be used to illustrate one of the features of an embodiment of the present application, rather than implying that each embodiment of the present application must have the described feature. In addition, it should be noted that this specification describes many features. Although some features can be combined together to illustrate possible system designs, these features can also be used in other combinations that are not explicitly described. Thus, unless otherwise stated, the described combinations are not intended to be limiting.
[0050] In the embodiments shown in the drawings, the indications of directions (such as up, down, left, right, front and back) used to explain the structure and movement of various elements of the present application are not absolute but relative. These descriptions are appropriate when these elements are in the positions shown in the drawings. If the description of the positions of these elements changes, the indications of these directions also change accordingly.
[0051] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present application will be more comprehensive and complete and the concepts of the example embodiments will be fully conveyed to those skilled in the art. The accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0052] See also Figure 1 As shown, the present application provides a method for generating a texture map, and the texture map is used for a depth camera, which is also called a TOF (Time of flight) camera. The depth camera uses the time difference between the emitted light and the received light to calculate the distance, thereby constructing the three-dimensional shape of the target object and completing the size measurement of the target object. The texture map can be set on the light projection path of the depth camera, so that the emitted light is the pattern of the texture map. The texture map includes a plurality of scattered spots, and the scattered spots represent the positions where the light is irradiated. The density of the scattered spots at each position in the texture map can be the same or different. Through different density distributions, the structure of the target object can be more targeted to ensure the accuracy of the measured size of the target object.
[0053] The texture map generation method includes:
[0054] Step S10, determine the projection area of the texture map; this projection area is the area that can be covered by the light of the depth camera, and the target object is also in the projection area, so that the texture map can cover the target object. By determining the projection area of the texture map, the marginal position of the projection area is mastered, which is convenient for calculating the position distribution of scattered spots in the corresponding projection area position.
[0055] Step S20, obtaining projection parameters of the texture map, wherein the projection parameters include the number of scattered spots, the size of a single scattered spot, and the shape type of the scattered spots; these projection parameters are predetermined, that is, the projection parameters are data formed according to the target object to be measured, and are data associated with the target object to be measured. That is, when measuring different target objects, the projection parameters of the texture map are also different. The projection parameters change with the change of the target object.
[0056] For example, after the target object is determined, according to the shape of the target object and the purpose of measurement, it is predetermined how many scattered spots need to be projected, what the size of the scattered spots is, what shape of scattered spots are required, etc. to complete the accurate measurement of the target object. By determining these parameters, the projection parameters of the texture map are determined. That is, the number of scattered spots, the size of a single scattered spot, and the shape type of the scattered spots are determined.
[0057] Step S30, generating a texture position distribution map of scattered spots in the projection area according to the projection parameters. The texture position distribution map of scattered spots, referred to as texture map, is calculated based on the position of the projection area, the number of scattered spots, the size of a single scattered spot and the shape type of the scattered spots.
[0058] In the technical solution of this embodiment, the target object to be measured is measured by a texture map, and the texture map includes a plurality of scattered spots, which can cover more details of the target object. When generating the texture map, the projection parameters of the texture map are predetermined, and the projection area of the texture map is determined. The texture position distribution map of the scattered spots is calculated and generated in combination with the position of the projection area and the projection parameters of the texture map. By projecting the texture position distribution map of the scattered spots onto the target object to be measured, it can better conform to the shape of the target object, and better adapt to the shape of the target object for measurement, thereby improving the accuracy of the measurement.
[0059] See also Figures 2 to 5 As shown, in order to improve the measurement accuracy, the shape type of the scattered speckle includes one of Gaussian scattered speckle, elliptical scattered speckle, triangular scattered speckle and polygonal scattered speckle.
[0060] Among them, the light intensity shape of the Gaussian scattered spot is Gaussian distribution, that is, the brightness of the scattered spot is the highest at the center, and the brightness gradually decreases from the center to the edge. The shape of the elliptical scattered spot is an ellipse, and the shape of the triangular scattered spot is a triangle. The shape of the polygonal scattered spot is a polygon, and the number of sides of the polygon is greater than 3. For example, the polygon can be a quadrilateral, a pentagon or a hexagon, etc. The shape type of the scattered spot can be selected as needed.
[0061] In order to accurately obtain the position distribution of scattered spots, N is the number of scattered spots, i is the row coordinate of the projection area, j is the column coordinate of the projection area, I0 is the initial light intensity, R is the size of the scattered spots, xk, yk are the position coordinates of the kth scattered spot, 1≤k≤N, N is a positive integer, and I(i, j) is the texture intensity distribution of the scattered spots, which satisfies:
[0062]
[0063] The position distribution of scattered spots can be calculated by the above formula, wherein the initial light intensity I0 is a constant and can be set to 1 for ease of calculation.
[0064] It should also be pointed out that the scattered spots may be Gaussian scattered spots, and the size R of the Gaussian scattered spots may also be set to 1, which is also convenient for calculation.
[0065] Furthermore, when the shape type of the scattered spots is an elliptical scattered spot, it satisfies:
[0066]
[0067] And the angle θ satisfies:
[0068] θ=arctan[(jy k ) / (ix k )]
[0069] Wherein, a is the length of the major axis of the elliptical scattered spots, and b is the length of the minor axis of the elliptical scattered spots.
[0070] On the basis of the above embodiments, the projection area in the present application also has a variety of shapes. Specifically, the projection area includes one of a triangular area, a circular area, and a rectangular area. When calculating the texture position distribution map of the scattered spots, it is pre-determined that the calculated point is located in the projection area. The calculated point is set to point P, and the coordinates of point P are (i, j).
[0071] See also Figure 6As shown, when the projection area is a rectangular area, the row coordinate range of the rectangular area is defined as x1 and x2, the column coordinate range of the rectangular area is defined as y1 and y2, i is the row coordinate of the projection area, j is the column coordinate of the projection area, and then: x1≤i≤x2, y1≤j≤y2 are satisfied. That is, before generating the texture position distribution map of scattered spots, it is necessary to determine whether the i value satisfies x1≤i≤x2, and whether the j value satisfies y1≤j≤y2. When x1≤i≤x2 and y1≤j≤y2 are satisfied at the same time, it is determined that point P is located in the rectangular area.
[0072] See also Figure 7 As shown, the projection area is a triangular area. The three vertices defining the triangular area are A, B, and C. Any point in the triangular area is P, which satisfies:
[0073] Among them, 0≤u≤1, 0≤v≤1, 0≤u+v≤1.
[0074] When the projection area is a triangular area, construct the vector vector And vector By the properties of triangles, the sum of any two sides is greater than the third side.
[0075] Given the coordinates of the four points A, B, C, and P, we can find u and v. Multiply the above equations by vector AC and vector AB to get:
[0076]
[0077] Solve the equation and calculate the values of u and v:
[0078]
[0079] After solving u and v, determine whether they meet the following conditions: 0≤u≤1, 0≤v≤1, 0≤u+v≤1. If they do, then point P is within the triangular region. In addition, when u=0, P is on AB, and when v=0, P is on AC. When both are 0, P and A coincide. If the above conditions are met, it can be determined that point P is within the triangular region, and the texture position distribution map of the scattered spots can be calculated.
[0080] See also Figure 8 As shown, in one aspect, the projection area is a circular area, the radius of the circular area is defined as r, and the coordinates of the center of the circular area are (xc, yc), then:
[0081]
[0082] Similarly, the point that needs to be calculated is located in the circular area, that is, the distance between point P and the center coordinates of the circle is less than or equal to the radius r of the center area of the circle.
[0083] See also Fig. 9 As shown, before the step of determining the projection area of the texture map, the process includes:
[0084] Step S01, obtaining a projection pattern, and splitting the projection pattern into projection areas of at least one shape of a texture map. That is, the projection pattern may contain projection areas of multiple shapes. In order to accurately complete the calculation and generation of the texture map, the projection pattern is split.
[0085] For example, a depth camera includes a transmitting camera and a receiving camera. The transmitting camera is used to transmit light, and the receiving camera is used to receive the reflected light. In a wide-angle depth camera, the lens of the receiving camera will produce optical distortion, usually barrel distortion, also known as negative distortion. In order to reduce the size of image distortion, the transmitting camera is made to project a pincushion-shaped distortion texture pattern, also known as positive distortion.
[0086] See also Fig.10 As shown, its appearance is ACGE. The ACGE pattern is decomposed into 1 rectangular area and 8 triangular areas, where the rectangle is O1O2O3O4, and the triangular areas are O1AH, O1AB, O2GH, O2GF, O3BC, O3CD, O4DE, and O4EF. After the projection area is split, the texture position distribution map of the scattered spots in each area is generated according to step S10, step S20, and step S30.
[0087] See also Fig.11 As shown, for another example, if the projection pattern is a hexagon, ABCDEF, the hexagon can be split into 6 triangular areas, namely triangles OAB, OBC, OCD, OED, OEF, and OFA. In this way, it is easy to complete the calculation of the hexagonal projection area.
[0088] See also Fig.12 As shown, in addition, the projection pattern can also be split into projection areas according to the structural shape of the target object as needed. For example, the projection pattern is split into three projection areas according to the structure of the target object, namely, a circular area, a rectangular area and a triangular area, and the scattered spots in the three areas can be the same or different. The scattered spots in the circular area are triangular spots, and the scattered spots in the rectangular area and the triangular area can be triangular, Gaussian or elliptical.
[0089] It should also be pointed out that any projection pattern can be split into one or a combination of two or more of a triangular area, a circular area and a rectangular area.
[0090] See also Fig.13As shown, the present application also provides a depth camera, the depth camera includes a lens assembly, the lens assembly includes a lens barrel and a light source 301, the light source 301 is arranged in the lens barrel, the lens assembly also includes a texture plate 302, the texture plate 302 is arranged in the lens barrel and is located in the light emitting direction of the light source 301, the surface of the texture plate 302 is provided with a texture map, and the texture map is generated by the texture map generation method as described above; the lens assembly also includes a line detector, and a transparent conductive film is also provided on the surface of the texture plate 302, the transparent conductive film is connected to the line detector, and the line detector is used to detect the resistance change of the transparent conductive film. The transparent part in the texture map on the texture plate is the part corresponding to the scattered spots.
[0091] Light source 301 is a vertical-cavity surface-emitting laser (VCSEL), which is a semiconductor whose laser is emitted perpendicular to the top surface. VCSEL can be tested for quality and problem solving during any manufacturing process, because the laser of VCSEL is emitted perpendicular to the reaction area, which is opposite to the edge-emitting laser which is emitted parallel to the reaction area, so tens of thousands of VCSELs can be processed on a three-inch gallium arsenide chip at the same time. In addition, even though VCSEL requires more labor and more delicate materials in the manufacturing process, the production results are controllable and more predictable. VCSEL is usually a two-dimensional light source composed of many sub-light sources arranged in a two-dimensional pattern. Compared with traditional light sources, it has the advantages of small size, small divergence angle and concentrated energy.
[0092] The transparent conductive film and the line detector are combined to determine whether the texture plate is broken. If the texture plate is broken, the resistance of the transparent conductive film increases. After the line detector detects the increase in resistance, it sends the detection result to the light source controller to disconnect the power supply of the light source, so as to prevent the laser from directly passing through the broken position and prevent the light of the light source from directly shining into the human eye. The transparent conductive film can be made of transparent metal oxides or metal-doped oxides, such as indium tin oxide, zinc oxide, tin oxide, indium-doped tin oxide, tin-doped gallium trioxide, tin-doped silver indium oxide, indium tin oxide, zinc-doped indium trioxide, antimony-doped tin dioxide, aluminum-doped zinc oxide, etc.
[0093] The lens assembly also includes a projection lens 303, which is arranged on the side of the texture plate 302 away from the light source 301. The light source 301 can be a visible light or an invisible infrared light source, such as a wavelength of 850nm or 940nm; the texture plate 302 is used to generate a pattern of projected texture. It should be noted that the pattern on the texture plate 302 is the same as the designed pattern, and can be regarded as a speckle pattern engraved on the texture plate 302 by semiconductor processing. The focal plane is located on the texture plate 302, and the generated texture pattern is projected onto the target space, wherein the projection lens 303 can be a lens composed of glass or plastic lenses, or a Fresnel lens.
[0094] The texture plate 302 includes a transparent substrate, which is usually glass or resin, with a transmittance greater than 95% and a thickness between 0.1-1 mm. Transparent glue is usually evenly coated on the lower layer of the transparent substrate, and the glue is textured by a semiconductor process (exposure, etching), so that a specific distribution pattern is formed after the light source 301 passes through the texture plate 302.
[0095] The present application also provides an electronic device, comprising: a memory and a processor. The memory stores computer-readable instructions; the processor reads the computer-readable instructions stored in the memory to execute any one of the above texture map generation methods.
[0096] Reference below Fig.14 An electronic device according to an embodiment of the present disclosure is described. Fig.14 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0097] like Fig.14 As shown, the electronic device is in the form of a general computing device. The components of the electronic device may include but are not limited to: at least one processing unit 210, at least one storage unit 220, and a bus 230 connecting different system components (including the storage unit 220 and the processing unit 210).
[0098] The storage unit 220 stores program codes, which can be executed by the processing unit 210, so that the processing unit 210 performs the steps according to various exemplary embodiments of the present invention described in the description section of the exemplary method described above in this specification. For example, the processing unit 210 can perform the various steps shown in the figure.
[0099] The storage unit 220 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 2201 and / or a cache 2202 storage unit, and may further include a read-only memory unit (ROM) 2203 .
[0100] The storage unit 220 may also include a program / utility 2204 having a set (at least one) of program modules 2205, such program modules 2205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0101] Bus 230 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0102] The electronic device may also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may communicate with one or more devices that enable a user to interact with the electronic device, and / or may communicate with any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface. The input / output (I / O) interface is connected to the display unit 240. In addition, the electronic device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 260. As shown, the network adapter 260 communicates with other modules of the electronic device via a bus 230. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0103] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0104] In an exemplary embodiment of the present disclosure, a storage medium is further provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer is enabled to execute the method described in the above method embodiment.
[0105] According to one embodiment of the present disclosure, a program product for implementing the method in the above method embodiment is also provided, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0106] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0107] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0108] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0109] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as JAVA, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0110] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0111] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0112] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0113] Although the present application has been described with reference to several typical embodiments, it should be understood that the terms used are illustrative and exemplary, rather than restrictive. Since the present application can be implemented in a variety of forms without departing from the spirit or essence of the invention, it should be understood that the above embodiments are not limited to any of the foregoing details, but should be interpreted broadly within the spirit and scope defined by the appended claims, so all changes and modifications falling within the scope of the claims or their equivalents should be covered by the appended claims.
Claims
1. A method for generating a texture map, characterized in that: The texture map is used for a depth camera, the texture map includes a plurality of scattered spots, and the method for generating the texture map includes: Determining a projection area of the texture map; Acquire projection parameters of the texture image, wherein the projection parameters include the number of the scattered spots, the size of a single scattered spot, and the shape type of the scattered spots; In the projection area, generating a texture map of the scattered spots according to the projection parameters; Wherein, N is the number of scattered spots, i is the row coordinate of the projection area, j is the column coordinate of the projection area, I0 is the initial light intensity, R is the size of the scattered spots, and x k ,y k is the position coordinate of the kth scattered spot, 1≤k≤N, N is a positive integer, I(i, j) is the texture intensity distribution of the scattered spot, then: When the shape type of the scattered spots is an elliptical scattered spot, it satisfies: and θ = arctan[(j - y k ) / (i - x k )] Wherein, a is the length of the major axis of the elliptical scattered spots, and b is the length of the minor axis of the elliptical scattered spots; When the shape type of the scattered speckle is Gaussian scattered speckle, R=1.
2. The method for generating a texture map according to claim 1, characterized in that: The projection area includes one of a triangular area, a circular area and a rectangular area.
3. The method for generating a texture map according to claim 2, characterized in that: The projection area is the rectangular area, and the row coordinate range of the rectangular area is defined as x1 and x2, the column coordinate range of the rectangular area is defined as y1 and y2, i is the row coordinate of the projection area, j is the column coordinate of the projection area, then: x1≤i≤x2, y1≤j≤y2 are satisfied.
4. The method for generating a texture map according to claim 2, characterized in that: The projection area is the triangular area, and the three vertices defining the triangular area are A, B, and C respectively. If any point in the triangular area is P, then: Among them, 0≤u≤1, 0≤v≤1, 0≤u+v≤1.
5. The method for generating a texture map according to claim 2, characterized in that: The projection area is the circular area, the radius of the circular area is defined as r, and the coordinates of the center of the circular area are (xc, yc), then:
6. The method for generating a texture map according to claim 2, characterized in that: Before the step of determining the projection area of the texture map, the method includes: A projection pattern is obtained, and the projection pattern is split into projection areas of a texture map of at least one shape.
7. A depth camera, characterized in that: The depth camera includes a lens assembly, the lens assembly includes a lens barrel and a light source, the light source is arranged in the lens barrel, the lens assembly also includes a texture plate, the texture plate is arranged in the lens barrel and located in the light emitting direction of the light source, a texture map is arranged on the surface of the texture plate, and the texture map is generated by the texture map generation method according to any one of claims 1 to 6; The lens assembly also includes a circuit detector. A transparent conductive film is also provided on the surface of the texture plate. The transparent conductive film is connected to the circuit detector. The circuit detector is used to detect the resistance change of the transparent conductive film.
8. An electronic device, characterized in that: include: a memory storing computer-readable instructions; A processor, wherein the processor reads computer-readable instructions stored in a memory to execute the method for generating a texture map according to any one of claims 1 to 6.
9. A storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the method for generating a texture map as described in any one of claims 1-6.
Citation Information
Patent Citations
Industrial photographic surveying method without code points
CN109945841A
TOF (Time of Flight) camera module and electronic equipment
CN114839645A