A brand promotion video gray frame enhancement method and system
Patent Information
- Application Number
- CN202610828513.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-09
- Publication Date
- 2026-08-18
AI Technical Summary
[0005]鉴于此,本发明提出了一种品牌宣传视频灰片增强方法及系统,旨在解决品牌宣传视频灰片在整体式增强处理中容易出现品牌色偏、人物肤色失真、专业设备边缘损失和静止区域闪烁的技术问题
[0026]Compared with existing technologies, the beneficial effects of this invention are as follows: it distinguishes the skin tone area, brand logo area, professional equipment area, and background area in the gray frame, and then generates zonal enhancement parameters based on the brand's main color value, brand logo specifications, and the brightness, color, noise, edge, and inter-frame motion changes of each area. This allows different image objects to be processed differently according to their respective final image requirements. The brand logo area can reduce brand color deviation through main color correction, the background area can improve the overall brand style consistency of the image through brand color tendency adjustment, the skin tone area can avoid skin color distortion caused by excessive intervention of brand tones through skin tone protection, the high reflectivity edges in the professional equipment area can retain the equipment outline and structural details while reducing noise through edge preservation denoising, and the stationary brand logo area, stationary professional equipment edges, and stationary background area can suppress brightness jumps, color jumps, and image flicker caused by frame-by-frame enhancement through inter-frame smoothing processing. By verifying the color difference of the brand logo, skin tone shift, device edge preservation, and flickering in still areas, the enhanced video meets the brand's visual standards while also ensuring a natural look for people, clear display of professional equipment, and stability of continuous frames. This solves the problem that overall video enhancement cannot simultaneously achieve accurate brand colors, natural skin tones, preservation of device details, and stability in still areas.
Smart Images

Figure CN122597183A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically, to a method and system for enhancing grayscale images in brand promotional videos. Background Technology
[0002] Gray-screen footage in brand promotional videos serves as the foundation for post-production. It typically undergoes noise reduction, exposure correction, color correction, detail restoration, and frame stabilization before becoming final footage that meets brand visual standards. With advancements in image enhancement, video super-resolution, color enhancement, and video frame consistency processing technologies, post-production processing of promotional videos has gradually shifted from manual frame-by-frame color correction to automated enhancement based on image processing algorithms. For scenarios such as medical applications, equipment demonstrations, and corporate image promotion, gray-screen footage often simultaneously contains people, brand logos, professional equipment, and indoor backgrounds. Enhancement processing not only needs to improve image clarity and color performance but also ensure accurate brand logo colors, natural skin tones, clear equipment outlines, and stable visual quality across consecutive video frames. Therefore, how to perform image enhancement processing on gray-screen footage for brand promotional videos to match brand visual standards has become a technically valuable problem in the field of video image processing.
[0003] In existing technologies, for example, Chinese invention patent application CN119991530A discloses a method, system, and medium for real-time enhancement of ultra-high-definition images and videos. This method obtains image sequences by extracting frames from the source video, acquires text features using a visual language model, and combines this with a color retrieval enhancement gallery to obtain color features, before generating the enhanced video. This approach can enhance ultra-high-definition videos while preserving color features and image details. However, in the actual processing of grayscale images for brand promotional videos, simply aiming for overall image quality enhancement or overall color enhancement can easily lead to conflicting enhancement needs for different image objects: brand logos need to maintain accurate brand colors, human areas need to avoid abnormal skin tones, professional equipment areas need to avoid excessive smoothing of highly reflective edges, and static areas need to avoid brightness or color jumps caused by frame-by-frame processing. A holistic video enhancement approach struggles to reliably meet these multiple quality requirements, resulting in enhanced videos that may still suffer from inconsistent brand visuals, distorted human appearance, loss of equipment details, or flickering in static scenes.
[0004] Therefore, it is necessary to design a method and system for enhancing grayscale images in brand promotional videos to solve the problems existing in the current technology. Summary of the Invention
[0005] In view of this, the present invention proposes a method and system for enhancing grayscale images in brand promotional videos, aiming to solve the technical problems that easily occur in the overall enhancement processing of grayscale images in brand promotional videos, such as brand color deviation, skin tone distortion, edge loss of professional equipment, and flickering in static areas.
[0006] This invention proposes a method for enhancing grayscale images in brand promotional videos, comprising:
[0007] Obtain the grayscale frame sequence of the brand promotional video and the brand visual standards, which include the brand's main color value and brand logo specifications;
[0008] The gray frame sequence of the brand promotion video is subjected to frame-by-frame region identification to obtain the skin color region, brand logo region, professional equipment region, and background region.
[0009] Based on the brand's main color value, the brand logo specifications, and the brightness, color, noise, edge, and inter-frame motion changes of each region, generate partition enhancement parameters;
[0010] According to the partition enhancement parameters, the main color of the brand logo area is corrected, the brand color tendency of the background area is adjusted, the skin color of the person's skin area is protected, the edge preservation noise reduction of the highly reflective edges of the professional equipment area is performed, and the static brand logo area, the static professional equipment edges and the static background area are subjected to inter-frame smoothing.
[0011] The enhanced grayscale frame sequence is checked for brand logo color difference, skin tone shift, device edge preservation, and flicker in static areas. When the check results meet the set qualification conditions, the enhanced brand promotional video is output.
[0012] Furthermore, frame-by-frame region identification includes:
[0013] For each video frame, a candidate region mask is generated; when the boundary break length of the candidate region mask is lower than the set break length, and the area change rate of the candidate region mask in adjacent video frames is lower than the set upper limit of the area change rate, the candidate region mask is confirmed as a valid region mask.
[0014] Furthermore, the generation of partition enhancement parameters includes: determining the region brightness deviation value, region color deviation value, region noise intensity, region edge sharpness, and region inter-frame motion amplitude based on the effective region mask, and converting them into the main color correction intensity, brand color tendency adjustment intensity, skin color protection intensity, edge preservation denoising intensity, and inter-frame smoothing intensity, respectively.
[0015] Furthermore, when performing primary color correction, it includes:
[0016] When the regional color deviation value of the brand logo area exceeds the set color difference limit, the main color correction intensity of the brand logo area is increased; when the regional color deviation value of the skin tone area reaches the set skin tone shift warning value, the skin tone protection intensity of the skin tone area is increased.
[0017] Furthermore, edge-preserving denoising includes:
[0018] Within the area of the professional equipment, regions with brightness exceeding a set high brightness threshold and edge sharpness exceeding a set edge threshold are defined as highly reflective edges; the smoothing noise reduction intensity in the edge preservation noise reduction intensity is reduced and the contour enhancement intensity is increased for the highly reflective edges.
[0019] Furthermore, before performing inter-frame smoothing, the following steps are also included:
[0020] Calculate the overlap of effective region masks and the brightness changes of each region in adjacent video frames; when the overlap of at least two effective region masks is lower than the set overlap lower limit, a shot change is determined; when the brightness changes of the background region and the professional equipment region both exceed the set brightness change upper limit and the change direction is consistent, a global brightness change is determined; when a shot change or a global brightness change is determined, the inter-frame smoothing intensity of the previous video frame is stopped.
[0021] Furthermore, after completing inter-frame smoothing and quality verification, the process also includes:
[0022] When no shot switching or global brightness change is detected, and the flickering level of the stationary area does not meet the set qualified conditions, the changes in the partition enhancement parameters of the stationary brand logo area, the stationary highly reflective edge, and the stationary background area in adjacent video frames are compared respectively; the partition enhancement parameters that exceed the set change limit are reverted to the set change limit, and the quality is rechecked.
[0023] Furthermore, when performing inter-frame smoothing, the process includes: increasing the inter-frame smoothing intensity of the same effective region mask when the inter-frame motion amplitude of the region in adjacent video frames is lower than a set motion threshold; and decreasing the inter-frame smoothing intensity of the same effective region mask when the inter-frame motion amplitude reaches the set motion threshold.
[0024] Further readjustments following quality verification include:
[0025] When the color difference of the brand logo does not meet the set qualification conditions and the skin tone deviation of the person reaches the set skin tone deviation upper limit, the main color correction intensity of the brand logo area is increased, while the skin tone protection intensity of the person's skin tone area and the brand color tendency adjustment intensity of the background area remain unchanged.
[0026] Compared with existing technologies, the beneficial effects of this invention are as follows: it distinguishes the skin tone area, brand logo area, professional equipment area, and background area in the gray frame, and then generates zonal enhancement parameters based on the brand's main color value, brand logo specifications, and the brightness, color, noise, edge, and inter-frame motion changes of each area. This allows different image objects to be processed differently according to their respective final image requirements. The brand logo area can reduce brand color deviation through main color correction, the background area can improve the overall brand style consistency of the image through brand color tendency adjustment, the skin tone area can avoid skin color distortion caused by excessive intervention of brand tones through skin tone protection, the high reflectivity edges in the professional equipment area can retain the equipment outline and structural details while reducing noise through edge preservation denoising, and the stationary brand logo area, stationary professional equipment edges, and stationary background area can suppress brightness jumps, color jumps, and image flicker caused by frame-by-frame enhancement through inter-frame smoothing processing. By verifying the color difference of the brand logo, skin tone shift, device edge preservation, and flickering in still areas, the enhanced video meets the brand's visual standards while also ensuring a natural look for people, clear display of professional equipment, and stability of continuous frames. This solves the problem that overall video enhancement cannot simultaneously achieve accurate brand colors, natural skin tones, preservation of device details, and stability in still areas.
[0027] On the other hand, this application also provides a grayscale enhancement system for brand promotional videos, used to apply the above-mentioned grayscale enhancement method for brand promotional videos, including:
[0028] The acquisition unit is used to acquire the gray frame sequence of the brand promotional video and the brand visual standards, which include the brand main color value and the brand logo specification.
[0029] The identification unit is used to perform frame-by-frame region identification on the gray frame sequence of the brand promotion video to obtain the skin color region, brand logo region, professional equipment region and background region.
[0030] The processing unit is used to generate partition enhancement parameters based on the brand main color value, the brand logo specification, and the brightness, color, noise, edge and inter-frame motion changes of each region;
[0031] The processing unit is also configured to perform primary color correction on the brand logo area, adjust the brand color tendency on the background area, protect the skin tone on the human skin area, perform edge preservation noise reduction on the highly reflective edges in the professional equipment area, and perform inter-frame smoothing on the stationary brand logo area, the stationary professional equipment edges, and the stationary background area, according to the partition enhancement parameters.
[0032] The output unit is used to check the enhanced grayscale frame sequence for brand logo color difference, skin tone shift, device edge preservation degree, and static area flicker degree. When the check results meet the set qualification conditions, the enhanced brand promotional video result is output.
[0033] It is understandable that the aforementioned methods and systems for enhancing grayscale images in brand promotional videos have the same beneficial effects, and will not be elaborated upon here. Attached Figure Description
[0034] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0035] Figure 1 A flowchart illustrating the brand promotion video grayscale enhancement method provided in this embodiment of the invention;
[0036] Figure 2 A flowchart of grayscale partition enhancement and inter-frame smoothing processing for brand promotional videos provided in this embodiment of the invention;
[0037] Figure 3 This is a schematic diagram of gray frame region division provided in an embodiment of the present invention;
[0038] Figure 4 A functional block diagram of the brand promotion video grayscale enhancement system provided in an embodiment of the present invention. Detailed Implementation
[0039] The specific embodiments of the present invention will now be described with reference to the accompanying drawings. These embodiments are used to illustrate the technical solutions of the present invention and do not limit the scope of protection of the present invention. Unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0040] In some embodiments of this application, see Figure 1-3 As shown, this application proposes a method for enhancing grayscale images in brand promotional videos, including:
[0041] S100: Obtain the grayscale frame sequence of the brand promotional video and the brand visual standards, which include the brand's main color value and brand logo specifications.
[0042] S200: Performs frame-by-frame region recognition on the gray frame sequence of brand promotional videos to obtain the skin tone region, brand logo region, professional equipment region, and background region.
[0043] S300: Generates zone enhancement parameters based on the brand's main color value, brand logo specifications, and changes in brightness, color, noise, edge, and inter-frame motion in each region.
[0044] S400: According to the zonal enhancement parameters, the main color of the brand logo area is corrected, the brand color tendency of the background area is adjusted, the skin tone of the human skin area is protected, the edge preservation noise reduction of the highly reflective edges in the professional equipment area is performed, and the frame smoothing is performed on the stationary brand logo area, the stationary professional equipment edges, and the stationary background area.
[0045] S500: Verify the enhanced grayscale frame sequence for brand logo color difference, skin tone shift, device edge preservation, and flicker in static areas. When the verification results meet the set qualification conditions, output the enhanced brand promotional video result.
[0046] Specifically, the method provided in this embodiment is applicable to post-processing image enhancement of grayscale materials such as promotional videos for medical institutions, demonstration videos for professional equipment, and corporate brand image videos. A grayscale frame sequence in a brand promotional video refers to a set of video frames that have not undergone final noise reduction, color correction, sharpening, and inter-frame stabilization. Brand visual standards include the brand's primary color value and brand logo specifications. The primary color value can be a red-green-blue value, or a color value converted to a lightness, red-green, and yellow-blue color space. Brand logo specifications include the standard colors, graphic proportions, allowable color difference range, and edge clarity requirements of the brand logo. Brand visual standards can be derived from brand visual manuals, customer-confirmed standard color cards, historically approved finished products, or manually inspected samples.
[0047] Specifically, the process involves acquiring the grayscale frame sequence of the brand promotional video and the brand's visual standards. Each frame in the grayscale frame sequence undergoes frame-by-frame region identification to obtain the skin tone region, brand logo region, professional equipment region, and background region. During frame-by-frame region identification, a candidate region mask is generated for each video frame. The candidate region mask can be obtained through a combination of semantic segmentation, skin tone range determination, brand logo template matching, professional equipment contour detection, and background separation. The boundary break length refers to the cumulative gap length in the candidate region mask boundary where no continuous closed contour is formed. The break length can be set to 5% to 10% of the perimeter of the candidate region mask's outer contour, or it can be taken as the 95th percentile of the effective mask boundary break length in manually labeled samples. The area change rate refers to the ratio of the area change of the same candidate region mask in adjacent video frames to the area of the candidate region mask in the previous video frame. The upper limit of the area change rate can be set to 20% to 30%. When the boundary break length of the candidate region mask is less than the set break length, and the area change rate of the candidate region mask in adjacent video frames is less than the set upper limit of the area change rate, the candidate region mask is confirmed as a valid region mask. If the brand logo area is temporarily obscured by a person or device, the position of the brand logo area in the preceding and following valid video frames is used for interpolation confirmation, and no forced primary color correction is performed on the obscured frame.
[0048] After obtaining the effective region mask, the region brightness deviation, region color deviation, region noise intensity, region edge sharpness, and region inter-frame motion amplitude are determined based on the effective region mask. The region brightness deviation represents the difference between the current region and the brightness range of historical qualified footage; the region color deviation represents the difference between the current region and the brand's primary color value, skin tone reference range, or device neutral gray reference range; the region noise intensity represents the degree of random noise and compression noise in the current region; the region edge sharpness represents the gradient intensity and continuity of the current region's contour boundary; and the region inter-frame motion amplitude represents the positional and pixel changes of the same region in adjacent video frames. These results are converted into primary color correction intensity, brand color tendency adjustment intensity, skin tone protection intensity, edge preservation and denoising intensity, and inter-frame smoothing intensity, respectively, to form the regional enhancement parameters. Different reference objects are used for the region color deviation value in different regions: the brand logo region uses the brand's primary color value as the reference object, the human skin tone region uses the skin tone reference range as the reference object, the professional equipment region uses the device neutral gray reference range as the reference object, and the background region uses the background color range of historical qualified footage as the reference object.
[0049] The intensity of primary color correction, brand color bias adjustment, skin tone protection, edge preservation and noise reduction, and inter-frame smoothing can all be normalized to between 0 and 1, where 0 indicates no corresponding enhancement processing and 1 indicates the highest intensity processing. The initial values of each intensity are determined by the regional brightness deviation, regional color deviation, regional noise intensity, regional edge sharpness, and regional inter-frame motion amplitude, and are adjusted locally based on the quality check results.
[0050] During noise processing, an adaptive noise denoising formula is used to determine the filtering radius for each pixel. A noise intensity map is output from the noise estimation results. The current pixel position is denoted as (x, y), and the noise intensity map value at that pixel position is N(x, y), where N(x, y) ∈ [0, 1]. The adaptive filtering radius r(x, y) at the current pixel position is determined according to the following formula:
[0051] ;
[0052] Where, r min For the minimum filtering radius, r max This is the maximum filtering radius. In this embodiment, r is... min Take 1 pixel, r max Take 5 pixels. The higher the noise intensity, the larger the filter radius; the lower the noise intensity, the smaller the filter radius. The denoised pixel value I. den (x, y) is calculated according to the following formula:
[0053] ;
[0054] Where I(x+u, y+v) is the pixel value within the filtering window, ω(u, v) is the Gaussian weight, r is the adaptive filtering radius at the current pixel position, and the standard deviation σ of the Gaussian weight is 1+2N(x, y). For highly reflective edges such as brand logo edges, facial features edges, and professional equipment areas, an edge protection upper limit is set to ensure that the adaptive filtering radius does not exceed the edge protection upper limit, thereby avoiding loss of contour details caused by smoothing and denoising.
[0055] The professional equipment edge includes the outer contour edge, screen edge, structural seam edge, and highly reflective edge within the professional equipment area. The highly reflective edge is the edge region within the professional equipment edge that simultaneously meets the conditions for high brightness and edge sharpness. When performing inter-frame smoothing on stationary professional equipment edges, highly reflective edges are preferentially subject to stronger edge protection constraints.
[0056] In the professional equipment area, regions with brightness exceeding a set high-brightness threshold and edge sharpness exceeding a set edge threshold are defined as highly reflective edges. The high-brightness threshold can be set to the top 10% to 15% quantile of the current video frame's brightness distribution, or a fixed range of 220 to 240 in the 8-bit grayscale image. The edge threshold can be set to the mean edge sharpness of the professional equipment area plus 1 to 1.5 times the standard deviation. For highly reflective edges, the smoothing denoising intensity in the edge preservation denoising process is reduced, while the contour enhancement intensity is increased; for non-edge noise areas in the professional equipment area, a higher denoising intensity is maintained. This reduces surface noise while avoiding over-smoothing of medical device casing bezels, screen edges, metallic reflective edges, and structural seams.
[0057] In the brand color processing, the brand's primary color value is first converted to a lightness, red-green, and yellow-blue color space. For the brand logo area, the regional color deviation value is calculated. When the regional color deviation value of the brand logo area exceeds the set color difference limit, the primary color correction intensity of the brand logo area is increased. The set color difference limit is primarily derived from the brand visual manual; when the brand visual manual does not provide a specific value, the 95th percentile value of the color difference of the brand logo area in historical qualified images can be used, typically between 2 and 3. For the background area, the brand color tendency is adjusted according to the brand's primary color value, but the background area is not forcibly corrected to the brand's primary color. For the skin tone area, a skin tone shift warning value and a skin tone shift limit are set. The skin tone shift warning value can be between 70% and 85% of the skin tone shift limit. When the regional color deviation value of the skin tone area reaches the set skin tone shift warning value, the skin tone protection intensity of the skin tone area is increased, preventing the skin tone area from continuing to shift towards the brand's primary color along with the background area.
[0058] When determining the intensity of primary color correction and brand color tendency adjustment, the initial color injection intensity is determined using the brand color injection intensity formula. The brand primary color value is converted from the red-green-blue color space to a lightness, red-green, and yellow-blue color space, yielding the lightness value Lbrand, red-green value abrand, and yellow-blue value bbrand. Let the average saturation of the current video frame be S, the target saturation of the brand primary color be S0, and the saturation reference scale be Sreference. Then, the initial color injection intensity γ is determined according to the following formula:
[0059] ;
[0060] Here, the S-reference is used to limit the rate of change in color injection intensity, and can be determined by the saturation variation range in historical qualified images. The L-values of the input pixel in the lightness, red-greenness, and yellow-blueness color spaces are also considered. in a in and b in The output pixel value is determined according to the following formula:
[0061] ;
[0062] Among them, L out This represents the lightness value of the output pixel in the Lab color space; a out This represents the red and green hue values of the output pixel in the Lab color space; b out Indicates the yellow-blue tint value of the output pixel in the Lab color space; L b This represents the lightness value of the brand's primary color in the Lab color space; a b This represents the red-green hue value of the brand's primary color in the Lab color space; b b This represents the yellow-blue tint value of the brand's primary color in the Lab color space. The initial color injection intensity mentioned above is not used directly as a uniform color grading parameter for the entire frame; instead, it is subject to secondary restrictions based on the region type. Higher color injection intensities are allowed in the brand logo area to bring it closer to the brand's primary color value; medium or low color injection intensities are used in the background area to give it a brand color bias; the color injection intensity in the skin tone area must not exceed the skin tone protection limit; and a color injection intensity that does not disrupt the grayscale structure of the equipment edge is used for highly reflective edges in the professional equipment area.
[0063] Before inter-frame smoothing, the overlap of effective region masks and the brightness changes of each region in adjacent video frames are calculated. The overlap of effective region masks can be represented by the ratio of the intersection area to the union area of the same effective region mask in adjacent video frames. The lower limit of overlap can be set to 0.45 to 0.60; 0.60 can be used for shooting from a fixed position, and 0.45 can be used for shooting with a moving camera. When the overlap of at least two effective region masks is lower than the set lower limit, a shot change is determined. The brightness changes of each region can be represented by the average brightness difference of the region. The upper limit of brightness change can be set to 12 to 20 gray levels, or the 95th percentile value of the brightness change of adjacent frames in historical qualified footage. When the brightness changes of the background region and the professional equipment region both exceed the set upper limit of brightness change and the direction of change is consistent, a global brightness change is determined. Consistent direction of brightness change means that the average brightness of the background region and the professional equipment region both increase or decrease relative to the previous video frame. When a shot change or a sudden change in global brightness is detected, the inter-frame smoothing intensity of the previous video frame is stopped, and the partition enhancement parameters are regenerated based on the current video frame to avoid cross-shot motion blur or misprocessing real lighting changes as flicker.
[0064] When no shot transition or global brightness change is detected, the inter-frame motion amplitude of the region is calculated. The inter-frame motion amplitude of the region can be determined by the center displacement of the effective region mask, the change in the overlap of the effective region mask, and the difference in region pixels. In promotional videos at 25 frames per second or 30 frames per second, the set motion threshold for fixed-camera segments can be 2 to 4 pixels of region center displacement, and the set motion threshold for moving shot segments can be 5 to 8 pixels of region center displacement. When the inter-frame motion amplitude of the same effective region mask in adjacent video frames is lower than the set motion threshold, the inter-frame smoothing intensity of the same effective region mask is increased; when the inter-frame motion amplitude of the region reaches the set motion threshold, the inter-frame smoothing intensity of the same effective region mask is decreased to avoid motion blur of people's mouths, hands, or mobile devices.
[0065] In inter-frame smoothing and flicker level verification in still areas, a temporal consistency constraint formula is used to determine the degree of inter-frame variation in still areas. Let the enhanced images of two adjacent frames be I... t and I t+1 First, calculate the pixel-level difference map D. t (x, y):
[0066] ;
[0067] Among them, D t (x, y) represents the grayscale or color difference between two adjacent frames at pixel position (x, y). Then, the local motion amplitude M is calculated. t The local motion amplitude (x, y) is determined by the mean difference between adjacent frames within a local window Ω centered at (x, y).
[0068] ;
[0069] Where Ω can be a 3×3 neighborhood centered at (x, y), and |Ω| is the number of pixels within the local window. The timing consistency loss L is determined according to the following formula:
[0070] ;
[0071] Where T represents the number of video frames included in the statistics, P represents the total number of pixels in a single frame, and Mmaximum represents the maximum local motion amplitude within the current statistical range. The larger the local motion amplitude, the smaller the contribution of pixel-level differences to the temporal consistency loss; conversely, the smaller the local motion amplitude, the greater the contribution of pixel-level differences to the temporal consistency loss. Therefore, areas of human movement and equipment movement retain natural variations, while static brand logo areas, static professional equipment edges, and static background areas are subject to stronger inter-frame consistency constraints. When the L-time of a static area exceeds the set flicker limit, the inter-frame smoothing intensity of the corresponding static area is increased; when a shot change or a global brightness change occurs, the inter-frame smoothing intensity of the previous video frame is stopped.
[0072] When the differences between adjacent frames within a local window are mainly concentrated at the region boundary, M t (x, y) is used in the calculation as a change in regional motion; when the difference between adjacent frames within a local window increases or decreases synchronously in the background area and the professional equipment area, it is judged first according to the global brightness change, and is not treated as a flickering of a stationary area.
[0073] After enhancement, the enhanced grayscale frame sequence is checked for brand identifier color difference, skin tone shift, device edge preservation, and flicker in static areas. Brand identifier color difference is calculated within the brand identifier area, with a passing condition of no more than 3; for high-precision brand color requirements, it can be no more than 2. Skin tone shift is calculated within the human skin tone area, with the upper limit determined by historically acceptable human images or a general skin tone range, typically between 4 and 6. Device edge preservation can be determined by the overlap ratio of professional device edges before and after enhancement, with a passing condition of no less than 0.85. Device edge preservation can be obtained by dividing the number of overlapping pixels between the enhanced and unenhanced professional device edges by the number of pixels on the unenhanced professional device edge; when the noise in the pre-enhanced grayscale image is high, small isolated edges can be removed before calculating the overlap ratio. The flicker level in stationary areas can be determined using statistical values of brightness and color changes in the stationary area over 5 to 15 consecutive frames. Acceptable conditions can be set as follows: the average brightness change in the stationary area should not exceed 3 to 5 gray levels, and the color difference change in the brand logo area should not exceed 1.5 across consecutive frames. These acceptable conditions are primarily derived from the brand visual manual, historical acceptable finished products, and manual acceptance samples. If no historical samples are available, the above example range can be used for initial settings, and then updated based on the first batch of manual confirmation results.
[0074] After completing inter-frame smoothing and quality verification, when no shot transition or global brightness abrupt change is detected, and the flickering level in static areas does not meet the set acceptable conditions, the changes in the partition enhancement parameters of the static brand logo area, static highly reflective edges, and static background area in adjacent video frames are compared. If the changes in the primary color correction intensity, brand color tendency adjustment intensity, edge preservation and denoising intensity, or inter-frame smoothing intensity in adjacent frames exceed the set change limit, the partition enhancement parameters exceeding the set change limit are reverted to within the set change limit, and quality verification is performed again. The set change limit can be 10% to 20% of the corresponding partition enhancement parameter value range, or it can be the 95th percentile value of the parameter changes in adjacent frames in historical acceptable footage. When the brand logo color difference does not meet the set acceptable conditions and the skin tone shift of the person reaches the set skin tone shift limit, only the primary color correction intensity of the brand logo area is increased, while the skin tone protection intensity of the person's skin tone area and the brand color tendency adjustment intensity of the background area remain unchanged. Through the above local reversion, the skin tone shift of the person or the background color shift is avoided from being amplified in order to correct the brand logo color difference.
[0075] In a specific application example, the grayscale frame sequence of the brand promotional video is a medical institution promotional video, 10 seconds long, with a frame rate of 25 frames / s, totaling 250 frames. The brand's primary color values are 255, 165, and 0 for red, green, and blue, respectively. The brand logo specification requires that the color difference in the brand logo area not exceed 3. Before processing, 20 consecutive frames are extracted for initial statistics. The break length is set to 8% of the perimeter of the candidate area mask's outer contour, the upper limit for area change rate is set to 25%, the lower limit for overlap is set to 0.55, the upper limit for brightness abrupt change is set to 16 grayscale levels, the motion threshold is set to 4 pixels, and the upper limit for change is set to 15% of the value range of each partition enhancement parameter. In one video frame, the initial color difference in the brand logo area is 7.4, the skin tone shift is 4.9, the device edge preservation degree is 0.76, and the average brightness change in the static area is 8.1 grayscale levels. After processing according to this embodiment, the color difference in the brand logo area is reduced to 2.2, the skin tone shift is controlled within 5.6, the device edge preservation is improved to 0.89, and the average brightness change in static areas is reduced to 3.2 gray levels. If the color difference in the brand logo area is still 3.5 in subsequent segments and the skin tone shift has reached the set skin tone shift limit, then only the main color correction intensity of the brand logo area is increased. After recalibration, the color difference in the brand logo area is reduced to 2.8, the skin tone shift does not continue to increase, and the enhanced brand promotional video result is output. The above data is used to illustrate the implementable process of this embodiment and does not limit the scope of protection of this application.
[0076] This embodiment ensures that the brand logo area accurately converges to the brand's primary color, skin tones on individuals do not exhibit noticeable color casts due to the injection of brand colors, highly reflective edges of professional equipment do not lose their contours due to noise reduction, and static areas do not exhibit flickering due to frame-by-frame enhancement. Quality checks and local callbacks limit the correction of substandard results to the corresponding areas, reducing the likelihood of one correction causing another type of image quality problem.
[0077] In one optional training implementation, when using a learning model to generate partition enhancement parameters, the primary color correction task, brand color tendency adjustment task, skin tone protection task, edge preservation and denoising task, and inter-frame smoothing task can be used as joint training tasks, and a dynamic task weight adjustment formula can be used to suppress gradient conflicts between different tasks. Let the loss value of the i-th task in the q-th training round be E. i (q), where the loss value in the previous training round is E i If (q-1), then the rate of change of loss Δ for the i-th task in the q-th training round. i (q) is determined according to the following formula:
[0078] ;
[0079] Where ε is a very small positive number, which can be 10. -8 This is used to avoid the denominator being zero. When Δ i When (q) is greater than 0, it indicates that the loss of the i-th task has decreased; when Δ i When (q) is less than 0, it indicates that the loss of the i-th task has increased. Let the average loss change rate of all tasks be... The discrete value of the rate of change of loss is The task weight w of the i-th task in the q-th training round i (q) Adjust according to the following formula:
[0080] ;
[0081] Where α is the sensitivity adjustment, which can be 0.1; β is the stabilization factor, which can be 0.01. This is used to represent the dispersion of the rate of change of loss for each task relative to the average rate of change of loss. After adjusting the task weights, the task weights are normalized to obtain the normalized task weights. :
[0082] ;
[0083] Where K is the number of joint training tasks. The total loss of joint training is E. total Determined according to the following formula:
[0084] ;
[0085] Through the aforementioned dynamic task weight adjustment, when the loss of a certain task decreases significantly higher than the average level, the weight of that task is appropriately increased; when the loss of a certain task increases and deviates significantly from the average level, the weight of that task is automatically decreased, thereby reducing the impact of negative transfer on other tasks. In this embodiment, this training method is used to maintain a relative balance among primary color correction, skin tone protection, edge preservation denoising, and inter-frame smoothing tasks during training, avoiding the model from excessively pursuing a single image quality metric at the expense of brand color accuracy, skin tone naturalness, device edge sharpness, or static area stability.
[0086] In summary, by separating the skin tone area, brand logo area, professional equipment area, and background area in the gray frame, and then generating zonal enhancement parameters based on the brand's primary color value, brand logo specifications, and the brightness, color, noise, edge, and inter-frame motion changes of each area, different image objects are processed differently according to their respective final requirements. Primary color correction in the brand logo area reduces brand color deviation; brand color tendency adjustment in the background area improves the overall brand style consistency; skin tone protection in the skin tone area prevents excessive brand color intervention that could cause skin tone distortion; edge preservation denoising in the professional equipment area reduces noise while preserving equipment outlines and structural details; and inter-frame smoothing in the stationary brand logo area, stationary professional equipment edges, and stationary background area suppresses brightness jumps, color jumps, and image flicker caused by frame-by-frame enhancement. By verifying the color difference of the brand logo, skin tone shift, device edge preservation, and flickering in still areas, the enhanced video meets the brand's visual standards while also ensuring a natural look for people, clear display of professional equipment, and stability of continuous frames. This solves the problem that overall video enhancement cannot simultaneously achieve accurate brand colors, natural skin tones, preservation of device details, and stability in still areas.
[0087] Based on another preferred embodiment described above, see [link to preferred embodiment]. Figure 4 As shown, this embodiment provides a grayscale enhancement system for brand promotional videos, used to apply the above-described grayscale enhancement method for brand promotional videos, including:
[0088] The acquisition unit is used to acquire the gray frame sequence of the brand promotional video and the brand visual standards, which include the brand main color value and the brand logo specification.
[0089] The identification unit is used to perform frame-by-frame region identification on the gray frame sequence of the brand promotion video to obtain the skin color region, brand logo region, professional equipment region and background region.
[0090] The processing unit is used to generate partition enhancement parameters based on the brand main color value, the brand logo specification, and the brightness, color, noise, edge and inter-frame motion changes of each region;
[0091] The processing unit is also configured to perform primary color correction on the brand logo area, adjust the brand color tendency on the background area, protect the skin tone on the human skin area, perform edge preservation noise reduction on the highly reflective edges in the professional equipment area, and perform inter-frame smoothing on the stationary brand logo area, the stationary professional equipment edges, and the stationary background area, according to the partition enhancement parameters.
[0092] The output unit is used to check the enhanced grayscale frame sequence for brand logo color difference, skin tone shift, device edge preservation degree, and static area flicker degree. When the check results meet the set qualification conditions, the enhanced brand promotional video result is output.
[0093] It is understandable that the aforementioned methods and systems for enhancing grayscale images in brand promotional videos have the same beneficial effects, and will not be elaborated upon here.
[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for enhancing grayscale images in brand promotional videos, characterized in that, include: Obtain the grayscale frame sequence of the brand promotional video and the brand visual standards, which include the brand's main color value and brand logo specifications; The gray frame sequence of the brand promotion video is subjected to frame-by-frame region identification to obtain the skin color region, brand logo region, professional equipment region, and background region. Based on the brand's main color value, the brand logo specifications, and the brightness, color, noise, edge, and inter-frame motion changes of each region, generate partition enhancement parameters; According to the partition enhancement parameters, the main color of the brand logo area is corrected, the brand color tendency of the background area is adjusted, the skin color of the person's skin area is protected, the edge preservation noise reduction of the highly reflective edges of the professional equipment area is performed, and the static brand logo area, the static professional equipment edges and the static background area are subjected to inter-frame smoothing. The enhanced grayscale frame sequence is checked for brand logo color difference, skin tone shift, device edge preservation, and flicker in static areas. When the check results meet the set qualification conditions, the enhanced brand promotional video is output.
2. The method for enhancing grayscale images in brand promotional videos according to claim 1, characterized in that, Frame-by-frame region identification includes: For each video frame, a candidate region mask is generated; when the boundary break length of the candidate region mask is lower than the set break length, and the area change rate of the candidate region mask in adjacent video frames is lower than the set upper limit of the area change rate, the candidate region mask is confirmed as a valid region mask.
3. The method for enhancing grayscale images in brand promotional videos according to claim 2, characterized in that, The generated partition enhancement parameters include: determining the region brightness deviation value, region color deviation value, region noise intensity, region edge sharpness, and region inter-frame motion amplitude based on the effective region mask, and converting them into the main color correction intensity, brand color tendency adjustment intensity, skin color protection intensity, edge preservation denoising intensity, and inter-frame smoothing intensity, respectively.
4. The method for enhancing grayscale images in brand promotional videos according to claim 3, characterized in that, When performing primary color correction, the following is included: When the regional color deviation value of the brand logo area exceeds the set color difference limit, the main color correction intensity of the brand logo area is increased; when the regional color deviation value of the skin tone area reaches the set skin tone shift warning value, the skin tone protection intensity of the skin tone area is increased.
5. The method for enhancing grayscale images in brand promotional videos according to claim 3, characterized in that, When performing edge-preserving denoising, the following are included: Within the area of the professional equipment, regions with brightness exceeding a set high brightness threshold and edge sharpness exceeding a set edge threshold are defined as highly reflective edges; the smoothing noise reduction intensity in the edge preservation noise reduction intensity is reduced and the contour enhancement intensity is increased for the highly reflective edges.
6. The method for enhancing grayscale images in brand promotional videos according to claim 3, characterized in that, Before performing inter-frame smoothing, the following steps are also included: Calculate the overlap of effective region masks and the brightness changes of each region in adjacent video frames; when the overlap of at least two effective region masks is lower than the set overlap lower limit, a shot change is determined; when the brightness changes of the background region and the professional equipment region both exceed the set brightness change upper limit and the change direction is consistent, a global brightness change is determined; when a shot change or a global brightness change is determined, the inter-frame smoothing intensity of the previous video frame is stopped.
7. The method for enhancing grayscale images in brand promotional videos according to claim 6, characterized in that, After completing inter-frame smoothing and quality verification, the process also includes: When no shot switching or global brightness change is detected, and the flickering level of the stationary area does not meet the set qualified conditions, the changes in the partition enhancement parameters of the stationary brand logo area, the stationary highly reflective edge, and the stationary background area in adjacent video frames are compared respectively; the partition enhancement parameters that exceed the set change limit are reverted to the set change limit, and the quality is rechecked.
8. The method for enhancing grayscale images in brand promotional videos according to claim 6, characterized in that, When performing inter-frame smoothing, the following steps are taken: when the inter-frame motion amplitude of the same effective area mask in adjacent video frames is lower than a set motion threshold, the inter-frame smoothing intensity of the same effective area mask is increased; when the inter-frame motion amplitude of the region reaches the set motion threshold, the inter-frame smoothing intensity of the same effective area mask is decreased.
9. The method for enhancing grayscale images in brand promotional videos according to claim 4, characterized in that, The readjustments following the quality check include: When the color difference of the brand logo does not meet the set qualification conditions and the skin tone deviation of the person reaches the set skin tone deviation upper limit, the main color correction intensity of the brand logo area is increased, while the skin tone protection intensity of the person's skin tone area and the brand color tendency adjustment intensity of the background area remain unchanged.
10. A grayscale enhancement system for brand promotional videos, used to apply the grayscale enhancement method for brand promotional videos as described in any one of claims 1-9, characterized in that, include: The acquisition unit is used to acquire the gray frame sequence of the brand promotional video and the brand visual standards, which include the brand main color value and the brand logo specification. The identification unit is used to perform frame-by-frame region identification on the gray frame sequence of the brand promotion video to obtain the skin color region, brand logo region, professional equipment region and background region. The processing unit is used to generate partition enhancement parameters based on the brand main color value, the brand logo specification, and the brightness, color, noise, edge and inter-frame motion changes of each region; The processing unit is also configured to perform primary color correction on the brand logo area, adjust the brand color tendency on the background area, protect the skin tone on the human skin area, perform edge preservation noise reduction on the highly reflective edges in the professional equipment area, and perform inter-frame smoothing on the stationary brand logo area, the stationary professional equipment edges, and the stationary background area, according to the partition enhancement parameters. The output unit is used to check the enhanced grayscale frame sequence for brand logo color difference, skin tone shift, device edge preservation degree, and static area flicker degree. When the check results meet the set qualification conditions, the enhanced brand promotional video result is output.
Citation Information
Patent Citations
Ultrahigh-definition image and video real-time enhancement method and system and medium
CN119991530A