CN116681786A - Background color generation method, device, equipment and storage medium - Google Patents

Background color generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN116681786A
CN116681786A CN202310541546.7A CN202310541546A CN116681786A CN 116681786 A CN116681786 A CN 116681786A CN 202310541546 A CN202310541546 A CN 202310541546A CN 116681786 A CN116681786 A CN 116681786A
Authority
CN
China
Prior art keywords
color
preset
background
television
film
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310541546.7A
Other languages
Chinese (zh)
Inventor
夏雄飞
王露
梁翔宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Formovie Chongqing Innovative Technology Co Ltd
Original Assignee
Formovie Chongqing Innovative Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Formovie Chongqing Innovative Technology Co Ltd filed Critical Formovie Chongqing Innovative Technology Co Ltd
Priority to CN202310541546.7A priority Critical patent/CN116681786A/en
Publication of CN116681786A publication Critical patent/CN116681786A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to the technical field of projectors, and discloses a background color generation method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring color parameters of each pixel point in the film and television cover diagram in an HSV color space, wherein the color parameters comprise hue components, saturation components and brightness components; extracting to-be-processed color parameters of which the saturation component is in a preset saturation range and the brightness component is in a preset brightness range from the color parameters; and generating the background color of the movie detail page according to the color parameters to be processed. According to the method and the device, the background color of the film and television detail page is generated through the to-be-processed color parameters of which the saturation component is in the preset saturation range and the brightness component is in the preset brightness range, so that the problem that other elements on the background color of the conventional film and television detail page become unclear due to the fact that the colors are similar is avoided, and the visual experience of a user is effectively improved.

Description

Background color generation method, device, equipment and storage medium
Technical Field
The present invention relates to the field of projector technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating a background color.
Background
With the improvement of the living standard of people, the projector is full of science and technology sense, more and more people pursue more extremely richer visual experience, and therefore, the improvement of the diversity of the background colors of the detail pages of the film and television works of the projector becomes more and more necessary.
At present, background colors of detail pages of film and television works of common projectors adopt schemes such as solid colors, gaussian blur of the cover images of the works, theme colors of the cover images of the works and the like, but the schemes face rich and varied cover images of the film and television works, all have the problems of single color, confusion of the colors, excessively bright theme colors and the like, so that other elements on the detail pages become unclear due to the close colors, and visual experience is affected.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a background color generation method, device, equipment and storage medium, and aims to solve the technical problems that the background color of a detail page of a film and television work of a shadow meter in the prior art adopts pure color, gaussian blur of a cover map of the work, theme color of the cover map of the work and the like, and the problems of single color, confusion of the color, over bright theme color and the like exist, so that other elements on the detail page become unclear due to the close color, and visual experience is affected.
In order to achieve the above object, the present invention provides a background color generation method including the steps of:
acquiring color parameters of each pixel point in a film and television cover diagram in an HSV color space, wherein the color parameters comprise hue components, saturation components and brightness components;
extracting to-be-processed color parameters, of which the saturation component is in a preset saturation range and the brightness component is in a preset brightness range, from the color parameters;
and generating the background color of the movie and television detail page according to the color parameters to be processed.
Optionally, the step of generating the background color of the movie detail page according to the to-be-processed color parameter includes:
accumulating the occurrence times of each color parameter in the color parameters to be processed;
extracting a target color parameter with the largest occurrence number of the color parameters in the color parameters to be processed;
and combining the target color parameter with a preset gradient color to generate a background color of the movie and television detail page.
Optionally, the step of combining the target color parameter with a preset gradient color to generate a background color of the movie and television detail page includes:
adding the target color parameters to a background color base map of a movie detail page;
superposing preset gradient color in a preset gradient area of the film and television detail page to generate a combined color of the target color parameter and the preset gradient color;
and taking the combined color as a background color of the movie detail page.
Optionally, before the step of extracting the color parameter to be processed, in which the saturation component is in a preset saturation range and the brightness component is in a preset brightness range, the method further includes:
judging whether saturation components in the color parameters reach a preset black-and-white component threshold value or not;
if the preset black-and-white component threshold is not reached, judging that the film and television cover picture is a black-and-white picture;
and when the film and television cover map is a black-and-white picture, acquiring a preset specified color parameter, and taking the preset specified color parameter as the background color of the film and television detail page.
Optionally, after the step of determining whether the saturation component in each color parameter reaches the preset black-and-white component threshold, the method further includes:
if the preset black-and-white component threshold value is reached, judging that the film and television cover picture is not a black-and-white picture;
and when the film and television cover map is not a black-and-white picture, executing the steps of extracting the to-be-processed color parameters of which the saturation component is in a preset saturation range and the brightness component is in a preset brightness range from the color parameters.
Optionally, the step of obtaining color parameters of each pixel point in the film and television cover map in the HSV color space includes:
acquiring a film and television cover source diagram corresponding to the film and television cover diagram;
performing bitmap conversion on the film and television cover source map to obtain a film and television cover bitmap;
and traversing each pixel point in the film and television cover bitmap to obtain the color parameters of each pixel point in the HSV color space.
Optionally, the preset saturation range is 10% -70%, and the preset brightness range is 40% -44%.
In addition, to achieve the above object, the present invention also proposes a background color generation apparatus including:
the color acquisition module is used for acquiring color parameters of each pixel point in the film and television cover diagram in an HSV color space, wherein the color parameters comprise hue components, saturation components and brightness components;
the color filtering module is used for extracting to-be-processed color parameters, wherein the saturation component is in a preset saturation range, and the brightness component is in a preset brightness range, from the color parameters;
and the color generation module is used for generating background colors of the film and television detail pages according to the color parameters to be processed.
In addition, to achieve the above object, the present invention also proposes a background-color generation apparatus including: a memory, a processor, and a background color generation program stored on the memory and executable on the processor, the background color generation program configured to implement the steps of the background color generation method as described above.
In addition, in order to achieve the above object, the present invention also proposes a storage medium having stored thereon a background-color generation program which, when executed by a processor, implements the steps of the background-color generation method as described above.
The invention provides a background color generation method, a device, equipment and a storage medium, wherein the method comprises the steps of obtaining color parameters of each pixel point in a film and television cover diagram in an HSV color space, wherein the color parameters comprise hue components, saturation components and brightness components; then extracting to-be-processed color parameters of which the saturation component is in a preset saturation range and the brightness component is in a preset brightness range from the color parameters; and finally, generating the background color of the movie and television detail page according to the color parameters to be processed. According to the invention, the to-be-processed color parameters with the saturation component in the preset saturation range and the brightness component in the preset brightness range are extracted from the color parameters, so that the background color of the movie and television detail page is different from the theme color of the movie and television cover map. According to the page generation method, through the strategy of filtering the color parameters of which the saturation component and the brightness component are not in the preset dark color parameter range in the color parameters, the problem that other elements on the background color of the conventional film and television detail page become unclear due to similar colors is avoided, and the visual experience of a user is effectively improved.
Drawings
FIG. 1 is a schematic diagram of a background color generation device of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart of a background color generation method according to a first embodiment of the present invention;
FIG. 3 is a flowchart of a second embodiment of a background color generation method according to the present invention;
FIG. 4 is an overall flowchart of background color generation in a second embodiment of a background color generation method of the present invention;
FIG. 5 is a diagram of a movie detail page in a second embodiment of the background color generation method of the present invention;
FIG. 6 is a flowchart of a background color generation method according to a third embodiment of the present invention;
fig. 7 is a block diagram showing the structure of a first embodiment of the background-color generation apparatus of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of a background color generation device of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the background-color generation apparatus may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the structure shown in fig. 1 does not constitute a limitation of the background-color-generating apparatus, and may include more or fewer components than shown, or may combine certain components, or may be arranged in a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a background color generation program may be included in the memory 1005 as one type of storage medium.
In the background-color-generation apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the background color generation apparatus of the present invention may be provided in the background color generation apparatus, which calls the background color generation program stored in the memory 1005 through the processor 1001 and executes the background color generation method provided by the embodiment of the present invention.
An embodiment of the present invention provides a background color generation method, and referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the background color generation method of the present invention.
In this embodiment, the background color generation method includes the following steps:
step S10: and acquiring color parameters of each pixel point in the film and television cover diagram in an HSV color space, wherein the color parameters comprise hue components, saturation components and brightness components.
It should be noted that, the execution body of the method of the embodiment may be a computing service device with background color generation, network communication and program running functions, for example, a projector, a television, a mobile phone, a tablet computer, a personal computer, etc., or may be other electronic devices that implement the same or similar functions. The present embodiment and the following embodiments will be described below with reference to the above-described background-color generation apparatus.
It is understood that the aforementioned video cover map may be a cover map of a video work that is directly presented to a user.
The HSV is a color pattern that uses three attributes of colors to represent colors. In HSV mode, three attributes are H, S and V, respectively, where H (Hues) represents hue, S (Saturation) represents Saturation, and V (Value) represents brightness. HSV color patterns are based on human perception of color, describing three basic characteristics of color.
In a specific implementation, the background color generating device may respond to the user-triggered details page display of the movie work to perform an operation of acquiring color parameters of each pixel point in the HSV color space in the movie cover map, or may perform an operation of acquiring color parameters of each pixel point in the HSV color space in the movie cover map when the device is in an idle state, which is not limited in this embodiment. The method comprises the following steps: and traversing each pixel point in the film and television cover map, and then determining the H component, the S component and the V component of the color parameters of each pixel point in the HSV color space.
Further, in order to improve the accuracy of the color parameter acquisition, in this embodiment, the step S10 includes:
step S101: and acquiring a film and television cover source diagram corresponding to the film and television cover diagram.
The source image of the film and television cover is an original image which can be directly accessed and processed by the background color generation device.
In a specific implementation, when the background color generating device detects that the background color of the page detail page needs to be generated, the source diagram of the film and television cover diagram can be acquired.
Step S102: and carrying out bitmap conversion on the film and television cover source map to obtain a film and television cover bitmap.
The video cover bitmap may be a picture composed of a single dot of pixels. Because the film and television cover picture formed by the pixel points has the theme color, each pixel point also has the corresponding color parameter.
In a specific implementation, the background color generation device may convert the color cover source map into a bitmap, thereby obtaining a video cover bitmap composed of single pixels.
Step S103: and traversing each pixel point in the film and television cover bitmap to obtain the color parameters of each pixel point in the HSV color space.
In a specific implementation, the background color generating device may traverse each pixel point in the bitmap of the film and television cover, and determine a color parameter of each pixel point in the HSV generating space; RGB color parameters for each pixel point may also be determined and then converted into color parameters in the HSV generation space, i.e., HSV color parameters. Because the HSV color parameters are determined by traversing each pixel point in the film and television cover bitmap, the accuracy of acquiring the HSV color parameters is effectively improved.
Step S20: extracting to-be-processed color parameters, wherein the saturation component is in a preset saturation range, and the brightness component is in a preset brightness range, from the color parameters.
Correspondingly, in this embodiment, the preset saturation range is 10% -70%, and the preset brightness range is 40% -44%.
In a specific implementation, the background color generating device may filter the acquired HSV color parameters according to the preset saturation component and the preset brightness range, filter color parameters in which the saturation component (S component) in each color parameter is not in the preset saturation range and the brightness component (V component) in each color parameter is not in the preset brightness range, so that the saturation component (S component) in each remaining color parameter is in the preset saturation range, the brightness component (V component) is in the color parameter in the preset brightness range, and extract each remaining color parameter to obtain the color parameter to be processed.
It should be understood that, the color parameters of each pixel point in the HSV color space in the film and television cover chart represent the theme color of the film and television cover chart, and if the background color of the film and television detail page is directly generated by the theme color, the background color of the film and television detail page is consistent with the theme color, so that the visual experience is affected. And the saturation component (S component) in the color parameters is controlled to be kept in the preset saturation range and the brightness component (V component) is controlled to be kept in the preset brightness range, so that the background color of the color detail page generated by the color parameters to be processed is obviously different from the color parameters of the theme color, the background color of the detail page is prevented from being consistent with the theme color, the bitmap of visual experience is influenced, and the problem that the theme color is too bright is also avoided.
Step S30: and generating the background color of the movie and television detail page according to the color parameters to be processed.
It should be noted that, the movie detail page may be a detail page that is displayed to the user and describes the movie work. The movie detail page may include a movie cover map, a UI, and a text introduction.
In a specific implementation, the background color generating device may use the to-be-processed color parameter as a background color of the movie and television detail page, and since a saturation component (S component) in the to-be-processed color parameter is in the preset saturation range and a brightness component (V component) is in a color parameter in the preset brightness range, the to-be-processed color parameter may be obviously different from a theme color of the movie and television cover map, so that a problem that other elements on the movie and television detail page become unclear due to a color close to the theme color of the movie and television cover is effectively avoided.
According to the embodiment, color parameters of each pixel point in the film and television cover diagram in an HSV color space are obtained, wherein the color parameters comprise hue components, saturation components and brightness components; then extracting to-be-processed color parameters of which the saturation component is in a preset saturation range and the brightness component is in a preset brightness range from the color parameters; and finally, generating the background color of the movie and television detail page according to the color parameters to be processed. According to the method, the to-be-processed color parameters with the saturation component in the preset saturation range and the brightness component in the preset brightness range are extracted from the color parameters, so that the background color of the movie and television detail page is different from the theme color of the movie and television cover map. According to the page generation method, through the strategy of filtering the color parameters, in which the saturation component and the brightness component in the color parameters are not in the preset dark color parameter range, the problem that other elements on the background color of the conventional film and television detail page become unclear due to similar colors is avoided, and the visual experience of a user is effectively improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a second embodiment of a background color generation method according to the present invention.
Based on the first embodiment, in this embodiment, the step S30 includes:
step S301: and accumulating the occurrence times of each color parameter in the color parameters to be processed.
It should be noted that, if the color range of the theme color of the film and television cover chart is larger, the number of to-be-processed color parameters in which the brightness component is in the preset brightness range and the saturation component is in the preset saturation range is larger, if the to-be-processed color parameters are directly used for generating the background color of the film and television detail page, multiple colors are contained in the background color, so that the generated background color is not accurate enough. The present embodiment is therefore presented so that the exact appropriate color can be extracted under any video cover map.
In a specific implementation, the background color generation device counts the number of pixels with the same color parameters (H, S, V components are the same) in each pixel in the film and television cover map.
Step S302: and extracting the target color parameter with the largest occurrence number of the color parameters in the color parameters to be processed.
In a specific implementation, the background color generation device may use the color parameter with the largest occurrence number of the color parameters in the color parameters to be processed as a final theme color, and then extract the final theme color, and use the final theme color as the target color parameter. The method is used for extracting the target color parameter with the largest occurrence frequency of the color parameter, and the background color generated by using the target color parameter does not have the problem that the background color contains multiple colors, so that the generated background color is accurate and proper.
It should be understood that the background color generation apparatus may also count the number of occurrences of each color parameter before filtering the color parameter, that is, while acquiring the HSV color parameter, and even if the number and magnitude relationship of the remaining color parameters is still accurate. Because the HSV color parameters are taken, the occurrence times of the color parameters are counted, the processing efficiency can be effectively improved, and the resource consumption is reduced.
Step S303: and combining the target color parameter with a preset gradient color to generate a background color of the movie and television detail page.
It should be noted that the preset gradient color may be a gradient color that enables the target color parameter and other elements on the page detail page to be perfectly fused. The gradual color change may be white with gradually changing transparency, with an ARGB range of (255, 255, 255, 255) to (0, 255, 255, 255).
In a specific implementation, the background color generating device can use the extracted target color parameter as an initial background color of the movie and television detail page, and then superimpose the preset gradient color on the initial background color, so that the target color parameter and the preset gradient color are combined, and the combined final color is used as the background color of the color detail page, so that the target color parameter can be perfectly fused with other elements on the page, and the phenomenon that other elements on the movie and television detail page are similar to the target color parameter and are not clear enough is avoided.
It should be appreciated that after the background color of the video detail page is generated, the video detail page may be saved locally, and if the user inputs a viewing instruction of the video detail page, the video detail page of the background color may be presented to the user.
For ease of understanding, the description is given with reference to fig. 4, but the present solution is not limited thereto. Fig. 4 is an overall flowchart of background color generation in the second embodiment of the background color generation method of the present invention, in fig. 4, a cover work diagram is obtained first, the cover work diagram may be the film and television cover diagram, then the cover work diagram is converted into a Bitmap, the Bitmap may be the film and television cover Bitmap, then all pixel points in the Bitmap are traversed, whether the S component in the color parameters of each pixel point is between 10% and 70%, and whether V is between 40% and 44%, if not, the color parameters are discarded, that is, the color parameters are filtered, if yes, the number of times of the colors is accumulated, the color parameters with the largest number of times are taken out, then the color parameters with the largest number of times are taken as the theme color, the theme color is the target color parameter, then the theme color is combined with the gradient color, that is, the background color of the film and television detail page may be the preset gradient color, and finally the film and television detail page of the background color may be displayed.
Further, in order to improve the efficiency of generating the background color of the movie detail page, in this embodiment, the step S303 includes:
step S3031: and adding the target color parameters to a background color base map of the movie detail page.
In a specific implementation, the background color generation device may fill the target color parameter into the movie detail page, and use the target color parameter as a background color base map of the movie detail page.
Step S3032: and superposing preset gradient color in a preset gradient area of the film and television detail page to generate a combined color of the target color parameter and the preset gradient color combination.
It should be noted that the preset gradual change area may be an area flush with the movie cover map in the preset detail page, such as an area of [0,0] - [1920, 448] of the movie detail page.
In a specific implementation, the background color generating device may superimpose a preset gradient color of an ARGB (255, 255, 255, 255) layer in a preset gradient region, such as a region from [0,0] to [1920, 448] of the movie detail page, on the basis that a background movie base map of the movie detail page is the target color parameter, so as to generate a combined color of the target color parameter and the preset gradient color, where the combined color effect may be the background color of the whole page. Wherein, in the preset gradual change region, the transparency of the preset gradual change color gradually decreases along the preset direction (from top to bottom).
Step S3033: and taking the combined color as a background color of the movie detail page.
In a specific implementation, the background color generation device may use the combined film and television as a background color of a final film and television detail page.
It should be understood that, in this embodiment, the target color parameter is added to the background color base map of the movie detail page, then the preset gradient is superimposed on the preset gradient area of the movie detail page, so as to generate a combined color of the target color parameter and the preset gradient color, and finally the combined color is used as the background color of the movie detail page.
For ease of understanding, reference is made to fig. 5, but this solution is not limited thereto. Fig. 5 is a schematic diagram of a movie detail page in a second embodiment of the background color generation method of the present invention, where the rectangular UI in the upper left area of the movie detail page in fig. 5 may be a movie cover diagram, and the area outside the rectangular UI may be other elements in the movie detail page. The background color of the movie detail page may be the background color generated by the embodiment, and the preset gradient color may be superimposed on the position flush with the movie cover map. The background color is filtered by a preset filtering strategy and is generated by the color parameter which accords with the preset dark color parameter range and has the largest range, so that the background color is obviously different from the theme color of the film and television cover map, and the user can conveniently distinguish the background color from the theme color of the film and television cover map.
Referring to fig. 6, fig. 6 is a flowchart of a third embodiment of a background color generation method according to the present invention.
Based on the above embodiments, in this embodiment, before step S20, the method further includes:
step S21: and judging whether the saturation component in each color parameter reaches a preset black-and-white component threshold value.
It should be noted that, if the film and television cover chart is a black-and-white picture, the HSV color parameter extracted from the film and television cover chart may not fall within the preset dark color parameter range, so that the background color of the film and television detail page cannot be accurately extracted.
It is understood that the above-mentioned predetermined black-and-white component threshold may be a threshold at which the saturation component in the color parameter reaches the saturation level in the black-and-white picture, that is, if the saturation component (S component) in the color parameter is less than or equal to the predetermined black-and-white threshold, the color parameter may be determined to be black-and-white, otherwise, if the saturation component (S component) in the color parameter is greater than the predetermined black-and-white threshold, the color parameter may be determined not to be black-and-white.
In a specific implementation, the background color generation device may determine whether the film and television cover chart is a black and white picture through the saturation component in the color parameter, that is, determine whether the saturation component (S component) in each HSV color parameter of the obtained film and television cover chart reaches the preset black and white component threshold.
Step S22: and if the preset black-and-white component threshold is not reached, judging that the film and television cover picture is a black-and-white picture.
In a specific implementation, the background color generation device may determine that the preset cover map is a black-and-white picture when it is determined that the saturation component (S component) in each HSV color parameter does not reach the preset black-and-white component threshold, that is, is less than or equal to the preset black-and-white component threshold.
Step S23: and when the film and television cover map is a black-and-white picture, acquiring a preset specified color parameter, and taking the preset specified color parameter as the background color of the film and television detail page.
It should be noted that the above predetermined specified color parameters may be set by a skilled person, and specific color parameters for black-and-white pictures, such as RGB (60, 68, 70).
In a specific implementation, when the background color generating device determines that the preset cover chart is a black-and-white picture, the preset specified color parameter may be obtained, and the preset specified color parameter is directly used as the background color of the movie and television detail page, so as to avoid the problem that if the operation of the embodiment is performed by using the black-and-white movie and television cover chart, the extracted HSV color parameter cannot fall in the preset dark color parameter range, and thus the background color of the movie and television detail page cannot be accurately extracted.
Accordingly, in this embodiment, after step S21, the method further includes:
step S22': and if the preset black-and-white component threshold value is reached, judging that the film and television cover picture is not a black-and-white picture.
In a specific implementation, the background color generation device may determine that the preset cover map is not a black-and-white picture when determining that the saturation component (S component) in each HSV color parameter reaches the preset black-and-white component threshold, that is, is greater than the preset black-and-white component threshold.
Step S23': and when the film and television cover map is not a black-and-white picture, executing the step of filtering each color parameter based on a preset filtering strategy to obtain the color parameter to be processed.
In a specific implementation, when the background color generating device determines that the preset cover chart is not a black-and-white picture, the step of determining that the acquired color parameters can be performed through the preset filtering policy, and filtering each color parameter based on the preset filtering policy to obtain the color parameters to be processed can be performed.
It should be understood that, in this embodiment, whether the film and television cover picture is a black and white picture is determined by determining whether the saturation component in each color parameter reaches the preset black and white component threshold, if the film and television cover picture is a black and white picture, the preset designated color parameter is used as the background color of the film and television detail page, if the film and television cover picture is not a black and white picture, the step of filtering each color parameter based on the preset filtering policy to obtain the color parameter to be processed is performed, and the background color of the film and television detail page is generated by the method of the embodiment, so that the generated background color is not affected by various cover pictures, and the accurate and proper theme color is extracted.
In addition, an embodiment of the present invention also proposes a storage medium having stored thereon a background-color generation program which, when executed by a processor, implements the steps of the background-color generation method as described above.
Referring to fig. 7, fig. 7 is a block diagram showing the structure of a first embodiment of the background color generation apparatus of the present invention.
As shown in fig. 7, the background color generation apparatus provided by the embodiment of the present invention includes:
the color acquisition module 501 is configured to acquire color parameters of each pixel point in the film and television cover map in the HSV color space.
The color filtering module 502 is configured to filter each color parameter based on a preset filtering policy, and obtain a color parameter to be processed, where the preset filtering policy is a policy for filtering color parameters in which a saturation component and a brightness component in each color parameter are not in a preset dark color parameter range.
And the color generation module 503 is configured to generate a background color of the movie and television detail page according to the to-be-processed color parameter.
According to the embodiment, color parameters of each pixel point in the film and television cover diagram in an HSV color space are obtained, wherein the color parameters comprise hue components, saturation components and brightness components; then extracting to-be-processed color parameters of which the saturation component is in a preset saturation range and the brightness component is in a preset brightness range from the color parameters; and finally, generating the background color of the movie and television detail page according to the color parameters to be processed. According to the method, the to-be-processed color parameters with the saturation component in the preset saturation range and the brightness component in the preset brightness range are extracted from the color parameters, so that the background color of the movie and television detail page is different from the theme color of the movie and television cover map. According to the page generation method, through the strategy of filtering the color parameters, in which the saturation component and the brightness component in the color parameters are not in the preset dark color parameter range, the problem that other elements on the background color of the conventional film and television detail page become unclear due to similar colors is avoided, and the visual experience of a user is effectively improved.
As an implementation manner, the color obtaining module 501 is further configured to obtain a film and television cover source map corresponding to the film and television cover map; performing bitmap conversion on the film and television cover source map to obtain a film and television cover bitmap; and traversing each pixel point in the film and television cover bitmap to obtain the color parameters of each pixel point in the HSV color space.
As an embodiment, the preset saturation range is 10% -70%, and the preset brightness range is 40% -44%.
Based on the above-described first embodiment of the background-color-generation apparatus of the present invention, a second embodiment of the background-color-generation apparatus of the present invention is proposed.
In this embodiment, the color generation module 503 is further configured to accumulate the number of occurrences of each color parameter in the color parameters to be processed; extracting a target color parameter with the largest occurrence number of the color parameters in the color parameters to be processed; and combining the target color parameter with a preset gradient color to generate a background color of the movie and television detail page.
As an implementation manner, the color generation module 503 is further configured to add the target color parameter to a background color base chart of a movie detail page; superposing preset gradient color in a preset gradient area of the film and television detail page to generate a combined color of the target color parameter and the preset gradient color; and taking the combined color as a background color of the movie detail page.
Based on the above-described embodiments of the background-color-generation apparatus of the present invention, a third embodiment of the background-color-generation apparatus of the present invention is presented.
In this embodiment, the color filtering module 502 is further configured to determine whether the saturation component in each color parameter reaches a preset black-and-white component threshold; if the preset black-and-white component threshold is not reached, judging that the film and television cover picture is a black-and-white picture; and when the film and television cover map is a black-and-white picture, acquiring a preset specified color parameter, and taking the preset specified color parameter as the background color of the film and television detail page.
As an implementation manner, the color filtering module 502 is further configured to determine that the film and television cover map is not a black and white picture if the preset black and white component threshold is reached; and when the film and television cover map is not a black-and-white picture, executing the step of filtering each color parameter based on a preset filtering strategy to obtain the color parameter to be processed.
The specific implementation manner of the background color generation device of the present invention may refer to the above method embodiments, and will not be described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. read-only memory/random-access memory, magnetic disk, optical disk), comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. A background color generation method, characterized in that the background color generation method comprises the steps of:
acquiring color parameters of each pixel point in a film and television cover diagram in an HSV color space, wherein the color parameters comprise hue components, saturation components and brightness components;
extracting to-be-processed color parameters, of which the saturation component is in a preset saturation range and the brightness component is in a preset brightness range, from the color parameters;
and generating the background color of the movie and television detail page according to the color parameters to be processed.
2. The background color generation method according to claim 1, wherein the step of generating a background color of a movie detail page from the color parameters to be processed comprises:
accumulating the occurrence times of each color parameter in the color parameters to be processed;
extracting a target color parameter with the largest occurrence number of the color parameters in the color parameters to be processed;
and combining the target color parameter with a preset gradient color to generate a background color of the movie and television detail page.
3. The background color generation method of claim 2, wherein the step of generating the background color of the movie detail page by combining the target color parameter with a preset gradation color comprises:
adding the target color parameters to a background color base map of a movie detail page;
superposing preset gradient color in a preset gradient area of the film and television detail page to generate a combined color of the target color parameter and the preset gradient color;
and taking the combined color as a background color of the movie detail page.
4. The background color generation method of claim 1, wherein the step of extracting the color parameters to be processed, for which the saturation component is within a preset saturation range and the brightness component is within a preset brightness range, further comprises:
judging whether saturation components in the color parameters reach a preset black-and-white component threshold value or not;
if the preset black-and-white component threshold is not reached, judging that the film and television cover picture is a black-and-white picture;
and when the film and television cover map is a black-and-white picture, acquiring a preset specified color parameter, and taking the preset specified color parameter as the background color of the film and television detail page.
5. The background-color generation method of claim 4, wherein after the step of determining whether the saturation component in each color parameter reaches a preset black-and-white component threshold, further comprising:
if the preset black-and-white component threshold value is reached, judging that the film and television cover picture is not a black-and-white picture;
and when the film and television cover map is not a black-and-white picture, executing the steps of extracting the to-be-processed color parameters of which the saturation component is in a preset saturation range and the brightness component is in a preset brightness range from the color parameters.
6. The background-color generation method according to any one of claims 1 to 5, wherein the step of acquiring color parameters of each pixel point in the film-tv cover map in the HSV color space includes:
acquiring a film and television cover source diagram corresponding to the film and television cover diagram;
performing bitmap conversion on the film and television cover source map to obtain a film and television cover bitmap;
and traversing each pixel point in the film and television cover bitmap to obtain the color parameters of each pixel point in the HSV color space.
7. The background-color generation method of claim 6, wherein the predetermined saturation range is 10% to 70%, and the predetermined brightness range is 40% to 44%.
8. A background color generation apparatus, the apparatus comprising:
the color acquisition module is used for acquiring color parameters of each pixel point in the film and television cover diagram in an HSV color space, wherein the color parameters comprise hue components, saturation components and brightness components;
the color filtering module is used for extracting to-be-processed color parameters, wherein the saturation component is in a preset saturation range, and the brightness component is in a preset brightness range, from the color parameters;
and the color generation module is used for generating background colors of the film and television detail pages according to the color parameters to be processed.
9. A background-color-generation apparatus, characterized in that the apparatus comprises: a memory, a processor, and a background-color-generation program stored on the memory and executable on the processor, the background-color-generation program configured to implement the steps of the background-color-generation method of any one of claims 1 to 7.
10. A storage medium having stored thereon a background-color generation program which, when executed by a processor, implements the steps of the background-color generation method of any one of claims 1 to 7.
CN202310541546.7A 2023-05-11 2023-05-11 Background color generation method, device, equipment and storage medium Pending CN116681786A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310541546.7A CN116681786A (en) 2023-05-11 2023-05-11 Background color generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310541546.7A CN116681786A (en) 2023-05-11 2023-05-11 Background color generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116681786A true CN116681786A (en) 2023-09-01

Family

ID=87777798

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310541546.7A Pending CN116681786A (en) 2023-05-11 2023-05-11 Background color generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116681786A (en)

Similar Documents

Publication Publication Date Title
US8948505B2 (en) Image processing apparatus, image processing method, program and imaging apparatus
WO2018176925A1 (en) Hdr image generation method and apparatus
KR101248858B1 (en) Image processing apparatus and image processing method
US8681880B2 (en) Adaptive dithering during image processing
CN106339224B (en) Readability enhancing method and device
CN112351195B (en) Image processing method, device and electronic system
US20090274368A1 (en) Image correction method and apparatus
US9407835B2 (en) Image obtaining method and electronic device
US9007394B2 (en) Method and system for dynamic brightness correction in digital images
CN111736941B (en) Picture processing method and device
CN110880164A (en) Image processing method, device and equipment and computer storage medium
CN112419218A (en) Image processing method and device and electronic equipment
CN111968605A (en) Exposure adjusting method and device
CN112508820A (en) Image processing method and device and electronic equipment
CN116884359A (en) Adaptive dimming method, device, equipment and storage medium based on picture content
CN111160267A (en) Image processing method, terminal and storage medium
CN111462158A (en) Image processing method and device, intelligent device and storage medium
CN116681786A (en) Background color generation method, device, equipment and storage medium
WO2022262848A1 (en) Image processing method and apparatus, and electronic device
JP2020052530A (en) Image processing apparatus, image processing system, image processing method, and program
CN113240760B (en) Image processing method, device, computer equipment and storage medium
CN113393391B (en) Image enhancement method, image enhancement device, electronic apparatus, and storage medium
CN111338627B (en) Front-end webpage theme color adjustment method and device
CN114527950A (en) Picture color adjusting method, device, equipment and storage medium
CN108876800B (en) Information processing method and equipment

Legal Events

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