Wide-angle neutron radiography method, device, equipment and medium with image correction function
By adjusting the direction of neutron beam flow and image correction technology, the problems of low neutron utilization efficiency and limited imaging field in neutron photography technology are solved, and efficient and low-cost neutron detection is achieved.
Patent Information
- Application Number
- CN202211392291.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-08
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-11-08
AI Technical Summary
In neutron photography technology, long collimators and strict opening angle limitations lead to low neutron utilization efficiency and limited imaging field of view, especially in application scenarios with low resolution requirements.
By adjusting the direction of the neutron beam flow, a fan-shaped neutron beam flow is obtained, and the pixel point position and grayscale value of the neutron photographic image are corrected, the imaging field is expanded, the neutron utilization efficiency is improved, and the image distortion problem is solved.
While ensuring image quality, it improves neutron utilization efficiency and imaging field, and reduces detection time and cost.
Smart Images

Figure CN115825128B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of neutron photography, and in particular to a wide-angle neutron photography method, device, equipment and medium with an image correction function. Background Art
[0002] Neutron radiography is an important nondestructive testing tool. In neutron radiography, in order to improve image resolution, a longer collimator is often used, and the collimator opening angle is strictly limited. Currently, common designs are all below 6 degrees. The advantage of this is that a higher parallelism neutron beam can be obtained, but it also faces problems such as low neutron utilization efficiency and limited imaging field of view. In practical applications, it is necessary to increase the photography time required for detection, which increases the detection cost. This limitation is particularly prominent in some application scenarios where the resolution requirements are not very high. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a wide-angle neutron radiography method, device, equipment and medium with image correction function, aiming to solve at least one of the above technical problems.
[0004] In the first aspect, the technical solution of the present invention to solve the above technical problem is as follows: a wide-angle neutron radiography method with image correction function, the method comprising:
[0005] obtaining an initial neutron beam generated by a neutron source;
[0006] Adjusting the direction of neutrons in the initial neutron beam to obtain a fan-shaped neutron beam with a first angle, wherein the first angle is greater than a set angle;
[0007] Acquiring a neutron radiographic image based on the fan neutron beam;
[0008] Performing distortion correction on the position of each pixel in the neutron radiographic image to obtain an initial corrected image;
[0009] The grayscale value of each pixel in the initial corrected image is corrected to obtain a corrected target image.
[0010] The beneficial effects of the present invention are as follows: in the scheme of the present application, by adjusting the direction of the neutrons in the initial neutron beam, the direction of the neutrons in the initial neutron beam is expanded to obtain a fan-shaped neutron beam, thereby improving the neutron utilization efficiency and increasing the imaging field of view. Moreover, in the scheme of the present application, the neutron photography image with the fan-shaped neutron beam can be corrected twice (correction of the pixel position and correction of the grayscale value), thereby solving the problem of image distortion in the wide-angle (first angle) case, and ensuring the image quality while obtaining the wide-angle photography result.
[0011] Based on the above technical solution, the present invention can also be improved as follows.
[0012] Furthermore, the above-mentioned distortion correction of the position of each pixel point in the neutron radiographic image to obtain an initial corrected image includes:
[0013] Acquiring a first distance between the neutron source and the photographed object, and a second distance between the neutron source and an imaging screen;
[0014] According to the center point of the neutron radiographic image, a plurality of constraint points in four quadrants are determined on the neutron radiographic image along the x-axis direction and the y-axis direction respectively;
[0015] Determine a third distance between two target constraint points adjacent to the center point in each of the constraint points;
[0016] For every two adjacent constraint points, determining a correction distance corresponding to the third distance according to the first distance, the second distance and the third distance;
[0017] Determining a distortion function according to the correction distance and the two target constraint points, wherein the distortion function represents a corresponding relationship between positions of pixel points in the image before correction and positions of pixel points in the target image after correction;
[0018] According to the distortion function, the position of each pixel point in the neutron radiographic image is corrected to obtain the corrected position of each pixel point;
[0019] An initial corrected image is determined according to the corrected positions of each pixel point.
[0020] The beneficial effect of adopting the above further scheme is that, through the multiple constraint points determined by the center point of the neutron radiographic image, the distortion function between the corresponding pixel points before and after correction can be determined first. Through the distortion function, the position of each pixel point on the corrected image can be determined based on the position of each pixel point on the image before correction, thereby realizing the correction of the neutron radiographic image.
[0021] Further, the above-mentioned determining the distortion function according to the correction distance and the two target constraint points includes:
[0022] Correcting the first positions of the two target constraint points according to the correction distance to obtain the corrected second positions of the two target constraint points respectively;
[0023] A distortion function is determined according to the corrected second positions of the two target constraint points and the first positions of the two target constraint points.
[0024] The beneficial effect of adopting the above further solution is that the amount of calculation can be reduced by determining the distortion function based on the positions of the two target constraint points before and after the correction.
[0025] Furthermore, the above distortion function also represents the corresponding relationship between the grayscale value of the pixel in the image before correction and the grayscale value of the pixel in the corrected target image. Correcting the grayscale value of each pixel in the initial corrected image to obtain the corrected target image includes:
[0026] According to the distortion function, the grayscale value of each pixel in the initial corrected image is corrected to obtain the corrected grayscale value of each pixel;
[0027] A corrected target image is determined according to the corrected grayscale values of each pixel point.
[0028] The beneficial effect of adopting the above further solution is that by correcting the positions and grayscale values of the pixels in the image, the quality of the corrected target image is further improved.
[0029] Furthermore, the grayscale value of each pixel in the initial corrected image is corrected according to the distortion function to obtain the corrected grayscale value of each pixel, including:
[0030] According to the second formula corresponding to the distortion function, the grayscale value of each pixel in the initial corrected image is corrected to obtain the corrected grayscale value of each pixel, wherein the second formula is:
[0031]
[0032] Wherein, D represents the first distance, A′B′ represents the third distance, and L represents the second distance. represents the gray value correction coefficient, f(x, y) represents the pixel value of the coordinate (x, y) point in the initial corrected image, f(x, y)' represents the gray value of the pixel after correction, and s is the position conversion coefficient.
[0033] The beneficial effect of adopting the above further solution is that the gray value can be accurately corrected according to the relationship between the first distance, the second distance, the third distance and the gray value.
[0034] Furthermore, the grayscale value of each pixel in the initial corrected image is corrected to obtain a corrected target image, including:
[0035] Correcting the grayscale value of each pixel in the initial corrected image to obtain a corrected first image;
[0036] De-noising the first image to obtain a corrected target image.
[0037] The beneficial effect of adopting the above further solution is that the noise of the neutron radiographic image can be removed, and the influence of the noise on the corrected target image can be reduced.
[0038] Furthermore, the above-mentioned denoising of the first image to obtain a corrected target image includes:
[0039] De-noising the first image to obtain a de-noised second image;
[0040] Determining, according to the second image, grayscale values of non-integer positions in the second image;
[0041] The modified target image is determined according to the grayscale values of non-integer positions in the second image.
[0042] The beneficial effect of adopting the above further solution is that, by taking into account the grayscale values of non-integer positions in the image before correction, the final target image can be made clearer.
[0043] In a second aspect, in order to solve the above technical problems, the present invention also provides a wide-angle neutron radiography device with an image correction function, the device comprising:
[0044] A neutron beam acquisition module, used for acquiring an initial neutron beam generated by a neutron source;
[0045] An angle adjustment module, used for adjusting the direction of neutrons in the initial neutron beam to obtain a fan-shaped neutron beam with a first angle, wherein the first angle is greater than a set angle;
[0046] An image acquisition module, used for acquiring a neutron radiographic image based on the fan neutron beam;
[0047] A first correction module, used for performing distortion correction on the position of each pixel point in the neutron radiographic image to obtain an initial corrected image;
[0048] The second correction module is used to correct the gray value of each pixel in the initial correction image to obtain a corrected target image.
[0049] In a third aspect, in order to solve the above-mentioned technical problem, the present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the wide-angle neutron photography method with image correction function of the present application is implemented.
[0050] In a fourth aspect, in order to solve the above-mentioned technical problem, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the wide-angle neutron photography method with image correction function of the present application is implemented.
[0051] Additional aspects and advantages of the present application will be partially given in the following description, which will become apparent from the following description, or will be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for describing the embodiments of the present invention are briefly introduced below.
[0053] Figure 1 A schematic flow chart of a wide-angle neutron radiography method with an image correction function provided by one embodiment of the present invention;
[0054] Figure 2 A schematic diagram of the structure of a wide-angle fan-shaped neutron beam provided by an embodiment of the present invention;
[0055] Figure 3 A schematic diagram of a distorted image provided by an embodiment of the present invention;
[0056] Figure 4 A schematic structural diagram of a wide-angle neutron radiography system with an image correction function provided by an embodiment of the present invention;
[0057] Figure 5 A schematic diagram of a distortion function determination principle provided by an embodiment of the present invention;
[0058] Figure 6 A schematic diagram of grayscale mapping provided by an embodiment of the present invention;
[0059] Figure 7 A schematic diagram of a distortion map and a correction map provided by an embodiment of the present invention;
[0060] Figure 8 A schematic structural diagram of a wide-angle neutron radiography device with an image correction function provided by one embodiment of the present invention;
[0061] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0062] The principles and features of the present invention are described below. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.
[0063] The technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0064] The solution provided by the embodiment of the present invention can be applied to any application scenario that requires obtaining a clear image based on a wide-angle neutron radiography system.
[0065] The embodiment of the present invention provides a possible implementation method, such as Figure 1 As shown in FIG. 1 , a flow chart of a wide-angle neutron photography method with an image correction function is provided. The scheme can be executed by a processor corresponding to the wide-angle neutron photography system. The processor can be located inside the wide-angle neutron photography system. For the convenience of description, the method provided by the embodiment of the present invention will be described below by taking the processor as an execution subject as an example. Figure 1 The method may include the following steps:
[0066] Step S110, obtaining an initial neutron beam generated by a neutron source;
[0067] Step S120, adjusting the direction of neutrons in the initial neutron beam to obtain a fan-shaped neutron beam with a first angle, wherein the first angle is greater than a set angle;
[0068] Step S130, acquiring a neutron radiographic image based on the fan neutron beam;
[0069] Step S140, performing distortion correction on the position of each pixel in the neutron radiographic image to obtain an initial corrected image;
[0070] Step S150, correcting the grayscale value of each pixel in the initial corrected image to obtain a corrected target image.
[0071] According to the method of the present invention, by adjusting the direction of neutrons in the initial neutron beam, the direction of neutrons in the initial neutron beam is expanded, a fan-shaped neutron beam is obtained, the neutron utilization efficiency is improved, and the imaging field of view is increased. In addition, in the present application scheme, the neutron photography image with the fan-shaped neutron beam can be corrected twice (correction of pixel position and correction of grayscale value), which solves the problem of image distortion in the wide-angle (first angle) case, and ensures the image quality while obtaining the wide-angle photography result.
[0072] The scheme of the present invention is further described below in conjunction with the following specific embodiments. In this embodiment, the wide-angle neutron radiography method with image correction function may include the following steps:
[0073] Step S110, obtaining an initial neutron beam generated by a neutron source;
[0074] The angle corresponding to the initial neutron beam is usually a set angle, at which a neutron beam with higher parallelism can be obtained, wherein the set angle can be 6 degrees.
[0075] Optionally, the initial neutron beam may be generated by a neutron source system.
[0076] Step S120, adjusting the direction of neutrons in the initial neutron beam to obtain a fan-shaped neutron beam with a first angle, wherein the first angle is greater than a set angle.
[0077] Optionally, the fan-shaped neutron beam of the first angle can be adjusted by a wide-angle beam control subsystem.
[0078] Step S130, acquiring a neutron radiographic image based on the fan neutron beam.
[0079] The direction of the neutrons in the initial neutron beam is adjusted, that is, the angle corresponding to the initial neutron beam is expanded, so that the angle of the fan-shaped neutron beam is wide. The neutron radiographic image obtained based on the fan-shaped neutron beam at the first angle can improve the imaging field of view and the neutron utilization efficiency.
[0080] As an example, see Figure 2 The structural schematic diagram of the wide-angle fan-shaped neutron beam shown in the figure has an opening distance d1 at the entrance of the neutron source, an opening distance d2 at the exit of the neutron source, an opening angle θ, and a first angle after expansion is θ, and the imaging field of view changes from d1 to d2.
[0081] Optionally, the neutron source and the center of the photographed object can be aligned to obtain a neutron radiographic image, which is a distorted image. For details, see Figure 3 The schematic diagram of the distorted image is shown in Figure 1. Figure 3 The black shadow part in the figure is the distorted image.
[0082] Step S140, performing distortion correction on the position of each pixel in the neutron radiographic image to obtain an initial corrected image;
[0083] Optionally, the neutron radiographic image may be subjected to distortion correction by an imaging subsystem with an image correction function to obtain an initial corrected image.
[0084] Since the angle of the initial neutron beam is enlarged, the acquired neutron radiographic image may be distorted. After acquiring the neutron radiographic image, the distortion may be corrected to make the obtained initial corrected image clearer and of better quality.
[0085] Before distortion correction is performed on neutron radiography images, see Figure 4 , you can first obtain the following parameters:
[0086] Neutron source to the object ( Figure 4 A first distance D between the inspected products shown in FIG.
[0087] Neutron source to the imaging screen ( Figure 4 A second distance L between the imaging system with image correction function shown in ;
[0088] The apparent size of the sample (the object being photographed);
[0089] The above-mentioned distortion correction of the position of each pixel point in the neutron radiographic image to obtain an initial corrected image includes: according to the center point of the neutron radiographic image, a plurality of constraint points in four quadrants are determined on the neutron radiographic image along the x-axis direction and the y-axis direction respectively; the third distance between two target constraint points adjacent to the center point in each constraint point is determined; for every two adjacent constraint points, according to the first distance, the second distance and the third distance, a correction distance corresponding to the third distance is determined; according to the correction distance and the two target constraint points, a distortion function is determined, the distortion function characterizing the corresponding relationship between the position of the pixel point in the image before correction and the position of the pixel point in the corrected target image; according to the distortion function, the position of each pixel point in the neutron radiographic image is corrected to obtain the corrected position of each pixel point; according to the corrected position of each pixel point, an initial corrected image is determined.
[0090] See also Figure 3 The schematic diagram shown, Figure 3 Take the center point O of the neutron radiographic image as an example, and Figure 3 The four quadrants in the x-axis and y-axis directions shown in the figure determine more constraint points. Two adjacent constraint points divide the distorted image into irregular polygons. The polygons may be quadrilaterals. Quadrilaterals are easier to calculate and the distorted quadrilaterals of the neutron image can also be well fitted and restored.
[0091] Optionally, for every two adjacent constraint points, determining, according to the first distance, the second distance and the third distance, a correction distance corresponding to the third distance includes:
[0092] According to the first distance, the second distance and the third distance, a correction distance corresponding to the third distance is determined by a second formula, wherein the second formula is:
[0093]
[0094] Wherein, D is the first distance, L is the second distance, A′B′ is the third distance, and AB is the corrected distance.
[0095] As an example, take two adjacent constraint points among multiple constraint points as an example, such as constraint points A' and B', calculate the distance A'B' (third distance) between the two constraint points, and then determine the corrected distance AB according to the first formula, the first distance D, the second distance L and the third distance A'B'. The principle can be seen in Figure 5 .
[0096] The above formula (1) can be used to determine the position of the constraint points near the central constraint point in the correction image (corrected target image), and the above formula (1) is used to radially expand to the surrounding constraint points until the positions of all constraint points in the correction image are determined. That is, the above distortion function is determined based on the correction distance and the two target constraint points, including:
[0097] Correcting the first positions of the two target constraint points according to the correction distance to obtain the corrected second positions of the two target constraint points respectively;
[0098] A distortion function is determined according to the corrected second positions of the two target constraint points and the first positions of the two target constraint points.
[0099] Optionally, the above-mentioned determining the distortion function according to the second positions respectively corresponding to the two corrected target constraint points and the first positions of the two target constraint points includes:
[0100] The distortion function is determined by a second formula according to the second positions corresponding to the two corrected target constraint points and the first positions of the two target constraint points, wherein the second formula is:
[0101] x'=s(x,y)
[0102] y'=t(x,y)
[0103] Wherein, (x', y') is a first position corresponding to a target constraint point, (x, y) is a second position corresponding to the target constraint point, and s and t are position conversion coefficients, respectively.
[0104] For any pixel in the neutron radiographic image, the corresponding distortion is the same as that of other pixel points. Therefore, based on the distortion function that can reflect the distortion of the neutron radiographic image, the position of each pixel in each polygon in the corrected target prediction can be determined.
[0105] S150, correcting the grayscale value of each pixel in the initial corrected image to obtain a corrected target image.
[0106] In the present application, in addition to the position correction, the distortion correction can also be performed from the grayscale value correction aspect. Grayscale value correction is mainly to reduce the contrast unevenness problem caused by wide angle. Based on the above content, the above distortion function also characterizes the correspondence between the grayscale value of the pixel point in the image before correction and the grayscale value of the pixel point in the corrected target image. The grayscale value of each pixel point in the initial corrected image is corrected to obtain the corrected target image, including:
[0107] According to the distortion function, the grayscale value of each pixel in the initial corrected image is corrected to obtain the corrected grayscale value of each pixel;
[0108] A corrected target image is determined according to the corrected grayscale values of each pixel point.
[0109] The above contrast distortion is related to the first distance and the third distance. The specific formula is as follows:
[0110]
[0111] Among them, D represents the first distance, A'B' represents the third distance, Represents the gray value correction coefficient. The combined distance gray value correction formula (first formula) is as follows:
[0112]
[0113] Wherein, f(x, y) represents the pixel value of the coordinate point (x, y) in the initial corrected image, f(x, y)' represents the grayscale value of the pixel after correction, and s is the position conversion coefficient.
[0114] Optionally, the above-mentioned correcting the gray value of each pixel in the initial corrected image to obtain a corrected target image includes:
[0115] Correcting the grayscale value of each pixel in the initial corrected image to obtain a corrected first image;
[0116] De-noising the first image to obtain a corrected target image.
[0117] Among them, the denoising process can remove Gaussian noise and impulse noise in the distorted image and improve the image quality of the initial corrected image.
[0118] Optionally, the denoising of the first image to obtain a corrected target image includes:
[0119] De-noising the first image to obtain a de-noised second image;
[0120] Determining, according to the second image, grayscale values of non-integer positions in the second image;
[0121] The modified target image is determined according to the grayscale values of non-integer positions in the second image.
[0122] After denoising, for each non-integer grayscale value in the second image (distorted image), that is, the grayscale value of each pixel in the second image, this non-integer grayscale value corresponds to an integer grayscale value in the correction image (target image). Figure 6 For the grayscale values of each non-integer position in the second image (distortion image), the second image can be represented as g(x', y'), and the grayscale values of the non-integer positions (for example, Figure 6 The (x', y') shown in is mapped to obtain the grayscale value of each integer position in the target image (for example, Figure 6 The (x, y) shown in , and then the corrected target image is obtained, the target image is Figure 6 The correction map shown in can be expressed as f(x, y).
[0123] As an example, Figure 7 Each point in the distortion image (neutron radiographic image) shown in FIG. 1 is subjected to distortion correction according to the scheme of the present application, and the target image ( Figure 7 By removing the points in the correction graph shown in ), a better quality graph is obtained. Figure 7 In the figure, A'B' represents the gray value correction area inside the image, A"B" represents the gray value correction area in the middle, and A"'B"' represents the gray value correction area outside the image.
[0124] It is understandable that if the distorted image is not subjected to denoising, the position of each pixel point after the correction can be obtained by mapping the grayscale value of each point in the distorted image.
[0125] Based on Figure 1 Based on the same principle as the method shown in , the embodiment of the present invention also provides a wide-angle neutron radiography device 20 with an image correction function, such as Figure 8 As shown in , the wide-angle neutron radiography device 20 with image correction function may include a neutron beam acquisition module 210, an angle adjustment module 220, an image acquisition module 230, a first correction module 240 and a second correction module 250, wherein:
[0126] A neutron beam acquisition module 210 is used to acquire an initial neutron beam generated by a neutron source;
[0127] An angle adjustment module 220, used to adjust the direction of neutrons in the initial neutron beam to obtain a fan-shaped neutron beam with a first angle, wherein the first angle is greater than a set angle;
[0128] An image acquisition module 230, used for acquiring a neutron radiographic image based on the fan neutron beam;
[0129] A first correction module 240 is used to perform distortion correction on the position of each pixel in the neutron radiographic image to obtain an initial corrected image;
[0130] The second correction module 250 is used to correct the gray value of each pixel in the initial correction image to obtain a corrected target image.
[0131] Optionally, when the first correction module 240 performs distortion correction on the position of each pixel point in the neutron radiographic image to obtain an initial corrected image, it is specifically used to:
[0132] Acquire a first distance between the neutron source and the photographed object, and a second distance between the neutron source and the imaging screen; determine a plurality of constraint points in four quadrants on the neutron radiographic image along the x-axis direction and the y-axis direction respectively according to the center point of the neutron radiographic image; determine a third distance between two target constraint points adjacent to the center point in each constraint point; for every two adjacent constraint points, determine a correction distance corresponding to the third distance according to the first distance, the second distance and the third distance; determine a distortion function according to the correction distance and the two target constraint points, the distortion function characterizing the corresponding relationship between the position of the pixel point in the image before correction and the position of the pixel point in the corrected target image; correct the position of each pixel point in the neutron radiographic image according to the distortion function to obtain the corrected position of each pixel point; determine an initial corrected image according to the corrected position of each pixel point.
[0133] Optionally, when determining the distortion function according to the correction distance and the two target constraint points, the first correction module 240 is specifically used to:
[0134] According to the correction distance, the first positions of the two target constraint points are corrected to obtain the second positions corresponding to the two corrected target constraint points; according to the second positions corresponding to the two corrected target constraint points and the first positions of the two target constraint points, a distortion function is determined.
[0135] Optionally, the distortion function further represents the correspondence between the grayscale values of the pixels in the image before correction and the grayscale values of the pixels in the corrected target image. When the second correction module 250 corrects the grayscale values of each pixel in the initial corrected image to obtain the corrected target image, it is specifically used to:
[0136] According to the distortion function, the grayscale value of each pixel in the initial corrected image is corrected to obtain the corrected grayscale value of each pixel;
[0137] A corrected target image is determined according to the corrected grayscale values of each pixel point.
[0138] Optionally, when the second correction module 250 corrects the grayscale value of each pixel in the initial corrected image according to the distortion function to obtain the corrected grayscale value of each pixel, it is specifically used to:
[0139] According to the first formula corresponding to the distortion function, the grayscale value of each pixel in the initial corrected image is corrected to obtain the corrected grayscale value of each pixel, wherein the first formula is:
[0140]
[0141] Wherein, D represents the first distance, A'B' represents the third distance, and L represents the second distance. represents the gray value correction coefficient, f(x,y) represents the pixel value of the coordinate (x,y) point in the initial corrected image, f(x,y)' represents the gray value of the pixel after correction, and s is the position conversion coefficient.
[0142] Optionally, when the second correction module 250 corrects the grayscale value of each pixel in the initial corrected image to obtain the corrected target image, it is specifically used to:
[0143] Correcting the grayscale value of each pixel in the initial corrected image to obtain a corrected first image;
[0144] De-noising the first image to obtain a corrected target image.
[0145] Optionally, when the second correction module 250 performs denoising on the first image to obtain a corrected target image, it is specifically used to:
[0146] De-noising the first image to obtain a de-noised second image;
[0147] Determining, according to the second image, grayscale values of non-integer positions in the second image;
[0148] The modified target image is determined according to the grayscale values of non-integer positions in the second image.
[0149] Based on Figure 1 Based on the same principle as the method shown in , an embodiment of the present invention further provides a wide-angle neutron radiography system with an image correction function, which may specifically include a neutron source subsystem (1), a wide-angle beam control subsystem (2) and an imaging subsystem (3) with an image correction function, wherein:
[0150] The neutron source subsystem (1) includes a neutron source for producing an initial neutron beam;
[0151] A wide-angle beam control subsystem (2) is used to adjust the direction of neutrons in the initial neutron beam to obtain a fan-shaped neutron beam with a first angle, wherein the first angle is greater than a set angle;
[0152] An imaging subsystem (3) with an image correction function is used to obtain a neutron radiographic image based on the fan neutron beam, and to perform distortion correction on the neutron radiographic image to obtain a corrected target image.
[0153] The main significance of this system is that it can simultaneously meet the conditions of high flux and wide angle during neutron radiography. It is particularly suitable for rapid detection of some samples with low resolution requirements but large volume, reducing the time of neutron radiography and obtaining clear neutron radiographic images through image correction technology.
[0154] The wide-angle neutron photography device with image correction function of the embodiment of the present invention can execute the wide-angle neutron photography method with image correction function provided by the embodiment of the present invention. The implementation principle is similar. The actions performed by each module and unit in the wide-angle neutron photography device with image correction function in each embodiment of the present invention correspond to the steps in the wide-angle neutron photography method with image correction function in each embodiment of the present invention. For the detailed functional description of each module of the wide-angle neutron photography device with image correction function, please refer to the description of the corresponding wide-angle neutron photography method with image correction function shown in the previous text, which will not be repeated here.
[0155] Among them, the wide-angle neutron photography device with image correction function can be a computer program (including program code) running in a computer device. For example, the wide-angle neutron photography device with image correction function is an application software; the device can be used to execute the corresponding steps in the method provided in the embodiment of the present invention.
[0156] In some embodiments, the wide-angle neutron photography device with image correction function provided by the embodiments of the present invention can be implemented in a combination of software and hardware. As an example, the wide-angle neutron photography device with image correction function provided by the embodiments of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the wide-angle neutron photography method with image correction function provided by the embodiments of the present invention. For example, the processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs) or other electronic components.
[0157] In other embodiments, the wide-angle neutron radiography device with image correction function provided by the embodiments of the present invention can be implemented by software. Figure 8 A wide-angle neutron radiography device with an image correction function stored in a memory is shown, which may be software in the form of a program and a plug-in, and includes a series of modules, including a neutron beam acquisition module 210, an angle adjustment module 220, an image acquisition module 230 and a correction module 240, for implementing a wide-angle neutron radiography method with an image correction function provided in an embodiment of the present invention.
[0158] The modules involved in the embodiments of the present invention may be implemented by software or hardware, wherein the name of a module does not limit the module itself in some cases.
[0159] Based on the same principle as the method shown in the embodiments of the present invention, an electronic device is also provided in the embodiments of the present invention, which may include but is not limited to: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the method shown in any embodiment of the present invention by calling the computer program.
[0160] In an alternative embodiment, an electronic device is provided, such as Fig. 9 As shown, Fig. 9The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.
[0161] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0162] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0163] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.
[0164] The memory 4003 is used to store the application code (computer program) for executing the solution of the present invention, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the application code stored in the memory 4003 to implement the content shown in the above method embodiment.
[0165] The electronic device may also be a terminal device. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0166] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding contents of the aforementioned method embodiment.
[0167] According to another aspect of the present invention, a computer program product or a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the implementation modes of the above-mentioned various embodiments.
[0168] Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0169] It should be understood that the flow charts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the module, the program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0170] The computer-readable storage medium provided by the embodiment of the present invention may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.
[0171] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0172] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the disclosure scope involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) by each other.
Claims
1. A wide-angle neutron radiography method with image correction function, characterized in that: The following steps are involved: obtaining an initial neutron beam generated by a neutron source; Adjusting the direction of neutrons in the initial neutron beam to obtain a fan-shaped neutron beam with a first angle, wherein the first angle is greater than a set angle; Acquiring a neutron radiographic image based on the fan-shaped neutron beam; Performing distortion correction on the position of each pixel in the neutron radiographic image to obtain an initial corrected image; Correcting the grayscale value of each pixel in the initial corrected image to obtain a corrected target image; The step of performing distortion correction on the position of each pixel in the neutron radiographic image to obtain an initial corrected image includes: Acquiring a first distance between the neutron source and the photographed object, and a second distance between the neutron source and an imaging screen; According to the center point of the neutron radiographic image, a plurality of constraint points in four quadrants are determined on the neutron radiographic image along the x-axis direction and the y-axis direction respectively; Determine a third distance between two target constraint points adjacent to the center point in each of the constraint points; For every two adjacent constraint points, determining a correction distance corresponding to the third distance according to the first distance, the second distance and the third distance; Determining a distortion function according to the correction distance and the two target constraint points, wherein the distortion function represents a corresponding relationship between positions of pixel points in the image before correction and positions of pixel points in the target image after correction; According to the distortion function, the position of each pixel point in the neutron radiographic image is corrected to obtain the corrected position of each pixel point; Determining an initial corrected image according to the positions of each corrected pixel point; The distortion function also represents the corresponding relationship between the grayscale value of the pixel point in the image before correction and the grayscale value of the pixel point in the corrected target image. The grayscale value of each pixel point in the initial corrected image is corrected to obtain the corrected target image, including: According to the distortion function, the grayscale value of each pixel in the initial corrected image is corrected to obtain the corrected grayscale value of each pixel; Determining a corrected target image according to the corrected grayscale value of each pixel point; Correcting the grayscale value of each pixel in the initial corrected image to obtain a corrected grayscale value of each pixel includes: According to the first formula corresponding to the distortion function, the grayscale value of each pixel in the initial corrected image is corrected to obtain the corrected grayscale value of each pixel, wherein the first formula is: Where D represents the first distance, A ’ B ’ represents the third distance, L represents the second distance, represents the gray value correction coefficient, f(x, y) represents the pixel value of the coordinate (x, y) point in the initial corrected image, f(x, y)' represents the gray value of the pixel after correction, and s is the position conversion coefficient.
2. The method according to claim 1, characterized in that Determining the distortion function according to the corrected distance and the two target constraint points includes: Correcting the first positions of the two target constraint points according to the correction distance to obtain the corrected second positions of the two target constraint points; A distortion function is determined according to the corrected second positions corresponding to the two target constraint points and the first positions of the two target constraint points.
3. The method according to claim 1 or 2, characterized in that: The step of correcting the grayscale value of each pixel in the initial corrected image to obtain a corrected target image includes: Correcting the grayscale value of each pixel in the initial corrected image to obtain a corrected first image; De-noising the first image to obtain a corrected target image.
4. The method according to claim 3, characterized in that The denoising the first image to obtain a corrected target image includes: De-noising the first image to obtain a de-noised second image; Determining, according to the second image, grayscale values of non-integer positions in the second image; The modified target image is determined according to the grayscale values of non-integer positions in the second image.
5. A wide-angle neutron radiography device with image correction function, using the wide-angle neutron radiography method with image correction function according to any one of claims 1 to 4, characterized in that: include: A neutron beam acquisition module, used for acquiring an initial neutron beam generated by a neutron source; An angle adjustment module, used for adjusting the direction of neutrons in the initial neutron beam to obtain a fan-shaped neutron beam with a first angle, wherein the first angle is greater than a set angle; An image acquisition module, used for acquiring a neutron radiographic image based on the fan-shaped neutron beam; A first correction module, used for performing distortion correction on the position of each pixel point in the neutron radiographic image to obtain an initial corrected image; The second correction module is used to correct the grayscale value of each pixel in the initial corrected image to obtain a corrected target image.
6. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
