A three-dimensional positioning method for bubbles inside a lampshade based on transmission and deflection
By combining flexible programmable microstructure optical films and optical path mapping models, the problem of increased three-dimensional positioning error in multilayer heterogeneous materials is solved, achieving high-precision three-dimensional point cloud reconstruction and bubble positioning, and improving the detection accuracy and consistency in complex lampshade production line environments.
Patent Information
- Application Number
- CN202611273302.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-11-24
AI Technical Summary
Existing 3D reconstruction methods for multilayer heterogeneous composite materials tend to overlook complex factors such as refractive index gradients at multiple interfaces, actual interface tilt, and thickness errors. This leads to discrepancies between the optical path mapping model and the actual optical path, resulting in increased 3D positioning coordinate errors for minor defects such as bubbles. Consequently, problems such as positioning drift, multiple solutions, or poor batch-to-batch consistency may occur.
A flexible programmable microstructure optical film is used to generate a dynamically modulated light field under a preset voltage combination drive. Low-dimensional characterization vectors are extracted through principal component analysis to construct an interface optical response fingerprint library. Combined with the optical path mapping relationship model, piecewise inverse projection calculation is performed to generate high-fidelity three-dimensional point cloud data, enabling precise positioning of bubbles inside multi-layer heterogeneous lampshades.
It effectively overcomes the bottleneck of difficult decoupling of multi-layer interface coupling distortion, greatly improves the perception sensitivity and resolution of complex stacked structures, ensures that the offset of each pixel is accurately traced back to the real object space coordinates, and significantly improves the accuracy of topography reconstruction and the consistency of repeated positioning.
Smart Images

Figure CN123160660A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical metrology and three-dimensional reconstruction technology, and in particular to a three-dimensional positioning method for bubbles inside a lampshade based on transmission deflection. Background Technology
[0002] In the field of 3D bubble detection for multi-layered heterogeneous material structures such as complex lampshades and LED modules, current mainstream spatial positioning methods mostly rely on transmission deflection imaging combined with traditional 3D reconstruction methods. This involves measuring the deflection angle of light passing through the material's interior to infer the 3D coordinates of defects (such as bubbles). These methods generally assume that the material's optical interfaces are flat and that the refractive index is known and stable. They typically treat multi-layered structures as equivalent to a single refractive index volume or simplify them to considering only the first refraction correction at the main optical path interface. In industry practice, to achieve efficient detection of transparent structures such as composite material lampshades, some high-end production lines have introduced automated deflection optical path acquisition and image algorithm correction technologies. The development trend focuses on improving the degree of automation in detection, the speed of point cloud reconstruction, and the consistency of equipment between batches.
[0003] Representative technical solutions include: using deflection methods to measure minute changes in the image plane, combining a single material model for light path tracing, using multi-view synchronous imaging to improve 3D reconstruction accuracy, and combining structured light or machine learning methods for auxiliary calibration. These techniques perform well with homogeneous materials or materials with few layers and regular interface structures, and are suitable for common applications such as defect detection in transparent parts and rapid detection of large-size single-layer components. However, when dealing with multilayer heterogeneous composite materials, the actual refraction behavior of light at each interface far exceeds the prediction of the ideal model, leading to the following technical bottlenecks:
[0004] Existing 3D reconstruction methods often rely on single-refractive-index or simplified interlayer geometry models, easily neglecting complex factors such as refractive index gradients at multiple interfaces, actual interface tilt, and thickness errors. This leads to discrepancies between the optical path mapping model and the actual optical path. Under the influence of uncontrollable variables such as interface normals, microscopic warping, and batch-to-batch material variations, reconstruction errors significantly amplify with the number of material layers and interface complexity. This directly causes micro-defects such as bubbles to increase the error in 3D positioning coordinates, resulting in positioning drift, multiple solutions, or poor batch-to-batch consistency. Summary of the Invention
[0005] This application provides a three-dimensional positioning method for bubbles inside a lampshade based on transmission deflection, aiming to solve the problems mentioned in the background art, such as the increase in error of three-dimensional positioning coordinates due to minor defects, resulting in positioning drift, multiple solutions, or poor batch consistency.
[0006] This application provides a three-dimensional positioning method for bubbles inside a lampshade based on transmission deflection, specifically including:
[0007] S1: Obtain the dynamic modulated light field generated by the flexible programmable microstructure optical film under the drive of a preset voltage combination, and extract low-dimensional characterization vectors based on principal component analysis to construct an interface optical response fingerprint library.
[0008] S2: Based on the information bound in the interface optical response fingerprint database, perform region identification and processing on the original deflection image collected from the multilayer heterogeneous lampshade sample to obtain neighborhood data of the region of interest;
[0009] S3: Using the neighborhood data of the region of interest, apply a small step-increment voltage to the flexible programmable microstructure optical film to generate a local distortion response spectrum and perform nearest-neighbor matching with the interface optical response fingerprint database to output the actual interlayer interface parameters of the current lampshade.
[0010] S4: Divide the entire optical path into multiple optical path microsegments according to the actual interlayer interface parameters, and obtain the refraction behavior weight reorganization by querying and calculating each optical path microsegment. Based on the refraction behavior weight reorganization and the optical path microsegments, construct an optical path mapping relationship model.
[0011] S5: Apply the optical path mapping relationship model to the deflection angle data to perform segmented inverse projection calculation, generate three-dimensional point cloud data that has been adaptively corrected by the interface, and realize the three-dimensional positioning of the bubble inside the lampshade based on the three-dimensional point cloud data.
[0012] The method for three-dimensional positioning of bubbles inside a lampshade based on transmission deflection provided in this application has the following advantages:
[0013] This application introduces an electronically controlled liquid crystal microstructure optical film as a dynamically programmable "optical probe." Utilizing its arrayed independent control capability, it achieves millisecond-level high-speed phase modulation without mechanical moving parts, generating diverse modulation modes to actively excite the optical response characteristics of each layer interface of the lamp cover under test. This effectively overcomes the bottleneck of difficult decoupling of multi-layer interface coupling distortion under traditional fixed configurations, significantly improving the sensing sensitivity and resolution of non-uniform media within complex stacked structures, and solving the problems of interface cross-interference and parameter aliasing. Simultaneously, based on standard samples, an "interface optical response fingerprint library" is constructed. Combined with an optical path mapping model, the light path is divided into micro-segments according to medium type and interface orientation, and refraction behavior weights are applied to each segment before inverse projection calculation. This ensures that the offset of each pixel is accurately traced back to the real object space coordinates, ultimately outputting a high-fidelity 3D point cloud. This significantly improves the accuracy of topography reconstruction and the consistency of repeatability in complex lamp cover production line environments. It achieves a leap from passive imaging to active sensing and can be extended to the inspection of multi-layer transparent components such as automotive display covers, photovoltaic multilayer films, and aviation windows. Attached Figure Description
[0014] Figure 1This is the main flowchart of a three-dimensional positioning method for bubbles inside a lampshade based on transmission deflection.
[0015] Figure 2 This is a sub-flowchart of a method for three-dimensional positioning of bubbles inside a lampshade based on transmission deflection.
[0016] Figure 3 This is another sub-flowchart of a method for three-dimensional positioning of bubbles inside a lampshade based on transmission deflection. Detailed Implementation
[0017] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0018] The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0019] like Figure 1 As shown, this application provides a three-dimensional positioning method for bubbles inside a lampshade based on transmission deflection, specifically including:
[0020] S1: Obtain the dynamic modulated light field generated by the flexible programmable microstructure optical film under the drive of a preset voltage combination, and extract low-dimensional characterization vectors based on principal component analysis to construct an interface optical response fingerprint library.
[0021] S2: Based on the information bound in the interface optical response fingerprint database, the original deflection image collected from the multilayer heterogeneous lampshade sample is subjected to region identification and processing to obtain the neighborhood data of the region of interest.
[0022] S3: Using the neighborhood data of the region of interest, apply a small-step incremental voltage to the flexible programmable microstructure optical film, generate a local distortion response spectrum, and perform nearest-neighbor matching with the interface optical response fingerprint database to output the actual interlayer interface parameters of the current lampshade.
[0023] S4: Divide the entire optical path into multiple optical path microsegments according to the actual interlayer interface parameters, and obtain the refraction behavior weight reassembly by querying and calculating each optical path microsegment. Based on the refraction behavior weight reassembly and the optical path microsegments, construct an optical path mapping relationship model.
[0024] S5: Apply the optical path mapping relationship model to the deflection angle data to perform segmented inverse projection calculation, generate three-dimensional point cloud data that has been adaptively corrected by the interface, and realize the three-dimensional positioning of the bubble inside the lampshade based on the three-dimensional point cloud data.
[0025] S6: Evaluate the spatial coordinate positioning accuracy based on the three-dimensional point cloud data. If the positioning error exceeds the preset threshold, update the fingerprint binding information in the interface optical response fingerprint database to complete the dynamic adaptation optimization.
[0026] Step S1: Obtain the dynamically modulated light field generated by the flexible programmable microstructure optical film under a preset voltage combination drive, and extract low-dimensional characterization vectors based on principal component analysis to construct an interface optical response fingerprint database. Specifically, this includes:
[0027] S1.1: Obtain a preset voltage combination sequence of a standard multilayer heterogeneous lampshade sample and an arrayed electro-controlled liquid crystal microlens unit. Apply an independent voltage control signal to the arrayed electro-controlled liquid crystal microlens unit based on the preset voltage combination sequence to drive the arrayed electro-controlled liquid crystal microlens unit to switch to a smooth surface, convex surface, or concave surface state within a millisecond response time, thereby generating a dynamic modulated light field with a specific spatial phase distribution.
[0028] A standard multilayer heterogeneous lampshade sample with known thickness and refractive index parameters was selected as the calibration benchmark. The sample contains a PMMA (polymethyl methacrylate) layer and a PC (plastic sheet) layer. Its interface depth and normal angle were pre-determined and solidified by a high-precision coordinate measuring machine.
[0029] A preset voltage combination sequence is constructed for the arrayed electro-controlled liquid crystal microlens unit. This sequence covers a linearly increasing range from 0V to saturation voltage, with a step size of 0.1V, to ensure that each microlens unit can respond independently and switch to smooth, convex, or concave optical states.
[0030] By applying a preset voltage combination sequence frame by frame to the electrode array of the flexible programmable microstructure optical film through a high-voltage driving circuit, the equivalent radius of curvature of the microlens surface is reshaped within a millisecond-level response time by utilizing the birefringence effect and dielectric anisotropy of liquid crystal molecules.
[0031] Dynamically modulating the spatial phase distribution of the incident light field causes specific wavefront distortion in the light transmitted through the microstructure film, forming a structured light field with unique coding characteristics. This light field serves as an active probe for detecting the refractive behavior of multilayer media interfaces.
[0032] By processing the phase distribution of the optical field through voltage regulation, static illumination is transformed into a dynamic coded light source, generating a spatially phase-modulated optical field with high discriminative power. This enables precise and controllable excitation of the distortion mode of the subsequent transmitted beam, providing a standardized excitation source for constructing a highly robust interface optical response fingerprint library.
[0033] For example, the standard sample is composed of a 2mm thick PMMA layer and a 3mm thick PC layer, with an interface tilt angle of 0 degrees. The preset voltage sequence range is 0V-5V, with a step size of 0.1V, totaling 51 voltage states. The driving frequency is set to 1kHz, and the liquid crystal response time is less than 5ms. When a 2.5V voltage is applied, the microlens unit exhibits a semi-convex state, with an equivalent focal length of 50mm. The edge offset of the light spot generated in this state is significantly different from that in the 0V smooth state, and the signal-to-noise ratio is improved to over 40dB, effectively stimulating the interface refractive characteristics.
[0034] S1.2: Receive the transmitted light beam formed after the dynamic modulated light field penetrates the standard multilayer heterogeneous lampshade sample, and use a high-resolution industrial camera to simultaneously acquire the characteristic light spot diffusion pattern and edge offset data generated by the transmitted light beam on the imaging plane. Perform pixel-level gray-scale quantization processing on the characteristic light spot diffusion pattern and edge offset data to generate an original reference distortion image sequence containing hundreds of preset phase modulation modes.
[0035] The system receives the transmitted light beam after it has passed through a standard multilayer heterogeneous lampshade sample via a dynamically modulated light field. A high-resolution industrial camera simultaneously acquires the light spot diffusion morphology and edge offset data on the imaging plane. De-mosaic processing is performed on the acquired raw images, converting the Bayer format data (raw image data output from the camera sensor) into an RGB full-color image to eliminate color aliasing interference. The green channel grayscale value is extracted as the main intensity information to construct an initial light intensity distribution matrix, suppressing the influence of color noise on edge detection. A Gaussian smoothing filter is applied to the initial light intensity distribution matrix for convolution, with a standard deviation of 1.5 pixels, to remove high-frequency shot noise and generate a smoothed light intensity image. The Canny operator (a multi-level edge detection algorithm) is used to detect gradient abrupt changes in the smoothed light intensity image, setting a high-to-low threshold ratio of 3:1 to extract the set of light spot edge contour coordinates. The radial displacement of the edge contour relative to the ideal reference center is calculated to generate an edge offset vector field, quantifying the degree of light deflection. Histogram equalization is performed on the smoothed light intensity image to enhance the grayscale dynamic range in low-contrast areas and highlight subtle distortion features. The edge offset vector field is fused with the equalized grayscale image through channels to construct a multidimensional feature map containing geometric distortion and intensity variations. The acquisition and processing steps are repeated for all preset voltage combinations, and the processing results for each frame are stored as a time series. Through pixel-level grayscale quantization and edge vector extraction, the dynamically modulated light field generated in the previous step is transformed into a sequence of original reference distortion images containing hundreds of preset phase modulation modes, thus achieving a digital representation of the light field response characteristics.
[0036] For example, a CMOS industrial camera with a resolution of 4096x3072 was used, with a frame rate set to 60fps and an exposure time fixed at 5ms. A stepped voltage sequence from 0V to 5V was applied to the PMMA / PC bilayer standard sample, with a step size of 0.1V, generating 500 voltage combinations. Images were acquired for each combination, and after Bayer-to-RGB conversion and green channel extraction, a 4096x3072 grayscale matrix was obtained. A Gaussian kernel filter with σ=1.5 was applied, improving the signal-to-noise ratio by 12dB. Canny edge detection extracted approximately 2000 edge points, and their radial deviation relative to the theoretical center was calculated, with a maximum deviation of 15 pixels. Histogram equalization expanded the grayscale dynamic range from 0-180 to 0-255. Finally, a sequence of 500 original reference distortion images was generated, each containing complete edge offset vectors and enhanced grayscale information for subsequent fingerprint database construction.
[0037] S1.3: Read the image data of each frame in the original reference distorted image sequence, extract the local texture features and gradient direction histogram of the light spot region in each frame image based on the sliding window method, and concatenate the extracted local texture features and gradient direction histogram into a high-dimensional distortion feature vector to construct a high-dimensional distortion feature dataset covering the light field response characteristics under all preset voltage combinations.
[0038] Each frame of image data from the original reference distorted image sequence is read, the center coordinates of the light spot are located, and a sliding window region containing the complete diffusion pattern is delineated. Within the sliding window, the gradient magnitude and direction of pixel grayscale values are calculated, and a local gradient histogram is constructed to characterize the nonlinear distortion features of the light spot edge. Local binary pattern texture features within the window are extracted to quantify the microstructural changes in the grayscale distribution inside the light spot. The gradient direction histogram vector and the local texture feature vector are concatenated to form a high-dimensional distortion feature vector. The feature extraction and concatenation operations are repeated for all image frames corresponding to preset voltage combinations. Through the above processing method, the original image data is transformed into a high-dimensional distortion feature dataset covering the light field response characteristics, realizing the digital fingerprint encoding of the light field modulated by the microstructure film.
[0039] For example, the sliding window size is set to 16×16 pixels with a step size of 4 pixels. An 8-directional gradient histogram is calculated for each frame, generating a 64-dimensional gradient feature vector. Rotation-invariant local binary pattern features are extracted to generate a 59-dimensional texture feature vector. These two vectors are concatenated to obtain a 123-dimensional high-dimensional distortion feature vector. For 500 preset voltage combinations, a 500×123-dimensional high-dimensional distortion feature dataset is constructed. This dataset fully records the morphological evolution of light spots under different voltage driving conditions, providing a data foundation rich in interface refraction information for subsequent principal component analysis dimensionality reduction, significantly improving the discriminative power of feature representation.
[0040] S1.4: Input the high-dimensional distortion feature dataset into the principal component analysis method module, perform covariance matrix calculation and eigenvalue decomposition operations, remove redundant noise components and retain the principal component basis whose cumulative contribution rate exceeds the preset threshold, project the high-dimensional distortion feature vector onto the low-dimensional subspace formed by the principal component basis, and generate a low-dimensional representation vector that represents the unique spot distortion mode under each voltage configuration.
[0041] The system receives the high-dimensional distortion feature dataset constructed in S1.3, which contains spliced vectors of spot textures and gradient histograms under hundreds of voltage configurations. Zero-mean normalization is performed on the high-dimensional feature matrix to eliminate the baseline grayscale shift caused by different voltage levels, ensuring statistical unbiasedness in subsequent covariance calculations. The covariance matrix of the decentralized feature matrix is calculated to quantify the linear correlation between feature variables of each dimension, revealing the distribution of spot distortion patterns in multidimensional space. Eigenvalue decomposition is performed on the covariance matrix to extract eigenvalues arranged in descending order of numerical value and their corresponding orthogonal eigenvectors, forming a principal component basis set describing the main directions of data variation. Principal components are selected based on a preset cumulative contribution rate threshold, eliminating noise components corresponding to small eigenvalues and retaining the key principal component subset that can explain most of the distortion variation information. The original high-dimensional distortion feature vector is projected onto a low-dimensional subspace composed of the selected principal components, and the data dimension is compressed through linear transformation to generate a compact and denoised low-dimensional representation vector. Principal component analysis is used to reduce the dimensionality of the high-dimensional redundant data from the previous step, transforming it into low-dimensional independent representation vectors. This enables efficient encoding and noise suppression of the interface optical response fingerprint, providing a robust feature foundation for subsequent fingerprint database matching.
[0042] For example, for a PMMA / PC dual-layer lampshade sample, images were acquired under 200 voltage combinations, and a 1024-dimensional high-dimensional feature vector was extracted from each frame. A 200×1024 feature matrix was constructed, and after zero-mean normalization, a 1024×1024 covariance matrix was calculated. Eigenvalue decomposition was performed, and the principal components corresponding to the top 15 largest eigenvalues were selected, with a cumulative contribution rate of 98.5%. The original 1024-dimensional vector was projected onto a 15-dimensional subspace to generate a 15-dimensional low-dimensional representation vector. This process effectively eliminated high-frequency interference caused by sensor thermal noise and ambient light fluctuations, reducing the fingerprint database storage capacity by 98%, while maintaining the ability to sensitively distinguish changes in the interface tilt angle of 0.1 degrees, significantly improving the computational efficiency and noise resistance of the subsequent matching stage.
[0043] S1.5: Associate the low-dimensional representation vector with the known true interface depth value and interface normal angle parameter of the standard multilayer heterogeneous lampshade sample. Based on the key-value pair mapping mechanism, use each low-dimensional representation vector as an index key and the corresponding true interface depth value and interface normal angle parameter as binding values for structured storage, and construct an interface optical response fingerprint library with bidirectional mapping capability of interface position and distortion fingerprint.
[0044] The set of low-dimensional representation vectors generated after dimensionality reduction through principal component analysis is read and used as the index key value basis for the fingerprint database. The true interface depth values and interface normal angle parameters, calibrated under precision measurement equipment, are extracted from standard multilayer heterogeneous lampshade samples and used as the binding ground truth data for the fingerprint database. A key-value pair data structure based on a hash mapping mechanism is established, setting each unique low-dimensional representation vector as the retrieval key, and combining the corresponding true interface depth value and interface normal angle parameter into a composite value object. Data integrity verification is performed to ensure that each low-dimensional representation vector is uniquely associated with a set of physical interface parameters, eliminating ambiguous mapping conflicts. The verified key-value pairs are serialized into a structured binary data stream and written to a non-volatile storage medium, forming an interface optical response fingerprint database with fast retrieval capabilities. Through the above key-value pair mapping and structured storage processing, the low-dimensional feature vectors from the previous step are transformed into directly callable interface geometric parameter indices, achieving a precise two-way mapping from optical distortion modes to physical spatial parameters, providing a high-confidence reference benchmark for interface parameter inversion in subsequent real-time detection.
[0045] like Figure 2 As shown, step S2 involves: based on the information bound in the interface optical response fingerprint database, performing region identification and processing on the original deflection image collected from the multilayer heterogeneous lampshade sample to obtain neighborhood data of the region of interest. Specifically, this includes:
[0046] S2.1: Acquire the original deflection image of the multilayer heterogeneous lampshade sample acquired by the transmission deflection imaging system, and perform spatial filtering processing based on principal component analysis dimensionality reduction features on the original deflection image to eliminate environmental noise interference and enhance the contrast of the light spot edge, thereby generating denoised and enhanced deflection image data.
[0047] The original deflection image of the multilayer heterogeneous lampshade sample acquired by the transmission deflection imaging system is obtained. This image contains information on the complex light intensity distribution and phase distortion caused by multilayer interface refraction and bubble defects.
[0048] The original deflected image is subjected to pixel-level grayscale normalization to eliminate background gradient interference caused by uneven light source brightness, and the image data is mapped to the standard dynamic range to generate a standardized grayscale matrix.
[0049] A local covariance calculation model based on a sliding window is constructed. The neighborhood of each pixel in the standardized gray-level matrix is traversed, and the mean and variance of the pixel values within the window are calculated. The second-order statistical feature map reflecting the drastic changes in local texture is extracted.
[0050] Principal component analysis is introduced to reduce the dimensionality of high-dimensional local texture features. The feature covariance matrix is calculated and its eigenvalues and eigenvectors are solved. Principal component basis with a cumulative contribution rate exceeding a preset threshold is selected.
[0051] The image signal is reconstructed using the reduced low-dimensional features, noise components corresponding to small feature values are removed, and the main structural information representing the edge of the spot and the boundary of the defect is retained.
[0052] The reconstructed image is subjected to nonlocal mean filtering, and a weighted average is applied based on pixel block similarity to further suppress shot noise while maintaining edge sharpness, generating denoised and enhanced deflection image data.
[0053] By using spatial filtering based on principal component analysis dimensionality reduction features, the original deflection image from the previous step is transformed into denoised and enhanced deflection image data, achieving the expected technical effect of eliminating environmental noise interference and significantly enhancing the contrast of the light spot edges.
[0054] For example, for a PMMA / PC double-layer lampshade sample, a raw deflection image with a resolution of 2048×2048 was acquired. The sliding window size was set to 5×5 pixels, and the step size was 1 pixel. After calculating the local covariance matrix, PCA dimensionality reduction was performed, and the first three principal components were selected, whose cumulative contribution rate reached over 95%. The image was reconstructed using these three principal components, effectively filtering out high-frequency random noise. Subsequently, nonlocal mean filtering was applied, with a search window size of 7×7 and a similarity weight threshold set to 0.01. The signal-to-noise ratio of the processed image was significantly improved, the gradient amplitude of the bubble edge was enhanced by about 3 times, and the background texture and defect signal were clearly separated, providing high-quality input for subsequent morphological processing.
[0055] S2.2: Based on the denoised and enhanced deflection image data, the real interface depth and normal information bound in the interface optical response fingerprint database are called as geometric constraints to perform multi-scale morphological gradient operation on the denoised and enhanced deflection image data to separate the background texture and potential defect signals and generate candidate defect binarized mask data.
[0056] Read the denoised and enhanced deflection image data and use it as the input matrix for morphological gradient operations.
[0057] The interface optical response fingerprint database is invoked to retrieve the actual interface depth value and interface normal angle parameter that match the current detection area.
[0058] Based on the retrieved interface normal angle, an anisotropic structural element is constructed. The axis of this structural element is consistent with the interface normal direction to adapt to the geometric characteristics of the multilayer material interface.
[0059] Multi-scale morphological gradient operations are performed on the denoised and enhanced deflected image, and the dilation and erosion maps of the image are calculated using structuring elements of different sizes.
[0060] Calculate the difference between the dilation map and the erosion map to generate an initial gradient magnitude map that reflects drastic changes in local grayscale.
[0061] An interface depth weighting factor is introduced to perform spatial weighting on the initial gradient magnitude map, thereby suppressing pseudo gradient signals caused by background texture.
[0062] A dynamic threshold is set to convert the weighted gradient magnitude map into a binary image, where high gradient regions are marked as potential defect foregrounds and low gradient regions are marked as backgrounds.
[0063] Perform connected component analysis on the binarized image to remove noise spots with an area smaller than the preset minimum bubble projection area.
[0064] By using multi-scale morphological gradient operations and interface geometric constraint weighting, the denoised and enhanced deflected image is transformed into candidate defect binarized mask data, thus achieving effective separation of background texture and potential defect signals.
[0065] S2.3: Utilizing the connected domain topological features in the candidate defect binarized mask data, and combining the interlayer refractive index gradient distribution model provided by the interface optical response fingerprint database, adaptive threshold segmentation and artifact removal logic judgment processing are performed on the candidate defect binarized mask data to eliminate false bright areas caused by material impurities and generate a high-confidence bubble initial positioning coordinate set.
[0066] Read the candidate defect binarized mask data, traverse the pixel matrix using the connected component labeling method, and extract the area, perimeter, circularity, and Euler number topological feature parameters of each independent connected region.
[0067] The interlayer refractive index gradient distribution model bound in the interface optical response fingerprint library is called to obtain the theoretical refractive index difference and light intensity attenuation coefficient of the PMMA and PC material interface corresponding to the current detection area.
[0068] An artifact discrimination function is constructed based on the refractive index gradient model. The deviation ratio between the mean gray value of each connected region and the theoretical background light intensity is calculated to quantify the probability weight caused by impurity scattering in that region. The formula is as follows:
[0069]
[0070] in, For artifact probability weights, To observe the grayscale mean, For theoretical background light intensity, This is the refractive index gradient correction factor.
[0071] An adaptive threshold segmentation boundary is set, and connected components with a circularity greater than a preset spherical threshold and an artifact probability weight lower than the noise tolerance upper limit are identified as real bubble candidate targets.
[0072] High-brightness artifact regions that do not meet geometric constraints or have abnormal grayscale are eliminated, while effective connected regions that conform to the optical propagation characteristics of multilayer media are retained.
[0073] Extract the centroid coordinates and equivalent diameters of the effective connected components and encapsulate them into a high-confidence bubble initial positioning coordinate set.
[0074] By using adaptive threshold segmentation and artifact removal logic, the candidate defect binarized mask data from the previous step is transformed into a high-confidence bubble initial positioning coordinate set, achieving the expected technical effect of eliminating material impurity interference and improving the accuracy of defect identification.
[0075] S2.4: Based on the initial positioning coordinate set of the high-confidence bubble, and according to the optimal detection field of view radius parameter defined in the interface optical response fingerprint database, perform dynamic window cropping and spatial neighborhood expansion processing on the denoised and enhanced deflection image data to construct a local image patch covering the bubble and its surrounding interface transition area, and generate region of interest neighborhood data containing bubble position information.
[0076] The center pixel coordinates of the initial positioning coordinate set of the high-confidence bubble are read and used as the geometric center reference point for dynamic window cropping. The optimal detection field of view radius parameter, pre-stored in the interface optical response fingerprint database, is queried. This parameter is set based on the effective modulation range of the microstructure optical film and the camera's depth-of-field characteristics to ensure coverage of the bubble and its surrounding interface transition zone. A rectangular region of interest boundary is defined on the denoised and enhanced deflected image data, with the center pixel coordinates as the origin and the optimal detection field of view radius as half the side length. Image matrix slicing is performed to extract the pixel grayscale array within the boundary, forming local image patch data. Spatial neighborhood expansion processing is applied to the local image patch data, extending a buffer band of a preset pixel width outward to capture edge distortion features caused by changes in the interface refractive index gradient. The expanded local image patch is mapped and associated with the original global coordinate system, recording its absolute position index in the original image. Through dynamic window cropping and spatial neighborhood expansion processing, the bubble coordinates from the previous step are transformed into local image patch data containing complete interface context information, achieving high-precision local optical field sensing for multi-layered heterogeneous interfaces and providing focused data input for subsequent voltage scanning.
[0077] For example, assuming the initial positioning coordinates of the bubble are (u=512, v=384), and the optimal detection field of view radius defined by the interface optical response fingerprint database is 64 pixels, the system extracts an image region within the range of [448, 576] × [320, 448] centered at (512, 384). Then, a 16-pixel buffer band is extended outwards, ultimately generating a local image patch of size [432, 592] × [304, 464]. This image patch completely covers the bubble body and the surrounding PMMA / PC interface transition area, eliminating global background noise interference and significantly improving the signal-to-noise ratio of subsequent local distortion response map feature extraction.
[0078] S2.5: Based on the neighborhood data of the region of interest containing bubble position information, the standard distortion pattern index in the interface optical response fingerprint database is mapped, and feature vector encoding and metadata encapsulation processing are performed on the neighborhood data of the region of interest containing bubble position information to form a standardized input data packet for subsequent voltage scanning module to call, and the final region identification result data stream is output.
[0079] Step S3: Using the neighborhood data of the region of interest, a small-step incremental voltage is applied to the flexible programmable microstructure optical film to generate a local distortion response map. This map is then matched with the nearest neighbor of the interface optical response fingerprint database to output the actual interlayer interface parameters of the current lampshade. Specifically, this includes:
[0080] S3.1: Based on the spatial range determined by the neighborhood data of the region of interest, apply a small step-increment voltage to the arrayed electro-controlled liquid crystal microlens unit in the flexible programmable microstructure optical film to generate a dynamic modulated light field with continuous phase gradient changes, thereby obtaining a local distortion response original image sequence containing multi-level refractive state information.
[0081] The spatial coordinate boundaries in the neighborhood data of the region of interest are analyzed to determine the physical activation range of the corresponding arrayed electro-controlled liquid crystal microlens units on the flexible programmable microstructure optical film. Based on a preset voltage scan step size and response time constant, a small-step incremental voltage control sequence is generated for the microlens units within the activation range. This sequence covers a continuous phase modulation interval from the smooth state to the maximum curvature state. A synchronous trigger signal is sent to the array driving circuit, and the voltage control sequence is applied sequentially in a time-slice polling manner, driving the microlens units to undergo liquid crystal molecule rearrangement within milliseconds, changing the local refractive index distribution to form a dynamically changing phase gradient field. A high-resolution industrial camera is used to synchronously acquire transmitted light spot images at each voltage stabilization moment, recording the distortion morphology of light after passing through the current multi-layer heterostructure interface, forming a raw image frame sequence containing multi-level refractive state information. The raw image frame sequence is timestamped and spatially aligned to eliminate inter-frame displacement errors caused by mechanical vibration or light source fluctuations, ensuring spatial consistency for subsequent feature extraction. By using dynamic phase modulation and synchronous acquisition processing, the spatial range determined in the previous step is transformed into a sequence of original images of local distortion response containing rich interface refraction response information, thus realizing fine sampling of the optical properties of multilayer material interfaces.
[0082] For example, for a 5x5 microlens array unit corresponding to the ROI (Region of Interest), the voltage scan range was set from 0V to 5V with a step size of 0.1V, for a total of 51 voltage levels. Each voltage level was held for 2ms, with a total scan time of approximately 260ms. The camera simultaneously acquired 250 frames of raw images at a frame rate of 500fps. For the 25th frame (voltage 1.2V), the center pixel grayscale value was extracted to be 128, and the edge offset was 3.5 pixels. This sequence fully records the nonlinear response of interface refraction to voltage changes, providing a high signal-to-noise ratio data foundation for subsequent fingerprint matching and significantly improving the robustness of interface parameter inversion.
[0083] S3.2: Perform grayscale normalization and edge enhancement processing on the original image sequence of the local distortion response, extract the feature vector of light spot diffusion morphology and the feature vector of edge offset, and fuse the two to construct a local distortion response map to quantitatively characterize the nonlinear deflection behavior of light passing through the interface of a multilayer medium under different voltage driving.
[0084] The system receives the original image sequence of local distortion response generated by S3.1. This sequence contains nonlinear deflection information of light passing through the interface of a multi-layer medium under different voltage driving conditions. Gray-level histogram equalization is performed on the original image sequence to eliminate brightness unevenness caused by fluctuations in light source intensity, generating standardized gray-level image data. The Canny edge detection operator is used to calculate the gradient of the standardized gray-level image, setting high and low thresholds to suppress noise and retain weak edge features, extracting a sub-pixel-level set of edge coordinates for the light spot contour. Based on the edge coordinate set, a feature descriptor for the light spot diffusion morphology is constructed, including centroid offset, the ratio of the major axis to the minor axis, and the ellipse fitting residual, forming a light spot diffusion morphology feature vector. The gray-level difference matrix between the standard reference image and the current distorted image at corresponding pixel positions is calculated, the pixel displacement field of the edge region is extracted, and the lateral offset of light passing through the interface is quantified, generating an edge offset feature vector. The light spot diffusion morphology feature vector and the edge offset feature vector are concatenated to construct a local distortion response map. Through the above processing method, the original image sequence of the previous step is transformed into high-dimensional feature data containing geometric deformation and photometric changes, realizing the quantitative characterization of the nonlinear deflection behavior of multi-layer interfaces, and providing high-precision input for subsequent fingerprint database matching.
[0085] For example, histogram equalization is performed on a local image sequence with a resolution of 512x512 pixels to expand the grayscale dynamic range to 0-255. Using the Canny operator, with a Gaussian kernel standard deviation of 1.5, a low threshold of 30, and a high threshold of 100, the edges of the light spots are extracted. The calculated centroid offset is (2.3, -1.5) pixels, the major-minor axis ratio is 1.2, and the fitting residual is 0.05. The edge offset vector is extracted, with an average displacement of 3.2 pixels. The above 8-dimensional morphological features are concatenated with the 64-dimensional offset features to form a 72-dimensional local distortion response map. This map accurately reflects the refractive characteristics of the PMMA / PC interface under specific voltages, significantly improving the discriminative power of subsequent matching.
[0086] S3.3: The local distortion response map is compared with the low-dimensional representation vector bound in the interface optical response fingerprint database using the nearest neighbor matching method. The target fingerprint entry with the smallest Euclidean distance is selected to lock the standard reference pattern that is closest to the actual optical characteristics of the current lampshade.
[0087] The system receives the local distortion response map generated by S3.2 and decomposes it into sub-feature vector sequences corresponding to different voltage scanning steps. It then iterates through the interface optical response fingerprint database, extracting all standard low-dimensional representation vectors and their associated metadata indices. The system aligns and matches the current sub-feature vector to be tested with each standard low-dimensional representation vector in the fingerprint database. It calculates the geometric similarity distance between the tested vector and the standard vector using the Euclidean distance metric. The calculated distance values are sorted, and the smallest distance value is identified. The fingerprint database entry corresponding to this smallest distance value is then locked as the target fingerprint entry. Through nearest neighbor matching, the high-dimensional local distortion response features are transformed into a unique target fingerprint index, achieving precise locking of the standard reference pattern that most closely matches the actual optical characteristics of the current lamp cover.
[0088] S3.4: Based on the pre-stored mapping relationship in the target fingerprint entry, reversely parse and output the actual interlayer interface parameters of the current lampshade. The parameters explicitly include the thickness deviation values of each layer of material, the interface tilt angle values, and the refractive index gradient distribution values, which serve as the direct input basis for constructing the optical path mapping relationship model.
[0089] Read the target fingerprint entry selected in step S3.3. This entry contains the standard reference pattern index that best matches the local optical response of the current lamp cover and the pre-stored interface geometry parameter mapping table.
[0090] The key-value pair data in the target fingerprint entry is parsed to extract the standard interface depth reference value, normal vector reference value and refractive index distribution model identifier bound to the low-dimensional representation vector.
[0091] Obtain the actual measured deviation of the light spot diffusion morphology and the residual value of the edge offset from the local distortion response spectrum generated in step S3.2.
[0092] Based on a pre-defined nonlinear compensation method, the actual measurement deviation is mapped to the correction coefficient space of the standard reference mode, and the interface depth fine-tuning factor and normal angle rotation matrix are calculated.
[0093] By using Snell's law to inversely derive the model and combining iterative optimization of the standard interface parameters with correction coefficients, the true physical coordinates of the interfaces of each material layer are solved.
[0094] The interface thickness deviation correction amount is calculated using the following formula:
[0095]
[0096] in, This is the correction amount for interface thickness deviation. To calibrate the sensitivity coefficients of the system, This represents the edge offset residual value.
[0097] Based on the calculated thickness deviation correction, the equivalent optical thickness value of each medium layer in the multilayer structure is updated.
[0098] By combining the normal angle rotation matrix, a spatial rotation transformation is performed on the interface normal vector to obtain the actual normal angle value that takes into account the interface tilt effect.
[0099] The material optical property database is queried, the basic refractive index is obtained according to the refractive index distribution model identifier, and the gradient correction method is applied to calculate the refractive index gradient distribution value at the interface.
[0100] The updated values of thickness deviation, interface tilt angle, and refractive index gradient distribution of each layer are integrated and encapsulated into actual interlayer interface parameters in a standard data structure format.
[0101] By using reverse analysis and parameter correction, the target fingerprint entries are transformed into actual interlayer interface parameters containing precise geometric and optical properties, achieving the expected technical effect of providing a high-precision input basis for the optical path mapping relationship model.
[0102] Step S4: Divide the entire optical path into multiple optical path micro-segments according to the actual interlayer interface parameters, and obtain the refraction behavior weight reassembly by querying and calculating each optical path micro-segment. Based on the refraction behavior weight reassembly and the optical path micro-segments, construct an optical path mapping relationship model. Specifically, this includes:
[0103] S4.1: Based on the thickness deviation values of each layer of material and the tilt angle values of the interface contained in the actual interlayer interface parameters, the entire transmission optical path is spatially discretized to generate a sequence of optical path micro-segments composed of multiple continuous optical path micro-segments with clear start and end boundaries, wherein each optical path micro-segment corresponds to a specific medium type identifier.
[0104] Receive the actual interlayer interface parameters output by S3.4, and extract the thickness deviation values of each layer of material, the interface tilt angle values, and the refractive index gradient distribution values contained therein.
[0105] Construct a three-dimensional Cartesian coordinate system, define the light source plane as the Z=0 plane, and the camera optical axis direction as the positive Z-axis direction to establish a global spatial reference frame.
[0106] Based on the interface tilt angle, the projection components of the normal vector of each medium interface on the XOY plane are calculated to determine the geometric orientation of the interface in three-dimensional space.
[0107] The actual physical thickness of each medium layer in the current detection area is calculated based on the algebraic sum of the nominal thickness and thickness deviation of each layer.
[0108] The transmission optical path is discretized and sliced along the Z-axis, and several continuous optical path micro-segments are divided with the coordinates of the intersection point of two adjacent heteromaterial interfaces as boundary nodes.
[0109] The starting and ending surfaces of each optical microsegment correspond to the exit surface of the upper interface and the incident surface of the lower interface, respectively, ensuring the uniformity of the internal medium properties of the microsegment.
[0110] For cases where the interface is tilted, the precise coordinates of the intersection point between the ray and the tilted interface are solved using plane equations to correct the spatial start and end boundaries of the light path micro-segment.
[0111] A sequence of optical path micro-segments is generated, consisting of multiple segments with clearly defined start and end boundary coordinates, length vectors, and medium identifiers, forming a discretized spatial topology.
[0112] For example, for a PMMA / PC double-layer lampshade, the nominal thickness of the PMMA layer is set to 2mm, with a measured deviation of +0.05mm, and the nominal thickness of the PC layer is set to 1.5mm, with a measured deviation of -0.02mm. The interface tilt angle is 0.5 degrees around the X-axis. The system calculates the actual thickness of PMMA to be 2.05mm and the actual thickness of PC to be 1.48mm. The optical path is divided into five micro-segments along the Z-axis: air-PMMA interface, PMMA interior, PMMA-PC interface, PC interior, and PC-air interface. The tilted interface coordinates are calculated using the plane equation z=tan(0.5°)·y to correct the micro-segment boundaries. The output is a sequence of optical path micro-segments containing the vertex coordinates and length vectors of the five micro-segments, achieving accurate discretization mapping of the optical path space and providing a geometric basis for subsequent refractive index loading.
[0113] S4.2: Using the specific medium type identifier corresponding to each optical path microsegment in the optical path microsegment sequence, query the preset material optical property database to obtain the set of basic refractive index values that are bound one-to-one with each optical path microsegment, as the basic physical quantity input for calculating the light deflection behavior.
[0114] Each microsegment in the received optical path microsegment sequence is bound to a specific medium type identifier, which serves as an index key for querying a pre-set material optical property database. This identifier corresponds to a specific material category such as PMMA, PC, or air, ensuring the accuracy of subsequent physical parameter acquisition.
[0115] Based on the medium type identifier, a precise matching search is performed in the material optical property database to extract the reference refractive index value corresponding to the micro-segment. The database stores the dispersion curves and temperature compensation coefficients of various transparent materials at standard wavelengths to eliminate the influence of environmental factors on optical constants.
[0116] To address the refractive index gradient variation at the multilayer heterogeneous interface, a nonlinear interpolation method is used to fine-tune the reference refractive index. Based on the interface tilt angle and thickness deviation output from previous steps, the effective propagation path length of light within the current micro-segment is calculated, correcting the equivalent refractive index drift caused by interface non-parallelism.
[0117] The corrected refractive index value is bound to the spatial geometric coordinates of the micro-segment to generate a structured data element containing position, medium properties, and optical constants. This data element explicitly defines the attenuation factor of light propagation speed within the micro-segment, providing accurate physical quantity inputs for subsequent Snell's law calculations.
[0118] Through the above data retrieval and dynamic correction processing, discrete medium type identifiers are transformed into a continuous and high-precision set of basic refractive index values, realizing the digital reconstruction of the complex optical path physical properties inside multilayer heterogeneous materials, and significantly reducing the optical path calculation deviation caused by material parameter assumption errors.
[0119] For example, when the optical path micro-segment is identified as "PC layer - segment 2", the system queries the database to obtain the reference refractive index of polycarbonate at a wavelength of 550nm, which is 1.585. Combining the interface tilt angle of 2.5 degrees and thickness deviation of 0.02mm output from S3.4, dispersion correction is performed using the Sellmeier equation (an empirical equation describing the relationship between refractive index and wavelength in a specific transparent medium), calculating the effective refractive index of this micro-segment to be 1.5862. This value is then bound to the micro-segment's start and end coordinates (10.5, 20.3, 1.2) to (10.8, 20.6, 1.5) to form complete optical attribute data elements. Practical verification shows that this correction method reduces the single-layer optical path calculation error from 0.05mm to 0.008mm, significantly improving the geometric accuracy of subsequent 3D reconstruction.
[0120] S4.3: Based on the set of basic refractive index values and the interface normal information in the actual interlayer interface parameters, perform Snell's law weighted calculation to generate a refraction behavior weighted reassembly that characterizes the degree of direction change of light when passing through the interfaces of different optical path micro-segments. This refraction behavior weighted reassembly quantifies the contribution of each micro-segment to the cumulative optical path error.
[0121] The fundamental refractive index values and interface normal vector information of adjacent media in the optical path micro-segment sequence are obtained as physical boundary conditions for Snell's law calculation.
[0122] For each optical path micro-segment interface, a geometric relationship model between the incident ray direction vector and the interface normal vector is constructed, and the cosine value of the incident angle is calculated to determine the ray projection angle.
[0123] A nonlinear mapping equation between the incident angle and the refraction angle is established using Snell's law of refraction, where the refractive index of the incident medium is... The refractive index of the exit medium is The angle of incidence is The angle of refraction is It satisfies the formula: .
[0124] Based on the above equation, the sine value of the refraction angle is solved, and the three-dimensional direction vector of the outgoing light ray is reconstructed by combining the interface normal vector, so as to achieve accurate deflection correction of the light propagation direction.
[0125] Calculate the phase abrupt change and optical path deviation of the light at the interface, and generate a refraction behavior weighting coefficient that characterizes the contribution of the micro-segment to the cumulative error of the overall optical path.
[0126] By traversing all optical path micro-segment interfaces, the refraction behavior weight coefficients of each interface are assembled in spatial topological order to form a complete refraction behavior weight reassembly.
[0127] By using Snell's law for weighted calculation, the basic refractive index and interface normal information are transformed into a weighted reorganization of refractive behavior that quantifies the degree of light deflection, thereby achieving segment-by-segment accurate compensation for optical path propagation errors in multilayer heterogeneous materials.
[0128] S4.4: Based on the refraction behavior weight reorganization and the spatial topology of the optical path micro-segment sequence, perform dynamic loading and association mapping operations to construct a multi-dimensional data structure containing position coordinates, medium properties and deflection weights, namely an optical path mapping relationship model. This model realizes the mathematical mapping from pixel plane offset to the real path in object space.
[0129] The refraction behavior weight reassembly generated by S4.3 and the optical path micro-segment sequence constructed by S4.1 are received as the input basis for constructing a multidimensional data structure.
[0130] A three-dimensional tensor data structure containing spatial coordinate indexes, medium optical property identifiers, and deflection weight coefficients is established, and the mapping and association pointers of each micro-segment are initialized.
[0131] Traverse the sequence of optical path micro-segments and, based on the topological order of the micro-segments in the transmission path, write the corresponding medium refractive index values and interface normal vectors into the attribute fields of the structure.
[0132] The refraction behavior weights calculated in S4.3 are dynamically loaded into the weight coefficient field of the corresponding micro-segment to establish the priority of direction correction when light passes through the micro-segment.
[0133] A linear interpolation method is used to process the boundary transition region between adjacent micro-segments, generating a continuous optical path gradient distribution matrix and eliminating the step error caused by discretization.
[0134] By performing matrix multiplication, the two-dimensional offset vector on the pixel plane is mapped to the three-dimensional coordinate basis vector in the object space, thus establishing the inverse projection transformation matrix from the image point to the object point.
[0135] The transformation matrix is verified by singular value decomposition to ensure numerical stability and reversibility under multi-interface refraction conditions, and the final determined optical path mapping relationship model is output.
[0136] Through the above dynamic loading and associated mapping process, discrete micro-segment parameters are transformed into a continuous optical path mapping model with physical meaning, realizing accurate mathematical mapping from pixel offset to real object space coordinates, and significantly improving the geometric restoration accuracy of bubble positioning in multilayer heterogeneous materials.
[0137] For example, for a PMMA / PC double-layer lampshade, the PMMA layer thickness is set to 2.5mm with a refractive index of 1.49, and the PC layer thickness is set to 1.8mm with a refractive index of 1.58. The system identifies three optical path micro-segments: the air-PMMA interface, the interior of the PMMA layer, and the PMMA-PC interface. The normal angles of each interface (e.g., a 0.5-degree tilt) and the refractive index differences are substituted into Snell's law to calculate the weights, constructing a 3x3xN dimensional mapping tensor. After singular value decomposition verification, the condition number is controlled to be within 10. 3 Within this range, the inverse transformation stability is ensured. The final model accurately backtracks the 0.05mm offset at camera pixel (1024,768) to the object coordinates (x=12.34mm, y=5.67mm, z=3.12mm). Compared with the traditional single refractive index model, the Z-axis positioning error is reduced from 0.15mm to 0.02mm, significantly improving the reconstruction robustness under complex interfaces.
[0138] Step S5: The optical path mapping model is applied to the deflection angle data to perform piecewise inverse projection calculation, generating 3D point cloud data that has been adaptively corrected by the interface. Based on the 3D point cloud data, the 3D positioning of the bubble inside the lampshade is achieved. Specifically, this includes:
[0139] S5.1: Based on the medium layering parameters and interface normal information defined in the optical path mapping relationship model, the pixel offset vector field in the original deflection image is spatially discretized, and the continuous optical path propagation path is divided into multiple micro-segment optical path units corresponding to the number of material layers, so as to obtain discretized optical path sequence data containing the starting position and direction vector of each micro-segment.
[0140] The medium layering parameters and interface normal information in the optical path mapping model are read and used as geometric constraints for spatial discretization. The offset vector of each pixel in the original deflection image is extracted to construct a two-dimensional pixel offset vector field, which represents the total deflection of light rays in the image plane.
[0141] Based on the thickness deviation of each layer of material and the interface tilt angle defined in the model, a three-dimensional geometric topology of the multi-layer medium is established in the object space, and the physical boundary equations of air-first layer, interlayer interface and last layer-air are determined.
[0142] The continuous optical path is sliced along the Z-axis and divided into N independent optical path micro-segments based on the abrupt change in the refractive index of the medium. N is equal to the number of material layers plus one, ensuring that the medium inside each micro-segment is homogeneous and isotropic.
[0143] For each optical path micro-segment unit, the initial position coordinates are initialized as the exit point of the previous interface or the projection point of the light source plane, and the initial direction vector is set as a unit vector perpendicular to the sample surface or the incident direction estimated based on the preliminary deflection angle.
[0144] Using the ray tracing method, virtual rays are emitted backward from the pixels on the camera's image plane. The coordinates of the intersection point between the ray and the first medium interface are calculated, and this intersection point is recorded as the termination position of the first micro-segment and the starting position of the second micro-segment.
[0145] Repeat the above intersection calculation process to determine the spatial coordinate sequence of light passing through all interlayer interfaces in sequence, forming a discretized data structure containing the three-dimensional coordinates of the start and end points of each micro-segment and the corresponding interval length vector.
[0146] By using spatial discretization, the continuous optical path mapping model constructed in the previous step is transformed into discretized optical path sequence data containing the starting position and direction vector of each micro-segment, realizing the structured decomposition of complex multi-layer optical paths and providing a precise geometric input basis for subsequent layer-by-layer refraction correction.
[0147] For example, for a PMMA / PC double-layer lampshade, the PMMA layer thickness is set to 2.5mm, the PC layer thickness to 1.8mm, and the interface tilt angle to 0.5 degrees. The system divides the optical path into four micro-segments: air, PMMA, PC, and air again. For a deflected image with a resolution of 1920x1080, each pixel is traversed, its intersection with the first layer interface is calculated, and then the direction of the next segment is estimated based on the law of refraction, until all layers are penetrated. The output is a sequence of data containing the start and end coordinates of the four micro-segments, with a coordinate accuracy of 0.01mm, significantly improving the geometric accuracy of optical path modeling.
[0148] S5.2: Using the interface intersection coordinates of adjacent micro-segment optical path units in the discretized optical path sequence data, and combining the Snell's law of refraction, a local refraction transformation matrix is constructed. Layer-by-layer refraction correction calculations are performed on the light direction vector passing through each layer of heterogeneous material interface to generate corrected light propagation trajectory data after interface refraction behavior compensation.
[0149] The system receives discretized optical path sequence data and extracts the intersection coordinates and incident ray direction vectors of adjacent micro-segment optical path units at the heterogeneous material interface. It then queries the optical path mapping model to obtain the refractive index values of the media on both sides of the current interface and the interface normal unit vector. Based on Snell's law of refraction, a local refraction transformation matrix is constructed, and the ratio of the sine of the incident angle to the refractive index is calculated to determine the deflection direction of the light after passing through the interface. Using a vector decomposition method, the incident ray vector is decomposed into components parallel to the interface normal and components perpendicular to the interface normal. Keeping the perpendicular component unchanged, the modulus of the parallel component is adjusted according to the refractive index ratio to synthesize the refracted outgoing ray direction vector. This refraction correction operation is repeated for each interface in the multilayer structure, updating the direction parameters of the ray propagation trajectory sequentially. Through this layer-by-layer refraction correction process, the discretized optical path data from the previous step is transformed into corrected ray propagation trajectory data after interface refraction behavior compensation, achieving the expected technical effect of eliminating refraction errors at the interface of multilayer heterogeneous materials.
[0150] S5.3: Based on the actual physical path length of the light rays inside the sample recorded in the corrected light propagation trajectory data, the cumulative optical path difference of each light ray from the light source plane to the camera plane is calculated using the optical path integration method to obtain optical path phase distribution data that reflects the true optical delay characteristics inside the multilayer material.
[0151] The geometric path length of each micro-segment optical path unit and the refractive index parameter of the corresponding medium are read from the corrected light propagation trajectory data and used as the physical basis input for optical path integral calculation.
[0152] For each beam of light emitted from the light source and passing through multiple heterogeneous lamp covers to reach the camera pixel, a segmented cumulative optical path calculation model is constructed based on its actual propagation distance and optical density in different media layers.
[0153] The local optical path contribution of light passing through the a-th layer of medium is quantified using a discretized numerical integration method, and its calculation formula is expressed as follows:
[0154]
[0155] in, Let be the optical path length within the a-th layer of the medium. The refractive index of this layer of medium is... This represents the actual geometric path length of the light ray within this medium layer.
[0156] By traversing all the medium layers along the entire optical path, the calculated local optical path lengths of each layer are summed to obtain the total cumulative optical path value from the light source plane to the camera plane.
[0157] By comparing the total optical path difference with the theoretical benchmark value of the vacuum optical path, the optical delay phase offset introduced by the multilayer heterostructure is calculated, and an optical path phase distribution data matrix reflecting the actual optical path delay characteristics is generated.
[0158] Through the above optical path integration and phase mapping processing, the geometric trajectory data of the previous step is transformed into optical path phase distribution data that includes the influence of medium refraction, realizing the accurate quantification of optical path distortion caused by multi-layer interfaces, and providing physically consistent constraints for subsequent high-precision reverse projection.
[0159] For example, in a PMMA / PC dual-layer lampshade inspection scenario, the refractive index of the PMMA layer is set to 1.49, and the refractive index of the PC layer is set to 1.58. When light propagates a geometric distance of 2.0 mm in the PMMA layer and 1.5 mm in the PC layer, the calculated optical path lengths are 2.98 mm for the PMMA layer and 2.37 mm for the PC layer, for a total cumulative optical path length of 5.35 mm. Compared to the air path of the same geometric thickness, this data accurately reflects the optical delay caused by the material, significantly improving the accuracy of the physical model for bubble depth localization.
[0160] S5.4: Based on the optical path phase distribution data and the initially acquired deflection angle data, perform reverse geometric correlation mapping, execute piecewise reverse projection calculation, and extend the two-dimensional pixel coordinates on the camera image plane in reverse along the corrected light propagation trajectory to the object space to obtain the preliminary three-dimensional spatial coordinate set of the bubble defect in the multi-interface environment.
[0161] Read the optical path phase distribution data and initial deflection angle data to establish a geometric mapping relationship between the camera image plane pixel coordinates and the object space light rays.
[0162] Construct an iterative solution model for inverse projection, starting from the principal point of the camera, and emit probe rays in the opposite direction of the corrected ray propagation trajectory.
[0163] Using the interface equation in the optical path mapping model, the coordinate sequence of the intersection points between the probe ray and each medium layer is calculated.
[0164] At each interface intersection, the refraction direction is updated according to Snell's law. The calculated refracted ray is then extended to the next interface, and the above process of solving for intersections and updating directions is repeated until all heterogeneous material layers are penetrated.
[0165] Based on the pixel offset corresponding to the bubble defect, the lateral displacement deviation of the light beam inside the sample is calculated, and the termination position of the probe beam is corrected.
[0166] By minimizing the optical path difference residual function, the spatial three-dimensional coordinates of the bubble are iteratively optimized to satisfy the optical path conservation constraint in the multilayer medium.
[0167] The system outputs a preliminary set of three-dimensional spatial coordinates of the bubble after multi-interface refraction correction, enabling accurate backtracking from two-dimensional image deflection to three-dimensional physical space.
[0168] S5.5: Apply the spatial consistency filtering method to the preliminary three-dimensional spatial coordinate set to remove outlier coordinate points caused by noise interference and fuse redundant coordinate information in overlapping areas. Finally, output three-dimensional point cloud data with high positioning accuracy and interface adaptive correction to complete the accurate three-dimensional reconstruction of the bubble inside the multi-layer heterogeneous lampshade.
[0169] like Figure 3 As shown, step S6 involves evaluating the spatial coordinate positioning accuracy based on the 3D point cloud data. If the positioning error exceeds a preset threshold, the fingerprint binding information in the interface optical response fingerprint database is updated to complete dynamic adaptation optimization. Specifically, this includes:
[0170] S6.1: Obtain the 3D point cloud data and standard reference model data that have been adaptively corrected by the interface, and use the point cloud registration method to perform spatial alignment processing on the two to generate a set of spatial coordinate deviations containing the differences in the coordinates of the corresponding points.
[0171] S6.2: Based on the set of spatial coordinate deviations, perform numerical aggregation processing using the root mean square error statistical method to output a quantitative index of spatial coordinate positioning accuracy that characterizes the current detection accuracy.
[0172] Receive the set of spatial coordinate deviations output from step S6.1. This set contains the corresponding point coordinate difference vectors generated after the 3D point cloud data and the standard reference model data are registered and aligned, which have been adaptively corrected by the interface.
[0173] Iterate through each deviation data item in the spatial coordinate deviation set and extract the coordinate difference components of each corresponding point pair in the three orthogonal directions of the X-axis, Y-axis and Z-axis.
[0174] The extracted axial coordinate differences are squared to eliminate the influence of positive and negative signs on the cumulative error calculation and to amplify the weight contribution of larger deviations to the overall accuracy assessment.
[0175] The summation of the squared differences of all corresponding point pairs yields the total squared error, which reflects the degree of dispersion of the overall dataset.
[0176] The total number of valid correspondence pairs participating in registration is used as the benchmark denominator for normalization to ensure that the evaluation indicators are not affected by fluctuations in the number of samples.
[0177] The root mean square error method is used to calculate the spatial coordinate positioning accuracy index, which represents the current detection accuracy, by dividing the total square error value by the total number of valid corresponding point pairs and taking the square root.
[0178] The specific calculation formula is as follows:
[0179]
[0180] in, Quantitative indicators for spatial coordinate positioning accuracy. To ensure the total number of valid point pairs, , , For the corrected 3D point cloud, the first The coordinates of the points , , For the standard reference model The coordinates of each corresponding point.
[0181] By using the root mean square error statistical method to numerically aggregate the spatial coordinate deviation set, the discrete coordinate differences are transformed into a single quantitative index of spatial coordinate positioning accuracy, thereby realizing a quantitative assessment of the three-dimensional positioning accuracy of multi-layer heterogeneous lampshade bubbles and providing a clear basis for subsequent dynamic adaptation optimization.
[0182] S6.3: Read the preset positioning error allowable threshold, and perform a logical comparison and judgment between the spatial coordinate positioning accuracy quantification index and the positioning error allowable threshold to generate a dynamic adaptation trigger signal indicating whether optimization is needed.
[0183] The preset positioning error allowable threshold is read. This threshold is set based on the lampshade manufacturing tolerance standard and the bubble detection accuracy requirements, and serves as the benchmark limit for determining whether the reconstruction result is qualified.
[0184] Obtain the spatial coordinate positioning accuracy quantification index output from step S6.2. This index represents the root mean square deviation between the current batch of lampshade bubble 3D reconstruction results and the standard reference model.
[0185] A logical comparison unit is constructed to compare the spatial coordinate positioning accuracy quantification index with a preset positioning error allowable threshold.
[0186] If the spatial coordinate positioning accuracy quantification index is less than or equal to the preset positioning error allowable threshold, it is determined that the current interface optical response fingerprint database parameters are well adapted, and a control signal to maintain the status quo is generated.
[0187] If the spatial coordinate positioning accuracy quantification index is greater than the preset positioning error allowable threshold, it is determined that there is a modeling deviation in the current fingerprint database, and a dynamic adaptation trigger signal indicating that optimization is needed is generated.
[0188] Through the above logical comparison and judgment processing method, the accuracy quantification index of the previous step is transformed into clear optimization decision instructions, so as to realize the expected technical effect of adaptive monitoring and closed-loop control of the refractive model error of the multilayer heterogeneous material interface.
[0189] For example, in the inspection scenario of PMMA / PC dual-layer composite lamp covers for automotive LED headlights, the preset allowable threshold for positioning error is 0.05mm. The spatial coordinate positioning accuracy quantification index calculated in S6.2 for the current inspection batch is 0.08mm. The system compares 0.08mm with 0.05mm. Since 0.08mm > 0.05mm, the logic comparison unit outputs a high-level dynamic adaptation trigger signal. This signal directly drives the subsequent step S6.4 to start the fingerprint database update program, extract the characteristic spot distortion mode that causes the deviation, and use a weighted average fusion method to correct the interface depth binding value under the corresponding voltage configuration in the fingerprint database. This significantly improves the positioning accuracy of the next batch of inspections to within 0.04mm, meeting the high-precision quality inspection requirements.
[0190] S6.4: In response to the dynamic adaptation trigger signal, extract the characteristic spot distortion mode that causes the spatial coordinate deviation set to be abnormal and its corresponding actual interlayer interface parameters, and use the weighted average fusion method to correct and update the low-dimensional representation vector in the interface optical response fingerprint database and the deep binding relationship of the real interface, so as to complete the dynamic adaptation optimization and output the updated interface optical response fingerprint database.
[0191] In response to the dynamic adaptation trigger signal, abnormal feature data causing excessive positioning errors are extracted from the spatial coordinate deviation set, and the corresponding characteristic spot distortion patterns and their associated actual inter-layer interface parameters are identified. The extracted abnormal characteristic spot distortion patterns are converted into low-dimensional representation vectors as fingerprint entries to be updated. The existing fingerprint record with the closest Euclidean distance to the fingerprint entry to be updated in the interface optical response fingerprint database is read, and its bound historical low-dimensional representation vector and the actual interface depth value are obtained. The center value of the updated low-dimensional representation vector is calculated using a weighted average fusion method, and the vector fusion operation is performed using the following formula:
[0192]
[0193] in, This is the updated low-dimensional representation vector. This refers to the historical low-dimensional representation vectors in the fingerprint database. This is the currently collected low-dimensional representation vector. Historical weighting coefficients This represents the current weighting coefficient. Following the same weighting logic, the bound actual interface depth values are corrected to generate updated interface depth baseline values. The calculated updated low-dimensional representation vector center values and the updated interface depth baseline values are re-established as key-value pairs. The new key-value pairs replace the original corresponding entries in the fingerprint database, completing the iterative correction of local fingerprint information. All abnormal regions triggering optimization are traversed, and the above vector fusion and parameter correction process is repeated until all fingerprint entries corresponding to excessive deviations are updated. An updated interface optical response fingerprint database containing the corrected binding relationships is output.
[0194] By using a weighted average fusion processing method, the deviation features identified in the previous step are transformed into dynamic correction values for the fingerprint database parameters, thereby achieving adaptive evolution of the interface optical response fingerprint database and maintaining long-term positioning accuracy.
[0195] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this invention.
[0196] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains. The terms “first,” “second,” “third,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the elements or objects preceding “comprising” or “including” encompass the elements or objects listed following “comprising” or “including” and their equivalents, and do not exclude other elements or objects. The “multiple” mentioned in the embodiments of this application refers to two or more. A and / or B indicate three possibilities: A; B; and A and B.
[0197] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for three-dimensional positioning of bubbles inside a lampshade based on transmission deflection, characterized in that, Specifically, it includes: S1: Obtain the dynamic modulated light field generated by the flexible programmable microstructure optical film under the drive of a preset voltage combination, and extract low-dimensional characterization vectors based on principal component analysis to construct an interface optical response fingerprint library. S2: Based on the information bound in the interface optical response fingerprint database, perform region identification and processing on the original deflection image collected from the multilayer heterogeneous lampshade sample to obtain neighborhood data of the region of interest; S3: Using the neighborhood data of the region of interest, apply a small step-increment voltage to the flexible programmable microstructure optical film to generate a local distortion response spectrum and perform nearest-neighbor matching with the interface optical response fingerprint database to output the actual interlayer interface parameters of the current lampshade. S4: Divide the entire optical path into multiple optical path microsegments according to the actual interlayer interface parameters, and obtain the refraction behavior weight reorganization by querying and calculating each optical path microsegment. Based on the refraction behavior weight reorganization and the optical path microsegments, construct an optical path mapping relationship model. S5: Apply the optical path mapping relationship model to the deflection angle data to perform segmented inverse projection calculation, generate three-dimensional point cloud data that has been adaptively corrected by the interface, and realize the three-dimensional positioning of the bubble inside the lampshade based on the three-dimensional point cloud data.
2. The three-dimensional positioning method for bubbles inside a lampshade based on transmission deflection according to claim 1, characterized in that, Also includes: The spatial coordinate positioning accuracy is evaluated based on the three-dimensional point cloud data. If the positioning error exceeds a preset threshold, the fingerprint binding information in the interface optical response fingerprint database is updated to complete the dynamic adaptation optimization.
3. The three-dimensional positioning method for bubbles inside a lampshade based on transmission deflection according to claim 1, characterized in that, The flexible programmable microstructure optical film is composed of an array of electronically controlled liquid crystal microlens units.
4. The three-dimensional positioning method for bubbles inside a lampshade based on transmission deflection according to claim 1, characterized in that, The original deflection image includes information on complex light intensity distribution and phase distortion caused by refraction at multiple interfaces and bubble defects.
5. The three-dimensional positioning method for bubbles inside a lampshade based on transmission deflection according to claim 3, characterized in that, S3 specifically includes: Based on the spatial range determined by the neighborhood data of the region of interest, a small step increment voltage is applied to the arrayed electro-controlled liquid crystal microlens unit in the flexible programmable microstructure optical film to generate a dynamic modulated light field with continuous phase gradient changes, thereby obtaining the original image sequence of local distortion response. The original image sequence of the local distortion response is subjected to grayscale normalization and edge enhancement processing. The feature vectors of light spot diffusion morphology and edge offset are extracted and fused to construct a local distortion response map. The similarity between the local distortion response map and the low-dimensional representation vector bound in the interface optical response fingerprint database is calculated to select the target fingerprint entry with the smallest Euclidean distance. Based on the pre-stored mapping relationship in the target fingerprint entry, reverse parse and output the actual interlayer interface parameters of the current lampshade.
6. The three-dimensional positioning method for bubbles inside a lampshade based on transmission deflection according to claim 5, characterized in that, The local distortion response spectrum is a quantitative characterization of the nonlinear deflection behavior of light passing through the interface of a multilayer medium under different voltage driving conditions.
7. The three-dimensional positioning method for bubbles inside a lampshade based on transmission deflection according to claim 1, characterized in that, The actual interlayer interface parameters explicitly include the thickness deviation values of each layer of material, the interface tilt angle values, and the refractive index gradient distribution values, which serve as the direct input basis for constructing the optical path mapping relationship model.
8. The three-dimensional positioning method for bubbles inside a lampshade based on transmission deflection according to claim 7, characterized in that, S4 specifically includes: Based on the thickness deviation values of each layer of material and the tilt angle values of the interface contained in the actual interlayer interface parameters, the entire transmission optical path is spatially discretized to generate a sequence of optical path micro-segments composed of multiple continuous optical path micro-segments with clear start and end boundaries, wherein each optical path micro-segment corresponds to a specific medium type identifier. Using the specific medium type identifier corresponding to each optical path microsegment in the optical path microsegment sequence, a pre-set material optical property database is queried to obtain a set of basic refractive index values that are bound one-to-one with each optical path microsegment; Based on the set of basic refractive index values and the actual interlayer interface parameters, a weighted calculation process according to Snell's law is performed to generate a weighted reorganization of refractive behavior. Based on the refraction behavior weight reorganization and the spatial topology of the optical path micro-segment sequence, dynamic loading and association mapping operations are performed to construct an optical path mapping relationship model.
9. The three-dimensional positioning method for bubbles inside a lampshade based on transmission deflection according to claim 8, characterized in that, The material optical property database stores the dispersion curves and temperature compensation coefficients of various transparent materials at standard wavelengths.
10. The three-dimensional positioning method for bubbles inside a lampshade based on transmission deflection according to claim 1, characterized in that, The refractive behavior weight recombination characterizes the degree to which light changes direction when passing through the interface of different optical path micro-segments.
