An end-cloud cooperative abnormal state identification method and system for radiopharmaceutical production line
Patent Information
- Application Number
- CN202611200731.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-10-27
AI Technical Summary
[0005]本发明提出一种端云协同的放射性药品生产线异常状态识别方法及系统,S1步骤通过采集药品产线成像多源数据,依次完成暗场噪声抵消、药液区域裁剪、结构化封装生成复合图像矩阵,能够统一剥离相机底层固定噪声、剔除无效背景像素、标准化绑定样本身份与图像数据,解决成像基底噪声干扰色度计算的技术问题;S2步骤通过解析复合图像矩阵内基准图像逐像素计算色彩亮度增益并构建补偿校正矩阵,对药液裁剪图逐通道完成光路色彩补偿校正,能够抵消热室铅玻璃局部透射色差与亮度衰减,还原药液原始光学色彩;S3步骤通过将校正图像转换至CIELab均匀色空间并计算行中位数差分相对黄相分量,再结合连通域面积与亮度梯度剔除边缘伪黄斑块后提取多维抑伪黄变特征向量,能够分离光路伪黄与药液真实黄变、多维度量化轻微泛黄程度,解决瓶壁折射造成假性泛黄的技术问题;S4步骤通过将抑伪黄变特征向量与离线标定的多维度黄变判别阈值做联合超限判定,稳定区分正常底色波动与药品降解异常,解决单特征判别鲁棒性差、轻微黄变漏检误检的技术问题
首先,本发明通过逐像素、逐通道匹配补偿校正系数完成药液图像色彩还原校正,并增设颜色值值域上下限约束,有效解决铅玻璃局部透射不均带来的色度、亮度双重畸变问题。具体而言,逐像素校正区别于传统全局统一校正方案,可精准适配观察窗不同位置的透光损耗差异,消除成像自带伪黄基底;对像素乘积结果施加值域范围约束的边界截断,避免校正后数值溢出或负像素产生。进一步地,校正后药液图像剥离防护光路全部光学干扰,RGB数值仅反映药液真实色彩,从源头规避硬件畸变造成的黄变误判,提升后续药液相对黄相分量提取、特征统计的可靠性,降低放射性药品轻微黄变异常识别的漏检与误检概率。
Smart Images

Figure CN122990323A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of drug status identification, and more particularly to a method and system for identifying abnormal statuses in a radiopharmaceutical production line using an end-to-cloud collaborative approach. Background Technology
[0002] Radiopharmaceutical production lines represent a unique manufacturing scenario that integrates nuclear technology, biomedicine, and automated pharmaceutical equipment. The products exhibit distinctive characteristics such as rapid decay of radioactivity, small batch production scale, the need for rapid release after preparation, and high-radiation shielding throughout the entire production process. Compared to ordinary sterile injectable and chemical preparation production lines, the preparation, filling, dispensing, and initial inspection of radiopharmaceuticals are all completed remotely via robotic arms within heated chambers and sealed isolators. Close-range direct intervention by personnel is strictly prohibited on the production site, making remote, visual online monitoring the core means of quality control for product release. Changes in the color of the finished drug solution are key appearance indicators reflecting drug purity, degradation impurities, and process abnormalities. Slight yellowing is a typical quality abnormality, albeit a minor change, but directly linked to the risk of drug failure. However, radioactive drugs cannot be detected in a standard visual environment with open and uniform lighting. Imaging requires images to be acquired through a lead glass protective window in a hot chamber and a remote camera link. Long-term use of lead glass can easily cause optical interference such as fixed color deviation, global light transmission attenuation, and local uneven transmission. The imaging will generate a false yellow area that is highly similar to the true yellowing visual characteristics of the drug liquid. Conventional general industrial vision inspection solutions are prone to misjudgment and missed detection, making it difficult to meet the high-precision identification requirements of trace yellowing.
[0003] Existing research, such as patent CN119269701B, proposes an intelligent detection method and system for drug components and drug quality. This method simultaneously acquires chromatograms of sample and control solutions, adaptively iteratively optimizes chromatographic equipment operating parameters, and comprehensively analyzes the content of active components and impurities in the samples. Based on component indicators, it determines whether the drug meets standards. This approach boasts a high degree of automation, reducing manual operation steps, minimizing human error, and improving the stability and accuracy of component detection. However, this liquid chromatography detection is an offline sampling inspection, with a lengthy process that cannot meet the immediate online release requirements of radioactive drugs. Furthermore, it can only perform quantitative component analysis and cannot directly identify defects such as color or appearance in the finished product.
[0004] To address this issue, this invention proposes an edge-cloud collaborative method for identifying abnormal states in radiopharmaceutical production lines. This method overcomes the shortcomings of existing online visual recognition technologies for radiopharmaceutical production lines in identifying subtle color anomalies, thereby improving the level of intelligence in the radiopharmaceutical production process. Summary of the Invention
[0005] This invention proposes a method and system for identifying abnormal states in a radiopharmaceutical production line using edge-cloud collaboration. Step S1 involves collecting multi-source imaging data from the pharmaceutical production line and sequentially performing dark-field noise cancellation, pharmaceutical liquid region cropping, and structured encapsulation to generate a composite image matrix. This process uniformly removes fixed noise from the camera's underlying layers, eliminates invalid background pixels, and standardizes the binding of sample identities to image data, thus solving the technical problem of colorimetric calculation due to imaging substrate noise interference. Step S2 involves analyzing the reference image within the composite image matrix to calculate color and brightness gain pixel-by-pixel and constructing a compensation and correction matrix. This process performs optical path color compensation and correction on the pharmaceutical liquid cropping image channel-by-channel, effectively offsetting local transmission color differences and brightness variations in the lead glass of the hot chamber. The S3 step attenuates the original optical color of the medicine liquid and restores it. The S4 step converts the corrected image to the CIELab uniform color space and calculates the relative yellow phase component of the row median difference. Then, by combining the area of the connected domain and the brightness gradient to remove the edge false yellow patches, a multi-dimensional anti-yellowing feature vector is extracted. This can separate the false yellowing of the optical path from the real yellowing of the medicine liquid and quantify the degree of slight yellowing in multiple dimensions, solving the technical problem of false yellowing caused by bottle wall refraction. The S5 step uses the anti-yellowing feature vector and the offline calibrated multi-dimensional yellowing discrimination threshold to jointly determine the overlimit, stably distinguishing between normal background color fluctuations and abnormal drug degradation, solving the technical problems of poor robustness of single feature discrimination and missed or false detection of slight yellowing.
[0006] To achieve the above objectives, the present invention provides a method for identifying abnormal states in a radiopharmaceutical production line using edge-cloud collaboration, comprising the following steps: S1: Collect multi-source imaging data of the drug production line during the production process of radiopharmaceuticals, and sequentially perform dark field noise cancellation, effective area cropping of drug liquid, and structured encapsulation processing on the multi-source imaging data of the drug production line to obtain a composite image matrix of radiopharmaceuticals under the radiopharmaceutical production line. S2: Extract the dark field cancellation reference map and the cropped image of the medicine bottle from the composite image matrix. Calculate the channel gain of each pixel in the cropped image of the medicine bottle based on the dark field cancellation reference map. Convert the channel gain of each pixel into a compensation correction matrix. Use the compensation correction matrix to perform color compensation correction processing on the cropped image of the medicine bottle to obtain the corrected medicine image. S3: Convert the corrected medicine liquid image to the CIELab color space, calculate the relative yellow phase component of the medicine liquid, and extract the anti-slip yellowing feature vector of the medicine liquid based on the relative yellow phase component of the medicine liquid; S4: The anti-fake yellowing feature vector of the drug solution is compared with the preset yellowing discrimination threshold to determine if it exceeds the limit, and the yellowing abnormality judgment result of the radiopharmaceutical associated with the anti-fake yellowing feature vector is generated.
[0007] As a further improvement of the present invention: Furthermore, the multi-source imaging data of the drug production line in step S1 includes finished images of the drug bottle, neutral reference images, remote dark field images, and drug area coordinates of the radiopharmaceutical in the radiopharmaceutical production line, wherein the finished drug bottle image, neutral reference image, and remote dark field image are all RGB pixel matrices.
[0008] Furthermore, step S1, which sequentially performs dark field noise cancellation, effective drug liquid area cropping, and structured encapsulation processing on the multi-source imaging data of the drug production line, also includes: S11: Based on the remote dark field image, perform unified dark field noise cancellation processing on the finished product image of the medicine bottle and the neutral reference image respectively to obtain the finished product image of the medicine bottle after dark field noise cancellation and the neutral reference image after dark field noise cancellation. Specifically, the formula for uniformly canceling dark field noise in the finished product image of the medicine bottle and the neutral reference image is as follows: ; ; ; in, The image of the finished medicine bottle shows the first... Line number The color value of the pixel in the column in the k color channel. Indicating the first in the neutral reference image Line number The color value of the pixel in the column in the k color channel. Indicates the first [unclear] in a remote dark field image Line number The color value of the pixel in the column in the k color channel. This indicates the number of pixel rows in the multi-source imaging data of the pharmaceutical production line. This indicates the number of pixel columns in an image from multi-source imaging data of a pharmaceutical production line. These represent the RGB color channels respectively. Color channels, Color channels, Color channels Indicates selection The maximum value in, Indicates selection The maximum value in, This indicates the first image of the finished medicine bottle after dark field noise cancellation. Line number The color value of the pixel in the column in the k color channel. Indicates the first digit in the neutral reference image after dark field noise cancellation. Line number The color value of the pixel in the column in the k color channel; S12: Extract the drug liquid area coordinates from the multi-source imaging data of the drug production line. Based on the drug liquid area coordinates, perform drug liquid effective area cropping on the finished drug bottle image after dark field noise cancellation and the neutral reference image after dark field noise cancellation to obtain the dark field cancellation reference image and the drug bottle cropping image. S13: Obtain the drug number associated with the multi-source imaging data of the drug production line, and encapsulate the drug number, dark field cancellation reference image and drug bottle cropping image into a composite image matrix.
[0009] Further, in step S2, the channel gain of each pixel in the cropped image of the medicine bottle is calculated based on the dark field cancellation reference map, and the channel gain of each pixel is converted into a compensation correction matrix, including: S21: Based on the preset standard neutral chromaticity and standard luminance, the target value of the neutral reference ideal three channels is calculated; S22: Calculate the brightness value of any pixel in the brightness channel of the dark field cancellation reference image using the standard brightness calculation formula; S23: Based on the neutral reference ideal three-channel target value, calculate the channel gain of any pixel in the dark field cancellation reference image in the RGB color channel and the luminance channel; Specifically, the formula for calculating the channel gain of any pixel in the dark field cancellation reference image in the RGB color channel and the luminance channel is as follows: ; ; ; in, Dark field cancellation reference map The channel gain of the pixel in the nth row and mth column in the k color channel. This represents the target value of the k color channel calculated in step S21. N represents the number of pixel rows in the dark-field cancellation reference image and the cropped image of the medicine bottle, and M represents the number of pixel columns in the dark-field cancellation reference image and the cropped image of the medicine bottle. Dark field cancellation reference map The channel gain of the pixel in the nth row and mth column in the luminance channel. Indicate extraction The maximum value in, Indicate extraction The maximum value in, Dark field cancellation reference map The color value of the pixel in the nth row and mth column in the k color channel. Dark field cancellation reference map The brightness value of the pixel in the nth row and mth column in the brightness channel. The following are the reference maps for dark field cancellation, respectively. The color value of the pixel in the nth row and mth column in the RGB color channel. This represents the standard luminance calculation formula; S24: Construct a three-channel compensation correction coefficient for the channel gain of the pixel in the RGB color channel and the luminance channel, wherein the three-channel compensation correction coefficient includes the R color channel compensation correction coefficient, the G color channel compensation correction coefficient and the B color channel compensation correction coefficient; Calculate the three-channel compensation correction coefficient of any pixel in the dark field cancellation reference image to construct a compensation correction matrix.
[0010] Furthermore, step S2, which uses a compensation and correction matrix to perform color compensation and correction processing on the cropped image of the medicine bottle, also includes: Extract the compensation correction matrix and the cropped image of the medicine bottle. Use the three-channel compensation correction coefficients in the compensation correction matrix to perform color compensation correction on the color values of the pixels in the RGB color channels of the cropped image of the medicine bottle, obtaining the corrected medicine image. The color compensation correction formula is as follows: ; ; in, This represents the color value of the pixel in the nth row and mth column of the cropped image of the medicine bottle in the k color channel. N represents the number of pixel rows in the dark-field cancellation reference image and the cropped image of the medicine bottle, and M represents the number of pixel columns in the dark-field cancellation reference image and the cropped image of the medicine bottle. This represents the k-channel compensation correction coefficient for the pixel in the nth row and mth column of the dark field cancellation reference image. Indicates the range of color values. Indicates selection The maximum value between Indicates selection The minimum value between Indicates color value The results of color compensation and correction processing.
[0011] Further, in step S3, the corrected medicinal liquid image is converted to the CIELab color space, and the relative yellow component of the medicinal liquid is calculated, including: S31: Normalize the color values of the pixels in the RGB color channel of the corrected medicine liquid image, and perform gamma correction on the normalized color values using the gamma inverse linear correction method to obtain the gamma-corrected medicine liquid image. S32: The RGB-XYZ-CIELab standard conversion algorithm is used to map and convert the color values of pixels in the gamma-corrected drug liquid image to the CIELab color space to obtain the color components of the pixels in the Lab channel. S33: Statistical analysis of the median color component of each row of pixels in the b channel of the gamma-corrected drug solution image; S34: Calculate the difference between the color component of a pixel in the b channel and the median of the color component of the row in which the pixel is located in the gamma-corrected drug solution image, and use it as the relative yellow phase parameter of the pixel; S35: Statistically calculate the relative yellow phase parameters of any pixel in the gamma-corrected drug solution image, and arrange the relative yellow phase parameters according to the row and column coordinates of the pixels to obtain the relative yellow phase components of the drug solution in matrix form.
[0012] Furthermore, step S3, based on the relative yellow phase component of the medicinal solution, extracts the anti-false yellowing feature vector of the medicinal solution, which also includes: S36: Mark the pixels with a relative yellow phase parameter greater than 0 as valid positive yellow phase pixels, and generate the binary labeling result of the pixels. The binary labeling result of the pixels with valid positive yellow phase is 1, and the binary labeling result of the pixels with non-valid positive yellow phase is 0, thus obtaining the binary labeling matrix. S37: The binary label matrix is segmented into multiple connected components using a four-neighbor connected component segmentation method. The number of pixels in each connected component is counted, and the L-channel color component gradient of the pixels in each connected component is calculated. The maximum L-channel color component gradient of the pixels in each connected component is selected as the region gradient of the connected component. S38: Mark connected regions with a number of pixels lower than a preset pixel area threshold and a region gradient higher than a preset gradient threshold as pseudo yellow patches, set the relative yellow phase parameter of all pixels in the pseudo yellow patches to invalid values, set connected regions not marked as pseudo yellow patches as valid connected regions, and count the total number of pixels in the valid connected regions as the number of valid pixels. S39: Extract the non-invalid relative yellow phase parameters from the relative yellow phase component of the drug solution and sort them in ascending order to obtain the relative yellow phase parameter sequence. Calculate the sequence mean, 95th percentile, and effective pixel ratio of the relative yellow phase parameter sequence. Concatenate the calculation results to obtain the anti-slip yellowing feature vector of the drug solution. The effective pixel ratio is the ratio between the number of effective pixels and the sequence length of the relative yellow phase parameter sequence.
[0013] Further, in step S4, the anti-yellowing feature vector of the drug solution is compared with a preset yellowing discrimination threshold for over-limit discrimination, including: S41: Obtain the preset yellowing discrimination threshold, which includes the yellowing mean threshold, the yellowing 95th percentile threshold, and the effective proportion threshold. S42: The sequence mean, 95th percentile, and effective pixel ratio in the anti-yellowing feature vector of the drug solution are compared with the yellow phase mean threshold, the yellow phase 95th percentile threshold, and the effective proportion threshold in sequence. If the sequence mean is less than the yellow phase mean threshold, the 95th percentile is less than the yellow phase 95th percentile threshold, and the effective pixel ratio is less than the effective proportion threshold, then the current yellowing state of the radiopharmaceutical is determined to be qualified and without abnormality; otherwise, the current radiopharmaceutical is determined to have a slight yellowing abnormality.
[0014] The present invention also provides an edge-cloud collaborative radiopharmaceutical production line abnormality identification system, which includes an edge acquisition terminal and a cloud-based intelligent discrimination platform to realize the technical steps of the edge-cloud collaborative radiopharmaceutical production line abnormality identification method described above.
[0015] Compared with existing technologies, this invention proposes a method and system for identifying abnormal states in a radiopharmaceutical production line using an end-to-cloud collaborative approach. This technology has the following beneficial effects: First, this invention achieves color restoration correction of the liquid image by matching and compensating correction coefficients pixel by pixel and channel by channel, and adds upper and lower limits constraints on the color value range, effectively solving the problem of dual distortion of color and brightness caused by uneven local transmission of lead glass. Specifically, pixel-by-pixel correction differs from the traditional global uniform correction scheme, and can accurately adapt to the differences in light loss at different positions of the observation window, eliminating the false yellow base of the image; the boundary truncation of the value range constraint on the pixel product result avoids value overflow or negative pixel generation after correction. Furthermore, after correction, the liquid image is stripped of all optical interference from the protective optical path, and the RGB values only reflect the true color of the liquid, avoiding misjudgment of yellowing caused by hardware distortion from the source, improving the reliability of subsequent extraction of the relative yellow phase component of the liquid and feature statistics, and reducing the probability of missed detection and false detection of slight yellowing anomalies in radioactive drugs.
[0016] Meanwhile, this invention relies on standardized color space conversion and an adaptive pseudo-yellow removal algorithm to achieve accurate and interference-resistant extraction of yellowing features of pharmaceutical solutions. Specifically, this invention eliminates color shifts in fixed optical paths and bottle substrates through the row median difference method, overcoming the drawbacks of traditional direct interpretation using b-channel color components which is easily affected by imaging environment interference, and accurately extracts the true yellowing information of pharmaceutical solutions. At the same time, it combines the dual criteria of connected region area and brightness gradient to specifically remove pseudo-yellow patches with small size and abrupt brightness changes, effectively filtering out misjudgment interference caused by optical path refraction and imaging defects at liquid surface boundaries. By constructing feature vectors using three-dimensional indicators of mean, 95th percentile, and effective proportion, it covers different slight yellowing conditions such as overall yellowing, localized severe yellowing, and continuous yellowing from multiple dimensions, avoiding the limitations of single feature detection. This processing method significantly improves the robustness of yellowing features, effectively reduces the probability of false detection and false negative detection of slight yellowing of radioactive drugs, adapts to the complex imaging environment of hot chambers, and provides accurate and reliable quantitative feature support for cloud-based collaborative intelligent detection on the production line. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating an abnormal status identification method for a radiopharmaceutical production line using edge-cloud collaboration, as provided in an embodiment of the present invention.
[0018] Figure 2 This is a structural diagram of an edge-cloud collaborative radiopharmaceutical production line abnormality identification system provided in an embodiment of the present invention.
[0019] Figure 3 This is an experimental comparison diagram provided for one embodiment of the present invention. Detailed Implementation
[0020] The realization of the objectives, functional characteristics, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0021] This invention provides a method and system for identifying abnormal states in a radiopharmaceutical production line using an end-to-cloud collaborative approach. The execution entity of this method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this invention: a server, a terminal, or other similar device. In other words, this method can be executed by software or hardware installed on a terminal device or a server device, where the software may be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster.
[0022] Reference Figure 1 Embodiment 1 of the present invention is as follows: A method for identifying abnormal states in a cloud-based, edge-to-edge radiopharmaceutical production line includes the following steps: S1: Collect multi-source imaging data of the drug production line during the production process of radiopharmaceuticals, and sequentially perform dark field noise cancellation, effective area cropping of drug solution, and structured encapsulation processing on the multi-source imaging data of the drug production line to obtain a composite image matrix of radiopharmaceuticals under the radiopharmaceutical production line.
[0023] Specifically, the multi-source imaging data of the drug production line in step S1 includes finished images of drug bottles containing radioactive drugs in the radioactive drug production line, neutral reference images, remote dark field images, and coordinates of the drug liquid area. The finished images of drug bottles, neutral reference images, and remote dark field images are all RGB pixel matrices.
[0024] As an embodiment of the present invention, the neutral reference image and the remote dark field image are both standard images updated daily; By closing the camera optical path and using uniform camera parameters before starting the production line each day, multiple frames of dark scenes are continuously acquired and averaged to obtain remote dark field images. These remote dark field images record the inherent dark current and baseline noise of the camera sensor, which serve as the reference data for uniformly offsetting the noise in the work area for all subsequent real-world shots and finished images of medicine bottles. Furthermore, under standard lighting conditions, a robotic arm is used to place an unbiased neutral reference sheet at the finished product shooting station of the liquid bottle. A neutral reference image is obtained by shooting using a unified optical path and camera parameters. The neutral reference image only retains the color shift and light transmission loss caused by the lead glass and lens, and does not contain the color information of the liquid. It is used to solve the color compensation coefficient of the entire observation optical path in reverse, and then construct the compensation correction matrix. The finished product of the dispensed and sealed medicine bottle is delivered to the shooting station by a robotic arm. The finished product image of the medicine bottle is captured by using a unified optical path and camera parameters. The liquid level boundary of the bottle is identified by an image recognition algorithm as the coordinate of the medicine area. Specifically, the dispensed and sealed medicine bottle type of the radioactive drug is a transparent vial. Specifically, the recognition process of the image recognition algorithm is as follows: The finished image of the medicine bottle is processed into grayscale; a grayscale threshold is set to separate the transparent bottle from the background area; binarization noise reduction filtering is performed to remove minor noise from the image; then, the target contour of the medicine bottle with area matching is screened through 8-connected component detection; polygon fitting is performed on the target contour to obtain the outer boundary of the bottle; the grayscale abrupt change position inside the contour is scanned along the vertical direction to locate the upper and lower liquid level boundaries; finally, the start and end row and start and end column pixel closed interval values of the effective liquid level area are output as the medicine area coordinates, wherein the medicine area coordinates are represented as follows: , This indicates the starting row pixel index of the effective area of the drug liquid level. This indicates the pixel index of the terminating row of the effective area for the drug liquid level. This indicates the starting column pixel index of the effective area of the drug liquid level. This indicates the pixel index of the terminating column of the effective area of the drug liquid level.
[0025] In another embodiment of the present invention, the camera sensor is a 12-bit industrial camera, and the color value range of each color channel is [value range missing]. .
[0026] Step S1 involves sequentially performing dark field noise cancellation, effective drug liquid area cropping, and structured encapsulation processing on the multi-source imaging data of the drug production line. It also includes: S11: Based on the remote dark field image, perform unified dark field noise cancellation processing on the finished product image of the medicine bottle and the neutral reference image respectively to obtain the finished product image of the medicine bottle after dark field noise cancellation and the neutral reference image after dark field noise cancellation. Specifically, the formula for uniformly canceling dark field noise in the finished product image of the medicine bottle and the neutral reference image is as follows: ; ; ; in, The image of the finished medicine bottle shows the first... Line number The color value of the pixel in the column in the k color channel. Indicating the first in the neutral reference image Line number The color value of the pixel in the column in the k color channel. Indicates the first [unclear] in a remote dark field image Line number The color value of the pixel in the column in the k color channel. This indicates the number of pixel rows in the multi-source imaging data of the pharmaceutical production line. This indicates the number of pixel columns in an image from multi-source imaging data of a pharmaceutical production line. These represent the RGB color channels respectively. Color channels, Color channels, Color channels Indicates selection The maximum value in, Indicates selection The maximum value in, This indicates the first image of the finished medicine bottle after dark field noise cancellation. Line number The color value of the pixel in the column in the k color channel. Indicates the first digit in the neutral reference image after dark field noise cancellation. Line number The color value of the pixel in the column in the k color channel; S12: Extract the drug liquid area coordinates from the multi-source imaging data of the drug production line. Based on the drug liquid area coordinates, perform drug liquid effective area cropping on the finished drug bottle image after dark field noise cancellation and the neutral reference image after dark field noise cancellation to obtain the dark field cancellation reference image and the drug bottle cropping image. Specifically, based on the coordinates of the liquid medicine area The image of the finished medicine bottle after dark field noise cancellation is preserved. Arriving at the line, number Listed to number The pixel region of the column is used as the cropped image of the medicine bottle; the pixel region of the column is retained in the neutral reference image after dark field noise cancellation. Arriving at the line, number Listed to number The pixel region of the column is used as a reference map for dark field cancellation; S13: Obtain the drug number associated with the multi-source imaging data of the drug production line, and encapsulate the drug number, dark field cancellation reference image and drug bottle cropping image into a composite image matrix.
[0027] Specifically, the composite image matrix is represented as follows: ,in This indicates the drug number, and this indicates a cutout image of the medicine bottle. This represents the baseline image for dark field cancellation.
[0028] It should be noted that the remote dark field image recording camera sensor inherently suffers from dark current, circuit baseline offset, and fixed pattern noise under no-light conditions. These types of noise are constantly superimposed in all real-world images. By performing pixel-by-pixel and channel-by-channel interpolation and constraining the lower limit to 0, the inherent noise interference at the hardware level can be uniformly eliminated, eliminating negative pixel distortion in low-light areas. This ensures that the color values in each color channel of the image retain only the true optical signals of the lead glass optical path and the medicine / reference plate, avoiding color shift calculation deviations caused by substrate noise. This provides a pure original image substrate for subsequent color compensation (corresponding to the dark field cancellation reference image and the cropped image of the medicine bottle).
[0029] Furthermore, this invention eliminates the systematic interference of camera-fixed noise on chromaticity calculation by uniformly completing dark field cancellation for two types of images, ensuring complete alignment of the noise references for the two types of images and improving the accuracy of subsequent optical path color shift correction. It also precisely crops the effective liquid level area based on the drug liquid region coordinates, removing irrelevant background pixels such as the bottle body and hot chamber support, significantly reducing the amount of invalid data computation and lowering the computational power consumption for end-to-cloud transmission and cloud processing. Finally, it uniformly encapsulates the drug number, dark field cancellation reference image, and cropped image of the drug bottle into a standardized composite matrix, enabling one-to-one binding of the image data of a single bottle of drug liquid with the product identity. This prevents image-sample mismatch issues during subsequent end-to-cloud transmission and parsing, ensuring full traceability of the data link.
[0030] S2: Extract the dark field cancellation reference map and the cropped image of the medicine bottle from the composite image matrix. Calculate the channel gain of each pixel in the cropped image of the medicine bottle based on the dark field cancellation reference map. Convert the channel gain of each pixel into a compensation correction matrix. Use the compensation correction matrix to perform color compensation correction processing on the cropped image of the medicine bottle to obtain the corrected medicine image.
[0031] Specifically, in step S2, the channel gain of each pixel in the cropped image of the medicine bottle is calculated based on the dark field cancellation reference map, and the channel gain of each pixel is converted into a compensation correction matrix, including: S21: Based on the preset standard neutral chromaticity and standard luminance, the target value of the neutral reference ideal three channels is calculated; Specifically, the preset standard neutral chromaticity is an sRGB / ITU-R BT.709 standard luminance weighting coefficient, characterizing the three-channel chromaticity ratio of a neutral white reference film under D65 standard white light, representing the luminance contribution ratio of the R, G, and B color channels under ideal conditions for a pure white unbiased neutral reference film. The preset standard neutral chromaticity is... , The values were set to 0.2126, 0.7152, and 0.0722 respectively. The default setting for standard brightness was 2048 (corresponding to a 12-bit industrial camera). Standard brightness represents the nominal brightness value of a pure white unbiased neutral reference film under a standard optical path. The neutral benchmark ideal three-channel target value The calculation formula is: ; in, These represent the target values for the neutral reference ideal R, G, and B color channels, respectively. Indicates standard brightness; S22: Calculate the brightness value of any pixel in the brightness channel of the dark field cancellation reference image using the standard brightness calculation formula; S23: Based on the neutral reference ideal three-channel target value, calculate the channel gain of any pixel in the dark field cancellation reference image in the RGB color channel and the luminance channel; Specifically, the formula for calculating the channel gain of any pixel in the dark field cancellation reference image in the RGB color channel and the luminance channel is as follows: ; ; ; in, Dark field cancellation reference map The channel gain of the pixel in the nth row and mth column in the k color channel. This represents the target value of the k color channel calculated in step S21. N represents the number of pixel rows in the dark-field cancellation reference image and the cropped image of the medicine bottle, and M represents the number of pixel columns in the dark-field cancellation reference image and the cropped image of the medicine bottle. Dark field cancellation reference map The channel gain of the pixel in the nth row and mth column in the luminance channel. Indicate extraction The maximum value in, Indicate extraction The maximum value in, Dark field cancellation reference map The color value of the pixel in the nth row and mth column in the k color channel. Dark field cancellation reference map The brightness value of the pixel in the nth row and mth column in the brightness channel. The following are the reference maps for dark field cancellation, respectively. The color value of the pixel in the nth row and mth column in the RGB color channel. This represents the standard luminance calculation formula; S24: Construct a three-channel compensation correction coefficient for the channel gain of the pixel in the RGB color channel and the luminance channel, wherein the three-channel compensation correction coefficient includes the R color channel compensation correction coefficient, the G color channel compensation correction coefficient and the B color channel compensation correction coefficient; Calculate the three-channel compensation correction coefficient of any pixel in the dark field cancellation reference image to construct a compensation correction matrix.
[0032] Specifically, the dark field cancellation reference map The formula for constructing the three-channel compensation and correction coefficients for the nth row and mth column pixel is as follows: ; ; ; ; in, Dark field cancellation reference map The three-channel compensation correction coefficients for the pixel in the nth row and mth column. The three-channel compensation and correction coefficients are represented sequentially. The compensation and correction coefficients for the R color channel, G color channel, and B color channel.
[0033] Furthermore, the color channel compensation coefficient quantifies the RGB color shift ratio and light transmission attenuation ratio caused by the thermal chamber lead glass, observation window, and camera lens at the corresponding color channel and pixel position by fusing the color channel gain and luminance channel gain of the color channel. This coefficient uses ideal neutral white light as a reference to characterize the degree of distortion of the measured color and luminance of the current optical path pixel relative to the standard neutral value. It should be noted that this invention adopts the industry-standard color weighting matching for industrial imaging, and calculates the neutral reference ideal three-channel target value with a fixed standard brightness. The calibration benchmark is unified and can be used across different production lines and equipment. The lower limit constraint of 1 is set for pixel brightness and RGB channel to avoid the gain value explosion caused by the denominator approaching zero in low transmission areas, and to ensure that the gain calculation of the whole image is stable and without abnormal values. Then, the single-channel color gain and brightness gain are multiplied and fused to simultaneously correct color shift and brightness attenuation, taking into account both color and brightness optical path interference. Finally, a pixel-by-pixel compensation and correction matrix that perfectly matches the size of the medicine liquid cropped image is generated to achieve accurate compensation for local light transmission differences in lead glass. This solves the defect that traditional global uniform correction cannot adapt to uneven glass transmission, greatly reduces the false yellowing interference caused by the optical path, provides a distortion-free pure medicine liquid image for subsequent yellowing variable calculation, and improves the accuracy of slight yellowing recognition.
[0034] Step S2 involves using a compensation and correction matrix to perform color compensation and correction processing on the cropped image of the medicine bottle, and also includes: Extract the compensation correction matrix and the cropped image of the medicine bottle. Use the three-channel compensation correction coefficients in the compensation correction matrix to perform color compensation correction on the color values of the pixels in the RGB color channels of the cropped image of the medicine bottle, obtaining the corrected medicine image. The color compensation correction formula is as follows: ; ; in, This represents the color value of the pixel in the nth row and mth column of the cropped image of the medicine bottle in the k color channel. N represents the number of pixel rows in the dark-field cancellation reference image and the cropped image of the medicine bottle, and M represents the number of pixel columns in the dark-field cancellation reference image and the cropped image of the medicine bottle. This represents the k-channel compensation correction coefficient for the pixel in the nth row and mth column of the dark field cancellation reference image. Indicates the range of color values; default setting. =0, It is 4095. Indicates selection The maximum value between Indicates selection The minimum value between Indicates color value The results of color compensation and correction processing.
[0035] S3: Convert the corrected medicine liquid image to the CIELab color space and calculate the relative yellow phase component of the medicine liquid. Based on the relative yellow phase component of the medicine liquid, extract the anti-slip yellowing feature vector of the medicine liquid.
[0036] Specifically, step S3 involves converting the corrected medicinal liquid image to the CIELab color space and calculating the relative yellow component of the medicinal liquid, including: S31: Normalize the color values of the pixels in the RGB color channel of the corrected medicine liquid image, and perform gamma correction on the normalized color values using the gamma inverse linear correction method to obtain the gamma-corrected medicine liquid image. Specifically, the color value The normalization formula is: ,in The formula for gamma correction is: ; in, Indicates color value The gamma correction processing results; S32: The RGB-XYZ-CIELab standard conversion algorithm is used to map and convert the color values of pixels in the gamma-corrected drug liquid image to the CIELab color space, obtaining the color components of the pixels in the Lab channel. The color components of the L channel represent the brightness of the pixel, the color components of the a channel represent the red and green tone shifts, the a channel color components take positive values to be redder and negative values to be greener, the b channel color components represent the yellow and blue tone shifts, take positive values and the larger the positive value, the stronger the yellow tone; S33: Statistical analysis of the median color component of each row of pixels in the b channel of the gamma-corrected drug solution image; S34: Calculate the difference between the color component of a pixel in the b channel and the median of the color component of the row in which the pixel is located in the gamma-corrected drug solution image, and use it as the relative yellow phase parameter of the pixel; S35: Statistically calculate the relative yellow phase parameters of any pixel in the gamma-corrected drug solution image, and arrange the relative yellow phase parameters according to the row and column coordinates of the pixels to obtain the relative yellow phase components of the drug solution in matrix form.
[0037] Specifically, by using the median of the color components in the b-channel of the transparent bottle wall at the same horizontal level, the difference between the color component of the pixel in the b-channel and the median of the color component in the row where the pixel is located is calculated. This eliminates the common base false yellow caused by bottle material, residual light path color shift, and uneven inter-row illumination, leaving only the differentiated yellow phase information of the liquid inside the bottle as the relative yellow phase parameter of the pixel. This relative yellow phase parameter can directly quantify the true yellowing degree of the liquid in the pixel area, and can fundamentally distinguish between the false yellowing caused by lead glass transmission and bottle wall refraction and the true slight yellowing caused by liquid degradation and impurities, thus obtaining a pure and standardized relative yellow phase component of the liquid.
[0038] Step S3, based on the relative yellow phase component of the medicinal solution, extracts the anti-false yellowing feature vector of the medicinal solution, and also includes: S36: Mark the pixels with a relative yellow phase parameter greater than 0 as valid positive yellow phase pixels, and generate the binary labeling result of the pixels. The binary labeling result of the pixels with valid positive yellow phase is 1, and the binary labeling result of the pixels with non-valid positive yellow phase is 0, thus obtaining the binary labeling matrix. S37: The binary label matrix is segmented into multiple connected components using a four-neighbor connected component segmentation method. The number of pixels in each connected component is counted, and the L-channel color component gradient of the pixels in each connected component is calculated. The maximum L-channel color component gradient of the pixels in each connected component is selected as the region gradient of the connected component. Specifically, the formula for calculating the gradient of the L channel color component of the pixel in the nth row and mth column of the gamma-corrected drug solution image is as follows: ; in, This represents the L-channel color component gradient of the pixel in the nth row and mth column of the gamma-corrected drug solution image. This represents the color component of the pixel in the nth row and mth column of the gamma-corrected drug solution image in the L channel. This represents the color component of the pixel in the nth row and m+1th column of the gamma-corrected drug solution image in the L channel. This represents the color component of the pixel in the (n+1)th row and mth column of the gamma-corrected drug solution image in the L channel; S38: Mark connected regions with a number of pixels lower than a preset pixel area threshold and a region gradient higher than a preset gradient threshold as pseudo yellow patches, set the relative yellow phase parameter of all pixels in the pseudo yellow patches to invalid values, set connected regions not marked as pseudo yellow patches as valid connected regions, and count the total number of pixels in the valid connected regions as the number of valid pixels. Specifically, the preset pixel area threshold is set to 25 pixels by default, and the preset gradient threshold is set to 6 by default. The pseudo-yellow patches are clusters of pseudo-yellowed pixels formed by the refraction and transmission of light from the lead glass optical path, the transparent vial wall, and the liquid surface boundary. They are not real yellowing caused by the degradation of the radioactive drug solution itself or the precipitation of impurities. Pseudo-yellow patches are generally small in size and have drastic changes in pixel brightness, which will raise the average yellowing value and interfere with the determination of yellowing. They need to be removed in advance to avoid misjudging the imaging optical defects as abnormal drug quality. S39: Extract the non-invalid relative yellow phase parameters from the relative yellow phase component of the drug solution and sort them in ascending order to obtain the relative yellow phase parameter sequence. Calculate the sequence mean, 95th percentile, and effective pixel ratio of the relative yellow phase parameter sequence. Concatenate the calculation results to obtain the anti-slip yellowing feature vector of the drug solution. The effective pixel ratio is the ratio between the number of effective pixels and the sequence length of the relative yellow phase parameter sequence.
[0039] Specifically, the anti-yellowing feature vector is a multi-dimensional quantitative feature set composed of the mean yellow phase, 95th percentile, and effective pixel ratio after removing the tiny pseudo-yellowing patches formed by refraction and transmission at the edge of the bottle wall. It respectively characterizes the overall yellowing level of the medicine, the extreme value of local severe yellowing, and the distribution ratio of effective yellowing areas. It comprehensively and stably depicts the overall state of slight yellowing of the medicine and is the core quantitative basis for accurately judging the abnormal yellowing of medicine.
[0040] S4: The anti-fake yellowing feature vector of the drug solution is compared with the preset yellowing discrimination threshold to determine if it exceeds the limit, and the yellowing abnormality judgment result of the radiopharmaceutical associated with the anti-fake yellowing feature vector is generated.
[0041] Specifically, step S4 involves performing an over-limit judgment on the anti-yellowing feature vector of the drug solution against a preset yellowing discrimination threshold, including: S41: Obtain the preset yellowing discrimination threshold, which includes the yellowing mean threshold, the yellowing 95th percentile threshold, and the effective proportion threshold. As one embodiment of the present invention, the present invention collects a large number of manually verified normal radioactive drug liquid samples and slightly yellowed unqualified samples from a radioactive drug production line. Following the aforementioned unified preprocessing, color correction, and anti-slip yellowing feature extraction process, the invention batch calculates the sequence mean, 95th percentile, and effective pixel ratio of all samples. Combined with the feature offset interval of unqualified samples, the invention determines the critical boundary that can distinguish between normal background color fluctuations and true yellowing of the drug liquid, forming the optimal segmentation threshold that can distinguish between normal radioactive drug liquid samples and slightly yellowed unqualified samples. This threshold is used as the preset yellowing discrimination threshold, achieving online unsupervised, fully automatic, and stable discrimination, avoiding subjective bias of manual thresholds, and adapting to scenarios with small fluctuations in the production line's optical path, batch, and equipment.
[0042] S42: The sequence mean, 95th percentile, and effective pixel ratio in the anti-yellowing feature vector of the drug solution are compared with the yellow phase mean threshold, the yellow phase 95th percentile threshold, and the effective proportion threshold in sequence. If the sequence mean is less than the yellow phase mean threshold, the 95th percentile is less than the yellow phase 95th percentile threshold, and the effective pixel ratio is less than the effective proportion threshold, then the current yellowing state of the radiopharmaceutical is determined to be qualified and without abnormality; otherwise, the current radiopharmaceutical is determined to have a slight yellowing abnormality.
[0043] Example 2: As another embodiment of the present invention, refer to as follows Figure 2 The diagram shows a structure of an edge-cloud collaborative radiopharmaceutical production line abnormality identification system. The system mainly consists of two parts: an edge acquisition terminal and a cloud-based intelligent discrimination platform, to realize the technical steps of the edge-cloud collaborative radiopharmaceutical production line abnormality identification method as described in Example 1. The edge acquisition terminal mainly completes front-end preprocessing tasks such as real-time acquisition of multi-source imaging data of radiopharmaceutical production line, dark field noise cancellation, effective area cropping of drug liquid, and structured encapsulation of composite image matrix. It is responsible for outputting standardized composite image matrix with unified format, noise removal, and precise area, realizing real-time purification and lightweight preprocessing of raw imaging data, avoiding the transmission pressure caused by the uploading of massive raw images and the problem of insufficient equipment computing power under radiation environment. The cloud-based intelligent discrimination platform receives composite image matrices uploaded by edge terminals and sequentially performs baseline image gain calculation, pixel-by-pixel optical path color compensation and correction, CIELab color space conversion, solution of the relative yellow phase component of the drug liquid, removal of false yellow patches, extraction of feature vectors for suppressing false yellowing, and multi-threshold yellowing over-limit discrimination. It completes high-precision, high-computing-power-consuming color restoration and subtle yellowing intelligent recognition tasks, and returns the final drug yellowing anomaly judgment result to the edge acquisition terminal to realize real-time early warning and sorting of the production line.
[0044] This system employs a hierarchical edge-cloud collaborative computing architecture, where the edge handles data acquisition and lightweight preprocessing, while the cloud handles high-precision algorithm computation and intelligent discrimination. This architecture leverages the real-time advantages of the edge to ensure production line inspection speed while utilizing the cloud's high computing power and high-precision model advantages to accurately identify subtle yellowing. It effectively adapts to special production scenarios where radioactive drugs face strong interference from hot chamber imaging, high accuracy requirements, and limited on-site equipment, enabling automated, high-precision, and highly stable edge-cloud collaborative detection of abnormal drug conditions on the production line.
[0045] Example 3: This invention collected 1200 sets of radiopharmaceutical imaging samples from a radiopharmaceutical production line, including four scenarios: qualified drug solution, slightly yellowed unqualified drug solution, false yellowing due to bottle wall refraction, and color difference due to lead glass light transmission. The results were compared with the traditional global color correction method that directly interprets the b-channel color component in terms of four indicators: accuracy of yellowing detection, false yellowing false detection rate, and average detection time per bottle. (See reference below.) Figure 3 The experimental comparison diagram shows that, compared with the traditional method, the method of the present invention improves the accuracy of yellowing identification by 22.6%, reduces the false detection rate of slight yellowing by 78.3%, reduces the false detection rate of false yellowing by 81.5%, and reduces the average detection time per bottle by 43.2%. It has significant technical advantages and practical value in the radioactive pharmaceutical detection scenario where there is strong interference in hot chamber imaging and the yellowing of drugs is extremely weak.
[0046] It should be noted that the terms "comprising," "including," or any other variations thereof used herein are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0047] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0048] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for identifying abnormal states in a radiopharmaceutical production line using edge-cloud collaboration, characterized in that, The method includes: S1: Collect multi-source imaging data of the drug production line during the production process of radiopharmaceuticals, and sequentially perform dark field noise cancellation, effective area cropping of drug liquid, and structured encapsulation processing on the multi-source imaging data of the drug production line to obtain a composite image matrix of radiopharmaceuticals under the radiopharmaceutical production line. S2: Extract the dark field cancellation reference map and the cropped image of the medicine bottle from the composite image matrix. Calculate the channel gain of each pixel in the cropped image of the medicine bottle based on the dark field cancellation reference map. Convert the channel gain of each pixel into a compensation correction matrix. Use the compensation correction matrix to perform color compensation correction processing on the cropped image of the medicine bottle to obtain the corrected medicine image. S3: Convert the corrected medicine liquid image to the CIELab color space, calculate the relative yellow phase component of the medicine liquid, and extract the anti-slip yellowing feature vector of the medicine liquid based on the relative yellow phase component of the medicine liquid; S4: The anti-fake yellowing feature vector of the drug solution is compared with the preset yellowing discrimination threshold to determine if it exceeds the limit, and the yellowing abnormality judgment result of the radiopharmaceutical associated with the anti-fake yellowing feature vector is generated.
2. The method for identifying abnormal states in a radiopharmaceutical production line using edge-cloud collaboration as described in claim 1, characterized in that, In step S1, the multi-source imaging data of the drug production line includes finished images of the drug liquid bottles, neutral reference images, remote dark field images, and drug liquid area coordinates in the radiopharmaceutical production line. The finished images of the drug liquid bottles, neutral reference images, and remote dark field images are all RGB pixel matrices.
3. The method for identifying abnormal states in a cloud-edge collaborative radiopharmaceutical production line as described in claim 2, characterized in that, Step S1 involves sequentially performing dark field noise cancellation, effective drug liquid area cropping, and structured encapsulation processing on the multi-source imaging data of the drug production line. It also includes: S11: Based on the remote dark field image, perform unified dark field noise cancellation processing on the finished product image of the medicine bottle and the neutral reference image respectively to obtain the finished product image of the medicine bottle after dark field noise cancellation and the neutral reference image after dark field noise cancellation. S12: Extract the drug liquid area coordinates from the multi-source imaging data of the drug production line. Based on the drug liquid area coordinates, perform drug liquid effective area cropping on the finished drug bottle image after dark field noise cancellation and the neutral reference image after dark field noise cancellation to obtain the dark field cancellation reference image and the drug bottle cropping image. S13: Obtain the drug number associated with the multi-source imaging data of the drug production line, and encapsulate the drug number, dark field cancellation reference image and drug bottle cropping image into a composite image matrix.
4. The method for identifying abnormal states in a radiopharmaceutical production line using edge-cloud collaboration as described in claim 1, characterized in that, In step S2, the channel gain of each pixel in the cropped image of the medicine bottle is calculated based on the dark field cancellation reference map, and the channel gain of each pixel is converted into a compensation correction matrix, including: S21: Based on the preset standard neutral chromaticity and standard luminance, the target value of the neutral reference ideal three channels is calculated; S22: Calculate the brightness value of any pixel in the brightness channel of the dark field cancellation reference image using the standard brightness calculation formula; S23: Based on the neutral reference ideal three-channel target value, calculate the channel gain of any pixel in the dark field cancellation reference image in the RGB color channel and the luminance channel; S24: Construct a three-channel compensation correction coefficient for the channel gain of the pixel in the RGB color channel and the luminance channel, wherein the three-channel compensation correction coefficient includes the R color channel compensation correction coefficient, the G color channel compensation correction coefficient and the B color channel compensation correction coefficient; Calculate the three-channel compensation correction coefficient of any pixel in the dark field cancellation reference image to construct a compensation correction matrix.
5. The method for identifying abnormal states in a radiopharmaceutical production line using end-to-end cloud collaboration as described in claim 4, characterized in that, Step S2 involves using a compensation and correction matrix to perform color compensation and correction processing on the cropped image of the medicine bottle, and also includes: Extract the compensation correction matrix and the cropped image of the medicine bottle. Use the three-channel compensation correction coefficients in the compensation correction matrix to perform color compensation correction on the color values of the pixels in the RGB color channels of the cropped image of the medicine bottle, obtaining the corrected medicine image. The color compensation correction formula is as follows: ; ; in, This represents the color value of the pixel in the nth row and mth column of the cropped image of the medicine bottle in the k color channel. N represents the number of pixel rows in the dark-field cancellation reference image and the cropped image of the medicine bottle, and M represents the number of pixel columns in the dark-field cancellation reference image and the cropped image of the medicine bottle. This represents the k-channel compensation correction coefficient for the pixel in the nth row and mth column of the dark field cancellation reference image. Indicates the range of color values. Indicates selection The maximum value between Indicates selection The minimum value between Indicates color value The results of color compensation and correction processing.
6. The method for identifying abnormal states in a radiopharmaceutical production line using end-to-cloud collaboration as described in claim 1, characterized in that, In step S3, the corrected medicinal liquid image is converted to the CIELab color space, and the relative yellow component of the medicinal liquid is calculated, including: S31: Normalize the color values of the pixels in the RGB color channel of the corrected medicine liquid image, and perform gamma correction on the normalized color values using the gamma inverse linear correction method to obtain the gamma-corrected medicine liquid image. S32: The RGB-XYZ-CIELab standard conversion algorithm is used to map and convert the color values of pixels in the gamma-corrected drug liquid image to the CIELab color space to obtain the color components of the pixels in the Lab channel. S33: Statistical analysis of the median color component of each row of pixels in the b channel of the gamma-corrected drug solution image; S34: Calculate the difference between the color component of a pixel in the b channel and the median of the color component of the row in which the pixel is located in the gamma-corrected drug solution image, and use it as the relative yellow phase parameter of the pixel; S35: Statistically calculate the relative yellow phase parameters of any pixel in the gamma-corrected drug solution image, and arrange the relative yellow phase parameters according to the row and column coordinates of the pixels to obtain the relative yellow phase components of the drug solution in matrix form.
7. The method for identifying abnormal states in a radiopharmaceutical production line using end-to-end cloud collaboration as described in claim 6, characterized in that, Step S3, based on the relative yellow phase component of the medicinal solution, extracts the anti-false yellowing feature vector of the medicinal solution, and also includes: S36: Mark the pixels with a relative yellow phase parameter greater than 0 as valid positive yellow phase pixels, and generate the binary labeling result of the pixels. The binary labeling result of the pixels with valid positive yellow phase is 1, and the binary labeling result of the pixels with non-valid positive yellow phase is 0, thus obtaining the binary labeling matrix. S37: The binary label matrix is segmented into multiple connected components using a four-neighbor connected component segmentation method. The number of pixels in each connected component is counted, and the L-channel color component gradient of the pixels in each connected component is calculated. The maximum L-channel color component gradient of the pixels in each connected component is selected as the region gradient of the connected component. S38: Mark connected regions with a number of pixels lower than a preset pixel area threshold and a region gradient higher than a preset gradient threshold as pseudo yellow patches, set the relative yellow phase parameter of all pixels in the pseudo yellow patches to invalid values, set connected regions not marked as pseudo yellow patches as valid connected regions, and count the total number of pixels in the valid connected regions as the number of valid pixels. S39: Extract the non-invalid relative yellow phase parameters from the relative yellow phase component of the drug solution and sort them in ascending order to obtain the relative yellow phase parameter sequence. Calculate the sequence mean, 95th percentile, and effective pixel ratio of the relative yellow phase parameter sequence. Concatenate the calculation results to obtain the anti-slip yellowing feature vector of the drug solution. The effective pixel ratio is the ratio between the number of effective pixels and the sequence length of the relative yellow phase parameter sequence.
8. The method for identifying abnormal states in a radiopharmaceutical production line using end-to-cloud collaboration as described in claim 1, characterized in that, Step S4 involves performing an over-limit judgment on the anti-yellowing feature vector of the drug solution against a preset yellowing discrimination threshold, including: S41: Obtain the preset yellowing discrimination threshold, which includes the yellowing mean threshold, the yellowing 95th percentile threshold, and the effective proportion threshold. S42: The sequence mean, 95th percentile, and effective pixel ratio in the anti-yellowing feature vector of the drug solution are compared with the yellow phase mean threshold, the yellow phase 95th percentile threshold, and the effective proportion threshold in sequence. If the sequence mean is less than the yellow phase mean threshold, the 95th percentile is less than the yellow phase 95th percentile threshold, and the effective pixel ratio is less than the effective proportion threshold, then the current yellowing state of the radiopharmaceutical is determined to be qualified and without abnormality; otherwise, the current radiopharmaceutical is determined to have a slight yellowing abnormality.
9. The edge-cloud collaborative radiopharmaceutical production line abnormality identification system as described in claim 1, characterized in that, The radiopharmaceutical production line abnormality identification system includes an edge acquisition terminal and a cloud-based intelligent discrimination platform to implement the technical steps of the end-to-cloud collaborative radiopharmaceutical production line abnormality identification method as described in any one of claims 1-8.
Citation Information
Patent Citations
An intelligent detection method and system for drug ingredients and drug quality
CN119269701B