Image quality detection method, device, medium, electronic equipment and program product
Patent Information
- Application Number
- CN202510550125.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2026-10-30
AI Technical Summary
并且,偏色问题属于人眼可以轻易看出,但机器或脚本很难识别的问题
[0008]第五方面,本公开提供一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现本公开第一方面提供的所述画质检测方法的步骤。
Smart Images

Figure CN123020883A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of video image processing technology, and more specifically, to a method, apparatus, medium, electronic device, and program product for image quality detection. Background Technology
[0002] Before each version release, video editors undergo performance degradation testing to ensure the quality of the released version. Like stability and performance, image quality is a crucial dimension for evaluating the audio and video compositing capabilities of a video editor. Color cast is a sub-problem of image quality issues, which can be further categorized into reddish, greenish, bluish, bright, dark, deep, pale, global, local, and varying degrees of color cast across different regions. In short, color cast is a complex problem that is easily noticeable to the human eye but difficult for machines or scripts to detect. Therefore, automatically identifying color cast is a critical aspect of video editor performance degradation testing. Summary of the Invention
[0003] This summary section is provided to briefly introduce the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] Firstly, this disclosure provides an image quality detection method, including: Multiple pairs of video frames are obtained from the first video and the second video, wherein the first video and the second video are obtained by performing the same editing operation on the source video using different versions of video editors, and each pair of video frames in the multiple pairs of video frames consists of video frames with the same timestamp in the first video and the second video. For each pair of video frames in the plurality of pairs of video frames, the similarity between the pair of video frames is calculated; based on the similarity between the pair of video frames, the color cast information between the pair of video frames is determined.
[0005] Secondly, this disclosure provides an image quality detection device, comprising: The first acquisition module is used to acquire multiple pairs of video frames from the first video and the second video, wherein the first video and the second video are obtained by performing the same editing operation on the source video using different versions of video editors, and each pair of video frames in the multiple pairs of video frames consists of video frames with the same timestamp in the first video and the second video. The calculation module is used to calculate the similarity of each pair of video frames in the plurality of pairs of video frames; the determination module is used to determine the color cast information between the pair of video frames based on the similarity of the pair of video frames.
[0006] Thirdly, this disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the image quality detection method provided in the first aspect of this disclosure.
[0007] Fourthly, this disclosure provides an electronic device, comprising: A storage device on which computer programs are stored; A processing device is configured to execute the computer program in the storage device to implement the steps of the image quality detection method provided in the first aspect of this disclosure.
[0008] Fifthly, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the image quality detection method provided in the first aspect of this disclosure.
[0009] In the above technical solution, for each pair of video frames obtained from the first and second videos, the similarity of the pair is first calculated; then, based on the similarity, the color cast information between the pair is determined. The first and second videos are obtained by performing the same editing operations on the source videos using different versions of video editors, and each pair of video frames consists of video frames with the same timestamp from both the first and second videos. This enables automatic detection of color cast in the video editor, saving manpower and time costs. Furthermore, performing color cast detection directly at the data level of the video file, without rendering for display, simplifies the color cast detection process, reduces resource consumption, and improves detection efficiency.
[0010] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0011] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 This is a schematic diagram illustrating a solar spectrum according to an exemplary embodiment.
[0012] Figure 2 This is a flowchart illustrating a color acquisition and display process according to an exemplary embodiment.
[0013] Figure 3 This is a schematic diagram illustrating a different color space according to an exemplary embodiment.
[0014] Figure 4 This is a flowchart illustrating an image quality detection method according to an exemplary embodiment.
[0015] Figure 5A This is a schematic diagram illustrating a sub-image obtained after segmenting a video frame Z1 according to an exemplary embodiment.
[0016] Figure 5B This is a schematic diagram illustrating a sub-image obtained after Z2 segmentation of a video frame according to an exemplary embodiment.
[0017] Figure 6 This is a flowchart illustrating an image quality detection method according to an exemplary embodiment.
[0018] Figure 7 This is a block diagram illustrating an image quality detection device according to an exemplary embodiment.
[0019] Figure 8 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment. Detailed Implementation
[0020] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0021] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0022] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0023] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0024] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0025] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0026] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0027] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0028] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0029] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0030] Meanwhile, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0031] The terms "reddish," "greenish," "blued," "brighter," "darker," "deeper," and "lighter" mentioned in the background technology are largely subjective perceptions. Therefore, it's necessary to accurately define color cast. Before accurately defining color cast, we first need to understand the principles of color science to know what constitutes normal color display and what constitutes color cast.
[0032] like Figure 1 As shown, color is a characteristic of visible light; different wavelengths produce different colors.
[0033] Colors undergo a complex process involving acquisition, encoding, gamma correction, color space conversion, decoding, secondary color space conversion, and rendering before being perceived by the human eye. Specifically, for example... Figure 2 As shown, firstly, scene light is captured by a camera lens and converted to a linear RGB color space to more closely resemble human color perception. Next, gamma correction is applied to adapt to the non-linear characteristics of display devices, ensuring color consistency across different devices. Then, the video is converted to the widely used sRGB color space and further converted to the more compression-friendly YUV color space using conversion factors. Subsequently, the YUV video stream is encoded into the efficient H.265 / HEVC format and packaged into MP4 format for easy storage and transmission. During playback, the video file is decoded back to YUV format and converted back to the sRGB color space using conversion factors, ultimately converting it to a specific color space supported by the display device, such as the Rec. 2020 color space. After this series of processing steps, the colors are finally presented on the display device, providing viewers with a high-quality visual experience. Note that different display devices support different color spaces; for example, display device A supports different color spaces. Figure 3 The sRGB color space shown is supported by display device B. Figure 3 The SUPTE240M color space shown is supported by display device C. Figure 3 The ITU-R BT.2000 color space shown is supported by display devices D. Figure 3 The Display P3 color space shown means that when playing videos, the video needs to be converted to the color space supported by the corresponding display device.
[0034] The human eye can perceive the brightness (color depth), chroma (red, green, blue), and saturation (color intensity) of colors.
[0035] Therefore, color cast can be defined as a deviation in one or more dimensions, such as brightness, chroma, and saturation, perceived by the human eye after the original color is rendered by the display device. The presence of color cast indicates a problem in one or more stages of the color acquisition and display process. If two images are aligned at the data level, the final rendered image should be identical, meaning there should be no color cast. Therefore, color cast detection can be performed at the data level of audio / video files (e.g., MP4 files), thus eliminating the need for... Figure 1 The rendering and display process shown simplifies the color cast detection workflow, reduces resource consumption, and thus improves color cast detection efficiency.
[0036] Specifically, it can be done through Figure 4 The S101~S103 shown are used for color deviation detection.
[0037] In S101, multiple pairs of video frames are obtained from the first video and the second video.
[0038] In this disclosure, the first video and the second video are obtained by performing the same editing operations (e.g., adding the same special effects) on the source video using different versions of a video editor. The first video and the second video have the same video length and the same number of video frames. The two different versions can be a pending release version and the latest release version of the video editor, any two versions from the history of the video editor, or a pending release version and any historical release version of the video editor.
[0039] For example, in a performance degradation test scenario for a video editor, two different versions are the unreleased version and the latest released version of the video editor. The first video is obtained by performing a first editing operation (e.g., adding the L effect) on the source video using the unreleased version of the video editor, and the second video is obtained by performing a first editing operation on the source video using the latest released version of the video editor.
[0040] For example, in a performance degradation test scenario for a video editor, two different versions are the two most recent releases of the video editor. The first video is obtained by performing the first editing operation (e.g., adding the L effect) on the source video using the latest release of the video editor, and the second video is obtained by performing the first editing operation on the source video using the version preceding the latest release of the video editor.
[0041] Each pair of video frames in the multiple pairs of video frames consists of video frames with the same timestamp in the first video and the second video. For example, a video frame with a timestamp of 10 seconds in the first video and a video frame with a timestamp of 10 seconds in the second video form a pair of video frames. The acquired multiple pairs of video frames may include each pair of video frames consisting of video frames with the same timestamp in the first video and the second video, or may include only a portion of each pair of video frames consisting of video frames with the same timestamp in the first video and the second video. This disclosure does not specifically limit this.
[0042] In S102, for each pair of video frames in the multiple pairs of video frames, the similarity of the pair of video frames is calculated.
[0043] In S103, the color cast information between the pair of video frames is determined based on the similarity of the pair of video frames.
[0044] In this disclosure, the color cast information between the pair of video frames may include whether there is a color cast in the pair of video frames. When there is a color cast, the color cast information between the pair of video frames may also include the color cast area and the color cast type. The color cast type may include reddish, blued, greend, cyand, yellowish, bright, dark, pale, dark, etc.
[0045] In the above technical solution, for each pair of video frames obtained from the first and second videos, the similarity of the pair is first calculated; then, based on the similarity, the color cast information between the pair is determined. The first and second videos are obtained by performing the same editing operations on the source videos using different versions of video editors, and each pair of video frames consists of video frames with the same timestamp from both the first and second videos. This enables automatic detection of color cast in the video editor, saving manpower and time costs. Furthermore, performing color cast detection directly at the data level of the video file, without rendering for display, simplifies the color cast detection process, reduces resource consumption, and improves detection efficiency.
[0046] The following is a detailed description of the specific implementation method for obtaining multiple pairs of video frames from the first video and the second video in S101 described above.
[0047] In one implementation, the acquired multiple pairs of video frames are each pair of video frames consisting of video frames with the same timestamp in the first video and the second video. Specifically, the pixel format of each video frame in the first video and the second video can be converted to YUV format first, and the color gamut (color_range) of each video frame can be converted to a preset color gamut, for example, uniformly converted to the full range (e.g., 0~255); then, the video frames with the same timestamp in the converted video frames are matched into a pair of video frames.
[0048] In another implementation, to improve the efficiency of color cast detection, frame extraction can be performed on the first and second videos to select a portion of the video frames for color cast detection. In this case, the multiple pairs of video frames obtained are a portion of each pair of video frames composed of video frames with the same timestamp in the first and second videos. Specifically, multiple pairs of video frames can be obtained from the first and second videos through the following steps (a1) to (a3).
[0049] Step (a1): Extract multiple video frames with the same timestamp from the first video and the second video.
[0050] In this disclosure, when editing videos using a video editor, color cast issues are relatively prone to occur at the splicing points. Therefore, when the first and second videos are spliced videos, the extracted video frames may include frames from the splicing points to improve the accuracy of color cast detection. In addition to frames from the splicing points, the extracted video frames may also include the first frame (i.e., the first video frame), the last frame (the last video frame), and intermediate frames (e.g., frames extracted at preset intervals).
[0051] Step (a2): Convert the pixel format of the extracted video frame to YUV format, and convert the color gamut of the extracted video frame to the preset color gamut.
[0052] Step (a3): Match video frames with the same timestamp in the converted video frames into a pair of video frames.
[0053] The following is a detailed description of the specific implementation method for calculating the similarity of the pair of video frames in S102 above. Specifically, it can be achieved through the following steps (b1) and (b2).
[0054] Step (b1): Divide the two video frames in the pair of video frames into multiple sub-images of a preset size.
[0055] For example, the pair of video frames includes video frame Z1 and video frame Z2, with video frame Z1 divided into equal parts. Figure 5A The 16 subgraphs shown are subgraph z0, subgraph z1, ..., subgraph z15, and video frame Z2 is divided into equal parts. Figure 5B The 16 subgraphs shown are subgraph s0, subgraph s1, ..., subgraph s15.
[0056] In this pair of video frames, two subgraphs at the same position in the two video frames form a subgraph pair, for example... Figure 5A subgraph z0 and Figure 5B The subgraphs s0 shown form a subgraph pair. Figure 5A subgraph z1 and Figure 5B The subgraphs s1 shown form a subgraph pair, ..., Figure 5A subgraph z15 and Figure 5B The subgraphs s15 shown form a subgraph pair.
[0057] Step (b2): For each subgraph pair, calculate multiple similarity indices for that subgraph pair.
[0058] The similarity of the video frame pair includes various similarity metrics for each sub-image pair corresponding to the video frames. These metrics can include at least two of the following: Peak Signal-to-Noise Ratio (PSNR), Structural Similarity Index (SSIM), Video Multi-Method Assessment Fusion (VMAF), and Histogram Comparison. A histogram is a statistical representation of the distribution of pixel values in an image, describing the frequency of different pixel values. Histogram comparison measures the similarity between two images by comparing their histograms. Commonly used histogram comparison methods include correlation comparison, chi-square comparison, Bach distance, and cosine distance.
[0059] PSNR reflects pixel-level differences between sub-image pairs and is sensitive to luminance (Y); SSIM focuses on structural similarity between sub-image pairs and is more sensitive to chromaticity (U / V) changes. VMAF incorporates a human visual model and is sensitive to subjective color bias.
[0060] Histogram directly displays the component distribution: if the Y histogram shifts to the right, it indicates that the color is brighter; if the Y histogram shifts to the left, it indicates that the color is darker. If the U histogram shifts to the right, it indicates that blue is enhanced; if the U histogram shifts to the left, it indicates that yellow is enhanced. If the V histogram shifts to the right, it indicates that red is enhanced; if the V histogram shifts to the left, it indicates that cyan is enhanced.
[0061] For example, for a subgraph pair as0 consisting of subgraph z0 and subgraph s0, the PSNR, SSIM, VMAF and Histogram Comparison indices between subgraph z0 and subgraph s0 can be calculated respectively, thus obtaining four similarity indices for the subgraph pair as0.
[0062] In the above implementation, the two video frames in the pair of video frames are divided into multiple sub-images and formed into sub-image pairs. Then, multiple similarity indices are calculated for each of the multiple sub-image pairs. In this way, color cast detection can be performed from the sub-image pair dimensions, which not only facilitates the rapid location of color cast regions but also improves the accuracy of color cast detection. In addition, considering the similarity of sub-image pairs in multiple dimensions (i.e., performing multiple similarity checks) for color cast detection can further improve the accuracy of color cast detection.
[0063] The calculation methods for the PSNR, SSIM, VMAF, and Histogram Comparison metrics between the aforementioned sub-image pairs are explained in detail below. To facilitate the identification of color cast types, the PSNR, SSIM, and Histogram Comparison metrics between sub-image pairs can be calculated from the three channel dimensions: Y, U, and V. Specifically, the first similarity metric for the sub-image pair can be calculated using steps (c1) and (c2), where the first similarity metric is any one of Peak Signal-to-Noise Ratio, Structural Similarity Index, and Video Multi-Method Evaluation Fusion Metric.
[0064] Step (c1): Extract the Y, U, and V channel components of the two sub-images in the modified sub-image pair respectively.
[0065] Step (c2): Based on the Y, U, and V channel components of the two subgraphs in the modified subgraph pair, calculate the first similarity index between the Y channel components of the two subgraphs in the subgraph pair, the first similarity index between the U channel components of the two subgraphs in the subgraph pair, and the first similarity index between the V channel components of the two subgraphs in the subgraph pair.
[0066] Specifically, a first similarity index can be calculated between the Y-channel components of the two sub-images in the sub-image pair based on their respective Y-channel components; simultaneously, a first similarity index can be calculated between the U-channel components of the two sub-images in the sub-image pair based on their respective U-channel components; and a first similarity index can be calculated between the V-channel components of the two sub-images in the sub-image pair based on their respective V-channel components. The first similarity index between each channel component is then determined as the first similarity index of the sub-image pair.
[0067] For example, for a subgraph pair as0 consisting of subgraph z0 and subgraph s0, the PSNR (PSNR_Y), SSIM (SSIM_Y), and Histogram Comparison index (Histogram_Y) between the Y channel components of subgraph z0 and subgraph s0 can be calculated based on the Y channel components of subgraph z0 and subgraph s0. At the same time, the PSNR (PSNR_U), SSIM (SSIM_U), and Histogram Comparison index (Histogram_U) between the U channel components of subgraph z0 and subgraph s0 can be calculated based on the U channel components of subgraph z0 and subgraph s0. And the PSNR (PSNR_U), SSIM (SSIM_V), and Histogram Comparison index (Histogram_V) between the V channel components of subgraph z0 and subgraph s0 can be calculated based on the V channel components of subgraph z0 and subgraph s0.
[0068] When calculating the VMAF metric between sub-image pairs, the VMAF between the two video frames in the sub-image pair can be calculated directly.
[0069] The following is a detailed description of the specific implementation of determining the color cast information between the pair of video frames based on the similarity of the pair of video frames in S103. Specifically, S103 may include the following steps (d1) to (d3).
[0070] Step (d1): For each of the multiple similarity metrics, determine the N smallest similarity metrics from all subgraph pairs of that similarity metric, where N is greater than 1.
[0071] Step (d2): Identify the sub-image pairs corresponding to the N smallest similarity indices as the first sub-image pair suspected of color cast.
[0072] Step (d3): Identify the second sub-image pair that exhibits color cast from all first sub-image pairs.
[0073] For example, N is 3. The two video frames in the pair are each divided into 16 sub-frames, resulting in 16 sub-frame pairs. At the same time, the PSNR, SSIM, VMAF and Histogram Comparison metrics are calculated for each sub-frame pair. At this point, regarding the PSNR dimension, the smallest PSNR can be determined from the PSNR (including PSNR_Y, PSNR_U, and PSNR_V) among the 16 sub-image pairs, i.e., the smallest 3 PSNRs can be determined from the 48 PSNRs. Then, the sub-image pairs corresponding to these smallest 3 PSNRs are identified as the first sub-image pair suspected of color cast. Simultaneously, regarding the SSIM dimension, the smallest SSIM can be determined from the SSIM (including SSIM_Y, SSIM_U, and SSIM_V) among the 16 sub-image pairs, i.e., the smallest 3 SSIMs can be determined from the 48 SSIMs. Then, the sub-image pairs corresponding to these smallest 3 SSIMs are identified as the first sub-image pair suspected of color cast. Regarding the Histogram Comparison dimension, the smallest Histogram Comparison (including Histogram_Y, Histogram_U, and Histogram_V) among the 16 sub-image pairs is determined, i.e., the smallest 3 Histograms can be determined from the 48 Histogram Comparisons. After comparison, the sub-image pairs corresponding to the three smallest Histogram Comparisons are identified as the first sub-image pairs suspected of color cast. For the VMAF dimension, the smallest VMAF is determined from the VMAFs among the 16 sub-image pairs; specifically, the three smallest VMAFs are identified from the 16 VMAFs. The sub-image pairs corresponding to these three smallest VMAFs are then identified as the first sub-image pairs suspected of color cast. This yields 12 first sub-image pairs suspected of color cast. From these 12 first sub-image pairs suspected of color cast, the second sub-image pairs that actually exhibit color cast can then be identified.
[0074] The following is a detailed description of the specific implementation of step (d3) above, which involves determining the second sub-image pair exhibiting color cast from all first sub-image pairs. This disclosure can be implemented in various ways. In one implementation, when a sub-image is identified as having a color cast problem by multiple dimensions simultaneously, it indicates that the sub-image indeed has a color cast problem. In this case, the sub-image pairs that appear multiple times among all first sub-image pairs can be determined as the second sub-image pairs exhibiting color cast; that is, the sub-image pairs that appear at least twice among all first sub-image pairs can be determined as the second sub-image pairs exhibiting color cast.
[0075] For example, with N=2, the first sub-image pairs suspected of color cast corresponding to the PSNR dimension include sub-image pairs as0 and as7; the first sub-image pairs suspected of color cast corresponding to the SSIM dimension include sub-image pairs as0 and as5; the first sub-image pairs suspected of color cast corresponding to the VMAF dimension include sub-image pairs as5 and as9; and the first sub-image pairs suspected of color cast corresponding to the Histogram Comparison dimension include sub-image pairs as4 and as0. Therefore, all first sub-image pairs include: 3 sub-image pairs as0, 2 sub-image pairs as5, as7, as9, and as4. The occurrence counts of sub-image pairs as0 and as5 are both not less than 2. Therefore, sub-image pairs as0 and as5 can be identified as the second sub-image pairs exhibiting color cast.
[0076] To further improve the accuracy of color cast detection, after filtering out sub-image pairs that appear multiple times from all first sub-image pairs, these filtered sub-image pairs can be further filtered. Specifically, first, sub-image pairs that appear multiple times can be filtered out from all first sub-image pairs, and then the M (e.g., 3) sub-image pairs that appear most frequently among the multiple-time sub-image pairs can be identified as the second sub-image pairs that exhibit color cast.
[0077] For example, M=2, all first subplot pairs include: 4 subplot pairs as0, 3 subplot pairs as5, 2 subplot pairs as7, as9, as4, and as15. Among them, the subplot pairs that appear multiple times include subplot pairs as0, as5, and as7. Therefore, the subplot pairs that appear multiple times, and the two subplot pairs that appear the most, namely subplot pairs as0 and as5, can be identified as the second subplot pairs that show color cast.
[0078] In one possible implementation, before step (d1) above, step S103 may also include step (d4).
[0079] Step (d4): Obtain the similarity index of all subgraph pairs that is less than the first similarity threshold, and use it as the second similarity index.
[0080] In this disclosure, the first similarity threshold is the similarity threshold corresponding to the type of similarity index. Additionally, for each of the multiple similarity indices, the similarity scores of all sub-image pairs that are less than the first similarity threshold can be obtained as the second similarity index. This means filtering out similarity indices greater than or equal to the first similarity threshold from all sub-image pairs to further improve the accuracy of color cast detection. In this case, step (d1) can include: determining the N smallest similarity indices from the second similarity indices.
[0081] The similarity threshold corresponding to this similarity index of the subgraph includes the similarity threshold corresponding to the similarity index of each channel component of the subgraph.
[0082] In one possible implementation, when determining the color cast information between the pair of video frames, in addition to determining the color cast area, the color cast type can also be determined, thereby facilitating the user to quickly identify the root cause of the color cast. Specifically, S103 may further include the following step (d5).
[0083] Step (d5): Determine the color cast type of the second sub-image pair based on multiple similarity indices.
[0084] In one implementation, the multiple similarity metrics of the second subgraph pair may include the peak signal-to-noise ratio (PSNR_Y) and structural similarity index (SSIM_Y) between the Y channel components of the two subgraphs in the second subgraph pair, the peak signal-to-noise ratio (PSNR_U) and structural similarity index (SSIM_U) between the U channel components of the two subgraphs in the second subgraph pair, and the peak signal-to-noise ratio (PSNR_U) and structural similarity index (SSIM_U) between the V channel components of the two subgraphs in the second subgraph pair.
[0085] At this point, step (d5) above includes at least one of the following: If the peak signal-to-noise ratio between the Y-channel components of the two sub-images in the second sub-image pair is less than the first threshold, the structural similarity index between the Y-channel components of the two sub-images in the second sub-image pair is less than the second threshold, and the first Y-channel histogram is shifted to the left relative to the second Y-channel histogram, then the color cast type of the second sub-image pair is determined to be darker. Here, the first Y-channel histogram is the histogram of the Y-channel components of the first sub-image, the second Y-channel histogram is the histogram of the Y-channel components of the second sub-image, the first sub-image is the sub-image from the first video in the second sub-image pair, and the second sub-image is the sub-image from the second video in the second sub-image pair. If the peak signal-to-noise ratio between the Y channel components of the two sub-images in the second sub-image pair is less than the first threshold, the structural similarity index between the Y channel components of the two sub-images in the second sub-image pair is less than the second threshold, and the first Y channel histogram is shifted to the right relative to the second Y channel histogram, then the color cast type of the second sub-image pair is determined to be brighter. If the peak signal-to-noise ratio between the U-channel components of the two sub-images in the second sub-image pair is less than the third threshold, the structural similarity index between the U-channel components of the two sub-images in the second sub-image pair is less than the fourth threshold, and the first U-channel histogram is shifted to the left relative to the second U-channel histogram, then the color cast type of the second sub-image pair is determined to be yellowish. Here, the first U-channel histogram is the histogram of the U-channel components of the first sub-image, and the second U-channel histogram is the histogram of the U-channel components of the second sub-image. If the peak signal-to-noise ratio between the U-channel components of the two sub-images in the second sub-image pair is less than the third threshold, the structural similarity index between the U-channel components of the two sub-images in the second sub-image pair is less than the fourth threshold, and the first U-channel histogram is shifted to the right relative to the second U-channel histogram, then the color cast type of the second sub-image pair is determined to be bluish. If the peak signal-to-noise ratio between the V channel components of the two sub-images in the second sub-image pair is less than the fifth threshold, the structural similarity index between the U channel components of the two sub-images in the second sub-image pair is less than the sixth threshold, and the first V channel histogram is shifted to the left relative to the second V channel histogram, then the color cast type of the second sub-image pair is determined to be cyan. Here, the first V channel histogram is the histogram of the V channel components of the first sub-image, and the second V channel histogram is the histogram of the V channel components of the second sub-image. If the peak signal-to-noise ratio between the V channel components of the two sub-images in the second sub-image pair is less than the fifth threshold, the structural similarity index between the U channel components of the two sub-images in the second sub-image pair is less than the sixth threshold, and the first V channel histogram is shifted to the right relative to the second V channel histogram, then the color cast type of the second sub-image pair is determined to be reddish.
[0086] In one possible implementation, such as Figure 6 As shown, before S101 above, the image quality detection method may also include the following S104.
[0087] In S104, the color parameters of the first video and the color parameters of the second video are obtained.
[0088] In this disclosure, color parameters may include resolution, color space, color transfer function, and color primaries. The color parameters of the corresponding video can be obtained from the video's metadata information.
[0089] At this point, if the color parameters of the first video are the same as those of the second video, then the above S101 is executed.
[0090] The prerequisite for comparing the color cast of the first and second videos is that the color parameters of the first and second videos are the same. If the resolution of the first and second videos is the same, the color space of the first and second videos is the same, the transfer function of the first and second videos is the same, and the primary colors of the first and second videos are the same, then it indicates that the color parameters of the first and second videos are the same, and in this case, a color cast comparison between the first and second videos can be performed, i.e., the above-mentioned S101 is executed; otherwise, it indicates that the color parameters of the first and second videos are different, and in this case, there is no need to perform a color cast comparison between the first and second videos, and the method flow can end.
[0091] Figure 7 This is a block diagram illustrating an image quality detection device according to an exemplary embodiment. Figure 7 As shown, the image quality detection device 300 includes: The first acquisition module 301 is used to acquire multiple pairs of video frames from the first video and the second video, wherein the first video and the second video are obtained by performing the same editing operation on the source video using different versions of video editors, and each pair of video frames in the multiple pairs of video frames consists of video frames with the same timestamp in the first video and the second video. The calculation module 302 is used to calculate the similarity of each pair of video frames in the plurality of pairs of video frames; the determination module 303 is used to determine the color distortion information between the pair of video frames based on the similarity of the pair of video frames.
[0092] In the above technical solution, for each pair of video frames obtained from the first and second videos, the similarity of the pair is first calculated; then, based on the similarity, the color cast information between the pair is determined. The first and second videos are obtained by performing the same editing operations on the source videos using different versions of video editors, and each pair of video frames consists of video frames with the same timestamp from both the first and second videos. This enables automatic detection of color cast in the video editor, saving manpower and time costs. Furthermore, performing color cast detection directly at the data level of the video file, without rendering for display, simplifies the color cast detection process, reduces resource consumption, and improves detection efficiency.
[0093] Optionally, the computing module 302 includes: The segmentation module is used to segment each of the two video frames in the pair of video frames into multiple sub-images of a preset size; The first calculation submodule is used to calculate multiple similarity indices for each sub-graph pair, wherein the sub-graph pair consists of two sub-graphs in the same position in the two video frames, and the similarity of the video frames includes the multiple similarity indices for each sub-graph pair.
[0094] Optionally, the multiple similarity metrics include at least two of the following: peak signal-to-noise ratio, structural similarity index, video multi-method evaluation fusion metric, and histogram comparison metric.
[0095] Optionally, the first computing submodule includes: The component extraction submodule is used to extract the Y, U, and V channel components of the two sub-images in the sub-image pair respectively; The second calculation submodule is used to calculate, based on the Y, U, and V channel components of the two sub-graphs, a first similarity index between the Y channel components of the two sub-graphs, a first similarity index between the U channel components of the two sub-graphs, and a first similarity index between the V channel components of the two sub-graphs, wherein the first similarity index is any one of the peak signal-to-noise ratio, the structural similarity index, and the video multi-method evaluation fusion index.
[0096] Optionally, the determining module 303 includes: The first determining submodule is used to determine the N smallest similarity indices from all the sub-image pairs for each of the multiple similarity indices, where N is greater than 1; and to determine the sub-image pairs corresponding to each of the N similarity indices as the first sub-image pairs suspected of color cast; the second determining submodule is used to determine the sub-image pairs corresponding to each of the N similarity indices as the first sub-image pairs suspected of color cast. The third determining submodule is used to determine the second sub-image pair that exhibits color cast from all the first sub-image pairs.
[0097] Optionally, the third determining submodule is used to determine the subgraph pairs that appear multiple times in all the first subgraph pairs as the second subgraph pairs.
[0098] Optionally, the third determining submodule includes: The filtering submodule is used to filter out subgraph pairs that appear multiple times from all the first subgraph pairs; The fourth determining submodule is used to determine the M subgraph pairs that appear most frequently among the subgraph pairs that appear multiple times as the second subgraph pair.
[0099] Optionally, the determining module 303 further includes: The fifth determining submodule is used to determine the color cast type of the second sub-image pair based on the multiple similarity indices of the second sub-image pair.
[0100] Optionally, the multiple similarity indices of the second sub-image pair include the peak signal-to-noise ratio and structural similarity index between the Y channel components of the two sub-images in the second sub-image pair, the peak signal-to-noise ratio and structural similarity index between the U channel components of the two sub-images in the second sub-image pair, and the peak signal-to-noise ratio and structural similarity index between the V channel components of the two sub-images in the second sub-image pair. The fifth determining submodule includes at least one of the following: The sixth determining submodule is used to determine the color cast type as dark if the peak signal-to-noise ratio between the Y channel components is less than a first threshold, the structural similarity index between the Y channel components is less than a second threshold, and the first Y channel histogram is shifted to the left relative to the second Y channel histogram. Here, the first Y channel histogram is the histogram of the Y channel components of the first sub-image, the second Y channel histogram is the histogram of the Y channel components of the second sub-image, the first sub-image is the sub-image from the first video in the second sub-image pair, and the second sub-image is the sub-image from the second video in the second sub-image pair. The seventh determining submodule is used to determine the color cast type as bright if the peak signal-to-noise ratio between the Y channel components is less than the first threshold, the structural similarity index between the Y channel components is less than the second threshold, and the first Y channel histogram is shifted to the right relative to the second Y channel histogram. The eighth determining submodule is used to determine the color cast type as yellowish if the peak signal-to-noise ratio between the U channel components is less than a third threshold, the structural similarity index between the U channel components is less than a fourth threshold, and the first U channel histogram is shifted to the left relative to the second U channel histogram. Here, the first U channel histogram is the histogram of the U channel components of the first sub-image, and the second U channel histogram is the histogram of the U channel components of the second sub-image. The ninth determining submodule is used to determine the color cast type as bluish if the peak signal-to-noise ratio between the U channel components is less than the third threshold, the structural similarity index between the U channel components is less than the fourth threshold, and the first U channel histogram is shifted to the right relative to the second U channel histogram. The tenth determining submodule is used to determine the color cast type as bluish if the peak signal-to-noise ratio between the V channel components is less than the fifth threshold, the structural similarity index between the U channel components is less than the sixth threshold, and the first V channel histogram is shifted to the left relative to the second V channel histogram. The first V channel histogram is the histogram of the V channel components of the first sub-image, and the second V channel histogram is the histogram of the V channel components of the second sub-image. The eleventh determination submodule is used to determine the color cast type as reddish if the peak signal-to-noise ratio between the V channel components is less than the fifth threshold, the structural similarity index between the U channel components is less than the sixth threshold, and the first V channel histogram is shifted to the right relative to the second V channel histogram.
[0101] Optionally, the determining module 303 further includes: The acquisition submodule is used to acquire, before the first determining submodule determines the smallest N similarity indices from all the subgraph pairs, similarity indices that are less than a first similarity threshold, as a second similarity index, wherein the first similarity threshold is the similarity threshold corresponding to the similarity index. The first determining submodule is used to determine the N smallest similarity indices from the second similarity.
[0102] Optionally, the first acquisition module 301 includes: An extraction submodule is used to extract multiple video frames with the same timestamp from a first video and a second video. When the first video is a spliced video, the extracted video frames include the frames at the splicing point. The conversion submodule is used to convert the pixel format of the extracted video frames to YUV format and convert the color gamut of the extracted video frames to a preset color gamut. The matching submodule is used to match video frames with the same timestamp in the converted video frames into a pair of video frames.
[0103] Optionally, the image quality detection device 300 further includes: The second acquisition module is used to acquire color parameters of the first video and color parameters of the second video before the first acquisition module 301 acquires multiple pairs of video frames from the first video and the second video. The color parameters include resolution, color space, transfer function and primary color. The triggering module is used to trigger the first acquisition module 301 to acquire multiple pairs of video frames from the first video and the second video if the color parameters of the first video and the color parameters of the second video are the same.
[0104] This disclosure also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the image quality detection method described above.
[0105] This disclosure also provides an electronic device, including: A storage device on which computer programs are stored; A processing device is configured to execute the computer program in the storage device to implement the steps of the image quality detection method provided in this disclosure.
[0106] This disclosure also provides a computer program product, including a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps of the image quality detection method described above provided in this disclosure.
[0107] The following is for reference. Figure 8 The diagram illustrates a structural schematic of an electronic device (terminal device or server) 600 suitable for implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0108] like Figure 8 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0109] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0110] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.
[0111] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0112] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0113] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0114] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: acquire multiple pairs of video frames from a first video and a second video, wherein the first video and the second video are obtained by performing the same editing operation on the source video using different versions of video editors, and each pair of video frames consists of video frames with the same timestamp in the first video and the second video; calculate the similarity of each pair of video frames; and determine the color cast information between the pair of video frames based on the similarity of the pair of video frames.
[0115] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0116] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0117] The modules described in the embodiments of this disclosure can be implemented in software or in hardware. The names of the modules do not necessarily limit the module itself; for example, the first acquisition module can also be described as "a module for acquiring multiple pairs of video frames from a first video and a second video".
[0118] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0119] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0120] According to one or more embodiments of this disclosure, Example 1 provides an image quality detection method, including: Multiple pairs of video frames are obtained from the first video and the second video, wherein the first video and the second video are obtained by performing the same editing operation on the source video using different versions of video editors, and each pair of video frames in the multiple pairs of video frames consists of video frames with the same timestamp in the first video and the second video. For each pair of video frames in the plurality of pairs of video frames, the similarity between the pair of video frames is calculated; based on the similarity between the pair of video frames, the color cast information between the pair of video frames is determined.
[0121] According to one or more embodiments of this disclosure, Example 2 provides the method of Example 1, wherein calculating the similarity of the pair of video frames includes: Divide each of the two video frames in the pair into multiple sub-images of a preset size; For each sub-graph pair, multiple similarity metrics are calculated for the sub-graph pair, wherein the sub-graph pair consists of two sub-graphs in the same position in the two video frames, and the similarity of the video frames includes the multiple similarity metrics for each sub-graph pair.
[0122] According to one or more embodiments of this disclosure, Example 3 provides the method of Example 2, wherein the multiple similarity metrics include at least two of peak signal-to-noise ratio, structural similarity index, video multi-method evaluation fusion metric, and histogram comparison metric.
[0123] According to one or more embodiments of this disclosure, Example 4 provides the method of Example 3 for calculating a first similarity index of the subgraph pairs, including: Extract the Y, U, and V channel components of the two subgraphs in the subgraph pair respectively, wherein the first similarity index is any one of the peak signal-to-noise ratio, the structural similarity index, and the video multi-method evaluation fusion index; Based on the Y, U, and V channel components of the two sub-images respectively, calculate the first similarity index between the Y channel components of the two sub-images, the first similarity index between the U channel components of the two sub-images, and the first similarity index between the V channel components of the two sub-images.
[0124] According to one or more embodiments of this disclosure, Example 5 provides the method of Example 2, wherein determining the color cast information between the pair of video frames based on the similarity of the pair of video frames includes: For each of the multiple similarity indices, the N smallest similarity indices are determined from all the sub-image pairs, where N is greater than 1; the sub-image pairs corresponding to each of the N similarity indices are determined as the first sub-image pair suspected of color cast. Identify the second sub-image pair that exhibits color cast from all the first sub-image pairs.
[0125] According to one or more embodiments of this disclosure, Example 6 provides the method of Example 5, wherein determining the second sub-image pair exhibiting color cast from all first sub-image pairs includes: Subgraph pairs that appear multiple times in all first subgraph pairs are identified as second subgraph pairs.
[0126] According to one or more embodiments of this disclosure, Example 7 provides the method of Example 5, wherein determining the second sub-image pair exhibiting color cast from all first sub-image pairs includes: Select subgraph pairs that appear multiple times from all the first subgraph pairs; The M subgraph pairs that appear most frequently among the subgraph pairs that appear multiple times are determined as the second subgraph pair.
[0127] According to one or more embodiments of this disclosure, Example 8 provides the method of Example 5, wherein determining the color cast information between the pair of video frames based on the similarity of the pair of video frames further includes: Based on the various similarity indices of the second sub-image pair, the color cast type of the second sub-image pair is determined.
[0128] According to one or more embodiments of this disclosure, Example 9 provides the method of Example 8, wherein the multiple similarity indices of the second sub-image pair include the peak signal-to-noise ratio and structural similarity index between the Y channel components of the two sub-images in the second sub-image pair, the peak signal-to-noise ratio and structural similarity index between the U channel components of the two sub-images in the second sub-image pair, and the peak signal-to-noise ratio and structural similarity index between the V channel components of the two sub-images in the second sub-image pair; The determination of the color cast type of the second sub-image pair based on the multiple similarity indices of the second sub-image pair includes at least one of the following: If the peak signal-to-noise ratio between the Y channel components is less than a first threshold, the structural similarity index between the Y channel components is less than a second threshold, and the first Y channel histogram shifts to the left relative to the second Y channel histogram, then the color cast type is determined to be darker. Here, the first Y channel histogram is the histogram of the Y channel components of the first sub-image, the second Y channel histogram is the histogram of the Y channel components of the second sub-image, the first sub-image is the sub-image from the first video in the second sub-image pair, and the second sub-image is the sub-image from the second video in the second sub-image pair. If the peak signal-to-noise ratio between the Y channel components is less than the first threshold, the structural similarity index between the Y channel components is less than the second threshold, and the first Y channel histogram shifts to the right relative to the second Y channel histogram, then the color cast type is determined to be brighter. If the peak signal-to-noise ratio between the U channel components is less than a third threshold, the structural similarity index between the U channel components is less than a fourth threshold, and the first U channel histogram shifts to the left relative to the second U channel histogram, then the color cast type is determined to be yellowish. Here, the first U channel histogram is the histogram of the U channel components of the first sub-image, and the second U channel histogram is the histogram of the U channel components of the second sub-image. If the peak signal-to-noise ratio between the U channel components is less than the third threshold, the structural similarity index between the U channel components is less than the fourth threshold, and the first U channel histogram shifts to the right relative to the second U channel histogram, then the color cast type is determined to be bluish. If the peak signal-to-noise ratio between the V channel components is less than the fifth threshold, the structural similarity index between the U channel components is less than the sixth threshold, and the first V channel histogram shifts to the left relative to the second V channel histogram, then the color cast type is determined to be cyan. Here, the first V channel histogram is the histogram of the V channel components of the first sub-image, and the second V channel histogram is the histogram of the V channel components of the second sub-image. If the peak signal-to-noise ratio between the V channel components is less than the fifth threshold, the structural similarity index between the U channel components is less than the sixth threshold, and the first V channel histogram shifts to the right relative to the second V channel histogram, then the color cast type is determined to be reddish.
[0129] According to one or more embodiments of this disclosure, Example 10 provides the method of Example 5, wherein, prior to the step of determining the smallest N similarity indices from all said sub-graph pairs, the step of determining the color cast information between the pair of video frames based on the similarity of the pair of video frames further includes: Obtain the similarity index that is less than the first similarity threshold among all the subgraph pairs and use it as the second similarity index, wherein the first similarity threshold is the similarity threshold corresponding to the similarity index. The step of determining the N smallest similarity indices from all the subgraph pairs includes: The N smallest similarity indices are determined from the second similarity index.
[0130] According to one or more embodiments of this disclosure, Example 11 provides a method of any one of Examples 1-10, wherein obtaining multiple pairs of video frames from a first video and a second video includes: Multiple video frames with the same timestamp are extracted from the first video and the second video. When the first video is a spliced video, the extracted video frames include the frames at the splicing point. Convert the pixel format of the extracted video frames to YUV format, and convert the color gamut of the extracted video frames to the preset color gamut. Video frames with the same timestamp in the converted video frames are matched into a pair of video frames.
[0131] According to one or more embodiments of this disclosure, Example 12 provides a method of any one of Examples 1-10, wherein prior to the step of obtaining multiple pairs of video frames from the first video and the second video, the method further includes: Obtain the color parameters of the first video and the second video, wherein the color parameters include resolution, color space, transfer function, and primary color; If the color parameters of the first video are the same as those of the second video, then the step of obtaining multiple pairs of video frames from the first video and the second video is performed.
[0132] According to one or more embodiments of this disclosure, Example 13 provides an image quality detection apparatus, comprising: The first acquisition module is used to acquire multiple pairs of video frames from the first video and the second video, wherein the first video and the second video are obtained by performing the same editing operation on the source video using different versions of video editors, and each pair of video frames in the multiple pairs of video frames consists of video frames with the same timestamp in the first video and the second video. The calculation module is used to calculate the similarity of each pair of video frames in the plurality of pairs of video frames; the determination module is used to determine the color cast information between the pair of video frames based on the similarity of the pair of video frames.
[0133] According to one or more embodiments of the present disclosure, Example 14 provides a computer-readable medium having a computer program stored thereon that, when executed by a processing device, implements the steps of the method described in any one of Examples 1-12.
[0134] According to one or more embodiments of this disclosure, Example 15 provides an electronic device, including: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of any one of the methods in Examples 1-12.
[0135] According to one or more embodiments of the present disclosure, Example 16 provides a computer program product including a computer program that, when executed by a processor, implements the steps of the method described in any one of Examples 1 to 12.
[0136] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0137] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0138] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative forms of implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which the various modules perform their operations has been described in detail in the embodiments relating to the method, and will not be elaborated upon here.
Claims
1. A method for image quality detection, characterized in that, include: Multiple pairs of video frames are obtained from the first video and the second video, wherein the first video and the second video are obtained by performing the same editing operation on the source video using different versions of video editors, and each pair of video frames in the multiple pairs of video frames consists of video frames with the same timestamp in the first video and the second video. For each pair of video frames in the plurality of pairs of video frames, the similarity between the pair of video frames is calculated; based on the similarity between the pair of video frames, the color cast information between the pair of video frames is determined.
2. The method according to claim 1, characterized in that, The calculation of the similarity between the pair of video frames includes: Divide each of the two video frames in the pair into multiple sub-images of a preset size; For each sub-graph pair, multiple similarity metrics are calculated for the sub-graph pair, wherein the sub-graph pair consists of two sub-graphs in the same position in the two video frames, and the similarity of the video frames includes the multiple similarity metrics for each sub-graph pair.
3. The method according to claim 2, characterized in that, The various similarity metrics include at least two of the following: peak signal-to-noise ratio, structural similarity index, video multi-method evaluation fusion metric, and histogram comparison metric.
4. The method according to claim 3, characterized in that, Calculating the first similarity index of the subgraph pairs includes: Extract the Y, U, and V channel components of the two subgraphs in the subgraph pair respectively, wherein the first similarity index is any one of the peak signal-to-noise ratio, the structural similarity index, and the video multi-method evaluation fusion index; Based on the Y, U, and V channel components of the two sub-images respectively, calculate the first similarity index between the Y channel components of the two sub-images, the first similarity index between the U channel components of the two sub-images, and the first similarity index between the V channel components of the two sub-images.
5. The method according to claim 2, characterized in that, The step of determining the color cast information between the pair of video frames based on their similarity includes: For each of the multiple similarity indices, the N smallest similarity indices are determined from all the sub-image pairs, where N is greater than 1; the sub-image pairs corresponding to each of the N similarity indices are determined as the first sub-image pair suspected of color cast. Identify the second sub-image pair that exhibits color cast from all the first sub-image pairs.
6. The method according to claim 5, characterized in that, The step of determining the second sub-image pair exhibiting color cast from all the first sub-image pairs includes: Subgraph pairs that appear multiple times in all first subgraph pairs are identified as second subgraph pairs.
7. The method according to claim 5, characterized in that, The step of determining the second sub-image pair exhibiting color cast from all the first sub-image pairs includes: Select subgraph pairs that appear multiple times from all the first subgraph pairs; The M subgraph pairs that appear most frequently among the subgraph pairs that appear multiple times are determined as the second subgraph pair.
8. The method according to claim 5, characterized in that, The step of determining the color cast information between the pair of video frames based on their similarity further includes: Based on the various similarity indices of the second sub-image pair, the color cast type of the second sub-image pair is determined.
9. The method according to claim 8, characterized in that, The multiple similarity indices of the second sub-image pair include the peak signal-to-noise ratio and structural similarity index between the Y channel components of the two sub-images in the second sub-image pair, the peak signal-to-noise ratio and structural similarity index between the U channel components of the two sub-images in the second sub-image pair, and the peak signal-to-noise ratio and structural similarity index between the V channel components of the two sub-images in the second sub-image pair. The determination of the color cast type of the second sub-image based on the multiple similarity indices of the second sub-image includes at least one of the following: If the peak signal-to-noise ratio between the Y channel components is less than a first threshold, the structural similarity index between the Y channel components is less than a second threshold, and the first Y channel histogram shifts to the left relative to the second Y channel histogram, then the color cast type is determined to be darker. Here, the first Y channel histogram is the histogram of the Y channel components of the first sub-image, the second Y channel histogram is the histogram of the Y channel components of the second sub-image, the first sub-image is the sub-image from the first video in the second sub-image pair, and the second sub-image is the sub-image from the second video in the second sub-image pair. If the peak signal-to-noise ratio between the Y channel components is less than the first threshold, the structural similarity index between the Y channel components is less than the second threshold, and the first Y channel histogram shifts to the right relative to the second Y channel histogram, then the color cast type is determined to be brighter. If the peak signal-to-noise ratio between the U channel components is less than a third threshold, the structural similarity index between the U channel components is less than a fourth threshold, and the first U channel histogram shifts to the left relative to the second U channel histogram, then the color cast type is determined to be yellowish. Here, the first U channel histogram is the histogram of the U channel components of the first sub-image, and the second U channel histogram is the histogram of the U channel components of the second sub-image. If the peak signal-to-noise ratio between the U channel components is less than the third threshold, the structural similarity index between the U channel components is less than the fourth threshold, and the first U channel histogram shifts to the right relative to the second U channel histogram, then the color cast type is determined to be bluish. If the peak signal-to-noise ratio between the V channel components is less than the fifth threshold, the structural similarity index between the U channel components is less than the sixth threshold, and the first V channel histogram shifts to the left relative to the second V channel histogram, then the color cast type is determined to be cyan. Here, the first V channel histogram is the histogram of the V channel components of the first sub-image, and the second V channel histogram is the histogram of the V channel components of the second sub-image. If the peak signal-to-noise ratio between the V channel components is less than the fifth threshold, the structural similarity index between the U channel components is less than the sixth threshold, and the first V channel histogram shifts to the right relative to the second V channel histogram, then the color cast type is determined to be reddish.
10. The method according to claim 5, characterized in that, Before the step of determining the N smallest similarity indices from all the sub-image pairs, the step of determining the color cast information between the pair of video frames based on the similarity of the pair of video frames further includes: Obtain the similarity index that is less than the first similarity threshold among all the subgraph pairs and use it as the second similarity index, wherein the first similarity threshold is the similarity threshold corresponding to the similarity index. The step of determining the N smallest similarity indices from all the subgraph pairs includes: The N smallest similarity indices are determined from the second similarity index.
11. The method according to any one of claims 1-10, characterized in that, The step of obtaining multiple pairs of video frames from the first video and the second video includes: Multiple video frames with the same timestamp are extracted from the first video and the second video. When the first video is a spliced video, the extracted video frames include the frames at the splicing point. Convert the pixel format of the extracted video frames to YUV format, and convert the color gamut of the extracted video frames to the preset color gamut. Video frames with the same timestamp in the converted video frames are matched into a pair of video frames.
12. The method according to any one of claims 1-10, characterized in that, Prior to the step of obtaining multiple pairs of video frames from the first video and the second video, the method further includes: Obtain the color parameters of the first video and the second video, wherein the color parameters include resolution, color space, transfer function, and primary color; If the color parameters of the first video are the same as those of the second video, then the step of obtaining multiple pairs of video frames from the first video and the second video is performed.
13. An image quality detection device, characterized in that, include: The first acquisition module is used to acquire multiple pairs of video frames from the first video and the second video, wherein the first video and the second video are obtained by performing the same editing operation on the source video using different versions of video editors, and each pair of video frames in the multiple pairs of video frames consists of video frames with the same timestamp in the first video and the second video. The calculation module is used to calculate the similarity of each pair of video frames in the plurality of pairs of video frames; the determination module is used to determine the color cast information between the pair of video frames based on the similarity of the pair of video frames.
14. A computer-readable medium having a computer program stored thereon, characterized in that, When executed by a processing device, the computer program performs the steps of the method described in any one of claims 1-12.
15. An electronic device, characterized in that, include: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the method according to any one of claims 1-12.
16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 12.
