Image rotation method and system based on angle partition fitting and adaptive adjustment

By employing an image rotation method that combines angle partitioning fitting and adaptive adjustment, the problems of resource waste and insufficient accuracy in traditional methods are solved, achieving efficient and low-latency image rotation and improving the image quality of industrial control displays.

CN121120398APending Publication Date: 2025-12-12SHENZHEN AIXIESHENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511190246.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Traditional image rotation methods suffer from low computational resource utilization, significant waste of logic resources, excessive storage requirements for rotation parameters, and insufficient rotation accuracy in industrial control displays, making it difficult to meet the demands for high precision and low latency.

Method used

An image rotation method based on angle partitioning fitting and adaptive adjustment is adopted. By identifying regional features through image complexity detection technology, dynamically selecting the processing window, and combining the angle coefficient piecewise fitting strategy, the method achieves accurate allocation of computing resources and error compensation, and optimizes the storage of rotation parameters.

Benefits of technology

It significantly saves more than 70% of logic resources, controls rotation accuracy within 0.3 pixels, improves image quality, and meets the real-time and low-cost requirements of industrial control displays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121120398A_ABST
    Figure CN121120398A_ABST
Patent Text Reader

Abstract

The invention discloses an image rotation method based on angle partition fitting and adaptive adjustment, and the method comprises the following steps: adaptively selecting a corresponding sliding window through an image adaptive recognition adjustment strategy, dynamically extracting feature primitives, forming a feature primitive library, and dynamically updating the feature primitive library through a primitive feature evolution model, storing the elements subjected to high-frequency multiplexing; averagely dividing 360 degrees into N intervals, obtaining fitting parameters of cos theta and sin theta of each interval by adopting an angle coefficient segmentation fitting strategy, and storing the fitting parameters; generating a rotation image of an adjacent primitive according to the coordinate offset of the rotation result of the primitive in the feature primitive library; according to the image rotation method based on angle partition fitting and adaptive adjustment, image region features can be intelligently recognized by introducing an image complexity detection technology, accurate allocation of computing resources is achieved by combining an angle coefficient segmentation fitting strategy, and compared with a traditional scheme, more than 70% of logic resources and compensation coefficients at special angles are saved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of industrial control display, and in particular to an image rotation method and system based on angle partition fitting and adaptive adjustment. BACKGROUND

[0002] In industrial control display applications, the image rotation function needs to meet three rigid requirements: angle flexibility: continuous rotation of 0-360° is required, and the step size is ≤0.01°; real-time performance: the rotation delay is ≤3ms under a 4K resolution; and low cost: the number of logic gates is ≤50,000.

[0003] The traditional scheme adopts a full-pixel-level rotation processing method, which has the following disadvantages:

[0004] There is a lack of intelligent image complexity recognition mechanism, and the processing strategy cannot be dynamically adjusted according to the image features, resulting in low utilization of computing resources, serious waste of logic resources, and more than 70% of hardware resources occupied compared to the present application;

[0005] The traditional full-angle parameter storage method cannot realize an efficient segmented fitting algorithm, the rotation parameter storage requirement is too large, the ROM occupies a significant amount of space, and it is difficult to meet the storage limit requirements of industrial-grade chips;

[0006] There is a lack of accurate error compensation mechanism, and the rotation accuracy decreases significantly at special angles (such as close to 90°, 180°, 270°, etc.), the edge sawtooth phenomenon is serious, and the maximum error is more than 0.3 pixels, which cannot meet the high-precision industrial display requirements;

[0007] The allocation of computing resources is unreasonable, the same processing method is used for simple texture regions and complex texture regions, a large amount of invalid calculation is caused, and the real-time performance of the system is seriously affected, and it is difficult to realize a processing delay of less than 3ms under a 4K resolution. SUMMARY

[0008] The technical problem to be solved by the present application is to provide an image rotation method based on angle partition fitting and adaptive adjustment, which can intelligently identify image region features by introducing image complexity detection technology, dynamically select the optimal processing window, and realize accurate allocation of computing resources by combining the angle coefficient segmented fitting strategy, save more than 70% of logic resources compared to the traditional scheme, automatically enable the compensation coefficient at special angles, effectively correct the coordinate calculation error, ensure that the rotation accuracy at any angle is controlled within 0.3 pixels, and significantly improve the image quality.

[0009] To solve the above technical problems, the application provides an image rotation method based on angle partition fitting and adaptive adjustment, comprising the following steps: an image scanning and analysis module selects a corresponding sliding window to dynamically extract a feature primitive to form a feature primitive library adaptively through image adaptive identification adjustment strategy, and stores a high-frequency multiplexed primitive by dynamically updating the feature primitive library through a primitive feature evolution model;

[0010] An image information setting and storage module divides 360 degrees into N intervals, adopts an angle coefficient segmented fitting strategy to obtain fitting parameters of cosθ and sinθ of each interval and stores the fitting parameters;

[0011] An image information receiving and calculating module receives an input rotation angle θ and obtains a corresponding interval, calls the fitting parameters of cosθ and sinθ of the corresponding interval from a storage space, forms a corresponding rotation matrix M, and performs a rotation calculation on each primitive in the feature primitive library according to the rotation matrix to obtain the coordinates of all pixels after rotation;

[0012] An image rotation generation module generates a rotation image of a neighboring primitive according to the coordinate offset of the rotation result of the primitive in the feature primitive library.

[0013] Preferably, the image adaptive identification adjustment strategy is: calculating the gradient variance σ 2 of an input image, σ 2 =E[(P-μ) 2 ], dynamically selecting a 3*3 or 5*5 or 7*7 sliding window size according to the σ 2 value; wherein μ is a pixel mean value, E is an expectation operator, and P represents the gradient amplitude of each pixel point in the input image.

[0014] Preferably, the primitive feature evolution model is specifically:

[0015] Statistically counting the frequency of the primitive in consecutive N frames;

[0016] Marking the primitive with a frequency exceeding a threshold T as a high-frequency multiplexed primitive;

[0017] Updating the marked primitive to an SRAM cache area of the feature library.

[0018] Preferably, the N intervals are 12 intervals, and the angle coefficient segmented fitting strategy is specifically:

[0019] Selecting five feature points θ_i at equal intervals in the interval [30n, 30(n+1)], calculating standard cosθ_i and sinθ_i values as fitting targets, wherein n=0, 1,...11;

[0020] Establishing a cubic polynomial for cosθ_i and sinθ_i of each feature point, respectively:

[0021] cos θ ≈ a0 + a1 θ + a2 θ 2 +a3 θ 3

[0022] sin θ ≈ b0 + b1 θ + b2 θ 2 +b3 θ 3

[0023] Solve the 8 coefficients {a0-a3, b0-b3} by least square method;

[0024] Store the 48 fitting coefficients in ROM in order of interval number.

[0025] Preferably, the step of "calling the fitting parameters of cos θ and sin θ of the corresponding interval from the storage space" is specifically: calling the fitting parameters of cos θ and sin θ {a0-a3, b0-b3} of the corresponding interval from the storage space of ROM,

[0026] cos θ ≈ a0 + a1 θ + a2 θ 2 +a3 θ 3

[0027] sin θ ≈ b0 + b1 θ + b2 θ 2 +b3 θ 3 .

[0028] Preferably, the step of "forming the corresponding rotation matrix M, and performing a rotation calculation according to the rotation matrix for each primitive in the feature primitive library to obtain the coordinates of all pixels after rotation" is specifically:

[0029] The image information receiving and calculating module generates the corresponding rotation matrix M according to the obtained cos θ and sin θ values:

[0030]

[0031] Perform a rotation calculation according to the rotation matrix for each primitive in the feature primitive library to obtain the coordinates of all pixels after rotation:

[0032]

[0033] Where (x, y) is the original pixel coordinate in the primitive, (x0, y0) is the center point coordinate of the primitive, and (x', y') is the coordinate after rotation.

[0034] Preferably, the image rotation generation module generates the rotation image of the adjacent element according to the coordinate offset of the rotation result of the element in the element library, specifically: the image rotation generation module calculates the offset of the coordinates (x', y') relative to the coordinates (x, y) as Δx and Δy according to the rotation result of the element in the element library, and constructs the rotation image of the adjacent element of the element according to the offset Δx and Δy.

[0035] Preferably, the image rotation method based on angle partition fitting and adaptive adjustment further comprises the steps of:

[0036] When the rotation angle is close to the special angle of 90° / 180° / 270°, the rotation coordinate correction module enables the error compensation coefficient k = 1 + 0.001 * | θ - 90° * m | to correct the coordinate error, and executes x'' = k (x' - x0) + x0, y'' = k (y' - y0) + y0;

[0037] Wherein, x'' and y'' are the corrected coordinates, and m is the multiple of 90, taking 1 or 2 or 3.

[0038] To solve the above technical problems, the system of the image rotation method based on angle partition fitting and adaptive adjustment is adopted, which comprises a control chip, the control chip comprising an image scanning and analysis module, an image information setting and storage module, an image information receiving and calculating module and an image rotation generation module.

[0039] After the above method and system are adopted, the image rotation method based on angle partition fitting and adaptive adjustment comprises the following steps: the image scanning and analysis module adaptively selects the corresponding sliding window to dynamically extract the feature elements to form a feature element library through image adaptive identification adjustment strategy, and dynamically updates the feature element library through the element feature evolution model to store the high-frequency reused elements; the image information setting and storage module divides 360 degrees into N intervals, adopts the angle coefficient segmented fitting strategy to obtain the fitting parameters of cos θ and sin θ of each interval and stores them; the image information receiving and calculating module receives the rotation angle θ input from the outside and obtains the corresponding interval, calls the fitting parameters of cos θ and sin θ of the corresponding interval from the storage space, forms the corresponding rotation matrix M, and performs a rotation calculation on each element in the feature element library according to the rotation matrix to obtain the rotated coordinates of all pixels; the image rotation generation module generates the rotation image of the adjacent element according to the coordinate offset of the rotation result of the element in the element library;

[0040] The beneficial effect is that the image rotation method based on angle partition fitting and adaptive adjustment can intelligently identify image region features by introducing image complexity detection technology, dynamically select the optimal processing window, realize accurate allocation of computing resources by combining angle coefficient segmented fitting strategy, save more than 70% of logical resources compared with the traditional scheme, automatically enable compensation coefficient at special angle, effectively correct coordinate calculation error, ensure that the rotation accuracy at any angle is controlled within 0.3 pixels, and significantly improve the image quality. BRIEF DESCRIPTION OF DRAWINGS

[0041] Figure 1 The flowchart of the image rotation method based on angle partition fitting and adaptive adjustment of the embodiment one of the application is shown in the figure.

[0042] Figure 2 The flowchart of the image rotation method based on angle partition fitting and adaptive adjustment of the embodiment five of the application is shown in the figure. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical scheme and advantages of the application clearer, the application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application and do not limit the application.

[0044] Embodiment one

[0045] Please refer to Figure 1 , Figure 1 The flowchart of the image rotation method based on angle partition fitting and adaptive adjustment of the embodiment one of the application is shown in the figure.

[0046] The embodiment discloses an image rotation method based on angle partition fitting and adaptive adjustment, which comprises the following steps: an image scanning and analysis module dynamically extracts feature primitives to form a feature primitive library by adaptively selecting corresponding sliding windows through an image adaptive identification adjustment strategy, and dynamically updates the feature primitive library through a primitive feature evolution model to store high-frequency reused primitives;

[0047] An image information setting and storage module divides 360 degrees into N intervals, adopts an angle coefficient segmented fitting strategy to obtain and store fitting parameters of cosθ and sinθ of each interval;

[0048] An image information receiving and calculating module receives a rotation angle θ input from outside and obtains the corresponding interval, calls the fitting parameters of cosθ and sinθ of the corresponding interval from the storage space, forms a corresponding rotation matrix M, and performs a rotation calculation on each primitive in the feature primitive library according to the rotation matrix to obtain the rotated coordinates of all pixels;

[0049] The image rotation generation module generates a rotated image of a neighboring primitive according to a coordinate offset of a rotation result of a primitive in the primitive library.

[0050] Embodiment Two

[0051] This embodiment is based on Embodiment One, in this embodiment,

[0052] The image adaptive recognition adjustment strategy is: calculating the gradient variance σ 2 of the input image 2 = E[(P-μ) 2 ], dynamically selecting a 3x3 or 5x5 or 7x7 sliding window size according to the σ 2 value;

[0053] Wherein, μ is the average value of pixels, E is the expectation operator, and P represents the gradient amplitude of each pixel point in the input image.

[0054] The primitive feature evolution model is specifically:

[0055] Statistically, the frequency of the primitive appearing in consecutive N frames is calculated;

[0056] The primitive whose frequency exceeds the threshold T is marked as a high-frequency reuse primitive;

[0057] The marked primitive is updated to the SRAM cache area of the feature library.

[0058] Embodiment Three

[0059] This embodiment is based on Embodiment One, in this embodiment, the N intervals are 12 intervals, and the angle coefficient segmentation fitting strategy is specifically:

[0060] 5 feature points θ_i are selected equidistantly in the interval [30n, 30(n+1)], and the standard cosθ_i and sinθ_i values are calculated as fitting targets, where n=0, 1,...11;

[0061] A cubic polynomial is established for each feature point cosθ_i and sinθ_i respectively:

[0062] cosθ≈a0+a1θ+a2θ 2 +a3θ 3

[0063] sinθ≈b0+b1θ+b2θ 2 +b3θ 3

[0064] The 8 coefficients {a0-a3, b0-b3} are solved by the least square method;

[0065] The 48 fitting coefficients are stored in the ROM in order of interval number.

[0066] The step of "retrieving the fitting parameters of cosθ and sinθ for the corresponding interval from the storage space" specifically involves retrieving the corresponding fitting parameters of cosθ and sinθ {a0-a3, b0-b3} from the corresponding storage area in the ROM storage space.

[0067] We get cosθ≈a0+a1θ+a2θ 2 +a3θ 3

[0068] sinθ≈b0+b1θ+b2θ 2 +b3θ 3 .

[0069] Example 4

[0070] This embodiment is based on Embodiment 3. In this embodiment, the step "forming the corresponding rotation matrix M, performing a rotation calculation on each primitive in the feature primitive library according to the rotation matrix, and obtaining the rotated coordinates of all pixels" specifically means:

[0071] The image information receiving and calculation module will use the obtained cosθ and sinθ values ​​to generate the corresponding rotation matrix M.

[0072]

[0073] For each primitive in the feature primitive library, perform a rotation calculation based on the rotation matrix to obtain the rotated coordinates of all pixels:

[0074]

[0075] Where (x,y) are the original pixel coordinates within the primitive, (x0,y0) are the coordinates of the primitive center point, and (x′,y′) are the rotated coordinates.

[0076] The "image rotation generation module generates the rotation image of its adjacent primitives based on the coordinate offset of the rotation result of the primitives in the feature primitive library" specifically means: the image rotation generation module calculates the offset of coordinates (x′, y′) relative to coordinates (x, y) as Δx and Δy based on the rotation result of the primitives in the feature primitive library, and the image rotation generation module constructs the rotation image of the adjacent primitives of the primitive according to the offset Δx and Δy.

[0077] Example 5

[0078] Please see Figure 2 , Figure 2 This is a flowchart of the image rotation method based on angle partitioning fitting and adaptive adjustment according to Embodiment 5 of the present invention;

[0079] This embodiment is based on Embodiment 1. In this embodiment, the image rotation method based on angle partitioning fitting and adaptive adjustment further includes the following steps:

[0080] When the rotation angle approaches the special angles of 90° / 180° / 270°, the rotation coordinate correction module activates the error compensation coefficient k=1+0.001×|θ-90°*m| to correct the coordinate error and executes x″=k(x′-x0)+x0,y″=k(y′-y0)+y0;

[0081] Where x″ and y″ are the corrected coordinates, and m is a multiple of 90, taking the values ​​1, 2, or 3.

[0082] Example 6

[0083] This embodiment discloses a system employing the image rotation method based on angle partitioning fitting and adaptive adjustment described in any one of embodiments one to five, including a control chip. The control chip includes an image scanning and analysis module, an image information setting and storage module, an image information receiving and calculation module, and an image rotation generation module.

[0084] This image rotation method based on angle partitioning fitting and adaptive adjustment can intelligently identify image region features by introducing image complexity detection technology, dynamically select the optimal processing window, and achieve precise allocation of computing resources by combining angle coefficient piecewise fitting strategy. Compared with traditional solutions, it saves more than 70% of logic resources. At special angles, it automatically activates compensation coefficients to effectively correct coordinate calculation errors and ensures that the rotation accuracy at any angle is controlled within 0.3 pixels, significantly improving image quality.

[0085] It should be understood that the above are merely preferred embodiments of the present invention and should not be construed as limiting the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. An image rotation method based on angle partitioning fitting and adaptive adjustment, characterized in that: Includes the following steps: The image scanning and analysis module adaptively selects the corresponding sliding window to dynamically extract feature primitives to form a feature primitive library through an image adaptive recognition and adjustment strategy, and dynamically updates the feature primitive library through a primitive feature evolution model, storing frequently reused primitives. The image information setting and storage module divides 360 degrees into N intervals on average, and uses an angle coefficient piecewise fitting strategy to obtain and store the fitting parameters of cosθ and sinθ for each interval. The image information receiving and calculation module receives the rotation angle θ from the external input and obtains its corresponding interval. It retrieves the fitting parameters of cosθ and sinθ for the corresponding interval from the storage space to form the corresponding rotation matrix M. For each primitive in the feature primitive library, it performs a rotation calculation according to the rotation matrix to obtain the rotated coordinates of all pixels. The image rotation generation module generates rotated images of neighboring primitives based on the coordinate offsets of the rotation results of primitives in the feature primitive library.

2. The image rotation method based on angle partitioning fitting and adaptive adjustment according to claim 1, characterized in that: The image adaptive recognition and adjustment strategy is as follows: calculate the gradient variance σ of the input image. 2 , σ 2 =E[(P-μ)] 2 According to σ 2 The value can be dynamically selected to slide the window size to 3×3, 5×5, or 7×7. Where μ is the pixel mean, E is the expectation operator, and P represents the gradient magnitude of each pixel in the input image.

3. The image rotation method based on angle partitioning fitting and adaptive adjustment according to claim 1, characterized in that: The primitive feature evolution model is specifically as follows: Count the frequency of primitive occurrences in N consecutive frames; Primitives with frequencies exceeding the threshold T are marked as high-frequency multiplexing primitives; Update the tag primitives to the SRAM cache area of ​​the feature library.

4. The image rotation method based on angle partitioning fitting and adaptive adjustment according to claim 1, characterized in that: The N intervals are 12 intervals, and the segmented fitting strategy for the angle coefficients is as follows: Five feature points θ_i are selected at equal intervals within the interval [30n, 30(n+1)], and the standard cosθ_i and sinθ_i values ​​are calculated as the fitting target, where n = 0, 1, ... 11; For each feature point, establish a cubic polynomial for cosθ_i and sinθ_i respectively: cosθ≈a0+a1θ+a2θ 2 +a3θ 3 sinθ≈b0+b1θ+b2θ 2 +b3θ 3 The eight coefficients {a0-a3,b0-b3} are solved using the least squares method. The 48 fitting coefficients are stored in ROM in interval number order.

5. The image rotation method based on angle partitioning fitting and adaptive adjustment according to claim 4, characterized in that: The step of "retrieving the fitting parameters of cosθ and sinθ for the corresponding interval from the storage space" specifically involves retrieving the corresponding fitting parameters of cosθ and sinθ {a0-a3, b0-b3} from the corresponding storage area in the ROM storage space. We get cosθ≈a0+a1θ+a2θ 2 +a3θ 3 sinθ≈b0+b1θ+b2θ 2 +b3θ 3 。 6. The image rotation method based on angle partitioning fitting and adaptive adjustment according to claim 5, characterized in that: The step "forming the corresponding rotation matrix M, performing a rotation calculation on each primitive in the feature primitive library according to the rotation matrix, and obtaining the rotated coordinates of all pixels" specifically means: The image information receiving and calculation module will use the obtained cosθ and sinθ values ​​to generate the corresponding rotation matrix M. For each primitive in the feature primitive library, perform a rotation calculation based on the rotation matrix to obtain the rotated coordinates of all pixels: Where (x, y) are the original pixel coordinates within the primitive, (x0, y0) are the coordinates of the primitive center point, and (x′, y′) are the rotated coordinates.

7. The image rotation method based on angle partitioning fitting and adaptive adjustment according to claim 6, characterized in that: The "image rotation generation module generates rotated images of adjacent primitives based on the coordinate offsets of the rotation results of primitives in the feature primitive library" specifically means: the image rotation generation module calculates the offsets of coordinates (x′, y′) relative to coordinates (x, y) as Δx and Δy based on the rotation results of primitives in the feature primitive library, and the image rotation generation module constructs rotated images of adjacent primitives of the primitive based on the offsets Δx and Δy.

8. The image rotation method based on angle partitioning fitting and adaptive adjustment according to claim 6, characterized in that: The image rotation method based on angle partitioning fitting and adaptive adjustment further includes the following steps: When the rotation angle approaches the special angles of 90° / 180° / 270°, the rotation coordinate correction module activates the error compensation coefficient k=1+0.001×|θ-90°*m| to correct the coordinate error and executes x″=k(x′-x0)+x0, y″=k(y′-y0)+y0; Where x″ and y″ are the corrected coordinates, and m is a multiple of 90, taking the values ​​1, 2, or 3.

9. A system employing the image rotation method based on angle partitioning fitting and adaptive adjustment as described in any one of claims 1 to 8, characterized in that, It includes a control chip, which comprises an image scanning and analysis module, an image information setting and storage module, an image information receiving and calculation module, and an image rotation generation module.