Automatic optical density measuring method based on standard reference negative film
By constructing an automatic optical density measurement method based on standard reference film, combining the grayscale-optical density trend relationship and exposure time mapping model, the robustness and real-time problems in optical density measurement are solved, and high-precision optical density measurement is achieved to meet industry standards.
Patent Information
- Application Number
- CN202510761517.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-09-23
AI Technical Summary
The optical density measurement method in the prior art has poor robustness to abnormal values in the measurement data and lacks real-time performance.
An automatic optical density measurement method based on standard reference film is adopted. By building a trend relationship between grayscale and optical density and combining the exposure time and optical density starting point mapping model, an optical density measurement model for non-standard films is constructed. LOG function transformation is used for image preprocessing to reduce information loss.
High-precision optical density measurement is achieved with an error of less than 0.02, meeting the requirements of GB/T 26141.1-2010 standard and improving the robustness and real-time performance of the measurement.
Smart Images

Figure CN120689290A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of computer technology and optical density, and in particular to an automatic optical density measurement method based on a standard reference film. Background Art
[0002] Weld inspection based on X-ray film images is a relatively important testing method in the field of nondestructive testing. Radiographic film, produced using the principles of radiographic inspection, can be used to assess weld quality. Standard reference film is an industrial radiographic image containing all reference indicators as defined in the GB / T 26141.1-2010 standard. Film optical density refers to the film's blackness, or the degree of transparency it exhibits. Excessively high or low optical density values are considered unacceptable for industrial film quality. Therefore, optical density is a fundamental indicator for assessing film quality, and the quality of X-ray film images directly impacts nondestructive testing results.
[0003] Optical density is a key indicator of film quality, directly related to the film's radiographic sensitivity and its ability to record small defects. NB / T 47013-2015, "Nondestructive Testing of Pressure Equipment," stipulates that optical density is the most important indicator for evaluating radiographic images. The JB4730-2005 standard specifies the optical density range for radiographic film: the black requirement for Grade A film is: 1.5 ≤ D ≤ 4.0; the optical density requirement for Grade AB film is: 2.0 ≤ D ≤ 4.0; and the optical density requirement for Grade B film is: 2.3 ≤ D ≤ 4.0. To ensure sufficient contrast, the optical density must be moderate, but it must also be moderate due to the limited brightness of the viewing light.
[0004] The document with the patent publication number "CN115615551A" discloses "A method for measuring the blackness value of digital radiographic film". This solution uses a probe tool to obtain the measurement data of a certain coordinate position in the radiographic film, and then fits and simulates the measurement data to obtain the optical density value. However, this solution has poor robustness to abnormal values of the measurement data. The document with the patent publication number "CN109490199A" discloses "A device for dynamic measurement of the blackness of radiographic film". This solution combines multiple sensors to collect light and high-performance chips to process signals to achieve optical density measurement. However, this patent has the problems of difficult sensor calibration and poor real-time performance. In summary, the problems with the above-mentioned solutions are: poor robustness to abnormal values of the measurement data, and poor real-time performance of the optical density measurement method. Summary of the Invention
[0005] In view of the above, the present invention proposes a digital optical density automatic measurement method based on a standard reference film to solve the problems in the prior art of poor robustness to abnormal values of measurement data and poor real-time performance of conventional optical density measurement methods.
[0006] To implement the above method, the technical solution adopted by the present invention is:
[0007] A method for automatically measuring optical density based on a standard reference film comprises the following steps:
[0008] Step 1: First, pre-process the image grayscale value; then, use the trend relationship between the grayscale and optical density of the standard reference film to construct a standard film optical density measurement model;
[0009] Step 2: Constructing a mapping model of exposure time and optical density starting point;
[0010] Step 3: Combine the optical density measurement model of standard film with the exposure time and optical density starting point mapping model to construct the optical density measurement model of non-standard film.
[0011] Furthermore, in the preprocessing process of step 1 above, the LOG function transformation is introduced to process the image grayscale value. The specific calculation formula is shown in (1):
[0012]
[0013] Where x is the image grayscale value, RO(x) is the processed grayscale value, and d represents the number of bits of the input image.
[0014] Furthermore, the standard film optical density measurement model constructed in step 1 above is specifically calculated as shown in formula (2):
[0015]
[0016] Among them, Y SD is the optical density of the standard film, and RO(x) is the grayscale value after formula (1).
[0017] Furthermore, the exposure time and optical density starting point mapping model of the above step 2 is as follows:
[0018]
[0019] Where ET is the exposure time, Y ED is the starting point of optical density.
[0020] Furthermore, the optical density measurement model of the non-standard film constructed in step 3 above is as follows:
[0021]
[0022] Among them, RAW represents the grayscale value of the input grayscale image raw data, ET represents the exposure time of the current imaging, and Y SD Represents the standard film optical density measurement model, Y ED represents the exposure time and optical density starting point mapping model, Y ND Indicates the output value of optical density measurement of non-standard film.
[0023] Compared with the prior art, the present invention adopts the idea of developing the optical density measurement method of standard reference film to non-standard reference film measurement, which has the following beneficial effects:
[0024] 1. In order to obtain the optical density of non-standard films, the present invention first pre-processes the original film to be measured to minimize the loss of grayscale information and improve the accuracy of optical density measurement. To this end, this method introduces LOG function transformation into the pre-processing, and constructs a standard film optical density measurement model based on the trend relationship between grayscale and optical density, effectively reducing the error before optical density measurement.
[0025] 2. The present invention's research shows that under any circumstances, the response curves of grayscale and optical density are consistent, and the starting points of optical density are different at different exposure times. Determining the exposure time is equivalent to determining the starting point of optical density. The exposure time and optical density starting point mapping model constructed by this method has consistent response curves of grayscale and optical density, and the starting points of optical density are different at different exposure times. Exposure time affects the starting point of optical density. Using the mapping relationship between exposure time and optical density starting point, the starting point of optical density can be accurately determined.
[0026] 3. In order to realize the measurement of optical density of non-standard films, the present invention innovatively combines the optical density measurement model of standard films with the exposure time and optical density starting point mapping model to construct an optical density measurement model for non-standard films. Experiments are carried out on standard reference films and non-standard reference films, and it is proved that the automatic optical density measurement method of the present invention can accurately realize the measurement of optical density, with △DCS≤0.02, which can well realize the accurate measurement of the optical density of various films. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is the overall flow chart of the present invention;
[0028] Figure 2 The curve distribution diagram of the fitting function model of the present invention and the real data;
[0029] Figure 3 Demonstrates the effect of optical density measurement of non-standard negatives;
[0030] Figure 4 This is the effect diagram of the △DCS test. DETAILED DESCRIPTION
[0031] The following will describe in detail an automatic optical density measurement method based on a standard reference film provided by the present invention in conjunction with the accompanying drawings and embodiments.
[0032] See also Figure 1 The design ideas of the present invention are: first, the trend relationship between the grayscale and optical density of the standard reference film is used to construct an optical density measurement model for the standard film; second, a mapping model between the exposure time and the optical density starting point is constructed; finally, an optical density measurement model for non-standard films is constructed.
[0033] Based on the above ideas, the present invention provides an automatic optical density measurement method based on a standard reference film, which specifically includes the following steps:
[0034] Step 1: First, preprocess the image grayscale value to solve the information loss caused by traditional data linear mapping; then use the trend relationship between the grayscale and optical density of the standard reference film to construct a standard film optical density measurement model.
[0035] 1.1, Preprocessing, changing the data mapping method to achieve lossless display:
[0036] Because direct display of inconsistent image bit counts results in an initial loss of optical density, a lossless display processing method is needed to reduce this loss. The 12-bit linear array CCD designed in this invention outputs a 12-bit image, but this cannot be directly displayed. Direct linear mapping can compress 12-bit data to 8-bit data or stretch 12-bit data to 16-bit data for 12-bit display. However, this process loses a significant amount of grayscale information, resulting in significant errors in optical density measurement.
[0037] In order to solve the information loss problem caused by traditional data linear mapping, the present invention introduces LOG function transformation into preprocessing. The specific calculation formula is shown in (5):
[0038]
[0039] Where x is the grayscale value of the image, RO(x) is the grayscale value after processing, and d represents the number of bits of the input image. In this embodiment, d is set to 12 according to the actual mapping relationship. Indicates the grayscale expansion coefficient, which indicates the minimum integer value that can ensure enhancement within the range of 4096-65536. The present invention sets it to 10000 to ensure that the maximum value of the enhanced data is 10000×lg(2 d ).
[0040] 1.2. Based on the trend relationship between grayscale and optical density, the present invention constructs the following standard film optical density measurement model. The specific calculation formula is shown in (6):
[0041]
[0042] where Y SD is the optical density of the standard film, and RO(x) is the grayscale value after formula (1).
[0043] See also Figure 2 From the curve distribution diagram of the fitting function model and the real data, it can be seen that the standard negative film blackness measurement model designed by the present invention is relatively close to the real data.
[0044] Step 2: Construct a mapping model of exposure time and optical density starting point.
[0045] 2.1. Through extensive experimental research, the present invention has found that the response curves of grayscale and optical density are consistent under any circumstances. The starting point of optical density is different under different exposure times. Determining the exposure time is equivalent to determining the starting point of optical density. The relationship that needs to be determined is: the input is the exposure time ET, and the output is the starting point of optical density Y ED The exposure time and optical density starting point mapping model is as follows:
[0046]
[0047] Step 3: Combine the optical density measurement model of the standard film with the exposure time and optical density starting point mapping model to construct the optical density measurement model of the non-standard film.
[0048] 3.1. To measure the optical density of non-standard films, the present invention combines a standard film measurement model with an exposure time-optical density starting point model. By combining the optical density measurement model for standard films with the exposure time-optical density starting point mapping model, the present invention constructs an optical density measurement model for non-standard films as shown below:
[0049]
[0050] Among them, RAW represents the grayscale value of the input grayscale image raw data, ET represents the exposure time of the current imaging, and Y SD Represents the standard film optical density measurement model, Y ED represents the exposure time and optical density starting point mapping model, Y ND Indicates the output value of optical density measurement of non-standard film.
[0051] Furthermore, to demonstrate the effectiveness of the present invention regarding optical density measurement, an optical density measurement model was validated. First, optical density measurements were performed on standard film. Due to the limitations of the number of imaging devices, the maximum optical density that can be measured is 3.165D while maximizing the number of imaging bits. Therefore, the present invention verified the optical density measurement accuracy between 0.5D and 3.0D, as shown in Table 1.
[0052] Table 1 Standard film optical density measurement table
[0053]
[0054] The experimental results in Table 1 demonstrate that the standard film optical density measurement model designed in this invention can measure optical density with high accuracy, with a maximum measurement error of +0.3058D and a minimum measurement error of -0.003D. The proposed optical density measurement model can measure optical density with high precision without any human intervention.
[0055] Secondly, the optical density of non-standard films is measured. Since the optical density measurement area of non-standard films is mainly located in the weld area, the grayscale in the weld area is first extracted, and then the optical density is predicted and output. Figure 3 As shown in the figure, the extraction and optical density measurement effect of the non-standard film optical density measurement area are shown. The red frame line represents the optical density measurement area, XY represents the coordinate value, Gray Value represents the grayscale value, and Darkness Value represents the measured optical density value. The exposure time of the currently acquired image is 265.54. Figure 3 The actual optical density of the upper middle image is 2.18D, and the actual optical density of the lower image is 2.57D. The error between the measured value and the actual optical density value of the method proposed in the present invention is small, which once again shows that the proposed optical density measurement model can realize the measurement of optical density with high precision.
[0056] The △DCS indicator indicates the difference in optical density detected in the same color block area. Figure 4 The following images show the results of the △DCS test. For two black patches with an optical density of 1, the optical densities were 0.981 and 0.998, respectively, a difference of 0.017. For two black patches with an optical density of 2, the optical densities were 2.006 and 2.018, respectively, a difference of 0.012. Table 2 also shows the △DCS accuracy test statistics. According to the national standard GB / T 26141.1-2010, △DCS must meet the following requirements: △DCS ≤ 0.02.
[0057] Table 2 △DCS accuracy test table
[0058]
[0059] Experimental results show that the optical density measurement model designed in the present invention can achieve high-precision measurement of optical density and within the same color block area, △DCS≤0.02, meeting the requirements of GB / T 26141.1-2010 standard.
[0060] The above description is an explanation of the specific implementation of the present invention, rather than a limitation of the present invention. Those skilled in the relevant technical field can also make various equivalent technical solutions without departing from the scope of the present invention, so all equivalent technical solutions should be included in the scope of protection of the present invention.
Claims
1. A method for automatically measuring optical density based on a standard reference film, characterized in that: The steps include: Step 1: First, pre-process the image grayscale value; then, use the trend relationship between the grayscale and optical density of the standard reference film to construct a standard film optical density measurement model; Step 2: Constructing a mapping model of exposure time and optical density starting point; Step 3: Combine the optical density measurement model of standard film with the exposure time and optical density starting point mapping model to construct the optical density measurement model of non-standard film.
2. The method for automatically measuring optical density based on a standard reference film according to claim 1, wherein: In the preprocessing process of step 1, the LOG function transformation is introduced to process the image grayscale value. The specific calculation formula is shown in (1): Where x is the image grayscale value, RO(x) is the processed grayscale value, and d represents the number of bits of the input image.
3. The method for automatically measuring optical density based on a standard reference film according to claim 1, wherein: The standard film optical density measurement model constructed in step 1 is specifically calculated as shown in formula (2): Among them, Y SD is the optical density of the standard film, and RO(x) is the grayscale value after formula (1).
4. The method for automatically measuring optical density based on a standard reference film according to claim 1, wherein: The exposure time and optical density starting point mapping model of step 2 is as follows: Where ET is the exposure time, Y ED is the starting point of optical density.
5. The method for automatically measuring optical density based on a standard reference film according to claim 1, wherein: The optical density measurement model of the non-standard film constructed in step 3 is as follows: Among them, RAW represents the grayscale value of the input grayscale image raw data, ET represents the exposure time of the current imaging, and Y SD Represents the standard film optical density measurement model, Y ED represents the exposure time and optical density starting point mapping model, Y ND Indicates the output value of optical density measurement of non-standard film.
Citation Information
Patent Citations
Device for dynamically measuring X-ray film density
CN109490199A
Method for measuring and calculating blackness value of digital radiograph
CN115615551A