Automatic focusing method and system of projector
The projected image is obtained through the camera, the clarity is evaluated using convolutional neural network and fast Fourier transform, and the focus parameters are optimized through the gradient descent algorithm, which solves the problem of inaccurate clarity evaluation in the projector automatic focus technology, and realizes intelligent and precise projected focus, improving image quality.
Patent Information
- Application Number
- CN202510826526.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-08-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing projector autofocus technology cannot accurately evaluate image clarity, resulting in repeated adjustments or failures in focus, affecting real-time and user experience.
The projected image is acquired through the camera, the image features are extracted using convolutional neural networks and fast Fourier transforms, the clarity is evaluated in combination with machine learning models, and the focus parameters are optimized through the gradient descent algorithm, taking into account the optical path stability and the influence of ambient light, and the frame rate is dynamically adjusted to achieve optimal focus.
Implement intelligent and precise projection focus in complex optical environments, improving the quality of projected images and adapting to different scene needs.
Smart Images

Figure CN120499355A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of projection equipment, and in particular to an automatic focusing method and system for a projector. Background Art
[0002] Projection technology plays a crucial role in education, entertainment, and professional presentations. Its clarity and adaptability directly impact user experience and information delivery. Traditional projection systems often rely on manual focus adjustment or simple preset parameters. Simple automatic modes, such as distance measurement, can be inaccurate in complex environments, resulting in blurry images.
[0003] Projector autofocus technology is a core technology in intelligent optical systems. Its core goal is to maintain optimal clarity of the projected image at varying distances, angles, and environmental conditions by adjusting the lens assembly position in real time. Traditional focusing techniques rely primarily on the collaborative work of optical sensors and mechanical control systems. However, with the recent development of machine vision and artificial intelligence, adaptive focusing solutions based on deep learning have gradually become mainstream.
[0004] Existing adaptive focus solutions cannot effectively evaluate the accuracy of the clarity of the projected image. Accuracy deviations will lead to repeated adjustments or focus failures, thus affecting real-time performance and user experience. Summary of the Invention
[0005] The present invention solves the technical problem by adopting a technical solution: a method for automatically focusing a projector, comprising the following steps: S1: Acquire projection image data through a camera, preprocess the image using a convolutional neural network, extract edge sharpness, contrast level, and detail retention, and obtain a first feature set; S2: Based on the first feature set, using a fast Fourier transform algorithm to perform frequency domain conversion on the image, extract the high-frequency component ratio and spectrum energy distribution, and obtain a frequency domain feature set; S3: Calculating a multi-dimensional clarity score by combining the first feature set and the frequency domain feature set using a pre-trained machine learning model to obtain an initial clarity score; S4: If the initial clarity score is lower than a preset threshold, optimizing focus parameters based on a loss function of the first feature set and the frequency domain feature set using a gradient descent algorithm to obtain a first focus parameter set; S5: After analyzing the optical path stability, confirming the focus adjustment speed, obtaining the optimal focus parameters, and driving the projector to complete the focus according to the optimal focus parameters.
[0006] In one embodiment, the following steps are further included between step S4 and step S5: S401: Dynamically adjusting the image acquisition frame rate according to the complexity of the first focus parameter set and the frequency domain feature set, and determining an optimized frame rate configuration in combination with the influence of ambient light intensity on the frame rate; S402: Adjusting the focal length of the projector according to the first focus parameter set, dynamically matching the focus adjustment speed according to the optimized frame rate configuration, analyzing the synergistic effect of the focus adjustment speed and the imaging plane jitter amplitude, obtaining a first optical path stabilization set and extracting adjusted projection image data from the set; S403: Analyzing the dynamic interaction between the geometric distortion and spot distribution of the first optical path stable set and the ambient light intensity based on the first optical path stable set and ambient light feedback, and determining the dynamic characteristics of the first optical path stable set; S404: Analyze the impact of optical path stability on the response time and noise level of the optical system based on the adjusted projection image data, ambient light feedback, and the dynamic characteristics of the first optical path stability set, determine the correlation characteristics between the response time and the noise level, and recalculate the clarity score to obtain an updated clarity score.
[0007] In one embodiment, step S5 specifically includes the following steps: If the difference between the updated clarity score and the initial clarity score is less than the preset convergence threshold, the optical path stability analysis is used to confirm the synergistic effect of the focus adjustment speed, frame rate configuration and ambient light feedback, and the current focus parameters are determined to be the optimal parameters. The projector is driven to complete the focus using the optimal parameters.
[0008] In one embodiment, step S1 includes: S101: collecting projection image data at a fixed frame rate using a camera, acquiring the first image using an image sensor, and storing the first image in a raw data format; S102: Performing denoising and normalization operations on the first image using a convolutional neural network to generate the second image; S103: If the pixel value distribution of the second image meets a preset threshold, edge sharpness is extracted by an edge detection algorithm, contrast level is calculated by a grayscale histogram, and detail retention is evaluated by a wavelet transform to obtain the first feature set.
[0009] In one embodiment, step S2 includes the following steps: Performing frequency domain conversion on the first image using a fast Fourier transform algorithm, extracting the proportion of high-frequency components, and obtaining a first secondary frequency domain feature set; Calculating spectrum energy distribution based on the first secondary frequency domain feature set, generating a standardized feature vector, and obtaining a second secondary frequency domain feature set; If the eigenvalue of the second secondary frequency domain feature set meets a preset threshold, the high-frequency component proportion and spectrum energy distribution are integrated through a data fusion algorithm to obtain the frequency domain feature set.
[0010] In one embodiment, the loss function in step S4 is: ; Where y is the target clarity score, To predict the score, the focus parameters are iteratively adjusted to obtain a first focus parameter set.
[0011] In one embodiment, step 401 specifically includes the following steps: For the first secondary frequency domain feature set, the complexity level is calculated. If the complexity level is higher than a preset threshold, the frame rate adjustment formula F=F0(1-C / C max ), get the first frame rate configuration set; where F is the adjusted frame rate, F0 is the initial frame rate, C is the current computational complexity, C max is the maximum computational complexity; Obtain light intensity data from the ambient light sensor, and use a linear interpolation algorithm to calculate the light intensity weighting coefficient L=I for the first frame rate configuration set. max / I, get the second frame rate configuration set; where L is the weighting coefficient, I max is the maximum light intensity, I is the current light intensity; For the second frame rate configuration set, combined with the first focus parameter set, a data fusion algorithm is used to integrate the high-frequency components of the first secondary frequency domain feature set and the sensor performance parameters, and a final frame rate value is calculated to obtain the optimized frame rate configuration.
[0012] In one embodiment, step S404 includes the following steps: Acquire response time data from the adjusted projection image data, and calculate the fluctuation period of the response time using a time series analysis algorithm; In combination with the ambient light intensity data, if the ambient light intensity fluctuation exceeds a preset threshold, a smoothing parameter of the time series is adjusted to obtain a first response time set; Acquiring noise level data from an optical system sensor based on the first response time set, extracting frequency distribution characteristics of the noise level using a Fourier transform algorithm, and combining this with light intensity feedback data; if the frequency distribution exceeds a preset threshold, increasing a filter coefficient to obtain a first noise optimization set; Calculating the correlation coefficient between the response time and the noise level using a correlation analysis algorithm based on the first noise optimization set and the first response time set, and determining a correlation characteristic set in combination with dynamic characteristic data; For the associated characteristic set, quality assessment data is obtained from the projection image data, and the clarity score is recalculated using a clarity scoring algorithm, and combined with the optical path stabilization data to obtain an updated clarity score.
[0013] In one embodiment, step S3 specifically includes the following steps: Based on the first secondary frequency domain feature set, a pre-trained convolutional neural network algorithm is used to calculate the clarity score of the multi-dimensional feature vector to obtain a first score set. If the score value of the first score set meets a preset threshold, the high-frequency component and the energy distribution are integrated through a data fusion algorithm to obtain the initial clarity score.
[0014] The present invention further provides an automatic focusing system for a projector, which is used to implement the automatic focusing method described in any one of the above technical solutions, comprising: A data acquisition module, including a CMOS camera and an optical encoder, is used to acquire image data; Feature calculation module, including CNN processor and FTT processor, for performing feature extraction and frequency domain analysis; Intelligent scoring module, with pre-built machine learning models, used to output clarity scores; Dynamic optimization module, including FPGA, for executing gradient descent algorithm and parameter optimization; The motion execution module includes a motor and is used to achieve autofocus.
[0015] The implementation of the present invention has the following beneficial effects: The present invention discloses a method for automatically focusing a projector. The projected image is acquired through a camera, and image features are extracted using a convolutional neural network and fast Fourier transform. The clarity is then evaluated in conjunction with a machine learning model. If the clarity is insufficient, a gradient descent algorithm is used to optimize the focus parameters. The present invention also considers the impact of optical path stability on system response time and noise, ultimately determining the optimal focus parameters through iterative optimization. This method can achieve intelligent and precise projection focus in complex optical environments, effectively improving the quality of projected images and adapting to the needs of different scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which: Figure 1 This is a schematic diagram of the steps of an automatic focusing method for a projector according to the present invention; Figure 2 Detailed schematic diagram of step S1 of an automatic focusing method for a projector according to the present invention; Figure 3 It is a schematic diagram of the steps between steps S4 and S5 of an automatic focusing method for a projector of the present invention. DETAILED DESCRIPTION
[0017] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, the specific embodiments of the present invention are now described in detail with reference to the accompanying drawings. In the following description, it should be understood that the directions or positional relationships indicated by "front", "back", "up", "down", "left", "right", "longitudinal", "horizontal", "vertical", "horizontal", "top", "bottom", "inside", "outside", "head", "tail", etc. are based on the directions or positional relationships shown in the accompanying drawings and are constructed and operated in specific directions. They are only for the convenience of describing the technical solution and do not indicate that the devices or components referred to must have specific directions. Therefore, they should not be understood as limiting the present invention.
[0018] It should also be noted that, unless otherwise clearly specified and limited, terms such as "installed", "connected", "connected", "fixed", and "set" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integrated connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. When an element is referred to as being "on" or "under" another element, the element can be "directly" or "indirectly" located on the other element, or there may be one or more intervening elements. The terms "first", "second", "third", etc. are only for the convenience of describing the present technical solution, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first", "second", "third", etc. may explicitly or implicitly include one or more of such features. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.
[0019] In the following description, specific details such as particular system structures and techniques are provided for purposes of illustration, not limitation, to facilitate a thorough understanding of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
[0020] Specifically, the present invention provides an automatic focusing method for a projector, such as Figure 1 As shown, the following steps are included (S1, S2, S3, S4 and S5): Step S1: Acquire projection image data through a camera, use a convolutional neural network to preprocess the image, extract edge sharpness, contrast level and detail retention, and obtain a first feature set.
[0021] Specifically, such as Figure 2 As shown, step S1 includes the following steps (S101, S102 and S103): S101: collecting projection image data at a fixed frame rate through a camera, acquiring the first image using an image sensor, and storing the first image in a raw data format.
[0022] S102: Based on the first image, use a convolutional neural network to perform denoising and normalization operations to generate the second image.
[0023] S103: If the pixel value distribution of the second image meets a preset threshold, edge sharpness is extracted by an edge detection algorithm, contrast level is calculated by a grayscale histogram, and detail retention is evaluated by a wavelet transform to obtain the first feature set.
[0024] In one possible implementation, projection image data is collected by a camera at a fixed frame rate. The key lies in ensuring that the image sensor captures images at a stable frequency.
[0025] For example, a camera captures images from a projector at a frame rate of 30 frames per second, with a sensor resolution of 1920x1080 and a pixel depth of 8 bits, generating a first image in raw RGB format. This approach ensures real-time and consistent data, providing high-quality raw data for subsequent processing. After the light signal captured by the image sensor is converted into a digital signal, it is directly stored in an uncompressed RAW format, avoiding information loss during compression and helping to preserve image detail and authenticity.
[0026] For example, a convolutional neural network (CNN) is used to perform denoising and normalization of the first image. Through multiple layers of convolution and pooling, the CNN identifies and filters out noise patterns in the image, while also normalizing pixel values to achieve uniform brightness and contrast.
[0027] Specifically, assuming the first image contains luminance noise caused by uneven projector light sources, the CNN model learns the noise distribution characteristics through training and outputs a denoised second image. A normalization operation maps pixel values to a range of 0-255, ensuring consistency in subsequent feature extraction. This processing significantly improves image quality and lays the foundation for edge detection and feature extraction.
[0028] Specifically, if the pixel value distribution of the second image meets the preset threshold, for example, 90% of the pixel values in the histogram fall within the range of 50-200, further features are extracted. Edge detection algorithms (such as the Canny algorithm) are used to calculate edge sharpness and generate edge intensity maps. Assuming that the proportion of edge pixels is 15%, it indicates that the image has high clarity. The grayscale histogram is used to evaluate the contrast level. If the histogram covers 80% of the grayscale interval, the contrast is good. The wavelet transform evaluates the detail retention by decomposing the high-frequency and low-frequency components of the image. For example, if the high-frequency component energy accounts for 20%, it indicates that the details are sufficiently retained. These features together constitute the first feature set, which reflects the clarity and quality of the image.
[0029] In one possible implementation, a data fusion algorithm integrates the first feature set to generate a second feature set.
[0030] For example, using a weighted fusion method, the values of edge sharpness, contrast level, and detail preservation are normalized and then summed with weights of 0.4, 0.3, and 0.3 to generate a standardized feature vector. Assuming an edge sharpness value of 0.8, a contrast level of 0.7, and a detail preservation value of 0.6, the fused feature vector is [0.71]. This standardized vector facilitates subsequent classification or quality assessment, significantly improving the robustness and consistency of the features.
[0031] The advantage of this method lies in its multi-layered processing, from raw data acquisition to feature extraction, forming a complete image quality assessment chain. Fixed frame rate acquisition ensures data stability, CNN denoising enhances image purity, and feature extraction and fusion quantify the image's visual characteristics. These steps collectively ensure high-quality analysis of projected images, making them suitable for scenarios such as projector performance testing and image calibration.
[0032] Step S2: Based on the first feature set, a fast Fourier transform algorithm is used to perform frequency domain conversion on the image, extract the high-frequency component ratio and spectrum energy distribution, and obtain a frequency domain feature set.
[0033] Specifically, step S2 includes the following steps: Performing frequency domain conversion on the first image using a fast Fourier transform algorithm, extracting the proportion of high-frequency components, and obtaining a first secondary frequency domain feature set; Calculating spectrum energy distribution based on the first secondary frequency domain feature set, generating a standardized feature vector, and obtaining a second secondary frequency domain feature set; If the eigenvalue of the second secondary frequency domain feature set meets a preset threshold, the high-frequency component proportion and spectrum energy distribution are integrated through a data fusion algorithm to obtain the frequency domain feature set.
[0034] For example, using an image sensor to capture raw image data at a fixed frame rate is crucial for ensuring data acquisition stability and consistency. The image sensor captures light signals at a fixed frequency, converts them into digital signals, and stores them in a standard format. Assume a CMOS sensor captures a projected image at 60 frames per second, with a resolution of 1280x720 and a pixel depth of 10 bits, generating a first image in BMP format. This approach avoids compression loss and preserves the details of the original image.
[0035] It should be noted that the BMP format storage is simple and direct, and is suitable for subsequent frequency domain analysis because it can directly access pixel data without decoding.
[0036] In one possible implementation, a fast Fourier transform (FFT) algorithm is used to transform the first image into the frequency domain, extract the proportion of high-frequency components, and generate a first secondary frequency domain feature set. The FFT transform converts the image from the spatial domain to the frequency domain, separating high-frequency and low-frequency components. High-frequency components typically correspond to image edges and details, while low-frequency components reflect smooth areas.
[0037] For example, a 1280x720 grayscale image is subjected to a fast Fourier transform to generate a spectrum. The ratio of high-frequency components to total energy is then calculated. Assuming the high-frequency component accounts for 25%, this indicates a rich image with rich details. This feature extraction method is efficient and intuitive, making it suitable for evaluating image clarity.
[0038] For example, the spectrum energy distribution is calculated based on the first secondary frequency domain feature set to generate a normalized feature vector, resulting in the second secondary frequency domain feature set. The spectrum energy distribution describes the intensity distribution of frequency components and can be achieved by counting the energy percentage of each frequency segment in the spectrum graph.
[0039] Specifically, the spectrum is divided into 10 frequency segments of equal width. The summed energy of each segment is calculated and normalized to generate a 10-dimensional eigenvector. Assuming the vector values are [0.1, 0.15, 0.2, 0.25, 0.15, 0.1, 0.05, 0.03, 0.01, 0.01], this indicates that the energy is primarily concentrated in the mid- and high-frequency bands. This normalized vector facilitates subsequent analysis, and a uniform distribution of eigenvalues indicates high image quality.
[0040] In one possible implementation, if the eigenvalues of the second-level frequency-domain feature set meet a preset threshold, for example, if at least eight components in the vector are greater than 0.05, a data fusion algorithm is used to integrate the high-frequency component proportion and spectral energy distribution to generate a final feature set. Data fusion can employ a simple weighted average method, adding the normalized values of the high-frequency component proportion and spectral energy distribution with weights of 0.6 and 0.4, respectively. Assuming the high-frequency component proportion is 0.25 and the average spectral energy distribution is 0.3, the final eigenvalue after fusion is 0.27. This fusion method integrates multiple frequency-domain features, resulting in a more representative feature set suitable for projected image quality assessment.
[0041] The advantage of this method lies in its comprehensive frequency domain analysis process, from data acquisition to feature extraction. Fixed frame rate acquisition ensures data consistency, while fast Fourier transform efficiently extracts frequency domain features. Normalization and fusion steps enhance feature robustness. This method is suitable for scenarios such as projector performance analysis and image quality monitoring.
[0042] Step S3: Calculate a multi-dimensional clarity score by combining the first feature set and the frequency domain feature set using a pre-trained machine learning model to obtain an initial clarity score.
[0043] Specifically, step S3 includes the following steps: according to the first secondary frequency domain feature set, a pre-trained convolutional neural network algorithm is used to calculate the clarity score of the multi-dimensional feature vector to obtain a first score set; if the score value of the first score set meets a preset threshold, the high-frequency component and the energy distribution are integrated through a data fusion algorithm to obtain the initial clarity score.
[0044] For example, when acquiring raw image data from an image sensor, ensuring stable and consistent data acquisition is crucial. Image sensors capture light signals at a fixed frequency, convert them into digital signals, and then store them in a standard format. Assume a CMOS sensor is used to capture images at a frame rate of 30 frames per second, with a resolution of 1920x1080 and an 8-bit pixel depth. The first image dataset is generated in PNG format. The PNG format offers lossless compression, preserves detail, and has a moderate file size, making it suitable for frequency domain analysis. During acquisition, the sensor aperture and shutter speed can be calibrated to ensure uniform image brightness and minimize noise.
[0045] In one possible implementation, a fast Fourier transform (FFT) algorithm is used to transform the first image dataset into the frequency domain, extracting high-frequency components and energy distribution to generate a first secondary frequency domain feature set. The FFT transform converts the image from the spatial domain to the frequency domain, where high-frequency components reflect edge details and low-frequency components correspond to smooth areas.
[0046] For example, a 1920x1080 grayscale image is transformed to generate a spectrogram. The high-frequency component, which accounts for approximately 30%, is extracted and the spectral energy distribution is calculated. This is divided into eight frequency bands, generating an 8-dimensional feature vector such as [0.12, 0.18, 0.22, 0.20, 0.15, 0.08, 0.03, 0.02]. This feature extraction method facilitates subsequent clarity assessment.
[0047] For example, based on the first secondary frequency domain feature set, a pre-trained convolutional neural network algorithm is used to calculate the clarity score of the multi-dimensional feature vector to generate an initial score set. The convolutional neural network extracts deep features through multiple layers of convolution and pooling, and combines them with frequency domain features to generate a score.
[0048] For example, using the ResNet-18 model, we input a frequency domain feature set and output a score between 0 and 1. Suppose an image has a score of 0.85. This pretrained model is learned from a large amount of image data and has high scoring accuracy, making it suitable for evaluating image detail richness.
[0049] In one possible implementation, if the scores of the initial score set meet a preset threshold, such as greater than 0.8, a data fusion algorithm is used to combine the high-frequency components and the energy distribution to generate a final clarity score. Data fusion can be performed using a weighted summation method, with a weight of 0.5 for the high-frequency component and a weight of 0.5 for the average energy distribution.
[0050] For example, if the high-frequency component accounts for 0.3 and the average energy distribution is 0.4, the fusion score is 0.35. This fusion method combines multiple features to create a more representative score, making it suitable for projected image quality monitoring.
[0051] It's understandable that the above method forms a complete process from data acquisition to feature extraction and scoring. Fixed frame rate acquisition ensures data consistency, fast Fourier transform efficiently extracts features, convolutional neural network improves scoring accuracy, and data fusion enhances the robustness of the results.
[0052] Step S4: If the initial clarity score is lower than a preset threshold, the focus parameters are optimized based on the loss function of the first feature set and the frequency domain feature set through a gradient descent algorithm to obtain a first focus parameter set.
[0053] In one possible implementation, the loss function in step S4 is: ; where y is the target clarity score, To predict the score, the focus parameters are iteratively adjusted through the gradient descent algorithm to obtain the first focus parameter set. Specifically, y can be a preset threshold value of the clarity score, Scoring the predictions of a machine learning model.
[0054] It should be noted that the focus parameter is the focus parameter in the projector device, which is obtained through the sensor in the projector. In step S3, the clarity score is predicted by the machine learning model. , and then by presetting a target clarity score y, we can get the loss function , and adjust the focus parameters through the gradient descent algorithm. After each adjustment, the score predicted by the machine learning model is obtained again and the loss function value is calculated. The adjustment direction of the gradient descent algorithm is to reduce the loss function. The focus parameters are iteratively adjusted through the gradient descent algorithm to minimize the loss function, and the optimized focus parameters are found to obtain the first focus parameter set. Specifically, the gradient descent algorithm is an optimization method that iteratively finds the minimum (or extreme minimum) point of a function. In this embodiment, the minimum value of the loss function is found through the gradient descent algorithm. In this process, the focus parameters are adjusted to change The first focus parameter set is obtained by adjusting the focus parameters.
[0055] In a preferred embodiment, Figure 3 As shown, step S4 further includes the following steps (S401, S402, S403 and S404): S401: Dynamically adjust the image acquisition frame rate according to the complexity of the first focus parameter set and the frequency domain feature set, and determine an optimized frame rate configuration in combination with the influence of ambient light intensity on the frame rate.
[0056] Specifically, step 401 includes the following steps: For the first secondary frequency domain feature set, the complexity level is calculated. If the complexity level is higher than a preset threshold, the frame rate adjustment formula F=F0(1-C / C max ), get the first frame rate configuration set; where F is the adjusted frame rate, F0 is the initial frame rate, C is the current computational complexity, C max is the maximum computational complexity; Obtain light intensity data from the ambient light sensor, and use a linear interpolation algorithm to calculate the light intensity weighting coefficient L=I for the first frame rate configuration set. max / I, get the second frame rate configuration set; where L is the weighting coefficient, I max is the maximum light intensity, I is the current light intensity; For the second frame rate configuration set, combined with the first focus parameter set, a data fusion algorithm is used to integrate the high-frequency components of the first secondary frequency domain feature set with sensor performance parameters to calculate a final frame rate value, thereby obtaining the optimized frame rate configuration. Specifically, integrating the high-frequency components with the sensor performance parameters using the data fusion algorithm may include first normalizing the high-frequency components and sensor parameters. For example, the high-frequency components are calculated as high-frequency energy fraction (HFR): high-frequency band energy / total spectral energy, and the sensor parameters can be read at a maximum read rate. Then, a weighted distribution model is used to integrate the normalized parameters, such as setting the high-frequency energy fraction to a weight factor of 0.35 and the maximum sensor read rate to a weight factor of 0.25. Finally, the final frame rate value is calculated. For example, assuming the final frame rate is F, the projector's base frame rate is J, the fusion score is Q, and the fusion score is obtained based on the weighted distribution model. The minimum guaranteed frame rate is Z, and the final frame rate is calculated as: F = J × (1-Q)^2 + Z.
[0057] For example, when acquiring raw image data from an image sensor, it's crucial to ensure the data format is standardized for subsequent processing. The image sensor captures light signals at a fixed frame rate, converts them into digital signals, and stores them in JPEG format, generating the first image dataset. The JPEG format offers high compression efficiency, making it suitable for fast storage and transmission.
[0058] For example, a CMOS sensor captures images at 60 frames per second with a resolution of 1280x720 and a pixel depth of 10 bits, generating a JPEG dataset. During acquisition, exposure time and gain are adjusted to ensure appropriate image contrast and avoid overexposure or underexposure. For the first image dataset, a fast Fourier transform (FFT) algorithm is used to perform frequency domain conversion, extracting high- and low-frequency components and generating a first secondary frequency domain feature set. The FFT transform converts the image from the spatial domain to the frequency domain, where high-frequency components reflect texture details and low-frequency components correspond to large color blocks.
[0059] For example, performing a transformation on a 1280x720 grayscale image yields a spectrum with high-frequency components accounting for approximately 25% and low-frequency components accounting for approximately 60%, generating a 6-dimensional feature vector such as [0.25, 0.35, 0.20, 0.15, 0.03, 0.02]. This feature extraction method facilitates subsequent analysis of image detail distribution.
[0060] Specifically, based on the first secondary frequency domain feature set, a pre-trained convolutional neural network algorithm is used to calculate the initial clarity score to generate the first score set. The convolutional neural network extracts deep features through multiple layers of convolution and combines them with frequency domain features to output a score.
[0061] For example, using the VGG-16 model, which inputs a frequency domain feature set and outputs a score between 0 and 1, a certain image is scored as 0.75. Pretrained models are trained on a large amount of data, resulting in highly reliable scores and are suitable for evaluating image quality.
[0062] For example, if the score of the first scoring set falls below a preset threshold, such as 0.8, the focus parameters need to be optimized. A loss function is calculated based on the first feature set and the first secondary frequency domain feature set. The loss function measures the difference between the predicted score and the target score. The focus parameters are iteratively adjusted using a gradient descent algorithm to generate the first focus parameter set.
[0063] For example, the initial focal length is 50 mm, and after iteration, it is adjusted to 52 mm with a step size of 0.1 mm. This method improves image clarity by optimizing focus parameters.
[0064] In one embodiment, a second image dataset is acquired from the image sensor based on the first focus parameter set. A fast Fourier transform algorithm is used to extract a second secondary frequency domain feature set, generating a new feature vector, e.g., one in which the high-frequency component ratio increases to 35%. A data fusion algorithm is then used to integrate the high-frequency component and energy distribution to generate a final sharpness score.
[0065] For example, if the high-frequency component weight is 0.6 and the energy distribution weight is 0.4, the fusion score is 0.82. This fusion method combines multiple features to achieve a more accurate score and is suitable for real-time monitoring of image quality.
[0066] It's understandable that the above process forms a closed loop from data collection to score optimization. Standardized storage ensures data consistency, frequency domain feature extraction highlights details, convolutional neural networks provide reliable scores, gradient descent optimizes focus parameters, and data fusion enhances score robustness.
[0067] In another embodiment, a CMOS sensor captures images with a resolution of 1920x1080 and a pixel depth of 12 bits at 30 frames per second, generating a first image dataset in PNG format. Standardized storage ensures data consistency and facilitates subsequent algorithm processing.
[0068] Specifically, for the first image dataset, a fast Fourier transform (FFT) algorithm is used to extract frequency domain features and generate a first secondary frequency domain feature set. The FFT transform converts the image from the spatial domain to the frequency domain, where high-frequency components reflect edges and textures, while low-frequency components correspond to smooth areas.
[0069] For example, if we transform a 1920x1080 grayscale image, the spectrum shows that the high-frequency component accounts for 20%, and the energy distribution is concentrated in the low-frequency part, generating a feature vector such as [0.20, 0.40, 0.25, 0.10, 0.03, 0.02]. This feature extraction method highlights image details and facilitates analysis of texture complexity.
[0070] In one embodiment, a complexity level is calculated for the first secondary frequency domain feature set to assess processing requirements. The complexity level is calculated based on the proportion of high-frequency components and energy distribution using a preset formula.
[0071] For example, if high-frequency components account for 20% and the energy distribution is even, the complexity level is medium. If the complexity level exceeds a preset threshold, such as if high-frequency components account for more than 30%, the frame rate needs to be adjusted to balance the computational load. The frame rate adjustment formula ensures that the frame rate changes dynamically with complexity.
[0072] For example, if the initial frame rate is 30 frames per second, the current complexity is medium, and the maximum complexity is a high-load scenario, the adjusted frame rate is 25 frames per second, generating the first frame rate configuration set. This dynamic adjustment optimizes system resource allocation.
[0073] Preferably, light intensity data is obtained from an ambient light sensor to further optimize the frame rate. The ambient light sensor measures the brightness of the scene and outputs a light intensity value.
[0074] For example, if the current light intensity is 500 lux and the maximum light intensity is 1000 lux, the linear interpolation algorithm calculates a weighting factor of 0.5. The light intensity weighting factor reflects the impact of the environment on the frame rate. In low light intensity, the frame rate is reduced to reduce noise.
[0075] For example, combining the first frame rate configuration set with an adjusted frame rate of 22 frames per second generates a second frame rate configuration set. This method adaptively adjusts to the environment and improves the stability of image acquisition.
[0076] It is understood that for the second frame rate configuration set, combined with the first focus parameter set, a data fusion algorithm is used to integrate frequency domain features and sensor performance parameters to calculate the final frame rate. Data fusion integrates high-frequency components and sensor response speed to generate an optimized frame rate configuration.
[0077] For example, if the high-frequency component is weighted at 0.7 and the sensor performance is weighted at 0.3, the final frame rate after fusion is 20 frames per second. This fusion approach balances image detail and system performance, making it suitable for real-time applications. The entire process, from data acquisition to frame rate optimization, forms a closed loop. Standardized storage ensures data consistency, frequency domain feature extraction highlights details, and dynamic frame rate adjustment optimizes resource utilization.
[0078] S402: Adjusting the projector focal length according to the first focus parameter set, dynamically matching the focus adjustment speed according to the optimized frame rate configuration, analyzing the synergistic effect of the focus adjustment speed and the imaging plane jitter amplitude, obtaining a first optical path stabilization set, and extracting adjusted projected image data from the set. It should be noted that the synergistic effect described in this embodiment refers to reducing the focus adjustment amplitude when the focus adjustment speed is excessive, thereby reducing the impact of lens jitter during focus adjustment on projected image clarity.
[0079] Specifically, a first focus parameter set is obtained from a projection device, a linear interpolation algorithm is used to calculate the focal length adjustment range of the first focus parameter set, and if it is determined that the jitter amplitude of the first focus parameter set is higher than a preset threshold, the focal length adjustment amplitude is reduced to obtain a first focus adjustment set. For the first focus adjustment set, an optimized frame rate configuration is obtained, and a time series analysis algorithm is used to calculate the matching coefficient between the optimized frame rate configuration and the focal length adjustment speed to obtain a first matching parameter set. For the first matching parameter set, imaging plane jitter data is obtained from an imaging sensor, a Fourier transform algorithm is used to extract the frequency component of the imaging plane jitter data, and the first optical path state parameter is combined to obtain a first optical path stability set. For the first optical path stability set, an image segmentation algorithm is used to extract projection image data from a projection device, and if it is determined that the integrity of the projection image data is lower than a preset threshold, the data is re-collected to obtain adjusted projection image data.
[0080] For example, when obtaining the first focus parameter set from the projection device, it is necessary to ensure that the focal length data accurately reflects the optical performance of the projection lens. The first focus parameter set includes parameters such as focal length value, lens shift, and focus speed.
[0081] For example, if the current focal length of a projection device is 50 mm, the lens shift range is plus or minus 2 mm, and the focusing speed is 0.5 mm / s, then using linear interpolation to calculate the focus adjustment range, the lens shift range is deduced to be 48 to 52 mm. This method smoothes parameter changes through interpolation, ensuring continuous and stable focus adjustment.
[0082] In a possible implementation, when determining whether the jitter amplitude of the first focus parameter set is higher than a preset threshold, it is necessary to analyze the fluctuation of the focus speed.
[0083] For example, the preset jitter threshold is 0.1 mm / s, and the current focus speed fluctuation is 0.15 mm / s, exceeding the threshold. Therefore, the focus adjustment range is reduced, for example, from 48 to 52 mm to 49 to 51 mm, generating a first focus adjustment set. This adjustment reduces the impact of lens jitter on projected image clarity.
[0084] Specifically, when obtaining the optimized frame rate configuration for the first focus adjustment set, the synergy between the frame rate and focus adjustment of the projection device needs to be considered.
[0085] For example, if the frame rate is optimized to 24 frames per second, a time series analysis algorithm is used to calculate the matching coefficient between the frame rate and the focus adjustment speed. Time series analysis extracts the periodic characteristics of frame rate changes and determines its synchronization with the focus speed of 0.5 mm / second.
[0086] For example, the analysis results show a matching coefficient of 0.8, indicating a high degree of match between the frame rate and the focus adjustment speed, generating the first matching parameter set. This matching ensures that the projected image remains smooth during dynamic adjustments.
[0087] Preferably, when acquiring imaging plane jitter data from the imaging sensor, attention should be paid to the stability of the projected image.
[0088] For example, the imaging sensor detects a jitter frequency of 5 Hz and an amplitude of 0.2 mm in the imaging plane. Using a Fourier transform algorithm to extract the frequency components, the primary jitter frequency of 5 Hz and the secondary frequency of 10 Hz are decomposed. Combined with optical path parameters, such as a refractive index of 1.5, the first stable optical path set is generated. This analysis helps identify the source of jitter and optimize optical path design.
[0089] In one embodiment, for the first optical path stable set, when extracting projection image data from the projection device using an image segmentation algorithm, image integrity needs to be ensured.
[0090] For example, when a segmentation algorithm separates a projected image into foreground and background, it detects that 10% of the pixels in the foreground are missing, falling below a preset integrity threshold of 90%. Therefore, the data is recaptured to obtain adjusted projected image data with 95% integrity. This approach improves the reliability of the image data.
[0091] As you can see, the implementation methods for each of the above topics, through a progressive logic from focal length adjustment to image data optimization, form a complete projection optimization process. The examples in each link support each other, ensuring that the projection equipment maintains efficient and stable image output in dynamic environments.
[0092] S403: Analyze the geometric distortion of the first optical path stable set and the dynamic interaction of the spot distribution with the ambient light intensity according to the first optical path stable set and the ambient light feedback, and determine the dynamic characteristics of the first optical path stable set.
[0093] Specifically, geometric distortion data is obtained from the first optical path stabilization set, and the distortion coefficient of the geometric distortion is calculated using a grid mapping algorithm. Combined with the ambient light intensity data, if the ambient light intensity fluctuation is higher than a preset threshold, the correction parameters of the grid mapping are adjusted to obtain a first distortion correction set. Light spot distribution data is obtained based on the first distortion correction set, and the uniformity characteristics of the light spot distribution are extracted using a Gaussian filtering algorithm. Combined with the light intensity fluctuation data, if the light spot uniformity is lower than a preset threshold, the optical compensation coefficient is increased to obtain a first light spot optimization set. Based on the first light spot optimization set, dynamic characteristic data is obtained from the optical path sensor, and the oscillation frequency of the dynamic characteristic is calculated using a time series analysis algorithm. Combined with the ambient light intensity data, the dynamic adjustment range of the optical path stabilization is determined to obtain a first dynamic characteristic set. For the first dynamic characteristic set, an image segmentation algorithm is used to extract projection quality data. If the integrity of the projection quality data is lower than a preset threshold, the optical compensation parameters are readjusted to obtain adjusted projection image data.
[0094] For example, when acquiring geometric distortion data from the first stable optical path set, attention should be paid to the deformation of the projected image. Geometric distortion is the image deformation caused by non-ideal properties or installation errors of optical components in the optical path. A grid mapping algorithm is used to calculate the distortion coefficients. The principle is to compare a standard grid with the actual projected image and analyze the offset of the grid points.
[0095] For example, if a projection device projects a 10x10 square grid and detects a 2mm offset at the top-right grid point, the calculated distortion coefficient is 0.02. This method quantifies the degree of deformation and provides a basis for subsequent correction.
[0096] In one possible implementation, the ambient light intensity data is combined to determine whether to adjust the correction parameters of the grid mapping. Fluctuations in ambient light intensity may affect the contrast and clarity of the projected image.
[0097] For example, if the ambient light intensity fluctuates by 200 lux and the preset threshold is 150 lux, exceeding the threshold, the grid mapping correction parameters are adjusted to reduce the distortion correction range from ±2 mm to ±1 mm, generating the first distortion correction set. This adjustment reduces the impact of light intensity fluctuations on image distortion by narrowing the correction range.
[0098] Specifically, when acquiring the spot distribution data based on the first distortion correction set, the uniformity of the projected spot needs to be analyzed. The spot distribution reflects the uniformity of the light intensity distribution in the optical path, and the Gaussian filtering algorithm is used to extract the uniformity characteristics.
[0099] For example, the spot distribution data shows that the light intensity in the center area is 1000 lux and at the edges is 800 lux, with a uniformity of 80%, which is lower than the preset threshold of 85%. Therefore, the optical compensation factor is increased, for example, from 1.0 to 1.2, to generate the first spot optimization set. This compensation improves the uniformity of the spot distribution by increasing the light intensity at the edges.
[0100] Preferably, when acquiring dynamic characteristic data from the first light spot optimization set, attention should be paid to the oscillation frequency of the optical path sensor, and a time series analysis algorithm should be used to analyze the periodic characteristics of the optical path oscillation.
[0101] For example, a sensor detects an oscillation frequency of 8 Hz. Combined with ambient light intensity data, the dynamic adjustment range is determined to be ±0.5 Hz, generating the first set of dynamic characteristics. This analysis quantifies the oscillation characteristics and provides parameter support for the dynamic stabilization of the optical path.
[0102] In one embodiment, when extracting projection quality data for the first dynamic characteristic set, an image segmentation algorithm is used to analyze image integrity.
[0103] For example, the segmentation results showed that 8% of the foreground pixels were missing, falling below the preset integrity threshold of 90%. Therefore, the optical compensation parameters were readjusted, for example, by increasing the compensation coefficient from 1.2 to 1.3, and re-acquiring the data. This resulted in adjusted projection image data with 92% integrity. This approach, by optimizing the compensation parameters, improved the integrity and reliability of the projected image.
[0104] It's easy to understand that the above implementation method, through a progressive logic from geometric distortion correction to projection quality optimization, forms a complete projection optimization process. The examples in each step support each other, ensuring that the projection device achieves efficient and stable image output in complex optical environments.
[0105] S404: Analyze the impact of optical path stability on the response time and noise level of the optical system based on the adjusted projection image data, ambient light feedback, and the dynamic characteristics of the first optical path stability set, determine the correlation characteristics between the response time and the noise level, and recalculate the clarity score to obtain an updated clarity score.
[0106] Specifically, response time data is obtained from the adjusted projection image data, and a time series analysis algorithm is used to calculate the fluctuation period of the response time. Combined with the ambient light intensity data, if the ambient light intensity fluctuation exceeds a preset threshold, the smoothing parameter of the time series is adjusted to obtain a first response time set. Based on the first response time set, noise level data is obtained from the optical system sensor, and a Fourier transform algorithm is used to extract the frequency distribution characteristics of the noise level. Combined with the light intensity feedback data, if the frequency distribution exceeds a preset threshold, the filter coefficient is increased to obtain a first noise optimization set. Using the first noise optimization set and the first response time set, a correlation analysis algorithm is used to calculate the correlation coefficient between the response time and the noise level. Combined with the dynamic characteristic data, a correlation characteristic set is determined. For the correlation characteristic set, quality assessment data is obtained from the projection image data, and a clarity score is recalculated using a clarity score algorithm. Combined with the optical path stability data, an updated clarity score is obtained.
[0107] For example, when obtaining response time data from adjusted projected image data, it's important to consider the optical system's response speed to image changes. Response time reflects the delay between receiving a command and displaying the image, and is typically limited by optical components and signal processing. A time series analysis algorithm is used to analyze the fluctuation period of response time.
[0108] For example, when recording a response time series during a standard test of a projector, a fluctuation period of 0.2 seconds was detected, indicating periodic system delay. Combined with ambient light intensity data, if the ambient light intensity fluctuates by 250 lux, exceeding the preset threshold of 200 lux, the smoothing parameters of the time series are adjusted, for example, increasing the smoothing window from 5 to 7 frames, to generate the first set of response times. This adjustment smoothes the data and reduces the impact of light intensity fluctuations on response time.
[0109] In one possible implementation, noise level data is obtained from the optical system sensor based on the first response time set. The impact of noise on image quality needs to be analyzed. The noise level reflects random fluctuations in the sensor signal, often caused by ambient light or circuit interference. A Fourier transform algorithm is used to extract the frequency distribution characteristics of the noise.
[0110] For example, if sensor data indicates a noise frequency concentration of 10 Hz, combined with light intensity feedback data, if the frequency distribution exceeds a preset threshold of 8 Hz, the filter coefficient is increased, for example, from 0.8 to 1.0, to generate the first noise optimization set. This method reduces the interference of high-frequency noise on the image by enhancing filtering.
[0111] Specifically, using the first noise optimization set and the first response time set, a correlation analysis algorithm is used to calculate the correlation coefficient between response time and noise level, quantifying the mutual influence between the two. The correlation coefficient reflects whether noise significantly affects response time.
[0112] For example, the analysis results show a correlation coefficient of 0.75, exceeding the preset threshold of 0.6, indicating that noise has a significant impact on response time. Combined with dynamic characteristic data, such as the optical path oscillation frequency of 7 Hz, a set of correlation characteristics is determined. This analysis quantifies correlations and provides a basis for subsequent optimization.
[0113] Preferably, for the associated feature set, quality assessment data is obtained from the projection image data, focusing on the clarity of the image, and a clarity scoring algorithm is used to recalculate the clarity score based on edge sharpness and contrast.
[0114] For example, an initial score of 80 points, below the preset threshold of 85 points, could be recalculated based on optical path stability data, such as an oscillation amplitude of ±0.3 mm, and optical parameters adjusted, such as increasing the focus factor to 1.1. This approach improves image detail by optimizing focus.
[0115] It's easy to understand that the above implementation method, through a progressive logic from response time analysis to clarity optimization, forms a complete projection quality improvement process. The examples in each step support each other, ensuring that the projection device achieves efficient image output in complex environments.
[0116] Step S5: After analyzing the optical path stability, the focus adjustment speed is confirmed to obtain the optimal focus parameters, and the projector is driven to complete the focus according to the optimal focus parameters.
[0117] Step S5 includes the following steps: if the difference between the updated clarity score and the initial clarity score is less than the preset convergence threshold, the optical path stability analysis is used to confirm the synergistic effect of the focus adjustment speed, frame rate configuration and ambient light feedback, and the current focus parameters are determined to be the optimal parameters, and the projector is driven to complete the focus using the optimal parameters.
[0118] Specifically, the difference between the current clarity score and the initial clarity score is obtained from the projection device, and a comparison algorithm is used to determine whether the difference is less than a preset convergence threshold. If it is, the light path stability data is extracted from the light path sensor to obtain a first light path stability set. According to the first light path stability set, a time series analysis algorithm is used to calculate the fluctuation characteristics of the focus adjustment speed, and combined with the frame rate configuration data, if the fluctuation characteristics exceed the preset threshold, the frame rate configuration parameters are adjusted to obtain a first collaborative parameter set. Through the first collaborative parameter set, the ambient light feedback data is obtained from the ambient light sensor, and the light intensity frequency distribution is extracted using a Fourier transform algorithm. If the frequency distribution exceeds the preset threshold, the focus parameters are optimized to obtain a first focus parameter set. For the first focus parameter set, a signal generation algorithm is used to generate the drive instruction, and the projection device is controlled by the drive instruction to complete the focus to obtain a final focus state.
[0119] For example, when obtaining the difference between the current and initial clarity scores from a projection device, attention should be paid to the dynamic changes in the clarity score. The clarity score reflects the edge sharpness and contrast of the image, and the difference can indicate the effectiveness of system optimization. Assume that the initial clarity score is 80 points and the current score is 90 points, with a difference of 10 points. A comparison algorithm is used to determine whether the difference is less than a preset convergence threshold, such as 15 points. If the difference is 10 points, which is less than the threshold, it indicates that the system is close to stability, and further optical path stability data can be extracted. Optical path stability data includes oscillation amplitude and frequency, which reflect the positional deviation of optical path components.
[0120] For example, the optical path sensor detects that the oscillation amplitude is 0.2 mm, and generates a first optical path stable set.
[0121] Specifically, based on the first optical path stability set, a time series analysis algorithm is used to calculate the fluctuation characteristics of the focus adjustment speed. The focus adjustment speed reflects the dynamic performance of the lens in responding to commands. If the analysis shows a fluctuation period of 0.3 seconds, exceeding the preset threshold of 0.25 seconds, it indicates that the adjustment speed is unstable. Combined with the frame rate configuration data, for example, if the current frame rate is 60 frames per second, the frame rate is adjusted to 50 frames per second to reduce system load, and the first collaborative parameter set is generated. This adjustment balances the smoothness of focus adjustment by optimizing the frame rate.
[0122] In one embodiment, ambient light feedback data is obtained from an ambient light sensor using a first collaborative parameter set, and the light intensity frequency distribution is analyzed. The ambient light feedback data reflects the impact of external lighting changes on projection. A Fourier transform algorithm is used to extract the light intensity frequency characteristics.
[0123] For example, if the sensor shows a light intensity frequency concentrated at 12 Hz, exceeding the preset threshold of 10 Hz, indicating significant ambient light fluctuations, the camera will optimize focus parameters, such as adjusting the focus step size from 0.5 mm to 0.7 mm, to generate the first focus parameter set. This optimization improves adaptability to ambient light by refining the focus step size.
[0124] For example, for the first focus parameter set, a signal generation algorithm is used to generate a drive instruction to control the projection device to complete the focus. The drive instruction converts the focus parameter into a motor control signal.
[0125] For example, a command specifies that the lens move 0.7 mm. After focusing is completed, the sensor reports the final focus status, and the image edge sharpness is improved to 95 points. This method ensures that the projection equipment can output clear images under complex lighting conditions through precise control.
[0126] It is understandable that the above process, from clarity difference analysis to final focusing, forms a complete optimization chain, with each link supporting each other to ensure continuous improvement of projection quality.
[0127] The present invention further provides an automatic focusing system for a projector, which is used to implement the automatic focusing method described in any one of the above technical solutions, comprising: A data acquisition module, including a CMOS camera and an optical encoder, is used to acquire image data; Feature calculation module, including CNN processor and FTT processor, for performing feature extraction and frequency domain analysis; Intelligent scoring module, with pre-built machine learning models, used to output clarity scores; Dynamic optimization module, including FPGA, for executing gradient descent algorithm and parameter optimization; The motion execution module includes a motor and is used to achieve autofocus.
[0128] The present invention discloses an intelligent projection focusing method and system. The method acquires the projected image through a camera, uses a convolutional neural network and fast Fourier transform to extract image features, and combines a machine learning model to evaluate the clarity. If the clarity is insufficient, a gradient descent algorithm is used to optimize the focusing parameters, and the frame rate is dynamically adjusted according to the ambient light. The present invention also analyzes the relationship between the focal length adjustment speed and the jitter of the imaging plane, considers the impact of the optical path stability on the system response time and noise, and ultimately determines the optimal focusing parameters through iterative optimization. This method can achieve intelligent and precise projection focusing in complex optical environments, effectively improve the quality of the projected image, and adapt to the needs of different scenarios.
[0129] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0130] The above embodiments are intended only to illustrate the technical concepts and features of the present invention. Their purpose is to enable those skilled in the art to understand the present invention and implement it accordingly. They are not intended to limit the scope of protection of the present invention. All equivalent variations and modifications within the scope of the claims of the present invention are intended to be covered by the claims of the present invention.
Claims
1. A projector autofocus method, characterized in that: The following steps are involved: S1: Acquire projection image data through a camera, preprocess the image using a convolutional neural network, extract edge sharpness, contrast level, and detail retention, and obtain a first feature set; S2: Based on the first feature set, using a fast Fourier transform algorithm to perform frequency domain conversion on the image, extract the high-frequency component ratio and spectrum energy distribution, and obtain a frequency domain feature set; S3: Calculating a multi-dimensional clarity score by combining the first feature set and the frequency domain feature set using a pre-trained machine learning model to obtain an initial clarity score; S4: If the initial clarity score is lower than a preset threshold, optimizing focus parameters based on a loss function of the first feature set and the frequency domain feature set using a gradient descent algorithm to obtain a first focus parameter set; S5: After analyzing the optical path stability, confirming the focus adjustment speed, obtaining the optimal focus parameters, and driving the projector to complete the focus according to the optimal focus parameters.
2. The automatic focusing method of a projector according to claim 1, wherein: The following steps are also included between step S4 and step S5: S401: Dynamically adjusting the image acquisition frame rate according to the complexity of the first focus parameter set and the frequency domain feature set, and determining an optimized frame rate configuration in combination with the influence of ambient light intensity on the frame rate; S402: Adjusting the focal length of the projector according to the first focus parameter set, dynamically matching the focus adjustment speed according to the optimized frame rate configuration, analyzing the synergistic effect of the focus adjustment speed and the imaging plane jitter amplitude, obtaining a first optical path stabilization set and extracting adjusted projection image data from the set; S403: Analyzing the dynamic interaction between the geometric distortion and spot distribution of the first optical path stable set and the ambient light intensity based on the first optical path stable set and ambient light feedback, and determining the dynamic characteristics of the first optical path stable set; S404: Analyze the impact of optical path stability on the response time and noise level of the optical system based on the adjusted projection image data, ambient light feedback, and the dynamic characteristics of the first optical path stability set, determine the correlation characteristics between the response time and the noise level, and recalculate the clarity score to obtain an updated clarity score.
3. The automatic focusing method of a projector according to claim 2, wherein: The step S5 specifically includes the following steps: If the difference between the updated clarity score and the initial clarity score is less than the preset convergence threshold, the optical path stability analysis is used to confirm the synergistic effect of the focus adjustment speed, frame rate configuration and ambient light feedback, and the current focus parameters are determined to be the optimal parameters. The projector is driven to complete the focus using the optimal parameters.
4. The automatic focusing method of a projector according to claim 1, wherein: The step S1 comprises: S101: collecting projection image data at a fixed frame rate using a camera, acquiring the first image using an image sensor, and storing the first image in a raw data format; S102: Performing denoising and normalization operations on the first image using a convolutional neural network to generate the second image; S103: If the pixel value distribution of the second image meets a preset threshold, edge sharpness is extracted by an edge detection algorithm, contrast level is calculated by a grayscale histogram, and detail retention is evaluated by a wavelet transform to obtain the first feature set.
5. The automatic focusing method of a projector according to claim 1, wherein: The step S2 comprises the following steps: Performing frequency domain conversion on the first image using a fast Fourier transform algorithm, extracting the proportion of high-frequency components, and obtaining a first secondary frequency domain feature set; Calculating spectrum energy distribution based on the first secondary frequency domain feature set, generating a standardized feature vector, and obtaining a second secondary frequency domain feature set; If the eigenvalue of the second secondary frequency domain feature set meets a preset threshold, the high-frequency component proportion and spectrum energy distribution are integrated through a data fusion algorithm to obtain the frequency domain feature set.
6. The automatic focusing method of a projector according to claim 1, wherein: The loss function in step S4 is: ; Where y is the target clarity score, To predict the score, the focus parameters are iteratively adjusted to obtain a first focus parameter set.
7. The automatic focusing method of a projector according to claim 2, characterized in that: The step 401 specifically includes the following steps: For the first secondary frequency domain feature set, the complexity level is calculated. If the complexity level is higher than a preset threshold, the frame rate adjustment formula F=F0(1-C / C max ), get the first frame rate configuration set; where F is the adjusted frame rate, F0 is the initial frame rate, C is the current computational complexity, C max is the maximum computational complexity; Obtain light intensity data from the ambient light sensor, and use a linear interpolation algorithm to calculate the light intensity weighting coefficient L=I for the first frame rate configuration set. max / I, get the second frame rate configuration set; where L is the weighting coefficient, I max is the maximum light intensity, I is the current light intensity; For the second frame rate configuration set, combined with the first focus parameter set, a data fusion algorithm is used to integrate the high-frequency components of the first secondary frequency domain feature set and the sensor performance parameters, and a final frame rate value is calculated to obtain the optimized frame rate configuration.
8. The automatic focusing method of a projector according to claim 7, characterized in that: The step S404 includes the following steps: Acquire response time data from the adjusted projection image data, and calculate the fluctuation period of the response time using a time series analysis algorithm; In combination with the ambient light intensity data, if the ambient light intensity fluctuation exceeds a preset threshold, a smoothing parameter of the time series is adjusted to obtain a first response time set; Acquiring noise level data from an optical system sensor based on the first response time set, extracting frequency distribution characteristics of the noise level using a Fourier transform algorithm, and combining this with light intensity feedback data; if the frequency distribution exceeds a preset threshold, increasing a filter coefficient to obtain a first noise optimization set; Calculating the correlation coefficient between the response time and the noise level using a correlation analysis algorithm based on the first noise optimization set and the first response time set, and determining a correlation characteristic set in combination with dynamic characteristic data; For the associated characteristic set, quality assessment data is obtained from the projection image data, and the clarity score is recalculated using a clarity scoring algorithm, and combined with the optical path stabilization data to obtain an updated clarity score.
9. The automatic focusing method of a projector according to claim 1, wherein: The step S3 specifically includes the following steps: Based on the first secondary frequency domain feature set, a pre-trained convolutional neural network algorithm is used to calculate the clarity score of the multi-dimensional feature vector to obtain a first score set. If the score value of the first score set meets a preset threshold, the high-frequency component and the energy distribution are integrated through a data fusion algorithm to obtain the initial clarity score.
10. An autofocus system for a projector, used to implement the autofocus method according to any one of claims 1 to 9, characterized in that: include: A data acquisition module, including a CMOS camera and an optical encoder, is used to acquire image data; Feature calculation module, including CNN processor and FTT processor, for performing feature extraction and frequency domain analysis; Intelligent scoring module, with pre-built machine learning models, used to output clarity scores; Dynamic optimization module, including FPGA, for executing gradient descent algorithm and parameter optimization; The motion execution module includes a motor and is used to achieve autofocus.