Oral and maxillofacial lesion positioning method and system based on machine vision

By performing intensity normalization and multi-scale structural tensor analysis on oral and maxillofacial images, corner responses are constructed and axis-aligned candidate rectangles are generated. This solves the problems of high missed diagnosis, high misdiagnosis rate and low efficiency in oral lesion detection in existing technologies, and achieves high-precision and low-redundancy lesion localization.

CN121564307AInactive Publication Date: 2026-02-24HUNAN PROVINCIAL PEOPLES HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610080267.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-21
Publication Date
2026-02-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies suffer from problems such as high rates of missed diagnoses and misdiagnoses, as well as low efficiency in the detection of oral and maxillofacial lesions. Furthermore, existing methods struggle to recognize multi-scale and non-uniform texture structures, and deep learning methods lack interpretability in oral image recognition scenarios, making them difficult to implement.

Method used

By normalizing the intensity and organizing the scale of oral and maxillofacial images, the local structure is expressed at multiple scales using gradient and structural tensor. After constructing corner responses, cross-scale fusion and normalization enhancement are performed to generate axis-aligned candidate rectangles. Scoring and output are completed using full-image statistical thresholds.

Benefits of technology

It achieves high-precision, low-redundancy localization of oral and maxillofacial lesions, adapts to different imaging conditions, reduces the impact of uneven illumination and reflection artifacts, and improves the stability and accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121564307A_ABST
    Figure CN121564307A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of medical image processing and analysis, and discloses an oral and maxillofacial lesion positioning method and system based on machine vision, and the method comprises the steps: obtaining an oral and maxillofacial gray scale matrix, taking the minimum / maximum gray scale of a whole image, and carrying out the linear normalization; solving transverse and longitudinal difference of each pixel, and symmetrically extending the boundary to obtain the amplitude and the direction; setting a multi-scale hierarchy, and performing neighborhood averaging on gradient square and product in a square neighborhood to construct a structure tensor; solving trace of each scale and obtaining angular point response of a determinant, taking pixel-level maximum fusion, and performing normalization enhancement by using a local mean value and a standard deviation; local maxima is made in eight neighborhoods, and parallelization is carried out in a lexicographical order to obtain an angular point set; setting a self-adaptive distance threshold according to nearest neighbor statistics, searching a set, clustering, and generating an axis alignment bounding box; and calculating significance scores of the candidate regions, and screening and outputting or judging that the candidate regions are not detected according to a total-graph statistical threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image processing and analysis technology, specifically to a method and system for locating oral and maxillofacial lesions based on machine vision. Background Technology

[0002] Oral and maxillofacial diseases are numerous, including but not limited to oral cancer, leukoplakia, erythroplakia, submucosal fibrosis, early ulcers, and various mucosal lesions. Early detection and accurate localization of these lesions are of paramount clinical significance for improving patient cure rates and reducing treatment costs. Currently, the detection of oral and maxillofacial lesions mainly relies on clinicians' visual observation and experience, supplemented by medical images obtained from equipment such as oral endoscopes. Traditional manual assessment methods are limited by the differences in individual physician experience and subjective judgment, easily leading to missed diagnoses, misdiagnoses, and delayed identification of early, minute lesions. Furthermore, manual analysis is inefficient and lacks repeatability when dealing with large volumes of image data, failing to meet the demands of modern clinical practice for efficient and accurate auxiliary diagnosis.

[0003] With the development of medical imaging technology, computer vision and image processing methods are gradually being applied to the field of stomatology. Existing image-assisted diagnostic methods mostly employ edge detection, threshold segmentation, texture analysis, and machine learning. Some schemes utilize traditional edge operators such as Sobel and Canny to detect structural boundaries in images. However, due to the complexity and diversity of oral tissues and the fluctuation of imaging conditions, these methods are often sensitive to noise and struggle to achieve good recognition results for multi-scale, non-uniform texture structures. In recent years, some studies have introduced feature point detection (such as Harris corner detection and SIFT) and multi-scale analysis frameworks, but most methods rely on existing models, general parameters, or external priors, lacking adaptability to oral scenarios and highly customized mathematical expressions, and failing to fully explore the coupling relationship between the inherent structural changes in the image and lesion boundaries. Furthermore, while existing deep learning and large-model methods have achieved good results in some image recognition scenarios, the difficulty in obtaining oral image samples, high annotation costs, strong lesion diversity, and problems such as noise, reflection, and occlusion in real-world scenarios result in insufficient interpretability of existing black-box algorithms, making them difficult to implement.

[0004] Therefore, this case aims to propose a machine vision-based method and system for locating oral and maxillofacial lesions. First, the oral and maxillofacial images are normalized in intensity and scaled. Then, the local structure is expressed at multiple scales through gradient and structural tensor. After constructing corner responses, cross-scale fusion and normalization enhancement are performed. Then, a stable set of corner points is formed by the eight neighborhood maxima. Finally, axis-aligned candidate rectangles are generated by clustering driven by nearest neighbor statistics, and the scoring and output are completed by full-image statistical threshold. Summary of the Invention

[0005] This invention provides a machine vision-based method and system for locating oral and maxillofacial lesions, which helps to solve the problems mentioned in the background art.

[0006] This invention provides the following technical solution: a method for locating oral and maxillofacial lesions based on machine vision, comprising: Obtain the original grayscale matrix of the oral and maxillofacial region, acquire the minimum and maximum grayscale values ​​of the entire image, and perform linear normalization on each pixel to form a unit interval grayscale matrix. For each pixel, calculate the difference in the horizontal and vertical directions, apply the symmetric extension difference rule at the boundary position, and obtain the gradient magnitude and orientation angle. Set the scale level, and perform neighborhood averaging on the gradient square and product of the squared neighborhood to form the structural tensor components corresponding to the scale level and pixel position. The tracer and determinant of the structural tensor are calculated at each scale level, and the corner response map is obtained according to the predetermined response form. Pixel-level fusion results are obtained based on the response at each scale level, and normalization enhancement is completed by combining local mean and local standard deviation; Local maxima are determined within the eight-neighborhood and the case of adjacent pixels is handled to generate a set of corner point positions; Based on the statistical results of nearest neighbor distance, a clustering distance threshold is set, disjoint-set clustering is implemented, and an axis-aligned minimum bounding rectangle is generated for each cluster. Calculate the significance score for each lesion candidate region, filter and output the set of lesion localization regions based on the score threshold, or give the conclusion that no lesions were detected.

[0007] Optionally, obtaining the original grayscale matrix of the oral and maxillofacial region, acquiring the minimum and maximum grayscale values ​​of the entire image, and performing linear normalization on each pixel to form a unit interval grayscale matrix specifically includes: The oral and maxillofacial grayscale images are acquired using a standard oral endoscope, and the total number of rows and columns of the images are recorded to form an original grayscale matrix located by row index and column index. Iterate through all pixels in the image and obtain the minimum and maximum gray levels of the entire image. When the maximum gray level is not equal to the minimum gray level, perform linear interval mapping on each pixel to normalize the original gray level to a unit interval based on the minimum and maximum gray levels of the entire image; when the maximum gray level is equal to the minimum gray level, set the gray level of all pixels to zero. Output a grayscale matrix for a unit interval.

[0008] Optionally, the step of calculating the difference in the horizontal and vertical directions for each pixel, applying a symmetrical extension difference rule at the boundary positions, and obtaining the gradient magnitude and orientation angle specifically includes: At each non-boundary pixel, the difference between the gray values ​​of the adjacent right column and the left column in the same row is taken as the horizontal difference, and the difference between the adjacent down column gray values ​​and the up column gray values ​​in the same column is taken as the vertical difference. Symmetrical extension difference is used in the first row, last row, first column, and last column to generate horizontal and vertical differences based on mirror pixels; For each pixel, first sum the squares of the horizontal and vertical differences and then take the square root to obtain the gradient magnitude; then perform arctangent calculation on the ratio of the vertical to the horizontal difference and superimpose the numerical stability constant to obtain the orientation angle. Output gradient magnitude and orientation angle plots.

[0009] Optionally, the step of setting the scale hierarchy and averaging the gradient square and product in a square-cropped neighborhood to form the structural tensor component corresponding to the scale hierarchy and pixel position specifically includes: Set the total number of scale levels and specify a square clipping neighborhood window with an odd number of side lengths for each scale level; At each scale level and at each pixel location, a square cropping neighborhood centered on the pixel is constructed. When the image boundary is close, the image range is cropped and the number of neighboring pixels is counted. Within the square cropping neighborhood, pixel averaging is performed on the squared horizontal gradient, the squared vertical gradient, and the product of the horizontal and vertical gradients to obtain three neighborhood statistics. By using three neighborhood statistics as structural tensor components corresponding to the scale level and pixel location, a multi-scale structural tensor map is constructed.

[0010] Optionally, the step of finding the trace and determinant of the structural tensor at each scale level and obtaining the corner response map according to a predetermined response form specifically includes: At each scale level and at each pixel location, the trace and determinant operations are performed on the structure tensor to obtain two scalars: the trace and the determinant. The corner response is expressed by subtracting the square of the trace weighted by a preset coefficient from the determinant, and a corner response map at the scale level is generated pixel by pixel. Output corner response maps at all scale levels.

[0011] Optionally, the step of taking pixel-level fusion results according to the response at each scale level and combining local mean and local standard deviation to complete normalization enhancement specifically includes: The maximum value of the corner response obtained for the same pixel at all scale levels is taken to generate a fused response map; Construct a 3x3 cropping neighborhood centered on each pixel, and calculate the local mean and local standard deviation of the fusion response within the cropping neighborhood; Normalization enhancement is performed on each pixel, and the fused response is subtracted from the local mean and then scaled by the local standard deviation plus a constant to generate a normalized corner saliency map. Output a normalized corner saliency map.

[0012] Optionally, the step of determining local maxima within the eight-neighborhood and processing adjacent pixel cases to generate a set of corner positions specifically includes: Using eight neighboring regions as the detection window, the local maxima of the normalized corner point saliency are determined, and the neighboring pixels are compared after excluding the center pixel itself. When there are parallel pixels with the same saliency as the center pixel, select the unique representative by comparing the row number first and then the column number in lexicographical order, and do not retain the others; All the retained maximum pixels are used to form a set of corner point positions, and the row and column coordinates of each corner point are recorded. Count the total number of corner points, and record the case where there are no corner points when the total number of corner points is zero; Output the set of corner locations and their quantity.

[0013] Optionally, the step of setting a clustering distance threshold based on the statistical results of nearest neighbor distances, implementing disjoint-set clustering, and generating axis-aligned minimum bounding rectangles for each cluster specifically includes: Calculate the Euclidean distance between pixels for any two corner points and construct a distance set; For each corner point, obtain the nearest neighbor distance from the other corner points to form a nearest neighbor distance sequence; when the number of corner points is zero, end the clustering and record the number of clusters and the threshold as zero; when the number of corner points is one, record the nearest neighbor distance of the unique corner point as an infinite placeholder. Arrange the nearest neighbor distance sequence in ascending order and set the clustering distance threshold according to the 80th percentile linear interpolation rule; Corner points are processed sequentially according to their numbers. If the distance between the current corner point and any existing member in a cluster is not greater than the clustering distance threshold, it is merged into an existing cluster that meets the condition. If multiple clustering conditions are met, the cluster with the smallest number is merged. If the merging conditions are not met, a new cluster is created and assigned an incrementing cluster number. For each cluster, the minimum and maximum values ​​of row coordinates and column coordinates of the corner points within the cluster are calculated, and an axis-aligned minimum bounding rectangle is generated; when a cluster contains only one corner point, the minimum bounding rectangle degenerates into the corresponding corner point pixels; The set of all candidate rectangles is denoted as the lesion candidate region set, and the lesion candidate region set is output.

[0014] Optionally, the step of calculating the saliency score of each lesion candidate region, filtering and outputting a set of lesion localization regions based on the score threshold, or giving a conclusion of no detection, specifically includes: The pixel mean of the normalized corner saliency within each lesion candidate region is calculated to obtain the saliency score of the corresponding lesion candidate region. Calculate the global mean and global standard deviation of the normalized corner significance across the entire map, and set the score threshold by the sum of the two. When the significance score of the corresponding lesion candidate region is not less than the score threshold, the lesion candidate region is retained as the lesion localization region; when the significance score is less than the score threshold, the lesion candidate region is removed. All retained lesion candidate regions are summarized as a lesion localization region set; when the lesion localization region set is empty or the number of corner points is zero, the conclusion that no lesion localization region meeting the significance requirement was detected in this image is output.

[0015] A system for implementing the machine vision-based method for locating oral and maxillofacial lesions includes: The image acquisition unit receives grayscale images of the oral and maxillofacial region, records the total number of rows and columns of the image, obtains the minimum and maximum grayscale values ​​of the entire image, performs linear interval mapping, and outputs a unit interval grayscale matrix. The gradient and direction calculation unit receives the gray-level matrix of the unit interval, calculates the horizontal and vertical differences, performs symmetric extension difference at the boundary position, calculates the gradient magnitude and direction angle, and outputs the gradient magnitude map and direction angle map. A multi-scale structural tensor unit receives a unit interval grayscale matrix, sets the scale level and square clipping neighborhood, and performs neighborhood pixel averaging on the squared horizontal difference, squared vertical difference, and their product at each scale level and each pixel position to generate and output a structural tensor component map. The corner response calculation unit receives the structural tensor component map, calculates the trace and determinant, generates the corner response map and outputs it. The multi-scale response fusion and normalization enhancement unit receives corner response maps at each scale level, performs pixel-level maximization fusion, calculates the local mean and local standard deviation of the three-by-three local region, performs normalization enhancement, and outputs a normalized corner saliency map. The extreme value extraction unit receives the normalized corner saliency map, performs eight-neighbor local maximum detection and parallel pixel lexicographical order selection, and outputs the set of corner positions and the number of corners. The clustering and region generation unit receives a set of corner locations, calculates the nearest neighbor distance sequence and sets a clustering distance threshold, performs disjoint-set clustering, calculates the row and column coordinate ranges of each cluster, generates an axis-aligned minimum bounding rectangle, and outputs a set of lesion candidate regions. The scoring and output unit receives a set of candidate lesion regions, calculates the significance score of each candidate lesion region, calculates the global mean and global standard deviation of the normalized corner significance across the entire map, sets a score threshold, and filters and outputs a set of lesion location regions or a conclusion that no lesions were detected. The storage and control module receives data output from each unit, performs parameter management, process scheduling and data exchange, and maintains the sequential execution and result recording of each unit.

[0016] The present invention has the following beneficial effects: 1. This solution proposes to directly acquire the original grayscale matrix using a standard endoscope during the oral and maxillofacial image acquisition stage. Based on this, the minimum and maximum values ​​of the entire image are simultaneously calculated, and an online mapping method is used to map the grayscale values ​​to a unified unit interval. Unlike previous methods that only performed basic denoising or contrast stretching, this method considers global statistical extrema before grayscale mapping, making subsequent gradient calculations more adaptable to different shooting conditions. By closely integrating image normalization with global extrema statistics, this method solves the practical problems of uneven illumination and large reflection differences in the field of view of oral endoscopes, ensuring stable operation of subsequent gradient and feature extraction stages under different grayscale distributions.

[0017] 2. Based on grayscale normalization, this scheme simultaneously calculates the horizontal and vertical differences for each pixel and employs a mirror continuation strategy at image boundaries to compensate for edge information. Symmetrical continuation is performed on boundary pixels without zero-padding or truncating the differences, maximizing the preservation of edge gradient information and reducing the interference of boundary effects on gradient magnitude and direction calculations. Furthermore, by acquiring gradient magnitude and direction angles in parallel, richer local information is provided for subsequent structural tensor construction, enabling more accurate characterization of corner features. This effectively solves the problem of gradient discontinuity and loss in the edge regions of oral cavity images, providing a reliable foundation for subsequent multi-scale analysis.

[0018] 3. This scheme introduces a multi-scale structural tensor framework. For each pixel, a square neighborhood is constructed at a preset scale level. The average of the squared horizontal gradient, squared vertical gradient, and their product is calculated to form tensor components. Combining multi-scale analysis and local statistics, minute details are fused with overall structural information, enabling the simultaneous capture of texture and edge features of different sizes and intensities. Compared with traditional single-scale structural tensors, this method avoids the difficulty of scale selection through multi-level neighborhood clipping, improving adaptability to various lesion morphologies.

[0019] 4. Based on multi-scale structural tensors, this scheme uses a predetermined response function to calculate the corner response value at each pixel, i.e., calculating the response intensity based on the tensor's trace and determinant. By combining tensor statistical information at different scales, it avoids the response bias towards noise or smooth regions at a single scale, while utilizing a unique response representation to highlight high-curvature points in lesion areas. This design solves the problem that lesion edges in oral images are easily interfered with by noise or texture pseudo-responses, making detection more selective for true corner points and providing accurate candidates for subsequent saliency fusion.

[0020] 5. This scheme proposes pixel-level maximization fusion of corner responses at various scale levels, followed by the construction of small-sized cropped neighborhood statistical local means and standard deviations at each fused pixel, and finally normalization of the enhanced response map. This innovative combination of fusion and local statistics unifies global scale information and local contrast enhancement to the same pixel, improving the distinction between salient points and non-lesion areas. Unlike traditional simple thresholding or linear amplification, this method adaptively adjusts the response intensity, resolving misjudgments of salient points caused by complex reflections and light spot artifacts within the oral cavity, thus improving detection accuracy and stability.

[0021] 6. For the normalized saliency map, this scheme uses an eight-neighborhood window for local maxima detection and retains a unique representative when there are parallel candidate points, following a lexicographical order of row-first, column-second. This accurately handles parallel points with the same luminance, avoids repeated localization of the same region, and improves the sparsity of candidate points. Unlike previous simple threshold screening or non-maximum suppression, this strategy effectively reduces redundancy while maintaining detection sensitivity, and provides a reliable set of discrete corner points for densely reflective areas or connected lesion edges in oral images, thus laying an accurate and low-redundancy input foundation for subsequent clustering and segmentation.

[0022] 7. This scheme adaptively sets the clustering distance threshold based on the nearest neighbor distance statistics for each corner point, and uses disjoint-set data structure (disjoint-set data structure) to cluster based on distance, ultimately generating an axis-aligned minimum bounding rectangle for each cluster. It innovatively introduces percentile linear interpolation to set the threshold, eliminating the need for manual parameter tuning; the disjoint-set data structure efficiently enables dynamic cluster merging, supporting large-scale parallel processing of corner points. Compared with traditional spatial clustering algorithms, this method can adapt to different lesion densities and flexibly adjust when corner points are sparse or excessively dense, solving the practical challenge of varying sizes and densities in oral lesion regions and achieving robust candidate region segmentation.

[0023] 8. This scheme calculates the pixel mean of the normalized saliency within each candidate rectangular region to obtain a regional saliency score. A unified score threshold is then set using the sum of the statistical mean and standard deviation of the overall image saliency to make the retention or rejection decision. This innovative approach combines the score threshold with global statistics, eliminating the need for prior knowledge or manual annotation and achieving automated threshold generation. Compared to fixed thresholds and manual tuning, this method balances overall image contrast with local uniformity, significantly improving the universality and accuracy of detection. It effectively solves the regional scoring bias caused by lighting differences and reflection artifacts in oral images, achieving highly reliable final lesion localization output. Attached Figure Description

[0024] Figure 1 This is a schematic diagram of the process of the present invention. Detailed Implementation

[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] Example, refer to Figure 1 A machine vision-based method for locating oral and maxillofacial lesions includes: Obtain the original grayscale matrix of the oral and maxillofacial region, acquire the minimum and maximum grayscale values ​​of the entire image, and perform linear normalization on each pixel to form a unit interval grayscale matrix. For each pixel, calculate the difference in the horizontal and vertical directions, apply the symmetric extension difference rule at the boundary position, and obtain the gradient magnitude and orientation angle. Set the scale level, and perform neighborhood averaging on the gradient square and product of the squared neighborhood to form the structural tensor components corresponding to the scale level and pixel position. The tracer and determinant of the structural tensor are calculated at each scale level, and the corner response map is obtained according to the predetermined response form. Pixel-level fusion results are obtained based on the response at each scale level, and normalization enhancement is completed by combining local mean and local standard deviation; Local maxima are determined within the eight-neighborhood and the case of adjacent pixels is handled to generate a set of corner point positions; Based on the statistical results of nearest neighbor distance, a clustering distance threshold is set, disjoint-set clustering is implemented, and an axis-aligned minimum bounding rectangle is generated for each cluster. Calculate the significance score for each lesion candidate region, filter and output the set of lesion localization regions based on the score threshold, or give the conclusion that no lesions were detected.

[0027] By acquiring the minimum and maximum gray levels across the entire image and performing linear normalization on each pixel, the original gray levels are mapped to a unified range, solving the problem of gray level range differences caused by uneven illumination in oral endoscope images and ensuring that subsequent gradient and feature extraction are on the same numerical scale. Next, a symmetric extension difference rule is used to calculate the difference in the horizontal and vertical directions at the boundary, effectively preserving edge information and avoiding boundary artifacts caused by conventional zero-filling. Then, structural tensors are constructed at multiple scale levels, and the squares and products of local gradients at different scales are averaged in the neighborhood, taking into account both subtle textures and global structure, preventing the inability of a single scale to accurately capture various lesion features. Finally, by calculating the trace and determinant of the tensor, a corner response function is constructed to highlight high curvature regions, achieving... This method achieves accurate localization of lesion edge corners. After fusing responses at multiple scales, it uses local statistical means and standard deviations for normalization enhancement, adaptively improving the contrast between significant corners and the background, avoiding the difficulty of a fixed threshold in encompassing different regions. Based on this, it employs eight-neighbor local maxima detection and lexicographical selection to choose a unique representative point, eliminating parallel pseudo-responses and obtaining a sparse yet accurate set of corner locations. Then, it adaptively sets a clustering threshold based on nearest neighbor distance and uses a lookup-based clustering method to automatically combine discrete corners according to spatial proximity and generate axis-aligned rectangles, transforming feature corners into continuous candidate regions. Finally, it calculates the saliency score of each candidate region and filters them based on the overall image statistical score threshold, eliminating noisy regions and outputting the final lesion localization region set or a no-detection conclusion. This method maximally solves several practical problems in oral images, such as uneven illumination, loss of boundary information, difficulty in scale selection, cumbersome threshold setting, and pseudo-response noise interference. Furthermore, through multi-scale fusion and adaptive statistical methods, it achieves higher accuracy in localization results.

[0028] The process of obtaining the original grayscale matrix of the oral and maxillofacial region, acquiring the minimum and maximum grayscale values ​​of the entire image, and performing linear normalization on each pixel to form a unit interval grayscale matrix specifically includes: The oral and maxillofacial grayscale images are acquired using a standard oral endoscope, and the total number of rows and columns of the images are recorded to form an original grayscale matrix located by row index and column index. Iterate through all pixels in the image and obtain the minimum and maximum gray levels of the entire image. When the maximum gray level is not equal to the minimum gray level, perform linear interval mapping on each pixel to normalize the original gray level to a unit interval based on the minimum and maximum gray levels of the entire image; when the maximum gray level is equal to the minimum gray level, set the gray level of all pixels to zero. Output a grayscale matrix for a unit interval.

[0029] Further specific implementation steps include: Oral and maxillofacial image data were acquired using a standard oral endoscope to obtain the original grayscale image matrix, denoted as . ;in, For row index is Column index is The original grayscale value at the pixel; For pixel row numbers, the set of values ​​is: ; For the pixel column number, the set of values ​​is: ; The total number of rows in the image; This represents the total number of columns in the image. The minimum and maximum pixel values ​​in the entire image are calculated and denoted as follows: , ;in, This represents the minimum original gray level of the entire image; This represents the maximum original gray level of the entire image; The image is linearly normalized to obtain a unit interval image matrix, specifically: ;in, For the normalized first line, number The grayscale value of the column pixels.

[0030] First, a unified grayscale range eliminates fluctuations in brightness and contrast under different shooting conditions, making images from different patients, different endoscope settings, or different lighting conditions comparable. Second, linear mapping is not only simple and efficient, but also judges extreme values, directly setting the minimum value to zero when it equals the maximum value, avoiding division by zero anomalies and image blankness. Third, by performing full-image statistics during the acquisition stage, no subsequent manual calibration or local preprocessing is required, significantly improving the system's automation level. Finally, this normalization process provides a unified grayscale basis for subsequent gradient calculations, improving the stability of edge and feature responses, especially in the complex textures inside the oral and maxillofacial region, better distinguishing lesion areas from normal tissues, and reducing the possibility of false positives and false negatives.

[0031] The process of calculating the horizontal and vertical differences for each pixel, applying a symmetrical extension difference rule at the boundary positions, and obtaining the gradient magnitude and orientation angle specifically includes: At each non-boundary pixel, the difference between the gray values ​​of the adjacent right column and the left column in the same row is taken as the horizontal difference, and the difference between the adjacent down column gray values ​​and the up column gray values ​​in the same column is taken as the vertical difference. Symmetrical extension difference is used in the first row, last row, first column, and last column to generate horizontal and vertical differences based on mirror pixels; For each pixel, first sum the squares of the horizontal and vertical differences and then take the square root to obtain the gradient magnitude; then perform arctangent calculation on the ratio of the vertical to the horizontal difference and superimpose the numerical stability constant to obtain the orientation angle. Output gradient magnitude and orientation angle plots.

[0032] Further specific implementation steps include: For normalized images For each pixel, the horizontal and vertical gradients are calculated as follows: , ;in, For pixels Horizontal grayscale difference; For pixels Vertical grayscale difference; Symmetrical extension difference is used at the boundary pixels, specifically: when season ; when season ; when season ; when season ; Calculate the pixel gradient magnitude and orientation angle separately, as follows: , ;in, For pixels The gradient magnitude; For pixels The gradient direction angle; It is a non-zero constant.

[0033] On the one hand, the symmetric extension strategy avoids gradient distortion caused by zero-filling or edge truncation, ensuring that the gradient calculation of boundary pixels remains consistent with that of internal pixels, preventing edge lesions from being missed or falsely detected. On the other hand, by calculating both amplitude and orientation angle, a more complete local gradient description is provided for subsequent structural tensor components, enhancing the ability to distinguish high curvature points. Furthermore, the introduction of a numerical stability constant in the orientation angle calculation effectively avoids division by zero or numerical oscillation problems caused by the difference ratio, ensuring stable operation in complex grayscale distributions and noisy environments. More importantly, this method obtains two key feature indicators at once, which, compared to algorithms that only calculate amplitude or only calculate orientation angle, can more accurately characterize the geometric shape of oral lesion edges, thereby improving the accuracy of subsequent corner detection and texture analysis.

[0034] The process of setting scale levels and averaging the gradient squares and products in a square-cropped neighborhood to form structural tensor components corresponding to the scale level and pixel location specifically includes: Set the total number of scale levels and specify a square clipping neighborhood window with an odd number of side lengths for each scale level; At each scale level and at each pixel location, a square cropping neighborhood centered on the pixel is constructed. When the image boundary is close, the image range is cropped and the number of neighboring pixels is counted. Within the square cropping neighborhood, pixel averaging is performed on the squared horizontal gradient, the squared vertical gradient, and the product of the horizontal and vertical gradients to obtain three neighborhood statistics. By using three neighborhood statistics as structural tensor components corresponding to the scale level and pixel location, a multi-scale structural tensor map is constructed.

[0035] Further specific implementation steps include: Set the total number of scale levels to To obtain each level The corresponding neighborhood window size is ;in, This represents the total number of scale levels. For scale-level indexing; For scale The side length of the square neighborhood; Construction Scale The next discrete neighborhood is, specifically: Its effective pixel count is: ;in, In pixels Centered on, scale is The set of pixels in the cropped neighborhood; For the neighborhood The number of pixels; , For row and column pixel indices within the neighborhood; In scale The following constructs the structure tensor: Each component is a trimmed neighborhood average, specifically: , , ;in, For pixels In scale The structure tensor below; For scale ,Location The neighborhood average of the squared horizontal gradient; For scale ,Location The neighborhood average of the squared vertical gradient; For scale ,Location The neighborhood average of the product of the horizontal and vertical gradients.

[0036] By employing a multi-scale cropping neighborhood design, the algorithm can simultaneously capture local gradient statistics of lesions of different sizes, overcoming the limitation of a single scale in handling both small and large lesions. The combination of square cropping neighborhoods and scale hierarchy allows the algorithm to automatically adapt to different target sizes without requiring manual selection of the optimal window size, thus improving its versatility. Statistically analyzing the squared horizontal gradient, squared vertical gradient, and their product is equivalent to arranging directional gradients into a tensor form, enhancing the ability to characterize various geometric features such as lines, intersections, and patches. This tensor construction avoids cumbersome convolution or filtering operations, resulting in higher computational efficiency and easier parallelization.

[0037] The process of finding the trace and determinant of the structural tensor at each scale level and obtaining the corner response map according to a predetermined response form specifically includes: At each scale level and at each pixel location, the trace and determinant operations are performed on the structure tensor to obtain two scalars: the trace and the determinant. The corner response is expressed by subtracting the square of the trace weighted by a preset coefficient from the determinant, and a corner response map at the scale level is generated pixel by pixel. Output corner response maps at all scale levels.

[0038] Further specific implementation steps include: Calculate the tensors separately The trace and determinant are as follows: , ;in, For structure tensor traces; For structure tensor The determinant of; Construction Scale The corner response value function is as follows: ;in, For pixels In scale The response value at the corner point.

[0039] This step constructs the response based on two features of the structure tensor: "overall strength" and "difference between two directions." The trace reflects the total amount of local gradient energy, and the determinant reflects the "area" of joint change in the two principal directions. Setting the coefficient to exactly 1 / 4 has a crucial effect: the corner response can be equivalently understood as the square of the difference between the principal directions minus the negative number, retaining only the shape information of how different the two directions are, while completely canceling out the influence of pure energy magnitude. In other words, this value is the only choice that can precisely eliminate the total strength component and retain only anisotropic information; it is not an arbitrarily set constant.

[0040] This helps in lesion localization in the following ways: For edge structures with "strong gradient in only one direction and weak gradient in the other," the response will be significantly lower. Subsequent local maxima and normalization will suppress these one-dimensional edges, avoiding mistaking large areas of normal tissue edges for lesions. For regions with "significant and similar gradients in both directions" (typically corners, edge intersections, and abrupt shape changes), the response is close to zero. Compared to the surrounding one-dimensional edges that are suppressed even lower, these are local "high points," and subsequent normalization and maximum detection will prioritize extracting these locations. For "overall flat" regions, the gradients in both directions are close to zero. Although the response is also close to zero, the variation within the neighborhood is small, and the overall gradient energy is very weak. When screening based on significance scores and full-image statistics, these regions are unlikely to pass the final threshold and will not be mistakenly identified as lesion candidates.

[0041] In summary, the 1 / 4 value is intended to transform the corner response into a "highly sensitive measure of local directional differences." Combined with local maximum detection and subsequent region scoring, this results in a relatively prominent response at lesion edges and shape transitions, thereby helping key structures near the lesion contour to be captured preferentially, while ordinary textures and unidirectional edges are suppressed overall.

[0042] First, the tensor trace reflects the local gradient energy distribution, and the determinant reflects the degree of gradient direction change. Combining the two can accurately distinguish between flat areas, edges, and corners. Second, by mapping response values ​​at arbitrary scale levels, corner features at multiple scales can be highlighted, further avoiding the shortcomings of being sensitive to noise or slow to react to large-scale features at a single scale. Third, the response function design has a built-in balancing effect, which can suppress false responses caused by local noise or reflection artifacts. In addition, the pixel-by-pixel generation of corner response maps does not require additional templates or preset thresholds, and the response values ​​directly reflect the structural tensor features, improving the algorithm's adaptability and robustness. Compared with traditional corner detection methods that rely on fixed templates or only calculate a single statistic, this scheme achieves more accurate localization of oral lesion edges and intersections by fusing multi-level feature information through tensor operations, effectively reducing the false detection rate and enhancing the sensitivity to weak lesions.

[0043] The process of obtaining pixel-level fusion results based on responses at each scale level, and combining local mean and local standard deviation to complete normalization enhancement, specifically includes: The maximum value of the corner response obtained for the same pixel at all scale levels is taken to generate a fused response map; Construct a 3x3 cropping neighborhood centered on each pixel, and calculate the local mean and local standard deviation of the fusion response within the cropping neighborhood; Normalization enhancement is performed on each pixel, and the fused response is subtracted from the local mean and then scaled by the local standard deviation plus a constant to generate a normalized corner saliency map. Output a normalized corner saliency map.

[0044] Further specific implementation steps include: By fusing the corner responses at all scale levels, a fused response map is obtained: ;in, For pixels Maximum corner response across all scales; The local mean and standard deviation of the cropped neighborhood are normalized for the fused image, specifically as follows: S501, Construction Clipping neighborhood: ;in, For Centered Local clipping of the neighborhood; for The number of pixels; S502. Calculate the local mean and standard deviation respectively: , ;in, for Inside The local mean; for Inside Local standard deviation; S503, Normalization Enhancement: , ;in, For pixels Normalized corner significance; It is a constant, a numerically stable term.

[0045] First, the multi-scale response maximization fusion integrates feature responses at different scales, ensuring that the strongest signals at each scale are preserved and avoiding the defects of weak or ignored single-scale responses. Second, through the normalization method of local statistical mean and standard deviation, the contrast of different regions can be adaptively adjusted, making true corner points easier to highlight, while suppressing background noise and spurious responses in low-contrast regions. Third, the 3x3 small neighborhood design balances algorithm complexity and statistical effectiveness, achieving rapid pixel-level contrast enhancement. Fourth, this normalization enhancement does not require manual threshold adjustment, is highly adaptive, and adapts to different intraoral lighting conditions and reflection artifacts in different patients. Finally, compared with existing simple threshold segmentation or full-image linear stretching methods, this scheme can simultaneously consider local saliency and global contrast on the same response map, improving the accuracy of subsequent extreme value extraction and reducing the generation of spurious corner points.

[0046] The step of determining local maxima within an eight-neighborhood and handling adjacent pixel cases to generate a set of corner positions specifically includes: Using eight neighboring regions as the detection window, the local maxima of the normalized corner point saliency are determined, and the neighboring pixels are compared after excluding the center pixel itself. When there are parallel pixels with the same saliency as the center pixel, select the unique representative by comparing the row number first and then the column number in lexicographical order, and do not retain the others; All the retained maximum pixels are used to form a set of corner point positions, and the row and column coordinates of each corner point are recorded. Count the total number of corner points, and record the case where there are no corner points when the total number of corner points is zero; Output the set of corner locations and their quantity.

[0047] Further specific implementation steps include: right Perform local maximum detection, specifically as follows: First, construct a 1-neighborhood as follows: ;in, For The 8-neighborhood centered at a radius of 1; If satisfied , Then Marked as a local maximum candidate; If there exists a non-empty set and Only retain The pixel with the smallest lexicographical index is selected, and the rest are not retained; otherwise, the candidate point is retained; among them, for The middle and center pixels have the same a set of pixels with values; The lexicographically smallest index is: compare first. Compare again The order of selection is unique; The set of corner points is formed by retaining all the maxima: ;in, This is the final set of corner point locations to be retained. For set The Middle The row and column coordinates of each corner point; Number the corner points; The total number of corner points, when The time indicates that there are no corner points.

[0048] Local maximum determination preserves the true significant response peaks and eliminates non-maximum noise. A unique representative is selected from parallel candidate points using lexicographical order rules, avoiding multiple duplicate corner points at the same structural location and improving the sparsity and accuracy of the location set. Furthermore, explicitly recording the corner point coordinates and number provides a high-quality input point set for clustering and segmentation. More importantly, this extreme value extraction method does not require setting a manual threshold; the selection is completed through its own local comparison mechanism, reducing the algorithm's dependence on prior parameters. Compared with traditional non-maximum suppression or global threshold extraction methods, this scheme's local maximum determination and parallel pixel processing strategy are more accurate and reliable, especially in environments with complex morphology and redundant textures inside the oral cavity, effectively reducing the number of false corner points and improving the overall effect of subsequent clustering and localization.

[0049] The process of setting a clustering distance threshold based on the statistical results of nearest neighbor distances, implementing disjoint-set clustering, and generating axis-aligned minimum bounding rectangles for each cluster specifically includes: Calculate the Euclidean distance between pixels for any two corner points and construct a distance set; For each corner point, obtain the nearest neighbor distance from the other corner points to form a nearest neighbor distance sequence; when the number of corner points is zero, end the clustering and record the number of clusters and the threshold as zero; when the number of corner points is one, record the nearest neighbor distance of the unique corner point as an infinite placeholder. Arrange the nearest neighbor distance sequence in ascending order and set the clustering distance threshold according to the 80th percentile linear interpolation rule; Corner points are processed sequentially according to their numbers. If the distance between the current corner point and any existing member in a cluster is not greater than the clustering distance threshold, it is merged into an existing cluster that meets the condition. If multiple clustering conditions are met, the cluster with the smallest number is merged. If the merging conditions are not met, a new cluster is created and assigned an incrementing cluster number. For each cluster, the minimum and maximum values ​​of row coordinates and column coordinates of the corner points within the cluster are calculated, and an axis-aligned minimum bounding rectangle is generated; when a cluster contains only one corner point, the minimum bounding rectangle degenerates into the corresponding corner point pixels; The set of all candidate rectangles is denoted as the lesion candidate region set, and the lesion candidate region set is output.

[0050] Further specific implementation steps include: For any two points The Euclidean distance is calculated as follows: ;in, For the first With the The pixel Euclidean distance between the corner points; , Corner index; , For the first The row and column coordinates of each corner point; , For the first The row and column coordinates of each corner point; Calculate the nearest neighbor distance for each corner point: ;in, For the first The distance from each corner point to its nearest neighbor; when Set the nearest neighbor set to empty, and directly let , ;in, This is the clustering distance threshold; This represents the final number of clusters. when season ; Will Sort in ascending order ;in, To be The first one after ascending sort One value; To sort by position; Pick ,set up , , ;in, The proportionality constant of the quantile threshold; For consecutive positions; for Round down; These are linear interpolation weights; This gives us a clearly calculable percentile: ;in, This is a linear interpolation function for calculating the ordinal statistics of the 80th quantile of a set; exist In the case of distance threshold, let it be... ; Deterministic disjoint-set clustering is employed, specifically as follows: S701, when No merging operation is required at this time; S702, when Press at time Process corner points sequentially, if With any point in an existing cluster satisfy If a cluster meets the criteria for merging with another cluster, it is merged into that cluster. If multiple cluster merging conditions are met simultaneously, the cluster with the smallest cluster index is merged into the cluster. If no cluster merging condition is met, a new cluster is created and assigned an increasing cluster index. Given the coordinates of a corner point of a member in an existing cluster, This is the corner index of the member within the cluster; Let the clustering result be... ;in, For the first The set of corner points of each cluster; Number the clusters; For each cluster Construct axis-aligned minimum bounding rectangle candidate region : , , , , ;in, , The first Minimum and maximum values ​​of the row coordinates of the cluster corner points; , The first Minimum and maximum values ​​of the coordinates of the cluster corner points; For the first The set of minimum bounding rectangle pixels of an axis-aligned cluster; It is a set of integer lattice points; when Contains only one corner point hour, ;in, For clusters Row and column indexes of the unique corner point; when At that time, no candidate region set is generated.

[0051] First, by calculating the distance between each corner point and its nearest neighbor and setting a threshold based on percentile linear interpolation, the clustering scale can be automatically adjusted according to the corner point density in the image, avoiding the tediousness of manual parameter tuning and the problem of inconsistent thresholds under different image conditions. The disjoint-set clustering algorithm adopts a sequential merging strategy, which can efficiently group spatially adjacent significant corner points into the same cluster. At the same time, when multiple clusters meet the conditions, the smallest index cluster is selected to ensure the stability and repeatability of the clustering results. By using axis-aligned minimum bounding rectangles, discrete corner points are transformed into continuous spatial regions, forming true candidate lesion regions. Considering the special case of single-point clusters, the rectangle is degenerated into corresponding pixels to cover isolated small lesions. Compared with existing density-based or grid-based clustering methods, the adaptive threshold and disjoint-set implementation of this scheme can handle both dense corner point clusters and sparse clusters, achieving accurate segmentation of different lesion morphologies and improving the integrity and accuracy of candidate regions.

[0052] The calculation of the saliency score for each lesion candidate region, the filtering and output of the lesion localization region set based on the score threshold, or the provision of a conclusion of no detection specifically includes: The pixel mean of the normalized corner saliency within each lesion candidate region is calculated to obtain the saliency score of the corresponding lesion candidate region. Calculate the global mean and global standard deviation of the normalized corner significance across the entire map, and set the score threshold by the sum of the two. When the significance score of the corresponding lesion candidate region is not less than the score threshold, the lesion candidate region is retained as the lesion localization region; when the significance score is less than the score threshold, the lesion candidate region is removed. All retained lesion candidate regions are summarized as a lesion localization region set; when the lesion localization region set is empty or the number of corner points is zero, the conclusion that no lesion localization region meeting the significance requirement was detected in this image is output.

[0053] Further specific implementation steps include: For each candidate region The significance score is calculated as follows: ;in, For the first The salience score of each candidate region; For set The cardinality; Calculate the global mean and standard deviation of the normalized response for the entire graph: , ;in, For the full map The global mean; For the full map The global standard deviation; Set the score threshold to ; For each The branch conclusion is as follows: like Then keep As the area for lesion localization; like Then remove ; Final output set: ;in, The final set of lesion localization areas; when When no significant lesion candidate region was detected in the current image, the conclusion is output.

[0054] First, using the mean saliency within the region as the score objectively reflects the overall saliency level of the region, avoiding the dominance of single-point extreme values ​​in decision-making. Second, the threshold is dynamically set using the sum of the global mean and standard deviation, eliminating the need for manual preset and achieving adaptive threshold selection to adapt to different image contrast and noise levels. The branch decision method combining scoring and thresholding is simple and clear, enabling rapid screening of weak response regions and reducing false alarms. When the final retain set is empty or the number of corner points is zero, a "not detected" conclusion is directly output, ensuring the system's correct identification of lesion-free images. Compared with traditional fixed threshold or manual parameter tuning methods, this scoring strategy takes into account both local and global information, improving the reliability and robustness of the localization results and providing reliable auxiliary diagnostic output for clinical applications.

[0055] This embodiment also provides a system for locating oral and maxillofacial lesions based on machine vision, including: The image acquisition unit receives grayscale images of the oral and maxillofacial region, records the total number of rows and columns of the image, obtains the minimum and maximum grayscale values ​​of the entire image, performs linear interval mapping, and outputs a unit interval grayscale matrix. The gradient and direction calculation unit receives the gray-level matrix of the unit interval, calculates the horizontal and vertical differences, performs symmetric extension difference at the boundary position, calculates the gradient magnitude and direction angle, and outputs the gradient magnitude map and direction angle map. A multi-scale structural tensor unit receives a unit interval grayscale matrix, sets the scale level and square clipping neighborhood, and performs neighborhood pixel averaging on the squared horizontal difference, squared vertical difference, and their product at each scale level and each pixel position to generate and output a structural tensor component map. The corner response calculation unit receives the structural tensor component map, calculates the trace and determinant, generates the corner response map and outputs it. The multi-scale response fusion and normalization enhancement unit receives corner response maps at each scale level, performs pixel-level maximization fusion, calculates the local mean and local standard deviation of the three-by-three local region, performs normalization enhancement, and outputs a normalized corner saliency map. The extreme value extraction unit receives the normalized corner saliency map, performs eight-neighbor local maximum detection and parallel pixel lexicographical order selection, and outputs the set of corner positions and the number of corners. The clustering and region generation unit receives a set of corner locations, calculates the nearest neighbor distance sequence and sets a clustering distance threshold, performs disjoint-set clustering, calculates the row and column coordinate ranges of each cluster, generates an axis-aligned minimum bounding rectangle, and outputs a set of lesion candidate regions. The scoring and output unit receives a set of candidate lesion regions, calculates the significance score of each candidate lesion region, calculates the global mean and global standard deviation of the normalized corner significance across the entire map, sets a score threshold, and filters and outputs a set of lesion location regions or a conclusion that no lesions were detected. The storage and control module receives data output from each unit, performs parameter management, process scheduling and data exchange, and maintains the sequential execution and result recording of each unit.

[0056] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0057] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for locating oral and maxillofacial lesions based on machine vision, characterized in that, include: Obtain the original grayscale matrix of the oral and maxillofacial region, acquire the minimum and maximum grayscale values ​​of the entire image, and perform linear normalization on each pixel to form a unit interval grayscale matrix. For each pixel, calculate the difference in the horizontal and vertical directions, apply the symmetric extension difference rule at the boundary position, and obtain the gradient magnitude and orientation angle. Set the scale level, and perform neighborhood averaging on the gradient square and product of the squared neighborhood to form the structural tensor components corresponding to the scale level and pixel position. The tracer and determinant of the structural tensor are calculated at each scale level, and the corner response map is obtained according to the predetermined response form. Pixel-level fusion results are obtained based on the response at each scale level, and normalization enhancement is completed by combining the local mean and local standard deviation. Local maxima are determined within the eight-neighborhood and the case of adjacent pixels is handled to generate a set of corner point positions; Based on the statistical results of nearest neighbor distance, a clustering distance threshold is set, disjoint-set clustering is implemented, and an axis-aligned minimum bounding rectangle is generated for each cluster. Calculate the significance score for each lesion candidate region, filter and output the set of lesion localization regions based on the score threshold, or give the conclusion that no lesions were detected.

2. The method for locating oral and maxillofacial lesions based on machine vision according to claim 1, characterized in that, The process of obtaining the original grayscale matrix of the oral and maxillofacial region, acquiring the minimum and maximum grayscale values ​​of the entire image, and performing linear normalization on each pixel to form a unit interval grayscale matrix specifically includes: The oral and maxillofacial grayscale images are acquired using a standard oral endoscope, and the total number of rows and columns of the images are recorded to form an original grayscale matrix located by row index and column index. Iterate through all pixels in the image and obtain the minimum and maximum gray levels of the entire image. When the maximum gray level is not equal to the minimum gray level, perform linear interval mapping on each pixel to normalize the original gray level to a unit interval based on the minimum and maximum gray levels of the entire image; when the maximum gray level is equal to the minimum gray level, set the gray level of all pixels to zero. Output a grayscale matrix for a unit interval.

3. The method for locating oral and maxillofacial lesions based on machine vision according to claim 2, characterized in that, The process of calculating the horizontal and vertical differences for each pixel, applying a symmetrical extension difference rule at the boundary positions, and obtaining the gradient magnitude and orientation angle specifically includes: At each non-boundary pixel, the difference between the gray values ​​of the adjacent right column and the left column in the same row is taken as the horizontal difference, and the difference between the adjacent down-row gray values ​​and the up-row gray values ​​in the same column is taken as the vertical difference. Symmetrical extension difference is used in the first row, last row, first column, and last column to generate horizontal and vertical differences based on mirror pixels; For each pixel, first perform a square root operation on the sum of the squares of the horizontal and vertical differences to obtain the gradient magnitude; then perform an arctangent operation on the ratio of the vertical to the horizontal differences and superimpose a numerical stability constant to obtain the orientation angle. Output gradient magnitude and orientation angle plots.

4. The method for locating oral and maxillofacial lesions based on machine vision according to claim 3, characterized in that, The process of setting scale levels and averaging the gradient squares and products in a square-cropped neighborhood to form structural tensor components corresponding to the scale level and pixel location specifically includes: Set the total number of scale levels and specify a square clipping neighborhood window with an odd number of side lengths for each scale level; At each scale level and at each pixel location, a square cropping neighborhood centered on the pixel is constructed. When the image boundary is close, the image range is cropped and the number of neighboring pixels is counted. Within the square cropping neighborhood, pixel averaging is performed on the squared horizontal gradient, the squared vertical gradient, and the product of the horizontal and vertical gradients to obtain three neighborhood statistics. By using three neighborhood statistics as structural tensor components corresponding to the scale level and pixel location, a multi-scale structural tensor map is constructed.

5. The method for locating oral and maxillofacial lesions based on machine vision according to claim 4, characterized in that, The process of finding the trace and determinant of the structural tensor at each scale level and obtaining the corner response map according to a predetermined response form specifically includes: At each scale level and at each pixel location, the trace and determinant operations are performed on the structure tensor to obtain two scalars: the trace and the determinant. The corner response is expressed by subtracting the square of the trace weighted by a preset coefficient from the determinant, and a corner response map at the scale level is generated pixel by pixel. Output corner response maps at all scale levels.

6. The method for locating oral and maxillofacial lesions based on machine vision according to claim 5, characterized in that, The process of obtaining pixel-level fusion results based on responses at each scale level, and combining local mean and local standard deviation to complete normalization enhancement, specifically includes: The maximum value of the corner response obtained for the same pixel at all scale levels is taken to generate a fused response map; Construct a 3x3 cropping neighborhood centered on each pixel, and calculate the local mean and local standard deviation of the fusion response within the cropping neighborhood; Normalization enhancement is performed on each pixel, and the fused response is subtracted from the local mean and then scaled by the local standard deviation plus a constant to generate a normalized corner saliency map. Output a normalized corner saliency map.

7. The method for locating oral and maxillofacial lesions based on machine vision according to claim 6, characterized in that, The step of determining local maxima within an eight-neighborhood and handling adjacent pixel cases to generate a set of corner positions specifically includes: Using eight neighboring regions as the detection window, the local maxima of the normalized corner point saliency are determined, and the neighboring pixels are compared after excluding the center pixel itself. When there are parallel pixels with the same saliency as the center pixel, select the unique representative by comparing the row number first and then the column number in lexicographical order, and do not retain the others; All the retained maximum pixels are used to form a set of corner point positions, and the row and column coordinates of each corner point are recorded. Count the total number of corner points, and record the case where there are no corner points when the total number of corner points is zero; Output the set of corner locations and their quantity.

8. The method for locating oral and maxillofacial lesions based on machine vision according to claim 7, characterized in that, The process of setting a clustering distance threshold based on the statistical results of nearest neighbor distances, implementing disjoint-set clustering, and generating axis-aligned minimum bounding rectangles for each cluster specifically includes: Calculate the Euclidean distance between pixels for any two corner points and construct a distance set; For each corner point, obtain the nearest neighbor distance from the other corner points to form a nearest neighbor distance sequence; when the number of corner points is zero, end the clustering and record the number of clusters and the threshold as zero; when the number of corner points is one, record the nearest neighbor distance of the unique corner point as an infinite placeholder. Arrange the nearest neighbor distance sequence in ascending order and set the clustering distance threshold according to the 80th percentile linear interpolation rule; Corner points are processed sequentially according to their numbers. If the distance between the current corner point and any existing member in a cluster is not greater than the clustering distance threshold, it is merged into an existing cluster that meets the condition. If multiple clustering conditions are met, the cluster with the smallest number is merged. If the merging conditions are not met, a new cluster is created and assigned an incrementing cluster number. For each cluster, the minimum and maximum values ​​of row coordinates and column coordinates of the corner points within the cluster are calculated, and an axis-aligned minimum bounding rectangle is generated; when a cluster contains only one corner point, the minimum bounding rectangle degenerates into the corresponding corner point pixels; The set of all candidate rectangles is denoted as the lesion candidate region set, and the lesion candidate region set is output.

9. A method for locating oral and maxillofacial lesions based on machine vision according to claim 8, characterized in that, The calculation of the significance score for each lesion candidate region, the filtering and output of the lesion localization region set based on the score threshold, or the provision of a conclusion that no lesions were detected specifically includes: The pixel mean of the normalized corner saliency within each lesion candidate region is calculated to obtain the saliency score of the corresponding lesion candidate region. Calculate the global mean and global standard deviation of the normalized corner significance across the entire map, and set the score threshold by the sum of the two. When the significance score of the corresponding lesion candidate region is not less than the score threshold, the lesion candidate region is retained as the lesion localization region; when the significance score is less than the score threshold, the lesion candidate region is removed. All retained lesion candidate regions are summarized as a lesion localization region set; when the lesion localization region set is empty or the number of corner points is zero, the conclusion that no lesion localization region meeting the significance requirement was detected in this image is output.

10. A system employing the machine vision-based method for locating oral and maxillofacial lesions as described in claim 9, characterized in that, include: The image acquisition unit receives grayscale images of the oral and maxillofacial region, records the total number of rows and columns of the image, obtains the minimum and maximum grayscale values ​​of the entire image, performs linear interval mapping, and outputs a unit interval grayscale matrix. The gradient and direction calculation unit receives the gray-level matrix of the unit interval, calculates the horizontal and vertical differences, performs symmetric extension difference at the boundary position, calculates the gradient magnitude and direction angle, and outputs the gradient magnitude map and direction angle map. A multi-scale structural tensor unit receives a unit interval grayscale matrix, sets the scale level and square clipping neighborhood, and performs neighborhood pixel averaging on the squared horizontal difference, squared vertical difference, and their product at each scale level and each pixel position to generate and output a structural tensor component map. The corner response calculation unit receives the structural tensor component map, calculates the trace and determinant, generates the corner response map and outputs it. The multi-scale response fusion and normalization enhancement unit receives corner response maps at each scale level, performs pixel-level maximization fusion, calculates the local mean and local standard deviation of the three-by-three local region, performs normalization enhancement, and outputs a normalized corner saliency map. The extreme value extraction unit receives the normalized corner saliency map, performs eight-neighbor local maximum detection and parallel pixel lexicographical selection, and outputs the set of corner positions and the number of corners. The clustering and region generation unit receives a set of corner locations, calculates the nearest neighbor distance sequence and sets a clustering distance threshold, performs disjoint-set clustering, calculates the row and column coordinate ranges of each cluster, generates an axis-aligned minimum bounding rectangle, and outputs a set of lesion candidate regions. The scoring and output unit receives a set of candidate lesion regions, calculates the significance score of each candidate lesion region, calculates the global mean and global standard deviation of the normalized corner significance across the entire map, sets a score threshold, and filters and outputs a set of lesion location regions or a conclusion that no lesions were detected. The storage and control module receives data output from each unit, performs parameter management, process scheduling and data exchange, and maintains the sequential execution and result recording of each unit.