Image preview method, image preview device, electronic device, and storage medium
Patent Information
- Application Number
- CN202210887271.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-26
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2042-07-26
AI Technical Summary
但是这样会引入一个概率性的问题,相机的第一张输出图像,因为相机硬件内部的原因,会呈现白色或者黑色的图像,在一些曝光环境中,白色或者黑色的图像会引起跳闪
[0054]The image preview method in this embodiment includes: acquiring a first frame image; determining whether the first frame image meets a frame skipping condition; if the first frame image meets the frame skipping condition, skipping the first frame image and presenting a second frame image as the preview image in the preview window; wherein, the frame skipping condition includes at least the occurrence of flickering when the frame image is presented in the current environment. In this application, the occurrence of flickering when the frame image is presented in the current environment is used as the frame skipping condition to determine whether the first frame image needs to be skipped. When flickering occurs when the first frame image is presented in the current environment, the first frame image is skipped, and the second frame image is presented as the preview image in the preview window. By judging this condition, the occurrence of flickering can be reduced, and the phenomenon of blind frame skipping of the first frame image can be reduced, thereby reducing the probability of invalid frame skipping by the camera.
Smart Images

Figure CN117528225B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of electronic technology, and in particular to an image preview method, an image preview device, an electronic device, and a storage medium. Background Technology
[0002] With the rapid development of electronic technology, many electronic devices have integrated cameras with photo-taking capabilities. Currently, to improve the speed of image output, the first image output by the camera is often used as a preview. However, this introduces a probabilistic problem: due to internal camera hardware limitations, the first output image may appear as a white or black image. In some exposure environments, a white or black image can cause flickering. Summary of the Invention
[0003] This disclosure provides an image preview method, an image preview device, an electronic device, and a storage medium.
[0004] A first aspect of this disclosure provides an image preview method, comprising:
[0005] Get the first frame image;
[0006] Determine whether the first frame image meets the frame skipping condition;
[0007] If the first frame image meets the frame skipping condition, the first frame image is skipped, and the second frame image is presented as the preview image in the preview window; wherein, the frame skipping condition includes at least the occurrence of flickering when the frame image is presented in the current environment.
[0008] In some embodiments, determining whether the first frame image meets the frame skipping condition includes:
[0009] Determine whether the first frame image contains texture information;
[0010] If the first frame image does not have texture information, then determine whether the brightness value of the first frame image is consistent with the current exposure environment;
[0011] If the brightness value of the first frame image does not conform to the current exposure environment, then the first frame image is determined to meet the frame skipping condition.
[0012] In some embodiments, the brightness value of the first frame image does not conform to the current exposure environment, including:
[0013] The brightness of the current exposure environment is greater than the first brightness threshold, resulting in overexposure.
[0014] The brightness value of the first frame image is less than a first brightness value; wherein, the first frame image with a brightness value less than the first brightness value exhibits flickering in the current exposure environment where overexposure occurs; or,
[0015] The brightness of the current exposure environment is less than the second brightness threshold, resulting in underexposure. The first brightness threshold is greater than the second brightness threshold.
[0016] The brightness value of the first frame image is greater than the second brightness value; wherein, the first frame image with the brightness value greater than the second brightness value has flickering in the current exposure environment where underexposure occurs; the second brightness value is greater than the first brightness value.
[0017] In some embodiments, the brightness value of the first frame image, which is less than the first brightness value, is 0, and in the current exposure environment exhibiting overexposure, flickering exists; or,
[0018] The brightness value of the first frame image, which is greater than the second brightness value, is 255. In the current exposure environment where underexposure is present, there is flickering.
[0019] In some embodiments, the method includes:
[0020] If the first frame image does not meet the frame skipping condition, then the first frame image is used as the preview image and presented in the preview window.
[0021] In some embodiments, the first frame image does not meet the frame skipping condition, including:
[0022] If the first frame image contains texture information, it is determined that the first frame image does not meet the frame skipping condition, and the first frame image is used as the preview image and presented in the preview window.
[0023] In some embodiments, the first frame image does not meet the frame skipping condition, including:
[0024] The first frame image has no texture information, and the brightness value of the first frame image conforms to the current exposure environment; wherein, the brightness value of the first frame image conforms to the current exposure environment includes: the brightness of the current exposure environment is greater than a second brightness threshold, and the brightness of the current exposure environment is less than a first brightness threshold; or,
[0025] The brightness of the current exposure environment is greater than a first brightness threshold, and the brightness value of the first frame image is greater than or equal to the first brightness value; or,
[0026] The brightness of the current exposure environment is less than the second brightness threshold, and the brightness value of the first frame image is less than or equal to the second brightness value, wherein the second brightness value is greater than the first brightness value.
[0027] A second aspect of this disclosure provides an image preview device, comprising:
[0028] The first processing unit is used to acquire the first frame image;
[0029] The second processing unit is used to determine whether the first frame image meets the frame skipping condition.
[0030] The third processing unit is configured to skip the first frame image and present the second frame image as a preview image in the preview window if the first frame image meets the frame skipping condition; wherein the frame skipping condition includes at least the occurrence of flickering when the frame image is presented in the current environment.
[0031] In some embodiments, the second processing unit is used for
[0032] Determine whether the first frame image contains texture information;
[0033] If the first frame image does not have texture information, then determine whether the brightness value of the first frame image is consistent with the current exposure environment;
[0034] If the brightness value of the first frame image does not conform to the current exposure environment, then the first frame image is determined to meet the frame skipping condition.
[0035] In some embodiments, the brightness value of the first frame image does not conform to the current exposure environment, including:
[0036] The brightness of the current exposure environment is greater than the first brightness threshold, resulting in overexposure.
[0037] The brightness value of the first frame image is less than a first brightness value; wherein, the first frame image with a brightness value less than the first brightness value exhibits flickering in the current exposure environment where overexposure occurs; or,
[0038] The brightness of the current exposure environment is less than the second brightness threshold, resulting in underexposure. The first brightness threshold is greater than the second brightness threshold.
[0039] The brightness value of the first frame image is greater than the second brightness value; wherein, the first frame image with the brightness value greater than the second brightness value has flickering in the current exposure environment where underexposure occurs; the second brightness value is greater than the first brightness value.
[0040] In some embodiments, the brightness value of the first frame image, which is less than the first brightness value, is 0, and in the current exposure environment exhibiting overexposure, flickering exists; or,
[0041] The brightness value of the first frame image, which is greater than the second brightness value, is 255. In the current exposure environment where underexposure is present, there is flickering.
[0042] In some embodiments, the device includes:
[0043] If the first frame image does not meet the frame skipping condition, then the first frame image is used as the preview image and presented in the preview window.
[0044] In some embodiments, the first frame image does not meet the frame skipping condition, including:
[0045] If the first frame image contains texture information, it is determined that the first frame image does not meet the frame skipping condition, and the first frame image is used as the preview image and presented in the preview window.
[0046] In some embodiments, the first frame image does not meet the frame skipping condition, including:
[0047] The first frame image has no texture information, and the brightness value of the first frame image conforms to the current exposure environment; wherein, the brightness value of the first frame image conforms to the current exposure environment includes: the brightness of the current exposure environment is greater than a second brightness threshold, and the brightness of the current exposure environment is less than a first brightness threshold; or,
[0048] The brightness of the current exposure environment is greater than a first brightness threshold, and the brightness value of the first frame image is greater than or equal to the first brightness value; or,
[0049] The brightness of the current exposure environment is less than the second brightness threshold, and the brightness value of the first frame image is less than or equal to the second brightness value, wherein the second brightness value is greater than the first brightness value.
[0050] A third aspect of this disclosure provides an electronic device, comprising:
[0051] A processor and a memory for storing a computer program capable of running on the processor, wherein the processor, when running the computer program, performs the steps of the method described in the first aspect.
[0052] A fourth aspect of this disclosure provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of the method described in the first aspect.
[0053] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0054] The image preview method in this embodiment includes: acquiring a first frame image; determining whether the first frame image meets a frame skipping condition; if the first frame image meets the frame skipping condition, skipping the first frame image and presenting a second frame image as the preview image in the preview window; wherein, the frame skipping condition includes at least the occurrence of flickering when the frame image is presented in the current environment. In this application, the occurrence of flickering when the frame image is presented in the current environment is used as the frame skipping condition to determine whether the first frame image needs to be skipped. When flickering occurs when the first frame image is presented in the current environment, the first frame image is skipped, and the second frame image is presented as the preview image in the preview window. By judging this condition, the occurrence of flickering can be reduced, and the phenomenon of blind frame skipping of the first frame image can be reduced, thereby reducing the probability of invalid frame skipping by the camera.
[0055] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0056] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0057] Figure 1 This is a flowchart illustrating an image preview method according to an exemplary embodiment.
[0058] Figure 2 This is an image preview process illustrated according to an exemplary embodiment.
[0059] Figure 3 This is a schematic diagram of an image preview device structure according to an exemplary embodiment.
[0060] Figure 4 This is a schematic diagram illustrating an application scenario of an electronic device with a shooting function according to an exemplary embodiment.
[0061] Figure 5 This is a device block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0062] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses consistent with some aspects of this disclosure as detailed in the appended claims.
[0063] With the rapid development of electronic technology, many electronic devices have integrated cameras with photo-taking capabilities. Currently, to improve the speed of image output, the first image output by the camera is often used as a preview. However, this introduces a probabilistic problem: due to internal camera hardware limitations, the first output image may appear as either white or black. In certain exposure environments, white or black images can cause flickering, severely impacting the user experience. Skipping the first frame, on the other hand, results in a longer interval between opening the camera and the image output, similarly giving the user the impression of a slow camera startup. Because these are low-probability issues, a suitable method needs to be chosen to minimize both of these impacts.
[0064] This disclosure provides an image preview method. Figure 1 This is a flowchart illustrating an image preview method according to an exemplary embodiment. Figure 1 As shown, the image preview method includes:
[0065] Step 10: Obtain the first frame image;
[0066] Step 11: Determine whether the first frame image meets the frame skipping condition;
[0067] Step 12: If the first frame image meets the frame skipping condition, then skip the first frame image and present the second frame image as the preview image in the preview window; wherein, the frame skipping condition includes at least the occurrence of flickering when the frame image is presented in the current environment.
[0068] In this embodiment of the disclosure, the image preview method can be applied to any electronic device with a camera that takes pictures and outputs images, including mobile phones, iPads, tablets, etc.
[0069] In this embodiment of the disclosure, when the first frame image is a pure black or pure white image, there may be a flickering phenomenon in an overexposed or underexposed environment. In this case, it is necessary to skip frames of the first frame image.
[0070] The image preview method in this embodiment includes: acquiring a first frame image; determining whether the first frame image meets a frame skipping condition; if the first frame image meets the frame skipping condition, skipping the first frame image and presenting a second frame image as the preview image in the preview window; wherein, the frame skipping condition includes at least the occurrence of flickering when the frame image is presented in the current environment. In this application, the occurrence of flickering when the frame image is presented in the current environment is used as the frame skipping condition to determine whether the first frame image needs to be skipped. When flickering occurs when the first frame image is presented in the current environment, the first frame image is skipped, and the second frame image is presented as the preview image in the preview window. By judging this condition, the occurrence of flickering can be reduced, and the phenomenon of blind frame skipping of the first frame image can be reduced, thereby reducing the probability of invalid frame skipping by the camera. Simultaneously, the current frame's 3A statistics are skipped to prevent the statistical information of the current frame from affecting 3A convergence.
[0071] In some embodiments, determining whether the first frame image meets the frame skipping condition includes:
[0072] Determine whether the first frame image contains texture information;
[0073] If the first frame image does not have texture information, then determine whether the brightness value of the first frame image is consistent with the current exposure environment;
[0074] If the brightness value of the first frame image does not conform to the current exposure environment, then the first frame image is determined to meet the frame skipping condition.
[0075] In this embodiment, texture information refers to image information that is clearly visible on the image. When the first frame image has texture information, the first frame image is previewed normally. When the first frame image does not have texture information, it is necessary to detect the brightness of the environment when the camera takes the picture to determine whether the brightness value of the first frame image matches the current exposure environment, that is, whether the first frame image will exhibit flickering under the current environment.
[0076] In some embodiments, the brightness value of the first frame image does not conform to the current exposure environment, including:
[0077] The brightness of the current exposure environment is greater than the first brightness threshold, resulting in overexposure.
[0078] The brightness value of the first frame image is less than a first brightness value; wherein, the first frame image with a brightness value less than the first brightness value exhibits flickering in the current exposure environment where overexposure occurs; or,
[0079] The brightness of the current exposure environment is less than the second brightness threshold, resulting in underexposure. The first brightness threshold is greater than the second brightness threshold.
[0080] The brightness value of the first frame image is greater than the second brightness value; wherein, the first frame image with the brightness value greater than the second brightness value has flickering in the current exposure environment where underexposure occurs; the second brightness value is greater than the first brightness value.
[0081] In some optional embodiments of this disclosure, the first brightness threshold can be greater than 10 × 6 lux. When the brightness of the current exposure environment is greater than the first brightness threshold, it indicates that the current exposure environment is overexposed. If the brightness value of the first frame image is very small at this time, or even 0-level gray, the first frame image is prone to flickering in the current environment, and the first frame image needs to be skipped.
[0082] In some optional embodiments of this disclosure, the second brightness threshold can be less than 1 lux. When the brightness of the current exposure environment is less than the second brightness threshold, it indicates that the current exposure environment is underexposed. If the brightness value of the first frame image is very high at this time, even reaching 255 levels of gray, the first frame image is prone to flickering in the current environment, and the first frame image needs to be skipped. The values of the first and second brightness thresholds depend on the camera sensor, as different camera sensors have different light sensitivity levels.
[0083] In this embodiment of the disclosure, the brightness value of the first frame image, which is less than the first brightness value, is 0-level grayscale. In the current exposure environment where overexposure occurs, flickering exists; or,
[0084] The brightness value of the first frame image, which is greater than the second brightness value, is 255 levels of gray. In the current exposure environment where underexposure occurs, flickering is present. The range of the first brightness value can be from 0 levels of gray to 50 levels of gray; the range of the second brightness value can be from 255 levels of gray to 200 levels of gray.
[0085] Specifically, for 8-bit images, the range of brightness values is from gray level 0 to gray level 255; for 10-bit images, the range is from gray level 0 to gray level 1023. The range of the second brightness value can be adjusted for different bit images.
[0086] In some embodiments, the method includes:
[0087] If the first frame image does not meet the frame skipping condition, then the first frame image is used as the preview image and presented in the preview window.
[0088] In this embodiment of the disclosure, when the first frame image does not meet the frame skipping condition, the first frame image can be presented normally in the preview window as a preview image.
[0089] In this embodiment of the disclosure, the first frame image does not meet the frame skipping condition, including:
[0090] If the first frame image contains texture information, it is determined that the first frame image does not meet the frame skipping condition, and the first frame image is used as the preview image and presented in the preview window.
[0091] In this embodiment of the disclosure, the first frame image contains texture information, indicating that there is obvious image information in the image, and generally there will be no flickering phenomenon. Therefore, the first frame image can be presented as a preview image in the preview window.
[0092] In some embodiments, the first frame image does not meet the frame skipping condition, including:
[0093] The first frame image has no texture information, and the brightness value of the first frame image conforms to the current exposure environment; wherein, the brightness value of the first frame image conforms to the current exposure environment includes: the brightness of the current exposure environment is greater than a second brightness threshold, and the brightness of the current exposure environment is less than a first brightness threshold; or,
[0094] The brightness of the current exposure environment is greater than a first brightness threshold, and the brightness value of the first frame image is greater than or equal to the first brightness value; or,
[0095] The brightness of the current exposure environment is less than the second brightness threshold, and the brightness value of the first frame image is less than or equal to the second brightness value, wherein the second brightness value is greater than the first brightness value.
[0096] In this embodiment of the disclosure, the brightness of the current exposure environment is greater than the second brightness threshold and less than the first brightness threshold. At this time, the exposure environment is in a normal exposure environment, and the frame image generally does not exhibit flickering. Therefore, the first frame image can be presented as a preview image in the preview window.
[0097] Figure 2 This is an image preview process illustrated according to an exemplary embodiment. For example... Figure 2 As shown, the image preview process includes:
[0098] Step 20: Turn on the camera;
[0099] Step 21: Verify whether the first frame image has texture information;
[0100] Step 22: Check the light sensor information;
[0101] Step 23: Determine whether the current ambient brightness is greater than the first brightness threshold, or whether the current ambient brightness is less than the second brightness threshold;
[0102] Step 24: If the current ambient brightness is greater than the first brightness threshold, determine whether the first frame image is a pure white image; or, if the current ambient brightness is less than the second brightness threshold, determine whether the second frame image is a pure black image.
[0103] Step 25: If the current ambient brightness is greater than the first brightness threshold, skip the first frame image if it is not a pure white image; or if the current ambient brightness is less than the second brightness threshold, skip the first frame image if it is not a pure black image.
[0104] Step 26: When the current ambient brightness is greater than the first brightness threshold, if the first frame image is a pure white image, stop the frame skipping operation and output the first frame image as a preview image; or, when the current ambient brightness is less than the second brightness threshold, if the first frame image is a pure black image, stop the frame skipping operation and output the first frame image as a preview image.
[0105] This disclosure provides an image preview device. Figure 3 This is a schematic diagram illustrating the structure of an image preview device according to an exemplary embodiment. For example... Figure 3 As shown, it includes:
[0106] The first processing unit 31 is used to acquire the first frame image;
[0107] The second processing unit 32 is used to determine whether the first frame image meets the frame skipping condition.
[0108] The third processing unit 33 is configured to skip the first frame image and present the second frame image as a preview image in the preview window if the first frame image meets the frame skipping condition; wherein the frame skipping condition includes at least the occurrence of flickering when the frame image is presented in the current environment.
[0109] In this embodiment of the disclosure, the image preview method can be applied to any electronic device with a camera that takes pictures and outputs images, including mobile phones, iPads, tablets, etc.
[0110] In this embodiment of the disclosure, when the first frame image is a pure black or pure white image, there may be a flickering phenomenon in an overexposed or underexposed environment. In this case, it is necessary to skip frames of the first frame image.
[0111] The image preview device in this embodiment is used to: acquire a first frame image; determine whether the first frame image meets the frame skipping condition; if the first frame image meets the frame skipping condition, skip the first frame image and present the second frame image as the preview image in the preview window; wherein, the frame skipping condition includes at least the occurrence of flickering when the frame image is presented in the current environment. In this application, the occurrence of flickering when the frame image is presented in the current environment is used as the frame skipping condition to determine whether the first frame image needs to be skipped. When flickering occurs when the first frame image is presented in the current environment, the first frame image is skipped, and the second frame image is presented as the preview image in the preview window. By judging this condition, the occurrence of flickering can be reduced, and the phenomenon of blind frame skipping of the first frame image can be reduced, thereby reducing the probability of invalid frame skipping by the camera.
[0112] In some embodiments, the second processing unit is used for
[0113] Determine whether the first frame image contains texture information;
[0114] If the first frame image does not have texture information, then determine whether the brightness value of the first frame image is consistent with the current exposure environment;
[0115] If the brightness value of the first frame image does not conform to the current exposure environment, then the first frame image is determined to meet the frame skipping condition.
[0116] In this embodiment, texture information refers to image information that is clearly visible on the image. When the first frame image has texture information, the first frame image is previewed normally. When the first frame image does not have texture information, it is necessary to detect the brightness of the environment when the camera takes the picture to determine whether the brightness value of the first frame image matches the current exposure environment, that is, whether the first frame image will exhibit flickering under the current environment.
[0117] In some embodiments, the brightness value of the first frame image does not conform to the current exposure environment, including:
[0118] The brightness of the current exposure environment is greater than the first brightness threshold, resulting in overexposure.
[0119] The brightness value of the first frame image is less than a first brightness value; wherein, the first frame image with a brightness value less than the first brightness value exhibits flickering in the current exposure environment where overexposure occurs; or,
[0120] The brightness of the current exposure environment is less than the second brightness threshold, resulting in underexposure. The first brightness threshold is greater than the second brightness threshold.
[0121] The brightness value of the first frame image is greater than the second brightness value; wherein, the first frame image with the brightness value greater than the second brightness value has flickering in the current exposure environment where underexposure occurs; the second brightness value is greater than the first brightness value.
[0122] In this embodiment of the disclosure, the first brightness threshold is greater than 10 × 6 lux. When the brightness of the current exposure environment is greater than the first brightness threshold, it indicates that the current exposure environment is overexposed. If the brightness value of the first frame image is very small at this time, or even 0-level gray, the first frame image is prone to flickering in the current environment, and the first frame image needs to be skipped.
[0123] In this embodiment, the second brightness threshold is less than 1 lux. When the brightness of the current exposure environment is less than the second brightness threshold, it indicates that the current exposure environment is underexposed. If the brightness value of the first frame image is very high, even reaching 255 levels of gray, the first frame image is prone to flickering in the current environment, and the first frame image needs to be skipped. The values of the first and second brightness thresholds depend on the camera sensor, as different camera sensors have different light sensitivity levels.
[0124] In this embodiment of the disclosure, the brightness value of the first frame image, which is less than the first brightness value, is 0-level grayscale. In the current exposure environment where overexposure occurs, flickering exists; or,
[0125] The brightness value of the first frame image, which is greater than the second brightness value, is 255 levels of gray. In the current exposure environment where underexposure is present, there is flickering.
[0126] In this embodiment of the disclosure, the brightness value of the first frame image, which is less than the first brightness value, is 0-level grayscale. In the current exposure environment where overexposure occurs, flickering exists; or,
[0127] The brightness value of the first frame image, which is greater than the second brightness value, is 255 levels of gray. In the current exposure environment where underexposure is present, there is flickering.
[0128] In some embodiments, the device includes:
[0129] If the first frame image does not meet the frame skipping condition, then the first frame image is used as the preview image and presented in the preview window.
[0130] In this embodiment of the disclosure, when the first frame image does not meet the frame skipping condition, the first frame image can be presented normally in the preview window as a preview image.
[0131] In some embodiments, the first frame image does not meet the frame skipping condition, including:
[0132] If the first frame image contains texture information, it is determined that the first frame image does not meet the frame skipping condition, and the first frame image is used as the preview image and presented in the preview window.
[0133] In this embodiment of the disclosure, the first frame image contains texture information, indicating that there is obvious image information in the image, and generally there will be no flickering phenomenon. Therefore, the first frame image can be presented as a preview image in the preview window.
[0134] In some embodiments, the first frame image does not meet the frame skipping condition, including:
[0135] The first frame image has no texture information, and the brightness value of the first frame image conforms to the current exposure environment; wherein, the brightness value of the first frame image conforms to the current exposure environment includes: the brightness of the current exposure environment is greater than a second brightness threshold, and the brightness of the current exposure environment is less than a first brightness threshold; or,
[0136] The brightness of the current exposure environment is greater than a first brightness threshold, and the brightness value of the first frame image is greater than or equal to the first brightness value; or,
[0137] The brightness of the current exposure environment is less than the second brightness threshold, and the brightness value of the first frame image is less than or equal to the second brightness value, wherein the second brightness value is greater than the first brightness value.
[0138] In this embodiment of the disclosure, the brightness of the current exposure environment is greater than the second brightness threshold and less than the first brightness threshold. At this time, the exposure environment is in a normal exposure environment, and the frame image generally does not exhibit flickering. Therefore, the first frame image can be presented as a preview image in the preview window.
[0139] This disclosure provides an electronic device, including:
[0140] A processor and a memory for storing a computer program capable of running on the processor, wherein the processor, when running the computer program, performs the steps of the methods described in the various embodiments.
[0141] This disclosure provides a computer-readable storage medium storing a computer program thereon, characterized in that the computer program, when executed by a processor, implements the steps of the methods described in the various embodiments.
[0142] Figure 4 This is a schematic diagram illustrating an application scenario of an electronic device with a camera function, according to an exemplary embodiment. For example... Figure 4As shown, electronic devices 101 and 102 with camera functionality can be used in a cellular network. Upon receiving an instruction to use cellular circuitry for wireless transmission, the Wi-Fi connection is stopped; upon receiving an instruction to stop using cellular circuitry for wireless transmission, the Wi-Fi connection is restored. The network environment includes electronic devices 101 and 102, a Wi-Fi access point 103, a cellular base station 104, and a network 105.
[0143] Figure 5 This is a device block diagram illustrating an electronic device according to an exemplary embodiment. For example, the electronic device may be a mobile phone, computer, digital broadcasting electronic device, messaging transceiver, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0144] Reference Figure 5 The electronic device may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input / output (I / O) interface 812, sensor component 814, and communication component 816.
[0145] Processing component 802 typically controls the overall operation of an electronic device, such as operations associated with touch, telephone calls, data communication, camera operation, and recording. Processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0146] Memory 804 is configured to store various types of data to support the operation of the electronic device. Examples of this data include instructions for any application or method operating on the electronic device, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0147] Power component 806 provides power to various components of an electronic device. Power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device.
[0148] Multimedia component 808 includes a screen that provides an output interface between an electronic device and a user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the electronic device is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0149] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when the electronic device is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
[0150] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0151] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of the electronic device. For example, sensor assembly 814 can detect the on / off state of the electronic device, the relative positioning of components such as the display and keypad of the electronic device, changes in the position of the electronic device or a component of the electronic device, the presence or absence of user contact with the electronic device, the orientation or acceleration / deceleration of the electronic device, and temperature changes of the electronic device. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0152] Communication component 816 is configured to facilitate wired or wireless communication between electronic devices and other devices. The electronic devices can access wireless networks based on communication standards, such as WiFi, 4G, or 5G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0153] In an exemplary embodiment, the electronic device may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0154] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0155] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. An image preview method, characterized in that, include: Get the first frame image; Determine whether the first frame image meets the frame skipping condition; Determining whether the first frame image meets the frame skipping condition includes: if the first frame image does not have texture information and the brightness value of the first frame image does not conform to the current exposure environment, then the first frame image is determined to meet the frame skipping condition; the brightness value of the first frame image not conforming to the current exposure environment includes: determining, based on the brightness value of the first frame image, that the first frame image has flickering in the current exposure environment where it is overexposed; or, determining, based on the brightness value of the first frame image, that the first frame image has flickering in the current exposure environment where it is underexposed; if the first frame image meets the frame skipping condition, then the first frame image is skipped, and the second frame image is presented as a preview image in the preview window; wherein, the frame skipping condition includes at least the occurrence of flickering when the frame image is presented in the current environment.
2. The image preview method according to claim 1, characterized in that, The method further includes: Determine whether the first frame image contains texture information; If the first frame image does not have texture information, then determine whether the brightness value of the first frame image matches the current exposure environment.
3. The image preview method according to claim 1, characterized in that, The step of determining, based on the brightness value of the first frame image, that the first frame image exhibits flickering in the current exposure environment where overexposure is present includes: The brightness of the current exposure environment is greater than the first brightness threshold, resulting in overexposure. The brightness value of the first frame image is less than a first brightness value; wherein, the first frame image with a brightness value less than the first brightness value exhibits flickering in the current exposure environment where overexposure occurs; or, The step of determining, based on the brightness value of the first frame image, that the first frame image has flicker in the current exposure environment exhibiting underexposure includes: The brightness of the current exposure environment is less than the second brightness threshold, resulting in underexposure. The first brightness threshold is greater than the second brightness threshold. The brightness value of the first frame image is greater than the second brightness value; wherein, the first frame image with the brightness value greater than the second brightness value has flickering in the current exposure environment where underexposure occurs; the second brightness value is greater than the first brightness value.
4. The image preview method according to claim 3, characterized in that, The brightness value of the first frame image, which is less than the first brightness value, is 0. In the current exposure environment where overexposure occurs, there is flickering. or, The brightness value of the first frame image, which is greater than the second brightness value, is 255. In the current exposure environment where underexposure is present, there is flickering.
5. The image preview method according to claim 1, characterized in that, The method includes: If the first frame image does not meet the frame skipping condition, then the first frame image is used as the preview image and presented in the preview window.
6. The image preview method according to claim 5, characterized in that, The first frame image does not meet the frame skipping condition, including: If the first frame image contains texture information, it is determined that the first frame image does not meet the frame skipping condition, and the first frame image is used as the preview image and presented in the preview window.
7. The image preview method according to claim 5, characterized in that, The first frame image does not meet the frame skipping condition, including: The first frame image does not contain texture information, and the brightness value of the first frame image conforms to the current exposure environment; wherein, the brightness value of the first frame image conforms to the current exposure environment includes: The brightness of the current exposure environment is greater than the second brightness threshold, and the brightness of the current exposure environment is less than the first brightness threshold; or, The brightness of the current exposure environment is greater than a first brightness threshold, and the brightness value of the first frame image is greater than or equal to the first brightness value; or, The brightness of the current exposure environment is less than the second brightness threshold, and the brightness value of the first frame image is less than or equal to the second brightness value, wherein the second brightness value is greater than the first brightness value.
8. An image preview device, characterized in that, include: The first processing unit is used to acquire the first frame image; The second processing unit is used to determine whether the first frame image meets the frame skipping condition. Specifically, it is used to determine that the first frame image meets the frame skipping condition if the first frame image does not have texture information and the brightness value of the first frame image does not conform to the current exposure environment. The brightness value of the first frame image does not conform to the current exposure environment, including: determining, based on the brightness value of the first frame image, that the first frame image has flicker in the current exposure environment where it is overexposed; or, determining, based on the brightness value of the first frame image, that the first frame image has flicker in the current exposure environment where it is underexposed. The third processing unit is configured to skip the first frame image and present the second frame image as a preview image in the preview window if the first frame image meets the frame skipping condition; wherein the frame skipping condition includes at least the occurrence of flickering when the frame image is presented in the current environment.
9. The image preview device according to claim 8, characterized in that, The second processing unit is used for: Determine whether the first frame image contains texture information; If the first frame image does not have texture information, then determine whether the brightness value of the first frame image matches the current exposure environment.
10. The image preview device according to claim 8, characterized in that, The step of determining, based on the brightness value of the first frame image, that the first frame image exhibits flickering in the current exposure environment where overexposure is present includes: The brightness of the current exposure environment is greater than the first brightness threshold, resulting in overexposure. The brightness value of the first frame image is less than a first brightness value; wherein, the first frame image with a brightness value less than the first brightness value exhibits flickering in the current exposure environment where overexposure occurs; or, The step of determining, based on the brightness value of the first frame image, that the first frame image has flicker in the current exposure environment exhibiting underexposure includes: The brightness of the current exposure environment is less than the second brightness threshold, resulting in underexposure. The first brightness threshold is greater than the second brightness threshold. The brightness value of the first frame image is greater than the second brightness value; wherein, the first frame image with the brightness value greater than the second brightness value has flickering in the current exposure environment where underexposure occurs; the second brightness value is greater than the first brightness value.
11. The image preview device according to claim 10, characterized in that, The brightness value of the first frame image, which is less than the first brightness value, is 0. In the current exposure environment where overexposure occurs, there is flickering. or, The brightness value of the first frame image, which is greater than the second brightness value, is 255. In the current exposure environment where underexposure is present, there is flickering.
12. The image preview device according to claim 8, characterized in that, The third processing unit is used for: If the first frame image does not meet the frame skipping condition, then the first frame image is used as the preview image and presented in the preview window.
13. The image preview device according to claim 12, characterized in that, The first frame image does not meet the frame skipping condition, including: If the first frame image contains texture information, it is determined that the first frame image does not meet the frame skipping condition, and the first frame image is used as the preview image and presented in the preview window.
14. The image preview device according to claim 13, characterized in that, The first frame image does not meet the frame skipping condition, including: The first frame image has no texture information, and the brightness value of the first frame image conforms to the current exposure environment; wherein, the brightness value of the first frame image conforms to the current exposure environment includes: the brightness of the current exposure environment is greater than a second brightness threshold, and the brightness of the current exposure environment is less than a first brightness threshold; or, The brightness of the current exposure environment is greater than a first brightness threshold, and the brightness value of the first frame image is greater than or equal to the first brightness value; or, The brightness of the current exposure environment is less than the second brightness threshold, and the brightness value of the first frame image is less than or equal to the second brightness value, wherein the second brightness value is greater than the first brightness value.
15. An electronic device, characterized in that, include: A processor and a memory for storing a computer program capable of running on the processor, wherein the processor, when running the computer program, performs the steps of the method according to any one of claims 1 to 7.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Imaging device, method for controlling imaging device and program product
CN102053453A
Digital cameras having reduced startup time, and related devices, methods, and computer program products
CN106031149A