[go: up one dir, main page]

CN106157301B - A kind of certainly determining method and device of the threshold value for Image Edge-Detection - Google Patents

A kind of certainly determining method and device of the threshold value for Image Edge-Detection Download PDF

Info

Publication number
CN106157301B
CN106157301B CN201610466010.3A CN201610466010A CN106157301B CN 106157301 B CN106157301 B CN 106157301B CN 201610466010 A CN201610466010 A CN 201610466010A CN 106157301 B CN106157301 B CN 106157301B
Authority
CN
China
Prior art keywords
edge
marginal point
threshold value
image
chain
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.)
Active
Application number
CN201610466010.3A
Other languages
Chinese (zh)
Other versions
CN106157301A (en
Inventor
杨艺
高立宁
钟克洪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Luster LightTech Co Ltd
Original Assignee
Luster LightTech Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Luster LightTech Co Ltd filed Critical Luster LightTech Co Ltd
Priority to CN201610466010.3A priority Critical patent/CN106157301B/en
Publication of CN106157301A publication Critical patent/CN106157301A/en
Application granted granted Critical
Publication of CN106157301B publication Critical patent/CN106157301B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a kind of threshold values for Image Edge-Detection to determine method and device certainly.The threshold value determines method certainly, comprising: carries out Image Edge-Detection to image to be processed respectively using at least two Alternate thresholds, and is evaluated respectively the testing result of at least two Alternate thresholds according to the Evaluation Strategy of setting;At least two evaluation results are compared according to the comparison criterion of setting, to determine target detection threshold value.Strong noise interference using the threshold value from the method for determination, when can reduce edge detection, additionally it is possible to which the loss of important edges point when preferably avoiding edge detection ensure that the continuity at edge;Meanwhile can also simplify the selection course and calculating process of detection threshold value, the accuracy rate of testing result when improving edge detection.

Description

A kind of certainly determining method and device of the threshold value for Image Edge-Detection
Technical field
The present embodiments relate to digital image processing techniques field more particularly to a kind of thresholds for Image Edge-Detection Value determines method and device certainly.
Background technique
The edge of image is most basic one of the feature of image, refers to the significant part of image local grey scale change.Due to Human eye derives from the region with the strong grey scale change in part to the perception at scenery edge in image, and edge detection is intended to simulate people Perception of the eye to scenery edge extracts the more violent edge of local gray level variation and is therefore typically based on edge detection to determine figure The marginal portion of picture.When carrying out edge detection, the detection threshold value that main operation is namely based on setting determines the edge of image Point, and identified marginal point it is accurate whether directly affect edge detection results it is accurate whether, therefore, to detection threshold value Select and be determined to become the important component of edge detection.
Generally, main that detection threshold value, artificial selection inspection are arranged by artificial selection when carrying out edge detection to image Survey threshold value to have the following deficiencies: (1) subjectivity is strong.The result of different people selection is often different, the insufficient technical staff's choosing of experience The result selected is frequently not optimal, or even is not suboptimum, when determining marginal point hereby based on selected detection threshold value, is deposited The case where losing important edges point or there are strong noise interference.(2) process is cumbersome.Detection threshold value requires during selecting Technical staff constantly attempts different threshold values and evaluation result, expects that approximate optimal solution generally requires complicated selection course And calculating process.
Summary of the invention
The purpose of the present invention is to propose to a kind of threshold values for Image Edge-Detection from method and device is determined, to improve side Thus the accuracy of edge testing result reduces noise jamming and important edges while simplifying threshold value selection calculating process The loss of point.
On the one hand, the embodiment of the invention provides a kind of threshold values for Image Edge-Detection to determine method certainly, comprising:
Image Edge-Detection is carried out to image to be processed respectively using at least two Alternate thresholds, and according to the evaluation of setting Strategy respectively evaluates the testing result of at least two Alternate thresholds;
At least two evaluation results are compared according to the comparison criterion of setting, to determine target detection threshold value.
On the other hand, the embodiment of the invention provides a kind of threshold values for Image Edge-Detection from determining device, comprising:
Evaluation module, for carrying out image border to image to be processed respectively using at least two Alternate thresholds Detection, and the testing result of at least two Alternate thresholds is evaluated respectively according to the Evaluation Strategy of setting;
Targets threshold determining module, for being compared according to the comparison criterion of setting at least two evaluation results, with Determine target detection threshold value.
A kind of certainly determining method and device of the threshold value for Image Edge-Detection is provided in the embodiment of the present invention.The threshold value At least two Alternate thresholds are used to carry out Image Edge-Detection to image to be processed respectively first from the method for determination, then basis is set Fixed Evaluation Strategy respectively evaluates the testing result of at least two Alternate thresholds;Finally according to the comparison criterion pair of setting At least two evaluation results are compared, and determine target detection threshold value.Using the threshold value from the method for determination, edge can reduce Strong noise interference when detection, additionally it is possible to which the loss of important edges point when preferably avoiding edge detection ensure that the company at edge Continuous property;Meanwhile can also simplify the selection course and calculating process of detection threshold value, the standard of testing result when improving edge detection True rate.
Detailed description of the invention
Fig. 1 is that the process of a kind of threshold value for Image Edge-Detection from the method for determination that the embodiment of the present invention one provides is shown It is intended to;
Fig. 2 is that the process of a kind of threshold value for Image Edge-Detection from the method for determination provided by Embodiment 2 of the present invention is shown It is intended to;
Fig. 3 is that the process of a kind of threshold value for Image Edge-Detection from the method for determination that the embodiment of the present invention three provides is shown It is intended to;
Fig. 4 a is that a kind of threshold value for Image Edge-Detection that the embodiment of the present invention four provides determines the preferred of method certainly Embodiment;
Fig. 4 b is the left adjacent marginal point that marginal point is determined in the first search range and the right side that the embodiment of the present invention four provides The exemplary diagram of adjacent marginal point;
Fig. 5 is a kind of structural frames of the threshold value for Image Edge-Detection that provides of the embodiment of the present invention five from determining device Figure.
Specific embodiment
To further illustrate the technical scheme of the present invention below with reference to the accompanying drawings and specific embodiments.It is understood that It is that specific embodiment described herein is used only for explaining the present invention rather than limiting the invention.It further needs exist for illustrating , only the parts related to the present invention are shown for ease of description, in attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is that the process of a kind of threshold value for Image Edge-Detection from the method for determination that the embodiment of the present invention one provides is shown It is intended to, this method can be executed by the threshold value for Image Edge-Detection from determining device, be suitable for carrying out image to be processed Threshold value when edge detection determines certainly.Wherein the device can be implemented by software and/or hardware, and generally be integrated at digital picture In reason system.
As shown in Figure 1, a kind of threshold value for Image Edge-Detection that the embodiment of the present invention one provides has from the method for determination Body includes following operation:
S101, Image Edge-Detection is carried out to image to be processed respectively using at least two Alternate thresholds, and according to setting Evaluation Strategy the testing result of at least two Alternate thresholds is evaluated respectively.
In the present embodiment, the Alternate thresholds specifically can be regarded as the selected inspection for being used to carry out Image Edge-Detection Survey threshold value.It should be noted that the detection threshold value for carrying out Image Edge-Detection is generally a gray level, the gray level is specific It can be regarded as different color range values locating for different colours, and the corresponding gray level of white be usually denoted as 0, by the corresponding ash of black Degree grade is denoted as 255, it follows that when color from it is black to leucismus when, gray level has also changed to 255 from 0, has occurred 256 The variation of gray level.
In the present embodiment, the Evaluation Strategy specifically can be regarded as evaluating commenting for Alternate thresholds testing result quality Price card is quasi-.It should be noted that the setting of the Evaluation Strategy is mainly according to evaluation index used by user, evaluation index is not It is just not identical with the Evaluation Strategy of corresponding setting.Generally, it carries out can be used as having for evaluation index: edge when threshold value determines certainly Closeness, the length of boundary chain and the area of fringe region etc. of point.It follows that the Evaluation Strategy can be based on being used The difference of evaluation index is specifically set.
In the present embodiment, it needs at least to be based on Evaluation Strategy to the testing result of two Alternate thresholds to evaluate, and The target detection threshold value for being more suitable for Image Edge-Detection is determined at least two Alternate thresholds.In the present embodiment, institute The MAXIMUM SELECTION range for stating Alternate thresholds is regarded as the variation range of gray level, i.e., and 0 to 255, but in practical applications, usually One alternative range of the reasonable threshold value of comparison can be set on the basis of MAXIMUM SELECTION range, thus guaranteeing that threshold value is quasi- from determining Shorten threshold value under the premise of exactness from the operating time determined.
In the present embodiment, the alternative range of reasonable threshold value, the alternative model of threshold value can be preset for Alternate thresholds Enclosing can be made of the upper threshold condition of the initial Alternate thresholds of the minimum set and setting.Wherein, described minimum initial alternative Threshold value and upper threshold condition can be manually set, and can also be set with system default, can generally carry out based on Alternate thresholds It is set before Image Edge-Detection.
Further, at least two Alternate thresholds are since the initial Alternate thresholds of the minimum of setting, to set step Length is stepped up and obtains.
In the present embodiment, an Alternate thresholds can be arbitrarily chosen in the alternative range of the threshold value, and based on selected The Alternate thresholds selected carry out Image Edge-Detection to image to be processed, but since the selection sequence to Alternate thresholds does not limit, So that there is the case where omitting in the selection of Alternate thresholds.It preferably, can be in the threshold value in order to avoid the omission of Alternate thresholds A selection sequence is set for Alternate thresholds to be chosen in alternative range, that is, first from the initial Alternate thresholds of minimum of setting Start, then carries out threshold value from operation is increased to set step-length, thus gradually carry out the selection of other Alternate thresholds, until reaching Upper threshold condition.
S102, at least two evaluation results are compared according to the comparison criterion of setting, to determine target detection threshold value.
In the present embodiment, it after being evaluated based on setting strategy the testing result of the Alternate thresholds, will form Corresponding evaluation result, it is possible thereby to which at least two evaluation results to formation carry out analysis comparison, to determine required target Detection threshold value.In the present embodiment, at least two evaluation results can be analyzed and is compared by the comparison criterion of setting, Wherein, the setting of the comparison criterion relies on the setting of the Evaluation Strategy, and concrete condition is needed to make a concrete analysis of.Generally, often The comparison criterion seen is set with: the size of corresponding calculated value or assay result are to entire edge in comparative evaluation result The influence etc. of detection performance.
A kind of threshold value for Image Edge-Detection that the embodiment of the present invention one provides is from the method for determination, first using at least Two Alternate thresholds carry out Image Edge-Detection to image to be processed respectively, then according to the Evaluation Strategy of setting respectively at least The testing result of two Alternate thresholds is evaluated;Finally at least two evaluation results are compared according to the comparison criterion of setting Compared with determining target detection threshold value.Using the threshold value from the method for determination, strong noise interference when edge detection can reduce, also The loss of important edges point, ensure that the continuity at edge when can preferably avoid edge detection;Meanwhile it can also simplify inspection Survey the selection course and calculating process of threshold value, the accuracy rate of testing result when improving edge detection.
Embodiment two
Fig. 2 is that the process of a kind of threshold value for Image Edge-Detection from the method for determination provided by Embodiment 2 of the present invention is shown It is intended to.The present invention is implemented two and is optimized based on above-described embodiment, in the present embodiment, is using at least two alternative thresholds Before value carries out Image Edge-Detection to image to be processed respectively, also optimization includes: the edge detection operator determination based on setting The edge gradient image of image to be processed, wherein the corresponding gradient information of each pixel in the edge gradient image, The gradient information includes gradient magnitude and gradient direction;At least two alternative thresholds are determined based on the threshold value alternative conditions of setting Value, wherein gradient information setting of the threshold value alternative conditions based on pixel in the edge gradient image.
As shown in Fig. 2, a kind of threshold value for Image Edge-Detection provided by Embodiment 2 of the present invention has from the method for determination Body includes following operation:
S201, the edge gradient image that image to be processed is determined based on the edge detection operator of setting.
Generally, it carries out needing to carry out edge gradient image to image to be processed when edge detection to determine, the edge ladder Spending image can be determined based on edge detection operator, and the edge detection operator is the conventional sensing algorithm for carrying out edge detection, Common edge detection operator has Sobel operator, Kirsch operator, Robot operator and Canny operator etc..
In the present embodiment, the corresponding gradient information of each pixel being formed by edge gradient image, it is described Gradient information includes gradient magnitude and gradient direction.Specifically, the process that edge gradient image determines is carried out to image to be processed, It can be regarded as the process that each pixel in image to be processed determines corresponding gradient magnitude and gradient direction.In the present embodiment, The gradient magnitude of the pixel specifically can be regarded as the functional value determined based on the corresponding gray level of the pixel;Institute It states gradient direction specifically and can be regarded as the corresponding direction vector of gradient magnitude of the pixel.Based on the pixel gradient width The size and gradient direction of value may be used to determine whether the pixel is marginal point in image to be processed.
S202, at least two Alternate thresholds are determined based on the threshold value alternative conditions of setting, wherein the threshold value alternative conditions Gradient information setting based on pixel in the edge gradient image.
In the present embodiment, it before the pixel progress marginal point to image to be processed determines, needs first to determine for side The Alternate thresholds of edge detection.One it is found that at least two Alternate thresholds can be alternative in the threshold value based on the above embodiment It is determined in range, and the alternative range of the threshold value can be by the upper threshold condition of the minimum set initial Alternate thresholds and setting Composition.Wherein, the determination of the alternative range of the threshold value is based primarily upon the minimum initial Alternate thresholds and upper threshold condition Setting.
In the present embodiment, the minimum initial Alternate thresholds and upper threshold condition belong to threshold value alternative conditions, can With the gradient information setting based on pixel in the edge gradient image.In addition, after setting the threshold value alternative conditions, it can To choose at least two Alternate thresholds, and the Alternate thresholds can be excellent in the alternative range of threshold value for meeting threshold value alternative conditions It is selected as choosing since the initial Alternate thresholds of minimum of setting, and is stepped up to set step-length and obtains other Alternate thresholds.
Specifically, the gradient information based on pixel in the edge gradient image, can will be described minimum initial alternative Threshold value setting are as follows: minimal gray grade corresponding to pixel of the gradient magnitude greater than 0;The upper threshold condition can be set Are as follows: after carrying out thresholding based on selected Alternate thresholds, if being formed by marginal point area and the edge gradient image surface Long-pending ratio is less than setup parameter, then it is assumed that the Alternate thresholds reach upper threshold, wherein the marginal point area is equal to threshold The sum of the gradient magnitude of identified each marginal point after value.
S203, Image Edge-Detection is carried out to image to be processed respectively using at least two Alternate thresholds, and according to setting Evaluation Strategy the testing result of at least two Alternate thresholds is evaluated respectively.
S204, at least two evaluation results are compared according to the comparison criterion of setting, to determine target detection threshold value.
A kind of threshold value for Image Edge-Detection provided by Embodiment 2 of the present invention specifically increases side from the method for determination Edge gradient image and Alternate thresholds determine operation, thus for edge detection when threshold value determine basis from determining to provide; It is operated in addition, also adding determining for optimal edge chain threshold value, identified optimal edge chain threshold value can be in target detection threshold Noise spot identical with marginal points information intensity is further filtered out on the basis of value, testing result when enhancing edge detection Accuracy.Using the threshold value from the method for determination, noise jamming can be preferably reduced in edge detection and avoid important side The loss of edge point ensure that the continuity at edge and the accuracy rate of testing result.
Embodiment three
Fig. 3 is that the process of a kind of threshold value for Image Edge-Detection from the method for determination that the embodiment of the present invention three provides is shown It is intended to.The embodiment of the present invention is optimized based on above-described embodiment, in the present embodiment, further " will use at least two A Alternate thresholds carry out Image Edge-Detection to image to be processed respectively, and according to the Evaluation Strategy of setting respectively at least two The testing result of Alternate thresholds is evaluated " it is embodied as: the side is determined respectively based at least two Alternate thresholds of selection Marginal point in edge gradient image, and at least one boundary chain is generated based on the marginal point;Count the generation of the boundary chain Item number, and determine the edge chain length of each of the edges chain;Based on standby described in the generation item number and each boundary chain length computation Select the corresponding average edge chain length of threshold value;Using the average edge chain length as the evaluation result of the Alternate thresholds.
Further, " at least two evaluation results will be also compared according to the comparison criterion of setting, to determine target Detection threshold value " is embodied as: comparing the length value of at least two average edge chain lengths;By the maximum average side of the length value Edge chain length is determined as optimal evaluation result, and the corresponding Alternate thresholds of the optimal evaluation result are denoted as the target detection threshold Value.
Further, after " determining target detection threshold value ", further includes: determine that the target detection threshold value is corresponding most Excellent boundary chain threshold value.
As shown in figure 3, the present invention implements a kind of threshold value for Image Edge-Detection that three provide determines method certainly, specifically Including operating as follows:
S301, the edge gradient image that image to be processed is determined based on the edge detection operator of setting.
S302, at least two Alternate thresholds are determined based on the threshold value alternative conditions of setting.
S303, the marginal point in the edge gradient image is determined respectively based at least two Alternate thresholds of selection, and At least one boundary chain is generated based on the marginal point.
In the present embodiment, at least two Alternate thresholds are chosen in the alternative range of threshold value for meeting threshold value alternative conditions, And it is based respectively on the Alternate thresholds and determines marginal point in edge gradient image.Specifically, the determination of the marginal point can table It states are as follows: if the corresponding gray level of pixel is greater than or equal to the Alternate thresholds in the edge gradient image, then it is assumed that institute Stating pixel is marginal point.Later, at least one boundary chain can be generated based on identified marginal point.
Further, at least one boundary chain is generated based on the marginal point, comprising: according to the search order of setting and institute The corresponding gradient direction of each marginal point in edge gradient image is stated, determines the left adjacent marginal point and right adjacent side edge of each marginal point respectively Point;Each marginal point is attached with corresponding left adjacent marginal point and right adjacent side edge point;Based on consistency check criterion to every A marginal point carries out orientation consistency inspection, obtains at least one boundary chain for meeting consistency check criterion.
In the present embodiment, the key for generating boundary chain is to determine the left adjacent marginal point of each marginal point and right adjacent side edge Point.Specifically, the determination process of the left adjacent marginal point of the marginal point and right adjacent marginal point can be stated are as follows: a, by 0 ° to 360 ° Eight angular ranges are divided into clockwise, if 0 ° to 45 ° of note is the first search range, 315 ° to 360 ° are just designated as the 8th Search range, and corresponding search order is set for each search range;B, centered on the marginal point, it is determining with it is described 8 adjacent pixels of marginal point;C, the gradient direction of the marginal point is obtained, and determines search belonging to the gradient direction Range;D, the left adjacent marginal point and right adjacent marginal point of the marginal point are determined based on the corresponding search order of described search range.
In the present embodiment, described to set corresponding search order for each search range, it can specifically state are as follows:
1) in eight search ranges, centered on marginal point point be determined as the start angle of each search range with And start angle positive direction (setting the direction to rotate clockwise as positive direction).
2) 8 pixels adjacent with marginal point are divided by 2 pixel point sets based on start angle positive direction.
Specifically, by the pixel for crossing the central point start angle positive direction left side and the pixel adjacent with marginal point positive direction Point is divided to left adjacent pixel point set, by the pixel and the pixel adjacent with marginal point opposite direction on the right of start angle positive direction It is divided to right adjacent pixel point set.
3) it concentrates, chooses vertical with central point start angle positive direction is crossed in left adjacent pixel point set and right adjacent pixel respectively Pixel as respective first Searching point;It chooses with the parallel pixel of mistake central point start angle positive direction as respective the Two Searching points;It chooses and crosses central point start angle positive direction in the pixel of negative 45° angle as third Searching point;Selection and mistake Central point start angle positive direction is in the pixel of positive 45° angle as respective 4th Searching point.
In the present embodiment, by taking the determination process of the left adjacent marginal point of the marginal point as an example: based on locating for marginal point Search range obtains the corresponding search order of described search range;First search is first determined whether based on described search sequence Whether point is marginal point, if it is marginal point, is then denoted as the left adjacent marginal point of the marginal point, otherwise determines second search With the presence or absence of left adjacent marginal point o'clock into the 4th Searching point.If four Searching points are not left adjacent marginal point, then it is assumed that described There is no left adjacent marginal points for marginal point;Similarly, described in being determined since the first Searching point of setting based on identical mode The right adjacent marginal point of marginal point.
In the present embodiment, after the left adjacent marginal point and right adjacent marginal point that determine each marginal point respectively, by each side Edge point is attached with corresponding left adjacent marginal point and right adjacent side edge point, may be will form multiple initial edge chains at this time, also be needed It to be formed by initial edge chain to each marginal point and carries out orientation consistency inspection, obtains at least one and meets consistency check The boundary chain of criterion.
Further, the consistency check criterion are as follows: if the corresponding right adjacent marginal point of left neighbour's marginal point of marginal point It is not the marginal point, then disconnects the connection of the marginal point and the left adjacent marginal point;If the right adjacent marginal point of marginal point Corresponding left adjacent marginal point is not the marginal point, then disconnects the connection of the marginal point and the right adjacent marginal point.
It in the present embodiment, can after the progress orientation consistency inspection of initial edge chain will be formed by each marginal point To obtain at least one boundary chain for meeting consistency check criterion.
The generation item number of S304, the statistics boundary chain, and determine the edge chain length of each of the edges chain.
In the present embodiment, the generation item number of the boundary chain specifically can be regarded as determining based on selected Alternate thresholds The generated boundary chain of marginal point item number;The length of the boundary chain specifically can refer to marginal point present in the boundary chain Number.
S305, it is based on the corresponding average edge chain of Alternate thresholds described in the generation item number and each boundary chain length computation Length.
In the present embodiment, the corresponding average edge chain length of the Alternate thresholds may be expressed as: each edge chain length it With the quotient with the generation item number.
S306, using the average edge chain length as the evaluation result of the Alternate thresholds.
In the present embodiment, by the evaluation index of the length of the boundary chain alternately threshold value, then Alternate thresholds Evaluation result be expressed as the corresponding average edge chain length of the Alternate thresholds.
S307, the length value for comparing at least two average edge chain lengths.
In the present embodiment, if being that at least two threshold values of putting on record are determined accordingly based on step S303 to step S306 After evaluation result, then need to be compared analysis at least two evaluation results.Specifically, the corresponding evaluation of the Alternate thresholds It as a result is average edge chain length, therefore, it is necessary to the length values at least two average edge chain lengths to be compared.
S308, the maximum average edge chain length of the length value is determined as optimal evaluation result, the optimal evaluation As a result corresponding Alternate thresholds are denoted as the target detection threshold value.
In the present embodiment, it the maximum average edge chain length of length value will determine at least two average edge chain lengths For optimal evaluation result, and determine Alternate thresholds corresponding to the optimal evaluation result, the Alternate thresholds are exactly image side Target detection threshold value needed for edge detection.
S309, the corresponding optimal edge chain threshold value of the target detection threshold value is determined.
In the present embodiment, when determining target detection threshold value based on above-mentioned steps, and based on the determination of target detection threshold value Out after the marginal point of the image to be processed, there are still a small amount of noise spots in the marginal point determined.Because of the noise The corresponding noise intensity of point and the signal strength of marginal point with target detection threshold filtering within the scope of one, can not be based only upon, Therefore it needs to further determine that boundary chain detection threshold value, and is made an uproar by the length scale to the formed boundary chain of marginal point to filter Sound point.
Further, the corresponding optimal edge chain threshold value of the determination target detection threshold value, specifically includes: determining institute State the maximal margin chain length angle value in the chain of target detection threshold value corresponding edge;Calculate the maximal margin chain length angle value and setting hundred Divide the product value of ratio;Using the product value as the optimal edge chain threshold value of the target detection threshold value.
In the present embodiment, the corresponding marginal point of the target detection threshold value can be determined based on step S303 to S306, It can also determine the corresponding boundary chain of the target detection threshold value, and maximal margin can be determined based on the length of the boundary chain Chain length angle value, then the optimal edge chain threshold value of the target detection threshold value be represented by calculate the maximal margin chain length angle value with Set the product value of percentage.
A kind of threshold value for Image Edge-Detection that the embodiment of the present invention three provides embodies alternative from the method for determination The determination process of threshold ratings result and the determination process of target detection threshold value, using simple edge chain length as evaluation Index, so that the determination process of target detection threshold value is simpler convenient.Using the threshold value from the method for determination, can be examined at edge Noise jamming is preferably reduced when survey and avoids the loss of important edges point, ensure that the continuity and testing result at edge Accuracy rate.
Example IV
Fig. 4 a is that a kind of threshold value for Image Edge-Detection that the embodiment of the present invention four provides determines the preferred of method certainly Embodiment.The embodiment of the present invention is based on Soble edge detection operator and carries out edge detection.As shown in fig. 4 a, the embodiment of the present invention The preferred embodiment of offer specifically includes following operation:
S401, the edge gradient image that image to be processed is determined based on Soble edge detection operator.
Illustratively, the distribution function of the gradient magnitude of each pixel in the edge gradient image determined can be set It is set to H (i), wherein i ∈ [0,255], i indicate gray level corresponding to pixel;The value of the gradient direction of each pixel can In the range of [0 °, 360 °].
S402, the gray level based on pixel in edge gradient image and gradient information threshold value alternative conditions.
In the present embodiment, the threshold value alternative conditions can specifically include setting and the threshold of minimum initial Alternate thresholds It is worth upper bound condition.The minimum initial Alternate thresholds and upper threshold condition can be based on pixels in the edge gradient image The gradient information setting of point.
Illustratively, above-mentioned example is connect, if the distribution function of the gradient magnitude of pixel is set as H (i), wherein i ∈ [0,255], i indicate gray level corresponding to pixel, then the initial Alternate thresholds of set minimum may be expressed as: with formula Min (i) and H (i) > 0;In addition, set upper threshold condition may be expressed as: with formulaWherein, t ∈ [0,255], function H (i) indicate the gradient magnitude of the marginal point of gray level i, formulaIt is expressed as based on Alternate thresholds t The marginal point area formed after thresholding by marginal point, constant Area indicate that the gross area of edge gradient image, α indicate setting ginseng Number.
S403, using the minimum initial Alternate thresholds as current detection threshold value T.
Illustratively, by Min (i) and the conduct of H (i) > 0 current detection threshold value T.
S404, the marginal point in the edge gradient image is determined based on current detection threshold value T.
Illustratively, the pixel using gray level in edge gradient image more than or equal to current detection threshold value T is as side Edge point.
S405, the left adjacent marginal point and right adjacent marginal point for determining marginal point, generate at least one boundary chain.
In the present embodiment, the left adjacent marginal point and right adjacent marginal point that the key for generating boundary chain is marginal point are really Fixed, Fig. 4 b is the left adjacent marginal point and right adjacent side edge that marginal point is determined in the first search range that the embodiment of the present invention four provides The exemplary diagram of point.
Illustratively, as shown in Figure 4 b, it is when being in the first search range (0 ° to 45 °) with the gradient direction of marginal point The determination process of example, left neighbour's marginal point and right adjacent marginal point is specifically stated are as follows: and the grid that note is identified as 0 is marginal point, remaining 8 Grid is the neighbor pixel of the marginal point, carries out left adjacent side edge according to the search order of+1 identified in figure ,+2 ,+3 ,+4 The determination of point, if it is determined that the pixel for being identified as+1 is marginal point, then the pixel is determined as to a left side for the marginal point Otherwise adjacent marginal point continues to determine whether the marginal point for being identified as+2 is left adjacent marginal point.If 4 grids, which traverse, to be terminated Still it is not determined by left adjacent marginal point, then it is assumed that there is no left adjacent marginal points for the marginal point;Similarly, identical mode can be based on The right adjacent marginal point of the marginal point is determined since being identified as -1 grid.
Illustratively, after the left adjacent marginal point and right adjacent marginal point for determining the marginal point, by each marginal point with Corresponding left adjacent marginal point and right adjacent side edge point are attached;Direction one is carried out to each marginal point based on consistency check criterion The inspection of cause property obtains at least one boundary chain for meeting consistency check criterion.
S406, calculating and the evaluation result for storing current detection threshold value T.
Illustratively, the corresponding average edge chain length of current detection threshold value T is calculated, and by the average edge chain length It is recorded as the evaluation result of current detection threshold value T.
S407, judge whether the current detection threshold value T reaches upper threshold condition, if it is not, thening follow the steps S408;If It is to then follow the steps S409.
S408, current detection threshold value T is carried out to form new current detection threshold value T, and return from increasing to set step-length S404。
The length value of S409, more stored all average edge chain lengths, by average edge chain length maximum value pair The detection threshold value answered is as target detection threshold value.
S410, the corresponding optimal edge chain threshold value of the target detection threshold value is determined.
Illustratively, the product value of longest marginal point length value corresponding to target detection threshold value and setting percentage is made For optimal edge chain threshold value.
Example of the embodiment of the present invention four provides the preferred embodiment for determining method certainly for the threshold value of Image Edge-Detection, base Illustrate that threshold value provided in an embodiment of the present invention is interfered from strong noise when being determined to reduce edge detection in the preferred embodiment, The loss of important edges point, ensure that the continuity at edge when can also preferably avoid edge detection;Meanwhile can also it simplify The selection course and calculating process of detection threshold value, the accuracy rate of testing result when improving edge detection.
Embodiment five
Fig. 5 is a kind of structural frames of the threshold value for Image Edge-Detection that provides of the embodiment of the present invention four from determining device Figure.The threshold value from determining device be suitable for image carry out edge detection when detection threshold value determination, the device can by software and/ Or hardware realization, and be generally integrated in digital image processing system.As shown in figure 5, the threshold value includes: to detect from determining device Evaluation of result module 51 and targets threshold determining module 52.
Wherein, evaluation module 51, for being carried out respectively to image to be processed using at least two Alternate thresholds Image Edge-Detection, and the testing result of at least two Alternate thresholds is evaluated respectively according to the Evaluation Strategy of setting;
Targets threshold determining module 52, for being compared according to the comparison criterion of setting at least two evaluation results, To determine target detection threshold value.
In the present embodiment, which it is standby using at least two to pass through evaluation module 51 from determining device first Threshold value is selected to carry out Image Edge-Detection to image to be processed respectively, and alternative at least two respectively according to the Evaluation Strategy of setting The testing result of threshold value is evaluated;Then targets threshold determining module 52 is evaluated according to the comparison criterion of setting at least two As a result it is compared, to determine target detection threshold value.
The embodiment of the present invention five provides a kind of threshold value for Image Edge-Detection from determining device, using the threshold value from Determining device, strong noise interference when can reduce edge detection, additionally it is possible to important edges point when preferably avoiding edge detection Loss, ensure that the continuity at edge;Meanwhile can also simplify the selection course and calculating process of detection threshold value, it improves The accuracy rate of testing result when edge detection.
Further, it includes: that gradient image determining module and Alternate thresholds determine mould which also optimizes from determining device Block.
Wherein, gradient image determining module determines the edge of image to be processed for the edge detection operator based on setting Gradient image, wherein the corresponding gradient information of each pixel in the edge gradient image, the gradient information include Gradient magnitude and gradient direction;
Alternate thresholds determining module determines at least two Alternate thresholds for the threshold value alternative conditions based on setting, wherein Gradient information setting of the threshold value alternative conditions based on pixel in the edge gradient image.
Further, the evaluation module 51, is specifically used for: at least two Alternate thresholds based on selection point The marginal point in the edge gradient image is not determined, and at least one boundary chain is generated based on the marginal point;Described in statistics The generation item number of boundary chain, and determine the edge chain length of each of the edges chain;Based on the generation item number and each edge chain length Degree calculates the corresponding average edge chain length of the Alternate thresholds;Using the average edge chain length as the Alternate thresholds Evaluation result.
It is on the basis of the above embodiments, described that at least one boundary chain is generated based on the marginal point, comprising:
According to the corresponding gradient direction of marginal point each in the search order of setting and the edge gradient image, determine respectively The left adjacent marginal point and right adjacent marginal point of each marginal point;Each marginal point is clicked through with corresponding left adjacent marginal point and right adjacent side edge Row connection;Orientation consistency inspection is carried out to each marginal point based on consistency check criterion, at least one is obtained and meets unanimously Property check criterion boundary chain.
Further, the consistency check criterion are as follows: if the corresponding right adjacent marginal point of left neighbour's marginal point of marginal point It is not the marginal point, then disconnects the connection of the marginal point and the left adjacent marginal point;If the right adjacent marginal point of marginal point Corresponding left adjacent marginal point is not the marginal point, then disconnects the connection of the marginal point and the right adjacent marginal point.
Further, the targets threshold determining module 52, is specifically used for: comparing at least two average edge chain lengths Length value;The maximum average edge chain length of the length value is determined as optimal evaluation result, the optimal evaluation result pair The Alternate thresholds answered are denoted as the target detection threshold value.
On the basis of the above embodiments, it includes: boundary chain threshold determination module which also optimizes from determining device, is used In determining the corresponding optimal edge chain threshold value of the target detection threshold value.
Further, the boundary chain threshold determination module, is specifically used for: determining target detection threshold value corresponding edge Maximal margin chain length angle value in chain;It calculates the maximal margin chain length angle value and sets the product value of percentage;Multiply described Optimal edge chain threshold value of the product value as the target detection threshold value.
Further, at least two Alternate thresholds are since the initial Alternate thresholds of the minimum of setting, to set step Length is stepped up and obtains.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (16)

1. a kind of threshold value for Image Edge-Detection determines method certainly characterized by comprising
The edge gradient image of image to be processed is determined based on the edge detection operator of setting, it is every in the edge gradient image The corresponding gradient information of a pixel, the gradient information includes gradient magnitude and gradient direction;
At least two Alternate thresholds are determined based on the threshold value alternative conditions of setting;
Image Edge-Detection is carried out to image to be processed respectively using at least two Alternate thresholds, and according to the Evaluation Strategy of setting The testing result of at least two Alternate thresholds is evaluated respectively;
At least two evaluation results are compared according to the comparison criterion of setting, to determine target detection threshold value;
Wherein, the threshold value alternative conditions include: minimum initial Alternate thresholds and upper threshold condition;
The minimum initial Alternate thresholds setting are as follows: minimal gray grade corresponding to pixel of the gradient magnitude greater than 0;
The upper threshold condition setting are as follows: after carrying out thresholding based on selected Alternate thresholds, if being formed by marginal point Area and the ratio of edge gradient image surface product are less than setup parameter, then it is assumed that and the Alternate thresholds reach upper threshold, Wherein, the marginal point area is equal to the sum of the gradient magnitude of identified each marginal point after thresholding.
2. the method according to claim 1, wherein using at least two Alternate thresholds respectively to image to be processed Image Edge-Detection is carried out, and the testing result of at least two Alternate thresholds is commented respectively according to the Evaluation Strategy of setting Valence specifically includes:
The marginal point in the edge gradient image is determined respectively based at least two Alternate thresholds of selection, and is based on the side Edge point generates at least one boundary chain;
The generation item number of the boundary chain is counted, and determines the edge chain length of each of the edges chain;
Based on the corresponding average edge chain length of Alternate thresholds described in the generation item number and each boundary chain length computation;
Using the average edge chain length as the evaluation result of the Alternate thresholds.
3. according to the method described in claim 2, it is characterized in that, described generate at least one edge based on the marginal point Chain, comprising:
According to the corresponding gradient direction of marginal point each in the search order of setting and the edge gradient image, each side is determined respectively The left adjacent marginal point and right adjacent marginal point of edge point;
Each marginal point is attached with corresponding left adjacent marginal point and right adjacent side edge point;
Orientation consistency inspection is carried out to each marginal point based on consistency check criterion, at least one is obtained and meets consistency inspection Look into the boundary chain of criterion.
4. according to the method described in claim 3, it is characterized in that, the consistency check criterion are as follows: if a left side for marginal point The corresponding right adjacent marginal point of adjacent marginal point is not the marginal point, then disconnects the company of the marginal point and the left adjacent marginal point It connects;If the corresponding left adjacent marginal point of right neighbour's marginal point of marginal point is not the marginal point, the marginal point and institute are disconnected State the connection of right adjacent marginal point.
5. according to the method described in claim 2, it is characterized in that, according to the comparison criterion of setting at least two evaluation results It is compared, to determine target detection threshold value, specifically includes:
Compare the length value of at least two average edge chain lengths;
The maximum average edge chain length of the length value is determined as optimal evaluation result, the optimal evaluation result is corresponding Alternate thresholds are denoted as the target detection threshold value.
6. -5 any method according to claim 1, which is characterized in that after determining target detection threshold value, further includes:
Determine the corresponding optimal edge chain threshold value of the target detection threshold value;
Wherein, the target detection threshold value is used to determine the marginal point of the image to be processed;The optimal edge chain threshold value is used Noise spot in the filtering marginal point.
7. according to the method described in claim 6, it is characterized in that, the corresponding optimal side of the determination target detection threshold value Edge chain threshold value, specifically includes:
Determine the maximal margin chain length angle value in the chain of target detection threshold value corresponding edge;
It calculates the maximal margin chain length angle value and sets the product value of percentage;
Using the product value as the optimal edge chain threshold value of the target detection threshold value.
8. the method according to claim 1, wherein at least two Alternate thresholds are from the minimum first of setting Beginning Alternate thresholds start, and are stepped up and obtain to set step-length.
9. a kind of threshold value for Image Edge-Detection is from determining device characterized by comprising
Gradient image determining module determines the edge gradient image of image to be processed for the edge detection operator based on setting, The corresponding gradient information of each pixel in the edge gradient image, the gradient information includes gradient magnitude and gradient Direction;
Alternate thresholds determining module determines at least two Alternate thresholds for the threshold value alternative conditions based on setting;
Evaluation module, for carrying out image border inspection to image to be processed respectively using at least two Alternate thresholds It surveys, and the testing result of at least two Alternate thresholds is evaluated respectively according to the Evaluation Strategy of setting;
Targets threshold determining module, for being compared according to the comparison criterion of setting at least two evaluation results, with determination Target detection threshold value;
Wherein, the threshold value alternative conditions include: minimum initial Alternate thresholds and upper threshold condition;
The minimum initial Alternate thresholds setting are as follows: minimal gray grade corresponding to pixel of the gradient magnitude greater than 0;
The upper threshold condition setting are as follows: after carrying out thresholding based on selected Alternate thresholds, if being formed by marginal point Area and the ratio of edge gradient image surface product are less than setup parameter, then it is assumed that and the Alternate thresholds reach upper threshold, Wherein, the marginal point area is equal to the sum of the gradient magnitude of identified each marginal point after thresholding.
10. device according to claim 9, which is characterized in that the evaluation module is specifically used for:
The marginal point in the edge gradient image is determined respectively based at least two Alternate thresholds of selection, and is based on the side Edge point generates at least one boundary chain;
The generation item number of the boundary chain is counted, and determines the edge chain length of each of the edges chain;
Based on the corresponding average edge chain length of Alternate thresholds described in the generation item number and each boundary chain length computation;
Using the average edge chain length as the evaluation result of the Alternate thresholds.
11. device according to claim 10, which is characterized in that described to generate at least one edge based on the marginal point Chain, comprising:
According to the corresponding gradient direction of marginal point each in the search order of setting and the edge gradient image, each side is determined respectively The left adjacent marginal point and right adjacent marginal point of edge point;
Each marginal point is attached with corresponding left adjacent marginal point and right adjacent side edge point;
Orientation consistency inspection is carried out to each marginal point based on consistency check criterion, at least one is obtained and meets consistency inspection Look into the boundary chain of criterion.
12. device according to claim 11, which is characterized in that the consistency check criterion are as follows:
If the corresponding right adjacent marginal point of left neighbour's marginal point of marginal point is not the marginal point, the marginal point and institute are disconnected State the connection of left adjacent marginal point;If the corresponding left adjacent marginal point of right neighbour's marginal point of marginal point is not the marginal point, break Open the connection of the marginal point and the right adjacent marginal point.
13. device according to claim 10, which is characterized in that the targets threshold determining module is specifically used for:
Compare the length value of at least two average edge chain lengths;
The maximum average edge chain length of the length value is determined as optimal evaluation result, the optimal evaluation result is corresponding Alternate thresholds are denoted as the target detection threshold value.
14. according to any device of claim 9-13, which is characterized in that after targets threshold determining module, also wrap It includes:
Boundary chain threshold determination module, for determining the corresponding optimal edge chain threshold value of the target detection threshold value;
Wherein, the target detection threshold value is used to determine the marginal point of the image to be processed;The optimal edge chain threshold value is used Noise spot in the filtering marginal point.
15. device according to claim 14, which is characterized in that the boundary chain threshold determination module is specifically used for:
Determine the maximal margin chain length angle value in the chain of target detection threshold value corresponding edge;
It calculates the maximal margin chain length angle value and sets the product value of percentage;
Using the product value as the optimal edge chain threshold value of the target detection threshold value.
16. device according to claim 9, which is characterized in that at least two Alternate thresholds are the minimum from setting Initial Alternate thresholds start, and are stepped up and obtain to set step-length.
CN201610466010.3A 2016-06-23 2016-06-23 A kind of certainly determining method and device of the threshold value for Image Edge-Detection Active CN106157301B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610466010.3A CN106157301B (en) 2016-06-23 2016-06-23 A kind of certainly determining method and device of the threshold value for Image Edge-Detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610466010.3A CN106157301B (en) 2016-06-23 2016-06-23 A kind of certainly determining method and device of the threshold value for Image Edge-Detection

Publications (2)

Publication Number Publication Date
CN106157301A CN106157301A (en) 2016-11-23
CN106157301B true CN106157301B (en) 2019-02-05

Family

ID=57353647

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610466010.3A Active CN106157301B (en) 2016-06-23 2016-06-23 A kind of certainly determining method and device of the threshold value for Image Edge-Detection

Country Status (1)

Country Link
CN (1) CN106157301B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111986221B (en) * 2020-09-07 2024-05-24 凌云光技术股份有限公司 Edge evaluation method and device based on gray level or position information
CN112801032B (en) * 2021-02-22 2022-01-28 西南科技大学 Dynamic background matching method for moving target detection
CN113658153B (en) * 2021-08-24 2024-01-26 凌云光技术股份有限公司 Contour data feature point detection method and device
CN113705672B (en) * 2021-08-27 2024-03-26 国网浙江省电力有限公司双创中心 Threshold selection method, system, device and storage medium for image target detection

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101465001A (en) * 2008-12-31 2009-06-24 昆山锐芯微电子有限公司 Method for detecting image edge based on Bayer RGB
WO2010140159A2 (en) * 2009-06-05 2010-12-09 Hewlett-Packard Development Company, L.P. Edge detection
CN202736125U (en) * 2012-06-15 2013-02-13 黄淮学院 Medical image edge detection system
CN104077773A (en) * 2014-06-23 2014-10-01 北京京东方视讯科技有限公司 Image edge detection method, and image target identification method and device
CN104700421A (en) * 2015-03-27 2015-06-10 中国科学院光电技术研究所 Edge detection algorithm based on canny self-adaptive threshold value

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101465001A (en) * 2008-12-31 2009-06-24 昆山锐芯微电子有限公司 Method for detecting image edge based on Bayer RGB
WO2010140159A2 (en) * 2009-06-05 2010-12-09 Hewlett-Packard Development Company, L.P. Edge detection
CN202736125U (en) * 2012-06-15 2013-02-13 黄淮学院 Medical image edge detection system
CN104077773A (en) * 2014-06-23 2014-10-01 北京京东方视讯科技有限公司 Image edge detection method, and image target identification method and device
CN104700421A (en) * 2015-03-27 2015-06-10 中国科学院光电技术研究所 Edge detection algorithm based on canny self-adaptive threshold value

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种自适应梯度幅值的边缘检测算法;姚刚等;《计算机与数字工程》;20101120;第38卷(第11期);第17-21页

Also Published As

Publication number Publication date
CN106157301A (en) 2016-11-23

Similar Documents

Publication Publication Date Title
CN110503095B (en) Positioning quality evaluation method, positioning method and device of target detection model
CN109741356B (en) Sub-pixel edge detection method and system
CN106093066B (en) A kind of magnetic tile surface defect detection method based on improved machine vision attention mechanism
EP3869797B1 (en) Method for depth detection in images captured using array cameras
CN105279372B (en) A kind of method and apparatus of determining depth of building
CN106157301B (en) A kind of certainly determining method and device of the threshold value for Image Edge-Detection
JP4886844B2 (en) Automatic determination of machine vision tool parameters
CN103177451B (en) Based on the self-adapting window of image border and the Stereo Matching Algorithm of weight
CN108416789A (en) Method for detecting image edge and system
CN104978715A (en) Non-local mean image denoising method based on filtering window and parameter self-adaption
US8706286B2 (en) Method and system for detecting suitability of an image to embroidery
CN104899853A (en) Image region dividing method and device
CN109064418A (en) A kind of Images Corrupted by Non-uniform Noise denoising method based on non-local mean
CN102819850A (en) Method for detecting edge of color image on basis of local self-adaption color difference threshold
TWI500904B (en) Stereo camera and automatic range finding method for measuring a distance between stereo camera and reference plane
CN106937109B (en) The method that low cost judges resolution ratio of camera head level
CN106651813B (en) A kind of non-local mean denoising method of more fragments compositings
CN103473776A (en) Method and system for comparing image definition and automatic focusing control method
CN106408747B (en) A kind of image-recognizing method and device
CN108416351A (en) The determination method, apparatus and computer equipment in pavement disease region
CN106097313A (en) Image partition method and device
CN104282013B (en) A kind of image processing method and device for foreground target detection
JP2014007611A (en) Image processing apparatus and control method therefor
CN104463896B (en) Image corner point detection method and system based on kernel similar region distribution characteristics
CN106600616A (en) Image background clutter measurement method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 "change of name, title or address"

Address after: 100094 Beijing city Haidian District Cui Hunan loop 13 Hospital No. 7 Building 7 room 701

Patentee after: Lingyunguang Technology Co., Ltd

Address before: 100094 Beijing city Haidian District xingshikou road Yiyuan cultural creative industry base building No. 2 Room 101

Patentee before: LUSTER LIGHTTECH GROUP Co.,Ltd.

CP03 "change of name, title or address"