Illumination compensation method and device
By acquiring the grayscale value of the background image for compensation processing, the problem of uneven brightness of the radiation image is solved, and the image formation quality and recognition efficiency of the image are improved.
Patent Information
- Application Number
- CN201911007125.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-22
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2039-10-22
AI Technical Summary
In the prior art, the radial image obtained by the imaging device is uneven in brightness, resulting in a decrease in recognition efficiency and a low effective recognition rate in subsequent image processing.
By obtaining the pixel grayscale value of the background image collected by the imaging device, the compensation grayscale value is determined, and the pixel points in the original radiographic image are compensated to obtain the compensated radiographic image and overcome the problem of uneven brightness.
The imaging quality of radiographic images is improved and the effect of low effective recognition rate in image processing caused by uneven brightness is avoided.
Smart Images

Figure CN112700375B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method and device for illumination compensation. Background Art
[0002] Given that images are the main source for humans to obtain and exchange information, image processing, image recognition, and other technologies based on image target detection and recognition analysis are being used in more and more industries.
[0003] In the related art, due to the influence of actual imaging conditions such as the uneven light source emitted by the imaging device and interference from the ambient light source, the brightness of the radiographic image obtained by the imaging device is often uneven. However, the image with uneven brightness brings extremely adverse effects in the subsequent image processing process, such as reduced recognition efficiency and low effective recognition rate. Summary of the invention
[0004] In view of this, the present application provides a method and device for illumination compensation, which can optimize the problem of uneven brightness in the original radiological image, thereby avoiding the problem that the uneven radiological image obtained by the imaging device causes low accuracy of subsequent image analysis results.
[0005] To achieve the above objectives, this application provides the following technical solutions:
[0006] According to a first aspect of the present application, a method for illumination compensation is proposed, the method comprising:
[0007] Obtaining original grayscale values of pixels in an original radiological image, wherein the original radiological image is acquired by an imaging device;
[0008] Determine a compensated grayscale value obtained by the grayscale value of a pixel point of a background image captured by the imaging device;
[0009] The original grayscale value is compensated according to the compensated grayscale value to obtain a compensated radiographic image corresponding to the original radiographic image.
[0010] According to a second aspect of the present application, a light compensation device is provided, the device comprising:
[0011] An acquisition unit, which acquires original grayscale values of pixels in an original radiological image, wherein the original radiological image is acquired by an imaging device;
[0012] A determination unit, which determines a compensated grayscale value obtained by the grayscale value of a pixel point of the background image acquired by the imaging device;
[0013] The compensation processing unit performs compensation processing on the original grayscale value according to the compensated grayscale value to obtain a compensated radiological image corresponding to the original radiological image.
[0014] According to a third aspect of the present application, an electronic device is provided, comprising:
[0015] processor;
[0016] a memory for storing processor-executable instructions;
[0017] The processor is configured to execute instructions to implement the method as described in the first aspect.
[0018] According to a fourth aspect of the present application, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.
[0019] It can be seen from the above technical scheme that through the illumination compensation method proposed in the present application, the compensation grayscale value is determined according to the grayscale value of the pixel point of the background image obtained by the same imaging device, and then the original grayscale value of the pixel point of the original radiographic image obtained by the imaging device is compensated based on the determined compensation grayscale value, so that the compensated radiographic image overcomes the problem of uneven brightness in the original radiographic image, improves the imaging quality of the radiographic image, and avoids the influence of low effective recognition rate in the subsequent image processing process due to uneven brightness of the radiographic image. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flow chart of a method for generating a token according to an exemplary embodiment of the present application;
[0021] Figure 2 is a flow chart of another token generation method according to an exemplary embodiment of the present application;
[0022] Figure 3 is a schematic diagram of a region of interest according to an exemplary embodiment of the present application;
[0023] Figure 4 is a schematic diagram of a background image according to an exemplary embodiment of the present application;
[0024] Figure 5 is a schematic diagram of a radiographic image after illumination compensation processing in an exemplary embodiment of the present application;
[0025] Figure 6 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application;
[0026] Figure 7 is a block diagram of a lighting compensation processing device according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0028] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0029] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0030] Please refer to Figure 1 , Figure 1 is a flow chart of a method for illumination compensation according to an exemplary embodiment of the present application. Figure 1 As shown, the method may include the following steps:
[0031] Step 101, obtaining original grayscale values of pixels in an original radiological image, wherein the original radiological image is acquired by an imaging device.
[0032] In one embodiment, the radiological image acquired by the imaging device can be preprocessed, and the region of interest in the radiological image directly obtained by the imaging device can be used as the original radiological image. The region of interest can be obtained by intercepting the radiological image obtained by the imaging device according to preconfigured range information, so that the area to be compensated is limited to the region of interest of the radiological image, and the area outside the region of interest does not need to be processed, thereby improving image processing efficiency.
[0033] Step 102: determine a compensated grayscale value obtained by using the grayscale value of a pixel point of the background image captured by the imaging device.
[0034] In one embodiment, multiple background images captured by an imaging device in the same state can be obtained, and the grayscale mean of the pixel points at the same position in the multiple background images obtained can be calculated, and then the compensation grayscale value of the pixel point at the position can be determined based on the obtained grayscale mean, thereby reducing errors and improving the accuracy of the determined compensation grayscale value.
[0035] Furthermore, in the process of determining the compensated grayscale value of the grayscale value of the pixel points of the background image, an intermediate value that is not less than the maximum original grayscale value and not greater than the maximum theoretical grayscale value can be determined based on the maximum original grayscale value of the pixel points in the background image, and the difference between the intermediate value and the grayscale value of the pixel points in the background image can be used as the compensated grayscale value; other methods can also be used to determine the compensated grayscale value corresponding to the grayscale value of the pixel points in the background image. Any determination method that makes the compensated grayscale value meet the following conditions should fall within the scope of protection of this application: the smaller the grayscale value of the pixel points in the background image, the larger the compensated grayscale value determined, and the larger the grayscale value of the pixel points in the background image, the smaller the compensated grayscale value determined.
[0036] Step 103 , compensating the original grayscale value according to the compensated grayscale value to obtain a compensated radiographic image corresponding to the original radiographic image.
[0037] The compensation grayscale value is determined according to the grayscale value of the pixel point of the background image, and the grayscale value of the pixel point in the original radiological image is processed based on the compensation grayscale value, such as taking the sum of the compensation grayscale value of the pixel point and the original grayscale value as the grayscale value of the pixel point of the compensated radiological image, so as to weaken the phenomenon of uneven image brightness in the original radiological image caused by external factors such as imaging conditions.
[0038] Furthermore, the grayscale value of the compensated pixel point can be normalized. Specifically, the grayscale value of the compensated pixel point can be normalized based on a preset normalization coefficient. In one embodiment, the normalization coefficient λ can be expressed as We get: T = μ + 3σ, where μ and σ are the mean and mean square error of the grayscale values corresponding to each pixel in the background image, respectively. max is the maximum value of the grayscale value corresponding to each pixel in the radiographic image after the compensation process; in another embodiment, the normalization coefficient λ can be expressed as Among them, I max It is the maximum value of the grayscale value corresponding to each pixel in the radiological image after the compensation processing.
[0039] Through the above-mentioned embodiment, the compensation grayscale value is determined according to the grayscale value of the pixel point of the background image obtained by the same imaging device, and then the original grayscale value of the pixel point of the original radiological image obtained by the imaging device is compensated based on the determined compensation grayscale value, so that the compensated radiological image overcomes the problem of uneven brightness in the original radiological image and improves the imaging quality of the radiological image.
[0040] Figure 2 is a flow chart of another illumination compensation method according to an exemplary embodiment of the present application. Figure 2 As shown, the method may include the following steps:
[0041] Step 201a, obtaining the original grayscale value of the pixel in the original radiological image.
[0042] In one embodiment, the original radiological image acquired by the imaging device may be a two-dimensional X-ray image acquired by an X-ray device such as a C-arm machine, and may be represented in the form of a DR image obtained based on the X-ray image; in another embodiment, the acquired original radiological image may be a two-dimensional molecular image obtained by a nuclear medicine imaging device such as a gamma camera, or human body imaging achieved based on MR signals emitted by atomic nuclei of human tissue elements.
[0043] Furthermore, the radiological image acquired by the imaging device may be preprocessed, and the region of interest in the radiological image directly obtained by the imaging device may be used as the original radiological image. The region of interest may be obtained by intercepting the radiological image obtained by the imaging device according to preconfigured range information.
[0044] The preconfigured range information can be determined according to the imaging position of the radiation object, wherein the range information may include the center point information of the region of interest and the distance value from the center point to the boundary of the region of interest. When the distance values from the center point to the boundary of the region of interest are the same, the determined region of interest may be circular, so that the original radiation image processed according to the preconfigured range information is also circular, as Figure 3 As shown, Figure 3 It is a schematic diagram of an original radiological image in an exemplary embodiment of the present application. The original radiological image is obtained by intercepting a radiological image directly obtained by an imaging device according to circular range information.
[0045] Of course, the distance value from the center point in the range information to the boundary of the region of interest may be different, and then the region of interest of the corresponding shape is determined by the distance value from the center point of the region of interest and the center point to each boundary point of the region of interest, thereby capturing the original radiological image of the preconfigured shape in the radiological image directly obtained by the imaging device.
[0046] The original grayscale value of the pixel point in the original radiological image obtained can be the grayscale value of each pixel point in the original radiological image, or a set of multiple pixel points can be taken as a block, and then the average of the grayscale values corresponding to each pixel point in the block is taken as the grayscale value of the block, and the grayscale value of the block is taken as the original grayscale value, so that the average of the grayscale values of each pixel point in any block in the original radiological image is taken as the original grayscale value of the block.
[0047] The original grayscale values of the pixels in the original radiological image can be used in the form of a set of numerical values or in the form of a matrix to participate in the subsequent calculation process. Furthermore, in the process where the original grayscale values participate in the subsequent calculation in the form of a matrix, the element values of the elements in the matrix are the grayscale values of the pixels, and the row and column numerical information of the elements correspond to the coordinate values of the pixels represented by the elements in the original image. For example, for an image with M×N pixels, the element values in the matrix can be determined by quantizing the grayscale values of each pixel. As shown in the following formula, the grayscale values f(x, y) corresponding to each pixel (x, y) in the image can be expressed in the form of an M×N matrix: Among them, x∈(0,M-1), y∈(0,N-1), the grayscale value f(x,y) can be represented by an integer grayscale. Furthermore, the radiological image obtained by the imaging device can be a 256-grayscale image, that is, the pixel grayscale of the image is represented by 8 bits, so that the grayscale value f(x,y) corresponding to the pixel point (x,y) in the matrix corresponding to the pixel point of the image satisfies f(x,y)∈{0,1,2,…,255}.
[0048] Step 201b, determining a compensated gray value obtained from the gray value of the pixel point of the background image.
[0049] The compensation grayscale value is obtained by the grayscale value of the pixel points of the background image of the radiological image, wherein the background image can be obtained based on the imaging device used during radiological imaging to ensure that the brightness uniformity of the acquired background image is consistent with the brightness uniformity of the radiological image, thereby avoiding the difference in imaging devices causing the brightness uniformity of the obtained background image to be different from that of the background image of the original radiological image, thereby avoiding the difference in imaging devices causing the compensation grayscale value determined based on the background image to lack the accuracy of illumination compensation.
[0050] The grayscale values of the pixels of the background image may be in the form of a matrix. When the pixels in the background image are a matrix, the element value of the matrix element is the grayscale value of the pixel, and the row and column numerical information of the element corresponds to the coordinate value of the pixel represented by the element in the background image. Further, the background image may be determined by intercepting the radiological image obtained by the imaging device in an empty state without the radiological object based on the range information. For the convenience of description, the following uses Represents the brightness matrix of the determined background image.
[0051] In the process of determining the grayscale value of the pixel of the background image, multiple background images can be obtained, and then the average of the grayscale values of the pixel at the same position in the multiple background images is used as the grayscale value of the pixel at the position of the background image, so as to reduce the adverse effect of small probability environmental factors on the imaging of the background image. Accordingly, the brightness matrix of the background image is Among them, R i represents the brightness matrix of the i-th background image, n is the number of background images actually obtained, and the minimum number of background images obtained can be 3 or 10. This application does not limit the specific number of background images obtained.
[0052] Further, after acquiring multiple background images, the radiological images that do not contain the radiological objects can be processed according to the preset range information to retain only the radiological images within the region of interest corresponding to the range information. Similar to the process of processing the radiological images based on the range information to obtain the original radiological images, the range information may include the center point information of the region of interest, and the distance value from the center point to the boundary of the region of interest. When the distance values from the center point to the boundary of the region of interest are the same, the determined region of interest can be a circle, so that the original radiological image after the radiological image is processed according to the preconfigured range information is also a circle. Figure 4 , Figure 4 is a schematic diagram of a background image in an exemplary embodiment of the present application, such as Figure 4 As shown, the background image may be determined by intercepting a radiological image obtained by the imaging device in an empty state without containing a radiation object based on the range information of the circular region of interest.
[0053] The process of determining the compensation grayscale value from the grayscale value of the pixel points of the background image can be determined in real time to reduce the difference in brightness between the background image and the background image under the imaging conditions of the radiological image due to the difference in imaging conditions, thereby obtaining a background image under the same imaging conditions as the radiological image. It can also be predetermined based on the same imaging device.
[0054] In the process of determining the compensation grayscale value according to the grayscale value of the pixel point of the background image, the digitized image can be processed with the help of a matrix to improve the image processing efficiency. Specifically, the maximum value of the original grayscale value corresponding to each pixel point can be determined according to the original grayscale value of the pixel point in the background image, and then based on the maximum value of the original grayscale value and the maximum theoretical grayscale value, an intermediate value that is not less than the maximum original grayscale value and not greater than the maximum theoretical grayscale value is determined, such as, for an imaging device with a grayscale level of 2 8For a 256-grayscale background image, the maximum original grayscale value of the pixels in the background image is 205, and the maximum theoretical grayscale value is 255. The determined intermediate value that is not less than the maximum original grayscale value and not greater than the maximum theoretical grayscale value can be 220 or 255, etc.
[0055] Based on the determined intermediate values that are not less than the maximum original grayscale value and not greater than the maximum theoretical grayscale value, construct an intermediate matrix N with the intermediate values as the element values of each row and column element. The determined number of rows and columns of the intermediate matrix N is the same as the brightness matrix If the number of rows and columns of correspond to the same, the compensation matrix C can be determined according to the matrix difference between the intermediate matrix and the brightness matrix, that is, The element values of the elements in the compensation matrix C are the determined compensation grayscale values.
[0056] The purpose of compensating the original radiographic image is to weaken the phenomenon of uneven brightness of the image caused by external factors such as imaging conditions. Therefore, for the original radiographic image containing the image of the radiological object, the brightness can be evenly processed by using the background image under the same imaging conditions as the original radiographic image, that is, the compensation grayscale value is determined according to the grayscale value of the pixel points of the background image, and then the grayscale value of the pixel points in the original radiographic image is processed based on the compensation grayscale value. The compensation grayscale value can be determined in a variety of ways, such as by dividing the pixel points of the background image into blocks according to a template of a preset size and length, and dividing the pixels of the same size and length into blocks. The average value of the grayscale values of the pixels of a block is used as the brightness value of the block, and then the corresponding compensation grayscale value is set according to the brightness value of the block. The compensation grayscale value corresponding to the brightness value can be determined according to the preset grayscale value, or the compensation grayscale value can be determined in real time according to the grayscale value of the block. The present application does not limit the specific method for determining the compensation grayscale value. All determined compensation grayscale values that meet the following conditions should fall within the scope of protection of the present application: the higher the saturation of black pixels in the background image, the larger the compensation grayscale value determined, and the lower the saturation of black pixels in the background image, the smaller the compensation grayscale value determined.
[0057] In addition, it should be noted that there is no necessary order between step 201b and step 201a, that is, before determining the compensated grayscale value obtained from the grayscale value of the pixel point of the background image, the process of obtaining the original grayscale value of the pixel point in the original radiological image can be completed first, or the compensated grayscale value corresponding to the grayscale value of the pixel point of the background image can be determined first, and then the original grayscale value of the pixel point in the original radiological image can be obtained.
[0058] Step 202: Compensate the original grayscale value according to the determined compensated grayscale value.
[0059] The compensated grayscale value can be added on the basis of the original grayscale value, that is, the determined compensated grayscale value is summed with the original grayscale value, and the obtained sum is determined as the grayscale value after compensation processing, so that the grayscale value of the pixel point of the compensated radiological image is the sum of the compensated grayscale value of the pixel point and the original grayscale value.
[0060] Specifically, the compensation process can be to obtain the brightness matrix from the grayscale values of each pixel of the original image. The sum of the determined compensation matrix C is determined as the superposition matrix O, that is, For a pixel point of the original image, a corresponding compensation grayscale value is added to the original grayscale value of the pixel point to obtain the grayscale value of the pixel point after compensation processing.
[0061] Since the compensation grayscale value determined under the same imaging conditions as the original radiographic image has the characteristics that the smaller the grayscale value of the pixel in the background image, the larger the compensation grayscale value is determined, and the larger the grayscale value of the pixel in the background image, the smaller the compensation grayscale value is determined. Therefore, for the grayscale value of any pixel A in the background image, the smaller the grayscale value of the pixel A, the larger the compensation grayscale value corresponding to the determined pixel A is, so that the grayscale value of the pixel at the same position as the pixel A in the original radiographic image increases by a larger compensation grayscale value. On the contrary, for any pixel B with a larger grayscale value in the background image, the corresponding compensation grayscale value corresponding to the determined pixel B is smaller, so that the grayscale value of the pixel at the same position as the pixel B in the original radiographic image only increases by a smaller compensation grayscale value, thereby achieving the purpose of balancing the grayscale values of each pixel in the original radiographic image, so that the brightness of the original radiographic image after compensation processing is more uniform.
[0062] Step 203, normalizing the grayscale values of the compensated pixels.
[0063] The grayscale values of the compensated pixels can be normalized to further reduce the grayscale value differences in the image and avoid problems such as low feature extraction efficiency and increased image recognition difficulty in subsequent image processing due to uneven image brightness.
[0064] In the specific normalization process, the product of the grayscale value of each pixel in the compensated radiographic image and the normalization coefficient can be used as the grayscale value of each pixel in the normalized radiographic image through a preset normalization coefficient.
[0065] In one embodiment, the expression for determining the preset normalization coefficient λ can be: Where N is the grayscale value of the preset pixel, I maxis the maximum value of the grayscale value corresponding to each pixel in the radiographic image after compensation, expressed as After the determined normalization coefficient λ is used to compensate the grayscale values of the pixels in the radiological image, the grayscale values of the compensated pixels fall within the required range of 0 to N, thereby eliminating the adverse effects of abnormal grayscale value samples on subsequent image processing. For example, due to the large difference in the grayscale values of the pixels, the objective function determined based on the grayscale value samples with a large difference is elongated along the axis representing the grayscale value, and in the gradient descent process, it is very easy to cause the determined gradient direction to deviate from the minimum value direction, resulting in longer training time and other adverse effects.
[0066] In another exemplary embodiment, the preset normalization coefficient Where T = μ + 3σ, μ and σ are the mean and mean square error of the grayscale values corresponding to each pixel in the background image, respectively. max is the maximum value of the grayscale values corresponding to each pixel in the radiographic image after the compensation processing. By setting the above normalization coefficient, the grayscale range of the pixel after the normalization processing is limited to the μ+3σ value region, and the grayscale values of the pixel determined due to gross errors are eliminated, thereby reducing the misdiagnosis rate of the grayscale values to be eliminated during the compensation processing and improving the imaging quality of the radiographic image after the processing.
[0067] It can be seen from the above embodiments that the present application performs illumination compensation and normalization processing on the original grayscale values of the pixels of the original radiographic image obtained by the imaging device, thereby eliminating the problem of uneven brightness of the radiographic image caused by the influence of the imaging conditions. Figure 3 As an example, the original radiographic image shown in FIG. 1 is processed by the technical solution of the present application. Figure 5 As shown, Figure 5 is a schematic diagram of a radiographic image after illumination compensation processing in an exemplary embodiment of the present application, compared with Figure 5 and Figure 3 It can be seen that the radiographic images processed by the technical solution of this application eliminate Figure 3 The uneven brightness phenomenon in the original radiographic image shown improves the image quality of the radiographic image, thereby avoiding the effects of low effective recognition rate in subsequent image processing due to the uneven brightness of the radiographic image.
[0068] Figure 6 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application. Figure 6At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a light compensation device at the logical level. Of course, in addition to the software implementation, this application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0069] Please refer to Figure 7 , Figure 7 70 is a block diagram of an illumination compensation device according to an exemplary embodiment of the present application. In a software implementation, the illumination compensation device may include an acquisition unit 701, a determination unit 702, and a compensation processing unit 703; wherein:
[0070] An acquisition unit 701 is configured to acquire original grayscale values of pixels in an original radiological image, wherein the original radiological image is acquired by an imaging device;
[0071] A determination unit 702 determines a compensated grayscale value obtained by using the grayscale value of a pixel point of the background image captured by the imaging device;
[0072] The compensation processing unit 703 performs compensation processing on the original grayscale value according to the compensated grayscale value to obtain a compensated radiological image corresponding to the original radiological image.
[0073] Optionally, the compensation grayscale value determined for a pixel point with a smaller grayscale value in the background image is larger, and the compensation grayscale value determined for a pixel point with a larger grayscale value in the background image is smaller.
[0074] Optionally, the grayscale value of a pixel of the compensated radiological image includes the sum of the compensated grayscale value and the original grayscale value of the pixel.
[0075] Optionally, also include:
[0076] The normalization processing unit 704 performs normalization processing on the grayscale values of the pixels after the compensation processing.
[0077] Optionally, the normalization coefficient used in the normalization process includes Where T = μ + 3σ, μ and σ are the mean and mean square error of the grayscale values corresponding to each pixel in the background image, respectively. max It is the maximum value of the grayscale value corresponding to each pixel in the radiological image after the compensation processing.
[0078] Optionally, the determining unit 702 is specifically configured to:
[0079] Based on the maximum original grayscale value of the pixels in the background image, determine an intermediate value that is not less than the maximum original grayscale value and not greater than the maximum theoretical grayscale value;
[0080] The difference between the intermediate value and the grayscale value of the pixel point of the background image is used as the compensation grayscale value.
[0081] Optionally, the determining unit 702 is specifically configured to:
[0082] Acquire multiple background images acquired by an imaging device in the same state;
[0083] Calculating the grayscale mean of pixels at the same position in the multiple background images;
[0084] The compensated grayscale value of the pixel point at the position is determined according to the grayscale value mean.
[0085] The device corresponds to the above method, and more identical details are not repeated here.
[0086] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0087] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0088] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0089] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0090] Although this specification includes many specific implementation details, these should not be interpreted as limiting the scope of any invention or the scope of protection claimed, but are mainly used to describe the features of the specific embodiments of specific inventions. Certain features described in multiple embodiments in this specification may also be implemented in combination in a single embodiment. On the other hand, the various features described in a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. In addition, although features may work in certain combinations as described above and even initially claim protection, one or more features from the claimed combination may be removed from the combination in some cases, and the claimed combination may point to a sub-combination or a variation of a sub-combination.
[0091] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for light compensation, It is characterized in that The method comprises: Obtaining original grayscale values of pixels in an original radiological image, wherein the original radiological image is acquired by an imaging device; Determining a compensated grayscale value obtained by grayscale values of pixels of a background image acquired by the imaging device under imaging conditions identical to those of the original radiographic image; The original grayscale value is compensated according to the compensated grayscale value to obtain a compensated radiographic image corresponding to the original radiographic image.
2. The method according to claim 1, It is characterized in that The step of determining the compensated grayscale value obtained by the grayscale value of the pixel point of the background image collected by the imaging device comprises: Based on the maximum original grayscale value of the pixel points in the background image, determine an intermediate value that is not less than the maximum original grayscale value and not greater than the maximum theoretical grayscale value; The difference between the intermediate value and the grayscale value of the pixel point of the background image is used as the compensation grayscale value.
3. The method according to claim 1, It is characterized in that The smaller the grayscale value of a pixel in the background image, the larger the compensation grayscale value determined is, and the larger the grayscale value of a pixel in the background image, the smaller the compensation grayscale value determined is.
4. The method according to claim 1, It is characterized in that The step of determining the compensated grayscale value obtained by the grayscale value of the pixel point of the background image collected by the imaging device comprises: Acquire multiple background images acquired by an imaging device in the same state; Calculating the grayscale mean of pixels at the same position in the multiple background images; The compensated grayscale value of the pixel point at the position is determined according to the grayscale value mean.
5. The method according to claim 1, It is characterized in that The grayscale value of the pixel point of the compensated radiological image includes the sum of the compensated grayscale value and the original grayscale value of the pixel point.
6. The method according to claim 1, It is characterized in that Also includes: The grayscale values of the pixels after the compensation process are normalized.
7. The method according to claim 6, It is characterized in that The normalization coefficients used in the normalization process include Where T = μ + 3σ, μ and σ are the mean and mean square error of the grayscale values corresponding to each pixel in the background image, respectively. max It is the maximum value of the grayscale value corresponding to each pixel in the radiological image after the compensation processing.
8. A light compensation device, It is characterized in that The device comprises: An acquisition unit, which acquires original grayscale values of pixels in an original radiological image, wherein the original radiological image is acquired by an imaging device; a determination unit, which determines a compensated grayscale value obtained by grayscale values of pixels of a background image acquired by the imaging device under the same imaging conditions as the original radiological image; The compensation processing unit performs compensation processing on the original grayscale value according to the compensated grayscale value to obtain a compensated radiological image corresponding to the original radiological image.
9. An electronic device, It is characterized in that include: processor; a memory for storing processor-executable instructions; The processor is configured to execute instructions to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer instructions stored thereon, It is characterized in that When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
