Movatterモバイル変換


[0]ホーム

URL:


CN114510417A - Image rendering effect testing method and device, electronic equipment and storage medium - Google Patents

Image rendering effect testing method and device, electronic equipment and storage medium
Download PDF

Info

Publication number
CN114510417A
CN114510417ACN202210068320.5ACN202210068320ACN114510417ACN 114510417 ACN114510417 ACN 114510417ACN 202210068320 ACN202210068320 ACN 202210068320ACN 114510417 ACN114510417 ACN 114510417A
Authority
CN
China
Prior art keywords
image
rendering
video
test
rendered
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210068320.5A
Other languages
Chinese (zh)
Inventor
马登富
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhou TCL Mobile Communication Co LtdfiledCriticalHuizhou TCL Mobile Communication Co Ltd
Priority to CN202210068320.5ApriorityCriticalpatent/CN114510417A/en
Publication of CN114510417ApublicationCriticalpatent/CN114510417A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明实施例公开了一种图像渲染效果测试方法、装置、电子设备和存储介质;本发明实施例可以基于需要进行渲染效果测试的渲染代码文件,对待渲染图像进行渲染,得到测试渲染图像,获取参考渲染图像,所述参考渲染图像为所述待渲染图像添加所述渲染代码文件的目标渲染效果后得到的图像,将所述测试渲染图像与所述参考渲染图像进行比对,得到图像对比结果,根据所述图像比对结果,确定所述渲染代码文件的测试结果;由于测试过程中,将需要测试的测试渲染图像与具有目标渲染效果的参考渲染图像进行比对,确定测试结果,因此,可以降低在图像渲染效果测试过程中对人力资源的需求,节约图像渲染效果测试成本,提升图像渲染效果测试速度和准确度。

Figure 202210068320

The embodiment of the present invention discloses an image rendering effect testing method, device, electronic device and storage medium; the embodiment of the present invention can render the to-be-rendered image based on the rendering code file that needs to be tested for the rendering effect, obtain the test rendering image, and obtain the The reference rendered image is an image obtained by adding the target rendering effect of the rendering code file to the to-be-rendered image, and the test rendered image is compared with the reference rendered image to obtain an image comparison result , according to the image comparison result, determine the test result of the rendering code file; because in the test process, the test rendering image that needs to be tested is compared with the reference rendering image with the target rendering effect to determine the test result, therefore, It can reduce the demand for human resources in the image rendering effect test process, save the image rendering effect test cost, and improve the image rendering effect test speed and accuracy.

Figure 202210068320

Description

Translated fromChinese
一种图像渲染效果测试方法、装置、电子设备和存储介质An image rendering effect testing method, device, electronic device and storage medium

技术领域technical field

本发明涉及图像处理领域,具体涉及一种图像渲染效果测试方法、装置、电子设备和存储介质。The invention relates to the field of image processing, in particular to an image rendering effect testing method, device, electronic device and storage medium.

背景技术Background technique

随着科技的快速发展,针对各类图片或视频的处理应用越来越多。而为了保证所有用户在使用图片或视频处理应用的过程中有一致的体验,需要应用程序的开发人员在并行开发和高速的版本迭代的过程中,保持图像或者视频渲染效果的稳定性。With the rapid development of science and technology, there are more and more processing applications for various types of pictures or videos. In order to ensure that all users have a consistent experience when using image or video processing applications, application developers need to maintain the stability of image or video rendering effects during parallel development and high-speed version iteration.

目前,在对渲染效果进行测试时,一般是通过手工测试来确定渲染后图像或者视频的渲染效果以及渲染质量。但是,采用这种测试方式,对人力资源的需求比较大,且手工测试耗时较久,渲染效果测试的准确度也不易保证。At present, when the rendering effect is tested, the rendering effect and rendering quality of the rendered image or video are generally determined by manual testing. However, using this test method requires a lot of human resources, and the manual test takes a long time, and the accuracy of the rendering effect test is not easy to guarantee.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种图像渲染效果测试方法、装置、电子设备和存储介质,可以减少在图像渲染效果测试过程中对人力资源的要求,节约图像渲染效果测试成本,提升图像渲染效果测试速度和准确度。The embodiments of the present invention provide an image rendering effect testing method, device, electronic device and storage medium, which can reduce the requirements for human resources in the image rendering effect testing process, save the image rendering effect testing cost, and improve the image rendering effect testing speed and efficiency. Accuracy.

本发明实施例提供一种图像渲染效果测试方法,包括:An embodiment of the present invention provides an image rendering effect testing method, including:

基于需要进行渲染效果测试的渲染代码文件,对待渲染图像进行渲染,得到测试渲染图像;Render the to-be-rendered image based on the rendering code file that needs to be tested for rendering effect to obtain a test rendering image;

获取参考渲染图像,所述参考渲染图像为所述待渲染图像添加所述渲染代码文件的目标渲染效果后得到的图像;Obtaining a reference rendering image, the reference rendering image is an image obtained after adding the target rendering effect of the rendering code file to the to-be-rendered image;

将所述测试渲染图像与所述参考渲染图像进行比对,得到图像对比结果;Comparing the test rendering image with the reference rendering image to obtain an image comparison result;

根据所述图像比对结果,确定所述渲染代码文件的测试结果。According to the image comparison result, the test result of the rendering code file is determined.

相应的,本发明实施例提供一种图像渲染效果测试装置,包括:Correspondingly, an embodiment of the present invention provides an image rendering effect testing device, including:

第一图像获取单元,用于基于需要进行渲染效果测试的渲染代码文件,对待渲染图像进行渲染,得到测试渲染图像;The first image acquisition unit is used to render the to-be-rendered image based on the rendering code file that needs to be tested for rendering effect, and obtain the test rendering image;

第二图像获取单元,用于获取参考渲染图像,所述参考渲染图像为所述待渲染图像添加所述渲染代码文件的目标渲染效果后得到的图像;a second image acquisition unit, configured to acquire a reference rendered image, where the reference rendered image is an image obtained by adding the target rendering effect of the rendering code file to the to-be-rendered image;

图像对比单元,用于将所述测试渲染图像与所述参考渲染图像进行比对,得到图像对比结果;an image comparison unit, configured to compare the test rendering image with the reference rendering image to obtain an image comparison result;

测试结果确定单元,用于根据所述图像比对结果,确定所述渲染代码文件的测试结果。A test result determination unit, configured to determine the test result of the rendering code file according to the image comparison result.

可选的,所述图像对比单元,用于将所述测试渲染图像中的每个测试像素点分别与所述参考渲染图像中对应的像素点计算差值,得到每个测试像素点对应的像素差值;Optionally, the image comparison unit is used to calculate the difference between each test pixel in the test rendering image and the corresponding pixel in the reference rendering image to obtain the pixel corresponding to each test pixel. difference;

基于各所述像素差值,构建差值图像;constructing a difference image based on each of the pixel differences;

计算所述差值图像的像素均方差,根据所述像素均方差得到图像对比结果。Calculate the pixel mean square error of the difference image, and obtain an image comparison result according to the pixel mean square error.

可选的,所述图像对比单元,用于若所述像素均方差不大于预设对比阈值,得到图像对比通过的图像对比结果;Optionally, the image comparison unit is configured to obtain an image comparison result that passes the image comparison if the pixel mean square error is not greater than a preset comparison threshold;

若所述像素均方差小于所述预设对比阈值,得到图像对比未通过的图像对比结果。If the pixel mean square error is less than the preset comparison threshold, an image comparison result that fails the image comparison is obtained.

可选的,所述待渲染图像为待渲染视频中的视频帧,所述待渲染视频中包含至少两个所述视频帧;Optionally, the to-be-rendered image is a video frame in a to-be-rendered video, and the to-be-rendered video includes at least two of the video frames;

相应的,第一图像获取单元,用于基于需要进行渲染效果测试的渲染代码文件,对待渲染视频的各所述视频帧进行渲染,得到测试渲染视频;Correspondingly, the first image acquisition unit is configured to render each of the video frames of the to-be-rendered video based on a rendering code file that needs to be tested for rendering effects, to obtain a test rendering video;

从所述测试渲染视频的各所述视频帧中,确定一所述视频帧作为测试渲染图像。From each of the video frames of the test rendered video, one of the video frames is determined as a test rendered image.

可选的,所述参考渲染图像为参考渲染视频中的参考视频帧,所述参考渲染视频中包含至少两个所述参考视频帧,所述参考渲染视频为所述待渲染视频添加所述渲染代码文件的目标渲染效果后得到的视频;Optionally, the reference rendered image is a reference video frame in a reference rendered video, the reference rendered video includes at least two of the reference video frames, and the reference rendered video is the video to be rendered adding the rendering The video obtained after the target rendering effect of the code file;

相应的,所述第二图像获取单元,用于获取参考渲染视频;Correspondingly, the second image acquisition unit is used to acquire the reference rendering video;

确定所述测试渲染图像在所述测试渲染视频中的目标帧位置;determining the target frame position of the test rendering image in the test rendering video;

从所述参考渲染视频中,获取所述目标帧位置对应的参考视频帧作为参考渲染图像。From the reference rendered video, a reference video frame corresponding to the target frame position is acquired as a reference rendered image.

可选的,本发明实施例提供的图像渲染效果测试装置还包括循环对比单元,用于若所述图像对比结果为图像对比通过,从所述测试渲染视频中,未进行对比的各所述视频帧中,确定一所述视频帧作为新的测试渲染图像;Optionally, the image rendering effect testing device provided by the embodiment of the present invention further includes a cyclic comparison unit, which is configured to, if the image comparison result is that the image comparison passes, select each of the videos that have not been compared from the test rendering videos. In the frame, a described video frame is determined as a new test rendering image;

确定所述新的测试渲染图像在所述测试渲染视频中的目标帧位置;determining the target frame position of the new test rendering image in the test rendering video;

从所述参考渲染视频中,获取所述目标帧位置对应的参考视频帧作为参考渲染图像;From the reference rendered video, obtain a reference video frame corresponding to the target frame position as a reference rendered image;

返回执行所述将所述测试渲染图像与所述参考渲染图像进行比对,得到图像对比结果的步骤,直到所述测试渲染视频中的全部所述视频帧都进行了对比,或者任一所述视频帧的图像对比结果为图像对比未通过为止。Return to and perform the step of comparing the test rendered image with the reference rendered image to obtain an image comparison result, until all the video frames in the test rendered video are compared, or any one of the The image comparison result of the video frame is until the image comparison fails.

可选的,所述参考渲染视频为候选渲染视频中的一部分视频,所述候选渲染视频中包括至少两种不同的渲染效果对应的所述视频;Optionally, the reference rendering video is a part of the candidate rendering video, and the candidate rendering video includes the videos corresponding to at least two different rendering effects;

相应的,所述第二图像获取单元,用于根据所述渲染代码文件的目标渲染效果,从所述候选渲染视频中,确定所述目标渲染效果对应的所述视频;Correspondingly, the second image acquisition unit is configured to, according to the target rendering effect of the rendering code file, determine the video corresponding to the target rendering effect from the candidate rendering videos;

从所述目标渲染效果对应的所述视频的视频位置,获取所述目标渲染效果对应的所述视频作为参考渲染视频。From the video position of the video corresponding to the target rendering effect, the video corresponding to the target rendering effect is acquired as a reference rendering video.

相应的,本发明实施例还提供一种电子设备,包括存储器和处理器;所述存储器存储有应用程序,所述处理器用于运行所述存储器内的应用程序,以执行本发明实施例所提供的任一种图像渲染效果测试方法中的步骤。Correspondingly, an embodiment of the present invention further provides an electronic device, including a memory and a processor; the memory stores an application program, and the processor is configured to run the application program in the memory to execute the application program provided by the embodiment of the present invention. Any of the steps in the image rendering effect testing method.

此外,本发明实施例还提供一种存储介质,所述存储介质存储有多条指令,所述指令适于处理器进行加载,以执行本发明实施例所提供的任一种图像渲染效果测试方法中的步骤。In addition, an embodiment of the present invention also provides a storage medium, where the storage medium stores a plurality of instructions, and the instructions are suitable for a processor to load to execute any image rendering effect testing method provided by the embodiments of the present invention steps in .

采用本发明实施例的方案,可以基于需要进行渲染效果测试的渲染代码文件,对待渲染图像进行渲染,得到测试渲染图像,获取参考渲染图像,所述参考渲染图像为所述待渲染图像添加所述渲染代码文件的目标渲染效果后得到的图像,将所述测试渲染图像与所述参考渲染图像进行比对,得到图像对比结果,根据所述图像比对结果,确定所述渲染代码文件的测试结果;由于本发明实施例在测试过程中,将需要测试的测试渲染图像与具有目标渲染效果的参考渲染图像进行比对,确定测试结果,因此,可以降低在图像渲染效果测试过程中对人力资源的需求,节约图像渲染效果测试成本,提升图像渲染效果测试速度和准确度。With the solution of the embodiment of the present invention, the to-be-rendered image can be rendered based on a rendering code file that needs to be tested for rendering effects, a test rendered image can be obtained, and a reference rendered image can be obtained. Render the image obtained after the target rendering effect of the code file, compare the test rendering image with the reference rendering image, obtain an image comparison result, and determine the test result of the rendering code file according to the image comparison result Because the embodiment of the present invention compares the test rendering image that needs to be tested with the reference rendering image with the target rendering effect during the test process to determine the test result, therefore, it is possible to reduce the impact on human resources during the image rendering effect test process. requirements, saving the cost of image rendering effect testing, and improving the speed and accuracy of image rendering effect testing.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained from these drawings without creative effort.

图1是本发明实施例提供的图像渲染效果测试方法的场景示意图;Fig. 1 is a scene schematic diagram of an image rendering effect testing method provided by an embodiment of the present invention;

图2是本发明实施例提供的图像渲染效果测试方法的流程图;2 is a flowchart of an image rendering effect testing method provided by an embodiment of the present invention;

图3是本发明实施例提供的图像渲染效果测试方法的另一流程示意图;3 is another schematic flowchart of the image rendering effect testing method provided by the embodiment of the present invention;

图4是本发明实施例提供的图像渲染效果测试装置的结构示意图;4 is a schematic structural diagram of an image rendering effect testing device provided by an embodiment of the present invention;

图5是本发明实施例提供的图像渲染效果测试装置的另一结构示意图;5 is another schematic structural diagram of an image rendering effect testing device provided by an embodiment of the present invention;

图6是本发明实施例提供的终端中的图像渲染效果测试模块的示意图;6 is a schematic diagram of an image rendering effect test module in a terminal provided by an embodiment of the present invention;

图7是本发明实施例提供的电子设备的结构示意图。FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present invention.

本发明实施例提供一种图像渲染效果测试方法、装置、电子设备和存储介质。具体地,本发明实施例提供适用于图像渲染效果测试装置的图像渲染效果测试方法,该图像渲染效果测试装置可以集成在电子设备中。Embodiments of the present invention provide an image rendering effect testing method, device, electronic device, and storage medium. Specifically, the embodiment of the present invention provides an image rendering effect testing method suitable for an image rendering effect testing apparatus, and the image rendering effect testing apparatus can be integrated in an electronic device.

该电子设备可以为终端等设备,包括但不限于移动终端和固定终端,例如移动终端包括但不限于智能手机、智能手表、平板电脑、笔记本电脑、智能车载等,其中,固定终端包括但不限于台式电脑、智能家电例如智能电视等。The electronic device may be a terminal and other devices, including but not limited to mobile terminals and fixed terminals. For example, mobile terminals include but are not limited to smart phones, smart watches, tablet computers, notebook computers, smart vehicles, etc., where fixed terminals include but are not limited to Desktop computers, smart home appliances such as smart TVs, etc.

该电子设备还可以为服务器等设备,该服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN、以及大数据和人工智能平台等基础云计算服务的云服务器,但并不局限于此。The electronic device can also be a server or other device. The server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, and can also provide cloud services, cloud databases, cloud computing, and cloud functions. , cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms, but not limited to this.

本发明实施例的图像渲染效果测试方法,可以由终端实现,也可以由终端和服务器共同实现。The image rendering effect testing method according to the embodiment of the present invention may be implemented by a terminal, or may be implemented jointly by a terminal and a server.

下面以终端和服务器共同实现该图像渲染效果测试方法为例,对该方法进行说明。The method is described below by taking the terminal and the server jointly implementing the image rendering effect testing method as an example.

如图1所示,本发明实施例提供的图像渲染效果测试系统包括终端10和服务器20等;终端10与服务器20之间通过网络连接,比如,通过有线或无线网络连接等,其中,终端10可以作为向服务器20发送图像渲染效果测试请求的终端存在。As shown in FIG. 1 , the image rendering effect testing system provided by the embodiment of the present invention includes a terminal 10, aserver 20, etc.; the terminal 10 and theserver 20 are connected through a network, for example, through a wired or wireless network connection, etc., wherein the terminal 10 It can exist as a terminal that sends an image rendering effect test request to theserver 20 .

其中,终端10可以为生成图像渲染效果测试请求的终端,用于向服务器20发送图像渲染效果测试请求。The terminal 10 may be a terminal that generates an image rendering effect test request, and is configured to send the image rendering effect test request to theserver 20 .

服务器20,可以用于存储渲染代码文件,在接收到终端10发送的图像渲染效果测试请求后,可以根据图像渲染效果测试请求,将图像渲染效果测试请求对应的渲染代码文件发送给终端10。Theserver 20 can be used to store the rendering code file, and after receiving the image rendering effect test request sent by the terminal 10, can send the rendering code file corresponding to the image rendering effect test request to the terminal 10 according to the image rendering effect test request.

终端10,可以用于基于需要进行渲染效果测试的渲染代码文件,对待渲染图像进行渲染,得到测试渲染图像,获取参考渲染图像,所述参考渲染图像为所述待渲染图像添加所述渲染代码文件的目标渲染效果后得到的图像,将所述测试渲染图像与所述参考渲染图像进行比对,得到图像对比结果,根据所述图像比对结果,确定所述渲染代码文件的测试结果。The terminal 10 can be used to render the to-be-rendered image based on the rendering code file required for rendering effect testing, obtain a test rendered image, and obtain a reference rendered image, where the reference rendered image adds the rendering code file to the to-be-rendered image The image obtained after the target rendering effect is obtained, the test rendering image is compared with the reference rendering image, an image comparison result is obtained, and the test result of the rendering code file is determined according to the image comparison result.

以下分别进行详细说明。需要说明的是,以下实施例的描述顺序不作为对实施例优选顺序的限定。Each of them will be described in detail below. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

本发明实施例将从图像渲染效果测试装置的角度进行描述,该图像渲染效果测试装置具体可以集成在终端中。The embodiments of the present invention will be described from the perspective of an image rendering effect testing apparatus, and the image rendering effect testing apparatus may specifically be integrated in a terminal.

如图2所示,本实施例的图像渲染效果测试方法的具体流程可以如下:As shown in FIG. 2 , the specific process of the image rendering effect testing method of this embodiment may be as follows:

201、基于需要进行渲染效果测试的渲染代码文件,对待渲染图像进行渲染,得到测试渲染图像。201. Render the to-be-rendered image based on the rendering code file that needs to be tested for rendering effect to obtain a test rendering image.

在本发明实施例的一些示例中,渲染代码文件可以是技术人员针对图像渲染效果测试需求自行编写的代码文件,可以理解的是,渲染代码文件中不仅可以包括可以被执行的程序代码,还可以包括在图像渲染效果测试时需要的渲染信息,等等,本发明对此不做限定,技术人员可以根据实际应用自行设置渲染代码文件中包含的信息。In some examples of the embodiments of the present invention, the rendering code file may be a code file written by technicians for image rendering effect testing requirements. It can be understood that the rendering code file may not only include executable program codes, but also Including the rendering information required in the image rendering effect test, etc., which is not limited in the present invention, and the technical personnel can set the information contained in the rendering code file by themselves according to the actual application.

可以理解的是,技术人员可以预先根据不同的图像效果生成不同图像效果对应的渲染代码文件。It can be understood that the technical personnel can generate rendering code files corresponding to different image effects in advance according to different image effects.

其中,渲染信息可以是在图像渲染效果测试过程中需要的信息,例如在终端的显示区域中的哪个范围、哪个位置、什么时间点和/或显示什么颜色的信息,等等。The rendering information may be information required during the image rendering effect testing process, such as which range, which position, which time point and/or which color is displayed in the display area of the terminal, and the like.

其中,待渲染图像为未经过渲染代码文件渲染的图像。可以理解的是,待渲染图像在测试之前可以经过其他的渲染代码文件渲染,本发明实施例对此不做限定。The to-be-rendered image is an image that has not been rendered by the rendering code file. It can be understood that the to-be-rendered image may be rendered by other rendering code files before testing, which is not limited in this embodiment of the present invention.

可以理解的是,渲染代码文件也可以对视频进行渲染,此时,所述待渲染图像为待渲染视频中的视频帧,所述待渲染视频中包含至少两个所述视频帧,步骤“基于需要进行渲染效果测试的渲染代码文件,对待渲染图像进行渲染,得到测试渲染图像”,包括:It can be understood that the rendering code file can also render the video. At this time, the to-be-rendered image is a video frame in the to-be-rendered video, and the to-be-rendered video contains at least two of the video frames. The rendering code file that needs to be tested for rendering effect, the image to be rendered is rendered, and the test rendering image is obtained", including:

基于需要进行渲染效果测试的渲染代码文件,对待渲染视频的各所述视频帧进行渲染,得到测试渲染视频;Based on the rendering code file that needs to be tested for rendering effect, render each of the video frames of the video to be rendered to obtain a test rendering video;

从所述测试渲染视频的各所述视频帧中,确定一所述视频帧作为测试渲染图像。From each of the video frames of the test rendered video, one of the video frames is determined as a test rendered image.

具体的,在确定测试渲染图像时,可以是确定任意的视频帧作为测试渲染图像,也可以是从测试渲染视频中确定一个完成了渲染的视频帧作为测试渲染图像。Specifically, when determining the test rendered image, any video frame may be determined as the test rendered image, or a rendered video frame may be determined from the test rendered video as the test rendered image.

视频的渲染架构可以如图3所示:主要分为UI交互层、渲染引擎层、三方SDK层。其中,UI交互层主要的职责是负责与用户的交互并将用户的操作记录在渲染引擎层的草稿中。渲染引擎层主要包括渲染引擎和草稿两部分:渲染引擎负责渲染链的构建、渲染链的渲染等,草稿主要是UI交互层操作的数据记录,负责UI与渲染引擎的数据交互。三方SDK层,主要是一些渲染相关的算法,通过渲染引擎接入到渲染链中,实现渲染效果。The video rendering architecture can be shown in Figure 3: it is mainly divided into UI interaction layer, rendering engine layer, and third-party SDK layer. Among them, the main responsibility of the UI interaction layer is to interact with the user and record the user's operation in the draft of the rendering engine layer. The rendering engine layer mainly includes two parts: the rendering engine and the draft: the rendering engine is responsible for the construction of the rendering chain, the rendering of the rendering chain, etc. The draft is mainly the data record of the UI interaction layer operation, which is responsible for the data interaction between the UI and the rendering engine. The three-party SDK layer, mainly some rendering-related algorithms, is connected to the rendering chain through the rendering engine to achieve rendering effects.

其中,常见的构建好的渲染链,主要包括输入纹理、背景替换、美颜、滤镜等渲染环节。Among them, the commonly constructed rendering chain mainly includes rendering links such as input texture, background replacement, beauty, and filter.

202、获取参考渲染图像,所述参考渲染图像为所述待渲染图像添加所述渲染代码文件的目标渲染效果后得到的图像。202. Obtain a reference rendered image, where the reference rendered image is an image obtained by adding the target rendering effect of the rendering code file to the to-be-rendered image.

其中,目标渲染效果可以是用户或者技术人员指定在终端上显示的图像和/或视频具有的渲染效果,例如可以指定为图像A设置在图像边缘添加发光效果的特效,则目标渲染效果为图像边缘具有发光效果,等等。The target rendering effect may be the rendering effect of the image and/or video displayed on the terminal designated by the user or the technician. For example, it may be specified that the special effect of adding a luminous effect to the edge of the image can be set for image A, and the target rendering effect is the edge of the image. With glowing effects, etc.

具体的,可以采用版本迭代前的应用程序对待渲染图像或者待渲染视频进行渲染,得到参考渲染图像或者参考渲染视频。Specifically, the to-be-rendered image or the to-be-rendered video may be rendered by the application program before the version iteration, to obtain the reference rendered image or the reference rendered video.

可以理解的是,渲染代码文件也可以对视频进行渲染,参考渲染图像为参考渲染视频中的参考视频帧,所述参考渲染视频中包含至少两个所述参考视频帧,所述参考渲染视频为所述待渲染视频添加所述渲染代码文件的目标渲染效果后得到的视频。It can be understood that the rendering code file can also render the video, and the reference rendering image is the reference video frame in the reference rendering video, and the reference rendering video includes at least two of the reference video frames, and the reference rendering video is The video to be rendered is a video obtained after adding the target rendering effect of the rendering code file.

相应的,步骤“获取参考渲染图像”,具体可以包括:Correspondingly, the step "obtaining a reference rendered image" may specifically include:

获取参考渲染视频;Get reference rendering video;

确定所述测试渲染图像在所述测试渲染视频中的目标帧位置;determining the target frame position of the test rendering image in the test rendering video;

从所述参考渲染视频中,获取所述目标帧位置对应的参考视频帧作为参考渲染图像。From the reference rendered video, a reference video frame corresponding to the target frame position is acquired as a reference rendered image.

其中,目标帧位置可以根据测试渲染图像在所述测试渲染视频中为第几帧得到,或者,目标帧位置可以根据测试渲染图像在所述测试渲染视频中的时间点确定。The target frame position may be obtained according to which frame the test rendered image is in the test rendered video, or the target frame position may be determined according to the time point of the test rendered image in the test rendered video.

以美颜渲染效果对比为例,渲染链渲染到美颜节点时,可以根据当前渲染得到的测试渲染图像对应时刻t,将测试渲染视频中当前时间点t时刻的视频帧(Ft)读取出来,作为参考渲染图像。等到美颜节点渲染完成以后,将渲染完成的美颜帧(测试渲染图像)和参考渲染图像进行对比。Taking the comparison of beauty rendering effects as an example, when the rendering chain renders to the beauty node, the video frame (Ft) at the current time point t in the test rendering video can be read out according to the time t corresponding to the currently rendered test rendering image. , as a reference rendered image. After the rendering of the beauty node is completed, compare the rendered beauty frame (test rendering image) with the reference rendering image.

在实际应用过程中,技术人员可以在稳定版本的处理应用中,通过手工或者脚本模拟用户对视频添加各种效果,然后生成一个或多个渲染节点处理过的候选渲染视频。可以将候选渲染视频进行打包,放到服务器中。当开发人员提交代码以后,激活服务器,服务器根据当前的代码编译出APP,并读入事先准备好的待渲染视频及候选渲染视频,运行APP,将每一个渲染效果生成的效果文件(测试渲染视频)与服务器中的预先生成好的渲染效果对应的效果视频文件(参考渲染视频)进行对比。In the actual application process, technicians can simulate the user to add various effects to the video in the stable version of the processing application, and then generate a candidate rendering video processed by one or more rendering nodes. The candidate rendering video can be packaged and placed on the server. After the developer submits the code, activate the server, the server compiles the APP according to the current code, reads the pre-prepared video to be rendered and the candidate rendering video, runs the APP, and converts the effect file (test rendering video) generated by each rendering effect. ) is compared with the effect video file (refer to the rendering video) corresponding to the pre-generated rendering effect in the server.

也就是说,参考渲染视频可以为候选渲染视频中的一部分视频,所述候选渲染视频中包括至少两种不同的渲染效果对应的所述视频;That is to say, the reference rendered video may be a part of the candidate rendered video, and the candidate rendered video includes the videos corresponding to at least two different rendering effects;

所述获取参考渲染视频,包括:The obtaining reference rendering video includes:

根据所述渲染代码文件的目标渲染效果,从所述候选渲染视频中,确定所述目标渲染效果对应的所述视频;According to the target rendering effect of the rendering code file, from the candidate rendering videos, determine the video corresponding to the target rendering effect;

从所述目标渲染效果对应的所述视频的视频位置,获取所述目标渲染效果对应的所述视频作为参考渲染视频。From the video position of the video corresponding to the target rendering effect, the video corresponding to the target rendering effect is acquired as a reference rendering video.

其中,候选渲染视频可以是一个视频文件,此时,参考渲染视频可以是候选渲染视频中的一段视频,视频位置则为参考渲染视频在候选渲染视频中的位置。或者,候选渲染视频可以是多个视频文件组成的集合,此时,参考渲染视频可以是候选渲染视频中的一个视频,视频位置则可以为参考渲染视频的存储位置。Wherein, the candidate rendering video may be a video file, in this case, the reference rendering video may be a video in the candidate rendering video, and the video position is the position of the reference rendering video in the candidate rendering video. Alternatively, the candidate rendered video may be a set of multiple video files, in this case, the reference rendered video may be one video in the candidate rendered video, and the video location may be a storage location of the reference rendered video.

203、将所述测试渲染图像与所述参考渲染图像进行比对,得到图像对比结果。203. Compare the test rendered image with the reference rendered image to obtain an image comparison result.

其中,进行对比的方式,可以是将测试渲染图像与参考渲染图像进行逐个像素点对比,计算匹配的像素点占总像素点的比例,根据比例,得到图像对比结果。The comparison method may be to compare the test rendered image and the reference rendered image pixel by pixel, calculate the ratio of matching pixels to the total pixels, and obtain the image comparison result according to the ratio.

或者,步骤“将所述测试渲染图像与所述参考渲染图像进行比对,得到图像对比结果”,具体可以包括:Alternatively, the step "compare the test rendering image with the reference rendering image to obtain an image comparison result", which may specifically include:

将所述测试渲染图像中的每个测试像素点分别与所述参考渲染图像中对应的像素点计算差值,得到每个测试像素点对应的像素差值;Calculate the difference between each test pixel in the test rendering image and the corresponding pixel in the reference rendering image to obtain the pixel difference corresponding to each test pixel;

基于各所述像素差值,构建差值图像;constructing a difference image based on each of the pixel differences;

计算所述差值图像的像素均方差,根据所述像素均方差得到图像对比结果。Calculate the pixel mean square error of the difference image, and obtain an image comparison result according to the pixel mean square error.

在一些可选的示例中,为了提高计算效率,可以对差值图像的宽、高分别缩小10倍。再计算缩小后差值图像的像素均方差。In some optional examples, in order to improve computational efficiency, the width and height of the difference image may be reduced by 10 times respectively. Then calculate the pixel mean square error of the reduced difference image.

其中,步骤“根据所述像素均方差得到图像对比结果”,具体可以包括:Wherein, the step "obtaining the image comparison result according to the pixel mean square error" may specifically include:

若所述像素均方差不大于预设对比阈值,得到图像对比通过的图像对比结果;If the pixel mean square error is not greater than the preset comparison threshold, obtain an image comparison result that passes the image comparison;

若所述像素均方差小于所述预设对比阈值,得到图像对比未通过的图像对比结果。If the pixel mean square error is less than the preset comparison threshold, an image comparison result that fails the image comparison is obtained.

也就是说,可以对比均方差与给定的阈值,如果均方差小于给定阈值,说明当前图像一致,否则图像就不一样。That is to say, the mean square error can be compared with the given threshold. If the mean square error is less than the given threshold, it means that the current image is consistent, otherwise the image is different.

步骤“将所述测试渲染图像与所述参考渲染图像进行比对,得到图像对比结果”之后,本发明实施例提供的图像渲染效果测试方法还可以包括:After the step "compare the test rendering image with the reference rendering image to obtain an image comparison result", the image rendering effect testing method provided by the embodiment of the present invention may further include:

若所述图像对比结果为图像对比通过,从所述测试渲染视频中,未进行对比的各所述视频帧中,确定一所述视频帧作为新的测试渲染图像;If the image comparison result is that the image comparison passes, from the test rendering video, from each of the video frames that have not been compared, determine one of the video frames as a new test rendering image;

确定所述新的测试渲染图像在所述测试渲染视频中的目标帧位置;determining the target frame position of the new test rendering image in the test rendering video;

从所述参考渲染视频中,获取所述目标帧位置对应的参考视频帧作为参考渲染图像;From the reference rendered video, obtain a reference video frame corresponding to the target frame position as a reference rendered image;

返回执行所述将所述测试渲染图像与所述参考渲染图像进行比对,得到图像对比结果的步骤,直到所述测试渲染视频中的全部所述视频帧都进行了对比,或者任一所述视频帧的图像对比结果为图像对比未通过为止。Return to and perform the step of comparing the test rendered image with the reference rendered image to obtain an image comparison result, until all the video frames in the test rendered video are compared, or any one of the The image comparison result of the video frame is until the image comparison fails.

在本发明实施例中,例如,如图4所示,可以针对各渲染效果进行单节点渲染结果对比,例如在进行背景节点对比的时候,首先是素材经过背景节点渲染以后得到背景节点渲染结果,然后将该结果与背景节点保存的视频的对应时间点的视频帧进行对比,如果两个视频帧一致,则进入下一节点渲染对比,直到结果完成。如果中间有任何一次对比结果不一致,可以终止测试。In this embodiment of the present invention, for example, as shown in FIG. 4 , a single-node rendering result comparison may be performed for each rendering effect. For example, when performing background node comparison, first, the background node rendering result is obtained after the material is rendered by the background node, Then, compare the result with the video frame at the corresponding time point of the video saved by the background node. If the two video frames are consistent, enter the next node for rendering and comparison until the result is completed. If any of the comparison results in the middle are inconsistent, the test can be terminated.

204、根据所述图像比对结果,确定所述渲染代码文件的测试结果。204. Determine a test result of the rendering code file according to the image comparison result.

如果中间有任何一次比对结果不一致,终止运行,服务器可以将出问题的节点告知提交代码人员,并阻止代码合入。如果所有节点的比对结果一致,则将当前提交的一笔代码合入到代码主干中。If there is any inconsistency in the comparison results in the middle, the operation is terminated. The server can notify the code submitter of the node in question and prevent the code from being merged. If the comparison results of all nodes are consistent, the currently submitted code will be merged into the code trunk.

由上可知,本发明实施例可以基于需要进行渲染效果测试的渲染代码文件,对待渲染图像进行渲染,得到测试渲染图像,获取参考渲染图像,所述参考渲染图像为所述待渲染图像添加所述渲染代码文件的目标渲染效果后得到的图像,将所述测试渲染图像与所述参考渲染图像进行比对,得到图像对比结果,根据所述图像比对结果,确定所述渲染代码文件的测试结果;由于本发明实施例在测试过程中,将需要测试的测试渲染图像与具有目标渲染效果的参考渲染图像进行比对,确定测试结果,因此,可以降低在图像渲染效果测试过程中对人力资源的需求,节约图像渲染效果测试成本,提升图像渲染效果测试速度和准确度。As can be seen from the above, in this embodiment of the present invention, an image to be rendered can be rendered based on a rendering code file that needs to be tested for rendering effects, a test rendered image can be obtained, and a reference rendered image can be obtained. Render the image obtained after the target rendering effect of the code file, compare the test rendering image with the reference rendering image, obtain an image comparison result, and determine the test result of the rendering code file according to the image comparison result Because the embodiment of the present invention compares the test rendering image that needs to be tested with the reference rendering image with the target rendering effect during the test process to determine the test result, therefore, it is possible to reduce the impact on human resources during the image rendering effect test process. requirements, saving the cost of image rendering effect testing, and improving the speed and accuracy of image rendering effect testing.

为了更好地实施以上方法,相应的,本发明实施例还提供一种图像渲染效果测试装置。In order to better implement the above method, correspondingly, an embodiment of the present invention further provides an image rendering effect testing apparatus.

参考图5,本发明实施例提供的一种图像渲染效果测试装置,可以包括:Referring to FIG. 5 , an image rendering effect testing apparatus provided by an embodiment of the present invention may include:

第一图像获取单元501,可以用于基于需要进行渲染效果测试的渲染代码文件,对待渲染图像进行渲染,得到测试渲染图像;The firstimage acquisition unit 501 can be used to render the to-be-rendered image based on the rendering code file that needs to be tested for rendering effect, and obtain the test rendering image;

第二图像获取单元502,可以用于获取参考渲染图像,所述参考渲染图像为所述待渲染图像添加所述渲染代码文件的目标渲染效果后得到的图像;The secondimage obtaining unit 502 can be configured to obtain a reference rendered image, where the reference rendered image is an image obtained by adding the target rendering effect of the rendering code file to the to-be-rendered image;

图像对比单元503,可以用于将所述测试渲染图像与所述参考渲染图像进行比对,得到图像对比结果;Theimage comparison unit 503 can be used to compare the test rendering image with the reference rendering image to obtain an image comparison result;

测试结果确定单元504,可以用于根据所述图像比对结果,确定所述渲染代码文件的测试结果。The testresult determination unit 504 may be configured to determine the test result of the rendering code file according to the image comparison result.

在一些可选的实施例中,所述图像对比单元503,可以用于将所述测试渲染图像中的每个测试像素点分别与所述参考渲染图像中对应的像素点计算差值,得到每个测试像素点对应的像素差值;In some optional embodiments, theimage comparison unit 503 may be configured to calculate the difference between each test pixel in the test rendered image and the corresponding pixel in the reference rendered image, to obtain each test pixel. The pixel difference value corresponding to each test pixel point;

基于各所述像素差值,构建差值图像;constructing a difference image based on each of the pixel differences;

计算所述差值图像的像素均方差,根据所述像素均方差得到图像对比结果。Calculate the pixel mean square error of the difference image, and obtain an image comparison result according to the pixel mean square error.

在一些可选的实施例中,所述图像对比单元503,可以用于若所述像素均方差不大于预设对比阈值,得到图像对比通过的图像对比结果;In some optional embodiments, theimage comparison unit 503 may be configured to obtain an image comparison result that passes the image comparison if the pixel mean square error is not greater than a preset comparison threshold;

若所述像素均方差小于所述预设对比阈值,得到图像对比未通过的图像对比结果。If the pixel mean square error is less than the preset comparison threshold, an image comparison result that fails the image comparison is obtained.

在一些可选的实施例中,所述待渲染图像为待渲染视频中的视频帧,所述待渲染视频中包含至少两个所述视频帧;In some optional embodiments, the to-be-rendered image is a video frame in a to-be-rendered video, and the to-be-rendered video includes at least two of the video frames;

相应的,第一图像获取单元501,可以用于基于需要进行渲染效果测试的渲染代码文件,对待渲染视频的各所述视频帧进行渲染,得到测试渲染视频;Correspondingly, the firstimage acquisition unit 501 can be used to render each of the video frames of the video to be rendered based on the rendering code file that needs to be tested for rendering effects, to obtain a test rendering video;

从所述测试渲染视频的各所述视频帧中,确定一所述视频帧作为测试渲染图像。From each of the video frames of the test rendered video, one of the video frames is determined as a test rendered image.

在一些可选的实施例中,所述参考渲染图像为参考渲染视频中的参考视频帧,所述参考渲染视频中包含至少两个所述参考视频帧,所述参考渲染视频为所述待渲染视频添加所述渲染代码文件的目标渲染效果后得到的视频;In some optional embodiments, the reference rendered image is a reference video frame in a reference rendered video, the reference rendered video includes at least two of the reference video frames, and the reference rendered video is the to-be-rendered video The video obtained after adding the target rendering effect of the rendering code file to the video;

相应的,所述第二图像获取单元502,可以用于获取参考渲染视频;Correspondingly, the secondimage obtaining unit 502 can be used to obtain a reference rendering video;

确定所述测试渲染图像在所述测试渲染视频中的目标帧位置;determining the target frame position of the test rendering image in the test rendering video;

从所述参考渲染视频中,获取所述目标帧位置对应的参考视频帧作为参考渲染图像。From the reference rendered video, a reference video frame corresponding to the target frame position is acquired as a reference rendered image.

在一些可选的实施例中,如图6所示,本发明实施例提供的图像渲染效果测试装置还可以包括循环对比单元505,可以用于若所述图像对比结果为图像对比通过,从所述测试渲染视频中,未进行对比的各所述视频帧中,确定一所述视频帧作为新的测试渲染图像;In some optional embodiments, as shown in FIG. 6 , the image rendering effect testing apparatus provided in this embodiment of the present invention may further include acyclic comparison unit 505, which may be used for, if the image comparison result is that the image comparison passes, In the test rendering video, in each of the video frames that are not compared, determine one of the video frames as a new test rendering image;

确定所述新的测试渲染图像在所述测试渲染视频中的目标帧位置;determining the target frame position of the new test rendering image in the test rendering video;

从所述参考渲染视频中,获取所述目标帧位置对应的参考视频帧作为参考渲染图像;From the reference rendered video, obtain a reference video frame corresponding to the target frame position as a reference rendered image;

返回执行所述将所述测试渲染图像与所述参考渲染图像进行比对,得到图像对比结果的步骤,直到所述测试渲染视频中的全部所述视频帧都进行了对比,或者任一所述视频帧的图像对比结果为图像对比未通过为止。Return to and perform the step of comparing the test rendered image with the reference rendered image to obtain an image comparison result, until all the video frames in the test rendered video are compared, or any one of the The image comparison result of the video frame is until the image comparison fails.

在一些可选的实施例中,所述参考渲染视频为候选渲染视频中的一部分视频,所述候选渲染视频中可以包括至少两种不同的渲染效果对应的所述视频;In some optional embodiments, the reference rendered video is a part of the candidate rendered video, and the candidate rendered video may include the videos corresponding to at least two different rendering effects;

相应的,所述第二图像获取单元502,可以用于根据所述渲染代码文件的目标渲染效果,从所述候选渲染视频中,确定所述目标渲染效果对应的所述视频;Correspondingly, the secondimage acquisition unit 502 may be configured to, according to the target rendering effect of the rendering code file, determine the video corresponding to the target rendering effect from the candidate rendering videos;

从所述目标渲染效果对应的所述视频的视频位置,获取所述目标渲染效果对应的所述视频作为参考渲染视频。From the video position of the video corresponding to the target rendering effect, the video corresponding to the target rendering effect is acquired as a reference rendering video.

由上可知,通过图像渲染效果测试装置,可以基于需要进行渲染效果测试的渲染代码文件,对待渲染图像进行渲染,得到测试渲染图像,获取参考渲染图像,所述参考渲染图像为所述待渲染图像添加所述渲染代码文件的目标渲染效果后得到的图像,将所述测试渲染图像与所述参考渲染图像进行比对,得到图像对比结果,根据所述图像比对结果,确定所述渲染代码文件的测试结果;由于本发明实施例在测试过程中,将需要测试的测试渲染图像与具有目标渲染效果的参考渲染图像进行比对,确定测试结果,因此,可以降低在图像渲染效果测试过程中对人力资源的需求,节约图像渲染效果测试成本,提升图像渲染效果测试速度和准确度。As can be seen from the above, through the image rendering effect testing device, the image to be rendered can be rendered based on the rendering code file that needs to be tested for rendering effect, a test rendered image can be obtained, and a reference rendered image can be obtained, and the reference rendered image is the image to be rendered. The image obtained after adding the target rendering effect of the rendering code file, the test rendering image is compared with the reference rendering image to obtain an image comparison result, and the rendering code file is determined according to the image comparison result. Since the embodiment of the present invention compares the test rendering image that needs to be tested with the reference rendering image with the target rendering effect during the testing process to determine the test result, it can reduce the risk of The demand for human resources, saving the cost of image rendering effect testing, and improving the speed and accuracy of image rendering effect testing.

此外,本发明实施例还提供一种电子设备,该电子设备可以为终端或者服务器等等,如图7所示,其示出了本发明实施例所涉及的电子设备的结构示意图,具体来讲:In addition, an embodiment of the present invention also provides an electronic device, which may be a terminal or a server, etc. As shown in FIG. 7 , which shows a schematic structural diagram of the electronic device involved in the embodiment of the present invention, specifically :

该电子设备可以包括射频(RF,Radio Frequency)电路901、包括有一个或一个以上计算机可读存储介质的存储器902、输入单元903、显示单元904、传感器905、音频电路906、无线保真(WiFi,Wireless Fidelity)模块907、包括有一个或者一个以上处理核心的处理器908、以及电源909等部件。本领域技术人员可以理解,图7中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:The electronic device may include a radio frequency (RF, Radio Frequency)circuit 901, amemory 902 including one or more computer-readable storage media, aninput unit 903, adisplay unit 904, a sensor 905, anaudio circuit 906, a wireless fidelity (WiFi) , Wireless Fidelity)module 907, aprocessor 908 including one or more processing cores, and apower supply 909 and other components. Those skilled in the art can understand that the structure of the electronic device shown in FIG. 7 does not constitute a limitation to the electronic device, and may include more or less components than the one shown, or combine some components, or arrange different components. in:

RF电路901可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器908处理;另外,将涉及上行的数据发送给基站。通常,RF电路901包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM,Subscriber Identity Module)卡、收发信机、耦合器、低噪声放大器(LNA,Low Noise Amplifier)、双工器等。此外,RF电路901还可以通过无线通信与网络和其他设备通信。无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(GSM,Global System of Mobile communication)、通用分组无线服务(GPRS,GeneralPacket Radio Service)、码分多址(CDMA,Code Division Multiple Access)、宽带码分多址(WCDMA,Wideband Code Division Multiple Access)、长期演进(LTE,Long TermEvolution)、电子邮件、短消息服务(SMS,Short Messaging Service)等。TheRF circuit 901 can be used for receiving and sending signals during transmission and reception of information or during a call. In particular, after receiving the downlink information of the base station, it is handed over to one ormore processors 908 for processing; in addition, it sends the uplink data to the base station. . Typically, theRF circuit 901 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a low noise amplifier (LNA, Low Noise Amplifier), duplexer, etc. In addition, theRF circuit 901 can also communicate with the network and other devices through wireless communication. Wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communication (GSM, Global System of Mobile communication), General Packet Radio Service (GPRS, General Packet Radio Service), Code Division Multiple Access (CDMA, Code Division) Multiple Access), Wideband Code Division Multiple Access (WCDMA, Wideband Code Division Multiple Access), Long Term Evolution (LTE, Long Term Evolution), email, Short Messaging Service (SMS, Short Messaging Service) and so on.

存储器902可用于存储软件程序以及模块,处理器908通过运行存储在存储器902的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器902可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器902可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器902还可以包括存储器控制器,以提供处理器908和输入单元903对存储器902的访问。Thememory 902 can be used to store software programs and modules, and theprocessor 908 executes various functional applications and data processing by running the software programs and modules stored in thememory 902 . Thememory 902 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of electronic equipment (such as audio data, phone book, etc.), etc. Additionally,memory 902 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, thememory 902 may also include a memory controller to provide access to thememory 902 by theprocessor 908 and theinput unit 903 .

输入单元903可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,在一个具体的实施例中,输入单元903可包括触敏表面以及其他输入设备。触敏表面,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面上或在触敏表面附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器908,并能接收处理器908发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面。除了触敏表面,输入单元903还可以包括其他输入设备。具体地,其他输入设备可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。Theinput unit 903 may be used to receive input numerical or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, in a specific embodiment, theinput unit 903 may include a touch-sensitive surface as well as other input devices. A touch-sensitive surface, also known as a touch display or trackpad, collects the user's touch operations on or near it (such as the user's finger, stylus, etc., any suitable operation near the surface), and drive the corresponding connection device according to the preset program. Optionally, the touch-sensitive surface may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the touch controller. To theprocessor 908, and can receive the command sent by theprocessor 908 and execute it. Additionally, touch-sensitive surfaces can be implemented using resistive, capacitive, infrared, and surface acoustic wave types. In addition to the touch-sensitive surface, theinput unit 903 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, and the like.

显示单元904可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元904可包括显示面板,可选的,可以采用液晶显示器(LCD,Liquid CrystalDisplay)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。进一步的,触敏表面可覆盖显示面板,当触敏表面检测到在其上或附近的触摸操作后,传送给处理器908以确定触摸事件的类型,随后处理器908根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图7中,触敏表面与显示面板是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面与显示面板集成而实现输入和输出功能。Thedisplay unit 904 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, which can be composed of graphics, text, icons, videos, and any combination thereof. Thedisplay unit 904 may include a display panel, and optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface may cover the display panel, and when the touch-sensitive surface detects a touch operation on or near it, it is transmitted to theprocessor 908 to determine the type of the touch event, and then theprocessor 908 displays the touch event according to the type of the touch event. The corresponding visual output is provided on the panel. Although in FIG. 7 the touch-sensitive surface and the display panel are implemented as two separate components to implement the input and input functions, in some embodiments, the touch-sensitive surface and the display panel may be integrated to implement the input and output functions.

电子设备还可包括至少一种传感器905,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在电子设备移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于电子设备还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The electronic device may also include at least one sensor 905, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and/or when the electronic device is moved to the ear Backlight. As a kind of motion sensor, the gravitational acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used for applications that recognize the attitude of mobile phones (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. Repeat.

音频电路906、扬声器,传声器可提供用户与电子设备之间的音频接口。音频电路906可将接收到的音频数据转换后的电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路906接收后转换为音频数据,再将音频数据输出处理器908处理后,经RF电路901以发送给比如另一电子设备,或者将音频数据输出至存储器902以便进一步处理。音频电路906还可能包括耳塞插孔,以提供外设耳机与电子设备的通信。Audio circuitry 906, speakers, and microphones may provide an audio interface between the user and the electronic device. Theaudio circuit 906 can convert the received audio data into an electrical signal, and transmit it to the speaker, and the speaker converts it into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is converted after being received by theaudio circuit 906 In the form of audio data, the audio data is output to theprocessor 908 for processing, and then sent to, for example, another electronic device via theRF circuit 901, or the audio data is output to thememory 902 for further processing.Audio circuitry 906 may also include an earbud jack to provide for communication of peripheral headphones with the electronic device.

WiFi属于短距离无线传输技术,电子设备通过WiFi模块907可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图7示出了WiFi模块907,但是可以理解的是,其并不属于电子设备的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-distance wireless transmission technology, and the electronic device can help users to send and receive emails, browse web pages, and access streaming media through theWiFi module 907, which provides users with wireless broadband Internet access. Although FIG. 7 shows theWiFi module 907, it can be understood that it is not an essential component of the electronic device, and can be completely omitted as required within the scope of not changing the essence of the invention.

处理器908是电子设备的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器902内的软件程序和/或模块,以及调用存储在存储器902内的数据,执行电子设备的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器908可包括一个或多个处理核心;优选的,处理器908可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器908中。Theprocessor 908 is the control center of the electronic device, using various interfaces and lines to connect various parts of the entire mobile phone, by running or executing the software programs and/or modules stored in thememory 902, and calling the data stored in thememory 902, Perform various functions of electronic equipment and process data, so as to conduct overall monitoring of mobile phones. Optionally, theprocessor 908 may include one or more processing cores; preferably, theprocessor 908 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc. , the modem processor mainly deals with wireless communication. It can be understood that the above-mentioned modulation and demodulation processor may not be integrated into theprocessor 908 .

电子设备还包括给各个部件供电的电源909(比如电池),优选的,电源可以通过电源管理系统与处理器908逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源909还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The electronic device also includes a power supply 909 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to theprocessor 908 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system.Power supply 909 may also include one or more DC or AC power sources, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and any other components.

尽管未示出,电子设备还可以包括摄像头、蓝牙模块等,在此不再赘述。具体在本实施例中,电子设备中的处理器908会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器902中,并由处理器908来运行存储在存储器902中的应用程序,从而实现各种功能,如下:Although not shown, the electronic device may further include a camera, a Bluetooth module, and the like, which will not be repeated here. Specifically in this embodiment, theprocessor 908 in the electronic device loads the executable file corresponding to the process of one or more application programs into thememory 902 according to the following instructions, and theprocessor 908 executes the execution and stores the executable file in thememory 902. The application program in thememory 902, thereby realizing various functions, as follows:

基于需要进行渲染效果测试的渲染代码文件,对待渲染图像进行渲染,得到测试渲染图像;Render the to-be-rendered image based on the rendering code file that needs to be tested for rendering effect to obtain a test rendering image;

获取参考渲染图像,所述参考渲染图像为所述待渲染图像添加所述渲染代码文件的目标渲染效果后得到的图像;Obtaining a reference rendering image, the reference rendering image is an image obtained after adding the target rendering effect of the rendering code file to the to-be-rendered image;

将所述测试渲染图像与所述参考渲染图像进行比对,得到图像对比结果;Comparing the test rendering image with the reference rendering image to obtain an image comparison result;

根据所述图像比对结果,确定所述渲染代码文件的测试结果。According to the image comparison result, the test result of the rendering code file is determined.

本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructions, or by instructions that control relevant hardware, and the instructions can be stored in a computer-readable storage medium, and loaded and executed by the processor.

为此,本发明实施例提供一种存储介质,其中存储有多条指令,该指令能够被处理器进行加载,以执行本发明实施例所提供的任一种图像渲染效果测试方法中的步骤。例如,该指令可以执行如下步骤:To this end, the embodiments of the present invention provide a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute steps in any of the image rendering effect testing methods provided by the embodiments of the present invention. For example, the instruction can perform the following steps:

基于需要进行渲染效果测试的渲染代码文件,对待渲染图像进行渲染,得到测试渲染图像;Render the to-be-rendered image based on the rendering code file that needs to be tested for rendering effect to obtain a test rendering image;

获取参考渲染图像,所述参考渲染图像为所述待渲染图像添加所述渲染代码文件的目标渲染效果后得到的图像;Obtaining a reference rendering image, the reference rendering image is an image obtained after adding the target rendering effect of the rendering code file to the to-be-rendered image;

将所述测试渲染图像与所述参考渲染图像进行比对,得到图像对比结果;Comparing the test rendering image with the reference rendering image to obtain an image comparison result;

根据所述图像比对结果,确定所述渲染代码文件的测试结果。According to the image comparison result, the test result of the rendering code file is determined.

以上各个操作的具体实施可参见前面的实施例,在此不再赘述。For the specific implementation of the above operations, reference may be made to the foregoing embodiments, and details are not described herein again.

其中,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。Wherein, the storage medium may include: a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and the like.

由于该存储介质中所存储的指令,可以执行本发明实施例所提供的任一种图像渲染效果测试方法中的步骤,因此,可以实现本发明实施例所提供的任一种图像渲染效果测试方法所能实现的有益效果,详见前面的实施例,在此不再赘述。Due to the instructions stored in the storage medium, the steps in any of the image rendering effect testing methods provided by the embodiments of the present invention can be executed, and therefore, any image rendering effect testing methods provided by the embodiments of the present invention can be implemented. For the beneficial effects that can be achieved, refer to the foregoing embodiments for details, which will not be repeated here.

根据本申请的一个方面,还提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。电子设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该电子设备执行上述实施例中的各种可选实现方式中提供的方法。According to one aspect of the present application, there is also provided a computer program product or computer program, the computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods provided in various optional implementations in the foregoing embodiments.

以上对本发明实施例所提供的一种图像渲染效果测试方法、装置、电子设备和存储介质进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A method, device, electronic device, and storage medium for testing an image rendering effect provided by the embodiments of the present invention have been described above in detail. Specific examples are used in this paper to illustrate the principles and implementations of the present invention. The description is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific embodiments and application scope. In summary, The contents of this specification should not be construed as limiting the present invention.

Claims (10)

CN202210068320.5A2022-01-202022-01-20Image rendering effect testing method and device, electronic equipment and storage mediumPendingCN114510417A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202210068320.5ACN114510417A (en)2022-01-202022-01-20Image rendering effect testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210068320.5ACN114510417A (en)2022-01-202022-01-20Image rendering effect testing method and device, electronic equipment and storage medium

Publications (1)

Publication NumberPublication Date
CN114510417Atrue CN114510417A (en)2022-05-17

Family

ID=81549838

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210068320.5APendingCN114510417A (en)2022-01-202022-01-20Image rendering effect testing method and device, electronic equipment and storage medium

Country Status (1)

CountryLink
CN (1)CN114510417A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115586915A (en)*2022-10-132023-01-10北京沃东天骏信息技术有限公司 Rendering Service Upgrading Method, Device, Equipment, and Computer-Readable Storage Medium
CN117635802A (en)*2023-12-132024-03-01摩尔线程智能科技(北京)有限责任公司Rendering test method and device of display card, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108154497A (en)*2017-12-052018-06-12北京掌行通信息技术有限公司A kind of automated detection method and system for illustrating road conditions
CN108629795A (en)*2017-03-172018-10-09高德软件有限公司A kind of mileage chart chip detection method and device
CN110033510A (en)*2019-03-252019-07-19阿里巴巴集团控股有限公司Color mapping relationship is established for correcting the method and device of rendering color of image
CN113313804A (en)*2021-06-232021-08-27深圳Tcl新技术有限公司Image rendering method and device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108629795A (en)*2017-03-172018-10-09高德软件有限公司A kind of mileage chart chip detection method and device
CN108154497A (en)*2017-12-052018-06-12北京掌行通信息技术有限公司A kind of automated detection method and system for illustrating road conditions
CN110033510A (en)*2019-03-252019-07-19阿里巴巴集团控股有限公司Color mapping relationship is established for correcting the method and device of rendering color of image
CN113313804A (en)*2021-06-232021-08-27深圳Tcl新技术有限公司Image rendering method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115586915A (en)*2022-10-132023-01-10北京沃东天骏信息技术有限公司 Rendering Service Upgrading Method, Device, Equipment, and Computer-Readable Storage Medium
CN117635802A (en)*2023-12-132024-03-01摩尔线程智能科技(北京)有限责任公司Rendering test method and device of display card, electronic equipment and storage medium

Similar Documents

PublicationPublication DateTitle
CN106502703B (en)Function calling method and device
CN107172671B (en) A channel switching method, device, storage medium and terminal
CN108039963B (en)Container configuration method and device and storage medium
CN112257135A (en)Model loading method and device based on multithreading, storage medium and terminal
CN104978176A (en)Application program interface calling method and device
US20150163280A1 (en)Method and device for downloading file
CN109062468B (en) Split-screen display method, device, storage medium and electronic device
CN109067981B (en) Split-screen application switching method, device, storage medium and electronic device
CN108984142B (en) Split-screen display method, device, storage medium and electronic device
WO2018006841A1 (en)Qr code information transmission method, device and apparatus
CN108920086B (en)Split screen quitting method and device, storage medium and electronic equipment
CN106126411A (en)A kind of method and apparatus that tested program code is tested
CN106528335A (en) A data backup method, device and terminal
CN113313804A (en)Image rendering method and device, electronic equipment and storage medium
CN108932094A (en)Split screen application switching method and device, storage medium and electronic equipment
EP2869604A1 (en)Method, apparatus and device for processing a mobile terminal resource
CN114510417A (en)Image rendering effect testing method and device, electronic equipment and storage medium
CN107734618B (en)Application program closing method and device, storage medium and electronic equipment
CN117435109A (en)Content display method and device and computer readable storage medium
CN107463395B (en)Component calling method and device
CN112749074A (en)Test case recommendation method and device
CN108269223B (en)Webpage graph drawing method and terminal
CN115878457A (en)Test data verification method and device, electronic equipment and storage medium
CN115576942A (en)Data processing method, device, equipment and storage medium
CN115589432A (en)Message push management method, device, medium and equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp