A color coincidence identification method and device, electronic equipment and storage medium
By acquiring video frames, determining the deployment area of interface components, and converting them to a preset color space to calculate color differences, the problem of color overlap between video content and interface components is solved, enabling fast and effective color overlap recognition and improving the readability and interactive experience of the user interface.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING ZITIAO NETWORK TECH CO LTD
- Filing Date
- 2025-01-24
- Publication Date
- 2026-07-24
AI Technical Summary
In video applications, insufficient color contrast causes color overlap between video content and user interface components, making it difficult for users to distinguish them, which affects readability and interactive experience. Existing technologies suffer from high misjudgment probability, high computational resource consumption, and poor versatility.
By acquiring video frames, the deployment area of interface components is determined, converted to a preset color space, color difference is calculated, and color overlap between the video and interface components is identified.
Achieve fast, efficient, and highly accurate color overlap recognition, reduce computational resource consumption, and improve user interface readability and interactive experience.
Smart Images

Figure CN122454221A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and storage medium for recognizing color overlap. Background Technology
[0002] In video applications (APPs), video content often overlaps with user interface (UI) components. Due to insufficient color contrast, the video content and UI components may overlap (Hue Overlap Issue). In this case, users have difficulty visually distinguishing between the two, leading to reduced readability of the video content and components, unclear information delivery, and a significantly degraded user experience.
[0003] In related technologies, color overlap can be identified by extracting texture features from video content and UI components. However, this method has at least the following problems: noise and jitter in the video content can alter texture features, significantly increasing the probability of misjudgment; it cannot effectively identify solid-color video content with little texture; due to the diversity of video content, the texture features of different types of videos vary greatly, and the same texture feature extraction method cannot guarantee good performance on all types of videos, resulting in poor versatility; the texture feature extraction algorithm itself consumes a large amount of computational resources, leading to a sharp increase in computational load and a slow recognition process when processing large amounts of video content. Summary of the Invention
[0004] This disclosure provides a method, apparatus, electronic device, and storage medium for color overlap recognition, which can achieve fast, effective, and highly accurate color overlap recognition, providing a reference for color optimization of user interfaces.
[0005] In a first aspect, embodiments of this disclosure provide a method for recognizing color overlap, comprising:
[0006] Obtain preset video frames from the video to be identified;
[0007] Determine the deployment area of the preset interface components under the preset playback conditions from the preset video frames;
[0008] The first color information of the pixels within the deployment area is converted to a preset color space to obtain the second color information;
[0009] A first color difference is determined based on a first value of a preset dimension in the second color information and a second value corresponding to the preset interface component; wherein, the second value includes the value of the preset dimension in the third color information; the third color information includes the color information of the preset interface component in the preset color space;
[0010] The color overlap between the video to be identified and the preset interface component is identified based on the first color difference.
[0011] Secondly, embodiments of this disclosure also provide a color-matching recognition device, comprising:
[0012] The video frame acquisition module is used to acquire preset video frames from the video to be identified;
[0013] The region determination module is used to determine the deployment region of the preset interface components under preset playback conditions from the preset video frames;
[0014] The color conversion module is used to convert the first color information of pixels within the deployment area to a preset color space to obtain the second color information;
[0015] A color difference determination module is used to determine a first color difference based on a first value of a preset dimension in the second color information and a second value corresponding to the preset interface component; wherein, the second value includes the value of the preset dimension in the third color information; the third color information includes the color information of the preset interface component in the preset color space;
[0016] The recognition module is used to identify the color overlap between the video to be recognized and the preset interface component based on the first color difference.
[0017] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:
[0018] One or more processors;
[0019] Storage device for storing one or more programs.
[0020] When the one or more programs are executed by the one or more processors, the one or more processors implement the color overlap recognition method as described in any embodiment of this disclosure.
[0021] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a color overlap recognition method as described in any of the embodiments of this disclosure.
[0022] Fifthly, this disclosure also provides a computer program product, characterized in that the computer program product includes a computer program, which, when executed by a processor, implements the color overlap recognition method as described in any of the embodiments of this disclosure.
[0023] In the technical solution of this disclosure embodiment, a preset video frame in the video to be identified can be obtained; the deployment area of a preset interface component under preset playback conditions can be determined from the preset video frame; the first color information of the pixels in the deployment area can be converted to a preset color space to obtain second color information; a first color difference can be determined according to the first value of a preset dimension in the second color information and the second value corresponding to the preset interface component; wherein, the second value includes the value of the preset dimension in the third color information; the third color information includes the color information of the preset interface component in the preset color space; and color overlap recognition between the video to be identified and the preset interface component can be performed according to the first color difference.
[0024] By locating the deployment area of preset interface components within preset video frames under different preset playback conditions, more accurate color overlap recognition can be achieved, while reducing computational resource consumption. Determining the color difference between video content and preset interface components based on image color space conversion not only enables effective color overlap recognition for various types of videos, but also allows for rapid color overlap recognition due to the low algorithm complexity of color space conversion. In summary, the color overlap recognition method provided in this disclosure can achieve fast, effective, and highly accurate color overlap recognition, providing a reference for subsequent user interface color optimization. Attached Figure Description
[0025] 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.
[0026] Figure 1 This is a schematic flowchart illustrating a color overlap recognition method provided in an embodiment of the present disclosure.
[0027] Figure 2 This is a schematic block diagram illustrating the deployment area determination process in a color overlap recognition method provided in an embodiment of this disclosure;
[0028] Figure 3 This is a schematic diagram illustrating different brightness differences in a color overlap recognition method provided in an embodiment of this disclosure.
[0029] Figure 4 A schematic diagram of the structure of a color matching recognition device provided in an embodiment of this disclosure;
[0030] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0031] 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.
[0032] 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.
[0033] 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.
[0034] 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.
[0035] 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".
[0036] 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.
[0037] Figure 1 This is a flowchart illustrating a color overlap recognition method provided in an embodiment of this disclosure. This embodiment is applicable to situations where color overlap exists between video content and user interface components. The method can be executed by a color overlap recognition device (hereinafter referred to as the recognition device), which can be implemented in software and / or hardware and can be configured in an electronic device, such as a server.
[0038] like Figure 1 As shown, the color overlap recognition method provided in this embodiment may include:
[0039] S110. Obtain preset video frames from the video to be identified.
[0040] In this embodiment of the disclosure, the video to be identified may include various types of videos, such as live-action videos, special effects videos, and animated videos. The preset video frame may include at least one video frame from the video to be identified. For example, every video frame from the video to be identified can be used as the preset video frame, or a representative subset of video frames from the video to be identified can be used as the preset video frame.
[0041] In some implementations, obtaining preset video frames from the video to be recognized may include: extracting video frames from the video to be recognized according to a preset extraction strategy to obtain preset video frames. The preset extraction strategy may include at least one of the following: extracting video frames from the entire video to be recognized; extracting video frames from a preset range (such as the first 1 / 4 or the first 10 seconds) of the video to be recognized; segmenting the video to be recognized by scene, and extracting video frames from preset scenes in the segmentation results, etc. Existing frame extraction methods can be used to extract video frames from the video to be recognized, such as extracting video frames every preset number of frames.
[0042] Among these implementation methods, extracting frames from the entire video can largely preserve the original video content; extracting frames from a preset range of videos can reduce computational consumption while ensuring recognition accuracy; and extracting frames from preset scenes within each scenario can preserve the original video content to some extent while reducing computational consumption to another extent. Furthermore, extraction strategies can be configured based on specific business scenarios, and different strategies can be adopted for video frame extraction in different situations, thereby improving the flexibility of video frame extraction.
[0043] Furthermore, in some optional implementations, before acquiring preset video frames from the video to be identified, the process may include receiving the video to be identified uploaded by the application. In these optional implementations, the color overlap recognition method can be applied to the server-side of video applications. The server can receive a massive number of uploaded videos to be identified and can perform color overlap recognition between the uploaded videos and user interface components. This facilitates the provision of corresponding color optimization strategies under different playback conditions, ensuring a superior viewing and interactive experience for the user.
[0044] S120. Determine the deployment area of the preset interface components under the preset playback conditions from the preset video frames.
[0045] In this embodiment, the preset playback conditions may include device information of the playback device and user configuration information. The device information may include hardware information and software information. Hardware information may include, for example, the display screen size, and software information may include, for example, the screen ratio configured by the operating system. User configuration information may include user adjustment information for the position of movable preset interface components. Due to the diversity of playback devices, the preset playback conditions may include at least one. In this embodiment, the identification device can determine the deployment area of the preset interface components in the preset video frame for each preset playback condition.
[0046] The preset interface components are related to the application playing the video to be identified. In addition to displaying the video content, the playback interface within the application can also overlay UI components (i.e., the preset interface components) with display / interaction functions.
[0047] For example, the preset interface components may include a top navigation bar component, an interaction area component, and an information area component. The top navigation bar component may be located in the top navigation bar of the playback interface and may include components such as "Recommended," "Following," and "Local." Switching between these components allows switching the video stream within the playback interface. The interaction area component may be located in the right-hand area of the playback interface and may include components such as "Like," "Comment," "Favorite," and "Share," along with their corresponding data. Triggering these components enables related interactive functions. The information area component may be located at the bottom of the playback interface and may include controls for displaying video-related information such as "Author Information," "Video Description," "Video Tags," and "Background Music." If the preset interface components overlap in color with the video content, it will affect switching, interaction, and information / video display, degrading the user experience.
[0048] Since the preset interface components are deployed in a local position on the playback interface, this embodiment can use existing segmentation algorithms (such as boundary cropping algorithms) to segment the area (i.e., the deployment area) that overlaps with the preset interface components from the preset video frame, and can perform color overlap recognition based on the deployment area.
[0049] In some optional implementations, the preset playback conditions include device information of the playback device; determining the deployment area of the preset interface components under the preset playback conditions from the preset video frames may include: determining the interface display area of the preset video frames and the interface deployment position of the preset interface components based on the device information; and determining the deployment area of the preset interface components from the preset video frames based on the interface display area and the interface deployment position.
[0050] For example, Figure 2 This is a schematic block diagram illustrating the deployment area determination process in a color overlap recognition method provided in an embodiment of this disclosure. See also... Figure 2Because screen size, resolution, and video aspect ratio may vary across different devices, preset video frames may be displayed partially or entirely. A first adaptive algorithm can be used to determine the display area (i.e., the interface display area) of the preset video frames on the playback interface based on the device information. Furthermore, the deployment positions of preset interface components relative to the playback interface may differ across different devices. A second adaptive algorithm can be used to determine the deployment positions (i.e., the interface deployment positions) of the preset interface components relative to the playback interface based on the device information.
[0051] Furthermore, at least one aggregation area in the playback interface can be determined based on the deployment positions of preset interface components. For example, the corresponding aggregation area can be determined based on preset interface components whose deployment positions are less than a preset threshold; or, for instance, the corresponding aggregation area can be determined based on preset interface components with the same function and whose deployment positions are less than a preset threshold. It can be assumed that each aggregation area may include at least one preset interface component. Figure 2 As shown, the interface can include three aggregated areas: a top navigation area, an interaction area, and an information area. Each aggregated area can include multiple preset interface components. Accordingly, the interface display area of a preset video frame can be cropped according to the aggregated areas, and the cropped portion of the preset video frame can be referred to as the deployment area.
[0052] Among these optional implementation methods, an adaptive algorithm can be used to determine the deployment area of the preset interface components in the preset video frame based on different device information, thereby improving versatility and achieving accurate positioning of the overlapping area between video content and interface components under different playback conditions.
[0053] S130. Convert the first color information of the pixels in the deployment area to a preset color space to obtain the second color information.
[0054] Color space can be considered as a mathematical model used to represent and describe the colors of an image. Typically, pixels within a video frame are described based on the Red Green Blue (RGB) color space. However, the RGB color space does not simulate eye perception very well. Therefore, in this embodiment, a preset color space can be pre-set that can both better simulate eye perception and is relatively simple to calculate.
[0055] The values of each dimension within a color space can be referred to as the color information within that color space. For example, the values corresponding to R, G, and B in the RGB color space can be called the color information of the RGB color space. In this embodiment of the present disclosure, the first color information of pixels within the deployment area can be linearly transformed (e.g., matrix multiplication) to obtain the second color information in a preset color space.
[0056] Because color space conversion algorithms have low complexity, they not only facilitate rapid recognition of color overlap, but also support color overlap recognition of large-scale data.
[0057] S140. Determine the first color difference based on the first value of the preset dimension in the second color information and the second value corresponding to the preset interface component; wherein, the second value includes the value of the preset dimension in the third color information; the third color information includes the color information of the preset interface component in the preset color space.
[0058] In this embodiment, the dimension that can better simulate color in the preset color space can be determined as the preset dimension. Furthermore, the third color information of the preset interface component in the preset color space can be predetermined. After determining the second color information, the color difference (i.e., the first color difference) of the overlapping area between the preset video frame and the preset interface component can be determined based on the first value of the preset dimension in the second color information and the second value of the preset dimension in the third color information.
[0059] Since the deployment area may include at least one, the process of determining the first color difference may include: for each deployment area, determining the corresponding third value based on the first value of the preset dimension in the second color information of each pixel in the deployment area; determining the fourth value based on the second value of each pixel in the preset interface component corresponding to the deployment area; and determining the first color difference in the deployment area based on the third value and the fourth value.
[0060] For each deployment area, since the second color information of the pixels within it usually differs, while the third color information of the pixels within the preset interface components is usually the same, a third value can be determined based on a first value using statistical analysis methods. Any one of the second values can then be designated as the fourth value. Determining the third value based on the first value using statistical analysis methods includes, for example, using the average, median, or most frequent first value as the third value.
[0061] By constructing a first color difference with preset dimension values in the same preset color space, it can be used to identify whether there is color overlap between the video to be identified and the preset interface components in each deployment area.
[0062] S150. Based on the first color difference, identify the color overlap between the video to be identified and the preset interface components.
[0063] In this embodiment of the disclosure, a threshold (e.g., 15) for determining whether color difference overlap exists can be preset based on empirical or experimental values. If the first color difference is less than or equal to the preset threshold, the color contrast between the video to be identified and the preset interface component is considered small, and they can be identified as having overlapping colors. If the second color difference is greater than the preset threshold, the colors of the video to be identified and the preset interface component are considered clearly distinguishable, and they can be identified as not having overlapping colors. Thus, it is possible to identify whether the video to be identified and the corresponding preset interface component in each deployment area have overlapping colors based on color difference.
[0064] Furthermore, when it is identified that the video to be identified within the deployment area overlaps in color with the corresponding preset interface components, the system can also utilize principles of contrasting and complementary colors from color theory to generate color adjustment suggestions for the preset interface components corresponding to that deployment area under the preset playback conditions. This provides a reference for interface color optimization, helps improve the readability and user-friendliness of the playback interface, and thus contributes to enhancing the user experience.
[0065] In the technical solution of this disclosure embodiment, a preset video frame in the video to be identified can be obtained; the deployment area of a preset interface component under preset playback conditions can be determined from the preset video frame; the first color information of the pixels in the deployment area can be converted to a preset color space to obtain second color information; a first color difference can be determined according to the first value of a preset dimension in the second color information and the second value corresponding to the preset interface component; wherein, the second value includes the value of the preset dimension in the third color information; the third color information includes the color information of the preset interface component in the preset color space; and color overlap recognition between the video to be identified and the preset interface component can be performed according to the first color difference.
[0066] By locating the deployment area of preset interface components within preset video frames under different preset playback conditions, more accurate color overlap recognition can be achieved, while reducing computational resource consumption. Determining the color difference between video content and preset interface components based on image color space conversion not only enables effective color overlap recognition for various types of videos, but also allows for rapid color overlap recognition due to the low algorithm complexity of color space conversion. In summary, the color overlap recognition method provided in this disclosure can achieve fast, effective, and highly accurate color overlap recognition, providing a reference for subsequent user interface color optimization.
[0067] This embodiment can be combined with various optional solutions in the color overlap recognition method provided in the above embodiments. The color overlap recognition method provided in this embodiment describes in detail the preset color space and preset dimensions. By converting to a preset color space that includes a brightness dimension and a color contrast dimension, it is possible to both better simulate eye perception and ensure relatively simple calculation. By using the brightness dimension as the dimension for simulating color, color difference can be well represented. Thus, fast, effective, and highly accurate color overlap recognition can be achieved.
[0068] In the color overlap recognition method provided in this embodiment, the first color information of pixels in the deployment area is converted to a preset color space, which may include: linearly converting the first color information to a preset color space that includes a brightness dimension and a color contrast dimension.
[0069] In this embodiment, the preset color space, which includes a brightness dimension and a color-opposite dimension, can be, for example, the Lab color space. The Lab color space can contain three numerical dimensions: a brightness dimension (L) and two opposite color channel dimensions (a and b). Since the video to be identified typically belongs to the RGB color space, which cannot be directly converted to the Lab color space, the first color information of the RGB color space can be linearly converted to the CIE color space (e.g., the CIE 1931 XYZ color space) for a transition, and then linearly converted to the Lab color space. For example, converting the first color information of pixels within the deployment area to a preset color space may include: first converting the color information of the RGB color space to the color information of the sRGB color space through a power-law (Gamma) transformation; then converting the color information of the sRGB color space to the color information of the CIE1931XYZ color space through a linear mapping; and then linearly converting the color information of the CIE1931XYZ color space to the color information of the Lab color space based on the information of the white reference point of the CIE 1931XYZ color space (such as Observer. = 2°, Illuminant = D65, etc.).
[0070] The preset dimensions include a brightness dimension (L). The brightness dimension value can range from [0, 100], with larger values indicating higher brightness. A brightness dimension of 0 corresponds to black, and a brightness dimension of 100 corresponds to white. For example, Figure 3 This is a schematic diagram illustrating different brightness differences in a color overlap recognition method provided in an embodiment of this disclosure. Figure 3 The image shows different brightness differences (e.g.) Figure 3 The fitting results of the background and components corresponding to 0, 3, 8 and 12 in the figure are obtained by Figure 3 It can be seen that the difference in brightness can fit the contrast between colors very well.
[0071] The technical solutions of this disclosure provide a detailed description of the preset color space and preset dimensions. By converting to a preset color space that includes a brightness dimension and a color contrast dimension, it is possible to both better simulate eye perception and ensure relatively simple calculations. By using the brightness dimension as the dimension for simulating color, color difference can be well represented. This enables fast, effective, and highly accurate color overlap recognition. The color overlap recognition method provided in this disclosure belongs to the same disclosed concept as the color overlap recognition method provided in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and the same technical features have the same beneficial effects in this embodiment and the above embodiments.
[0072] This embodiment can be combined with various optional schemes in the color overlap recognition method provided in the above embodiments. The color overlap recognition method provided in this embodiment details the process of determining the color difference and the process of determining the recognition threshold for color overlap. By determining the color weight in the color difference calculation process according to the type of video to be recognized, the accuracy of color overlap recognition for different types of videos can be improved. By adaptively adjusting the recognition threshold based on the color difference and playback conditions of videos of the same type as the video to be recognized, the accuracy of color overlap recognition for different types of videos can be further improved.
[0073] In the color overlap recognition method provided in this embodiment, determining the first color difference based on the first value of the preset dimension in the second color information and the second value corresponding to the preset interface component may include: determining the first color weight corresponding to the first value and the second color weight corresponding to the second value based on the video type of the video to be recognized; and determining the first color difference based on the first value, the first color weight, the second value and the second color weight.
[0074] In this embodiment, the video type of the video to be identified can be determined based on preset video frames using a preset classification model. The preset classification model can be pre-constructed based on sample video frames extracted from sample videos and the corresponding ground truth values for video types. A pre-defined correspondence between different video types and color weight combinations can be established. Furthermore, after determining the video type of the video to be identified, the color weight combination corresponding to the video to be identified can be determined according to the preset correspondence. This corresponding color weight combination can include a first color weight corresponding to a first value and a second color weight corresponding to a second value.
[0075] For example, the first color difference ΔE can be determined by the following formula:
[0076]
[0077] Among them, abs(.) can represent the absolute value function; and These can represent the first color weight and the second color weight, respectively; light v It can represent a third value determined based on a first value corresponding to the deployment region; light m This represents the fourth value determined based on the second value corresponding to the same deployment area.
[0078] By determining the color weights in the color difference calculation process based on the type of video to be identified, the color difference representation of video content and components under different video types can be more accurately quantified, thereby improving the accuracy of color overlap recognition for different types of videos.
[0079] Furthermore, in the color overlap recognition method provided in this embodiment, the color overlap recognition of the video to be recognized and the preset interface component based on the first color difference may include: obtaining a threshold adjustment value; wherein, the threshold adjustment value includes a value determined based on the second color difference of the video to be recognized and the playback status of the video of the same type; determining a recognition threshold based on the preset threshold reference value and the threshold adjustment value; and performing color overlap recognition based on the first color difference and the recognition threshold.
[0080] In this embodiment, video-component samples with different color differences can be manually labeled in advance using a blind testing mechanism to determine a threshold benchmark value. This threshold benchmark value can serve as a relatively accurate standard for identifying the existence of color overlap from a visual perspective. Furthermore, under preset conditions, the color difference between videos and components within the deployment area of the same type of video as the video to be identified, as well as the playback status of that type of video, can be statistically analyzed.
[0081] The preset conditions may include, for example, every preset time interval. Playback parameters may include, but are not limited to, the number of plays and completion rate. The threshold adjustment value can be determined based on the color difference and playback performance of similar videos using a pre-built neural network model. For example, if similar videos still have good playback performance despite small color differences, the threshold adjustment value can be determined to be negative. It is understood that the threshold adjustment values for each video type can be dynamically updated.
[0082] Specifically, the threshold baseline value can be adjusted using a threshold adjustment value to obtain a recognition threshold that more accurately identifies whether color overlap exists for this video type. Furthermore, by comparing the first color difference with the recognition threshold, it is possible to identify whether there is color overlap between the video to be recognized and preset interface components within the corresponding deployment range.
[0083] By adjusting the threshold based on the color difference and playback conditions of similar videos, the accuracy of color overlap recognition for different types of videos can be further improved.
[0084] The technical solution of this disclosure describes in detail the process of determining color difference and the process of determining the recognition threshold for identifying whether color difference overlap exists. By determining the weight in the color difference calculation process according to the type of video to be identified, the accuracy of color overlap recognition for different types of videos can be improved. By adaptively adjusting the recognition threshold based on the color difference and playback conditions of videos of the same type as the video to be identified, the accuracy of color overlap recognition for different types of videos can be further improved. The color overlap recognition method provided in this disclosure belongs to the same concept as the color overlap recognition method provided in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and the same technical features have the same beneficial effects in this embodiment and the above embodiments.
[0085] Figure 4 This is a schematic diagram of a color overlap recognition device provided in an embodiment of the present disclosure. The color overlap recognition device provided in this embodiment is suitable for identifying whether there is color overlap between video content and user interface components.
[0086] like Figure 4 As shown, the color matching recognition device provided in this embodiment may include:
[0087] The video frame acquisition module 410 is used to acquire preset video frames in the video to be identified.
[0088] The region determination module 420 is used to determine the deployment area of the preset interface components under the preset playback conditions from the preset video frames;
[0089] The color conversion module 430 is used to convert the first color information of pixels in the deployment area to a preset color space to obtain the second color information.
[0090] The color difference determination module 440 is used to determine the first color difference based on the first value of the preset dimension in the second color information and the second value corresponding to the preset interface component; wherein, the second value includes the value of the preset dimension in the third color information; the third color information includes the color information of the preset interface component in the preset color space;
[0091] The recognition module 450 is used to identify the color overlap between the video to be recognized and the preset interface components based on the first color difference.
[0092] In some alternative implementations, the color matching recognition device may also include:
[0093] The video acquisition module is used to receive the video to be recognized uploaded by the application before acquiring the preset video frames in the video to be recognized.
[0094] In some optional implementations, the video frame acquisition module can be used to: extract video frames from the video to be identified according to a preset extraction strategy to obtain preset video frames.
[0095] In some optional implementations, the preset playback conditions include the playback device's device information; the region determination module can be used for:
[0096] Based on the device information, determine the interface display area of the preset video frame and the interface deployment position of the preset interface components.
[0097] Based on the interface display area and the interface deployment location, the deployment area of the preset interface components is determined from the preset video frames.
[0098] In some alternative implementations, the color conversion module can be used for:
[0099] The first color information is linearly transformed into a preset color space that includes a brightness dimension and a color contrast dimension.
[0100] In some optional implementations, the preset dimension includes the brightness dimension.
[0101] In some alternative implementations, the color difference determination module can be used for:
[0102] Based on the video type of the video to be identified, determine the first color weight corresponding to the first value and the second color weight corresponding to the second value.
[0103] The first color difference is determined based on the first numerical value, the first color weight, the second numerical value, and the second color weight.
[0104] In some alternative implementations, the identification module can be used for:
[0105] Obtain the threshold adjustment value; wherein, the threshold adjustment value includes a value determined based on the second color difference and playback status of similar videos of the video to be identified;
[0106] The identification threshold is determined based on the preset threshold baseline value and threshold adjustment value;
[0107] Color overlap recognition is performed based on the first color difference and the recognition threshold.
[0108] The color overlap recognition device provided in this disclosure can execute the color overlap recognition method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of executing the method.
[0109] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.
[0110] The following is for reference. Figure 5 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 5 The diagram below shows the structure of the terminal device or server 500. The terminal device in this embodiment 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), and vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0111] like Figure 5 As shown, the electronic device 500 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0112] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 500 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.
[0113] 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 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the color matching recognition method of embodiments of this disclosure.
[0114] The electronic device provided in this embodiment and the color overlap recognition method provided in the above embodiments belong to the same disclosed concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0115] This disclosure provides a storage medium for computer-executable instructions, which, when executed by a computer processor, can be used to perform the color overlap recognition method provided in the above embodiments.
[0116] It should be noted that the storage 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 (FLASH), 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 that contains or stores executable instructions 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 executable instructions. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit executable instructions for use by or in connection with an instruction execution system, apparatus, or device. Executable instructions contained on the storage 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.
[0117] 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 end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0118] The aforementioned storage medium may be included in the aforementioned electronic device; or it may exist independently and not be assembled into the electronic device.
[0119] The aforementioned storage medium carries one or more executable instructions, which, when executed by the electronic device, cause the electronic device to:
[0120] Obtain preset video frames from the video to be identified; determine the deployment area of preset interface components under preset playback conditions from the preset video frames; convert the first color information of pixels within the deployment area to a preset color space to obtain second color information; determine a first color difference based on the first value of a preset dimension in the second color information and the second value corresponding to the preset interface component; wherein the second value includes the value of the preset dimension in the third color information; the third color information includes the color information of the preset interface component in the preset color space; and perform color overlap recognition between the video to be identified and the preset interface component based on the first color difference.
[0121] Executable instructions 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 executable instructions 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).
[0122] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, can implement the color overlap recognition method provided in any embodiment of this disclosure.
[0123] In implementing a computer program product, computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar 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).
[0124] 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.
[0125] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units and modules do not, in certain circumstances, constitute a limitation on the unit or module itself.
[0126] 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 Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Parts (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), and so on.
[0127] 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.
[0128] According to one or more embodiments of this disclosure, a method for recognizing color overlap is provided, the method comprising:
[0129] Obtain preset video frames from the video to be identified;
[0130] Determine the deployment area of the preset interface components under the preset playback conditions from the preset video frames;
[0131] The first color information of the pixels within the deployment area is converted to a preset color space to obtain the second color information;
[0132] A first color difference is determined based on a first value of a preset dimension in the second color information and a second value corresponding to the preset interface component; wherein, the second value includes the value of the preset dimension in the third color information; the third color information includes the color information of the preset interface component in the preset color space;
[0133] The color overlap between the video to be identified and the preset interface component is identified based on the first color difference.
[0134] According to one or more embodiments of this disclosure, a method for recognizing color overlap is provided, further comprising:
[0135] In some optional implementations, before obtaining the preset video frames in the video to be identified, the method further includes: receiving the video to be identified uploaded by the application.
[0136] According to one or more embodiments of this disclosure, a method for recognizing color overlap is provided, further comprising:
[0137] In some optional implementations, obtaining the preset video frames in the video to be identified includes: extracting video frames from the video to be identified according to a preset extraction strategy to obtain the preset video frames.
[0138] According to one or more embodiments of this disclosure, a method for recognizing color overlap is provided, further comprising:
[0139] In some optional implementations, the preset playback conditions include device information of the playback device; determining the deployment area of the preset interface components under the preset playback conditions from the preset video frames includes:
[0140] Based on the device information, determine the interface display area of the preset video frame and the interface deployment position of the preset interface components;
[0141] Based on the interface display area and the interface deployment location, the deployment area of the preset interface component is determined from the preset video frame.
[0142] According to one or more embodiments of this disclosure, a method for recognizing color overlap is provided, further comprising:
[0143] In some optional implementations, converting the first color information of pixels within the deployment area to a preset color space includes:
[0144] The first color information is linearly converted to a preset color space that includes a brightness dimension and a color contrast dimension.
[0145] According to one or more embodiments of this disclosure, a method for recognizing color overlap is provided, further comprising:
[0146] In some optional implementations, the preset dimension includes the brightness dimension.
[0147] According to one or more embodiments of this disclosure, a method for recognizing color overlap is provided, further comprising:
[0148] In some optional implementations, determining the first color difference based on a first value of a preset dimension in the second color information and a second value corresponding to the preset interface component includes:
[0149] Based on the video type of the video to be identified, determine the first color weight corresponding to the first value and the second color weight corresponding to the second value;
[0150] The first color difference is determined based on the first value, the first color weight, the second value, and the second color weight.
[0151] According to one or more embodiments of this disclosure, a method for recognizing color overlap is provided, further comprising:
[0152] In some optional implementations, the color overlap recognition between the video to be identified and the preset interface component based on the first color difference includes:
[0153] Obtain a threshold adjustment value; wherein the threshold adjustment value includes a value determined based on the second color difference and playback status of similar videos of the video to be identified;
[0154] The identification threshold is determined based on the preset threshold baseline value and the threshold adjustment value;
[0155] The color overlap recognition is performed based on the first color difference and the recognition threshold.
[0156] According to one or more embodiments of this disclosure, a color matching recognition device is provided, the device comprising:
[0157] The video frame acquisition module is used to acquire preset video frames from the video to be identified;
[0158] The region determination module is used to determine the deployment region of the preset interface components under preset playback conditions from the preset video frames;
[0159] The color conversion module is used to convert the first color information of pixels within the deployment area to a preset color space to obtain the second color information;
[0160] A color difference determination module is used to determine a first color difference based on a first value of a preset dimension in the second color information and a second value corresponding to the preset interface component; wherein, the second value includes the value of the preset dimension in the third color information; the third color information includes the color information of the preset interface component in the preset color space;
[0161] The recognition module is used to identify the color overlap between the video to be recognized and the preset interface component based on the first color difference.
[0162] 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.
[0163] 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.
[0164] 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 examples of implementing the claims.
Claims
1. A method for recognizing overlapping colors, characterized in that, include: Obtain preset video frames from the video to be identified; Determine the deployment area of the preset interface components under the preset playback conditions from the preset video frames; The first color information of the pixels within the deployment area is converted to a preset color space to obtain the second color information; A first color difference is determined based on a first value of a preset dimension in the second color information and a second value corresponding to the preset interface component; wherein, the second value includes the value of the preset dimension in the third color information; the third color information includes the color information of the preset interface component in the preset color space; The color overlap between the video to be identified and the preset interface component is identified based on the first color difference.
2. The method according to claim 1, characterized in that, Before obtaining the preset video frames in the video to be identified, the method further includes: receiving the video to be identified uploaded by the application.
3. The method according to claim 1, characterized in that, The step of obtaining the preset video frames in the video to be identified includes: extracting video frames from the video to be identified according to a preset extraction strategy to obtain the preset video frames.
4. The method according to claim 1, characterized in that, The preset playback conditions include device information of the playback device; determining the deployment area of the preset interface components under the preset playback conditions from the preset video frames includes: Based on the device information, determine the interface display area of the preset video frame and the interface deployment position of the preset interface components; Based on the interface display area and the interface deployment location, the deployment area of the preset interface component is determined from the preset video frame.
5. The method according to claim 1, characterized in that, The step of converting the first color information of pixels within the deployment area to a preset color space includes: The first color information is linearly converted to a preset color space that includes a brightness dimension and a color contrast dimension.
6. The method according to claim 5, characterized in that, The preset dimension includes the brightness dimension.
7. The method according to claim 1, characterized in that, Determining the first color difference based on the first value of a preset dimension in the second color information and the second value corresponding to the preset interface component includes: Based on the video type of the video to be identified, determine the first color weight corresponding to the first value and the second color weight corresponding to the second value; The first color difference is determined based on the first value, the first color weight, the second value, and the second color weight.
8. The method according to claim 1, characterized in that, Based on the first color difference, the color overlap recognition between the video to be identified and the preset interface component includes: Obtain a threshold adjustment value; wherein the threshold adjustment value includes a value determined based on the second color difference and playback status of similar videos of the video to be identified; The identification threshold is determined based on the preset threshold baseline value and the threshold adjustment value; The color overlap recognition is performed based on the first color difference and the recognition threshold.
9. A color matching recognition device, characterized in that, include: The video frame acquisition module is used to acquire preset video frames from the video to be identified; The region determination module is used to determine the deployment region of the preset interface components under preset playback conditions from the preset video frames; The color conversion module is used to convert the first color information of pixels within the deployment area to a preset color space to obtain the second color information; A color difference determination module is used to determine a first color difference based on a first value of a preset dimension in the second color information and a second value corresponding to the preset interface component; wherein, the second value includes the value of the preset dimension in the third color information; the third color information includes the color information of the preset interface component in the preset color space; The recognition module is used to identify the color overlap between the video to be recognized and the preset interface component based on the first color difference.
10. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the color overlap recognition method as described in any one of claims 1-8.
11. A storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to perform the color matching recognition method as described in any one of claims 1-8.
12. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the color overlap recognition method as described in any one of claims 1-8.