Gastrointestinal medical image transmission visualization system for collaborative auxiliary detection
By constructing a prediction window path in gastrointestinal medical images and using local similarity for prediction coding, the problems of low transmission efficiency and high distortion rate of gastrointestinal medical images in the prior art are solved, and efficient and accurate image transmission is achieved.
Patent Information
- Application Number
- CN202411354926.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-09-27
AI Technical Summary
The existing lossless compression technology has a small compression ratio for gastrointestinal medical images, resulting in low transmission efficiency, while lossy compression technology can easily lead to image distortion and affect the coordinated diagnosis results.
The gastrointestinal medical images are divided by windows of different sizes many times, and the predictive cost-effective parameters are obtained based on the difference in grayscale values of windows between adjacent frames, and the prediction window path is constructed, and the prediction encoding compression is used to improve compression efficiency and reduce distortion rate. .
It achieves higher compression ratio and lower distortion rate, improves the transmission efficiency of medical images, and meets the requirements of high real-time and high accuracy of collaborative diagnosis.
Smart Images

Figure CN118890488B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image communication, and in particular to a gastrointestinal medical image transmission visualization system for collaborative auxiliary detection. Background Art
[0002] Image communication is a method of transmitting image information using digital communication technology. In image communication, image data is encoded and compressed, and then transmitted to the receiving end through the network or other communication channels. The receiving end restores the image by decompression. Image communication technology is needed in the process of medical image visualization. For example, when performing collaborative diagnosis of the gastrointestinal tract, it is necessary to collect gastrointestinal medical images of patients, encode and compress the acquired medical images, and transmit them through communication.
[0003] Existing lossless compression technologies, such as Huffman coding and run-length coding, have a low compression ratio for images, resulting in low efficiency of the encoded and compressed image data during transmission. If the transmission efficiency is to be improved, lossy compression technologies such as predictive coding and fractal coding must be used. However, image data is prone to distortion after lossy compression, which affects the collaborative diagnosis results and leads to inaccurate diagnosis results.
[0004] Furthermore, when gastrointestinal medical images are transmitted for collaborative diagnosis, the medical image data is usually compressed using existing predictive coding methods and then transmitted using a communication network. However, when the medical image data is compressed using inter-frame predictive coding, there are high similarity features between local regions of different frames in the gastrointestinal medical images. Conventional inter-frame predictive coding only processes the entire image data, ignoring the similarity of local regions between image data, so that the compression ratio still needs to be improved in order to better optimize the coding and transmission efficiency of gastrointestinal medical images during visual collaborative processing. Summary of the invention
[0005] The present invention provides a gastrointestinal medical image transmission visualization system for collaborative auxiliary detection to solve the existing problems.
[0006] The gastrointestinal medical image transmission visualization system for collaborative auxiliary detection of the present invention adopts the following technical solutions:
[0007] The present invention provides a gastrointestinal medical image transmission visualization system for collaborative auxiliary detection, which includes the following modules:
[0008] Image data acquisition module: obtaining grayscale gastrointestinal medical images and recording them as gastrointestinal medical grayscale images;
[0009] Data prediction coding module: divide the gastrointestinal medical grayscale image into several windows of different sizes, and obtain the predicted cost-effectiveness parameter according to the difference in the grayscale values of the windows between adjacent frames; obtain the window corresponding to the maximum predicted cost-effectiveness parameter; record any window in the first target frame image as the first target window, and record any window in the second target frame image as the second target window, and obtain the deviation weight according to the difference in grayscale values between the first target window and the second target window; obtain the grayscale value similarity gap according to the difference in grayscale value of the pixel point in any window in the second target frame image and the average grayscale value of the first target window; obtain the grayscale value similarity gap according to the deviation weight and grayscale value similarity; similarity between the first target window and the second target window is recorded as the first similarity; similarity between the second target window and windows other than the first target window is recorded as the second similarity; similarity between the first target window and windows other than the second target window is recorded as the third similarity; matching rate is obtained according to the first similarity, the second similarity and the third similarity; the second target window with the maximum matching rate with the first target window is recorded as the best matching window; predictive coding and compression are performed on the gastrointestinal medical grayscale image according to the path composed of several best matching windows to obtain the encoded gastrointestinal medical grayscale image data, which is recorded as compressed data;
[0010] Recording a gastrointestinal medical grayscale image of any frame as a first target frame image, and recording a gastrointestinal medical grayscale image of the next frame of the first target frame image as a second target frame image;
[0011] Data transmission module: transmits compressed data;
[0012] Data decoding module: decodes the received compressed data;
[0013] Visualization and collaborative diagnosis module: displays the decoded gastrointestinal medical grayscale image data and realizes collaborative diagnosis of gastrointestinal medical images.
[0014] Furthermore, the step of obtaining the predicted cost-performance ratio parameter according to the difference in the grayscale values of the windows between adjacent frames includes the following specific steps:
[0015] The gray value variance of each pixel in each window is obtained, the mean of the gray value variance of all windows is recorded as the first mean, the correlation variation coefficient is obtained according to the difference between the first means of adjacent frames, and the predicted cost performance parameter is obtained according to the correlation variation coefficient and the gray value variance of the window.
[0016] Furthermore, the predicted cost performance parameter is obtained as follows:
[0017] Prediction cost performance parameter of the tth window The method to obtain is:
[0018]
[0019] in, Indicates the n+1th frame of the gastrointestinal medical grayscale image. The gray value variance of the pixels in the window is represents the gray value variance of the pixel point in the t-th window in the n-1-th frame of the gastrointestinal medical gray image; T represents the total number of windows divided by the gastrointestinal medical gray image; represents the mean value of the variance of gray values corresponding to all windows in the n-1th frame of gastrointestinal medical gray image, represents the mean value of the variance of the gray values corresponding to all windows in the n+1th frame of the gastrointestinal medical gray image; represents the variance of the grayscale values of all pixels in the tth window in the nth frame of the gastrointestinal medical grayscale image; m represents the side length of the window, It represents the correlation coefficient between the tth window and the n-1th frame and the n+1th frame in the nth frame of the gastrointestinal medical grayscale image. represents an exponential function with a natural constant as base;
[0020] That is, the average value of the predicted cost-effectiveness parameters of all windows of all frames of the gastrointestinal medical grayscale images is obtained as the overall predicted cost-effectiveness parameter of the gastrointestinal medical grayscale images.
[0021] Furthermore, the deviation weight is obtained as follows:
[0022] The difference in grayscale value variance between the first target window and the second target window is obtained, and the deviation weight is obtained according to the ratio between the difference in grayscale value variance between the first target window and the second target window and the sum of the grayscale value variances of the first target window and the second target window.
[0023] Furthermore, the similarity is obtained as follows:
[0024] The tth window in the nth frame of the gastrointestinal medical grayscale image and the tth window in the n+1th frame of the gastrointestinal medical grayscale image Similarity of windows The acquisition method is:
[0025]
[0026] in, represents the variance of the grayscale values of all pixels in the tth window in the nth frame of the gastrointestinal medical grayscale image; represents the variance of the grayscale values of all pixels in the tth window in the n+1th frame of the gastrointestinal medical grayscale image; Indicates the n+1th frame of the gastrointestinal medical grayscale image. The gray value of the i-th pixel in the window; represents the average gray value of all pixels in the tth window in the nth frame of the gastrointestinal medical gray image; m represents the side length of the window; represents an exponential function with a natural constant as base; represents the bias weight; Indicates the gray value similarity gap.
[0027] Furthermore, the step of obtaining the matching rate according to the first similarity, the second similarity, and the third similarity includes the following specific steps:
[0028] The average of all second similarities and the average of all third similarities are obtained, which are recorded as average second similarity and average third similarity respectively, and the matching rate is obtained according to the ratio of the first similarity to the average second similarity and the ratio of the first similarity to the average third similarity.
[0029] Furthermore, the matching rate acquisition method is as follows:
[0030] The tth window in the nth frame of the gastrointestinal medical image video and the n+1th frame Window matching rate The acquisition method is:
[0031]
[0032] Among them, K represents the matching rate coefficient, Indicates preset parameters; first similarity Indicates the tth window in the nth frame of the gastrointestinal medical grayscale image and the n+1th frame of the gastrointestinal medical grayscale image. Similarity of windows; Second similarity Indicates that any window other than the tth window in the nth frame of the gastrointestinal medical grayscale image is related to the tth window in the n+1th frame of the gastrointestinal medical grayscale image. The similarity of the windows, Indicates all windows except the tth window in the nth frame of the gastrointestinal medical grayscale image and the tth window in the n+1th frame of the gastrointestinal medical grayscale image. The average of all similarities of windows; the third similarity Indicates Frame gastrointestinal medical grayscale image window, and the Frame gastrointestinal medical grayscale image The similarity of any window other than the windows, Indicates Frame gastrointestinal medical grayscale image window, and the Frame gastrointestinal medical grayscale image The mean of the similarities of all windows except windows; Represents an exponential function with a natural constant as its base.
[0033] Furthermore, the gastrointestinal medical grayscale image is predictively coded and compressed according to the path composed of several best matching windows, and the acquisition method is as follows:
[0034] The best matching window corresponding to the tth window in the nth frame of the gastrointestinal medical grayscale image is the n+1th frame of the gastrointestinal medical grayscale image. window, obtain the n+1th frame of the gastrointestinal medical grayscale image The window is the best matching window of the gastrointestinal medical grayscale image in the n+2th frame, and so on. The window in each gastrointestinal medical grayscale image is the best matching window in the next gastrointestinal medical grayscale image, until the matching rate between the window and all windows in the corresponding next gastrointestinal medical grayscale image is 0, then start again with other windows in the next gastrointestinal medical grayscale image to obtain its best matching window;
[0035] Then, in a plurality of frames of gastrointestinal medical grayscale images, a prediction window path is formed by a plurality of best matching windows of consecutive frames of gastrointestinal medical grayscale images;
[0036] The prediction window paths of all windows in the gastrointestinal medical grayscale image are obtained, and then prediction coding is performed on them to compress the gastrointestinal medical grayscale image. The specific compression process is as follows:
[0037] First, the prediction window path is used to perform window-based predictive coding;
[0038] Then, the entire gastrointestinal medical grayscale image is encoded. The encoding process is to use a predictive coding algorithm to establish a prediction model for the window and the entire gastrointestinal medical grayscale image. The window prediction model performs predictive coding on the window path. For the window with a matching rate of 0 on the predicted window path, the predictive coding algorithm is used to predictively code the gastrointestinal medical grayscale image corresponding to the window.
[0039] Furthermore, the received compressed data is decoded, and the specific steps include the following:
[0040] The decoder at the receiving end is used to decode the received compressed data and restore it to the original image data. The compressed data is subjected to inverse quantization, inverse transformation, inverse quantization and inverse prediction operations to restore the original pixel values in the gastrointestinal medical grayscale image data and obtain the decoded gastrointestinal medical grayscale image data.
[0041] Furthermore, the decoded gastrointestinal medical grayscale image data is displayed and the collaborative diagnosis of gastrointestinal medical images is realized, and the specific steps include the following:
[0042] The decoded gastrointestinal medical grayscale image data is converted into an analog signal using a display, and color mapping, brightness adjustment and filtering operations are performed, and finally displayed on the screen for viewing by diagnostic experts, who perform collaborative diagnosis based on the gastrointestinal medical images displayed on the screen.
[0043] The beneficial effect of the technical solution of the present invention is: by obtaining the prediction window path for inter-frame prediction of areas with high local similarity and constructing a simple prediction model, local area prediction coding is performed with less calculation amount. Since the similarity of local areas on the prediction window path is higher, the distortion rate of the image data after prediction coding is lower, and the compression effect of the prediction coding algorithm is improved, so that medical image data can be guaranteed to have a higher compression ratio, a lower distortion rate and a faster coding compression speed during the image communication process, so as to realize efficient transmission of medical images and meet the high real-time and high accuracy requirements of collaborative diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 The module flow chart of the gastrointestinal medical image transmission visualization system for collaborative auxiliary detection of the present invention. DETAILED DESCRIPTION
[0046] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation method, structure, features and effects of the gastrointestinal medical image transmission visualization system for collaborative auxiliary detection proposed by the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0047] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0048] The specific scheme of the gastrointestinal medical image transmission visualization system for collaborative auxiliary detection provided by the present invention is described in detail below with reference to the accompanying drawings.
[0049] See also Figure 1, which shows a module flow chart of a gastrointestinal medical image transmission visualization system for collaborative auxiliary detection provided by an embodiment of the present invention, the system includes the following modules:
[0050] Image data acquisition module: collects gastrointestinal medical image video data and preprocesses it.
[0051] This embodiment needs to process gastrointestinal medical images, so gastrointestinal medical images need to be collected.
[0052] In this embodiment, the gastrointestinal medical image acquisition device is an endoscope, and the specific acquisition method is that the doctor uses the endoscope to acquire the corresponding image. The acquired gastrointestinal medical image is a multi-frame video image. Since each frame of the video image is a color image, the overall amount of calculation when processing the color image is large. Therefore, each frame of the gastrointestinal medical image is grayed to obtain grayscale images of multiple frames of gastrointestinal medical images, which are recorded as gastrointestinal medical grayscale images.
[0053] At this point, the collection and preprocessing of gastrointestinal medical images are completed.
[0054] Data prediction coding module: quantify the cost-effectiveness parameters of different-sized windows for gastrointestinal medical grayscale images, and adapt the prediction window size of gastrointestinal medical grayscale images according to the prediction window cost-effectiveness parameters.
[0055] Because gastrointestinal medical grayscale images have a certain local high similarity between frames, but a large part of the frames are not similar, and predictive coding performs inter-frame prediction on the entire frame image, so when making predictions, the accuracy of the predictions is often reduced due to the different local similarities between frames. Therefore, this embodiment is based on the local high similarity of gastrointestinal medical grayscale images, and adapts the size of the prediction window for the entire gastrointestinal medical grayscale image. Then, the matching rate is calculated using the similarity of the inter-frame windows, the matching path of the window is obtained, and the local inter-frame windows of the same path are compressed by predictive coding. Because the windows of the same path have extremely high similarity, the prediction is more accurate, the amount of calculation is less, and the compression effect is stronger.
[0056] Step (1), when predicting and compressing video frames using the principle of predictive coding, the higher the similarity between frames, the simpler the prediction model required for prediction, and the more accurate the prediction result, the better the overall compression efficiency. In this embodiment, when using a window to perform local prediction on gastrointestinal medical grayscale images, the selection of the window size has a greater impact on the accuracy of the prediction result and the overall amount of calculation. Specifically, the larger the window, the fewer windows are needed for prediction of each frame of the image, and the overall amount of calculation is relatively small. However, because the window is large, the number of elements contained in each window is large and complex, resulting in insufficient prediction accuracy; the smaller the window, the fewer elements in each window are correspondingly simpler, so the prediction accuracy is higher, but correspondingly, because the window is small, the number of windows contained in each frame is large, so the amount of calculation is large. Therefore, this embodiment quantifies the prediction cost-effectiveness parameters of windows of different sizes by comparing the window size and the complexity of the elements in the window for each frame of gastrointestinal medical grayscale images, and uses the prediction cost-effectiveness parameters to adapt the prediction window size of the gastrointestinal medical grayscale image. Taking the nth frame of gastrointestinal medical grayscale image as an example:
[0057] The nth frame of the gastrointestinal medical grayscale image is equally divided into a number of m×m windows, that is, the length and width of the nth frame of the gastrointestinal medical grayscale image are equally divided into a length of m, respectively, to obtain a number of windows, and the number of obtained windows is recorded as T;
[0058] Then the prediction cost performance parameter of the tth window when the window size is m is The method to obtain is:
[0059]
[0060] in, Indicates the n+1th frame of the gastrointestinal medical grayscale image. The gray value variance of the pixels in the window is represents the gray value variance of the pixel point in the t-th window in the n-1-th frame of the gastrointestinal medical gray image; T represents the total number of windows divided by the gastrointestinal medical gray image; represents the mean value of the variance of gray values corresponding to all windows in the n-1th frame of gastrointestinal medical gray image, represents the mean value of the variance of the gray values corresponding to all windows in the n+1th frame of the gastrointestinal medical gray image; represents the variance of the grayscale values of all pixels in the tth window in the nth frame of the gastrointestinal medical grayscale image; m represents the side length of the window, It represents the correlation coefficient between the tth window and the n-1th frame and the n+1th frame in the nth frame of the gastrointestinal medical grayscale image. Represents an exponential function with a natural constant as its base.
[0061] Because when predictive coding is performed, the tth window in the nth frame of gastrointestinal medical grayscale image needs to be matched with the n-1th and n+1th frames of gastrointestinal medical grayscale images in this embodiment, and the elements in each window are pixels. For pixels, the complexity is more reflected in the change of grayscale values. Therefore, this embodiment uses the grayscale value variance of the pixels in the window as the main indicator to calculate the predicted cost-effectiveness parameter of each window of size m. The larger the inter-frame variance between the tth window in the nth frame of gastrointestinal medical grayscale image and the window frames of size m in the n-1th and n+1th frames of gastrointestinal medical grayscale images, the higher the subsequent matching difficulty will be when the video is divided into windows of size m, and vice versa. The smaller the window, the greater the overall calculation amount. Therefore, the window size is used as the denominator in the calculation of the predicted cost-effectiveness parameter to constrain the calculation amount of windows of different sizes, that is, , which specifically means the variance of the pixel points in the tth window of the nth frame The larger the value is, the more complex the grayscale value changes of the pixels in the tth window under the window size are. The larger the value is, the more difficult it is to match the tth window of the nth frame gastrointestinal medical grayscale image with all windows between frames; the smaller m is, the greater the overall computational effort is.
[0062] Step (2), using the above method, the predicted cost performance parameters of each frame of the gastrointestinal medical grayscale image under the window size of m can be obtained. Because this embodiment is aimed at inter-frame prediction, it is necessary to consider the predicted cost performance parameters of the corresponding window size in the overall gastrointestinal medical grayscale image. Therefore, it is necessary to consider the predicted cost performance parameters of the overall gastrointestinal medical grayscale image under the window size of m. Quantification of the specific prediction of cost performance parameters The calculation method is:
[0063]
[0064] in, represents the predicted cost-effectiveness parameter of the tth window in the nth frame of the gastrointestinal medical grayscale image; N represents the total number of frames of the gastrointestinal medical grayscale image to be transmitted; and T represents the total number of windows divided into the gastrointestinal medical grayscale image.
[0065] In this embodiment, the value of the window side length m is set to 3, 4, 5, ..., 64 respectively. According to the above, a predicted cost performance parameter can be obtained each time a value is set for m. Among the predicted cost performance parameters corresponding to all the values of m, the maximum predicted cost performance parameter is obtained, and the m corresponding to the maximum predicted cost performance parameter is used as the size of the optimal prediction window.
[0066] The windows described later in this embodiment all refer to windows divided by the optimal prediction window size. Other larger values of m can be set during implementation, and this embodiment does not specifically limit this.
[0067] At this point, by processing each frame of gastrointestinal medical grayscale image through prediction cost-effectiveness parameters under different window sizes, the optimal prediction window size of the gastrointestinal medical grayscale image can be obtained.
[0068] Step (3) quantifies the local features of different frames of the gastrointestinal medical grayscale image to obtain the matching rate of the inter-frame window under the optimal prediction window of the gastrointestinal medical grayscale image.
[0069] The size of the best prediction window of the gastrointestinal medical grayscale image is obtained above. The best prediction window means that under this size of window, when the gastrointestinal medical grayscale images of all frames are matched, the overall calculation cost is the smallest, that is, the higher the similarity of the corresponding windows, the easier the matching is, and the larger the window, the smaller the overall calculation amount; and when predicting coding, the stronger the similarity between windows, the simpler the prediction model is when predicting, the less the overall prediction calculation amount is, and the more accurate the prediction result is, the better the prediction effect is, that is, the greater the overall compression rate after predictive coding compression;
[0070] Therefore, the optimal prediction window is used to divide the gastrointestinal medical grayscale images.
[0071] In this embodiment, the similarity between the inter-frame windows is used as the correlation between the inter-frame windows to calculate the matching rate of the inter-frame windows, and the matching rate of the inter-frame windows is used to build a local window prediction path for the gastrointestinal medical grayscale image. The specific process is as follows:
[0072] First, the similarity of the windows between frames is calculated. Taking the tth window in the nth frame of the gastrointestinal medical grayscale image as an example, the similarity between the tth window and the n+1th frame of the gastrointestinal medical grayscale image is calculated. Similarity of windows The calculation is as follows:
[0073]
[0074] in, represents the variance of the grayscale values of all pixels in the tth window in the nth frame of the gastrointestinal medical grayscale image; represents the variance of the grayscale values of all pixels in the tth window in the n+1th frame of the gastrointestinal medical grayscale image; Indicates the n+1th frame of the gastrointestinal medical grayscale image. The gray value of the i-th pixel in the window; It represents the average gray value of all pixels in the tth window in the nth frame of the gastrointestinal medical gray image; represents an exponential function with a natural constant as base; represents the bias weight; Indicates the gray value similarity gap.
[0075] in , is the total number of pixels in the window, and ;
[0076] In this embodiment, the similarity calculation of the window between gastrointestinal medical image video frames is mainly divided into two parts. The first part is the deviation weight. ; The second part is the gray value similarity gap Specifically, the gray value similarity gap is used as the main body to quantify the gray value of the n+1th frame of the gastrointestinal medical gray image. The difference between the grayscale value of each pixel in the tth window and the average grayscale value of all pixels in the tth window in the nth frame of the gastrointestinal medical grayscale image, the larger the difference is, the farther the grayscale values in the windows between adjacent frames of the two gastrointestinal medical grayscale images are in the general trend, and the lower the similarity is; for example, to prevent the extreme influence of accidental situations (pixels with larger or smaller grayscale values) on the average value, the first part is used as the weight, and the significance of the weight is to distinguish the fluctuation of the grayscale value of the pixel in the window between adjacent frames of the two gastrointestinal medical grayscale images. If the fluctuation is consistent, it means that the confidence of the main calculation part is higher, that is, the similarity of the windows between frames is better, and vice versa, so the deviation weight is used to weightedly adjust the main part to make the similarity avoid accidental situations and be more accurate.
[0077] So far, the tth window of the nth frame of the gastrointestinal medical grayscale image and the n+1th frame of the gastrointestinal medical grayscale image The similarity of windows is obtained;
[0078] Step (4), using the above method, the similarity between the t-th window of the n-th frame and all the windows of the n+1-th frame can be obtained, and then all the similarities are used to calculate the matching rate between the t-th window of the n-th frame and all the windows of the n+1-th frame. Specifically, the calculation is based on the t-th window in the n-th frame of the gastrointestinal medical image video and the n+1-th frame. Window as an example, its matching rate The calculation method of is as follows:
[0079]
[0080] Among them, K represents the matching rate coefficient, Indicates preset parameters, preset parameters ; First similarity Indicates the tth window in the nth frame of the gastrointestinal medical grayscale image and the n+1th frame of the gastrointestinal medical grayscale image. Similarity of windows; Second similarity Indicates that any window other than the tth window in the nth frame of the gastrointestinal medical grayscale image is related to the tth window in the n+1th frame of the gastrointestinal medical grayscale image. The similarity of the windows, Indicates all windows except the tth window in the nth frame of the gastrointestinal medical grayscale image and the tth window in the n+1th frame of the gastrointestinal medical grayscale image. The average of all similarities of windows; the third similarity Indicates Frame gastrointestinal medical grayscale image window, and the Frame gastrointestinal medical grayscale image The similarity of any window other than the windows, Indicates Frame gastrointestinal medical grayscale image window, and the Frame gastrointestinal medical grayscale image The mean of the similarities of all windows except windows; Represents an exponential function with a natural constant as its base.
[0081] Because the predictions between the inter-frame windows are one-to-one corresponding, this embodiment uses the similarity between the window of the nth frame of the gastrointestinal medical grayscale image and the window of the n+1th frame of the gastrointestinal medical grayscale image as a basis to calculate the matching rate to match the inter-frame windows;
[0082] The tth window of the nth frame of the gastrointestinal medical grayscale image and the n+1th frame of the gastrointestinal medical grayscale image are combined. Take the tth window of the nth frame of the gastrointestinal medical grayscale image as an example: In order to achieve the best prediction effect of the overall gastrointestinal medical grayscale image without affecting the matching of other windows, the tth window of the nth frame of the gastrointestinal medical grayscale image and the tth window of the n+1th frame of the gastrointestinal medical grayscale image are required to be matched. The similarity of the windows is high. The higher the similarity, the simpler the prediction model is and the better the prediction effect is. The similarity between windows other than the nth window is small, and the small similarity is to prevent the window from matching multiple windows of the n+1th frame of gastrointestinal medical grayscale image when matching, affecting the matching of the remaining windows of the nth frame of gastrointestinal medical grayscale image with the window of the n+1th frame;
[0083] Therefore, this embodiment uses To realize the tth window of the nth frame of the gastrointestinal medical grayscale image and the n+1th frame of the gastrointestinal medical grayscale image The purpose of high similarity between windows is to To achieve the first The purpose of the matching rate coefficient is to prevent the similarity from being too low, resulting in too large a difference in the matched windows.
[0084] By using the above method, all windows of the gastrointestinal medical grayscale image of the nth frame and the n+1th frame can be obtained. The matching rates of the windows are calculated, and then the window with the largest matching rate is selected as the best matching window.
[0085] By using the above method, all the best matching windows in the n+1th frame of the nth frame video can be obtained.
[0086] At this point, all windows in the nth frame video and the n+1th frame video are processed by matching ratio to obtain the best matching window.
[0087] Step (5), obtaining the prediction path of the similar window between frames according to the matching rate of the window between frames, and performing predictive coding using the prediction window path to achieve hybrid coding of the gastrointestinal medical grayscale image.
[0088] Get the best matching window of all windows in the nth frame of the gastrointestinal medical grayscale image. Take the tth window in the nth frame of the gastrointestinal medical grayscale image as an example. The way to get the window matching path is as follows:
[0089] The best matching window corresponding to the tth window in the nth frame of the gastrointestinal medical grayscale image is the n+1th frame of the gastrointestinal medical grayscale image. window, obtain the n+1th frame of the gastrointestinal medical grayscale image The window is the best matching window of the gastrointestinal medical grayscale image in the n+2th frame, and so on. The window in each frame of the gastrointestinal medical grayscale image is the best matching window in the next frame of the gastrointestinal medical grayscale image, until there is no best matching window. No best matching window means that the matching rate between all windows in the corresponding next frame of the gastrointestinal medical grayscale image is 0, then start again with other windows in the next frame of the gastrointestinal medical grayscale image to obtain its best matching window.
[0090] Then, in a plurality of frames of gastrointestinal medical grayscale images, a prediction window path is composed of a plurality of best matching windows of consecutive frames of gastrointestinal medical grayscale images.
[0091] Using the above method, we can obtain The frame gastrointestinal medical grayscale image starts with a prediction window path formed by the best matching window of each window.
[0092] From the above At the beginning of the frame, the predicted window paths of all windows are obtained, and now they are predicted and encoded to compress the overall gastrointestinal medical grayscale image. The specific compression process is as follows:
[0093] First, the priority is divided. The priority of the prediction window path is higher than that of the conventional prediction coding. That is, in the coding compression process, the prediction window path is first used to perform window-based prediction coding.
[0094] Then, the overall encoding is performed. The encoding process is to use the predictive coding algorithm to establish a prediction model for the window and the entire gastrointestinal medical grayscale image. The window prediction model performs predictive coding on the window path, and for the window with a matching rate of 0 on the predicted window path (that is, the breakpoint of the path), the existing whole frame prediction model is used for predictive coding.
[0095] At this point, the gastrointestinal medical grayscale image data after encoding and compression is obtained, which is recorded as compressed data.
[0096] Data transmission module: transmits compressed data through 5G transmission network or other communication network and sends it to different receiving ends.
[0097] Data decoding module: Use the decoder at the receiving end to decode the received compressed data and restore it to the original image data. Perform inverse quantization, inverse transformation, inverse quantization and inverse prediction operations on the compressed data to restore the original pixel values in the gastrointestinal medical grayscale image data and obtain the decoded gastrointestinal medical grayscale image data.
[0098] Visualization and collaborative diagnosis module: The decoded gastrointestinal medical grayscale image data is converted into analog signals using a display, and color mapping, brightness adjustment, and filtering operations are performed before finally being displayed on the screen for diagnostic experts to view. The diagnostic experts then perform collaborative diagnosis based on the gastrointestinal medical images displayed on the screen.
[0099] It should be noted that the exp(-x) model used in this embodiment is only used to indicate that the negative correlation and the result of the constraint model output are in In the specific implementation, it can be replaced by other models with the same purpose. This embodiment only takes the exp(-x) model as an example for description without making specific limitations, where x refers to the input of the model.
[0100] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A gastrointestinal medical image transmission visualization system for collaborative auxiliary detection, characterized in that: The system includes the following modules: Image data acquisition module: obtaining grayscale gastrointestinal medical images and recording them as gastrointestinal medical grayscale images; Data prediction coding module: divide the gastrointestinal medical grayscale image into several windows of different sizes, and obtain the predicted cost-effectiveness parameter according to the difference in the grayscale values of the windows between adjacent frames; obtain the window corresponding to the maximum predicted cost-effectiveness parameter; record any window in the first target frame image as the first target window, and record any window in the second target frame image as the second target window, and obtain the deviation weight according to the difference in grayscale values between the first target window and the second target window; obtain the grayscale value similarity gap according to the difference in grayscale value of the pixel point in any window in the second target frame image and the average grayscale value of the first target window; obtain the grayscale value similarity gap according to the deviation weight and grayscale value similarity; similarity between the first target window and the second target window is recorded as the first similarity; similarity between the second target window and windows other than the first target window is recorded as the second similarity; similarity between the first target window and windows other than the second target window is recorded as the third similarity; matching rate is obtained according to the first similarity, the second similarity and the third similarity; the second target window with the maximum matching rate with the first target window is recorded as the best matching window; predictive coding and compression are performed on the gastrointestinal medical grayscale image according to the path composed of several best matching windows to obtain the encoded gastrointestinal medical grayscale image data, which is recorded as compressed data; Recording a gastrointestinal medical grayscale image of any frame as a first target frame image, and recording a gastrointestinal medical grayscale image of the next frame of the first target frame image as a second target frame image; Data transmission module: transmits compressed data; Data decoding module: decodes the received compressed data; Visualization and collaborative diagnosis module: displays decoded gastrointestinal medical grayscale image data and realizes collaborative diagnosis of gastrointestinal medical images; The specific steps of obtaining the predicted cost performance parameter according to the difference in the grayscale values of the windows between adjacent frames are as follows: Obtain the gray value variance of the pixel points in each window, record the mean of the gray value variances of all windows as the first mean, obtain the correlation variation coefficient according to the difference between the first means of adjacent frames, and obtain the predicted cost performance parameter according to the correlation variation coefficient and the gray value variance of the window; The predicted cost performance parameter is obtained as follows: Prediction cost performance parameter of the tth window The method to obtain is: in, Indicates the n+1th frame of the gastrointestinal medical grayscale image. The gray value variance of the pixels in the window is represents the gray value variance of the pixel point in the t-th window in the n-1-th frame of the gastrointestinal medical gray image; T represents the total number of windows divided by the gastrointestinal medical gray image; represents the mean value of the variance of gray values corresponding to all windows in the n-1th frame of gastrointestinal medical gray image, represents the mean value of the variance of the gray values corresponding to all windows in the n+1th frame of the gastrointestinal medical gray image; represents the variance of the grayscale values of all pixels in the tth window in the nth frame of the gastrointestinal medical grayscale image; m represents the side length of the window, It represents the correlation coefficient between the tth window and the n-1th frame and the n+1th frame in the nth frame of the gastrointestinal medical grayscale image. represents an exponential function with a natural constant as base; That is, the average value of the predicted cost-effectiveness parameters of all windows of all frames of the gastrointestinal medical grayscale images is obtained as the overall predicted cost-effectiveness parameter of the gastrointestinal medical grayscale images.
2. The gastrointestinal medical image transmission visualization system for collaborative auxiliary detection according to claim 1, characterized in that: The deviation weight is obtained as follows: The difference in grayscale value variance between the first target window and the second target window is obtained, and the deviation weight is obtained according to the ratio between the difference in grayscale value variance between the first target window and the second target window and the sum of the grayscale value variances of the first target window and the second target window.
3. The gastrointestinal medical image transmission visualization system for collaborative auxiliary detection according to claim 1, characterized in that: The similarity is obtained as follows: The tth window in the nth frame of the gastrointestinal medical grayscale image and the tth window in the n+1th frame of the gastrointestinal medical grayscale image Similarity of windows The acquisition method is: in, Indicates the n+1th frame of the gastrointestinal medical grayscale image. The gray value of the i-th pixel in the window; It represents the average gray value of all pixels in the tth window in the nth frame of the gastrointestinal medical gray image; represents the bias weight; Indicates the gray value similarity gap.
4. The gastrointestinal medical image transmission visualization system for collaborative auxiliary detection according to claim 1, characterized in that: The specific steps of obtaining the matching rate according to the first similarity, the second similarity, and the third similarity are as follows: The average of all second similarities and the average of all third similarities are obtained, which are recorded as average second similarity and average third similarity respectively, and the matching rate is obtained according to the ratio of the first similarity to the average second similarity and the ratio of the first similarity to the average third similarity.
5. The gastrointestinal medical image transmission visualization system for collaborative auxiliary detection according to claim 4, characterized in that: The matching rate acquisition method is as follows: The tth window in the nth frame of the gastrointestinal medical image video and the n+1th frame Window matching rate The acquisition method is: Among them, K represents the matching rate coefficient, Indicates preset parameters; first similarity Indicates the tth window in the nth frame of the gastrointestinal medical grayscale image and the n+1th frame of the gastrointestinal medical grayscale image. Similarity of windows; Second similarity Indicates that any window other than the tth window in the nth frame of the gastrointestinal medical grayscale image is related to the tth window in the n+1th frame of the gastrointestinal medical grayscale image. The similarity of the windows, Indicates all windows except the tth window in the nth frame of the gastrointestinal medical grayscale image and the tth window in the n+1th frame of the gastrointestinal medical grayscale image. The average of all similarities of windows; the third similarity Indicates Frame gastrointestinal medical grayscale image window, and the Frame gastrointestinal medical grayscale image The similarity of any window other than the windows, Indicates Frame gastrointestinal medical grayscale image window, and the Frame gastrointestinal medical grayscale image The mean similarity of all windows except windows.
6. The gastrointestinal medical image transmission visualization system for collaborative auxiliary detection according to claim 1, characterized in that: The method for predictive coding and compressing the gastrointestinal medical grayscale image according to the path composed of several best matching windows is as follows: The best matching window corresponding to the tth window in the nth frame of the gastrointestinal medical grayscale image is the n+1th frame of the gastrointestinal medical grayscale image. window, obtain the n+1th frame of the gastrointestinal medical grayscale image The window is the best matching window of the gastrointestinal medical grayscale image in the n+2th frame, and so on. The window in each gastrointestinal medical grayscale image is the best matching window in the next gastrointestinal medical grayscale image, until the matching rate between the window and all windows in the corresponding next gastrointestinal medical grayscale image is 0, then start again with other windows in the next gastrointestinal medical grayscale image to obtain its best matching window; Then, in a plurality of frames of gastrointestinal medical grayscale images, a prediction window path is formed by a plurality of best matching windows of consecutive frames of gastrointestinal medical grayscale images; The prediction window paths of all windows in the gastrointestinal medical grayscale image are obtained, and then prediction coding is performed on them to compress the gastrointestinal medical grayscale image. The specific compression process is as follows: First, the prediction window path is used to perform window-based predictive coding; Then, the entire gastrointestinal medical grayscale image is encoded. The encoding process is to use a predictive coding algorithm to establish a prediction model for the window and the entire gastrointestinal medical grayscale image. The window prediction model performs predictive coding on the window path. For the window with a matching rate of 0 on the predicted window path, the predictive coding algorithm is used to predictively code the gastrointestinal medical grayscale image corresponding to the window.
7. The gastrointestinal medical image transmission visualization system for collaborative auxiliary detection according to claim 1, characterized in that: The step of decoding the received compressed data specifically includes the following steps: The decoder at the receiving end is used to decode the received compressed data and restore it to the original image data. The compressed data is subjected to inverse quantization, inverse transformation, inverse quantization and inverse prediction operations to restore the original pixel values in the gastrointestinal medical grayscale image data and obtain the decoded gastrointestinal medical grayscale image data.
8. The gastrointestinal medical image transmission visualization system for collaborative auxiliary detection according to claim 1, characterized in that: The display of decoded gastrointestinal medical grayscale image data and the realization of collaborative diagnosis of gastrointestinal medical images specifically include the following steps: The decoded gastrointestinal medical grayscale image data is converted into an analog signal using a display, and color mapping, brightness adjustment and filtering operations are performed, and finally displayed on the screen for viewing by diagnostic experts, who perform collaborative diagnosis based on the gastrointestinal medical images displayed on the screen.
