Photoelectric sensor exposure adjusting method and device, medium and product
By adjusting the exposure parameters of the photoelectric sensor in real time, the problems of poor image quality and high power consumption are solved, and higher image adjustment accuracy and lower power consumption are achieved.
Patent Information
- Application Number
- CN202510207966.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-05-27
AI Technical Summary
In the existing photoelectric sensor technology, poor image quality and high sensor power consumption are problems, especially the inability to effectively adjust parameters such as amplification and offset voltage, resulting in low exposure accuracy and excessive power consumption.
By determining the difference between the pixel average value and the target average value of the current frame image of the photoelectric sensor, combining three set thresholds and the adjustment parameters of the current exposure, the adjustment parameters of the next exposure are adjusted in real time, including the amplifier amplification, offset voltage setting value and exposure time.
Improve image adjustment accuracy, improve image quality, reduce sensor power consumption, and achieve more accurate exposure efficiency.
Smart Images

Figure CN120050529A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of photoelectric navigation technology, and in particular to an exposure adjustment method, device, medium and product of a photoelectric sensor. Background Art
[0002] Photoelectric navigation technology is based on the principle of light reflection to achieve navigation function. Specifically, photoelectric sensors, such as mice, determine the movement of the mouse by emitting light to the surface of the mouse pad and then receiving the light reflected from the mouse pad. Here, the intensity of the emitted light and the sensitivity of the sensor to the reflected light can be likened to an "exposure" mechanism. The intensity of the emitted light and the sensitivity to the reflected light together determine how clearly the photoelectric sensor can "see" the texture of the mouse pad surface and the movement of the mouse. If the emitted light is too strong or the sensor is too sensitive to the reflected light, the signal may be too strong and misjudgment may occur; conversely, if the light intensity is too weak or the sensitivity is not enough, the movement of the mouse may not be accurately detected.
[0003] The mouse is usually equipped with an automatic exposure adjustment function, which works by detecting the intensity of the received light and using a feedback mechanism to automatically adjust the exposure time or gain parameters. When the mouse moves on a darker surface, the sensor will automatically increase the exposure time or increase the gain to receive more light, so that the image details of the surface can be clearly captured; on a brighter surface, it will automatically reduce the exposure time or reduce the gain to prevent the image from being overexposed, ensuring the stability of the image quality, and thus ensuring the positioning accuracy and tracking effect of the mouse.
[0004] However, in the current related technologies, on the one hand, it is impossible to integrate parameters such as adjustment of amplification factor and offset voltage into the process of adjusting exposure time, resulting in low image adjustment accuracy and poor image quality after exposure; on the other hand, due to the slow image adjustment speed, the exposure time is long, resulting in high sensor power consumption. Summary of the invention
[0005] The purpose of this application is to provide an exposure adjustment method, device, medium and product for a photoelectric sensor, which can solve the problems of poor image quality and high sensor power consumption in related technologies.
[0006] To achieve the above objectives, this application provides the following solutions:
[0007] In a first aspect, the present application provides an exposure adjustment method for a photoelectric sensor, comprising:
[0008] Determine the pixel value of each pixel point of the current frame image obtained by the current exposure of the photoelectric sensor;
[0009] Determine the average pixel value of the current frame image based on the pixel value of each pixel point of the current frame image;
[0010] Determine the absolute value of the difference according to the difference between the average value of the current frame image pixels and the preset target average value of the current image pixels.
[0011] Determine the adjustment parameter corresponding to the next exposure of the photoelectric sensor according to the difference, the absolute value, three set thresholds, and the adjustment parameter corresponding to the current exposure; wherein, the adjustment parameter includes the amplifier magnification, the offset voltage setting value, and the exposure time.
[0012] Determine the average value of the next frame of image pixels according to the adjustment parameter corresponding to the next exposure.
[0013] In a second aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement the exposure adjustment method of the photoelectric sensor described above.
[0014] In a third aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the exposure adjustment method of the photoelectric sensor described above is implemented.
[0015] In a fourth aspect, the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, the exposure adjustment method of the photoelectric sensor described above is implemented.
[0016] According to the specific embodiments provided by the present application, the following technical effects are disclosed in the present application:
[0017] The present application provides an exposure adjustment method, device, medium, and product for a photoelectric sensor. The present application first determines the average value of the current frame image pixels after the current exposure of the photoelectric sensor, and then determines the difference and the absolute value of the difference between the average value of the current frame image pixels and the preset target average value of the current image pixels, so as to determine the adjustment parameter corresponding to the next exposure of the photoelectric sensor according to the difference, the absolute value, three set thresholds, and the adjustment parameter corresponding to the current exposure. The adjustment parameter includes the amplifier magnification, the offset voltage setting value, and the exposure time. Therefore, compared with the current related technologies, the present application incorporates the adjustment parameters that cannot be adjusted in the related technologies into the photoelectric sensor for exposure, and based on the adjustment parameters of the current exposure, combined with three set thresholds, can adjust the adjustment parameters in the next exposure in real time, greatly improving the adjustment accuracy and image quality of the image. At the same time, based on the real-time adjustment of the adjustment parameters in each exposure, the exposure time of each time is made more accurate, improving the exposure efficiency, and thus greatly reducing the power consumption of the photoelectric sensor. Description of the Drawings
[0018] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required in the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.
[0019] Figure 1 It is a schematic flowchart of an exposure adjustment method for a photoelectric sensor provided in an embodiment of the present application.
[0020] Figure 2 It is a schematic diagram of modules corresponding to the exposure adjustment process of a photoelectric sensor provided in an embodiment of the present application.
[0021] Figure 3 It is a specific operation flowchart of an exposure adjustment method for a photoelectric sensor provided in an embodiment of the present application. Detailed implementation manners
[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0023] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below with reference to the accompanying drawings and specific implementation manners.
[0024] As Figure 1 shown, the present application provides an exposure adjustment method for a photoelectric sensor, including:
[0025] Step 101: Determine the pixel values of each pixel point of the current frame image obtained by the current exposure of the photoelectric sensor.
[0026] Step 102: Based on the pixel values of each pixel point of the current frame image, determine the average pixel value of the current frame image.
[0027] Step 103: According to the difference between the average pixel value of the current frame image and the preset target average pixel value of the current image, determine the absolute value of the difference.
[0028] Step 104: According to the difference, the absolute value, three set thresholds, and the adjustment parameters corresponding to the current exposure, determine the adjustment parameters corresponding to the next exposure of the photoelectric sensor; wherein, the adjustment parameters include the amplifier magnification, the offset voltage setting value, and the exposure time.
[0029] Step 105: Determine the average pixel value of the next frame of image according to the adjustment parameters corresponding to the next exposure.
[0030] Among them, steps 101-105 can make the exposure time of each time more accurate based on the real-time adjustment of the adjustment parameters in each exposure, improve the exposure efficiency, and thus greatly reduce the power consumption of the photoelectric sensor.
[0031] In some embodiments, step 101 specifically includes: obtaining an image signal formed by the interface reflected light after the current exposure of the photoelectric sensor, and converting the image signal into an analog voltage signal; performing offset amplification processing on the analog voltage signal to obtain an offset-amplified signal; performing analog-to-digital conversion on the offset-amplified signal to obtain a digital signal; using the digital signal as the pixel value of each pixel point of the current frame of image obtained after the current exposure of the photoelectric sensor; where the digital signal is a discrete numerical sequence, and each numerical value corresponds to the pixel value of a pixel point.
[0032] In practical applications, the module corresponding to the entire exposure adjustment process refers to Figure 2 , the image acquisition module is connected to the amplification offset module, the amplification offset module is connected to the analog-to-digital conversion module, the analog-to-digital conversion module is connected to the exposure adjustment module, and the exposure adjustment module is connected to the image acquisition module and the amplification offset module. The specific functions of each module are as follows.
[0033] Image acquisition module: Pixel (image) array, used to collect the image signal formed by the interface reflected light after exposure and convert it into an analog voltage signal. The longer the exposure time, the larger the collected voltage signal.
[0034] Amplification offset module: The amplification offset module is a PGA, used to perform signal offset and signal amplification on the collected analog voltage signal X. The signal after PGA offset amplification is X 1 =(X - offset_v)·Gain. Among them, Gain (G N ) is the amplification factor, and offset_v is the offset voltage. The smaller the set value of the offset voltage offset in the exposure adjustment module, the smaller the offset voltage offset_v, the less the digital image mean value is subtracted, and the brighter the obtained image. This voltage signal is linearly proportional to the exposure time, and at the same time, the average pixel value of the digital image is also linearly proportional to the exposure time.
[0035] Analog-to-digital conversion module: The analog-to-digital conversion module is an ADC, used to convert the signal offset-amplified by the PGA into a digital signal. Since the voltage input range of the ADC is -V REF ~V REF, therefore, after the voltage signal collected by the image acquisition module is amplified by the PGA, it may exceed the ADC voltage input range, resulting in distortion phenomena such as clipping at the top or bottom. The offset voltage offset of the PGA can appropriately translate the signal to ensure that the collected image signals are all valid signals.
[0036] The offset voltage setting value offset independently adjusted by the exposure adjustment module can be fed back to the offset amplification module to adjust the offset voltage offset_v. The conversion coefficient in front of the offset voltage setting value offset is M (i.e., the conversion coefficient for converting the offset voltage setting value offset to the offset voltage offset_v). The overall relationship is as follows:
[0037]
[0038] Among them, m is the coefficient of the conversion coefficient M. According to the ADC voltage input range of -V REF ~V REF , the ADC input voltage is V IN , and the ADC output digital signal is P (assuming the digital signal has a total of Y bits). The overall relationship is as follows:
[0039]
[0040] Exposure adjustment module: used to adjust the Pixel exposure time, PGA amplification factor, and offset voltage setting value of the next exposure according to the digital signal output by the ADC, in order to obtain an image with the shortest exposure time, optimal brightness, and optimal quality.
[0041] Specifically, first calculate the offset voltage offset_v through the offset voltage setting value offset, the maximum ADC voltage input range, and the coefficient, and then calculate the signal X after PGA offset amplification based on the offset voltage offset_v 1 , and then perform analog-to-digital conversion on X 1 to obtain the digital signal P.
[0042] In some embodiments, step 104 specifically includes:
[0043] Step 201: Determine whether the absolute value is greater than the first set threshold to obtain the first result; if the first result is yes, determine the offset voltage setting value of the next exposure according to the difference.
[0044] Step 202: If the first result is negative, when determining whether the absolute value is less than or equal to a third set threshold to obtain a second result; if the second result is positive, determine the offset voltage setting value and amplifier magnification for the next exposure based on the number of overflow points in the current frame image, the exposure time of the current exposure, the offset voltage setting value of the current exposure, and a preset threshold.
[0045] Step 203: If the second result is negative, when determining whether the absolute value is less than or equal to a second set threshold and whether the exposure time of the current exposure is greater than or equal to half of the preset maximum exposure time to obtain a third result; if the third result is positive and the number of overflow points in the current frame image is greater than a preset number, determine the offset voltage setting value and amplifier magnification for the next exposure based on the amplifier magnification of the current exposure, the offset voltage setting value of the current exposure, and a first preset threshold.
[0046] Step 204: When the third result is negative, determine a fourth result by judging whether the exposure time of the current exposure is greater than or equal to the preset maximum exposure time.
[0047] Step 205: Determine the offset voltage setting value for the next exposure and the amplifier magnification for the next exposure based on the fourth result, the amplifier magnification of the current exposure, and the preset maximum magnification.
[0048] Step 206: Determine the exposure time for the next exposure based on the exposure time of the current exposure, the amplifier magnification for the next exposure, and the offset voltage setting value for the next exposure; wherein, the first set threshold > the second set threshold > the third set threshold.
[0049] In some embodiments, step 201 specifically includes: if the difference is less than or equal to 0, determine that the current frame image is too dark and decrease the offset voltage setting value for the next exposure; if the difference is greater than 0, determine that the current frame image is too bright and increase the offset voltage setting value for the next exposure.
[0050] In some embodiments, step 202 specifically includes:
[0051] Judge whether the number of overflow points in the current frame image is greater than or equal to a preset number to obtain a fifth result.
[0052] If the fifth result is positive, determine that the current frame image is an overexposed image, and judge whether the amplifier magnification of the current exposure is the preset maximum magnification and whether the offset voltage setting value of the current exposure is less than a first preset threshold to obtain a sixth result; if the sixth result is positive, decrease the amplifier magnification for the next exposure; if the sixth result is negative, decrease the offset voltage setting value for the next exposure.
[0053] If the fifth result is negative, determine whether the contrast of the current frame image is less than a preset contrast and whether the exposure time of the current exposure is less than a preset maximum exposure time, to obtain a seventh result.
[0054] If the seventh result is positive and in the case of a poor contrast of the current frame image, determine whether the amplifier magnification of the current exposure is less than a preset maximum magnification and whether the set value of the offset voltage of the current exposure is greater than a second preset threshold, to determine an eighth result.
[0055] If the eighth result is positive, increase the amplifier magnification of the next exposure; if the eighth result is negative, increase the set value of the offset voltage of the next exposure; wherein, the preset thresholds include the first preset threshold and the second preset threshold.
[0056] In some embodiments, step 203 specifically includes: determining whether the amplifier magnification of the current exposure is a preset maximum magnification and whether the set value of the offset voltage of the current exposure is less than the first preset threshold, to determine a ninth result; if the ninth result is positive, magnify the amplifier magnification of the next exposure; if the ninth result is negative, decrease the set value of the offset voltage of the next exposure.
[0057] In some embodiments, step 205 specifically includes: if the fourth result is positive and in the case of a poor contrast of the current frame image, determining whether the amplifier magnification of the current exposure is a preset maximum magnification, to determine a tenth result; if the tenth result is positive, decrease the amplifier magnification of the next exposure; if the tenth result is negative, increase the set value of the offset voltage of the next exposure; if the fourth result is negative, determine that the amplifier magnification of the current exposure is the amplifier magnification of the next exposure, and determine that the set value of the offset voltage of the current exposure is the set value of the offset voltage of the next exposure.
[0058] Among them, the three thresholds are set according to different brightness and darkness levels of the image.
[0059] In practical applications, the specific operation procedures of steps 104 - 105 are as follows.
[0060] Refer to Figure 3 , in the first step, obtain the digital signal output when the analog voltage of the ADC analog - to - digital conversion module is 0. Assume that this digital signal is an 8 - bit unsigned binary number, which is the design value A 0 (assuming the highest bit is 1, that is, 128). A T is the target pixel average value adjusted for each exposure. The purpose is to adjust the digital image pixel average value A N to around A T .
[0061] Step 2: After the Nth exposure is completed, a frame of image is obtained, and the average value A of the digital image pixels is calculated. N , the average value A is obtained. N The difference AvrSub between it and A 0 and the absolute value |Abs| of the difference. It is known that offset N and G N are the offset voltage setting value and the magnification factor after the Nth exposure respectively; L N is the exposure time of the Nth exposure; M is the conversion coefficient for converting the above offset voltage setting value offset to the offset voltage offset_v; A T -A 0 is to map the digital image signal (0 - 255) to another interval (-128 - 128) to make it conform to the ADC input voltage range. Among them, because the digital signal is a binary number and there is no negative interval, it can only be (0 - 255); while the ADC input voltage range is (-V REF ~V REF ), so the digital signal A 0 is introduced to longitudinally translate the interval to make it conform to the ADC input voltage range.
[0062] Step 3: According to whether the absolute value |Abs| is greater than the first set threshold (assumed to be 126), if the absolute value is greater than the first set threshold and the difference (i.e., AvrSub) is less than 0, at this time the image is too dark, and the offset voltage setting value offset for the next exposure will be reduced N+1 , so that the average value of the obtained digital image pixels increases and is closer to the expected image mean interval. If the absolute value is greater than the first set threshold and AvrSub is greater than 0, at this time the image is too bright, and the offset voltage setting value offset for the next exposure will be increased N+1 , so that the average value of the obtained digital image pixels decreases and is closer to the expected image mean interval.
[0063] Step 4: Determine whether the absolute value |Abs| is less than or equal to the third set threshold (assumed to be 32). This interval is the brightness expectation interval. When the absolute value is in this interval, it means that the image brightness is good, and the image mean obtained after each lighting should be controlled within this interval. If the absolute value is less than or equal to the third set threshold, then determine whether there is a large amount of image pixel overflow. If there is a large amount of image pixel overflow and the image is overexposed at this time, then determine whether the magnification factor G N is the maximum magnification factor and whether the offset voltage setting value offset N is less than the threshold Th 1 (assumed to be 15). If the above conditions are met, then reduce the magnification factor G N+1(i.e., the magnification of the next exposure amplifier). If not satisfied, decrease the set value of the next exposure offset voltage offset N+1 , so that the ADC input voltage conforms to the input range. If the image pixel points do not overflow much, then determine whether the image contrast is poor (whether the values of each pixel point are relatively close and no difference is reflected) and whether the exposure time is less than the maximum exposure time. If the above conditions are met and the contrast is poor on the current interface, then determine the magnification G N whether it is less than the maximum magnification and the set value of the offset voltage offset N whether it is greater than the threshold Th 2 (assumed to be 3). If the above conditions are met, then increase the magnification G N+1 . If not satisfied, increase the set value of the next exposure offset voltage offset N+1 , so as to amplify the contrast and make the obtained digital image have better contrast. Among them, the more the image pixel points overflow, the more it represents overexposure, the image is too bright or too dark, the contrast is abnormal, the distribution of the image gray values is uneven, resulting in a worse image. The maximum exposure time is the preset exposure time.
[0064] In the fifth step, determine whether the absolute value |Abs| is less than or equal to the second set threshold (assumed to be 64) and whether the exposure time is greater than or equal to 1 / 2 times the maximum exposure time. If the above conditions are met and there are many image pixel points overflowing, and the image is overexposed at this time, then determine the magnification G N whether it is the maximum magnification and the set value of the offset voltage offset N whether it is less than the threshold Th 1 (assumed to be 15). If the above conditions are met, then decrease the magnification G N+1 . If not satisfied, decrease the set value of the next exposure offset voltage offset N+1 , so that the ADC input voltage conforms to the input range. Among them, the situation where the pixel values of the image pixel points are relatively close means that the brightness difference between different regions in the image is small, so it represents poor contrast at this time.
[0065] In the sixth step, determine whether the exposure time is greater than or equal to the maximum exposure time. If the above conditions are met and the image contrast is poor, and the image is too bright at this time, then determine the magnification G N whether it is the maximum magnification. If the above conditions are met, then decrease the magnification G N+1 . If not satisfied, decrease the set value of the next exposure offset voltage offset N+1 , so that the average value of the obtained digital image pixels decreases and is closer to the expected image mean interval.
[0066] In the seventh step, according to the above process, the magnification G N+1, the set value of the next exposure offset voltage, offset N+1 Adjustment completed. According to the above adjusted parameters, adjust the exposure time L N+1 , and will be based on the exposure time L N+1 The average value A of the image pixels obtained by exposure N+1 Adjust to the target average value A T Nearby.
[0067]
[0068] It should be noted that, according to the exposure time, for example, an optical mouse sensor, it can emit light of this duration to the interface and then receive the light reflected back from the interface. The longer the exposure time, the brighter the image; the shorter the exposure time, the darker the image. Then the optical mouse sensor will convert the optical signal into an electrical signal, and after processing, it will be converted into a digital signal P, that is, the pixel value of each pixel point of the image obtained after this exposure. After adding and averaging, the average value of the image pixels is obtained. Among them, A 0 Is a set value that can be changed at will. A T Is the average value of the pixels of the next image to be obtained after each exposure adjustment, and this value can be set at will.
[0069] The eighth step, according to the exposure time L N+1 After the exposure is completed, repeat the above process.
[0070] Compared with the traditional related technology, the present application has the following beneficial effects:
[0071] (1) Improves the image adjustment accuracy, enables the image to maintain the best image quality, the best offset magnification and exposure time, and ensures fewer overflow points. Makes the clarity and contrast of the electronic image formed by the device sensor better.
[0072] (2) Improves the image adjustment speed. According to the above formula for adjustment, compared with gradually adjusting parameters such as exposure time, the image adjustment speed of the present application is faster, the exposure time is smaller, and the LED current power consumption is smaller.
[0073] In an exemplary embodiment, a computer device is also provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the above method is implemented.
[0074] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the above method is implemented.
[0075] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the above method is implemented.
[0076] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0077] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the various embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRdM), magnetoresistive random access memory (MRdM), ferroelectric random access memory (FRdM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RdM) or external cache memory, etc. By way of illustration and not limitation, RdM can be in various forms, such as static random access memory (SRdM) or dynamic random access memory (DRdM), etc.
[0078] The databases involved in the various embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the various embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0079] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0080] Specific examples are used in this article to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A method for adjusting exposure of a photoelectric sensor, characterized in that: include: Determine the pixel value of each pixel point of the current frame image obtained by the current exposure of the photoelectric sensor; Determine the average pixel value of the current frame image based on the pixel value of each pixel point of the current frame image; Determine the absolute value of the difference according to the difference between the average value of the pixels of the current frame image and a preset target average value of the pixels of the current image; Determine the adjustment parameters corresponding to the next exposure of the photoelectric sensor according to the difference, the absolute value, the three set thresholds and the adjustment parameters corresponding to the current exposure; wherein the adjustment parameters include the amplifier gain, the offset voltage setting value and the exposure time; The average pixel value of the next frame image is determined according to the adjustment parameters corresponding to the next exposure.
2. The exposure adjustment method of the photoelectric sensor according to claim 1, characterized in that: Determine the pixel value of each pixel point of the current frame image currently exposed by the photoelectric sensor, specifically including: Acquire an image signal formed by the interface reflected light after the photoelectric sensor is currently exposed, and convert the image signal into an analog voltage signal; Performing offset amplification processing on the analog voltage signal to obtain an offset amplified signal; Analog-to-digital conversion of the offset amplified signal to obtain a digital signal; The digital signal is used as the pixel value of each pixel point of the current frame image obtained after the current exposure of the photoelectric sensor; wherein the digital signal is a discrete numerical sequence, and each numerical value corresponds to the pixel value of a pixel point.
3. The exposure adjustment method of the photoelectric sensor according to claim 1, characterized in that: Determining adjustment parameters corresponding to the next exposure of the photoelectric sensor according to the difference, the absolute value, the three set thresholds, and the adjustment parameters corresponding to the current exposure, specifically including: Determine whether the absolute value is greater than a first set threshold value, and determine a first result; if the first result is yes, determine an offset voltage setting value for the next exposure according to the difference; If the first result is no, determining whether the absolute value is less than or equal to a third set threshold value, determining a second result; if the second result is yes, determining an offset voltage setting value and an amplifier gain of the next exposure according to the number of overflow points of the current frame image, the exposure time of the current exposure, the offset voltage setting value of the current exposure and the preset threshold value; If the second result is no, determine whether the absolute value is less than or equal to the second set threshold and whether the exposure time of the current exposure is greater than or equal to half of the preset maximum exposure time, and determine the third result; if the third result is yes, and the number of overflow points of the current frame image is greater than the preset number, determine the offset voltage setting value and the amplifier gain of the next exposure according to the amplifier gain of the current exposure, the offset voltage setting value of the current exposure and the first preset threshold; When the third result is no, determining whether the exposure time of the current exposure is greater than or equal to the preset maximum exposure time, determining a fourth result; Determine an offset voltage setting value for a next exposure and an amplifier magnification for the next exposure according to the fourth result, the amplifier magnification of the current exposure and a preset maximum magnification; The exposure time for the next exposure is determined according to the exposure time of the current exposure, the amplifier gain of the next exposure and the offset voltage setting value of the next exposure; wherein the first set threshold>the second set threshold>the third set threshold.
4. The exposure adjustment method of the photoelectric sensor according to claim 3, characterized in that: Determining the offset voltage setting value for the next exposure according to the difference specifically includes: If the difference is less than or equal to 0, it is determined that the current frame image is too dark, and the offset voltage setting value for the next exposure is reduced; If the difference is greater than 0, it is determined that the current frame image is too bright, and the offset voltage setting value for the next exposure is increased.
5. The exposure adjustment method of the photoelectric sensor according to claim 3, characterized in that: According to the number of overflow points of the current frame image, the exposure time of the current exposure, the offset voltage setting value of the current exposure and the preset threshold, the offset voltage setting value and the amplifier gain of the next exposure are determined, specifically including: Determine whether the number of overflow points of the current frame image is greater than or equal to a preset number, and determine a fifth result; If the fifth result is yes, determine that the current frame image is an overexposed image, determine whether the amplifier magnification of the current exposure is the preset maximum magnification and whether the offset voltage setting value of the current exposure is less than the first preset threshold, and determine the sixth result; if the sixth result is yes, reduce the amplifier magnification of the next exposure; if the sixth result is no, reduce the offset voltage setting value of the next exposure; If the fifth result is no, determine whether the contrast of the current frame image is less than the preset contrast, and whether the current exposure time is less than the preset maximum exposure time, to obtain a seventh result; If the seventh result is yes, and in the case of poor contrast of the current frame image, determine whether the amplifier magnification of the current exposure is less than the preset maximum magnification and whether the offset voltage setting value of the current exposure is greater than the second preset threshold, and determine the eighth result; If the eighth result is yes, increase the amplifier gain of the next exposure; if the eighth result is no, increase the offset voltage setting value of the next exposure; wherein the preset threshold includes the first preset threshold and the second preset threshold.
6. The exposure adjustment method of the photoelectric sensor according to claim 3, characterized in that: Determining the offset voltage setting value and the amplifier gain for the next exposure according to the amplifier gain for the current exposure, the offset voltage setting value for the current exposure, and the first preset threshold value, specifically includes: Determine whether the amplifier amplification factor of the current exposure is the preset maximum amplification factor and whether the offset voltage setting value of the current exposure is less than the first preset threshold value, and determine a ninth result; If the ninth result is yes, amplify the magnification of the amplifier for the next exposure; If the ninth result is no, the offset voltage setting value for the next exposure is reduced.
7. The exposure adjustment method of a photoelectric sensor according to claim 3, characterized in that: Determining the offset voltage setting value for the next exposure and the amplifier magnification for the next exposure according to the fourth result, the amplifier magnification of the current exposure and the preset maximum magnification, specifically includes: If the fourth result is yes, in the case of poor contrast of the current frame image, determine whether the amplifier magnification of the current exposure is the preset maximum magnification, and determine the tenth result; if the tenth result is yes, reduce the amplifier magnification of the next exposure; if the tenth result is no, increase the offset voltage setting value of the next exposure; If the fourth result is no, the amplifier gain of the current exposure is determined to be the amplifier gain of the next exposure, and the offset voltage setting value of the current exposure is determined to be the offset voltage setting value of the next exposure.
8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the exposure adjustment method for the photoelectric sensor according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the exposure adjustment method of the photoelectric sensor according to any one of claims 1 to 7 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the exposure adjustment method of the photoelectric sensor according to any one of claims 1 to 7 is implemented.