CN109993721A - A kind of image enchancing method based on clustering algorithm and ant group algorithm - Google Patents

A kind of image enchancing method based on clustering algorithm and ant group algorithm Download PDF

Info

Publication number
CN109993721A
CN109993721A CN201910272644.9A CN201910272644A CN109993721A CN 109993721 A CN109993721 A CN 109993721A CN 201910272644 A CN201910272644 A CN 201910272644A CN 109993721 A CN109993721 A CN 109993721A
Authority
CN
China
Prior art keywords
ant
boundary
pixel
cluster centre
image
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
Application number
CN201910272644.9A
Other languages
Chinese (zh)
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.)
Chengdu College of University of Electronic Science and Technology of China
Original Assignee
Chengdu College of University of Electronic Science and Technology of China
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 Chengdu College of University of Electronic Science and Technology of China filed Critical Chengdu College of University of Electronic Science and Technology of China
Priority to CN201910272644.9A priority Critical patent/CN109993721A/en
Publication of CN109993721A publication Critical patent/CN109993721A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction

Abstract

The invention discloses a kind of image enchancing method based on clustering algorithm and ant group algorithm belongs to field of image processing, and the present invention carries out gray processing processing to original image first, and characterizes to the pixel in image after processing;Cluster is recycled to be clustered to obtain region ant to the pixel after characterization, the region ant after being clustered;Then to the region ant after cluster, boundary search is carried out using ant group algorithm, obtains boundary intensity image;Boundary intensity image is overlapped with original image finally, obtains enhanced image, the present invention can not only improve the retrieval time of ant colony, moreover it is possible to the effective precision for improving Boundary Extraction.

Description

A kind of image enchancing method based on clustering algorithm and ant group algorithm
Technical field
The present invention relates to field of image enhancement, and in particular to a kind of image enhancement side based on clustering algorithm and ant group algorithm Method.
Background technique
Image enhancement technique is that digital picture develops one of necessary basis.Image segmentation and Edge extraction are to target master It is to realize that image meets person with foresight's condition of human visual responsiveness, and the elder generation as image procossing that topic is split with background It leads.How to divide detection picture, extracts the judgment criteria that edge feature value is picture processing quality.Document " several edge detections In operator application study in terms of the infrared image processing " to edge detection operator in different infrared images using advising, Do not suggest that how edge detection operator sets.Document " edge detection and its evaluation method " proposes to evaluate with edge continuity Edge extracting quality determines edge continuity threshold value empirically providing, these setting all more empiricism.Document " Gauss The patulous research of Lapalace edge detection operator " is using traditional Gauss Laplace operator Gaussian filter and La Pu Lars sharpening filter is combined, first smooth out noise, then carries out edge detection, but its time is complex, edge contour Unintelligible, detection quality is bad.Document " the edge detection operator selection algorithm based on local entropy " is taken out using edge detection operator The edge for taking out image, is calculated the local entropy of image border, is weighted using the grayscale information of edge pixel, calculates edge Point weighted average edge local entropy, process is complicated, computationally intensive.
Summary of the invention
It is an object of the invention to: a kind of image enchancing method based on clustering algorithm and ant group algorithm is provided, is solved Using current image enchancing method, time length, technical problem with high accuracy.
A kind of image enchancing method based on clustering algorithm and ant group algorithm, comprising the following steps:
Step 1: gray processing processing being carried out to original image, and the pixel in image after processing is characterized;
Step 2: the pixel after characterization being clustered using region ant, the region ant after being clustered;
Step 3: to the region ant after cluster, boundary search being carried out using ant group algorithm, obtains boundary intensity image;
Step 4: boundary intensity image being overlapped with original image, obtains enhanced image.
Further, it is characterized in the step 1 specifically: utilize the gray value of image, shade of gray value and neighborhood Treated that image characterizes to the gray processing for characteristic value, obtains the three-component feature set of image after gray processing processing.
Further, in the step 2, clustering method the following steps are included:
Step 21: initialization cluster centre, according to the Attribute transposition region ant class of pixel, a pixel corresponding one A region ant;
Step 22: judging that whether region ant numerical value is more than threshold value A in each region ant class, if being more than, jumps to step Rapid 23, otherwise go to step 3 carry out boundary searches;
Step 23: it is based on cluster centre, region ant selects path to scan for pixel by selection strategy formula, Region ant is divided in corresponding region ant class;
Step 24: refresh formula using cluster centre and generate new cluster centre, judges the distance between new cluster centre, if Distance is less than the then agglomerative clustering center threshold value B, nonjoinder on the contrary;
Step 25: judging whether there is the region ant not clustered, and if it exists, then go to step 22, otherwise jump to Step 26;
Step 26: the number of new cluster centre is compared with threshold value C, the threshold value C is boundary ant the number of iterations, If being less than, jump procedure 3 carries out boundary search, otherwise exports cluster result, terminates algorithm.
Further, in the step 21, initialization cluster centre includes the number of determining cluster centre, cluster centre The neighborhood characteristics value of gray value, the gradient value of cluster centre and cluster centre.
Further, in the step 23, region ant is selected in path by selection strategy formula, heuristic function are as follows:
Wherein, r indicates cluster radius, dijIndicate current search pixel with the distance between cluster centre, pkIt indicates to calculate Symbol, k indicate that constant, m indicate max radius, XikIndicate the coordinate of current search pixel, CenterjkThe seat of cluster centre Mark, nijIndicate that the expected degree that current search pixel is clustered, i indicate that the abscissa of current search pixel, j indicate cluster The abscissa at center.
Region ant next step routing strategy are as follows:
Wherein, PijRepresent the next step routing strategy of region ant, τijIt indicates between pixel i and cluster centre j Routing information element concentration, ηijThat indicate is the amount on similar boundary on undirected path between pixel i and cluster centre j, j ∈ S indicates the set of all active paths, and β is impact factor of the heuristic guidance function to Path selection, and α is that region ant exists The amplification degree of information accumulation during cluster.
Region ant global path more new strategy are as follows:
Wherein, ρ indicates attenuation degree of the information content with the time on path, Δ τijIndicate the pheromones in this circulation Increment, ρ indicate attenuation degree of the information content with the time on path, τij(t) it indicates between pixel i and cluster centre j The concentration of routing information element,Represent global information more new strategy;N indicates the global maximum cycle updated, and k is represented Current cycle time,Represent the pheromones increment in kth time circulation.
Further, in the step 24, cluster centre refreshes formula are as follows:
Wherein, Ni indicates maximum cycle, and k indicates current cycle time, XkIndicate current pixel point to cluster centre Distance.
Further, the step 3 specifically:
Step 31: to each region ant after cluster, generating the boundary ant with mark, establish path taboo Table;
Step 32: the boundary ant utilize path taboo list, using forward search strategy to each region ant into Row compensation boundary search, and path taboo list described in real-time update;
Step 33: the boundary ant, which traverses, is iterated the global update of realization for one week, judges changing for the boundary ant Whether generation number is greater than threshold value C, if more than then going to step 34, otherwise gos to step 32;
Step 34: the compensation boundary that output boundary Ant Search obtains, the image that the compensation boundary is formed is boundary Gray level image.
Further, in the step 32, in the forward search strategy of boundary ant, the heuristic function of searching route are as follows:
Wherein, ηijThe amount on similar boundary on undirected path between pixel i and cluster centre j, max 1, | Xj-Xi | it is maximum connection similar factors, V (Xj) what is indicated is the adjacent difference value of pixel.
Boundary ant next step routing strategy are as follows:
Wherein, α and β indicate adjustment parameter, q0Indicate maximal correlation affecting parameters, NEiIndicate all eight neighborhood pixels Set, τijIndicate the concentration of the routing information element between pixel i and cluster centre j, η 'ijIt indicates in pixel i and cluster The amount on similar boundary, q indicate probability on undirected path between heart j.
Further, in the step 33, the boundary ant overall situation updates the formula used are as follows:
Wherein, ρ indicates attenuation degree of the information content with the time on path, Δ τijIncrease for the pheromones in this circulation Amount;
avg(Lm) indicate average step length of the m ant in this time circulation, τmaxIndicate information in current M × N image The maximum value of plain concentration, τijIndicate the concentration of the routing information element between pixel i and cluster centre j, K is greatest iteration time Number.
In conclusion by adopting the above-described technical solution, the beneficial effects of the present invention are:
1. what algorithm obtained be that treated true color picture, has a wide range of application, application value is big.
2. being retrieved using ant group algorithm, available optimal edge testing result will be identical in conjunction with clustering algorithm The pixel of attribute is put into a region, can reduce the redundancy of retrieval, is reduced identification error, is improved the speed and receipts of retrieval Speed is held back, rationally avoids falling into local optimum, reaches globally optimal solution, reduces retrieval time, reduces the randomness of retrieval and interior Deposit consuming.
3. fuzzy clustering in conjunction with ant group algorithm, is experimentally confirmed, using this method in retrieval time side by the present invention Face improves 20.7% compared to traditional ant group algorithm;14.8% is improved in precision aspect;Texture is more in terms of picture segmentation Clearly.
4. use scope of the present invention is extensive, it is outer to can be applied not only to diseases and pests of agronomic crop detection, can also apply and vehicle Crimping detection, vehicle identification, bridge machinery, historical relic detection and reparation, infant's security control etc. field.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 is overall flow figure of the invention;
Fig. 2 is processing result of the traditional ant group algorithm to disease corn;
Fig. 3 is processing result of the present invention to disease corn;
Fig. 4 is processing result of the traditional ant group algorithm to healthy corn;
Fig. 5 is processing result of the present invention to healthy corn.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention, i.e., described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is logical The component for the embodiment of the present invention being often described and illustrated herein in the accompanying drawings can be arranged and be designed with a variety of different configurations.
Therefore, the detailed description of the embodiment of the present invention provided in the accompanying drawings is not intended to limit below claimed The scope of the present invention, but be merely representative of selected embodiment of the invention.Based on the embodiment of the present invention, those skilled in the art Member's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
It should be noted that the relational terms of term " first " and " second " or the like be used merely to an entity or Operation is distinguished with another entity or operation, and without necessarily requiring or implying between these entities or operation, there are any This actual relationship or sequence.Moreover, the terms "include", "comprise" or its any other variant be intended to it is non-exclusive Property include so that include a series of elements process, method, article or equipment not only include those elements, but also Further include other elements that are not explicitly listed, or further include for this process, method, article or equipment it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described There is also other identical elements in the process, method, article or equipment of element.
A kind of image enchancing method based on clustering algorithm and ant group algorithm, comprising the following steps:
Step 1: gray processing processing being carried out to original image, and the pixel in image after processing is characterized;
It is characterized in the step 1 specifically: using the gray value of image, shade of gray value and neighborhood characteristics value to institute It states gray processing treated that image is characterized, obtain the three-component feature set of image after gray processing processing.
Step 2: the pixel after characterization being clustered using region ant, the region ant after being clustered;
In the step 2, clustering method the following steps are included:
Step 21: initialization cluster centre, according to the Attribute transposition region ant class of pixel, a pixel corresponding one A region ant;
In the step 21, initialization cluster centre includes the gray value, poly- of the number of determining cluster centre, cluster centre The gradient value at class center and the neighborhood characteristics value of cluster centre.
Step 22: judging that whether region ant numerical value is more than threshold value A in each region ant class, if being more than, jumps to step Rapid 23, otherwise go to step 3 carry out boundary searches;
Step 23: it is based on cluster centre, region ant selects path to scan for pixel by selection strategy formula, Region ant is divided in corresponding region ant class;
In the step 23, region ant is selected in path by selection strategy formula, heuristic function are as follows:
Wherein, r indicates cluster radius, dijIndicate current search pixel with the distance between cluster centre, pkIt indicates to calculate Symbol, k indicate that constant, m indicate max radius, XikIndicate the coordinate of current search pixel, CenterjkThe seat of cluster centre Mark, nijIndicate that the expected degree that current search pixel is clustered, i indicate that the abscissa of current search pixel, j indicate cluster The abscissa at center.
Region ant next step routing strategy are as follows:
Wherein, PijRepresent the next step routing strategy of region ant, τijIt indicates between pixel i and cluster centre j Routing information element concentration, ηijThat indicate is the amount on similar boundary on undirected path between pixel i and cluster centre j, j ∈ S indicates the set of all active paths, and β is impact factor of the heuristic guidance function to Path selection, and α is that region ant exists The amplification degree of information accumulation during cluster.
Region ant global path more new strategy are as follows:
Wherein, ρ indicates attenuation degree of the information content with the time on path, Δ τijIndicate the pheromones in this circulation Increment, ρ indicate attenuation degree of the information content with the time on path, τij(t) it indicates between pixel i and cluster centre j The concentration of routing information element,Represent global information more new strategy;N indicates the global maximum cycle updated, and k is represented Current cycle time,Represent the pheromones increment in kth time circulation.
Step 24: refresh formula using cluster centre and generate new cluster centre, judges the distance between new cluster centre, if Distance is less than the then agglomerative clustering center threshold value B, nonjoinder on the contrary;
In the step 24, cluster centre refreshes formula are as follows:
Wherein, Ni indicates maximum cycle, and k indicates current cycle time, XkIndicate current pixel point to cluster centre Distance.
Step 25: judging whether there is the region ant not clustered, and if it exists, then go to step 22, otherwise jump to Step 26;
Step 26: the number of new cluster centre is compared with threshold value C, the threshold value C is boundary ant the number of iterations, If being less than, jump procedure 3 carries out boundary search, otherwise exports cluster result, terminates algorithm.
Step 3: to the region ant after cluster, boundary search being carried out using ant group algorithm, obtains boundary intensity image;
The step 3 specifically:
Step 31: to each region ant after cluster, generating the boundary ant with mark, establish path taboo Table;
Step 32: the boundary ant utilize path taboo list, using forward search strategy to each region ant into Row compensation boundary search, and path taboo list described in real-time update;
Step 33: the boundary ant, which traverses, is iterated the global update of realization for one week, judges changing for the boundary ant Whether generation number is greater than threshold value C, if more than then going to step 34, otherwise gos to step 32;
In the step 32, in the forward search strategy of boundary ant, the heuristic function of searching route are as follows:
Wherein, ηijThe amount on similar boundary on undirected path between pixel i and cluster centre j, max 1, | Xj-Xi | it is maximum connection similar factors, V (Xj) what is indicated is the adjacent difference value of pixel.
Boundary ant next step routing strategy are as follows:
Wherein, α and β indicate adjustment parameter, q0Indicate maximal correlation affecting parameters, NEiIndicate all eight neighborhood pixels Set, τijIndicate the concentration of the routing information element between pixel i and cluster centre j, η 'ijIt indicates in pixel i and cluster The amount on similar boundary, q indicate probability on undirected path between heart j.
Step 34: the compensation boundary that output boundary Ant Search obtains, the image that the compensation boundary is formed is boundary Gray level image.
In the step 33, the boundary ant overall situation updates the formula used are as follows:
Wherein, ρ indicates attenuation degree of the information content with the time on path, Δ τijIncrease for the pheromones in this circulation Amount;avg(Lm) indicate average step length of the m ant in this time circulation, τmaxIndicate pheromone concentration in current M × N image Maximum value, τijIndicate the concentration of the routing information element between pixel i and cluster centre j, K is maximum number of iterations.
Step 4: boundary intensity image being overlapped with original image, obtains enhanced image.
Feature and performance of the invention are described in further detail with reference to embodiments.
Embodiment 1
The present embodiment is for being illustrated the step 1 in method.
A kind of image enchancing method based on clustering algorithm and ant group algorithm, step 1 are as follows: gray scale is carried out to original image Change processing, and the pixel in image after processing is characterized, obtain the pixel of image;
Since target in original image and background are themes, original image major part is occupied, but boundary point and noise spot are only Account for small part.Both for target subject and background, can be distinguished using gray value, but boundary point and noise spot nothing Method is distinguished, and respective handling need to be carried out.The present invention uses three gray value, shade of gray value and neighborhood characteristics value components of pixel Pixel in original image is characterized, characteristics of image is turned into three data sets with three components, to connect down It prepares to retrieve edge, i.e., subsequent operation is using the data set as data basis.
Embodiment 2
The present embodiment is based on embodiment 1, for the step 2 in the present invention to be specifically described.
A kind of image enchancing method based on clustering algorithm and ant group algorithm, step 2 are as follows: using region ant to pixel Point carries out fuzzy clustering, and the region ant after being clustered, the step is for will have the region ant of same characteristic features to be put into together In one region ant class, fast and easy retrieval, the fuzzy clustering algorithm solves all ant initial selecteds in traditional ant group algorithm At random, blindly, the problem of causing a large amount of invalid searches, the present invention determines cluster centre using fuzzy clustering theory to direction of advance, Guide Ant Search, the specific steps are as follows:
Step 21: initialization cluster centre, according to the Attribute transposition region ant class of pixel, a pixel corresponding one A region ant;Initialization cluster centre include the number of determining cluster centre, the gray value of cluster centre, cluster centre ladder The neighborhood characteristics value of angle value and cluster centre;
The determination of cluster centre number and gray value:
Same target pixel points generally have similar gray-value, and it is attached to be gathered in different gray values using grey level histogram determination Short range degree pixel based on initial pictures grey level histogram, takes n as cluster result criterion from histogram Peak value, as cluster centre, n is initial cluster center number.By cycle calculations are changed into pixel between pixel in former algorithm Search process is reduced using ant to different cluster centre bootstrapping collections with the comparison of a small amount of several peak points, reduces operation Amount.
The determination of cluster centre gradient value:
The shade of gray value of background and target internal pixel is compared smaller in gray level image, is in the great majority in the picture, and Boundary pixel point and the shade of gray value of noise spot are larger, and boundary pixel point number is much larger than noise pixel point number, this reality It applies that example is wide by range, cluster centre its shade of gray value more than pixel is set as 0, calculates remaining cluster centre gradient value, adopt Formula are as follows:
Wherein, gf is gradient value to be asked, and gradient value of the gd (i, j) between pixel i and cluster centre j, m × n is figure The size of picture.
The determination of cluster centre neighborhood characteristics value:
More preferably to distinguish boundary point and noise spot, introduces element sim and describe neighborhood of pixels feature (i.e. neighborhood characteristics value), mention Take process as follows:
Select each 3 × 3 neighborhood of pixel, create variable sim=0, to pixel each in neighborhood, calculate pixel i and The difference of pixel j gray value.Threshold value T executes sim=sim+1 if difference is less than T, repeats the process until each picture Vegetarian refreshments has a sim value.Sim indicates that pixel similarity degree is normally set up for object pixel and background pixel in neighborhood Sim=8, and for edge pixel and noise spot, edge pixel point sim value is usually bigger than noise spot.Therefore to different images its Threshold value T will be different.Such as smoothed image, T value very little, if piece image details is more, T value with regard to larger, T value generally take between Between 50 to 90.
Step 22: judging whether region ant numerical value is more than threshold value A in each region ant class, the threshold value A is preset The number of ant gos to step 23 if being more than in specification area, and otherwise go to step 3 carry out boundary searches;
Step 23: being based on cluster centre, region ant selects path to scanning for by selection strategy formula, by region Ant is divided in corresponding region ant class;
Wherein, r indicates cluster radius, dijIndicate current search pixel with the distance between cluster centre, pkIt indicates to calculate Symbol, k indicate that constant, m indicate max radius, XikIndicate the coordinate of current search pixel, CenterjkThe seat of cluster centre Mark, nijIndicate that the expected degree that current search pixel is clustered, i indicate that the abscissa of current search pixel, j indicate cluster The abscissa at center.
Region ant next step routing strategy are as follows:
Wherein, PijRepresent the next step routing strategy of region ant, τijIt indicates between pixel i and cluster centre j Routing information element concentration, ηijThat indicate is the amount on similar boundary on undirected path between pixel i and cluster centre j, j ∈ S indicates the set of all active paths, and β is impact factor of the heuristic guidance function to Path selection, and α is that region ant exists The amplification degree of information accumulation during cluster.
Region ant global path more new strategy are as follows:
Wherein, ρ indicates attenuation degree of the information content with the time on path, Δ τijIndicate the pheromones in this circulation Increment, ρ indicate attenuation degree of the information content with the time on path, τij(t) it indicates between pixel i and cluster centre j The concentration of routing information element,Represent global information more new strategy;N indicates the global maximum cycle updated, and k is represented Current cycle time,Represent the pheromones increment in kth time circulation.
Step 24: refresh formula using cluster centre and generate new cluster centre, judges the distance between new cluster centre, if Distance is less than threshold value B, and then agglomerative clustering center, threshold value B are preset according to usage scenario, otherwise nonjoinder;
Cluster centre refreshes formula are as follows:
Wherein, Ni indicates maximum cycle, and k indicates current cycle time, XkIndicate current pixel point to cluster centre Distance.Step 25: judging whether there is the region ant not clustered, and if it exists, then go to step 22, otherwise jump to step Rapid 26;
Step 26: the number of new cluster centre being compared with threshold value C, the threshold value C is the iteration time of boundary ant colony Number, if being less than, jump procedure 3 carries out boundary search, otherwise exports cluster result, terminates algorithm.
Embodiment 3
The present embodiment is based on embodiment 2, for being illustrated to step 3 in the present invention and step 4.
A kind of image enchancing method based on clustering algorithm and ant group algorithm, step 3 are as follows: to the region ant after cluster Ant carries out boundary search using ant group algorithm, obtains boundary intensity image;For boundary ant colony, main task is to region ant The boundary that group hunting goes out is further compensate for searching for, to guarantee border detection accuracy.Boundary ant colony is mobile to depend on its week The difference of eight neighborhood pixel value is enclosed, and in its moving process, boundary ant colony will appear error for Boundary Recognition, such as: side Boundary's ant colony search pixel near real border when, close boundary information intensity may allow ant colony generate illusion, with for It is real border at this, leads to that real boundary is not achieved.
Step 31: to each region ant after cluster, generating the boundary ant with mark, and establish path taboo Table;
Region ant colony generates boundary ant colony when cluster centre searches for respective classification, and invests corresponding mark, boundary for it Ant colony classification is different, will be different with mark.The boundary ant colony in other classifications can be encountered when boundary ant colony search compensation boundary, If repeat region may be searched by continuing search forward, bulk redundancy is caused to search for, to reduce redundant search, the present invention as far as possible For 2 kinds of different situations, Different Strategies are taken, are embodied are as follows:
(1) when face-to-face, if two are adhered to separately different groups of boundary ants and met, and the step that readvances goes to the same pixel Point, halts.
(2) it if an ant " touch " has been passed by path to another ant, halts.
When all Ant Searchs, a taboo list is established herein, record ant path of passing by is avoided to find new route Repeat search[13].A time threshold is pre-defined for every ant simultaneously, when ant enters " dead end " (i.e. ant in search The pixel of eight neighborhood had been searched for by it around locating pixel) when be adjusted by time threshold, guarantee ant along walking Path is crossed to return and re-search for.Constrained Path density, if the path number that boundary ant colony is searched near current point is big In pre-defined value, stop search.
Step 32: the boundary ant utilize path taboo list, using forward search strategy to each region ant into Row compensation boundary search, and path taboo list described in real-time update;
The present invention is updated guidance to boundary ant colony search result, and it is similar with maximum connection to introduce the adjacent difference value of highest Property two factors, for select more suitable path, the heuristic function of searching route are as follows:
Wherein, ηijThe amount on similar boundary on undirected path between pixel i and cluster centre j, max 1, | Xj-Xi | it is maximum connection similar factors, V (Xj) what is indicated is the adjacent difference value of pixel.
Ant is exchanged in such a way that it is by legacy information element on path with other ants, to guide below The route of ant, this rule is known as node transition rule, and other ants is attracted to follow with certain probability, referred to as path Selection strategy.It can be passed through by more ants if a paths the short, the pheromone concentration left can be bigger, more by attracting Ant walks last time road, but not all ant can all select most attractive path.For the ant colony of boundary, get rid of currently most Big pheromone concentration path attracts, then searching for new route is one of the condition for searching compensation boundary, using next step path Selection strategy realization, boundary ant next step routing strategy are as follows:
Wherein, α and β indicate adjustment parameter, q0Indicate maximal correlation affecting parameters, NEiIndicate all eight neighborhood pixels Set, τijIndicate the concentration of the routing information element between pixel i and cluster centre j, η 'ijIt indicates in pixel i and cluster The amount on similar boundary, q indicate probability on undirected path between heart j.
Ant colony solves ability and ant colony cooperates with each other and is closely related, and it is shadow that ant colony is communicated by pheromones on path The core that algorithm solves performance is rung, therefore, it is necessary to use more new strategy to pheromones in algorithm model.
For the ant colony of boundary, often making a move all needs to judge whether to need to search for compensation boundary, therefore, side in next step Boundary's ant routing information amount updates, using following formula:
Δτij(t)=ρ τij(t-1)+(1-ρ)τ0 (33)
Wherein, τ0It is the pheromone concentration left on this path when boundary ant colony generates,
Step 33: the boundary ant, which traverses, is iterated the global update of realization for one week, judges changing for the boundary ant Whether generation number is greater than threshold value C, if more than then going to step 34, otherwise gos to step 32;
Pheromones in boundary ant colony the traversal after a week primary all paths of global update, to control one under the ant of boundary The direction of search of secondary traversal, allows it to continue searching compensation boundary, and the boundary ant overall situation updates the formula used are as follows:
Wherein, ρ indicates attenuation degree of the information content with the time on path, Δ τijIncrease for the pheromones in this circulation Amount;avg(Lm) indicate average step length of the m ant in this time circulation, τmaxIndicate pheromone concentration in current M × N image Maximum value, τijIndicate the concentration of the routing information element between pixel i and cluster centre j, K is maximum number of iterations.
Step 34: the compensation boundary that output boundary Ant Search obtains, the image that the compensation boundary is formed is boundary Gray level image.
Step 4: boundary intensity image being overlapped with original image, obtains enhanced image, the present invention is by gray scale Image border profile point acts on original image target, and two pictures are overlapped, and the image being more clear to edge is obtained, so as to it Later period segmentation and application.
Embodiment 4
The present embodiment is used to for traditional ant group algorithm and inventive algorithm being applied in agricultural pest image detection, with jade For rice.After two kinds of pictures of healthy corn and disease corn are with regard to the number of iterations, processing time and processing in terms of picture precision three It is analyzed, wherein during same type picture is to two kinds of algorithm process, Pixel Dimensions are consistent.
Experimental situation is as shown in table 1:
1 experimental situation demand of table
1. Contrast Precision Analysis
When maximum number of iterations is 7, comparing result is as shown in Figure 2-5.
As shown in Fig. 2, being traditional ant group algorithm to the processing result of disease corn, Fig. 2 includes original image, traditional ant colony The extraction result of algorithm and final enhanced as a result, for disease corn, handles picture, disease using traditional ant group algorithm Evil position is smudgy, without clear texture;Fig. 3 show the present invention to the processing result of disease corn, and Fig. 3 includes and Fig. 2 phase With original image, extraction result of the invention and final enhanced as a result, improving ant group algorithm removes most of noise Texture, picture are given prominence to the key points, favourable to image segmentation, and corn contours segmentation is clear, and edge detection results are accurate.
As shown in figure 4, being traditional ant group algorithm to the processing result of healthy corn, Fig. 4 includes original image, traditional ant colony The extraction result of algorithm and final enhanced result;Fig. 5 show the present invention to the processing result of disease corn, Fig. 5 packet Containing original image identical with Fig. 4, extraction result of the invention and final enhanced as a result, for healthy corn, pass Picture is only capable of finding out substantially edge contour after system ant group algorithm processing, and profile traces are fuzzy, and after improving ant group algorithm processing Picture can clearly, precisely find out corn texture situation, and the detection of disease corn image enhancement result is much higher than traditional ant group algorithm (figure 2-5 is artwork master, if advantage of the invention cannot be embodied well, it is possible to provide cromogram).
Ant group algorithm is improved to the two kinds of picture processing of disease corn and healthy corn, edge processing precision is all than traditional ant Group's algorithm is high, and comparing result is as shown in table 2.
2 two kinds of algorithm characteristics point extraction accuracy comparisons (%) of table
As shown in Table 2, it improves ant group algorithm and precision after impaired corn processing is improved compared to traditional ant group algorithm 10.2%, healthy corn precision improves 16%, is integrally improved 14.8%.
2. algorithms of different runing time is analyzed
Traditional ant group algorithm and improvement ant group algorithm processing time are analyzed in the experiment of this group, in identical the number of iterations 7 In secondary situation, disease corn and healthy corn map are handled, Riming time of algorithm comparing result, as shown in table 3:
3 two kinds of Riming time of algorithm comparisons (s) of table
As shown in Table 3, it improves ant group algorithm processing healthy corn picture the spent time and compares traditional ant group algorithm saving 0.011 second;Processing disease corn picture the spent time compares traditional ant group algorithm and saves 0.012 second.On the whole, ant colony is improved Algorithm saves 0.0115 second, overall operation time fast 20.7%.In processing speed, this algorithm occupies clear superiority.
3. runing time is analyzed under different the number of iterations
This group is tested in the case where the number of iterations is respectively 1,3,9,27 situation, to disease corn and healthy corn with regard to traditional ant Group's algorithm and improvement ant group algorithm operation average time compare, and the results are shown in Table 4:
The runing time (s) of two kinds of algorithms under the different the number of iterations of table 4
As shown in Table 4, ant group algorithm is improved in the case where the number of iterations is 1 situation, and runing time is faster than traditional algorithm 0.008 second, speed promoted about 16.7%;The number of iterations is runing time fast 0.009 second in 3 situations, and speed is promoted about 17.6%;The number of iterations is runing time fast 0.016 second in 9 situations, and speed promotes about 21%;The number of iterations is 27 feelings Under condition, 0.023 second fast second of runing time, speed promotes about 23.2%.It is incremented by with the number of iterations, innovatory algorithm average operating time Compared with traditional algorithm, gap is gradually widened, innovatory algorithm more having time advantage.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.

Claims (9)

1. a kind of image enchancing method based on clustering algorithm and ant group algorithm, which comprises the following steps:
Step 1: gray processing processing being carried out to original image, and the pixel in image after processing is characterized;
Step 2: the pixel after characterization being clustered using region ant, the region ant after being clustered;
Step 3: to the region ant after cluster, boundary search being carried out using ant group algorithm, obtains boundary intensity image;
Step 4: boundary intensity image being overlapped with original image, obtains enhanced image.
2. a kind of image enchancing method based on clustering algorithm and ant group algorithm according to claim 1, which is characterized in that It is characterized in the step 1 specifically: using the gray value of image, shade of gray value and neighborhood characteristics value to the gray processing Treated, and image is characterized, and obtains the three-component feature set of image after gray processing processing.
3. a kind of image enchancing method based on clustering algorithm and ant group algorithm according to claim 1, which is characterized in that In the step 2, clustering method the following steps are included:
Step 21: initialization cluster centre, according to the Attribute transposition region ant class of pixel, the corresponding area of a pixel Domain ant;
Step 22: judge whether region ant numerical value is more than threshold value A in each region ant class, if being more than, gos to step 23, Otherwise go to step 3 carry out boundary searches;
Step 23: being based on cluster centre, region ant selects path to scan for pixel by selection strategy formula, by area Domain ant is divided in corresponding region ant class;
Step 24: refreshing formula using cluster centre and generate new cluster centre, the distance between new cluster centre is judged, if distance Less than the then agglomerative clustering center threshold value B, on the contrary nonjoinder;
Step 25: judging whether there is the region ant not clustered, and if it exists, then go to step 22, otherwise go to step 26;
Step 26: the number of new cluster centre being compared with threshold value C, the threshold value C is boundary ant the number of iterations, if small In then jump procedure 3 carries out boundary search, otherwise exports cluster result, terminates algorithm.
4. a kind of image enchancing method based on clustering algorithm and ant group algorithm according to claim 3, which is characterized in that In the step 21, initialization cluster centre includes the number of determining cluster centre, the gray value of cluster centre, cluster centre The neighborhood characteristics value of gradient value and cluster centre.
5. a kind of image enchancing method based on clustering algorithm and ant group algorithm according to claim 3, which is characterized in that In the step 23, region ant is selected in path by selection strategy formula, heuristic function are as follows:
Wherein, r indicates cluster radius, dijIndicate current search pixel with the distance between cluster centre, pkIt indicates to calculate symbol, K indicates that constant, m indicate max radius, XikIndicate the coordinate of current search pixel, CenterjkThe coordinate of cluster centre, nijTable Show that the expected degree that current search pixel is clustered, i indicate that the abscissa of current search pixel, j indicate cluster centre Abscissa.
Region ant next step routing strategy are as follows:
Wherein, PijRepresent the next step routing strategy of region ant, τijIndicate the road between pixel i and cluster centre j The concentration of diameter pheromones, ηijThat indicate is the amount on similar boundary on undirected path between pixel i and cluster centre j, j ∈ S Indicate the set of all active paths, β is impact factor of the heuristic guidance function to Path selection, and α is region ant poly- The amplification degree of information accumulation during class.
Region ant global path more new strategy are as follows:
Wherein, ρ indicates attenuation degree of the information content with the time on path, Δ τijIndicate that the pheromones in this circulation increase Amount, ρ indicate attenuation degree of the information content with the time on path, τij(t) road between pixel i and cluster centre j is indicated The concentration of diameter pheromones,Represent global information more new strategy;N indicates the global maximum cycle updated, and k representative is worked as Preceding cycle-index,Represent the pheromones increment in kth time circulation.
6. a kind of image enchancing method based on clustering algorithm and ant group algorithm according to claim 3, which is characterized in that In the step 24, cluster centre refreshes formula are as follows:
Wherein, Ni indicates maximum cycle, and k indicates current cycle time, XkIndicate current pixel point to cluster centre away from From.
7. a kind of image enchancing method based on clustering algorithm and ant group algorithm according to claim 1, which is characterized in that The step 3 specifically:
Step 31: to each region ant after cluster, generating the boundary ant with mark, establish path taboo list;
Step 32: the boundary ant utilizes path taboo list, is mended using forward search strategy to each region ant Repay boundary search, and path taboo list described in real-time update;
Step 33: the boundary ant, which traverses, is iterated the global update of realization for one week, judges the iteration time of the boundary ant Whether number is greater than threshold value C, if more than then going to step 34, otherwise gos to step 32;
Step 34: the compensation boundary that output boundary Ant Search obtains, the image that the compensation boundary is formed is boundary intensity Image.
8. a kind of image enchancing method based on clustering algorithm and ant group algorithm according to claim 7, which is characterized in that In the step 32, in the forward search strategy of boundary ant, the heuristic function of searching route are as follows:
Wherein, ηijThe amount on similar boundary on undirected path between pixel i and cluster centre j, max 1, | Xj-Xi| it is most Big connection similar factors, V (Xj) what is indicated is the adjacent difference value of pixel.
Boundary ant next step routing strategy are as follows:
Wherein, α and β indicate adjustment parameter, q0Indicate maximal correlation affecting parameters, NEiIndicate the collection of all eight neighborhood pixels It closes, τijIndicate the concentration of the routing information element between pixel i and cluster centre j, η 'ijIndicate pixel i and cluster centre j Between undirected path on similar boundary amount, q indicates probability.
9. a kind of image enchancing method based on clustering algorithm and ant group algorithm according to claim 7, which is characterized in that In the step 33, the boundary ant overall situation updates the formula used are as follows:
Wherein, ρ indicates attenuation degree of the information content with the time on path, Δ τijFor the pheromones increment in this circulation;
avg(Lm) indicate average step length of the m ant in this time circulation, τmaxIndicate pheromone concentration in current M × N image Maximum value, τijIndicate the concentration of the routing information element between pixel i and cluster centre j, K is maximum number of iterations.
CN201910272644.9A 2019-04-04 2019-04-04 A kind of image enchancing method based on clustering algorithm and ant group algorithm Pending CN109993721A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910272644.9A CN109993721A (en) 2019-04-04 2019-04-04 A kind of image enchancing method based on clustering algorithm and ant group algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910272644.9A CN109993721A (en) 2019-04-04 2019-04-04 A kind of image enchancing method based on clustering algorithm and ant group algorithm

Publications (1)

Publication Number Publication Date
CN109993721A true CN109993721A (en) 2019-07-09

Family

ID=67130861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910272644.9A Pending CN109993721A (en) 2019-04-04 2019-04-04 A kind of image enchancing method based on clustering algorithm and ant group algorithm

Country Status (1)

Country Link
CN (1) CN109993721A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110570497A (en) * 2019-08-19 2019-12-13 广东智媒云图科技股份有限公司 Drawing method and device based on layer superposition, terminal equipment and storage medium
CN111429419A (en) * 2020-03-19 2020-07-17 国网陕西省电力公司电力科学研究院 Insulator contour detection method based on hybrid ant colony algorithm
CN112581456A (en) * 2020-12-23 2021-03-30 电子科技大学 Image crack real-time extraction method suitable for ultrasonic imaging logging
CN113516309A (en) * 2021-07-12 2021-10-19 福州大学 OD flow direction clustering method based on multi-path graph cutting rule and ant colony optimization
CN117372462A (en) * 2023-12-04 2024-01-09 中国海洋大学 High-precision underwater low-light target edge detection method
CN115019280B (en) * 2022-04-18 2024-05-14 开封大学 Lane line detection method, system and application of fusion gradient and average relative difference

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120123980A1 (en) * 2010-04-28 2012-05-17 Indian Statistical Institute Optimization technique using evolutionary algorithms
CN105023004A (en) * 2015-08-04 2015-11-04 南京信息工程大学 Human face recognition algorithm combining curvature and wavelet-contour enhancement
CN106056619A (en) * 2016-06-13 2016-10-26 长安大学 Unmanned aerial vehicle vision wire patrol method based on gradient constraint Radon transform
CN106952260A (en) * 2017-03-31 2017-07-14 深圳华中科技大学研究院 A kind of solar battery sheet defect detecting system and method based on CIS IMAQs
CN109214498A (en) * 2018-07-10 2019-01-15 昆明理工大学 Ant group algorithm optimization method based on search concentration degree and dynamic pheromone updating

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120123980A1 (en) * 2010-04-28 2012-05-17 Indian Statistical Institute Optimization technique using evolutionary algorithms
CN105023004A (en) * 2015-08-04 2015-11-04 南京信息工程大学 Human face recognition algorithm combining curvature and wavelet-contour enhancement
CN106056619A (en) * 2016-06-13 2016-10-26 长安大学 Unmanned aerial vehicle vision wire patrol method based on gradient constraint Radon transform
CN106952260A (en) * 2017-03-31 2017-07-14 深圳华中科技大学研究院 A kind of solar battery sheet defect detecting system and method based on CIS IMAQs
CN109214498A (en) * 2018-07-10 2019-01-15 昆明理工大学 Ant group algorithm optimization method based on search concentration degree and dynamic pheromone updating

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ALEKSANDAR JEVTIĆ ET AL.: "Edge detection using ant colony search algorithm and multiscale contrast enhancement", 《 2009 IEEE INTERNATIONAL CONFERENCE ON SYSTEMS, MAN AND CYBERNETICS》 *
张巍玖: "蚁群算法的研究及其在图像处理方面的应用--基于图像分割问题", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
李宗妮,吴伟民,林志毅: "一种采用改进蚁狮优化算法的图像增强方法", 《计算机应用研究》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110570497A (en) * 2019-08-19 2019-12-13 广东智媒云图科技股份有限公司 Drawing method and device based on layer superposition, terminal equipment and storage medium
CN111429419A (en) * 2020-03-19 2020-07-17 国网陕西省电力公司电力科学研究院 Insulator contour detection method based on hybrid ant colony algorithm
CN111429419B (en) * 2020-03-19 2023-04-07 国网陕西省电力公司电力科学研究院 Insulator contour detection method based on hybrid ant colony algorithm
CN112581456A (en) * 2020-12-23 2021-03-30 电子科技大学 Image crack real-time extraction method suitable for ultrasonic imaging logging
CN112581456B (en) * 2020-12-23 2023-04-18 电子科技大学 Image crack real-time extraction method suitable for ultrasonic imaging logging
CN113516309A (en) * 2021-07-12 2021-10-19 福州大学 OD flow direction clustering method based on multi-path graph cutting rule and ant colony optimization
CN113516309B (en) * 2021-07-12 2023-08-11 福州大学 OD flow direction clustering method based on multipath graph cutting criterion and ant colony optimization
CN115019280B (en) * 2022-04-18 2024-05-14 开封大学 Lane line detection method, system and application of fusion gradient and average relative difference
CN117372462A (en) * 2023-12-04 2024-01-09 中国海洋大学 High-precision underwater low-light target edge detection method
CN117372462B (en) * 2023-12-04 2024-03-29 中国海洋大学 High-precision underwater low-light target edge detection method

Similar Documents

Publication Publication Date Title
CN109993721A (en) A kind of image enchancing method based on clustering algorithm and ant group algorithm
Kumar et al. Review on image segmentation techniques
Torsello et al. Grouping with asymmetric affinities: A game-theoretic perspective
CN110263731B (en) Single step human face detection system
CN109360207A (en) A kind of fuzzy clustering method merging neighborhood information
CN109886128A (en) A kind of method for detecting human face under low resolution
CN108491786A (en) A kind of method for detecting human face based on hierarchical network and Cluster merging
Aydın et al. Extraction of flower regions in color images using ant colony optimization
Rajeswari et al. A modified ant colony optimization based approach for image edge detection
CN107766792B (en) Remote sensing image ship target identification method
Proença Iris recognition: A method to segment visible wavelength iris images acquired on-the-move and at-a-distance
Singh et al. A multilevel thresholding algorithm using HDAFA for image segmentation
CN115527133A (en) High-resolution image background optimization method based on target density information
CN103279944A (en) Image division method based on biogeography optimization
Lee et al. Tracking-by-segmentation using superpixel-wise neural network
Kim et al. Novel on-road vehicle detection system using multi-stage convolutional neural network
Jiao et al. A novel method for image segmentation based on simplified pulse coupled neural network and gbest led gravitational search algorithm
Visa et al. Precision-recall-classification evaluation framework: Application to depth estimation on single images
Bertozzi et al. Vision-based pedestrian detection: will ants help?
Chacko Pre and post processing approaches in edge detection for character recognition
CN104239551B (en) Multi-feature VP-tree index-based remote sensing image retrieval method and multi-feature VP-tree index-based remote sensing image retrieval device
Sasikala et al. Optimized vessel detection in marine environment using hybrid adaptive cuckoo search algorithm
CN108491923B (en) Pest image recognition method based on improved wolf colony algorithm optimized Bayesian network
Chen et al. KDT-SPSO: A multimodal particle swarm optimisation algorithm based on kd trees for palm tree detection
Dong et al. An optimization-based approach to image binarization

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190709