Video color conversion method, device, computer equipment and storage medium
Through feature extraction and fusion networks, the video is processed in color, which solves the problem of poor color conversion effect in the existing technology, and achieves a more natural and flexible video color conversion effect.
Patent Information
- Application Number
- CN202210208910.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-04
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2042-03-04
AI Technical Summary
In the prior art, when video color conversion is performed through color harmony method, the conversion effect is poor, resulting in the problem of unclear or too dark and bright.
The pre-trained feature extraction network performs feature extraction of reference images and processed images, performs feature fusion, calculates color difference images, and smoothes them according to the preset window frame values, and finally fuses the smooth image with the processed image to generate a color-converted video.
A more natural and softer color conversion effect is achieved, avoiding the dull problem of a single filter, and improving the flexibility and effect of video color conversion.
Smart Images

Figure CN114596370B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a video color conversion method, device, computer equipment and storage medium. Background Art
[0002] As the application of smart cutout has become more and more popular in recent years, users have higher and higher requirements for smart cutout. Smart cutout can separate the foreground and background of a photo through algorithms such as color analysis and portrait analysis. When the foreground of one image is pasted on the background of another image, there is generally a noticeable sense of abruptness. The main reason is that the lighting in the original environment of the foreground, the color of the photo, and other factors are different from the background. In some online conference software, it is a common technology to use character cutout technology to make the meeting participants seem to be in another space. By using color harmony technology, the situation of the characters in the virtual environment can be made more realistic.
[0003] At present, color harmony can only be processed manually by professionals using software such as PhotoShop. The specific process includes: given a reference image, converting the color tone of an input video to the color tone of the reference image, manually adjusting the color and using filters to set the color tone of each frame in the input video. However, this method is less flexible, and the rigid fixed-value color adjustment of the filter can easily cause unclear images, resulting in images that are too dark or too bright. Summary of the invention
[0004] The embodiments of the present invention provide a video color conversion method, device, computer equipment and storage medium, aiming to solve the problem of poor conversion effect when performing video color conversion by existing color harmonization methods in the prior art.
[0005] In a first aspect, an embodiment of the present invention provides a video color conversion method, which includes:
[0006] Acquire a target processing video and a reference image with a target color, and use each frame of the target processing video as a processing image;
[0007] Performing feature extraction on the reference image and each processed image respectively through a pre-trained feature extraction network to obtain color features of the reference image and structural features of each processed image;
[0008] The color feature and each structural feature are fused by a pre-trained feature fusion model to obtain a color-changed image of each processed image;
[0009] Calculate the color difference between all color-changed images and the corresponding processed images to obtain a color difference image of each color-changed image;
[0010] All color difference images are smoothed according to the preset window frame value N to obtain a smoothed image of each color difference image, and all smoothed images are fused with the corresponding processed images to obtain a color conversion video.
[0011] In a second aspect, an embodiment of the present invention provides a video color conversion device, comprising:
[0012] An acquisition module is used to acquire a target processing video and a reference image with a target color, and use each frame of the target processing video as a processing image;
[0013] A feature extraction module, used to extract features from the reference image and all processed images respectively through a pre-trained feature extraction network to obtain color features of the reference image and structural features of all processed images;
[0014] A feature fusion module, used to perform feature fusion on the color feature and each structural feature through a pre-trained feature fusion model to obtain a color-changed image of each processed image;
[0015] A color difference calculation module is used to calculate the color difference between all color-changed images and corresponding processed images to obtain a color difference image of each color-changed image;
[0016] The smoothing module is used to smooth all color difference images according to a preset window frame value N to obtain a smoothed image of each color difference image, and to fuse all smoothed images with corresponding processed images to obtain a color conversion video.
[0017] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the video color conversion method described in the first aspect when executing the computer program.
[0018] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the video color conversion method described in the first aspect above.
[0019] The embodiment of the present invention provides a video color conversion method, device, computer equipment and storage medium. The method includes obtaining a target processing video and a reference image with a target color, taking each frame of the target processing video as a processing image; performing feature extraction on the reference image and each processing image respectively through a pre-trained feature extraction network to obtain the color feature of the reference image and the structural feature of each processing image; performing feature fusion on the color feature and each structural feature through a pre-trained feature fusion model to obtain a color-changed image of each processing image; calculating the color difference between all color-changed images and the corresponding processing image to obtain a color-difference image of each color-changed image; smoothing all color-difference images according to a preset window frame value N to obtain a smoothed image of each color-difference image, and performing image fusion on all smoothed images and the corresponding processing image to obtain a color-converted video. The method extracts the color features of the reference image and the structural features of each processed image frame in the video through a preset feature extraction network, then fuses the color features and the structural features, calculates the color-changed image obtained after the fusion and the color difference image of each processed image, and finally smoothes each color difference image to obtain the smoothed image of each color difference image, and then fuses the smoothed image with the corresponding processed image to obtain a color-converted video. Different from the existing single filter for color harmony, the method applies the reference image's tone more naturally and softly to the target processed video according to the different degree of color change of each processed image frame of the target processed video. Compared with the use of rigid and monotonous filters, it has a more flexible and changeable output, making the tone of the video after color conversion more natural. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0021] Figure 1 A schematic diagram of a process flow of a video color conversion method provided by an embodiment of the present invention;
[0022] Figure 2 A schematic flow chart of step S120 in the video color conversion method provided by an embodiment of the present invention;
[0023] Figure 3 A schematic flow chart of step S120 in the video color conversion method provided by an embodiment of the present invention;
[0024] Figure 4 A schematic flow chart of step S140 in the video color conversion method provided by an embodiment of the present invention;
[0025] Figure 5 A schematic block diagram of a video color conversion device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0028] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0029] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0030] See also Figure 1 , Figure 1 The present invention provides a flow chart of a method for video color conversion according to an embodiment of the present invention. The method includes steps S110 to S150.
[0031] Step S110, obtaining a target processing video and a reference image with a target color, and taking each frame of the target processing video as a processing image;
[0032] In this embodiment, the method of obtaining the target processing video and the reference image includes: obtaining the stored target processing video and the reference image from the local memory or external memory of the mobile terminal; or obtaining from the server and downloading to the terminal; shooting through the mobile terminal and caching in the mobile terminal; or obtaining through the transmission of the communication application, etc. Among them, the reference image has the target color, and the target color can be any color tone or a combination of multiple colors.
[0033] Step S120, performing feature extraction on the reference image and each processed image respectively through a pre-trained feature extraction network to obtain color features of the reference image and structural features of each processed image;
[0034] In this embodiment, in order to adjust the color tone of the target processed video to the target color of the reference image, it is necessary to obtain the color features of the reference image and the structural features of each frame of the processed image in the target processed video. Preferably, the reference image and each frame of the processed image of the target processed video are subjected to feature extraction through a pre-trained feature extraction network to obtain the color features of the reference image and the structural features of each processed image. The feature extraction network includes a color feature extraction network and a structural feature extraction network. The structural features of the processed image are any content or a combination of multiple contents in the processed image, such as the character features or the character features and background features in a portrait.
[0035] In one embodiment, before step S120, the following steps are included:
[0036] The reference image and the processed image are normalized, and their sizes are adjusted and stored in a tensor form.
[0037] In this embodiment, in order to improve the network calculation speed when the feature extraction network extracts features from the processed image and the reference image, the reference image and the processed image are first normalized before feature extraction, and then the sizes of the reference image and the processed image are adjusted to a suitable size, and finally stored in the form of a tensor. For example, after the reference image and the processed image are normalized, a reference image and a processed image of 1080×1080 are obtained, and the sizes of the reference image and the processed image are adjusted to 256×256 and stored in the form of a tensor.
[0038] like Figure 2 As shown, in one embodiment, step S120 includes:
[0039] Step S210, quantizing the color of the reference image to obtain a quantized reference image containing a plurality of color intervals;
[0040] Step S220: Calculate the number of pixels in each color interval in the quantized reference image to obtain the color feature.
[0041] In this embodiment, in order to improve the extraction quality of color features in the reference image, the color feature extraction process is as follows: first, the color of the reference image is quantized, and the color space is divided into several small color intervals to obtain a quantized reference image containing several color intervals; the number of pixels in the quantized reference image falling in each color interval is calculated through a color histogram to obtain a color histogram of the reference image, and the color histogram is used as the color feature of the reference image. The color histogram can be based on different color spaces, including RGB color space, HSV space, Luv space or Lab space.
[0042] like Figure 3 As shown, in one embodiment, step S120 further includes:
[0043] Step S310, performing a convolution on different local areas of the processed image to obtain a plurality of convolution structure features;
[0044] Step S320: Use a multi-channel attention module to perform feature extraction on each convolutional structure feature to obtain multiple channel attention structure features corresponding to each convolutional structure feature;
[0045] Step S330, concatenating multiple channel attention structure features corresponding to each of the convolutional structure features to obtain a local attention structure feature;
[0046] Step S340: splicing all the local attention structural features according to the overlapping area of any two of the local attention structural features, and performing batch normalization on the spliced local attention structural features to obtain the structural features.
[0047] In this embodiment, in order to improve the extraction quality of structural features, the structural feature extraction process includes: first, convolving different local areas of the processed image once through a convolution block to obtain multiple convolution structural features; using a multi-channel attention module to upsample each convolution structural feature to obtain an upsampled result, then downsample the upsampled result to obtain a downsampled result, and then input the downsampled result into a pooling layer and a relu activation layer to obtain multiple channel attention structural features corresponding to each convolution structural feature; then splicing the multiple channel attention structural features corresponding to each of the convolution structural features, and upsample and downsample the spliced results in turn to obtain local attention structural features; finally, splicing all local attention structural features according to the overlapping area of any two local attention structural features, and batch normalizing the spliced results to obtain the structural features of the processed image.
[0048] Step S130, performing feature fusion on the color feature and each structural feature through a pre-trained feature fusion model to obtain a color-changed image of each processed image;
[0049] Step S140, calculating the color difference between all the color-changed images and the corresponding processed images to obtain a color difference image of each color-changed image;
[0050] Step S150: smoothing all the color difference images according to the preset window frame value N to obtain a smoothed image of each color difference image, and fusing all the smoothed images with the corresponding processed images to obtain a color conversion video.
[0051] In this embodiment, in order to fuse the color features and the structural features together, the color features and each structural feature are fused through a pre-trained feature fusion model, that is, a color-changed image is obtained by fusion of the background of each processed image and the color features of the reference image. Preferably, the channel and spatial attention mechanism are introduced into the feature fusion model, and after the color feature and each structural feature are fused, the fusion results are respectively input into 8 downsampling convolution modules for downsampling processing, wherein the output result of each downsampling convolution module is fused with the input of the previous downsampling convolution module, and the fusion result is input into the next downsampling convolution module for downsampling processing, and so on, after passing through 8 downsampling convolution modules, the downsampling result of the fusion result is obtained; then the downsampling result is input into 7 deconvolution modules for upsampling processing, wherein the output result of each deconvolution module is fused with the input of the previous deconvolution module, and the fusion result is input into the next deconvolution module for upsampling processing, and so on, after passing through 7 deconvolution modules, the upsampling result of the downsampling result is obtained; then the upsampling result is input into the channel and spatial attention modules for attention feature extraction to obtain multiple spatial attention features; finally, the multiple spatial attention features are spliced, and the splicing result is normalized to obtain a color-changed image of each processed image. In order to further optimize the color change effect of the target processed video, after obtaining the color change image of each processed image, the color difference between each color change image and the corresponding processed image is calculated to obtain the color difference image of each color change image; finally, each color difference image is smoothed according to the preset window frame value, and after obtaining the smoothed image of each color difference image, the smoothed image is fused with the corresponding processed image to obtain the target processed video after color adjustment (i.e., color conversion video).
[0052] Optionally, in one embodiment, after step S140, the following further steps are included:
[0053] Bilinear interpolation is performed on the color difference image to obtain a color interpolation image.
[0054] In this embodiment, if the size of the reference image and the processed image is reduced before feature extraction is performed on the reference image and the processed image, then in order to improve the smoothing effect of the color difference image, before the color difference image is smoothed, bilinear interpolation processing is required to be performed on the color difference image to enlarge the color difference image into a color interpolated image of the original size of the processed image and the reference image.
[0055] For example, if the size of the processed image is 1080×1080 before being input into the feature extraction network, and the size of the reference image and the processed image is reduced to 256×256 before being input into the feature extraction network, the size of the obtained color difference image is also 256×256. Before smoothing the color difference image, the 256×256 color difference image needs to be enlarged to 1080×1080 through bilinear interpolation.
[0056] like Figure 4 As shown, in one embodiment, step S140 includes:
[0057] Step 410: Acquire the color difference image of the current frame, the front color difference image of the previous (N-1) / 2 frames, and the rear color difference image of the next (N-1) / 2 frames;
[0058] Step 420, calculating the average hue of the color difference image, the front color difference image and the back color difference image of the current frame as the target hue;
[0059] Step 430: Adjust the hue of the color difference image of the current frame to the target hue to obtain the smoothed image.
[0060] In this embodiment, according to the preset window frame value N, the color difference image of the current frame, the front color difference image of the previous (N-1) / 2 frames, and the rear color difference image of the next (N-1) / 2 frames are obtained; the average hue of the color difference image of the current frame, the front color difference image, and the rear color difference image is calculated, and the average hue is used as the target hue; finally, the hue of the color difference image of the current frame is adjusted to the target hue to obtain a smoothed image of the color difference image. Among them, the window frame value N is an odd number.
[0061] For example, if the window frame value is 3, the average hue of the color difference image of the current frame, the color difference image of the previous frame, and the color difference image of the next frame is calculated, and the hue of the color difference image of the current frame is adjusted to the average hue to obtain a smooth image of the color difference image; if the window frame value is 5, the average hue of the color difference image of the current frame, the color difference images of the previous 2 frames, and the color difference images of the next 2 frames is calculated, and the hue of the color difference image of the current frame is adjusted to the average hue to obtain a smooth image of the color difference image.
[0062] The method extracts the color features of the reference image and the structural features of each processed image frame in the video through a preset feature extraction network, then fuses the color features and the structural features, calculates the color-changed image and the color difference image of each processed image after the fusion, and finally smoothes each color difference image to obtain the smoothed image of each color difference image, and then fuses the smoothed image with the corresponding processed image to obtain a color-converted video. Different from the existing single filter for color harmony, the color change degree of each processed image frame is different, and the tone of the reference image is applied to the target processed video in a more natural and soft way. Compared with the use of rigid and monotonous filters, it has a more flexible and changeable output, making the tone of the video after color conversion more natural.
[0063] The embodiment of the present invention further provides a video color conversion device, which is used to execute any embodiment of the video color conversion method. Figure 5 , Figure 5 1 is a schematic block diagram of a video color conversion device provided by an embodiment of the present invention. The video color conversion device 100 can be configured in a server.
[0064] like Figure 5 As shown, the video color conversion device 100 includes an acquisition module 110 , a feature extraction module 120 , a feature fusion module 130 , a color difference calculation module 140 , and a smoothing module 150 .
[0065] An acquisition module 110 is used to acquire a target processing video and a reference image with a target color, and use each frame of the target processing video as a processing image;
[0066] A feature extraction module 120 is used to extract features from the reference image and all processed images respectively through a pre-trained feature extraction network to obtain color features of the reference image and structural features of all processed images;
[0067] A feature fusion module 130, used to perform feature fusion on the color feature and each structural feature through a pre-trained feature fusion model to obtain a color-changed image of each processed image;
[0068] A color difference calculation module 140 is used to calculate the color difference between all color-changed images and corresponding processed images to obtain a color difference image of each color-changed image;
[0069] The smoothing module 150 is used to perform smoothing processing on all color difference images according to a preset window frame value N to obtain a smoothed image of each color difference image, and to perform image fusion on all smoothed images and corresponding processed images to obtain a color conversion video.
[0070] In one embodiment, the video color conversion device 100 includes:
[0071] The normalization module is used to perform normalization processing on the reference image and the processed image, adjust the sizes of the reference image and the processed image, and store them in the form of tensors.
[0072] In one embodiment, the feature extraction module 120 includes:
[0073] A quantization unit, used for performing color quantization on the reference image to obtain a quantized reference image containing a plurality of color intervals;
[0074] The calculation unit is used to calculate the number of pixels in each color interval in the quantized reference image to obtain the color feature.
[0075] In one embodiment, the feature extraction module 120 includes:
[0076] A convolution unit, used for performing a convolution on different local areas of the processed image to obtain a plurality of convolution structure features;
[0077] A feature extraction unit, used to extract features from each convolutional structure feature using a multi-channel attention module to obtain multiple channel attention structure features corresponding to each convolutional structure feature;
[0078] A concatenation unit, used for concatenating a plurality of channel attention structure features corresponding to each of the convolution structure features to obtain a local attention structure feature;
[0079] A batch normalization unit is used to splice all the local attention structural features according to the overlapping area of any two of the local attention structural features, and batch normalize the splicing results to obtain the structural features.
[0080] In one embodiment, the video color conversion device 100 includes:
[0081] The color interpolation unit is used to perform bilinear interpolation processing on the color difference image to obtain a color interpolated image.
[0082] In one embodiment, the color difference calculation module 140 includes:
[0083] An input unit, used for inputting the color-changed image and the processed image into an RGB color space;
[0084] The difference calculation unit is used to calculate the difference between the color-changed image and the processed image in the R color channel, the G color channel and the B color channel respectively to obtain the color difference image.
[0085] In one embodiment, the smoothing module 150 includes:
[0086] An acquisition unit, used to acquire a color difference image of a current frame, a front color difference image of a previous (N-1) / 2 frame, and a rear color difference image of a next (N-1) / 2 frame;
[0087] An average hue calculation unit, used to calculate the average hue of the color difference image of the current frame, the previous color difference image and the next color difference image as the target hue;
[0088] The adjusting unit is used to adjust the hue of the color difference image of the current frame to the target hue to obtain the smoothed image.
[0089] An embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned video color conversion method when executing the computer program.
[0090] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium may be a non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to perform the video color conversion method as described above.
[0091] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the above-described equipment, devices and units can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. Those of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0092] In the several embodiments provided by the present invention, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. Units with the same function may also be combined into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be an electrical, mechanical or other form of connection.
[0093] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0094] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0095] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory ROM, Read-Only Memory), disk or CD-ROM and other media that can store program codes.
[0096] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A video color conversion method, It is characterized in that include: Acquire a target processing video and a reference image with a target color, and use each frame of the target processing video as a processing image; Performing feature extraction on the reference image and each processed image respectively through a pre-trained feature extraction network to obtain color features of the reference image and structural features of each processed image; The color feature and each structural feature are fused by a pre-trained feature fusion model to obtain a color-changed image of each processed image; Calculate the color difference between all color-changed images and the corresponding processed images to obtain a color difference image of each color-changed image; All color difference images are smoothed according to a preset window frame value N to obtain a smoothed image of each color difference image, and all smoothed images are fused with corresponding processed images to obtain a color conversion video; The method of extracting features from the reference image and each processed image respectively through a pre-trained feature extraction network to obtain color features of the reference image and structural features of each processed image includes: quantizing the color of the reference image to obtain a quantized reference image containing a plurality of color intervals; and calculating the number of pixels in each color interval in the quantized reference image to obtain the color features. The pre-trained feature extraction network is used to extract features from the reference image and each processed image respectively to obtain color features of the reference image and structural features of each processed image, including: performing a convolution on different local areas of the processed image to obtain multiple convolution structural features; using a multi-channel attention module to extract features from each convolution structural feature to obtain multiple channel attention structural features corresponding to each convolution structural feature; splicing the multiple channel attention structural features corresponding to each convolution structural feature to obtain a local attention structural feature; splicing all local attention structural features according to the overlapping area of any two local attention structural features, and batch normalizing the splicing results to obtain the structural features.
2. The video color conversion method according to claim 1, It is characterized in that Before extracting features from the reference image and each processed image using a pre-trained feature extraction network to obtain color features of the reference image and structural features of each processed image, the method includes: The reference image and the processed image are normalized, and their sizes are adjusted and stored in a tensor form.
3. The video color conversion method according to claim 2, It is characterized in that When the sizes of the reference image and the processed image are reduced, after calculating the color difference between all the color-changed images and the corresponding processed images to obtain the color difference image of each color-changed image, the method further includes: Bilinear interpolation is performed on the color difference image to obtain a color interpolation image.
4. The video color conversion method according to claim 1, It is characterized in that The step of calculating the color difference between the color-changed image and the processed image to obtain a color difference image includes: Inputting the color-changed image and the processed image into an RGB color space; The difference between the color-changed image and the processed image in the R color channel, the G color channel and the B color channel is calculated respectively to obtain the color difference image.
5. The video color conversion method according to claim 1, It is characterized in that The step of smoothing all the color difference images according to the preset window frame value N to obtain a smoothed image of each color difference image includes: Obtain the color difference image of the current frame, the front color difference image of the previous (N-1) / 2 frames, and the rear color difference image of the next (N-1) / 2 frames; Calculate the average hue of the color difference image of the current frame, the previous color difference image, and the next color difference image as the target hue; The hue of the color difference image of the current frame is adjusted to the target hue to obtain the smoothed image.
6. A video color conversion device, It is characterized in that include: An acquisition module is used to acquire a target processing video and a reference image with a target color, and use each frame of the target processing video as a processing image; A feature extraction module, used to extract features from the reference image and each processed image respectively through a pre-trained feature extraction network to obtain color features of the reference image and structural features of each processed image; A feature fusion module, used to perform feature fusion on the color feature and each structural feature through a pre-trained feature fusion model to obtain a color-changed image of each processed image; A color difference calculation module is used to calculate the color difference between all color-changed images and corresponding processed images to obtain a color difference image of each color-changed image; A smoothing module is used to smooth all color difference images according to a preset window frame value N to obtain a smoothed image of each color difference image, and to fuse all smoothed images with corresponding processed images to obtain a color conversion video; The feature extraction module comprises: A quantization unit, used for performing color quantization on the reference image to obtain a quantized reference image containing a plurality of color intervals; A calculation unit, used for calculating the number of pixels in each color interval in the quantized reference image to obtain the color feature; The feature extraction module comprises: A convolution unit, used for performing a convolution on different local areas of the processed image to obtain a plurality of convolution structure features; A feature extraction unit, used to extract features from each convolutional structure feature using a multi-channel attention module to obtain multiple channel attention structure features corresponding to each convolutional structure feature; A concatenation unit, used for concatenating a plurality of channel attention structure features corresponding to each of the convolution structure features to obtain a local attention structure feature; A batch normalization unit is used to splice all the local attention structural features according to the overlapping area of any two of the local attention structural features, and batch normalize the splicing results to obtain the structural features.
7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the video color conversion method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to perform the video color conversion method according to any one of claims 1 to 5.
