An intelligent segmentation method and system for ENT examination images
By analyzing the edge feature points and internal angle values of the ear grayscale image sequence, and using the concepts of reference matching edge lines and non-illuminated edge lines, the problem of inaccurate image segmentation in the existing technology is solved, and ENT inspection images are realized. Precise segmentation and improved diagnostic accuracy.
Patent Information
- Application Number
- CN202411059672.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-08-05
AI Technical Summary
The existing image segmentation methods for ENT examinations result in inaccurate image segmentation due to interference from light and eardrum structures, affecting the accuracy of diagnosis.
By acquiring the ear grayscale image sequence, analyzing the feature points and internal angle values of the edge lines, using the concept of reference matching edge lines and non-illuminated edge lines, false edges are eliminated and the perforation area is accurately segmented.
It improves the description and identification capabilities of edge features, enhances the precise analysis of edge shape and position, ensures stable tracking and matching of edge lines, accurately segments the perforation area, and improves the accuracy of diagnosis.
Smart Images

Figure CN118570233B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an ENT examination image intelligent segmentation method and system. Background Art
[0002] Tympanic membrane perforation is a common condition in otolaryngology, which is mainly manifested by one or more small holes or cracks on the tympanic membrane. The image captured by the camera on the endoscope is segmented using the image segmentation method. The segmented holes can serve as an important reference for doctors to accumulate experience. By establishing an image database and recording the diagnosis and treatment experience of doctors, it can help cultivate the skills of new doctors and improve the accuracy of doctors' diagnosis and treatment of various ear diseases.
[0003] Edge detection is usually used to segment tympanic membrane perforation images. Due to the interference of light and tympanic membrane structure, part of the normal contour will be segmented out, thus affecting the accuracy of intelligent segmentation of ENT examination images. Summary of the invention
[0004] The present invention provides an ENT examination image intelligent segmentation method and system to solve the existing problems.
[0005] The present invention provides an ENT examination image intelligent segmentation method and system using the following technical solutions:
[0006] An embodiment of the present invention provides an intelligent segmentation method for ENT examination images, the method comprising the following steps:
[0007] Acquire a sequence of ear grayscale images; in the sequence of ear grayscale images, acquire a plurality of edge lines in each frame of the ear grayscale image and a gradient direction of each edge pixel point;
[0008] According to the differences between all the pixel points of each edge line in each frame of the ear grayscale image, a plurality of feature points of each edge line in each frame of the ear grayscale image are obtained;
[0009] According to the distances of all adjacent feature points of each edge line of each frame of ear grayscale image, the inner angle value of each feature point of each edge line of each frame of ear grayscale image is obtained;
[0010] According to the difference between the number of feature points of the edge lines of the ear grayscale images of adjacent frames, a plurality of reference matching edge lines of each edge line of each frame of the ear grayscale image are obtained; according to the difference between the inner angle values of all feature points of each edge line of each frame of the ear grayscale image and each corresponding reference matching edge line, a matching point of each feature point of each edge line of each frame of the ear grayscale image on each reference matching edge line is obtained;
[0011] According to the difference between the number of feature points of each edge line of each frame of ear grayscale image and the number of matching points of all feature points of each edge line in each reference matching edge line, a plurality of non-illuminated edge lines of each frame of ear grayscale image are obtained;
[0012] According to the difference in grayscale values of each edge pixel point of each non-illuminated edge line of each frame of ear grayscale image and the pixel points adjacent to each edge pixel point in the gradient direction, a plurality of perforated edges of each frame of ear grayscale image are obtained.
[0013] Furthermore, the method of obtaining a plurality of feature points of each edge line in each frame of the ear grayscale image according to the differences between all pixel points of each edge line in each frame of the ear grayscale image comprises the following specific steps:
[0014] According to the chain code sequence acquisition method, each edge line in each frame of the ear grayscale image is operated to obtain the ear edge line chain code sequence of each edge line in each frame of the ear grayscale image;
[0015] The ear edge line chain code sequence of each edge line in each frame of the ear grayscale image is calculated according to the derivative chain code acquisition method to obtain the derivative chain code sequence of each edge line in each frame of the ear grayscale image;
[0016] The edge pixel points whose derivative chain code values in the derivative chain code sequence of each edge line in each frame of the ear grayscale image are not 0 are recorded as selected points;
[0017] In the The grayscale image of the ear Among the edge lines, when the When the number of edge pixels between the first selected point and the next selected point is greater than or equal to the preset first empirical threshold, the first selected point The selected point is recorded as feature points of the edge line.
[0018] Furthermore, the specific calculation formula corresponding to the inner angle value of each feature point of each edge line of each frame of ear grayscale image is obtained according to the distances of all adjacent feature points of each edge line of each frame of ear grayscale image:
[0019]
[0020] in, Indicates The grayscale image of the ear The edge line The interior angle value of feature points; Indicates The grayscale image of the ear The edge line The distance between a feature point and its first adjacent feature point; Indicates The grayscale image of the ear The edge line The distance between a feature point and its second adjacent feature point; Indicates The grayscale image of the ear The edge line The distance between two adjacent feature points; Represents the inverse sine function.
[0021] Furthermore, the method of obtaining a plurality of reference matching edge lines of each edge line of each frame of the ear grayscale image according to the difference between the numbers of feature points of the edge lines of the ear grayscale images of adjacent frames comprises the following specific steps:
[0022] When The grayscale image of the ear The edge line and The first When the absolute value of the difference in the number of feature points of the first edge line is less than the preset second empirical threshold, the The first The edge line is recorded as The grayscale image of the ear The reference matching edge line of each edge line.
[0023] Furthermore, the method of obtaining the matching point of each feature point of each edge line of each frame of ear grayscale image at each reference matching edge line according to the difference between the inner angle values of all feature points of each edge line of each frame of ear grayscale image and the corresponding reference matching edge line comprises the following specific steps:
[0024] According to the difference between the inner angle values of all the feature points of each edge line of each frame of ear grayscale image and each corresponding reference matching edge line, the matching degree of each feature point of each edge line of each frame of ear grayscale image and each feature point of each reference matching edge line of each edge line of each frame of ear grayscale image is obtained;
[0025] when When the value is greater than the preset third experience threshold, The grayscale image of the ear The edge line The first reference matching edge line feature point, denoted as The grayscale image of the ear The edge line The feature point is candidate matching points of the reference matching edge line; among them, For the The grayscale image of the ear The mth feature point of the edge line and the The grayscale image of the ear The edge line The first reference matching edge line The matching degree of feature points;
[0026] In the The grayscale image of the ear The edge line The feature point is Among all candidate matching points of the reference matching edge line, The grayscale image of the ear The edge line The candidate matching point with the largest matching degree among the feature points is recorded as The grayscale image of the ear The edge line The feature point is The matching points of the reference matching edge line.
[0027] Furthermore, according to the difference between the inner angle values of all feature points of each edge line of each frame of ear grayscale image and each corresponding reference matching edge line, the specific calculation formula corresponding to the matching degree of each feature point of each edge line of each frame of ear grayscale image and each feature point of each reference matching edge line of each edge line of each frame of ear grayscale image is obtained as follows:
[0028]
[0029] in, Indicates The grayscale image of the ear The edge line The interior angle value of feature points; Indicates The grayscale image of the ear The edge line The first reference matching edge line The interior angle value of feature points; Indicates The grayscale image of the ear The edge line The sum of the interior angle values of a feature point and all adjacent feature points; Indicates The grayscale image of the ear The edge line The first reference matching edge line The sum of the interior angle values of a feature point and all adjacent feature points; Indicates absolute value; represents the linear normalization function.
[0030] Furthermore, the method of obtaining a plurality of non-illuminated edge lines of each frame of the ear grayscale image according to the difference between the number of feature points of each edge line of each frame of the ear grayscale image and the number of matching points of all feature points of each edge line in each reference matching edge line comprises the following specific steps:
[0031] According to the difference between the number of feature points of each edge line of each frame of ear grayscale image and the number of matching points of all feature points of each edge line on each reference matching edge line, the specific calculation formula corresponding to the edge matching degree of each edge line of each frame of ear grayscale image and each reference matching edge line of each edge line of each frame of ear grayscale image is obtained as follows:
[0032]
[0033] in, Indicates The grayscale image of the ear The edge line and The grayscale image of the ear The edge line The edge matching degree of the reference matching edge line; Indicates The grayscale image of the ear The number of feature points of the edge line; Indicates The grayscale image of the ear All feature points of the edge line are in The number of matching points of the reference matching edge line; represents the linear normalization function; Indicates absolute value;
[0034] when When the value is greater than the preset fourth experience threshold, The grayscale image of the ear The edge line reference matching edge line, denoted as The grayscale image of the ear Matching edges of edge lines;
[0035] When The grayscale image of the ear When the number of matching edges of the edge line is greater than or equal to the preset matching number threshold, the first The grayscale image of the ear edge lines are recorded as non-illuminated edge lines.
[0036] Furthermore, the method of obtaining a plurality of perforated edges of each frame of ear grayscale image according to the difference in grayscale values of each edge pixel point of each non-illuminated edge line of each frame of ear grayscale image in the gradient direction comprises the following specific steps:
[0037] In the The grayscale image of the ear On the non-illuminated edge line, The edge pixel is taken as the starting point, and the The gradient direction and the reverse direction of the gradient direction of the edge pixel are respectively selected from the front pixels, and construct them into sequences according to the selection order. The two sequences are recorded as The left sequence and right sequence of edge pixels; among them, is a preset quantity threshold;
[0038] According to the difference in the grayscale values of the pixel points in the left sequence and the right sequence of each edge pixel point of each non-illuminated edge line of each frame of the ear grayscale image, the possibility that each non-illuminated edge line of each frame of the ear grayscale image is a perforated edge is obtained;
[0039] when When it is greater than the preset fifth experience threshold, The grayscale image of the ear non-illuminated edge lines, recorded as perforated edges; among them, For the The grayscale image of the ear The probability that a non-illuminated edge line is a perforated edge.
[0040] Furthermore, according to the difference in the grayscale values of the pixel points in the left sequence and the right sequence of each edge pixel point of each non-illuminated edge line of each frame of the ear grayscale image, the specific calculation formula corresponding to the possibility that each non-illuminated edge line of each frame of the ear grayscale image is a perforated edge is obtained as follows:
[0041]
[0042] in, Indicates The grayscale image of the ear The non-illuminated edge line The sum of the grayscale values of all pixels in the left sequence of edge pixels; Indicates The grayscale image of the ear The non-illuminated edge line The sum of the grayscale values of all pixels in the right sequence of edge pixels; Indicates The grayscale image of the ear The number of pixels on the non-illuminated edge line; represents the linear normalization function; Indicates absolute value.
[0043] The present invention also proposes an intelligent segmentation system for ENT examination images, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program stored in the memory to implement the steps of the aforementioned intelligent segmentation method for ENT examination images.
[0044] The beneficial effects of the technical solution of the present invention are:
[0045] A sequence of ear grayscale images is obtained; in the sequence of ear grayscale images, several edge lines and the gradient direction of each edge pixel point in each frame of ear grayscale images are obtained; according to the difference between all pixel points of each edge line in each frame of ear grayscale images, several feature points of each edge line in each frame of ear grayscale images are obtained, thereby enhancing the description and recognition capabilities of edge features and improving the accuracy of subsequent analysis. According to the distances of all adjacent feature points of each edge line in each frame of ear grayscale images, the inner angle value of each feature point of each edge line in each frame of ear grayscale images is obtained, thereby improving the accurate analysis of edge shape and position. According to the difference between the number of feature points of edge lines of adjacent frames of ear grayscale images, several reference matching edge lines of each edge line in each frame of ear grayscale images are obtained, thereby ensuring stable tracking and matching of edge lines. According to the difference between the inner angle values of all feature points of each edge line in each frame of ear grayscale images and corresponding reference matching edge lines, the matching point of each feature point of each edge line in each frame of ear grayscale images at each reference matching edge line is obtained, thereby further ensuring stable tracking and matching of edge lines. According to the difference between the number of feature points of each edge line of each frame of ear grayscale image and the number of matching points of all feature points of each edge line on each reference matching edge line, several non-illuminated edge lines of each frame of ear grayscale image are obtained, and pseudo edges caused by illumination are effectively eliminated. According to the difference in grayscale values of adjacent pixel points in the gradient direction of each edge pixel point of each non-illuminated edge line of each frame of ear grayscale image, several perforated edges of each frame of ear grayscale image are obtained. The present invention analyzes each edge line in each frame of ear grayscale image to accurately segment the perforated area of each frame of ear grayscale image. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] 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.
[0047] Figure 1 A flowchart of the steps of an intelligent segmentation method for ENT examination images of the present invention;
[0048] Figure 2 This is a schematic diagram of a grayscale image of an ear provided in this embodiment. DETAILED DESCRIPTION
[0049] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the method and system for intelligent segmentation of ENT examination images proposed by the present invention, its specific implementation, structure, features and effects, 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.
[0050] 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.
[0051] The specific scheme of the intelligent segmentation method and system for ENT examination images provided by the present invention is described in detail below with reference to the accompanying drawings.
[0052] See also Figure 1 , which shows a flowchart of a method for intelligent segmentation of ENT examination images provided by an embodiment of the present invention, the method comprising the following steps:
[0053] Step S001: Acquire a sequence of ear grayscale images; in the sequence of ear grayscale images, acquire a plurality of edge lines in each frame of the ear grayscale image and the gradient direction of each edge pixel point.
[0054] Obtain an ear video captured by an endoscope camera from a medical diagnosis database, intercept an ear image of each frame in the ear video, and perform grayscale processing to obtain an ear grayscale image sequence consisting of continuous frames; Figure 2 This is a schematic diagram of a grayscale image of an ear provided in this embodiment.
[0055] In the ear grayscale image sequence, the Sobel edge detection algorithm is used to operate on each frame of the ear grayscale image to obtain several edge lines in each frame of the ear grayscale image and the gradient direction of each edge pixel point. Among them, the Sobel edge detection algorithm is a well-known technology and the specific method is not introduced here.
[0056] Step S002: obtaining a plurality of feature points of each edge line in each frame of the ear grayscale image according to the differences between all pixel points of each edge line in each frame of the ear grayscale image.
[0057] It should be noted that in order to analyze the matching degree of the edge structure of the ear grayscale image of the current frame and the ear grayscale image of the adjacent frame, it is necessary to first determine the feature points that make the edge have obvious changes or mutations. Therefore, the feature points of the edge can be determined by analyzing the turning points or direction change points in the chain code sequence.
[0058] According to the chain code sequence acquisition method, each edge line in each frame of the ear grayscale image is operated to obtain the ear edge line chain code sequence of each edge line in each frame of the ear grayscale image. The chain code sequence acquisition method is a well-known technology, and the specific method is not introduced here.
[0059] It should be noted that: in the process of obtaining the ear edge line chain code sequence of each edge line in each frame of the ear grayscale image, an edge pixel point closest to the upper left corner of each edge line in each frame of the ear grayscale image is taken as the starting point, and the 8-connected direction encoding is used to traverse all edge pixel points of each edge line in a clockwise order. This is described as an example.
[0060] According to the method for obtaining the derivative chain code, the ear edge line chain code sequence of each edge line in each frame of the ear grayscale image is calculated to obtain the derivative chain code sequence of each edge line in each frame of the ear grayscale image. The method for obtaining the derivative chain code is a well-known technology, and the specific method is not introduced here.
[0061] It should be noted that: in the process of calculating the ear edge line chain code sequence of each edge line in each frame of the ear grayscale image according to the derivative chain code acquisition method, the measurement is performed in multiples of 45° counterclockwise rotation.
[0062] It is further necessary to explain that: at this time, there is no change in direction for the edge pixel points whose derivative is 0, so the edge pixel points whose derivative is 0 are removed first, and the edge pixel points whose derivative is not 0 all have changes in direction angle. The more intervals there are between adjacent edge pixel points whose derivative is not 0, the more likely they are feature points. Therefore, the number of intervals there are between adjacent edge pixel points whose derivative is not 0 is used as the basis for selecting them as feature points.
[0063] The edge pixel points whose derivative chain code values in the derivative chain code sequence of each edge line in each frame of the ear grayscale image are not 0 are recorded as selected points.
[0064] First The grayscale image of the ear The edge line Take the selected point as an example. When the number of edge pixels between the first selected point and the next selected point is greater than or equal to the preset first empirical threshold, the first selected point The selected point is recorded as The first empirical threshold preset in this embodiment is 10, which is used as an example for description.
[0065] It should be noted that The above calculation is not performed for the last selected point of an edge line.
[0066] Through the above process, several feature points of each edge line of each frame of the ear grayscale image are obtained.
[0067] Step S003: Obtain the inner angle value of each feature point of each edge line of each frame of the ear grayscale image according to the distances of all adjacent feature points of each edge line of each frame of the ear grayscale image.
[0068] It should be noted that due to deformation and other factors, the edge may be enlarged or reduced, and the corresponding feature point spacing distance may change, but the shape and structure of the matching edge of the ear grayscale image of adjacent frames will not change. The shape or structure here can be understood as the inner angle formed by the feature points. Therefore, it is necessary to obtain the inner angle value of the feature point first.
[0069] First The grayscale image of the ear The edge line feature point as an example, then The grayscale image of the ear The edge line The specific calculation formula corresponding to the internal angle value of the feature point is:
[0070]
[0071] in, Indicates The grayscale image of the ear The edge line The interior angle value of feature points; Indicates The grayscale image of the ear The edge line The distance between a feature point and its first adjacent feature point; Indicates The grayscale image of the ear The edge line The distance between a feature point and its second adjacent feature point; Indicates The grayscale image of the ear The edge line The distance between two adjacent feature points; Represents the inverse sine function.
[0072] What needs to be explained is: and Proportional, The larger the value of The grayscale image of the ear The edge line The larger the inner angle value of the feature point is; and Inversely proportional, The larger the value of The grayscale image of the ear The edge line The smaller the inner angle value of each feature point is; and Inversely proportional, The larger the value of The grayscale image of the ear The edge line The smaller the inner angle value of the feature point is.
[0073] What needs to be explained is: The grayscale image of the ear The edge line When there is only one feature point adjacent to a feature point, the above operation is not performed.
[0074] Through the above process, we obtain The grayscale image of the ear The edge line The interior angle value of feature points.
[0075] Each feature point of each edge line of each frame of ear grayscale image is calculated according to the above process to obtain the inner angle value of each feature point of each edge line of each frame of ear grayscale image.
[0076] Step S004: According to the difference between the numbers of feature points of the edge lines of the ear grayscale images of adjacent frames, a number of reference matching edge lines of each edge line of each frame of the ear grayscale image are obtained; according to the difference between the inner angle values of all feature points of each edge line of each frame of the ear grayscale image and the corresponding reference matching edge line, a matching point of each feature point of each edge line of each frame of the ear grayscale image on each reference matching edge line is obtained.
[0077] It should be noted that in order to find the matching edges between the ear grayscale image of the current frame and the ear grayscale image of the adjacent frame, each edge of the ear grayscale image of the current frame needs to be matched and selected with all the edges of the ear grayscale image of the adjacent frame in turn. In this process, part of the inner angles of the edges of the ear grayscale image of the current frame and the ear grayscale image of the adjacent frame may be consistent, but the degree of structural overlap is not very large, which will affect subsequent analysis and calculations.
[0078] First The grayscale image of the ear For example, when the first edge line The grayscale image of the ear The edge line and The first When the absolute value of the difference in the number of feature points of the first edge line is less than the preset second empirical threshold, the The first The edge line is recorded as The grayscale image of the ear The reference matching edge line of the edge line. In this embodiment, the second empirical threshold preset is 5, which is used as an example for description.
[0079] The first The grayscale image of the ear The edge line and Each edge line of all the adjacent frame ear grayscale images is calculated according to the above process to obtain the first The grayscale image of the ear A number of reference matching edge lines of an edge line.
[0080] Through the above process, several reference matching edge lines of each edge line of each frame of the ear grayscale image are obtained.
[0081] It should be noted that: if the edge lines of the ear grayscale image of the previous frame and the ear grayscale image of the adjacent frame match more closely, the inner angle values between the feature points corresponding to the matching edge lines will be more consistent.
[0082] First The grayscale image of the ear The edge line feature point as an example, then The grayscale image of the ear The edge line The feature point and The grayscale image of the ear The edge line The first reference matching edge line The calculation formula for the matching degree of feature points is:
[0083]
[0084] in, Indicates The grayscale image of the ear The edge line The interior angle value of feature points; Indicates The grayscale image of the ear The edge line The first reference matching edge line The interior angle value of feature points; Indicates The grayscale image of the ear The edge line The sum of the interior angle values of a feature point and all adjacent feature points; Indicates The grayscale image of the ear The edge line The first reference matching edge line The sum of the interior angle values of a feature point and all adjacent feature points; Indicates absolute value; Represents a linear normalization function; the denominator in the formula is added with 1 to prevent the denominator from being zero.
[0085] What needs to be explained is: and Inversely proportional, The larger the value of The grayscale image of the ear The edge line The feature point and The grayscale image of the ear The edge line The first reference matching edge line The smaller the matching degree of feature points; and Inversely proportional, The larger the value of The grayscale image of the ear The edge line The feature point and The grayscale image of the ear The edge line The first reference matching edge line The smaller the matching degree of feature points.
[0086] Through the above process, we obtain The grayscale image of the ear The edge line The feature point and The grayscale image of the ear The edge line The first reference matching edge line The matching degree of feature points.
[0087] The first The grayscale image of the ear The edge line The feature point and The grayscale image of the ear Each feature point of each reference matching edge line of the edge line is calculated according to the above process to obtain the The grayscale image of the ear The edge line The feature point and The grayscale image of the ear The matching degree of each feature point of each reference matching edge line of each edge line.
[0088] Through the above process, the matching degree between each feature point of each edge line of each frame of ear grayscale image and each feature point of each reference matching edge line of each edge line of each frame of ear grayscale image is obtained.
[0089] when When the value is greater than the preset third experience threshold, The grayscale image of the ear The edge line The first reference matching edge line feature point, denoted as The grayscale image of the ear The edge line The feature point is The third empirical threshold preset in this embodiment is 0.8, which is used as an example for description.
[0090] Through the above process, we obtain The grayscale image of the ear The edge line The feature point is Several candidate matching points of a reference matching edge line.
[0091] In the The grayscale image of the ear The edge line The feature point is Among all candidate matching points of the reference matching edge line, The grayscale image of the ear The edge line The candidate matching point with the largest matching degree among the feature points is recorded as The grayscale image of the ear The edge line The feature point is The matching points of the reference matching edge line.
[0092] Through the above process, the matching point of each feature point of each edge line of each frame of ear grayscale image on each reference matching edge line is obtained.
[0093] Step S005: Obtain a number of non-illuminated edge lines of each frame of the ear grayscale image based on the difference between the number of feature points of each edge line of each frame of the ear grayscale image and the number of matching points of all feature points of each edge line on each reference matching edge line.
[0094] It should be noted that: at this time, there will be multiple matching points on each reference matching edge line in the ear grayscale image of the adjacent frame, and the number of matching points on the reference matching edge line is the same as the number of matching points on the ear grayscale image of the current frame. The more consistent the number of feature points of the edge lines, the more consistent the current reference matching edge line is with the current The higher the matching degree of the first edge line, the more likely the current reference matching edge line is. The matching edges of the edge lines.
[0095] First The grayscale image of the ear For example, the first edge line The grayscale image of the ear The edge line and The grayscale image of the ear The edge line The specific calculation formula for the edge matching degree of a reference matching edge line is:
[0096]
[0097] in, Indicates The grayscale image of the ear The edge line and The grayscale image of the ear The edge line The edge matching degree of the reference matching edge line; Indicates The grayscale image of the ear The number of feature points of the edge line; Indicates The grayscale image of the ear All feature points of the edge line are in The number of matching points of the reference matching edge line; represents the linear normalization function; Indicates absolute value.
[0098] What needs to be explained is: and Inversely proportional, The larger the value of The grayscale image of the ear The edge line and The grayscale image of the ear The edge line The smaller the edge matching degree of the reference matching edge line.
[0099] Through the above process, we obtain The grayscale image of the ear The edge line and The grayscale image of the ear The edge line The edge matching degree of the reference matching edge line.
[0100] Each edge line of each frame of ear grayscale image and each reference matching edge line of each edge line of each frame of ear grayscale image are operated according to the above process to obtain the edge matching degree of each edge line of each frame of ear grayscale image and each reference matching edge line of each edge line of each frame of ear grayscale image.
[0101] when When the value is greater than the preset fourth experience threshold, The grayscale image of the ear The edge line reference matching edge line, denoted as The grayscale image of the ear The fourth empirical threshold preset in this embodiment is 0.5, which is used as an example for description.
[0102] Through the above process, several matching edges of each edge line of each frame of ear grayscale image are obtained.
[0103] When The grayscale image of the ear When the number of matching edges of the edge line is greater than or equal to the preset matching number threshold, the first The grayscale image of the ear edge lines are recorded as non-illuminated edge lines. In this embodiment, the preset matching number threshold is 2, which is used as an example for description.
[0104] Through the above process, several non-illuminated edge lines of each frame of ear grayscale image are obtained.
[0105] Step S006: obtaining a plurality of perforated edges of each frame of the ear grayscale image according to the difference in grayscale values of adjacent pixels of each edge pixel of each non-illuminated edge line of each frame of the ear grayscale image in the gradient direction.
[0106] It should be noted that the non-illuminated edge line obtained at this time may contain the edge of the malleus generated by the malleus structure, and the grayscale difference of the pixels around the edge of the malleus is small, while the perforated area will produce a hole, so the grayscale difference on both sides of the perforated edge is large. Therefore, the possibility of it belonging to the perforated edge is determined by the grayscale difference on both sides of the edge in the ear grayscale image, so as to screen out the perforated edge.
[0107] First The grayscale image of the ear The non-illuminated edge line For example, taking the edge pixel The edge pixel is taken as the starting point, and the The gradient direction and the reverse direction of the gradient direction of the edge pixel are respectively selected from the front pixels, and construct them into sequences according to the selection order. The two sequences are recorded as The left sequence and right sequence of edge pixels. is a preset quantity threshold. The preset quantity threshold in this embodiment is The value is 5, and this is used as an example for description.
[0108] What needs to be explained is: There are not enough pixels in the left or right sequence of edge pixels When , the analysis is performed based on the pixels that can be selected.
[0109] Through the above process, a left sequence and a right sequence of each edge pixel point of each non-illuminated edge line of each frame of ear grayscale image are obtained.
[0110] The first The specific calculation formula corresponding to the possibility that the dth non-illuminated edge line of the frame ear grayscale image is a perforated edge is:
[0111]
[0112] in, Indicates The grayscale image of the ear The possibility that a non-illuminated edge line is a perforated edge; Indicates The grayscale image of the ear The non-illuminated edge line The sum of the grayscale values of all pixels in the left sequence of edge pixels; Indicates The grayscale image of the ear The non-illuminated edge line The sum of the grayscale values of all pixels in the right sequence of edge pixels; Indicates The grayscale image of the ear The number of pixels on the non-illuminated edge line; represents the linear normalization function; Indicates absolute value.
[0113] What needs to be explained is: Indicates the grayscale difference between the pixels on both sides of the current edge point. The greater the grayscale difference, the The grayscale image of the ear The more likely a non-illuminated edge line is a perforated edge.
[0114] Through the above process, we obtain The grayscale image of the ear The probability that a non-illuminated edge line is a perforated edge.
[0115] Each non-illuminated edge line of each frame of ear grayscale image is operated according to the above process to obtain the possibility that each non-illuminated edge line of each frame of ear grayscale image is a perforated edge.
[0116] when When it is greater than the preset fifth experience threshold, The grayscale image of the ear The non-illuminated edge line is recorded as the perforated edge. The fifth empirical threshold preset in this embodiment is 0.5, which is used as an example for description.
[0117] Through the above process, several perforated edges of each frame of ear grayscale image are obtained.
[0118] Storing grayscale images of ears with perforated edges in a database can help cultivate the skills of new doctors and improve the diagnostic accuracy and treatment effects of doctors on various ear diseases by establishing an image database and recording the diagnosis and treatment experience of doctors.
[0119] So far, the present invention is completed.
[0120] In summary, in an embodiment of the present invention, in a sequence of ear grayscale images, a plurality of edge lines in each frame of the ear grayscale image and the gradient direction of each edge pixel are obtained. A plurality of feature points are obtained based on the difference in the pixel points on the edge line, and the inner angle value of the feature point is calculated. According to the difference in the number of feature points of the edge lines of adjacent frames of ear grayscale images, a reference matching edge line is obtained, and a matching point is further obtained. According to the difference between the number of matching points of the feature points of each edge line and the reference matching edge line, a non-illuminated edge line is obtained. According to the difference in the grayscale values of the pixel points adjacent to each edge pixel point of each non-illuminated edge line, the perforated edge of each frame of the ear grayscale image is obtained.
[0121] The present invention also provides an intelligent segmentation system for ENT examination images, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program stored in the memory to implement the steps of the aforementioned intelligent segmentation method for ENT examination images.
[0122] 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 principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An intelligent segmentation method for ENT examination images, characterized in that: The method comprises the following steps: Acquire a sequence of ear grayscale images; in the sequence of ear grayscale images, acquire a plurality of edge lines in each frame of the ear grayscale image and a gradient direction of each edge pixel point; According to the differences between all the pixel points of each edge line in each frame of the ear grayscale image, a plurality of feature points of each edge line in each frame of the ear grayscale image are obtained; According to the distances of all adjacent feature points of each edge line of each frame of ear grayscale image, the inner angle value of each feature point of each edge line of each frame of ear grayscale image is obtained; According to the difference between the number of feature points of the edge lines of the ear grayscale images of adjacent frames, a plurality of reference matching edge lines of each edge line of each frame of the ear grayscale image are obtained; according to the difference between the inner angle values of all feature points of each edge line of each frame of the ear grayscale image and each corresponding reference matching edge line, a matching point of each feature point of each edge line of each frame of the ear grayscale image on each reference matching edge line is obtained; According to the difference between the number of feature points of each edge line of each frame of ear grayscale image and the number of matching points of all feature points of each edge line in each reference matching edge line, a plurality of non-illuminated edge lines of each frame of ear grayscale image are obtained; According to the difference in grayscale values of each edge pixel point of each non-illuminated edge line of each frame of ear grayscale image and the pixel points adjacent to each other in the gradient direction, a plurality of perforated edges of each frame of ear grayscale image are obtained; The method of obtaining a plurality of feature points of each edge line in each frame of the ear grayscale image according to the differences between all pixel points of each edge line in each frame of the ear grayscale image comprises the following specific steps: According to the chain code sequence acquisition method, each edge line in each frame of the ear grayscale image is operated to obtain the ear edge line chain code sequence of each edge line in each frame of the ear grayscale image; The ear edge line chain code sequence of each edge line in each frame of the ear grayscale image is calculated according to the derivative chain code acquisition method to obtain the derivative chain code sequence of each edge line in each frame of the ear grayscale image; The edge pixel points whose derivative chain code values in the derivative chain code sequence of each edge line in each frame of the ear grayscale image are not 0 are recorded as selected points; In the The grayscale image of the ear Among the edge lines, when the When the number of edge pixels between the first selected point and the next selected point is greater than or equal to the preset first empirical threshold, the first selected point The selected point is recorded as Feature points of edge lines; The method of obtaining a plurality of perforated edges of each frame of ear grayscale image according to the difference in grayscale values of adjacent pixels of each edge pixel point of each non-illuminated edge line of each frame of ear grayscale image in the gradient direction comprises the following specific steps: In the The grayscale image of the ear On the non-illuminated edge line, The edge pixel is taken as the starting point, and the The gradient direction and the reverse direction of the gradient direction of the edge pixel are respectively selected from the front pixels, and construct them into sequences according to the selection order. The two sequences are recorded as The left sequence and right sequence of edge pixels; among them, is a preset quantity threshold; According to the difference in the grayscale values of the pixel points in the left sequence and the right sequence of each edge pixel point of each non-illuminated edge line of each frame of the ear grayscale image, the possibility that each non-illuminated edge line of each frame of the ear grayscale image is a perforated edge is obtained; when When it is greater than the preset fifth experience threshold, The grayscale image of the ear non-illuminated edge lines are recorded as perforated edges; among them, For the The grayscale image of the ear The possibility that a non-illuminated edge line is a perforated edge; According to the difference in the grayscale values of the pixel points in the left sequence and the right sequence of each edge pixel point of each non-illuminated edge line of each frame of the ear grayscale image, the specific calculation formula corresponding to the possibility that each non-illuminated edge line of each frame of the ear grayscale image is a perforated edge is obtained as follows: in, Indicates The grayscale image of the ear The non-illuminated edge line The sum of the grayscale values of all pixels in the left sequence of edge pixels; Indicates The grayscale image of the ear The non-illuminated edge line The sum of the grayscale values of all pixels in the right sequence of edge pixels; Indicates The grayscale image of the ear The number of pixels on the non-illuminated edge line; represents the linear normalization function; Indicates absolute value.
2. According to claim 1, the method for intelligent segmentation of ENT examination images is characterized in that: The specific calculation formula corresponding to the inner angle value of each feature point of each edge line of each frame of ear grayscale image is obtained according to the distances of all adjacent feature points of each edge line of each frame of ear grayscale image: in, Indicates The grayscale image of the ear The edge line The interior angle value of feature points; Indicates The grayscale image of the ear The edge line The distance between a feature point and its first adjacent feature point; Indicates The grayscale image of the ear The edge line The distance between a feature point and its second adjacent feature point; Indicates The grayscale image of the ear The edge line The distance between two adjacent feature points; Represents the inverse sine function.
3. According to claim 1, the method for intelligent segmentation of ENT examination images is characterized in that: The method of obtaining a plurality of reference matching edge lines of each edge line of each frame of the ear grayscale image according to the difference in the number of feature points of the edge lines of adjacent frames of the ear grayscale image comprises the following specific steps: When The grayscale image of the ear The edge line and The first When the absolute value of the difference in the number of feature points of the first edge line is less than the preset second empirical threshold, the The first The edge line is recorded as The grayscale image of the ear The reference matching edge line of each edge line.
4. The method for intelligent segmentation of ENT examination images according to claim 1, characterized in that: The specific steps of obtaining the matching points of each feature point of each edge line of each frame of ear grayscale image at each reference matching edge line according to the difference between the inner angle values of all feature points of each edge line of each frame of ear grayscale image and the corresponding reference matching edge line are as follows: According to the difference between the inner angle values of all the feature points of each edge line of each frame of ear grayscale image and each corresponding reference matching edge line, the matching degree of each feature point of each edge line of each frame of ear grayscale image and each feature point of each reference matching edge line of each edge line of each frame of ear grayscale image is obtained; The first The grayscale image of the ear The mth feature point of the edge line and the The grayscale image of the ear The edge line The first reference matching edge line The matching degree of feature points is ,when When the value is greater than the preset third experience threshold, The grayscale image of the ear The edge line The first reference matching edge line feature point, denoted as The grayscale image of the ear The edge line The feature point is Candidate matching points of reference matching edge lines; In the The grayscale image of the ear The edge line The feature point is Among all candidate matching points of the reference matching edge line, The grayscale image of the ear The edge line The candidate matching point with the largest matching degree among the feature points is recorded as The grayscale image of the ear The edge line The feature point is The matching points of the reference matching edge line.
5. The method for intelligent segmentation of ENT examination images according to claim 4, characterized in that: According to the difference between the inner angle values of all feature points of each edge line of each frame of ear grayscale image and each corresponding reference matching edge line, the specific calculation formula corresponding to the matching degree of each feature point of each edge line of each frame of ear grayscale image and each feature point of each reference matching edge line of each edge line of each frame of ear grayscale image is obtained as follows: in, Indicates The grayscale image of the ear The edge line The interior angle value of feature points; Indicates The grayscale image of the ear The edge line The first reference matching edge line The interior angle value of feature points; Indicates The grayscale image of the ear The edge line The sum of the interior angle values of a feature point and all adjacent feature points; Indicates The grayscale image of the ear The edge line The first reference matching edge line The sum of the interior angle values of a feature point and all adjacent feature points; Indicates absolute value; represents the linear normalization function.
6. The method for intelligent segmentation of ENT examination images according to claim 1, characterized in that: The method of obtaining a plurality of non-illuminated edge lines of each frame of the ear grayscale image according to the difference between the number of feature points of each edge line of each frame of the ear grayscale image and the number of matching points of all feature points of each edge line on each reference matching edge line comprises the following specific steps: According to the difference between the number of feature points of each edge line of each frame of ear grayscale image and the number of matching points of all feature points of each edge line on each reference matching edge line, the specific calculation formula corresponding to the edge matching degree of each edge line of each frame of ear grayscale image and each reference matching edge line of each edge line of each frame of ear grayscale image is obtained as follows: in, Indicates The grayscale image of the ear The edge line and The grayscale image of the ear The edge line The edge matching degree of the reference matching edge line; Indicates The grayscale image of the ear The number of feature points of the edge line; Indicates The grayscale image of the ear All feature points of the edge line are in The number of matching points of the reference matching edge line; represents the linear normalization function; Indicates absolute value; when When the value is greater than the preset fourth experience threshold, The grayscale image of the ear The edge line reference matching edge line, denoted as The grayscale image of the ear Matching edges of edge lines; When The grayscale image of the ear When the number of matching edges of the edge line is greater than or equal to the preset matching number threshold, the first The grayscale image of the ear edge lines are recorded as non-illuminated edge lines.
7. An intelligent segmentation system for ENT examination images, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the method for intelligent segmentation of ENT examination images as described in any one of claims 1 to 6 are implemented.
