Video processing function verification method and device, electronic device, and storage medium

By automatically comparing the image feature data of the video processing function, the high cost and low efficiency problem caused by manual visual judgment in the existing technology is solved, and efficient automatic verification of the video processing function is achieved.

CN113850118BActive Publication Date: 2025-09-16TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110833094.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-22
Publication Date
2025-09-16
Estimated Expiration
2041-07-22

AI Technical Summary

Technical Problem

In the prior art, abnormal verification of video processing functions relies on manual visual judgment, resulting in high cost and low efficiency.

Method used

By obtaining template video and image feature data from the preset template library, the preset data extraction algorithm is used to process the video to be verified, and the image feature data is automatically compared to determine whether the video processing function is abnormal.

Benefits of technology

It eliminates the need for manual visual judgment, reduces manpower, improves verification efficiency and reduces costs. By comparing image feature data, the amount of comparison is reduced, further improving efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113850118B_ABST
    Figure CN113850118B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a method and device, electronic device, and storage medium for verifying a video processing function. The method includes: obtaining image feature data of a template video and a first image from a preset template library, wherein the image feature data of the first image is extracted from the first image of a standard video based on a preset data extraction algorithm, wherein the standard video is a video that implements the video processing function to be verified after processing the template video; starting the video processing function to be verified to process the template video to obtain the video to be verified; extracting image feature data from the second image of the video to be verified based on the preset data extraction algorithm, and comparing the extracted data with the image feature data of the first image; and determining that the video processing function to be verified is abnormal if there is a mismatch. The technical solution of the embodiments of the present application can reduce manpower and improve verification efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of multimedia technology, and in particular to a method and device for verifying video processing functions, an electronic device, and a storage medium. Background Art

[0002] In video editing software, various video processing functions have brought convenience to video creation. Editing videos and sharing the edited videos has become a form of entertainment for the majority of users.

[0003] Video processing functions may experience anomalies during operation. Currently, to verify whether this function is anomaly, the video is typically processed using the function, and then manually determined by the naked eye to determine whether the processed video has achieved the desired function. This verification method consumes a lot of manpower, is costly, and is inefficient. Summary of the Invention

[0004] To solve the above technical problems, embodiments of the present application provide a method and device for verifying a video processing function, an electronic device, and a computer-readable storage medium.

[0005] According to one aspect of an embodiment of the present application, a method for verifying a video processing function is provided, the method comprising:

[0006] Obtaining image feature data of a template video and a first image from a preset template library; the image feature data of the first image is extracted from the first image of a standard video based on a preset data extraction algorithm; the standard video is a video obtained by processing the template video to implement the video processing function to be verified;

[0007] Starting the to-be-verified video processing function to process the template video to obtain the to-be-verified video;

[0008] extracting image feature data from a second image in the video to be verified based on the preset data extraction algorithm, and comparing the image feature data of the second image with the image feature data of the first image; wherein a position of the second image in the video to be verified is the same as a position of the first image in the standard video;

[0009] If the image feature data of the second image does not match the image feature data of the first image, it is determined that the video processing function to be verified is abnormal.

[0010] According to one aspect of an embodiment of the present application, a device for verifying a video processing function is provided, including:

[0011] an acquisition module configured to acquire image feature data of a template video and a first image from a preset template library; the image feature data of the first image is extracted from the first image of a standard video based on a preset data extraction algorithm; the standard video is a video obtained by processing the template video to implement the video processing function to be verified;

[0012] a processing module configured to start the to-be-verified video processing function to process the template video to obtain the to-be-verified video;

[0013] a comparison module configured to extract image feature data from a second image in the video to be verified based on the preset data extraction algorithm, and compare the image feature data of the second image with the image feature data of the first image; wherein a position of the second image in the video to be verified is the same as a position of the first image in the standard video;

[0014] The verification module is configured to determine that the video processing function to be verified is abnormal if the image feature data of the second image does not match the image feature data of the first image.

[0015] According to one aspect of an embodiment of the present application, an electronic device is provided, including:

[0016] a memory storing computer-readable instructions;

[0017] The processor reads the computer-readable instructions stored in the memory to execute any one of the above-mentioned methods for verifying the video processing function.

[0018] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes any one of the above-mentioned methods for verifying the video processing function.

[0019] In the technical solution provided in the embodiment of the present application, image feature data of a template video and a first image are first obtained from a preset template library, wherein the image feature data of the first image is extracted from the first image of a standard video based on a preset data extraction algorithm, and the standard video is a video that realizes the video processing function to be verified after processing the template video; then, the video processing function to be verified is started to process the template video to obtain the video to be verified, and image feature data is extracted from the second image of the video to be verified based on the preset data extraction algorithm, and the image feature data of the second image is compared with the image feature data of the first image, wherein the position of the second image in the video to be verified is the same as the position of the first image in the standard video; if the image feature data of the second image does not match the image feature data of the first image, it is determined that the video processing function to be verified is abnormal, thereby realizing verification of whether the video processing function is abnormal at the image level, without the need for manual visual judgment, reducing manpower, improving efficiency, and reducing costs, and verifying the video processing function through comparison of image feature data can reduce the amount of comparison and further improve efficiency.

[0020] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings are incorporated into and constitute a part of the specification, illustrating embodiments consistent with the present application and, together with the specification, serving to explain the principles of the present application. It is obvious that the drawings described below are merely some embodiments of the present application, and a person of ordinary skill in the art can derive other drawings based on these drawings without inventive effort. In the drawings:

[0022] Figure 1 It is a schematic diagram of an implementation environment involved in this application;

[0023] Figure 2 An exemplary embodiment of the present application shows a flowchart of a method for verifying a video processing function;

[0024] Figure 3 yes Figure 2 A flow chart of step S130 in the illustrated embodiment in an exemplary embodiment;

[0025] Figure 4 yes Figure 2 A flow chart of step S130 in the illustrated embodiment in an exemplary embodiment;

[0026] Figure 5-1 is a schematic diagram of an original image shown in an exemplary embodiment of the present application;

[0027] Figure 5-2 An exemplary embodiment of the present application shows Figure 5-1 Schematic diagram of an image obtained by processing the original image to implement the portrait cutout function;

[0028] Figure 6 is a schematic diagram of a second image shown in an exemplary embodiment of the present application;

[0029] Figure 7 is a block diagram of a device for verifying a video processing function according to an exemplary embodiment of the present application;

[0030] Figure 8 It is a structural diagram of an electronic device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0031] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numerals in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0032] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0033] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0034] It should also be noted that the term "plurality" used in this application refers to two or more. "And / or" describes the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0035] Before introducing the technical solutions of the embodiments of the present application, the nouns and terms involved in the embodiments of the present application are explained first. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0036] Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.

[0037] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0038] Computer vision (CV) is the science of making machines "see." Specifically, it refers to machine vision, where cameras and computers replace the human eye in identifying and measuring objects, performing further image processing to create images more suitable for human observation or transmission to instruments. As a scientific discipline, computer vision studies related theories and technologies, attempting to build artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technologies typically include image processing, image recognition, image semantic understanding, image retrieval, optical character recognition (OCR), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping, and common biometric recognition technologies such as facial recognition and fingerprint recognition.

[0039] In related technologies, human eyes are often used to determine whether a video processed by a video processing function has achieved the desired function, thereby verifying whether the video processing function is abnormal. This verification method consumes a large amount of manpower, is costly, and inefficient. Therefore, embodiments of the present application provide a method and apparatus for verifying a video processing function, which can improve the speed and efficiency of video processing function verification and reduce verification costs.

[0040] See also Figure 1 , Figure 1Schematic diagram of an implementation environment involved in this application, which includes a terminal 100 and a verification device 200 with a video processing function, wherein the terminal 100 and the verification device 200 communicate with each other via a wired or wireless network.

[0041] Terminal 100 includes a client for a video processing function to be verified. A user can operate on terminal 100 to activate the video processing function to be verified, thereby processing the video using the video processing function to edit the video. The client for the video processing function to be verified can be application software that has the video processing function to be verified. Alternatively, the client for the video processing function to be verified can be a web client that has the video processing function to be verified. For example, if a website has the video processing function to be verified, the user can access the website through the web client to activate the video processing function to be verified.

[0042] The verification device 200 can obtain the image feature data of the template video and the first image from the preset template library, and control the terminal 100 to start the video processing function to be verified to process the template video to obtain the video to be verified. Then, based on the preset data extraction algorithm, the image feature data is extracted from the second image of the video to be verified, and the image feature data of the second image is compared with the image feature data of the first image. If the image feature data of the second image does not match the image feature data of the first image, it is determined that the video processing function to be verified is abnormal, thereby realizing the verification of the video processing function. Among them, the first image is an image in the standard video, the standard video is a video that realizes the video processing function to be verified after processing the template video, the image feature data of the first image is extracted from the first image of the standard video based on the preset data extraction algorithm, and the position of the first image in the standard video is the same as the position of the second image in the video to be verified.

[0043] It should be noted that the video processing function to be verified can be implemented based on computer vision technology, and the preset data extraction algorithm can also be implemented based on computer vision technology.

[0044] The terminal 100 may be any electronic device capable of running a client video processing function, such as a smartphone, tablet, laptop, computer, or the like. The verification device 200 may be any electronic device capable of verifying the video processing function, such as a smartphone, tablet, laptop, computer, or server. The server may be an independent physical server, or a server cluster or distributed system consisting of multiple physical servers. The server may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. This is not a limitation here.

[0045] It should be noted that the terminal 100 and the verification device 200 can be independent electronic devices, for example, the terminal 100 is a smartphone, tablet, or laptop computer, and the verification device 200 is a server. The terminal 100 and the verification device 200 can also be the same electronic device, that is, the electronic device can run the client of the video processing function and can also verify the video processing function.

[0046] Figure 2 This is a flow chart of a method for verifying a video processing function according to an exemplary embodiment. Figure 1 The implementation environment shown and Figure 1 The verification device 200 in the environment of the illustrated embodiment is specifically implemented.

[0047] like Figure 2 As shown, in an exemplary embodiment, the method for verifying the video processing function may include steps S110 to S140, which are described in detail as follows:

[0048] Step S110: Obtain image feature data of the template video and the first image from a preset template library.

[0049] It should be noted that in this embodiment, a template library, namely a preset template library, is pre-set. The template library contains template videos and image feature data of the first image. The number and types of template videos included in the preset template library can be flexibly set according to actual needs. The preset template library can be stored locally or on a network, such as cloud storage.

[0050] The template video is a video used to verify the video processing function to be verified, and can be flexibly set according to actual needs.

[0051] Video processing functions are functional modules used to process videos, such as cropping functions and adding special effects, which can be implemented using computer vision technology. A video processing function to be verified is a video processing function that needs to be verified for abnormalities. This can be a video processing function in video editing software, such as the "fireworks" special effects function in the "Weishi" app (application). It can also be a video processing function in a video editing website.

[0052] The first image is an image in the standard video, that is, a video frame of the standard video. The number of first images can be flexibly set according to actual needs. For example, every frame of the standard video can be used as the first image, that is, the number of first images is equal to the number of video frames in the standard video.

[0053] The standard video is a video obtained by processing the template video to realize the video processing function to be verified, that is, a video obtained after processing the template video and achieving the effect corresponding to the video processing function to be verified. Among them, the template video can be processed in advance by the video processing function to be verified, and the processed template video can be manually inspected, and the video that passes the manual inspection will be used as the standard video. For example, assuming that the video processing function to be verified is the function of adding "stars" special effects, the "stars" special effects function can be started in advance to process the template video to obtain the processed template video, and the processed template video can be manually inspected to see whether "stars" have been added. If so, the processed template video will be used as the standard video.

[0054] The image feature data of the first image is extracted from the first image based on a preset data extraction algorithm. The preset data extraction algorithm can be flexibly set according to actual needs and can be implemented using computer vision technology.

[0055] In this embodiment, when the to-be-verified video processing function needs to be verified, the template video and the image feature data of the first image are obtained from a preset template library.

[0056] In order to ensure that the video processing function to be verified is in a normal state, the image feature data of the template video and the first image may be regularly obtained from the preset template library to regularly verify the video processing function to be verified.

[0057] Step S120 , starting the to-be-verified video processing function to process the template video to obtain the to-be-verified video.

[0058] It should be understood that the video processing function may experience anomalies during operation. For example, after a user downloads and installs video editing software, the video processing function may experience anomalies during the operation of the video editing software. To verify whether the video processing function to be verified is abnormal, the video processing function to be verified can be activated and the template video can be processed by the video processing function to obtain the video to be verified.

[0059] Step S130 : extracting image feature data from the second image of the video to be verified based on a preset data extraction algorithm, and comparing the image feature data of the second image with the image feature data of the first image.

[0060] The second image is an image in the video to be verified, that is, a video frame in the video to be verified. In order to ensure that the comparison is reference-based, the position of the second image in the video to be verified is the same as the position of the first image in the standard video. For example, assuming that the first image is the second video frame in the standard video, the second image is the second video frame in the video to be verified. Assuming that the first image is the fifth video frame in the standard video, the second image is the fifth video frame in the video to be verified. It should be noted that the second frame and the fifth frame here are the frame numbers of the video frames in the video. The larger the frame number, the later the corresponding playback time.

[0061] Based on a preset data extraction algorithm, image feature data is extracted from the second image. This image feature data is then compared with the image feature data of the first image to determine whether the video processing function to be verified is abnormal based on the comparison results. Because the image feature data is extracted from the second image in the same manner as from the first image, both being based on the preset data extraction algorithm, the comparison is more reliable.

[0062] Step S140 : If the image feature data of the second image does not match the image feature data of the first image, it is determined that the video processing function to be verified is abnormal.

[0063] Since the standard video is a video obtained by processing the template video to realize the video processing function to be verified, the video to be verified is a video obtained by processing the template video through the video processing function to be verified, the first image is an image in the standard video, and the second image is an image in the video to be verified. The position of the first image in the standard video is the same as the position of the second image in the video to be verified, and the extraction algorithm of the image feature data of the first image is also the same as the extraction algorithm of the image feature data of the second image. If the video processing function to be verified is normal, the image feature data of the second image is usually matched with the image feature data of the first image; therefore, in this embodiment, if the comparison result is that the image feature data of the second image does not match the image feature data of the first image, it is determined that the video processing function to be verified is abnormal.

[0064] Wherein, when the image feature data of the second image is the same as the image feature data of the first image, it can be determined that the image feature data of the second image matches the image feature data of the first image; when the image feature data of the second image is different from the image feature data of the first image, it can be determined that the image feature data of the second image does not match the image feature data of the first image. Alternatively, when the similarity between the image feature data of the second image and the image feature data of the first image is greater than or equal to a preset first threshold, it can be determined that the image feature data of the second image matches the image feature data of the first image; when the similarity between the image feature data of the second image and the image feature data of the first image is less than the preset first threshold, it can be determined that the image feature data of the second image does not match the image feature data of the first image, wherein the preset first threshold can be flexibly set according to actual needs, for example, it can be set to 90%, 80%, etc.

[0065] In this embodiment, image feature data of a template video and a first image are first obtained from a preset template library, wherein the image feature data of the first image is extracted from the first image of a standard video based on a preset data extraction algorithm, and the standard video is a video that realizes the video processing function to be verified after processing the template video; then, the video processing function to be verified is started to process the template video to obtain the video to be verified, and image feature data is extracted from the second image of the video to be verified based on the preset data extraction algorithm, and the image feature data of the second image is compared with the image feature data of the first image, wherein the position of the second image in the video to be verified is the same as the position of the first image in the standard video; if the image feature data of the second image does not match the image feature data of the first image, it is determined that the video processing function to be verified is abnormal, thereby realizing automatic verification of whether the video processing function is abnormal at the image level, without the need for manual visual judgment, reducing manpower, improving efficiency, and reducing costs, and verifying the video processing function through comparison of image feature data can reduce the amount of comparison and further improve efficiency.

[0066] In one exemplary embodiment, the image feature data of the first image includes pixel values ​​for each pixel within a first target area, where the first target area is a portion of the image area within the first image. It should be noted that the pixel value represents the color of the pixel, and can be an RGB (red, green, blue) value or an HSV (Hue, Saturation, Value) value. Of course, values ​​from other color systems can also be used as pixel values. The position, shape, and size of the first target area can be flexibly set according to actual needs. For example, the focal point of an image is typically at the center of the image; therefore, the first target area can be located at the center of the first image. The shape of the first target area can be a regular shape such as a rectangle, triangle, or circle, or an irregular shape. The area of ​​the first target area can be 1 / 2, 1 / 5, or 1 / 10 of the first image, for example.

[0067] See also Figure 3 , Figure 3 Under the condition that the image feature data of the first image includes the pixel value of each pixel point in the first target area, and the first target area is a partial image area in the first image, Figure 2 The flowchart of step S130 in the embodiment shown is in an exemplary embodiment. Figure 3 As shown, based on a preset data extraction algorithm, the process of extracting image feature data from the second image of the video to be verified and comparing the image feature data of the second image with the image feature data of the first image may include steps S131 to S132, which are described in detail as follows:

[0068] Step S131 : determining a second target area from the second image based on a preset data extraction algorithm.

[0069] Since the image feature data of the first image includes the pixel value of each pixel point in the first target area, the image feature data of the second image includes the pixel value of each pixel point in the second target area, wherein the position of the second target area in the second image is the same as the position of the first target area in the first image.

[0070] Therefore, in this embodiment, the second target area is determined from the second image based on a preset data extraction algorithm.

[0071] Step S132 : comparing the pixel value of each pixel point in the second target area with the pixel value of each pixel point in the first target area.

[0072] The pixel value of each pixel point in the second target area is compared with the pixel value of each pixel point in the first target area to determine whether the image feature data of the second image matches the image feature data of the first image based on the comparison result, thereby determining whether the video processing function to be verified is abnormal.

[0073] It should be noted that, when performing the comparison, the positions of the two pixel points being compared are the same. For example, if the A2 pixel point in the second target area is compared with the A1 pixel point in the first target area, the position of the A2 pixel point in the second image is the same as the position of the A1 pixel point in the first image. For example, if the first image and the second image establish a coordinate system with the pixel point at the same position as the origin, the pixel points with the same coordinates have the same position. Assuming that the second target area includes a pixel point with coordinates (0, 1), the pixel point is compared with the pixel point with coordinates (0, 1) in the first target area. Assuming that the second target area also includes a pixel point with coordinates (2, 3), the pixel point is compared with the pixel point with coordinates (2, 3) in the first target area.

[0074] The image feature data of the second image can be determined to match the image feature data of the first image when the pixel value of each pixel in the second target area matches the pixel value of the corresponding pixel in the first target area. Alternatively, the image feature data of the second image can be determined to match the image feature data of the first image when the ratio of the number of pixel points with matching pixel values ​​to the total number of pixels in the second target area is greater than or equal to a preset second threshold. The image feature data of the second image can be determined to not match the image feature data of the first image when the ratio of the number of pixel points with matching pixel values ​​to the total number of pixels in the second target area is less than the preset second threshold. The pixel points with matching pixel values ​​are pixels in the second target area, and the pixel values ​​of the pixels match the pixel values ​​of the corresponding pixels in the first target area. The preset second threshold can be flexibly set according to actual needs, such as 90%, 80%, etc. For example, assuming that the second target area includes 100 pixels and the preset second threshold is 90%, if the pixel values ​​of 90 pixels in the second target area match the pixel values ​​of the corresponding pixels in the first target area, then the image feature data of the second image is determined to match the image feature data of the first image.

[0075] It should be noted that, two pixel values ​​match can be: the two pixel values ​​are exactly the same. For example, assuming that RGB values ​​are used as pixel values, one RGB value is (0, 2, 3), and if the other RGB value is also (0, 2, 3), then the two pixel values ​​are determined to match. Alternatively, in order to avoid errors caused by uncertain factors, two pixel values ​​match can be: the difference between the two pixel values ​​is less than a preset third threshold, wherein the preset third threshold can be set to 5, 8, 2, etc., and its specific value can be flexibly set according to actual needs; for example, assuming that RGB values ​​are used as pixel values, one RGB value is (1, 2, 3) and the other RGB value is (7, 5, 1), then the difference between the two pixel values ​​is: (7-1)+(5-2)+(3-1)=11. If the preset third threshold is 15, then the two pixel values ​​match. If the preset third threshold is 5, then the two pixel values ​​do not match.

[0076] In this embodiment, by comparing pixel values ​​of partial image areas in the first image and the second image, the video processing function is verified according to the comparison result, which can reduce the comparison amount and improve the verification efficiency.

[0077] In an exemplary embodiment, the image feature data of the first image includes: a first coordinate sequence consisting of coordinates of each first target pixel point; wherein the first target pixel point is a pixel point in the first image that meets a preset condition. The first coordinate sequence may be a sequence consisting of the complete coordinates of each first target pixel point. For example, assuming that the coordinates of each first target pixel point are (0, 1), (2, 1), (3, 1), (2, 2), (5, 2), (6, 2), respectively, the first coordinate sequence includes {(0, 1), (2, 1), (3, 1), (2, 2), (5, 2), (6, 2)}. Alternatively, in order to further reduce the amount of data processing, the first coordinate sequence may include multiple subsequences, one subsequence includes the horizontal coordinates of the first target pixel points belonging to the same row, and records the row number corresponding to each subsequence (wherein the row number is used to characterize the position of the pixel point, such as the first row, the second row, etc.); for example, assuming that the first target pixel points include (0, 1), (2, 1), (3, 1), (2, 2), (4, 2), (6, 2), (2, 3), and (4, 3), then it includes 3 rows, where the subsequence corresponding to the first row (the row with the vertical coordinate of 1) is {0, 2, 3}, the subsequence corresponding to the second row (the row with the vertical coordinate of 2) is {2, 4, 6}, and the subsequence corresponding to the third row (the row with the vertical coordinate of 3) is {2, 4}.

[0078] It should be noted that the preset conditions can be flexibly set according to actual needs. For example, they can be set to the pixel with the largest pixel value, the pixel with the smallest pixel value, etc. In this embodiment, a number of pixel points that meet the preset conditions are determined from the first image. Then, the coordinates of the determined pixel points are combined into a coordinate sequence to obtain a first coordinate sequence. The image feature data of the first image includes the first coordinate sequence.

[0079] See also Figure 4 , Figure 4 Under the condition that the image feature data of the first image includes a first coordinate sequence, Figure 2 The flowchart of step S130 in the embodiment shown is in an exemplary embodiment. Figure 4 As shown, based on a preset data extraction algorithm, the process of extracting image feature data from the second image of the video to be verified and comparing the image feature data of the second image with the image feature data of the first image may include steps S133 to S135, which are described in detail as follows:

[0080] Step S133: Determine pixels that meet a preset condition from the second image of the video to be verified, and use the determined pixels as second target pixels.

[0081] The second target pixel is a pixel in the second image that meets a preset condition. In this embodiment, after obtaining the video to be verified, the second target pixel is determined from the second image of the video to be verified.

[0082] Step S134: obtaining a second coordinate sequence based on the coordinates of the second target pixel point.

[0083] After the second target pixel point is determined, a second coordinate sequence is obtained based on the coordinates of the second target pixel point.

[0084] It should be noted that the method for obtaining the second coordinate sequence based on the coordinates of the second target pixel point is the same as the method for obtaining the first coordinate sequence based on the coordinates of the first target pixel point. For example, if the first coordinate sequence is a sequence composed of the complete coordinates of each first target pixel point, then the second coordinate sequence is also a sequence composed of the complete coordinates of each second target pixel point. If the first coordinate sequence includes multiple subsequences, one subsequence includes the horizontal coordinates of the first target pixel points belonging to the same row, and the row number corresponding to each subsequence is recorded; then the second coordinate sequence may include multiple subsequences, one subsequence includes the horizontal coordinates of the second target pixel points belonging to the same row, and the row number corresponding to each subsequence is recorded; in this way, when the second coordinate sequence is compared with the first coordinate sequence, the number of rows of the two subsequences to be compared is the same. For example, if the B2 subsequence in the second coordinate sequence is compared with the B1 subsequence in the first coordinate sequence, the number of rows corresponding to the B2 subsequence is the same as the number of rows corresponding to the B1 subsequence.

[0085] Step S135 : comparing the second coordinate sequence with the first coordinate sequence.

[0086] After obtaining the second coordinate sequence, the second coordinate sequence is compared with the first coordinate sequence to determine whether the image feature data of the second image matches the image feature data of the first image based on the comparison result. If the second coordinate sequence does not match the first coordinate sequence, then the image feature data of the second image does not match the image feature data of the first image.

[0087] The second coordinate sequence matches the first coordinate sequence if the second coordinate sequence is exactly the same as the first coordinate sequence. For example, assuming the first coordinate sequence is {(1, 2), (2, 3), (7, 8)}, if the second coordinate sequence is also {(1, 2), (2, 3), (7, 8)}, then the second coordinate sequence is determined to be the same as the first coordinate sequence. Alternatively, the second coordinate sequence matches the first coordinate sequence if the ratio of the number of identical coordinates in the second coordinate sequence and the first coordinate sequence to the total number of coordinates in the second coordinate sequence exceeds a preset fourth threshold. The preset fourth threshold may be 90%, 80%, or the like, and the specific value may be flexibly set according to actual needs. For example, assuming that the preset fourth threshold is 70%, the first coordinate sequence is {(1, 3), (2, 4), (7, 8), (7, 10), (7, 18)}, and the second coordinate sequence is {(1, 3), (2, 4), (7, 8), (7, 10), (7, 15)}, then there are four identical coordinates in the first coordinate sequence and the second coordinate sequence, and the ratio is 80%, which exceeds the preset fourth threshold. In this case, the first coordinate sequence matches the second coordinate sequence.

[0088] In this embodiment, a first target pixel point that meets the preset conditions is determined from the first image, and a first coordinate sequence is determined based on the coordinates of the first target pixel point, and the first coordinate sequence is stored in a template library. A second target pixel point that meets the preset conditions is determined from the second image, and a second coordinate sequence is determined based on the coordinates of the second target pixel point. The first coordinate sequence is compared with the second coordinate sequence, and whether the video processing function to be verified is abnormal is determined based on the comparison result. In this way, complex image data can be converted into a small amount of data and stored in the template library, and the image feature data can be simplified from pixel values ​​to coordinate sequences, which greatly improves the comparison efficiency and can quickly, efficiently and reliably verify the video processing function.

[0089] In an exemplary embodiment, the video processing function to be verified is a cutout function, which is used to determine the target object to be retained from the image and modify the pixel values ​​of the pixels outside the target object to preset pixel values; the preset pixel values ​​can be flexibly set according to actual needs, for example, the RGB value can be set to (0, 0, 0). Among them, the cutout function can be a portrait cutout function, and the target object is a portrait. The portrait cutout function is used to determine the portrait from the image and set the area outside the portrait to the preset pixel value. For example, see Figure 5-1 、 Figure 5-2 As shown, Figure 5-1 is the original image, Figure 5-2 This is the image processed to achieve the portrait cutout function. The cutout function can also be color keying, where the target object is an area corresponding to a specific color. Color keying is used to determine the area corresponding to the specific color in the image and modify the pixel values ​​of the pixels outside the determined area to a preset pixel value.

[0090] The first target pixel is a pixel corresponding to the outline of the target object in the first image. Since the outline of the target object can indicate whether the cutout function is achieved, the pixel corresponding to the outline of the target object can be selected as the first target pixel.

[0091] Under the condition that the video processing function to be verified is a cutout function, and the first target pixel point is a pixel point corresponding to the outline of the target object in the first image, Figure 4 Step S133 shown includes steps S210 to S220, which are described in detail as follows:

[0092] Step S210: Determine pixel points corresponding to the outline of the target object from the second image.

[0093] After obtaining the video to be verified, the pixel points corresponding to the outline of the target object are determined from the second image of the video to be verified.

[0094] Step S220 : taking the pixel point corresponding to the determined outline of the target object as the second target pixel point.

[0095] The pixel point corresponding to the determined outline of the target object is used as the second target pixel point.

[0096] The specific methods for determining the pixel points corresponding to the outline of the target object from the second image include but are not limited to the following two methods:

[0097] In the first method, the process of determining the pixel points corresponding to the outline of the target object from the second image includes steps S211 and S212, which are described in detail as follows:

[0098] Step S211 : For each row of the second image, pixels of the same type and continuous positions are divided into the same pixel region to obtain at least one pixel region.

[0099] The types include a first type in which the pixel value is a preset pixel value, and a second type in which the pixel value is a non-preset pixel value.

[0100] For each row of the second image, pixels of the same type and continuous positions are divided into the same pixel region, thereby obtaining at least one pixel region. For example, see Figure 6 As shown, assuming Figure 6 The second image includes 2 rows, each row includes 20 pixels, a square grid represents a pixel point, a square grid filled with diagonal lines represents a pixel point whose pixel value is not a preset pixel value (i.e., a pixel point of the second type), and a square grid without diagonal lines represents a pixel point whose pixel value is a preset pixel value (i.e., a pixel point of the first type). For the first row, after dividing the pixels of the same type and continuous positions into the same pixel area, 7 pixel areas are obtained, namely 611-617; for the second row, after dividing the pixels of the same type and continuous positions into the same pixel area, 5 pixel areas are obtained, namely 621-625.

[0101] Step S212 : determining a starting pixel point of each pixel area in at least one pixel area, and using the starting pixel point of each pixel area as a pixel point corresponding to the contour of the target object.

[0102] After obtaining the pixel area of ​​each row, determine the starting pixel point of each pixel area, and use the starting pixel point as the pixel point corresponding to the contour of the target object, that is, the second target pixel point. The starting pixel point is the pixel point with the smallest horizontal coordinate in the pixel area. For example, see Figure 6As shown, it is assumed that a coordinate system is established with the pixel point in the lower left corner as the origin, wherein the horizontal coordinate includes 0-19 and the vertical coordinate includes 0-1. The coordinates of the starting pixel point of pixel area 611 are (0, 1), the coordinates of the starting pixel point of pixel area 612 are (2, 1), the coordinates of the starting pixel point of pixel area 621 are (0, 0), the coordinates of the starting pixel point of pixel area 622 are (2, 0), and the coordinates of the starting pixel point of pixel area 623 are (5, 0). Similarly, the starting pixel points of other pixel areas can be determined. For the first row, the coordinates of the pixel points corresponding to the contour of the target object (i.e., the second target pixel points) are (0, 1), (2, 1), (7, 1), (11, 1), (14, 1), (15, 1), and (17, 1), respectively. For the second row, the coordinates of the pixel points corresponding to the contour of the target object (i.e., the second target pixel points) are (0, 0), (2, 0), (5, 0), (9, 0), and (12, 0), respectively. Then, based on the coordinates of the second target pixel point, a second coordinate sequence is obtained: {(0, 1), (2, 1), (7, 1), (11, 1), (14, 1), (15, 1), (17, 1), (0, 0), (2, 0), (5, 0), (9, 0), (12, 0)}.

[0103] It should be noted that in this method, for each row in the second image, if the pixel value of the pixel point in the first pixel area (the pixel area with the smallest horizontal coordinate) is a preset pixel value (i.e., the first type), then the pixel area can be discarded, and only the starting pixel point in the remaining pixel area is determined, and the determined starting pixel point is used as the second target pixel point; that is, for each row in the second image, in order from small to large horizontal coordinates, first use the pixel point with the smallest horizontal coordinate as the starting point to determine the first pixel point whose pixel value is not the preset pixel value; then, using the determined pixel point as the starting point, determine the first pixel point whose pixel value is the preset pixel value from the subsequent pixel points; then, using the determined pixel point as the starting point, determine the first pixel point whose pixel value is not the preset pixel value from the subsequent pixel points, and repeat this cycle until all the pixel points in the row are traversed, and the determined pixel point is used as the pixel point corresponding to the contour of the target object. For example, see Figure 6As shown, in the first row, the first pixel area is pixel area 611. Since the pixel values ​​of the pixels in pixel area 611 are preset pixel values ​​(i.e., the first type), pixel area 611 is discarded and the starting pixel points of pixel areas 612-617 are determined, thereby obtaining the coordinate sequence {(2, 1), (7, 1), (11, 1), (14, 1), (15, 1), (17, 1)} corresponding to the first row. That is, for the first row, in ascending order of the horizontal coordinates, first determine the first pixel point whose pixel value is not the preset pixel value, i.e., (2, 1). Then, after determining (2, 1), the first pixel point whose pixel value is the preset pixel value, i.e., (7, 1). Then, after determining (7, 1), the first pixel point whose pixel value is not the preset pixel value, i.e., (11, 1). Thus, (2, 1), (7, 1), (11, 1), (14, 1), (15, 1), (17, 1) are determined.

[0104] In the second method, the process of determining the pixel points corresponding to the outline of the target object from the second image includes: for each row of the second image, determining the pixel point with the smallest horizontal coordinate and the pixel point with the largest horizontal coordinate from the pixel points whose pixel values ​​are not preset pixel values, and using the pixel point with the smallest horizontal coordinate and the pixel point with the largest horizontal coordinate as the pixel points corresponding to the outline of the target object.

[0105] For each row of the second image, pixel points whose pixel values ​​are not preset pixel values ​​are determined, and the pixel point with the smallest horizontal coordinate and the pixel point with the largest horizontal coordinate are selected from the determined pixel points as the pixel points corresponding to the outline of the target object, that is, the second target pixel points.

[0106] For example, see Figure 6 As shown, for the first row, the coordinates of the pixel point whose pixel value is not the preset pixel value and whose horizontal coordinate is the smallest are (2, 1), and the coordinates of the pixel point whose pixel value is not the preset pixel value and whose horizontal coordinate is the largest are (16, 1); for the second row, the coordinates of the pixel point whose pixel value is not the preset pixel value and whose horizontal coordinate is the smallest are (2, 0), and the coordinates of the pixel point whose pixel value is not the preset pixel value and whose horizontal coordinate is the largest are (11, 0).

[0107] It should be noted that since the acquisition process of the first coordinate sequence is the same as that of the second coordinate sequence, the specific process of acquiring the first coordinate sequence can refer to the specific process of acquiring the second coordinate sequence. The specific process of acquiring the first coordinate sequence will not be repeated in this embodiment.

[0108] In an exemplary embodiment, when the video processing function to be verified is a cutout function, the image feature data of the first image includes: a first coordinate sequence composed of coordinates of each first target pixel point, and the first target pixel point is a pixel point corresponding to the outline of the target object in the first image. Figure 4After step S135, the method for verifying the video processing function further includes step S136, which is described in detail as follows:

[0109] Step S136 : If the second coordinate sequence does not match the first coordinate sequence, then determine the image feature data of the second image and the image feature data of the first image, and the mismatch type is target object contour mismatch.

[0110] The second coordinate sequence is compared with the first coordinate sequence. If the comparison result shows that the second coordinate sequence does not match the first coordinate sequence, it means that the image feature data of the second image does not match the image feature data of the first image, and the type of mismatch is target object contour mismatch.

[0111] In an exemplary embodiment, the video processing function to be verified is a cutout function, and the image feature data of the first image includes: a first coordinate sequence composed of the coordinates of each first target pixel point, and the first target pixel point is a pixel point corresponding to the outline of the target object in the first image. The image feature data of the first image also includes a first pixel value sequence corresponding to the pixel points whose pixel values ​​are not preset pixel values ​​in the first coordinate sequence; for example, assuming that the first coordinate sequence is {(0, 1), (2, 1), (7, 1), (11, 1)}, wherein the pixel values ​​of the pixel points (2, 1) and (7, 1) are not preset pixel values, and the pixel value of the pixel point (2, 1) is (100, 20, 50), and the pixel value of the pixel point (7, 1) is (120, 15, 38), then the first pixel value sequence is {(100, 20, 50), (120, 15, 38)}. Under this condition, Figure 4 After step S135, the method for verifying the video processing function further includes steps S310-S340, which are described in detail as follows:

[0112] Step S310 : If the second coordinate sequence matches the first coordinate sequence, then determine pixel points in the second coordinate sequence whose pixel values ​​are not preset pixel values.

[0113] If the second coordinate sequence matches the first coordinate sequence, it means that the contours of the target object in the second image and the first image match. In order to further confirm whether the content of the target object in the second image and the first image has changed, the pixel points in the second coordinate sequence whose pixel values ​​are preset pixel values ​​are determined.

[0114] Step S320: Obtain a second pixel value sequence based on the determined pixel value of the pixel point.

[0115] Based on the determined pixel values ​​of the pixels, a second pixel value sequence is obtained.

[0116] Step S330 : comparing the first pixel value sequence with the second pixel value sequence.

[0117] The first pixel value sequence is compared with the second pixel value sequence.

[0118] During the comparison, a pixel value in the first pixel value sequence is only compared with the pixel value at the corresponding position in the second pixel value sequence. For example, the first pixel value in the first pixel value sequence is compared with the first pixel value in the second pixel value sequence, and the second pixel value in the first pixel value sequence is compared with the second pixel value in the second pixel value sequence.

[0119] Step S340 : If the first pixel value sequence does not match the second pixel value sequence, then determine that the image feature data of the second image and the image feature data of the first image are not matched, and the mismatch type is that the target object pixel value does not match.

[0120] If the first pixel value sequence does not match the second pixel value sequence, it indicates that the image feature data of the second image does not match the image feature data of the first image, and the mismatch type is target object pixel value mismatch.

[0121] Wherein, the first pixel value sequence and the second pixel value sequence can be determined to match when each pixel value in the first pixel value sequence matches each pixel value in the second pixel value sequence; the first pixel value sequence and the second pixel value sequence can be determined to not match when there is at least one pixel value in the first pixel value sequence that does not match the pixel value at the corresponding position in the second pixel value sequence. Alternatively, the first pixel value sequence and the second pixel value sequence can be determined to match when the ratio of the number of matching pixel values ​​in the second pixel value sequence and the first pixel value sequence to the total number of pixel values ​​in the second pixel value sequence is greater than or equal to a preset fifth threshold; the first pixel value sequence and the second pixel value sequence can be determined to not match when the ratio of the number of matching pixel values ​​in the second pixel value sequence and the first pixel value sequence to the total number of pixel values ​​in the second pixel value sequence is less than the preset fifth threshold. Wherein, the preset fifth threshold can be flexibly set according to actual needs. For example, assuming the fifth threshold is preset to 89%, and the second pixel value sequence includes 10 pixel values, 8 of which match pixel values ​​in the first pixel value sequence. Therefore, the ratio is 8 / 10, and the second pixel value sequence does not match the first pixel value sequence. It should be noted that how to determine whether two pixel values ​​match is described above and will not be further described here.

[0122] In an exemplary embodiment, the method for verifying a video processing function further includes: after determining that the video processing function to be verified is abnormal, outputting abnormality information. The abnormality information includes the location of the second image in the video to be verified that is mismatched, and the type of mismatch. This facilitates maintenance personnel to repair the video processing function to be verified based on the abnormality information.

[0123] It should be noted that the method of outputting function abnormality messages can be flexibly set according to actual needs. For example, the function abnormality message can be sent to a preset mailbox, which can be the mailbox of the maintenance personnel, so that the maintenance personnel can quickly repair the video processing function.

[0124] In an exemplary embodiment, the first image is a video frame selected from a standard video based on a preset video frame selection method. To reduce the number of comparisons, the number of first images is smaller than the number of video frames in the standard video. The preset video frame selection method can be flexibly configured based on actual needs. For example, since the cover of a video is typically the focal point, the cover of the standard video can be selected as the first image. Alternatively, the first video frame of the standard video can be selected as the first image.

[0125] Under this condition, Figure 1 Before step S130 shown, the method for verifying the video processing function may further include: based on the position of the first image in the standard video, selecting a video frame at a corresponding position from the video to be verified as the second image.

[0126] For example, if the first image is the cover of a standard video, the cover of the video to be verified is used as the second image; if the first image is the first frame of the standard video, the first frame of the video to be verified is used as the second image.

[0127] In an exemplary embodiment, when the number of first images is greater than or equal to 2, Figure 1 The specific implementation methods of step S130 include but are not limited to the following two methods:

[0128] The first method: based on a preset data extraction algorithm, extract image feature data from each second image; sequentially compare the image feature data of each second image with the image feature data of each first image until all second images are compared.

[0129] That is to say, each second image will be compared with the corresponding first image. This improves the verification accuracy, and when the functional abnormality information is subsequently output, the comparison result of each second image can be known. For example, assuming that the second image includes three images C1, C2, and C3, and the first image includes three images D1, D2, and D3, where C1 corresponds to D1, C2 corresponds to D2, and C3 corresponds to D3, then the image feature data of C1 is compared with the image feature data of D1, the image feature data of C2 is compared with the image feature data of D2, and the image feature data of C3 is compared with the image feature data of D3, and the comparison results are obtained.

[0130] The second method: based on a preset data extraction algorithm, extract image feature data from each second image; compare the image feature data of each second image with the image feature data of each first image in turn, and stop comparing if the image feature data of the second image does not match the image feature data of the first image.

[0131] Based on a preset data extraction algorithm, image feature data is extracted from each second image, and the image feature data of each second image is sequentially compared with the image feature data of the corresponding first image. If the image feature data of the second image does not match the image feature data of the second image, it indicates that the video processing function to be verified is abnormal. Therefore, the comparison is stopped, thereby reducing the data processing volume and improving the response speed. For example, assuming that the second images include three images E1, E2, and E3, and the first images include three images F1, F2, and F3, where E1 corresponds to F1, E2 corresponds to F2, and E3 corresponds to F3, the image feature data of E1 is first compared with the image feature data of F1. If the comparison result is a match, the image feature data of E2 is then compared with the image feature data of F2; if the comparison result is a mismatch, the comparison is stopped.

[0132] Figure 7 FIG1 is a block diagram of a device for verifying a video processing function according to an exemplary embodiment of the present invention. The device includes:

[0133] The acquisition module 710 is configured to obtain image feature data of the template video and the first image from a preset template library; the image feature data of the first image is extracted from the first image of the standard video based on a preset data extraction algorithm; the standard video is a video that realizes the video processing function to be verified after processing the template video; the processing module 720 is configured to start the video processing function to be verified to process the template video to obtain the video to be verified; the comparison module 730 is configured to extract image feature data from the second image of the video to be verified based on a preset data extraction algorithm, and compare the image feature data of the second image with the image feature data of the first image; wherein the position of the second image in the video to be verified is the same as the position of the first image in the standard video; the verification module 740 is configured to determine that the video processing function to be verified is abnormal if the image feature data of the second image does not match the image feature data of the first image.

[0134] In another exemplary embodiment, under the condition that the image feature data of the first image includes pixel values ​​of each pixel point in the first target area, and the first target area is a partial image area in the first image, the comparison module 730 includes:

[0135] The region determination module is configured to determine a second target region from the second image based on a preset data extraction algorithm; wherein a position of the second target region in the second image is the same as a position of the first target region in the first image.

[0136] The pixel value comparison module is configured to compare the pixel value of each pixel point in the second target area with the pixel value of each pixel point in the first target area.

[0137] In another exemplary embodiment, when the image feature data of the first image includes a first coordinate sequence consisting of coordinates of first target pixels, and the first target pixels are pixels in the first image that meet a preset condition, the comparison module 730 includes:

[0138] The pixel point determination module is configured to determine the pixel points that meet the preset conditions from the second image of the video to be verified, and use the determined pixel points as the second target pixel points.

[0139] The coordinate sequence determining module is configured to obtain a second coordinate sequence based on the coordinates of the second target pixel point.

[0140] The coordinate sequence comparison module is configured to compare the second coordinate sequence with the first coordinate sequence.

[0141] In another exemplary embodiment, when the video processing function to be verified is a cutout function, the cutout function is used to determine a target object to be retained from an image and modify the pixel values ​​of pixels outside the target object to preset pixel values; and when the first target pixel is a pixel corresponding to the outline of the target object in the first image, the pixel determination module includes:

[0142] The contour pixel point determination module is configured to determine the pixel points corresponding to the contour of the target object from the second image.

[0143] The target pixel point determination module is configured to use the pixel point corresponding to the determined outline of the target object as the second target pixel point.

[0144] In another exemplary embodiment, the contour pixel point determination module includes:

[0145] The division module is configured to divide pixel points of the same type and continuous position into the same pixel area for each row of the second image to obtain at least one pixel area; wherein the type includes a first type in which the pixel value is a preset pixel value and a second type in which the pixel value is not a preset pixel value.

[0146] The starting pixel point determination module is configured to determine the starting pixel point of each pixel area in at least one pixel area, and use the starting pixel point of each pixel area as the pixel point corresponding to the outline of the target object.

[0147] In another exemplary embodiment, the contour pixel point determination module includes:

[0148] The contour pixel determination submodule is configured to determine, for each row of the second image, the pixel point with the smallest horizontal coordinate and the pixel point with the largest horizontal coordinate from the pixel points whose pixel values ​​are not preset pixel values, and use the pixel point with the smallest horizontal coordinate and the pixel point with the largest horizontal coordinate as the pixel points corresponding to the contour of the target object.

[0149] In another exemplary embodiment, when the video processing function to be verified is a cutout function, the cutout function is used to determine a target object to be retained from an image and modify the pixel values ​​of pixels outside the target object to preset pixel values; and when the first target pixel point is a pixel point corresponding to the outline of the target object in the first image, the device further includes:

[0150] The first determining module is configured to determine that the image feature data of the second image and the image feature data of the first image do not match if the second coordinate sequence does not match the first coordinate sequence, and the mismatch type is that the target object contour does not match.

[0151] In another exemplary embodiment, the video processing function to be verified is a cutout function, the cutout function is used to determine a target object to be retained from an image, and modify the pixel values ​​of pixels outside the target object to preset pixel values; the first target pixel point is a pixel point corresponding to the outline of the target object in the first image; and the image feature data of the first image also includes a first pixel value sequence corresponding to pixel points with pixel values ​​other than the preset pixel values ​​in the first coordinate sequence, the device further includes:

[0152] The second determining module is configured to determine pixel points in the second coordinate sequence whose pixel values ​​are not preset pixel values ​​if the second coordinate sequence matches the first coordinate sequence.

[0153] The pixel value sequence determination module is configured to obtain a second pixel value sequence based on the pixel value of the determined pixel point.

[0154] The pixel value sequence comparison module is configured to compare the first pixel value sequence with the second pixel value sequence.

[0155] The third determination module is configured to determine that the image feature data of the second image does not match the image feature data of the first image if the first pixel value sequence does not match the second pixel value sequence, and the mismatch type is target object pixel value mismatch.

[0156] In another exemplary embodiment, the apparatus further comprises:

[0157] The output module is configured to output function abnormality information after determining that the processing function of the video to be verified is abnormal, and the function abnormality information includes: the position of the second image with a mismatch result in the video to be verified and the type of mismatch.

[0158] In another exemplary embodiment, under the condition that the first image is a video frame selected from a standard video based on a preset video frame selection method, and the number of the first image is less than the number of video frames in the standard video, the apparatus further includes:

[0159] The selection module is configured to select a video frame at a corresponding position from the video to be verified as the second image based on the position of the first image in the standard video.

[0160] In another exemplary embodiment, the selection module includes:

[0161] The first selection submodule is configured to use the cover of the video to be verified as the second image if the first image is the cover of a standard video.

[0162] The second selection submodule is configured to use the first frame of the video to be verified as the second image if the first image is the first frame of the standard video.

[0163] In another exemplary embodiment, under the condition that the number of first images is greater than or equal to 2 and the number of second images is greater than or equal to 2, the comparison module 730 includes:

[0164] The first comparison submodule is configured to extract image feature data from each second image based on a preset data extraction algorithm; and sequentially compare the image feature data of each second image with the image feature data of each first image until all second images have been compared.

[0165] The second comparison submodule is configured to extract image feature data from each second image based on a preset data extraction algorithm; compare the image feature data of each second image with the image feature data of each first image in turn, and stop comparing if the image feature data of the second image does not match the image feature data of the first image.

[0166] It should be noted that the apparatus provided in the above embodiment and the method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs operations has been described in detail in the method embodiment and will not be repeated here.

[0167] An embodiment of the present application further provides an electronic device, including a processor and a memory, wherein the memory stores computer-readable instructions, which, when executed by the processor, implement the verification method for the video processing function as described above.

[0168] Figure 8 The figure is a schematic structural diagram of an electronic device according to an exemplary embodiment.

[0169] It should be noted that the electronic device is only an example adapted for this application and cannot be considered to provide any limitation on the scope of use of this application. The electronic device cannot be interpreted as needing to rely on or must have Figure 8 One or more components of an exemplary electronic device shown in FIG.

[0170] like Figure 8 As shown in FIG. 8 , in an exemplary embodiment, the electronic device includes a processing component 801, a memory 802, a power supply component 803, a multimedia component 804, an audio component 805, a sensor component 807, and a communication component 808. Not all of the above components are required, and the electronic device may add other components or reduce certain components according to its own functional requirements, which is not limited in this embodiment.

[0171] The processing component 801 generally controls the overall operation of the electronic device, such as operations associated with display, data communication, and log data processing. The processing component 801 may include one or more processors 809 to execute instructions to complete all or part of the steps of the above operations. In addition, the processing component 801 may include one or more modules to facilitate interaction between the processing component 801 and other components. For example, the processing component 801 may include a multimedia module to facilitate interaction between the multimedia component 804 and the processing component 801.

[0172] The memory 802 is configured to store various types of data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device. The memory 802 stores one or more modules configured to be executed by the one or more processors 809 to complete all or part of the steps in the method described in the above embodiments.

[0173] The power supply component 803 provides power to various components of the electronic device. The power supply component 803 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device.

[0174] The multimedia component 804 includes a screen that provides an output interface between the electronic device and the user. In some embodiments, the screen may include a TP (Touch Panel) and an LCD (Liquid Crystal Display). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0175] The audio component 805 is configured to output and / or input audio signals. For example, the audio component 805 includes a microphone, and when the electronic device is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive external audio signals. In some embodiments, the audio component 805 also includes a speaker for outputting audio signals.

[0176] The sensor assembly 807 includes one or more sensors for providing status assessments of various aspects of the electronic device. For example, the sensor assembly 807 can detect the on / off status of the electronic device and can also detect temperature changes of the electronic device.

[0177] The communication component 808 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device can access a wireless network based on a communication standard, such as Wi-Fi (Wireless-Fidelity).

[0178] I understand. Figure 8 The structure shown is for illustration only. The electronic device may include Figure 8 More or fewer components as shown, or with Figure 8 Different components are shown. Figure 8 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0179] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. Among them, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that 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 the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0180] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. In some cases, the names of these units do not constitute limitations on the units themselves.

[0181] Another aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned method. The computer-readable storage medium may be included in the electronic device described in the above embodiments, or may exist independently without being incorporated into the electronic device.

[0182] It should be noted that the computer-readable storage medium of the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: 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), a 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 the present application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0183] Another aspect of the present application provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the above embodiments.

[0184] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. Ordinary technicians in this field can easily make corresponding changes or modifications based on the main ideas and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.

Claims

1. A method for verifying a video processing function, characterized in that: The method comprises: Obtaining image feature data of a template video and a first image from a preset template library; the image feature data of the first image is extracted from the first image of a standard video based on a preset data extraction algorithm; the standard video is a video obtained by processing the template video to implement the video processing function to be verified; Starting the to-be-verified video processing function to process the template video to obtain the to-be-verified video; extracting image feature data from a second image in the video to be verified based on the preset data extraction algorithm, and comparing the image feature data of the second image with the image feature data of the first image; wherein a position of the second image in the video to be verified is the same as a position of the first image in the standard video; If the image feature data of the second image does not match the image feature data of the first image, determining that the to-be-verified video processing function is abnormal; The image feature data of the first image includes: a first coordinate sequence composed of coordinates of each first target pixel point; the first target pixel point is a pixel point in the first image that meets a preset condition; The extracting image feature data from the second image of the video to be verified based on the preset data extraction algorithm, and comparing the image feature data of the second image with the image feature data of the first image, includes: Determining a pixel point that meets the preset condition from the second image of the video to be verified, and using the determined pixel point as the second target pixel point; Obtaining a second coordinate sequence based on the coordinates of the second target pixel point; The second coordinate sequence is aligned with the first coordinate sequence.

2. The method according to claim 1, wherein The image feature data of the first image includes pixel values ​​of each pixel point in a first target area; the first target area is a partial image area in the first image; The extracting image feature data from the second image of the video to be verified based on the preset data extraction algorithm, and comparing the image feature data of the second image with the image feature data of the first image, includes: Determining a second target area from the second image based on the preset data extraction algorithm; wherein a position of the second target area in the second image is the same as a position of the first target area in the first image; The pixel value of each pixel point in the second target area is compared with the pixel value of each pixel point in the first target area.

3. The method according to claim 1, wherein The video processing function to be verified is a cutout function, which is used to determine a target object to be retained from an image and modify the pixel values ​​of pixels outside the target object to preset pixel values; the first target pixel point is a pixel point corresponding to the outline of the target object in the first image; The step of determining a pixel point that meets the preset condition from the second image of the video to be verified, and using the determined pixel point as the second target pixel point, includes: Determining pixel points corresponding to the outline of the target object from the second image; The pixel point corresponding to the determined outline of the target object is used as the second target pixel point.

4. The method according to claim 3, wherein The determining, from the second image, pixel points corresponding to the outline of the target object includes: For each row of the second image, pixels of the same type and continuous positions are divided into the same pixel region to obtain at least one pixel region; wherein the types include a first type whose pixel values ​​are the preset pixel values ​​and a second type whose pixel values ​​are not the preset pixel values; Determine a starting pixel point of each pixel area in the at least one pixel area, and use the starting pixel point of each pixel area as a pixel point corresponding to the contour of the target object.

5. The method according to claim 3, wherein The determining, from the second image, pixel points corresponding to the outline of the target object includes: For each row of the second image, determine the pixel point with the smallest horizontal coordinate and the pixel point with the largest horizontal coordinate from the pixel points whose pixel values ​​are not the preset pixel values, and use the pixel point with the smallest horizontal coordinate and the pixel point with the largest horizontal coordinate as the pixel points corresponding to the outline of the target object.

6. The method according to claim 1, wherein The video processing function to be verified is a cutout function, which is used to determine a target object to be retained from an image and modify the pixel values ​​of pixels outside the target object to preset pixel values; the first target pixel point is a pixel point corresponding to the outline of the target object in the first image; After comparing the second coordinate sequence with the first coordinate sequence, the method further includes: If the second coordinate sequence does not match the first coordinate sequence, it is determined that the image feature data of the second image does not match the image feature data of the first image, and the mismatch type is that the target object contour does not match.

7. The method according to claim 1, wherein The video processing function to be verified is a cutout function, which is used to determine a target object to be retained from an image and modify the pixel values ​​of pixels outside the target object to preset pixel values; The first target pixel point is a pixel point corresponding to the outline of the target object in the first image; The image feature data of the first image further includes: a first pixel value sequence corresponding to pixel points in the first coordinate sequence whose pixel values ​​are not the preset pixel values; After comparing the second coordinate sequence with the first coordinate sequence, the method further includes: If the second coordinate sequence matches the first coordinate sequence, determining pixel points in the second coordinate sequence whose pixel values ​​are not the preset pixel values; Obtaining a second pixel value sequence based on the determined pixel values; Comparing the first pixel value sequence with the second pixel value sequence; If the first pixel value sequence does not match the second pixel value sequence, it is determined that the image feature data of the second image does not match the image feature data of the first image, and the mismatch type is that the target object pixel value does not match.

8. The method according to claim 7, wherein The method further comprises: After determining that the processing function of the video to be verified is abnormal, function abnormality information is output, where the function abnormality information includes: the position of the second image with a mismatch result in the video to be verified and the type of mismatch.

9. The method according to claim 1, wherein The first images are video frames selected from the standard video based on a preset video frame selection method; the number of the first images is less than the number of video frames in the standard video; Before extracting image feature data from the second image of the video to be verified, the method further includes: Based on the position of the first image in the standard video, a video frame at a corresponding position is selected from the video to be verified as the second image.

10. The method according to claim 9, wherein The selecting, based on the position of each of the first images in the standard video, a video frame corresponding to the position from the video to be verified as the second image includes: If the first image is the cover of the standard video, the cover of the video to be verified is used as the second image; If the first image is the first frame of the standard video, the first frame of the video to be verified is used as the second image.

11. The method according to claim 1, wherein The number of the first images is greater than or equal to 2, and the number of the second images is greater than or equal to 2; The extracting image feature data from the second image of the video to be verified based on the preset data extraction algorithm, and comparing the image feature data of the second image with the image feature data of the first image, includes: Extracting image feature data from each of the second images based on the preset data extraction algorithm; sequentially comparing the image feature data of each of the second images with the image feature data of each of the first images until all of the second images have been compared; or, Based on the preset data extraction algorithm, image feature data is extracted from each of the second images; the image feature data of each second image is compared with the image feature data of each first image in turn, and if the image feature data of the second image does not match the image feature data of the first image, the comparison is stopped.

12. A device for verifying a video processing function, characterized in that: include: an acquisition module configured to acquire image feature data of a template video and a first image from a preset template library; the image feature data of the first image is extracted from the first image of a standard video based on a preset data extraction algorithm; the standard video is a video obtained by processing the template video to implement the video processing function to be verified; a processing module configured to start the to-be-verified video processing function to process the template video to obtain the to-be-verified video; a comparison module configured to extract image feature data from a second image in the video to be verified based on the preset data extraction algorithm, and compare the image feature data of the second image with the image feature data of the first image; wherein a position of the second image in the video to be verified is the same as a position of the first image in the standard video; a verification module configured to determine that the video processing function to be verified is abnormal if the image feature data of the second image does not match the image feature data of the first image; The image feature data of the first image includes: a first coordinate sequence composed of coordinates of each first target pixel point; the first target pixel point is a pixel point in the first image that meets a preset condition; The extracting image feature data from the second image of the video to be verified based on the preset data extraction algorithm, and comparing the image feature data of the second image with the image feature data of the first image, includes: Determining a pixel point that meets the preset condition from the second image of the video to be verified, and using the determined pixel point as the second target pixel point; Obtaining a second coordinate sequence based on the coordinates of the second target pixel point; The second coordinate sequence is aligned with the first coordinate sequence.

13. An electronic device, characterized in that: include: a memory storing computer-readable instructions; The processor reads the computer-readable instructions stored in the memory to execute the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused 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 instructions, which are stored in a computer-readable storage medium. When the computer instructions are executed by a processor of a computer device, the computer device is caused to execute the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Video editing effect verification method and device

    CN112752098A