Click response duration test method and device, electronic equipment, storage medium and program product
By connecting the screen clicker in parallel with the light emitting diode and automatically identifying the time point when the click is completed using camera and image processing technology, the accuracy and efficiency problems caused by manual participation in the existing technology are solved, and high-precision and high-efficiency clicks are achieved Response duration test.
Patent Information
- Application Number
- CN202411595220.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2044-11-08
AI Technical Summary
The prior art requires manual participation when the test click response time is long, resulting in poor accuracy and low testing efficiency.
By connecting the screen clicker with the light emitting diode in parallel and shooting the light emitting diode with the camera, combining image processing technology to automatically identify the time point when the click is completed, and calculate the click response time.
The accuracy and efficiency of the test are improved, and the automation finds the time point when the click is completed, which is greatly improved compared to the test efficiency of manual testing. The use of high-speed cameras can increase the test accuracy to an error of less than 10ms.
Smart Images

Figure CN119493717A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of terminal devices, and in particular to a method, device, electronic device, storage medium and program product for testing click response duration. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the disclosure that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.
[0003] A touch screen terminal device is a device that integrates touch screen technology, allowing users to interact with the device by directly touching the screen.
[0004] Click operation is one of the main operations of touch screen interaction. For electronic games or applications, the click response time is the operation experience that users can directly feel, and it is also an important indicator for user interaction experience testing.
[0005] In the related art, when testing the click response time, human participation is usually required in many links to complete it.
[0006] However, manual participation may result in poor accuracy in testing the click response duration, for example, poor accuracy in determining the time point when the manual click operation leaves the touch screen, and low test efficiency. Summary of the invention
[0007] In view of this, the purpose of the present disclosure is to provide a method, device, electronic device, storage medium and program product for testing click response duration, which at least solve one of the technical problems in the related art to a certain extent.
[0008] Based on the above purpose, the first aspect of the exemplary embodiment of the present disclosure provides a method for testing click response duration, including:
[0009] A screen clicker is connected in parallel with a light emitting diode and then connected in series with a switch and a power supply, a screen to be tested is placed within the operating range of the screen clicker, and a preset pattern including two colors is placed within a preset range around the light emitting diode;
[0010] Acquire a first image when the switch is closed and a second image when the switch is open, wherein both the first image and the second image contain the light-emitting diode and the preset pattern, cluster the first image, and obtain a first cluster center, a second cluster center, and a third cluster center based on the preset pattern, cluster the second image, and obtain a fourth cluster center based on the preset pattern;
[0011] Controlling the switch to be closed until the screen clicker completes clicking and the screen to be tested completes clicking response, controlling the switch to be opened, and acquiring a video from closing the switch to opening the switch, wherein the video includes the light-emitting diode, the preset pattern, and the screen to be tested;
[0012] For each frame image in the video, clustering the pixels of the frame image based on the first cluster center, the second cluster center, the third cluster center and the fourth cluster center, determining the total number of pixels of the frame image, the number of third pixels clustered to the third cluster center, the number of light-emitting diode pixels of the light-emitting diode in the second image and the number of preset pattern pixels of the preset pattern, so as to determine the light-emitting state of the light-emitting diode in the frame image;
[0013] Traverse each frame image in the video, determine the starting frame image and the starting time point of the click based on the lighting state of the light-emitting diode, traverse all frame images after the starting frame image, and determine the time point when the click response is completed based on the difference value between adjacent frame images, and use the time difference between the time point when the click response is completed and the starting time point of the click as the click response duration.
[0014] Based on the same inventive concept, a second aspect of the exemplary embodiment of the present disclosure provides a test device for click response duration, comprising:
[0015] A test scenario construction module is configured to connect a screen clicker in parallel with a light emitting diode and then in series with a switch and a power supply, place a screen to be tested within an operating range of the screen clicker, and place a preset pattern including two colors within a preset range around the light emitting diode;
[0016] a cluster center determination module, configured to obtain a first image when the switch is closed and a second image when the switch is open, wherein the first image and the second image both contain the light-emitting diode and the preset pattern, cluster the first image, and obtain a first cluster center, a second cluster center, and a third cluster center based on the preset pattern, cluster the second image, and obtain a fourth cluster center based on the preset pattern;
[0017] a test video acquisition module, configured to control closing the switch until the screen clicker completes clicking and the screen to be tested completes clicking response, control opening the switch, and acquire a video from closing the switch to opening the switch, wherein the video includes the light-emitting diode, the preset pattern, and the screen to be tested;
[0018] A test video processing module, configured to cluster the pixels of each frame image in the video based on the first cluster center, the second cluster center, the third cluster center and the fourth cluster center, determine the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels of the LED in the second image and the number of preset pattern pixels of the preset pattern, so as to determine the light emitting state of the LED in the frame image;
[0019] The response duration determination module is configured to traverse each frame image in the video, determine the starting frame image and the starting time point of the click based on the lighting state of the light-emitting diode, traverse all frame images after the starting frame image, and determine the time point when the click response is completed based on the difference value between adjacent frame images, and use the time difference between the time point when the click response is completed and the starting time point of the click as the click response duration.
[0020] Based on the same inventive concept, a third aspect of the exemplary embodiment of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in the first aspect is implemented.
[0021] Based on the same inventive concept, a fourth aspect of the exemplary embodiments of the present disclosure provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method described in the first aspect.
[0022] Based on the same inventive concept, a fifth aspect of the exemplary embodiments of the present disclosure provides a computer program product, including computer program instructions. When the computer program instructions are executed on a computer, the computer executes the method described in the first aspect.
[0023] As can be seen from the above, the test method, device, electronic device, storage medium and program product for click response duration provided by the embodiments of the present disclosure include: connecting a screen clicker in parallel with a light-emitting diode and then connecting them in series with a switch and a power supply, placing the screen to be tested within the operating range of the screen clicker, and placing a preset pattern including two colors within a preset range around the light-emitting diode; obtaining a first image when the switch is closed and a second image when the switch is disconnected, the first image and the second image both containing the light-emitting diode and the preset pattern, clustering the first image, and obtaining a first cluster center, a second cluster center and a third cluster center based on the preset pattern, clustering the second image, and obtaining a fourth cluster center based on the preset pattern; controlling the switch to be closed until the screen clicker completes the click and the screen to be tested completes the click response, controlling the switch to be opened, and obtaining the time from closing the switch to opening the switch. A video of the switch, wherein the video includes the light-emitting diode, the preset pattern and the screen to be tested; for each frame image in the video, the pixels of the frame image are clustered based on the first cluster center, the second cluster center, the third cluster center and the fourth cluster center, and the total number of pixels of the frame image, the number of third pixels clustered to the third cluster center, the number of light-emitting diode pixels of the light-emitting diode in the second image and the number of preset pattern pixels of the preset pattern are determined to determine the light-emitting state of the light-emitting diode in the frame image; traverse each frame image in the video, determine the starting frame image and the starting time point of the click based on the light-emitting state of the light-emitting diode, traverse all frame images after the starting frame image, determine the time point when the click response is completed based on the difference value between adjacent frame images, and use the time difference between the time point when the click response is completed and the starting time point of the click as the click response duration.
[0024] Among them, the screen clicker and light-emitting diode driven by the power supply are used to click, which can accurately record the time point when the click is completed, improve the test accuracy, and automatically find the time point when the click is completed. Compared with manual testing, the test efficiency is greatly improved, which improves the test efficiency. The light-emitting diode is photographed by a camera, and the time point when the click is completed is automatically identified using image processing technology, which improves the test accuracy. The use of high-speed cameras can improve the test accuracy to within 10ms, which improves the test accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 A schematic diagram of a flow chart of a method for testing click response duration provided by an exemplary embodiment of the present disclosure;
[0027] Figure 2 A structural schematic diagram of a test scenario for click response duration provided by an exemplary embodiment of the present disclosure;
[0028] Figure 3 A schematic diagram of a structure of a preset pattern and a light-emitting diode provided for an exemplary embodiment of the present disclosure;
[0029] Figure 4 Another structural schematic diagram of a preset pattern and a light-emitting diode provided for an exemplary embodiment of the present disclosure;
[0030] Figure 5 A structural schematic diagram of a click response duration testing device provided by an exemplary embodiment of the present disclosure;
[0031] Figure 6 A schematic structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, the principles and spirit of the present disclosure will be described with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0033] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.
[0034] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly. The article "one" or "a" before an element does not exclude the existence of multiple such elements.
[0035] The principle and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure.
[0036] As described in the background art, a touch screen terminal device is a device integrated with touch screen technology, allowing a user to interact with the device by directly touching the screen.
[0037] Touch screen technology makes operation more intuitive and convenient, and is widely used in personal portable information products, home appliances, public information query, electronic games, communication equipment, office automation equipment, information collection equipment and industrial equipment.
[0038] Click operation is one of the main operations of touch screen interaction. For electronic games or applications, the click response time is the operation experience that users can directly feel, and it is also an important indicator for user interaction experience testing.
[0039] In the related art, when testing the click response time, human participation is usually required in many links to complete, for example:
[0040] First, manually perform the click operation and record the time point of the manual click operation.
[0041] Then manually observe the response after the click operation, determine the time point when the response is completed and record it.
[0042] For scenarios with higher test accuracy requirements, the entire process can also be saved through a camera or a screen capture card, and then the key time points can be manually observed frame by frame.
[0043] However, the inventors of the present disclosure have found that manual participation will result in poor accuracy in testing click response duration and low test efficiency. The reasons for the poor accuracy and low test efficiency in the above-mentioned related technologies are:
[0044] Manual judgment of the timing of clicking is inaccurate. Because the timing of clicking is the moment when the touch screen is left after clicking, it is difficult for manual clicking to accurately find the time point of leaving the touch screen (for example, the error is required to be less than 20ms).
[0045] Manually observing the click timing and response completion timing frame by frame consumes a lot of time and the test efficiency is not high.
[0046] In order to solve the above problems, the present disclosure provides a test solution for click response time, which specifically includes:
[0047] A screen clicker is connected in parallel with a light-emitting diode and then in series with a switch and a power supply, a screen to be tested is placed within the operating range of the screen clicker, and a preset pattern including two colors is placed within a preset range around the light-emitting diode; a first image when the switch is closed and a second image when the switch is opened are obtained, the first image and the second image both contain the light-emitting diode and the preset pattern, the first image is clustered, and a first cluster center, a second cluster center, and a third cluster center are obtained based on the preset pattern, the second image is clustered, and a fourth cluster center is obtained based on the preset pattern; the switch is controlled to be closed until the screen clicker completes the click and the screen to be tested completes the click response, the switch is controlled to be opened, and a video from closing the switch to opening the switch is obtained, the video contains the light-emitting diode, the preset pattern and the screen to be tested; for each frame image in the video, clustering the pixels of the frame image based on the first cluster center, the second cluster center, the third cluster center and the fourth cluster center, determining the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels of the LED in the second image and the number of preset pattern pixels of the preset pattern, so as to determine the light-emitting state of the LED in the frame image; traversing each frame image in the video, determining the starting frame image and the starting time point of the click based on the light-emitting state of the LED, traversing all frame images after the starting frame image, determining the time point when the click response is completed based on the difference value between adjacent frame images, and taking the time difference between the time point when the click response is completed and the starting time point of the click as the click response duration.
[0048] Among them, clicking is performed through a power-driven screen clicker and light-emitting diode, which achieves accurate recording of the time when the click is completed, improves test accuracy, and automatically finds the time when the click is completed. Compared with manual testing, the test efficiency is greatly improved, thereby improving test efficiency.
[0049] The camera is used to shoot the light-emitting diode, and the image processing technology is used to automatically identify the time point when the click is completed, which improves the test accuracy.
[0050] The use of high-speed cameras can improve the test accuracy to within 10ms, thus improving the test accuracy.
[0051] After introducing the basic principles of the present disclosure, various non-limiting embodiments of the present disclosure are described in detail below.
[0052] refer to Figure 1 , which is a flow chart of a method for testing click response duration provided by an exemplary embodiment of the present disclosure.
[0053] The test method of click response time includes the following steps:
[0054] Step S110, connect the screen clicker and the light emitting diode in parallel and then in series with the switch and the power supply, place the screen to be tested within the operating range of the screen clicker, and place a preset pattern including two colors within a preset range around the light emitting diode.
[0055] In specific implementation, the purpose of step S110 is to construct a test scenario for click response duration, specifically:
[0056] The test scenarios for click response time include:
[0057] Screen clicker, LEDs, switches, power supply, screens to be tested and preset patterns and camera.
[0058] refer to Figure 2 , where the screen clicker and the light-emitting diode are first connected in parallel and then in series with the switch and the power supply.
[0059] During specific implementation, the screen clicker is used to simulate the action of a user clicking the screen.
[0060] Next, we will introduce how to select the screen clicker, specifically:
[0061] In this exemplary embodiment, the screen type of the screen to be tested is determined, and based on the screen type, the clicker type of the screen clicker is determined.
[0062] During specific implementation, the screen types to be tested include:
[0063] Capacitive touch screen, resistive touch screen, surface acoustic wave touch screen (SAW), infrared touch screen, electromagnetic touch screen, optical touch screen, pressure touch screen, bending wave touch screen, holographic touch screen, nano touch technology and plasma touch screen, etc.
[0064] Then, the clicker type of the screen clicker corresponding to the screen type of the screen to be tested includes:
[0065] Capacitive screen clicker and resistive screen clicker, etc.
[0066] Among them, the capacitive screen clicker uses the electromagnetic principle to simulate the touch of a human finger. It generates a magnetic field through an electromagnetic coil, causing the capacitance of the capacitive screen to change, thereby achieving a click effect.
[0067] Resistive screen clickers use mechanical pressure to simulate touch. They detect the touch position by applying pressure between the two layers of conductive material of the resistive screen, making them contact and forming a circuit. For example, a clicker made with a single-chip microcomputer can simulate the effect of a finger pressing the screen by programming the high and low levels of the IO port.
[0068] Furthermore, since the resistive screen clicker uses mechanical pressure to simulate touch, it can also be applied to surface acoustic wave touch screens, infrared touch screens, electromagnetic touch screens, optical touch screens, pressure touch screens, bending wave touch screens, holographic touch screens, nano touch technology and plasma touch screens, etc.
[0069] In this exemplary embodiment, the screen clicker is connected in parallel with the light emitting diode and then connected in series with the switch and the power supply, and the screen to be tested is placed within the operating range of the screen clicker, including:
[0070] In response to determining that the screen type of the screen to be tested is a capacitive screen, determining that the clicker type of the screen clicker is a capacitive screen clicker;
[0071] or,
[0072] In response to determining that the screen type of the screen to be tested is a resistive screen, determining that the clicker type of the screen clicker is a resistive screen clicker.
[0073] In this exemplary embodiment, the screen clicker adopts an electric high-speed clicker.
[0074] During specific implementation, the light emitting diode is used to emit light of a specified color.
[0075] As a specific example, the designated color includes one of red, green, or blue.
[0076] In a specific implementation, the power supply is used to provide power to the screen clicker and the light-emitting diode.
[0077] As a specific example, the power source includes a portable power source such as a battery.
[0078] In a specific implementation, the switch is used to control the power supply to provide power to the screen clicker and the light emitting diode.
[0079] In this exemplary embodiment, a preset pattern including two colors is placed within a preset range around the light emitting diode, specifically:
[0080] In this exemplary embodiment, the preset pattern includes:
[0081] White background and black geometric figures.
[0082] In this exemplary embodiment, placing a preset pattern including two colors within a preset range around the light emitting diode includes:
[0083] hollowing out a designated portion of the geometric figure to obtain a hollowed-out portion;
[0084] The light emitting diode is placed in the hollow portion.
[0085] refer to Figure 3 , as a specific example, wherein the target pattern includes a white background and a black circle.
[0086] The center part of the black circle is hollowed out, for example, the hollowed out part is circular, and the light emitting diode D1 is placed in the hollowed out part.
[0087] refer to Figure 4 , as a specific example, wherein the target pattern includes a white background and a black rectangle.
[0088] The center part of the black rectangle is hollowed out, for example, the hollowed out part is a rectangle, and the light emitting diode D1 is placed in the hollowed out part.
[0089] Step S120, obtaining a first image when the switch is closed and a second image when the switch is open, wherein both the first image and the second image contain the light-emitting diode and the preset pattern, clustering the first image, and obtaining a first cluster center, a second cluster center, and a third cluster center based on the preset pattern, clustering the second image, and obtaining a fourth cluster center based on the preset pattern.
[0090] In this exemplary embodiment, the acquiring of a first image when the switch is closed and a second image when the switch is open, wherein both the first image and the second image contain the light-emitting diode and the preset pattern, clustering the first image, and obtaining a first cluster center, a second cluster center, and a third cluster center based on the preset pattern, and clustering the second image, and obtaining a fourth cluster center based on the preset pattern, includes:
[0091] Convert the preset pattern into the HSV color space to obtain a first HSV color and a second HSV color;
[0092] Acquire a first image when the switch is closed, convert the first image into an HSV color space to obtain a first HSV image, cluster the HSV values of pixels of the first HSV image, use the cluster center closest to the first HSV color as the first cluster center, use the cluster center closest to the second HSV color as the second cluster center, and use the remaining cluster centers as the third cluster centers;
[0093] Acquire a second image when the switch is disconnected, convert the second image into an HSV color space to obtain a second HSV image, cluster the HSV values of the pixels of the second HSV image, and use the cluster center farthest from the first cluster center and the second cluster center as the fourth cluster center.
[0094] Among them, considering that the diode is bright when closed, the color is quite different from the preset pattern, and different areas can be better distinguished by clustering. When the diode is disconnected, it is not bright, and the area where the diode is located may be dark, which may be difficult to distinguish from the preset area. Therefore, when processing the second image and in subsequent processing, the first cluster center and the second cluster center obtained when processing the first image are used, and the second image is used to determine the fourth cluster center.
[0095] In specific implementation, the conversion steps from RGB color space to HSV color space are:
[0096] 1. Determine the maximum and minimum values: Among the three RGB components, find the maximum value maxc and the minimum value minc.
[0097] 2. Calculate hue (H):
[0098] If maxc is equal to minc, then H=0 (indicates gray, no hue).
[0099] Otherwise, calculate H depending on whether maxc is R, G, or B:
[0100] If maxc is R, then H = 60(GB) / (maxc-minc)+0° (if the result is a negative number, add 360°).
[0101] If maxc is G, then H = 60(BR) / (maxc-minc)+120°.
[0102] If maxc is B, then H=60(RG) / (maxc-minc)+240°.
[0103] 3. Calculate saturation (S):
[0104] If maxc is equal to 0, then S=0 (indicated as black, no color).
[0105] Otherwise, S = (maxc - minc) / maxc.
[0106] 4. Calculate the brightness (V):
[0107] V=maxc.
[0108] In specific implementation, the way to cluster pixels is:
[0109] Clustering algorithms such as K-means and K-Medoids can be used.
[0110] In specific implementation, the distance between the cluster center and the first HSV color or the second HSV color is calculated as follows:
[0111] For the first image when the switch is closed: the three cluster centers are converted into vectors, and according to the distances between the cluster centers and C1 and C2, the cluster center closest to C1 is determined as the cluster center of C1, the cluster center closest to C2 is determined as the cluster center of C2, and the remaining cluster center is the cluster center of C3.
[0112] For the second image when the switch is disconnected: the three cluster centers are converted into vectors, and according to the distances between the cluster centers and C1 and C2, the cluster center closest to C1 is determined as the cluster center of C1, the cluster center closest to C2 is determined as the cluster center of C2, and the remaining cluster center is the cluster center of C4.
[0113] Step S130, controlling the closing of the switch until the screen clicker completes clicking and the screen to be tested completes clicking response, controlling the opening of the switch, and obtaining a video from closing the switch to opening the switch, wherein the video includes the light-emitting diode, the preset pattern and the screen to be tested.
[0114] In specific implementation, taking into account errors and fault tolerance, a short pre- and post-time period may be added before closing and after opening to avoid errors and improve fault tolerance.
[0115] In the specific implementation, considering that the size of the frame image in the video is usually larger than the aforementioned first image and second image including the light-emitting diode and the preset pattern, the frame image in the video is preprocessed to improve the subsequent processing efficiency and recognition accuracy, specifically:
[0116] In this exemplary embodiment, after acquiring a video from closing the switch to opening the switch, wherein the video includes the light-emitting diode, the preset pattern, and the screen to be tested, the method further includes:
[0117] For each frame image in the video, performing image template matching on the frame image based on a preset image template to obtain a matching image;
[0118] Wherein, the image template is obtained based on the light-emitting diode, the preset pattern and the screen to be tested.
[0119] In this exemplary embodiment, the size of the frame image is larger than the image template.
[0120] The performing image template matching on the frame image based on the preset image template to obtain the matching image includes:
[0121] Sliding the image template on the frame image;
[0122] The portion of the frame image covered by the image template is used as a sub-image;
[0123] Determining the similarity between the image template and each sub-image;
[0124] The sub-image with the highest similarity is used as the matching image.
[0125] In a specific implementation, the matching image includes the light-emitting diode, the preset pattern and the screen to be tested, and does not include other contents as much as possible, so as to improve the efficiency and accuracy of processing the matching image.
[0126] Through the above exemplary embodiments, the frame images in the video with a larger size are preprocessed into matching images with a smaller size (compared to the frame images in the video), thereby improving the subsequent processing efficiency and recognition accuracy.
[0127] Step S140: For each frame image in the video, the pixels of the frame image are clustered based on the first cluster center, the second cluster center, the third cluster center and the fourth cluster center to determine the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels of the LED in the second image and the number of preset pattern pixels of the preset pattern to determine the light-emitting state of the LED in the frame image.
[0128] In this exemplary embodiment, for each frame image in the video, clustering the pixels of the frame image based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center, determining the total number of pixels of the frame image, the number of third pixels clustered to the third cluster center, the number of light-emitting diode pixels of the light-emitting diode in the second image, and the number of preset pattern pixels of the preset pattern, so as to determine the light-emitting state of the light-emitting diode in the frame image, includes:
[0129] For each frame image in the video, convert the frame image into the HSV color space to obtain an HSV frame image;
[0130] Clustering the pixels of the HSV frame image based on the first cluster center, the second cluster center, the third cluster center and the fourth cluster center;
[0131] Determine the total number of pixels of the HSV frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels of the LED in the second image, and the number of preset pattern pixels of the preset pattern to determine the light-emitting state of the LED in the frame image.
[0132] In this exemplary embodiment, determining the total number of pixels of the HSV frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels of the LED in the second image, and the number of preset pattern pixels of the preset pattern to determine the light emitting state of the LED in the frame image includes:
[0133] determining a first ratio of the third number of pixels to the total number of pixels;
[0134] determining a second ratio of the number of light emitting diode pixels of the light emitting diode in the second image to the number of preset pattern pixels of the preset pattern;
[0135] In response to determining that the first ratio is greater than or equal to the product of the second ratio and a preset threshold parameter, determining that the light emitting diode in the current frame image is in a light emitting state,
[0136] or,
[0137] In response to determining that the first ratio is less than the product of the second ratio and a preset threshold parameter, it is determined that the light emitting diode in the current frame image is in a non-light emitting state.
[0138] As a specific example:
[0139] P3 represents the number of third pixels clustered to the third cluster center, P represents the total number of pixels of the HSV frame image, S1 represents the number of LED pixels of the LED in the second image, S represents the number of preset pattern pixels of the preset pattern in the second image, and j represents the preset threshold parameter.
[0140] Then, if P3 / P>=j*S1 / S, it is determined that the light emitting diode in the current frame image is in a light emitting state;
[0141] If P3 / P<j*S1 / S, it is determined that the light emitting diode in the current frame image is in a non-light emitting state.
[0142] Step S150, traverse each frame image in the video, determine the starting frame image and the starting time point of the click based on the light-emitting state of the light-emitting diode, traverse all frame images after the starting frame image, and determine the time point when the click response is completed based on the difference value between adjacent frame images, and use the time difference between the time point when the click response is completed and the starting time point of the click as the click response duration.
[0143] In this exemplary embodiment, traversing each frame image in the video and determining the starting frame image and the starting time point of the click based on the light emitting state of the light emitting diode includes:
[0144] Traversing each frame image in the video;
[0145] In response to determining that the light emitting diode in the current frame image is in a non-light emitting state and the light emitting diode in a frame image before the current frame image is in a light emitting state, determining the current frame image to be the starting frame image;
[0146] The time point corresponding to the current frame image is determined as the starting time point of the click.
[0147] Through the above exemplary embodiments, since the light-emitting diode and the screen clicker are connected in parallel, by determining the on and off state of the light-emitting diode (that is, whether it is in a light-emitting state or a non-light-emitting state), it is possible to determine whether the screen clicker clicks the screen, thereby determining the starting frame image and further determining the starting time point of the click.
[0148] In this exemplary embodiment, traversing all frame images after the start frame image and determining the time point when the click response is completed based on the difference value between adjacent frame images includes:
[0149] Traversing all frame images after the starting frame image;
[0150] Calculate the difference between adjacent frame images;
[0151] The difference values are arranged in order from large to small, and the time point at which the click response is completed is determined based on the time points corresponding to the adjacent frame images corresponding to the difference values of the front preset names.
[0152] In this exemplary embodiment, calculating the difference value between adjacent frame images includes:
[0153] Determine the screen area image to be tested in the frame image;
[0154] The difference values between the images of the screen area to be tested in adjacent frame images are calculated.
[0155] In this exemplary embodiment, calculating the difference value between adjacent frame images includes:
[0156] The mean square error of the pixel value differences between adjacent frame images is taken as the difference value between adjacent frame images.
[0157] In specific implementation, for each pixel point in the image, the difference in pixel values of the two frames of images at that point is calculated;
[0158] The difference value can be a positive value or a negative value, indicating the brightness change of a pixel between two frames. The difference value can be processed as an absolute value to indicate the magnitude of the change.
[0159] As a specific example:
[0160] Set the judgment threshold to N.
[0161] The time point at which the click response is completed is selected from the time points corresponding to the first N groups of adjacent frame images with relatively large differences.
[0162] In a specific implementation, if the content displayed on the screen is switched instantly when responding to a click, then the time point corresponding to the next frame image among the adjacent frame images with a difference value is the time point when the click response is completed;
[0163] However, if there is a process for switching the content displayed when the screen responds to a click, then first determine the adjacent frame images with larger difference values, and preliminarily exclude the frame images with smaller difference values, which are unlikely to be response completion frames. Then, the user can subsequently select specific parts of them as test results to determine the response completion frame images.
[0164] In specific implementation, since some frames of N groups of adjacent frames may overlap, for example, two groups of adjacent frames 1 to 2 and 2 to 3, 2 are overlapped, and there are only 3 frames, the determined adjacent frames can be used as the preliminary result of the response.
[0165] In this exemplary embodiment, the time difference between the time point when the click response is completed and the start time point of the click is used as the click response duration, including:
[0166] Click response duration = the time point when the click response is completed - the start time point of the click.
[0167] In the above exemplary embodiments, testing the click response duration of a screen to be tested is described as an example. When it is necessary to test the click response duration of multiple screens to be tested, the click response duration test can be achieved by replacing the screen to be tested and repeating the solution of the above exemplary embodiments.
[0168] As can be seen from the above, the test method for click response duration provided by the embodiment of the present disclosure includes: connecting a screen clicker in parallel with a light-emitting diode and then connecting them in series with a switch and a power supply, placing the screen to be tested within the operating range of the screen clicker, and placing a preset pattern including two colors within a preset range around the light-emitting diode; obtaining a first image when the switch is closed and a second image when the switch is disconnected, the first image and the second image both contain the light-emitting diode and the preset pattern, clustering the first image, and obtaining a first cluster center, a second cluster center, and a third cluster center based on the preset pattern, clustering the second image, and obtaining a fourth cluster center based on the preset pattern; controlling the switch to be closed until the screen clicker completes the click and the screen to be tested completes the click response, controlling the switch to be opened, and obtaining a video from closing the switch to opening the switch, the video The method comprises the light-emitting diode, the preset pattern and the screen to be tested; for each frame image in the video, clustering the pixels of the frame image based on the first cluster center, the second cluster center, the third cluster center and the fourth cluster center, determining the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of light-emitting diode pixels of the light-emitting diode in the second image and the number of preset pattern pixels of the preset pattern, so as to determine the light-emitting state of the light-emitting diode in the frame image; traversing each frame image in the video, determining the starting frame image and the starting time point of the click based on the light-emitting state of the light-emitting diode, traversing all frame images after the starting frame image, determining the time point when the click response is completed based on the difference value between adjacent frame images, and taking the time difference between the time point when the click response is completed and the starting time point of the click as the click response duration.
[0169] Among them, the screen clicker and light-emitting diode driven by the power supply are used to click, which can accurately record the time point when the click is completed, improve the test accuracy, and automatically find the time point when the click is completed. Compared with manual testing, the test efficiency is greatly improved, which improves the test efficiency. The light-emitting diode is photographed by a camera, and the time point when the click is completed is automatically identified using image processing technology, which improves the test accuracy. The use of high-speed cameras can improve the test accuracy to within 10ms, which improves the test accuracy.
[0170] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.
[0171] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0172] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides a device for testing click response duration.
[0173] refer to Figure 5 , which is a structural schematic diagram of a click response duration testing device provided by an exemplary embodiment of the present disclosure.
[0174] The test device for click response time includes the following modules:
[0175] The test scenario construction module 910 is configured to connect a screen clicker in parallel with a light emitting diode and then connect them in series with a switch and a power supply, place the screen to be tested within the operating range of the screen clicker, and place a preset pattern including two colors within a preset range around the light emitting diode;
[0176] A cluster center determination module 920 is configured to obtain a first image when the switch is closed and a second image when the switch is open, wherein the first image and the second image both contain the light-emitting diode and the preset pattern, cluster the first image, and obtain a first cluster center, a second cluster center, and a third cluster center based on the preset pattern, cluster the second image, and obtain a fourth cluster center based on the preset pattern;
[0177] The test video acquisition module 930 is configured to control the closing of the switch until the screen clicker completes the click and the screen to be tested completes the click response, control the opening of the switch, and acquire a video from the closing of the switch to the opening of the switch, wherein the video includes the light-emitting diode, the preset pattern and the screen to be tested;
[0178] The test video processing module 940 is configured to cluster the pixels of each frame image in the video based on the first cluster center, the second cluster center, the third cluster center and the fourth cluster center, determine the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels of the LED in the second image and the number of preset pattern pixels of the preset pattern, so as to determine the light emitting state of the LED in the frame image;
[0179] The response duration determination module 950 is configured to traverse each frame image in the video, determine the starting frame image and the starting time point of the click based on the lighting state of the light-emitting diode, traverse all frame images after the starting frame image, and determine the time point when the click response is completed based on the difference value between adjacent frame images, and use the time difference between the time point when the click response is completed and the starting time point of the click as the click response duration.
[0180] In some exemplary embodiments, the cluster center determination module 920 is specifically configured to:
[0181] Convert the preset pattern into the HSV color space to obtain a first HSV color and a second HSV color;
[0182] Acquire a first image when the switch is closed, convert the first image into an HSV color space to obtain a first HSV image, cluster the HSV values of pixels of the first HSV image, use the cluster center closest to the first HSV color as the first cluster center, use the cluster center closest to the second HSV color as the second cluster center, and use the remaining cluster centers as the third cluster centers;
[0183] Acquire a second image when the switch is disconnected, convert the second image into an HSV color space to obtain a second HSV image, cluster the HSV values of the pixels of the second HSV image, and use the cluster center farthest from the first cluster center and the second cluster center as the fourth cluster center.
[0184] In some exemplary embodiments, the test video acquisition module 930 is further configured to:
[0185] For each frame image in the video, performing image template matching on the frame image based on a preset image template to obtain a matching image;
[0186] Wherein, the image template is obtained based on the light-emitting diode, the preset pattern and the screen to be tested.
[0187] In some exemplary embodiments, the size of the frame image is larger than the image template, and the test video acquisition module 930 is further configured to:
[0188] Sliding the image template on the frame image;
[0189] The portion of the frame image covered by the image template is used as a sub-image;
[0190] Determining the similarity between the image template and each sub-image;
[0191] The sub-image with the highest similarity is used as the matching image.
[0192] In some exemplary embodiments, the test video processing module 940 is specifically configured to:
[0193] For each frame image in the video, convert the frame image into the HSV color space to obtain an HSV frame image;
[0194] Clustering the pixels of the HSV frame image based on the first cluster center, the second cluster center, the third cluster center and the fourth cluster center;
[0195] Determine the total number of pixels of the HSV frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels of the LED in the second image, and the number of preset pattern pixels of the preset pattern to determine the light-emitting state of the LED in the frame image.
[0196] In some exemplary embodiments, the test video processing module 940 is specifically configured to:
[0197] determining a first ratio of the third number of pixels to the total number of pixels;
[0198] determining a second ratio of the number of light emitting diode pixels of the light emitting diode in the second image to the number of preset pattern pixels of the preset pattern;
[0199] In response to determining that the first ratio is greater than or equal to the product of the second ratio and a preset threshold parameter, determining that the light emitting diode in the current frame image is in a light emitting state,
[0200] or,
[0201] In response to determining that the first ratio is less than the product of the second ratio and a preset threshold parameter, it is determined that the light emitting diode in the current frame image is in a non-light emitting state.
[0202] In some exemplary embodiments, the response duration determination module 950 is specifically configured to:
[0203] Traversing each frame image in the video;
[0204] In response to determining that the light emitting diode in the current frame image is in a non-light emitting state and the light emitting diode in a frame image before the current frame image is in a light emitting state, determining the current frame image to be the starting frame image;
[0205] The time point corresponding to the current frame image is determined as the starting time point of the click.
[0206] In some exemplary embodiments, the response duration determination module 950 is specifically configured to:
[0207] Traversing all frame images after the starting frame image;
[0208] Calculate the difference between adjacent frame images;
[0209] The difference values are arranged in order from large to small, and the time point at which the click response is completed is determined based on the time points corresponding to the adjacent frame images corresponding to the difference values of the front preset names.
[0210] In some exemplary embodiments, the preset pattern includes:
[0211] White background and black geometric figures.
[0212] In some exemplary embodiments, the test scenario construction module 910 is specifically configured to:
[0213] hollowing out a designated portion of the geometric figure to obtain a hollowed-out portion;
[0214] The light emitting diode is placed in the hollow portion.
[0215] In some exemplary embodiments, the test scenario construction module 910 is specifically configured to:
[0216] In response to determining that the screen type of the screen to be tested is a capacitive screen, determining that the clicker type of the screen clicker is a capacitive screen clicker;
[0217] or,
[0218] In response to determining that the screen type of the screen to be tested is a resistive screen, determining that the clicker type of the screen clicker is a resistive screen clicker.
[0219] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0220] The device of the above embodiment is used to implement the corresponding click response duration testing method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0221] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for testing the click response duration described in any of the above embodiments is implemented.
[0222] Figure 6 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0223] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0224] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0225] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0226] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0227] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0228] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also include components necessary for implementing the embodiments of the present specification, without necessarily including all the components shown in the figure.
[0229] The electronic device of the above embodiment is used to implement the corresponding click response duration test method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0230] The memory 1020 stores machine-readable instructions executable by the processor 1010. When the electronic device is running, the processor 1010 communicates with the memory 1020 via the bus 1030, so that the processor 1010 executes the following instructions when running:
[0231] A screen clicker is connected in parallel with a light emitting diode and then connected in series with a switch and a power supply, a screen to be tested is placed within the operating range of the screen clicker, and a preset pattern including two colors is placed within a preset range around the light emitting diode;
[0232] Acquire a first image when the switch is closed and a second image when the switch is open, wherein both the first image and the second image contain the light-emitting diode and the preset pattern, cluster the first image, and obtain a first cluster center, a second cluster center, and a third cluster center based on the preset pattern, cluster the second image, and obtain a fourth cluster center based on the preset pattern;
[0233] Controlling the switch to be closed until the screen clicker completes clicking and the screen to be tested completes clicking response, controlling the switch to be opened, and acquiring a video from closing the switch to opening the switch, wherein the video includes the light-emitting diode, the preset pattern, and the screen to be tested;
[0234] For each frame image in the video, clustering the pixels of the frame image based on the first cluster center, the second cluster center, the third cluster center and the fourth cluster center, determining the total number of pixels of the frame image, the number of third pixels clustered to the third cluster center, the number of light-emitting diode pixels of the light-emitting diode in the second image and the number of preset pattern pixels of the preset pattern, so as to determine the light-emitting state of the light-emitting diode in the frame image;
[0235] Traverse each frame image in the video, determine the starting frame image and the starting time point of the click based on the lighting state of the light-emitting diode, traverse all frame images after the starting frame image, and determine the time point when the click response is completed based on the difference value between adjacent frame images, and use the time difference between the time point when the click response is completed and the starting time point of the click as the click response duration.
[0236] In a possible implementation manner, in the instructions executed by the processor 1010, the acquiring of a first image when the switch is closed and a second image when the switch is open, wherein both the first image and the second image include the light-emitting diode and the preset pattern, clustering the first image, and obtaining a first cluster center, a second cluster center, and a third cluster center based on the preset pattern, and clustering the second image, and obtaining a fourth cluster center based on the preset pattern, includes:
[0237] Convert the preset pattern into the HSV color space to obtain a first HSV color and a second HSV color;
[0238] Acquire a first image when the switch is closed, convert the first image into an HSV color space to obtain a first HSV image, cluster the HSV values of pixels of the first HSV image, use the cluster center closest to the first HSV color as the first cluster center, use the cluster center closest to the second HSV color as the second cluster center, and use the remaining cluster centers as the third cluster centers;
[0239] Acquire a second image when the switch is disconnected, convert the second image into an HSV color space to obtain a second HSV image, cluster the HSV values of the pixels of the second HSV image, and use the cluster center farthest from the first cluster center and the second cluster center as the fourth cluster center.
[0240] In a possible implementation manner, in the instructions executed by the processor 1010, after acquiring a video from closing the switch to opening the switch, wherein the video includes the light-emitting diode, the preset pattern, and the screen to be tested, the method further includes:
[0241] For each frame image in the video, performing image template matching on the frame image based on a preset image template to obtain a matching image;
[0242] Wherein, the image template is obtained based on the light-emitting diode, the preset pattern and the screen to be tested.
[0243] In a possible implementation manner, in the instruction executed by the processor 1010, the size of the frame image is larger than the image template.
[0244] The performing image template matching on the frame image based on the preset image template to obtain the matching image includes:
[0245] Sliding the image template on the frame image;
[0246] The portion of the frame image covered by the image template is used as a sub-image;
[0247] Determining the similarity between the image template and each sub-image;
[0248] The sub-image with the highest similarity is used as the matching image.
[0249] In a possible implementation, in the instructions executed by the processor 1010, for each frame image in the video, clustering the pixels of the frame image based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center, determining the total number of pixels of the frame image, the number of third pixels clustered to the third cluster center, the number of light-emitting diode pixels of the light-emitting diode in the second image, and the number of preset pattern pixels of the preset pattern, so as to determine the light-emitting state of the light-emitting diode in the frame image, includes:
[0250] For each frame image in the video, convert the frame image into the HSV color space to obtain an HSV frame image;
[0251] Clustering the pixels of the HSV frame image based on the first cluster center, the second cluster center, the third cluster center and the fourth cluster center;
[0252] Determine the total number of pixels of the HSV frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels of the LED in the second image, and the number of preset pattern pixels of the preset pattern to determine the light-emitting state of the LED in the frame image.
[0253] In a possible implementation manner, in the instructions executed by the processor 1010, determining the total number of pixels of the HSV frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels of the LED in the second image, and the number of preset pattern pixels of the preset pattern to determine the light emitting state of the LED in the frame image includes:
[0254] determining a first ratio of the third number of pixels to the total number of pixels;
[0255] determining a second ratio of the number of light emitting diode pixels of the light emitting diode in the second image to the number of preset pattern pixels of the preset pattern;
[0256] In response to determining that the first ratio is greater than or equal to the product of the second ratio and a preset threshold parameter, determining that the light emitting diode in the current frame image is in a light emitting state,
[0257] or,
[0258] In response to determining that the first ratio is less than the product of the second ratio and a preset threshold parameter, it is determined that the light emitting diode in the current frame image is in a non-light emitting state.
[0259] In a possible implementation, in the instructions executed by the processor 1010, traversing each frame image in the video and determining the starting frame image and the starting time point of the click based on the lighting state of the light-emitting diode include:
[0260] Traversing each frame image in the video;
[0261] In response to determining that the light emitting diode in the current frame image is in a non-light emitting state and the light emitting diode in a frame image before the current frame image is in a light emitting state, determining the current frame image to be the starting frame image;
[0262] The time point corresponding to the current frame image is determined as the starting time point of the click.
[0263] In a possible implementation manner, in the instructions executed by the processor 1010, traversing all frame images after the start frame image and determining the time point when the click response is completed based on the difference value between adjacent frame images includes:
[0264] Traversing all frame images after the starting frame image;
[0265] Calculate the difference between adjacent frame images;
[0266] The difference values are arranged in order from large to small, and the time point at which the click response is completed is determined based on the time points corresponding to the adjacent frame images corresponding to the difference values of the front preset names.
[0267] In a possible implementation manner, in the instruction executed by the processor 1010, the preset pattern includes:
[0268] White background and black geometric figures.
[0269] In a possible implementation manner, in the instructions executed by the processor 1010, placing a preset pattern including two colors within a preset range around the light emitting diode includes:
[0270] hollowing out a designated portion of the geometric figure to obtain a hollowed-out portion;
[0271] The light emitting diode is placed in the hollow portion.
[0272] In a possible implementation manner, the instructions executed by the processor 1010, wherein the screen clicker is connected in parallel with the light emitting diode and then connected in series with the switch and the power supply, and the screen to be tested is placed within the operating range of the screen clicker, includes:
[0273] In response to determining that the screen type of the screen to be tested is a capacitive screen, determining that the clicker type of the screen clicker is a capacitive screen clicker;
[0274] or,
[0275] In response to determining that the screen type of the screen to be tested is a resistive screen, determining that the clicker type of the screen clicker is a resistive screen clicker.
[0276] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the click response duration testing method described in any of the above embodiments.
[0277] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0278] The above-mentioned non-transitory computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)), etc.
[0279] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the test method for click response duration as described in any embodiment in the above exemplary method part, and have the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0280] Based on the same inventive concept, corresponding to the test method for click response duration described in any of the above embodiments, the present disclosure also provides a computer program product, which includes computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of a computer so that the computer and / or the processor execute the test method for click response duration. Corresponding to the execution subject corresponding to each step in each embodiment of the test method for click response duration, the processor that executes the corresponding step may belong to the corresponding execution subject.
[0281] The computer program product of the above embodiment is used to enable the computer and / or the processor to execute the test method of click response duration as described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0282] Those skilled in the art will appreciate that the embodiments of the present disclosure may be implemented as a system, method, or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." In addition, in some embodiments, the present disclosure may also be implemented in the form of a computer program product in one or more computer-readable media, which contains computer-readable program code.
[0283] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive examples) of computer-readable storage media may include, for example: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device.
[0284] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0285] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0286] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0287] It should be understood that each box in the flowchart and / or block diagram and the combination of boxes in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine, and these computer program instructions are executed by a computer or other programmable data processing device to produce a device that implements the functions / operations specified in the boxes in the flowchart and / or block diagram.
[0288] These computer program instructions may also be stored in a computer-readable medium that enables a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable medium produce a product that includes an instruction device that implements the functions / operations specified in the blocks in the flowchart and / or block diagram.
[0289] Computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby enabling the instructions executed on the computer or other programmable device to provide a process for implementing the functions / operations specified in the blocks in the flowchart and / or block diagram.
[0290] In addition, although the operations of the disclosed method are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flow chart can be performed in a different order. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.
[0291] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0292] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0293] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0294] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0295] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0296] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
[0297] Although the spirit and principle of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims. The scope of the attached claims conforms to the broadest interpretation, thereby including all such modifications and equivalent structures and functions.
Claims
1. A method for testing click response time, characterized in that: include: A screen clicker is connected in parallel with a light emitting diode and then connected in series with a switch and a power supply, a screen to be tested is placed within the operating range of the screen clicker, and a preset pattern including two colors is placed within a preset range around the light emitting diode; Acquire a first image when the switch is closed and a second image when the switch is open, wherein both the first image and the second image contain the light-emitting diode and the preset pattern, cluster the first image, and obtain a first cluster center, a second cluster center, and a third cluster center based on the preset pattern, cluster the second image, and obtain a fourth cluster center based on the preset pattern; Controlling the switch to be closed until the screen clicker completes clicking and the screen to be tested completes clicking response, controlling the switch to be opened, and acquiring a video from closing the switch to opening the switch, wherein the video includes the light-emitting diode, the preset pattern, and the screen to be tested; For each frame image in the video, clustering the pixels of the frame image based on the first cluster center, the second cluster center, the third cluster center and the fourth cluster center, determining the total number of pixels of the frame image, the number of third pixels clustered to the third cluster center, the number of light-emitting diode pixels of the light-emitting diode in the second image and the number of preset pattern pixels of the preset pattern, so as to determine the light-emitting state of the light-emitting diode in the frame image; Traverse each frame image in the video, determine the starting frame image and the starting time point of the click based on the lighting state of the light-emitting diode, traverse all frame images after the starting frame image, and determine the time point when the click response is completed based on the difference value between adjacent frame images, and use the time difference between the time point when the click response is completed and the starting time point of the click as the click response duration.
2. The method according to claim 1, characterized in that The acquiring of a first image when the switch is closed and a second image when the switch is open, wherein both the first image and the second image contain the light emitting diode and the preset pattern, clustering the first image, and obtaining a first cluster center, a second cluster center, and a third cluster center based on the preset pattern, and clustering the second image, and obtaining a fourth cluster center based on the preset pattern, comprises: Convert the preset pattern into the HSV color space to obtain a first HSV color and a second HSV color; Acquire a first image when the switch is closed, convert the first image into an HSV color space to obtain a first HSV image, cluster the HSV values of pixels of the first HSV image, use the cluster center closest to the first HSV color as the first cluster center, use the cluster center closest to the second HSV color as the second cluster center, and use the remaining cluster centers as the third cluster centers; Acquire a second image when the switch is disconnected, convert the second image into an HSV color space to obtain a second HSV image, cluster the HSV values of the pixels of the second HSV image, and use the cluster center farthest from the first cluster center and the second cluster center as the fourth cluster center.
3. The method according to claim 1, characterized in that After obtaining a video from closing the switch to opening the switch, wherein the video includes the light-emitting diode, the preset pattern and the screen to be tested, the method further includes: For each frame image in the video, performing image template matching on the frame image based on a preset image template to obtain a matching image; Wherein, the image template is obtained based on the light-emitting diode, the preset pattern and the screen to be tested.
4. The method according to claim 3, characterized in that: The size of the frame image is larger than the image template, The performing image template matching on the frame image based on the preset image template to obtain the matching image includes: Sliding the image template on the frame image; The portion of the frame image covered by the image template is used as a sub-image; Determining the similarity between the image template and each sub-image; The sub-image with the highest similarity is used as the matching image.
5. The method according to claim 1, characterized in that For each frame image in the video, clustering the pixels of the frame image based on the first cluster center, the second cluster center, the third cluster center and the fourth cluster center, determining the total number of pixels of the frame image, the number of third pixels clustered to the third cluster center, the number of light-emitting diode pixels of the light-emitting diode in the second image and the number of preset pattern pixels of the preset pattern, so as to determine the light-emitting state of the light-emitting diode in the frame image, including: For each frame image in the video, convert the frame image into the HSV color space to obtain an HSV frame image; Clustering the pixels of the HSV frame image based on the first cluster center, the second cluster center, the third cluster center and the fourth cluster center; Determine the total number of pixels of the HSV frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels of the LED in the second image, and the number of preset pattern pixels of the preset pattern to determine the light-emitting state of the LED in the frame image.
6. The method according to claim 5, characterized in that The determining of the total number of pixels of the HSV frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels of the LED in the second image, and the number of preset pattern pixels of the preset pattern to determine the light emitting state of the LED in the frame image includes: determining a first ratio of the third number of pixels to the total number of pixels; determining a second ratio of the number of light emitting diode pixels of the light emitting diode in the second image to the number of preset pattern pixels of the preset pattern; In response to determining that the first ratio is greater than or equal to the product of the second ratio and a preset threshold parameter, determining that the light emitting diode in the current frame image is in a light emitting state, or, In response to determining that the first ratio is less than the product of the second ratio and a preset threshold parameter, it is determined that the light emitting diode in the current frame image is in a non-light emitting state.
7. The method according to claim 1, characterized in that The traversing each frame image in the video and determining the starting frame image and the starting time point of the click based on the light emitting state of the light emitting diode includes: Traversing each frame image in the video; In response to determining that the light emitting diode in the current frame image is in a non-light emitting state and the light emitting diode in a frame image before the current frame image is in a light emitting state, determining the current frame image to be the starting frame image; The time point corresponding to the current frame image is determined as the starting time point of the click.
8. The method according to claim 1, characterized in that The traversing all frame images after the starting frame image and determining the time point when the click response is completed based on the difference value between adjacent frame images includes: Traversing all frame images after the starting frame image; Calculate the difference between adjacent frame images; The difference values are arranged in order from large to small, and the time point at which the click response is completed is determined based on the time points corresponding to the adjacent frame images corresponding to the difference values of the front preset names.
9. The method according to claim 1, characterized in that: The preset pattern includes: White background and black geometric figures.
10. The method according to claim 9, characterized in that Placing a preset pattern including two colors within a preset range around the light emitting diode includes: hollowing out a designated portion of the geometric figure to obtain a hollowed-out portion; The light emitting diode is placed in the hollow portion.
11. The method according to claim 1, characterized in that: The method of connecting the screen clicker in parallel with the light emitting diode and then in series with the switch and the power supply, and placing the screen to be tested within the operating range of the screen clicker, comprises: In response to determining that the screen type of the screen to be tested is a capacitive screen, determining that the clicker type of the screen clicker is a capacitive screen clicker; or, In response to determining that the screen type of the screen to be tested is a resistive screen, determining that the clicker type of the screen clicker is a resistive screen clicker.
12. A test device for click response duration, characterized in that: include: A test scenario construction module is configured to connect a screen clicker in parallel with a light emitting diode and then in series with a switch and a power supply, place a screen to be tested within an operating range of the screen clicker, and place a preset pattern including two colors within a preset range around the light emitting diode; a cluster center determination module, configured to obtain a first image when the switch is closed and a second image when the switch is open, wherein the first image and the second image both contain the light-emitting diode and the preset pattern, cluster the first image, and obtain a first cluster center, a second cluster center, and a third cluster center based on the preset pattern, cluster the second image, and obtain a fourth cluster center based on the preset pattern; a test video acquisition module, configured to control closing the switch until the screen clicker completes clicking and the screen to be tested completes clicking response, control opening the switch, and acquire a video from closing the switch to opening the switch, wherein the video includes the light-emitting diode, the preset pattern, and the screen to be tested; A test video processing module, configured to cluster the pixels of each frame image in the video based on the first cluster center, the second cluster center, the third cluster center and the fourth cluster center, determine the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels of the LED in the second image and the number of preset pattern pixels of the preset pattern, so as to determine the light emitting state of the LED in the frame image; The response duration determination module is configured to traverse each frame image in the video, determine the starting frame image and the starting time point of the click based on the lighting state of the light-emitting diode, traverse all frame images after the starting frame image, and determine the time point when the click response is completed based on the difference value between adjacent frame images, and use the time difference between the time point when the click response is completed and the starting time point of the click as the click response duration.
13. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 11 is implemented.
14. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 11.
15. A computer program product, characterized in that The method comprises computer program instructions, and when the computer program instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Mobile terminal, response performance testing method and device thereof and storage medium
CN109766250A
Touch screen click response time measuring method and system
CN112783707A
Response duration detection method and device
CN113688019A
Test information acquisition method and device, test device, electronic equipment and medium
CN115904845A
Method, device and equipment for detecting end-to-end time delay
CN116132710A
Cited By
Tap response time testing method and apparatus, electronic device, storage medium, and program product
WO2026098347A1