An image correction method, a correction device, a computer device and a storage medium

By acquiring corrected images and performing grayscale and coordinate matching, the horizontal stripes caused by exposure to power frequency X-ray high voltage generators were eliminated, solving the image quality problem and improving the diagnostic effect of the images.

CN114742715BActive Publication Date: 2025-12-16SHANGHAI HAOBO IMAGING TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111563495.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-20
Publication Date
2025-12-16
Estimated Expiration
2041-12-20

AI Technical Summary

Technical Problem

The exposure dose fluctuations generated by existing power frequency X-ray high voltage generators during exposure cause horizontal stripes in the images, affecting image quality and diagnostic results.

Method used

By acquiring multiple corrected images, grayscale matching and coordinate matching are performed to eliminate interfering horizontal stripes. The horizontal stripes in the image are then eliminated by calculating the difference between the grayscale values ​​of the corrected image and the image to be corrected.

Benefits of technology

It effectively eliminated horizontal stripes caused by exposure dose fluctuations, improved image quality, and ensured the accuracy of diagnostic results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114742715B_ABST
    Figure CN114742715B_ABST
Patent Text Reader

Abstract

The application provides an image correction method, relates to the field of image processing, and particularly relates to an image correction method, a correction device, computer equipment and a storage medium; the application can correct an existing image with interference horizontal lines by setting correction images corresponding to different gray scales, eliminate the horizontal lines in the original image caused by exposure dose fluctuation, thereby realizing image optimization, improving image quality, and effectively improving economic benefits.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image processing, and in particular to an image correction method, a correction device, a computer device and a storage medium. BACKGROUND

[0002] X-ray machine is a device capable of generating X-rays, mainly including X-ray tube, high-voltage generator and high-voltage cable. Industrial soft X-ray machine is mainly used for diffraction analyzer of physical and chemical detection. Industrial hard X-ray machine is mainly applied to the detection of thick materials. The X-ray machine used for diagnosis in medicine is called diagnostic X-ray machine, which can be used for perspective and photography inspection. X-ray perspective is mainly based on the penetration effect, differential absorption and fluorescence effect of X-rays.

[0003] The main function of the high-voltage generator is to supply DC high voltage to the cathode and anode of the X-ray tube and the filament heating voltage. The existing industrial frequency X-ray high-voltage generator has a very low exposure pulse frequency, and continuous image acquisition is performed at the same time of exposure, so that horizontal lines caused by exposure dose fluctuation can be seen on the image, which directly affects the image quality and further affects the diagnosis result, and even the generated image cannot be normally used.

[0004] Therefore, in view of the problems in the prior art, it is particularly important to provide a technology capable of removing the interference horizontal lines in the image. SUMMARY

[0005] The purpose of the present application is to provide a technology capable of removing the interference horizontal lines in the image to solve the above-mentioned problems in the prior art.

[0006] The purpose of the present application is achieved by the following technical solutions:

[0007] An image correction method comprises the following steps:

[0008] S1: acquiring a plurality of correction images, each correction image corresponding to a gray scale, each gray scale being provided with a corresponding gray value range, and the correction image including first interference horizontal lines;

[0009] S2: acquiring a to-be-corrected image, the to-be-corrected image including second interference horizontal lines;

[0010] S3: performing gray scale matching on the to-be-corrected image to match the corresponding correction image;

[0011] S4: performing coordinate matching on the first interference horizontal lines and the second interference horizontal lines;

[0012] S5: eliminating the second interference horizontal lines by calculating the difference between the gray values of the to-be-corrected image and the corresponding correction image.

[0013] Specifically, the step S1 comprises the following steps.

[0014] S11: determine the gray value range corresponding to each gray scale and the exposure current;

[0015] S12: collect the corresponding bright field image as a correction image according to the determined exposure current;

[0016] More specifically, the first interference horizontal lines and the second interference horizontal lines each comprise a plurality of interference horizontal lines, and the number is the same; the step S1 further comprises: S13: in the correction image, determine the vertical starting point coordinates and the terminal coordinates of the first interference horizontal lines.

[0017] More specifically, the step S4 comprises the following steps:

[0018] S41: in the image to be corrected, determine the vertical starting point coordinates and the terminal coordinates of the second interference horizontal lines;

[0019] S42: through image offset, make the first interference horizontal lines and the second interference horizontal lines have the same vertical starting point coordinates and terminal coordinates.

[0020] Further, the vertical starting point coordinates and the terminal coordinates of the first interference horizontal lines, and the vertical starting point coordinates and the terminal coordinates of the second interference horizontal lines are each expressed by a pixel row.

[0021] Still further, the correction image comprises a first pixel matrix; the image to be corrected comprises a second pixel matrix; the step S4 further comprises: S43: perform offset calculation to calculate the first pixel matrix or the second pixel matrix after offset.

[0022] Still further, the step S5 comprises: perform difference calculation on the second pixel matrix and the first pixel matrix after offset calculation.

[0023] To achieve the above-mentioned purpose, the application further provides a correction device using the image correction method, comprising: a storage module, a gray scale division module, a gray scale matching module, a coordinate matching module, a data processing module and an image generation module connected in sequence; the storage module is used for storing data, and stores a plurality of correction images; the gray scale division module is used for dividing the gray scale in the determined gray value range, and each gray scale is matched with a corresponding correction image; the gray scale matching module is used for matching the gray scale of the image to be corrected, and matching the corresponding correction image; the coordinate matching module is used for matching the coordinates of the image to be corrected and the correction image, so that the vertical coordinates of the first interference horizontal lines and the second interference horizontal lines are the same; the data processing module is used for performing coordinate offset calculation on the first pixel matrix or the second pixel matrix, and performing difference calculation on the second pixel matrix and the first pixel matrix; the image generation module synthesizes and outputs the image according to the result calculated by the data processing module.

[0024] To achieve the above object, the application further provides a computer device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0025] To achieve the above object, the application further provides a computer readable storage medium, which stores a computer program, wherein the computer program is executable on a processor to implement the steps of the above method.

[0026] The application has the advantages that: the image correction method can correct the existing image with interference horizontal lines by setting correction images corresponding to different gray scales, eliminate the horizontal lines in the original image due to exposure dose fluctuation, realize the optimization of the image, improve the image quality and effectively improve the economic benefits. BRIEF DESCRIPTION OF DRAWINGS

[0027] The application can be better understood by describing the exemplary embodiments disclosed by the application in conjunction with the accompanying drawings, in which:

[0028] Figure 1 Fig. 1 shows a schematic flow chart of the image correction method according to the disclosed embodiment of the application;

[0029] Figure 2 Fig. 2 shows a schematic block diagram of the image correction device using the image correction method according to the disclosed embodiment of the application;

[0030] Figure 3 Fig. 3 shows a schematic diagram of the hardware structure of the computer device according to the disclosed embodiment of the application. DETAILED DESCRIPTION

[0031] In order to make the object, technical solutions and advantages of the application clearer, the application is further described in detail below in conjunction with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application and not to limit the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the application.

[0032] The application provides an image correction method, a correction device, a computer device and a computer readable storage medium, which can eliminate the horizontal lines in the original image due to exposure dose fluctuation. The application creatively proposes an image correction method, which can not only correct the newly generated image to eliminate the horizontal lines in the original image due to exposure dose fluctuation, but also correct the existing image with interference horizontal lines to effectively improve the image quality.

[0033] Embodiment one

[0034] Please refer to Figure 1 The embodiment provides an image correction method, comprising the following steps:

[0035] S1: acquiring a plurality of correction images, each correction image corresponding to a gray scale, each gray scale being provided with a corresponding gray scale value range, and the correction image comprising first interference horizontal lines;

[0036] S2: acquiring a to-be-corrected image, the to-be-corrected image comprising second interference horizontal lines;

[0037] S3: performing gray scale matching on the to-be-corrected image to match a corresponding correction image;

[0038] S4: performing coordinate matching on the first interference horizontal lines and the second interference horizontal lines;

[0039] S5: eliminating the second interference horizontal lines by performing gray scale value difference calculation on the to-be-corrected image and the corresponding correction image;

[0040] S6: performing image synthesis according to data obtained in step S5 to generate and output an image.

[0041] The first interference horizontal lines and the second interference horizontal lines each comprise a plurality of interference horizontal lines and have the same number.

[0042] Specifically, each correction image in step S1 is obtained through the following steps:

[0043] S11: determining the gray scale value range corresponding to each gray scale and the exposure current;

[0044] S12: collecting a corresponding bright field image as a correction image according to the determined exposure current;

[0045] S13: determining the vertical starting point coordinates and the vertical end point coordinates of the first interference horizontal lines in the correction image.

[0046] Each gray scale value is obtained by adjusting the exposure current of a power frequency machine to obtain a corresponding exposure dose value, so that the exposure bright field image gray scale mean value obtained under the exposure condition is around the gray scale defined gray scale range. Thus, according to the determined exposure current, the exposure bright field image corresponding to the gray scale is collected and stored as a correction image, and the correction image obtained in this way contains the first interference horizontal lines generated by the power frequency machine exposure dose fluctuation.

[0047] In step S2, that is, when actually exposing and photographing an object in an actual terminal application scene, the collected bright field image also contains the second interference horizontal lines generated by the power frequency machine dose fluctuation.

[0048] Step S3 matches the gray scale by the gray scale value of the captured image of the object to be corrected by actual exposure, and then retrieves a correction image closest to the gray scale of the image to be corrected from the previously prepared correction images as the actual correction image.

[0049] More specifically, step S4 includes the following steps:

[0050] S41: determining the longitudinal start point coordinate and the end point coordinate of the second interference horizontal lines in the image to be corrected;

[0051] S42: making the first interference horizontal lines and the second interference horizontal lines have the same longitudinal start point coordinate and end point coordinate by image offset;

[0052] wherein the longitudinal start point coordinate and the end point coordinate of the first interference horizontal lines and the longitudinal start point coordinate and the end point coordinate of the second interference horizontal lines are expressed by pixel rows; the correction image includes a first pixel matrix; and the image to be corrected includes a second pixel matrix;

[0053] S43: performing offset calculation to calculate the first pixel matrix or the second pixel matrix after offset.

[0054] Further, step S6 eliminates the second interference horizontal lines by difference calculation of the second pixel matrix after offset calculation and the first pixel matrix.

[0055] Specifically, the first pixel matrix is denoted as matrix A, and the second pixel matrix is denoted as matrix B; matrix A is an m-row n-column matrix formed by m×n numbers a ij ; matrix B is an m-row n-column matrix formed by m×n numbers b ij . Each a ij and b ij in matrix A and matrix B respectively represents the corresponding gray scale value of each corresponding pixel point of the correction image and the image to be corrected.

[0056] When offset and offset calculation are performed through steps S52 to S53, only one of the correction image or the image to be corrected needs to be offset. Taking the correction image offset by x pixels as an example, matrix A forms matrix C after offset, and matrix C is an m-row n-column matrix formed by m×n numbers c i'j , and c i'j =a ij , wherein i'=i-x.

[0057] Then, difference calculation is performed on matrix B and matrix C through step S5, and each b ij in each row of matrix B is subjected to difference calculation with the corresponding c i'j in matrix C, and finally matrix D is obtained; matrix D is an m-row n-column matrix formed by m×n numbers dij m rows and n columns.

[0058] Finally, through step S6, the image is synthesized and generated according to the calculated d ij value of the gray scale.

[0059] Please continue to refer to Figure 2 , shows a correction device, in this embodiment, the correction device can include or be divided into one or more program modules, one or more program modules are stored in the storage medium, and are executed by one or more processors to complete the present application, and the above-mentioned image correction method can be realized. The program module referred to in the present application refers to a series of computer program instruction segments capable of completing a specific function, which is more suitable for describing the execution process of the correction device in the storage medium. The following description will specifically introduce the functions of each program module of the present embodiment.

[0060] A correction device using the above-mentioned image correction method, comprising: a storage module, a gray scale division module, a gray scale matching module, a coordinate matching module, a data processing module and an image generation module connected in turn;

[0061] The storage module is used for storing data, and stores a plurality of correction images.

[0062] The gray scale division module is used for dividing the gray scale in a determined gray scale value range. Specifically, the gray scale division module can set the step value when dividing the gray scale. In this embodiment, the distribution range of the bright field gray scale value of the image is from 0 to 65535 gray scale range, and 0-65535 gray scale is divided by 1000 gray scale steps: that is, 0, 1000, 2000, 3000…… to 65535. After dividing the gray scale, the gray scale division module compares the correction images stored in the storage module, so that each gray scale is matched with the corresponding correction image.

[0063] The gray scale matching module is used for gray scale matching of the image to be corrected, and determines the corresponding gray scale of the image to be corrected, so as to retrieve the correction image corresponding to the matched gray scale in the storage module.

[0064] The coordinate matching module is used for coordinate matching of the image to be corrected and the correction image, so that the longitudinal coordinates of the first interference horizontal lines and the second interference horizontal lines are the same.

[0065] The data processing module is used for coordinate offset calculation of the first pixel matrix or the second pixel matrix, and difference calculation of the second pixel matrix and the first pixel matrix.

[0066] The image generation module synthesizes and outputs the image according to the result calculated by the data processing module.

[0067] The embodiment also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack-mounted server (including a single server or a server cluster composed of multiple servers), which can execute programs. The computer device 20 of the embodiment includes at least but is not limited to a memory 21 and a processor 22, which are communicatively connected through a system bus as shown. It should be noted that Figure 3 Figure 3 Only the computer device 20 with the components 21-22 is shown, but it should be understood that all the shown components are not required to be implemented, and more or fewer components can be alternatively implemented.

[0068] In the embodiment, the memory 21 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 21 can be an internal storage unit of the computer device 20, such as a hard disk or a memory of the computer device 20. In other embodiments, the memory 21 can also be an external storage device of the computer device 20, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 20. Of course, the memory 21 can include both the internal storage unit and the external storage device of the computer device 20. In the embodiment, the memory 21 is generally used to store an operating system and various application software installed on the computer device 20, such as the program code of the correction device of the embodiment one, etc. In addition, the memory 21 can also be used to temporarily store various data that have been output or will be output.

[0069] The processor 22 can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 22 is generally used to control the overall operation of the computer device 20. In the embodiment, the processor 22 is used to run the program code or process data stored in the memory 21, such as running the correction device to implement the image correction method of the embodiment one.

[0070] ​The embodiment also provides a computer readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application store, and the like, which stores a computer program. The computer program is executed by a processor to implement the corresponding function. The computer readable storage medium of the embodiment is used to store a correction device, and is executed by the processor to implement the image correction method of the first embodiment.

[0071] The above embodiment numbers of the application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0072] Any process or method descriptions in flow charts or described elsewhere herein can be understood as representing one or more steps of a method or algorithm, and the scope of the preferred embodiments of the application includes additional implementation in which one or more steps are performed in a different order, including an order that is not shown or discussed, and / or including additional steps not shown or discussed. The various steps of the methods described herein can be performed by hardware, software, or any combination of hardware and software.

[0073] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiment method can be instructed by a program to complete the relevant hardware, and the program can be stored in a computer readable medium. When the program is executed, it includes one or a combination of steps of the method embodiment.

[0074] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0075] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment.

[0076] The above merely describes the preferred embodiments of the present application, and is not intended to limit the patent scope of the present application, and any equivalent structure or equivalent process conversion, or direct or indirect application in other related technical fields, which are made by using the content of the present application specification and drawings, are also included in the patent protection scope of the present application.

Claims

1. An image correction method, characterized in that, To eliminate horizontal lines in the original image caused by fluctuations in exposure dose, the following steps are included: S1: Acquire multiple corrected images, each corresponding to a gray level, and each gray level has a corresponding gray value range. The corrected image includes a first interference horizontal bar, wherein: Each grayscale value is adjusted by changing the exposure current of the power frequency generator to obtain a corresponding exposure dose value, so that under the exposure conditions, the average grayscale value of the obtained exposure bright field image corresponds to the grayscale range defined by the current grayscale. Thus, exposure is performed according to each determined exposure current, and the bright field image of the corresponding grayscale is collected and stored as a correction image. The obtained correction image contains the first interference horizontal stripe caused by the fluctuation of the power frequency generator exposure dose. S2: Obtain the image to be corrected, the image to be corrected including the second interference stripes; S3: Perform grayscale matching on the image to be corrected to find the corresponding corrected image; S4: Perform coordinate matching between the first and second interference stripes; S5: Eliminate the second interference horizontal stripe by calculating the difference in gray values ​​between the image to be corrected and the corresponding corrected image.

2. The image correction method according to claim 1, characterized in that, Step S1 includes the following steps: S11: Determine the grayscale value range and exposure current corresponding to each grayscale level; S12: Acquire the corresponding bright field image based on the determined exposure current as the correction image.

3. An image correction method according to claim 1 or 2, characterized in that: Both the first and second interference fringes include several interference fringes, and the number is the same. Step S1 further includes: S13: In the corrected image, determine the longitudinal starting point coordinates and ending point coordinates of the first interference fringe.

4. The image correction method according to claim 3, characterized in that, Step S4 includes the following steps: S41: In the image to be corrected, determine the longitudinal starting point and ending point coordinates of the second interference fringe; S42: By image offsetting, the first interference fringe and the second interference fringe have the same vertical start coordinates and end coordinates.

5. The image correction method according to claim 4, characterized in that: The vertical start and end coordinates of the first interference ridge and the vertical start and end coordinates of the second interference ridge are both represented by pixel rows.

6. The image correction method according to claim 5, characterized in that, Step S4 further includes: The image to be corrected includes a first pixel matrix; the image to be corrected includes a second pixel matrix. Step S4 further includes: S43: Perform offset calculation to calculate the first or second pixel matrix after offset.

7. The image correction method according to claim 6, characterized in that, Step S5 includes: calculating the difference between the second pixel matrix after offset calculation and the first pixel matrix.

8. A correction apparatus employing the image correction method according to any one of claims 1 to 7, characterized in that, include: The storage module, grayscale division module, grayscale matching module, coordinate matching module, data processing module, and image generation module are connected sequentially one by one. The storage module is used to store data, and stores several corrected images; The grayscale division module is used to divide grayscale within a defined grayscale value range, and each grayscale is matched with a corresponding correction image. The grayscale matching module is used to perform grayscale matching on the image to be corrected and to match the corresponding corrected image; the coordinate matching module is used to perform coordinate matching between the image to be corrected and the corrected image so that the vertical coordinates of the first interference fringe and the second interference fringe are the same. The data processing module is used to calculate the coordinate offset of the first pixel matrix or the second pixel matrix, and to calculate the difference between the second pixel matrix and the first pixel matrix. The image generation module synthesizes and outputs an image based on the results calculated by the data processing module.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Automatic judgment and correction method of cone beam CT annulus artifact

    CN102800073A