Image acquisition method and device, electronic equipment and storage medium
By generating and correcting images based on ambient light sensing in an electronic device, optimizing processing is performed to generate the second and third images for comparison and analysis, the problem of difficult to determine the quality of the image acquisition module is solved, and the accuracy of the acquisition quality is improved sex.
Patent Information
- Application Number
- CN202310532742.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-11
- Publication Date
- 2024-11-12
AI Technical Summary
The image quality of image acquisition by image acquisition modules in existing electronic devices is difficult to determine and there are accuracy problems.
By generating a first image based on ambient light sensing, correcting and optimizing processing is performed, and the second and third images are generated, for comparative analysis to determine the acquisition quality of the image acquisition module, and to increase the data source to improve accuracy.
By comparing the second and third images with the same acquisition scene but different processing flows, the accuracy of the image acquisition module acquisition image quality is improved.
Smart Images

Figure CN118945479A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image technology, and in particular to an image acquisition method and device, an electronic device and a storage medium. Background Art
[0002] Currently, the image processing function of electronic devices is a commonly used function by users. With the continuous development of electronic devices, the enhancement of electronic device processing capabilities and the development of image acquisition technology, users have higher and higher requirements for the quality of captured images.
[0003] Well, since all electronic devices are currently equipped with image acquisition modules, the quality of the images acquired by the image acquisition modules has a great impact on the effect of the final image. In the related art, it is difficult to determine the quality of the images acquired by the image acquisition modules, or there is an inaccurate quality determination. Summary of the invention
[0004] The present invention provides an image acquisition method and device, an electronic device and a storage medium.
[0005] A first aspect of an embodiment of the present disclosure provides an image acquisition method, which is applied to an electronic device, including:
[0006] generating a first image based on ambient light sensing;
[0007] Correcting the first image to obtain a second image;
[0008] storing the second image;
[0009] performing optimization processing on the second image to generate a third image;
[0010] The second image and the third image are at least used to determine the image acquisition quality of the image acquisition module.
[0011] Based on the above solution, before generating the first image based on ambient light sensing, the method further includes:
[0012] After the image acquisition module is started, an image processing process is created; wherein the image processing process includes: a cache node of the second image;
[0013] The storing the second image comprises:
[0014] Based on the cache node, the second image is persisted.
[0015] Based on the above solution, the step of generating a first image based on ambient light sensing includes:
[0016] A plurality of different image acquisition modules generate a plurality of the first images based on the ambient light sensor and using the same acquisition parameters;
[0017] The correcting the first image to obtain the second image includes:
[0018] Correcting the plurality of the first images to obtain the plurality of the second images, wherein the plurality of the second images are used for comparative analysis of acquisition quality of the plurality of different image acquisition modules.
[0019] Based on the above solution, the step of optimizing the second image to generate a third image includes:
[0020] The plurality of the second images are optimized to generate a plurality of the third images, wherein the plurality of the third images are used for comparative analysis of acquisition quality of a plurality of different image acquisition modules.
[0021] Based on the above solution, the acquisition parameters at least include: exposure value; the method also includes:
[0022] When an operation of a first control on the image acquisition interface is detected, the exposure value is determined according to operation information of the operation.
[0023] Based on the above solution, the storage format of the second image is RAW format;
[0024] The storage format of the third image is the Joint Photographic Experts Group JPEG format.
[0025] Based on the above solution, the method further includes:
[0026] On the configuration interface, a list of image storage formats supported by the image acquisition module is displayed; wherein the list of image storage formats at least includes the RAW format and the Joint Photographic Experts Group JPEG format;
[0027] According to the image storage format selected in the image storage format list, it is determined whether to generate the second image and the third image.
[0028] Based on the above solution, the method further includes:
[0029] After acquiring the second image, the second image and a grayscale histogram and / or a color histogram of the second image are displayed on a display interface, wherein the grayscale histogram and / or the color histogram are used to determine the quality of the second image.
[0030] Based on the above solution, the method further includes:
[0031] When an operation acting on a second control on the display interface is detected, the stored second image and the third image are deleted.
[0032] A second aspect of the present disclosure provides an image acquisition device, which is applied to an electronic device, including:
[0033] A generating module, configured to generate a first image based on ambient light sensing;
[0034] A correction module, used for correcting the first image to obtain a second image;
[0035] A storage module, used for storing the second image;
[0036] The optimization module is used to optimize the second image to generate a third image; wherein the second image and the third image are at least used to determine the image acquisition quality of the image acquisition module.
[0037] A third aspect of the present disclosure provides an electronic device, including:
[0038] a memory for storing processor-executable instructions;
[0039] A processor connected to the memory;
[0040] Wherein, the processor is configured to execute the image acquisition method provided in any one of the above items.
[0041] A fourth aspect of an embodiment of the present disclosure provides a non-temporary computer-readable storage medium. When instructions in the storage medium are executed by a processor of a computer, the computer is enabled to execute an image acquisition method as provided in any of the above items.
[0042] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0043] The image processing method provided by the embodiment of the present disclosure generates a first image based on ambient light sensing; corrects the first image to obtain a second image; stores the second image; optimizes the second image to generate a third image; wherein the second image and the third image are at least used to determine the image acquisition quality of the image acquisition module. In this way, the second image and the third image can be generated simultaneously for the first image, and the second image and the third image of the same acquisition scene can be obtained. The second image is obtained after the correction process, and then the third image is obtained by optimizing the second image. Then, the second image and the third image with the same acquisition scene but different processing procedures are compared. The quality of the image acquired by the image acquisition module is jointly determined by the second image and the third image, thereby increasing the source of image data to improve the accuracy of determining the quality of the image acquired by the image acquisition module. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0045] Figure 1 is a flowchart of an image acquisition method according to an exemplary embodiment;
[0046] Figure 2 is a flowchart of an image acquisition method according to an exemplary embodiment;
[0047] Figure 3 is a flowchart of an image acquisition method according to an exemplary embodiment;
[0048] Figure 4 is a flowchart of an image acquisition method according to an exemplary embodiment;
[0049] Figure 5 is a flowchart of an image acquisition method according to an exemplary embodiment;
[0050] Figure 6 is a schematic structural diagram of an image acquisition device according to an exemplary embodiment;
[0051] Figure 7 It is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0052] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices consistent with some aspects of the present disclosure as detailed in the appended claims.
[0053] like Figure 1 As shown, the embodiment of the present disclosure provides an image acquisition method, which is applied to an electronic device, including:
[0054] S1100: Generate a first image based on ambient light sensing;
[0055] S1200: Correct the first image to obtain a second image;
[0056] S1300: storing the second image;
[0057] S1400: Optimize the second image to generate a third image; wherein the second image and the third image are at least used to determine the image acquisition quality of the image acquisition module.
[0058] The electronic devices include fixed terminals and mobile terminals. For example, the mobile terminals include but are not limited to smart phones, tablet computers, laptop computers or smart wearable devices, etc. For example, the fixed terminals include but are not limited to desktop computers, etc.
[0059] The above-mentioned generation of the first image based on ambient light sensing can be understood as using any image acquisition module to generate the first image based on ambient light sensing. Of course, multiple different image acquisition modules can also be used to generate multiple first images based on ambient light sensing.
[0060] In S1100, the first image is generated based on ambient light sensing, that is, the photosensitive element in the electronic device (i.e., the image sensor in the image acquisition module) generates a change in current or voltage when irradiated by light, thereby generating the first image based on ambient light sensing. The image data of the first image here is the image data directly output by the image acquisition module.
[0061] In S1200, the first image is corrected to obtain a second image. For example, the image data of the first image may be input to an image front end module (IFE), and the image front end module may perform correction and other processing on the first image to obtain a second image output by the image front end processing module.
[0062] Exemplarily, the correction here includes, but is not limited to: color correction, downsampling, demosaicing, auto focus (AF), auto exposure (AE) and auto white balance (AWB) processing, etc.
[0063] In S1300, the second image is stored, and the second image can be stored in a first directory of the electronic device. The first directory here is a pre-set directory. By storing the second image, it is convenient for subsequent users to view or analyze the second image.
[0064] In one embodiment, in S1400, the second image is optimized to generate a third image. Specifically, the image data of the second image is input into a Bayer processing segment (BPS), and the second image is optimized by the Bayer processing segment, thereby obtaining a third image output by the Bayer processing segment. Exemplarily, the optimization processing includes but is not limited to: bad pixel removal, phase focusing, demosaicing, downsampling, HDR processing, and Bayer hybrid noise reduction processing.
[0065] In one embodiment, the image data of the second image may also be input into an image processing engine module (IPE), so as to optimize the second image and obtain a third image output by the image processing engine module. Exemplarily, the optimization processing includes but is not limited to: hardware noise reduction (MFNR, MFSR), image cropping, noise reduction, color processing, detail enhancement and other image processing.
[0066] Of course, the second image can also be input into the Bayer processing module to obtain the fourth image after optimization processing. The fourth image is input into the image processing engine module to obtain the third image. In this way, the optimization processing of the second image is realized to obtain the third image with better quality.
[0067] In one embodiment, the second image and the third image are both images obtained by processing the first image generated by image sensing, but the second image and the third image are images of different image formats. Since the image formats are different, images of different formats can be compared to determine the image acquisition quality of the second image or the third image, which is convenient for users to compare images of multiple formats.
[0068] Exemplarily, the image acquisition quality here includes but is not limited to: image exposure, clarity, color, brightness, texture, noise, or focus, etc.
[0069] The image processing method provided by the embodiment of the present disclosure generates a first image based on ambient light sensing; corrects the first image to obtain a second image; stores the second image; optimizes the second image to generate a third image; wherein the second image and the third image are at least used to determine the image acquisition quality of the image acquisition module. In this way, the second image and the third image can be generated simultaneously for the first image, and the second image and the third image of the same acquisition scene can be obtained. The second image is obtained after the correction process, and then the third image is obtained by optimizing the second image. Then, the second image and the third image with the same acquisition scene but different processing procedures are compared. The quality of the image acquired by the image acquisition module is jointly determined by the second image and the third image, thereby increasing the source of image data to improve the accuracy of determining the quality of the image acquired by the image acquisition module.
[0070] In some embodiments, before S1100, the method further includes:
[0071] After the image acquisition module is started, an image processing process is created; wherein the image processing process includes: a cache node of the second image;
[0072] The S1300 may include:
[0073] Based on the cache node, the second image is persisted.
[0074] The above-mentioned image acquisition module is used to capture image data. The image acquisition module at least includes an image sensor. Exemplarily, the image sensor includes but is not limited to: an RGB sensor or a spectral sensor. The RGB sensor here is also called a color sensor, a color recognition sensor, or a color sensor. The spectral sensor here includes a multi-spectral sensor.
[0075] The main role of the multispectral sensor here is to capture image data of specific frequencies through the electromagnetic spectrum, which can extract other additional information that the human eye cannot capture.
[0076] After the image acquisition module is started, an image processing flow is created. For example, a start control may be displayed on the image acquisition interface, and when an operation acting on the start control is detected, the image acquisition module is started, thereby creating an image processing flow. In other words, when the user needs to acquire an image, the start control may be clicked to create an image processing flow, thereby achieving the purpose of acquiring an image.
[0077] Here, after the image acquisition module is started, an image processing process is created. The buffer node of the image processing process can be determined through the configuration information of the image acquisition module, so that the image processing process is created according to the buffer node. The image processing process may include multiple buffer nodes, and different buffer nodes have different functions. For example, the image processing process includes at least a buffer node for the second image. The buffer node of the second image here can be understood as a storage node, by pre-configuring the specific location of the first directory. In the process of persisting the second image based on the buffer node of the second image, the second image is stored in the first directory of the electronic device. This facilitates the user to subsequently obtain the second image and perform processing operations such as analysis on the second image.
[0078] Based on the buffer node of the second image, the second image is persisted, that is, the image data of the second image is stored in the hard disk of the electronic device, so as to realize the persistence of the second image. For example, when the electronic device is a mobile phone, the hard disk can be understood as a flash memory card (T-FLASH). By persisting the second image, it is convenient for the user to find the second image later, or analyze the second image, etc.
[0079] For another example, the image processing flow may further include a cache node of the third image, thereby generating a third image based on the cache node of the third image and persisting the third image, so as to facilitate the user to compare and analyze the second image and the third image later.
[0080] In some embodiments, Figure 2 As shown, the S1100 includes:
[0081] S1110: A plurality of different image acquisition modules generate a plurality of first images using the same acquisition parameters based on the ambient light sensor;
[0082] The S1200 may include:
[0083] S1210: Correct the plurality of first images to obtain a plurality of second images, wherein the plurality of second images are used for comparative analysis of acquisition quality of a plurality of different image acquisition modules.
[0084] Here, the electronic device may include multiple image acquisition modules, and the models of the multiple image acquisition modules are different, that is, they are not image acquisition modules from the same manufacturer, or they are image acquisition modules from the same manufacturer but different models.
[0085] The above-mentioned acquisition parameters may include: image size, image aspect ratio, exposure value when acquiring the image, etc.
[0086] It can be understood that when a click operation of the start control is detected, multiple different image acquisition modules are started to create an image processing process. For example, one image acquisition module corresponds to one image processing process. As a result, multiple different image acquisition modules generate multiple first images based on ambient light sensing using the same acquisition parameters. That is, it can be understood that one image acquisition module generates one first image. Then the first images generated by multiple different image acquisition modules can be compared to determine the quality of the first image generated by the image acquisition module.
[0087] In S1210, each of the plurality of first images is corrected to obtain a plurality of second images. The image quality of the plurality of second images may be different, so the plurality of second images may be compared and analyzed to determine the quality of the image acquisition module or the quality of the image processing.
[0088] In one embodiment, the above-mentioned multiple different image acquisition modules may be partially installed in the electronic device, and the other part of the image acquisition modules are external devices of the electronic device and electrically connected to the electronic device. For example, the multiple different image acquisition modules include a first image acquisition module and a second image acquisition module. The first image acquisition module is installed in the electronic device, that is, the first image acquisition module is a component of the electronic device. The second image acquisition module is electrically connected to the electronic device, but the electronic device can only obtain the image captured by the second image acquisition module.
[0089] In another embodiment, the above-mentioned multiple different image acquisition modules are all installed in an electronic device. The electronic device can generate multiple first images based on the same acquisition parameters based on multiple different image acquisition modules based on ambient light sensing, wherein one image acquisition module corresponds to one first image. For example, the multiple different image acquisition modules include a first image acquisition module and a second image acquisition module, and the first image acquisition module and the second image acquisition module are both located in the electronic device, that is, the first image acquisition module and the second image acquisition module are components of the electronic device. By installing multiple different image acquisition modules in an electronic device, program control can be facilitated to generate corresponding images.
[0090] In one embodiment, the multiple image acquisition modules include: a first image acquisition module and a second image acquisition module. The first image acquisition module includes: an RGB sensor, and the second image acquisition module includes: a multispectral sensor. In this way, the RGB sensor and the multispectral sensor can simultaneously generate multiple first images based on ambient light sensing using the same acquisition parameters. Thus, the multiple first images are corrected to obtain multiple second images. Thus, the quality of the images acquired by the first image acquisition module and the second image acquisition module is compared and analyzed through the multiple second images.
[0091] In some embodiments, the S1400 includes:
[0092] The plurality of the second images are optimized to generate a plurality of the third images, wherein the plurality of the third images are used for comparative analysis of acquisition quality of a plurality of different image acquisition modules.
[0093] In the disclosed embodiment, after multiple image acquisition modules are started, an image processing flow corresponding to the image acquisition modules is created. Thus, multiple different image acquisition modules generate multiple first images based on ambient light sensing using the same acquisition parameters. The multiple first images are corrected to obtain multiple second images. The multiple second images are optimized to generate multiple third images. Thus, the multiple third images generated by the multiple different image acquisition modules can be compared and analyzed to determine the quality of the images captured by the multiple different image acquisition modules.
[0094] The optimization processing here can optimize the second image through a Bayer Processing Segment (BPS) and / or an Image Processing Engine (IPE) module to obtain a third image.
[0095] According to the disclosed embodiment, by generating a third image, the third images generated by a plurality of different image acquisition modules can be compared to each other, thereby determining the quality of images acquired by different image acquisition modules.
[0096] In some embodiments, the acquisition parameters at least include: an exposure value; the method further includes:
[0097] When an operation of a first control on the image acquisition interface is detected, the exposure value is determined according to operation information of the operation.
[0098] It is understandable that the exposure value can be adjusted through the first control on the image acquisition interface before capturing an image. For example, when entering the capture scene, the image acquisition interface is displayed, and the first control is displayed above, below, on the left or on the right of the image acquisition interface, so that the user can operate on the first control to adjust the exposure value.
[0099] The first control here can be a drop-down list or a scroll bar. For example, the first control can be a drop-down list, and when a click operation of the drop-down list is detected, the exposure value is determined according to the click operation. In other words, multiple exposure values can be displayed in the drop-down list, so that it is convenient for the user to select the required exposure value to capture the image.
[0100] For another example, the first control may also be a scroll bar, and the exposure value is determined according to the scroll position of the scroll bar. The scroll bar here may be a horizontal scroll bar or a vertical scroll bar. The scroll bar has a scroll block for indicating the current scroll position of the scroll bar. The exposure value can be determined by determining the position of the scroll block.
[0101] When capturing the first image, the above-mentioned multiple different image acquisition modules use the same exposure value to capture the first image, so that the acquisition parameters of the multiple different image acquisition modules for capturing the first image are the same. Since the acquisition parameters are the same, the acquisition parameters have little effect on the final second image and the third image, so that the acquisition quality comparison of the multiple different image acquisition modules is more accurate.
[0102] By setting the first control on the image acquisition interface, the user can adjust the exposure value by adjusting the first control, so as to achieve image acquisition under different exposure values, and the second image and the third image acquired under different exposures can be analyzed to determine the quality of the image acquired by the image acquisition module.
[0103] In some embodiments, the storage format of the second image is RAW format;
[0104] The storage format of the third image is the Joint Photographic Experts Group JPEG format.
[0105] The second image and the third image here are in different image formats. The second image is an image in RAW (RAW Image Format) format acquired by the image acquisition module. The third image is an image in JPEG format acquired by the image acquisition module. That is, the second image and the third image have different formats, which is convenient for users to compare the image quality differences under different formats, thereby determining the quality of the image acquired by the image acquisition module.
[0106] In some embodiments, Figure 3 As shown, the method also includes:
[0107] S1500: On a configuration interface, displaying a list of image storage formats supported by the image acquisition module; wherein the list of image storage formats at least includes the RAW format and the Joint Photographic Experts Group JPEG format;
[0108] S1600: Determine whether to generate the second image and the third image according to the image storage format selected in the image storage format list.
[0109] It can be understood that there is an entrance to the configuration interface on the image acquisition interface. For example, a configuration control is set on the image acquisition interface, and after clicking the configuration control, the configuration interface can be entered.
[0110] The configuration interface displays all image storage formats currently supported by the electronic device in a list format, and a square or circular check box is displayed in parallel with each image storage format. By selecting the check box, it can be determined whether to generate the second image and the third image.
[0111] Specifically, when the RAW format is selected, the second image in the RAW format is stored. When the JPEG format is selected, the third image in the JPEG format is stored. Of course, the RAW format and the JPEG format can be selected at the same time to generate the second image and the third image in the corresponding format.
[0112] In some embodiments, the method further comprises:
[0113] After acquiring the second image, the second image and a grayscale histogram and / or a color histogram of the second image are displayed on a display interface, wherein the grayscale histogram and / or the color histogram are used to determine the quality of the second image.
[0114] Specifically, after the second image is acquired, the image acquisition interface automatically jumps to the display interface, and the second image and the grayscale histogram and / or color histogram of the second image are displayed on the display interface.
[0115] The grayscale histogram and color histogram in the embodiment of the present disclosure can be displayed at any position of the display interface, and the background of the grayscale histogram and color histogram is transparent, so that the grayscale histogram and color histogram can be covered on top of the second image. Since the background is transparent, the second image can be less blocked, thereby saving display space of the display interface.
[0116] The grayscale histogram here shows the number of grayscale pixel values in the second image, reflecting the frequency of occurrence of each grayscale pixel value in the second image. The abscissa of the grayscale histogram is the grayscale pixel value, and the ordinate is the frequency of occurrence of the grayscale pixel value.
[0117] The color histogram here shows the number of pixel values of the red channel, green channel and blue channel in the second image, respectively reflecting the frequency of occurrence of the pixel values of the red channel, green channel and blue channel in the second image. The horizontal axis of the color histogram is the pixel value, and the vertical axis is the frequency of occurrence of the pixel value.
[0118] In the embodiment of the present disclosure, by displaying the grayscale histogram and the color histogram on the display interface, it is convenient for the user to determine the distribution of pixel values in the second image through the histogram, thereby determining the quality of the second image. When the quality of the second image does not meet expectations, the second image can be deleted through the deletion operation. Then, the second image can be re-captured by adjusting the acquisition parameters.
[0119] In some embodiments, the method further comprises:
[0120] When an operation acting on a second control on the display interface is detected, the stored second image and the third image are deleted.
[0121] The second control here can be a button. When the user needs to delete the second image, the user can click the second button to delete the second image currently displayed on the display interface. Specifically, the directory where the file of the current second image is stored can be obtained, and the corresponding second image can be deleted through the directory.
[0122] like Figure 4 As shown, an embodiment of the present disclosure provides an image acquisition method, in which the image format is set in the configuration process (configure_stream) in the camera configuration of the camera application (App), and the image format includes at least RAW format and JPEG format. The configuration process (configure_stream) in the camera configuration process refers to configuring the data stream output of the camera. Specifically, it includes the following steps: Determine the type of data to be output, such as an image, video, or depth map. Set parameters such as the resolution and frame rate of the data stream to meet application requirements. Configure the format and encoding method of the data stream for subsequent processing and storage.
[0123] In short, the configuration process (configure_stream) is the configuration procedure in the camera configuration, which determines the type and quality of the camera output data, and directly affects the effect and performance of subsequent images. Users can change the image format in the configuration process (configure_stream) through the above configuration interface.
[0124] After completing the configuration process (configure_stream), you can create an image processing process (i.e. create a PipeLine / Node) based on the configuration information. The image processing process here is as follows Figure 5 shown.
[0125] After creating the image processing flow, the parameter configuration is completed, and the image data acquisition (takePicture) is entered. An image is generated based on the acquired image data, and the function in the computer vision library (OpenCV) is called to display the grayscale histogram.
[0126] In the embodiment of the present disclosure, by detecting that the user clicks on the application (App) to compile and install, adjusting the progress bar to set the exposure value, and setting the photo format to RAW format and JPEG format. By configuring the format according to the configuration process (configure_stream) at the hal (Hardware AbstractionLayer) level, and creating a user instance (Usecase). Calling Figure 5 The image processing pipeline (PipeLine) shown in FIG. reconstructs the nodes (Node) and the links between the nodes in the image processing pipeline. The links are as follows: Figure 5 shown.
[0127] By constructing preview, RAW format and JPEG format node links and ensuring the accurate correspondence between the input and output interfaces, image acquisition (photography) is performed after the links are connected, and RAW and JPEG format images are saved. The images are constructed and displayed through the opencv algorithm interface as grayscale histogram band diagrams.
[0128] like Figure 5 The figure shows an image processing process, in which the image data (i.e., the first image) output by the image acquisition module (sensor) is input into the image front end module (Image Front End, IFE), thereby correcting the first image and obtaining the second image output by the image front end processing module.
[0129] After obtaining the second image, the image data of the second image can be input into an image processing engine module (IPE) to optimize the second image. The optimized second image is input into a preview module (TARGET-BUFFER-RAW[0]) to display the second image on the current interface.
[0130] After obtaining the second image, the image data of the second image can also be input into a Bayer processing segment (BPS) module, so as to optimize the second image and obtain a fourth image output by the Bayer processing module. The image data of the fourth image is input into an image processing engine module (IPE) to optimize the fourth image. The optimized fourth image is then input into multiple JPEG processing modules, and the image data output by the multiple JPEG processing modules are aggregated by a JPEG aggregation module to obtain a third image in JPEG format, and the third image is stored after passing through a camera buffer.
[0131] After the second image is obtained, the second image may be persisted as an image in RAW format, that is, the second image is stored.
[0132] like Figure 6 As shown in the figure, it is the effect diagram of image acquisition. The left picture is the image acquisition interface, and the right picture is the display interface. There is a scroll bar on the right side of the image acquisition interface, which can adjust the exposure value. When the button (CAPTURERAW+JPEG) on the image acquisition interface is clicked, the corresponding first image, second image and third image can be generated, and the display interface will be jumped. When the button (DISCARD) on the display interface is clicked, the corresponding second image and third image will be deleted. When the button (CONTINUE) on the display interface is clicked, it will jump to the image acquisition interface.
[0133] The disclosed embodiment abandons the computer and development board, and directly uses electronic devices (such as mobile phones) to take pictures and collect them, and adjusts the exposure value at will to take pictures, and the scene is free. In addition, both RAW image and JPEG image formats can be obtained at the same time, providing a complete data source for users to analyze pictures.
[0134] like Figure 7 As shown, the embodiment of the present disclosure provides an image acquisition device 300, which is applied to an electronic device, including:
[0135] A generating module 310, configured to generate a first image based on ambient light sensing;
[0136] A correction module 320, configured to correct the first image to obtain a second image;
[0137] A storage module 330, configured to store the second image;
[0138] The optimization module 340 is used to optimize the second image to generate a third image; wherein the second image and the third image are at least used to determine the image acquisition quality of the image acquisition module.
[0139] In some embodiments, the apparatus further comprises:
[0140] An image processing flow creation module is used to create an image processing flow after the image acquisition module is started; wherein the image processing flow includes: a cache node of the second image;
[0141] The storage module is specifically configured to persist the second image based on the cache node.
[0142] In some embodiments, the storage module is specifically used for a plurality of different image acquisition modules to generate a plurality of the first images based on the ambient light sensor using the same acquisition parameters;
[0143] The correction module is specifically used to correct the multiple first images to obtain multiple second images, wherein the multiple second images are used for comparative analysis of acquisition quality of multiple different image acquisition modules.
[0144] In some embodiments, the optimization module is specifically used to optimize the multiple second images to generate multiple third images, wherein the multiple third images are used for comparative analysis of acquisition quality of multiple different image acquisition modules.
[0145] In some embodiments, the acquisition parameters at least include: an exposure value; the device further includes:
[0146] The first determination module is used to determine the exposure value according to operation information of the operation when an operation of the first control on the image acquisition interface is detected.
[0147] In some embodiments, the storage format of the second image is RAW format;
[0148] The storage format of the third image is the Joint Photographic Experts Group JPEG format.
[0149] In some embodiments, the apparatus further comprises:
[0150] A first display module is used to display a list of image storage formats supported by the image acquisition module on a configuration interface; wherein the list of image storage formats at least includes the RAW format and the Joint Photographic Experts Group JPEG format;
[0151] A second determination module is configured to determine whether to generate the second image and the third image according to the image storage format selected in the image storage format list.
[0152] In some embodiments, the apparatus further comprises:
[0153] The second display module is used to display the second image and the grayscale histogram and / or color histogram of the second image on a display interface after the second image is acquired, wherein the grayscale histogram and / or the color histogram are used to determine the quality of the second image.
[0154] In some embodiments, the apparatus further comprises:
[0155] The deleting module is used to delete the stored second image and the third image when an operation acting on the second control on the display interface is detected.
[0156] An embodiment of the present disclosure provides an electronic device, including:
[0157] a memory for storing processor-executable instructions;
[0158] A processor connected to the memory;
[0159] Among them, the processor is configured to execute the image acquisition method provided by any of the aforementioned technical solutions.
[0160] The processor may include various types of storage media, which are non-transitory computer storage media that can continue to remember information stored thereon after the electronic device loses power.
[0161] The processor can be connected to the memory through a bus or the like, and is used to read the executable program stored in the memory, for example, to execute the following Figures 1 to 5 At least one of any of the methods shown.
[0162] Figure 7 8 is a block diagram of an electronic device 800 according to an exemplary embodiment. For example, the electronic device 800 may be included in electronic devices such as mobile phones and mobile computers or devices such as servers. In short, the data processing electronic device 800 may be included in any terminal device.
[0163] Reference Figure 7The electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0164] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0165] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The 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), erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0166] The power component 806 provides power to the various components of the electronic device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
[0167] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the 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 touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating state, such as a shooting state or a video state, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0168] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating state, such as a call state, a recording state, and a voice recognition state, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0169] 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 button, volume button, start button, and lock button.
[0170] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The 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, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0171] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as Wi-Fi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0172] In an exemplary embodiment, the apparatus 800 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 above method.
[0173] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0174] The present disclosure provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of a computer, the computer can execute the image acquisition method provided by any of the above embodiments, and can execute Figures 1 to 5 At least one of any of the methods shown.
[0175] An image acquisition method applied to an electronic device may include: generating a first image based on ambient light sensing; correcting the first image to obtain a second image; storing the second image; optimizing the second image to generate a third image; wherein the second image and the third image are at least used to determine the image acquisition quality of an image acquisition module.
[0176] It can be understood that before generating the first image based on ambient light sensing, the method further includes:
[0177] After the image acquisition module is started, an image processing process is created; wherein the image processing process includes: a cache node of the second image;
[0178] The storing the second image comprises:
[0179] Based on the cache node, the second image is persisted.
[0180] It can be understood that the generating of the first image based on ambient light sensing includes:
[0181] A plurality of different image acquisition modules generate a plurality of the first images based on the ambient light sensor and using the same acquisition parameters;
[0182] The correcting the first image to obtain the second image includes:
[0183] Correcting the plurality of the first images to obtain the plurality of the second images, wherein the plurality of the second images are used for comparative analysis of acquisition quality of the plurality of different image acquisition modules.
[0184] It can be understood that the step of optimizing the second image to generate the third image includes:
[0185] The plurality of the second images are optimized to generate a plurality of the third images, wherein the plurality of the third images are used for comparative analysis of acquisition quality of a plurality of different image acquisition modules.
[0186] It can be understood that the acquisition parameters at least include: an exposure value; the method further includes:
[0187] When an operation of a first control on the image acquisition interface is detected, the exposure value is determined according to operation information of the operation.
[0188] It can be understood that the storage format of the second image is RAW format;
[0189] The storage format of the third image is the Joint Photographic Experts Group JPEG format.
[0190] It is understandable that the method further comprises:
[0191] On the configuration interface, a list of image storage formats supported by the image acquisition module is displayed; wherein the list of image storage formats at least includes the RAW format and the Joint Photographic Experts Group JPEG format;
[0192] According to the image storage format selected in the image storage format list, it is determined whether to generate the second image and the third image.
[0193] It is understandable that the method further comprises:
[0194] After acquiring the second image, the second image and a grayscale histogram and / or a color histogram of the second image are displayed on a display interface, wherein the grayscale histogram and / or the color histogram are used to determine the quality of the second image.
[0195] It is understandable that the method further comprises:
[0196] When an operation acting on a second control on the display interface is detected, the stored second image and the third image are deleted.
[0197] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0198] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An image acquisition method, applied to an electronic device, characterized in that: include: generating a first image based on ambient light sensing; Correcting the first image to obtain a second image; storing the second image; performing optimization processing on the second image to generate a third image; The second image and the third image are at least used to determine the image acquisition quality of the image acquisition module.
2. The method according to claim 1, characterized in that Before generating the first image based on ambient light sensing, the method further includes: After the image acquisition module is started, an image processing process is created; wherein the image processing process includes: a cache node of the second image; The storing the second image comprises: Based on the cache node, the second image is persisted.
3. The method according to claim 1, characterized in that The generating of the first image based on ambient light sensing includes: A plurality of different image acquisition modules generate a plurality of the first images based on the ambient light sensor and using the same acquisition parameters; The correcting the first image to obtain the second image includes: Correcting the plurality of the first images to obtain the plurality of the second images, wherein the plurality of the second images are used for comparative analysis of acquisition quality of the plurality of different image acquisition modules.
4. The method according to claim 3, characterized in that The step of optimizing the second image to generate a third image includes: The plurality of the second images are optimized to generate a plurality of the third images, wherein the plurality of the third images are used for comparative analysis of acquisition quality of a plurality of different image acquisition modules.
5. The method according to claim 3, characterized in that: The acquisition parameters at least include: an exposure value; the method further includes: When an operation of a first control on the image acquisition interface is detected, the exposure value is determined according to operation information of the operation.
6. The method according to claim 1, characterized in that The storage format of the second image is RAW format; The storage format of the third image is the Joint Photographic Experts Group JPEG format.
7. The method according to claim 6, characterized in that The method further comprises: On the configuration interface, a list of image storage formats supported by the image acquisition module is displayed; wherein the list of image storage formats at least includes the RAW format and the Joint Photographic Experts Group JPEG format; According to the image storage format selected in the image storage format list, it is determined whether to generate the second image and the third image.
8. The method according to claim 1, characterized in that The method further comprises: After acquiring the second image, the second image and a grayscale histogram and / or a color histogram of the second image are displayed on a display interface, wherein the grayscale histogram and / or the color histogram are used to determine the quality of the second image.
9. The method according to claim 8, characterized in that The method further comprises: When an operation acting on a second control on the display interface is detected, the stored second image and the third image are deleted.
10. An image acquisition device, applied to electronic equipment, characterized in that: include: A generating module, configured to generate a first image based on ambient light sensing; A correction module, used for correcting the first image to obtain a second image; A storage module, used for storing the second image; The optimization module is used to optimize the second image to generate a third image; wherein the second image and the third image are at least used to determine the image acquisition quality of the image acquisition module.
11. An electronic device, characterized in that: include: a memory for storing processor-executable instructions; A processor connected to the memory; Wherein, the processor is configured to execute the image acquisition method provided in any one of claims 1 to 9.
12. A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a computer, enables the computer to perform the image acquisition method provided in any one of claims 1 to 9.
