Real-time correction method and system for image distortion of high-reflection projector
Through the hierarchical correction mechanism and dynamic threshold segmentation technology that integrates posture features and geometric features, the distortion problem of overhead projectors in large-angle projection scenes is solved, high-precision and real-time image correction is achieved, which adapts to complex scenes and environmental interference and reduces hardware costs.
Patent Information
- Application Number
- CN202510721096.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-12
AI Technical Summary
Existing overhead projectors are prone to trapezoidal distortion and surface deformation in large-angle projection scenes. Existing technologies are unable to effectively handle residual distortion and ambient light interference in dynamic scenes, resulting in low correction efficiency.
A hierarchical correction mechanism that fuses posture features and geometric features is adopted, combined with dynamic threshold segmentation and inverse compensation grid technology to generate distortion feature vectors. Sub-pixel real-time distortion correction is achieved through hierarchical correction and secondary correction processing to suppress ambient light interference.
It achieves high-precision, real-time image distortion correction, can dynamically adapt to changes in projector angle and environmental interference, improves correction accuracy and response speed, reduces hardware adaptation costs, and is suitable for projection equipment in complex scenarios.
Smart Images

Figure CN120634844A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of projection display technology, and in particular to a method and system for real-time correction of image distortion of an overhead projector. Background Art
[0002] In current projection display technology, overhead projectors are often used for wide-angle projection scenarios, such as library dome projections and tilted wall displays. Due to the non-perpendicular angle between the projector and the receiving surface, these scenarios are prone to geometric distortion, such as keystone distortion and surface deformation. Existing technologies typically integrate accelerometers or gyroscopes within the projector to calculate a spatial transformation matrix based on attitude data to pre-distort the image.
[0003] Most existing solutions employ a single-stage correction model, constructing a projective transformation model based on attitude sensor data and directly performing an affine or perspective transformation on the image. Some improved solutions incorporate image edge detection algorithms, identifying the deviation between linear features in the projected image and a pre-set template and iteratively adjusting correction parameters to reduce residual distortion. Another type of solution relies on a pre-set 3D model of the projection surface, mapping the real-time image coordinates onto the model surface to compensate for deformation.
[0004] Staged correction is prone to residual distortion in dynamic scenes, while iterative correction based on template matching can introduce processing delays. Solutions based on pre-set 3D models cannot adapt to deformation caused by temporary changes in the projection surface or vibration. Furthermore, existing technologies are unable to compensate for high-frequency environmental interference (such as instantaneous strong light reflections and sudden changes in surface material), resulting in inefficient secondary distortion correction. Summary of the Invention
[0005] To solve the above problems, the present invention provides a real-time correction method and system for image distortion of an overhead projector. It adopts a layered correction mechanism that integrates posture features and geometric features, combined with dynamic threshold segmentation and inverse compensation grid technology, which can realize sub-pixel real-time distortion correction in complex scenes and effectively suppress ambient light interference.
[0006] The above objectives can be achieved through the following solutions:
[0007] A real-time correction method for image distortion of an overhead projector includes acquiring real-time posture data and real-time image data of the projector; generating a distortion feature vector based on the real-time posture data and real-time image data; performing layered correction processing on the distortion feature vector to obtain initial corrected image data; performing secondary correction on the initial corrected image data based on the real-time image data to generate final corrected image data; and outputting the final corrected image data to a projection module for display.
[0008] Optionally, generating a distortion feature vector based on the real-time posture data and real-time image data includes: extracting pitch angle parameters, rotation angle parameters and acceleration parameters from the real-time posture data to generate a posture feature sequence; performing threshold segmentation on the real-time image data using preset threshold segmentation parameters, extracting image straight line features and image surface features, and generating a geometric feature sequence; and fusing the posture feature sequence and the geometric feature sequence to generate a distortion feature vector.
[0009] Optionally, the real-time image data is threshold segmented using preset threshold segmentation parameters, image straight line features and image surface features are extracted, and a geometric feature sequence is generated, including: calculating the gradient change rate of adjacent pixels in the real-time image data to generate a gradient distribution map; predicting the displacement direction of the projected image based on the gradient distribution map and the acceleration parameters in the posture feature sequence; performing sliding window weighting on the gradient distribution map based on the displacement direction to generate a weighted gradient map; extracting image straight line features and image surface features based on the weighted value of each pixel in the weighted gradient map and the size of the threshold segmentation parameter to obtain a geometric feature sequence.
[0010] Optionally, the fusion of the posture feature sequence and the geometric feature sequence to generate a distortion feature vector includes: setting a vertical search range of the image straight line feature according to the pitch angle parameter in the posture feature sequence; performing only reverse translation compensation on the image surface feature according to the rotation angle parameter in the posture feature sequence; and extracting a distortion feature vector based on the set vertical search range and the compensated image surface feature.
[0011] Optionally, the layered correction processing of the distortion feature vector to obtain initial corrected image data includes: performing a projective space transformation on the distortion feature vector to generate coarse corrected image data; extracting the deformation intensity and direction distribution of the residual distortion area in the coarse corrected image data to generate a set of reverse displacement vectors corresponding to each pixel point in the residual distortion area to obtain reverse compensation grid data; and performing coordinate inverse mapping on the coarse corrected image data according to the reverse compensation grid data to generate initial corrected image data.
[0012] Optionally, performing a projection space transformation on the distortion feature vector to generate coarsely corrected image data includes: extracting pitch angle parameters and rotation angle parameters from the distortion feature vector to construct a projection space transformation matrix; mapping the original pixel coordinates of the real-time image data to the transformed spatial coordinates to generate coarsely corrected image data.
[0013] Optionally, performing secondary correction on the initial corrected image data based on the real-time image data to generate final corrected image data includes: comparing the initial corrected image data with a preset theoretical geometric shape to calculate a matching error rate; if the matching error rate exceeds a preset threshold, extracting high-frequency interference features from the real-time image data; and performing regional re-correction on the initial corrected image data according to the high-frequency interference features to generate final corrected image data.
[0014] Optionally, comparing the initial corrected image data with a preset theoretical geometric shape to calculate the matching error rate includes: screening the straight line segments in the initial corrected image data to generate a set of candidate straight lines; calculating the slope deviation rate of each straight line in the candidate straight line set to generate a matching error rate; if the matching error rate exceeds the preset threshold, marking it as the boundary coordinate of the remaining distorted area.
[0015] Optionally, the regional re-correction of the initial corrected image data according to the high-frequency interference characteristics to generate the final corrected image data includes: obtaining real-time ambient light data collected by the projector light intensity sensor; dynamically adjusting the threshold segmentation parameters according to the real-time ambient light data to generate an optimized geometric feature sequence; and performing secondary correction on the remaining distorted area in combination with the optimized geometric feature sequence to generate the final corrected image data.
[0016] Based on the same inventive concept, the present invention also provides a real-time image distortion correction system for an overhead projector, the system comprising: a data acquisition module for acquiring real-time posture data and real-time image data of the projector; a distortion extraction module for generating a distortion feature vector based on the real-time posture data and real-time image data; an initial correction module for performing hierarchical correction processing on the distortion feature vector to obtain initial corrected image data; a final correction module for performing secondary correction on the initial corrected image data based on the real-time image data to generate final corrected image data; and an image output module for outputting the final corrected image data to a projection module for display.
[0017] Compared with the prior art, the present invention has the following advantages:
[0018] 1. This invention achieves high-precision real-time correction. By fusing real-time projector posture data with image geometric features and combining a two-stage processing mechanism of layered correction and secondary correction, it can dynamically adapt to changes in projector angles and environmental interference, significantly improving correction accuracy and response speed. The correction process does not rely on pre-calibrated parameters and can synchronously process image data and sensor data online, ensuring real-time requirements in complex scenarios.
[0019] 2. This invention enhances the robustness of complex distortion correction. It employs a distortion feature vector fusion strategy that fuses posture sequences and geometric sequences. It extracts multidimensional distortion features through gradient weighting and inverse compensation grid techniques, effectively handling multimodal distortion caused by tilted projections, curved screens, and dynamic vibration. The secondary correction module uses an error feedback mechanism to perform targeted compensation for residual distortion areas, improving the system's resistance to high-frequency interference and sudden environmental changes.
[0020] 3. The present invention reduces hardware adaptation costs. By dynamically adjusting threshold segmentation parameters and coordinating processing with ambient light data, the feature extraction algorithm is automatically optimized to adapt to different projection surface materials and lighting conditions, avoiding the hardware limitations of traditional solutions caused by reliance on dedicated screens or fixed installation structures. This technology can be widely integrated into various commercial projection equipment without the need for additional deployment of complex sensor arrays.
[0021] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0023] Figure 1 4 is a flow chart of a method for real-time correction of image distortion of an overhead projector according to an embodiment of the present invention.
[0024] Figure 2 2 is a schematic structural diagram of the layered correction according to an embodiment of the present invention.
[0025] Figure 3 2 is a comparison diagram of the distortion correction effects of the embodiments of the present invention.
[0026] Figure 4 1 is a schematic structural diagram of a real-time image distortion correction system for an overhead projector according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0028] Reference Figure 1 One embodiment of the present invention proposes a real-time correction method for image distortion of an overhead projector. It adopts a layered correction mechanism that fuses posture features and geometric features, combined with dynamic threshold segmentation and inverse compensation grid technology, which can achieve sub-pixel real-time distortion correction in complex scenes and effectively suppress ambient light interference.
[0029] The method of this embodiment specifically includes:
[0030] Obtain real-time posture data and real-time image data of the projector;
[0031] generating a distortion feature vector based on the real-time posture data and the real-time image data;
[0032] Performing hierarchical correction processing on the distortion feature vector to obtain initial corrected image data;
[0033] Performing secondary correction on the initial corrected image data based on the real-time image data to generate final corrected image data;
[0034] The final corrected image data is output to a projection module for display.
[0035] Optionally, generating a distortion feature vector based on the real-time posture data and the real-time image data includes:
[0036] Extracting pitch angle parameters, rotation angle parameters and acceleration parameters from the real-time attitude data to generate an attitude feature sequence;
[0037] Performing threshold segmentation on the real-time image data using preset threshold segmentation parameters, extracting image straight line features and image surface features, and generating a geometric feature sequence;
[0038] The posture feature sequence and the geometric feature sequence are fused to generate a distortion feature vector.
[0039] Specifically, the method first acquires real-time data from the attitude sensor, including pitch and roll angle parameters, and the triaxial accelerometer. These data are arranged in time windows to generate an attitude feature sequence. The data for each feature point corresponds to the instantaneous attitude of the projector in three-dimensional space. Simultaneously, the rates of change of the horizontal and vertical gradients of adjacent pixels in the image data are calculated to create a grayscale intensity gradient distribution map. Based on the instantaneous motion direction component contained in the acceleration parameters, the image contour displacement trend is predicted. A dynamically adjusted sliding window is used to weight the gradient values in a directionally weighted manner, enhancing edge features consistent with the displacement trend to form a weighted gradient map. An adaptive threshold segmentation method is used to extract pixel groups whose gradient values exceed the threshold segmentation parameter. A Hough transform is used to identify straight line segments and mark them as image line features. A Bezier surface fitting algorithm is then used to extract continuous surface boundaries as image surface features, ultimately generating a geometric feature sequence. Based on the mapping between the parameters in the attitude feature sequence and the geometric feature sequence, a six-dimensional tensor structure is extracted, resulting in the distortion feature vector.
[0040] For example, assuming the pitch angle parameter is 15 degrees, the system limits the straight line search area to 30% of the top of the vertical axis of the image during fusion. When the rotation angle parameter is 5 degrees, a translation operation with a lateral compensation of 2.3% of the original image width is applied to the coordinate points of the surface features based on the rotation formula. The gradient direction weight coefficient is used in dynamic edge detection. If the acceleration data shows that the projector is moving to the left, the right gradient value is strengthened with a weight of 1.5 times, thereby improving the edge extraction accuracy in the displacement direction. The final generated distortion feature vector contains the mapping relationship between the posture parameters and the geometric features, and is stored as a six-dimensional tensor structure for subsequent layered correction processing.
[0041] Optionally, performing threshold segmentation on the real-time image data using preset threshold segmentation parameters, extracting image straight line features and image surface features, and generating a geometric feature sequence includes:
[0042] Calculating the gradient change rate of adjacent pixels in the real-time image data to generate a gradient distribution map;
[0043] Predicting the displacement direction of the projected image according to the gradient distribution map and the acceleration parameters in the posture feature sequence;
[0044] Performing sliding window weighting on the gradient distribution map based on the displacement direction to generate a weighted gradient map;
[0045] According to the weighted value of each pixel in the weighted gradient map and the size of the threshold segmentation parameter, the image straight line features and the image surface features are extracted to obtain a geometric feature sequence.
[0046] Specifically, the method first calculates the sum of the absolute grayscale differences between horizontally adjacent pixels and vertically adjacent pixels for each pixel in the real-time image data to obtain the horizontal and vertical gradient values. These values are then superimposed according to coordinates to generate a two-dimensional gradient distribution map. Subsequently, the acceleration parameters in the real-time posture data are analyzed, and the ratio of its x-axis and y-axis components in the three-dimensional coordinate system is extracted. The displacement vector model of the projected image is established based on the acceleration direction trend, and its movement direction angle along the projection plane is predicted. The gradient weight coefficient within the sliding window is defined based on this direction angle. For example, if the predicted displacement is to the right, a higher weight is assigned to the gradient value on the right. The sliding window is placed over a local area of the gradient distribution map, and the product of each gradient value within the window and the direction-related weight is calculated pixel by pixel. The calculated results are accumulated and updated to the corresponding position in the weighted gradient map. Finally, a dynamic threshold segmentation method is adopted. According to the ratio of the weighted value of each pixel in the weighted gradient map to the threshold segmentation parameter, that is, the overall mean, the pixel area exceeding the threshold segmentation parameter is segmented as the candidate edge. The linear features are filtered through Hough transform to form the image straight line features. At the same time, the surface boundary lines are extracted based on the Bezier surface fitting algorithm to generate the image surface features.
[0047] Among them, the gradient distribution map refers to a two-dimensional data matrix composed of the sum of the horizontal gradient and the vertical gradient of each pixel position; the displacement direction prediction refers to the angle calculation based on the direction ratio of the three-axis components in the acceleration parameter mapped to the two-dimensional coordinate system of the projection plane; the sliding window weighting refers to calculating the weight according to the cosine similarity between the predicted direction and the local gradient direction within the specified window size and weighted accumulation of their gradient values; the threshold in dynamic threshold segmentation is dynamically adjusted according to the product of the global average gradient of the weighted gradient map and the normalized variance.
[0048] For example, assuming that the x-axis component of the acceleration parameter is positive and the y-axis component is zero, the system determines that the displacement direction is to the right of the projection plane, and the sliding window is set to a 3×3 pixel range. The weight coefficient of each pixel in the window is calculated as twice the cosine value of the gradient direction angle and the predicted direction angle (0 degrees). Therefore, the weight of the right gradient direction (0 degrees) is 2, and the weight of the upper left direction (135 degrees) is about -0.19. After weighting the sliding window, the gradient value of the right edge is significantly improved. The global average gradient of the weighted gradient map is 15.7, and the variance is 5.3. The segmentation threshold is the product of 15.7 and 5.3, which is about 83.2 divided by the coefficient 10 to obtain a threshold of 8.3. Finally, the horizontally continuously distributed super-threshold pixel area is extracted, and the Hough transform is identified as three longitudinal straight line features. The surface fitting generates two arc boundary lines to form a geometric feature sequence.
[0049] Optionally, the fusing the posture feature sequence and the geometric feature sequence to generate a distortion feature vector includes:
[0050] Setting a vertical search range of the image straight line feature according to a pitch angle parameter in the posture feature sequence;
[0051] According to the rotation angle parameters in the posture feature sequence, only reverse translation compensation is performed on the image surface features;
[0052] According to the set vertical search range and the compensated image surface features, the distortion feature vector is extracted.
[0053] Specifically, the vertical tilt angles corresponding to the pitch angle parameters are used to reduce the vertical search range of the image's linear features to a preset proportion of the original area. For example, as the pitch angle increases, only the upper quarter of the image is retained for linear scanning. For curved surface features, the spatial offset of the projection surface is calculated based on the horizontal steering component of the rotation angle parameter. The coordinates are then reversely translated along the axis corresponding to the angle to ensure that the deformation rate of the curved surface feature matches the corresponding spatial distortion effect.
[0054] Optionally, performing hierarchical correction processing on the distortion feature vector to obtain initial corrected image data includes:
[0055] Performing a projective space transformation on the distortion feature vector to generate coarse correction image data;
[0056] Extracting the deformation intensity and direction distribution of the residual distortion area in the coarse-corrected image data, generating a set of reverse displacement vectors corresponding to each pixel point in the residual distortion area, and obtaining reverse compensation grid data;
[0057] Coordinate inverse mapping is performed on the coarse corrected image data according to the inverse compensation grid data to generate initial corrected image data.
[0058] Specifically, such as Figure 2 As shown, a projection space transformation matrix is first constructed based on the projection pose parameters in the distortion feature vector. The original image coordinates are then translated, rotated, and scaled to generate coarse-corrected image data. This data is then input into a pre-trained convolutional neural network model. By extracting features from multiple residual blocks in its hidden layer, the model identifies the deformation intensity and directional distribution of the residual distorted areas in the image. Ultimately, the model outputs a set of inverse displacement vectors corresponding to each pixel, forming an inverse compensation grid. The pixel coordinates of the coarse-corrected image data are then superimposed with the correction values recorded in the inverse compensation grid data and re-substituted into the affine transformation matrix for coordinate inverse mapping. This eliminates any remaining geometric distortion and outputs the initial corrected image data.
[0059] The projection space transformation refers to a three-dimensional spatial transformation matrix constructed based on the sine of the pitch angle parameter and the cosine of the rotation angle parameter, which is used to eliminate trapezoidal distortion caused by large-angle tilt of the projector. The inverse compensation grid data is a pixel displacement field with a two-dimensional tensor structure. Each element contains a horizontal and vertical compensation vector. The magnitude of this vector is calculated by the neural network model based on the local curvature characteristics of the coarse correction image. The affine transformation is a geometric transformation process that applies an inverse coordinate offset to each pixel coordinate in the inverse compensation grid data. Its core is to reversely superimpose the distortion displacement on the original coarse correction image to restore the projected image to a uniform planar mapping state. The neural network model training process is performed based on a projection surface deformation feature set. This dataset contains the difference mapping data between the standard correction grid and the actual distortion grid at different projection angles for different material surfaces (such as curved curtains and wrinkled walls). The model completes parameter optimization by iteratively minimizing the mean square error between the predicted grid and the actual labeled grid.
[0060] For example, if the projection space transformation matrix corresponds to a pitch angle of 30 degrees and a rotation angle of 10 degrees, the originally tilted trapezoidal border in the coarse correction image data is initially adjusted to a rectangle. The convolutional neural network detects that there is still a 3-pixel wide surface distortion area in the lower right corner of the rectangle. The lateral compensation amount of the reverse compensation grid in this area is -2 pixels and the vertical compensation amount is +1 pixel. During the affine transformation process, the original coordinates (x, y) are adjusted to (x-2, y+1) according to the compensation amount. The final output of the initial corrected image data eliminates the residual deformation, and the edge straight line slope deviation rate is reduced from 5.7% after coarse correction to 1.3%. At the same time, the weight coefficient for the metal curtain in the neural network model is increased by 30% to adapt to the difference in distortion characteristics caused by its surface reflection.
[0061] Optionally, performing a projective space transformation on the distortion feature vector to generate coarse corrected image data includes:
[0062] Extracting pitch angle parameters and rotation angle parameters from the distortion feature vector and constructing a projection space transformation matrix;
[0063] The original pixel coordinates of the real-time image data are mapped to the transformed spatial coordinates to generate coarse-corrected image data.
[0064] Specifically, the sine value of the pitch angle parameter and the cosine value of the rotation angle parameter are first extracted from the real-time posture data. These two are used as basic elements to construct the rotation component matrices around the vertical and horizontal axes, respectively. These two matrices are multiplied together to obtain the final projection space transformation matrix. Next, each pixel coordinate of the original image data is regarded as a two-dimensional plane point. The corresponding three-dimensional spatial coordinate projection point is calculated using the projection space transformation matrix. This projection point is re-projected along the optical axis onto the two-dimensional projection plane to obtain the transformed spatial coordinates. Subsequently, the pixel color value corresponding to each transformed coordinate is calculated using the bilinear interpolation algorithm to form the coarse-corrected image data after preliminary geometric correction.
[0065] Among them, the projection space transformation matrix is a three-dimensional space rotation transformation matrix calculated by the pitch angle parameter and the rotation angle parameter, and the value of each element thereof is determined by the combined operation of the sine function of the pitch angle and the cosine function of the rotation angle, which is used to eliminate the projection angle deviation in the vertical and horizontal directions; the transformed spatial coordinates refer to the coordinate values of the three-dimensional coordinate points mapped by the projection space transformation matrix after being projected onto the two-dimensional plane, and the horizontal component of the coordinate value is adjusted by the rotation angle parameter, and the longitudinal component is adjusted by the pitch angle parameter; the original pixel coordinates refer to the geometric position coordinates corresponding to the row and column index values of each pixel in the original image data array after normalization.
[0066] For example, if the pitch angle parameter is 18 degrees, its sine value is approximately 0.309; if the rotation angle parameter is 12 degrees, its cosine value is approximately 0.978. The construction process of the projection space transformation matrix is: first calculate the rotation matrix around the vertical axis, whose upper left corner element is the cosine value of the rotation angle 0.978, and then superimpose the sine value of the pitch angle 0.309 to the rotation component around the horizontal axis. Assume that the original pixel coordinate (120,200) is obtained after matrix multiplication to obtain the new coordinate (123.5,205.8). At this time, the weighted sum of the RGB values of the four surrounding pixels is calculated by bilinear interpolation. The coordinate point in the final coarse correction image data is filled with the corrected color value. The transformed spatial coordinate is also used as the input parameter of the neural network model, and the subsequent inverse compensation grid generation is guided by recording the mapping offset of each coordinate point.
[0067] Optionally, performing secondary correction on the initial corrected image data based on the real-time image data to generate final corrected image data includes:
[0068] Comparing the initial corrected image data with a preset theoretical geometric shape to calculate a matching error rate;
[0069] If the matching error rate exceeds a preset threshold, extracting high-frequency interference features from the real-time image data;
[0070] Specifically, when the calculated matching error rate exceeds 3% (a preset threshold example value), the time-domain filtering module is activated to perform spectral analysis on the pixel brightness fluctuations of the real-time image data. This analysis captures frequency-domain energy concentrations caused by ambient light flicker or reflections from the projection surface, generating high-frequency interference signatures. These high-frequency interference signatures specifically refer to abnormal brightness fluctuation patterns with a frequency exceeding two-thirds of the projection refresh rate. Parameters include peak amplitude, frequency location, and phase distribution.
[0071] The initial corrected image data is regionally re-corrected according to the high-frequency interference characteristics to generate final corrected image data.
[0072] Optionally, comparing the initial corrected image data with a preset theoretical geometric shape to calculate a matching error rate includes:
[0073] Screening straight line segments in the initial corrected image data to generate a set of candidate straight lines;
[0074] Specifically, after converting the initial rectified image data into a grayscale image, the standard Hough transform algorithm is used to traverse the entire pixel space. The set of pixels that meet line segment continuity requirements is counted, and a minimum accumulator voting threshold is used to filter out candidate line segments that meet the length constraint. Hough line detection refers to an algorithm that uses the principle of parameter space mapping to identify straight line segments in an image. The candidate line set specifically refers to the preliminary detection results retained after filtering through the voting threshold.
[0075] Calculating the slope deviation rate of each line in the candidate line set to generate a matching error rate;
[0076] Specifically, for each line segment in the candidate line set, the absolute difference between its actual slope and the standard slope of a theoretical orthogonal line (horizontally or vertically) on the projection plane is calculated. The absolute value of the deviations for all line segments is summed up and divided by the total number of line segments to obtain the average slope deviation rate as the matching error rate. The slope deviation rate is defined as the relative measure of the deviation of the actual geometric feature from the theoretical geometric reference. The theoretical orthogonal line is the horizontal or vertical line direction preset in the projected image.
[0077] If the matching error rate exceeds the preset threshold, the boundary coordinates of the remaining distorted area are marked.
[0078] Specifically, when the calculated average slope deviation rate exceeds a preset threshold, a convex hull algorithm is used to draw a minimum enclosing polygonal region encompassing all abnormal line segments based on the endpoint coordinates of each line segment in the candidate line set. The vertex coordinates of this region are stored as the boundary coordinate marker data for the residual distortion region. The residual distortion region refers to the local area of the image that still has significant geometric deviation after the previous correction, and the boundary coordinates are the geometric vertex position parameters that define its coverage.
[0079] For example, after Hough line detection on the initial corrected image, eight candidate line segments were obtained, with slopes of 89.5, 91.3, 0.2, 0.8, 88.7, 179.1, 1.5, and 181.2 degrees, respectively. The absolute values of their deviations from the theoretical vertical (90 degrees) and horizontal (0 degrees / 180 degrees) were calculated to be 0.5, 1.3, 0.2, 0.8, 1.3, 0.9, 1.5, and 1.2 degrees, respectively, with an average of approximately 0.96 degrees. When the preset threshold was set to 1.0 degrees, the actual error approached the threshold, but the marking action was still not triggered. If three line segments with deviations of up to 2.8 degrees appear in the candidate lines and the average error rises to 1.5 degrees (exceeding the threshold), the endpoints of the three line segments with the highest deviations are selected to generate the convex hull vertices (coordinates are x1=120, y1=80; x2=310, y2=150; x3=280, y3=400), forming a triangular marking range for the remaining distorted area.
[0080] Optionally, performing regional re-correction on the final corrected image data according to the high-frequency interference feature to generate the final corrected image data includes:
[0081] Obtaining real-time ambient light data collected by the projector's light intensity sensor and combining it with the high-frequency interference characteristics to determine the source of the interference;
[0082] Dynamically adjust the threshold segmentation parameters according to the judgment result to generate an optimized geometric feature sequence;
[0083] The remaining distorted area is subjected to secondary correction in combination with the optimized geometric feature sequence to generate final corrected image data.
[0084] Specifically, high-frequency interference features are first extracted from pixel brightness fluctuations in real-time image data. A time-domain Fourier transform is then used to perform spectral analysis on the image sequence. Energy-concentrated frequency bands with frequencies greater than two-thirds of the projector refresh rate are identified, and the corresponding amplitude peaks and phase fluctuation patterns are captured to generate a high-frequency interference feature map. Subsequently, the real-time ambient light data collected by the projector's light intensity sensor is simultaneously analyzed. If the ambient light fluctuation frequency overlaps with the dominant frequency band in the high-frequency interference feature map, the interference is determined to originate from an external light source. The gradient threshold segmentation parameter for dynamic edge detection is dynamically improved to suppress noise interference on geometric feature extraction. The optimized gradient threshold is applied to the weighted gradient map to resegment the image's linear and surface features, generating an optimized geometric feature sequence adapted to the high-frequency interference environment. Based on this sequence and the boundary coordinates of the remaining distorted regions, a secondary correction model is established to calculate the additional displacement compensation for each pixel based on the inverse compensation grid data. Finally, a coordinate-by-coordinate inverse mapping is performed to generate the final corrected image data free of high-frequency distortion.
[0085] Among them, high-frequency interference features refer to abnormal fluctuation components in the image brightness signal with a frequency higher than two-thirds of the projection refresh rate, which are quantified by the spectral energy distribution characteristics calculated by Fourier transform; real-time ambient light data refers to the ambient lighting intensity and color temperature parameters collected by the light intensity sensor at a rate of 120 frames per second; the high-frequency interference feature spectrum refers to a two-dimensional matrix containing interference frequency, amplitude and phase parameters, which is used to determine the interference intensity of external light sources; the optimized geometric feature sequence refers to the straight line segment coordinate set and surface boundary point set with improved accuracy extracted under the constraint of high gradient threshold, and its false detection rate is reduced.
[0086] For example, when a brightness fluctuation with a frequency of 180Hz (the preset projection refresh rate is 60Hz) is detected in the image sequence, and its amplitude peak is 15% of the standard brightness value, the system determines it as a high-frequency interference feature. If the ambient light sensor synchronously captures the light intensity fluctuation in the 175-185Hz frequency band at this time, the trigger gradient threshold segmentation parameter is increased from 15 to 25. After re-execution of dynamic edge detection, the three noise edges that were originally mistakenly detected as straight line features are filtered out, and the optimized geometric feature sequence retains only two real straight line segments. In the remaining distorted area (x=150-280, y=90-380), the additional lateral compensation amount of -0.8 pixels is calculated for each pixel based on the optimized features, such as Figure 3 As shown in the figure, the slope deviation rate of the straight line segment of the final corrected image is reduced from 1.5% to 0.4%.
[0087] Based on the same inventive concept, Figure 4 As shown, the present invention also provides a real-time image distortion correction system for an overhead projector, the system comprising:
[0088] A data acquisition module is used to acquire real-time posture data and real-time image data of the projector;
[0089] A distortion extraction module, configured to generate a distortion feature vector based on the real-time posture data and the real-time image data;
[0090] An initial correction module, configured to perform hierarchical correction processing on the distortion feature vector to obtain initial corrected image data;
[0091] a final correction module, configured to perform secondary correction on the initial corrected image data based on the real-time image data to generate final corrected image data;
[0092] The image output module is used to output the final corrected image data to the projection module for display.
[0093] It should be noted that the electrical connections between the above-mentioned units do not necessarily mean direct connections of lines. Indirect connections are applicable to the embodiments of the present invention as long as the purpose of the present invention is achieved. The above description is only an exemplary embodiment of the present invention and is not intended to limit the scope of the present invention.
[0094] That is, any equivalent changes and modifications made according to the teachings of the present invention are still within the scope of the present invention. Those skilled in the art will readily conceive of other embodiments of the present invention after considering the disclosure of the specification and practical truths. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary technical means in the art not described herein.
Claims
1. A real-time correction method for image distortion of an overhead projector, characterized in that: The method comprises: Obtain real-time posture data and real-time image data of the projector; generating a distortion feature vector based on the real-time posture data and the real-time image data; Performing hierarchical correction processing on the distortion feature vector to obtain initial corrected image data; Performing secondary correction on the initial corrected image data based on the real-time image data to generate final corrected image data; The final corrected image data is output to a projection module for display.
2. The real-time image distortion correction method for an overhead projector according to claim 1, characterized in that: Generating a distortion feature vector based on the real-time posture data and the real-time image data includes: Extracting pitch angle parameters, rotation angle parameters and acceleration parameters from the real-time attitude data to generate an attitude feature sequence; Performing threshold segmentation on the real-time image data using preset threshold segmentation parameters, extracting image straight line features and image surface features, and generating a geometric feature sequence; The posture feature sequence and the geometric feature sequence are fused to generate a distortion feature vector.
3. The real-time image distortion correction method for an overhead projector according to claim 2, wherein: The method of performing threshold segmentation on the real-time image data using preset threshold segmentation parameters, extracting image straight line features and image surface features, and generating a geometric feature sequence includes: Calculating the gradient change rate of adjacent pixels in the real-time image data to generate a gradient distribution map; Predicting the displacement direction of the projected image according to the gradient distribution map and the acceleration parameters in the posture feature sequence; Performing sliding window weighting on the gradient distribution map based on the displacement direction to generate a weighted gradient map; According to the weighted value of each pixel in the weighted gradient map and the size of the threshold segmentation parameter, the image straight line features and the image surface features are extracted to obtain a geometric feature sequence.
4. The real-time image distortion correction method for an overhead projector according to claim 2, wherein: The fusing the posture feature sequence and the geometric feature sequence to generate a distortion feature vector includes: Setting a vertical search range of the image straight line feature according to a pitch angle parameter in the posture feature sequence; According to the rotation angle parameters in the posture feature sequence, only reverse translation compensation is performed on the image surface features; According to the set vertical search range and the compensated image surface features, the distortion feature vector is extracted.
5. The real-time image distortion correction method for an overhead projector according to claim 1, wherein: The step of performing hierarchical correction processing on the distortion feature vector to obtain initial corrected image data includes: Performing a projective space transformation on the distortion feature vector to generate coarse correction image data; Extracting the deformation intensity and direction distribution of the residual distortion area in the coarse-corrected image data, generating a set of reverse displacement vectors corresponding to each pixel point in the residual distortion area, and obtaining reverse compensation grid data; Coordinate inverse mapping is performed on the coarse corrected image data according to the inverse compensation grid data to generate initial corrected image data.
6. The real-time image distortion correction method for an overhead projector according to claim 5, characterized in that: The performing a projective space transformation on the distortion feature vector to generate coarse correction image data includes: Extracting pitch angle parameters and rotation angle parameters from the distortion feature vector and constructing a projection space transformation matrix; The original pixel coordinates of the real-time image data are mapped to the transformed spatial coordinates to generate coarse-corrected image data.
7. The real-time image distortion correction method for an overhead projector according to claim 1, wherein: The performing secondary correction on the initial corrected image data based on the real-time image data to generate final corrected image data includes: Comparing the initial corrected image data with a preset theoretical geometric shape to calculate a matching error rate; If the matching error rate exceeds a preset threshold, extracting high-frequency interference features from the real-time image data; The initial corrected image data is regionally re-corrected according to the high-frequency interference characteristics to generate final corrected image data.
8. The real-time image distortion correction method for an overhead projector according to claim 7, wherein: Comparing the initial corrected image data with a preset theoretical geometric shape to calculate a matching error rate includes: Screening straight line segments in the initial corrected image data to generate a set of candidate straight lines; Calculating the slope deviation rate of each line in the candidate line set to generate a matching error rate; If the matching error rate exceeds the preset threshold, the boundary coordinates of the remaining distorted area are marked.
9. The real-time image distortion correction method for an overhead projector according to claim 8, wherein: The performing regional re-correction on the initial corrected image data according to the high-frequency interference feature to generate final corrected image data includes: Obtain real-time ambient light data collected by the projector's light intensity sensor; Dynamically adjust the threshold segmentation parameters according to the real-time ambient light data to generate an optimized geometric feature sequence; The remaining distorted area is subjected to secondary correction in combination with the optimized geometric feature sequence to generate final corrected image data.
10. A real-time image distortion correction system for an overhead projector, applied to the real-time image distortion correction method for an overhead projector according to any one of claims 1 to 9, characterized in that: The system comprises: A data acquisition module is used to acquire real-time posture data and real-time image data of the projector; A distortion extraction module, configured to generate a distortion feature vector based on the real-time posture data and the real-time image data; An initial correction module, configured to perform hierarchical correction processing on the distortion feature vector to obtain initial corrected image data; a final correction module, configured to perform secondary correction on the initial corrected image data based on the real-time image data to generate final corrected image data; The image output module is used to output the final corrected image data to the projection module for display.