Air handwriting interaction and three-dimensional object encryption anti-counterfeiting method based on computer-generated holography
By using the computational holographic encryption method in the air handwriting interaction technology, encrypted information is encoded into three-dimensional objects, solving the problem of insufficient information security in the air handwriting interaction technology, and achieving efficient three-dimensional object encryption and anti-counterfeiting.
Patent Information
- Application Number
- CN202411892374.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-15
AI Technical Summary
Air handwriting interaction technology has insufficient security in information security, especially when processing three-dimensional information, existing encryption algorithms are difficult to effectively use three-dimensional features for encryption and anti-counterfeiting.
Using a method based on calculation holography, encrypted information is encoded into a three-dimensional object, the three-dimensional information of handwritten actions is collected through a depth camera, and a three-dimensional grid is generated using diffusion model and reconstruction technology, and the Fresnel transformation and two-dimensional chaotic mapping are used for encryption, generating ciphertext and adding watermarks.
It improves the integrity and confidentiality of information, can flexibly capture the three-dimensional spatiotemporal characteristics of handwriting interaction, has high key sensitivity and robustness, and can effectively resist noise attacks and data loss attacks.
Smart Images

Figure CN119830320A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of three-dimensional display and holographic encryption technology, in particular to an air handwriting interaction and three-dimensional object encryption anti-counterfeiting method based on computational holography. Background Art
[0002] With the continuous advancement of human-computer interaction technology, air handwriting interaction has gradually attracted attention as a natural and intuitive way of interaction. It breaks away from the constraints of traditional input devices and enables users to write or draw directly in the air, providing users with a more convenient and flexible interactive experience. However, air handwriting interaction technology also faces some challenges. Among them, information security issues are particularly prominent. In the process of air handwriting interaction, the handwritten information input by the user exists in the form of digital signals. If it is not protected, it can be easily stolen, tampered with or forged.
[0003] In the field of modern commerce and security, there is an urgent need for encryption and anti-counterfeiting of objects. Using the three-dimensional features of objects for encryption and anti-counterfeiting is a current development trend. Traditional encryption algorithms often have problems such as insufficient security and insufficient use of three-dimensional information features when processing three-dimensional information of air handwriting interaction and multi-depth objects. Therefore, a new encryption algorithm is needed to solve these problems. Summary of the invention
[0004] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0005] In view of the above problems and / or the problems existing in the existing encryption anti-counterfeiting technology, the present invention is proposed.
[0006] Therefore, the purpose of the present invention is to provide an aerial handwriting interaction and three-dimensional object encryption anti-counterfeiting method based on computational holography, which utilizes computational holography technology to encode encrypted information into three-dimensional objects, thereby improving the integrity and confidentiality of the information.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions: a method for air handwriting interaction and three-dimensional object encryption anti-counterfeiting based on computer holography, applied to electronic devices, comprising the following steps:
[0008] S1. Use a depth camera to capture the depth information of the spatial position of the handwriting action and capture a color image at the same time;
[0009] S2, putting the acquired handwriting action into the algorithm package to obtain the trajectory information; for the two-dimensional image captured by the depth camera, using the diffusion model and reconstruction technology to generate a three-dimensional grid;
[0010] S3, using a point cloud meshing method to segment the three-dimensional image from the three RGB channels to obtain a two-dimensional image group, and encoding the image group into a hologram group through Fresnel transformation;
[0011] S4, using a two-dimensional chaotic map to encrypt the hologram to generate a ciphertext, adding the handwritten information as a watermark to the encrypted image, encoding the key group used for encryption, and generating a quick response code;
[0012] S5. Decrypt the encrypted ciphertext using the acquired key and perform anti-counterfeiting verification on the three-dimensional object;
[0013] S6. Optically reconstruct the hologram.
[0014] As a preferred solution of the aerial handwriting interaction and three-dimensional object encryption anti-counterfeiting method based on computer holography in the present invention, wherein: in step S1, the depth camera is placed at a suitable position and angle so as to clearly capture the area where the aerial handwriting action occurs. When the handwriting operation is performed in the air, the depth camera starts working synchronously to perform continuous three-dimensional image acquisition and, at the same time, take a color image.
[0015] As a preferred solution of the aerial handwriting interaction and three-dimensional object encryption anti-counterfeiting method based on computer holography in the present invention, wherein: in step S2, the method for obtaining trajectory information is specifically to put the handwriting trajectory into an algorithm package, and extract the coordinate information of the handwriting trajectory by analyzing continuous image frames.
[0016] As a preferred solution of the aerial handwriting interaction and three-dimensional object encryption and anti-counterfeiting method based on computer holography in the present invention, wherein: in step S2, the method of generating a three-dimensional grid is specifically as follows: given an input image, four orthogonal multi-view images are first obtained, and their corresponding normal mappings are generated by a multi-view diffusion model and a forward diffusion model; then the resolution is improved by using a multi-view perception control network, and the resolution is further improved by using a single-view super-resolution model; the reconstruction work adopts an instant and consistent grid reconstruction algorithm isomer; finally, the grid is colored, and a smooth coloring algorithm is used for the invisible area.
[0017] As a preferred solution of the aerial handwriting interaction and three-dimensional object encryption and anti-counterfeiting method based on computer holography in the present invention, wherein: in step S3, the point cloud gridding method is specifically to divide the point cloud data into K parallel layers according to the z-axis using depth clues, and extract the three-dimensional data of the three RGB channels respectively, and obtain three channel image groups composed of several n*n two-dimensional images respectively.
[0018] As a preferred solution of the aerial handwriting interaction and three-dimensional object encryption anti-counterfeiting method based on computer holography in the present invention, wherein: in step S4, the encryption method is specifically, according to the distance of each image to the holographic plane, using Fresnel diffraction to calculate the hologram; applying a two-dimensional chaotic mapping to generate a chaotic random phase function to encrypt all holograms to obtain a ciphertext group, and setting an independent parameter for each layer as the initial key, adding all ciphertexts to obtain a complex ciphertext, the handwritten information is added to the encrypted image as a watermark, and all the initial keys used to generate the random phase function are encoded into a quick response code.
[0019] As a preferred solution of the method for air handwriting interaction and three-dimensional object encryption anti-counterfeiting based on computer holography in the present invention, wherein: in step S4, the encryption method specifically includes the following steps:
[0020] S401, the two-dimensional image of each layer can be represented as A_Im i (x i ,y i ), i = 1, 2, 3 ... K; the hologram corresponding to the i-th layer is calculated according to the formula We get: where FRT stands for Fresnel transform, λ is the wavelength of the object wave, (ε, η) represents the hologram coordinates, (x i ,y i ) represents the coordinates of the i-th layer, represents a random phase mask, where the phase values are distributed in the range (0, 2π) in the object plane, and j is an imaginary unit;
[0021] Step S402: Apply logical mapping to generate a chaotic random phase function, the mathematical expression is:
[0022] a n+1 =r a a n (1-a n ),
[0023] b n+1 =r b b n (1-b n ),
[0024] The chaotic random phase function is expressed as,
[0025] C(ε,η)=exp[jπ(a i +b i )],
[0026] According to the initial values of a0 and b0, r a , r b Take a value between (3.5699,4] and generate the key stream of the cryptographic system from it; where an+1 and b n+1 represents a random iteration value, discarding the values of the first 10,000 iterations, generating a chaotic key stream {k a} and {k b}; a i and b i Belong to the non-periodic non-convergent random sequence {k a} and {k b};
[0027] Step S403, encrypting the first layer of hologram is expressed as:
[0028] H E1 (ε, η)=H1(ε, η)C(ε, η)+α1C0(ε, η),
[0029] The encryption of the i-th layer hologram is expressed as,
[0030] H Ei (ε,η)=H i (ε,η)C(ε,η)+α i H E(i-1) (ε, η),
[0031] Where C0(ε, η) is the handwritten trace watermark information, α1 is the first layer coding factor; the encrypted ciphertext group H is obtained E1 (ε, η), H E2 (ε,η),…,H EM (ε, η) and a given key group G1(a0, b0, r a , r b ) and G2(a 01 , b 01 , r a1 , r b1 ), then add the obtained K complex ciphertexts together to get another complex ciphertext Comp(ε,η), the mathematical expression is:
[0032] Comp(ε, η)=En_1(ε, η)+En_2(ε, η)+…+En_K(ε, η)
[0033] =exp[jP1(ε, η)]+exp[jP2(ε, η)],
[0034] Based on the Euler formula, we get two phase ciphertexts P1(ε, η) and P2(ε, η), and the mathematical expression is:
[0035]
[0036] At the same time, two crosstalk cancellers P3(ε, η) and P4(ε, η) can be obtained, CrT i(ε, η) is the inverse of the sum of the complex ciphertexts of each original image except En_i(ε, η), as shown below:
[0037] CRT i (ε, η)=-Comp(ε, η)+En_i(ε, η),
[0038]
[0039] The sum of the phase mask of P3 (ε, η) and the phase mask of P4 (ε, η) is CrT i (ε, η),
[0040] exp[jP3(ε, η)]+exp[jP4(ε, η)]=CrT i (ε, η);
[0041] Among them, En_i(ε,η) is the holographic ciphertext of the i-th layer.
[0042] As a preferred solution of the method for air handwriting interaction and three-dimensional object encryption anti-counterfeiting based on computer holography in the present invention, in step S5, a given key group G1 (a0, b0, r a , r b ) and G2(a 01 , b 01 , r a1 , r b1 ), the i-th decrypted hologram satisfies the following formula,
[0043] D i (ε,η)=[D Ei (ε,η)-α i D E(i-1) (ε, η)] / C(ε, η),
[0044] Where D Ei (ε, η)=exp(jP1)+exp(jP2)+exp(jP3)+exp(jP4),
[0045] In particular, the final decrypted D1(ε,η) is,
[0046] D1(ε,η)=[D E1 (ε, η)-α0C0(ε, η)] / C(ε, η),
[0047] Obtain a decrypted hologram of a multi-depth three-dimensional image by superposition
[0048] Among them, D Ei (ε, η) is the i-th layer hologram before decryption, D E(i-1)(ε, η) is the (i-1)th layer hologram before decryption, α i is the i-th layer coding factor.
[0049] As a preferred solution of the aerial handwriting interaction and three-dimensional object encryption and anti-counterfeiting method based on computer holography in the present invention, wherein: in step S6, the method for optically reconstructing the hologram is specifically to build a full-color holographic display system, a personal computer is connected to a spatial light modulator, and the laser emitted by the RGB laser passes through an attenuator, a beam expander and an aperture in sequence to reach the spatial light modulator, and the RGB hologram on the personal computer is loaded onto the spatial light modulator adapter board and finally displayed on the camera.
[0050] Compared with the prior art, the present invention has the following technical effects:
[0051] 1. The handwriting trajectory is regarded as a dynamic process that changes over time in three-dimensional space, fully capturing the three-dimensional spatiotemporal characteristics of handwriting interaction; and by combining the diffusion model and reconstruction method, objects with depth information are automatically generated from a single RGB image, making it more flexible and universal.
[0052] 2. The hologram of each layer is encrypted using two-dimensional chaotic mapping, which ensures high key sensitivity and large key space, and shows high robustness in the face of noise attacks and data loss attacks. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:
[0054] Figure 1 It is a flow chart of the steps of the present invention.
[0055] Figure 2 This is a diagram of the aerial handwriting action in Example 2.
[0056] Figure 3 This is the handwriting trajectory diagram collected in Example 2.
[0057] Figure 4 It is the two-dimensional color image in Example 2.
[0058] Figure 5 This is the point cloud image of the three-dimensional object in Example 2.
[0059] Figure 6 It is the encryption flow chart of the present invention.
[0060] Figure 7 This is the three-channel encrypted image of the watermark-embedded three-dimensional model in Example 2.
[0061] Figure 8 Decrypted reconstruction image of the three-dimensional object in Example 2 using an incorrect key.
[0062] Fig. 9 The decrypted reconstruction image of the three-dimensional object in Example 2 using the correct key.
[0063] Fig.10 This is the result of the encrypted image of the three-dimensional object obtained in Example 2 being attacked by 65% noise.
[0064] Fig.11 This is the result of the encrypted image of the three-dimensional object obtained in Example 2 being subjected to a 45% occlusion attack.
[0065] Fig.12 It is the optical experimental platform of the present invention.
[0066] Fig.13 It is the optical RGB channel reconstructed image and the full-color reconstructed image in Example 2.
[0067] Among them, there are 100 laser transmitters, 200 attenuators, 300 beam expanders, 400 apertures, 500 spatial light modulators, and 600 cameras. DETAILED DESCRIPTION
[0068] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0069] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0070] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0071] The embodiment of the present invention provides a method for air handwriting interaction and three-dimensional object encryption anti-counterfeiting based on computer holography, such as Figure 1 As shown, the solution of the present invention includes six aspects:
[0072] In a first aspect, the present invention provides a three-dimensional information acquisition method, which is applied to an electronic device, and the method comprises:
[0073] The electronic device interacts with the depth camera, downloads the corresponding hardware driver, and uses the image acquisition toolkit in MATLAB to obtain color image data and depth image data respectively. The position information in the point cloud data is extracted through the pcfromkinect function, and the acquired image data is written to a video file. At the same time, the point cloud position information extracted in each loop is saved to a named .mat file.
[0074] The electronic device is connected to the depth camera, and the corresponding hardware driver image acquisition toolkit in MATLAB is downloaded. The depth camera is used to collect depth images and corresponding color images. The functions in the image acquisition toolkit are used to collect three-dimensional images. The color image and depth image are called through the function pcfromkinect to generate a point cloud.
[0075] In a second aspect, the present invention provides a method for automatically generating a three-dimensional grid from a two-dimensional image, which is applied to an electronic device, and the method comprises:
[0076] The electronic device obtains the given input image, imports it into the locally deployed model, which is provided by https: / / wukailu.github.io / Unique3D / ., and then saves the output 3D mesh.
[0077] In a third aspect, the present invention provides a method for obtaining handwriting trajectory information, which is applied to an electronic device, and the method comprises:
[0078] The electronic device implements hand motion tracking and drawing by calling Python; imports numpy for numerical calculations, OpenCV library for image processing, loadmat for loading .mat files, and matplotlib related modules for drawing three-dimensional graphics; it can detect the position and state of the index and middle fingers of the hand, implement different functions according to the movements of the fingers, and record the three-dimensional coordinate information corresponding to the finger positions during the drawing process.
[0079] In a fourth aspect, the present invention provides a three-dimensional holographic encryption method based on a chaotic mapping algorithm, which improves the security of the encryption algorithm and has high robustness in the face of noise attacks and data loss attacks. The method is applied to electronic devices and includes:
[0080] The electronic device divides the object point group into multiple planes at different depths to ensure that the intervals between each plane are almost the same. The point cloud data is layered according to the z-axis, and the three-dimensional data of the three RGB channels are extracted respectively to obtain a three-channel image group consisting of multiple n*n two-dimensional images. The original image group is subjected to Fresnel operation based on different distances to obtain a hologram group. A two-dimensional chaotic map is applied to generate a chaotic random phase function to encrypt all holograms to obtain a ciphertext group. Independent parameters can be set for each layer as the initial key. All ciphertexts are added to obtain a complex ciphertext. The handwritten information is added to the encrypted image as a watermark. All the initial keys used to generate the random phase function are encoded into a quick response code.
[0081] In a fifth aspect, the present invention provides a decryption scheme based on the above encryption method to implement information decryption processing, the method comprising:
[0082] The electronic device reinitializes parameters according to the chaotic mapping algorithm used in the encryption process. These parameters must be completely consistent with the parameters during encryption. The initialized chaotic mapping algorithm is used to generate a chaotic sequence. The encrypted data block and the generated chaotic sequence are decrypted and an inverse operation is performed according to the encryption method used during encryption. The integrated data is verified and adjusted using the feature information of the data block extracted before encryption to ensure that the decrypted data is completely consistent with the original three-dimensional holographic data. Finally, the three channel data groups are merged.
[0083] In a sixth aspect, the present invention provides a hologram optical reconstruction platform, which can reproduce the three-dimensional form of an object, and the method includes:
[0084] The personal computer is connected to the spatial light modulator, the laser light emitted by the RGB laser passes through the attenuator, beam expander and aperture to reach the spatial light modulator, the RGB hologram on the personal computer is loaded onto the spatial light modulator adapter board and finally displayed on the camera.
[0085] Example 1
[0086] like Figure 1 to Figure 4 As shown, it is the first embodiment of the present invention, which provides an air handwriting interaction and three-dimensional object encryption anti-counterfeiting method based on computer holography, which includes the following steps:
[0087] S1. Place the depth camera at a suitable position and angle so as to clearly capture the area where the handwriting action in the air occurs. When the handwriting operation is performed in the air, the depth camera starts to work synchronously to collect continuous three-dimensional images and take a color image at the same time;
[0088] S2. Put the handwriting trajectory into the algorithm package, and extract the coordinate information of the handwriting trajectory by analyzing continuous image frames; for the two-dimensional image captured by the depth camera, a diffusion model and reconstruction technology are used to generate a three-dimensional mesh (which is a prior art, refer to the following journal Wu, Kailu, et al., "Unique3D: High-Quality and Efficient 3D Mesh Generation from a Single Image." ArXiv abs / 2405.20343(2024).), specifically, given an input image, first obtain four orthogonal multi-view images, and generate their corresponding normal mappings by the multi-view diffusion model and the forward diffusion model; then use the multi-view perception control network to improve the resolution, and use the single-view super-resolution model to further improve the resolution; the reconstruction work uses an instant and consistent mesh reconstruction algorithm isomer; finally, the mesh is colored, and a smooth coloring algorithm is used for the invisible area;
[0089] S3. Divide the point cloud data into K parallel layers according to the z-axis using depth clues, extract the three-dimensional data of the three RGB channels respectively, obtain three-channel image groups consisting of several n*n two-dimensional images respectively, obtain a two-dimensional image group, and encode the image group into a hologram group through Fresnel transform.
[0090] S4. Based on the distance from each image to the holographic plane, the hologram is calculated using Fresnel diffraction; a two-dimensional chaotic map is used to generate a chaotic random phase function to encrypt all holograms to obtain a ciphertext group, and an independent parameter is set for each layer as an initial key. All ciphertexts are added together to obtain a complex ciphertext, and the handwritten information is added to the encrypted image as a watermark. All initial keys used to generate the random phase function are encoded into a quick response code;
[0091] S5. Decrypt the encrypted ciphertext using the acquired key and perform anti-counterfeiting verification on the three-dimensional object;
[0092] S6. Build a full-color holographic display system. The personal computer is connected to the spatial light modulator. The laser light emitted by the RGB laser passes through the attenuator, beam expander and aperture in sequence to reach the spatial light modulator. The RGB hologram on the personal computer is loaded onto the spatial light modulator adapter board and finally displayed on the camera.
[0093] In step S4, the encryption method specifically includes the following steps:
[0094] S401, the two-dimensional image of each layer can be represented as A_Im i (x i ,y i ), i = 1, 2, 3 ... K; the hologram corresponding to the i-th layer is calculated according to the formula We get: where FRT stands for Fresnel transform, λ is the wavelength of the object wave, (ε, η) represents the hologram coordinates, (x i ,y i ) represents the coordinates of the i-th layer, represents a random phase mask, where the phase values are distributed in the range (0, 2π) in the object plane, and j is an imaginary unit;
[0095] Step S402: Apply logical mapping to generate a chaotic random phase function, the mathematical expression is:
[0096] a n+1 =r a a n (1-a n ),
[0097] b n+1 =r b b n (1-b n ),
[0098] The chaotic random phase function is expressed as,
[0099] C(ε,η)=exp[jπ(a i +b i )],
[0100] According to the initial values of a0 and b0, r a , r b Take a value between (3.5699,4] and generate the key stream of the cryptographic system from it; where a n+1 and b n+1 represents a random iteration value, discarding the values of the first 10,000 iterations, generating a chaotic key stream {k a} and {k b}; a i and b i Belong to the non-periodic non-convergent random sequence {k a} and {k b};
[0101] Step S403, encrypting the first layer of hologram is expressed as:
[0102] H E1 (ε, η)=H1(ε, η)C(ε, η)+α0C0(ε, η),
[0103] The encryption of the i-th layer hologram is expressed as,
[0104] H Ei (ε,η)=H i (ε,η)C(ε,η)+α i HE(i-1) (ε, η),
[0105] Where C0(ε, η) is the handwritten trace watermark information, α0 is the coding factor; the encrypted ciphertext group H is obtained E1 (ε, η), H E2 (ε,η),....,H EK (ε, η) and a given key group G1(a0, b0, r a , r b ) and G2(a 01 , b 01 , r a1 , r b1 ), then add the obtained K complex ciphertexts to get another complex ciphertext Comp(ε,η), the mathematical expression is:
[0106] Comp(ε, η)=En_1(ε, η)+En_2(ε, η)+…+En_K(ε, η)
[0107] =exp[jP1(ε, η)]+exp[jP2(ε, η)],
[0108] Based on the Euler formula, we get two phase ciphertexts P1(ε, η) and P2(ε, η), and the mathematical expression is:
[0109]
[0110] At the same time, two crosstalk cancellers P3(ε, η) and P4(ε, η) can be obtained, CrT i (ε, η) is the inverse of the sum of the complex ciphertexts of each original image except En_i(ε, η), as shown below:
[0111] CRT i (ε, η)=-Comp(ε, η)+En_i(ε, η),
[0112]
[0113] The sum of the phase mask of P3 (ε, η) and the phase mask of P4 (ε, η) is CrT i (ε, η),
[0114] exp[jP3(ε, η)]+exp[jP4(ε, η)]=CrT i (ε, η);
[0115] Among them, En_i(ε,η) is the holographic ciphertext of the i-th layer.
[0116] In step S6, the decryption process is specifically as follows:
[0117] Using a given key group G1(a0, b0, r a , r b ) and G2(a 01 , b 01 , r a1 , r b1 ), the i-th decrypted hologram satisfies the following formula,
[0118] D i (ε,η)=[D Ei (ε,η)-α i D E(i-1) (ε, η)] / C(ε, η),
[0119] Where D Ei (ε, η)=exp(jP1)+exp(jP2)+exp(jP3)+exp(jP4),
[0120] In particular, the final decrypted D1(ε,η) is,
[0121] D1(ε,η)=[D E1 (ε, η)-α0C0(ε, η)] / C(ε, η),
[0122] Obtain a decrypted hologram of a multi-depth three-dimensional image by superposition
[0123] Among them, D Ei (ε, η) is the i-th layer hologram before decryption, D E(i-1) (ε, η) is the (i-1)th layer hologram before decryption, α i is the coding factor.
[0124] Example 2
[0125] Reference Figure 3 and Figure 4 , which is the second embodiment of the present application. The difference from Embodiment 1 is that this embodiment provides more detailed operation steps and experimental verification to prove the technical effect of the present application.
[0126] In the process of using the functions in the image acquisition toolkit to acquire images, the specific steps are as follows: ensure that the depth camera is connected to the computer and the corresponding driver is installed, call the videoinput method, set the image acquisition objects, namely the color image acquisition object colorVid and the depth image acquisition object depthVid, set the image acquisition frame number FramesPerTrigger parameter, call the getdata method to start image acquisition, call the writeVideo function to write the color image to the video file, call the pcfromkinect method to combine the acquired depth image and color image to generate a point cloud, call the save function to save the location information of the point cloud to the .mat file created by the current loop, call the stop method to end image acquisition, and call the delete and clear methods to delete the image acquisition objects.
[0127] In the process of calling the videoinput function to set the image acquisition object, the parameters passed are as follows: the first parameter passes the device type. Since the current image acquisition device is a depth camera, this parameter is set to kinect; the second parameter passes the device number, which is used to distinguish different image acquisition objects at the same time; the third parameter passes the image acquisition format, which should be based on the built-in parameters of the image acquisition device itself. The general format is BGR / Depth_resolution; in this method, the image acquisition format name of the color camera is BGR_1920x1080, and the image acquisition format name of the depth camera is Depth_512x424. The videoinput method returns the image acquisition object itself.
[0128] In the process of setting the image acquisition frame number FramesPerTrigger parameter, the specific steps are to set the corresponding image acquisition frame number for different image acquisition objects. In this method, the FramesPerTrigger parameter of the color image acquisition object colorVid and the depth image acquisition object depthVid is set to 40, that is, 40 frames of color images and depth images are collected.
[0129] In the process of calling the getdata method to collect images, the passed parameter is the image acquisition object. The getdata method will interact with the depth camera based on the passed image acquisition object to collect the corresponding image content. The getdata method returns the collected image content itself.
[0130] In the process of calling the pcfromkinect method to generate a point cloud, the parameters passed are as follows: the first parameter passes the depth image acquisition object, which is depthVid in this method; the second parameter passes the acquired depth image; the third parameter passes the acquired color image, and the pcfromkinect method returns the point cloud object generated based on the depth image and color image to generate a point cloud image.
[0131] When calling the stop method to end image acquisition, the parameter passed is the image acquisition object.
[0132] When calling the delete and clear methods to delete the image acquisition object, the passed parameters are all image acquisition objects.
[0133] In the process of calling the Python algorithm package for capturing finger trajectories, the specific steps are as follows: for the acquired 40 frames of point cloud position information data, loop through them in Python, and in each loop, pass the point cloud position information data of the current frame to the relevant function in the finger_tracking algorithm package; store the captured finger trajectory data; at the same time, the finger trajectory data can be output and displayed so that the user can intuitively see the captured finger trajectory results. The handwriting trajectory action results are as follows: Figure 2 .
[0134] When calling the finger_tracking algorithm package, the built-in algorithm is used to process the incoming depth information. The edge detection and region growing techniques based on the depth image are used to identify the outline of the finger, and then the three-dimensional coordinates of the finger are calculated in combination with the depth information to generate the finger trajectory.
[0135] In the process of calling the print method to save data, the captured finger trajectory data is stored in text format, and the acquired finger trajectory coordinates are saved.
[0136] In the process of calling the matplotlib method for visualization, the finger trajectory is plotted in three-dimensional space to show the position and movement path of the finger in each frame, and the depth information is annotated to clearly understand the changes of the finger in the depth direction. Figure 3 .
[0137] In the process of directly generating a 3D mesh from a 2D image, the specific steps are: import the captured 2D image into the large model, and then save the output 3D mesh. Figure 4 .
[0138] Call the pcfromkinect function to generate a point cloud map from the collected image. The specific steps are as follows: the first parameter passes the depth image acquisition object, which is depthVid in this method; the second parameter passes the collected depth image; the third parameter passes the collected color image. The pcfromkinect method returns the point cloud object generated based on the depth image and the color image. The generated point cloud image is as follows Figure 5 .
[0139] In the process of classifying object point groups with the same depth value in the point cloud image and generating multiple efficient depth grids, the specific operation steps are as follows: call the unique function to remove duplicate data in the point cloud matrix and obtain the valid data position; call the categorical function to layer and sort the point cloud data, and the transfer function is the data at point z in the point cloud data; call the str2double function to convert the text data format to double precision, and the transfer function is the layered and sorted point cloud data; extract the color data RGB in the point cloud respectively, and layer the two-dimensional image group of three channels (that is, multiple images after the point cloud is gridded and layered).
[0140] In the process of calling the FrPr function to perform Fresnel transform calculation, the transfer function is all images in the image group.
[0141] In the process of realizing the generation of chaotic phase function, the specific steps are as follows: According to the mathematical expression a n+1 =r a a n (1-a n ),b n+1 =r b b n (1-b n ) to generate a chaotic random phase function exp[jπ(a i +b i )], removing the first 1000 points.
[0142] In the process of achieving encryption, the specific steps are as follows: apply chaotic random phase function to encrypt all holograms to obtain ciphertext groups, and set independent parameters for each layer as the initial key, add all ciphertexts to obtain a complex ciphertext, embed the handwriting trajectory information hologram into the ciphertext as a watermark, and then separate it into two phase functions as ciphertexts; at the same time, two eliminators are generated for each ciphertext; all the initial keys used to generate random phase functions are encoded into a fast response code. Here, the encryption process of the key group is given as follows Figure 6 , the ciphertext of a three-dimensional object is Figure 7 .
[0143] In the process of achieving decryption, the specific steps are as follows: according to the chaotic mapping algorithm used in the encryption process, re-initialize the parameters, these parameters must be completely consistent with the parameters during encryption, and use the initialized chaotic mapping algorithm to generate a chaotic sequence; decrypt the encrypted data block and the generated chaotic sequence, and perform inverse operations according to the encryption method used during encryption; use the data block feature information extracted before encryption to verify and adjust the integrated data to ensure that the decrypted data is completely consistent with the original three-dimensional holographic data; finally, merge the three channel data groups. Figure 8 , the correct key decryption diagram is as follows Fig. 9 .
[0144] Experimental robustness analysis:
[0145] When the encrypted image is attacked by 65% noise, the calculated correlation coefficient value is 0.86. Fig.10 As shown in Figure 2, when the encrypted image is subjected to a 45% occlusion attack, the calculated correlation coefficient value is 0.93, as shown in Figure 2. Fig.11 shown.
[0146] In the process of realizing the optical reconstruction of the hologram, the personal computer is connected to the spatial light modulator. The laser light emitted by the RGB laser passes through the attenuator, beam expander and aperture to reach the spatial light modulator. The RGB hologram on the personal computer is loaded onto the spatial light modulator adapter board, and the three-dimensional image is finally displayed on the camera. The experimental platform is as follows: Fig.12 As shown in Figure 2, the hologram reconstruction results are as follows: Fig.13 shown.
[0147] Experimental results show that this embodiment is highly sensitive to the initial key and has high robustness in the face of noise attacks and data loss attacks.
[0148] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for air handwriting interaction and three-dimensional object encryption anti-counterfeiting based on computer holography, characterized by: Applied to electronic equipment, including the following steps: S1. Use a depth camera to capture the depth information of the spatial position of the handwriting action and capture a color image at the same time; S2, putting the acquired handwriting action into the algorithm package to obtain the trajectory information; for the two-dimensional image captured by the depth camera, using the diffusion model and reconstruction technology to generate a three-dimensional grid; S3, using a point cloud meshing method to segment the three-dimensional image from the three RGB channels to obtain a two-dimensional image group, and encoding the image group into a hologram group through Fresnel transformation; S4, using a two-dimensional chaotic map to encrypt the hologram to generate a ciphertext, adding the handwritten information as a watermark to the encrypted image, encoding the key group used for encryption, and generating a quick response code; S5. Decrypt the encrypted ciphertext using the acquired key and perform anti-counterfeiting verification on the three-dimensional object; S6. Optically reconstruct the hologram.
2. The method for anti-counterfeiting based on aerial handwriting interaction and three-dimensional object encryption based on computer holography as claimed in claim 1, characterized in that: In step S1, the depth camera is placed at a suitable position and angle so as to clearly capture the area where the handwriting action in the air occurs. When the handwriting operation is performed in the air, the depth camera starts working synchronously to perform continuous three-dimensional image acquisition and, at the same time, take a color image.
3. The method for anti-counterfeiting based on aerial handwriting interaction and three-dimensional object encryption based on computer holography as claimed in claim 1, characterized in that: In step S2, the method for obtaining the trajectory information is specifically to put the handwriting trajectory into an algorithm package, and extract the coordinate information of the handwriting trajectory by analyzing continuous image frames.
4. The method for anti-counterfeiting of aerial handwriting interaction and three-dimensional object encryption based on computer holography as claimed in claim 1, characterized in that: In step S2, the method for generating a three-dimensional mesh is specifically as follows: given an input image, four orthogonal multi-view images are first obtained, and their corresponding normal maps are generated by a multi-view diffusion model and a forward diffusion model; then the resolution is improved by using a multi-view perception control network, and the resolution is further improved by using a single-view super-resolution model; the reconstruction work adopts an instant and consistent mesh reconstruction algorithm isomer; finally, the mesh is colored, and a smooth coloring algorithm is used for invisible areas.
5. The method for anti-counterfeiting based on aerial handwriting interaction and three-dimensional object encryption based on computer holography as claimed in claim 1, characterized in that: In step S3, the point cloud meshing method is specifically to divide the point cloud data into K parallel layers according to the z-axis using depth clues, extract the three-dimensional data of the three RGB channels respectively, and obtain three-channel image groups consisting of several n*n two-dimensional images respectively.
6. The method for anti-counterfeiting of aerial handwriting interaction and three-dimensional object encryption based on computer holography as claimed in claim 1, characterized in that: In step S4, the encryption method is specifically as follows: according to the distance from each image to the holographic plane, the hologram is calculated using Fresnel diffraction; a two-dimensional chaotic mapping is applied to generate a chaotic random phase function to encrypt all holograms to obtain a ciphertext group, and an independent parameter is set for each layer as an initial key, all ciphertexts are added together to obtain a complex ciphertext, and the handwritten information is added to the encrypted image as a watermark, and all the initial keys used to generate the random phase function are encoded into a quick response code.
7. The method for anti-counterfeiting of aerial handwriting interaction and three-dimensional object encryption based on computer holography as claimed in claim 6, characterized in that: In step S4, the encryption method specifically includes the following steps: S401, the two-dimensional image of each layer can be represented as A_Im i (x i ,y i ), i = 1, 2, 3...K; the hologram corresponding to the i-th layer is calculated according to the formula We get: where FRT stands for Fresnel transform, λ is the wavelength of the object wave, (ε, η) represents the hologram coordinates, (x i ,y i ) represents the coordinates of the i-th layer, represents a random phase mask, where the phase values are distributed in the range (0, 2π) in the object plane, and j is an imaginary unit; S402, applying logical mapping to generate chaotic random phase function, the mathematical expression is: a n+1 =r a a n (1-a n ), b n+1 =r b b n (1-b n ), The chaotic random phase function is expressed as, C(ε,η)=exp[jπ(a i +b i )], According to the initial values of a0 and b0, r a ,r b Take a value between (3.5699,4] and generate the key stream of the cryptographic system from it; where a n+1 and b n+1 represents a random iteration value, discarding the values of the first 10,000 iterations, generating a chaotic key stream {k a } and {k b }; a i and b i Belong to the non-periodic non-convergent random sequence {k a } and {k b }; Step S403, encrypting the first layer of hologram is expressed as: H E1 (ε,η)=H1(ε,η)C(ε,η)+α0C0(ε,η), The encryption of the i-th layer hologram is expressed as, H Ei (e, h)=H i (e,n)C(e,n)+a i H E(i-1) (e, h), Where C0(ε, η) is the handwritten trace watermark information, α0 is the coding factor; the encrypted ciphertext group H is obtained E1 (ε, η), H E2 (ε,η),....,H EK (ε, η) and a given key group G1(a0, b0, r a , r b )and G 2(a 01 , b 01 , r a1 , r b1 ), then add the obtained K complex ciphertexts together to get another complex ciphertext Comp(ε,η), the mathematical expression is: Comp(ε, η)=En_1(ε, η)+En_2(ε, η)+...+En_K(ε,) =exp[jP1(ε, η)]+exp[jP2(ε, η)], Based on the Euler formula, we get two phase ciphertexts P1(ε, η) and P2(ε, η), and the mathematical expression is: At the same time, two crosstalk cancellers P3(ε, η) and P4(ε, η) can be obtained, CrT i (ε, η) is the inverse of the sum of the complex ciphertexts of each original image except En_i(ε, η), as shown below: CrT i (e,n)=-Comp(e,n)+En_i(e,n), The sum of the phase mask of P3 (ε, η) and the phase mask of P4 (ε, η) is CrT i (ε, η), exp[jP3(ε,η)]+exp[jP4(ε,η)]=CrT i (e, h); Among them, En_i(ε,η) is the holographic ciphertext of the i-th layer.
8. The method for anti-counterfeiting of aerial handwriting interaction and three-dimensional object encryption based on computer holography as claimed in claim 7, characterized in that: In step S5, using a given key group G1 (a0, b0, r a , r b ) and G2(a 01 , b 01 , r a1 , r b1 ), the i-th decrypted hologram satisfies the following formula, D i (e, h)=[D Ei (e, h)-a i D E(i-1) (e,n)] / C(e,n), Where D Ei (ε, η)=exp(jP1)+exp(jP2)+exp(jP3)+exp(jP4), In particular, the final decrypted D1(ε,η) is, D1(e, h)=[D E1 (e,n)-α0C0(e,n)] / C(e,n), Obtain a decrypted hologram of a multi-depth three-dimensional image by superposition Among them, D Ei (ε, η) is the i-th layer hologram before decryption, D E(i-1) (ε, η) is the (i-1)th layer hologram before decryption, α i is the i-th layer coding factor.
9. The method for anti-counterfeiting based on aerial handwriting interaction and three-dimensional object encryption based on computer holography as claimed in claim 8, characterized in that: In step S6, the method for optically reconstructing the hologram is specifically to build a full-color holographic display system, connect a personal computer to a spatial light modulator, and the laser light emitted by the RGB laser passes through an attenuator, a beam expander, and an aperture in sequence to reach the spatial light modulator. The RGB hologram on the personal computer is loaded onto the spatial light modulator adapter board and finally displayed on the camera.
10. The method for anti-counterfeiting of aerial handwriting interaction and three-dimensional object encryption based on computer holography as claimed in claim 3, characterized in that: In step 2, the method for obtaining the coordinate information of the handwriting trajectory is to call Python to implement hand movement tracking and drawing; import numpy for numerical calculation, OpenCV library for image processing, loadmat for loading .mat files, and matplotlib related modules for drawing three-dimensional graphics; the position and state of the index finger and middle finger of the hand can be detected, different functions can be realized according to the movement of the fingers, and the three-dimensional coordinate information corresponding to the finger position during the drawing process can be recorded.