Correction method and device, electronic equipment and storage medium
By obtaining the reference and the gain coefficient to be calibrated in optical inspection, and using the gain result to correct the gain coefficient, the problem of low gain accuracy is solved, and the accuracy of optical inspection is improved.
Patent Information
- Application Number
- CN202110309983.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-23
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2041-03-23
AI Technical Summary
In existing technologies, the gain accuracy of optical detection is not high, which affects the accuracy of detection.
By obtaining a reference gain coefficient from the first gain sub-interval, performing gain processing under the first illumination condition, and obtaining the gain coefficient to be corrected from the second gain sub-interval, the two gain results and the reference gain coefficient are used to correct the gain coefficient to be corrected, thereby improving the accuracy of the gain coefficient.
This improves the accuracy of the gain coefficient to be corrected, thereby improving the accuracy of optical detection.
Smart Images

Figure CN115112229B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of optical inspection, and more specifically to a calibration method, apparatus, electronic device, and storage medium. Background Technology
[0002] Terminal devices can adapt the screen backlight to the ambient light intensity by detecting the ambient light intensity, thereby adjusting the screen light intensity to a level that is comfortable for the human eye. This requires improving the performance and accuracy of optical detection. In optical detection, a gain circuit is needed to amplify the acquired raw electrical signal, which can increase the accuracy of detection to a certain extent. However, the accuracy of the gain in related technologies is not high, which affects the accuracy of optical detection. Summary of the Invention
[0003] To overcome the problems existing in the related technologies, the present disclosure provides a correction method, apparatus, electronic device and storage medium to solve the defects in the related technologies.
[0004] According to a first aspect of the present disclosure, a correction method is provided for correcting the gain coefficient of an optical detection circuit within a terminal device, comprising:
[0005] Obtain the reference gain coefficient from the first gain sub-interval;
[0006] Under the first illumination condition, the light intensity collected by the illumination sensor is increased using the reference gain coefficient, and a first gain result is obtained;
[0007] Obtain at least one gain coefficient to be corrected from the second gain sub-interval;
[0008] Under the first illumination condition, the light intensity collected by the illumination sensor is increased using each of the gain coefficients to be corrected, and a second gain result is obtained respectively;
[0009] Based on the second gain result, the first gain result, and the reference gain coefficient, the gain coefficient to be corrected corresponding to the second gain result is corrected.
[0010] In one embodiment, it also includes:
[0011] Obtain multiple gain coefficients within the gain range;
[0012] Under the same illumination conditions, the light intensity collected by the light sensor is increased using each of the aforementioned gain coefficients, and the gain results are obtained respectively.
[0013] Based on each gain coefficient and the corresponding gain result, the gain interval is divided into a first gain sub-interval and a second gain sub-interval.
[0014] In one embodiment, dividing the gain interval into a first gain sub-interval and a second gain sub-interval based on each gain coefficient and the corresponding gain result includes:
[0015] Based on each gain coefficient and the corresponding gain result, determine the curve of the change of the gain result relative to the gain coefficient;
[0016] The interval consisting of the gain coefficients corresponding to the straight line portion of the change curve is defined as the first gain sub-interval, and the other portion within the gain interval is defined as the second gain sub-interval.
[0017] In one embodiment, obtaining the reference gain coefficient from the first gain sub-interval includes:
[0018] Obtain the gain coefficients outside the start and end points of the first gain interval as reference gain coefficients.
[0019] In one embodiment, obtaining the first gain result includes:
[0020] Multiple gain results are obtained according to a preset frequency, and the average value of the multiple gain results is determined as the first gain result;
[0021] The process of obtaining the first gain result includes:
[0022] Multiple gain results are obtained according to a preset frequency, and the average value of the multiple gain results is determined as the second gain result.
[0023] In one embodiment, before determining the average of the multiple gain results as the first gain result, the method further includes:
[0024] Remove the maximum and / or minimum values from the multiple gain results;
[0025] Before determining the average of the multiple gain results as the second gain result, the method further includes:
[0026] Remove the maximum and / or minimum values from the multiple gain results.
[0027] According to a second aspect of the present disclosure, a correction apparatus is provided for correcting the gain coefficient of an optical detection circuit within a terminal device, comprising:
[0028] The first acquisition module is used to acquire the reference gain coefficient from the first gain sub-interval;
[0029] The first gain module is used to increase the light intensity collected by the light sensor using the reference gain coefficient under the first illumination condition, and to obtain the first gain result.
[0030] The second acquisition module is used to acquire at least one gain coefficient to be corrected from the second gain sub-interval.
[0031] The second gain module is used to increase the light intensity collected by the light sensor using each of the gain coefficients to be corrected under the first illumination condition, and to obtain the second gain result respectively.
[0032] The correction module is used to correct the gain coefficient to be corrected corresponding to the second gain result based on the second gain result, the first gain result, and the reference gain coefficient.
[0033] In one embodiment, it also includes:
[0034] The third acquisition module is used to acquire multiple gain coefficients within the gain range;
[0035] The third gain module is used to increase the light intensity collected by the light sensor using each of the gain coefficients under the same illumination conditions, and to obtain the gain results respectively.
[0036] The partitioning module is used to divide the gain interval into a first gain sub-interval and a second gain sub-interval based on each gain coefficient and the corresponding gain result.
[0037] In one embodiment, when the partitioning module is used to divide the gain interval into a first gain sub-interval and a second gain sub-interval based on each gain coefficient and the corresponding gain result, it is specifically used for:
[0038] Based on each gain coefficient and the corresponding gain result, determine the curve of the change of the gain result relative to the gain coefficient;
[0039] The interval consisting of the gain coefficients corresponding to the straight line portion of the change curve is defined as the first gain sub-interval, and the other portion within the gain interval is defined as the second gain sub-interval.
[0040] In one embodiment, the first acquisition module is used to:
[0041] Obtain the gain coefficients outside the start and end points of the first gain interval as reference gain coefficients.
[0042] In one embodiment, when the first gain module is used to obtain the first gain result, it is specifically used for:
[0043] Multiple gain results are obtained according to a preset frequency, and the average value of the multiple gain results is determined as the first gain result;
[0044] When the second gain module is used to obtain the second gain result, it is specifically used for:
[0045] Multiple gain results are obtained according to a preset frequency, and the average value of the multiple gain results is determined as the second gain result.
[0046] In one embodiment, before determining the average of the multiple gain results as the first gain result, the first gain module is further configured to:
[0047] Remove the maximum and / or minimum values from the multiple gain results;
[0048] Before determining the average of the multiple gain results as the second gain result, the second gain module is further configured to:
[0049] Remove the maximum and / or minimum values from the multiple gain results.
[0050] According to a third aspect of the present disclosure, an electronic device is provided, the electronic device including a memory and a processor, the memory being configured to store computer instructions executable on the processor, and the processor being configured to execute the computer instructions based on the correction method described in the first aspect.
[0051] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0052] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0053] This disclosure first obtains a reference gain coefficient from a first gain sub-interval, and under a first illumination condition, uses the reference gain coefficient to amplify the light intensity collected by the illumination sensor to obtain a first gain result. Then, it obtains at least one gain coefficient to be corrected from a second gain sub-interval, and under the first illumination condition, uses each of the said gain coefficients to amplify the light intensity collected by the illumination sensor to obtain a second gain result. Finally, it uses the second gain result, the first gain result, and the reference gain coefficient to correct the corresponding gain coefficient to be corrected. By correcting the relationship between the two gain coefficients through the relationship between the two gain results, and using one relatively accurate gain coefficient as a reference, the other gain coefficient can be corrected, thereby improving the accuracy of the two gain coefficients to the same level. This improves the accuracy of the gain coefficient to be corrected, and consequently, the accuracy of correction using the corrected gain coefficient, and also improves the accuracy of optical detection. Attached Figure Description
[0054] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0055] Figure 1 This is a schematic diagram of the structure of a sensing circuit for optical detection shown in an exemplary embodiment of this disclosure;
[0056] Figure 2 This is a schematic diagram of the structure of an analog processing circuit shown in an exemplary embodiment of the present disclosure;
[0057] Figure 3 This is a flowchart illustrating a correction method in an exemplary embodiment of this disclosure;
[0058] Figure 4 This is a schematic diagram of the structure of the correction device shown in an exemplary embodiment of the present disclosure;
[0059] Figure 5 This is a block diagram of an electronic device illustrated in an exemplary embodiment of the present disclosure. Detailed Implementation
[0060] 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 and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0061] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0062] It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0063] Please refer to the appendix. Figure 1The sensing circuit in optical detection may include a light sensor 101, an analog processing circuit 102 (Active Front End, AFE), an analog-to-digital converter (ADC) circuit 103, a register 104, etc. Furthermore, the sensing circuit can be connected to the motherboard 105 of the terminal device, and the light sensor can be integrated into the display screen. Please refer to the appendix. Figure 2 The analog processing circuit 102 may include a photoelectric conversion circuit 1021, a first-stage operational amplifier circuit 1022, a low-pass filter circuit 1023, a second-stage operational amplifier circuit 1024, and a sample-and-hold circuit 1025. The photoelectric conversion circuit 1021 converts the optical signal into an electrical signal. The first-stage operational amplifier circuit 1022 provides a fixed-amplitude gain to the electrical signal. The low-pass filter circuit 1023 filters the electrical signal. The second-stage operational amplifier circuit 1024 provides an adjustable gain to the electrical signal. The sample-and-hold circuit 1025 holds the electrical signal as a measurable voltage signal and is connected to the analog-to-digital conversion circuit 103. The second-stage operational amplifier circuit 1024 is connected to multiple parallel resistors R. F And also with each resistor R F A switch Q is connected and used to connect the resistor to the circuit, and different resistors R F When connected to a circuit, the gain amplitude (i.e., gain coefficient) will be different, therefore the resistance R F The accuracy of the resistance value (i.e., the consistency between the marked value and the actual value) directly affects the gain effect of the corresponding gain coefficient, i.e., the resistance R F The higher the resistance accuracy, the higher the consistency between the gain effect represented by the gain coefficient and its actual gain effect. F The lower the resistance accuracy, the less consistent the gain effect represented by the gain coefficient is with its actual gain effect. Empirically, a smaller resistor R... F The resistance value has high accuracy, while the larger resistor R F Due to limitations in the manufacturing process, the resistance accuracy may be low. Therefore, it is necessary to correct the gain coefficient, which may result in inaccurate gain.
[0064] Firstly, at least one embodiment of this disclosure provides a correction method; please refer to the appendix. Figure 3 It illustrates the process of the method, including steps S301 to S305.
[0065] This method can be used to correct the gain coefficient of the optical detection circuit within a terminal device. The gain coefficient refers to the gain level, representing the magnitude of the gain. After the motherboard determines the gain level of the sensing circuit, the analog processing circuit can connect the corresponding resistor to the circuit to achieve the corresponding gain effect. Finally, based on the detection result determined by the gain, the actual light intensity is restored according to the gain coefficient. The purpose of this method is to ensure that the value of the gain coefficient is equal to the actual gain multiple.
[0066] In step S301, the reference gain coefficient is obtained from the first gain sub-interval.
[0067] The optical sensing circuit has multiple gain coefficients, which are arranged in descending order to form a gain interval. The first gain sub-interval is a part of the gain interval and consists of multiple consecutive gain coefficients arranged in descending order. The actual gain effect of the gain coefficients within the first gain sub-interval is consistent with the gain effect represented by the gain coefficients, and therefore can be used as reference gain coefficients.
[0068] When selecting a reference gain coefficient from the first gain sub-interval, any gain coefficient can be selected in principle. However, a gain coefficient other than the start and end points of the first gain interval can be chosen as the reference gain coefficient. Preferably, the gain coefficient at the midpoint of the first gain sub-interval is selected as the reference gain coefficient.
[0069] In step S302, under the first illumination condition, the light intensity collected by the illumination sensor is increased using the reference gain coefficient, and a first gain result is obtained.
[0070] Among them, the gain level can be adjusted to the level corresponding to the reference gain coefficient, and the light intensity collected by a certain channel of the light sensor can be enhanced.
[0071] The first gain result is the sensed value after gain. When obtaining the first gain result, multiple gain results can be obtained at a preset frequency. The maximum and / or minimum values in the multiple gain results are deleted, and the average value of the remaining multiple gain results is determined as the first gain result. This can increase the accuracy of the first gain result.
[0072] In step S303, at least one gain coefficient to be corrected is obtained from the second gain sub-interval.
[0073] The second gain sub-interval is a portion of the gain interval and consists of multiple consecutive gain coefficients decreasing in size. The actual gain effect of the gain coefficients within the second gain sub-interval differs from the gain effect represented by the gain coefficients; therefore, it can be used as the gain coefficient to be corrected.
[0074] When selecting the gain coefficient to be corrected from the first gain sub-interval, each gain coefficient can be selected as the gain coefficient to be corrected.
[0075] In step S304, under the first illumination condition, the light intensity collected by the illumination sensor is increased using each of the gain coefficients to be corrected, and a second gain result is obtained respectively.
[0076] Among them, the gain level can be adjusted to the level corresponding to the gain coefficient to be corrected. Under the same lighting conditions, the light intensity collected by the channel with the gain coefficient of the reference can be increased, so that the variable is controlled by the change of the gain coefficient.
[0077] The second gain result is the sensed value after gain. When obtaining the second gain result, multiple gain results can be obtained at a preset frequency. The maximum and / or minimum values of the multiple gain results are deleted, and the average value of the remaining multiple gain results is determined as the second gain result. This can increase the accuracy of the second gain result.
[0078] In step S305, the gain coefficient to be corrected corresponding to the second gain result is corrected based on the second gain result, the first gain result, and the reference gain coefficient.
[0079] Since the gain coefficient and the gain result are linearly proportional, the following formula can be used to correct the gain coefficient to be corrected:
[0080] n'=b*m / a
[0081] Where n' is the correction result of the gain coefficient n to be corrected, b is the second gain result corresponding to the gain coefficient n to be corrected, m is the reference gain coefficient, and a is the first gain result corresponding to the reference gain coefficient m.
[0082] After at least one gain coefficient to be calibrated is completed, the correspondence between the calibration result and the gain coefficient to be calibrated can be stored. When the gain result of the gain coefficient to be calibrated is restored to the actual light intensity in the future, the corresponding calibration result can be used to restore it, thereby increasing the accuracy of light intensity detection.
[0083] This disclosure first obtains a reference gain coefficient from a first gain sub-interval, and under a first illumination condition, uses the reference gain coefficient to amplify the light intensity collected by the illumination sensor to obtain a first gain result. Then, it obtains at least one gain coefficient to be corrected from a second gain sub-interval, and under the first illumination condition, uses each of the said gain coefficients to amplify the light intensity collected by the illumination sensor to obtain a second gain result. Finally, it uses the second gain result, the first gain result, and the reference gain coefficient to correct the corresponding gain coefficient to be corrected. By correcting the relationship between the two gain coefficients through the relationship between the two gain results, and using one relatively accurate gain coefficient as a reference, the other gain coefficient can be corrected, thereby improving the accuracy of the two gain coefficients to the same level. This improves the accuracy of the gain coefficient to be corrected, and consequently, the accuracy of correction using the corrected gain coefficient, and also improves the accuracy of optical detection.
[0084] In some embodiments of this disclosure, the gain interval can be divided into a first gain sub-interval and a second gain sub-interval in advance in the following manner: First, multiple gain coefficients are obtained within the gain interval; next, under the same illumination conditions, the light intensity collected by the light sensor is increased using each of the gain coefficients, and the gain results are obtained respectively; finally, the gain interval is divided into a first gain sub-interval and a second gain sub-interval based on each of the gain coefficients and the corresponding gain results.
[0085] When acquiring multiple gain coefficients, all gain coefficients can be acquired, or a portion of the gain coefficients can be acquired evenly at a certain step size (e.g., a step size of 2 or 3). Gain can be applied to a specific channel of the light sensor, and each gain coefficient applies gain to the same channel.
[0086] In this system, the gain coefficients within the first gain sub-interval can represent a gain effect that is consistent with the actual gain effect, while the gain coefficients within the second gain sub-interval can represent a gain effect that is inconsistent with the actual gain effect. Therefore, the gain results of each gain coefficient within the first gain sub-interval are proportional, while the gain results of each gain coefficient within the second gain sub-interval are discrete. Thus, when dividing the gain interval using multiple gain coefficients and their corresponding gain results, the following method can be used: First, based on each gain coefficient and its corresponding gain result, determine the change curve of the gain result relative to the gain coefficient; next, determine the interval formed by the gain coefficients corresponding to the straight line portion of the change curve as the first gain sub-interval, and determine the other portion within the gain interval as the second gain sub-interval.
[0087] By comparing the gain results of multiple gain coefficients, the gain coefficients that can be used as reference gain coefficients and the gain coefficients to be corrected can be determined, and the intervals can be further divided in turn. This can improve both the accuracy of the correction results (i.e., the gain results used as reference gain coefficients are accurate and consistent with the effect represented by the gain coefficients) and the specificity of the correction (i.e., correction is only performed on the justice coefficients to be corrected).
[0088] In this embodiment, a reference gain coefficient is first obtained from a first gain sub-interval. Under first illumination conditions, the light intensity collected by the light sensor is amplified using the reference gain coefficient to obtain a first gain result. Then, at least one gain coefficient to be corrected is obtained from a second gain sub-interval. Under the first illumination conditions, the light intensity collected by the light sensor is amplified using each of the gain coefficients to be corrected to obtain a second gain result. Finally, the corresponding gain coefficient to be corrected is corrected using the second gain result, the first gain result, and the reference gain coefficient. By correcting the relationship between the two gain coefficients through the relationship between the two gain results, and using one relatively accurate gain coefficient as a reference, the other gain coefficient can be corrected, thereby improving the accuracy of the two gain coefficients to the same level. This improves the accuracy of the gain coefficient to be corrected, thereby improving the accuracy of correction using the corrected gain coefficient, and also improving the accuracy of optical detection.
[0089] Please refer to the appendix. Figure 4 According to a second aspect of the present disclosure, a correction apparatus is provided for correcting the gain coefficient of an optical detection circuit within a terminal device, comprising:
[0090] The first acquisition module 401 is used to acquire the reference gain coefficient from the first gain sub-interval;
[0091] The first gain module 402 is used to increase the light intensity collected by the light sensor using the reference gain coefficient under the first illumination condition, and obtain the first gain result.
[0092] The second acquisition module 403 is used to acquire at least one gain coefficient to be corrected from the second gain sub-interval.
[0093] The second gain module 404 is used to increase the light intensity collected by the light sensor using each of the gain coefficients to be corrected under the first illumination condition, and to obtain the second gain result respectively.
[0094] The correction module 405 is used to correct the gain coefficient to be corrected corresponding to the second gain result based on the second gain result, the first gain result, and the reference gain coefficient.
[0095] In some embodiments of this disclosure, it also includes:
[0096] The third acquisition module is used to acquire multiple gain coefficients within the gain range;
[0097] The third gain module is used to increase the light intensity collected by the light sensor using each of the gain coefficients under the same illumination conditions, and to obtain the gain results respectively.
[0098] The partitioning module is used to divide the gain interval into a first gain sub-interval and a second gain sub-interval based on each gain coefficient and the corresponding gain result.
[0099] In some embodiments of this disclosure, when the partitioning module is used to divide the gain interval into a first gain sub-interval and a second gain sub-interval based on each gain coefficient and the corresponding gain result, it is specifically used for:
[0100] Based on each gain coefficient and the corresponding gain result, determine the curve of the change of the gain result relative to the gain coefficient;
[0101] The interval consisting of the gain coefficients corresponding to the straight line portion of the change curve is defined as the first gain sub-interval, and the other portion within the gain interval is defined as the second gain sub-interval.
[0102] In some embodiments of this disclosure, the first acquisition module is used to:
[0103] Obtain the gain coefficients outside the start and end points of the first gain interval as reference gain coefficients.
[0104] In some embodiments of this disclosure, when the first gain module is used to obtain the first gain result, it is specifically used for:
[0105] Multiple gain results are obtained according to a preset frequency, and the average value of the multiple gain results is determined as the first gain result;
[0106] When the second gain module is used to obtain the second gain result, it is specifically used for:
[0107] Multiple gain results are obtained according to a preset frequency, and the average value of the multiple gain results is determined as the second gain result.
[0108] In some embodiments of this disclosure, before determining the average of the multiple gain results as the first gain result, the first gain module is further configured to:
[0109] Remove the maximum and / or minimum values from the multiple gain results;
[0110] Before determining the average of the multiple gain results as the second gain result, the second gain module is further configured to:
[0111] Remove the maximum and / or minimum values from the multiple gain results.
[0112] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments of the method in the first aspect, and will not be elaborated upon here.
[0113] According to the fifth aspect of the embodiments of this disclosure, please refer to the appendix. Figure 5 The diagram illustrates, for example, a block diagram of an electronic device. For instance, device 500 could be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0114] Reference Figure 5 The device 500 may include one or more of the following components: a processing component 502, a memory 504, a power supply component 506, a multimedia component 508, an audio component 510, an input / output (I / O) interface 512, a sensor component 514, and a communication component 516.
[0115] Processing component 502 typically controls the overall operation of device 500, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 502 may include one or more processors 520 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 502 may include one or more modules to facilitate interaction between processing component 502 and other components. For example, processing component 502 may include a multimedia module to facilitate interaction between multimedia component 508 and processing component 502.
[0116] Memory 504 is configured to store various types of data to support the operation of device 500. Examples of this data include instructions for any application or method operating on device 500, contact data, phonebook data, messages, pictures, videos, etc. Memory 504 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.
[0117] The power supply component 506 provides power to the various components of the device 500. The power supply component 506 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device 500.
[0118] Multimedia component 508 includes a screen that provides an output interface between the device 500 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 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 the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 508 includes a front-facing camera and / or a rear-facing camera. When the device 500 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.
[0119] Audio component 510 is configured to output and / or input audio signals. For example, audio component 510 includes a microphone (MIC) configured to receive external audio signals when device 500 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 504 or transmitted via communication component 516. In some embodiments, audio component 510 also includes a speaker for outputting audio signals.
[0120] I / O interface 512 provides an interface between processing component 502 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.
[0121] Sensor assembly 514 includes one or more sensors for providing status assessments of various aspects of device 500. For example, sensor assembly 514 may detect the on / off state of device 500, the relative positioning of components such as the display and keypad of device 500, changes in position of device 500 or a component of device 500, the presence or absence of user contact with device 500, orientation or acceleration / deceleration of device 500, and temperature changes of device 500. Sensor assembly 514 may also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 514 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0122] Communication component 516 is configured to facilitate wired or wireless communication between device 500 and other devices. Device 500 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, 4G or 5G, or combinations thereof. In one exemplary embodiment, communication component 516 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 516 also 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.
[0123] In an exemplary embodiment, the device 500 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 power supply method of the aforementioned electronic device.
[0124] Sixthly, in exemplary embodiments, this disclosure also provides a non-transitory computer-readable storage medium including instructions, such as a memory 504 including instructions, which can be executed by a processor 520 of the device 500 to complete the power supply method of the electronic device. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0125] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application 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.
[0126] 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. A correction method characterized by, A method for correcting gain coefficients of an optical detection circuit in a terminal device, comprising: obtaining a reference gain coefficient from a first gain sub-interval; under a first light condition, using the reference gain coefficient to gain the light intensity collected by the light sensor, and obtaining a first gain result; obtaining at least one gain coefficient to be corrected from a second gain sub-interval; under the first light condition, using each of the gain coefficients to be corrected to gain the light intensity collected by the light sensor, and respectively obtaining a second gain result; based on a relationship that a ratio of the second gain result to the first gain result is equal to a ratio of a correction result of the gain coefficient to be corrected to the reference gain coefficient, correcting the gain coefficient to be corrected corresponding to the second gain result according to the second gain result, the first gain result and the reference gain coefficient.
2. The correction method of claim 1, wherein Further comprising: obtaining a plurality of gain coefficients in a gain interval; respectively, under the same light condition, using each of the gain coefficients to gain the light intensity collected by the light sensor, and respectively obtaining a gain result; dividing the gain interval into a first gain sub-interval and a second gain sub-interval according to each of the gain coefficients and the corresponding gain result.
3. The correction method of claim 2, wherein The dividing the gain interval into a first gain sub-interval and a second gain sub-interval according to each of the gain coefficients and the corresponding gain result comprises: determining a change curve of the gain result relative to the gain coefficient according to each of the gain coefficients and the corresponding gain result; determining an interval of the gain coefficients corresponding to a straight line part in the change curve as the first gain sub-interval, and determining other parts in the gain interval as the second gain sub-interval.
4. The correction method of claim 1, wherein The obtaining a reference gain coefficient from a first gain sub-interval comprises: obtaining a gain coefficient outside the start point and the end point of the first gain sub-interval as the reference gain coefficient.
5. The correction method according to any one of claims 1 to 4, characterized in that, The obtaining a first gain result comprises: obtaining a plurality of gain results at a preset frequency, and determining an average value of the plurality of gain results as the first gain result; The obtaining a second gain result comprises: obtaining a plurality of gain results at a preset frequency, and determining an average value of the plurality of gain results as the second gain result.
6. The correction method of claim 5, wherein, Before the determining the average value of the plurality of gain results as the first gain result, further comprising: deleting a maximum value and / or a minimum value in the plurality of gain results; Before the determining the average value of the plurality of gain results as the second gain result, further comprising: deleting a maximum value and / or a minimum value in the plurality of gain results.
7. A correction device, characterized in that A method for correcting gain coefficients of an optical detection circuit in a terminal device, comprising: a first obtaining module, configured to obtain a reference gain coefficient from a first gain sub-interval; a first gain module, configured to, under a first light condition, use the reference gain coefficient to gain the light intensity collected by the light sensor, and obtain a first gain result; a second obtaining module, configured to obtain at least one gain coefficient to be corrected from a second gain sub-interval; a second gain module, configured to, under the first light condition, use each of the gain coefficients to be corrected to gain the light intensity collected by the light sensor, and respectively obtain a second gain result; The correction module is configured to correct the to-be-corrected gain coefficient corresponding to the second gain result based on a linear proportional relationship between the gain coefficient and the gain result, according to the second gain result, the first gain result, and the reference gain coefficient.
8. The correction device of claim 7, wherein, Further comprising: A third acquisition module configured to acquire a plurality of gain coefficients in a gain interval; A third gain module configured to respectively gain the light intensity collected by the light sensor under the same illumination condition by using each of the gain coefficients, and acquire gain results respectively; A division module configured to divide the gain interval into a first gain sub-interval and a second gain sub-interval according to each of the gain coefficients and the corresponding gain results.
9. The correction device of claim 8, wherein, When the division module is configured to divide the gain interval into the first gain sub-interval and the second gain sub-interval according to each of the gain coefficients and the corresponding gain results, the division module is specifically configured to: Determine a change curve of the gain result relative to the gain coefficient according to each of the gain coefficients and the corresponding gain results; Determine an interval of the gain coefficients corresponding to a straight line part in the change curve as the first gain sub-interval, and determine other parts in the gain interval as the second gain sub-interval.
10. The correction device of claim 7, wherein, The first acquisition module is configured to: Acquire the gain coefficients other than the start point and the end point of the first gain sub-interval as the reference gain coefficients.
11. The correction device according to any one of claims 7 to 10, characterized in that When the first gain module is configured to acquire the first gain result, the first gain module is specifically configured to: Acquire a plurality of gain results at a preset frequency, and determine an average value of the plurality of gain results as the first gain result; When the second gain module is configured to acquire the second gain result, the second gain module is specifically configured to: Acquire a plurality of gain results at a preset frequency, and determine an average value of the plurality of gain results as the second gain result.
12. The correction device of claim 11, wherein, Before the average value of the plurality of gain results is determined as the first gain result, the first gain module is further configured to: Delete the maximum value and / or the minimum value in the plurality of gain results; Before the average value of the plurality of gain results is determined as the second gain result, the second gain module is further configured to: Delete the maximum value and / or the minimum value in the plurality of gain results.
13. An electronic device, comprising: The electronic device includes a memory and a processor, the memory is configured to store computer instructions executable on the processor, and the processor is configured to execute the computer instructions to implement the correction method according to any one of claims 1 to 6.
14. A computer readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Image pickup apparatus and image pickup method
CN103581578A
Correction method, device and equipment used for optical sensor, and storage medium
CN108172175A