WO2023016035A1 - 视频处理方法、装置、电子设备和存储介质 - Google Patents
视频处理方法、装置、电子设备和存储介质 Download PDFInfo
- Publication number
- WO2023016035A1 WO2023016035A1 PCT/CN2022/094715 CN2022094715W WO2023016035A1 WO 2023016035 A1 WO2023016035 A1 WO 2023016035A1 CN 2022094715 W CN2022094715 W CN 2022094715W WO 2023016035 A1 WO2023016035 A1 WO 2023016035A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- video
- vertex
- log
- lut
- style template
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
- H04N23/84—Camera processing pipelines; Components thereof for processing colour signals
- H04N23/843—Demosaicing, e.g. interpolating colour pixel values
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
- H04N23/84—Camera processing pipelines; Components thereof for processing colour signals
- H04N23/85—Camera processing pipelines; Components thereof for processing colour signals for matrixing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
- H04N5/91—Television signal processing therefor
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/63—Control of cameras or camera modules by using electronic viewfinders
- H04N23/631—Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
- H04N23/632—Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
- H04N5/265—Mixing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
- H04N5/91—Television signal processing therefor
- H04N5/911—Television signal processing therefor for the suppression of noise
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/64—Circuits for processing colour signals
- H04N9/74—Circuits for processing colour signals for obtaining special effects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/79—Processing of colour television signals in connection with recording
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/79—Processing of colour television signals in connection with recording
- H04N9/793—Processing of colour television signals in connection with recording for controlling the level of the chrominance signal, e.g. by means of automatic chroma control circuits
Definitions
- the present application relates to the technical field of video shooting, and in particular to a video processing method, device, electronic equipment and storage medium.
- a video processing method, device, electronic equipment, and storage medium, which can make videos captured by electronic equipment have different style effects based on the characteristics of LUTs, so as to meet higher color matching requirements.
- a video processing method including: determining a video style template among a plurality of video style templates, each video style template corresponding to a preset color lookup table LUT; obtaining a video taken by a camera; The logarithmic LOG curve corresponding to the current sensitivity ISO processes the video captured by the camera to obtain the LOG video; based on the LUT corresponding to the determined video style template, the LOG video is processed to obtain the image corresponding to the determined video style template video.
- the LOG video is processed based on the LUT corresponding to the determined video style template, and the process of obtaining the video corresponding to the determined video style template includes: establishing a cubic interpolation space based on the LUT, and the LUT is a three-dimensional 3D-LUT; determine the cube to which each pixel in the LOG video belongs in the cube interpolation space, and the cube is divided into 6 tetrahedrons; determine the tetrahedron to which each pixel in the LOG video belongs; for the pixel corresponding to the vertex of the cube point, the pixel value is converted to the pixel value after LUT processing; for the pixel point that does not correspond to the vertex of the cube, interpolation is performed according to the tetrahedron to which each pixel point belongs, and the pixel value is converted into the pixel value after LUT processing.
- the process of processing the LOG video based on the LUT corresponding to the determined video style template to obtain the video corresponding to the determined video style template also includes: converting the LOG video by RGB color
- the LOG video in the space is converted into the LOG video in the YUV color space; the YUV denoising process is performed on the LOG video in the YUV color space to obtain the denoised LOG video. Since the LOG video obtained by processing the video through the LOG curve will introduce noise, it is possible to convert the LOG video to the YUV color space, perform YUV denoising processing, and use an algorithm to reduce noise to improve the video image quality.
- the process of processing the LOG video based on the LUT corresponding to the determined video style template to obtain the video corresponding to the determined video style template it also includes: denoising the LOG Video is converted into the LOG video of RGB color space by the LOG video of YUV color space; After the LUT corresponding to the LOG video is processed based on the determined video style template, after obtaining the process of video corresponding to the determined video style template, also Including: converting the video corresponding to the determined video style template in the RGB color space to the video in the YUV color space.
- the method before the process of processing the LOG video based on the LUT corresponding to the determined video style template to obtain the video corresponding to the determined video style template, the method further includes: saving the LOG video. Saving the LOG video without LUT processing can improve the ability of post-editing.
- the process of processing the LOG video based on the LUT corresponding to the determined video style template to obtain the video corresponding to the determined video style template it also includes: converting the LOG video into Rec .709 color standard video; save Rec.709 color standard video.
- the process of processing the video captured by the camera through the logarithmic LOG curve to obtain the LOG video, and the LUT corresponding to the LOG based on the determined video style template The video is processed to obtain the process of video corresponding to the determined video style template;
- the video processing method also includes a second video processing flow, and the second video processing flow includes: processing the video taken by the camera through a logarithmic LOG curve, Obtain the LOG video; Process the LOG video based on the LUT corresponding to the determined video style template to obtain a video corresponding to the determined video style template;
- the video processing method also includes: combining the first video processing flow with the determined video The video corresponding to the style template is saved; and the video corresponding to the determined video style template is previewed based on the second video processing flow.
- the cube has the 0th to 7th vertices, the direction from the 0th vertex to the 1st vertex is the coordinate axis direction of the blue B channel, and the direction from the 0th vertex to the 4th vertex is the red R
- the coordinate axis direction of the channel, the direction from the 0th vertex to the 2nd vertex is the coordinate axis direction of the green G channel
- the 0th vertex, the 1st vertex, the 2nd vertex and the 3rd vertex are on the same plane
- the 5th vertex and the 7th vertex are located on the same plane
- the 4th vertex, the 5th vertex, the 6th vertex and the 7th vertex are located on the same plane
- the 0th vertex, the 2nd vertex, the 4th vertex and the 6th vertex are located on the same plane
- a video processing device including: a processor and a memory, the memory is used to store at least one instruction, and when the instruction is loaded and executed by the processor, the above video processing method is realized.
- an electronic device including: a camera; and the above-mentioned video processing device.
- a computer-readable storage medium In a fourth aspect, a computer-readable storage medium is provided.
- a computer program is stored in the computer-readable storage medium, and when running on a computer, the computer is made to execute the above video processing method.
- the video processing method, device, electronic equipment, and storage medium in the embodiments of the present application use the LUT technology in the film industry to process the LOG video based on the LUT corresponding to the determined video style template during the video recording process, so that the recorded
- the video has the style effect corresponding to the determined video style template, so as to meet the higher color grading requirements and make the recorded video have a movie feel.
- FIG. 1 is a structural block diagram of an electronic device in an embodiment of the present application
- FIG. 2 is a flowchart of a video processing method in an embodiment of the present application
- FIG. 3 is a schematic diagram of a user interface in a movie mode in an embodiment of the present application.
- Fig. 4 is the schematic diagram of a kind of LOG curve in the embodiment of the present application.
- Fig. 5 is a kind of specific flow diagram of step 104 in Fig. 2;
- FIG. 6 is a schematic diagram of the relationship between a cube and a tetrahedron in a cube interpolation space in an embodiment of the present application
- FIG. 7 is a flowchart of another video processing method in the embodiment of the present application.
- Fig. 8 is a UV plane schematic diagram
- FIG. 9 is another structural block diagram of an electronic device in the embodiment of the present application.
- FIG. 10 is a software structural block diagram of an electronic device in an embodiment of the present application.
- FIG. 11 is a schematic diagram of a user interface in a professional mode in an embodiment of the present application.
- the electronic device 100 may include a processor 110, a camera 193, a display screen 194, and the like. It can be understood that, the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
- the processor 110 may include one or more processing units, for example: the processor 110 may include a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, Digital signal processor (digital signal processor, DSP), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
- the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
- a memory may also be provided in the processor 110 for storing instructions and data.
- the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
- the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
- Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
- the electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
- the ISP is used for processing the data fed back by the camera 193 .
- the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
- ISP can also perform algorithm optimization on image noise, brightness, and skin color.
- ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
- the ISP may be located in the camera 193 .
- Camera 193 is used to capture still images or video.
- the object generates an optical image through the lens and projects it to the photosensitive element.
- the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
- CMOS complementary metal-oxide-semiconductor
- the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
- the ISP outputs the digital image signal to the DSP for processing.
- DSP converts digital image signals into standard RGB, YUV and other image signals.
- the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
- Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
- Video codecs are used to compress or decompress digital video.
- the electronic device 100 may support one or more video codecs.
- the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
- MPEG moving picture experts group
- the embodiment of the present application provides a video processing method.
- the video processing method may be executed by a processor 110, specifically an ISP or a combination of an ISP and other processors.
- the video processing method includes:
- Step 101 determine a video style template among a plurality of video style templates, each video style template corresponds to a preset color lookup table (Look Up Table, LUT);
- LUT is a mathematical conversion model. Using LUT, one set of RGB values can be output as another set of RGB values, thereby changing the exposure and color of the picture. Therefore, LUTs corresponding to different video styles can be pre-generated.
- a video style template can be determined first. For example, the video style template can be determined based on the user's choice, or based on artificial intelligence (Artificial Intelligence, AI), The video style template is automatically determined according to the scene corresponding to the image captured by the current camera. For example, assuming that the electronic device is a mobile phone, in a possible implementation, as shown in Figure 3, the user operates the mobile phone to enter the shooting interface, and the shooting interface includes movie mode options.
- the movie mode interface of including multiple video style template options, for example including "A" movie style template, "B” movie style template and “C” movie style template, only one " A "movie style template, understandably, multiple different movie style templates can be displayed side by side in the user interface, and the LUTs corresponding to different movie style templates can be generated based on the corresponding movie color matching style in advance, and the color conversion of the LUT has Corresponding to the style characteristics of the movie, for example, the color matching style of the movie "A" is complementary color.
- Complementary color refers to the contrast effect of two corresponding colors. Two colors of warm color and cool color are used to emphasize the contrast to enhance the vividness, For outstanding effects, usually two contrasting colors symbolize conflicting behaviors.
- the LUT corresponding to the "A" movie style template is ready to use After transforming the colormap, the complementary colors are more pronounced to simulate the color scheme of the "A" movie.
- the mobile phone when the user operates the mobile phone to enter the movie mode, the mobile phone will obtain the picture taken by the current camera, and based on the AI algorithm, determine the scene corresponding to the picture and determine the scene corresponding to the scene.
- the recommended video style template for example, if it is recognized that the subject of the currently captured picture is a young female character, the corresponding recommended video style template is determined according to the algorithm as the "C" movie style template, and the movie "C" has a young female character as the theme movie, its corresponding LUT can simulate the color matching style of the movie "C”; It is a movie with city streets as the main scene, and its corresponding LUT can simulate the color matching style of the "B" movie. In this way, a video style template matching the current scene can be automatically recommended for the user. Film styles can be pre-extracted to produce LUTs suitable for mobile electronics.
- Step 102 obtain the video shot by the camera, for example, after the video style template is determined in step 101, if the user clicks on the shooting option, the mobile phone starts to obtain the video shot by the camera;
- Step 103 process the video captured by the camera through the logarithm (Logarithm, LOG) curve corresponding to the current sensitivity ISO of the camera to obtain the LOG video;
- Figure 4 illustrates a LOG curve, where the abscissa is a linear signal, represented by a 16-bit code value Code Value, and the ordinate is the LOG signal processed by the LOG curve, represented by a 10-bit code value.
- the signal input of the camera can be used to encode the information in the dark area to the middle tone (as shown in the steep part of the curve in Figure 4), forming a 10-bit signal output, which conforms to the human eye's LOG sensing rule for light, and maximizes the The dark information is preserved, and the LOG video can use the limited bit depth to maximize the details of shadows and highlights.
- the ASA in Figure 4 is the sensitivity, and different ASAs correspond to different ISOs, and the two belong to different systems.
- Step 104 Process the LOG video based on the LUT corresponding to the determined video style template to obtain a video corresponding to the determined video style template.
- the LOG video is used as an input, and the LUT corresponding to the video style template determined in step 101 is applied to perform mapping conversion processing on the LOG video image.
- the output can be the video of the Rec.709 color standard, or the video of the High-Dynamic Range (HDR) 10 standard, that is, the LOG video can be processed through the LUT, Convert video to HDR10 standard.
- HDR High-Dynamic Range
- Different LUTs are applied to electronic equipment, and related modules in the electronic equipment can be adapted to adapt to different styles of LUTs.
- the video style template determined in step 101 is a gray tone video style template
- the gray tone The characteristics of the picture are that the texture in the picture is strong, the saturation is low, there is no more color interference except for the color of the character's skin, and the dark part is cooler. Based on these characteristics, the electronic device can monitor the relevant Adjust the module parameters to keep the texture in the picture, do not do strong denoising and sharpening, properly reduce the saturation of the picture, keep the skin color in the picture true to restore, and adjust the dark part of the picture to cool colors.
- the LUT technology of the film industry is used to process the LOG video based on the LUT corresponding to the determined video style template, so that the recorded video has the determined video style
- the style effect corresponding to the template can meet the higher color grading requirements and make the recorded video have a cinematic feel.
- the process of processing the LOG video based on the LUT corresponding to the determined video style template in the above step 104, and obtaining the video corresponding to the determined video style template includes:
- Step 1041 establish a cubic interpolation space based on the LUT, where the LUT is a three-dimensional 3D-LUT;
- 3D-LUT is a color mapping relationship commonly used in the film industry. It can convert any input RGB pixel value into corresponding other RGB pixel values, such as inputting 12bit RGB Video image, output 12bit RGB video image after LUT processing and mapping.
- Step 1042 determine the cube to which each pixel in the LOG video belongs in the cube interpolation space, and the cube is divided into 6 tetrahedrons;
- the LOG video is used as the input in the LUT processing process, and each pixel in the LOG video picture is obtained through the pixel point after the LUT processing mapping, which can realize the process of processing the LOG video through the LUT.
- step 1042 it is necessary to Determine the cube to which each pixel in each input LOG video belongs to in the above cube interpolation space, and the cube is divided into 6 tetrahedrons.
- Step 1043 determine the tetrahedron to which each pixel in the LOG video belongs
- Step 1044 for the pixel points corresponding to the vertices of the cube, the pixel value is converted into a pixel value after LUT processing, and for the pixel points not corresponding to the vertices of the cube, interpolation is performed according to the tetrahedron to which each pixel point belongs, and the pixel value is converted into The pixel value after LUT processing.
- the mapped RGB pixel value can be directly obtained, that is, the pixel value can be directly mapped and converted into The corresponding pixel value, and if the pixel is located between the vertices of the cube, interpolate according to the tetrahedron to which the pixel belongs.
- the cube has the 0th to 7th vertices, which are respectively represented by numbers 0 to 7 in Figure 6, and the direction from the 0th vertex to the first vertex is blue B
- the coordinate axis direction of the channel, the direction from the 0th vertex to the 4th vertex is the coordinate axis direction of the red R channel
- the direction from the 0th vertex to the second vertex is the coordinate axis direction of the green G channel
- the 2nd vertex and the 3rd vertex are located on the same plane
- the 1st vertex, the 3rd vertex, the 5th vertex and the 7th vertex are located on the same plane
- the 4th vertex, the 5th vertex, the 6th vertex and the 7th vertex are located on the same plane
- the 3rd vertex is located on the same plane.
- Vertex 0, Vertex 2, Vertex 4 and Vertex 6 are on the same plane; Vertex 0, Vertex 1, Vertex 5 and Vertex 7 form the first tetrahedron, Vertex 0, Vertex 1, Vertex 3
- the vertex and the 7th vertex form the second tetrahedron, the 0th vertex, the 2nd vertex, the 3rd vertex and the 7th vertex form the third tetrahedron, the 0th vertex, the 4th vertex, the 5th vertex and the 7th vertex form
- the 0th vertex, the 4th vertex, the 6th vertex and the 7th vertex form the fifth tetrahedron
- the 0th vertex, the 2nd vertex, the 6th vertex and the 7th vertex form the sixth tetrahedron;
- the coordinates of the i-th vertex are (Ri, Gi, Bi)
- the value of i is 0, 1, 2, 3, ..., 7, and the pixel value of the pixel value of the
- step 1044 for the pixel points that do not correspond to the vertices of the cube, interpolation is performed according to the tetrahedron to which each pixel point belongs, and the process of converting the pixel value into the pixel value processed by the LUT includes:
- VE(R, G, B) VE(R0, G0, B0)+(delta_valueR_E ⁇ deltaR+delta_valueG_E ⁇ deltaG+delta_valueB_E ⁇ deltaB+(step_size>1))/(step_size);
- VE(R0, G0, B0) is the E channel pixel value of the 0th vertex (R0, G0, B0) after LUT processing, and E is R, G and B;
- delta_valueR_E is the difference between the two vertices in the direction of the coordinate axis of the R channel corresponding to the tetrahedron to which the current pixel belongs, and the difference between the pixel values of the E channel after LUT processing.
- delta_valueB_E is the difference between the pixel values of the E channel after the LUT processing of two vertices in the direction of the coordinate axis of the tetrahedron to which the current pixel belongs corresponding to the B channel;
- deltaR is the difference between the R value in the current pixel point (R, G, B) and the R0 value in the 0th vertex (R0, G0, B0)
- deltaG is the G value in the current pixel point (R, G, B).
- deltaB is the difference between the B value in the current pixel point (R, G, B) and the B0 value in the 0th vertex (R0, G0, B0).
- step_size is the side length of the cube.
- step_size>>1 means step_size is shifted to the right by one bit.
- deltaR, deltaG and deltaB represent the distance between the current pixel point (R, G, B) and the 0th vertex
- deltaR R-R0
- deltaG G-G0
- deltaB B-B0
- deltaB ⁇ deltaR and deltaR ⁇ deltaG determine that the current pixel belongs to the first tetrahedron; if deltaB ⁇ deltaG and deltaG ⁇ deltaR, determine that the current pixel belongs to the second tetrahedron; if deltaG ⁇ deltaB and deltaB ⁇ deltaR , it is determined that the current pixel point belongs to the third tetrahedron; if deltaR ⁇ deltaB and deltaB ⁇ deltaG, then it is determined that the current pixel point belongs to the fourth tetrahedron; if deltaR ⁇ deltaG and deltaG ⁇ deltaB, then it is determined that the current pixel point belongs to the fourth tetrahedron Five tetrahedrons; if the relationship among deltaR, deltaG, and deltaB does not belong to the above conditions of the first to fifth tetrahedrons, it is determined that the current pixel point belongs to the sixth tetrahedron.
- delta_valueR_E is the tetrahedron to which the current pixel point belongs
- delta_valueR_R VR(R5, G5, B5)-VR(R1, G1, B1)
- delta_valueG_R VR( R7, G7, B7)-VR(R5, G5, B5)
- delta_valueB_R VR(R1, G1, B1)-VR(R0, G0, B0)
- VR(R, G, B) VR(R0, G0 , B0)+(delta_valueR_R ⁇ deltaR+delta_valueG_R ⁇ deltaG+delta_valueB_R ⁇ deltaB+
- processing the LOG video based on the LUT corresponding to the determined video style template to obtain the video corresponding to the determined video style template also includes: step 105, LOG video is converted into the LOG video of YUV color space by the LOG video of RGB color space; Step 106, the LOG video of YUV color space is carried out YUV denoising process, obtains the LOG video after denoising,
- the LOG video to which the LUT is applied in step 104 is the LOG video after YUV denoising in step 106 . Since the LOG video obtained in step 103 will introduce noise, after the LOG video can be converted into a YUV color space, YUV denoising processing can be performed, and the noise can be reduced by an algorithm to improve the video image quality.
- processing the LOG video based on the LUT corresponding to the determined video style template to obtain the video corresponding to the determined video style template also includes: step 107, the LOG video after denoising is converted into the LOG video of RGB color space by the LOG video of YUV color space; After the process of obtaining the video corresponding to the determined video style template, it also includes: Step 108, converting the video corresponding to the determined video style template in RGB color space into a video in YUV color space.
- the process of processing the LOG video based on the LUT in the step 104 is realized based on the RGB color space, therefore, before the step 104, the video in the YUV color space is converted into the video in the RGB color space, and after the step 104, then Reconvert video in RGB color space to video in YUV color space.
- YUV also known as YCbCr
- YCbCr is a color coding method used by the European television system.
- three-tube color cameras or color CCD cameras are usually used to capture images, and then the obtained color image signals are separated, amplified and corrected to obtain RGB signals, and then the brightness signals Y and Y are obtained through a matrix conversion circuit.
- Two color-difference signals B-Y (ie U) and R-Y (ie V), and finally the sending end encodes the three signals separately and sends them out on the same channel.
- This color representation method is the YUV color space.
- YCbCr is the specific implementation of the YUV model, which is actually a scaled and offset replica of YUV.
- Y has the same meaning as Y in YUV, and both Cb and Cr refer to color, but they are different in the way of expression.
- YCbCr is the most widely used member in computer systems, and its application fields are very wide. Both JPEG and MPEG use this format. Generally speaking, YUV mostly refers to YCbCr.
- the UV plane is shown in Figure 8.
- RGB and YUV color spaces can be realized by a 3x3 matrix:
- the electronic device may specifically include a camera 193, an anti-mosaic Demosaic module 21, a deformation module 22, a fusion module 23, a noise processing module 24, and a color correction matrix (Color Correction Matrix, CCM) module 25, Global Tone Mapping (Global Tone Mapping, GTM) module 26, scaling Scaler module 27, YUV denoising module 28 and LUT processing module 29, for example, in the process of video recording, camera 193 captures and obtains long exposure frame For the video image and the video image of the short exposure frame, the exposure time corresponding to the video image of the long exposure frame is longer than the exposure time corresponding to the video image of the short exposure frame, and the video image of the long exposure frame and the video image of the short exposure frame are respectively processed by the anti-mosaic module 21 , the image is converted from the RAW domain to the RGB domain, and then the two-way video images are processed by the deformation warp module 22 respectively, and the effects of alignment and anti-shake are realized through the
- the above step 103 is executed, the process of processing the video captured by the camera through the logarithmic LOG curve, and the process of obtaining the LOG video, and the above step 104, based on the LUT corresponding to the determined video style template to the LOG
- the video is processed to obtain the video corresponding to the determined video style template.
- the first video processing flow S1 includes, the video taken by the camera 193 from the fusion module 23 is denoised by the noise processing module 24, and then processed by the CCM module 25 to convert the video into RGB wide color gamut color Space, then carry out above-mentioned step 103 by GTM module 26, process video by LOG curve, obtain LOG video, then carry out scaling processing to video by scaling module 27, then carry out above-mentioned step 106 by YUV denoising module 28, video is carried out YUV denoising, and then perform the above step 104 through the LUT processing module 29 to process the video through the LUT to obtain the video corresponding to the determined video style module.
- the video corresponding to the determined video style template in the first video processing flow S1 is saved as video 1, and a video with style can be obtained.
- the second video processing flow S2 includes: the video taken by the camera 193 from the fusion module 23 is denoised by the noise processing module 24, and then processed by the CCM module 25 to convert the video into the color space of RGB wide color gamut, Then carry out above-mentioned step 103 by GTM module 26, process video by LOG curve, obtain LOG video, then carry out scaling processing to video by scaling module 27, then carry out above-mentioned step 106 by YUV denoising module 28, carry out YUV to video Noise, then execute above-mentioned step 104 by LUT processing module 29, process video by LUT, obtain the video corresponding to determined video style module. Previewing is performed based on the video corresponding to the determined video style template in the second video processing flow S2.
- the two video streams are respectively processed in the first video processing flow S1 and the second video processing flow S2.
- the LOG curve-based processing in step 103 and the LUT-based processing in step 104 one video stream is used for encoding and saving, and the other video stream is used for preview.
- Bayer field Each lens on a digital camera has a light sensor to measure the brightness of the light, but to obtain a full-color image, generally three light sensors are required to obtain the three primary colors of red, green and blue information, and in order to reduce the cost and volume of digital cameras, manufacturers usually use CCD or CMOS image sensors.
- CCD or CMOS image sensors usually use CCD or CMOS image sensors.
- the original image output by CMOS image sensors is in Bayer domain RGB format, and a single pixel contains only one color value. To obtain the gray value of the image, it is necessary to interpolate the complete color information of each pixel, and then calculate the gray value of each pixel.
- the Bayer domain refers to a raw image format inside a digital camera.
- the Raw domain or Raw format refers to unprocessed images. Further, the Raw image can be understood as that the photosensitive element of the camera such as Complementary Metal Oxide Semiconductor (Complementary Metal Oxide Semiconductor, CMOS) or Charge-coupled Device (Charge-coupled Device, CCD) converts the captured light source signal into digital The raw data of the signal.
- CMOS Complementary Metal Oxide Semiconductor
- CCD Charge-coupled Device
- a RAW file is a record of the original information of the digital camera sensor, while recording some metadata (Metadata, such as ISO (International Organization for Standardization, International Organization for Standardization) settings, shutter speed, aperture value) generated by the camera. , white balance, etc.) files.
- the Raw domain is a format that has not been processed by the ISP nonlinearly and has not been compressed.
- the full name of Raw format is RAW Image Format.
- YUV is a color encoding method that is often used in various video processing components. YUV takes human perception into account when encoding photos or videos, allowing bandwidth reduction for chroma. YUV is a type of compiling true-color color space (color space). Proper nouns such as Y'UV, YUV, YCbCr, and YPbPr can all be called YUV, and they overlap with each other. Among them, "Y” represents the brightness (Luminance or Luma), that is, the grayscale value, "U” and “V” represent the chroma (Chrominance or Chroma), which are used to describe the color and saturation of the image, and are used to specify the color of the pixel .
- YUV is divided into two formats, one is: packed formats, which store Y, U, and V values into a Macro Pixels array, which is similar to the storage method of RGB.
- the other is: planar formats, which store the three components of Y, U, and V in different matrices.
- Planar formats means that each Y component, U component and V component are organized in an independent plane, that is to say, all U components are behind the Y component, and V components are behind all U components.
- processing the LOG video based on the LUT corresponding to the determined video style template to obtain the video corresponding to the determined video style template also includes: saving the LOG video, that is, saving the video 2. That is to say, after the LOG video is obtained in step 103, one LOG video is split and saved directly, that is, an unstyled LOG video is saved, that is, recording 2, and the other LOG video is saved after being processed based on the LUT in step 104, that is, saved A video corresponding to the video style template, that is, recording 1. For example, during the recording process, two video files are encoded and saved in a temporary folder at the same time.
- one of the videos is determined as the final video file. If the user wants to directly To record and generate a "B" movie-style video file, take video 1 as the final video file, and if the user wants to save the original material so as to improve the ability of post-editing, then take video 2 as the final video file. It should be noted that the splitting process of saving the LOG video may be performed after the zooming module 27 scales the video and before the LUT processing module 29 executes the process of step 104 above.
- processing the LOG video based on the LUT corresponding to the determined video style template to obtain the video corresponding to the determined video style template also includes: converting the LOG video to a video of the Rec.709 color standard; saving the video of the Rec.709 color standard, that is, video 2. That is to say, after the LOG video is obtained in step 103, one channel of LOG video is converted into a primary color video and saved as video 2. A video corresponding to the video style template is saved as video 1. For example, during the recording process, two video files are encoded and saved in a temporary folder at the same time. Based on the user's choice, one of the videos is determined as the final video file.
- the splitting process of ungraded video can be performed after the zooming module 27 scales the video and before the LUT processing module 29 executes the above-mentioned step 104 .
- FIG. 10 is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
- the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
- the Android system is divided into five layers, which are, from top to bottom, the Application layer, the application framework framework layer, the system library library, the Hardware Abstraction Layer (Hardware Abstraction Layer, HAL) and the kernel layer.
- the application layer can include applications such as cameras.
- the application framework layer may include camera application programming interface (Application Programming Interface, API), media recording MediaRecorder and surface view Surfaceview, etc.
- Media recording is used to record video or image data and make this data accessible to applications.
- Surface views are used to display preview images.
- a system library can include multiple function modules. For example: camera service CameraSevice, etc.
- the hardware abstraction layer is used to provide interface support, for example, including the camera process CameraPipeline for the camera service to call Call.
- the kernel layer is the layer between hardware and software.
- the kernel layer includes display drivers, camera drivers, etc.
- HAL reports the ability information of recording two videos at the same time, and the application layer sends a capture request CaptureRequest, which corresponds to a stream of recording 1, a stream of recording 2 and a preview stream, and creates two streams at the same time.
- CaptureRequest An example of a media codec mediacodec that receives the encoding of two video streams.
- HAL calls back three streams according to the above dataflow dataflow. Among them, the preview stream shows that the two video streams are sent to mediacodec respectively.
- the video recording and video processing method provided in the embodiment of the present application may be represented as multiple functions in two shooting modes, where the two shooting modes may refer to: movie mode and professional mode.
- the movie mode is a shooting mode related to the theme of the movie.
- the image displayed by the electronic device 100 can give the user a sense of watching a movie.
- the electronic device 100 also provides a plurality of video related to the theme of the movie Style templates, users can use these video style templates to obtain tone-adjusted images or videos, and the tone of these images or videos is similar or identical to the tone of the movie.
- the movie mode can at least provide an interface for the user to trigger the LUT function and the HDR10 function. For specific descriptions about the LUT function and the HDR10 function, please refer to the following embodiments.
- the electronic device 100 may enter a movie mode in response to a user's operation.
- the electronic device 100 may detect a user's touch operation on the camera application, and in response to the operation, the electronic device 100 displays a default camera interface of the camera application.
- the default camera interface can include: preview frame, shooting mode list, gallery shortcut keys, shutter controls, etc. in:
- the preview frame can be used to display images collected by the camera 193 in real time.
- the electronic device 100 can refresh the displayed content therein in real time, so that the user can preview the image currently captured by the camera 193 .
- One or more shooting mode options may be displayed in the shooting mode list.
- the one or more shooting mode options may include: portrait mode options, video recording mode options, camera mode options, movie mode options, and professional options.
- the one or more shooting mode options can be represented as text information on the interface, such as "portrait”, “video recording”, “photographing”, “movie”, “professional”.
- the one or more shooting mode options may also be represented as icons or other forms of interactive elements (interactive element, IE) on the interface.
- Gallery shortcuts can be used to launch the Gallery application.
- the gallery application program is an application program for picture management on electronic devices such as smart phones and tablet computers, and may also be called "album".
- the name of the application program is not limited in this embodiment.
- the gallery application program can support users to perform various operations on pictures stored on the electronic device 100, such as browsing, editing, deleting, selecting and other operations.
- the shutter control can be used to listen for user actions that trigger a photo.
- the electronic device 100 may detect a user operation acting on the shutter control, and in response to the operation, the electronic device 100 may save the image in the preview frame as a picture in the gallery application.
- the electronic device 100 may also display the thumbnails of the saved images in the gallery shortcut key. That is, users can tap the shutter control to trigger a photo.
- the shutter control may be a button or other forms of control.
- the electronic device 100 may detect a user's touch operation on the movie mode option, and in response to the operation, the electronic device displays a user interface as shown in FIG. 3 .
- the electronic device 100 may turn on the movie mode by default after starting the camera application. Not limited to this, the electronic device 100 can also enable the movie mode in other ways, for example, the electronic device 100 can also enable the movie mode according to the user's voice command, which is not limited in this embodiment of the present application.
- the electronic device 100 may detect a user's touch operation on the movie mode option, and in response to the operation, the electronic device displays a user interface as shown in FIG. 3 .
- the user interface shown in FIG. 3 includes function options, and the function options include HDR10 options, flash options, LUT options, and setting options. These multiple function options can detect the user's touch operation, and in response to the operation, enable or disable the corresponding shooting function, for example, HDR10 function, flash function, LUT function, setting function.
- the electronic device can enable the LUT function, and the LUT function can change the display effect of the preview image.
- the LUT function introduces a color lookup table, which is equivalent to a color conversion model, which can output adjusted color values according to the input color values.
- the color value of the image captured by the camera is equivalent to the input value, and different color values can be correspondingly obtained as an output value after passing through the color conversion model.
- the image displayed in the preview box is the image adjusted by the color transformation model.
- the electronic device 100 uses the LUT function to display an image composed of color values adjusted by the color conversion model, so as to achieve the effect of adjusting the tone of the image.
- the electronic device 100 can provide multiple video style templates, one video style template corresponds to one color conversion model, and different video style templates can bring different display effects to the preview image.
- these video style templates can be associated with the theme of the movie, and the tone adjustment effect brought by the video style template to the preview image can be close to or the same as the tone in the movie, creating an atmosphere for the user to shoot a movie.
- the electronic device 100 can determine a video style template among multiple video style templates according to the current preview video image, and the determined video style template can be displayed on the interface, so that the user can understand Currently determined video style templates, for example, a plurality of video style templates including "A" movie style template, "B" movie style template and "C” movie style template, the corresponding LUTs of different movie style templates can be based on the corresponding Generated by the movie color matching style, the color conversion of the LUT has the style characteristics of the corresponding movie. Film styles can be pre-extracted to produce LUTs suitable for mobile electronics. Turning on the LUT function will change the color tone of the preview video screen. As illustrated in FIG. 3 , the electronic device 100 determines and displays the "A" movie style template.
- the electronic device 100 may select a video style template according to the user's sliding operation. Specifically, when the electronic device 100 detects the user operation of enabling the LUT function and displays the LUT preview window, the electronic device 100 can select the first video style template located in the LUT preview window by default as the video style template selected by the electronic device 100. template. Afterwards, the electronic device 100 can detect the left and right sliding operation of the user acting on the LUT preview window, and move the position of each video style template in the LUT preview window. The first video style template displayed in the preview window is used as the video style template selected by the electronic device 100 .
- the electronic device 100 in addition to using the video style template to change the display effect of the preview image, can also detect a user operation to start recording a video after adding the video style template, and in response to the operation, the electronic device 100 starts recording Video, so as to obtain the video after adjusting the display effect using the video style template.
- the electronic device 100 can also detect the user operation of taking a photo. In response to this operation, the electronic device 100 saves the preview image with the video style template added in the preview box as a picture, so as to obtain the user's operation of using the video.
- the style template adjusts the image after the display effect.
- HDR10 is a high-dynamic range image (High-Dynamic Range, HDR). Compared with ordinary images, HDR can provide more dynamic range and image details, and can better Reflecting the visual effects in the real environment, 10 in HDR10 is 10 bits, and HDR10 can record video with a high dynamic range of 10 bits.
- the electronic device 100 may detect the user's touch operation on the professional mode option, and enter the professional mode.
- the functional options that can be included in the user interface are, for example: LOG option, flashlight option, LUT option, and setting option.
- the user interface also includes parameter adjustment options, such as: measurement Light M option, ISO option, shutter S option, exposure compensation EV option, focus mode AF option and white balance WB option.
- the electronic device 100 may turn on the professional mode by default after starting the camera application.
- the electronic device 100 can also enable the professional mode in other ways, for example, the electronic device 100 can also enable the professional mode according to the user's voice command, which is not limited in this embodiment of the present application.
- the electronic device 100 may detect a user operation on the LOG option by the user, and in response to the operation, the electronic device 100 enables the LOG function.
- the LOG function can apply the logarithmic function to the exposure curve to preserve the details of the highlights and shadows in the image captured by the camera to the maximum extent, so that the saturation of the final preview image is lower.
- the video recorded with LOG function is called LOG video.
- the electronic device 100 can not only record a video with a video style template added through the professional mode, but also add a video style template to the video after recording a video without a video style template, or record a LOG video after enabling the LOG function. Then add a video style template for the LOG video. In this way, the electronic device 100 can not only adjust the display effect of the picture before recording the video, but also adjust the display effect of the recorded video after the video recording is completed, which increases the flexibility and freedom of image adjustment.
- the embodiment of the present application also provides a video processing device, including: a video style determination module, configured to determine a video style template among a plurality of video style templates, and each video style template corresponds to a preset three-dimensional color lookup table LUT;
- the video acquisition module is used to obtain the video taken by the camera;
- the first processing module is used to process the video taken by the camera through the logarithmic LOG curve corresponding to the current sensitivity ISO of the camera to obtain the LOG video;
- the second processing A module configured to process the LOG video based on the LUT corresponding to the determined video style template, to obtain a video corresponding to the determined video style template.
- the video processing device can apply the above-mentioned video processing method, and the specific process and principle will not be repeated here, wherein, the first processing module can specifically be the GTM module 26 in the above-mentioned embodiment, and the second processing module can be specifically the above-mentioned embodiment The LUT processing module 29 in.
- the second processing module is specifically configured to: establish a cube interpolation space based on the LUT, where the LUT is a three-dimensional 3D-LUT; determine the cube to which each pixel in the LOG video belongs in the cube interpolation space, and the cube Divided into 6 tetrahedrons; determine the tetrahedron to which each pixel point in the LOG video belongs; for the pixel point corresponding to the vertex of the cube, convert the pixel value to the pixel value after LUT processing; for the pixel point not corresponding to the vertex of the cube , perform interpolation according to the tetrahedron to which each pixel belongs, and convert the pixel value into a pixel value after LUT processing.
- the video processing device further includes: a conversion module, configured to convert the LOG video from the LOG video of the RGB color space to the LOG video of the YUV color space. Between the module 27 and the YUV denoising module 28, the conversion module is not shown in FIG. 9; the YUV denoising module 28 is used to perform YUV denoising processing on the LOG video in the YUV color space to obtain the denoised LOG video.
- the video processing device further includes: a first conversion module, configured to convert the denoised LOG video from a LOG video in a YUV color space to a LOG video in an RGB color space, and the first conversion module Can be located between the YUV denoising module 28 and the LUT processing module 29 in Fig. 9;
- the second conversion module is used to convert the video corresponding to the determined video style template of the RGB color space into the video of the YUV color space, the The second conversion module may be located between the LUT processing module 29 in FIG. 9 and the process of saving the video recording 1.
- the first conversion module and the second conversion module are not shown in FIG. 9 .
- the video processing device further includes: a first saving module, configured to save the video corresponding to the determined video style template; a second saving module, configured to save the LOG video.
- the video processing device further includes: a first saving module, used to save the video corresponding to the determined video style template; a backup conversion module, used to convert the LOG video to the Rec.709 color standard video; the second saving module is used to save the video of the Rec.709 color standard.
- the process of processing the video captured by the camera through the logarithmic LOG curve to obtain the LOG video, and the LUT corresponding to the LOG based on the determined video style template The video is processed to obtain the process of video corresponding to the determined video style template;
- the video processing method also includes a second video processing flow, and the second video processing flow includes: processing the video taken by the camera through a logarithmic LOG curve, The process of obtaining the LOG video; the process of processing the LOG video based on the LUT corresponding to the determined video style template to obtain the video corresponding to the determined video style template;
- the video processing method also includes: a first saving module for storing The video corresponding to the determined video style template in the first video processing flow is saved; the preview module is configured to perform preview based on the video corresponding to the determined video style template in the second video processing flow.
- the cube has the 0th to 7th vertices, the direction from the 0th vertex to the 1st vertex is the coordinate axis direction of the blue B channel, and the direction from the 0th vertex to the 4th vertex is the red R
- the coordinate axis direction of the channel, the direction from the 0th vertex to the 2nd vertex is the coordinate axis direction of the green G channel
- the 0th vertex, the 1st vertex, the 2nd vertex and the 3rd vertex are on the same plane
- the 5th vertex and the 7th vertex are located on the same plane
- the 4th vertex, the 5th vertex, the 6th vertex and the 7th vertex are located on the same plane
- the 0th vertex, the 2nd vertex, the 4th vertex and the 6th vertex are located on the same plane
- deltaR is the difference between the R value in the current pixel point (R, G, B) and the R0 value in the 0th vertex (R0, G0, B0)
- deltaG is the current pixel point
- deltaB is the B value in the current pixel point (R, G, B) and the 0th vertex ( R0, G0, B0) the difference between the B0 value
- step_size is the side length of the cube.
- each module of the video processing device is only a division of logical functions, and may be fully or partially integrated into one physical entity or physically separated during actual implementation.
- these modules can all be implemented in the form of software called by the processing element; they can also be implemented in the form of hardware; some modules can also be implemented in the form of software called by the processing element, and some modules can be implemented in the form of hardware.
- any one of the video style determination module, the video acquisition module, the first processing module, and the second processing module can be a separate processing element, or can be integrated in a video processing device, for example, integrated in a certain part of the video processing device
- it can also be stored in the memory of the video processing device in the form of a program, and a certain processing element of the video processing device calls and executes the functions of the above modules.
- the implementation of other modules is similar.
- all or part of these modules can be integrated together, and can also be implemented independently.
- the processing element mentioned here may be an integrated circuit with signal processing capabilities.
- each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or an instruction in the form of software.
- these modules of the video style determination module, the video acquisition module, the first processing module and the second processing module may be one or more integrated circuits configured to implement the above method, for example: one or more specific integrated circuits (Application Specific Integrated Circuit, ASIC), or, one or more microprocessors (digital signal processor, DSP), or, one or more field programmable gate arrays (Field Programmable Gate Array, FPGA), etc.
- ASIC Application Specific Integrated Circuit
- DSP digital signal processor
- FPGA Field Programmable Gate Array
- the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processors that can call programs.
- these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
- SOC system-on-a-chip
- An embodiment of the present application further provides a video processing device, including: a processor and a memory, the memory is used to store at least one instruction, and when the instruction is loaded and executed by the processor, the video processing method in any of the foregoing embodiments is implemented.
- the video processing apparatus may apply the above-mentioned video processing method, and the specific process and principle will not be repeated here.
- the number of processors may be one or more, and the processors and memory may be connected through a bus or in other ways.
- the memory can be used to store non-transitory software programs, non-transitory computer-executable programs and modules, such as program instructions/modules corresponding to the video processing device in the embodiment of the present application.
- the processor executes various functional applications and data processing by running non-transitory software programs, instructions and modules stored in the memory, that is, implements the method in any of the above method embodiments.
- the memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function; and necessary data and the like.
- the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage devices.
- the embodiment of the present application also provides an electronic device, including: a camera 193 and the above-mentioned video processing device, and the video processing device includes a processor 110.
- the electronic device may be any product or component with a video shooting function such as a mobile phone, a TV, a tablet computer, a watch, a bracelet, and the like.
- An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when running on a computer, the computer is made to execute the video processing method in any of the foregoing embodiments.
- all or part of them may be implemented by software, hardware, firmware or any combination thereof.
- software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
- the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the present application will be generated in whole or in part.
- the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
- the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, DSL) or wireless (eg, infrared, wireless, microwave, etc.) means.
- the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
- the available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, a Solid State Disk).
- "at least one” means one or more, and “multiple” means two or more.
- “And/or” describes the association relationship of associated objects, indicating that there may be three kinds of relationships, for example, A and/or B may indicate that A exists alone, A and B exist simultaneously, or B exists alone. Among them, A and B can be singular or plural.
- the character “/” generally indicates that the contextual objects are an “or” relationship.
- “At least one of the following” and similar expressions refer to any combination of these items, including any combination of single items or plural items.
- At least one of a, b, and c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, and c may be single or multiple.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Image Processing (AREA)
Abstract
Description
Claims (11)
- 一种视频处理方法,其特征在于,包括:在多个视频风格模板中确定一个视频风格模板,每个视频风格模板对应一个预设的颜色查找表LUT;获取通过摄像头拍摄的视频;通过所述摄像头当前的感光度ISO所对应的对数LOG曲线对所述通过摄像头拍摄的视频进行处理,得到LOG视频;基于所确定的视频风格模板对应的LUT对所述LOG视频进行处理,得到与所确定的视频风格模板对应的视频。
- 根据权利要求1所述的视频处理方法,其特征在于,所述基于所确定的视频风格模板对应的LUT对所述LOG视频进行处理,得到与所确定的视频风格模板对应的视频的过程包括:基于所述LUT建立立方体插值空间,所述LUT为三维3D-LUT;确定所述LOG视频中每个像素点在所述立方体插值空间中所属的立方体,所述立方体中被划分为6个四面体;确定所述LOG视频中每个像素点所属的四面体;对于对应立方体顶点的像素点,将像素值转换为经过所述LUT处理后的像素值;对于不对应立方体顶点的像素点,根据每个像素点所属的四面体进行插值,将像素值转换为经过所述LUT处理后的像素值。
- 根据权利要求1所述的视频处理方法,其特征在于,在所述基于所确定的视频风格模板对应的LUT对所述LOG视频进行处理,得到与所确定的视频风格模板对应的视频的过程之前,还包括:将所述LOG视频由RGB色彩空间的LOG视频转换为YUV色彩空间的LOG视频;对所述YUV色彩空间的LOG视频进行YUV去噪处理,得到去噪后的LOG视频。
- 根据权利要求3所述的视频处理方法,其特征在于,在所述基于所确定的视频风格模板对应的LUT对所述LOG视频进行处理,得到与所确定的视频风格模板对应的视频的过程之前,还包括:将所述去噪后的LOG视频由YUV色彩空间的LOG视频转换为RGB色彩空间的LOG视频;在所述基于所确定的视频风格模板对应的LUT对所述LOG视频进行处理,得到与所确定的视频风格模板对应的视频的过程之后,还包括:将RGB色彩空间的与所确定的视频风格模板对应的视频转换为YUV色彩空间的视频。
- 根据权利要求1所述的视频处理方法,其特征在于,在所述基于所确定的视频风格模板对应的LUT对所述LOG视频进行处理,得到与所确定的视频风格模板对应的视频的过程之前,还包括:保存所述LOG视频。
- 根据权利要求1所述的视频处理方法,其特征在于,在所述基于所确定的视频风格模板对应的LUT对所述LOG视频进行处理,得到与所确定的视频风格模板对应的视频的过程之前,还包括:将所述LOG视频转换为Rec.709色彩标准的视频;保存所述Rec.709色彩标准的视频。
- 根据权利要求1所述的视频处理方法,其特征在于,在第一视频处理流程中执行所述通过对数LOG曲线对所述通过摄像头拍摄的视频进行处理,得到LOG视频的过程、以及所述基于所确定的视频风格模板对应的LUT对所述LOG视频进行处理,得到与所确定的视频风格模板对应的视频的过程;所述视频处理方法还包括第二视频处理流程,所述第二视频处理流程包括:通过对数LOG曲线对所述通过摄像头拍摄的视频进行处理,得到LOG视频;基于所确定的视频风格模板对应的LUT对所述LOG视频进行处理,得到与所确定的视频风格模板对应的视频;所述视频处理方法还包括:将所述第一视频处理流程中与所确定的视频风格模板对应的视频进行保存;基于所述第二视频处理流程中与所确定的视频风格模板对应的视频进行预览。
- 根据权利要求2所述的视频处理方法,其特征在于,所述立方体中具有第0至第7顶点,第0顶点至第1顶点的方向为蓝色B通道的坐标轴方向,第0顶点至第4顶点的方向为红色R通道的坐标轴方向,第0顶点至第2顶点的方向为绿色G通道的坐标轴方向,第0顶点、第1顶点、第2顶点和第3顶点位于同一平面,第1顶点、第3顶点、第5顶点和第7顶点位于同一平面,第4顶点、第5顶点、第6顶点和第7顶点位于同一平面,第0顶点、第2顶点、第4顶点和第6顶点位于同一平面;第0顶点、第1顶点、第5顶点和第7顶点形成第一个四面体,第0顶点、第1顶点、第3顶点和第7顶点形成第二个四面体,第0顶点、第2顶点、第3顶点和第7顶点形成第三个四面体,第0顶点、第4顶点、第5顶点和第7顶点形成第四个四面体,第0顶点、第4顶点、第6顶点和第7顶点形成第五个四面体,第0顶点、第2顶点、第6顶点和第7顶点形成第六个四面体;所述对于不对应立方体顶点的像素点,根据每个像素点所属的四面体进行插值,将像素值转换为经过所述LUT处理后的像素值的过程包括:根据当前像素点(R,G,B)生成经过所述LUT处理后的E通道像素值VE(R,G,B),E取R、G和B;VE(R,G,B)=VE(R0,G0,B0)+(delta_valueR_E×deltaR+delta_valueG_E×deltaG+delta_valueB_E×deltaB+(step_size>>1))/(step_size);VE(R0,G0,B0)为第0顶点(R0,G0,B0)经过所述LUT处理后的E通道像素值,E取R、G和B;delta_valueR为当前像素点所属四面体对应R通道的坐标轴方向上的两个顶点经过所述LUT处理后的R通道像素值之差,delta_valueG为当前像素点所属四面体对应G通道的坐标轴方向上的两个顶点经过所述LUT处理后的G通道像素值之差,delta_valueB为当前像素点所属四面体对应B通道的坐标轴方向上的两个顶点经过所 述LUT处理后的B通道像素值之差;deltaR为当前像素点(R,G,B)中的R值与第0顶点(R0,G0,B0)中的R0值之差,deltaG为当前像素点(R,G,B)中的G值与第0顶点(R0,G0,B0)中的G0值之差,deltaB为当前像素点(R,G,B)中的B值与第0顶点(R0,G0,B0)中的B0值之差;step_size为立方体的边长,>>表示右移运算。
- 一种视频处理装置,其特征在于,包括:处理器和存储器,所述存储器用于存储至少一条指令,所述指令由所述处理器加载并执行时以实现如权利要求1至8中任意一项所述的视频处理方法。
- 一种电子设备,其特征在于,包括:摄像头;如权利要求9所述的视频处理装置。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行如权利要求1至8中任意一项所述的视频处理方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP22855021.6A EP4266674A4 (en) | 2021-08-12 | 2022-05-24 | VIDEO PROCESSING METHOD AND APPARATUS, ELECTRONIC DEVICE AND STORAGE MEDIUM |
| US18/274,326 US12401916B2 (en) | 2021-08-12 | 2022-05-24 | Video processing method and apparatus, electronic device, and storage medium |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110925075.0 | 2021-08-12 | ||
| CN202110925075.0A CN113810641B (zh) | 2021-08-12 | 2021-08-12 | 视频处理方法、装置、电子设备和存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023016035A1 true WO2023016035A1 (zh) | 2023-02-16 |
Family
ID=78942820
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/094715 Ceased WO2023016035A1 (zh) | 2021-08-12 | 2022-05-24 | 视频处理方法、装置、电子设备和存储介质 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US12401916B2 (zh) |
| EP (1) | EP4266674A4 (zh) |
| CN (1) | CN113810641B (zh) |
| WO (1) | WO2023016035A1 (zh) |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113810642B (zh) * | 2021-08-12 | 2023-02-28 | 荣耀终端有限公司 | 视频处理方法、装置、电子设备和存储介质 |
| CN113810641B (zh) * | 2021-08-12 | 2023-02-28 | 荣耀终端有限公司 | 视频处理方法、装置、电子设备和存储介质 |
| US12143732B2 (en) | 2021-12-31 | 2024-11-12 | Honor Device Co., Ltd. | Image processing method and related electronic device |
| CN115082357B (zh) * | 2022-07-20 | 2022-11-25 | 深圳思谋信息科技有限公司 | 视频去噪数据集生成方法、装置、计算机设备和存储介质 |
| CN115345949A (zh) * | 2022-08-05 | 2022-11-15 | 海宁奕斯伟集成电路设计有限公司 | 图像处理装置及方法 |
| CN116347009B (zh) * | 2023-02-24 | 2023-12-15 | 荣耀终端有限公司 | 视频生成方法及电子设备 |
| JP2025016068A (ja) * | 2023-07-21 | 2025-01-31 | キヤノン株式会社 | コンテンツ生成装置、コンテンツ生成装置の制御方法、及びプログラム |
| CN117115030A (zh) * | 2023-08-29 | 2023-11-24 | 浙江大华技术股份有限公司 | 一种图像颜色校正方法、装置、设备及介质 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104835131A (zh) * | 2015-04-20 | 2015-08-12 | 中国科学技术大学先进技术研究院 | 一种基于ic实现hdr图像生成及色调映射的方法和系统 |
| US20200007718A1 (en) * | 2018-06-29 | 2020-01-02 | Ati Technologies Ulc | Method and apparatus for nonlinear interpolation color conversion using look up tables |
| CN111510698A (zh) * | 2020-04-23 | 2020-08-07 | 惠州Tcl移动通信有限公司 | 图像处理方法、装置、存储介质及移动终端 |
| CN112530382A (zh) * | 2019-09-19 | 2021-03-19 | 华为技术有限公司 | 电子设备调整画面色彩的方法和装置 |
| CN113450440A (zh) * | 2021-06-22 | 2021-09-28 | 网易(杭州)网络有限公司 | 渲染图像的方法、装置、计算机可读存储介质和电子设备 |
| CN113810641A (zh) * | 2021-08-12 | 2021-12-17 | 荣耀终端有限公司 | 视频处理方法、装置、电子设备和存储介质 |
Family Cites Families (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6744637B2 (en) | 2001-11-30 | 2004-06-01 | Alliant Techsystems Inc. | Guided munitions electronics package and method |
| US6992707B2 (en) * | 2002-03-06 | 2006-01-31 | Hewlett-Packard Development Company, L.P. | Delayed encoding based joint video and still image pipeline with still burst mode |
| JP4304623B2 (ja) | 2005-06-01 | 2009-07-29 | ソニー株式会社 | 撮像装置及び撮像装置における撮像結果の処理方法 |
| US7675550B1 (en) * | 2006-04-28 | 2010-03-09 | Ambarella, Inc. | Camera with high-quality still capture during continuous video capture |
| JP5769768B2 (ja) * | 2013-09-03 | 2015-08-26 | オリンパス株式会社 | 撮像装置、撮像方法およびプログラム |
| CN105915816B (zh) | 2016-07-06 | 2018-12-07 | 穆德远 | 用于确定给定场景的亮度的方法和设备 |
| CN106210883A (zh) * | 2016-08-11 | 2016-12-07 | 浙江大华技术股份有限公司 | 一种视频渲染的方法、设备 |
| CN107079105B (zh) * | 2016-11-14 | 2019-04-09 | 深圳市大疆创新科技有限公司 | 图像处理方法、装置、设备及视频图传系统 |
| WO2019160194A1 (ko) * | 2018-02-14 | 2019-08-22 | 엘지전자 주식회사 | 이동 단말기 및 그 제어방법 |
| CN111147857B (zh) * | 2019-12-06 | 2023-01-20 | Oppo广东移动通信有限公司 | 一种图像处理方法、图像处理装置、电子设备和存储介质 |
| CN111476851B (zh) * | 2020-04-09 | 2023-04-25 | 广州方硅信息技术有限公司 | 图像处理方法、装置、电子设备及存储介质 |
| CN112565825B (zh) * | 2020-12-02 | 2022-05-13 | 腾讯科技(深圳)有限公司 | 一种视频数据处理方法、装置、设备以及介质 |
| CN113014803A (zh) * | 2021-02-04 | 2021-06-22 | 维沃移动通信有限公司 | 滤镜添加方法、装置及电子设备 |
-
2021
- 2021-08-12 CN CN202110925075.0A patent/CN113810641B/zh active Active
-
2022
- 2022-05-24 WO PCT/CN2022/094715 patent/WO2023016035A1/zh not_active Ceased
- 2022-05-24 EP EP22855021.6A patent/EP4266674A4/en active Pending
- 2022-05-24 US US18/274,326 patent/US12401916B2/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104835131A (zh) * | 2015-04-20 | 2015-08-12 | 中国科学技术大学先进技术研究院 | 一种基于ic实现hdr图像生成及色调映射的方法和系统 |
| US20200007718A1 (en) * | 2018-06-29 | 2020-01-02 | Ati Technologies Ulc | Method and apparatus for nonlinear interpolation color conversion using look up tables |
| CN112530382A (zh) * | 2019-09-19 | 2021-03-19 | 华为技术有限公司 | 电子设备调整画面色彩的方法和装置 |
| CN111510698A (zh) * | 2020-04-23 | 2020-08-07 | 惠州Tcl移动通信有限公司 | 图像处理方法、装置、存储介质及移动终端 |
| CN113450440A (zh) * | 2021-06-22 | 2021-09-28 | 网易(杭州)网络有限公司 | 渲染图像的方法、装置、计算机可读存储介质和电子设备 |
| CN113810641A (zh) * | 2021-08-12 | 2021-12-17 | 荣耀终端有限公司 | 视频处理方法、装置、电子设备和存储介质 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4266674A4 |
Also Published As
| Publication number | Publication date |
|---|---|
| US12401916B2 (en) | 2025-08-26 |
| US20240089612A1 (en) | 2024-03-14 |
| EP4266674A4 (en) | 2024-07-17 |
| CN113810641B (zh) | 2023-02-28 |
| CN113810641A (zh) | 2021-12-17 |
| EP4266674A1 (en) | 2023-10-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN113810641B (zh) | 视频处理方法、装置、电子设备和存储介质 | |
| CN113810642B (zh) | 视频处理方法、装置、电子设备和存储介质 | |
| CN115242992B (zh) | 视频处理方法、装置、电子设备和存储介质 | |
| CN113824914B (zh) | 视频处理方法、装置、电子设备和存储介质 | |
| CN114449199B (zh) | 视频处理方法、装置、电子设备和存储介质 | |
| EP4287604B1 (en) | Video processing method and apparatus, electronic device, and storage medium | |
| EP4262192B1 (en) | Video processing method and apparatus, electronic device, and storage medium | |
| US12294787B2 (en) | Video processing method and apparatus, electronic device, and storage medium | |
| WO2023016042A1 (zh) | 视频处理方法、装置、电子设备和存储介质 | |
| CN115706764B (zh) | 视频处理方法、装置、电子设备和存储介质 | |
| US12425535B2 (en) | Video processing method and apparatus, electronic device, and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22855021 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 18274326 Country of ref document: US |
|
| ENP | Entry into the national phase |
Ref document number: 2022855021 Country of ref document: EP Effective date: 20230720 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| WWG | Wipo information: grant in national office |
Ref document number: 18274326 Country of ref document: US |
