WO2022083325A1 - 拍照预览方法、电子设备以及存储介质 - Google Patents

拍照预览方法、电子设备以及存储介质 Download PDF

Info

Publication number
WO2022083325A1
WO2022083325A1 PCT/CN2021/116839 CN2021116839W WO2022083325A1 WO 2022083325 A1 WO2022083325 A1 WO 2022083325A1 CN 2021116839 W CN2021116839 W CN 2021116839W WO 2022083325 A1 WO2022083325 A1 WO 2022083325A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
difference
parameter value
brightness
parameter
Prior art date
Application number
PCT/CN2021/116839
Other languages
English (en)
French (fr)
Inventor
许亦然
张俪耀
Original Assignee
华为技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022083325A1 publication Critical patent/WO2022083325A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene

Definitions

  • the present application relates to the field of terminal technologies, and in particular, to a photographing preview method, an electronic device, and a storage medium.
  • the terminal device When a user uses a terminal device to take a photo, after triggering to open the camera, the terminal device will jump to the photo preview interface, and the terminal device will display the image captured by the camera on the photo preview interface in real time for the user to view.
  • the terminal device When the user is ready to shoot, trigger the shooting, and the terminal device then uses the multi-frame fusion technology to obtain the real shot image.
  • the preview image displayed on the photo preview interface adopts a single-frame scheme, which cannot take into account the bright area and the dark area at the same time, resulting in inconsistent display effects between the preview image and the real-shot image that the user sees on the terminal device before taking the photo.
  • the image collected by the camera is globally adjusted based on statistical information to obtain the preview image.
  • the statistical information is only obtained by statistics on the brightness of each pixel on the image collected by the camera. Under such processing in the prior art, the consistency of the display effect of the preview image and the real shot image is still not ideal.
  • the present application provides a photographing preview method, an electronic device and a storage medium, which are used to improve the consistency of the display effects of the preview image and the real-shot image.
  • the present application provides a photographing preview method, comprising: determining a first exposure parameter value corresponding to the current photographing scene according to an environmental parameter value and a first mapping relationship in the current photographing scene, where the exposure parameter includes an exposure value, At least one of exposure time or sensitivity, the environmental parameter includes at least one of a brightness parameter or a dynamic range parameter, and the first mapping relationship is used to indicate the correspondence between different environmental parameter values and different exposure parameter values According to the first difference in the first parameter between the first preview image and the first real-shot image in the current shooting scene, the first exposure parameter value is adjusted to obtain the second exposure parameter value, and the first exposure parameter value is obtained.
  • the parameters include at least one of a brightness parameter or a dynamic range parameter; the camera collects a first image according to the second exposure parameter value; and processes the first image to obtain a second preview image.
  • the adjustment of the first exposure parameter value according to the first difference in the first parameter between the first preview image and the first real-shot image in the current photographing scene includes: if If the first difference includes less detail in the bright area, the first exposure parameter value is decreased; if the first difference includes less detail in the dark area, the first exposure parameter value is increased.
  • the processing of the first image to obtain a second preview image includes: according to a second difference in brightness parameters between the first preview image and the first real shot image , adjust the brightness parameter curve corresponding to the first image to obtain a second image; according to the third difference between the first preview image and the first real shot image in the third parameter Adjusting, the third parameter includes at least one of a color parameter, a brightness parameter, a dynamic range parameter, a contrast parameter or a saturation parameter, to obtain a second network model; using the second network model to analyze the second image Processing is performed to obtain the second preview image.
  • the brightness parameter curve corresponding to the first image is adjusted according to the second difference in brightness parameters between the first preview image and the first real shot image to obtain the first image.
  • the second image includes: preliminarily adjusting the brightness parameter curve corresponding to the first image according to the adjustment of the first exposure parameter value to obtain a third image; The brightness parameter curves corresponding to the three images are adjusted to obtain the second image.
  • the preliminary adjustment of the brightness parameter curve corresponding to the first image according to the adjustment made to the first exposure parameter value includes: if the first exposure parameter value is adjusted The adjustment made is to increase the first exposure parameter value, then reduce the brightness of the bright area on the brightness parameter curve corresponding to the first image; if the adjustment made to the first exposure parameter value is to reduce the first exposure parameter value.
  • An exposure parameter value increases the brightness of the dark area on the brightness parameter curve corresponding to the first image.
  • adjusting the brightness parameter curve corresponding to the third image according to the second difference to obtain the second image, and obtaining the second image includes: if the The second difference is that the brightness is too high, then reduce the brightness of all areas on the brightness parameter curve corresponding to the third image; if the second difference is that the brightness is low, increase the brightness parameter curve corresponding to the third image. Brightness of all areas.
  • the adjusting the first network model according to the third difference in the third parameter between the first preview image and the first real shot image includes: if the third If the difference is that the contrast parameter is low, the weight of the network model corresponding to the contrast parameter in the first network model is increased.
  • the method before determining the first exposure parameter value corresponding to the current photographing scene according to the environmental parameter value and the first mapping relation in the current photographing scene, the method further includes: in the second mapping relation Find the exposure parameter value corresponding to the environmental parameter value; if the exposure parameter value corresponding to the environmental parameter value cannot be found in the second mapping relationship, then according to the environmental parameter value and the first mapping relationship, determine the current The first exposure parameter value corresponding to the photographing scene; if the exposure parameter value corresponding to the environmental parameter value is found in the second mapping relationship, the camera collects the first image according to the found exposure parameter value.
  • the method before searching for the exposure parameter value corresponding to the environmental parameter value in the second mapping relationship, the method further includes: in any photographing scene, according to the environmental parameter in the photographing scene value and the first mapping relationship, determine the third exposure parameter value corresponding to the photographing scene, and the photographing scene includes at least one of a default scene, a portrait scene, a night scene, a panorama or a high dynamic scene; according to the photographing The difference in the first parameter between the preview image and the real shot image in the scene, the third exposure parameter value is adjusted to obtain the fourth exposure parameter value; the environmental parameter value under the shooting scene and the fourth exposure parameter value are adjusted A corresponding relationship of exposure parameter values is added to the second mapping relationship.
  • the method further includes: adding the corresponding relationship between the environmental parameter value in the current photographing scene and the second exposure parameter value to the second mapping relationship.
  • the brightness parameter curve corresponding to the first image is adjusted according to the second difference in brightness parameters between the first preview image and the first real shot image to obtain the first image.
  • the method further includes: judging whether the current photographing scene and the photographing scene corresponding to the first real photographing image are the same; if they are the same, determining the brightness parameter corresponding to the first image according to the second difference. The curve is adjusted; if it is different, the brightness parameter curve corresponding to the first image is adjusted according to the adjustment of the first exposure parameter value to obtain the second image.
  • the method before the adjustment of the brightness parameter curve corresponding to the first image according to the second difference, the method further includes: determining, according to a first confidence degree, whether the first image takes effect.
  • the first confidence level is used to represent the possibility that the shooting scene corresponding to the first real-shot image and the first shooting scene are the same scene, and the first shooting scene is the first real-shot image.
  • the shooting scene corresponding to the previous real shot image if so, adjust the brightness parameter curve corresponding to the first image according to the second difference; if not, according to the first exposure parameter value Adjusting, adjusting the brightness parameter curve corresponding to the first image to obtain the second image.
  • the determining whether the second difference is valid according to the first confidence level includes: if the first confidence level is greater than a first preset value, validating the second difference; If the first confidence level is less than or equal to the first preset value, the second difference does not take effect.
  • the method before adjusting the first network model according to the third difference between the first preview image and the first real shot image in the third parameter, the method further includes: Determine whether the current photographing scene and the photographing scene corresponding to the first real photographed image are the same; if they are the same, adjust the first network model according to the third difference; if they are different, use the first network model to The second image is processed to obtain the second preview image.
  • the method before adjusting the first network model according to the third difference, the method further includes: determining whether the third difference takes effect according to the first confidence level; if so, then According to the third difference, the first network model is adjusted; if not, the second image is processed by using the first network model to obtain the second preview image.
  • the determining whether the third difference is valid according to the first confidence level includes: if the first confidence level is greater than a first preset value, validating the third difference; If the first confidence level is less than or equal to the first preset value, the third difference does not take effect.
  • the method further includes: acquiring a second real shot image corresponding to the second preview image; judging whether the interval between the second real shot image and the first real shot image is shorter than the second real shot image. The preset value; if yes, then compare the second preview image and the second real shot image to obtain the color parameters, brightness parameters, dynamic range parameters, contrast ratios of the second preview image and the second real shot image. At least one difference in parameter or saturation parameter.
  • the method further includes: determining a second confidence level according to the time interval between the second real shot image and the first real shot image, where the second confidence level is used to characterize the current photographing scene.
  • the possibility that the photographed scene corresponding to the first real photographed image is the same scene.
  • the present application provides an electronic device, including: a consistency quality assessment module, an intelligent exposure module, a global brightness correction module, a consistency enhancement module, and a camera; the intelligent exposure module is used to: The environmental parameter value and the first mapping relationship determine the first exposure parameter value corresponding to the current photographing scene, the exposure parameter includes at least one of exposure value, exposure time or sensitivity, and the environmental parameter includes brightness parameter or dynamic range At least one of the parameters, the first mapping relationship is used to indicate the corresponding relationship between different environmental parameter values and different exposure parameter values; according to the first preview image and the first preview image in the current photographing scene fed back by the consistency quality evaluation module A first difference in a first parameter of a real shot image, adjusting the first exposure parameter value to obtain a second exposure parameter value, where the first parameter includes at least one of a brightness parameter or a dynamic range parameter; The camera is used to collect a first image according to the second exposure parameter value; the global brightness correction module and the consistency enhancement module are used to process the first image to obtain a second preview image.
  • the intelligent exposure module is specifically configured to: if the first difference includes less bright area details, reduce the first exposure parameter value; if the first difference includes dark area details If it is less, the first exposure parameter value is increased.
  • the global brightness correction module is specifically configured to perform preliminary adjustment on the brightness parameter curve corresponding to the first image according to the adjustment made to the first exposure parameter value, to obtain a third image; according to the second difference, adjust the brightness parameter curve corresponding to the third image to obtain the second image.
  • the global brightness correction module is specifically configured to, if the adjustment made to the first exposure parameter value is to increase the first exposure parameter value, reduce the corresponding value of the first image.
  • the global brightness correction module is specifically configured to, if the second difference is high brightness, reduce the brightness of all areas on the brightness parameter curve corresponding to the third image;
  • the second difference is that the brightness is low, and the brightness of all regions on the brightness parameter curve corresponding to the third image is increased.
  • the consistency enhancement module is specifically configured to, if the third difference is that the contrast parameter is low, increase the weight of the network model corresponding to the contrast parameter in the first network model.
  • the intelligent exposure module is further configured to find the exposure parameter value corresponding to the environmental parameter value in the second mapping relationship; if the environment cannot be found in the second mapping relationship The exposure parameter value corresponding to the parameter value, the first exposure parameter value corresponding to the current photographing scene is determined according to the environmental parameter value and the first mapping relationship; if the environmental parameter value corresponding to the environmental parameter value is found in the second mapping relationship exposure parameter value, the camera collects the first image according to the found exposure parameter value.
  • the intelligent exposure module is further configured to, in any photographing scene, determine the third corresponding to the photographing scene according to the environmental parameter value in the photographing scene and the first mapping relationship.
  • Exposure parameter value the photographing scene includes at least one of a default scene, a portrait scene, a night scene, a panorama, or a high-dynamic scene; according to the fourth difference between the preview image and the actual photographed image in the photographing scene on the first parameter , adjusting the third exposure parameter value to obtain a fourth exposure parameter value; adding the corresponding relationship between the environmental parameter value in the photographing scene and the fourth exposure parameter value to the second mapping relationship.
  • the intelligent exposure module is further configured to add the corresponding relationship between the environmental parameter value in the current photographing scene and the second exposure parameter value to the second mapping relationship.
  • the global brightness correction module is further used to judge whether the current photographing scene and the photographing scene corresponding to the first real photographed image are the same; Adjust the brightness parameter curve corresponding to the first image; if different, adjust the brightness parameter curve corresponding to the first image according to the adjustment of the first exposure parameter value to obtain the second image .
  • the global brightness correction module is further configured to, according to a first confidence level, determine whether the second difference takes effect, and the first confidence level is used to characterize the correspondence of the first real-shot image.
  • the global brightness correction module is specifically configured to, if the first confidence level is greater than a first preset value, take effect the second difference; if the first confidence level is less than or equal to the first preset value, the second difference does not take effect.
  • the consistency enhancement module is further configured to judge whether the current photographing scene and the photographing scene corresponding to the first real photographed image are the same; if they are the same, according to the third difference, determine whether the A network model is used for adjustment; if different, the second image is processed by using the first network model to obtain the second preview image.
  • the consistency enhancement module is further configured to, according to the first confidence, determine whether the third difference takes effect; if so, adjust the first network model according to the third difference ; if not, use the first network model to process the second image to obtain the second preview image.
  • the consistency enhancement module is specifically configured to, if the first confidence level is greater than a first preset value, take effect of the third difference; if the first confidence level is less than or equal to the first preset value, the third difference does not take effect.
  • the consistency quality assessment module is used to obtain a second real shot image corresponding to the second preview image; and to determine the time interval between the second real shot image and the first real shot image. Whether it is less than the second preset value; if so, compare the second preview image and the second real shot image to obtain the color parameters, brightness parameters, dynamic parameters of the second preview image and the second real shot image. at least one difference in a range parameter, a contrast parameter or a saturation parameter, and feedback the difference in the first parameter between the second preview image and the second real shot image to the intelligent exposure module, and send the first parameter difference to the intelligent exposure module.
  • the difference in brightness parameters between the second preview image and the second real-shot image is fed back to the global brightness correction module, and the difference in the third parameter between the second preview image and the second real-shot image is fed back to the global brightness correction module.
  • the consistency enhancement module is used to obtain a second real shot image corresponding to the second preview image; and to determine the time interval between the second real shot image and the first real shot image. Whether it is
  • the consistency quality assessment module is also used for,
  • a second confidence level is determined according to the interval between the second real-shot image and the first real-shot image, and the second confidence level is used to indicate that the current shooting scene and the shooting scene corresponding to the first real-shot image are the same and the second confidence level is fed back to the global brightness correction module and the consistency enhancement module.
  • the present application provides an electronic device, including: a memory, a processor, and a camera; the processor is configured to be coupled to the memory, read and execute instructions in the memory, to implement the method of the first aspect .
  • the present application provides a readable storage medium on which a computer program is stored; when the computer program is executed, the method of the first aspect is implemented.
  • the exposure parameter value based on which the exposure parameter of the terminal device is adjusted is determined in combination with the difference between the preview image and the real-shot image, so that the image collected by the camera is closer to the real-shot image. image, which improves the consistency of the display effect of the preview image and the real shot image, and improves the user experience.
  • FIG. 1 is an application scenario diagram 1 provided by this application.
  • FIG. 2 is an application scenario diagram 2 provided by this application.
  • FIG. 3 is a frame diagram of a camera module 300 provided by the present application.
  • FIG. 5 is a frame diagram of a camera module 500 provided by the present application.
  • FIG. 6 is a schematic diagram 1 of a feedback mechanism provided by this application.
  • FIG. 7 is a schematic diagram 2 of a feedback mechanism provided by this application.
  • FIG. 8 is a schematic flowchart of an embodiment of a photographing preview method provided by the present application.
  • FIG. 9 is a schematic flowchart of obtaining the corresponding relationship between the environmental parameter value and the exposure parameter value in the terminal device development process provided by the present application.
  • FIG. 10 is a schematic flowchart of another embodiment of a photographing preview method provided by the present application.
  • FIG. 11 is a schematic flowchart of another embodiment of a photographing preview method provided by the present application.
  • FIG. 12 is a schematic flowchart of another embodiment of a photographing preview method provided by the present application.
  • FIG. 13 is an application scenario diagram 3 provided by this application.
  • FIG. 14 is a schematic structural diagram of an electronic device provided by the present application.
  • the photographing preview method provided in this application can be applied to any terminal device having a photographing function, and the terminal device having a photographing function includes but is not limited to: a mobile phone, a smart screen, a digital camera, a tablet computer or a notebook computer.
  • the drawings in this application all take a mobile phone as an example to illustrate the preview implementation process provided in this application.
  • FIG. 1 is an application scenario diagram provided by the present application.
  • the terminal device when the user triggers to open the camera, the terminal device will jump to the photo preview interface, and the terminal device will display the image collected by the camera on the photo preview interface in real time.
  • the image displayed in real time on the photo preview interface can be called a preview image, and the preview image can provide the scene and the posture of the subject, so that the user can adjust the shooting angle and exposure parameters with reference to the preview image.
  • the terminal device when the user is ready to shoot and triggers a photo, the terminal device then uses the multi-frame fusion technology to obtain the real shot image.
  • the multi-frame fusion technology can fuse long and short frames, long, medium and short frames or multiple short frames.
  • the long frame is the image frame collected under the long exposure time
  • the short frame is the image frame collected under the short exposure time
  • the middle frame is the image frame collected under the medium exposure time. The higher the amount, the more detail in the dark areas can be captured. Therefore, a long frame can ensure the display of details in dark areas, and a short frame can ensure the display of details in bright areas.
  • the preview image displayed on the photo preview interface adopts a single-frame scheme, which cannot take into account the bright area and the dark area at the same time, resulting in inconsistent display effects between the preview image and the real-shot image that the user sees on the terminal device before taking the photo.
  • the left side is the preview image
  • the right side is the real shot image.
  • the real shot image shows more details. The inconsistency between the preview image and the real shot image greatly affects the user's use experience.
  • an exposure module 301 and a global tone mapping module 302 are set in the camera module 300 of the terminal device.
  • the consistency of the display effect of the preview image and the real shot image is improved by the following steps:
  • the exposure module 301 perceives the current environmental parameter value, and adjusts the exposure parameter of the terminal device according to the current environmental parameter value.
  • the above-mentioned environmental parameter includes at least one of a brightness parameter or a dynamic range parameter.
  • the exposure module 301 may perceive the current environmental parameter value through the photosensitive element.
  • the photosensitive element includes, but is not limited to, a charge-coupled device (Charge-coupled Device, CCD) or a complementary metal oxide semiconductor (Complementary Metal Oxide Semiconductor, CMOS).
  • the exposure module 301 searches for the exposure parameter basic value corresponding to the current environmental parameter value from the preset mapping relationship, and adjusts the exposure parameter of the terminal device according to the exposure parameter basic value. , the camera captures images under the adjusted exposure parameters.
  • the global tone mapping module 302 globally adjusts the image collected by the camera based on the statistical information to obtain a preview image.
  • the brightness parameters of each pixel on the image collected by the camera are counted to obtain the total number of pixels falling in each brightness area. If the total number of pixels falling in the bright area is greater than the preset value, the image is determined. If the overall brightness is too bright, reduce the brightness parameter curve of each area. If the total number of pixels in the dark area is greater than the preset value, it is determined that the overall image is too dark, and the brightness parameter curve of each area is improved.
  • the exposure parameter base value found by the exposure module 301 from the preset mapping relationship is only a value that roughly matches the current photographing scene, and the statistical information based on the global tone mapping module 302 is only for each image on the image collected by the camera.
  • the brightness of the pixels is obtained by statistics. After processing by these modules, the consistency of the display effect of the preview image and the real shot image is still not ideal.
  • the present application provides an embodiment that compares the preview image and the real-shot image, and obtains the color parameters, brightness parameters, contrast parameters, saturation parameters and The difference in dynamic range parameters is fed back to the corresponding image processing module, so that the image processing module can adjust the image in combination with the difference between the preview image and the real shot image during the preview process.
  • the preview image obtained after the adjustment is more similar to the real shot image, and the difference is smaller, which improves the user experience.
  • the photographing module 500 is a module related to photographing in a terminal device.
  • the photographing module 500 includes but is not limited to: a consistency quality assessment module 501, an intelligent exposure module 502, a global brightness Correction module 503 and consistency enhancement module 504, the functions of each module are introduced one by one below:
  • the consistency quality evaluation module 501 is used to compare the first preview image and the first real shot image, and obtain the color parameters, brightness parameters, dynamic range parameters, contrast parameters and saturation parameters of the first preview image and the first real shot image.
  • the difference in the first parameter between the first preview image and the first real shot image is fed back to the intelligent exposure module 502, as shown in FIG. 6 . It is also used to feed back the difference in brightness parameters between the first preview image and the first real-shot image to the global brightness correction module 503 when the real-shot image meets the preset condition, and store the first preview image and the first real-shot image in the global brightness correction module 503.
  • the difference in the third parameter is fed back to the consistency enhancement module 504, as shown in FIG. 7 .
  • the first parameter includes at least one of a brightness parameter or a dynamic range parameter
  • the third parameter includes at least one of a color parameter, a brightness parameter, a dynamic range parameter, a contrast parameter, and a saturation parameter.
  • the consistency quality evaluation module 501 may only feed back to the global luminance correction module 503 , or only feed back to the consistency enhancement module 504 , or feed back to both the global luminance correction module 503 and the consistency enhancement module 504 .
  • the consistency quality assessment module 501 can first feed back to the global brightness correction module 503, and then to the consistency enhancement module 504.
  • the feedback can also be fed back to the consistency enhancement module 504 first, and then to the global brightness correction module 503, or to the global brightness correction module 503 and the consistency enhancement module 504 at the same time.
  • the order of feedback is not limited in this embodiment of the present application. .
  • the consistency quality evaluation module 501 compares the color parameters of the first preview image and the first real shot image to determine whether there is a cooler color temperature between the first preview image and the first real shot image. Or if the color temperature is warmer, if it exists, the color temperature is colder or the color temperature is warmer as the difference in color parameters between the first preview image and the first real shot image. A real shot image has no difference in color parameters.
  • the consistency quality evaluation module 501 compares the brightness parameters of the first preview image and the first real shot image to determine whether the first preview image and the first real shot image have high brightness compared to the first preview image. Or in the case of low brightness, if it exists, the high brightness or low brightness is used as the difference in brightness parameters between the first preview image and the first real shot image; A real shot image has no difference in brightness parameters.
  • the consistency quality evaluation module 501 compares the dynamic range parameters of the first preview image and the first real shot image to determine whether there is a bright area compared to the first preview image and the first real shot image. In the case of less detail or less detail in dark area, if it exists, the less detail in bright area or less detail in dark area is used as the difference in dynamic range parameters between the first preview image and the first real shot image. If there is, it is determined that there is no difference in the dynamic range parameter between the first preview image and the first real shot image.
  • the consistency quality evaluation module 501 compares the contrast parameters of the first preview image and the first real shot image to determine whether there is a contrast parameter deviation between the first preview image and the first real shot image. If the contrast parameter is high or the contrast parameter is low, if it exists, the contrast parameter is high or the contrast parameter is low as the difference in the contrast parameter between the first preview image and the first real shot image. There is no difference in contrast parameters between the preview image and the first real shot image.
  • the consistency quality evaluation module 501 compares the saturation parameters of the first preview image and the first real shot image to determine whether there is saturation between the first preview image and the first real shot image. If the parameter is too high or the saturation parameter is too low, if it exists, the saturation parameter is too high or the saturation parameter is too low as the difference in the saturation parameter between the first preview image and the first real shot image. If exists, it is determined that there is no difference in the saturation parameter between the first preview image and the first real shot image.
  • the intelligent exposure module 502 is used to perceive the environmental parameter values in the current photographing scene after the camera is woken up, and according to the environmental parameter values in the current photographing scene, and the first preview image and the first real image fed back by the consistency quality evaluation module 501
  • the first difference in the first parameter of the captured image is to adjust the exposure parameter value. After the adjustment, the image captured by the camera is closer to the real captured image.
  • the intelligent exposure module 502 may first search for the first exposure parameter value corresponding to the current photographing scene from the first mapping relationship, and then, according to the consistency quality evaluation module 501 The first difference in the first parameter between the feedback first preview image and the first real shot image is adjusted, and the first exposure parameter value is adjusted to obtain the second exposure parameter value.
  • the first parameter includes at least one of a brightness parameter or a dynamic range parameter, and the first difference is a difference between the first preview image and the first real shot image in the first parameter.
  • the first exposure parameter value is the basic value of the exposure parameter corresponding to the current photographing scene
  • the first mapping relationship is used to indicate the corresponding relationship between different environmental parameter values and different exposure parameter values
  • the exposure parameter value in the first mapping relationship is the value of the exposure parameter.
  • the basic value of the exposure parameter, the basic value of the exposure parameter is a value that roughly matches the corresponding shooting scene.
  • the exposure parameter includes at least one of the following parameters: exposure value (Exposure Value, EV), sensitivity (photosensibility, ISO), exposure time, or gain (Gain).
  • the intelligent exposure module 502 may adjust the value of the first exposure parameter as follows: reduce the first exposure parameter value. an exposure parameter value; if the difference in the dynamic range parameter between the first preview image and the first real shot image is that the dark area has less details, the intelligent exposure module 502 can adjust the first exposure parameter value as follows: increase the first exposure parameter value.
  • the intelligent exposure module 502 can adjust the value of the first exposure parameter as follows: reduce the first exposure parameter. If the difference in brightness parameter between the first preview image and the first real shot image is low brightness, the intelligent exposure module 502 can adjust the first exposure parameter value as follows: increase the first exposure parameter value.
  • the intelligent exposure module 502 sends the adjustment made to the first exposure parameter value to the global brightness correction module 503 .
  • the global brightness correction module 503 is configured to adjust the first exposure parameter value according to the intelligent exposure module 502, and the first preview image and the first real shot image fed back by the consistency quality evaluation module 501 on the brightness parameter.
  • the second difference is to adjust the brightness parameter curve corresponding to the first image collected by the camera to obtain a second image, and the second image is closer to the real shot image in terms of global brightness parameters.
  • the global brightness correction module 503 may initially adjust the brightness parameter curve corresponding to the first image collected by the camera according to the adjustment of the first exposure parameter value by the intelligent exposure module 502 to obtain the first exposure parameter. Three images, and then further adjust the brightness parameter curve corresponding to the third image according to the second difference in brightness parameters between the first preview image and the first real shot image fed back by the consistency quality evaluation module 501 to obtain a second image.
  • the third image is an image after preliminary correction, and the second image is an image after global correction.
  • the second difference is a difference in brightness parameters between the first preview image and the first real shot image.
  • the above-mentioned preliminary adjustment may be implemented in the following manner. If the intelligent exposure module 502 adjusts the first exposure parameter value in order to display the details of the dark area, the first exposure parameter value is adjusted to increase the first exposure parameter value, and the global brightness will be reduced.
  • the correction module 503 can reduce the brightness of the bright area on the brightness parameter curve corresponding to the first image, so as to avoid that the brightness of the bright area is too high and the details of the bright area cannot be displayed after adjustment by the intelligent exposure module 502; , the adjustment made to the first exposure parameter value is to reduce the first exposure parameter value, and the global brightness correction module 503 can increase the brightness of the dark area on the brightness parameter curve corresponding to the first image. It is avoided that, after being adjusted by the intelligent exposure module 502, the brightness parameter of the dark area is too low, so that the details of the dark area cannot be displayed.
  • the global brightness correction module 503 may perform the following adjustment: increase the brightness of all regions on the brightness parameter curve corresponding to the third image. If the second difference is high brightness, the global brightness correction module 503 may perform the following adjustment: reduce the brightness of all regions on the brightness parameter curve corresponding to the third image.
  • the consistency enhancement module 504 is used to adjust the first network model according to the difference in the third parameter between the first preview image and the first real shot image fed back by the consistency quality evaluation module 501 to obtain a second network model, and use the first network model.
  • the second network model processes the second image to obtain a second preview image.
  • the third parameter includes at least one of a color parameter, a brightness parameter, a dynamic range parameter, a contrast parameter or a saturation parameter.
  • the consistency enhancement module 504 includes a first network model trained in advance, and the first network module includes a network model with multiple dimensions, including but not limited to color parameters, brightness parameters, dynamic The range parameter, the contrast parameter and the saturation parameter, the training samples of the network model are the images processed by the global brightness correction module 503 and the corresponding real-shot images.
  • the weight of the network model of the corresponding dimension can be adjusted according to the difference, and the second network model obtained after the adjustment uses the third parameter.
  • the obtained second preview image is closer to the real shot image in terms of contrast parameters.
  • the consistency quality evaluation module 501 determines that the difference in brightness parameters between the first preview image and the first real shot image is that the brightness is low, and the contrast parameter The difference is that the contrast parameter is low, and the difference in the dynamic range parameter is that there is less content in the dark area.
  • the consistency quality evaluation module 501 feeds back the difference in the brightness parameter and the dynamic range parameter to the intelligent exposure module 502, and feeds back the difference in the brightness parameter to the global brightness correction module 503, and the color parameter, brightness parameter, dynamic range parameter, contrast parameter And the difference in the saturation parameter is fed back to the consistency enhancement module 504, as shown in Table 1, each module can be adjusted as follows, the intelligent exposure module 502 increases the EV, and the global brightness correction module 503 increases the brightness parameter curve corresponding to the third image. For the brightness of all areas, the consistency enhancement module 504 increases the weight of the network model corresponding to the contrast parameter.
  • the second preview image has the color parameters, brightness parameters , dynamic range parameters, contrast parameters and saturation parameters are closer to the real shot image, which improves the user experience.
  • FIG. 8 is a schematic flowchart of an embodiment of a photographing preview method provided by the present application.
  • the photographing preview method provided by this embodiment is applied to the photographing module 500 shown in FIG. 5 , and the photographing preview method provided by this embodiment can be used for processing of terminal equipment.
  • the first touch operation is an operation triggered by the user to turn on the camera, as shown in FIG.
  • the operation of the camera icon, or other operations that can trigger the opening of the camera, is not limited in this application.
  • the processor of the terminal device receives the first touch operation, it wakes up the camera on the terminal device, and each module in the camera module 500 executes the operation.
  • the intelligent exposure module 502 perceives the environmental parameter values in the current photographing scene.
  • the environmental parameter includes at least one of a brightness parameter or a dynamic range parameter.
  • the intelligent exposure module 502 is a software module of the camera. After the camera is woken up, the intelligent exposure module 502 starts to perceive the environmental parameter values in the current photographing scene. For the process of perceiving the environmental parameter value by the intelligent exposure module 502, reference may be made to S401 in the above-mentioned embodiment, and details are not described herein again.
  • the intelligent exposure module 502 searches the second mapping relationship for the exposure parameter value corresponding to the environmental parameter value in the current photographing scene.
  • the second mapping relationship is the corresponding relationship between the pre-stored environmental parameter value and the exposure parameter value.
  • the above-mentioned second mapping relationship includes a corresponding relationship obtained through a real-shot test in the development process of the terminal device, and a corresponding relationship recorded in the actual use process of the terminal device.
  • the shooting scenarios include but are not limited to normal shooting scenes, portrait scenes, night scenes, and panoramic views.
  • a normal photographing scene can also be understood as a daily photographing scene or a normal photographing scene
  • a normal photographing scene can also be understood as a default scene after turning on the camera, and a normal photographing scene is mostly used in the daytime.
  • the process of determining the exposure parameter value will be described.
  • the preview image of the previous real shooting will be recorded as P_(i-1) below, and the previous real shooting will be recorded as P_(i-1).
  • the real shot image is recorded as C_(i-1)
  • the image collected by the camera this time is recorded as R_i
  • the image after this global correction is recorded as image Y_i
  • the preview image is recorded as image P_i
  • the real shot image is denoted as image C_i
  • the difference in the first parameter between this preview image P_i and this real shot image C_i is denoted as f_i.
  • the process of determining the exposure parameter value specifically includes:
  • the first parameter includes at least one of a brightness parameter or a dynamic range parameter.
  • step S8021 after the camera of the terminal device is awakened, the intelligent exposure module 502 perceives the environmental parameter values in the normal photographing scene.
  • the environmental parameter includes at least one of a brightness parameter or a dynamic range parameter.
  • Step S8022 the intelligent exposure module 502 determines a third exposure parameter value corresponding to the normal photographing scene according to the environmental parameter value and the first mapping relationship in the normal photographing scene.
  • the third exposure parameter value is a basic exposure parameter value corresponding to a normal photographing scene.
  • the first mapping relationship is used to indicate the corresponding relationship between different environmental parameter values and different exposure parameter values
  • the exposure parameter value in the first mapping relationship is the basic value of the exposure parameter
  • the basic value of the exposure parameter is roughly matching the corresponding shooting scene value of .
  • Step S8023 the intelligent exposure module 502, according to the difference in the first parameter between the preview image P_(i-1) of the previous real shot and the real shot image C_(i-1) fed back by the consistency quality evaluation module 501, determines the third The exposure parameter value is adjusted to obtain the adjusted exposure parameter value.
  • Step S8024 the camera collects an image according to the adjusted exposure parameter value this time, and obtains the image R_i collected this time.
  • step S8025 the global brightness correction module 503 adjusts the brightness parameter curve corresponding to the image R_i according to the adjustment of the third exposure parameter value by the intelligent exposure module 502 to obtain the image Y_i after the global correction this time.
  • Step S8026 using the first network model to process the image Y_i after the global correction this time to obtain the preview image P_i this time.
  • the consistency enhancement module 504 includes a first network model
  • the first network model includes a network model of multiple dimensions trained in advance, and the multiple dimensions include but are not limited to color parameters, brightness parameters, dynamic parameters.
  • the range parameter, the contrast parameter and the saturation parameter, the training samples of the network model are the images processed by the global brightness correction module 503 and the corresponding real-shot images. After inputting the image Y_i after global correction this time into the first network model, it is processed by multiple dimensional network models in turn, so that the output preview image is in the color parameters, brightness parameters, dynamic range parameters, contrast parameters and saturation parameters. It is closer to the real shot image.
  • Step S8027 the consistency quality evaluation module 501 compares the preview image P_i of this time with the real shot image C_i of this time, and obtains the difference f_i in the first parameter between the preview image P_i of this time and the real shot image C_i of this time.
  • the tester can judge the preview image and the real shot image under the normal shooting scene through the difference f_i. Whether the consistency of the detail display has reached the pre-set requirements of the tester, and if the pre-set requirements are met, there is no need to feed back the difference f_i to the intelligent exposure module 502, and the adjusted exposure parameter value obtained in S8023 is directly regarded as normal.
  • the fourth exposure parameter value corresponding to the environmental parameter value in the photographing scene if it does not meet the requirements, continue to feed back the difference f_i to the intelligent exposure module 502 until the details of the preview image and the actual photographed image are displayed in the normal photographing scene.
  • the degree of consistency meets the requirements until.
  • the corresponding relationship between the environmental parameter value and the fourth exposure parameter value in the normal photographing scene is added to the second mapping relationship.
  • the difference f_i can be input into a preset judgment algorithm, and the judgment algorithm is used to judge Whether the detail display of the preview image and the real-shot image in the normal photographing scene has reached the requirement, if the requirement is met, then the difference f_i need not be fed back to the intelligent exposure module 502, and the adjusted exposure parameters obtained in S8023 will be used directly.
  • the value is the fourth exposure parameter value corresponding to the environmental parameter value in the normal photographing scene; if it does not meet the requirements, continue to feed back the difference f_i to the intelligent exposure module 502 until the details of the preview image and the actual photographed image are consistent in the normal photographing scene. until the required level is reached.
  • the corresponding relationship between the environmental parameter value and the fourth exposure parameter value in the normal photographing scene is added to the second mapping relationship.
  • the above method is used to determine corresponding exposure parameter values, and exposure parameter values corresponding to various environmental parameter values can be obtained.
  • the corresponding relationship between the environmental parameter value and the exposure parameter value is added to the second mapping relationship, so that when the user actually uses the terminal device to take pictures, the intelligent exposure module 502 can find the exposure parameter corresponding to the current environmental parameter from the second mapping relationship value. Since the above process of determining the exposure parameter value combines the difference between the preview image and the real shot image, the image collected by the camera according to the exposure parameter value is closer to the real shot image.
  • the consistency quality evaluation module 501 will not feed back the difference between the preview image and the actual photographing image before the first actual photographing.
  • the intelligent exposure module 502 does not perform the adjustment of the above S8023 before the first real shot, and at this time, in S8024, the camera collects an image according to the third exposure parameter value.
  • the above is an implementation manner of obtaining the corresponding relationship between the environmental parameter value and the exposure parameter value in the development process of the terminal device.
  • the camera collects a first image according to the found exposure parameter value.
  • the exposure parameter includes at least one of EV, exposure time or ISO.
  • the global brightness correction module 503 adjusts the brightness parameter curve corresponding to the first image according to the first image to obtain a second image.
  • the second image is an image after global correction.
  • the consistency enhancement module 504 includes a first network model
  • the first network model includes a network model of multiple dimensions trained in advance, and the multiple dimensions include but are not limited to color parameters, brightness parameters, dynamic parameters.
  • the range parameter, the contrast parameter and the saturation parameter, the training samples of the network model are the images processed by the global brightness correction module 503 and the corresponding real-shot images.
  • the output second preview image is more approximate in terms of color parameters, brightness parameters, dynamic range parameters, contrast parameters and saturation parameters. Real shot images.
  • the processor of the terminal device After the processor of the terminal device receives the second touch operation that triggers photography, it adopts the multi-frame fusion technology to obtain the real-shot image.
  • the second touch operation may be an operation of the user clicking the photography button. It may also be an operation of the user double-clicking the camera button, or other operations that can trigger a photo, which is not limited in this application.
  • the consistency quality evaluation module 501 compares the preview image and the real-shot image in the current shooting scene, and obtains the difference in the first parameter between the preview image and the real-shot image.
  • the consistency quality evaluation module 501 feeds back the difference in the first parameter between the preview image and the real shot image to the intelligent exposure module 502 .
  • the exposure parameter value based on which the intelligent exposure module 502 adjusts the exposure parameter of the terminal device is obtained from the real-shot test in the development process of the terminal device.
  • the difference between the captured images is used to determine the exposure parameter value, so that the image captured by the camera under the adjusted exposure parameter is closer to the real captured image, which improves the consistency of the display effect between the preview image and the real captured image, and improves the user experience.
  • Exposure parameter values corresponding to multiple environmental parameter values can be obtained through the actual shooting test during the terminal device development process.
  • the shooting scenes of the actual shooting test may not cover all the shooting scenes during actual shooting. Therefore, the intelligent exposure module 502 in S802 may not be able to find the exposure parameter value corresponding to the current photographing scene in the second mapping relationship.
  • FIG. 10 is a schematic flowchart of another embodiment of a photographing preview method provided by this application.
  • the photographing preview method provided by this embodiment includes:
  • the intelligent exposure module 502 perceives the environmental parameter values in the current photographing scene.
  • the intelligent exposure module 502 searches the second mapping relationship for the exposure parameter value corresponding to the environmental parameter value in the current photographing scene.
  • S1001-S1002 can refer to S801-S802 in the above-mentioned embodiment.
  • the intelligent exposure module 502 cannot find the exposure parameter value corresponding to the current environmental parameter value in the second mapping relationship, the following steps can be performed.
  • the intelligent exposure module 502 determines a first exposure parameter value corresponding to the current photographing scene according to the environmental parameter value and the first mapping relationship in the current photographing scene.
  • the first exposure parameter value is a basic value of an exposure parameter corresponding to the current photographing scene.
  • the first mapping relationship is used to indicate the corresponding relationship between different environmental parameter values and different exposure parameter values
  • the exposure parameter value in the first mapping relationship is the basic value of the exposure parameter
  • the basic value of the exposure parameter is roughly matching the corresponding shooting scene value of .
  • the intelligent exposure module 502 adjusts the first exposure parameter value according to the first difference in the first parameter between the first preview image and the first real-shot image in the current shooting scene fed back by the consistency quality evaluation module 501 , to obtain the second exposure parameter value.
  • the first parameter includes at least one of a brightness parameter or a dynamic range parameter.
  • the first difference is the difference in the first parameter between the first preview image and the first real-shot image in the current photographing scene.
  • the manner in which the intelligent exposure module 502 adjusts the value of the first exposure parameter according to the difference fed back by the consistency quality evaluation module 501 can refer to the above introduction about the intelligent exposure module 502, which is not repeated in this application. Repeat.
  • the corresponding relationship between the current environmental parameter value and the second exposure parameter value can be added to the second mapping relationship, for the terminal device to enter the current photographing relationship again.
  • the exposure parameter value is searched in the second mapping relationship.
  • the first difference in the first parameter between the first preview image involved in S1004 and the first real shot image can be fed back at any time in the past.
  • the consistency quality evaluation module 501 can feed back the difference in the first parameter between the preview image of the photo and the real-shot image to the intelligent exposure module 502.
  • the intelligent exposure module 502 perceives the environmental parameter value next time
  • the difference in past feedback from the consistency quality evaluation module 501 can be directly used to adjust the basic value of the exposure parameter.
  • the camera collects the first image according to the second exposure parameter value.
  • the global brightness correction module 503 adjusts the brightness parameter curve corresponding to the first image according to the first image to obtain a second image.
  • the processor of the terminal device After the processor of the terminal device receives the second touch operation that triggers photography, it adopts the multi-frame fusion technology to obtain the real-shot image, and the consistency quality evaluation module 501 performs the following operations:
  • the consistency quality evaluation module 501 compares the preview image and the real-shot image in the current shooting scene, and obtains the difference in the first parameter between the preview image and the real-shot image.
  • the consistency quality evaluation module 501 feeds back the difference in the first parameter between the preview image and the real shot image to the intelligent exposure module 502 .
  • the intelligent exposure module 502 when the intelligent exposure module 502 cannot find the exposure parameter value corresponding to the current environmental parameter value in the second mapping relationship, the first preview in the current photographing scene fed back by the consistency quality evaluation module 501 The first difference in the first parameter between the image and the first real shot image determines the corresponding exposure parameter value, and the camera further collects the first image according to the exposure parameter value. Since the above exposure parameter value is determined in combination with the difference between the first preview image and the first real-shot image in the current shooting scene, the image captured by the camera can be closer to the real-shot image, and the display effect of the preview image and the real-shot image is improved. enhances the user experience.
  • the difference in brightness parameters between the preview image and the real shooting image in the previous real shooting can be used as the basis for the global brightness correction module 503 to adjust the brightness parameter curve, so that the The globally corrected image is closer to the real shot image in the global brightness parameter, therefore, the consistency quality evaluation module 501 can feed back the difference in brightness parameter between the preview image and the real shot image to the global brightness correction module 503 .
  • the preview image of the previous real shooting is the first preview image
  • the real shooting image of the previous real shooting is the first real shooting image
  • FIG. 11 is a schematic flowchart of another embodiment of a photographing preview method provided by this application.
  • the photographing preview method provided by this embodiment includes:
  • the intelligent exposure module 502 perceives the environmental parameter value in the current photographing scene.
  • the intelligent exposure module 502 searches the second mapping relationship for the exposure parameter value corresponding to the environmental parameter value in the current photographing scene.
  • the camera collects a first image according to the found exposure parameter value.
  • the above are the steps performed by the intelligent exposure module 502 after the user triggers to turn on the camera.
  • the steps performed by the global brightness correction module 503 are described below.
  • the steps performed by the global brightness correction module 503 are divided into two cases. If the global brightness correction module 503 receives the first preview image and the first real shot fed back by the consistency quality evaluation module 501 The difference in the brightness parameter of the image and the confidence of the difference, go to S1104-S1106, and if not received, go to S1107.
  • the global brightness correction module 503 determines whether the current photographing scene and the photographing scene corresponding to the first real photographing image are the same. If they are the same, execute S1105-S1106; otherwise, execute S1107.
  • the global brightness correction module 503 can determine whether the time interval between the time when the camera captures the image and the previous real shooting time exceeds a preset value, and if it exceeds the preset value, it is determined that the shooting scene has changed, and if it does not exceed the preset value. If the preset value is set, it is determined that the photographing scene does not change.
  • the intelligent exposure module 502 can determine whether the difference between the current environmental parameter value and the environmental parameter value in the previous real shot exceeds a preset value, and if it exceeds the preset value, send the information to the global brightness correction module. 503 sends an instruction to inform the global brightness correction module 503 that the photographing scene has changed. If the preset value is not exceeded, send an instruction to the global brightness correction module 503 to inform the global brightness correction module 503 that the photographing scene has not changed.
  • the global brightness correction module 503 determines whether the second difference is valid according to the first confidence level. If yes, execute S1106, if not, execute S1107.
  • the second difference is a difference in brightness parameters between the first preview image and the first real shot image.
  • the first confidence level is used to represent the possibility that the shooting scene corresponding to the first real-shot image and the first shooting scene are the same scene, and the first shooting scene is the previous real-time shooting scene of the first real-shot image.
  • the shooting scene corresponding to the image is taken.
  • the global brightness correction module 503 may determine whether the first confidence level is greater than the first preset value, and if so, the second difference may be applied, and if not, the second difference may not be applied.
  • the global brightness correction module 503 adjusts the brightness parameter curve corresponding to the first image according to the second difference to obtain a second image.
  • the process of adjusting the brightness parameter curve by the global brightness correction module 503 refers to the difference in brightness parameters between the first preview image and the first real shot image, the image adjusted by the global brightness correction module 503 is closer to the real brightness parameter in terms of global brightness parameters. Take an image.
  • the global brightness correction module 503 adjusts the brightness parameter curve corresponding to the first image according to the adjustment made by the intelligent exposure module 502 to the first exposure parameter value to obtain the second image.
  • the second image is an image after global correction.
  • the method of adjusting the brightness parameter curve corresponding to the first image by the global brightness correction module 503 according to the adjustment made by the intelligent exposure module 502 to the first exposure parameter value can be referred to above about the global brightness.
  • the introduction of the correction module 503 will not be repeated in this application.
  • the second touch operation may be an operation of the user clicking the photography button , it may also be an operation of the user double-clicking the camera button, or other operations that can trigger a photo, which is not limited in this application.
  • the processor of the terminal device further sends the real shot image to the consistency quality evaluation module 501.
  • the difference between the preview image and the real shot image is different.
  • the preview image may be different from the real shot image.
  • the brightness of the image is low, and in the night scene, the brightness of the preview image may be high compared to the actual image.
  • the consistency quality assessment module 501 may perform the following steps:
  • the consistency quality evaluation module 501 judges whether the second real shot image satisfies the trigger condition of the feedback difference, and if so, feeds back the second preview image and the first real shot image to the global brightness correction module 503. The difference in brightness parameters between the two real-shot images; if not satisfied, the difference in brightness parameters between the second preview image and the second real-shot image is not fed back to the global brightness correction module 503 .
  • the second real shot image is a real shot image corresponding to the second preview image.
  • the above trigger condition may be that the time interval between the second real shot image and the first real shot image is less than a preset value, such as 3s. That is to say, only when the interval between the second real image and the first real image is less than the preset value, the consistency quality evaluation module 501 will feed back the corresponding difference to the global brightness correction module 503 .
  • the consistency quality evaluation module 501 may further determine the second confidence level according to the time interval between the second real-shot image and the first real-shot image.
  • the consistency quality evaluation module 501 feeds back the corresponding difference to the global brightness correction module 503, it can also feed back a second confidence level at the same time, and the second confidence level can be used by the global brightness correction module 503 to determine whether the consistency is valid according to the second confidence level. Differences in feedback from the quality assessment module 501 .
  • the second confidence level may be searched from a third mapping relationship, where the third mapping relationship is used to indicate the corresponding relationship between time and confidence level.
  • the second confidence level is used to represent the possibility that the current photographing scene and the photographing scene corresponding to the first real photographing image are the same scene. The shorter the interval between the second real image and the first real image, the higher the second confidence level, and the longer the interval between the second real image and the first real image, the lower the second confidence degree.
  • the above triggering condition may be that the difference between the environmental parameter value corresponding to the second real-shot image and the environmental parameter value corresponding to the first real-shot image is smaller than the preset value, that is, only in the second real-time shooting image Only when the difference between the environmental parameter value corresponding to the captured image and the environmental parameter value corresponding to the first real captured image is smaller than the preset value, the consistency quality evaluation module 501 feeds back the corresponding difference to the global brightness correction module 503 .
  • the consistency quality evaluation module 501 may also determine the second confidence level according to the difference between the environmental parameter value corresponding to the second real shot image and the environmental parameter value corresponding to the first real shot image.
  • the consistency quality evaluation module 501 feeds back the corresponding difference to the global brightness correction module 503, it can also feed back a second confidence level at the same time, and the second confidence level can be used by the global brightness correction module 503 to determine whether the consistency is valid according to the second confidence level. Differences in feedback from the quality assessment module 501 .
  • the second confidence level may be searched from a fourth mapping relationship, and the fourth mapping relationship is used to indicate the corresponding relationship between the difference between the environmental parameter values and the confidence level.
  • the second confidence level is used to represent the possibility that the current photographing scene and the photographing scene corresponding to the first real photographing image are the same scene.
  • the environmental parameter value corresponding to the second real-shot image corresponds to the first real-shot image. The larger the gap between the environmental parameter values, the lower the second confidence.
  • the difference between the environmental parameter value corresponding to the second real shot image and the environmental parameter value corresponding to the first real shot image may be sent by the intelligent exposure module 502 to the consistency quality evaluation module 501 .
  • the setting of the above trigger conditions enables the user to take pictures frequently in the same photographing scene, and the preview image provided by the terminal device is more and more close to the actual photographed image, which improves the user experience.
  • the global brightness correction module 503 in the above S1104 judges the shooting scene, so that after the user changes the shooting scene, the difference between the preview image of the previous real shooting and the real shooting image will not affect the preview image after changing the shooting scene. , which further improves the user experience.
  • the consistency quality evaluation module 501 may feed back the difference in brightness parameters between the second preview image and the second real captured image to the global brightness correction In module 503, the global brightness correction module 503 adjusts the brightness parameter curve of the image in combination with the difference, so that the global brightness parameter of the image after the global correction is closer to the real shot image.
  • the difference in the third parameter between the preview image and the real shooting image in the previous real shooting can be used as the adjustment basis for the consistency enhancement module 504, so that the consistency can be improved.
  • the preview image output by the enhancement module 504 is closer to the real shot image in terms of color parameters, brightness parameters, contrast parameters, saturation parameters and dynamic range parameters. Therefore, the consistency quality evaluation module 501 The difference in the third parameter of the captured images is fed back to the consistency enhancement module 504 .
  • the third parameter includes at least one of a color parameter, a brightness parameter, a contrast parameter, a saturation parameter, or a dynamic range parameter.
  • the preview image of the previous real shooting is the first preview image
  • the real shooting image of the previous real shooting is the first real shooting image.
  • FIG. 12 is a schematic flowchart of another embodiment of a photographing preview method provided by this application.
  • the photographing preview method provided by this embodiment includes:
  • the intelligent exposure module 502 perceives the environmental parameter values in the current photographing scene.
  • the intelligent exposure module 502 searches the second mapping relationship for the exposure parameter value corresponding to the environmental parameter value in the current photographing scene.
  • the camera collects a first image according to the found exposure parameter value.
  • the global brightness correction module 503 adjusts the brightness parameter curve corresponding to the first image according to the first image to obtain a second image.
  • the steps performed by the consistency enhancement module 504 are described below. The steps performed by the consistency enhancement module 504 are divided into two cases. If the consistency enhancement module 504 receives the first preview image and the first real shot fed back by the consistency quality assessment module 501 The difference between the images on the third parameter and the confidence of the difference, go to S1205-S1207, and if not received, go to S1208.
  • the consistency enhancement module 504 determines whether the current photographing scene and the photographing scene corresponding to the first real photographing image are the same. If they are the same, execute S1206-S1207; otherwise, execute S1208.
  • the consistency enhancement module 504 can determine whether the time interval between the time when the camera captures the image and the previous real shooting time exceeds a preset value, and if it exceeds the preset value, it is determined that the shooting scene has changed, and if it does not exceed the preset value. If the preset value is set, it is determined that the photographing scene does not change.
  • the intelligent exposure module 502 can determine whether the difference between the current environmental parameter value and the environmental parameter value in the previous real shot exceeds a preset value, and if it exceeds the preset value, then send the information to the consistency enhancement module. 504 sends an instruction to inform the consistency enhancement module 504 that the photographing scene has changed. If the preset value is not exceeded, send an instruction to the consistency enhancement module 504 to inform the consistency enhancement module 504 that the photographing scene has not changed.
  • the consistency enhancement module 504 determines whether the third difference is valid according to the first confidence level. If yes, execute S1207, if not, execute S1208.
  • the consistency enhancement module 504 may determine whether the first confidence level is greater than the first preset value, and if so, the third difference may be valid, and if not, the third difference may not be valid.
  • the first confidence level is used to represent the possibility that the shooting scene corresponding to the first real-shot image and the first shooting scene are the same scene, and the first shooting scene is the previous real-time shooting scene of the first real-shot image.
  • the shooting scene corresponding to the image is taken.
  • the consistency enhancement module 504 adjusts the first network model according to the third difference to obtain a second preview image.
  • the manner in which the consistency enhancement module 504 adjusts the first network model according to the difference fed back by the consistency quality assessment module 501 may refer to the above introduction about the consistency enhancement module 504, the application is here No longer.
  • the second touch operation may be an operation of the user clicking the photography button , it may also be an operation of the user double-clicking the camera button, or other operations that can trigger a photo, which is not limited in this application.
  • the processor of the terminal device further sends the real shot image to the consistency quality evaluation module 501.
  • the difference between the preview image and the real shot image is different.
  • the preview image may be different from the real shot image.
  • the brightness of the image is low, and in the night scene, the brightness of the preview image may be high compared to the actual image.
  • the consistency quality assessment module 501 may perform the following steps:
  • the consistency quality evaluation module 501 judges whether the second real shot image satisfies the trigger condition of the feedback difference, and if so, feeds back the second preview image and the first real shot image to the consistency enhancement module 504. The difference in the third parameter between the two real-shot images; if not satisfied, the difference in the third parameter between the second preview image and the second real-shot image is not fed back to the consistency enhancement module 504 .
  • the second real shot image is a real shot image corresponding to the second preview image.
  • the above trigger condition may be that the time interval between the second real shot image and the first real shot image is less than a preset value, such as 3s. That is to say, only when the time interval between the second real shot image and the first real shot image is less than the preset value, the consistency quality evaluation module 501 will feed back the corresponding difference to the consistency enhancement module 504 .
  • the consistency quality evaluation module 501 may further determine the second confidence level according to the time interval between the second real-shot image and the first real-shot image.
  • the consistency quality assessment module 501 feeds back the corresponding difference to the consistency enhancement module 504, it can also feed back a second confidence level at the same time, and the second confidence level can be used by the consistency enhancement module 504 to determine whether the consistency is valid according to the second confidence level. Differences in feedback from the quality assessment module 501 .
  • the second confidence level may be searched from a third mapping relationship, where the third mapping relationship is used to indicate the corresponding relationship between time and confidence level.
  • the second confidence level is used to represent the possibility that the current photographing scene and the photographing scene corresponding to the first real photographing image are the same scene. The shorter the interval between the second real image and the first real image, the higher the second confidence level, and the longer the interval between the second real image and the first real image, the lower the second confidence degree.
  • the above triggering condition may be that the difference between the environmental parameter value corresponding to the second real-shot image and the environmental parameter value corresponding to the first real-shot image is smaller than the preset value, that is, only in the second real-time shooting image Only when the difference between the environmental parameter value corresponding to the captured image and the environmental parameter value corresponding to the first real captured image is smaller than the preset value, the consistency quality evaluation module 501 feeds back the corresponding difference to the consistency enhancement module 504 .
  • the consistency quality assessment module 304 may further determine the second confidence level according to the difference between the environmental parameter value corresponding to the second real-shot image and the environmental parameter value corresponding to the first real-shot image.
  • the consistency quality assessment module 501 feeds back the corresponding difference to the consistency enhancement module 504, it can also feed back a second confidence level at the same time, and the second confidence level can be used by the consistency enhancement module 504 to determine whether the consistency is valid according to the second confidence level. Differences in feedback from the quality assessment module 501 .
  • the second confidence level may be searched from a fourth mapping relationship, and the fourth mapping relationship is used to indicate the corresponding relationship between the difference between the environmental parameter values and the confidence level.
  • the second confidence level is used to represent the possibility that the current photographing scene and the photographing scene corresponding to the first real photographing image are the same scene.
  • the environmental parameter value corresponding to the second real-shot image corresponds to the first real-shot image. The larger the gap between the environmental parameter values, the lower the second confidence.
  • the difference between the environmental parameter value corresponding to the second real shot image and the environmental parameter value corresponding to the first real shot image may be sent by the intelligent exposure module 502 to the consistency quality evaluation module 501 .
  • the setting of the above trigger conditions enables the user to take pictures frequently in the same photographing scene, and the preview image provided by the terminal device is more and more close to the actual photographed image, which improves the user experience.
  • the determination of the photographing scene by the consistency enhancement module 504 in the above S1205 makes it possible that after the user changes the photographing scene, the difference between the preview image of the previous actual shooting and the actual photographing image will not affect the preview image after changing the photographing scene. , which further improves the user experience.
  • the consistency quality evaluation module 501 may feed back the difference in the third parameter between the second preview image and the second real captured image to the consistency
  • the consistency enhancement module 504 adjusts the model weight in combination with the difference, so that the output preview image is closer to the real shot image in terms of color parameters, brightness parameters, contrast parameters, saturation parameters and dynamic range parameters.
  • the left side is the second preview image obtained by the method provided by the above embodiment
  • the right side is the second real shot image corresponding to the second preview image.
  • the adjustment made by the parameters, and the adjustment made by the consistency enhancement module 303 to the image after the global correction according to the difference fed back by the consistency quality assessment module 304, makes the preview image output by the camera module 500 more close to the real shot image, so that the user can The actual shooting effect can be known in advance through the preview image, which greatly affects the user's sense of use experience.
  • FIG. 14 shows a schematic structural diagram of the electronic device 100 .
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, and a display Screen 194 et al.
  • the sensor module 180 may include a proximity light sensor 180G, a touch sensor 180K, an ambient light sensor 180L, and the like.
  • the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may contain multiple sets of I2C buses.
  • the processor 110 may be coupled to the camera 193 through different I2C bus interfaces.
  • the processor 110 can couple the camera 193 through the I2C interface, so that the processor 110 and the camera 193 communicate through the I2C bus interface, so as to realize the photographing function of the electronic device 100 .
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 communicates with the camera 193 through a CSI interface, so as to realize the photographing function of the electronic device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the electronic device 100 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the sensor module 180, and the like.
  • the GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness parameters, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • the processor 110 After the processor 110 receives the first touch operation, it wakes up the camera 193, and the intelligent exposure module in the camera 193 perceives the current environmental parameter value, and searches for the current environmental parameter value in the stored correspondence between the environmental parameter value and the exposure parameter value.
  • the corresponding exposure parameter value according to the found exposure parameter value, adjust the exposure parameter of the terminal device, because the corresponding relationship between the environmental parameter value and the exposure parameter value is obtained by combining the difference between the preview image and the real shot image , so that the image captured by the camera 193 under the adjusted exposure parameters is closer to the real shot image, which improves the consistency of the display effect of the preview image and the real shot image, and improves the user experience.
  • the current environmental parameter is searched from the first mapping relationship according to the current environmental parameter value
  • the basic value of the exposure parameter corresponding to the value is adjusted according to at least one difference between the brightness parameter and the dynamic range parameter of the preview image and the real shot image under the current environmental parameters fed back by the consistency quality evaluation module 501, and the basic value of the exposure parameter is adjusted to obtain the adjusted value.
  • the corresponding relationship between the current environment parameter value and the adjusted exposure parameter value is recorded, which is used by the electronic device when searching for the exposure parameter value corresponding to the current environment parameter value.
  • the corresponding relationship between the environmental parameter value and the exposure parameter value can be configured by the method shown in FIG. 9 .
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG Moving Picture Experts Group
  • MPEG2 moving picture experts group
  • MPEG3 MPEG4
  • MPEG4 Moving Picture Experts Group
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 100 emits infrared light to the outside through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense ambient light brightness parameters.
  • the electronic device 100 can adaptively adjust the brightness parameter of the display screen 194 according to the perceived ambient light brightness parameter.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket, so as to prevent accidental touch.
  • Touch sensor 180K also called “touch device”.
  • the touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
  • Motor 191 can generate vibrating cues.
  • the motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Studio Devices (AREA)

Abstract

本申请提供一种拍照预览方法、电子设备以及存储介质,根据当前拍照场景下的环境参数值和第一映射关系,确定当前拍照场景对应的第一曝光参数值;根据当前拍照场景下的第一预览图像和第一实拍图像在第一参数上的第一差异,对所述第一曝光参数值进行调整,得到第二曝光参数值,所述第一参数包括亮度参数或者动态范围参数中的至少一种;摄像头根据所述第二曝光参数值采集第一图像;对所述第一图像进行处理,得到第二预览图像。提升了预览图像和实拍图像显示效果一致性,提升了用户使用体验。

Description

拍照预览方法、电子设备以及存储介质
本申请要求于2020年10月22日提交中国专利局、申请号为202011141178.X、申请名称为“拍照预览方法、电子设备以及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及一种拍照预览方法、电子设备以及存储介质。
背景技术
用户在使用终端设备拍照时,触发打开相机后,终端设备会跳转到拍照预览界面,终端设备将摄像头采集的图像实时显示在该拍照预览界面上,以供用户查看。当用户做好拍摄准备后,触发拍照,终端设备进而采用多帧融合技术得到实拍图像。然而,拍照预览界面显示的预览图像采用的是单帧方案,其无法同时兼顾亮区与暗区,致使用户在进行拍照前在终端设备上看到的预览图像和实拍图像显示效果不一致。
为了提升预览图像和实拍图像显示效果的一致性,现有技术中,基于统计信息对摄像头采集的图像做全局调整,得到预览图像。然而,统计信息只是对摄像头采集的图像上各个像素的亮度进行统计得到的,现有技术中这种处理下,预览图像和实拍图像显示效果的一致性仍然不够理想。
发明内容
本申请提供一种拍照预览方法、电子设备以及存储介质,用于提升预览图像和实拍图像显示效果的一致性。
第一方面,本申请提供一种拍照预览方法,包括:根据当前拍照场景下的环境参数值和第一映射关系,确定当前拍照场景对应的第一曝光参数值,所述曝光参数包括曝光值、曝光时间或者感光度中的至少一种,所述环境参数包括亮度参数或者动态范围参数中的至少一种,所述第一映射关系用于指示不同环境参数值和不同曝光参数值之间的对应关系;根据当前拍照场景下的第一预览图像和第一实拍图像在第一参数上的第一差异,对所述第一曝光参数值进行调整,得到第二曝光参数值,所述第一参数包括亮度参数或者动态范围参数中的至少一种;摄像头根据所述第二曝光参数值采集第一图像;对所述第一图像进行处理,得到第二预览图像。
一种可能的实现方式中,所述根据当前拍照场景下的第一预览图像和第一实拍图像在第一参数上的第一差异,对所述第一曝光参数值进行调整,包括:若所述第一差异包括亮区细节较少,则降低所述第一曝光参数值;若所述第一差异包括暗区细节较少,则提高所述第一曝光参数值。
一种可能的实现方式中,所述对所述第一图像进行处理,得到第二预览图像,包括:根据所述第一预览图像和所述第一实拍图像在亮度参数上的第二差异,对所述第一图像对 应的亮度参数曲线进行调整,得到第二图像;根据所述第一预览图像和所述第一实拍图像在第三参数上的第三差异,对第一网络模型进行调整,所述第三参数包括颜色参数、亮度参数、动态范围参数、对比度参数或者饱和度参数中的至少一种,得到第二网络模型;利用所述第二网络模型对所述第二图像进行处理,得到所述第二预览图像。
一种可能的实现方式中,所述根据所述第一预览图像和所述第一实拍图像在亮度参数上的第二差异,对所述第一图像对应的亮度参数曲线进行调整,得到第二图像,包括:根据对所述第一曝光参数值所做的调整,对所述第一图像对应的亮度参数曲线进行初步调整,得到第三图像;根据所述第二差异,对所述第三图像对应的亮度参数曲线进行调整,得到所述第二图像。
一种可能的实现方式中,所述根据对所述第一曝光参数值所做的调整,对所述第一图像对应的亮度参数曲线进行初步调整,包括:若对所述第一曝光参数值所做的调整为提高所述第一曝光参数值,则降低所述第一图像对应的亮度参数曲线上亮区的亮度;若对所述第一曝光参数值所做的调整为降低所述第一曝光参数值,则提高所述第一图像对应的亮度参数曲线上暗区的亮度。
一种可能的实现方式中,所述根据所述第二差异,对所述第三图像对应的亮度参数曲线进行调整,得到所述第二图像,得到所述第二图像,包括:若所述第二差异为亮度偏高,则降低所述第三图像对应的亮度参数曲线上所有区域的亮度;若所述第二差异为亮度偏低,则提高所述第三图像对应的亮度参数曲线上所有区域的亮度。
一种可能的实现方式中,所述根据所述第一预览图像和所述第一实拍图像在第三参数上的第三差异,对第一网络模型进行调整,包括:若所述第三差异为对比度参数偏低,则提高所述第一网络模型中对比度参数对应的网络模型的权重。
一种可能的实现方式中,所述根据当前拍照场景下的环境参数值和第一映射关系,确定当前拍照场景对应的第一曝光参数值之前,所述方法还包括:在第二映射关系中查找所述环境参数值对应的曝光参数值;若在所述第二映射关系中查不到所述环境参数值对应的曝光参数值,则根据所述环境参数值和第一映射关系,确定当前拍照场景对应的第一曝光参数值;若在所述第二映射关系中查到所述环境参数值对应的曝光参数值,则所述摄像头根据查到的曝光参数值采集所述第一图像。
一种可能的实现方式中,所述在第二映射关系中查找所述环境参数值对应的曝光参数值之前,所述方法还包括:在任一拍照场景下,根据所述拍照场景下的环境参数值和所述第一映射关系,确定所述拍照场景对应的第三曝光参数值,所述拍照场景包括默认场景、人像场景、夜景、全景或者高动态场景中的至少一种;根据所述拍照场景下的预览图像和实拍图像在第一参数上的差异,对所述第三曝光参数值进行调整,得到第四曝光参数值;将所述拍照场景下的环境参数值和所述第四曝光参数值的对应关系添加至所述第二映射关系中。
一种可能的实现方式中,所述方法还包括:将当前拍照场景下的环境参数值和所述第二曝光参数值的对应关系添加至所述第二映射关系中。
一种可能的实现方式中,所述根据所述第一预览图像和所述第一实拍图像在亮度参数上的第二差异,对所述第一图像对应的亮度参数曲线进行调整,得到第二图像之前,所述方法还包括:判断当前拍照场景和所述第一实拍图像对应的拍照场景是否相同;若相同, 则根据所述第二差异,对所述第一图像对应的亮度参数曲线进行调整;若不同,则根据对所述第一曝光参数值所做的调整,对所述第一图像对应的亮度参数曲线进行调整,得到所述第二图像。
一种可能的实现方式中,所述根据所述第二差异,对所述第一图像对应的亮度参数曲线进行调整之前,所述方法还包括:根据第一置信度,确定是否生效所述第二差异,所述第一置信度用于表征所述第一实拍图像对应的拍照场景和第一拍照场景是同一场景的可能性,所述第一拍照场景为所述第一实拍图像的前一次实拍图像对应的拍照场景;若是,则根据所述第二差异,对所述第一图像对应的亮度参数曲线进行调整;若否,则根据对所述第一曝光参数值所做的调整,对所述第一图像对应的亮度参数曲线进行调整,得到所述第二图像。
一种可能的实现方式中,所述根据第一置信度,确定是否生效所述第二差异,包括:若所述第一置信度大于第一预设值,则生效所述第二差异;若所述第一置信度小于或者等于第一预设值,则不生效所述第二差异。
一种可能的实现方式中,所述根据所述第一预览图像和所述第一实拍图像在第三参数上的第三差异,对第一网络模型进行调整之前,所述方法还包括:判断当前拍照场景和所述第一实拍图像对应的拍照场景是否相同;若相同,则根据所述第三差异,对第一网络模型进行调整;若不同,则利用所述第一网络模型对所述第二图像进行处理,得到所述第二预览图像。
一种可能的实现方式中,所述根据所述第三差异,对第一网络模型进行调整之前,所述方法还包括:根据第一置信度,确定是否生效所述第三差异;若是,则根据所述第三差异,对第一网络模型进行调整;若否,则利用所述第一网络模型对所述第二图像进行处理,得到所述第二预览图像。
一种可能的实现方式中,所述根据第一置信度,确定是否生效所述第三差异,包括:若所述第一置信度大于第一预设值,则生效所述第三差异;若所述第一置信度小于或者等于第一预设值,则不生效所述第三差异。
一种可能的实现方式中,所述方法还包括:获取所述第二预览图像对应的第二实拍图像;判断所述第二实拍图像和第一实拍图像间隔的时间是否小于第二预设值;若是,则对比所述第二预览图像和所述第二实拍图像,得到所述第二预览图像和所述第二实拍图像在颜色参数、亮度参数、动态范围参数、对比度参数或者饱和度参数上至少一种差异。
一种可能的实现方式中,所述方法还包括:根据所述第二实拍图像和第一实拍图像间隔的时间,确定第二置信度,所述第二置信度用于表征当前拍照场景和所述第一实拍图像对应的拍照场景是同一场景的可能性。
第二方面,本申请提供一种电子设备,包括:一致性质量评估模块、智能曝光模块、全局亮度矫正模块、一致性增强模块以及摄像头;所述智能曝光模块用于,根据当前拍照场景下的环境参数值和第一映射关系,确定当前拍照场景对应的第一曝光参数值,所述曝光参数包括曝光值、曝光时间或者感光度中的至少一种,所述环境参数包括亮度参数或者动态范围参数中的至少一种,所述第一映射关系用于指示不同环境参数值和不同曝光参数值之间的对应关系;根据一致性质量评估模块反馈的当前拍照场景下的第一预览图像和第一实拍图像在第一参数上的第一差异,对所述第一曝光参数值进行调整,得到第二曝光参 数值,所述第一参数包括亮度参数或者动态范围参数中的至少一种;所述摄像头用于,根据所述第二曝光参数值采集第一图像;所述全局亮度矫正模块和一致性增强模块用于,对所述第一图像进行处理,得到第二预览图像。
一种可能的实现方式中,所述智能曝光模块具体用于:若所述第一差异包括亮区细节较少,则降低所述第一曝光参数值;若所述第一差异包括暗区细节较少,则提高所述第一曝光参数值。
一种可能的实现方式中,所述全局亮度矫正模块具体用于,根据所述第一预览图像和所述第一实拍图像在亮度参数上的第二差异,对所述第一图像对应的亮度参数曲线进行调整,得到第二图像;所述一致性增强模块具体用于,根据所述第一预览图像和所述第一实拍图像在第三参数上的第三差异,对第一网络模型进行调整,所述第三参数包括颜色参数、亮度参数、动态范围参数、对比度参数或者饱和度参数中的至少一种,得到第二网络模型;利用所述第二网络模型对所述第二图像进行处理,得到所述第二预览图像。
一种可能的实现方式中,所述全局亮度矫正模块具体用于,根据对所述第一曝光参数值所做的调整,对所述第一图像对应的亮度参数曲线进行初步调整,得到第三图像;根据所述第二差异,对所述第三图像对应的亮度参数曲线进行调整,得到所述第二图像。
一种可能的实现方式中,所述全局亮度矫正模块具体用于,若对所述第一曝光参数值所做的调整为提高所述第一曝光参数值,则降低所述第一图像对应的亮度参数曲线上亮区的亮度;若对所述第一曝光参数值所做的调整为降低所述第一曝光参数值,则提高所述第一图像对应的亮度参数曲线上暗区的亮度。
一种可能的实现方式中,所述全局亮度矫正模块具体用于,若所述第二差异为亮度偏高,则降低所述第三图像对应的亮度参数曲线上所有区域的亮度;若所述第二差异为亮度偏低,则提高所述第三图像对应的亮度参数曲线上所有区域的亮度。
一种可能的实现方式中,所述一致性增强模块具体用于,若所述第三差异为对比度参数偏低,则提高所述第一网络模型中对比度参数对应的网络模型的权重。
一种可能的实现方式中,所述智能曝光模块还用于,在第二映射关系中查找所述环境参数值对应的曝光参数值;若在所述第二映射关系中查不到所述环境参数值对应的曝光参数值,则根据所述环境参数值和第一映射关系,确定当前拍照场景对应的第一曝光参数值;若在所述第二映射关系中查到所述环境参数值对应的曝光参数值,则所述摄像头根据查到的曝光参数值采集所述第一图像。
一种可能的实现方式中,所述智能曝光模块还用于,在任一拍照场景下,根据所述拍照场景下的环境参数值和所述第一映射关系,确定所述拍照场景对应的第三曝光参数值,所述拍照场景包括默认场景、人像场景、夜景、全景或者高动态场景中的至少一种;根据所述拍照场景下的预览图像和实拍图像在第一参数上的第四差异,对所述第三曝光参数值进行调整,得到第四曝光参数值;将所述拍照场景下的环境参数值和所述第四曝光参数值的对应关系添加至所述第二映射关系中。
一种可能的实现方式中,所述智能曝光模块还用于,将当前拍照场景下的环境参数值和所述第二曝光参数值的对应关系添加至所述第二映射关系中。
一种可能的实现方式中,所述全局亮度矫正模块还用于,判断当前拍照场景和所述第一实拍图像对应的拍照场景是否相同;若相同,则根据所述第二差异,对所述第一图像对 应的亮度参数曲线进行调整;若不同,则根据对所述第一曝光参数值所做的调整,对所述第一图像对应的亮度参数曲线进行调整,得到所述第二图像。
一种可能的实现方式中,所述全局亮度矫正模块还用于,根据第一置信度,确定是否生效所述第二差异,所述第一置信度用于表征所述第一实拍图像对应的拍照场景和第一拍照场景是同一场景的可能性,所述第一拍照场景为所述第一实拍图像的前一次实拍图像对应的拍照场景;若是,则根据所述第二差异,对所述第一图像对应的亮度参数曲线进行调整;若否,则根据对所述第一曝光参数值所做的调整,对所述第一图像对应的亮度参数曲线进行调整,得到所述第二图像。
一种可能的实现方式中,所述全局亮度矫正模块具体用于,若所述第一置信度大于第一预设值,则生效所述第二差异;若所述第一置信度小于或者等于第一预设值,则不生效所述第二差异。
一种可能的实现方式中,所述一致性增强模块还用于,判断当前拍照场景和所述第一实拍图像对应的拍照场景是否相同;若相同,则根据所述第三差异,对第一网络模型进行调整;若不同,则利用所述第一网络模型对所述第二图像进行处理,得到所述第二预览图像。
一种可能的实现方式中,所述一致性增强模块还用于,根据第一置信度,确定是否生效所述第三差异;若是,则根据所述第三差异,对第一网络模型进行调整;若否,则利用所述第一网络模型对所述第二图像进行处理,得到所述第二预览图像。
一种可能的实现方式中,所述一致性增强模块具体用于,若所述第一置信度大于第一预设值,则生效所述第三差异;若所述第一置信度小于或者等于第一预设值,则不生效所述第三差异。
一种可能的实现方式中,所述一致性质量评估模块用于,获取所述第二预览图像对应的第二实拍图像;判断所述第二实拍图像和第一实拍图像间隔的时间是否小于第二预设值;若是,则对比所述第二预览图像和所述第二实拍图像,得到所述第二预览图像和所述第二实拍图像在颜色参数、亮度参数、动态范围参数、对比度参数或者饱和度参数上至少一种差异,并将所述第二预览图像和所述第二实拍图像在第一参数上的差异反馈给所述智能曝光模块,将所述第二预览图像和所述第二实拍图像在亮度参数上的差异反馈给所述全局亮度矫正模块,将所述第二预览图像和所述第二实拍图像在第三参数上的差异反馈给所述一致性增强模块。
一种可能的实现方式中,所述一致性质量评估模块还用于,
根据所述第二实拍图像和第一实拍图像间隔的时间,确定第二置信度,所述第二置信度用于表征当前拍照场景和所述第一实拍图像对应的拍照场景是同一场景的可能性,并将所述第二置信度反馈给所述全局亮度矫正模块和所述一致性增强模块。
第三方面,本申请提供一种电子设备,包括:存储器、处理器和摄像头;所述处理器用于与所述存储器耦合,读取并执行所述存储器中的指令,以实现第一方面的方法。
第四方面,本申请提供一种可读存储介质,所述可读存储介质上存储有计算机程序;所述计算机程序在被执行时,实现第一方面的方法。
本申请提供的拍照预览方法、电子设备以及存储介质,对终端设备的曝光参数进行调整时依据的曝光参数值是结合预览图像和实拍图像的差异确定的,使得摄像头采集的图像 更加逼近实拍图像,提升了预览图像和实拍图像显示效果一致性,提升了用户使用体验。
附图说明
图1为本申请提供的应用场景图一;
图2为本申请提供的应用场景图二;
图3为本申请提供的拍照模块300的框架图;
图4为本申请提供的一实施例的流程示意图;
图5为本申请提供的拍照模块500的框架图;
图6为本申请提供的反馈机制示意图一;
图7为本申请提供的反馈机制示意图二;
图8为本申请提供的拍照预览方法的一实施例的流程示意图;
图9为本申请提供的终端设备开发过程中获取环境参数值和曝光参数值之间的对应关系的流程示意图;
图10为本申请提供的拍照预览方法的另一实施例的流程示意图;
图11为本申请提供的拍照预览方法的另一实施例的流程示意图;
图12为本申请提供的拍照预览方法的另一实施例的流程示意图;
图13为本申请提供的应用场景图三;
图14为本申请提供的电子设备的结构示意图。
具体实施方式
本申请提供的拍照预览方法可应用于任何具有拍照功能的终端设备,该具有拍照功能的终端设备包括但不限于:手机、智慧屏、数码相机、平板电脑或者笔记本电脑。本申请的附图均以手机为例来示意本申请提供的预览实现过程。
图1为本申请提供的应用场景图,参见图1所示,当用户触发打开相机后,终端设备会跳转到拍照预览界面,终端设备将摄像头采集的图像实时显示在该拍照预览界面上,以供用户查看,该拍照预览界面上实时显示的图像可称为预览图像,预览图像可提供被摄场景和被摄物的姿态,使得用户可参考预览图像,调整拍摄角度以及曝光参数。
参见图2所示,当用户做好拍摄准备后,触发拍照,终端设备进而采用多帧融合技术得到实拍图像,多帧融合技术可将长短帧、长中短帧或者多短帧进行融合,其中,长帧为长曝光时间下采集的图像帧,短帧为短曝光时间下采集的图像帧,中帧为中等曝光时间下采集的图像帧,曝光时间越长,感光元件接收到的光线总量越多,越能捕捉暗区的细节。因此,长帧可以保证暗区细节的显示,短帧能够保证亮区细节的显示,将长短帧融合后得到的实拍图像能够将亮区细节和暗区细节均显示出来。然而,拍照预览界面显示的预览图像采用的是单帧方案,其无法同时兼顾亮区与暗区,致使用户在进行拍照前在终端设备上看到的预览图像和实拍图像显示效果不一致,如图2所示,左侧为预览图像,右侧为实拍图像,实拍图像相较于预览图像显示出更多的细节,预览图像和实拍图像显示效果的不一致极大地影响了用户的使用体验。
在一些实施例中,为了提升预览图像和实拍图像显示效果的一致性,参见图3所示,在终端设备的拍照模块300中设置曝光模块301和全局色调映射模块302。参见图4所示, 通过如下步骤提升预览图像和实拍图像显示效果的一致性:
S401、用户触发打开相机后,曝光模块301感知当前环境参数值,并根据当前环境参数值对终端设备的曝光参数进行调整。
一种可能的实现方式中,上述环境参数包括亮度参数或者动态范围参数中的至少一种。
一种可能的实现方式中,曝光模块301可通过感光元件感知当前环境参数值。感光元件包括但不限于:电荷耦合元件(Charge-coupled Device,CCD)或者互补金属氧化物半导体(Complementary Metal Oxide Semiconductor,CMOS)。
一种可能的实现方式中,曝光模块301得到当前环境参数值后,从预设映射关系中查找当前环境参数值对应的曝光参数基础值,依据该曝光参数基础值对终端设备的曝光参数进行调整,摄像头在调整后的曝光参数下采集图像。
S402、全局色调映射模块302基于统计信息对摄像头采集的图像做全局调整,得到预览图像。
一种可能的实现方式中,对摄像头采集的图像上各个像素的亮度参数进行统计,得到落在各个亮度区域的像素的总数,若落在亮区的像素的总数大于预设值,则确定图像整体偏亮,降低各个区域的亮度参数曲线,若落在暗区的像素的总数大于预设值,则确定图像整体偏暗,提高各个区域的亮度参数曲线。
上述实施例中,曝光模块301从预设映射关系中查找到的曝光参数基础值仅是和当前拍照场景大致匹配的值,全局色调映射模块302依据的统计信息也只是对摄像头采集的图像上各个像素的亮度进行统计得到的,经过这些模块处理后,预览图像和实拍图像显示效果的一致性仍然不够理想。
为了进一步提升预览图像和实拍图像显示效果的一致性,本申请提供一种实施例,将预览图像和实拍图像进行对比,得到两者在颜色参数、亮度参数、对比度参数、饱和度参数以及动态范围参数上的差异,将这些差异反馈给相应的图像处理模块,使得图像处理模块在预览过程中能够结合预览图像和实拍图像的差异对图像进行调整。经过该调整后得到的预览图像与实拍图像相似度更高,差异更小,提升了用户的使用体验。
图5为本申请提供的拍照模块500的框架图,该拍照模块500为终端设备中与拍照相关的模块,拍照模块500包括但不限于:一致性质量评估模块501、智能曝光模块502、全局亮度矫正模块503以及一致性增强模块504,下面对各个模块的功能逐一介绍:
其中,一致性质量评估模块501用于对比第一预览图像和第一实拍图像,得到第一预览图像和第一实拍图像在颜色参数、亮度参数、动态范围参数、对比度参数以及饱和度参数上的差异,并将第一预览图像和第一实拍图像在第一参数上的差异反馈给智能曝光模块502,参见图6所示。还用于在实拍图像满足预设条件时,将第一预览图像和第一实拍图像在亮度参数上的差异反馈给全局亮度矫正模块503,将第一预览图像和第一实拍图像在第三参数上的差异反馈给一致性增强模块504,参见图7所示。
其中,第一参数包括亮度参数或者动态范围参数中至少一种,第三参数包括颜色参数、亮度参数、动态范围参数、对比度参数以及饱和度参数中至少一种。
需要说明的是:一致性质量评估模块501可仅向全局亮度矫正模块503反馈,也可仅向一致性增强模块504反馈,也可向全局亮度矫正模块503和一致性增强模块504均反馈。
需要说明的是:一致性质量评估模块501向全局亮度矫正模块503和一致性增强模块 504均反馈时,一致性质量评估模块501可先向全局亮度矫正模块503反馈,再向一致性增强模块504反馈,也可先向一致性增强模块504反馈,再向全局亮度矫正模块503反馈,也可同时向全局亮度矫正模块503和一致性增强模块504反馈,本申请实施例对反馈的顺序不做限定。
一种可能的实现方式中,一致性质量评估模块501将第一预览图像和第一实拍图像的颜色参数进行对比,以确定第一预览图像和第一实拍图像相比是否存在色温偏冷或者色温偏暖的情况,若存在,则将该色温偏冷或者色温偏暖作为第一预览图像和第一实拍图像在颜色参数上的差异,若不存在,则确定第一预览图像和第一实拍图像在颜色参数上没有差异。
一种可能的实现方式中,一致性质量评估模块501将第一预览图像和第一实拍图像的亮度参数进行对比,以确定第一预览图像和第一实拍图像相比是否存在亮度偏高或者亮度偏低的情况,若存在,则将该亮度偏高或者亮度偏低作为第一预览图像和第一实拍图像在亮度参数上的差异,若不存在,则确定第一预览图像和第一实拍图像在亮度参数上没有差异。
一种可能的实现方式中,一致性质量评估模块501将第一预览图像和第一实拍图像的动态范围参数进行对比,以确定第一预览图像和第一实拍图像相比是否存在亮区细节较少或者暗区细节较少的情况,若存在,则将该亮区细节较少或者暗区细节较少作为第一预览图像和第一实拍图像在动态范围参数上的差异,若不存在,则确定第一预览图像和第一实拍图像在动态范围参数上没有差异。
一种可能的实现方式中,一致性质量评估模块501将第一预览图像和第一实拍图像的对比度参数进行对比,以确定第一预览图像和第一实拍图像相比是否存在对比度参数偏高或者对比度参数偏低的情况,若存在,则将该对比度参数偏高或者对比度参数偏低作为第一预览图像和第一实拍图像在对比度参数上的差异,若不存在,则确定第一预览图像和第一实拍图像在对比度参数上没有差异。
一种可能的实现方式中,一致性质量评估模块501将第一预览图像和第一实拍图像的饱和度参数进行对比,以确定第一预览图像和第一实拍图像相比是否存在饱和度参数偏高或者饱和度参数偏低的情况,若存在,则将该饱和度参数偏高或者饱和度参数偏低作为第一预览图像和第一实拍图像在饱和度参数上的差异,若不存在,则确定第一预览图像和第一实拍图像在饱和度参数上没有差异。
其中,智能曝光模块502用于摄像头被唤醒后感知当前拍照场景下的环境参数值,并根据当前拍照场景下的环境参数值,以及一致性质量评估模块501反馈的第一预览图像和第一实拍图像在第一参数上的第一差异,调整曝光参数值,经过该调整后,摄像头采集的图像更加接近实拍图像。
一种可能的实现方式中,参见上述实施例中S401的描述,智能曝光模块502可先从第一映射关系中查找当前拍照场景对应的第一曝光参数值,然后,根据一致性质量评估模块501反馈的第一预览图像和第一实拍图像在第一参数上的第一差异,对第一曝光参数值进行调整,得到第二曝光参数值。
其中,第一参数包括亮度参数或者动态范围参数中至少一种,第一差异为第一预览图像和第一实拍图像在第一参数上的差异。
其中,第一曝光参数值为当前拍照场景对应的曝光参数基础值,第一映射关系用于指示不同环境参数值和不同曝光参数值之间的对应关系,第一映射关系中的曝光参数值为曝光参数基础值,该曝光参数基础值是和对应拍照场景大致匹配的值。
一种可能的实现方式中,曝光参数包括以下参数中的至少一种:曝光值(Exposure Value,EV)、感光度(photosensibility,ISO)、曝光时间或者增益(Gain)。
一种可能的实现方式中,若第一预览图像和第一实拍图像在动态范围参数上的差异为亮区细节较少,智能曝光模块502对第一曝光参数值可做如下调整:降低第一曝光参数值;若第一预览图像和第一实拍图像在动态范围参数上的差异为暗区细节较少,智能曝光模块502对第一曝光参数值可做如下调整:提高第一曝光参数值。
一种可能的实现方式中,若第一预览图像和第一实拍图像在亮度参数上的差异为亮度偏高,智能曝光模块502对第一曝光参数值可做如下调整:降低第一曝光参数值;若第一预览图像和第一实拍图像在亮度参数上的差异为亮度偏低,智能曝光模块502对第一曝光参数值可做如下调整:提高第一曝光参数值。
一种可能的实现方式中,智能曝光模块502将对第一曝光参数值所做的调整发送给全局亮度矫正模块503。
其中,全局亮度矫正模块503用于根据智能曝光模块502对第一曝光参数值所做的调整,以及一致性质量评估模块501反馈的第一预览图像和第一实拍图像在亮度参数上的第二差异,对摄像头采集的第一图像对应的亮度参数曲线进行调整,得到第二图像,第二图像在全局亮度参数上更加接近实拍图像。
一种可能的实现方式中,全局亮度矫正模块503可先根据智能曝光模块502对第一曝光参数值数所做的调整,对摄像头采集的第一图像对应的亮度参数曲线进行初步调整,得到第三图像,然后根据一致性质量评估模块501反馈的第一预览图像和第一实拍图像在亮度参数上的第二差异,对第三图像对应的亮度参数曲线做进一步调整,得到第二图像。
其中,第三图像为初步矫正后的图像,第二图像为全局矫正后的图像。
其中,第二差异为第一预览图像和第一实拍图像在亮度参数上的差异。
一种可能的实现方式中,可通过如下方式实现上述初步调整,若智能曝光模块502为了显示暗区细节,对第一曝光参数值所做的调整为提高所述第一曝光参数值,全局亮度矫正模块503可降低第一图像对应的亮度参数曲线上亮区的亮度,避免经智能曝光模块502调整后,亮区亮度太高导致亮区细节无法显示;若智能曝光模块502为了显示亮区细节,对第一曝光参数值所做的调整为降低第一曝光参数值,全局亮度矫正模块503可提高第一图像对应的亮度参数曲线上暗区的亮度。避免经智能曝光模块502调整后,暗区亮度参数太低导致暗区细节无法显示。
一种可能的实现方式中,若第二差异为亮度偏低,全局亮度矫正模块503可做如下调整:提高第三图像对应的亮度参数曲线上所有区域的亮度。若第二差异为亮度偏高,全局亮度矫正模块503可做如下调整:降低第三图像对应的亮度参数曲线上所有区域的亮度。
一致性增强模块504用于根据一致性质量评估模块501反馈的第一预览图像和第一实拍图像在第三参数上的差异,对第一网络模型进行调整,得到第二网络模型,利用第二网络模型对第二图像进行处理,得到第二预览图像。
其中,第三参数包括颜色参数、亮度参数、动态范围参数、对比度参数或者饱和度参 数中至少一种。
一种可能的实现方式中,一致性增强模块504包括提前训练的第一网络模型,该第一网络模块包括多个维度的网络模型,该多个维度包括但不限于颜色参数、亮度参数、动态范围参数、对比度参数以及饱和度参数,网络模型的训练样本为经过全局亮度矫正模块503处理后的图像以及对应的实拍图像。在接收到第一预览图像和第一实拍图像在第三参数上差异后,可根据该差异对相应维度的网络模型的权重进行调整,经过该调整后得到的第二网络模型,利用该第二网络模型对第二图像进行处理后,得到的第二预览图像在对比度参数上更加逼近实拍图像。
下面对各个模块的调整过程举例说明:
参见表1所示,一致性质量评估模块501对比第一预览图像和第一实拍图像后,确定第一预览图像和第一实拍图像在亮度参数上差异为亮度偏低,在对比度参数上差异为对比度参数偏低,在动态范围参数上的差异为暗区内容少。一致性质量评估模块501将亮度参数和动态范围参数上的差异反馈给智能曝光模块502,将亮度参数上的差异反馈给全局亮度矫正模块503,将颜色参数、亮度参数、动态范围参数、对比度参数以及饱和度参数上的差异反馈给一致性增强模块504,参见表1所示,各个模块可做如下调整,智能曝光模块502提高EV,全局亮度矫正模块503提高第三图像对应的亮度参数曲线上所有区域的亮度,一致性增强模块504提高对比度参数对应的网络模型的权重,经过智能曝光模块502、全局亮度矫正模块503以及一致性增强模块504处理后,第二预览图像在颜色参数、亮度参数、动态范围参数、对比度参数以及饱和度参数上更加逼近实拍图像,提升了用户使用体验。
表1
Figure PCTCN2021116839-appb-000001
下面结合图1和图2所示场景详细说明本申请提供的拍照预览方法。图8为本申请提供的拍照预览方法的一实施例的流程示意图,本实施例提供的拍照预览方法应用于图5所示拍照模块500,本实施例提供的拍照预览方法可用于终端设备的处理器接收到第一触控操作后,该第一触控操作为用户触发打开相机的操作,参见图1所示,该第一触控操作可以是用户单机相机图标的操作,也可以是用户双击相机图标的操作,或者其他能够触发打开相机的操作,本申请对此不做限定,终端设备的处理器接收到第一触控操作后,唤醒终端设备上的摄像头,拍照模块500中各个模块执行如下步骤:
S801、智能曝光模块502感知当前拍照场景下的环境参数值。
一种可能的实现方式中,环境参数包括亮度参数或者动态范围参数中的至少一种。
一种可能的实现方式中,智能曝光模块502为摄像头的一个软件模块,摄像头被唤醒后,智能曝光模块502开始感知当前拍照场景下的环境参数值。智能曝光模块502感知环境参数值的过程可参见上述实施例的S401,本申请在此不再赘述。
S802、智能曝光模块502在第二映射关系中查找当前拍照场景下的环境参数值对应的曝光参数值。
其中,第二映射关系为预先存储的环境参数值和曝光参数值之间的对应关系。
上述第二映射关系包括终端设备开发过程中通过实拍测试得到的对应关系,以及终端设备实际使用过程中记录的对应关系。
下面对终端设备开发过程中获取环境参数值和曝光参数值之间的对应关系的实现方式进行说明:
在终端设备开发过程中,会在各种拍照场景下进行实拍测试,以得到不同拍照场景下环境参数值对应的曝光参数值,拍照场景包括但不限于正常拍照场景、人像场景、夜景、全景或者高动态场景,正常拍照场景也可理解为日常拍照场景或者普通拍照场景,正常拍照场景还可理解为打开相机后默认场景,正常拍照场景多用于白天。
参见图9所示,以正常拍照场景为例,对确定曝光参数值的过程进行说明,为方便说明,下文将前一次实拍的预览图像记为P_(i-1),将前一次实拍的实拍图像记为C_(i-1),将摄像头本次采集的图像记为R_i,将本次全局矫正后的图像记为图像Y_i,将本次预览图像记为图像P_i,将本次实拍图像记为图像C_i,将本次预览图像P_i与本次实拍图像C_i在第一参数上差异记为f_i。确定曝光参数值的过程具体包括:
其中,第一参数包括亮度参数或者动态范围参数中的至少一种。
步骤S8021、终端设备的摄像头被唤醒后,智能曝光模块502感知正常拍照场景下的环境参数值。
一种可能的实现方式中,环境参数包括亮度参数或者动态范围参数中的至少一种。
一种可能的实现方式中,智能曝光模块502感知环境参数值的过程可参见上述实施例的S401,本申请在此不再赘述。
步骤S8022、智能曝光模块502根据正常拍照场景下的环境参数值和第一映射关系,确定正常拍照场景对应的第三曝光参数值。
其中,第三曝光参数值为正常拍照场景对应的曝光参数基础值。
其中,第一映射关系用于指示不同环境参数值和不同曝光参数值之间的对应关系,第一映射关系中的曝光参数值为曝光参数基础值,曝光参数基础值是和对应拍照场景大致匹配的值。
步骤S8023、智能曝光模块502根据一致性质量评估模块501反馈的前一次实拍的预览图像P_(i-1)与实拍图像C_(i-1)在第一参数上的差异,对第三曝光参数值进行调整,得到本次调整后的曝光参数值。
一种可能的实现方式中,智能曝光模块502根据一致性质量评估模块501反馈的差异进行调整的方式可参见上文关于智能曝光模块502的介绍,本实施例在此不再赘述。
步骤S8024、摄像头根据本次调整后的曝光参数值采集图像,得到本次采集的图像R_i。
步骤S8025、全局亮度矫正模块503根据智能曝光模块502对第三曝光参数值所做的调整,对图像R_i对应的亮度参数曲线进行调整,得到本次全局矫正后的图像Y_i。
一种可能的实现方式中,全局亮度矫正模块503对图像R_i对应的亮度参数曲线进行调整的方式可参见上文关于全局亮度矫正模块503的介绍,本实施例在此不再赘述。
步骤S8026、利用第一网络模型对本次全局矫正后的图像Y_i进行处理,获得本次预览 图像P_i。
一种可能的实现方式中,一致性增强模块504包括第一网络模型,该第一网络模型包括提前训练的多个维度的网络模型,该多个维度包括但不限于颜色参数、亮度参数、动态范围参数、对比度参数以及饱和度参数,网络模型的训练样本为经过全局亮度矫正模块503处理后的图像以及对应的实拍图像。将本次全局矫正后的图像Y_i输入到第一网络模型后,依次经过多个维度网络模型的处理后,使得输出的预览图像在颜色参数、亮度参数、动态范围参数、对比度参数以及饱和度参数上更加逼近实拍图像。
步骤S8027、一致性质量评估模块501对比本次预览图像P_i与本次实拍图像C_i,得到本次预览图像P_i与本次实拍图像C_i在第一参数上差异f_i。
一种可能的实现方式中,在S8027得到本次预览图像P_i与本次实拍图像C_i在第一参数上差异f_i后,测试人员可通过该差异f_i判断正常拍照场景下预览图像和实拍图像细节显示的一致程度是否已经达到测试人员预先设置的要求,如果达到预先设置的要求,则不用再向智能曝光模块502反馈该差异f_i,直接将S8023得到的本次调整后的曝光参数值作为正常拍照场景下环境参数值对应的第四曝光参数值;若未达到要求,则继续向智能曝光模块502反馈该差异f_i,直到正常拍照场景下预览图像和实拍图像细节显示的的一致程度达到要求为止。将正常拍照场景下的环境参数值和第四曝光参数值的对应关系添加至第二映射关系中。
另一种可能的实现方式中,在S8027得到本次预览图像P_i与本次实拍图像C_i在第一参数上差异f_i后,可将该差异f_i输入预设的判断算法,利用该判断算法判断正常拍照场景下预览图像和实拍图像细节显示的一致程度是否已经达到要求,如果达到要求,则不用再向智能曝光模块502反馈该差异f_i,直接将S8023中得到的本次调整后的曝光参数值作为正常拍照场景下环境参数值对应的第四曝光参数值;若未达到要求,则继续向智能曝光模块502反馈该差异f_i,直到正常拍照场景下预览图像和实拍图像细节显示的的一致程度达到要求为止。将正常拍照场景下的环境参数值和第四曝光参数值的对应关系添加至第二映射关系中。
针对所有拍照场景,均使用上述方法确定对应的曝光参数值,便可得到多种环境参数值对应的曝光参数值。将环境参数值和曝光参数值之间的对应关系均添加至第二映射关系中,使得用户实际使用终端设备进行拍照时,智能曝光模块502能够从第二映射关系查找当前环境参数对应的曝光参数值。由于上述确定曝光参数值的过程结合了预览图像和实拍图像的差异,使得摄像头根据该曝光参数值采集的图像更加逼近实拍图像。
需要说明的是:在任一拍照场景下,第一次实拍之前一致性质量评估模块501不会反馈预览图与实拍图的差异。智能曝光模块502在第一次实拍之前不进行上述S8023的调整,此时,在S8024中摄像头根据第三曝光参数值采集图像。
以上为终端设备开发过程中获取环境参数值和曝光参数值之间的对应关系的实现方式。
S803、摄像头根据查到的曝光参数值采集第一图像。
其中,曝光参数包括EV、曝光时间或者ISO中的至少一种。
S804、全局亮度矫正模块503根据第一图像,对第一图像对应的亮度参数曲线进行调整,得到第二图像。
其中,第二图像为全局矫正后的图像。
一种可能的实现方式中,全局亮度矫正模块503对第一图像对应的亮度参数曲线进行调整的过程可参见S402,本实施例在此不再赘述。
S805、利用第一网络模型对第二图像进行处理,得到第二预览图像。
一种可能的实现方式中,一致性增强模块504包括第一网络模型,该第一网络模型包括提前训练的多个维度的网络模型,该多个维度包括但不限于颜色参数、亮度参数、动态范围参数、对比度参数以及饱和度参数,网络模型的训练样本为经过全局亮度矫正模块503处理后的图像以及对应的实拍图像。将第二图像输入到第一网络模型后,依次经过多个维度网络模型的处理后,使得输出的第二预览图像在颜色参数、亮度参数、动态范围参数、对比度参数以及饱和度参数上更加逼近实拍图像。
当终端设备的处理器接收到触发拍照的第二触控操作后,采用多帧融合技术获取实拍图像,参见图2所示,该第二触控操作可以是用户单击拍照按钮的操作,也可以是用户双击相机按钮的操作,或者其他能够触发拍照的操作,本申请对此不做限定。
S806、一致性质量评估模块501对比当前拍照场景下的预览图像和实拍图像,获取预览图像和实拍图像在第一参数上的差异。
一种可能的实现方式中,一致性质量评估模块501获取预览图像和实拍图像在第一参数上的差异的过程可参见上文关于一致性质量评估模块501的介绍,本实施例在此不再赘述。
S807、一致性质量评估模块501将预览图像和实拍图像在第一参数上的差异反馈给智能曝光模块502。
本实施例提供的拍照预览方法,智能曝光模块502对终端设备的曝光参数进行调整时依据的曝光参数值是终端设备开发过程中实拍测试得到的,该实拍测试过程结合了预览图像和实拍图像的差异来确定曝光参数值,使得摄像头在调整后的曝光参数下采集的图像更加逼近实拍图像,提升了预览图像和实拍图像显示效果一致性,提升了用户使用体验。
终端设备开发过程中通过实拍测试可得到多个环境参数值对应的曝光参数值,但是,实拍测试的拍照场景可能无法涵盖实际拍摄时的所有拍照场景。因此,S802中智能曝光模块502在第二映射关系中可能无法查找到当前拍照场景对应的曝光参数值。
图10为本申请提供的拍照预览方法的另一实施例的流程示意图,本实施例提供的拍照预览方法,包括:
S1001、智能曝光模块502感知当前拍照场景下的环境参数值。
S1002、智能曝光模块502在第二映射关系中查找当前拍照场景下的环境参数值对应的曝光参数值。
其中,S1001-S1002的实现过程可参见上述实施例中S801-S802,智能曝光模块502在第二映射关系中无法查找到当前环境参数值对应的曝光参数值情况下,可执行如下步骤。
S1003、智能曝光模块502根据当前拍照场景下的环境参数值和第一映射关系,确定当前拍照场景对应的第一曝光参数值。
其中,第一曝光参数值为当前拍照场景对应的曝光参数基础值。
其中,第一映射关系用于指示不同环境参数值和不同曝光参数值之间的对应关系,第一映射关系中的曝光参数值为曝光参数基础值,曝光参数基础值是和对应拍照场景大致匹 配的值。
S1004、智能曝光模块502根据一致性质量评估模块501反馈的当前拍照场景下的第一预览图像和第一实拍图像在第一参数上的第一差异,对所述第一曝光参数值进行调整,得到第二曝光参数值。
其中,第一参数包括亮度参数或者动态范围参数中的至少一种。
其中,第一差异为当前拍照场景下的第一预览图像和第一实拍图像在第一参数上的差异。
一种可能的实现方式中,智能曝光模块502根据一致性质量评估模块501反馈的差异对第一曝光参数值进行调整的方式可参见上文关于智能曝光模块502的介绍,本申请在此不再赘述。
一种可能的实现方式中,在得到第二曝光参数值后,可将当前环境参数值与该第二曝光参数值之间的对应关系添加至第二映射关系中,供终端设备再次进入当前拍照场景时在该第二映射关系中查找曝光参数值。
需要说明的是:S1004涉及的第一预览图像和第一实拍图像在第一参数上的第一差异可以是以往任何时候反馈的,比如,假设当前拍照场景为人像场景,用户过去在人像场景触发过拍照,那么一致性质量评估模块501可将这次拍照的预览图像与实拍图像在第一参数上的差异反馈给智能曝光模块502,当智能曝光模块502下次感知到环境参数值后,判断该环境参数值对应的是人像场景的情况下,可以直接使用一致性质量评估模块501过去反馈的差异,对曝光参数的基础值进行调整。
S1005、摄像头根据第二曝光参数值采集第一图像。
S1006、全局亮度矫正模块503根据第一图像,对第一图像对应的亮度参数曲线进行调整,得到第二图像。
S1007、利用第一网络模型对第二图像进行处理,得到第二预览图像。
S1006-S1007的实现方式可参见上述实施例中S804-S805,本实施例在此不再赘述。
当终端设备的处理器接收到触发拍照的第二触控操作后,采用多帧融合技术获取实拍图像,一致性质量评估模块501执行如下操作:
S1008、一致性质量评估模块501对比当前拍照场景下的预览图像和实拍图像,获取预览图像和实拍图像在第一参数上的差异。
S1009、一致性质量评估模块501将预览图像和实拍图像在第一参数上的差异反馈给智能曝光模块502。
S1008-S1009的实现方式可参见上述实施例中S806-S807,本实施例在此不再赘述。
本实施例提供的拍照预览方法,智能曝光模块502在第二映射关系中无法查找到当前环境参数值对应的曝光参数值时,根据一致性质量评估模块501反馈的当前拍照场景下的第一预览图像和第一实拍图像在第一参数上的第一差异来确定对应的曝光参数值,摄像头进而根据该曝光参数值采集第一图像。由于上述曝光参数值是结合当前拍照场景下的第一预览图像和第一实拍图像的差异确定的,可使摄像头采集的图像更加逼近实拍图像,提升了预览图像和实拍图像显示效果一致性,提升了用户使用体验。
当前一次实拍的拍照场景和当前拍照场景相比未变化时,前一次实拍时预览图像和实拍图像在亮度参数上的差异可作为全局亮度矫正模块503调整亮度参数曲线的依据,从而 使全局矫正后的图像在全局亮度参数上更加逼近实拍图像,因此,一致性质量评估模块501可将预览图像和实拍图像在亮度参数上的差异反馈给全局亮度矫正模块503。
其中,前一次实拍的预览图像为第一预览图像,前一次实拍的实拍图像为第一实拍图像。
图11为本申请提供的拍照预览方法的另一实施例的流程示意图,本实施例提供的拍照预览方法,包括:
S1101、智能曝光模块502感知当前拍照场景下的环境参数值。
S1102、智能曝光模块502在第二映射关系中查找当前拍照场景下的环境参数值对应的曝光参数值。
S1103、摄像头根据查到的曝光参数值采集第一图像。
S1101-S1103实现过程可参见上述实施例中的S801-S803。
以上为用户触发打开相机后智能曝光模块502执行的步骤。下面介绍全局亮度矫正模块503执行的步骤,全局亮度矫正模块503执行的步骤分为两种情况,若全局亮度矫正模块503接收到了一致性质量评估模块501反馈的第一预览图像与第一实拍图像在亮度参数上的差异,以及该差异的置信度,则执行S1104-S1106,若未接收到,则执行S1107。
S1104、全局亮度矫正模块503判断当前拍照场景和第一实拍图像对应的拍照场景是否相同,若相同,则执行S1105-S1106,则不同,则执行S1107。
一种可能的实现方式中,全局亮度矫正模块503可判断摄像头采集图像时刻与前一次实拍时刻间隔的时间是否超过预设值,若超过预设值,则确定拍照场景有变化,若未超过预设值,则确定拍照场景没有变化。
另一种可能的实现方式中,智能曝光模块502可判断当前环境参数值和前一次实拍时环境参数值之间的差异是否超过预设值,若超过预设值,则向全局亮度矫正模块503发送指令,以告知全局亮度矫正模块503拍照场景有变化,若未超过预设值,则向全局亮度矫正模块503发送指令,以告知全局亮度矫正模块503拍照场景没有变化。
S1105、全局亮度矫正模块503根据第一置信度,确定是否生效第二差异。若是,则执行S1106,若否,则执行S1107。
其中,第二差异为第一预览图像和第一实拍图像在亮度参数上的差异。
其中,第一置信度用于表征所述第一实拍图像对应的拍照场景和第一拍照场景是同一场景的可能性,所述第一拍照场景为所述第一实拍图像的前一次实拍图像对应的拍照场景。
一种可能的实现方式中,全局亮度矫正模块503可判断第一置信度是否大于第一预设值,若是,则可生效第二差异,若否,则不生效第二差异。
S1106、全局亮度矫正模块503根据第二差异,对第一图像对应的亮度参数曲线进行调整,得到第二图像。
一种可能的实现方式中,全局亮度矫正模块503根据智能曝光模块502对第一图像对应的亮度参数曲线进行调整的方法可参见上文关于全局亮度矫正模块503的介绍,本申请在此不再赘述。
由于全局亮度矫正模块503调整亮度参数曲线的过程参考了第一预览图像与第一实拍图像在亮度参数上的差异,经过该全局亮度矫正模块503调整后的图像在全局亮度参数上更加逼近实拍图像。
S1107、全局亮度矫正模块503根据智能曝光模块502根据对第一曝光参数值所做的调整,对第一图像对应的亮度参数曲线进行调整,得到第二图像。
其中,第二图像为全局矫正后的图像。
一种可能的实现方式中,全局亮度矫正模块503根据智能曝光模块502根据对第一曝光参数值所做的调整,对第一图像对应的亮度参数曲线进行调整的方法可参见上文关于全局亮度矫正模块503的介绍,本申请在此不再赘述。
S1108、利用第一网络模型对第二图像进行处理,得到第二预览图像。
S1108的实现方式可参见上述实施例中S805,本实施例在此不再赘述。
当终端设备的处理器接收到触发拍照的第二触控操作后,采用相应的出帧策略得到实拍图像,参见图2所示,该第二触控操作可以是用户单击拍照按钮的操作,也可以是用户双击相机按钮的操作,或者其他能够触发拍照的操作,本申请对此不做限定。
终端设备的处理器将实拍图像进一步发送给一致性质量评估模块501,在不同的拍照场景下,预览图像和实拍图像的差异不同,比如:在白天场景下,预览图像可能相对于实拍图像亮度偏低,而在晚上场景下,预览图像可能相对于实拍图像亮度是偏高的。当用户拍照场景有变时,比如用户前一次实拍在白天,后一次实拍在晚上,因为前后两次拍张场景的变化,前一次实拍图像和预览图像的差异并不能为后一次预览提供参考,一致性质量评估模块501可执行如下步骤:
一致性质量评估模块501在接收到处理器发送第二实拍图像后,判断第二实拍图像是否满足反馈差异的触发条件,若满足,则向全局亮度矫正模块503反馈第二预览图像和第二实拍图像在亮度参数上的差异;若不满足,则不向全局亮度矫正模块503反馈第二预览图像和第二实拍图像在亮度参数上的差异。
其中,第二实拍图像为第二预览图像对应的实拍图像。
一种可能的实现方式中,上述触发条件可以为第二实拍图像和第一实拍图像间隔的时间小于预设值,比如3s。也就是说,只有在第二实拍图像和第一实拍图像间隔的时间小于预设值的情况下,一致性质量评估模块501才会向全局亮度矫正模块503反馈相应的差异。
一种可能的实现方式中,一致性质量评估模块501还可根据第二实拍图像和第一实拍图像间隔的时间,确定第二置信度。一致性质量评估模块501向全局亮度矫正模块503反馈相应的差异时,还可同时反馈第二置信度,该第二置信度可用于全局亮度矫正模块503根据该第二置信度确定是否生效一致性质量评估模块501反馈的差异。
一种可能的实现方式中,可从第三映射关系中查找第二置信度,第三映射关系用于指示时间和置信度的对应关系。
其中,第二置信度用于表征当前拍照场景和第一实拍图像对应的拍照场景是同一场景的可能性。第二实拍图像和第一实拍图像间隔的时间越短,第二置信度越高,第二实拍图像和第一实拍图像间隔的时间越长,第二置信度越低。
另一种可能的实现方式中,上述触发条件可以为第二实拍图像对应的环境参数值和第一实拍图像对应的环境参数值差距小于预设值,也就是说,只有在第二实拍图像对应的环境参数值和第一实拍图像对应的环境参数值差距小于预设值的情况下,一致性质量评估模块501才会向全局亮度矫正模块503反馈相应的差异。
一种可能的实现方式中,一致性质量评估模块501还可根据第二实拍图像对应的环境 参数值和第一实拍图像对应的环境参数值的差距确定第二置信度。一致性质量评估模块501向全局亮度矫正模块503反馈相应的差异时,还可同时反馈第二置信度,该第二置信度可用于全局亮度矫正模块503根据该第二置信度确定是否生效一致性质量评估模块501反馈的差异。
一种可能的实现方式中,可从第四映射关系中查找第二置信度,第四映射关系用于指示环境参数值的差距和置信度的对应关系。
其中,第二置信度用于表征当前拍照场景和第一实拍图像对应的拍照场景是同一场景的可能性。第二实拍图像对应的环境参数值和第一实拍图像对应的环境参数值的差距越小,第二置信度越高,第二实拍图像对应的环境参数值和第一实拍图像对应的环境参数值的差距越大,第二置信度越低。
可选的,第二实拍图像对应的环境参数值和第一实拍图像对应的环境参数值的差距可由智能曝光模块502发送给一致性质量评估模块501。
上述触发条件的设置使得用户在同一拍照场景频繁拍照的情况下,终端设备提供的预览图像越来越逼近实拍图像,提升了用户使用体验。而且上文S1104中全局亮度矫正模块503对拍照场景的判断,使得用户更换拍照场景后,前一次实拍的预览图像与实拍图像之间的差异不会作用到更换拍照场景后的预览图像上,进一步提升了用户使用体验。
本实施例提供的拍照预览方法,当第二实拍图像满足预设条件时,一致性质量评估模块501可将第二预览图像和第二实拍图像在亮度参数上的差异反馈给全局亮度矫正模块503,全局亮度矫正模块503结合该差异对图像的亮度参数曲线进行调整,使全局矫正后的图像在全局亮度参数上更加逼近实拍图像。
当前一次实拍的拍照场景和当前拍照场景相比未变化时,前一次实拍时预览图像和实拍图像在第三参数上的差异可作为一致性增强模块504的调整依据,从而使一致性增强模块504输出的预览图像在颜色参数、亮度参数、对比度参数、饱和度参数以及动态范围参数上更加逼近实拍图像,因此,一致性质量评估模块501可将前一次实拍时预览图像和实拍图像在第三参数上的差异反馈给一致性增强模块504。
其中,第三参数包括颜色参数、亮度参数、对比度参数、饱和度参数或者动态范围参数中至少一种。前一次实拍的预览图像为第一预览图像,前一次实拍的实拍图像为第一实拍图像。
图12为本申请提供的拍照预览方法的另一实施例的流程示意图,本实施例提供的拍照预览方法,包括:
S1201、智能曝光模块502感知当前拍照场景下的环境参数值。
S1202、智能曝光模块502在第二映射关系中查找当前拍照场景下的环境参数值对应的曝光参数值。
S1203、摄像头根据查到的曝光参数值采集第一图像。
S1204、全局亮度矫正模块503根据第一图像,对第一图像对应的亮度参数曲线进行调整,得到第二图像。
S1201-S1204实现过程可参见上述实施例中的S801-S804。
下面介绍一致性增强模块504执行的步骤,一致性增强模块504执行的步骤分为两种情况,若一致性增强模块504接收到了一致性质量评估模块501反馈的第一预览图像与第 一实拍图像在第三参数上的差异,以及该差异的置信度,则执行S1205-S1207,若未接收到,则执行S1208。
S1205、一致性增强模块504判断当前拍照场景和第一实拍图像对应的拍照场景是否相同,若相同,则执行S1206-S1207,则不同,则执行S1208。
一种可能的实现方式中,一致性增强模块504可判断摄像头采集图像时刻与前一次实拍时刻间隔的时间是否超过预设值,若超过预设值,则确定拍照场景有变化,若未超过预设值,则确定拍照场景没有变化。
另一种可能的实现方式中,智能曝光模块502可判断当前环境参数值和前一次实拍时环境参数值之间的差异是否超过预设值,若超过预设值,则向一致性增强模块504发送指令,以告知一致性增强模块504拍照场景有变化,若未超过预设值,则向一致性增强模块504发送指令,以告知一致性增强模块504拍照场景没有变化。
S1206、一致性增强模块504根据第一置信度,确定是否生效第三差异。若是,则执行S1207,若否,则执行S1208。
一种可能的实现方式中,一致性增强模块504可判断第一置信度是否大于第一预设值,若是,则可生效第三差异,若否,则不生效第三差异。
其中,第一置信度用于表征所述第一实拍图像对应的拍照场景和第一拍照场景是同一场景的可能性,所述第一拍照场景为所述第一实拍图像的前一次实拍图像对应的拍照场景。
S1207、一致性增强模块504根据第三差异,对第一网络模型进行调整,得到第二预览图像。
一种可能的实现方式中,一致性增强模块504根据一致性质量评估模块501反馈的差异,对第一网络模型进行调整的方式可参见上文关于一致性增强模块504的介绍,本申请在此不再赘述。
S1208、利用第一网络模型对第二图像进行处理,得到第二预览图像。
S1208实现过程可参见上述实施例中的S805。
当终端设备的处理器接收到触发拍照的第二触控操作后,采用相应的出帧策略得到实拍图像,参见图2所示,该第二触控操作可以是用户单击拍照按钮的操作,也可以是用户双击相机按钮的操作,或者其他能够触发拍照的操作,本申请对此不做限定。
终端设备的处理器将实拍图像进一步发送给一致性质量评估模块501,在不同的拍照场景下,预览图像和实拍图像的差异不同,比如:在白天场景下,预览图像可能相对于实拍图像亮度偏低,而在晚上场景下,预览图像可能相对于实拍图像亮度是偏高的。当用户拍照场景有变时,比如用户前一次实拍在白天,后一次实拍在晚上,因为前后两次拍张场景的变化,前一次实拍图像和预览图像的差异并不能为后一次预览提供参考,一致性质量评估模块501可执行如下步骤:
一致性质量评估模块501在接收到处理器发送第二实拍图像后,判断第二实拍图像是否满足反馈差异的触发条件,若满足,则向一致性增强模块504反馈第二预览图像和第二实拍图像在第三参数上的差异;若不满足,则不向一致性增强模块504反馈第二预览图像和第二实拍图像在第三参数上的差异。
其中,第二实拍图像为第二预览图像对应的实拍图像。
一种可能的实现方式中,上述触发条件可以为第二实拍图像和第一实拍图像间隔的时 间小于预设值,比如3s。也就是说,只有在第二实拍图像和第一实拍图像间隔的时间小于预设值的情况下,一致性质量评估模块501才会向一致性增强模块504反馈相应的差异。
一种可能的实现方式中,一致性质量评估模块501还可根据第二实拍图像和第一实拍图像间隔的时间,确定第二置信度。一致性质量评估模块501向一致性增强模块504反馈相应的差异时,还可同时反馈第二置信度,该第二置信度可用于一致性增强模块504根据该第二置信度确定是否生效一致性质量评估模块501反馈的差异。
一种可能的实现方式中,可从第三映射关系中查找第二置信度,第三映射关系用于指示时间和置信度的对应关系。
其中,第二置信度用于表征当前拍照场景和第一实拍图像对应的拍照场景是同一场景的可能性。第二实拍图像和第一实拍图像间隔的时间越短,第二置信度越高,第二实拍图像和第一实拍图像间隔的时间越长,第二置信度越低。
另一种可能的实现方式中,上述触发条件可以为第二实拍图像对应的环境参数值和第一实拍图像对应的环境参数值差距小于预设值,也就是说,只有在第二实拍图像对应的环境参数值和第一实拍图像对应的环境参数值差距小于预设值的情况下,一致性质量评估模块501才会向一致性增强模块504反馈相应的差异。
一种可能的实现方式中,一致性质量评估模块304还可根据第二实拍图像对应的环境参数值和第一实拍图像对应的环境参数值的差距确定第二置信度。一致性质量评估模块501向一致性增强模块504反馈相应的差异时,还可同时反馈第二置信度,该第二置信度可用于一致性增强模块504根据该第二置信度确定是否生效一致性质量评估模块501反馈的差异。
一种可能的实现方式中,可从第四映射关系中查找第二置信度,第四映射关系用于指示环境参数值的差距和置信度的对应关系。
其中,第二置信度用于表征当前拍照场景和第一实拍图像对应的拍照场景是同一场景的可能性。第二实拍图像对应的环境参数值和第一实拍图像对应的环境参数值的差距越小,第二置信度越高,第二实拍图像对应的环境参数值和第一实拍图像对应的环境参数值的差距越大,第二置信度越低。
可选的,第二实拍图像对应的环境参数值和第一实拍图像对应的环境参数值的差距可由智能曝光模块502发送给一致性质量评估模块501。
上述触发条件的设置使得用户在同一拍照场景频繁拍照的情况下,终端设备提供的预览图像越来越逼近实拍图像,提升了用户使用体验。而且上文S1205中一致性增强模块504对拍照场景的判断,使得用户更换拍照场景后,前一次实拍的预览图像与实拍图像之间的差异不会作用到更换拍照场景后的预览图像上,进一步提升了用户使用体验。
本实施例提供的拍照预览方法,当第二实拍图像满足预设条件时,一致性质量评估模块501可将第二预览图像和第二实拍图像在第三参数上的差异反馈给一致性增强模块504,一致性增强模块504结合该差异调整模型权重,使输出的预览图像在颜色参数、亮度参数、对比度参数、饱和度参数以及动态范围参数上更加逼近实拍图像。
参见图13所示,左侧为通过上述实施例提供的方法得到的第二预览图像,右侧为第二预览图像对应的第二实拍图像。可见,经过上述智能曝光模块301根据一致性质量评估模块304反馈的差异对第一曝光参数值所做的调整,全局亮度矫正模块302根据一致性质 量评估模块304反馈的差异对图像的亮度参数曲线参数所做的调整,以及一致性增强模块303根据一致性质量评估模块304反馈的差异对全局矫正后的图像所做的调整,使得拍照模块500输出的预览图像更加逼近实拍图像,从而使用户能够通过预览图像提前获知实际拍摄的效果,极大程度地影响了用户的使用体验感。
图14示出了电子设备100的结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,传感器模块180,按键190,马达191,指示器192,摄像头193以及显示屏194等。其中传感器模块180可以包括接近光传感器180G,触摸传感器180K,环境光传感器180L等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口耦合摄像头193。例如:处理器110可以通过I2C接口耦合摄像头193,使处理器110与摄像头193通过I2C总线接口通信,实现电子设备100的拍照功能。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI 接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度参数,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
处理器110接收到第一触控操作后,唤醒摄像头193,摄像头193中的智能曝光模块感知当前环境参数值,在存储的环境参数值和曝光参数值之间的对应关系中查找当前环境参数值对应的曝光参数值,根据查找到的曝光参数值,对终端设备的曝光参数进行调整,由于环境参数值和曝光参数值之间的对应关系是结合预览图像和实拍图像之间的差异得到的,使得摄像头193在调整后的曝光参数下采集的图像更加逼近实拍图像,提升了预览图像和实拍图像显示效果一致性,提升了用户使用体验。
智能曝光模块在存储的环境参数值和曝光参数值之间的对应关系中无法查找到当前环境参数值对应的曝光参数值情况下,根据当前环境参数值,从第一映射关系中查找当前环境参数值对应的曝光参数基础值,根据一致性质量评估模块501反馈的当前环境参数下预览图像和实拍图像在亮度参数和动态范围参数上至少一种差异,对曝光参数基础值进行调整,得到调整后的曝光参数值,将当前环境参数值与该调整后的曝光参数值之间的对应关系记录下来,供电子设备在查找当前环境参数值对应的曝光参数值时使用。
在电子设备开发过程中,可通过图9所示方法配置环境参数值和曝光参数值之间的对应关系。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度参数。电子设备100可以根据感知的环境光亮度参数自适应调节显示屏194亮度参数。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以 确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。

Claims (39)

  1. 一种拍照预览方法,其特征在于,包括:
    根据当前拍照场景下的环境参数值和第一映射关系,确定当前拍照场景对应的第一曝光参数值,所述曝光参数包括曝光值、曝光时间或者感光度中的至少一种,所述环境参数包括亮度参数或者动态范围参数中的至少一种,所述第一映射关系用于指示不同环境参数值和不同曝光参数值之间的对应关系;
    根据当前拍照场景下的第一预览图像和第一实拍图像在第一参数上的第一差异,对所述第一曝光参数值进行调整,得到第二曝光参数值,所述第一参数包括亮度参数或者动态范围参数中的至少一种;
    摄像头根据所述第二曝光参数值采集第一图像;
    对所述第一图像进行处理,得到第二预览图像。
  2. 根据权利要求1所述的方法,其特征在于,所述根据当前拍照场景下的第一预览图像和第一实拍图像在第一参数上的第一差异,对所述第一曝光参数值进行调整,包括:
    若所述第一差异包括亮区细节较少,则降低所述第一曝光参数值;
    若所述第一差异包括暗区细节较少,则提高所述第一曝光参数值。
  3. 根据权利要求1或2所述的方法,其特征在于,所述对所述第一图像进行处理,得到第二预览图像,包括:
    根据所述第一预览图像和所述第一实拍图像在亮度参数上的第二差异,对所述第一图像对应的亮度参数曲线进行调整,得到第二图像;
    根据所述第一预览图像和所述第一实拍图像在第三参数上的第三差异,对第一网络模型进行调整,所述第三参数包括颜色参数、亮度参数、动态范围参数、对比度参数或者饱和度参数中的至少一种,得到第二网络模型;
    利用所述第二网络模型对所述第二图像进行处理,得到所述第二预览图像。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述第一预览图像和所述第一实拍图像在亮度参数上的第二差异,对所述第一图像对应的亮度参数曲线进行调整,得到第二图像,包括:
    根据对所述第一曝光参数值所做的调整,对所述第一图像对应的亮度参数曲线进行初步调整,得到第三图像;
    根据所述第二差异,对所述第三图像对应的亮度参数曲线进行调整,得到所述第二图像。
  5. 根据权利要求4所述的方法,其特征在于,所述根据对所述第一曝光参数值所做的调整,对所述第一图像对应的亮度参数曲线进行初步调整,包括:
    若对所述第一曝光参数值所做的调整为提高所述第一曝光参数值,则降低所述第一图像对应的亮度参数曲线上亮区的亮度;
    若对所述第一曝光参数值所做的调整为降低所述第一曝光参数值,则提高所述第一图像对应的亮度参数曲线上暗区的亮度。
  6. 根据权利要求4或5所述的方法,其特征在于,所述根据所述第二差异,对所述第三图像对应的亮度参数曲线进行调整,得到所述第二图像,得到所述第二图像,包括:
    若所述第二差异为亮度偏高,则降低所述第三图像对应的亮度参数曲线上所有区域的 亮度;
    若所述第二差异为亮度偏低,则提高所述第三图像对应的亮度参数曲线上所有区域的亮度。
  7. 根据权利要求3-6任一项所述的方法,其特征在于,所述根据所述第一预览图像和所述第一实拍图像在第三参数上的第三差异,对第一网络模型进行调整,包括:
    若所述第三差异为对比度参数偏低,则提高所述第一网络模型中对比度参数对应的网络模型的权重。
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述根据当前拍照场景下的环境参数值和第一映射关系,确定当前拍照场景对应的第一曝光参数值之前,所述方法还包括:
    在第二映射关系中查找所述环境参数值对应的曝光参数值;
    若在所述第二映射关系中查不到所述环境参数值对应的曝光参数值,则根据所述环境参数值和第一映射关系,确定当前拍照场景对应的第一曝光参数值;
    若在所述第二映射关系中查到所述环境参数值对应的曝光参数值,则所述摄像头根据查到的曝光参数值采集所述第一图像。
  9. 根据权利要求8所述的方法,其特征在于,所述在第二映射关系中查找所述环境参数值对应的曝光参数值之前,所述方法还包括:
    在任一拍照场景下,根据所述拍照场景下的环境参数值和所述第一映射关系,确定所述拍照场景对应的第三曝光参数值,所述拍照场景包括默认场景、人像场景、夜景、全景或者高动态场景中的至少一种;
    根据所述拍照场景下的预览图像和实拍图像在第一参数上的差异,对所述第三曝光参数值进行调整,得到第四曝光参数值;
    将所述拍照场景下的环境参数值和所述第四曝光参数值的对应关系添加至所述第二映射关系中。
  10. 根据权利要求1-9任一项所述的方法,其特征在于,所述方法还包括:
    将当前拍照场景下的环境参数值和所述第二曝光参数值的对应关系添加至所述第二映射关系中。
  11. 根据权利要求3-10任一项所述的方法,其特征在于,所述根据所述第一预览图像和所述第一实拍图像在亮度参数上的第二差异,对所述第一图像对应的亮度参数曲线进行调整,得到第二图像之前,所述方法还包括:
    判断当前拍照场景和所述第一实拍图像对应的拍照场景是否相同;
    若相同,则根据所述第二差异,对所述第一图像对应的亮度参数曲线进行调整;
    若不同,则根据对所述第一曝光参数值所做的调整,对所述第一图像对应的亮度参数曲线进行调整,得到所述第二图像。
  12. 根据权利要求11所述的方法,其特征在于,所述根据所述第二差异,对所述第一图像对应的亮度参数曲线进行调整之前,所述方法还包括:
    根据第一置信度,确定是否生效所述第二差异,所述第一置信度用于表征所述第一实拍图像对应的拍照场景和第一拍照场景是同一场景的可能性,所述第一拍照场景为所述第一实拍图像的前一次实拍图像对应的拍照场景;
    若是,则根据所述第二差异,对所述第一图像对应的亮度参数曲线进行调整;
    若否,则根据对所述第一曝光参数值所做的调整,对所述第一图像对应的亮度参数曲线进行调整,得到所述第二图像。
  13. 根据权利要求12所述的方法,其特征在于,所述根据第一置信度,确定是否生效所述第二差异,包括:
    若所述第一置信度大于第一预设值,则生效所述第二差异;
    若所述第一置信度小于或者等于第一预设值,则不生效所述第二差异。
  14. 根据权利要求3-13任一项所述的方法,其特征在于,所述根据所述第一预览图像和所述第一实拍图像在第三参数上的第三差异,对第一网络模型进行调整之前,所述方法还包括:
    判断当前拍照场景和所述第一实拍图像对应的拍照场景是否相同;
    若相同,则根据所述第三差异,对第一网络模型进行调整;
    若不同,则利用所述第一网络模型对所述第二图像进行处理,得到所述第二预览图像。
  15. 根据权利要求14所述的方法,其特征在于,所述根据所述第三差异,对第一网络模型进行调整之前,所述方法还包括:
    根据第一置信度,确定是否生效所述第三差异;
    若是,则根据所述第三差异,对第一网络模型进行调整;
    若否,则利用所述第一网络模型对所述第二图像进行处理,得到所述第二预览图像。
  16. 根据权利要求15所述的方法,其特征在于,所述根据第一置信度,确定是否生效所述第三差异,包括:
    若所述第一置信度大于第一预设值,则生效所述第三差异;
    若所述第一置信度小于或者等于第一预设值,则不生效所述第三差异。
  17. 根据权利要求1-16任一项所述的方法,其特征在于,所述方法还包括:
    获取所述第二预览图像对应的第二实拍图像;
    判断所述第二实拍图像和第一实拍图像间隔的时间是否小于第二预设值;
    若是,则对比所述第二预览图像和所述第二实拍图像,得到所述第二预览图像和所述第二实拍图像在颜色参数、亮度参数、动态范围参数、对比度参数或者饱和度参数上至少一种差异。
  18. 根据权利要求17所述的方法,其特征在于,所述方法还包括:
    根据所述第二实拍图像和第一实拍图像间隔的时间,确定第二置信度,所述第二置信度用于表征当前拍照场景和所述第一实拍图像对应的拍照场景是同一场景的可能性。
  19. 一种电子设备,包括:一致性质量评估模块、智能曝光模块、全局亮度矫正模块、一致性增强模块以及摄像头,其特征在于,
    所述智能曝光模块用于,根据当前拍照场景下的环境参数值和第一映射关系,确定当前拍照场景对应的第一曝光参数值,所述曝光参数包括曝光值、曝光时间或者感光度中的至少一种,所述环境参数包括亮度参数或者动态范围参数中的至少一种,所述第一映射关系用于指示不同环境参数值和不同曝光参数值之间的对应关系;根据一致性质量评估模块反馈的当前拍照场景下的第一预览图像和第一实拍图像在第一参数上的第一差异,对所述第一曝光参数值进行调整,得到第二曝光参数值,所述第一参数包括亮度参数或者动态范 围参数中的至少一种;
    所述摄像头用于,根据所述第二曝光参数值采集第一图像;
    所述全局亮度矫正模块和一致性增强模块用于,对所述第一图像进行处理,得到第二预览图像。
  20. 根据权利要求19所述的电子设备,其特征在于,所述智能曝光模块具体用于:
    若所述第一差异包括亮区细节较少,则降低所述第一曝光参数值;
    若所述第一差异包括暗区细节较少,则提高所述第一曝光参数值。
  21. 根据权利要求19或20所述的电子设备,其特征在于,
    所述全局亮度矫正模块具体用于,根据所述第一预览图像和所述第一实拍图像在亮度参数上的第二差异,对所述第一图像对应的亮度参数曲线进行调整,得到第二图像;
    所述一致性增强模块具体用于,根据所述第一预览图像和所述第一实拍图像在第三参数上的第三差异,对第一网络模型进行调整,所述第三参数包括颜色参数、亮度参数、动态范围参数、对比度参数或者饱和度参数中的至少一种,得到第二网络模型;利用所述第二网络模型对所述第二图像进行处理,得到所述第二预览图像。
  22. 根据权利要求21所述的电子设备,其特征在于,
    所述全局亮度矫正模块具体用于,根据对所述第一曝光参数值所做的调整,对所述第一图像对应的亮度参数曲线进行初步调整,得到第三图像;根据所述第二差异,对所述第三图像对应的亮度参数曲线进行调整,得到所述第二图像。
  23. 根据权利要求22所述的电子设备,其特征在于,
    所述全局亮度矫正模块具体用于,若对所述第一曝光参数值所做的调整为提高所述第一曝光参数值,则降低所述第一图像对应的亮度参数曲线上亮区的亮度;若对所述第一曝光参数值所做的调整为降低所述第一曝光参数值,则提高所述第一图像对应的亮度参数曲线上暗区的亮度。
  24. 根据权利要求22或23所述的电子设备,其特征在于,
    所述全局亮度矫正模块具体用于,若所述第二差异为亮度偏高,则降低所述第三图像对应的亮度参数曲线上所有区域的亮度;若所述第二差异为亮度偏低,则提高所述第三图像对应的亮度参数曲线上所有区域的亮度。
  25. 根据权利要求21-24任一项所述的电子设备,其特征在于,
    所述一致性增强模块具体用于,若所述第三差异为对比度参数偏低,则提高所述第一网络模型中对比度参数对应的网络模型的权重。
  26. 根据权利要求19-25任一项所述的电子设备,其特征在于,
    所述智能曝光模块还用于,在第二映射关系中查找所述环境参数值对应的曝光参数值;若在所述第二映射关系中查不到所述环境参数值对应的曝光参数值,则根据所述环境参数值和第一映射关系,确定当前拍照场景对应的第一曝光参数值;若在所述第二映射关系中查到所述环境参数值对应的曝光参数值,则所述摄像头根据查到的曝光参数值采集所述第一图像。
  27. 根据权利要求26所述的电子设备,其特征在于,
    所述智能曝光模块还用于,在任一拍照场景下,根据所述拍照场景下的环境参数值和所述第一映射关系,确定所述拍照场景对应的第三曝光参数值,所述拍照场景包括默认场 景、人像场景、夜景、全景或者高动态场景中的至少一种;根据所述拍照场景下的预览图像和实拍图像在第一参数上的第四差异,对所述第三曝光参数值进行调整,得到第四曝光参数值;将所述拍照场景下的环境参数值和所述第四曝光参数值的对应关系添加至所述第二映射关系中。
  28. 根据权利要求19-28任一项所述的电子设备,其特征在于,
    所述智能曝光模块还用于,将当前拍照场景下的环境参数值和所述第二曝光参数值的对应关系添加至所述第二映射关系中。
  29. 根据权利要求21-28任一项所述的电子设备,其特征在于,
    所述全局亮度矫正模块还用于,判断当前拍照场景和所述第一实拍图像对应的拍照场景是否相同;若相同,则根据所述第二差异,对所述第一图像对应的亮度参数曲线进行调整;若不同,则根据对所述第一曝光参数值所做的调整,对所述第一图像对应的亮度参数曲线进行调整,得到所述第二图像。
  30. 根据权利要求29所述的电子设备,其特征在于,
    所述全局亮度矫正模块还用于,根据第一置信度,确定是否生效所述第二差异,所述第一置信度用于表征所述第一实拍图像对应的拍照场景和第一拍照场景是同一场景的可能性,所述第一拍照场景为所述第一实拍图像的前一次实拍图像对应的拍照场景;若是,则根据所述第二差异,对所述第一图像对应的亮度参数曲线进行调整;若否,则根据对所述第一曝光参数值所做的调整,对所述第一图像对应的亮度参数曲线进行调整,得到所述第二图像。
  31. 根据权利要求30所述的电子设备,其特征在于,
    所述全局亮度矫正模块具体用于,若所述第一置信度大于第一预设值,则生效所述第二差异;若所述第一置信度小于或者等于第一预设值,则不生效所述第二差异。
  32. 根据权利要求21-31任一项所述的电子设备,其特征在于,
    所述一致性增强模块还用于,判断当前拍照场景和所述第一实拍图像对应的拍照场景是否相同;若相同,则根据所述第三差异,对第一网络模型进行调整;若不同,则利用所述第一网络模型对所述第二图像进行处理,得到所述第二预览图像。
  33. 根据权利要求32所述的电子设备,其特征在于,
    所述一致性增强模块还用于,根据第一置信度,确定是否生效所述第三差异;若是,则根据所述第三差异,对第一网络模型进行调整;若否,则利用所述第一网络模型对所述第二图像进行处理,得到所述第二预览图像。
  34. 根据权利要求33所述的电子设备,其特征在于,
    所述一致性增强模块具体用于,若所述第一置信度大于第一预设值,则生效所述第三差异;若所述第一置信度小于或者等于第一预设值,则不生效所述第三差异。
  35. 根据权利要求19-34任一项所述的电子设备,其特征在于,
    所述一致性质量评估模块用于,获取所述第二预览图像对应的第二实拍图像;判断所述第二实拍图像和第一实拍图像间隔的时间是否小于第二预设值;若是,则对比所述第二预览图像和所述第二实拍图像,得到所述第二预览图像和所述第二实拍图像在颜色参数、亮度参数、动态范围参数、对比度参数或者饱和度参数上至少一种差异,并将所述第二预览图像和所述第二实拍图像在第一参数上的差异反馈给所述智能曝光模块,将所述第二预 览图像和所述第二实拍图像在亮度参数上的差异反馈给所述全局亮度矫正模块,将所述第二预览图像和所述第二实拍图像在第三参数上的差异反馈给所述一致性增强模块。
  36. 根据权利要求35所述的电子设备,其特征在于,
    所述一致性质量评估模块还用于,
    根据所述第二实拍图像和第一实拍图像间隔的时间,确定第二置信度,所述第二置信度用于表征当前拍照场景和所述第一实拍图像对应的拍照场景是同一场景的可能性,并将所述第二置信度反馈给所述全局亮度矫正模块和所述一致性增强模块。
  37. 一种电子设备,其特征在于,包括:存储器、处理器和摄像头;所述处理器用于与所述存储器耦合,读取并执行所述存储器中的指令,以实现权利要求1-18中任一项所述的方法,所述摄像头用于采集图像。
  38. 一种可读存储介质,其特征在于,所述可读存储介质上存储有计算机程序;所述计算机程序在被执行时,实现上述权利要求1-18任一项所述的方法。
  39. 一种程序产品,其特征在于,所述程序产品包括计算机程序,所述计算机程序存储在可读存储介质中,通信装置的至少一个处理器可以从所述可读存储介质读取所述计算机程序,所述至少一个处理器执行所述计算机程序使得通信装置实施如权利要求1-18任意一项所述的方法。
PCT/CN2021/116839 2020-10-22 2021-09-07 拍照预览方法、电子设备以及存储介质 WO2022083325A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011141178.X 2020-10-22
CN202011141178.XA CN114390212B (zh) 2020-10-22 2020-10-22 拍照预览方法、电子设备以及存储介质

Publications (1)

Publication Number Publication Date
WO2022083325A1 true WO2022083325A1 (zh) 2022-04-28

Family

ID=81195038

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/116839 WO2022083325A1 (zh) 2020-10-22 2021-09-07 拍照预览方法、电子设备以及存储介质

Country Status (2)

Country Link
CN (1) CN114390212B (zh)
WO (1) WO2022083325A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115460355A (zh) * 2022-08-31 2022-12-09 青岛海信移动通信技术股份有限公司 一种图像采集方法及装置
WO2024027331A1 (zh) * 2022-08-05 2024-02-08 荣耀终端有限公司 拍照方法和相关装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102369723A (zh) * 2011-08-29 2012-03-07 华为终端有限公司 自动曝光方法、装置和成像设备
US20120069212A1 (en) * 2010-09-16 2012-03-22 Canon Kabushiki Kaisha Image capture with adjustment of imaging properties at transitions between regions
CN105611037A (zh) * 2015-07-22 2016-05-25 宇龙计算机通信科技(深圳)有限公司 终端的控制方法、终端的控制装置和终端
CN107241504A (zh) * 2017-06-08 2017-10-10 努比亚技术有限公司 一种图像处理方法、移动终端和计算机可读存储介质
CN108495033A (zh) * 2018-03-28 2018-09-04 努比亚技术有限公司 一种拍照调控方法、设备及计算机可读存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104243827A (zh) * 2014-09-23 2014-12-24 深圳市中兴移动通信有限公司 拍摄方法和装置
CN107613191B (zh) * 2017-08-01 2020-09-01 努比亚技术有限公司 一种拍照方法、设备及计算机可读存储介质
CN110392214A (zh) * 2019-08-05 2019-10-29 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及电子设备
CN110445988B (zh) * 2019-08-05 2021-06-25 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120069212A1 (en) * 2010-09-16 2012-03-22 Canon Kabushiki Kaisha Image capture with adjustment of imaging properties at transitions between regions
CN102369723A (zh) * 2011-08-29 2012-03-07 华为终端有限公司 自动曝光方法、装置和成像设备
CN105611037A (zh) * 2015-07-22 2016-05-25 宇龙计算机通信科技(深圳)有限公司 终端的控制方法、终端的控制装置和终端
CN107241504A (zh) * 2017-06-08 2017-10-10 努比亚技术有限公司 一种图像处理方法、移动终端和计算机可读存储介质
CN108495033A (zh) * 2018-03-28 2018-09-04 努比亚技术有限公司 一种拍照调控方法、设备及计算机可读存储介质

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024027331A1 (zh) * 2022-08-05 2024-02-08 荣耀终端有限公司 拍照方法和相关装置
CN115460355A (zh) * 2022-08-31 2022-12-09 青岛海信移动通信技术股份有限公司 一种图像采集方法及装置
CN115460355B (zh) * 2022-08-31 2024-03-29 青岛海信移动通信技术有限公司 一种图像采集方法及装置

Also Published As

Publication number Publication date
CN114390212A (zh) 2022-04-22
CN114390212B (zh) 2023-03-24

Similar Documents

Publication Publication Date Title
WO2023015981A1 (zh) 图像处理方法及其相关设备
WO2021223500A1 (zh) 一种拍摄方法及设备
WO2024045670A1 (zh) 生成高动态范围视频的方法和电子设备
WO2022083325A1 (zh) 拍照预览方法、电子设备以及存储介质
CN116320771B (zh) 一种拍摄方法和电子设备
CN116055897B (zh) 拍照方法及其相关设备
WO2024087804A1 (zh) 切换摄像头的方法与电子设备
CN116744120B (zh) 图像处理方法和电子设备
WO2023077939A1 (zh) 摄像头的切换方法、装置、电子设备及存储介质
CN115604572A (zh) 图像的获取方法及装置
CN115633262A (zh) 图像处理方法和电子设备
WO2021185374A1 (zh) 一种拍摄图像的方法及电子设备
WO2024179100A1 (zh) 一种拍摄方法
WO2024174625A1 (zh) 图像处理方法和电子设备
WO2023160221A1 (zh) 一种图像处理方法和电子设备
CN117135471B (zh) 一种图像处理方法和电子设备
WO2023035919A1 (zh) 控制曝光的方法、装置与电子设备
CN113891008B (zh) 一种曝光强度调节方法及相关设备
CN115767290A (zh) 图像处理方法和电子设备
WO2023160220A1 (zh) 一种图像处理方法和电子设备
CN116055855B (zh) 图像处理方法及其相关设备
CN117692753B (zh) 一种拍照方法及电子设备
WO2024179058A1 (zh) 图像处理方法和电子设备
WO2024169338A1 (zh) 一种拍摄方法和电子设备
WO2024109203A1 (zh) 拍照处理方法和电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21881744

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21881744

Country of ref document: EP

Kind code of ref document: A1