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
CN114510417A CN202210068320.5A CN202210068320A CN114510417A CN 114510417 A CN114510417 A CN 114510417A CN 202210068320 A CN202210068320 A CN 202210068320A CN 114510417 A CN114510417 A CN 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 Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN202210068320.5A priority Critical patent/CN114510417A/en
Publication of CN114510417A publication Critical patent/CN114510417A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention discloses a method and a device for testing image rendering effect, electronic equipment and a storage medium; according to the embodiment of the invention, based on a rendering code file needing to be subjected to a rendering effect test, an image to be rendered is rendered to obtain a test rendering image, a reference rendering image is obtained, the reference rendering image is an image obtained by adding a target rendering effect of the rendering code file to the image to be rendered, the test rendering image is compared with the reference rendering image to obtain an image comparison result, and the test result of the rendering code file is determined according to the image comparison result; in the test process, the test rendering image to be tested is compared with the reference rendering image with the target rendering effect to determine the test result, so that the requirement on manpower resources in the image rendering effect test process can be reduced, the image rendering effect test cost is saved, and the image rendering effect test speed and accuracy are improved.

Description

Image rendering effect testing method and device, electronic equipment and storage medium
Technical Field
The invention relates to the field of image processing, in particular to an image rendering effect testing method and device, electronic equipment and a storage medium.
Background
With the rapid development of science and technology, the processing application for various pictures or videos is increasing. In order to ensure that all users have consistent experience in the process of using the picture or video processing application, developers of application programs need to keep the stability of image or video rendering effects in the processes of parallel development and high-speed version iteration.
Currently, when a rendering effect is tested, the rendering effect and the rendering quality of a rendered image or video are generally determined through manual testing. However, by adopting the testing mode, the demand on manpower resources is high, the manual testing consumes a long time, and the accuracy of the rendering effect testing is not easy to guarantee.
Disclosure of Invention
The embodiment of the invention provides an image rendering effect testing method and device, electronic equipment and a storage medium, which can reduce the requirement on manpower resources in the image rendering effect testing process, save the image rendering effect testing cost and improve the image rendering effect testing speed and accuracy.
The embodiment of the invention provides a method for testing image rendering effect, which comprises the following steps:
rendering an image to be rendered based on a rendering code file needing to be subjected to a rendering effect test to obtain a test rendering image;
acquiring a reference rendering image, wherein the reference rendering image is an image obtained by adding the target rendering effect of the rendering code file to the image to be rendered;
comparing the test rendering image with the reference rendering image to obtain an image comparison result;
and determining a test result of the rendering code file according to the image comparison result.
Correspondingly, an embodiment of the present invention provides an image rendering effect testing apparatus, including:
the first image acquisition unit is used for rendering an image to be rendered based on a rendering code file needing rendering effect testing to obtain a testing rendering image;
a second image obtaining unit, configured to obtain a reference rendering image, where the reference rendering image is an image obtained by adding a target rendering effect of the rendering code file to the image to be rendered;
the image comparison unit is used for comparing the test rendering image with the reference rendering image to obtain an image comparison result;
and the test result determining unit is used for determining the test result of the rendering code file according to the image comparison result.
Optionally, the image comparison unit is configured to calculate a difference between each test pixel point in the test rendered image and a corresponding pixel point in the reference rendered image, so as to obtain a pixel difference corresponding to each test pixel point;
constructing a difference image based on each pixel difference value;
and calculating the pixel mean square error of the difference image, and obtaining an image comparison result according to the pixel mean square error.
Optionally, the image comparison unit is configured to obtain an image comparison result with which an image comparison passes if the pixel mean square error is not greater than a preset comparison threshold;
and if the pixel mean square error is smaller than the preset contrast threshold value, obtaining an image contrast result of which the image contrast fails.
Optionally, the image to be rendered is a video frame in a video to be rendered, and the video to be rendered includes at least two video frames;
correspondingly, the first image obtaining unit is used for rendering each video frame of the video to be rendered based on the rendering code file which needs to be subjected to the rendering effect test to obtain a test rendering video;
and determining one video frame from each video frame of the test rendering video as a test rendering image.
Optionally, the reference rendered image is a reference video frame in a reference rendered video, the reference rendered video includes at least two reference video frames, and the reference rendered video is a video obtained by adding a target rendering effect of the rendering code file to the video to be rendered;
correspondingly, the second image obtaining unit is configured to obtain a reference rendered video;
determining a target frame position of the test rendered image in the test rendered video;
and acquiring a reference video frame corresponding to the target frame position from the reference rendering video as a reference rendering image.
Optionally, the image rendering effect testing apparatus provided in the embodiment of the present invention further includes a circular comparison unit, configured to determine, if the image comparison result is that the image comparison is passed, one video frame from among the video frames that are not compared in the test rendering video as a new test rendering image;
determining a target frame position of the new test rendered image in the test rendered video;
acquiring a reference video frame corresponding to the target frame position from the reference rendering video as a reference rendering image;
and returning to the step of comparing the test rendering image with the reference rendering image to obtain an image comparison result until all the video frames in the test rendering video are compared or the image comparison result of any one video frame is that the image comparison is not passed.
Optionally, the reference rendered video is a part of candidate rendered videos, where the candidate rendered videos include videos corresponding to at least two different rendering effects;
correspondingly, the second image obtaining unit is configured to determine, according to a target rendering effect of the rendering code file, the video corresponding to the target rendering effect from the candidate rendering videos;
and acquiring the video corresponding to the target rendering effect as a reference rendering video from the video position of the video corresponding to the target rendering effect.
Correspondingly, the embodiment of the invention also provides the electronic equipment, which comprises a memory and a processor; the memory stores an application program, and the processor is used for running the application program in the memory to execute the steps in any image rendering effect test method provided by the embodiment of the invention.
In addition, the embodiment of the present invention further provides a storage medium, where the storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to perform any step in the image rendering effect testing method provided by the embodiment of the present invention.
By adopting the scheme of the embodiment of the invention, the image to be rendered can be rendered based on the rendering code file which needs to be subjected to the rendering effect test to obtain the test rendering image, the reference rendering image is obtained and is the image obtained after the target rendering effect of the rendering code file is added to the image to be rendered, the test rendering image is compared with the reference rendering image to obtain the image comparison result, and the test result of the rendering code file is determined according to the image comparison result; in the test process, the test rendering image to be tested is compared with the reference rendering image with the target rendering effect to determine the test result, so that the requirement on manpower resources in the image rendering effect test process can be reduced, the image rendering effect test cost is saved, and the image rendering effect test speed and accuracy are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a scene schematic diagram of an image rendering effect testing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for testing image rendering effects according to an embodiment of the present invention;
FIG. 3 is another flowchart illustrating an image rendering effect testing method according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an image rendering effect testing apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an image rendering effect testing apparatus according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating an image rendering effect testing module in a terminal according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides an image rendering effect testing method and device, electronic equipment and a storage medium. Specifically, the embodiment of the present invention provides an image rendering effect testing method suitable for an image rendering effect testing apparatus, which may be integrated in an electronic device.
The electronic device may be a terminal or other devices, including but not limited to a mobile terminal and a fixed terminal, for example, the mobile terminal includes but is not limited to a smart phone, a smart watch, a tablet computer, a notebook computer, a smart car, and the like, wherein the fixed terminal includes but is not limited to a desktop computer, a smart appliance such as a smart television, and the like.
The electronic device may also be a device such as a server, and the server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, middleware service, a domain name service, a security service, a CDN, and a big data and artificial intelligence platform, but is not limited thereto.
The image rendering effect testing method of the embodiment of the invention can be realized by the terminal, and can also be realized by the terminal and the server together.
The method is described below by taking an example that the terminal and the server realize the image rendering effect test method together.
As shown in fig. 1, the image rendering effect testing system provided by the embodiment of the present invention includes a terminal 10, a server 20, and the like; the terminal 10 and the server 20 are connected via a network, for example, a wired or wireless network connection, wherein the terminal 10 may exist as a terminal for sending an image rendering effect test request to the server 20.
Among them, the terminal 10 may be a terminal that generates an image rendering effect test request for transmitting the image rendering effect test request to the server 20.
The server 20 may be configured to store the rendering code file, and after receiving the image rendering effect test request sent by the terminal 10, may 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.
The terminal 10 may be configured to render an image to be rendered based on a rendering code file for which a rendering effect test is required, obtain a test rendering image, obtain a reference rendering image, compare the test rendering image with the reference rendering image to obtain an image comparison result, and determine a test result of the rendering code file according to the image comparison result.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
The embodiment of the present invention will be described from the perspective of an image rendering effect test apparatus, which may be specifically integrated in a terminal.
As shown in fig. 2, a specific flow of the image rendering effect testing method of the present embodiment may be as follows:
201. and rendering the image to be rendered based on the rendering code file needing to be subjected to the rendering effect test to obtain a test rendering image.
In some examples of the embodiment of the present invention, the rendering code file may be a code file written by a technician for an image rendering effect test requirement, and it may be understood that the rendering code file may include not only a program code that can be executed, but also rendering information that is required during an image rendering effect test, and the like.
It can be understood that a skilled person may generate rendering code files corresponding to different image effects in advance according to the different image effects.
The rendering information may be information required in the image rendering effect test process, such as which range, which position, what time point and/or what color is displayed in the display area of the terminal, and the like.
And the image to be rendered is an image which is not rendered by the rendering code file. It is understood that the image to be rendered may be rendered by another rendering code file before testing, which is not limited in the embodiment of the present invention.
It can be understood that, the rendering code file may also render the video, at this time, the image to be rendered is a video frame in the video to be rendered, the video to be rendered includes at least two video frames, and the step "rendering the image to be rendered based on the rendering code file requiring the rendering effect test to obtain the test rendering image" includes:
rendering each video frame of a video to be rendered based on a rendering code file needing to be subjected to a rendering effect test to obtain a test rendering video;
and determining one video frame from each video frame of the test rendering video as a test rendering image.
Specifically, when determining the test rendering image, any video frame may be determined as the test rendering image, or a video frame whose rendering is completed may be determined as the test rendering image from the test rendering video.
The rendering architecture of the video may be as shown in fig. 3: the method mainly comprises a UI interaction layer, a rendering engine layer and a three-party SDK layer. Among them, the UI interaction layer has a main role to take charge of interaction with the user and record the user's operation in the draft of the rendering engine layer. The rendering engine layer mainly comprises a rendering engine and a draft: the rendering engine is responsible for construction of the rendering chain, rendering of the rendering chain and the like, and the draft is mainly data record of operation of the UI interaction layer and is responsible for data interaction between the UI and the rendering engine. The three-party SDK layer is mainly some rendering related algorithms, and is accessed into a rendering chain through a rendering engine to realize a rendering effect.
The common constructed rendering chain mainly comprises rendering links such as texture input, background replacement, facial beautification, filter and the like.
202. And acquiring a reference rendering image, wherein the reference rendering image is an image obtained by adding the target rendering effect of the rendering code file to the image to be rendered.
The target rendering effect may be a rendering effect that a user or a technician specifies that an image and/or video displayed on the terminal has, for example, a special effect that the image a is set at an edge of the image and a lighting effect is added to the edge of the image, the target rendering effect is that the edge of the image has a lighting effect, and so on.
Specifically, an application program before version iteration may be adopted to render an image to be rendered or a video to be rendered, so as to obtain a reference rendered image or a reference rendered video.
It can be understood that the rendering code file may also render a video, where a reference rendering image is a reference video frame in a reference rendering video, the reference rendering video includes at least two reference video frames, and the reference rendering video is a video obtained by adding a target rendering effect of the rendering code file to the video to be rendered.
Correspondingly, the step "acquiring a reference rendering image" may specifically include:
acquiring a reference rendering video;
determining a target frame position of the test rendered image in the test rendered video;
and acquiring a reference video frame corresponding to the target frame position from the reference rendering video as a reference rendering image.
The target frame position may be obtained for the frame number in the test rendering video according to the test rendering image, or the target frame position may be determined according to a time point of the test rendering image in the test rendering video.
Taking the comparison of the beauty rendering effects as an example, when the rendering chain renders to a beauty node, the video frame (Ft) at the current time point t in the test rendering video can be read out as a reference rendering image according to the corresponding time t of the test rendering image obtained by the current rendering. And after the beauty node is rendered, comparing the rendered beauty frame (test rendering image) with the reference rendering image.
In the actual application process, a technician can simulate, manually or by scripts, in a stable version of the processing application, a user to add various effects to the video, and then generate a candidate rendered video processed by one or more rendering nodes. The candidate rendered videos may be packaged and placed into the server. After a developer submits a code, the server is activated, the server compiles an APP according to the current code, reads in a video to be rendered and a candidate rendering video which are prepared in advance, runs the APP, and compares an effect file (test rendering video) generated by each rendering effect with an effect video file (reference rendering video) corresponding to the pre-generated rendering effect in the server.
That is, the reference rendered video may be a part of candidate rendered videos including the videos corresponding to at least two different rendering effects;
the obtaining of the reference rendered video comprises:
according to the target rendering effect of the rendering code file, determining the video corresponding to the target rendering effect from the candidate rendering videos;
and acquiring the video corresponding to the target rendering effect as a reference rendering video from the video position of the video corresponding to the target rendering effect.
The candidate rendered video may be a video file, in this case, the reference rendered video may be a segment of video in the candidate rendered video, and the video position is a position of the reference rendered video in the candidate rendered video. Alternatively, the candidate rendered video may be a set of a plurality of video files, in this case, the reference rendered video may be one of the candidate rendered videos, and the video position may be a storage position of the reference rendered video.
203. And comparing the test rendering image with the reference rendering image to obtain an image comparison result.
The comparison mode can be that the test rendering image and the reference rendering image are compared one by one, the proportion of the matched pixel points to the total pixel points is calculated, and the image comparison result is obtained according to the proportion.
Or, the step of comparing the test rendering image with the reference rendering image to obtain an image comparison result may specifically include:
calculating difference values of each test pixel point in the test rendering image and corresponding pixel points in the reference rendering image respectively to obtain a pixel difference value corresponding to each test pixel point;
constructing a difference image based on each pixel difference value;
and calculating the pixel mean square error of the difference image, and obtaining an image comparison result according to the pixel mean square error.
In some alternative examples, the width and height of the difference image may be reduced by 10 times to improve the computational efficiency. And then calculating the pixel mean square error of the reduced difference image.
The step of obtaining an image comparison result according to the pixel mean square error may specifically include:
if the pixel mean square error is not larger than a preset contrast threshold value, obtaining an image contrast result of passing the image contrast;
and if the pixel mean square error is smaller than the preset contrast threshold value, obtaining an image contrast result of which the image contrast fails.
That is, the mean square error can be compared to a given threshold, and if the mean square error is less than the given threshold, it indicates that the current image is consistent, otherwise the image is not the same.
After the step of comparing the test rendering image with the reference rendering image to obtain an image comparison result, the method for testing the image rendering effect provided by the embodiment of the present invention may further include:
if the image comparison result is that the image comparison is passed, determining a video frame from each video frame which is not compared in the test rendering video as a new test rendering image;
determining a target frame position of the new test rendered image in the test rendered video;
acquiring a reference video frame corresponding to the target frame position from the reference rendering video as a reference rendering image;
and returning to the step of comparing the test rendering image with the reference rendering image to obtain an image comparison result until all the video frames in the test rendering video are compared or the image comparison result of any one video frame is that the image comparison is not passed.
In the embodiment of the present invention, for example, as shown in fig. 4, a comparison of a single-node rendering result may be performed for each rendering effect, for example, when a background node is compared, a background node rendering result is obtained after a material is rendered by the background node, then the result is compared with a video frame of a video stored in the background node at a corresponding time point, and if two video frames are consistent, a next-node rendering comparison is performed until the result is completed. If any of the comparison results are inconsistent, the test may be terminated.
204. And determining a test result of the rendering code file according to the image comparison result.
If any comparison result is inconsistent, the operation is stopped, and the server can inform the person submitting the codes of the nodes with problems and prevent the codes from being merged. If the comparison results of all the nodes are consistent, the currently submitted code is incorporated into the code backbone.
As can be seen from the above, in the embodiment of the present invention, based on a rendering code file for which a rendering effect test is required, rendering an image to be rendered to obtain a test rendering image, and obtaining a reference rendering image, where the reference rendering image is an image obtained by adding a target rendering effect of the rendering code file to the image to be rendered, comparing the test rendering image with the reference rendering image to obtain an image comparison result, and determining a test result of the rendering code file according to the image comparison result; in the test process, the test rendering image to be tested is compared with the reference rendering image with the target rendering effect to determine the test result, so that the requirement on manpower resources in the image rendering effect test process can be reduced, the image rendering effect test cost is saved, and the image rendering effect test speed and accuracy are improved.
In order to better implement the method, correspondingly, the embodiment of the invention also provides an image rendering effect testing device.
Referring to fig. 5, an image rendering effect testing apparatus provided in an embodiment of the present invention may include:
the first image obtaining unit 501 may be configured to render an image to be rendered based on a rendering code file that needs to be subjected to a rendering effect test, so as to obtain a test rendering image;
a second image obtaining unit 502, configured to obtain a reference rendering image, where the reference rendering image is an image obtained by adding a target rendering effect of the rendering code file to the image to be rendered;
an image comparison unit 503, configured to compare the test rendering image with the reference rendering image to obtain an image comparison result;
the test result determining unit 504 may be configured to determine a test result of the rendering code file according to the image comparison result.
In some optional embodiments, the image comparing unit 503 may be configured to calculate a difference between each test pixel point in the test rendered image and a corresponding pixel point in the reference rendered image, so as to obtain a pixel difference corresponding to each test pixel point;
constructing a difference image based on each pixel difference value;
and calculating the pixel mean square error of the difference image, and obtaining an image comparison result according to the pixel mean square error.
In some optional embodiments, the image comparison unit 503 may be configured to obtain an image comparison result with passed image comparison if the mean square error of the pixels is not greater than a preset comparison threshold;
and if the pixel mean square error is smaller than the preset contrast threshold value, obtaining an image contrast result of which the image contrast fails.
In some optional embodiments, the image to be rendered is a video frame in a video to be rendered, and the video to be rendered includes at least two video frames;
correspondingly, the first image obtaining unit 501 may be configured to render each video frame of a video to be rendered based on a rendering code file that needs to be subjected to a rendering effect test, so as to obtain a test rendering video;
and determining one video frame from each video frame of the test rendering video as a test rendering 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 reference video frames, and the reference rendered video is a video obtained by adding a target rendering effect of the rendering code file to the video to be rendered;
correspondingly, the second image obtaining unit 502 may be configured to obtain a reference rendered video;
determining a target frame position of the test rendered image in the test rendered video;
and acquiring a reference video frame corresponding to the target frame position from the reference rendering video as a reference rendering image.
In some optional embodiments, as shown in fig. 6, the image rendering effect testing apparatus according to the embodiment of the present invention may further include a circular contrast unit 505, configured to determine, if the image contrast result is that the image contrast passes, one of the video frames in the test rendered video that is not compared as a new test rendered image;
determining a target frame position of the new test rendered image in the test rendered video;
acquiring a reference video frame corresponding to the target frame position from the reference rendering video as a reference rendering image;
and returning to the step of comparing the test rendering image with the reference rendering image to obtain an image comparison result until all the video frames in the test rendering video are compared or the image comparison result of any one video frame is that the image comparison is not passed.
In some optional embodiments, the reference rendered video is a part of candidate rendered videos, and the candidate rendered videos may include the videos corresponding to at least two different rendering effects;
correspondingly, the second image obtaining unit 502 may be configured to determine, according to a target rendering effect of the rendering code file, the video corresponding to the target rendering effect from the candidate rendering videos;
and acquiring the video corresponding to the target rendering effect as a reference rendering video from the video position of the video corresponding to the target rendering effect.
As can be seen from the above, by the image rendering effect testing device, based on a rendering code file to be subjected to a rendering effect test, rendering an image to be rendered to obtain a test rendering image, and obtaining a reference rendering image, where the reference rendering image is an image obtained by adding a target rendering effect of the rendering code file to the image to be rendered, comparing the test rendering image with the reference rendering image to obtain an image comparison result, and determining a test result of the rendering code file according to the image comparison result; in the test process, the test rendering image to be tested is compared with the reference rendering image with the target rendering effect to determine the test result, so that the requirement on manpower resources in the image rendering effect test process can be reduced, the image rendering effect test cost is saved, and the image rendering effect test speed and accuracy are improved.
In addition, an embodiment of the present invention further provides an electronic device, where the electronic device may be a terminal or a server, and as shown in fig. 7, a schematic structural diagram of the electronic device according to the embodiment of the present invention is shown, specifically:
the electronic device may include Radio Frequency (RF) circuitry 901, memory 902 including one or more computer-readable storage media, input unit 903, display unit 904, sensor 905, audio circuitry 906, Wireless Fidelity (WiFi) module 907, processor 908 including one or more processing cores, and power supply 909. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 7 does not constitute a limitation of the electronic device and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. Wherein:
RF circuit 901 may be used for receiving and transmitting signals during a message transmission or communication process, and in particular, for receiving downlink information from a base station and then processing the received downlink information by one or more processors 908; in addition, data relating to uplink is transmitted to the base station. In general, the RF 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), a duplexer, and the like. In addition, the RF circuit 901 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), and the like.
The memory 902 may be used to store software programs and modules, and the processor 908 executes various functional applications and data processing by operating the software programs and modules stored in the memory 902. The memory 902 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the electronic device, and the like. Further, the 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, the memory 902 may also include a memory controller to provide access to the memory 902 by the processor 908 and the input unit 903.
The input unit 903 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, the input unit 903 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 908, and receives and executes commands from the processor 908. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 903 may include other input devices in addition to a touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 904 may be used to display information input by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 904 may include a Display panel, and may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is communicated to the processor 908 to determine the type of touch event, and the processor 908 provides a corresponding visual output on the display panel according to the type of touch event. Although in FIG. 7 the touch-sensitive surface and the display panel are two separate components to implement input and output functions, in some embodiments the touch-sensitive surface may be integrated with the display panel to implement input and output functions.
The electronic device may also include at least one sensor 905, such as light sensors, motion sensors, and other sensors. In particular, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the electronic device is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured to the electronic device, detailed descriptions thereof are omitted.
Audio circuitry 906, a speaker, and a microphone may provide an audio interface between a user and the electronic device. The audio circuit 906 may transmit the electrical signal converted from the received audio data to a speaker, and the electrical signal is converted into a sound signal by the speaker and output; on the other hand, the microphone converts the collected sound signal into an electric signal, which is received by the audio circuit 906 and converted into audio data, which is then processed by the audio data output processor 908, and then transmitted to, for example, another electronic device via the RF circuit 901, or the audio data is output to the memory 902 for further processing. The audio circuitry 906 may also include an earbud jack to provide communication of a peripheral headset with the electronic device.
WiFi belongs to short-distance wireless transmission technology, and the electronic equipment can help a user to receive and send emails, browse webpages, access streaming media and the like through the WiFi module 907, and provides wireless broadband internet access for the user. Although fig. 7 shows the WiFi module 907, it is understood that it does not belong to the essential constitution of the electronic device, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 908 is a control center of the electronic device, connects various parts of the entire cellular phone using various interfaces and lines, and performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 902 and calling data stored in the memory 902, thereby performing overall monitoring of the cellular phone. Optionally, processor 908 may include one or more processing cores; preferably, the processor 908 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It is to be appreciated that the modem processor described above may not be integrated into processor 908.
The electronic device also includes a power supply 909 (e.g., a battery) that provides power to the various components, which may preferably be logically coupled to the processor 908 via a power management system, such that the functions of managing charging, discharging, and power consumption are performed via the power management system. The power supply 909 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the electronic device may further include a camera, a bluetooth module, and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 908 in the electronic device loads an executable file corresponding to a process of one or more application programs into the memory 902 according to the following instructions, and the processor 908 runs the application programs stored in the memory 902, thereby implementing various functions as follows:
rendering an image to be rendered based on a rendering code file needing to be subjected to a rendering effect test to obtain a test rendering image;
acquiring a reference rendering image, wherein the reference rendering image is an image obtained by adding a target rendering effect of the rendering code file to the image to be rendered;
comparing the test rendering image with the reference rendering image to obtain an image comparison result;
and determining a test result of the rendering code file according to the image comparison result.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the embodiment of the present invention provides a storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the image rendering effect testing methods provided by the embodiments of the present invention. For example, the instructions may perform the steps of:
rendering an image to be rendered based on a rendering code file needing to be subjected to a rendering effect test to obtain a test rendering image;
acquiring a reference rendering image, wherein the reference rendering image is an image obtained by adding a target rendering effect of the rendering code file to the image to be rendered;
comparing the test rendering image with the reference rendering image to obtain an image comparison result;
and determining a test result of the rendering code file according to the image comparison result.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any image rendering effect test method provided by the embodiment of the present invention, the beneficial effects that can be achieved by any image rendering effect test method provided by the embodiment of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
According to an aspect of the application, there is also provided a computer program product or a 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 method provided in the various alternative implementations in the above embodiments.
The image rendering effect testing method, the image rendering effect testing device, the electronic device and the storage medium provided by the embodiment of the invention are described in detail, a specific example is applied in the text to explain the principle and the implementation of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. An image rendering effect testing method is characterized by comprising the following steps:
rendering an image to be rendered based on a rendering code file needing to be subjected to a rendering effect test to obtain a test rendering image;
acquiring a reference rendering image, wherein the reference rendering image is an image obtained by adding a target rendering effect of the rendering code file to the image to be rendered;
comparing the test rendering image with the reference rendering image to obtain an image comparison result;
and determining a test result of the rendering code file according to the image comparison result.
2. The method for testing image rendering effect according to claim 1, wherein the comparing the test rendering image with the reference rendering image to obtain an image comparison result comprises:
calculating difference values of each test pixel point in the test rendering image and corresponding pixel points in the reference rendering image respectively to obtain a pixel difference value corresponding to each test pixel point;
constructing a difference image based on each pixel difference value;
and calculating the pixel mean square error of the difference image, and obtaining an image comparison result according to the pixel mean square error.
3. The method for testing image rendering effect according to claim 2, wherein the obtaining an image comparison result according to the pixel mean square error comprises:
if the pixel mean square error is not larger than a preset contrast threshold value, obtaining an image contrast result of passing the image contrast;
and if the pixel mean square error is smaller than the preset contrast threshold value, obtaining an image contrast result of which the image contrast fails.
4. The image rendering effect testing method according to claim 1, wherein the image to be rendered is a video frame in a video to be rendered, and the video to be rendered includes at least two video frames;
the method for rendering the image to be rendered based on the rendering code file needing to be subjected to the rendering effect test to obtain the test rendering image comprises the following steps of:
rendering each video frame of a video to be rendered based on a rendering code file needing to be subjected to a rendering effect test to obtain a test rendering video;
and determining one video frame from each video frame of the test rendering video as a test rendering image.
5. The image rendering effect testing method according to claim 4, wherein the reference rendered image is a reference video frame in a reference rendered video, the reference rendered video includes at least two reference video frames, and the reference rendered video is a video obtained by adding a target rendering effect of the rendering code file to the video to be rendered;
the acquiring a reference rendered image includes:
acquiring a reference rendering video;
determining a target frame position of the test rendered image in the test rendered video;
and acquiring a reference video frame corresponding to the target frame position from the reference rendering video as a reference rendering image.
6. The method for testing image rendering effect according to claim 5, wherein after comparing the test rendering image with the reference rendering image to obtain an image comparison result, the method further comprises:
if the image comparison result is that the image comparison is passed, determining a video frame from each video frame which is not compared in the test rendering video as a new test rendering image;
determining a target frame position of the new test rendered image in the test rendered video;
acquiring a reference video frame corresponding to the target frame position from the reference rendering video as a reference rendering image;
and returning to the step of comparing the test rendering image with the reference rendering image to obtain an image comparison result until all the video frames in the test rendering video are compared or the image comparison result of any one video frame is that the image comparison is not passed.
7. The image rendering effect testing method according to claim 5, wherein the reference rendered video is a part of candidate rendered videos, and the candidate rendered videos include the videos corresponding to at least two different rendering effects;
the obtaining of the reference rendered video comprises:
according to the target rendering effect of the rendering code file, determining the video corresponding to the target rendering effect from the candidate rendering videos;
and acquiring the video corresponding to the target rendering effect as a reference rendering video from the video position of the video corresponding to the target rendering effect.
8. An image rendering effect testing apparatus, comprising:
the first image acquisition unit is used for rendering an image to be rendered based on a rendering code file needing to be subjected to rendering effect testing to obtain a testing rendering image;
a second image obtaining unit, configured to obtain a reference rendering image, where the reference rendering image is an image obtained by adding a target rendering effect of the rendering code file to the image to be rendered;
the image comparison unit is used for comparing the test rendering image with the reference rendering image to obtain an image comparison result;
and the test result determining unit is used for determining the test result of the rendering code file according to the image comparison result.
9. An electronic device comprising a memory and a processor; the memory stores an application program, and the processor is configured to execute the application program in the memory to perform the steps of the image rendering effect testing method according to any one of claims 1 to 7.
10. A storage medium storing instructions adapted to be loaded by a processor to perform the steps of the image rendering effect testing method according to any one of claims 1 to 7.
CN202210068320.5A 2022-01-20 2022-01-20 Image rendering effect testing method and device, electronic equipment and storage medium Pending CN114510417A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210068320.5A CN114510417A (en) 2022-01-20 2022-01-20 Image rendering effect testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210068320.5A CN114510417A (en) 2022-01-20 2022-01-20 Image rendering effect testing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114510417A true CN114510417A (en) 2022-05-17

Family

ID=81549838

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210068320.5A Pending CN114510417A (en) 2022-01-20 2022-01-20 Image rendering effect testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114510417A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117635802A (en) * 2023-12-13 2024-03-01 摩尔线程智能科技(北京)有限责任公司 Rendering test method and device of display card, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117635802A (en) * 2023-12-13 2024-03-01 摩尔线程智能科技(北京)有限责任公司 Rendering test method and device of display card, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN104978176B (en) Application programming interfaces call method, device and computer readable storage medium
CN104852885B (en) Method, device and system for verifying verification code
WO2018077041A1 (en) Method and apparatus for running application
CN110020293B (en) Multimedia data display method, device and storage medium
WO2018006841A1 (en) Qr code information transmission method, device and apparatus
CN107666406B (en) Intelligent card display method and device
CN103390034A (en) Image display method, device, terminal and server
CN113313804B (en) Image rendering method and device, electronic equipment and storage medium
CN105227598B (en) Resource sharing method, device and system based on cloud storage
CN107734618B (en) Application program closing method and device, storage medium and electronic equipment
CN112749074B (en) Test case recommending method and device
US20160119695A1 (en) Method, apparatus, and system for sending and playing multimedia information
CN114510417A (en) Image rendering effect testing method and device, electronic equipment and storage medium
CN116594616A (en) Component configuration method and device and computer readable storage medium
CN108920086B (en) Split screen quitting method and device, storage medium and electronic equipment
CN105320532B (en) Method, device and terminal for displaying interactive interface
CN111177612A (en) Method and related device for authenticating page login
CN106341436B (en) Method and device for detecting acceleration effect
CN108269223B (en) Webpage graph drawing method and terminal
CN108829600B (en) Method and device for testing algorithm library, storage medium and electronic equipment
CN113012267A (en) Method and related device for testing special effect animation
CN111475141A (en) List generation method and device and electronic equipment
CN108959073B (en) Method and device for testing algorithm library, storage medium and electronic equipment
CN111966271B (en) Screen panorama screenshot method and device, terminal equipment and storage medium
CN104866287B (en) Method and device for generating function bar

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination