CN117714844A - Video processing method and device - Google Patents
Video processing method and device Download PDFInfo
- Publication number
- CN117714844A CN117714844A CN202211103471.6A CN202211103471A CN117714844A CN 117714844 A CN117714844 A CN 117714844A CN 202211103471 A CN202211103471 A CN 202211103471A CN 117714844 A CN117714844 A CN 117714844A
- Authority
- CN
- China
- Prior art keywords
- image
- video
- images
- processing
- scene
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 21
- 238000012545 processing Methods 0.000 claims abstract description 183
- 238000000034 method Methods 0.000 claims abstract description 69
- 238000004891 communication Methods 0.000 claims description 11
- 230000000694 effects Effects 0.000 description 13
- 238000001514 detection method Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 5
- 238000012937 correction Methods 0.000 description 4
- 230000003190 augmentative effect Effects 0.000 description 2
- 238000005282 brightening Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
- 238000011946 reduction process Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Landscapes
- Studio Devices (AREA)
Abstract
The embodiment of the application provides a video processing method and a video processing device, which belong to the technical field of image processing, and the method comprises the steps of playing a first video; the first video includes: the method comprises the steps of generating a preview video before video recording or a generated recorded video in the video recording process, wherein the first video is determined based on N first images, and N is a positive integer greater than 1; under the condition that M second images are acquired, determining second videos corresponding to the M second images based on image information corresponding to the second images; m second images are continuous images, the image information corresponding to the second images is different from the image information corresponding to the first images, and M is a positive integer greater than 1; and switching the currently played video from the first video to the second video.
Description
Technical Field
The application belongs to the technical field of image processing, and particularly relates to a video processing method and device.
Background
With the development of electronic technology, more and more users use electronic devices to capture video. The electronic device is provided with different shooting modes for shooting video in different scenes. For example, in the case where the shooting scene is a dark environment, the night scene mode of the electronic device may be used to perform video shooting, so as to avoid losing image details due to too low brightness.
In the process of shooting video by using the electronic equipment, synchronously playing the shot video. If the shooting scene is changed, the electronic device needs to switch the shooting mode to play the video under different shooting scenes, however, there is often delay in the switching process of the shooting mode, which easily causes poor display effect of the shot video.
Disclosure of Invention
The embodiment of the application aims to provide a video processing method and device, which can solve the problem of poor display effect of a shot video.
In a first aspect, an embodiment of the present application provides a video processing method, including:
playing the first video; the first video includes: the method comprises the steps that a preview video generated before video recording or a recorded video generated in the video recording process is recorded, wherein the first video is determined based on N first images, and N is a positive integer greater than 1;
under the condition that M second images are acquired, determining second videos corresponding to the M second images based on image information corresponding to the second images; the M second images are continuous images, the image information corresponding to the second images is different from the image information corresponding to the first images, and M is a positive integer greater than 1;
And switching the currently played video from the first video to the second video.
In a second aspect, an embodiment of the present application provides a video processing apparatus, including:
the first playing module is used for playing the first video; the first video includes: the method comprises the steps that a preview video generated before video recording or a recorded video generated in the video recording process is recorded, wherein the first video is determined based on N first images, and N is a positive integer greater than 1;
the first processing module is used for determining second videos corresponding to the M second images based on image information corresponding to the second images under the condition that the M second images are acquired; the M second images are continuous images, the image information corresponding to the second images is different from the image information corresponding to the first images, and M is a positive integer greater than 1;
and the switching module is used for switching the currently played video from the first video to the second video.
In a third aspect, an embodiment of the present application provides a video processing system, where the system includes a camera module, a first image processing chip and a second image processing chip, where the first image processing chip is communicatively connected to the camera module, the first image processing chip is communicatively connected to the second image processing chip, and the second image processing chip is communicatively connected to the display module;
The display module is used for playing the first video; the first video includes: the method comprises the steps that a preview video generated before video recording or a recorded video generated in the video recording process is recorded, wherein the first video is determined based on N first images, and N is a positive integer greater than 1;
the camera module is used for acquiring M second images and sending the M second images to the first image processing chip and the first image processing chip;
the first image processing chip and the first image processing chip are used for determining second videos corresponding to M second images based on image information corresponding to the second images when the M second images are acquired; the M second images are continuous images, the image information corresponding to the second images is different from the image information corresponding to the first images, and M is a positive integer greater than 1;
and the display module is also used for switching the currently played video from the first video to the second video.
In a fourth aspect, embodiments of the present application provide an electronic device comprising a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction implementing the steps of the method according to the first aspect when executed by the processor.
In a fifth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which when executed by a processor implement the steps of the method according to the first aspect.
In a sixth aspect, embodiments of the present application provide a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and where the processor is configured to execute a program or instructions to implement a method according to the first aspect.
In a seventh aspect, embodiments of the present application provide a computer program product stored in a storage medium, the program product being executable by at least one processor to implement the method according to the first aspect.
In the embodiment of the application, in the process of playing the first video determined based on the N first images, if the M second images are acquired, the second videos corresponding to the M second images are determined based on the image information corresponding to the second images, wherein the image information corresponding to the first images is different from the image information corresponding to the second images, and then the currently played video is switched from the first video to the second video, so that seamless switching between the first video and the second video corresponding to different image information is realized, delay in the switching process between the videos of different image information is avoided, and the display effect of the video is improved.
Drawings
Fig. 1 is a schematic structural diagram of a video processing system according to an embodiment of the present application;
fig. 2 is a flowchart of a video processing method provided in an embodiment of the present application;
fig. 3 is one of data flow diagrams of a video processing method according to an embodiment of the present application;
FIG. 4 is a second data flow diagram of a video processing method according to an embodiment of the present disclosure;
fig. 5 is a block diagram of a video processing apparatus provided in an embodiment of the present application;
fig. 6 is a block diagram of an electronic device provided in an embodiment of the present application;
fig. 7 is a hardware configuration diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application are within the scope of the protection of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type and not limited to the number of objects, e.g., the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
In the related art, in the process of capturing video using an electronic device, captured video is played synchronously. The video played can be a preview video generated before the video is recorded or a recorded video generated in the process of recording the video. For example, after the user turns on the camera, the electronic device display interface displays the video shot by the camera, and the video can be defined as a preview video generated before the video is recorded; after the user presses the "record" button in the camera interface, video recording is performed, and the video displayed on the display interface in this case can be defined as the recorded video that has been generated during the recording of the video.
When the shooting scene of the electronic equipment changes, the electronic equipment needs to switch the shooting mode so as to play videos in different shooting scenes. For example: in the case that the shooting scene changes from a bright environment to a dark environment, the shooting mode of the electronic device needs to be switched to a night scene mode for video shooting, so that image details are prevented from being lost due to too low brightness.
However, there is often a delay in the switching process of the shooting mode, which easily results in poor display effect of the shot video.
In order to solve the above-mentioned technical problems, an embodiment of the present application provides a video processing method, which is applied to a video processing system, referring to fig. 1, where the video processing system includes a camera module, a first image processing chip and a second image processing chip, the first image processing chip is communicatively connected to the camera module, the first image processing chip is communicatively connected to the second image processing chip, and the second image processing chip is communicatively connected to a display module;
the display module is used for playing the first video; the first video includes: the method comprises the steps that a preview video generated before video recording or a recorded video generated in the video recording process is recorded, wherein the first video is determined based on N first images, and N is a positive integer greater than 1;
the camera module is used for acquiring M second images and sending the M second images to the first image processing chip and the first image processing chip;
the first image processing chip and the first image processing chip are used for determining second videos corresponding to M second images based on image information corresponding to the second images when the M second images are acquired; the M second images are continuous images, the image information corresponding to the second images is different from the image information corresponding to the first images, and M is a positive integer greater than 1;
And the display module is also used for switching the currently played video from the first video to the second video.
As shown in fig. 1, the first image processing chip includes an image signal processing (Image Signal Processing, ISP) module, a detection module, and a transmission module.
The above ISP module is used for performing ISP processing on the image, including but not limited to lens correction processing, dead pixel correction processing, color interpolation, white balance, and noise reduction processing.
The detection module is used for acquiring image information of an image, wherein the image information comprises, but is not limited to, color temperature and brightness.
The transmission module is used for sending the image information acquired by the detection module to the image signal processing module and the second image processing chip. In an alternative embodiment, the detection module may integrate the function of the transmission module, i.e. the detection module sends the detected image information directly to the image signal processing module or the second image processing chip.
Optionally, the second image processing chip includes 4 preset processing modes, namely a sleep (bypass) mode, a high dynamic range (High Dynamic Range, HDR) mode, a Night Shot (NS) mode, and a super Night Shot (super NS) mode. Under the condition that the shooting scene is a bright environment, the second image processing chip is in a dormant mode, and does not process images; under the condition that the shooting environment is a backlight environment, the second image processing chip is in an HDR mode, and high dynamic range processing is carried out on the image; under the condition that the shooting environment is a dark environment, the second image processing chip is in an NS mode, and the image is subjected to brightening operation; and under the condition that the shooting environment is extremely dark, the second image processing chip is in a super NS mode, and the image is subjected to the brightening operation. For specific embodiments, please refer to the following examples.
The embodiment of the application provides a video processing system, which can realize each process realized by the subsequent method embodiment and can achieve the same technical effect, and in order to avoid repetition, the description is omitted here.
The video processing method provided by the embodiment of the application is described in detail below by means of specific embodiments and application scenes thereof with reference to the accompanying drawings.
Referring to fig. 2, fig. 2 is a flowchart of a video processing method according to an embodiment of the present application. The video processing method provided by the embodiment of the application comprises the following steps:
s201, playing the first video.
As described above, the first video includes a preview video generated before recording the video or a recorded video generated during recording the video, and the first video is determined based on N first images, where N is a positive integer greater than 1.
Optionally, the display module plays the acquired first video.
S202, when M second images are acquired, determining second videos corresponding to the M second images based on image information corresponding to the second images.
Optionally, the second images are images shot by the camera module, the M second images are continuous images, and M is a positive integer greater than 1. The image information corresponding to the second image is different from the image information corresponding to the first image, so that whether the first image or the second image is acquired is distinguished.
In this step, when M consecutive second images are acquired, second videos corresponding to the M second images are determined based on image information corresponding to the second images, and for a specific embodiment, please refer to the following examples.
And S203, switching the currently played video from the first video to the second video.
In this step, after the second video is obtained, the display module switches the currently played video from the first video to the second video.
In the embodiment of the application, in the process of playing the first video determined based on the N first images, if the M second images are acquired, the second videos corresponding to the M second images are determined based on the image information corresponding to the second images, wherein the image information corresponding to the first images is different from the image information corresponding to the second images, and then the currently played video is switched from the first video to the second video, so that seamless switching between the first video and the second video corresponding to different image information is realized, delay in the switching process between the videos of different image information is avoided, and the display effect of the video is improved.
Optionally, the determining, based on the image information corresponding to the second images, the second videos corresponding to the M second images includes:
Determining a shooting scene corresponding to the second image according to the image information corresponding to the second image;
processing the second image by using a preset processing mode associated with the shooting scene to obtain M target images;
the second video is generated based on the M target images.
In this embodiment, according to the image information of the second image, a shooting scene corresponding to the second image, that is, an environment where the electronic device is located when the second image is shot, may be determined. The shooting scene includes, but is not limited to, a bright environment, a backlit environment, a dark environment, and an extremely dark environment.
And for any one of the second images, after determining a shooting scene corresponding to the second image, processing the second image by using a preset processing mode associated with the shooting scene, so as to obtain M target images, wherein the M target images are in one-to-one correspondence with the M second images.
In this embodiment, optionally, the M target images are ordered according to the sequence of the shooting times corresponding to each target image, so as to generate the second video. Optionally, a custom number may be further performed for each target image, and the M target images are ordered according to the number order, so as to generate the second video.
Optionally, the determining, according to the image information corresponding to the second image, the shooting scene corresponding to the second image includes:
determining a shooting scene corresponding to the second image as a first scene under the condition that the brightness value corresponding to the second image is smaller than or equal to a preset first brightness value and larger than or equal to a preset second brightness value;
determining that a shooting scene corresponding to the second image is a second scene under the condition that the brightness value corresponding to the second image is smaller than a preset second brightness value;
determining a shooting scene corresponding to the second image as a third scene under the condition that the highlight ratio corresponding to the second image is larger than or equal to a preset threshold value;
and determining the shooting scene corresponding to the second image as a fourth scene under the condition that the brightness value corresponding to the second image is in a preset brightness value interval.
As described above, the image information includes the luminance value of the image. In this embodiment, a first luminance value and a second luminance value are preset, where the second luminance value is smaller than the first luminance value.
And when the brightness value corresponding to the second image is smaller than or equal to the first brightness value and is larger than or equal to the second brightness value, the brightness of the second image is dark, and the shooting scene is determined to be a dark environment, namely the shooting scene is determined to be a first scene.
And under the condition that the brightness value corresponding to the second image is smaller than the second brightness value, the brightness of the second image is very dark, and the shooting scene is determined to be an extremely dark environment, namely the shooting scene is determined to be the second scene.
And under the condition that the highlight ratio corresponding to the second image is larger than or equal to a preset threshold value, determining that the shooting scene is a backlight environment, namely the shooting scene is a third scene, if the highlight part of the second image occupies a larger area.
And under the condition that the brightness value corresponding to the second image is in the preset brightness value interval, the brightness of the second image is normal, and the shooting scene is determined to be a bright environment, namely the shooting scene is determined to be a fourth scene.
In other embodiments, the shooting scene corresponding to the second image may be determined according to the color temperature information corresponding to the second image, and the specific embodiment is consistent with the above determination of the shooting scene corresponding to the second image according to the brightness information, which is not repeated herein.
Optionally, the processing the second image using a preset processing manner associated with the shooting scene includes:
performing image signal processing ISP and noise reduction processing on the second image under the condition that a shooting scene is the first scene;
Performing image signal processing ISP, brightness enhancement processing and noise reduction processing on the second image under the condition that the shooting scene is the second scene;
performing image signal processing ISP and high dynamic range image processing on the second image under the condition that a shooting scene is the third scene;
and when the shooting scene is the fourth scene, performing image signal processing ISP on the second image.
In this embodiment, when the shooting scene is the first scene, that is, when the shooting scene is a dark environment, ISP processing and noise reduction processing are performed on the second image, so that noise generated by the insufficient light incoming amount of the second image is eliminated.
When the shooting scene is a second scene, that is, when the shooting scene is in an extremely dark environment, ISP processing, brightness enhancement processing and noise reduction processing are performed on the second image, so that the exposure of the second image is improved, and noise generated by insufficient light entering quantity and brightness enhancement processing of the second image is eliminated.
And under the condition that the shooting scene is a third scene, namely when the shooting scene is a backlight environment, performing high dynamic range image processing on the second image, and realizing the preservation of the dynamic range through multi-frame synthesis so as to compensate the image details lost by overexposure of the second image.
When the shooting scene is the fourth scene, that is, when the shooting scene is a bright light environment, only the second image is subjected to ISP processing.
In this embodiment, different processing operations are performed on the second image based on the shooting scene corresponding to the second image, so as to improve the display effect of the second image.
For easy understanding of the overall technical solution of the above embodiment, please refer to fig. 3, and the arrows shown in fig. 3 indicate the flow direction of the image data in the video processing system.
As shown in fig. 3, the image data may be image data included in a preview video or image data included in a recorded video. The image pickup module sends image data to a detection module and an image signal processing module in the first image processing chip, wherein the detection module is used for acquiring image information corresponding to the image data and sending the image information to the image signal processing module and the second image processing chip through the transmission module. The image signal processing module is used for performing image signal processing on the image data and sending the processed image data to the second image processing chip. And the second image processing chip processes the image data sent by the image signal processing module according to the received image information by using a preset processing mode corresponding to the image information, and sends the processed image data to the display module.
Optionally, before the playing the first video, the method further includes:
k preview images are acquired, wherein K is a positive integer greater than 1;
according to the image information corresponding to the preview images, performing image signal processing ISP on the K preview images to obtain preview videos;
and playing the preview video.
In this embodiment, the first video is a generated recorded video in the process of recording the video. Before the first video is played, a preview video is played, and how to play the preview video is described in detail below.
K preview images are acquired, wherein the preview images can be images acquired by an image capturing module, and K is a positive integer greater than 1. And acquiring image information corresponding to the preview images, and performing ISP processing on the K preview images based on the image information to obtain preview videos. As described above, the ISP processing includes, but is not limited to, the lens correction processing, the dead pixel correction processing, the color interpolation, the white balance, and the noise reduction processing, and it is possible to determine what processing is performed on the preview image from the image information corresponding to the preview image. After determining the preview video, the preview video is played.
For ease of understanding, referring to fig. 4, arrows shown in fig. 4 represent the flow of image data in the video processing system.
As shown in fig. 4, the data stream of the image data included in the recorded video in the video processing system is from the camera module to the first image processing chip to the second image processing chip, and the processing manner of the video processing system for the image data is identical to the processing manner of the video processing system for the image data in fig. 3, which is not repeated herein.
For image data included in the preview video, the camera shooting module sends the image data to a detection module and an image signal processing module in the first image processing chip, the detection module is used for acquiring image information corresponding to the image data and sending the image information to the image signal processing module through the transmission module, and the image signal processing module carries out image signal processing on the image data and sends the processed image data to the display module to obtain the preview video.
In this embodiment, for the image data included in the preview video, only the first image processing chip is used to process the image data, and the second image processing chip only needs to process the image data included in the recorded video, so that the power consumption of the second image processing chip is reduced.
The video processing device provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings by means of specific embodiments and application scenarios thereof.
As shown in fig. 5, the training apparatus 500 of the video processing model includes:
a first playing module 501, configured to play a first video; the first video includes: the method comprises the steps that a preview video generated before video recording or a recorded video generated in the video recording process is recorded, wherein the first video is determined based on N first images, and N is a positive integer greater than 1;
the first processing module 502 is configured to determine, when M second images are acquired, second videos corresponding to the M second images based on image information corresponding to the second images; the M second images are continuous images, the image information corresponding to the second images is different from the image information corresponding to the first images, and M is a positive integer greater than 1;
a switching module 503, configured to switch a currently played video from the first video to the second video.
Optionally, the first processing module 502 is specifically configured to:
determining a shooting scene corresponding to the second image according to the image information corresponding to the second image;
processing the second image by using a preset processing mode associated with the shooting scene to obtain M target images, wherein the M target images are in one-to-one correspondence with the M second images;
The second video is generated based on the M target images.
Optionally, the first processing module 502 is further specifically configured to:
determining that a shooting scene corresponding to the second image is a first scene when the brightness value corresponding to the second image is smaller than or equal to a preset first brightness value and larger than or equal to a preset second brightness value, wherein the second brightness value is smaller than the first brightness value;
determining that a shooting scene corresponding to the second image is a second scene under the condition that the brightness value corresponding to the second image is smaller than a preset second brightness value; determining a shooting scene corresponding to the second image as a third scene under the condition that the highlight ratio corresponding to the second image is larger than or equal to a preset threshold value;
and determining the shooting scene corresponding to the second image as a fourth scene under the condition that the brightness value corresponding to the second image is in a preset brightness value interval.
Optionally, the first processing module 502 is further specifically configured to:
performing image signal processing ISP and noise reduction processing on the second image under the condition that a shooting scene is the first scene;
performing image signal processing ISP, brightness enhancement processing and noise reduction processing on the second image under the condition that the shooting scene is the second scene;
Performing image signal processing ISP and high dynamic range image processing on the second image under the condition that a shooting scene is the third scene;
and when the shooting scene is the fourth scene, performing image signal processing ISP on the second image.
Optionally, the video processing apparatus 500 further includes:
the acquisition module is used for acquiring K preview images, wherein K is a positive integer greater than 1;
the second processing module is used for performing image signal processing ISP on the K preview images according to the image information corresponding to the preview images to obtain preview videos;
and the second playing module is used for playing the preview video.
In the embodiment of the application, in the process of playing the first video determined based on the N first images, if the M second images are acquired, the second videos corresponding to the M second images are determined based on the image information corresponding to the second images, wherein the image information corresponding to the first images is different from the image information corresponding to the second images, and then the currently played video is switched from the first video to the second video, so that seamless switching between the first video and the second video corresponding to different image information is realized, delay in the switching process between the videos of different image information is avoided, and the display effect of the video is improved.
The video processing apparatus in the embodiment of the present application may be an electronic device, or may be a component in an electronic device, for example, an integrated circuit or a chip. The electronic device may be a terminal, or may be other devices than a terminal. By way of example, the electronic device may be a mobile phone, tablet computer, notebook computer, palm computer, vehicle-mounted electronic device, mobile internet appliance (Mobile Internet Device, MID), augmented reality (augmented reality, AR)/Virtual Reality (VR) device, robot, wearable device, ultra-mobile personal computer, UMPC, netbook or personal digital assistant (personal digital assistant, PDA), etc., but may also be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular.
The video processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
The embodiments of the present application provide that the video processing apparatus can implement each process implemented by the method embodiment of fig. 2, and in order to avoid repetition, a description is omitted here.
Optionally, as shown in fig. 6, the embodiment of the present application further provides an electronic device 600, including a processor 601, a memory 602, and a program or an instruction stored in the memory 602 and capable of running on the processor 601, where the program or the instruction implements each process of the embodiment of the video processing method when executed by the processor 601, and the process can achieve the same technical effect, so that repetition is avoided, and no further description is given here.
The electronic device in the embodiment of the application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 7 is a schematic hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 700 includes, but is not limited to: radio frequency unit 701, network module 702, audio output unit 703, input unit 704, sensor 705, display unit 706, user input unit 707, interface unit 708, memory 709, and processor 710.
Those skilled in the art will appreciate that the electronic device 700 may also include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 710 via a power management system so as to perform functions such as managing charge, discharge, and power consumption via the power management system. The electronic device structure shown in fig. 7 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
Wherein, the display unit 706 is configured to play the first video;
a processor 710, configured to determine, when M second images are acquired, second videos corresponding to the M second images based on image information corresponding to the second images;
the display unit 706 is further configured to switch the currently played video from the first video to the second video.
The processor 710 is further configured to determine a shooting scene corresponding to the second image according to image information corresponding to the second image;
processing the second image by using a preset processing mode associated with the shooting scene to obtain M target images;
the second video is generated based on the M target images.
The processor 710 is further configured to determine that a shooting scene corresponding to the second image is a first scene when the luminance value corresponding to the second image is less than or equal to a preset first luminance value and greater than or equal to a preset second luminance value;
determining that a shooting scene corresponding to the second image is a second scene under the condition that the brightness value corresponding to the second image is smaller than a second brightness value;
determining a shooting scene corresponding to the second image as a third scene under the condition that the highlight ratio corresponding to the second image is larger than or equal to a preset threshold value;
And determining the shooting scene corresponding to the second image as a fourth scene under the condition that the brightness value corresponding to the second image is in a preset brightness value interval.
The processor 710 is further configured to perform an image signal processing ISP and a noise reduction process on the second image when the shooting scene is the first scene;
performing image signal processing ISP, brightness enhancement processing and noise reduction processing on the second image under the condition that the shooting scene is the second scene;
performing image signal processing ISP and high dynamic range image processing on the second image under the condition that a shooting scene is the third scene;
and when the shooting scene is the fourth scene, performing image signal processing ISP on the second image.
An input unit 704, configured to obtain K preview images, where K is a positive integer greater than 1;
the processor 710 is further configured to perform image signal processing ISP on the K preview images according to the image information corresponding to the preview images, so as to obtain a preview video;
the display unit 706 is further configured to play the preview video.
In the embodiment of the application, in the process of playing the first video determined based on the N first images, if the M second images are acquired, the second videos corresponding to the M second images are determined based on the image information corresponding to the second images, wherein the image information corresponding to the first images is different from the image information corresponding to the second images, and then the currently played video is switched from the first video to the second video, so that seamless switching between the first video and the second video corresponding to different image information is realized, delay in the switching process between the videos of different image information is avoided, and the display effect of the video is improved.
It should be appreciated that in embodiments of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, with the graphics processor 7041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 707 includes at least one of a touch panel 7071 and other input devices 7072. The touch panel 7071 is also referred to as a touch screen. The touch panel 7071 may include two parts, a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
The memory 709 may be used to store software programs as well as various data. The memory 709 may mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area may store an operating system, application programs or instructions (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory 709 may include volatile memory or nonvolatile memory, or the memory 709 may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM), static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (ddr SDRAM), enhanced SDRAM (Enhanced SDRAM), synchronous DRAM (SLDRAM), and Direct RAM (DRRAM). Memory 709 in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
Processor 710 may include one or more processing units; optionally, processor 710 integrates an application processor that primarily processes operations involving an operating system, user interface, application programs, and the like, and a modem processor that primarily processes wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor 710.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored, and when the program or the instruction is executed by a processor, the program or the instruction realizes each process of the embodiment of the video processing method, and the same technical effect can be achieved, so that repetition is avoided, and no redundant description is provided herein.
Wherein the processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium such as a computer Read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disk, etc.
The embodiment of the application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled with the processor, and the processor is used for running a program or an instruction, so as to implement each process of the embodiment of the video processing method, and achieve the same technical effect, so that repetition is avoided, and no redundant description is provided here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
The embodiments of the present application provide a computer program product stored in a storage medium, where the program product is executed by at least one processor to implement the respective processes of the embodiments of the video processing method, and achieve the same technical effects, and are not repeated herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solutions of the present application may be embodied essentially or in a part contributing to the prior art in the form of a computer software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the methods described in the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.
Claims (14)
1. A video processing method, comprising:
playing the first video; the first video includes: the method comprises the steps that a preview video generated before video recording or a recorded video generated in the video recording process is recorded, wherein the first video is determined based on N first images, and N is a positive integer greater than 1;
under the condition that M second images are acquired, determining second videos corresponding to the M second images based on image information corresponding to the second images; the M second images are continuous images, the image information corresponding to the second images is different from the image information corresponding to the first images, and M is a positive integer greater than 1;
and switching the currently played video from the first video to the second video.
2. The method of claim 1, wherein determining the second videos corresponding to the M second images based on the image information corresponding to the second images comprises:
determining a shooting scene corresponding to the second image according to the image information corresponding to the second image;
processing the second image by using a preset processing mode associated with the shooting scene to obtain M target images, wherein the M target images are in one-to-one correspondence with the M second images;
The second video is generated based on the M target images.
3. The method of claim 2, wherein the determining the shooting scene corresponding to the second image according to the image information corresponding to the second image comprises:
determining that a shooting scene corresponding to the second image is a first scene when the brightness value corresponding to the second image is smaller than or equal to a preset first brightness value and larger than or equal to a preset second brightness value, wherein the second brightness value is smaller than the first brightness value;
determining that a shooting scene corresponding to the second image is a second scene under the condition that the brightness value corresponding to the second image is smaller than a preset second brightness value; determining a shooting scene corresponding to the second image as a third scene under the condition that the highlight ratio corresponding to the second image is larger than or equal to a preset threshold value;
and determining the shooting scene corresponding to the second image as a fourth scene under the condition that the brightness value corresponding to the second image is in a preset brightness value interval.
4. The method of claim 3, wherein processing the second image using a preset processing means associated with the photographed scene comprises:
Performing image signal processing ISP and noise reduction processing on the second image under the condition that a shooting scene is the first scene;
performing image signal processing ISP, brightness enhancement processing and noise reduction processing on the second image under the condition that the shooting scene is the second scene;
performing image signal processing ISP and high dynamic range image processing on the second image under the condition that a shooting scene is the third scene;
and when the shooting scene is the fourth scene, performing image signal processing ISP on the second image.
5. The method of any of claims 1-4, wherein the first video is a recorded video that has been generated during the recording of the video, the method further comprising, prior to the playing of the first video:
k preview images are acquired, wherein K is a positive integer greater than 1;
according to the image information corresponding to the preview images, performing image signal processing ISP on the K preview images to obtain preview videos;
and playing the preview video.
6. A video processing apparatus, comprising:
the first playing module is used for playing the first video; the first video includes: the method comprises the steps that a preview video generated before video recording or a recorded video generated in the video recording process is recorded, wherein the first video is determined based on N first images, and N is a positive integer greater than 1;
The first processing module is used for determining second videos corresponding to the M second images based on image information corresponding to the second images under the condition that the M second images are acquired; the M second images are continuous images, the image information corresponding to the second images is different from the image information corresponding to the first images, and M is a positive integer greater than 1;
and the switching module is used for switching the currently played video from the first video to the second video.
7. The apparatus of claim 6, wherein the first processing module is specifically configured to:
determining a shooting scene corresponding to the second image according to the image information corresponding to the second image;
processing the second image by using a preset processing mode associated with the shooting scene to obtain M target images, wherein the M target images are in one-to-one correspondence with the M second images;
the second video is generated based on the M target images.
8. The apparatus of claim 7, wherein the first processing module is further specifically configured to:
determining that a shooting scene corresponding to the second image is a first scene when the brightness value corresponding to the second image is smaller than or equal to a preset first brightness value and larger than or equal to a preset second brightness value, wherein the second brightness value is smaller than the first brightness value;
Determining that a shooting scene corresponding to the second image is a second scene under the condition that the brightness value corresponding to the second image is smaller than a preset second brightness value; determining a shooting scene corresponding to the second image as a third scene under the condition that the highlight ratio corresponding to the second image is larger than or equal to a preset threshold value;
and determining the shooting scene corresponding to the second image as a fourth scene under the condition that the brightness value corresponding to the second image is in a preset brightness value interval.
9. The apparatus of claim 8, wherein the first processing module is further specifically configured to:
performing image signal processing ISP and noise reduction processing on the second image under the condition that a shooting scene is the first scene;
performing image signal processing ISP, brightness enhancement processing and noise reduction processing on the second image under the condition that the shooting scene is the second scene;
performing image signal processing ISP and high dynamic range image processing on the second image under the condition that a shooting scene is the third scene;
and when the shooting scene is the fourth scene, performing image signal processing ISP on the second image.
10. The apparatus of any of claims 6-9, wherein the first video is a generated recorded video in a recorded video process, the apparatus further comprising:
the acquisition module is used for acquiring K preview images, wherein K is a positive integer greater than 1;
the second processing module is used for performing image signal processing ISP on the K preview images according to the image information corresponding to the preview images to obtain preview videos;
and the second playing module is used for playing the preview video.
11. The video processing system is characterized by comprising a camera module, a first image processing chip and a second image processing chip, wherein the first image processing chip is in communication connection with the camera module, the first image processing chip is in communication connection with the second image processing chip, and the second image processing chip is in communication connection with a display module;
the display module is used for playing the first video; the first video includes: the method comprises the steps that a preview video generated before video recording or a recorded video generated in the video recording process is recorded, wherein the first video is determined based on N first images, and N is a positive integer greater than 1;
the camera module is used for acquiring M second images and sending the M second images to the first image processing chip and the first image processing chip;
The first image processing chip and the first image processing chip are used for determining second videos corresponding to M second images based on image information corresponding to the second images when the M second images are acquired; the M second images are continuous images, the image information corresponding to the second images is different from the image information corresponding to the first images, and M is a positive integer greater than 1;
and the display module is also used for switching the currently played video from the first video to the second video.
12. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the video processing method of any of claims 1-5.
13. A readable storage medium, characterized in that the readable storage medium has stored thereon a program or instructions which, when executed by a processor, implement the steps of the video processing method according to any of claims 1-5.
14. An image processing chip, characterized in that the processor chip comprises a processor and a communication interface, the communication interface being coupled to the processor, the communication interface being for transmitting image data, the processor being for running a program or instructions for implementing the steps of the video processing method according to any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211103471.6A CN117714844A (en) | 2022-09-09 | 2022-09-09 | Video processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211103471.6A CN117714844A (en) | 2022-09-09 | 2022-09-09 | Video processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117714844A true CN117714844A (en) | 2024-03-15 |
Family
ID=90148535
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211103471.6A Pending CN117714844A (en) | 2022-09-09 | 2022-09-09 | Video processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117714844A (en) |
-
2022
- 2022-09-09 CN CN202211103471.6A patent/CN117714844A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113873161B (en) | Shooting method and device and electronic equipment | |
US9813613B2 (en) | Method and apparatus for capturing image in portable terminal | |
CN108513069B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN114422692B (en) | Video recording method and device and electronic equipment | |
WO2023160496A1 (en) | Photographing method, photographing apparatus, electronic device and readable storage medium | |
KR20230133970A (en) | Photography methods, devices and electronics | |
WO2019179242A1 (en) | Image processing method and electronic device | |
CN115278047A (en) | Shooting method, shooting device, electronic equipment and storage medium | |
CN113891018A (en) | Shooting method and device and electronic equipment | |
CN115514860A (en) | Dynamic frame rate compensation method, image processing circuit and electronic device | |
CN115665562A (en) | Image processing method, circuit, device and medium | |
CN115439386A (en) | Image fusion method and device, electronic equipment and storage medium | |
CN117714844A (en) | Video processing method and device | |
CN114299014A (en) | Image processing architecture, method, electronic device and storage medium | |
CN111263079B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN114302026B (en) | Noise reduction method, device, electronic equipment and readable storage medium | |
CN114827477B (en) | Method, device, electronic equipment and medium for time-lapse photography | |
CN114302057B (en) | Image parameter determining method, device, electronic equipment and storage medium | |
CN112367470B (en) | Image processing method and device and electronic equipment | |
CN116017146A (en) | Image processing method and device | |
CN116419044A (en) | Media data processing unit, method and electronic equipment | |
CN117793513A (en) | Video processing method and device | |
CN115278046A (en) | Shooting method and device, electronic equipment and storage medium | |
CN117278687A (en) | Image processing method and device | |
CN115797160A (en) | Image generation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |