Image processing program debugging method and system
By adding test coverage code to the image processor and using streamlined image generation tools to process the test images, the problem of low debugging efficiency of image processors is solved, and the number of branch runs and data volume is reduced, which improves debugging efficiency.
Patent Information
- Application Number
- CN202510610663.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-08-01
AI Technical Summary
During the debugging process of existing image processing programs, the number of branching traversals of the C language algorithm prototype is too high, resulting in low debugging efficiency and the test image contains a large amount of redundant data, which affects the debugging efficiency.
By adding test coverage code to the C algorithm prototype, obtaining the test image attribute information that satisfies the coverage, using the streamlined image generation tool to process the test image, generate a streamlined test image, and use it as input to compare the output of the C algorithm prototype and the hardware description language, and debug the hardware description language.
It effectively reduces the number of running branches of C algorithm prototypes, reduces the amount of input data, and improves the debugging efficiency of image processing programs.
Smart Images

Figure CN120407381A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automatic testing, and particularly relates to a debugging method and system for an image processing program, an electronic device, a computer storage medium, a chip, and a chip module. Background Art
[0002] Currently, in order to make the captured image more vividly restore the original shooting scene, or to identify a target object in the captured image, an image processing program is usually used to perform corresponding processing on the captured original image, such as black level compensation, color interpolation, white balance correction, color space conversion, denoising, demosaicing, feature extraction, etc.
[0003] Generally, when writing an image processing program, the algorithm prototype is first written in C language, and then according to the hardware characteristics of the image processing chip, the algorithm prototype is rewritten into a hardware description language adapted to the image processing chip. In order to ensure the consistency between the rewritten hardware description language and the algorithm prototype written in C language, it is usually necessary to use test images and relevant parameters for verification, that is, use the test images to run the algorithm prototype and the hardware description language, and adjust the problems in the hardware description language coding by comparing the inconsistencies between the outputs of the two. After multiple debuggings, until the output results of the two are consistent.
[0004] However, in the actual debugging process, since the C language algorithm prototype contains a large number of branches (such as if statements), in order to traverse all scenarios, the upper branches are often run thousands of times, which greatly affects the debugging efficiency. In addition, the current test images for debugging contain a large amount of redundant data, making the input data huge, which also affects the debugging efficiency of the image processing program. Summary of the Invention
[0005] The purpose of the present invention is to provide a debugging method and system for an image processing program, an electronic device, a computer storage medium, a chip, and a chip module, so as to solve the problem of how to improve the debugging efficiency of the image processing program.
[0006] To solve the above technical problems, the present invention provides a debugging method for an image processing program, including: Running a C language algorithm prototype added with test coverage code to obtain test image attribute information that meets the coverage rate; Processing the test image according to the test image attribute information to extract a refined test image; Using the refined test image as the input of the C language algorithm prototype and the hardware description language to obtain a first algorithm vector output by the C language algorithm prototype and a second algorithm vector output by the hardware description language; Debugging the hardware description language according to the comparison result of the first algorithm vector and the second algorithm vector.
[0007] Optionally, in the method for debugging the image processing program, the method of running the C language algorithm prototype with test coverage code added thereto to obtain test image attribute information that meets the coverage rate includes: Write test coverage code; Add the test coverage code to the C language algorithm prototype; Configure the algorithm parameters and the test image; Use the test image as the input, and run the C language algorithm prototype with the test coverage code added thereto according to the configured algorithm parameters to obtain test image attribute information that meets the coverage rate.
[0008] Optionally, in the method for debugging the image processing program, the test image attribute information includes the coordinates of the image pixels, the size of the test image, the format of the test image, and the frame index of the test image.
[0009] Optionally, in the method for debugging the image processing program, the method of processing the test image according to the test image attribute information to extract a trimmed test image includes: Write a trimmed image generation tool; According to the test image attribute information, use the trimmed image generation tool to perform a matting process on the test image, and use the image block obtained by the matting as the trimmed test image.
[0010] Optionally, in the method for debugging the image processing program, the method of processing the test image according to the test image attribute information to extract a trimmed test image further includes: If multiple image blocks are obtained by matting, splice the multiple image blocks to obtain a trimmed test image; wherein, if there are empty pixel positions, the empty pixel positions are filled with random values.
[0011] Optionally, in the method for debugging the image processing program, the method of processing the test image according to the test image attribute information to extract a trimmed test image further includes: Judge whether the obtained trimmed test image meets the coverage rate requirement. If it does not meet the coverage rate requirement, add test images to generate new image blocks, splice all the image blocks to obtain a new trimmed test image, and / or change the algorithm parameters, run the C language algorithm prototype with the test coverage code added thereto using the new algorithm parameters to obtain new test image attribute information, and process the test image according to the new test image attribute information to extract a new trimmed test image.
[0012] Optionally, in the method for debugging the image processing program, the method of using the reduced test image as the input of the C language algorithm prototype and the hardware description language to obtain the first algorithm vector output by the C language algorithm prototype and the second algorithm vector output by the hardware description language includes: Write the hardware description language according to the C language algorithm prototype; Configure the same algorithm parameters for the C language algorithm prototype and the hardware description language; Use the reduced test image as the input of the C language algorithm prototype configured with algorithm parameters to obtain the first algorithm vector output by the C language algorithm prototype; Use the same reduced test image as the input of the hardware description language configured with algorithm parameters to obtain the second algorithm vector output by the hardware description language.
[0013] Optionally, in the method for debugging the image processing program, the method of debugging the hardware description language according to the comparison result of the first algorithm vector and the second algorithm vector includes: Perform a binary comparison on the first algorithm vector and the second algorithm vector; If the first algorithm vector and the second algorithm vector are consistent, the debugging is completed; If the first algorithm vector and the second algorithm vector are inconsistent, debug the hardware description language until the second algorithm vector output by the debugged hardware description language is consistent with the first algorithm vector.
[0014] To solve the above technical problems, the present invention also provides a debugging system for an image processing program, which is used to implement the method for debugging the image processing program described in any one of the above, and the debugging system for the image processing program includes: A program writing module, which is used to obtain the C language algorithm prototype, add test coverage code to the C language algorithm prototype, and write the hardware description language according to the C language algorithm prototype; An image extraction module, which is used to run the C language algorithm prototype added with test coverage code to obtain the test image attribute information that meets the coverage rate, and process the test image according to the test image attribute information to extract the reduced test image; A program debugging module, which is used to use the reduced test image as the input of the C language algorithm prototype and the hardware description language to obtain the first algorithm vector output by the C language algorithm prototype and the second algorithm vector output by the hardware description language, and debug the hardware description language according to the comparison result of the first algorithm vector and the second algorithm vector.
[0015] To solve the above technical problems, the present invention further provides an electronic device, including a memory, a processor, and an executable program stored on the memory and capable of being run by the processor; when the processor runs the executable program, it executes the debugging method of the image processing program described in any one of the above.
[0016] To solve the above technical problems, the present invention further provides a computer storage medium, which stores an executable program; when the executable program is executed, it implements the debugging method of the image processing program described in any one of the above.
[0017] To solve the above technical problems, the present invention further provides a chip or a chip module, which is coupled to a memory and is used to execute a computer program stored in the memory to execute the debugging method of the image processing program described in any one of the above.
[0018] The debugging method and system of the image processing program, electronic device, computer storage medium, chip and chip module provided by the present invention include: running a C language algorithm prototype added with test coverage code to obtain test image attribute information that meets the coverage rate; processing the test image according to the test image attribute information to extract a refined test image; using the refined test image as the input of the C language algorithm prototype and the hardware description language to obtain a first algorithm vector output by the C language algorithm prototype and a second algorithm vector output by the hardware description language; debugging the hardware description language according to the comparison result of the first algorithm vector and the second algorithm vector. By adding test coverage code, each branch of the C language algorithm prototype only runs once, greatly reducing the number of branch runs, thereby effectively improving the debugging efficiency of the image processing program; by refining the test image, the test image used for debugging does not contain redundant data, thereby reducing the input data volume and effectively improving the debugging efficiency of the image processing program, and solving the problem of how to improve the debugging efficiency of the image processing program. Description of the Drawings
[0019] Figure 1 It is a flowchart of the debugging method of the image processing program provided in this embodiment; Figure 2 It is a schematic diagram of the process logic of the debugging method of the image processing program provided in this embodiment; Figure 3 It is a schematic diagram of the structure of the debugging system of the image processing program provided in this embodiment. Detailed Embodiments
[0020] The following further elaborates in detail on the debugging method and system for an image processing program, electronic device, computer storage medium, chip, and chip module proposed by the present invention in conjunction with the accompanying drawings and specific embodiments. It should be noted that the accompanying drawings are all in a very simplified form and use non-precise scales, only for conveniently and clearly assisting in explaining the purpose of the embodiments of the present invention. In addition, the structures shown in the accompanying drawings are often part of the actual structures. Specifically, the accompanying drawings need to show different emphases and sometimes use different scales.
[0021] It should be noted that the "first", "second", etc. in the description, claims, and accompanying drawings of the present invention are used to distinguish similar objects in order to describe the embodiments of the present invention, rather than to describe a specific order or sequence. It should be understood that such structures can be interchanged under appropriate circumstances. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0022] This embodiment provides a debugging method for an image processing program, as Figure 1 shown, including: S1, running a C language algorithm prototype added with test coverage code to obtain test image attribute information that meets the coverage rate; S2, processing the test image according to the test image attribute information to extract a refined test image; S3, using the refined test image as the input of the C language algorithm prototype and the hardware description language to obtain a first algorithm vector output by the C language algorithm prototype and a second algorithm vector output by the hardware description language; S4, debugging the hardware description language according to the comparison result of the first algorithm vector and the second algorithm vector.
[0023] The debugging method for the image processing program provided in this embodiment, by adding test coverage code, enables each branch of the C language algorithm prototype to run only once, greatly reducing the number of branch runs, thereby effectively improving the debugging efficiency of the image processing program; by refining the test image, the test image used for debugging does not contain redundant data, thereby reducing the input data volume and effectively improving the debugging efficiency of the image processing program, and solving the problem of how to improve the debugging efficiency of the image processing program.
[0024] Specifically, in this embodiment, step S1, the method of running a C language algorithm prototype added with test coverage code to obtain test image attribute information that meets the coverage rate includes: S11. Write test coverage code.
[0025] Considering that in practical applications, the common errors in the hardware description language during the debugging process usually include arithmetic errors in the data path, errors in the state transition process, and errors at the conditional branch boundary points. When these errors are mapped back to the C language algorithm prototype, they mainly occur in the if branch section.
[0026] For example, for if(a>b), only two cases need to be tested: true (a>b) and false (a≤b). However, during the debugging process, to avoid boundary errors, the actual test cases include true (a=b+c), true boundary (a=b+1), false (a=b-c), and false boundary (a=b). The test coverage definition for one expression is shown in Table 1:
[0027] Table 1. Test coverage definition for 1 expression When there are 2 expressions, the test coverage definition can be shown in Table 2:
[0028] Table 2. Test coverage definition for 2 expressions Similarly, the test coverage definition for 3 expressions can be obtained, as shown in Table 3:
[0029] Table 3. Test coverage definition for 3 expressions And the test coverage definition for 4 expressions, as shown in Table 4:
[0030] Table 4. Test coverage definition for 4 expressions For other cases of expressions in the if code, they can all be decomposed into the above combinations of if statements. As long as the above cases can be covered, all if code can be covered. Those skilled in the art can write the test coverage code according to the actual requirements in combination with the above table, and this application will not elaborate further on this.
[0031] S12. Add the test coverage code to the C language algorithm prototype.
[0032] Specifically, how to add the test coverage code to the C language algorithm prototype is well-known to those skilled in the art, and this application will not elaborate further on this. Among them, the C language algorithm prototype is the C language algorithm prototype used for image processing of images. In practical applications, existing written C language algorithm prototypes can be used, so that the writing of the C language algorithm prototype can be omitted.
[0033] It should be noted that the debugging method of the image processing program of the present application does not limit the image processing purpose of the C language algorithm prototype. That is, the C language algorithm prototypes used in various image processing can all use the debugging method of the image processing program of the present application to debug the program. The debugging method of the image processing program provided by the present application has universal applicability.
[0034] S13. Configure algorithm parameters and test images.
[0035] Specifically, the algorithm parameters can be reasonably set according to the actual image processing purpose; the test image can be an actual scene image, and the format of the test image can be RAW, RGB, YUV, etc.
[0036] S14. Use the test image as the input, and run the C language algorithm prototype with test coverage code according to the configured algorithm parameters to obtain test image attribute information that meets the coverage rate.
[0037] Specifically, in this embodiment, the test image attribute information includes but is not limited to the coordinates of image pixels (including abscissa and ordinate), the size of the test image (including width and height), the format of the test image, the frame index of the test image, and the bit width depth of image pixels, etc.
[0038] Furthermore, in this embodiment, in step S2, the method of processing the test image according to the test image attribute information to extract a refined test image includes: S21. Write a refined image generation tool.
[0039] Specifically, in practical applications, an image synthesis tool such as an image merge tool can be used. This tool is mainly used to analyze and process the test image to extract the effective image area, thereby removing redundant data in the image. Those skilled in the art can write the code of this tool according to the function of this tool, and the present application will not elaborate on this.
[0040] S22. According to the test image attribute information, make the refined image generation tool perform matte extraction processing on the test image, and use the image block obtained by the matte extraction as the refined test image.
[0041] For example, if the resolution of the original test image is 4000×3000, then after being processed by the refined image generation tool, the resolution of the obtained image block (i.e., the refined test image) can be 160×120. Compared with the original test image, the resolution of the processed refined test image is greatly reduced, thereby effectively reducing the amount of image data and being beneficial to improving the efficiency of program debugging.
[0042] Preferably, considering that the streamlined image generation tool may obtain multiple image blocks after processing a test image, in this embodiment, if multiple image blocks are obtained by image matting, the multiple image blocks are stitched together to obtain a streamlined test image. In practical applications, the stitching process of multiple image blocks can also be completed with the help of the streamlined image generation tool, so that the streamlined image generation tool finally outputs only one streamlined test image.
[0043] Considering that in the process of image matting by the streamlined image generation tool, for the block data at the corners of the test image, the algorithm of the streamlined image generation tool usually involves edge flipping processing, while there may be no edge-flipped data in the actual test image. Therefore, when stitching multiple image blocks, it is necessary to identify whether it is on the boundary by combining the position of the image pixels, so as to keep the test coverage unaffected.
[0044] In addition, considering that there are alignment requirements for block processing in image algorithm processing. For example, when processing a 3×3 RAW image, 4 alignment is required. Therefore, when multiple image blocks form a streamlined test image, the placement of different block data should meet the alignment requirements. Among them, if there are empty pixel positions, the empty pixel positions are filled with random values. In this way, not only can all valid image regions in the original test image be retained, but also the richness of the test image can be increased by filling the empty pixel positions with random values.
[0045] In addition, considering that in practical applications, the coverage rate of the generated streamlined test image may not meet the requirements. Therefore, in this embodiment, it is necessary to determine whether the obtained streamlined test image meets the coverage rate requirements (the coverage rate is usually required to be 100% coverage). If the coverage rate requirements are not met, test images can be added to generate new image blocks, so as to ensure that there are enough image blocks, and the image blocks generated from all test images are stitched together to obtain a new streamlined test image; and / or, change the algorithm parameters, run the C language algorithm prototype with test coverage code using the new algorithm parameters to obtain new test image attribute information, and process the test image according to the new test image attribute information to extract a new streamlined test image. In this way, a streamlined test image that meets the coverage rate requirements and its algorithm parameters can be obtained.
[0046] Further, in this embodiment, step S3, using the streamlined test image as the input of the C language algorithm prototype and the hardware description language, so as to obtain the first algorithm vector output by the C language algorithm prototype and the second algorithm vector output by the hardware description language, includes: S31, write the hardware description language according to the C language algorithm prototype.
[0047] The method of writing a hardware description language based on a C language algorithm prototype is well-known to those skilled in the art, and will not be elaborated in this application. In practical applications, the adapted hardware description language corresponding to the C language algorithm prototype can be directly used.
[0048] S32. Configure the same algorithm parameters for the C language algorithm prototype and the hardware description language.
[0049] Specifically, the algorithm parameters are the algorithm parameters used when generating the reduced test image, that is, the algorithm parameters finally confirmed in step S2.
[0050] S33. Use the reduced test image as the input of the C language algorithm prototype configured with algorithm parameters to obtain the first algorithm vector output by the C language algorithm prototype, where the C language algorithm prototype is the C language algorithm prototype added with test coverage code.
[0051] S34. Use the same reduced test image as the input of the hardware description language configured with algorithm parameters to obtain the second algorithm vector output by the hardware description language.
[0052] In this way, since the C language algorithm prototype is added with test coverage code, when the program runs, each branch only runs once. Compared with the prior art where the branches run thousands of times, the number of branch runs is greatly shortened, thus effectively improving the debugging efficiency of the image processing program. At the same time, during the debugging process, the reduced test image used saves redundant data compared with the original test image, so the amount of data input to the program is reduced, thereby further improving the debugging efficiency of the image processing program.
[0053] Further, in this embodiment, the method for debugging the hardware description language according to the comparison result of the first algorithm vector and the second algorithm vector in step S4 includes: S41. Perform a binary comparison on the first algorithm vector and the second algorithm vector; S42. If the first algorithm vector and the second algorithm vector are the same, the debugging is completed; S43. If the first algorithm vector and the second algorithm vector are different, debug the hardware description language until the second algorithm vector output by the debugged hardware description language is the same as the first algorithm vector.
[0054] Next, with reference to Figure 2 , the main process of the debugging method for the image processing program provided in this embodiment is described as follows: First, obtain the C language algorithm prototype, write test coverage code, and write the hardware description language according to the C language algorithm prototype.
[0055] Then, add the test coverage code to the C language algorithm prototype and configure algorithm parameters for the C language algorithm prototype.
[0056] After that, use the test image as the input of the C language algorithm prototype to obtain test image attribute information.
[0057] Next, according to the test image attribute information, use the reduced image generation tool to process the test image to obtain a reduced test image.
[0058] Then, determine whether the reduced test image meets the coverage requirement. If it does not meet the coverage requirement, the algorithm parameters can be kept unchanged, the test image can be replaced, and the above steps can be repeated to obtain more image blocks, and all the image blocks are spliced until the coverage rate of the finally obtained reduced test image after replacing the test image meets the requirement, or the algorithm parameters are replaced and the above steps are repeated until the coverage rate of the reduced test image obtained under the current algorithm parameters meets the requirement, or a combination of replacing the test image and replacing the algorithm parameters is used until the coverage rate of the obtained reduced test image meets the requirement.
[0059] It should be noted that when splicing the image blocks generated from multiple test images to obtain a reduced test image, the algorithm parameters corresponding to each image block should be the same to ensure the accuracy of the hardware description language debugging.
[0060] If the reduced test image meets the coverage requirement, input the reduced test image into the C language algorithm prototype and the hardware description language, so that the C language algorithm prototype outputs a first algorithm vector and the hardware description language outputs a second algorithm vector.
[0061] It should be noted that at this time, the algorithm parameters used by the C language algorithm prototype and the hardware description language should be the algorithm parameters configured in the C language algorithm prototype with the test coverage code added when obtaining the reduced test image, so as to ensure the accuracy of the hardware description language debugging.
[0062] Finally, if the first algorithm vector and the second algorithm vector are the same, it is considered that the hardware description language debugging is completed; otherwise, the hardware description language is debugged until the first algorithm vector and the second algorithm vector are the same.
[0063] This embodiment also provides a debugging system for an image processing program, which is used to implement the debugging method of the image processing program as described above. Figure 3 As shown in the figure, the debugging system for the image processing program includes: A program writing module, which is used to obtain the C language algorithm prototype, add the test coverage code to the C language algorithm prototype, and write the hardware description language according to the C language algorithm prototype; An image extraction module, which is used to run a C language algorithm prototype with test coverage code added to obtain test image attribute information that meets the coverage rate, and process the test image according to the test image attribute information to extract a refined test image; A program debugging module, which is used to use the refined test image as the input of the C language algorithm prototype and the hardware description language to obtain a first algorithm vector output by the C language algorithm prototype and a second algorithm vector output by the hardware description language, and debug the hardware description language according to the comparison result of the first algorithm vector and the second algorithm vector.
[0064] The debugging system of the image processing program provided in this embodiment adds test coverage code through the program writing module, enabling each branch of the C language algorithm prototype to run only once, greatly reducing the number of branch runs, thereby effectively improving the debugging efficiency of the image processing program; the image extraction module refines the test image, so that the test image used for debugging does not contain redundant data, thereby reducing the input data volume and effectively improving the debugging efficiency of the image processing program, solving the problem of how to improve the debugging efficiency of the image processing program.
[0065] In addition, this embodiment also provides an electronic device, including a memory, a processor, and an executable program stored on the memory and capable of being run by the processor; when the processor runs the executable program, it executes the debugging method of the image processing program as described above.
[0066] In addition, this embodiment also provides a computer storage medium, which stores an executable program; when the executable program is executed, it implements the debugging method of the image processing program as described above.
[0067] In addition, this embodiment also provides a chip or a chip module, which is coupled to the memory and used to execute the computer program stored in the memory to execute the debugging method of the image processing program as described above.
[0068] It should be noted that the various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. In addition, the different parts between the embodiments can also be combined and used, and the present invention does not limit this.
[0069] The debugging method and system for an image processing program, electronic device, computer storage medium, chip, and chip module provided in this embodiment include: running a C language algorithm prototype with test coverage code added to obtain test image attribute information that meets the coverage rate; processing the test image according to the test image attribute information to extract a refined test image; using the refined test image as the input for the C language algorithm prototype and the hardware description language to obtain a first algorithm vector output by the C language algorithm prototype and a second algorithm vector output by the hardware description language; and debugging the hardware description language according to the comparison result between the first algorithm vector and the second algorithm vector. By adding test coverage code, each branch of the C language algorithm prototype only runs once, greatly reducing the number of branch runs, thereby effectively improving the debugging efficiency of the image processing program; by refining the test image, the test image used for debugging does not contain redundant data, thereby reducing the input data volume and effectively improving the debugging efficiency of the image processing program, solving the problem of how to improve the debugging efficiency of the image processing program.
[0070] The above description is only a description of the preferred embodiments of the present invention and does not limit the scope of the present invention in any way. Any changes and modifications made by those of ordinary skill in the field of the present invention according to the above disclosure shall fall within the protection scope of the claims.
Claims
1. A debugging method for an image processing program, characterized in that It includes: Running a C language algorithm prototype with test coverage code added to obtain test image attribute information that meets the coverage rate; Processing the test image according to the test image attribute information to extract a refined test image; Using the refined test image as the input of the C language algorithm prototype and the hardware description language to obtain a first algorithm vector output by the C language algorithm prototype and a second algorithm vector output by the hardware description language; Debugging the hardware description language according to the comparison result of the first algorithm vector and the second algorithm vector.
2. The debugging method of the image processing program according to claim 1, characterized in that, The method of running a C language algorithm prototype with test coverage code added to obtain test image attribute information that meets the coverage rate includes: Writing test coverage code; Adding the test coverage code into the C language algorithm prototype; Configuring algorithm parameters and test images; Using the test image as the input and running the C language algorithm prototype with test coverage code added according to the configured algorithm parameters to obtain test image attribute information that meets the coverage rate.
3. The debugging method of the image processing program according to claim 2, characterized in that, The test image attribute information includes the coordinates of image pixels, the size of the test image, the format of the test image, and the frame index of the test image.
4. The debugging method of the image processing program according to claim 2, wherein The method of processing the test image according to the test image attribute information to extract a refined test image includes: Writing a refined image generation tool; According to the test image attribute information, making the refined image generation tool perform matte extraction processing on the test image, and using the image block obtained by matte extraction as the refined test image.
5. The debugging method of the image processing program according to claim 4, wherein The method of processing the test image according to the test image attribute information to extract a refined test image further includes: If multiple image blocks are obtained by matte extraction, splicing the multiple image blocks to obtain a refined test image; wherein, if there are vacant pixel positions, the vacant pixel positions are filled with random values.
6. The debugging method of the image processing program according to claim 5, characterized in that, The method of processing the test image according to the test image attribute information to extract a refined test image further includes: Judging whether the obtained refined test image meets the coverage rate requirement. If it does not meet the coverage rate requirement, increasing the test image to generate new image blocks, splicing all the image blocks to obtain a new refined test image, and / or changing the algorithm parameters, running the C language algorithm prototype with test coverage code added using the new algorithm parameters to obtain new test image attribute information, and processing the test image according to the new test image attribute information to extract a new refined test image.
7. The debugging method of the image processing program according to claim 1, wherein The method of using the refined test image as the input of the C language algorithm prototype and the hardware description language to obtain a first algorithm vector output by the C language algorithm prototype and a second algorithm vector output by the hardware description language includes: Writing a hardware description language according to the C language algorithm prototype; Configuring the same algorithm parameters for the C language algorithm prototype and the hardware description language; Using the refined test image as the input of the C language algorithm prototype configured with algorithm parameters to obtain a first algorithm vector output by the C language algorithm prototype; Using the same refined test image as the input of the hardware description language configured with algorithm parameters to obtain a second algorithm vector output by the hardware description language.
8. The debugging method of the image processing program according to claim 1, characterized in that, The method of debugging the hardware description language according to the comparison result of the first algorithm vector and the second algorithm vector includes: Perform a binary comparison on the first algorithm vector and the second algorithm vector; If the first algorithm vector and the second algorithm vector are identical, the debugging is completed; If the first algorithm vector and the second algorithm vector are not identical, debug the hardware description language until the second algorithm vector output by the debugged hardware description language is identical to the first algorithm vector.
9. A debugging system for an image processing program, which is used to implement the debugging method of the image processing program according to any one of claims 1 to 8, characterized in that, The debugging system of the image processing program includes: A program writing module, configured to obtain a C language algorithm prototype, add test coverage code to the C language algorithm prototype, and write a hardware description language according to the C language algorithm prototype; An image extraction module, configured to run the C language algorithm prototype added with the test coverage code to obtain test image attribute information meeting the coverage rate, and process the test image according to the test image attribute information to extract a refined test image; A program debugging module, configured to use the refined test image as the input of the C language algorithm prototype and the hardware description language to obtain a first algorithm vector output by the C language algorithm prototype and a second algorithm vector output by the hardware description language, and debug the hardware description language according to the comparison result between the first algorithm vector and the second algorithm vector.
10. An electronic device, characterized in that, It includes a memory, a processor, and an executable program stored on the memory and capable of being run by the processor; when the processor runs the executable program, it executes the debugging method of the image processing program according to any one of claims 1 to 8.
11. A computer storage medium, characterized in that, The computer storage medium stores an executable program; when the executable program is executed, it implements the debugging method of the image processing program according to any one of claims 1 to 8.
12. A chip module, characterized in that, The chip module is coupled to the memory and is configured to execute the computer program stored in the memory to execute the debugging method of the image processing program according to any one of claims 1 to 8.