Synchrotron radiation experiment image processing method and system
Through the image processing method of synchronous radiation experiments, including background correction, noise removal, pixel trimming and normalization, the solute concentration is calculated based on Beer-Lambert's law, which solves the problems of dendrites morphology observation and solute concentration changes in synchronous radiation experiments. Efficient image processing and data analysis are realized.
Patent Information
- Application Number
- CN202411218081.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-12-17
AI Technical Summary
In the synchronous radiation in situ imaging experiment, the dendrites in the original image without shearing the back bottom and removing noise are difficult to observe, and the changes in solute concentration caused by changes in dendrites cannot be directly measured, which hinders the further development of synchronous radiation technology. Development and application.
A synchronous radiation experiment image processing method is provided, including background correction, noise removal, pixel trimming and normalization processing, and calculate the solute concentration based on Beer-Lambert's law, and convert the phase contrast image into a solute concentration map.
Through image processing methods, the dynamic morphology of dendrites and changes in solute concentration are visually displayed, which improves the recognition and calculation accuracy of measurement, and simplifies the data processing flow in the later stage of synchronous radiation experiments.
Smart Images

Figure CN119151818A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a synchrotron radiation experiment image processing method and system. Background Art
[0002] Synchrotron radiation has the advantages of higher brightness, higher signal-to-noise ratio, shorter wavelength and better angular resolution, which makes the test more accurate and the test time much shorter. The study of microstructure evolution during alloy solidification using synchrotron radiation imaging technology has made significant progress.
[0003] However, synchrotron radiation in situ imaging experiments have always faced a thorny problem: the dendrite morphology in the original image that has not been processed by background clipping and noise removal is difficult to observe, and it is also impossible to directly measure the change in solute concentration caused by the change in dendrite morphology. This has hindered the further development and application of synchrotron radiation technology to a certain extent.
[0004] At present, there is no standardized method to process the data and images in the later stage of synchrotron radiation experiments, which makes the data and image processing work in the later stage of synchrotron radiation experiments very cumbersome. Therefore, efficient image processing has become an urgent problem to be solved in the development of synchrotron radiation technology. Summary of the invention
[0005] The purpose of this application is to provide a synchrotron radiation experiment image processing method and system to solve or alleviate the problems existing in the above-mentioned prior art.
[0006] In order to achieve the above objectives, this application provides the following technical solutions:
[0007] The present application provides a synchrotron radiation experiment image processing method, including: step S101, selecting a pure liquid phase photograph before grain nucleation from the acquired phase contrast image for background correction to obtain a first image; step S102, removing noise from the first image by Gaussian filtering, and performing brightness enhancement processing on the image after noise removal to obtain a second image; step S103, performing pixel cropping on the second image according to preset cropping pixels to normalize the pixel intensity of the second image; step S104, based on the Beer-Lambert law, calculating the solute concentration of the corresponding pixel position according to the pixel intensity of the cropped image to convert the phase contrast image into a solute concentration map.
[0008] Preferably, in step S101, during the synchrotron radiation experiment, when the sample is heated and cooled, the X-rays horizontally pass through the incident window and penetrate the sample and then are emitted from the other side window, and the X-rays with phase information are received by the CCD detector to form the phase contrast image.
[0009] Preferably, in step S101, according to the formula:
[0010] CI(x,y)=I(x,y)-BI(x,y)
[0011] The pure liquid phase background of the pure liquid phase photograph is removed to obtain the first image; wherein I(x, y) is the pixel value of the pixel position (x, y) in the pure liquid phase photograph; BI(x, y) is the pixel value corresponding to the pixel position (x, y) in the pure liquid phase background; CI(x, y) is the pixel value corresponding to the pixel position (x, y) in the first image.
[0012] Preferably, in step S102, based on the minimum value of pixel values in the denoised image corresponding to the intensity of transmitted light of X-rays in the synchrotron radiation experiment, brightness enhancement processing is performed on the denoised image to obtain the second image.
[0013] Preferably, in step S103, the pixel cropping of the second image according to the preset cropping pixels is specifically: the intensity value of the pixel to be cropped is modified according to the average intensity value of the surrounding pixels, so as to evenly distribute the pixel to be cropped within a calibration range between the minimum intensity value and the maximum intensity value.
[0014] Preferably, in step S104, according to the formula:
[0015]
[0016] C(x,y)=C0+C0*I ΔC (x, y)
[0017] Determine the solute concentration C(x, y) at the pixel location (x, y) in the cropped image;
[0018] Where I is the intensity of transmitted light, I0 is the incident intensity of X-rays in the synchrotron radiation experiment, δ is the sample thickness in the synchrotron radiation experiment, μ 基体元素 , 基体元素 are the mass absorption coefficient and density of the matrix elements in the synchrotron radiation experimental sample, μ 合金元素 , 合金元素 are the mass absorption coefficient and density of the whole sample in synchrotron radiation experiment respectively;
[0019] I ΔC (x, y) is the grayscale of the pixel position (x, y) in the cropped image relative to Changes in solute concentration after the change; is the average grayscale value of the pixels in the cropped image; C0 is the average grayscale value The corresponding average solute concentration.
[0020] Preferably, in step S104, according to the formula:
[0021] C l =M×C(x, y)
[0022] Determine the liquid solute concentration C in the solid-liquid coexistence zone l ; Wherein, C(x, y) is the solute concentration at the pixel position (x, y) in the cropped image, and M is the binary mask of the cropped image determined based on the Otsu method.
[0023] Preferably, in step S104, according to the formula:
[0024]
[0025] Determine the solid solute concentration C in the solid-liquid coexistence region of the cropped image S ; Where C(x, y) is the solute concentration at the pixel position (x, y) in the cropped image, C l is the liquid solute concentration in the solid-liquid coexistence zone.
[0026] The present application also provides a synchrotron radiation experiment image processing system, including:
[0027] A background correction unit is configured to select a pure liquid phase photograph before grain nucleation from the acquired phase contrast image for background correction to obtain a first image;
[0028] a denoising and enhancement unit, configured to remove noise from the first image by Gaussian filtering, and perform brightness enhancement processing on the image after the noise is removed to obtain a second image;
[0029] a cropping and normalization unit, configured to perform pixel cropping on the second image according to preset cropping pixels to normalize the pixel intensity of the second image;
[0030] The solute concentration determination unit is configured to calculate the solute concentration at the corresponding pixel position according to the pixel intensity of the cropped image based on the Beer-Lambert law, so as to convert the phase contrast image into a solute concentration map.
[0031] Beneficial effects:
[0032] In the synchrotron radiation image processing method provided in the embodiment of the present application, first, a pure liquid phase photograph before grain nucleation is selected from the acquired phase contrast image for background correction to obtain a first image; then, the noise of the first image is removed by Gaussian filtering, and the image after noise removal is brightness enhanced to obtain a second image; then, the second image is pixel-cropped according to preset cropping pixels to normalize the pixel intensity of the second image; finally, based on the Beer-Lambert law, the solute solubility of the corresponding pixel position is calculated according to the pixel intensity of the cropped image, and then, the processed image can be rendered to convert the synchrotron radiation image into a solute solubility map, which intuitively and vividly displays the dynamic morphology of the dendrite and the change in solute concentration. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. Among them:
[0034] Figure 1 A schematic flow chart of a synchrotron radiation experiment image processing method provided according to some embodiments of the present application;
[0035] Figure 2 A schematic diagram of the result of brightness enhancement processing of an image provided according to some embodiments of the present application;
[0036] Figure 3 A schematic diagram of the result of normalizing an image provided according to some embodiments of the present application;
[0037] Figure 4 A schematic diagram of the solute concentration of the Mg-15Gd alloy provided according to some embodiments of the present application;
[0038] Figure 5 A schematic diagram of the structure of a synchrotron radiation experiment image processing system provided according to some embodiments of the present application. DETAILED DESCRIPTION
[0039] The present application will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments. Each example is provided by way of explanation of the present application and does not limit the present application. In fact, it will be clear to those skilled in the art that modifications and variations may be made in the present application without departing from the scope or spirit of the present application. For example, a feature shown or described as a part of an embodiment may be used in another embodiment to produce yet another embodiment. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the embodiments of the present invention should belong to the scope of protection of the embodiments of the present invention.
[0040] This application aims to solve the problem of image blurring in the original image caused by sample surface defects and / or debris on the optical path in the experiment. Based on the Beer-Lambert law, this application proposes a method for synchrotron radiation image processing, calculates the solute concentration at different times and positions, and converts pixel intensity into solute concentration, providing a new solution to concentration changes that cannot be directly measured.
[0041] like Figures 1 to 4 As shown, the synchrotron radiation experiment image processing method includes:
[0042] Step S101 : selecting a pure liquid phase photograph before grain nucleation from the acquired phase contrast image for background correction to obtain a first image.
[0043] Specifically, during the synchrotron radiation experiment, when the sample is heated and cooled, the X-rays pass horizontally through the incident window and penetrate the sample before being emitted from the other side window. The X-rays with phase information are received by the CCD detector and a phase contrast image is formed.
[0044] The original image (phase contrast image) obtained by the synchrotron radiation experiment is not background-reduced, and the dendrite morphology is difficult to observe. In order to eliminate noise, the substrate is subtracted from the collected phase contrast image, that is, the original image of the sample (alloy) in a pure liquid phase before solidification is used as the substrate, and the substrate is subtracted from the original image of the solidification process.
[0045] In a specific example, the selected pure liquid phase background is removed by subtraction operation using image processing software (e.g., Image-Pro Plus software). Specifically, according to the formula:
[0046] CI(x,y)=I(x,y)-BI(x,y)
[0047] The pure liquid phase background of the pure liquid phase photograph is removed to obtain the first image. Wherein, I(x, y) is the pixel value of the pixel position (x, y) in the pure liquid phase photograph; BI(x, y) is the pixel value corresponding to the pixel position (x, y) in the pure liquid phase background; CI(x, y) is the pixel value corresponding to the pixel position (x, y) in the first image.
[0048] Step S102: remove noise from the first image by Gaussian filtering, and perform brightness enhancement processing on the image after the noise is removed to obtain a second image.
[0049] The original image of the sample (alloy) in the pure liquid state before solidification is used as the substrate, and the substrate is subtracted from the original image of the solidification process. In order to enhance the image contrast and obtain a clear dendrite image, the brightness and contrast of the image are adjusted. Specifically, based on the minimum pixel value in the image after noise removal corresponding to the intensity of the transmitted light of the X-ray in the synchrotron radiation experiment, the image after noise removal is brightness enhanced to obtain the second image.
[0050] Due to the difference in atomic numbers of different elements, the absorption coefficients of X-rays are different, resulting in differences in the intensity of transmitted light. This intensity difference is manifested as different pixel values in the image. Here, the minimum value among these pixel values is selected as the minimum intensity value, and the image after noise removal is brightness enhanced based on the minimum intensity value to obtain the second image. Specifically, the points corresponding to pixel values higher than the minimum intensity value are designated as shadow points, and the points corresponding to pixel values lower than the maximum intensity value are designated as highlight points, and the remaining pixel values are evenly distributed within the calibration range of the minimum intensity value and the maximum intensity value.
[0051] Step S103: perform pixel cropping on the second image according to preset cropping pixels to normalize the pixel intensity of the second image.
[0052] After the brightness of the image is adjusted, the edge light path is unstable, that is, the edge light path of the second image is unstable, and a specific number of pixels of the second image need to be cropped. Specifically, the intensity value of the pixel to be cropped is modified according to the average value of the intensity values of the surrounding pixels, so that the pixel to be cropped is evenly distributed within the calibration range of the minimum intensity value and the maximum intensity value, so as to achieve normalization of the pixel intensity of the second image. In other words, the pixel value and the number of cropping are adjusted according to the minimum intensity value, but it is necessary to ensure that the pixel value of the cropping does not exceed the size of the image, and the cropped image still retains key visual information. The normalization of pixel intensity is achieved by evenly distributing the pixel values within the calibration range of the minimum intensity value and the maximum intensity value. Among them, different grayscales correspond to different solute concentrations to distinguish between liquid and solid phases, so as to improve the recognition and calculation accuracy of the measurement.
[0053] Step S104 : Based on the Beer-Lambert law, the solute concentration at the corresponding pixel position is calculated according to the pixel intensity of the cropped image, so as to convert the phase contrast image into a solute concentration map.
[0054] As for the solute concentration, it is impossible to directly measure the concentration change during the experiment. In this application, the solute concentration is determined based on the relationship between the pixel brightness of the obtained image and the solute concentration. Specifically, the solute is evenly distributed in the sample (alloy) after melting. Based on the Beer-Lambert law, we have:
[0055]
[0056] Among them, I is the transmitted light intensity of X-rays in the synchrotron radiation experiment, I0 is the incident intensity of X-rays in the synchrotron radiation experiment, δ is the sample thickness in the synchrotron radiation experiment, and C i , μ i , ρ i are the mass percentage, mass absorption coefficient and density of the i-th matrix element in the synchrotron radiation experimental sample, respectively; n is a positive integer, indicating the number of matrix elements in the sample.
[0057] The concentration of the alloying element at any pixel position (x, y) of the sample at any time is C, and the concentration of the matrix element in the sample is 1-C, so:
[0058]
[0059] Among them, μ 基体元素 , 基体元素 are the mass absorption coefficient and density of the matrix elements in the synchrotron radiation experimental sample, μ 合金元素 , 合金元素 are the mass absorption coefficient and density of the entire synchrotron radiation experimental sample, respectively.
[0060] Before solidification begins, select a pure liquid phase photo. At this time, the solute is evenly distributed and the average gray value of the pixels in the photo is The corresponding average solute concentration is C0, which is the average solute concentration of the sample.
[0061]
[0062] The grayscale in the image is relative to the average grayscale value After the change, the change in solute concentration is:
[0063]
[0064] Where IΔC(x, y) is the grayscale of the pixel position (x, y) in the cropped image relative to The change in solute concentration after the change.
[0065] Then, according to the formula:
[0066] C(x,y)=C0+C0*I ΔC (x, y)
[0067] Determine the solute concentration C(x,y) at the pixel location (x,y) in the cropped image.
[0068] Then, according to the formula:
[0069]
[0070] Determine the solid solute concentration C in the solid-liquid coexistence region of the cropped image S Among them, C l is the liquid solute concentration in the solid-liquid coexistence zone, according to the formula:
[0071] C l =M×C
[0072] Determine the liquid solute concentration C in the solid-liquid coexistence zone l Here, the Otsu method is used to determine the threshold. For grayscale images, the grayscale value greater than a certain value is defined as 1, and the grayscale value smaller than a certain value is defined as 0. This value is the threshold, and the binary mask M is obtained. The above formula is used to fit the liquid concentration in the entire image.
[0073] In a specific example, taking Mg-15Gd alloy as an example, there are:
[0074]
[0075] Among them, C Mg , μ Mg , Mg are the mass percentage, mass absorption coefficient and density of the matrix element Mg in the sample, C Gd , μ Gd , Gd are the mass percentage, mass absorption coefficient and density of alloy Gd in the sample respectively.
[0076] At a certain moment, the concentration of alloy Gd at the pixel point (x, y) is C, and the concentration of Mg in the sample is 1-C, so:
[0077]
[0078] The average solute concentration in the pure liquid phase of Mg-15Gd alloy before solidification is 15%, that is, C0 = 15%. Select a pure liquid phase photo before solidification. At this time, the solute is evenly distributed. The average intensity value of the pixel in the photo The corresponding average solute concentration is C0,
[0079]
[0080] Furthermore, the solute concentration C(x, y) at the pixel position (x, y) is:
[0081]
[0082] In this application, the liquid solute concentration C in the solid-liquid coexistence region in the trimmed image is l , the solid solute concentration C in the solid-liquid coexistence region in the cropped image SFinally, by rendering the synchrotron radiation photos, the synchrotron radiation photos are converted into solute concentration maps, and clear dendrite dynamic morphology and solute concentration changes that cannot be obtained by traditional methods are obtained. This is mainly completed through MATLAB program, and the specific steps are as follows:
[0083] First, convert the read image data into double type for mathematical operations and normalization. We need to normalize the data through a formula so that its value range is between 0 and 1 for uniform rendering. The formula is:
[0084]
[0085] Use the "imread" function to load the processed image data, use "hold on" to create two layers to represent the liquid phase solute concentration and the solid phase solute concentration respectively, and use "colormap" to display the two layers with different color mappings, and finally superimpose the two layers according to a certain transparency. All data are integrated into one image, different colors are used to distinguish the liquid phase solute concentration and the solid phase solute concentration, and the combined composite image is displayed using the "imshow" function.
[0086] Taking Mg-15Gd alloy as an example, the main material parameters required for rendering synchrotron radiation photos are shown in Table 1:
[0087] Table 1 Main material parameters of Mg-15Gd alloy
[0088]
[0089] In addition, the number of images generated by synchrotron radiation experiments is huge, and it is impractical to process each image one by one. In this application, for a large number of synchrotron radiation images, an image processing program generated by macro operations in image processing software (such as Image-Pro Plus software) is used to quickly process a large number of synchrotron radiation experimental images in a very short time.
[0090] like Figure 5 As shown, the embodiment of the present application also provides a synchrotron radiation experiment image processing system, including:
[0091] A background correction unit 501 is configured to select a pure liquid phase photo before grain nucleation from the acquired phase contrast image for background correction to obtain a first image;
[0092] The denoising and enhancement unit 502 is configured to remove noise from the first image by Gaussian filtering, and perform brightness enhancement processing on the image after the noise is removed to obtain a second image;
[0093] A cropping and normalization unit 503 is configured to perform pixel cropping on the second image according to a preset cropping pixel to normalize the pixel intensity of the second image;
[0094] The solute concentration determination unit 504 is configured to calculate the solute concentration at the corresponding pixel position according to the pixel intensity of the cropped image based on the Beer-Lambert law, so as to convert the phase contrast image into a solute concentration map.
[0095] The synchrotron radiation experiment image processing system provided in the embodiment of the present application can implement the steps and processes of the synchrotron radiation experiment image processing method of any of the above-mentioned embodiments and achieve the same technical effects, which will not be described one by one here.
[0096] In the description of the present invention, the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" etc. mean 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 present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0097] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A synchrotron radiation experiment image processing method, characterized in that: include: Step S101, selecting a pure liquid phase photograph before grain nucleation from the acquired phase contrast image for background correction to obtain a first image; Step S102, removing noise from the first image by Gaussian filtering, and performing brightness enhancement processing on the image after the noise is removed to obtain a second image; Step S103, performing pixel cropping on the second image according to preset cropping pixels to normalize the pixel intensity of the second image; Step S104 : Based on the Beer-Lambert law, the solute concentration at the corresponding pixel position is calculated according to the pixel intensity of the cropped image, so as to convert the phase contrast image into a solute concentration map.
2. The synchrotron radiation experiment image processing method according to claim 1, characterized in that: In step S101, During the synchrotron radiation experiment, when the sample is heated and cooled, X-rays pass horizontally through the incident window and penetrate the sample and then are emitted from the other side window. The X-rays with phase information are received by the CCD detector and the phase contrast image is formed.
3. The synchrotron radiation experiment image processing method according to claim 1, characterized in that: In step S101, According to the formula: CI(x,y)=I(x,y)-BI(x,y) removing the pure liquid phase background of the pure liquid phase photograph to obtain the first image; Among them, I(x,y) is the pixel value of the pixel position (x,y) in the pure liquid phase photograph; BI(x,y) is the pixel value corresponding to the pixel position (x,y) in the pure liquid phase background; CI(x,y) is the pixel value corresponding to the pixel position (x,y) in the first image.
4. The synchrotron radiation experiment image processing method according to claim 1, characterized in that: In step S102, Based on the minimum value of the pixel value in the denoised image corresponding to the intensity of the transmitted light of the X-rays in the synchrotron radiation experiment, the denoised image is subjected to brightness enhancement processing to obtain the second image.
5. The synchrotron radiation experiment image processing method according to claim 1, characterized in that: In step S103, pixel cropping of the second image is performed according to preset cropping pixels, specifically: The intensity value of the pixel to be clipped is modified according to the average value of the intensity values of the surrounding pixels, so that the pixel to be clipped is evenly distributed within the calibration range of the minimum intensity value and the maximum intensity value.
6. The synchrotron radiation experiment image processing method according to claim 1, characterized in that: In step S104, According to the formula: C(x,y)=C0+C0*I ΔC (x,y) Determine the solute concentration C(x,y) at the pixel location (x,y) in the cropped image; Where I is the intensity of transmitted light, I0 is the incident intensity of X-rays in the synchrotron radiation experiment, δ is the sample thickness in the synchrotron radiation experiment, μ 基体元素 , 基体元素 are the mass absorption coefficient and density of the matrix elements in the synchrotron radiation experimental sample, μ 合金元素 , 合金元素 are the mass absorption coefficient and density of the whole sample in synchrotron radiation experiment respectively; I ΔC (x, y) is the grayscale of the pixel position (x, y) in the cropped image relative to Changes in solute concentration after the change; is the average grayscale value of the pixels in the cropped image; C0 is the average grayscale value The corresponding average solute concentration.
7. The synchrotron radiation experiment image processing method according to claim 6, characterized in that: In step S104, according to the formula: C l =M×C(x,y) Determine the liquid solute concentration C in the solid-liquid coexistence zone l ; Where C(x,y) is the solute concentration at the pixel position (x,y) in the cropped image, and M is the binary mask of the cropped image determined based on the Otsu method.
8. The synchrotron radiation experiment image processing method according to claim 7, characterized in that: In step S104, According to the formula: Determine the solid solute concentration C in the solid-liquid coexistence region of the cropped image S ; Where C(x,y) is the solute concentration at the pixel position (x,y) in the cropped image, and C l is the liquid phase solute concentration in the solid-liquid coexistence zone.
9. A synchrotron radiation experiment image processing system, characterized in that: include: A background correction unit is configured to select a pure liquid phase photograph before grain nucleation from the acquired phase contrast image for background correction to obtain a first image; a denoising and enhancement unit, configured to remove noise from the first image by Gaussian filtering, and perform brightness enhancement processing on the image after the noise is removed to obtain a second image; a cropping and normalization unit, configured to perform pixel cropping on the second image according to preset cropping pixels to normalize the pixel intensity of the second image; The solute concentration determination unit is configured to calculate the solute concentration at the corresponding pixel position according to the pixel intensity of the cropped image based on the Beer-Lambert law, so as to convert the phase contrast image into a solute concentration map.
Citation Information
Patent Citations
Method and device for measuring permeability in metal solidification process, electronic equipment and storage medium
CN115222641A
Image processing method and device, display equipment and storage medium
CN117135329A
