Automatic brightness control method and system based on PID (Proportion Integration Differentiation)
Through the automatic brightness control method based on PID, the tube voltage and current time product of medical X-ray equipment is dynamically adjusted, which solves the problems of low brightness adjustment efficiency and poor stability of existing equipment, and achieves efficient and stable image brightness control.
Patent Information
- Application Number
- CN202510810327.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-05
AI Technical Summary
The existing medical X-ray equipment has problems in terms of brightness adjustment, such as low manual operation efficiency, difficulty in ensuring brightness stability in a short time and adapting to complex imaging needs, resulting in poor image quality and affecting diagnostic and surgical operations.
The automatic brightness control method based on PID is adopted to obtain image brightness errors, and the tube voltage and current time product are adjusted using PID control method, and combined with image processing model and adaptive algorithms to realize dynamic adjustment and stability control of image brightness.
It improves the efficiency and effect of image brightness adjustment, ensures imaging quality and stability, avoids overshoot and oscillation during the control process, and adapts to different working conditions and complex situations.
Smart Images

Figure CN120595567A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to data processing technology, and in particular to a PID-based automatic brightness control method and system. Background Art
[0002] Medical X-ray equipment, such as mobile C / G arms and digital subtraction angiography (DSA) devices, plays a vital role in modern medical diagnosis and treatment. These devices provide doctors with imaging information about the human body's internal structures, assisting with disease diagnosis, surgical navigation, and interventional procedures. Image quality has a direct and critical impact on doctors' ability to accurately assess disease conditions, formulate treatment plans, and perform surgical procedures. Image brightness stability is a key indicator of image quality.
[0003] During the imaging process, early medical X-ray equipment primarily relied on manual brightness adjustment based on operator experience. This approach had significant limitations. Firstly, the operator had to constantly observe the image and manually adjust parameters such as tube voltage (kV) and current-time product (mAs), a cumbersome and inefficient process. Secondly, manual adjustment made it difficult to achieve and maintain stable image brightness over a short period of time, leading to brightness fluctuations that could affect the doctor's interpretation of the image and potentially lead to misdiagnosis or surgical errors.
[0004] With technological advancements, some automatic brightness adjustment systems based on simple feedback control have emerged. While these systems achieve a certain degree of automatic brightness adjustment, their relatively simple control algorithms lack adaptability to diverse operating conditions and complex scenarios. Furthermore, some existing automatic brightness adjustment systems often have fixed parameter settings and cannot dynamically adjust to the device's actual operating status and varying imaging requirements. This makes it difficult for these systems to achieve ideal brightness control in complex and ever-changing clinical scenarios, failing to meet the high-quality, efficient imaging requirements of modern medicine. Summary of the Invention
[0005] Based on the above problems, the present invention is proposed to provide a PID-based automatic brightness control method and system that overcomes the above problems or at least partially solves the above problems.
[0006] According to one aspect of the present invention, there is provided a PID-based automatic brightness control method, comprising the following steps: Acquire a first image of the X-ray machine at a first tube voltage and a first time product; If it is determined that the absolute value of the brightness error of the first image is greater than the brightness dead zone value, then the brightness error value is compared with the threshold value to obtain comparison data; Determine a PID control mode of tube voltage and current-time product based on the comparison data, wherein the control mode includes at least a single control mode and a combined control mode; Based on the PID control method, the output increment is determined to be superimposed and updated with the first tube voltage and / or the first time product to obtain a second image with satisfactory brightness.
[0007] Optionally, in the method according to the present invention, if it is determined that the absolute value of the brightness error of the first image is greater than the brightness dead zone value, comparing the brightness error value with a threshold to obtain comparison data includes: Sending the first image to the image processing model, obtaining a current brightness value corresponding to the first image, and comparing the current brightness value with a brightness target value to obtain a brightness error value; Calculate the difference between the minimum step of the current-time product and the current brightness value to obtain the brightness dead zone value, and compare the absolute value of the brightness error with the brightness dead zone value; In response to the absolute value of the brightness error being greater than the brightness dead zone value, a threshold is determined based on the increment of the image brightness by the minimum step length of the tube voltage, and the brightness error value is compared with the threshold to obtain comparison data.
[0008] Optionally, in the method according to the present invention, the method further comprises: The tube voltage brightness increment corresponding to the minimum tube voltage step is determined as a threshold; The brightness dead zone value is obtained by calculating the difference between the brightness target value and the time product brightness increment corresponding to the minimum step of the current-time product.
[0009] Optionally, in the method according to the present invention, a PID control mode of the tube voltage and the current-time product is determined based on the comparison data, and the control mode includes at least a single control mode and a combined control mode, including: In response to the brightness error value being greater than the threshold, the tube voltage PID control mode is started and the tube voltage increment output is calculated; In response to the brightness error value being less than the threshold, the current-time product PID control mode is started to calculate the current-time product increment output; The control mode includes at least a single control mode and a combined control mode.
[0010] Optionally, in the method according to the present invention, the control mode includes at least a single control mode and a combined control mode, including: In response to the brightness error value being greater than the preset error limit, the proportional control mode is triggered to multiply the difference between the brightness error value and the previous error value by the proportional coefficient to obtain a proportional increment.
[0011] Optionally, in the method according to the present invention, the method further comprises: In response to the continuous existence of a small deviation in a single direction, the proportional and integral combined control mode is triggered to accumulate and calculate the small deviation values to obtain an accumulated value; In response to the accumulated value being greater than or equal to the preset accumulated extreme value, the brightness error value is multiplied by the integral coefficient to obtain an integral increment.
[0012] Optionally, in the method according to the present invention, the control mode includes at least a single control mode and a combined control mode, including: In response to the brightness change rate being greater than the preset change extreme value, the differential control mode is triggered to sum the difference between the brightness error value and twice the previous error value with the previous two error values, and the calculation result is multiplied by the differential coefficient to obtain the differential increment.
[0013] Optionally, in the method according to the present invention, determining based on the PID control mode the output increment and the first tube voltage and / or the first time product to perform superposition update calculation to obtain a second image with satisfactory brightness includes: Based on the PID control method, the proportional increment, integral increment and differential increment are summed and calculated to obtain the output increment; The output increment is superimposed and calculated with the first tube voltage and / or the first time product to obtain a second image with satisfactory brightness.
[0014] Optionally, in the method according to the present invention, the method further comprises: The X-ray source assembly is controlled to change the X-ray dose based on the output amount, the previous two error values are updated based on the previous error value, and the previous error value is updated based on the brightness error value.
[0015] Optionally, in the method according to the present invention, a second tube voltage and a second time product of the second image, and physical information of the patient corresponding to the second image, including at least height and weight, are obtained; Combining the second tube voltage, the second time product, and the body information of each patient to obtain first training data; The first training data is trained to obtain a radiation dose model based on classification and screening, so that other patients in the future can be trained based on the first tube voltage and first time product corresponding to the radiation dose model.
[0016] Optionally, in the method according to the present invention, the training of the first training data to obtain a radiation dose model based on classification and screening processing includes: Counting the training data in the preset height range in the first training data to obtain second training data, and performing function training based on the weight value, the second tube voltage, and the second time product to obtain a weight emission function; Counting the training data in the preset weight range in the first training data to obtain second training data, and performing function training based on the height value, the second tube voltage, and the second time product to obtain a height emission function; The weight emission function and the height emission function are combined to obtain a ray radiation dose model.
[0017] Optionally, in the method according to the present invention, the combining of the weight emission function and the height emission function to obtain the radiation dose model comprises: Acquire training data within a preset time period from the first training data to obtain third training data; Determine a weight emission function based on the height value in the third training data, and input the tube voltage and time product obtained by a primary prediction; Determine a height emission function based on the weight value in the third training data, and input the tube voltage and time product obtained by quadratic prediction; The radiation dose model is obtained by fusion calculation based on the primary predicted tube voltage and time product and the secondary predicted tube voltage and time product.
[0018] Optionally, in the method according to the present invention, the fusion calculation based on the primary predicted tube voltage and time product and the secondary predicted tube voltage and time product to obtain the radiation dose model includes: Comparing the first predicted tube voltage and time product with the actual tube voltage and time product to obtain a first difference tube voltage and time product, and comparing the second predicted tube voltage and time product with the actual tube voltage and time product to obtain a second difference tube voltage and time product; A radiation dose model is obtained by training based on the product of the tube voltage and time of the first difference and the product of the tube voltage and time of the second difference.
[0019] Optionally, in the method according to the present invention, the training based on the product of the tube voltage and time of the first difference and the product of the tube voltage and time of the second difference to obtain the radiation dose model includes: Calculating the ratio of the tube voltage of the first difference to the tube voltage of the second difference to obtain a first ratio; Calculate the ratio of the time product of the first difference to the time product of the second difference to obtain a second ratio; adding the first ratio and the second ratio to obtain a third ratio, extracting a first value and a second value from the third ratio, wherein the first value corresponds to the product of the tube voltage and time predicted once, and the second value corresponds to the product of the tube voltage and time predicted twice; Add the first value and the second value to obtain a third value, divide the second value by the third value to obtain the height value weight, and divide the first value by the third value to obtain the weight value weight; The height value weight is added to the weight emission function, and the trained ray radiation emission model is obtained by adding the weight value weight to the height emission function.
[0020] According to another aspect of the present invention, there is provided a PID-based automatic brightness control system, comprising: An acquisition module is configured to acquire a first image of the X-ray machine at a first tube voltage and a first time product; a comparison module configured to compare the brightness error value with a threshold value to obtain comparison data if it is determined that the absolute value of the brightness error of the first image is greater than the brightness dead zone value; a control module configured to determine a PID control mode of the tube voltage and the current-time product based on the comparison data, wherein the control mode includes at least a single control mode and a combined control mode; The updating module is configured to determine the output increment based on the PID control method and perform superposition updating calculation on the first tube voltage and / or the first time product to obtain a second image with satisfactory brightness.
[0021] According to the present invention, the server first acquires a first image from the X-ray machine at a first tube voltage and a first time product, providing basic data for subsequent image processing and analysis. The server then automatically determines the absolute value of the brightness error and the brightness deadband value of the first image, providing a basis for subsequent control adjustments. If the absolute value of the brightness error exceeds the brightness deadband value, the server compares the brightness error value with a preset threshold and, based on the comparison data, determines the PID control method for the tube voltage and current-time product. The server selects the most appropriate control method based on the current brightness deviation, including single and combined control methods. The server then calculates an output increment based on the PID control method and superimposes this increment with the first tube voltage and / or the first time product to generate a second image with satisfactory brightness. This incremental adjustment method not only improves adjustment accuracy but also avoids overshoot and oscillation during the control process, thereby ensuring imaging stability. The present invention improves the efficiency and effectiveness of image brightness adjustment, thereby ensuring imaging quality and stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A flow chart of an automatic brightness control method based on PID according to an embodiment of the present invention is shown; Figure 2 FIG. 4 shows a structural block diagram of a PID-based automatic brightness control system according to another embodiment of the present invention. DETAILED DESCRIPTION
[0023] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0024] To solve the problems in the above background technology, the inventors propose the solution of the present invention. One embodiment of the present invention provides a PID-based automatic brightness control method, which can be executed in a computing device.
[0025] Figure 1 The flowchart of the automatic brightness control method based on PID according to one embodiment of the present invention is shown. The method is suitable for being executed in a computing device.
[0026] like Figure 1 As shown, the PID-based automatic brightness control method proposed in this embodiment begins at step S102. In step S102, the following steps are included: A first image is acquired by the X-ray machine at a first tube voltage and a first time product.
[0027] For example, in this embodiment, it can be understood that the brightness of an image obtained by an X-ray machine depends on the energy of the X-rays. The main factors affecting X-ray energy are tube voltage and current-time product. Tube voltage determines X-ray intensity, or penetrating power, while the current-time product determines X-ray energy density.
[0028] Therefore, the server first acquires a corresponding image, ie, a first image, based on the preset first tube voltage and the first time product.
[0029] The server sends the first image to the preprocessing model, thereby performing image preprocessing operations on the first image, wherein the preprocessing operations include removing image noise, enhancing image contrast, and performing image sharpening on the first image.
[0030] For denoising, the server not only uses common filtering algorithms but also incorporates an adaptive denoising strategy. Traditional denoising algorithms often use fixed parameters, making them difficult to adapt to the noise characteristics of different image regions. However, the adaptive denoising algorithm automatically adjusts denoising parameters based on the noise intensity and texture characteristics of a local image region.
[0031] Specifically, the server automatically adjusts denoising parameters based on the noise characteristics of different image regions within the first image, effectively removing noise while preserving the first image's detailed information to the greatest extent possible. For example, in smooth areas of the first image, the server applies a stronger denoising force to effectively remove noise; whereas, in areas with edges and detailed details, the server appropriately reduces the denoising force to avoid losing important details. In this way, the server can remove image noise while preserving the original features of the first image to the greatest extent possible.
[0032] In terms of contrast enhancement, the server will use an adaptive histogram equalization method to perform contrast enhancement, thereby making differentiated contrast adjustments to different image areas based on the specific characteristics of the first image, making the brightness distribution of the image more uniform and improving the recognition of brightness information.
[0033] Specifically, for a first image with uneven brightness distribution, adaptive histogram equalization can appropriately increase the brightness of darker image areas and appropriately reduce the brightness of brighter image areas, making the overall brightness distribution of the first image more uniform. At the same time, by enhancing the image contrast, the recognition of brightness information can be improved, making subsequent brightness analysis more accurate.
[0034] The server also performs image sharpening on the first image to further enhance its clarity. Image sharpening can enhance edges and details in the first image, helping to improve the accuracy of brightness control. Based on the image characteristics of the first image, the server can select the most appropriate sharpening algorithm from a variety of algorithms, such as Laplace sharpening and high-pass filtering, to perform sharpening on the first image.
[0035] By performing image preprocessing on the first image, not only can the image noise be removed while retaining the edge information of the image, but the image contrast can also be enhanced, thereby improving the recognition of the corresponding brightness information of the first image.
[0036] In step S104, the following contents are included: If it is determined that the absolute value of the brightness error of the first image is greater than the brightness dead zone value, the brightness error value is compared with a threshold value to obtain comparison data.
[0037] For example, in this embodiment, the server determines the absolute value of the brightness error and the brightness dead zone value of the first image, and then compares the absolute value of the brightness error with the brightness dead zone value.
[0038] When the absolute value of the brightness error is less than or equal to the brightness dead zone value, it indicates that the brightness error of the first image is not serious and no corresponding adjustment is required.
[0039] When the absolute value of the brightness error is greater than the brightness dead zone value, it means that the brightness error of the first image is serious and needs further adjustment. Therefore, the server will compare the brightness error value with the threshold and determine the subsequent control method based on the comparison data.
[0040] Furthermore, the above-mentioned “if it is determined that the absolute value of the brightness error of the first image is greater than the brightness dead zone value, then comparing the brightness error value with the threshold to obtain comparison data” further includes the following steps: Sending the first image to the image processing model, obtaining a current brightness value corresponding to the first image, and comparing the current brightness value with a brightness target value to obtain a brightness error value; Calculate the difference between the minimum step of the current-time product and the current brightness value to obtain the brightness dead zone value, and compare the absolute value of the brightness error with the brightness dead zone value; In response to the absolute value of the brightness error being greater than the brightness dead zone value, a threshold is determined based on the increment of the image brightness by the minimum step length of the tube voltage, and the brightness error value is compared with the threshold to obtain comparison data.
[0041] For example, in this embodiment, the server uses a more advanced deep learning model for brightness analysis, such as a specialized brightness analysis model based on a convolutional neural network. The server trains the image processing model using a large amount of annotated image data, enabling it to learn the complex relationship between image brightness and various features.
[0042] During training, the server continuously adjusts model parameters to improve the accuracy and generalization of the image processing model. To avoid overfitting, the server employs methods such as data augmentation and regularization to ensure the image processing model performs well under various imaging conditions.
[0043] The server also verifies and corrects the output of the image processing model by combining traditional image processing algorithms, such as grayscale statistics and feature matching. Traditional algorithms have advantages in certain situations and can provide additional information. Therefore, when the results of the image processing model differ from those of traditional algorithms, the weighting coefficients are dynamically adjusted to obtain a more accurate current brightness value.
[0044] After obtaining the first image, the server inputs the first image into the image processing model to obtain the current brightness value corresponding to the first image. The server then compares the current brightness value with the preset brightness target value to calculate the brightness error value.
[0045] The server then calculates the difference between the current brightness value and the minimum step of the current-time product to obtain the brightness dead zone value, and then compares the absolute value of the brightness error with the brightness dead zone value.
[0046] If the absolute value of the brightness error is greater than the brightness deadband value, the server determines a threshold based on the minimum tube voltage step size. This threshold is related to the image brightness increment. Finally, the server compares the brightness error value with this threshold to determine further processing.
[0047] Furthermore, the above method further includes the following steps: The tube voltage brightness increment corresponding to the minimum tube voltage step is determined as a threshold; The brightness dead zone value is obtained by calculating the difference between the brightness target value and the time product brightness increment corresponding to the minimum step of the current-time product.
[0048] For example, in this embodiment, the server first determines the tube voltage brightness increment corresponding to the minimum tube voltage step length, and then determines the tube voltage brightness increment as the threshold.
[0049] The server then calculates the difference between the brightness target value and the time product brightness increment corresponding to the minimum step of the current-time product to obtain the brightness dead zone value.
[0050] Considering that factors such as the minimum step size of the current-time product and the minimum step size of the tube voltage may change with changes in imaging conditions during actual imaging, the server dynamically adjusts the brightness dead zone value and threshold.
[0051] First, the server will establish a data set based on historical imaging data and real-time imaging conditions, and then use data analysis and machine learning algorithms to comprehensively consider the impact of various factors on image brightness and calculate the brightness dead zone value and threshold in real time.
[0052] For example, when the server detects an increase in the noise level of the imaging environment, it will appropriately increase the brightness dead zone value to avoid unnecessary adjustments due to noise interference; when the server detects a more obvious change trend in image brightness, it will dynamically adjust the threshold.
[0053] Furthermore, the server also establishes a real-time feedback adjustment mechanism to continuously optimize the calculation method of brightness dead-zone values and thresholds, making them more reasonable. Furthermore, the server regularly updates and maintains the relevant data in the dataset to ensure that it reflects the latest imaging conditions and provides an accurate basis for dynamic adjustments.
[0054] In step S106, the following contents are included: A PID control method for the tube voltage and the current-time product is determined based on the comparison data, wherein the control method includes at least a single control method and a combined control method.
[0055] For example, in this embodiment, the server determines whether to start the tube voltage PID and / or current time product PID control based on the comparison result. In order to adjust the image brightness more accurately, the control method includes at least a single control method and a combined control method.
[0056] Considering that there may be a certain coupling relationship between the first tube voltage and the first time product, the server will also introduce a multivariable coupling PID control strategy.
[0057] The server will establish a coupling model between the first tube voltage and the first time product to analyze their comprehensive impact on the current brightness value. For example, the coupling model is established using methods such as experimental data fitting and theoretical analysis to determine the relationship between the first tube voltage and the first time product and their impact coefficient on the current brightness value.
[0058] During the control process, the server simultaneously adjusts the PID parameters for the first tube voltage and the first time product, enabling them to work together to achieve more precise brightness control. For example, when the current brightness value needs to be increased rapidly, the server not only increases the first tube voltage but also appropriately increases the first time product. The server then adjusts the incremental ratio of the two based on the coupling model to achieve optimal control.
[0059] Through this coordinated control strategy, the interaction between the first tube voltage and the first time product can be fully utilized, thereby improving the efficiency and accuracy of brightness control.
[0060] Furthermore, the above-mentioned “PID control method for determining the tube voltage and current-time product based on the comparison data, wherein the control method includes at least a single control method and a combined control method” further includes the following steps: In response to the brightness error value being greater than the threshold, the tube voltage PID control mode is started and the tube voltage increment output is calculated; In response to the brightness error value being less than the threshold, the current-time product PID control mode is started to calculate the current-time product increment output; The control mode includes at least a single control mode and a combined control mode.
[0061] For example, in this embodiment, when the brightness error value exceeds a threshold, the server will start the tube voltage PID control mode and calculate the tube voltage increment output that needs to be adjusted.
[0062] On the contrary, if the brightness error value remains below the threshold, the system will start the current-time product PID control method to determine the adjustment increment of the current-time product, that is, the current-time product increment output.
[0063] This embodiment can activate different control modes based on the comparison result of the brightness error value and the threshold value, thereby adjusting the control parameters to achieve the desired image brightness.
[0064] Furthermore, the above-mentioned “the control mode includes at least a single control mode and a combined control mode” further includes the following steps: In response to the brightness error value being greater than the preset error limit, the proportional control mode is triggered to multiply the difference between the brightness error value and the previous error value by the proportional coefficient to obtain a proportional increment.
[0065] For example, in this embodiment, when the brightness error value is greater than the preset error limit, it means that the brightness error value is too large. At this time, the output needs to be increased, that is, the X-ray dose intensity needs to be quickly increased to achieve the purpose of quickly increasing or decreasing the image brightness.
[0066] Therefore, the server will trigger the proportional control method to first calculate the difference between the brightness error value and the previous error value, and then multiply the difference result by the proportional coefficient to obtain the proportional increment.
[0067] Furthermore, the above method further includes the following steps: In response to the continuous existence of a small deviation in a single direction, the proportional and integral combined control mode is triggered to accumulate and calculate the small deviation values to obtain an accumulated value; In response to the accumulated value being greater than or equal to the preset accumulated extreme value, the brightness error value is multiplied by the integral coefficient to obtain an integral increment.
[0068] For example, in this embodiment, when a small deviation in a single direction (positive deviation or negative deviation) persists, it is impossible to completely eliminate the deviation by relying solely on proportional control.
[0069] At this point, the integral control triggers a combination of proportional and integral control to accumulate these small deviations over time. When this accumulated amount reaches or exceeds a preset accumulation threshold, the integral control multiplies the brightness error value by the integral coefficient to calculate the integral increment. This integral increment eliminates the overall trend caused by the accumulation of continuous small deviations.
[0070] Furthermore, the above-mentioned “the control mode includes at least a single control mode and a combined control mode” further includes the following steps: In response to the brightness change rate being greater than the preset change extreme value, the differential control mode is triggered to sum the difference between the brightness error value and twice the previous error value with the previous two error values, and the calculation result is multiplied by the differential coefficient to obtain the differential increment.
[0071] For example, in this embodiment, the server determines the brightness change rate. When the brightness change rate is too large, it may cause the output to be too large, thereby causing the image brightness to exceed the expected range (i.e., overshoot). This overshoot phenomenon will not only cause oscillation of the image brightness, but also reduce the corresponding response speed.
[0072] To address this issue, when the server detects that the brightness change rate exceeds a preset maximum, it triggers a differential control method to calculate the difference between the current brightness error value and twice the previous error value, and then sums this difference with the previous two error values. This sum is then multiplied by the differential coefficient to obtain the differential increment.
[0073] This embodiment can effectively suppress overshoot and oscillation caused by excessively fast change rates, and improve stability and response speed to a certain extent.
[0074] The server can further subdivide the control process into multiple stages according to the size and change trend of the brightness error value, that is, each stage adopts a different PID parameter combination.
[0075] For example, in the initial stage when the brightness error is large, the proportional coefficient is increased to speed up the server's response, allowing the current brightness value to quickly approach the brightness target value. At the same time, the server will also appropriately reduce the integral coefficient to avoid excessive integral terms that may cause system overshoot.
[0076] In the intermediate stage when the brightness error value gradually decreases, the server will adjust the proportional coefficient and the integral coefficient so that the server can maintain a certain response speed and adjust the image brightness more accurately.
[0077] In the final stage when the brightness error value approaches the brightness target value, the server will reduce the proportional coefficient and the integral coefficient and increase the differential coefficient, thereby enhancing the stability of the server and preventing oscillation.
[0078] The server will also formulate detailed dynamic parameter adjustment rules for each stage, that is, adjust the PID parameters in real time according to factors such as the rate of change of the brightness error value, the current control effect, and the response characteristics of the server.
[0079] For example, when the brightness error value changes rapidly, the server will appropriately increase the proportional coefficient to speed up the response. When signs of overshoot appear, the server will promptly reduce the integral coefficient to avoid integral saturation. This dynamic adjustment mechanism ensures that the server maintains excellent control performance under different circumstances.
[0080] In step S108, the following contents are included: Based on the PID control method, the output increment is determined to be superimposed and updated with the first tube voltage and / or the first time product to obtain a second image with satisfactory brightness.
[0081] For example, in this embodiment, the server obtains an output increment according to a determined PID control method, and then superimposes and updates the output increment with the first tube voltage and / or the first time product to obtain a second image with satisfactory brightness.
[0082] This embodiment can achieve precise control of image brightness by adjusting the tube voltage and / or current-time product, thereby maintaining stability and consistency of image brightness.
[0083] Furthermore, the above-mentioned “determining the output increment based on the PID control method and superimposing and updating the first tube voltage and / or the first time product to obtain a second image with satisfactory brightness” further includes the following steps: Based on the PID control method, the proportional increment, integral increment and differential increment are summed and calculated to obtain the output increment; The output increment is superimposed and calculated with the first tube voltage and / or the first time product to obtain a second image with satisfactory brightness.
[0084] For example, in this embodiment, the server calculates the proportional increment, integral increment, and differential increment based on the PID control method, and sums them to obtain the output increment.
[0085] Then, the server performs superposition calculation on the output increment and the first tube voltage and / or the first time product to obtain a second image with satisfactory brightness.
[0086] Furthermore, the above method further includes the following steps: The X-ray source assembly is controlled to change the X-ray dose based on the output amount, the previous two error values are updated based on the previous error value, and the previous error value is updated based on the brightness error value.
[0087] For example, in this embodiment, after each execution of PID control, the server updates the previous error value and the previous two error values. The specific update method is: updating the previous two error values based on the previous error value, and updating the previous error value based on the brightness error value, so as to be used in the next PID control.
[0088] Furthermore, the model training method includes the following steps: Acquire a second tube voltage and a second time product of the second image, and physical information of the patient corresponding to the second image, which includes at least height and weight; Combining the second tube voltage, the second time product, and the body information of each patient to obtain first training data; The first training data is trained to obtain a radiation dose model based on classification and screening, so that other patients in the future can be trained based on the first tube voltage and first time product corresponding to the radiation dose model.
[0089] For example, in this embodiment, patients of different body types require different X-ray doses when imaged by an X-ray machine. For example, taller and heavier patients require higher X-ray doses to achieve better imaging results. If a matching X-ray dose can be determined for each patient, the resulting image brightness value can be brought closer to the standard value, not only ensuring imaging quality but also reducing server data processing load and improving imaging efficiency.
[0090] Therefore, the server will first obtain the second tube voltage and the second time product of the second image, as well as the body information of the patient corresponding to the second image. Since both height and weight values affect the required X-ray dose, the body information at least includes height and weight values.
[0091] Then, the server combines the second tube voltage, the second time product, and the body information of each patient to obtain the first training data, that is, the first training data includes the second tube voltage and the second time product corresponding to different body information.
[0092] Then, in order to facilitate the subsequent server to retrieve corresponding data based on the first training data, the server will train the first training data based on classification and screening to obtain a radiation dose model, so that the first tube voltage and first time product corresponding to other patients in the future can be quickly determined based on the radiation dose model.
[0093] Furthermore, the above-mentioned "training the first training data based on classification and screening to obtain a radiation dose model" further includes the following steps: Counting the training data in the preset height range in the first training data to obtain second training data, and performing function training based on the weight value, the second tube voltage, and the second time product to obtain a weight emission function; Counting the training data in the preset weight range in the first training data to obtain second training data, and performing function training based on the height value, the second tube voltage, and the second time product to obtain a height emission function; The weight emission function and the height emission function are combined to obtain a ray radiation dose model.
[0094] For example, in this embodiment, since patients with the same height may have different weights, resulting in different second tube voltages and second time products, the server will collect training data within a preset height range from the first training data to obtain the second training data. For example, the preset height ranges may be [1.6, 1.7] m, [1.7, 1.8] m, etc. The server will then perform function training based on the weight, second tube voltage, and second time product to obtain a weight emission function. In other words, using this weight emission function, the server can determine the corresponding second tube voltage and second time product for patients with the same height but different weights.
[0095] Because patients with the same weight may have different heights, resulting in different second tube voltages and second time products, the server collects data from the first training data that falls within a preset weight range to generate the second training data. For example, the preset weight ranges could be [50, 55] kg, [55, 60] kg, and so on. The server then performs function training based on the height, second tube voltage, and second time product to generate a height emission function. This height emission function allows the server to determine the corresponding second tube voltage and second time product for patients with the same weight but different heights.
[0096] Finally, the server will combine the weight emission function and the height emission function to obtain a radiation dose model, so that the server can subsequently determine the tube voltage and time product corresponding to the patient based on the radiation dose model.
[0097] Furthermore, the above-mentioned “combining the weight emission function and the height emission function to obtain a radiation dose model” further includes the following steps: Acquire training data within a preset time period from the first training data to obtain third training data; Determine a weight emission function based on the height value in the third training data, and input the tube voltage and time product obtained by a primary prediction; Determine a height emission function based on the weight value in the third training data, and input the tube voltage and time product obtained by quadratic prediction; The radiation dose model is obtained by fusion calculation based on the primary predicted tube voltage and time product and the secondary predicted tube voltage and time product.
[0098] For example, in this embodiment, since the first training data may include training data from many years ago, in order to ensure a certain timeliness, the corresponding administrator can pre-set a preset time period in the server, for example, the preset time period can be three years.
[0099] To improve the accuracy of subsequent tube voltage and time product predictions, the server retrieves training data within a preset time period from the first training data to generate third training data. The server then determines a weight-to-weight emission function based on the height value in the third training data and inputs the height value into the weight-to-weight emission function to obtain a primary prediction of the tube voltage and time product. Next, the server determines a height-to-weight emission function based on the weight value in the third training data and inputs the weight value into the height-to-weight emission function to obtain a secondary prediction of the tube voltage and time product.
[0100] Finally, the server will perform a fusion calculation based on the first predicted tube voltage and time product and the second predicted tube voltage and time product to obtain the X-ray radiation dose model.
[0101] Furthermore, the above-mentioned "obtaining a radiation dose model by fusion calculation based on the primary predicted tube voltage and time product and the secondary predicted tube voltage and time product" further includes the following steps: Comparing the first predicted tube voltage and time product with the actual tube voltage and time product to obtain a first difference tube voltage and time product, and comparing the second predicted tube voltage and time product with the actual tube voltage and time product to obtain a second difference tube voltage and time product; A radiation dose model is obtained by training based on the product of the tube voltage and time of the first difference and the product of the tube voltage and time of the second difference.
[0102] For example, in this embodiment, since the above solution predicts the tube voltage and time product corresponding to the patient, there may be a certain error between the tube voltage and time product obtained by the first and second predictions. To ensure a more accurate final tube voltage and time product, the server compares the first predicted tube voltage and time product with the actual tube voltage and time product to obtain a first difference tube voltage and time product. The server then compares the second predicted tube voltage and time product with the actual tube voltage and time product to obtain a second difference tube voltage and time product.
[0103] Finally, the server performs training based on the product of the tube voltage and time of the first difference and the product of the tube voltage and time of the second difference to obtain a radiation dose model.
[0104] Furthermore, the above-mentioned “training to obtain a radiation dose model based on the product of the tube voltage and time of the first difference and the product of the tube voltage and time of the second difference” further includes the following steps: Calculating the ratio of the tube voltage of the first difference to the tube voltage of the second difference to obtain a first ratio; Calculate the ratio of the time product of the first difference to the time product of the second difference to obtain a second ratio; adding the first ratio and the second ratio to obtain a third ratio, extracting a first value and a second value from the third ratio, wherein the first value corresponds to the product of the tube voltage and time predicted once, and the second value corresponds to the product of the tube voltage and time predicted twice; Add the first value and the second value to obtain a third value, divide the second value by the third value to obtain the height value weight, and divide the first value by the third value to obtain the weight value weight; The height value weight is added to the weight emission function, and the trained ray radiation emission model is obtained by adding the weight value weight to the height emission function.
[0105] For example, in this embodiment, the server calculates the ratio of the tube voltage of the first difference to the tube voltage of the second difference to obtain a first ratio, and then calculates the ratio of the time product of the first difference to the time product of the second difference to obtain a second ratio.
[0106] The server then adds the first and second ratios to obtain a third ratio, and extracts the first and second values from the third ratio. As can be seen from the above, the first value corresponds to the product of the primary predicted tube voltage and time, and the second value corresponds to the product of the secondary predicted tube voltage and time.
[0107] Next, the server adds the first value and the second value to obtain a third value, divides the second value by the third value to obtain the height value weight, and divides the first value by the third value to obtain the weight value weight.
[0108] Finally, the server will add the height value weight to the weight emission function, and add the weight value weight to the height emission function to obtain the trained ray radiation emission model.
[0109] This embodiment can obtain the height value weight and the weight value weight based on the calculation of the third value, thereby training and updating the radiation dose model, so that the tube voltage and time product subsequently determined based on the radiation dose model can be more consistent with the patient, thereby improving the corresponding imaging effect and imaging efficiency.
[0110] According to the present invention, the server first acquires a first image from the X-ray machine at a first tube voltage and a first time product, providing basic data for subsequent image processing and analysis. The server then automatically determines the absolute value of the brightness error and the brightness deadband value of the first image, providing a basis for subsequent control adjustments. If the absolute value of the brightness error exceeds the brightness deadband value, the server compares the brightness error value with a preset threshold and, based on the comparison data, determines the PID control method for the tube voltage and current-time product. The server selects the most appropriate control method based on the current brightness deviation, including single and combined control methods. The server then calculates an output increment based on the PID control method and superimposes this increment with the first tube voltage and / or the first time product to generate a second image with satisfactory brightness. This incremental adjustment method not only improves adjustment accuracy but also avoids overshoot and oscillation during the control process, thereby ensuring imaging stability. The present invention improves the efficiency and effectiveness of image brightness adjustment, thereby ensuring imaging quality and stability.
[0111] Another embodiment of the present invention provides an automatic brightness control system based on PID. Figure 2 For its corresponding system block diagram, the system includes: An acquisition module is configured to acquire a first image of the X-ray machine at a first tube voltage and a first time product; a comparison module configured to compare the brightness error value with a threshold value to obtain comparison data if it is determined that the absolute value of the brightness error of the first image is greater than the brightness dead zone value; a control module configured to determine a PID control mode of the tube voltage and the current-time product based on the comparison data, wherein the control mode includes at least a single control mode and a combined control mode; The updating module is configured to determine the output increment based on the PID control method and perform superposition updating calculation on the first tube voltage and / or the first time product to obtain a second image with satisfactory brightness.
[0112] In the description provided herein, the algorithms and displays are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems may also be used in conjunction with the examples of the present invention. Based on the above description, it is apparent that the structure required for constructing such systems is well understood. In addition, the present invention is not directed to any specific programming language. It should be understood that various programming languages may be utilized to implement the present invention described herein, and the description of specific languages above is provided for the purpose of disclosing preferred embodiments of the present invention.
[0113] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.
[0114] Similarly, it should be understood that in order to streamline the disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together into a single embodiment, figure, or description thereof.
[0115] Those skilled in the art will appreciate that the modules, units, or components of the devices in the examples disclosed herein may be arranged in the device described in the embodiment, or alternatively may be located in one or more devices different from the devices in the examples. The modules in the foregoing examples may be combined into one module or further divided into multiple submodules.
[0116] Those skilled in the art will appreciate that the modules in the devices of the embodiments can be adaptively changed and installed in one or more devices different from the embodiments. The modules, units, or components in the embodiments can be combined into one module, unit, or component, and furthermore, they can be divided into multiple submodules, subunits, or subcomponents.
[0117] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features and not other features included in other embodiments, the combination of features from different embodiments is intended to be within the scope of the invention and to form different embodiments.
[0118] In addition, some of the embodiments are described herein as methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices that perform the functions described. Thus, a processor having the necessary instructions for implementing the method or method element forms a device for implementing the method or method element. Furthermore, the elements described herein of the device embodiments are examples of devices for implementing the functions performed by the elements for the purpose of implementing the invention.
[0119] As used herein, unless otherwise specified, the use of ordinal numbers "first," "second," "third," etc. to describe common objects merely indicates that different instances of similar objects are involved and are not intended to imply that the objects so described must have a given order in time, space, ranking, or in any other manner.
[0120] Although the present invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of the foregoing description, will appreciate that other embodiments are contemplated within the scope of the invention thus described. Furthermore, it should be noted that the language used in this specification has been selected primarily for readability and instructional purposes and is not selected to explain or limit the subject matter of the present invention.
Claims
1. A PID-based automatic brightness control method, characterized in that: include: Acquire a first image of the X-ray machine at a first tube voltage and a first time product; If it is determined that the absolute value of the brightness error of the first image is greater than the brightness dead zone value, then the brightness error value is compared with the threshold value to obtain comparison data; Determine a PID control mode of tube voltage and current-time product based on the comparison data, wherein the control mode includes at least a single control mode and a combined control mode; Based on the PID control method, the output increment is determined to be superimposed and updated with the first tube voltage and / or the first time product to obtain a second image with satisfactory brightness.
2. The method according to claim 1, characterized in that If it is determined that the absolute value of the brightness error of the first image is greater than the brightness dead zone value, the brightness error value is compared with the threshold to obtain comparison data, including: Sending the first image to the image processing model, obtaining a current brightness value corresponding to the first image, and comparing the current brightness value with a brightness target value to obtain a brightness error value; Calculate the difference between the minimum step of the current-time product and the current brightness value to obtain the brightness dead zone value, and compare the absolute value of the brightness error with the brightness dead zone value; In response to the absolute value of the brightness error being greater than the brightness dead zone value, a threshold is determined based on the increment of the image brightness by the minimum step length of the tube voltage, and the brightness error value is compared with the threshold to obtain comparison data.
3. The PID-based automatic brightness control method according to claim 2, characterized in that: The method further comprises: The tube voltage brightness increment corresponding to the minimum tube voltage step is determined as a threshold; The brightness dead zone value is obtained by calculating the difference between the brightness target value and the time product brightness increment corresponding to the minimum step of the current-time product.
4. The method according to claim 2, characterized in that A PID control method for determining the tube voltage and current-time product based on the comparison data, wherein the control method includes at least a single control method and a combined control method, including: In response to the brightness error value being greater than the threshold, the tube voltage PID control mode is started and the tube voltage increment output is calculated; In response to the brightness error value being less than the threshold, the current-time product PID control mode is started to calculate the current-time product increment output; The control mode includes at least a single control mode and a combined control mode.
5. The method according to claim 4, characterized in that The control mode includes at least a single control mode and a combined control mode, including: In response to the brightness error value being greater than the preset error limit, the proportional control mode is triggered to multiply the difference between the brightness error value and the previous error value by the proportional coefficient to obtain a proportional increment.
6. The method according to claim 5, characterized in that The method further comprises: In response to the continuous existence of a small deviation in a single direction, the proportional and integral combined control mode is triggered to accumulate and calculate the small deviation values to obtain an accumulated value; In response to the accumulated value being greater than or equal to the preset accumulated extreme value, the brightness error value is multiplied by the integral coefficient to obtain an integral increment.
7. The method according to claim 4, characterized in that The control mode includes at least a single control mode and a combined control mode, including: In response to the brightness change rate being greater than the preset change extreme value, the differential control mode is triggered to sum the difference between the brightness error value and twice the previous error value with the previous two error values, and the calculation result is multiplied by the differential coefficient to obtain the differential increment.
8. The method according to claim 7, characterized in that Determining the output increment based on the PID control method and superimposing and updating the first tube voltage and / or the first time product to obtain a second image with satisfactory brightness includes: Based on the PID control method, the proportional increment, integral increment and differential increment are summed and calculated to obtain the output increment; The output increment is superimposed and calculated with the first tube voltage and / or the first time product to obtain a second image with satisfactory brightness.
9. The method according to claim 8, characterized in that The method further comprises: The X-ray source assembly is controlled to change the X-ray dose based on the output amount, the previous two error values are updated based on the previous error value, and the previous error value is updated based on the brightness error value.
10. A model training method, characterized in that: include: Acquire a second tube voltage and a second time product of the second image, and physical information of the patient corresponding to the second image, which includes at least height and weight; Combining the second tube voltage, the second time product, and the body information of each patient to obtain first training data; The first training data is trained to obtain a radiation dose model based on classification and screening, so that other patients in the future can be trained based on the first tube voltage and first time product corresponding to the radiation dose model.
11. The method according to claim 10, characterized in that The training of the first training data to obtain a radiation dose model based on classification and screening includes: Counting the training data in the preset height range in the first training data to obtain second training data, and performing function training based on the weight value, the second tube voltage, and the second time product to obtain a weight emission function; Counting the training data in the preset weight range in the first training data to obtain second training data, and performing function training based on the height value, the second tube voltage, and the second time product to obtain a height emission function; The weight emission function and the height emission function are combined to obtain a ray radiation dose model.
12. The method according to claim 11, characterized in that The method of combining the weight emission function and the height emission function to obtain a radiation dose model includes: Acquire training data within a preset time period from the first training data to obtain third training data; Determine a weight emission function based on the height value in the third training data, and input the tube voltage and time product obtained by a primary prediction; Determine a height emission function based on the weight value in the third training data, and input the tube voltage and time product obtained by quadratic prediction; The radiation dose model is obtained by fusion calculation based on the primary predicted tube voltage and time product and the secondary predicted tube voltage and time product.
13. The method according to claim 12, characterized in that The radiation dose model is obtained by fusing and calculating the tube voltage and time product of the primary prediction and the tube voltage and time product of the secondary prediction, including: Comparing the first predicted tube voltage and time product with the actual tube voltage and time product to obtain a first difference tube voltage and time product, and comparing the second predicted tube voltage and time product with the actual tube voltage and time product to obtain a second difference tube voltage and time product; A radiation dose model is obtained by training based on the product of the tube voltage and time of the first difference and the product of the tube voltage and time of the second difference.
14. The method according to claim 13, characterized in that The training based on the product of the tube voltage and time of the first difference and the product of the tube voltage and time of the second difference to obtain the radiation dose model includes: Calculating the ratio of the tube voltage of the first difference to the tube voltage of the second difference to obtain a first ratio; Calculate the ratio of the time product of the first difference to the time product of the second difference to obtain a second ratio; adding the first ratio and the second ratio to obtain a third ratio, extracting a first value and a second value from the third ratio, wherein the first value corresponds to the product of the tube voltage and time predicted once, and the second value corresponds to the product of the tube voltage and time predicted twice; Add the first value and the second value to obtain a third value, divide the second value by the third value to obtain the height value weight, and divide the first value by the third value to obtain the weight value weight; The height value weight is added to the weight emission function, and the trained ray radiation emission model is obtained by adding the weight value weight to the height emission function.
15. A PID-based automatic brightness control system, characterized in that: include: An acquisition module is configured to acquire a first image of the X-ray machine at a first tube voltage and a first time product; a comparison module configured to compare the brightness error value with a threshold value to obtain comparison data if it is determined that the absolute value of the brightness error of the first image is greater than the brightness dead zone value; a control module configured to determine a PID control mode of the tube voltage and the current-time product based on the comparison data, wherein the control mode includes at least a single control mode and a combined control mode; The updating module is configured to determine the output increment based on the PID control method and perform superposition updating calculation on the first tube voltage and / or the first time product to obtain a second image with satisfactory brightness.