Automatic testing device for GPU rendering output
By designing an automated test device for GPU rendering output, the video stream information of the GPU rendering output is transmitted to the springboard machine using the video acquisition card and open source video recording components, and image feature information is compared and analyzed, which solves the problem of automatic testing of GPU rendering output in the existing technology, and realizes efficient and accurate rendering image detection.
Patent Information
- Application Number
- CN202411982549.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-12-31
AI Technical Summary
The prior art is difficult to realize automated testing of GPU rendering output, resulting in difficult time discovery and positioning of rendering errors and image distortion.
An automated testing device for GPU rendering output is designed, including a host computer, product library platform and test environment platform. The video stream information of the GPU rendering output is transmitted to the springboard machine through a video acquisition card. The image feature information is extracted using open source video recording components and image processing technology, and compared with the standard sample information in the database to obtain the test results of the rendered image.
Automatic testing of GPU rendering output is realized, which can efficiently and accurately detect the color, texture and distortion of the rendered image, reduce the testing cost and improve the testing efficiency.
Smart Images

Figure CN119865640A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of GPU testing, and more specifically, to an automatic testing device for GPU rendering output. Background Art
[0002] As GPU rendering functions become increasingly complex and diverse, GPU rendering outputs may experience rendering errors, image distortion and other problems. In the process of GPU chip research and development and production, how to ensure the accuracy and stability of rendering output result judgment has become an extremely challenging task.
[0003] Traditional testing methods rely on manual visual inspection, which is not only time-consuming and labor-intensive, but also easily affected by subjective factors, resulting in poor consistency in test results and difficulty in reproducing problems. Therefore, implementing automated testing of GPU rendering output has become a key means to improve testing efficiency and ensure product quality. Automated testing of GPU rendering scenes can automatically execute the test process, collect GPU rendered image output, analyze and judge rendering results, and promptly discover and locate potential problems by writing test scripts and using test tools.
[0004] In modern software development, image recognition technology has become an indispensable part of automated testing. It can help developers test image processing and display functions in software and hardware more effectively. However, with the increase in the demand for image detection accuracy, higher requirements are placed on the collected image information. Efficient image acquisition methods are usually used, such as selecting appropriate acquisition equipment and optimizing acquisition equipment parameters to improve the quality of image information. Summary of the invention
[0005] Different test cases may have different expected display effects when rendered by GPU. To solve this problem, the present invention provides an automatic test device for GPU rendering output, including a host computer, a product library platform and a test environment platform, wherein the test environment platform includes a test machine and a springboard machine;
[0006] The host computer is used to send a test trigger signal to the test machine;
[0007] The test machine is used to pull the GPU driver and the test case program from the product library platform, insert the GPU driver and run the test case program, and transmit the video stream information rendered by the GPU graphics card to the jump board machine through the video capture card when receiving the test trigger signal;
[0008] An open source video recording component is deployed on the jump server. After real-time video stream information is acquired through the open source video recording component, image feature information of each image frame in the video stream information is extracted through image processing. The image feature information of each extracted image frame is analyzed and compared with the image feature information of the standard sample image frame in the database of the host computer to obtain the test result of the GPU graphics card rendering image.
[0009] Based on the above technical solution, the present invention can also make the following improvements.
[0010] Optionally, the host computer sends a test trigger signal to the test machine via a serial port, and the test machine pulls the GPU driver and test case program from the product library platform via an SSH network.
[0011] Optionally, the database of the host computer stores standard sample information for each test case to be tested, the standard sample information for each test case includes a standard video stream output by running the test case, and image feature information of each standard sample image frame in the standard video stream, the image feature information includes a hash value and SIFI feature points of the image frame, and a comparison threshold of the image feature information corresponding to each test case, the comparison threshold including a hash value similarity comparison threshold, a structural similarity index threshold, and a matching feature point average displacement threshold.
[0012] Optionally, extracting the image feature information of each image frame in the video stream information by image processing includes:
[0013] Preprocessing each image frame in the video stream information, wherein the preprocessing includes resizing, grayscale conversion, and contrast enhancement;
[0014] Extract the hash value and SIFI feature points in each image frame after preprocessing.
[0015] Optionally, analyzing and comparing the extracted image feature information of each image frame with the image feature information of a standard sample image frame in the database of the host computer to obtain a test result of the GPU graphics card rendering image includes:
[0016] Calculate the hash value similarity between each image frame and the corresponding standard sample image frame according to the hash value of each image frame and the hash value of the corresponding standard sample image frame;
[0017] Calculate the structural similarity index SSIM between each image frame and the corresponding standard sample image frame according to the pixel value of each image frame and the pixel value of the corresponding standard sample image frame;
[0018] According to the hash value similarity and the structural similarity index SSIM between each image frame and the corresponding standard sample image frame, it is determined whether there is a texture difference and a color difference between each image frame and the corresponding standard sample image frame.
[0019] Optionally, judging whether there is a texture difference and a color difference between each image frame and the corresponding standard sample image frame according to the hash value similarity and the structural similarity index SSIM between each image frame and the corresponding standard sample image frame includes:
[0020] Compare the hash value similarity between each image frame and the corresponding standard sample image frame with the hash value similarity comparison threshold stored in the database; if the hash value similarity is greater than the hash value similarity comparison threshold, the texture of each image frame and the corresponding standard sample image frame are highly similar and there is no texture difference; otherwise, there is a texture difference between each image frame and the corresponding standard sample image frame;
[0021] The structural similarity index SSIM of each image frame and the corresponding standard sample image frame is compared with the structural similarity index threshold stored in the database. If the structural similarity index SSIM is greater than the structural similarity index threshold, there is no color difference between each image frame and the corresponding standard sample image frame; otherwise, there is a color difference.
[0022] Optionally, analyzing and comparing the extracted image feature information of each image frame with the image feature information of a standard sample image frame in the database of the host computer to obtain a test result of the GPU graphics card rendering image includes:
[0023] Obtain SIFI feature points of two adjacent image frames in the video stream information, perform image matching on the SIFI feature points of the two adjacent image frames, and calculate the average displacement distance pix corresponding to the matching feature points;
[0024] The displacement average distance pix is compared with the matching feature point average displacement threshold stored in the database of the host computer. If the displacement average distance pix is greater than the matching feature point average displacement threshold, there is a dynamic change between the two adjacent image frames, otherwise, the two adjacent image frames are in a static state.
[0025] Optionally, the step of obtaining the test result of the GPU graphics card rendering image further includes:
[0026] The test result of the GPU graphics card rendering image is transmitted back to the host computer through the SSH network and stored in the database.
[0027] The present invention provides an automated test device for GPU rendering output, which outputs the video information of the GPU rendering output on the test machine to another jump board machine responsible for streaming through a video capture card, and deploys an open source video recording component on the jump board machine to obtain video stream information, thereby avoiding the problem of low image frame quality caused by obtaining the video stream through a camera, and reducing the operating overhead of the test machine platform in video streaming. The video stream information obtained on the jump board machine is subjected to image feature extraction through image processing, and then compared and analyzed with the standard sample image feature information in the database of the host computer, so as to obtain the test results efficiently and accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A schematic diagram of a framework of an automated testing device for GPU rendering output provided by the present invention;
[0029] Figure 2 A schematic diagram of the detection architecture for the jump board machine to render the output image to the GPU graphics card;
[0030] Figure 3 Flowchart of the automated testing process for GPU rendering output. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In addition, the technical features in the various embodiments or single embodiments provided by the present invention can be arbitrarily combined with each other to form a feasible technical solution. This combination is not subject to the constraints of the sequence of steps and / or the structural composition mode, but must be based on the ability of ordinary technicians in this field to achieve. When the combination of technical solutions is contradictory or cannot be achieved, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0032] Different test cases may show differences in color, texture and image distortion from the expected display effects when rendered by GPU. In addition, the image may not be able to be displayed continuously and dynamically due to GPU performance issues during continuous image rendering. To address the above problems, the present invention provides an automated testing method for GPU rendering, which uses automated testing to determine whether the display effect of the output rendering meets expectations.
[0033] Figure 1A schematic diagram of the framework of an automated testing device for GPU rendering output provided by the present invention. The automated testing device mainly includes a host computer, a product library platform and a test environment platform. The test environment platform includes a test machine and a springboard machine.
[0034] Among them, the testing principle of the automated testing device is:
[0035] The host computer is used to send a test trigger signal to the test machine;
[0036] The test machine is used to pull the GPU driver and test case program from the product library platform when receiving the test trigger signal, insert the GPU driver and run the test case program, and transmit the video stream information rendered by the GPU graphics card to the jump board machine through the video capture card;
[0037] An open source video recording component is deployed on the jump server. After obtaining real-time video stream information through the open source video recording component, the image feature information of each image frame in the video stream information is extracted through image processing. The image feature information of each extracted image frame is analyzed and compared with the image feature information of the standard sample image frame in the database of the host computer to obtain the test results of the GPU graphics card rendering image.
[0038] The present invention mainly outputs the video information rendered and output by the GPU on the test machine to another jump board machine responsible for pushing the stream through an HDMI to USB3.0 video capture card, and deploys an open source video recording component on the jump board machine to obtain video stream information, thereby avoiding the problem of low image frame quality caused by obtaining the video stream through a camera, and reducing the operating overhead of the test machine platform in video pushing the stream. The video stream information obtained on the jump board machine is subjected to image feature extraction through image processing, and then compared and analyzed with the standard sample image feature information in the database of the host computer, so as to obtain the test results efficiently and accurately.
[0039] The host computer, product library and test environment platform on the automated testing device are described below respectively.
[0040] (1) Host computer environment: responsible for user interaction triggering test, and storing the standard sample information of the test case to be tested (the standard video stream output by running each test case, and the feature information of each image frame: hash value, SIFT feature point) and the feature information comparison threshold in the database. The image frame information and image feature information of the database on the host computer can be seen in Table 1. As can be seen from Table 1, the database of the host computer stores the standard sample information of each test case to be tested. The standard sample information of each test case includes the standard video stream output by running the test case, and the image feature information of each standard sample image frame in the standard video stream. The image feature information includes the hash value and SIFI feature point of the image frame, as well as the comparison threshold of the image feature information corresponding to each test case. The comparison threshold includes the hash value similarity comparison threshold, the structural similarity index threshold and the matching feature point average displacement threshold. The comparison threshold is used for comparing the feature information of the image frame to be tested with the feature information of the standard sample image frame.
[0041] Table 1 Image frame information and feature information database
[0042]
[0043]
[0044] The image feature comparison thresholds in the database can be found in Table 2.
[0045] Table 2 Image feature information comparison threshold database
[0046]
[0047] (2) Product library platform: stores test case programs and GPU drivers.
[0048] (3) Test environment platform: The test machine is connected to the GPU under test and is responsible for image rendering output, while the jump board is responsible for image processing and detection of the acquired video stream information.
[0049] use Figure 1 The working process of the automated test device for GPU rendering output mainly includes the following steps:
[0050] Step 1:
[0051] The test is triggered through the user interaction interface in the host computer environment, and the test signal is automatically transmitted to the test machine through the serial port.
[0052] Step 2:
[0053] The test machine pulls the GPU driver and test case program from the product library platform through the SSH network, inserts the driver, and runs the test case program. The image information rendered by the GPU graphics card on the test machine is transmitted to the jump board machine through the HDMI to USB video capture card.
[0054] Step 3:
[0055] After the jump server obtains real-time image information through the open source video recording component, it calls the image analysis tool to perform image processing and analysis, and detects and analyzes the color, texture, distortion, and movement of the dynamic image rendered by the GPU.
[0056] Among them, the detection architecture design of the jump board machine for the GPU graphics card rendering output image is as follows Figure 2 As shown, it mainly includes the following steps:
[0057] (1) Image information acquisition:
[0058] After the test case is triggered, the video stream information of the GPU graphics card rendering screen is obtained based on the open source video recording component on the jump board.
[0059] (2) Image preprocessing module:
[0060] Perform necessary preprocessing on the input image, including size adjustment, grayscale conversion and contrast enhancement.
[0061] (3) Feature extraction module:
[0062] Extract key features of image frames, such as SIFT feature points, hash values, etc.
[0063] (4) Image comparison module:
[0064] The feature information of the image frame to be tested is compared with the feature information of the standard sample image frame. The comparison methods include pixel-based (such as hash value similarity comparison), structure-based (such as structural similarity index SSIM), and SIFT feature point-based (such as feature point matching).
[0065] (5) Result analysis module:
[0066] Based on the image comparison results analysis, the differences between images are determined.
[0067] The feature information of the image frame to be tested is compared with the feature information of the standard sample image frame. The flowchart can be found in Figure 3 , specifically including the following steps:
[0068] (1) Obtain the video stream during the test case execution through the open source video recording component.
[0069] (2) Randomly obtain two adjacent frames of images in the video stream to be tested, and perform image comparison detection on the first frame of the two adjacent frames of images and the corresponding sequence of image frames of the video stream in the local standard sample set:
[0070] a. After preprocessing the image to be tested, the hash value (hash_similarity) in the image frame to be tested is calculated, and the hash value similarity is calculated by obtaining the hash value of the corresponding frame number image in the corresponding use case in the database, and further obtaining the judgment threshold of the hash value similarity in the corresponding use case in the database, and judging whether the hash value similarity is greater than the set threshold. If the value is greater than the set threshold, it can be judged that the color and texture similarity of the rendered image is high; if it is less than the set threshold, it can be judged that there are large differences in color and texture of the rendered image.
[0071] b. Calculate the structural similarity index (SSIM) between the image frame to be tested and the standard sample image frame based on the pixel values of the image frame to be tested and the corresponding standard sample image frame, obtain the judgment threshold of the SSIM value in the corresponding use case in the database, and judge whether the SSIM value is greater than the set threshold. If the value is greater than the set threshold, it can be judged that the rendered image has no distortion; if it is less than the set threshold, it can be judged that the rendered image has distortion.
[0072] (3) Further motion detection is performed on the rendered display screen, and SIFT feature point image matching is performed on two adjacent frames of the acquired video stream to be detected:
[0073] a. Based on the coordinates of the matched feature points, calculate the average displacement distance pix corresponding to the matched feature points.
[0074] B. Obtain the average displacement threshold of the matching feature points in the corresponding use case in the database, and determine whether pix is greater than the threshold. If the value is greater than the set threshold, it can be determined that there is a dynamic change between the two adjacent frames; if the value is less than the set threshold, it can be determined that the rendered images of the two adjacent frames are in a static state.
[0075] (4) The detection results are transmitted back to the host computer environment through the SSH network and saved in the database.
[0076] An automatic testing device for GPU rendering output provided by an embodiment of the present invention has the following effects:
[0077] (1) The present invention proposes an automated image testing method for the rendering output of a dynamic test case running on a GPU. The rendering output is streamed to a jump board through a video capture card, and the rendering information screen on the jump board is obtained based on a video recording component. Compared with the traditional method of obtaining image information through a camera, the quality of the rendering output video information of the graphics card to be tested can be greatly improved, and the testing cost can be reduced.
[0078] (2) The present invention proposes a test method for GPU rendered images. For a dynamic test case, the color, texture, and distortion of the image output by GPU rendering can be judged, and the dynamic and static detection of the continuously output image can be performed.
[0079] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0080] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0081] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0082] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0083] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0084] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0085] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. An automated testing device for GPU rendering output, characterized in that: It includes a host computer, a product library platform and a test environment platform, wherein the test environment platform includes a test machine and a springboard machine; The host computer is used to send a test trigger signal to the test machine; The test machine is used to pull the GPU driver and the test case program from the product library platform, insert the GPU driver and run the test case program, and transmit the video stream information rendered by the GPU graphics card to the jump board machine through the video capture card when receiving the test trigger signal; An open source video recording component is deployed on the jump server. After real-time video stream information is acquired through the open source video recording component, image feature information of each image frame in the video stream information is extracted through image processing. The image feature information of each extracted image frame is analyzed and compared with the image feature information of the standard sample image frame in the database of the host computer to obtain the test result of the GPU graphics card rendering image.
2. The automated testing device for GPU rendering output according to claim 1, characterized in that: The host computer sends a test trigger signal to the test machine via a serial port, and the test machine pulls the GPU driver and test case program from the product library platform via an SSH network.
3. The automated testing device for GPU rendering output according to claim 1, characterized in that: The database of the host computer stores standard sample information of each test case to be tested, and the standard sample information of each test case includes a standard video stream output by running the test case, and image feature information of each standard sample image frame in the standard video stream, the image feature information includes a hash value and SIFI feature points of the image frame, and a comparison threshold of the image feature information corresponding to each test case, the comparison threshold includes a hash value similarity comparison threshold, a structural similarity index threshold and a matching feature point average displacement threshold.
4. The automated testing device for GPU rendering output according to claim 1, characterized in that: The extracting the image feature information of each image frame in the video stream information by image processing includes: Preprocessing each image frame in the video stream information, wherein the preprocessing includes resizing, grayscale conversion, and contrast enhancement; Extract the hash value and SIFI feature points in each image frame after preprocessing.
5. The automated testing device for GPU rendering output according to claim 4, characterized in that: The extracted image feature information of each image frame is analyzed and compared with the image feature information of the standard sample image frame in the database of the host computer to obtain the test result of the GPU graphics card rendering image, including: Calculate the hash value similarity between each image frame and the corresponding standard sample image frame according to the hash value of each image frame and the hash value of the corresponding standard sample image frame; Calculate the structural similarity index SSIM between each image frame and the corresponding standard sample image frame according to the pixel value of each image frame and the pixel value of the corresponding standard sample image frame; According to the hash value similarity and the structural similarity index SSIM between each image frame and the corresponding standard sample image frame, it is determined whether there is a texture difference and a color difference between each image frame and the corresponding standard sample image frame.
6. The automated testing device for GPU rendering output according to claim 5, characterized in that: The determining whether there is a texture difference and a color difference between each image frame and the corresponding standard sample image frame according to the hash value similarity and the structural similarity index SSIM between each image frame and the corresponding standard sample image frame includes: Compare the hash value similarity between each image frame and the corresponding standard sample image frame with the hash value similarity comparison threshold stored in the database; if the hash value similarity is greater than the hash value similarity comparison threshold, the texture of each image frame and the corresponding standard sample image frame are highly similar and there is no texture difference; otherwise, there is a texture difference between each image frame and the corresponding standard sample image frame; The structural similarity index SSIM of each image frame and the corresponding standard sample image frame is compared with the structural similarity index threshold stored in the database. If the structural similarity index SSIM is greater than the structural similarity index threshold, there is no color difference between each image frame and the corresponding standard sample image frame; otherwise, there is a color difference.
7. The automated testing device for GPU rendering output according to claim 4, characterized in that: The extracted image feature information of each image frame is analyzed and compared with the image feature information of the standard sample image frame in the database of the host computer to obtain the test result of the GPU graphics card rendering image, including: Obtain SIFI feature points of two adjacent image frames in the video stream information, perform image matching on the SIFI feature points of the two adjacent image frames, and calculate the average displacement distance pix corresponding to the matching feature points; The displacement average distance pix is compared with the matching feature point average displacement threshold stored in the database of the host computer. If the displacement average distance pix is greater than the matching feature point average displacement threshold, there is a dynamic change between the two adjacent image frames, otherwise, the two adjacent image frames are in a static state.
8. The automated testing device for GPU rendering output according to claim 1, characterized in that: The test result of obtaining the GPU graphics card rendering image also includes: The test result of the GPU graphics card rendering image is transmitted back to the host computer through the SSH network and stored in the database.
Citation Information
Patent Citations
Method for describing movement behavior of luggage image based on constant dimension and variable characteristics
CN104616321A
Screen dynamic picture test method and system, electronic equipment and storage medium
CN112837640A
Method and device for controlling terminal to execute test operation, storage medium and electronic device
CN114880214A
Video GPU (Graphic Processing Unit) decoding image anomaly detection method and system based on shader
CN116647672A
Video rendering fluency testing method, device and system
CN116939190A