An automated testing apparatus for GPU rendering output
The automated testing device for GPU rendering output, utilizing video capture cards and open-source video recording components, combined with database analysis, solves the problems of time-consuming, labor-intensive, and subjectively influenced manual inspection in traditional testing methods, achieving efficient and accurate GPU rendering output testing.
Patent Information
- Application Number
- CN202411982549.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Traditional GPU rendering output testing methods rely on manual visual inspection, which is time-consuming, labor-intensive, and easily affected by subjective factors, resulting in poor consistency of test results and difficulty in achieving accuracy and stability.
An automated testing device using GPU rendering output combines a host computer, a testing machine, and a jump server. It utilizes a video capture card and open-source video recording components to automatically process image feature information and perform comparative analysis with a database, achieving efficient and accurate test results.
It improves the efficiency and accuracy of GPU rendering output testing, reduces manual intervention, lowers testing costs, and enables timely detection and location of potential problems.
Smart Images

Figure CN119865640B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of GPU testing, more particularly, to an automatic testing device for GPU rendering output. BACKGROUND
[0002] With the increasing complexity and diversification of GPU rendering functions, GPU rendering output may have rendering errors, image distortion and other problems. In the process of GPU chip research and production, how to ensure the accuracy and stability of the rendering output result determination has become a challenging task.
[0003] The traditional testing method relies on manual visual inspection, which is not only time-consuming and laborious, but also susceptible to subjective factors, resulting in poor consistency of test results and difficulty in problem reproduction. Therefore, the automatic testing of GPU rendering output has become a key means to improve testing efficiency and ensure product quality. The automatic testing of GPU rendering scene can automatically execute the testing process, collect GPU rendering image output and analyze and judge the rendering result through the use of testing tools and the writing of testing scripts, so as to timely discover and locate potential problems.
[0004] In modern software development, image recognition technology has become an indispensable part of automated testing, which can help developers more effectively test image processing and display functions in software and hardware. However, as the demand for image detection accuracy increases, higher requirements are placed on the collected image information, and efficient image acquisition methods are usually used, such as selecting appropriate acquisition equipment and optimizing acquisition equipment parameters to improve image information quality. SUMMARY
[0005] Different test cases may have differences with the expected display effect through GPU rendering output. To solve this problem, the present application provides an automatic testing device for GPU rendering output, which includes a host computer, a product library platform and a test environment platform. The test environment platform includes a test machine and a jump 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 GPU drivers and test case programs from the product library platform when receiving the test trigger signal, insert the GPU drivers and run the test case programs, and transmit GPU card rendering video stream information to the jump machine through a video capture card.
[0008] The gangplank machine is provided with an open source video recording component, 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 image frame extracted is compared with image feature information of standard sample image frames in a database of the host computer, and a test result of a GPU rendering image is obtained.
[0009] Based on the above technical solutions, the application can also be improved as follows.
[0010] Optionally, the host computer sends a test trigger signal to the test machine in a serial port form, and the test machine pulls a GPU driver and a test case program from the product library platform through an SSH network.
[0011] Optionally, standard sample information of each test case to be tested is stored in the database of the host computer, the standard sample information of each test case includes a standard video stream output by a running 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 a SIFI feature point of an image frame, and a comparison threshold of 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.
[0012] Optionally, the image feature information of each image frame in the video stream information is extracted through image processing, including:
[0013] Each image frame in the video stream information is preprocessed, and the preprocessing includes size adjustment, gray scale conversion and contrast enhancement;
[0014] The hash value and the SIFI feature point in each preprocessed image frame are extracted.
[0015] Optionally, the image feature information of each image frame extracted is compared with the image feature information of the standard sample image frames in the database of the host computer, and a test result of a GPU rendering image is obtained, including:
[0016] According to the hash value of each image frame and the hash value of the corresponding standard sample image frame, the hash value similarity of each image frame and the corresponding standard sample image frame is calculated;
[0017] According to the pixel value of each image frame and the pixel value of the corresponding standard sample image frame, the structural similarity index SSIM of each image frame and the corresponding standard sample image frame is calculated;
[0018] According to the hash value similarity and the structural similarity index SSIM of each image frame and the corresponding standard sample image frame, it is judged whether there is a texture difference and a color difference between each image frame and the corresponding standard sample image frame.
[0019] Optionally, the 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 of each image frame and the corresponding standard sample image frame comprises:
[0020] The hash value similarity of each image frame and the corresponding standard sample image frame is compared with a hash value similarity comparison threshold value stored in the database, if the hash value similarity is greater than the hash value similarity comparison threshold value, the texture of each image frame and the corresponding standard sample image frame is 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 a structural similarity index threshold value stored in the database, if the structural similarity index SSIM is greater than the structural similarity index threshold value, there is no color difference between each image frame and the corresponding standard sample image frame; otherwise, there is a color difference.
[0022] Optionally, the analyzing and comparing the extracted image feature information of each image frame 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 comprises:
[0023] The SIFI feature points of two adjacent image frames in the video stream information are acquired, and the SIFI feature points of the two adjacent image frames are image matched to calculate the average displacement distance pix of the matched feature points.
[0024] The average displacement distance pix is compared with a matched feature point average displacement threshold value stored in the database of the host computer, if the average displacement distance pix is greater than the matched feature point average displacement threshold value, 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 obtaining the test result of the GPU graphics card rendering image further comprises:
[0026] The test result of the GPU graphics card rendering image is transmitted back to the host computer through an SSH network and stored in the database.
[0027] The application provides a GPU rendering output automatic testing device, video information of GPU rendering output on a testing machine is output to another jump machine responsible for stream pushing through a video capture card, and an open source video recording component is deployed on the jump machine to obtain video stream information, so that the problem of low image frame quality caused by the way of obtaining video stream through a camera is avoided, and the running overhead of the testing machine platform in video stream pushing is reduced. BRIEF DESCRIPTION OF DRAWINGS
[0028] Figure 1 A framework schematic diagram of the GPU rendering output automatic testing device provided by the application is shown in the figure.
[0029] Figure 2 A detection architecture schematic diagram of the GPU card rendering output image by the jump machine is shown in the figure.
[0030] Figure 3 A flowchart of the GPU rendering output automatic testing process is shown in the figure. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical scheme and advantages of the embodiments of the application clearer, the technical scheme in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the application. In addition, the technical features in each embodiment or single embodiment provided by the application can be combined with each other at will to form a feasible technical scheme, and this combination is not restricted by the order of steps and / or structure composition mode, but must be based on the implementation by those skilled in the art, when the combination of technical schemes appears contradictory or unfeasible, it should be considered that the combination of technical schemes does not exist, and is not within the protection scope of the application.
[0032] Different test cases may appear differences in color, texture and image distortion from the expected display effect through GPU rendering output, and the image may not be continuously dynamically displayed due to GPU performance problems in the continuous rendering image process. In view of the above problems, the application provides a GPU rendering automatic testing method, which determines whether the output rendering display effect meets the expectation through automatic testing.
[0033] Figure 1A framework schematic diagram of an automatic testing device for GPU rendering output provided by the application, the automatic testing device mainly comprises a host computer, a product library platform and a test environment platform, the test environment platform comprises a test machine and a jump machine.
[0034] The test principle of the automatic testing device is as follows:
[0035] The host computer is used for sending a test trigger signal to the test machine.
[0036] The test machine is used for pulling a GPU driver and a test case program from the product library platform when receiving the test trigger signal, inserting the GPU driver and running the test case program, and transmitting video stream information rendered by a GPU graphics card to the jump machine through a video capture card.
[0037] An open source video recording component is deployed on the jump machine, and after real-time video stream information is obtained 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 extracted image feature information of each image frame is compared with image feature information of standard sample image frames in a database of the host computer, and a test result of GPU graphics card rendering images is obtained.
[0038] The application mainly outputs video information rendered and output by a GPU on the test machine to another jump machine responsible for streaming through an HDMI to USB3.0 video capture card, and an open source video recording component is deployed on the jump machine to obtain video stream information, so that the problem of low image frame quality caused by obtaining video stream through a camera is avoided, and the running overhead of the test machine platform in video streaming is reduced. The video stream information obtained on the jump machine is extracted through image processing, and then compared and analyzed with standard sample image feature information in a database of the host computer, so that the test result is efficiently and accurately obtained.
[0039] The host computer, the product library platform and the test environment platform of the automatic testing device are described below.
[0040] (1) Host computer environment: responsible for user interaction triggering test, and storing test case standard sample information (standard video stream output by running each test case, and feature information of each image frame: hash value, SIFT feature point) and 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 from Table 1. As can be seen from Table 1, the standard sample information of each test case to be tested is stored in the database of the host computer, 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 the hash value and SIFT feature point of the image frame, and 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 average displacement threshold of the matching feature points, and the comparison threshold is used for comparing the feature information of the subsequent to-be-tested image frame 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 threshold in the database can be seen from Table 2.
[0045] Table 2 Image feature information comparison threshold database
[0046]
[0047] (2) Product library platform: stores test case programs and GPU driver programs.
[0048] (3) Test environment platform: test machine connected with the GPU to be tested is responsible for image rendering output, and the jump machine is responsible for image processing detection on the obtained video stream information.
[0049] The working process of the automatic test device using the GPU rendering output mainly includes the following steps: Figure 1
[0050] Step one:
[0051] In the host computer environment, the test is triggered through the user interaction interface, and the test signal is automatically transmitted to the test machine in the form of a serial port.
[0052] Step two:
[0053] The test machine pulls the GPU driver and test case program in the product library platform through the SSH network mode, inserts the driver, and runs the test case program. The image information rendered by the GPU card on the test machine is transmitted to the jump machine through the HDMI to USB video capture card.
[0054] Step three:
[0055] After the jump machine obtains the real-time image information through the open-source video recording component, it calls the image analysis tool for image processing and analysis, and detects and analyzes the color, texture, distortion, and dynamic and static of the GPU rendered dynamic image.
[0056] The detection architecture of the jump machine for the GPU card rendering output image is shown in Figure 2 , which mainly includes the following steps:
[0057] (1) Image information acquisition:
[0058] After triggering the test case, the GPU card rendering picture video stream information is obtained based on the open-source video recording component on the jump machine.
[0059] (2) Image preprocessing module:
[0060] The input image is preprocessed as necessary, including size adjustment, grayscale conversion, and contrast enhancement.
[0061] (3) Feature extraction module:
[0062] The key features of the image frame are extracted, including SIFT feature points and hash values.
[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 method includes 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 result analysis, the difference between the images is 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 referred to Figure 3 , which includes the following steps:
[0068] (1) Obtain the video stream during the test case running process 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 image frame of the video stream in the local standard sample set:
[0070] a. Calculate the hash value (hash_similarity) in the test image frame after pre-processing the test image, and calculate the hash value similarity by obtaining the hash value of the corresponding frame number image in the database application example, further obtain the judgment threshold of the hash value similarity in the database application example, judge whether the hash value similarity is greater than the set threshold, if the value is greater than the set threshold, it can be determined that the rendering image color and texture similarity is high, if it is less than the set threshold, it can be determined that the rendering image has great difference in color and texture.
[0071] b. According to the pixel value of the test image frame and the pixel value of the corresponding standard sample image frame, the structural similarity index (SSIM) in the test image frame and the standard sample image frame is calculated, the judgment threshold of the SSIM value in the database application example is obtained, and it is judged whether the SSIM value is greater than the set threshold, if the value is greater than the set threshold, it can be determined that the rendering image has no distortion phenomenon, if it is less than the set threshold, it can be determined that the rendering image has distortion phenomenon.
[0072] (3) Further detect the dynamic and static of the rendering display picture, and perform SIFT feature point image matching on the two adjacent frames of images obtained from the video stream to be tested:
[0073] a. Based on the matched feature point coordinates, the average displacement distance pix of the matched feature points is calculated.
[0074] B. Obtain the average displacement threshold of the matched feature points in the database application example, judge whether pix is greater than the threshold, if the value is greater than the set threshold, it can be determined that the adjacent two frames have dynamic change, if the value is less than the set threshold, it can be determined that the adjacent two frames of rendering image are in static state.
[0075] (4) The detection result is transmitted back to the host computer environment through SSH network, and is saved in the database.
[0076] The GPU rendering output automatic testing device provided by the embodiment of the application has the following effects:
[0077] (1) The application proposes an automatic image testing method for rendering output of dynamic test case running on GPU, and pushes the rendering output to the jump machine through the video capture card, and obtains the rendering information picture on the jump machine based on the video recording component, compared with the traditional method of obtaining image information through camera, the quality of the video information of the graphics card rendering output to be tested can be greatly improved, and the test cost is reduced.
[0078] (2) The application provides a GPU rendering image test method, which can determine the image color, texture and distortion of GPU rendering output for a dynamic test case, and can perform dynamic and static detection on the continuously output images.
[0079] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0080] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can 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 application is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams 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 produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 means for performing the functions specified in the flowchart
[0082] These computer program instructions can also be stored in a computer-readable memory capable of guiding a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including instruction means, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 means for performing the functions specified in the flowchart
[0083] These computer program instructions can also be loaded into a computer or other programmable data processing device, so that a series of operation steps are performed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide a process for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 means for performing the functions specified in the flowchart
[0084] While the preferred embodiments of the application have been described, additional variations and modifications can be made to these embodiments by those skilled in the art once they have the benefit of the present disclosure without departing from the spirit and scope of the application. Accordingly, it is intended that the appended claims include all such modifications and variations as fall within the scope of the present application.
[0085] It is apparent that those skilled in the art can make various changes and modifications to the application without departing from the spirit and scope of the application. It is therefore intended that the present application cover all such changes and modifications that are within its scope.
Claims
1. An automated testing device for GPU rendering output, characterized in that, The system comprises a host computer, a product library platform and a test environment platform, and the test environment platform comprises a test machine and a jump machine; The host computer is configured to send a test trigger signal to the test machine; The test machine is configured to pull a GPU driver and a 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 video stream information rendered by a GPU card to the jump machine through a video capture card. The jump machine is deployed with an open-source video recording component, and after obtaining real-time video stream information through the open-source video recording component, the jump machine extracts image feature information of each image frame in the video stream information through image processing, compares the extracted image feature information of each image frame with image feature information of standard sample image frames in a database of the host computer, and obtains a test result of the GPU card rendered image. 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 comprises a standard video stream output by a running test case and image feature information of each standard sample image frame in the standard video stream, wherein the image feature information comprises a hash value and SIFT feature points of the image frame, and a comparison threshold of image feature information corresponding to each test case, and the comparison threshold comprises a hash value similarity comparison threshold, a structural similarity index threshold and a matching feature point average displacement threshold. The comparison of the extracted image feature information of each image frame with the image feature information of the standard sample image frames in the database of the host computer to obtain the test result of the GPU card rendered image comprises: Obtaining SIFT feature points of adjacent two image frames in the video stream information, performing image matching on the SIFT feature points of the adjacent two image frames, and calculating an average displacement distance pix of the matching feature points. Comparing the average displacement distance pix with the matching feature point average displacement threshold stored in the database of the host computer, if the average displacement distance pix is greater than the matching feature point average displacement threshold, then there is a dynamic change between the adjacent two image frames, otherwise, the adjacent two image frames are in a static state.
2. The apparatus of claim 1, wherein, The host computer sends a test trigger signal to the test machine in a serial port form, and the test machine pulls a GPU driver and a test case program from the product library platform through an SSH network.
3. The apparatus of claim 1, wherein, The extraction of the image feature information of each image frame in the video stream information through image processing comprises: Preprocessing each image frame in the video stream information, and the preprocessing comprises size adjustment, grayscale conversion and contrast enhancement; Extracting a hash value and SIFT feature points in each preprocessed image frame.
4. The apparatus of claim 3, wherein, The image feature information of each extracted image frame is compared with the image feature information of the standard sample image frame in the database of the host computer, and the test result of the GPU card rendering image is obtained, including: According to the hash value of each image frame and the hash value of the corresponding standard sample image frame, the hash value similarity of each image frame and the corresponding standard sample image frame is calculated; According to the pixel value of each image frame and the pixel value of the corresponding standard sample image frame, the structural similarity index SSIM of each image frame and the corresponding standard sample image frame is calculated; According to the hash value similarity and the structural similarity index SSIM of each image frame and the corresponding standard sample image frame, it is judged whether there is texture difference and color difference between each image frame and the corresponding standard sample image frame.
5. The apparatus of claim 4, wherein, According to the hash value similarity and the structural similarity index SSIM of each image frame and the corresponding standard sample image frame, it is judged whether there is texture difference and color difference between each image frame and the corresponding standard sample image frame, including: The hash value similarity of each image frame and the corresponding standard sample image frame is compared 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 is highly similar, and there is no texture difference; otherwise, there is 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 color difference.
6. The apparatus of claim 1, wherein, The test result of the GPU card rendering image is obtained, and then it further includes: The test result of the GPU 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
Display card rendering test method and device, electronic equipment and storage medium
CN117635802A