Image data checking method based on data partitioning
By segmenting and XORing image data, combined with solving non-homogeneous linear equations, the problem of high computational complexity in verifying large-volume image data is solved, achieving efficient hardware suitability verification.
Patent Information
- Application Number
- CN202410355050.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-27
- Publication Date
- 2026-08-04
- Estimated Expiration
- 2044-03-27
AI Technical Summary
Existing technologies have high computational complexity when verifying large volumes of image data, making it difficult to meet transmission efficiency requirements and difficult to implement in hardware.
An image data verification method based on data segmentation is adopted. By segmenting image data blocks and performing XOR operations and solving non-homogeneous linear equations, the computational complexity is reduced and the verification efficiency is improved. This method is suitable for hardware implementation.
It reduces the computational complexity of image data verification, improves verification efficiency, is suitable for hardware implementation, and meets the requirements of efficient image data transmission.
Smart Images

Figure CN118229641B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an image data verification method based on data segmentation. Background Technology
[0002] With the continuous advancement of technology, high-resolution image data transmission has become a crucial requirement in many fields, such as medical imaging, security monitoring, and film and television production. These fields need to process and transmit large amounts of high-resolution image data, while placing high demands on transmission speed and image data integrity. If the data is inconsistent after verification, it means that the received video data is incorrect, requiring retransmission or error correction to ensure that subsequent data is processed or displayed correctly. To adapt to the ever-increasing volume and speed of high-speed image data transmission, it is necessary to research reliable and computationally inefficient methods for verifying large volumes of high-speed image data.
[0003] To verify image data transmission, the current common practice is to add a CRC checksum to the image data. This is done by calculating the CRC checksum from the binary data of the entire image frame and appending it to the end of the video data to form a new data packet. However, this method is resource-intensive and difficult to implement in hardware. Furthermore, it requires additional processing such as flow control and congestion control during transmission to ensure no data loss. When the image data volume is large, the processing time is long, the computational burden is heavy, and it is difficult to meet the efficiency requirements of the verification process. Summary of the Invention
[0004] This invention aims to at least partially solve one of the technical problems in related technologies. Therefore, one objective of this invention is to propose an image data verification method based on data segmentation, to address the problems of high computational complexity and difficulty in time convergence during traditional large-scale image data verification.
[0005] According to the present invention, an image data verification method based on data segmentation is proposed, the method steps are as follows:
[0006] S1: Obtain the image input data as the data to be verified, and determine the number of segmented image data blocks;
[0007] S2: Segment the data to be verified in step S1 to obtain multiple sets of first segmented data;
[0008] S3: Perform a fixed number of XOR operations on adjacent data in each row of the first segmented data of each group, and determine the new data to be verified based on the result of the XOR operation;
[0009] S4: Using the new data to be verified obtained in step S3, determine whether the number of columns of the new data to be verified in a single row of each first segmented data is less than or equal to the preset threshold.
[0010] Otherwise, repeat step S3;
[0011] If so, proceed to step S4;
[0012] S5: Using the new data to be verified determined in step S4, a non-homogeneous linear equation system is obtained, wherein the coefficients of the non-homogeneous linear equation system are determined by the new data to be verified determined in step S4. The non-homogeneous linear equation system is solved to obtain a solution set.
[0013] S6: Based on the solution set of the non-homogeneous linear equation system obtained in step S5, a definite solution is obtained by using pseudo-random data input. The definite solution is used as the final data to be verified, and the final data to be verified is appended to the data frame of the first segmented data obtained in step S2.
[0014] Preferably, the number of the first segmented data groups obtained in step S2 is k. Each row of data is XORed with p adjacent pixel data. After one round of operation, the new data to be verified for the kth first segmented data is:
[0015]
[0016] Among them, D i,j,k d represents the new data to be verified in the i-th row and j-th column of the k-th first segment data. i,j*p d represents the first data in each XOR calculation. i,j*p+1 d represents the second data point to the right of the first data point. i,j*p+a d represents the (α+1)th data point involved in the XOR calculation. i,j*(p+1) This represents the last data among the p adjacent data that participate in the XOR calculation.
[0017] Preferably, in step S2, the number of rows of the first segmented data is X, and in step S4, the preset threshold used for comparison with the number of columns of the new data to be verified is T. When X < T, the non-homogeneous linear equation system constructed using the data to be verified of the kth first segmented data as coefficients will necessarily have infinitely many solutions and will not include any zero solutions. In step S5, the new data to be verified determined in step S4 is used to obtain the following non-homogeneous linear equation system:
[0018]
[0019] First, express the above equation in the form of a non-homogeneous linear system of equations: Dx = y;
[0020] To facilitate hardware computation, the above equation is transformed to obtain its general solution as follows:
[0021] x=(D T D) -1 D T y
[0022] Where x represents the solution to the non-homogeneous linear system of equations, and D T D is a symmetric positive definite matrix that satisfies the Cholesky decomposition condition. Therefore, matrix inversion can be used to directly perform the decomposition of (D). T D) -1 The calculation.
[0023] Preferably, the method for solving the non-homogeneous linear equation system in step S5 to obtain the solution set is as follows:
[0024] The old data to be verified is stored in the on-chip RAM of the FPGA system, and then XORed to obtain the new data to be verified, D. i,j,k Establish the DLT algorithm equation system;
[0025] The final solution set of this non-homogeneous linear system of equations is:
[0026] x = c1f1(x1, x2, ..., x) n )+c2f2(x1,x2...x n )+...+c n f n (x1,x2...x n )+(b1,b2...b n )
[0027] Among them, c1-c n The coefficients of each general solution vector can be any data, b1-b n The elements of the particular solution vector can be any data, f1-f n It represents a linear combination function of the solution vectors.
[0028] Preferably, in step S6, pseudo-random data is used to assign values to parameters c1-c. n b1-b n This will give a definite solution to the non-homogeneous linear equation system, and this data will be appended to the data frame of the first segmented data obtained in the corresponding step S2.
[0029] Preferably, in step S2, when a single image contains M*N pixel data, the image input data is divided into various first segmentation data according to a fixed number of image rows X and column numbers N, resulting in M / X first segmentation data. If integer segmentation is not possible, the excess data is treated as a separate group of first segmentation data, for a total of (M / X)+1 groups.
[0030] Preferably, when a single image contains M*N pixel data, after one round of calculation, the number of data to be verified is reduced, and the maximum value of j is reduced to [N / p], where [] indicates rounding up.
[0031] The beneficial effects of this invention are:
[0032] (1) Reduce the computational complexity of image data verification. By dividing the image data into blocks, the size of each block can be adjusted according to the characteristics or importance of the image. This can more effectively balance computing resources and reduce the overall verification complexity.
[0033] (2) Improve image data verification efficiency. By segmentation and multi-round iterative reduction calculation, the amount of data calculation is reduced, so that the verification of each frame of image meets the higher real-time requirements of calculation.
[0034] (3) Easy to implement in hardware. This verification algorithm is highly applicable, taking into account not only the software side but also the feasibility of hardware implementation verification. It is also applicable to hardware implementation verification algorithms such as FPGA. Attached Figure Description
[0035] In the attached diagram:
[0036] Figure 1 This is a flowchart of an image data verification method based on data segmentation proposed in this invention;
[0037] Figure 2 This is a schematic diagram of the hardware solution structure for the non-homogeneous linear equation system proposed in this invention. Detailed Implementation
[0038] Reference Figure 1 An image data verification method based on data segmentation, the steps of which are as follows:
[0039] Step 1: Obtain the image input data as the data to be verified, and determine the number of image data blocks to be segmented;
[0040] When a single image contains M*N pixel data, the image input data will be divided into first segment data according to a fixed number of rows X and columns N, resulting in M / X first segment data. If the data cannot be divided into integers, the extra data will be treated as a separate group of first segment data, for a total of (M / X)+1 groups.
[0041] Step 2: Segment the data to be verified to obtain multiple sets of first segmented data. Perform XOR calculation on each row of each set of first segmented data with adjacent data according to a fixed number of steps. Based on the result of the XOR calculation, determine the new data to be verified.
[0042] Based on the fact that the number of data segments in the first segment in step 1 is k = M / X or (M / X) + 1, and each row of data is XORed with p adjacent pixels, the new data to be verified after one round of calculation is:
[0043]
[0044] Where D i,j,k This represents the new data to be verified in the i-th row and j-th column of the k-th first segmented data. After one round of calculation, the number of data to be verified is reduced, and the maximum value of j is reduced to [N / p]. [] indicates rounding up.
[0045] For example: if the image data output from the image data source is 8-bit grayscale data, then only the lower 8 bits of data are used for cyclic XOR calculation. This determines the latest checksum data for the first segmentation of the grayscale image.
[0046] If the image data output by the image data source is RGB color data, then the data of the three color channels are taken and XORed in a loop to calculate the latest verification data of the first segmentation data of the red, green and blue color channels respectively.
[0047] If the image data output by the image data source is CMYK format color data, then the data of the four color channels are XORed in a loop to calculate the latest verification data of the first segmentation data of the image for the four color channels of cyan, magenta, yellow and black respectively.
[0048] Step 3: After each XOR calculation using a fixed number of adjacent data to obtain new check data, determine whether the number of columns of new check data in a single row of each first segmented data is less than or equal to a preset threshold.
[0049] If not, repeat the step of performing XOR calculations on adjacent data to determine the new data to be verified.
[0050] If so, proceed to the next step to obtain a non-homogeneous linear system of equations;
[0051] For example, if the image resolution is 2048*2048, the image can be divided into 64 data blocks. Setting the threshold for the number of data in a single row to 32 and the number of adjacent data in the XOR calculation to 8, after the first data segmentation, 64 first-segment data with a resolution of 32*2048 are formed. After two rounds of XOR calculation, the latest verification data of the 64 first-segment data is obtained, resulting in a 32*32 parameter matrix used to generate a non-homogeneous linear equation system.
[0052] Step 4: Based on the new data to be verified, obtain a non-homogeneous linear equation system, where the coefficients of the non-homogeneous linear equation system are determined by the latest verification data obtained in the previous step. Solve the non-homogeneous linear equation system to obtain the solution set.
[0053] The image is segmented using the number of rows X, and the threshold T for the number of columns in the new calculated data from step 3 is used. When this condition is met...
[0054] When X < T, the non-homogeneous linear equation system constructed using the validated data of the kth first segment as coefficients will necessarily have infinitely many solutions, and will not include any solutions containing all zeros; the equation system is as follows:
[0055]
[0056] First, express this expression in the form of a non-homogeneous linear system of equations: Dx = y
[0057] To facilitate hardware computation, the general solution to this expression is obtained by transforming it as follows:
[0058] x=(D T D) -1 D T y
[0059] Where D T D is a symmetric positive definite matrix that satisfies the Cholesky decomposition condition. Therefore, matrix inversion can be used to directly perform the decomposition of (D). T D) -1 The calculation is based on... Figure 2 The specific hardware design is as follows: the old data to be verified is stored in the on-chip RAM of the FPGA system, and then a new data to be verified, D, is obtained through an XOR operation. i,j,k Establish the DLT algorithm equation system.
[0060] The final solution set of this non-homogeneous linear system of equations is:
[0061] x = c1f1(x1, x2, ..., x) n )+c2f2(x1,x2...x n )+...+c n f n (x1,x2...x n )+(b1,b2...b n )
[0062] Where c1-c n b1-b n It can be any data.
[0063] For example, for high-resolution image data with a resolution of 2048*2048, if CRC-32 verification is performed, a 32-bit check code needs to be added. This involves using the total number of image data (2048*2048 = 4,194,304) to form a polynomial, shifting it to form a divisor polynomial, and then dividing it. This results in a large amount of data and a large data bit width, leading to high computational complexity. However, this method only requires solving a 32*32 non-homogeneous linear equation system, which requires far less data than the CRC-32 check code.
[0064] Step 5: Based on the solution set of the non-homogeneous linear equation system, obtain a definite solution using pseudo-random data input, and use this definite solution as the final data to be verified, and attach this data to the end of the data frame of the corresponding first segmented data.
[0065] That is, pseudo-random data is used to assign values to the parameters c1-c. n b1-b n This will give a definite solution to the non-homogeneous linear system of equations, and this data will be appended to the data of each first segment.
[0066] For example, during image data transmission, the verification data can be appended to the falling edge of the field synchronization signal to distinguish it from the original image data. Alternatively, a new data path can be added to the data transmission room system specifically for transmitting the verification data of each image. It is only necessary to ensure that the verification data and image data are transmitted synchronously in the system.
Claims
1. An image data verification method based on data segmentation, characterized in that, The method steps are as follows: S1: Obtain the image input data as the data to be verified, and determine the number of segmented image data blocks; S2: Segment the data to be verified in step S1 to obtain multiple sets of first segmented data; S3: Perform a fixed number of XOR operations on adjacent data in each row of the first segmented data of each group, and determine the new data to be verified based on the result of the XOR operation; S4: Using the new data to be verified obtained in step S3, determine whether the number of columns of the new data to be verified in a single row of each first segmented data is less than or equal to the preset threshold. Otherwise, repeat step S3; If so, proceed to step S4; S5: Using the new data to be verified determined in step S4, a non-homogeneous linear equation system is obtained, wherein the coefficients of the non-homogeneous linear equation system are determined by the new data to be verified determined in step S4. The non-homogeneous linear equation system is solved to obtain a solution set. S6: Based on the solution set of the non-homogeneous linear equation system obtained in step S5, a definite solution is obtained by using pseudo-random data input. The definite solution is used as the final data to be verified, and the final data to be verified is appended to the data frame of the first segmented data obtained in step S2.
2. The image data verification method based on data segmentation according to claim 1, characterized in that: In step S2, the number of the first segmented data groups is k. Each row of data is XORed with p adjacent pixel data. After one round of calculation, the new data to be verified for the kth segment of the first segmented data is: ,in, This represents the new data to be verified in the i-th row and j-th column of the first segment of the k-th group.
3. The image data verification method based on data segmentation according to claim 2, characterized in that: In step S2, the number of rows in the first segmented data is X. In step S4, the preset threshold used for comparison with the number of columns in the new data to be verified is T. When X < T, the non-homogeneous linear equation system constructed using the data to be verified in the kth group of the first segmented data as coefficients will necessarily have infinitely many solutions, and will not include any solutions with all zeros. In step S5, the new data to be verified determined in step S4 is used to obtain the non-homogeneous linear equation system, which is as follows: First, express the above equation in the form of a non-homogeneous linear system of equations: Dx = y; To facilitate hardware computation, the above equation is transformed to obtain its general solution as follows: Where x represents the solution to the non-homogeneous linear system of equations, and D T D is a symmetric positive definite matrix that satisfies the Cholesky decomposition condition, and can be directly decomposed using matrix inversion. The calculation.
4. The image data verification method based on data segmentation according to claim 3, characterized in that, The method for solving the non-homogeneous linear equation system in step S5 to obtain the solution set is as follows: The old data to be verified is stored in the on-chip RAM of the FPGA system, and then XORed to obtain the new data to be verified. Establish the DLT algorithm equation system; The final solution set of this non-homogeneous linear system of equations is: Among them, c1-c n The coefficients of each general solution vector can be any data, b1-b n The elements of the particular solution vector can be any data, f1-f n It represents a linear combination function of the solution vectors.
5. The image data verification method based on data segmentation according to claim 4, characterized in that: In step S6, pseudo-random data is assigned to the parameter c1-c. n b1-b n This will give a definite solution to the non-homogeneous linear equation system, and this data will be appended to the data frame of the first segmented data obtained in the corresponding step S2.
6. The image data verification method based on data segmentation according to claim 1, characterized in that: In step S2, when a single image contains M×N pixel data, the image input data is divided into first segmentation data according to a fixed number of rows X and columns N, resulting in M / X first segmentation data. If the data cannot be divided into integers, the excess data is treated as a separate group of first segmentation data, for a total of (M / X)+1 groups.
7. The image data verification method based on data segmentation according to claim 2, characterized in that: When a single image contains M×N pixels, after one round of calculation, the number of data to be verified decreases, and the maximum value of j decreases to [N / p], where [] indicates rounding up.