Image processing method, apparatus, device, and medium
By acquiring reference frame image parameters and candidate video stream frame image parameters from multi-camera devices, image effect adjustments are made, resolving the issue of inconsistent image effects across multi-camera devices, achieving smooth transitions between video streams, and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING X RING TECHNOLOGY CO LTD
- Filing Date
- 2024-11-06
- Publication Date
- 2026-06-05
AI Technical Summary
In multi-camera devices, the image quality varies among the cameras during image acquisition, resulting in inconsistent image quality and affecting the user's viewing experience.
By obtaining the parameters of the reference frame image and combining them with the frame images of the candidate video stream, the image effect adjustment parameters of each frame image are calculated, and the image effect is adjusted to achieve a smooth transition.
It reduces differences in image quality, optimizes the adjustment methods between video streams, and improves the user experience.
Smart Images

Figure CN119521020B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to an image processing method, apparatus, device, and medium. Background Technology
[0002] With the development of technology, multi-camera devices are playing an increasingly important role in people's daily work and life. However, during the image acquisition process using multi-camera devices, the differences in imaging quality between the various cameras can lead to variations in the images captured by each camera.
[0003] In this scenario, when it is necessary to switch between and view images captured by multiple cameras, the different image effects can have a certain impact on the user's viewing experience. Summary of the Invention
[0004] This disclosure aims to at least partially address one of the technical problems in the related art.
[0005] Therefore, the first aspect of this disclosure proposes an image processing method.
[0006] The second aspect of this disclosure provides an image processing apparatus.
[0007] The third aspect of this disclosure proposes an electronic device.
[0008] The fourth aspect of this disclosure provides for a computer-readable storage medium.
[0009] The fifth aspect of this disclosure proposes a chip.
[0010] This disclosure firstly proposes an image processing method, the method comprising: acquiring a first reference frame image and a first action parameter of the first reference frame image, wherein the first action parameter is used to characterize the image effect of the reference frame image; acquiring a first frame image set of a candidate video stream, and acquiring a second reference frame image of each first frame image in the first frame image set, wherein each first frame image in the first frame image set is an image to be displayed; obtaining a second action parameter of each second reference frame image based on the first action parameter, wherein the second action parameter of each second reference frame image is different; obtaining an image effect adjustment parameter of each first frame image based on a third action parameter of each first frame image and the second action parameter of each second reference frame image, wherein the image effect adjustment parameter of each first frame image is different; and adjusting the image effect of each first frame image based on the image effect adjustment parameter to obtain each second frame image, thereby obtaining a target video stream corresponding to the candidate video stream.
[0011] A second aspect of this disclosure provides an image processing apparatus, comprising: a first acquisition module for acquiring a first reference frame image and a first action parameter of the first reference frame image, wherein the first action parameter characterizes the image effect of the reference frame image; a second acquisition module for acquiring a first frame image set of a candidate video stream and acquiring a second reference frame image of each first frame image in the first frame image set, wherein each first frame image in the first frame image set is an image to be displayed; a third acquisition module for obtaining a second action parameter of each second reference frame image based on the first action parameter, wherein the second action parameter of each second reference frame image is different; a fourth acquisition module for obtaining an image effect adjustment parameter of each first frame image based on the third action parameter of each first frame image and the second action parameter of each second reference frame image, wherein the image effect adjustment parameter of each first frame image is different; and an adjustment module for adjusting the image effect of each first frame image based on the image effect adjustment parameter to obtain each second frame image, thereby obtaining a target video stream corresponding to the candidate video stream.
[0012] A third aspect of this disclosure provides an electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute instructions to implement the image processing method as described in the first aspect above.
[0013] This fourth aspect of the disclosure provides a computer-readable storage medium that, when executed by a processor of an electronic device, enables the electronic device to perform the image processing method as described in the first aspect above.
[0014] The fifth aspect of this disclosure provides a chip including one or more interface circuits and one or more processors; the interface circuits are used to receive signals and send the signals to the processors, the signals including computer instructions stored in a memory, which, when executed by the processors, cause the chip to perform the steps of the image processing method proposed in the first aspect of the present disclosure.
[0015] The image processing method and apparatus disclosed herein extract a first action parameter from a first reference frame image, obtain a set of first frame images of a candidate video stream and second reference frame images for each first frame image, and obtain second action parameters for each second reference frame image based on the first action parameter. A third action parameter is obtained for each first frame image, and based on the second and third action parameters, image effect adjustment parameters are obtained for each first frame image when performing image effect adjustment. Then, image effect adjustment is performed on each first frame image according to these image effect adjustment parameters to obtain each second frame image, thereby realizing image effect adjustment of the candidate video stream and obtaining the adjusted target video stream. In this disclosure, second action parameters for each second reference frame image are obtained based on first action parameters of the first reference frame image. This enables the image effect adjustment parameters obtained based on the second and third action parameters to fuse the image effect action parameters of the reference video stream to which the first reference frame image belongs with those of the candidate video stream. Consequently, each second frame image obtained based on the image effect adjustment parameters can fuse the image effect of the reference video stream to which the first reference frame image belongs with the image effect of the candidate video stream itself. Since the image effect adjustment parameters of each first frame image are different, the degree of fusion of the image effect of each adjusted second frame image with respect to the reference video stream to which the first reference frame image belongs varies. This achieves a smooth transition of the image effect of the reference video stream to which the first reference frame image belongs to the image effect of the target video stream, reduces the degree of difference between the image effects of the target video stream and the reference video stream to which the first reference frame image belongs. In scenarios where the reference video stream to which the first reference frame image belongs is switched to the target video stream, the impact of image effect differences on the user's viewing experience is reduced, the image effect adjustment method and effect between video streams are optimized, and the user experience is improved.
[0016] It should be understood that the description herein is not intended to identify key or essential features of the embodiments thereof, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0017] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which:
[0018] Figure 1 This is a schematic flowchart of an image processing method according to an embodiment of the present disclosure;
[0019] Figure 2 This is a schematic flowchart of an image processing method according to another embodiment of the present disclosure;
[0020] Figure 3 This is a schematic flowchart of an image processing method according to another embodiment of the present disclosure;
[0021] Figure 4 This is a schematic flowchart of an image processing method according to another embodiment of the present disclosure;
[0022] Figure 5 This is a schematic diagram of the structure of an image processing apparatus according to an embodiment of the present disclosure;
[0023] Figure 6 This is a block diagram of an electronic device according to an embodiment of the present disclosure. Detailed Implementation
[0024] Embodiments of this disclosure are described in detail below. Examples of these embodiments are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.
[0025] The following description, with reference to the accompanying drawings, outlines an image processing method, apparatus, device, and medium according to embodiments of this disclosure.
[0026] Figure 1 This is a schematic flowchart of an image processing method according to an embodiment of the present disclosure, as shown below. Figure 1 As shown, the method includes:
[0027] S101, obtain the first reference frame image and the first action parameter of the first reference frame image, wherein the first action parameter is used to characterize the image effect of the reference frame image.
[0028] The image processing method provided in this embodiment can be executed by a terminal, such as a mobile phone, computer, or server. Furthermore, the image processing method provided in this embodiment can be executed by a processing chip; exemplarily, the chip may include an image processing chip (ISP).
[0029] In related technologies, for terminals equipped with multiple image acquisition devices, when users are recording videos on the terminal, they may switch between multiple image acquisition devices. When the image display effects of the videos captured by the multiple image acquisition devices are different, it may affect the user's video viewing experience.
[0030] The embodiments disclosed herein can adjust the image effects of video streams acquired by multiple image acquisition devices respectively, thereby reducing the degree of difference between the video streams.
[0031] Optionally, the video stream for which image effects adjustment is required can be determined as a candidate video stream, and the frame image used as a reference when adjusting the image effects of the candidate video stream can be determined as the first reference frame image.
[0032] As an example, after the first camera captures the video stream, the system switches to the second camera to capture the video stream. The video stream captured by the first camera is defined as video stream 1, and the video stream captured by the second camera is defined as video stream 2. In this example, the image effect of the last frame of video stream 1 can be used as a reference to adjust the image effect of video stream 2, so that a smooth image effect transition can be achieved between video stream 1 and video stream 2.
[0033] In this example, video stream 2 is the candidate video stream, and the last frame of video stream 1 is the first reference frame of video stream 2.
[0034] Optionally, the image effect parameters can be extracted from the first reference frame image based on a preset method for obtaining image effect parameters, and the extracted parameters can be determined as the first effect parameters of the first reference frame image.
[0035] For example, the first action parameter can be a 3D lookup table (3D LUT) action parameter, or other action parameters that can adjust the image display effect; no specific limitation is made here.
[0036] It should be noted that the first action parameter can be understood as a corresponding parameter used to characterize the image effect of the first reference frame image. It can be understood that, based on the first action parameter, relevant information about the image effect presented when the first reference frame image is displayed can be obtained. The first action parameter may include color effect information, brightness contrast effect information, brightness effect information, and sharpness effect information of the first reference frame image, etc., without specific limitations here.
[0037] S102, obtain the first frame image set of the candidate video stream, and obtain the second reference frame image of each first frame image in the first frame image set, wherein each first frame image in the first frame image set is an image to be displayed.
[0038] In this embodiment of the disclosure, when adjusting the image effect of the candidate video stream, it is necessary to adjust each frame image included in the candidate video stream separately. In this scenario, each frame image included in the candidate video stream can be determined as a first frame image, and the image set composed of each first frame image can be determined as the first frame image set in the candidate video stream.
[0039] In this context, each first frame image in the first frame image set can be understood as an image to be displayed within the display area on the user's device.
[0040] Optionally, when adjusting the image effects of each first frame image, there is a reference image on which the image effect adjustment depends. The frame image referenced when adjusting the image effects of each first frame image can be determined as the second reference frame image of each first frame image.
[0041] The second reference frame image can be a preset frame image, or it can be obtained based on the first reference frame image, or it can be obtained based on the first frame image set of the candidate video stream. No specific limitation is made here.
[0042] S103, based on the first action parameter, obtain the second action parameter of each second reference frame image, wherein the second action parameter of each second reference frame image is different.
[0043] In this embodiment of the disclosure, the image effect adjustment of the candidate video stream can be achieved by adjusting the image effect of each first frame image. Specifically, for any first frame image, the image effect parameters of the second reference frame image corresponding to the first frame image can be extracted and determined as the second effect parameters of the second reference frame image.
[0044] Optionally, a first action parameter corresponding to the first reference frame image can be obtained, and a second action parameter of the second reference frame image of each first frame image can be obtained based on the first action parameter, so as to achieve a smooth transition from the image effect of the reference video stream to the image effect of the candidate video stream to which the first reference frame image belongs.
[0045] The first action parameter can be processed by a preset algorithm, and the second action parameter of the second reference frame image can be obtained based on the result of the algorithm processing. Alternatively, the first action parameter can be directly used as the second action parameter of the second reference frame image. No specific limitation is made here.
[0046] It should be noted that, for any first frame image, the second action parameter of the second reference frame image based on the first frame image can enable the first frame image to achieve the fusion of the image effect of the first reference frame image and the image effect of the first frame image itself after the image effect is applied.
[0047] Therefore, in order to achieve a smooth transition of the image effect from the reference video stream to the candidate video stream to the first reference frame image, the second reference frame images in the first frame image set are different. Consequently, it can be seen that there are differences in the second action parameters of each second reference frame image.
[0048] It should be noted that the image effect parameters proposed in the embodiments of this disclosure can be understood as parameters that do not change the image content after being applied and only affect the effect presented by the image. Among them, the image effect parameters can be three-dimensional lookup table (3D LUT) parameters.
[0049] As an example, the 3D LUT action parameters are normalized to between 0 and 1, and the presentation in a table of size 17×17×17×3 can be as follows:
[0050] [0,0,0,0.0625,0,0,0.125,0,0,...,1,0,0,0,0.0625,0,0.0625,0,...,1,1,0,0,0,0.0625,...1,1,1]
[0051] S104, based on the third action parameter of each first frame image and the second action parameter of each second reference frame image, obtain the image effect adjustment parameters of each first frame image, wherein the image effect adjustment parameters of each first frame image are different.
[0052] In this embodiment of the present disclosure, each first frame image in the candidate video stream has a preset initial image effect corresponding to an action parameter. For each first frame image in the set of first frame images, the action parameter corresponding to the initial image effect of each first frame image can be determined as the third action parameter of each first frame image.
[0053] The third action parameter of each first frame image can be determined based on the device parameters of the image acquisition device of the candidate video stream, or it can be determined based on the expected image display effect of each first frame image. No specific limitation is made here.
[0054] In this scenario, for any first frame image, the image effect can be adjusted based on the third action parameter of the first frame image itself and the second action parameter of the second reference frame image corresponding to the first frame image.
[0055] Specifically, the second action parameter and the third action parameter corresponding to the first frame image can be processed by a preset integration algorithm. The adjustment parameter used when adjusting the image effect of the first frame image is obtained based on the result of the algorithm processing, and the adjustment parameter is determined as the image effect adjustment parameter corresponding to the first frame image.
[0056] It should be noted that, in the embodiments of this disclosure, there are differences between the second action parameters of each first reference frame image. Therefore, it can be seen that there are differences between the image effect adjustment parameters of each first frame image obtained based on each second action parameter and the third action parameter.
[0057] S105, adjust the image effects of each first frame image based on the image effect adjustment parameters to obtain each second frame image, so as to obtain the target video stream corresponding to the candidate video stream.
[0058] In this embodiment of the present disclosure, for any first frame image, the image effect of the first frame image can be adjusted according to the image effect adjustment parameters corresponding to the first frame image, and the frame image obtained after the image effect adjustment is determined as the second frame image corresponding to the first frame image, thereby obtaining each second frame image obtained after each first frame image has undergone image effect adjustment.
[0059] Optionally, based on the image effect adjustment method in the related technology, the third function parameter of the first frame image itself can be adjusted according to the image effect adjustment parameter corresponding to any first frame image, so that the first frame image can present the corresponding image effect based on the adjusted function parameter, thereby realizing the image effect adjustment of the first frame image and obtaining the corresponding second frame image.
[0060] It should be noted that in this embodiment, the image effect adjustment parameters of each first frame image are different. Therefore, the image effects of each second frame image obtained by adjusting the image effect based on the different image effect adjustment parameters are different. This reduces the degree of fusion of the image effect of each first frame image with the reference video stream, thereby achieving a smooth transition of the image effect from the reference video stream to the candidate video stream to which the first reference frame image belongs.
[0061] In this embodiment of the disclosure, the second frame image is a frame image obtained by adjusting the image effect of the first frame image. In this scenario, for any first frame image, the image effect of the first frame image displayed in the candidate video stream can be adjusted based on the corresponding second frame image, thereby realizing the image effect adjustment processing of each first frame image in the candidate video stream.
[0062] Furthermore, the video stream after image effect adjustment is obtained and identified as the target video stream after image effect adjustment, which is then used as a candidate video stream.
[0063] The image processing method proposed in this disclosure extracts a first action parameter from a first reference frame image, obtains a set of first frame images of a candidate video stream and second reference frame images for each first frame image, and obtains a second action parameter for each second reference frame image based on the first action parameter. A third action parameter is obtained for each first frame image, and based on the second and third action parameters, image effect adjustment parameters are obtained for each first frame image when performing image effect adjustment. Then, image effect adjustment is performed on each first frame image according to these image effect adjustment parameters to obtain each second frame image, thereby realizing image effect adjustment of the candidate video stream and obtaining the adjusted target video stream. In this disclosure, second action parameters for each second reference frame image are obtained based on first action parameters of the first reference frame image. This enables the image effect adjustment parameters obtained based on the second and third action parameters to fuse the image effect action parameters of the reference video stream to which the first reference frame image belongs with those of the candidate video stream. Consequently, each second frame image obtained based on the image effect adjustment parameters can fuse the image effect of the reference video stream to which the first reference frame image belongs with the image effect of the candidate video stream itself. Since the image effect adjustment parameters of each first frame image are different, the degree of fusion of the image effect of each adjusted second frame image with respect to the reference video stream to which the first reference frame image belongs varies. This achieves a smooth transition of the image effect of the reference video stream to which the first reference frame image belongs to the image effect of the target video stream, reduces the degree of difference between the image effects of the target video stream and the reference video stream to which the first reference frame image belongs. In scenarios where the reference video stream to which the first reference frame image belongs is switched to the target video stream, the impact of image effect differences on the user's viewing experience is reduced, the image effect adjustment method and effect between video streams are optimized, and the user experience is improved.
[0064] In the above embodiments, the acquisition of the target video stream can be combined with... Figure 2 understand, Figure 2 This is a schematic flowchart of an image processing method according to another embodiment of the present disclosure, as shown below. Figure 2 As shown, the method includes:
[0065] S201, acquire the first and second cameras configured on the multi-camera terminal.
[0066] In this embodiment of the disclosure, a terminal with multiple cameras that is used daily can be defined as a multi-camera terminal. The multi-camera terminal may include mobile phones, XR devices and vehicle-mounted camera terminals, etc., without specific limitations.
[0067] In a scenario where a multi-camera terminal is equipped with two cameras, the two cameras can be designated as the first camera and the second camera, respectively.
[0068] S202, the first camera is activated to obtain a reference video stream, so as to obtain a first reference frame image in the reference video stream.
[0069] In this embodiment of the disclosure, the first camera can be set as the camera on the multi-camera terminal that performs image acquisition first. In this scenario, when the multi-camera terminal needs to perform image acquisition, the first camera can be started based on the preset start method of the first camera.
[0070] Furthermore, image acquisition is performed based on the image acquisition function configured in the first camera, and the video stream composed of the acquired multi-frame images is determined as the reference video stream acquired by the first camera.
[0071] In this scenario, the first reference frame image required for adjusting the image effect of the candidate video stream can be obtained from the reference video stream. The last frame image in the reference video stream can be determined as the first reference frame image, or any frame image in the reference video stream that meets the preset reference frame image filtering conditions can be determined as the first reference frame image. No specific limitation is made here.
[0072] S203, in response to the detection that the activation condition of the second camera has been triggered, the second camera is activated, and the system switches from the first camera to the second camera to obtain a candidate video stream.
[0073] In this embodiment of the disclosure, the camera parameters of the first camera and the second camera may be different. In this scenario, there may be differences in the image effects of the video streams captured by the first camera and the second camera.
[0074] Optionally, when the first camera is acquiring images, the second camera can be activated by triggering preset activation conditions, thereby switching from the first camera to the second camera.
[0075] Among them, the first acquisition magnification of the first camera and the second acquisition magnification of the second camera can be obtained.
[0076] In this embodiment of the disclosure, the first camera and the second camera each have an initially set shooting magnification, which can be determined as the first acquisition magnification of the first camera and the second acquisition magnification of the second camera, respectively.
[0077] Optionally, in response to the adjustment of the first acquisition magnification of the first camera to the second acquisition magnification, the activation condition for identifying the second camera is triggered.
[0078] In this embodiment of the disclosure, during the image acquisition process of the first camera, the user can adjust the image acquisition magnification of the first camera. For example, in a scenario where the first acquisition magnification is 1.0, the user can adjust the magnification from 1.0 to 0.5 according to their shooting needs.
[0079] In this scenario, the first acquisition magnification can be compared with the second acquisition magnification, and the comparison result can be used to identify whether the multi-camera terminal has triggered the activation condition of the second camera.
[0080] As an example, if the first acquisition magnification is set to 1.0 and the second acquisition magnification is set to 0.5, then when the user adjusts the first acquisition magnification of the first camera from 1.0 to 0.5, it can be determined that the activation condition of the second camera of the multi-camera terminal has been triggered.
[0081] Furthermore, when the activation condition of the second camera is detected to be triggered, the second camera can be activated based on the preset activation method, and the system can switch to image acquisition through the second camera to obtain a video stream composed of multiple frames of images acquired by the second camera, which serves as a candidate video stream.
[0082] S204, obtain the first reference frame image and the first action parameter of the first reference frame image, wherein the first action parameter is used to characterize the image effect of the reference frame image.
[0083] For detailed information on step S204, please refer to the relevant content in the above embodiments, which will not be repeated here.
[0084] S205, obtain the first frame image set of the candidate video stream, and obtain the second reference frame image of each first frame image in the first frame image set, wherein each first frame image in the first frame image set is an image to be displayed.
[0085] As one possible implementation, for the i-th first frame image to be displayed, in response to i being greater than 1, the (i-1)-th first frame image in the candidate video stream is obtained, and based on the (i-1)-th first frame image, the second reference frame image of the i-th first frame image is obtained.
[0086] In this embodiment of the disclosure, the first frame image set of the candidate video stream includes multiple first frame images, wherein the methods for determining the second reference frame images of the first frame image located at the beginning and the first frame images located at other beginning differ.
[0087] Optionally, for the i-th first frame image, when i is greater than 1, it can be determined that the position of the first frame image in the first frame image set is not the first or second. In this scenario, in order to achieve a smooth transition between the image effects of the (i-1)-th first frame image and the i-th first frame image, the second reference frame image of the i-th first frame image can be obtained based on the (i-1)-th first frame image.
[0088] In response to i being greater than 1, the (i-1)th second frame image is obtained after adjusting the image effect of the (i-1)th first frame image, and the (i-1)th second frame image is determined as the second reference image of the ith first frame image.
[0089] Optionally, the image effect adjustment parameters of the (i-1)th first frame image can be obtained, and the image effect of the (i-1)th first frame image can be adjusted according to the image effect adjustment parameters to obtain the adjusted (i-1)th second frame image. In this scenario, the (i-1)th second frame image can be determined as the second reference frame image of the ith first frame image.
[0090] Optionally, the i-th first frame image in the first frame image set may be the first frame image that is at the beginning of each first frame image. For the i-th first frame image to be displayed, in response to i equaling 1, the first reference frame image is obtained and determined as the second reference frame image of the i-th first frame image.
[0091] In this embodiment of the present disclosure, in the scenario of switching from a reference video stream to a candidate video stream, the first frame image located at the beginning of the first frame image set of the candidate video stream is the last frame image of the reference video stream. In this scenario, for the i-th first frame image where i is 1, in order to achieve a smooth transition of the image effect from the reference video stream to the candidate video stream, the last frame image of the reference video stream can be determined as the second reference frame image of the i-th first frame image.
[0092] In other words, in the scenario where the last frame of the reference video stream is determined as the first reference frame, the first reference frame is the second reference frame of the i-th first frame.
[0093] S206, based on the first action parameter, the second action parameter of each second reference frame image is obtained, wherein the second action parameter of each second reference frame image is different.
[0094] Optionally, for the i-th first frame image, in response to i equaling 1, the first action parameter of the first reference frame image is determined as the second action parameter of the second reference frame image corresponding to the i-th first frame image.
[0095] In the scenario where i is 1, the i-th first frame image is the first frame image at the top of the candidate video stream's first frame image set. In order to achieve a smooth transition of the image effect from the reference video stream to the target video stream, the image effect of the i-th first frame image at the top can be adjusted based on the image effect of the reference video stream.
[0096] In this scenario, the image effect of the i-th first frame image can be directly adjusted to the image effect of the last frame image of the reference video stream. In this scenario, the first action parameter of the first reference frame image can be determined as the image effect action parameter of the i-th first frame image located at the top, and the second action parameter of the second reference frame image corresponding to the i-th first frame image can be determined.
[0097] Optionally, in response to i being greater than 1, the fourth action parameter of the (i-1)th second frame image is obtained and used as the second action parameter of the second reference frame image corresponding to the i-th first frame image.
[0098] In scenarios where i is greater than 1, the i-th first frame image is the first frame image that is not the first one in the candidate video stream's first frame image set. In this scenario, the first reference frame image of the i-th first frame image is the i-1-th second frame image obtained by adjusting the image effects of the i-1-th first frame image.
[0099] In this scenario, the image effect parameters can be extracted from the (i-1)th second frame image, and the extracted image effect parameters can be determined as the fourth effect parameter of the (i-1)th second frame image. Furthermore, the fourth effect parameter can be determined as the parameter used when adjusting the image effect of the ith first frame image. In the scenario where the (i-1)th second frame image is the second reference frame image of the current ith first frame image, the fourth effect parameter can be determined as the second effect parameter of the second reference frame image corresponding to the ith first frame image.
[0100] S207, based on the third action parameter of each first frame image and the second action parameter of each second reference frame image, the image effect adjustment parameters of each first frame image are obtained, wherein the image effect adjustment parameters of each first frame image are different.
[0101] Optionally, for the i-th first frame image, in response to i being greater than 1, the first weighting coefficient of the second action parameter and the second weighting coefficient of the third action parameter are obtained, and the second action parameter and the third action parameter are weighted according to the first weighting coefficient and the second weighting coefficient to obtain the image effect adjustment parameters of the i-th first frame image.
[0102] In this embodiment of the disclosure, when i is greater than 1, when the image effect of the i-th first frame image is adjusted, it is necessary to achieve the fusion between the image effect of its corresponding first reference frame image and its own initial image effect. In this scenario, the second action parameter of the first reference frame image and the third action parameter corresponding to the initial image effect of the i-th first frame image itself can be used to weight the two.
[0103] Optionally, the weighting coefficient of the second action parameter can be obtained and determined as the first weighting coefficient, and the weighting coefficient of the third action parameter can be obtained and determined as the second weighting coefficient. The second action parameter and the third action parameter are weighted according to the first weighting coefficient and the second weighting coefficient, and the weighted result is determined as the image effect adjustment parameter used when adjusting the image effect of the i-th first frame image in this scene.
[0104] It should be noted that the second and third action parameters can be weighted and integrated based on the linear decay weighting strategy in related technologies, or based on the exponential decay weighting strategy in related technologies, or based on other weighting strategies that can achieve the weighted integration of the second and third action parameters. No specific limitations are made here.
[0105] As one possible implementation, the second and third action parameters can be weighted according to a preset weighting formula, as shown below:
[0106] lut′ n =(1-w n )×lut n +w n ×lut identity
[0107] In the above formula, lut′ n Lut represents parameters for adjusting image effects. n Lut represents the second active parameter. identity This indicates the third active parameter.
[0108] In this embodiment of the disclosure, the second action parameter of the first reference frame image for the first frame image where i is greater than 1 can be obtained by adjusting the image effect of the (i-1)th first frame image to obtain the image effect action parameter of the (i-1)th second frame image, or it can be obtained based on the image effect adjustment parameter corresponding to the (i-1)th first frame image before adjusting the image effect of the (i-1)th first frame image. No specific limitation is made here.
[0109] Optionally, for the i-th first frame image, in response to i equaling 1, the second action parameter of the second reference frame image corresponding to the i-th first frame image is determined as the image effect adjustment parameter of the i-th first frame image.
[0110] In this embodiment of the disclosure, for the i-th first frame image where i equals 1, in order to adjust its image effect to the image effect corresponding to the reference video stream, the second action parameter of the second reference frame image corresponding to the i-th first frame image can be directly determined as the image effect adjustment parameter of the first frame image.
[0111] S208, for any first frame image, update the third action parameter of the first frame image according to the image effect adjustment parameter to obtain the updated fifth action parameter.
[0112] As one possible implementation, for any first frame image, the image effect adjustment parameter corresponding to the first frame image can be added to and integrated with its own third action parameter to update the third action parameter of the image effect adjustment parameter, and then the parameter obtained after addition and integration is determined as the fifth action parameter of the first frame image.
[0113] As another possible implementation, for any first frame image, the third active parameter of the first frame image can be replaced and updated based on the image effect adjustment parameter corresponding to the first frame image, and the parameter obtained by adding and integrating the parameters can be determined as the fifth active parameter of the first frame image.
[0114] S209, adjust the image effect of the first frame image based on the fifth action parameter to obtain the adjusted second frame image of the first frame image.
[0115] Optionally, a method for adjusting the image effect by obtaining the image effect parameter in the relevant technology can be used, and the image effect of the first frame image to be adjusted can be adjusted based on the fifth parameter using the method, thereby obtaining the second frame image after the image effect of the first frame image is adjusted.
[0116] Optionally, the third action parameter of the first frame image to be adjusted can be replaced with the fifth action parameter, and the image effect presented by the first frame image can be adjusted based on the fifth action parameter. In this case, the relevant parameters of the image effect of the first frame image, such as the image magnification and color, can be changed according to the fifth action parameter, so as to achieve the purpose of adjusting the image effect of the first frame image and thus obtaining the adjusted second frame image.
[0117] S210, based on the second frame image of each first frame image, replace each first frame image in the candidate video stream to obtain the target video stream corresponding to the candidate video stream.
[0118] Optionally, for any first frame image, the position of the first frame image in the first frame image set of the candidate video stream can be obtained, and the second frame image obtained after adjusting the effect of the first frame image can be used to replace the first frame image at that position.
[0119] Furthermore, each first frame image in the candidate video stream is replaced based on each second frame image, thereby adjusting the image effect of the candidate video stream to obtain the adjusted target video stream.
[0120] The image processing method proposed in this disclosure obtains second action parameters for each second reference frame image based on first action parameters of a first reference frame image. This allows the image effect adjustment parameters obtained based on the second and third action parameters to fuse the image effect action parameters of the reference video stream to which the first reference frame image belongs with those of the candidate video stream. Consequently, each second frame image obtained based on the image effect adjustment parameters can fuse the image effect of the reference video stream to which the first reference frame image belongs with the image effect of the candidate video stream itself. Since the image effect adjustment parameters for each first frame image are different, the degree of fusion of the adjusted second frame images with respect to the image effect of the reference video stream to which the first reference frame image belongs varies. This achieves a smooth transition of the image effect of the reference video stream to which the first reference frame image belongs to the image effect of the target video stream, reducing the difference in image effect between the target video stream and the reference video stream to which the first reference frame image belongs. In scenarios where switching from the reference video stream to the target video stream, this reduces the impact of image effect differences on the user's viewing experience, optimizes the image effect adjustment method and effect between video streams, and improves the user experience.
[0121] In the above embodiments, the acquisition of image effect parameters can be combined with... Figure 3 understand, Figure 3 This is a schematic flowchart of an image processing method according to another embodiment of the present disclosure, as shown below. Figure 3 As shown, the method includes:
[0122] S301, Obtain the third frame image to be extracted, wherein the third frame image is obtained by downsampling any frame image to be extracted.
[0123] In this embodiment of the disclosure, parameters can be extracted from any frame image for which image effect parameters need to be extracted using a trained model. The input frame image for parameter extraction from the input model corresponding to that frame image can be determined as the third frame image to be extracted.
[0124] As an example, any frame image to be extracted can be downsampled, and the downsampled frame image can be determined as the third frame image. The image size of the downsampled third frame image can be 256×256 or other preset image sizes, which are not specifically limited here.
[0125] S302, Obtain the trained image effect parameter extraction model.
[0126] Optionally, the image effect parameter extraction model proposed in this embodiment can be constructed based on a model in related technologies that can extract image effect parameters.
[0127] Furthermore, the model training method in the relevant technology is used to train the image effect parameter extraction model to be trained until the training is completed, thereby obtaining the trained image effect parameter extraction model.
[0128] S303, Based on the image effect parameter extraction model, the image effect parameters of the third frame image are extracted to obtain the sixth effect parameter of the third frame image.
[0129] Optionally, the acquired third frame image can be input into a trained image effect parameter extraction model. The image effect parameter extraction model can then be used to extract and analyze features from the third frame image, thereby extracting the image effect parameters corresponding to the third frame image.
[0130] This parameter can be identified as the sixth active parameter of the third frame image.
[0131] Optionally, in the scenario where the third frame image is obtained by downsampling the first reference frame image, the sixth action parameter is the first action parameter of the first reference frame image.
[0132] Optionally, in a scenario where the third frame image is obtained by downsampling based on the second reference frame image corresponding to any first frame image, the sixth action parameter is the second action parameter of the second reference frame image.
[0133] Optionally, in the scenario where the third frame image is obtained by downsampling the first frame image, the sixth action parameter is the third action parameter of the first frame image.
[0134] Optionally, in the scenario where the third frame image is obtained by downsampling the second frame image, the sixth action parameter is the fourth action parameter of the second frame image.
[0135] The image processing method proposed in this disclosure downsamples the frame image to be extracted to obtain the corresponding third frame image, and extracts parameters from the third frame image using a trained image effect parameter extraction model to obtain the sixth effect parameter of the third frame image. This improves the extraction efficiency and accuracy of the image effect parameter of the frame image, and provides accurate data support for the downstream task of adjusting the image effect of each first frame image in the candidate video stream, thereby improving the adjustment efficiency and accuracy of the image effect of each first frame image.
[0136] To better understand the above embodiments, it can be combined with Figure 4 , Figure 4 This is a schematic flowchart of an image processing method according to another embodiment of the present disclosure, as shown below. Figure 4 As shown.
[0137] exist Figure 4 The multi-camera terminal shown has a data acquisition end equipped with Figure 4 The first camera, second camera, ..., Nth camera shown can be accessed via... Figure 4 The multi-camera terminal shown performs image acquisition to obtain the video streams captured by each camera.
[0138] Optionally, the video streams captured by the first camera, the second camera, ..., the Nth camera can be transmitted to... Figure 4 The image processing unit shown transmits the video streams captured by the first camera, the second camera, ..., the Nth camera to the data transmission interface 1 connected to the image processing unit. Figure 4 The storage unit shown.
[0139] Furthermore, the storage unit transmits the video streams captured by the first camera, the second camera, ..., the Nth camera to... Figure 4 The diagram shows an independent computing unit, which determines the reference video stream and candidate video stream in the video streams captured by the first camera, second camera, ..., Nth camera. The image effect adjustment parameters for each frame in each video stream are obtained using the image effect adjustment parameter acquisition method proposed in the above embodiment, and the obtained image effect adjustment parameters are then sent back to... Figure 4 The storage unit shown.
[0140] It should be noted that, Figure 4 The independent computing unit shown is equipped with a trained image effect parameter extraction model, which enables accurate extraction of image effect parameters.
[0141] like Figure 4 As shown, the display end of the multi-camera terminal can be connected to the storage unit through data transmission interface 2. Figure 4In the scenario shown, the storage unit can transmit the image effect adjustment parameters of each frame to the display end through data transmission interface 2, and the data transmission interface 2 can transmit each frame and its image effect adjustment parameters to the display end. Figure 4 The image effect adjustment unit shown.
[0142] Furthermore, through Figure 4 The illustrated image effect adjustment unit adjusts the image effects of each frame that requires adjustment, thereby achieving image effect adjustment for each candidate video stream, and transmits the adjusted target video stream and the reference video stream that does not require adjustment to... Figure 4 The display device shown is used to present the user with various video streams that can achieve smooth transitions in image effects.
[0143] It should be noted that, Figure 4 The image effect adjustment unit shown is equipped with a 3D LUT module. Based on the configuration of this module, the image effect adjustment unit can adjust the image effect of the candidate video stream based on the received image effect adjustment parameters, thereby obtaining the adjusted target video stream.
[0144] The image processing method proposed in this disclosure obtains second action parameters for each second reference frame image based on first action parameters of a first reference frame image. This allows the image effect adjustment parameters obtained based on the second and third action parameters to fuse the image effect action parameters of the reference video stream to which the first reference frame image belongs with those of the candidate video stream. Consequently, each second frame image obtained based on the image effect adjustment parameters can fuse the image effect of the reference video stream to which the first reference frame image belongs with the image effect of the candidate video stream itself. Since the image effect adjustment parameters for each first frame image are different, the degree of fusion of the adjusted second frame images with respect to the image effect of the reference video stream to which the first reference frame image belongs varies. This achieves a smooth transition of the image effect of the reference video stream to which the first reference frame image belongs to the image effect of the target video stream, reducing the difference in image effect between the target video stream and the reference video stream to which the first reference frame image belongs. In scenarios where switching from the reference video stream to the target video stream, this reduces the impact of image effect differences on the user's viewing experience, optimizes the image effect adjustment method and effect between video streams, and improves the user experience.
[0145] Corresponding to the image processing methods proposed in the above embodiments, an embodiment of this disclosure also proposes an image processing apparatus. Since the image processing apparatus proposed in this disclosure corresponds to the image processing methods proposed in the above embodiments, the implementation methods of the above image processing methods are also applicable to the image processing apparatus proposed in this disclosure, and will not be described in detail in the following embodiments.
[0146] Figure 5 This is a schematic diagram of the structure of an image processing apparatus according to an embodiment of the present disclosure, as shown below. Figure 5 As shown, the image processing device 500 includes a first acquisition module 51, a second acquisition module 52, a third acquisition module 53, a fourth acquisition module 54, and an adjustment module 55, wherein:
[0147] The first acquisition module 51 is used to acquire a first reference frame image and a first action parameter of the first reference frame image, wherein the first action parameter is used to characterize the image effect of the reference frame image;
[0148] The second acquisition module 52 is used to acquire the first frame image set of the candidate video stream and acquire the second reference frame image of each first frame image in the first frame image set, wherein each first frame image in the first frame image set is an image to be displayed.
[0149] The third acquisition module 53 is used to obtain the second action parameters of each second reference frame image based on the first action parameter, wherein the second action parameters of each second reference frame image are different;
[0150] The fourth acquisition module 54 is used to obtain the image effect adjustment parameters of each first frame image based on the third action parameters of each first frame image and the second action parameters of each second reference frame image, wherein the image effect adjustment parameters of each first frame image are different;
[0151] The adjustment module 55 is used to adjust the image effect of each first frame image based on the image effect adjustment parameters to obtain each second frame image, so as to obtain the target video stream corresponding to the candidate video stream.
[0152] In this embodiment of the present disclosure, the second acquisition module 52 is further configured to: for the i-th first frame image to be displayed, in response to i equal to 1, acquire a first reference frame image and determine it as the second reference frame image of the i-th first frame image; in response to i greater than 1, acquire the (i-1)-th first frame image in the candidate video stream, and obtain the second reference frame image of the i-th first frame image based on the (i-1)-th first frame image.
[0153] In this embodiment of the disclosure, the second acquisition module 52 is further configured to: in response to i being greater than 1, acquire the (i-1)th second frame image obtained after adjusting the image effect of the (i-1)th first frame image; and determine the (i-1)th second frame image as the second reference image of the ith first frame image.
[0154] In this embodiment of the present disclosure, the third acquisition module 53 is further configured to: for the i-th first frame image, in response to i equal to 1, determine the first action parameter of the first reference frame image as the second action parameter of the second reference frame image corresponding to the i-th first frame image; in response to i greater than 1, acquire the fourth action parameter of the (i-1)-th second frame image as the second action parameter of the second reference frame image corresponding to the i-th first frame image.
[0155] In this embodiment of the present disclosure, the fourth acquisition module 54 is further configured to: for the i-th first frame image, in response to i being greater than 1, acquire the first weighting coefficient of the second action parameter and the second weighting coefficient of the third action parameter, and weight the second action parameter and the third action parameter according to the first weighting coefficient and the second weighting coefficient to obtain the image effect adjustment parameters of the i-th first frame image.
[0156] In this embodiment of the present disclosure, the fourth acquisition module 54 is further configured to: for the i-th first frame image, in response to i equaling 1, determine the second action parameter of the second reference frame image corresponding to the i-th first frame image as the image effect adjustment parameter of the i-th first frame image.
[0157] In this embodiment of the disclosure, the adjustment module 55 is further configured to: for any first frame image, update the third action parameter of the first frame image according to the image effect adjustment parameter to obtain the updated fifth action parameter; adjust the image effect of the first frame image based on the fifth action parameter to obtain the adjusted second frame image of the first frame image; and replace each first frame image in the candidate video stream based on the second frame image of each first frame image to obtain the target video stream corresponding to the candidate video stream.
[0158] In this embodiment of the present disclosure, the apparatus further includes an extraction module, configured to: acquire a third frame image to be extracted, wherein the third frame image is obtained by downsampling any frame image to be extracted; acquire a trained image effect parameter extraction model; and extract image effect parameters from the third frame image based on the image effect parameter extraction model to obtain a sixth effect parameter of the third frame image.
[0159] In this embodiment of the present disclosure, the first acquisition module 51 is further configured to: acquire the first camera and the second camera configured on the multi-camera terminal; activate the first camera to obtain a reference video stream through the first camera, so as to obtain a first reference frame image in the reference video stream; and activate the second camera in response to the activation condition of the second camera being triggered, and switch from the first camera to the second camera to obtain a candidate video stream.
[0160] In this embodiment of the disclosure, the first acquisition module 51 is further configured to: acquire the first acquisition magnification of the first camera and the second acquisition magnification of the second camera; and determine that the activation condition for recognizing the second camera has been triggered in response to the adjustment of the first acquisition magnification of the first camera to the second acquisition magnification.
[0161] The image processing apparatus disclosed herein extracts a first action parameter from a first reference frame image, obtains a set of first frame images of a candidate video stream and second reference frame images for each first frame image, and obtains a second action parameter for each second reference frame image based on the first action parameter. It then obtains a third action parameter for each first frame image, and based on the second and third action parameters, obtains image effect adjustment parameters used for image effect adjustment of each first frame image. Finally, it adjusts the image effect of each first frame image according to these image effect adjustment parameters to obtain each second frame image, thereby achieving image effect adjustment of the candidate video stream and obtaining the adjusted target video stream. In this disclosure, second action parameters for each second reference frame image are obtained based on first action parameters of the first reference frame image. This enables the image effect adjustment parameters obtained based on the second and third action parameters to fuse the image effect action parameters of the reference video stream to which the first reference frame image belongs with those of the candidate video stream. Consequently, each second frame image obtained based on the image effect adjustment parameters can fuse the image effect of the reference video stream to which the first reference frame image belongs with the image effect of the candidate video stream itself. Since the image effect adjustment parameters of each first frame image are different, the degree of fusion of the image effect of each adjusted second frame image with respect to the reference video stream to which the first reference frame image belongs varies. This achieves a smooth transition of the image effect of the reference video stream to which the first reference frame image belongs to the image effect of the target video stream, reduces the degree of difference between the image effects of the target video stream and the reference video stream to which the first reference frame image belongs. In scenarios where the reference video stream to which the first reference frame image belongs is switched to the target video stream, the impact of image effect differences on the user's viewing experience is reduced, the image effect adjustment method and effect between video streams are optimized, and the user experience is improved.
[0162] To achieve the above embodiments, this disclosure also provides an electronic device, a computer-readable storage medium, and a computer program product.
[0163] Figure 6 This is a block diagram of an electronic device 600 according to an embodiment of the present disclosure, as follows: Figure 6 As shown, the electronic device 600 includes a memory 601, a processor 602, and a computer program stored in the memory 601 and executable on the processor 602. When the processor 602 executes program instructions, it implements the image processing method provided in the above embodiments.
[0164] The image processing method proposed in this disclosure extracts a first action parameter from a first reference frame image, obtains a set of first frame images of a candidate video stream and second reference frame images for each first frame image, and obtains a second action parameter for each second reference frame image based on the first action parameter. A third action parameter is obtained for each first frame image, and based on the second and third action parameters, image effect adjustment parameters are obtained for each first frame image when performing image effect adjustment. Then, image effect adjustment is performed on each first frame image according to these image effect adjustment parameters to obtain each second frame image, thereby realizing image effect adjustment of the candidate video stream and obtaining the adjusted target video stream. In this disclosure, second action parameters for each second reference frame image are obtained based on first action parameters of the first reference frame image. This enables the image effect adjustment parameters obtained based on the second and third action parameters to fuse the image effect action parameters of the reference video stream to which the first reference frame image belongs with those of the candidate video stream. Consequently, each second frame image obtained based on the image effect adjustment parameters can fuse the image effect of the reference video stream to which the first reference frame image belongs with the image effect of the candidate video stream itself. Since the image effect adjustment parameters of each first frame image are different, the degree of fusion of the image effect of each adjusted second frame image with respect to the reference video stream to which the first reference frame image belongs varies. This achieves a smooth transition of the image effect of the reference video stream to which the first reference frame image belongs to the image effect of the target video stream, reduces the degree of difference between the image effects of the target video stream and the reference video stream to which the first reference frame image belongs. In scenarios where the reference video stream to which the first reference frame image belongs is switched to the target video stream, the impact of image effect differences on the user's viewing experience is reduced, the image effect adjustment method and effect between video streams are optimized, and the user experience is improved.
[0165] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0166] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0167] The program code used to implement the method itself can be written in any combination of one or more programming languages. This program code can be provided to the processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0168] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0169] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0170] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or grid browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication grid). Examples of communication grids include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain grids.
[0171] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact through a communication mesh. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers integrated with blockchain technology.
[0172] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0173] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0174] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of this disclosure pertain.
[0175] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0176] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0177] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware, and the program can be stored in a computer-readable storage medium. When executed, the program includes one or a combination of the steps of the method embodiments.
[0178] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0179] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present disclosure.
[0180] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0181] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. An image processing method, characterized in that, The method includes: A first reference frame image and a first function parameter of the first reference frame image are obtained, wherein the first function parameter is used to characterize the image effect of the reference frame image, and the first reference frame image is acquired by a first camera; Obtain a first frame image set of the candidate video stream, and obtain a second reference frame image for each first frame image in the first frame image set, wherein each first frame image in the first frame image set is an image to be displayed, including: for the i-th first frame image to be displayed, in response to i equal to 1, obtain the first reference frame image and determine it as the second reference frame image of the i-th first frame image; In response to i being greater than 1, obtain the (i-1)th second frame image after adjusting the image effects of the (i-1)th first frame image; The (i-1)th second frame image is determined as the second reference image of the ith first frame image; wherein, the candidate video stream is a video stream composed of multiple frames of images captured by the second camera after switching from the first camera to the second camera; Based on the first action parameter, the second action parameter of each second reference frame image is obtained, wherein the second action parameter of each second reference frame image is different; Based on the third action parameter of each first frame image and the second action parameter of each second reference frame image, image effect adjustment parameters for each first frame image are obtained. The third action parameter is used to characterize the initial image effect of the first frame image itself. The image effect adjustment parameters for each first frame image are different. The method includes: for the i-th first frame image, in response to i being greater than 1, obtaining the first weighting coefficient of the second action parameter and the second weighting coefficient of the third action parameter, and weighting the second action parameter and the third action parameter according to the first weighting coefficient and the second weighting coefficient to obtain the image effect adjustment parameters for the i-th first frame image. Based on the image effect adjustment parameters, the image effect of each first frame image is adjusted to obtain each second frame image, so as to obtain the target video stream corresponding to the candidate video stream.
2. The method according to claim 1, characterized in that, The second action parameters for each second reference frame image are obtained based on the first action parameter, wherein the second action parameters for each second reference frame image are different, including: For the i-th first frame image, in response to i equaling 1, the first action parameter of the first reference frame image is determined as the second action parameter of the second reference frame image corresponding to the i-th first frame image; In response to i being greater than 1, the fourth action parameter of the (i-1)th second frame image is obtained and used as the second action parameter of the second reference frame image corresponding to the i-th first frame image.
3. The method according to claim 1, characterized in that, The method further includes: For the i-th first frame image, in response to i equaling 1, the second action parameter of the second reference frame image corresponding to the i-th first frame image is determined as the image effect adjustment parameter of the i-th first frame image.
4. The method according to claim 1, characterized in that, The step of adjusting the image effects of each first frame image based on the image effect adjustment parameters to obtain each second frame image, and then obtaining the target video stream corresponding to the candidate video stream, includes: For any first frame image, the third action parameter of the first frame image is updated according to the image effect adjustment parameter to obtain the updated fifth action parameter; Based on the fifth action parameter, the image effect of the first frame image is adjusted to obtain the adjusted second frame image of the first frame image; Based on the second frame image of each first frame image, the first frame images in the candidate video stream are replaced to obtain the target video stream corresponding to the candidate video stream.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: Obtain the third frame image to be extracted, wherein the third frame image is obtained by downsampling any frame image to be extracted; Extract parameters from trained image processing models to assess their effectiveness. Based on the image effect parameter extraction model, the image effect parameters of the third frame image are extracted to obtain the sixth effect parameter of the third frame image.
6. The method according to any one of claims 1-4, characterized in that, The method further includes: Acquire the first and second cameras configured on the multi-camera terminal; The first camera is activated to obtain a reference video stream, thereby obtaining the first reference frame image in the reference video stream; In response to the activation condition of the second camera being triggered, the second camera is activated, and the system switches from the first camera to the second camera to obtain the candidate video stream.
7. The method according to claim 6, characterized in that, The method further includes: Obtain the first acquisition magnification of the first camera and the second acquisition magnification of the second camera; In response to the adjustment of the first acquisition magnification of the first camera to the second acquisition magnification, the activation condition for identifying the second camera is triggered.
8. An image processing apparatus, characterized in that, The device includes: The first acquisition module is used to acquire a first reference frame image and a first function parameter of the first reference frame image, wherein the first function parameter is used to characterize the image effect of the reference frame image, and the first reference frame image is acquired by a first camera; The second acquisition module is used to acquire a first frame image set of the candidate video stream and acquire a second reference frame image of each first frame image in the first frame image set, wherein each first frame image in the first frame image set is an image to be displayed, including: for the i-th first frame image to be displayed, in response to i equal to 1, acquiring the first reference frame image and determining it as the second reference frame image of the i-th first frame image; In response to i being greater than 1, obtain the (i-1)th second frame image after adjusting the image effects of the (i-1)th first frame image; The (i-1)th second frame image is determined as the second reference image of the ith first frame image; wherein, the candidate video stream is a video stream composed of multiple frames of images captured by the second camera after switching from the first camera to the second camera; The third acquisition module is used to obtain the second action parameters of each second reference frame image based on the first action parameters, wherein the second action parameters of each second reference frame image are different; The fourth acquisition module is used to obtain image effect adjustment parameters for each first frame image based on the third action parameter of each first frame image and the second action parameter of each second reference frame image. The third action parameter is used to characterize the initial image effect of the first frame image itself. The image effect adjustment parameters for each first frame image are different. The module includes: for the i-th first frame image, in response to i being greater than 1, obtaining the first weighting coefficient of the second action parameter and the second weighting coefficient of the third action parameter, and weighting the second action parameter and the third action parameter according to the first weighting coefficient and the second weighting coefficient to obtain the image effect adjustment parameters for the i-th first frame image. The adjustment module is used to adjust the image effects of each first frame image based on the image effect adjustment parameters to obtain each second frame image, so as to obtain the target video stream corresponding to the candidate video stream.
9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute instructions to implement the method as described in any one of claims 1-8.
10. A computer-readable storage medium, wherein when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method as described in any one of claims 1-8.
11. A chip, characterized in that, The device includes one or more interface circuits and one or more processors; the interface circuits are used to receive signals and send the signals to the processors, the signals including computer instructions stored in a memory, which, when executed by the processor, cause the chip to perform the steps of the method according to any one of claims 1-8.