Gray value correction method and apparatus, nonvolatile storage medium, and computer device
By determining a personalized correction formula for the pixel points of the contact image sensor, the correction inaccuracy problem caused by the assumption of linear light response in the prior art is solved, and more accurate grayscale value correction and image uniformity are achieved.
Patent Information
- Application Number
- PCT/CN2024/125346
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-16
- Filing Date
- 2024-10-16
- Publication Date
- 2025-04-24
AI Technical Summary
The bright field correction method in the prior art assumes that the light response characteristics of each pixel in the photosensitive chip are linear, resulting in non-uniformity and abnormal grayscale blocks of the image when scanning a darker gray original, and lacks an effective solution.
By obtaining the grayscale value and identification of the target pixel point to be corrected, the corresponding correction formula is determined, and the relationship between the actual and standard light response curves is used to correct it, ensuring that the correction formula can adapt to the nonlinear light response characteristics.
The accuracy of grayscale value during bright field correction is improved, and the correction inaccuracy problem caused by linear assumptions is solved, ensuring uniformity of the image under different bright conditions.
Smart Images

Figure CN2024125346_24042025_PF_FP_ABST
Abstract
Description
Grayscale value correction method, device, non-volatile storage medium and computer equipment
[0001] This disclosure claims priority to the Chinese patent application filed with the China Patent Office on October 16, 2023, with application number 2023113378031 and invention name “Grayscale value correction method, device, non-volatile storage medium and computer device”, the entire contents of which are incorporated by reference in this disclosure. Technical Field
[0002] The present disclosure relates to the technical field of image sensors, and in particular to a grayscale value correction method, device, non-volatile storage medium, and computer equipment. Background Art
[0003] Contact image sensors are widely used in image scanning fields such as industrial inspection due to their small size, fast speed, simple installation, ease of use, and distortion-free images. Due to the inconsistent light response characteristics and fixed noise of each pixel in the photosensitive chip of a contact image sensor, when the contact image sensor images a target, the grayscale values of each pixel in the image often vary significantly, resulting in image distortion and uneven grayscale across the entire image. To address this issue, contact image sensors use the same method as cameras, using dark field correction to address the fixed noise of each pixel and existing bright field correction methods to address the inconsistent light response characteristics of each pixel. However, existing bright field correction methods perform bright field correction based on the linear light response characteristics of each pixel in the photosensitive chip, causing the contact image sensor to output an image with uniform grayscale.
[0004] However, actual contact image sensors are composed of multiple photosensitive chips, each of which contains numerous pixels. Figure 1 is a schematic diagram of the linear light response characteristic curve of a standard pixel according to prior art, and Figure 2 is a schematic diagram of the nonlinear light response characteristic curve of a non-standard pixel according to prior art. The linear light response characteristic curve of a standard pixel is shown in Figure 1, but as shown in Figure 2, some pixels have nonlinear light response curves. Using existing brightfield correction methods, the image is uniform when scanning white originals, but non-uniformity occurs when scanning darker gray originals, with vertical lines or abnormal grayscale blocks.
[0005] To address the above-mentioned problems, no effective solutions have been proposed so far.
[0006] Summary of the Invention
[0007] The embodiments of the present disclosure provide a grayscale value correction method, apparatus, non-volatile storage medium, and computer equipment to at least solve the technical problem of inaccurate correction caused by the bright field correction method in the related art being based on the premise that the light response characteristics of each pixel in the photosensitive chip are linear.
[0008] According to one aspect of an embodiment of the present disclosure, a grayscale value correction method is provided, including: obtaining the grayscale value to be corrected of a target pixel point and an identifier of the target pixel point; in a predetermined correspondence, determining a correction formula corresponding to the identifier of the target pixel point as a target correction formula, wherein the correspondence is a correspondence between the pixel point identifier and the correction formula; substituting the grayscale value to be corrected into the target correction formula to obtain a corrected grayscale value.
[0009] Optionally, the target correction formula is determined by: determining multiple measured grayscale values of the target pixel point under multiple measured light brightnesses; determining the actual light response curve of the target pixel point based on the multiple measured light brightnesses and the multiple measured grayscale values; obtaining the standard light response curve of the pixel point; and determining the formula for correcting the actual light response curve to the standard light response curve as the target correction formula.
[0010] Optionally, determining the formula for correcting the actual light response curve to the standard light response curve as the target correction formula includes: dividing the actual light response curve into multiple segments of curves to be corrected; using a linear function to approximate the multiple segments of curves to be corrected respectively to obtain multiple functions to be corrected; and determining the formula for correcting the multiple functions to be corrected to the standard light response curve as the target correction formula.
[0011] Optionally, dividing the actual light response curve into multiple segments of curves to be corrected includes: determining a point where a slope of the actual light response curve changes as an inflection point; and dividing the actual light response curve into multiple segments of curves to be corrected according to the inflection point.
[0012] Optionally, determining the formula for correcting the multiple functions to be corrected to the standard light response curve as the target correction formula includes: when the standard light response curve is a linear function, obtaining the slope of the standard light response curve; correcting the slopes of the multiple functions to be corrected to the slope of the standard light response curve to obtain the target correction formula.
[0013] Optionally, the method further includes: obtaining a standard light response curve of a pixel point; determining the brightness of the target pixel point; and determining, on the standard light response curve, a grayscale value corresponding to the brightness of the target pixel point as the corrected grayscale value.
[0014] According to another aspect of an embodiment of the present disclosure, a contact image sensor is also provided, including: a light source, a light source control component, an image scanning component, a signal processing component and a signal output component, wherein the light source control component is configured to control the light source to emit light; the image scanning component is configured to scan the light response signal of the pixel point, obtain the grayscale value to be corrected of the pixel point, and send it to the signal processing component; the signal processing component is configured to use any one of the grayscale value correction methods described above to correct the grayscale value to be corrected collected by the image scanning component, and send the corrected grayscale value to the signal output component; the signal output component is configured to send the corrected grayscale value to a host computer.
[0015] According to another aspect of an embodiment of the present disclosure, a grayscale value correction device is also provided, including: an acquisition component, configured to obtain the grayscale value to be corrected of a target pixel point, and the identifier of the target pixel point; a determination component, configured to determine, in a predetermined correspondence, a correction formula corresponding to the identifier of the target pixel point as a target correction formula, wherein the correspondence is a correspondence between the pixel point identifier and the correction formula; a correction component, configured to substitute the grayscale value to be corrected into the target correction formula to obtain a corrected grayscale value.
[0016] According to another aspect of the embodiments of the present disclosure, a non-volatile storage medium is provided. The non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute any one of the above-mentioned grayscale value correction methods.
[0017] According to another aspect of the embodiments of the present disclosure, a computer device is provided. The computer device includes a processor, and the processor is used to run a program. When the program is run, any one of the above-mentioned grayscale value correction methods is executed.
[0018] In the embodiment of the present disclosure, by obtaining the grayscale value to be corrected of the target pixel point and the identifier of the target pixel point; in a predetermined correspondence, determining the correction formula corresponding to the identifier of the target pixel point as the target correction formula, wherein the correspondence is the correspondence between the pixel point identifier and the correction formula; substituting the grayscale value to be corrected into the target correction formula to obtain the corrected grayscale value, the purpose of considering that the light response curve of the pixel is not a linear standard light response curve when performing bright field correction is achieved, thereby achieving the technical effect of improving the accuracy of the corrected grayscale value, and further solving the technical problem of inaccurate correction caused by the bright field correction method in the related art taking the light response characteristics of each pixel in the photosensitive chip as linear as the premise. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings:
[0020] FIG1 is a schematic diagram of a linear light response characteristic curve of a standard pixel provided by the prior art;
[0021] FIG2 is a schematic diagram of a nonlinear light response characteristic curve of a non-standard pixel provided by the prior art;
[0022] FIG3 shows a hardware structure block diagram of a computer terminal for implementing a grayscale value correction method;
[0023] FIG4 is a flow chart of a grayscale value correction method according to an embodiment of the present disclosure;
[0024] FIG5 is a schematic diagram of light response characteristics of pixels 1, 2, and 3 according to an optional embodiment of the present disclosure;
[0025] FIG6 is a schematic diagram of output responses of pixels 1, 2, and 3 according to an optional embodiment of the present disclosure;
[0026] FIG7 is a schematic diagram of segmented correction of pixel points 1, 2, and 3 according to an optional embodiment of the present disclosure;
[0027] FIG8 is a structural block diagram of a grayscale value correction device according to an embodiment of the present disclosure;
[0028] FIG9 is a structural block diagram of a contact image sensor provided according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way are interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or components is not necessarily limited to those steps or components clearly listed, but may include other steps or components that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] According to an embodiment of the present disclosure, an embodiment of a method for grayscale value correction is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0032] The method embodiment provided in the first embodiment of the present disclosure can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 3 shows a hardware structure block diagram of a computer terminal for implementing a grayscale value correction method. As shown in Figure 3, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used in the figure to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that the structure shown in Figure 3 is only for illustration and does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 may also include more or fewer components than those shown in Figure 3, or have a configuration different from that shown in Figure 3.
[0033] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry." The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuitry may be a single, independent processing component, or may be incorporated in whole or in part into any of the other components of the computer terminal 10. As described in the embodiments of the present disclosure, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0034] The memory 104 can be used to store software programs and components of application software, such as the program instructions / data storage device corresponding to the grayscale value correction method in the embodiment of the present disclosure. The processor executes various functional applications and data processing by running the software programs and components stored in the memory 104, that is, implementing the grayscale value correction method of the above-mentioned application. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely located relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0035] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0036] FIG4 is a flow chart of a grayscale value correction method according to an embodiment of the present disclosure. As shown in FIG4 , the method includes the following steps:
[0037] Step S402: Obtain the grayscale value to be corrected of the target pixel and the identifier of the target pixel.
[0038] Step S404 : determining, in the predetermined corresponding relationship, a correction formula corresponding to the identifier of the target pixel point as a target correction formula, wherein the corresponding relationship is a corresponding relationship between the pixel point identifier and the correction formula.
[0039] In this step, when the contact image sensor scans an image and obtains a grayscale value, this grayscale value is the grayscale value to be corrected. Because the light response curve of the pixel corresponding to this grayscale value is likely nonlinear, further correction is required to accurately reflect the information of the scanned image. Since the light response curve of each pixel may be different, the correction method for each pixel can be determined before the contact image sensor is used and pre-stored in the sensor. In actual application, the correction method corresponding to the target pixel can be directly determined based on the target pixel's identification.
[0040] Step S406: Substitute the grayscale value to be corrected into the target correction formula to obtain the corrected grayscale value.
[0041] Through the above steps, the purpose of considering that the light response curve of the pixel is not a linear standard light response curve when performing bright field correction can be achieved, thereby achieving the technical effect of improving the accuracy of the corrected grayscale value, and further solving the technical problem of inaccurate correction caused by the bright field correction method in the related technology being based on the premise that the light response characteristics of each pixel in the photosensitive chip are linear.
[0042] As an optional embodiment, the target correction formula is determined in the following manner: determining multiple measured grayscale values of the target pixel point under multiple measured light brightnesses; determining the actual light response curve of the target pixel point based on the multiple measured light brightnesses and the multiple measured grayscale values; obtaining the standard light response curve of the pixel point; and determining the formula for correcting the actual light response curve to the standard light response curve as the target correction formula.
[0043] Optionally, after producing a contact sensor, the sensor can be measured to determine the calibration method for each pixel. For example, using the target calibration formula for measuring a target pixel, the actual light response curve of the pixel can be measured first. Then, a formula for converting the actual light response curve into a standard light response curve can be determined as the target calibration formula. When measuring the actual light response curve, multiple grayscale values of the pixel at various light levels can be measured and plotted to obtain the actual light response curve.
[0044] Specifically, FIG5 is a schematic diagram of the light response characteristics of pixels 1, 2, and 3 provided according to an optional embodiment of the present disclosure. The left light response characteristic diagram is the light response characteristic diagram of pixel 1, the middle light response characteristic diagram is the light response characteristic diagram of pixel 2, and the right light response characteristic diagram is the light response characteristic diagram of pixel 3. FIG6 is a schematic diagram of the output response of pixels 1, 2, and 3 provided according to an optional embodiment of the present disclosure. The left output response diagram is the output response diagram of pixel 1, the middle output response diagram is the output response diagram of pixel 2, and the right output response diagram is the output response diagram of pixel 3. The light source can be controlled to illuminate six times, with each illumination time of 0ms, 20ms, 60ms, 60ms, 80ms, and 100ms, respectively. The actual light response outputs of pixels 1, 2, and 3 are obtained as shown in FIG6. The actual light response characteristic curves of pixels 1, 2, and 3 can be substantially fitted as shown in FIG5. Therefore, by performing correction calculations on FIG6, pixels 1, 2, and 3 can be corrected, with the correction target being FIG1. It should be noted that the brightness of light sensed by the pixel is accumulated in the form of integration, that is, the brightness can be measured by the time the light source is lit.
[0045] As an optional embodiment, determining a formula for correcting an actual light response curve to a standard light response curve as a target correction formula includes: dividing the actual light response curve into multiple segments of curves to be corrected; using a linear function to approximate the multiple segments of the curves to be corrected respectively to obtain multiple functions to be corrected; and determining a formula for correcting the multiple functions to be corrected to the standard light response curve as the target correction formula.
[0046] As an optional embodiment, dividing the actual light response curve into multiple curves to be corrected includes: determining a point where the slope of the actual light response curve changes as an inflection point; and dividing the actual light response curve into multiple curves to be corrected according to the inflection point.
[0047] As an optional embodiment, determining a formula for correcting multiple functions to be corrected into a standard light response curve as a target correction formula includes: when the standard light response curve is a linear function, obtaining the slope of the standard light response curve; correcting the slopes of multiple functions to be corrected into the slope of the standard light response curve to obtain the target correction formula.
[0048] Optionally, based on the changing trend of the slope of the curve, the point where the slope of the curve changes can be determined as the inflection point, and the actual light response curve can be divided into multiple segments at the inflection point, and each segment of the curve can be approximated as a linear function. Then, the linear function of each segment of the curve can be corrected to a standard light response curve, and the formula used in the correction process is determined to be the target correction formula.
[0049] Figure 7 is a schematic diagram of the segmented correction of pixel points 1, 2 and 3 provided according to an optional embodiment of the present disclosure. The segmented correction schematic diagram on the left is a schematic diagram of the segmented correction of pixel point 1, the segmented correction schematic diagram in the middle is a schematic diagram of the segmented correction of pixel point 2, and the segmented correction schematic diagram on the right is a schematic diagram of the segmented correction of pixel point 3. The correction formula for pixel 1 can be divided into three sections for calculation. Assuming that the target value of the ab segment after correction is a'b', the pre-scan value of the ab segment is ab, and the correction formula of the ab segment is a"b", then it is a'b'=ab×[(250 / 100) / (100 / 20)], and the correction formula of the ab segment is a"b"=×[(250 / 100) / (100 / 20)]; similarly, assuming that the target value of the bc segment after correction is b'c', the pre-scan value of the bc segment is bc, and the correction formula of the bc segment is b"c", then it is b'c'=(bc-100)×{(250 / 100) / [(150-100) / (80-20)]}+50, and the correction formula of the bc segment is b"c"=(-100)× {(250 / 100) / [(150-100) / (80-20)]}+50; assuming that the target value of the CD segment after correction is c'd', the pre-scan value of the CD segment is cd, the correction formula of the CD segment is c"d", then c'd'=(cd-150)×{(250 / 100) / [(250-150) / (100-80)]}+200, the correction formula of the CD segment is c"d"=(-150){(250 / 100) / [(150-100) / (80-20)]}+200; by setting adders, subtractors, multipliers and dividers in the signal processing component, the correction formulas of the ab segment, bc segment and CD segment are realized, and then the correction formula of pixel point 1 is realized.
[0050] The correction formula for pixel 2 can be divided into two sections for calculation. Assuming that the target value of the ab segment after correction is e'f', the pre-scan value of the ef segment is ef, and the correction formula of the ef segment is e"f", then e'f'=ef×[(250 / 100) / (150 / 40)], the correction formula of the ab segment is e"f"=×[(250 / 100) / (150 / 40)]; similarly, assuming that the target value of the fg segment after correction is f'g', the pre-scan value of the fg segment is fg, the correction formula of the fg segment is Formula f"g", then it is f'g'=(fg-150)×{(250 / 100) / [(250-150) / (100-40)]}+100, the correction formula of segment bc is f"g"=(-150)×{(250 / 100) / [(250-150) / (100-40)]}+100; the correction formula of segment fg is realized by setting adders, subtractors, multipliers and dividers in the signal processing component, and then the correction formula of pixel point 2 is realized.
[0051] The correction formula for pixel 3 is calculated in the hj segment. Assuming that the target value of the hj segment after correction is h'j', the pre-scan value of the hj segment is hj, and the correction formula for the hj segment is h"j", then it is h'j'=hj×[(250 / 100) / (200 / 100)], and the correction formula for the hj segment is h"j"=×[(250 / 100) / (200 / 100)]; the correction formula for the hj segment is realized by setting a multiplier and a divider in the signal processing component, thereby realizing the correction formula for pixel 3.
[0052] As an optional embodiment, the method further includes: obtaining a standard light response curve of a pixel point; determining the brightness of a target pixel point; and determining, on the standard light response curve, that the grayscale value corresponding to the brightness of the target pixel point is a corrected grayscale value.
[0053] Optionally, in actual application, the brightness of the light generated by the pixel point can also be obtained, and the brightness can be directly substituted into the standard light response curve to obtain the corrected grayscale value.
[0054] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and components involved are not necessarily required by the present disclosure.
[0055] Through the description of the above embodiments, those skilled in the art can clearly understand that the grayscale value correction method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as a read-only memory ROM / random access memory RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present disclosure.
[0056] According to an embodiment of the present disclosure, a grayscale value correction device configured to implement the above-mentioned grayscale value correction method is also provided. Figure 8 is a structural block diagram of the grayscale value correction device provided according to an embodiment of the present disclosure. As shown in Figure 8, the grayscale value correction device includes: an acquisition component 82, a determination component 84 and a correction component 86. The grayscale value correction device is described below.
[0057] The acquisition component 82 is configured to acquire the grayscale value to be corrected of the target pixel point and the identifier of the target pixel point.
[0058] The determination component 84 is connected to the acquisition component 82 and is configured to determine, in a predetermined correspondence relationship, a correction formula corresponding to the identifier of the target pixel point as a target correction formula, wherein the correspondence relationship is a correspondence relationship between the pixel point identifier and the correction formula.
[0059] The correction component 86 is connected to the determination component 84 and is configured to substitute the grayscale value to be corrected into the target correction formula to obtain a corrected grayscale value.
[0060] It should be noted that the acquisition component 82, determination component 84, and correction component 86 described above correspond to steps S402 to S406 in the embodiment. The examples and application scenarios implemented by the various components and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the aforementioned components, as part of the apparatus, can be run in the computer terminal 10 provided in the embodiment.
[0061] According to an embodiment of the present disclosure, a contact image sensor configured to implement the above-mentioned grayscale value correction method is also provided. FIG9 is a structural block diagram of the contact image sensor provided according to an embodiment of the present disclosure. As shown in FIG9 , the contact image sensor includes: a light source 91, a light source control component 92, an image scanning component 93, a signal processing component 94, a memory 95, and a signal output component 96. The contact image sensor is described below.
[0062] The light source control component is configured to control the light source to emit light; the image scanning component is configured to scan the light response signal of the pixel point, obtain the grayscale value to be corrected of the pixel point, and send it to the signal processing component; the signal processing component is configured to use any of the above grayscale value correction methods to correct the grayscale value to be corrected collected by the image scanning component, and send the corrected grayscale value to the signal output component; the signal output component is configured to send the corrected grayscale value to the host computer.
[0063] As a specific embodiment, a pre-scan is first performed. The light source control component 92 pre-controls the lighting time of the light source 91. By controlling the lighting time of the light source 91 at different light intensities, the light source 91 is illuminated at various lighting intensities. The image scanning component 93 then scans and obtains the light response output of each pixel at various light intensities. The image scanning component 93 transmits the light response output of each pixel at various light intensities to the signal processing component 94. The signal processing component 94 processes the signals of various light intensities collected by the image scanning component 93 and calculates the correction coefficients for each pixel at each light intensity. The calculated correction coefficients can be stored in a memory device 95, such as a flash memory, to ensure that they are not lost during power failure. In actual operation, the light source control component 92 in the contact image sensor controls the lighting time of the light source 91 to scan the document. The image scanning component 93 scans the document and transmits the signal to the signal processing component 94. The signal processing component 94 searches for the correction coefficients for each pixel based on the light source lighting time or the pixel grayscale, corrects each pixel, and transmits the corrected grayscale value of each pixel to the signal output component 96. The signal output component 96 packages the signal according to the signal format required for transmission and transmits it to the host computer.
[0064] An embodiment of the present disclosure may provide a computer device. Optionally, in this embodiment, the computer device may be located in at least one of a plurality of network devices in a computer network. The computer device includes a memory and a processor.
[0065] Among them, the memory can be used to store software programs and components, such as the program instructions / components corresponding to the grayscale value correction method and device in the embodiment of the present disclosure. The processor executes various functional applications and data processing by running the software programs and components stored in the memory, that is, realizing the above-mentioned grayscale value correction method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0066] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain the grayscale value to be corrected of the target pixel point and the identifier of the target pixel point; in a predetermined correspondence, determine the correction formula corresponding to the identifier of the target pixel point as the target correction formula, wherein the corresponding relationship is the correspondence between the pixel point identifier and the correction formula; substitute the grayscale value to be corrected into the target correction formula to obtain the corrected grayscale value.
[0067] Optionally, the target correction formula is determined by: determining multiple measured grayscale values of the target pixel point under multiple measured light brightnesses; determining the actual light response curve of the target pixel point based on the multiple measured light brightnesses and the multiple measured grayscale values; obtaining the standard light response curve of the pixel point; and determining the formula for correcting the actual light response curve to the standard light response curve as the target correction formula.
[0068] Optionally, determining the formula for correcting the actual light response curve to the standard light response curve as the target correction formula includes: dividing the actual light response curve into multiple segments of curves to be corrected; using a linear function to approximate the multiple segments of the curves to be corrected respectively to obtain multiple functions to be corrected; and determining the formula for correcting the multiple functions to be corrected to the standard light response curve as the target correction formula.
[0069] Optionally, dividing the actual light response curve into multiple segments of curves to be corrected includes: determining a point where the slope of the actual light response curve changes as an inflection point; and dividing the actual light response curve into multiple segments of curves to be corrected according to the inflection point.
[0070] Optionally, determining a formula for correcting multiple functions to be corrected into a standard light response curve as a target correction formula includes: when the standard light response curve is a linear function, obtaining the slope of the standard light response curve; correcting the slopes of multiple functions to be corrected into the slope of the standard light response curve to obtain the target correction formula.
[0071] Optionally, the method further includes: acquiring a standard light response curve of a pixel; determining the brightness of a target pixel; and determining, on the standard light response curve, that a grayscale value corresponding to the brightness of the target pixel is a corrected grayscale value.
[0072] Using the disclosed embodiments, a grayscale value correction scheme is provided. The scheme comprises obtaining the grayscale value to be corrected of a target pixel and an identifier of the target pixel; determining, within a predetermined correspondence, a correction formula corresponding to the identifier of the target pixel as a target correction formula, wherein the correspondence is the correspondence between the pixel identifier and the correction formula; and substituting the grayscale value to be corrected into the target correction formula to obtain a corrected grayscale value. This achieves the purpose of considering that the light response curve of the pixel is not a linear standard light response curve when performing brightfield correction, thereby achieving the technical effect of improving the accuracy of the corrected grayscale value. This further resolves the technical problem of inaccurate correction caused by the prior art brightfield correction method assuming that the light response characteristics of each pixel in the photosensitive chip are linear.
[0073] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a non-volatile storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0074] The embodiment of the present disclosure further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the grayscale value correction method provided in the embodiment.
[0075] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0076] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: obtaining the grayscale value to be corrected of the target pixel point and the identifier of the target pixel point; in a predetermined correspondence, determining the correction formula corresponding to the identifier of the target pixel point as the target correction formula, wherein the correspondence is the correspondence between the pixel point identifier and the correction formula; substituting the grayscale value to be corrected into the target correction formula to obtain the corrected grayscale value.
[0077] Optionally, the target correction formula is determined by: determining multiple measured grayscale values of the target pixel point under multiple measured light brightnesses; determining the actual light response curve of the target pixel point based on the multiple measured light brightnesses and the multiple measured grayscale values; obtaining the standard light response curve of the pixel point; and determining the formula for correcting the actual light response curve to the standard light response curve as the target correction formula.
[0078] Optionally, determining the formula for correcting the actual light response curve to the standard light response curve as the target correction formula includes: dividing the actual light response curve into multiple segments of curves to be corrected; using a linear function to approximate the multiple segments of the curves to be corrected respectively to obtain multiple functions to be corrected; and determining the formula for correcting the multiple functions to be corrected to the standard light response curve as the target correction formula.
[0079] Optionally, dividing the actual light response curve into multiple segments of curves to be corrected includes: determining a point where the slope of the actual light response curve changes as an inflection point; and dividing the actual light response curve into multiple segments of curves to be corrected according to the inflection point.
[0080] Optionally, determining a formula for correcting multiple functions to be corrected into a standard light response curve as a target correction formula includes: when the standard light response curve is a linear function, obtaining the slope of the standard light response curve; correcting the slopes of multiple functions to be corrected into the slope of the standard light response curve to obtain the target correction formula.
[0081] Optionally, the method further includes: acquiring a standard light response curve of a pixel; determining the brightness of a target pixel; and determining, on the standard light response curve, that a grayscale value corresponding to the brightness of the target pixel is a corrected grayscale value.
[0082] The serial numbers of the above-mentioned embodiments of the present disclosure are for description only and do not represent the advantages or disadvantages of the embodiments.
[0083] In the above embodiments of the present disclosure, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0084] In the several embodiments provided in the present disclosure, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the components can be a logical function division. In actual implementation, there may be other division methods, such as multiple components or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of components or components, which can be electrical or other forms.
[0085] The components described as separate parts may or may not be physically separate, and the components shown as components may or may not be physical components, that is, they may be located in one place or distributed across multiple components. Some or all of the components may be selected according to actual needs to achieve the purpose of the present embodiment.
[0086] In addition, the functional components in the various embodiments of the present disclosure may be integrated into a single processing component, each component may exist physically separately, or two or more components may be integrated into a single component. The aforementioned integrated components may be implemented in the form of hardware or software functional components.
[0087] If the integrated components are implemented in the form of software functional components and sold or used as independent products, they can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program code.
[0088] The above is only a preferred embodiment of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as within the scope of protection of the present disclosure. Industrial Applicability
[0089] The present disclosure is applied to the field of image sensor technology. In an embodiment of the present disclosure, the grayscale value to be corrected of the target pixel point and the identifier of the target pixel point are obtained; in a predetermined correspondence, the correction formula corresponding to the identifier of the target pixel point is determined as the target correction formula, wherein the correspondence is the correspondence between the pixel point identifier and the correction formula; the grayscale value to be corrected is substituted into the target correction formula to obtain the corrected grayscale value, thereby achieving the purpose of considering that the light response curve of the pixel is not a linear standard light response curve when performing bright field correction, thereby achieving the technical effect of improving the accuracy of the corrected grayscale value, and further solving the technical problem of inaccurate correction caused by the bright field correction method in the related art taking the light response characteristics of each pixel in the photosensitive chip as linear.
Claims
1. A gray value correction method, comprising: Obtaining the grayscale value to be corrected of the target pixel and the identifier of the target pixel; In a predetermined corresponding relationship, a correction formula corresponding to the identifier of the target pixel point is determined as a target correction formula, wherein the corresponding relationship is a corresponding relationship between the pixel point identifier and the correction formula; Substitute the grayscale value to be corrected into the target correction formula to obtain the grayscale value after correction.
2. The method according to claim 1, wherein: The target correction formula is determined as follows: Determine a plurality of measured grayscale values of the target pixel point under a plurality of measurement light brightnesses respectively; Determining an actual light response curve of the target pixel point according to the multiple measured light brightnesses and the multiple measured grayscale values; Get the standard light response curve of the pixel; A formula for correcting the actual light response curve to the standard light response curve is determined as the target correction formula.
3. The method according to claim 2, wherein: The formula for correcting the actual light response curve to the standard light response curve as the target correction formula includes: Dividing the actual light response curve into a plurality of curves to be corrected; Approximating the plurality of curves to be corrected by using a linear function respectively to obtain a plurality of functions to be corrected; A formula for correcting the multiple functions to be corrected into the standard light response curve is determined as the target correction formula.
4. The method according to claim 3, wherein: The step of dividing the actual light response curve into a plurality of curves to be corrected comprises: Determine a point in the actual light response curve where the slope changes as an inflection point; According to the inflection point, the actual light response curve is divided into a plurality of curves to be corrected.
5. The method according to claim 3, wherein: The step of determining a formula for correcting the plurality of functions to be corrected to the standard light response curve as the target correction formula comprises: When the standard light response curve is a linear function, obtaining the slope of the standard light response curve; The slopes of the multiple functions to be corrected are corrected to the slope of the standard light response curve to obtain the Target correction formula.
6. The method according to any one of claims 1 to 5, wherein: Also includes: Get the standard light response curve of the pixel; Determining the brightness of the target pixel; On the standard light response curve, a grayscale value corresponding to the brightness of the target pixel is determined as the corrected grayscale value.
7. A contact image sensor, comprising: light source, light source control component, image scanning component, signal processing component and signal output component, The light source control component is configured to control the light source to emit light; The image scanning component is configured to scan the light response signal of the pixel point, obtain the grayscale value to be corrected of the pixel point, and send it to the signal processing component; The signal processing component is configured to correct the grayscale value to be corrected collected by the image scanning component using the grayscale value correction method described in any one of claims 1 to 6, and send the corrected grayscale value to the signal output component; The signal output component is configured to send the corrected grayscale value to a host computer.
8. A gray value correction device, comprising: An acquisition component, configured to acquire a grayscale value to be corrected of a target pixel and an identifier of the target pixel; A determination component is configured to determine, in a predetermined corresponding relationship, a correction formula corresponding to the identifier of the target pixel point as a target correction formula, wherein the corresponding relationship is a corresponding relationship between the pixel point identifier and the correction formula; The correction component is configured to bring the grayscale value to be corrected into the target correction formula to obtain the corrected grayscale value.
9. A non-volatile storage medium, the non-volatile storage medium comprising a stored program, wherein: When the program is running, the device where the non-volatile storage medium is located is controlled to execute the grayscale value correction method described in any one of claims 1 to 6.
10. A computer device comprising: Memory and processor, The memory stores a computer program; The processor is used to execute the computer program stored in the memory, and when the computer program is running, the processor executes the grayscale value correction method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Image correcting method and system
CN104680489A
Method and terminal of correcting camera exposure response
CN108510462A
Color camera image edge pseudo color correction method
CN113870146A
Image correction method, device and equipment and readable storage medium
CN115760653A
Gray value correction method and device, nonvolatile storage medium and computer equipment
CN117376498A
Cited By
Brightness compensation method and device of display panel, display equipment and storage medium
CN120954338A