CN110717911A - Disease positioning method based on template matching - Google Patents
Disease positioning method based on template matching Download PDFInfo
- Publication number
- CN110717911A CN110717911A CN201910985549.3A CN201910985549A CN110717911A CN 110717911 A CN110717911 A CN 110717911A CN 201910985549 A CN201910985549 A CN 201910985549A CN 110717911 A CN110717911 A CN 110717911A
- Authority
- CN
- China
- Prior art keywords
- image
- disease
- area
- template matching
- method based
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 201000010099 disease Diseases 0.000 title claims abstract description 42
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 title claims abstract description 42
- 238000000034 method Methods 0.000 title claims abstract description 21
- 238000013507 mapping Methods 0.000 claims abstract description 6
- 238000012216 screening Methods 0.000 claims abstract description 4
- 230000005484 gravity Effects 0.000 claims description 3
- 230000004807 localization Effects 0.000 claims 3
- 238000004891 communication Methods 0.000 abstract 1
- 238000000605 extraction Methods 0.000 description 5
- 230000011218 segmentation Effects 0.000 description 5
- 230000000149 penetrating effect Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000005315 distribution function Methods 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000000926 separation method Methods 0.000 description 2
- 239000003086 colorant Substances 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 239000011800 void material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration by the use of histogram techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/187—Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/75—Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
- G06V10/751—Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
Abstract
The invention discloses a disease positioning method based on template matching, which comprises the following steps: 1. selecting an image I with a disease area, and uniformly mapping pixel values in the image between 0 and 255 to obtain an image GI; 2. drawing a pixel distribution curve of the image GI, fitting the pixel distribution curve by using a normal distribution curve, and fitting two inflection points T of the fitted curve1And T2As a threshold value; 3. according to two threshold values T1And T2Carrying out ternary on the image GI to obtain an image CI; 4. screening a plurality of connected blocks with larger areas in the image CI; 5. the screened communication block is arranged verticallyTemplate matching is carried out in the vertical direction, and the area formed by the communicating blocks with large matching coefficients is the finally positioned disease occurrence area. The method highlights the phase characteristics of the disease area, accurately positions the disease area, retains the original information of the image as much as possible, and has great practical significance.
Description
Technical Field
The invention belongs to an image processing technology, and particularly relates to a disease positioning method based on template matching.
Background
Region-of-interest extraction is an important preprocessing of image recognition and computer vision, and there is no precise extraction positioning, and there is no targeted analysis. In recent years, a large number of excellent algorithms have been developed at home and abroad in the technical field of image region-of-interest segmentation and extraction.
Other existing patents, such as patent No. CN103473785A, in the scheme, when a color image is binarized, profile information and color information in the image are innovatively combined, the image is mapped into three values, namely, foreground, profile and background, and then clustering is completed by using a morphology-based search method, so as to realize fast segmentation of the target image. The method can effectively segment the image defect area, but useful information of the image, such as phase information, cannot be reserved.
As another example, patent No. CN106683105A discloses an image acquisition device for acquiring image data of a target area; enabling a laser scanning device to carry out point cloud data acquisition on the target area; classifying the point cloud; mapping the point cloud into a projection point on an imaging plane of an image acquisition device; acquiring a segmentation contour of a projection point corresponding to each category point cloud on an imaging plane; and segmenting the image according to the segmentation contour. The method can obtain a good segmentation effect, but the early-stage data acquisition amount is huge, the method cannot be well applied to lightweight application, and meanwhile, the extraction of the disease characteristic value is difficult.
With the improvement of image processing technology and the increase of ground penetrating radar precision, the requirement of accurately positioning geological diseases is increasingly urgent.
Disclosure of Invention
The purpose of the invention is as follows: aiming at the defect of low image information positioning precision in the prior art, the invention discloses a disease positioning method based on template matching, which enhances the phase characteristics of a disease area, is beneficial to accurately extracting the position of a disease from a large amount of input information and simultaneously retains the original characteristics of an image.
The technical scheme is as follows: a disease positioning method based on template matching is characterized by comprising the following steps:
a, selecting an image I with a disease area, and carrying out histogram equalization on the image I, namely uniformly mapping pixel values in the image to be 0-255 to obtain an image GI;
step B, drawing a pixel distribution curve of the image GI in the step A, fitting the pixel distribution curve by using a normal distribution curve, and fitting two inflection points T of the fitted normal distribution curve1And T2As a threshold value, where T1≤T2;
Step C, according to two threshold values T in the step B1And T2Carrying out ternary on the image GI to obtain an image CI;
d, screening a plurality of communicating blocks with larger areas from the image CI in the step C;
and E, performing template matching on the communicating blocks in the step D in the vertical direction, wherein the area formed by the communicating blocks with large matching coefficients is the finally positioned disease occurrence area.
Preferably, the step C includes: according to the two threshold values T in the step B1And T2Setting the pixel value in the image GI to be less than T1Has a value of 0 greater than T2The value of the pixel of (1) is 255, and the values of the remaining pixels are intermediate values 127, and finally the image CI is obtained.
Preferably, the step D includes: and C, judging the area with the pixel value of 127 in the image CI in the step C as background noise, and judging the area with the pixel value of 0 or 255 as a waveform area interfered by the disease, wherein the background noise can be ignored.
Preferably, the area of the connected blocks screened in the step D exceeds 5% of the area of the current image, and at most 20 connected blocks are screened.
Preferably, the step E includes: and carrying out template matching in the vertical direction of the image CI, comparing the two-dimensional correlation of each communicating block, searching for communicating blocks which are different in color, similar in shape and approximately parallel in the vertical direction, and determining a region formed by the communicating blocks which are high in matching degree and close in gravity center distance in the vertical direction as a finally positioned disease occurrence region.
Has the advantages that: the invention has the following beneficial effects:
(1) the disease positioning method based on template matching adopts algorithms of combining pixel value mapping, threshold selection, ternary, template matching and the like, and achieves the purposes of enhancing the phase characteristics of the disease area of the image and accurately positioning the disease area;
(2) the disease positioning method based on template matching can be widely applied to images with disease area pixel value dual-polarization characteristics such as void, cavity and aquifer;
(3) the disease positioning method based on template matching can effectively realize accurate positioning of the disease area in the input image with obvious diseases, and therefore has great practical significance.
Drawings
FIG. 1 is a flow chart of the algorithm of the present invention;
FIG. 2 is an image of measured data of a Ground Penetrating Radar (GPR) on a region with a disease;
FIG. 3 is a distribution of the pixels of FIG. 2;
FIG. 4 is an image of FIG. 2 after binarization;
FIG. 5 shows the result of the separation of the connected blocks of FIG. 4;
fig. 6 shows the best matching result after template matching.
Detailed Description
The present invention will be further described with reference to the accompanying drawings.
The invention relates to a disease positioning method based on template matching, wherein an algorithm flow chart is shown in figure 1, and the method comprises the following steps:
and A, selecting an image I with a disease area, and performing histogram equalization on the image I, namely uniformly mapping pixel values in the image to be 0-255 to obtain an image GI.
Fig. 2 shows an image of measured data of a Ground Penetrating Radar (GPR) on a region with a disease, and fig. 3 is a histogram of a distribution of pixel gray values in fig. 2.
Step B, drawing the pixel distribution curve of the image GI in the step A, fitting the pixel distribution curve by using a normal distribution curve, and fitting two inflection points T of the fitted normal distribution curve1And T2As a threshold value, where T1≤T2。
The inflection values are respectively T1Mu-sigma and T2μ + σ, where μ is the mean of the normal distribution function and σ is the standard deviation of the normal distribution function.
The prior art often uses the twenty-eight principle for threshold extraction, which is in fact a threshold acquisition scheme before a normal fit is proposed. The physical meaning of the inflection point of a normal distribution curve after using a normal fit is: the function has a critical point of concave-convex change, so that the selection of a normal distribution inflection point as a threshold value is more convincing in a physical sense.
Step C, according to two threshold values T in step B1And T2Carrying out ternary on the image GI to obtain an image CI, which specifically comprises the following steps: setting the pixel value in image GI less than T1Has a value of 0 greater than T2The value of the pixel of (1) is 255, and the values of the remaining pixels are intermediate values 127, and finally the image CI is obtained.
Fig. 4 is a result of the image in fig. 2 being binarized, and it can be observed that compared with the original image, the phase characteristics of the binarized image are more obvious, and the information of the original image is completely stored.
And D, judging a region with a pixel value of 127 in the image CI in the step C as background noise, and judging a region with a pixel value of 0 or 255 as a waveform region interfered by a disease, wherein the background noise can be ignored. If the image is a region with uniform density and no diseases, the GPR image of the image can be in a pure color after being subjected to three-valued treatment, namely, the electron wave can not change polarity when being propagated in a medium uniform medium. The black and white areas after the binarization are actually the sign of the polarity reversal of the electromagnetic wave from the high dielectric constant medium into the low dielectric constant or from the low dielectric constant medium into the high dielectric constant.
Then, several connected blocks with large area are screened in the waveform region, and when screening the connected blocks, all the connected blocks with area more than 5% of the current image area are generally selected, and at most 20 connected blocks are selected.
Fig. 5 shows the result of the connected block separation performed on the image CI.
And E, in the fault occurrence area, because the phase characteristics of the reflected waves of the fault generate wave peaks with opposite polarities, communicating blocks with opposite phases, namely different colors, similar shapes and approximately parallel vertical directions appear in the image CI.
And D, performing template matching on the communicating blocks in the step D in the vertical direction to compare the two-dimensional correlation of the communicating blocks, wherein the region formed by the communicating blocks with high matching degree and short gravity center distance in the vertical direction is the finally positioned disease occurrence position.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.
Claims (5)
1. A disease positioning method based on template matching is characterized by comprising the following steps:
a, selecting an image I with a disease area, and carrying out histogram equalization on the image I, namely uniformly mapping pixel values in the image to be 0-255 to obtain an image GI;
step B, drawing a pixel distribution curve of the image GI in the step A, fitting the pixel distribution curve by using a normal distribution curve, and fitting two inflection points T of the fitted normal distribution curve1And T2As a threshold value, where T1≤T2;
Step C, according to two threshold values T in the step B1And T2Carrying out ternary on the image GI to obtain an image CI;
d, screening a plurality of communicating blocks with larger areas from the image CI in the step C;
and E, performing template matching on the communicating blocks in the step D in the vertical direction, wherein the area formed by the communicating blocks with large matching coefficients is the finally positioned disease occurrence area.
2. The disease localization method based on template matching according to claim 1, wherein the step C comprises: according to the two threshold values T in the step B1And T2Setting the pixel value in the image GI to be less than T1Has a value of 0 greater than T2The value of the pixel of (1) is 255, and the values of the remaining pixels are intermediate values 127, and finally the image Cl is obtained.
3. The disease localization method based on template matching according to claim 2, wherein the step D comprises: and C, judging the area with the pixel value of 127 in the image CI in the step C as background noise, and judging the area with the pixel value of 0 or 255 as a waveform area interfered by the disease, wherein the background noise can be ignored.
4. The disease locating method based on template matching according to claim 1, wherein the area of the connected blocks screened in step D exceeds 5% of the area of the current image, and at most 20 connected blocks are screened.
5. The disease localization method based on template matching according to claim 1, wherein the step E comprises: and carrying out template matching in the vertical direction of the image CI, comparing the two-dimensional correlation of each communicating block, searching for communicating blocks which are different in color, similar in shape and approximately parallel in the vertical direction, and determining a region formed by the communicating blocks which are high in matching degree and close in gravity center distance in the vertical direction as a finally positioned disease occurrence region.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910985549.3A CN110717911A (en) | 2019-10-16 | 2019-10-16 | Disease positioning method based on template matching |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910985549.3A CN110717911A (en) | 2019-10-16 | 2019-10-16 | Disease positioning method based on template matching |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110717911A true CN110717911A (en) | 2020-01-21 |
Family
ID=69211725
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910985549.3A Pending CN110717911A (en) | 2019-10-16 | 2019-10-16 | Disease positioning method based on template matching |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110717911A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150178587A1 (en) * | 2012-06-18 | 2015-06-25 | Thomson Licensing | Device and a method for color harmonization of an image |
CN108960172A (en) * | 2018-07-12 | 2018-12-07 | 南京工程学院 | A method of identification GPR image Damage Types |
CN109035281A (en) * | 2018-07-12 | 2018-12-18 | 南京工程学院 | A kind of three-valued method of image based on histogram distribution |
CN109544531A (en) * | 2018-11-19 | 2019-03-29 | 南京工程学院 | A method of GPR image Damage Types are identified based on shape feature |
CN109872301A (en) * | 2018-12-26 | 2019-06-11 | 浙江清华长三角研究院 | A kind of color image preprocess method counted for rice pest identification |
-
2019
- 2019-10-16 CN CN201910985549.3A patent/CN110717911A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150178587A1 (en) * | 2012-06-18 | 2015-06-25 | Thomson Licensing | Device and a method for color harmonization of an image |
CN108960172A (en) * | 2018-07-12 | 2018-12-07 | 南京工程学院 | A method of identification GPR image Damage Types |
CN109035281A (en) * | 2018-07-12 | 2018-12-18 | 南京工程学院 | A kind of three-valued method of image based on histogram distribution |
CN109544531A (en) * | 2018-11-19 | 2019-03-29 | 南京工程学院 | A method of GPR image Damage Types are identified based on shape feature |
CN109872301A (en) * | 2018-12-26 | 2019-06-11 | 浙江清华长三角研究院 | A kind of color image preprocess method counted for rice pest identification |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109522908B (en) | Image significance detection method based on region label fusion | |
CN107610114B (en) | optical satellite remote sensing image cloud and snow fog detection method based on support vector machine | |
CN109785285B (en) | Insulator damage detection method based on ellipse characteristic fitting | |
WO2017190656A1 (en) | Pedestrian re-recognition method and device | |
Kumar et al. | Review on image segmentation techniques | |
WO2015180527A1 (en) | Image saliency detection method | |
CN111104943B (en) | Color image region-of-interest extraction method based on decision-level fusion | |
CN110991389B (en) | Matching method for judging appearance of target pedestrian in non-overlapping camera view angles | |
WO2019071976A1 (en) | Panoramic image saliency detection method based on regional growth and eye movement model | |
WO2018076138A1 (en) | Target detection method and apparatus based on large-scale high-resolution hyper-spectral image | |
CN109978848A (en) | Method based on hard exudate in multiple light courcess color constancy model inspection eye fundus image | |
CN110245600B (en) | Unmanned aerial vehicle road detection method for self-adaptive initial quick stroke width | |
CN109784216B (en) | Vehicle-mounted thermal imaging pedestrian detection Rois extraction method based on probability map | |
CN110751619A (en) | Insulator defect detection method | |
CN111091071B (en) | Underground target detection method and system based on ground penetrating radar hyperbolic wave fitting | |
Li et al. | Automatic infrared ship target segmentation based on structure tensor and maximum histogram entropy | |
CN114492619A (en) | Point cloud data set construction method and device based on statistics and concave-convex property | |
CN107704864B (en) | Salient object detection method based on image object semantic detection | |
CN110310263B (en) | SAR image residential area detection method based on significance analysis and background prior | |
Cho et al. | Image matting for automatic target recognition | |
Zhang et al. | Occlusion region searching and segmentation for multi-human detection based on RGB-D information | |
CN106355576A (en) | SAR image registration method based on MRF image segmentation algorithm | |
Wu et al. | Vehicle detection in high-resolution images using superpixel segmentation and CNN iteration strategy | |
CN115578629A (en) | Highway guardrail extraction method | |
CN110717911A (en) | Disease positioning method based on template matching |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200121 |