CN105354585A - Improved cat swarm algorithm based target extraction and classification method - Google Patents
Improved cat swarm algorithm based target extraction and classification method Download PDFInfo
- Publication number
- CN105354585A CN105354585A CN201510598578.6A CN201510598578A CN105354585A CN 105354585 A CN105354585 A CN 105354585A CN 201510598578 A CN201510598578 A CN 201510598578A CN 105354585 A CN105354585 A CN 105354585A
- Authority
- CN
- China
- Prior art keywords
- cat
- algorithm
- speed
- image
- formula
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial 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]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Molecular Biology (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Mathematical Physics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Probability & Statistics with Applications (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Image Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明提供了一种基于改进猫群算法的目标提取与分类的方法。传统的群体智能算法在图像目标提取和分类中复杂度过高,又容易陷入局部最优,产生“早熟”。例如,猫群算法是一种典型的群体智能算法,但是它在大数据的图像处理中,出现运行时间过长,精确性不高的缺点。为此,本发明针对猫群算法的不足,提出了一种改进的猫群算法,我们在算法的跟踪模式中增加了惯性权重系数和加速系数,提高了算法的运行速度,缩短了运行时间。并且将改进的猫群算法应用到目标对象的提取与分类,即:首先输入图像,对图像进行预处理,并将其阈值化为二值图像,提取感兴趣的目标图像,计算目标对象的四个特征,形成新的特征向量,最后运用改进猫群算法进行分类,该方法不仅可以提升运算速度,而且提高目标对象提取与分类的准确性。
The invention provides a method for object extraction and classification based on the improved cat group algorithm. The traditional swarm intelligence algorithm is too complex in image target extraction and classification, and it is easy to fall into local optimum, resulting in "premature". For example, the cat swarm algorithm is a typical swarm intelligence algorithm, but it has the disadvantages of long running time and low accuracy in the image processing of big data. For this reason, the present invention proposes an improved cat swarm algorithm for the shortcomings of the cat swarm algorithm. We have increased the inertia weight coefficient and the acceleration coefficient in the tracking mode of the algorithm, which has improved the running speed of the algorithm and shortened the running time. And the improved cat group algorithm is applied to the extraction and classification of the target object, that is: first input the image, preprocess the image, and threshold it into a binary image, extract the target image of interest, and calculate the four-point value of the target object. features, form a new feature vector, and finally use the improved cat group algorithm to classify. This method can not only improve the calculation speed, but also improve the accuracy of target object extraction and classification.
Description
技术领域 technical field
本发明涉及群体智能与仿生计算和模式识别技术,特别涉及一种基于改进猫群算法的目标提取与分类的方法。该方法在图像识别、模式分类、目标跟踪等领域中有着广泛的应用前景。 The invention relates to swarm intelligence, bionic computing and pattern recognition technology, in particular to a method for object extraction and classification based on the improved cat group algorithm. This method has broad application prospects in image recognition, pattern classification, object tracking and other fields.
背景技术 Background technique
基于聚类方法的目标对象提取和分类在图像处理与模式识别等领域中的热点和难点。因此,很多学者致力于研究这一热点和难点,同时提出了一系列的聚类算法。例如众所周知的k均值算法(TeradaYoshikazu.StrongConsistencyofReducedK-meansClustering[J].Scandinavianjournalofstatistics,41(4),2014)等传统聚类算法。但是这样算法有很大的不足,那就是对聚类中心选择敏感,容易过早成熟陷入局部最优。为了克服传统聚类算法的不足,很多模拟动物行为的群体智能算法产生也被用来研究这个问题,比如模拟蚂蚁行为的蚁群算法(XiongZi-Yuan,XuZhen-Hai.AnInnovativesubarraypartitioningmethodforcluttersuppressionbyspace-timeadaptiveprocessingbasedontheantcolonyoptimization[J].IETradarsonarandnavigation,8(9),2014),模拟鸟行为的粒子群算法(FanQin-qin,YanXue-feng.Self-adaptiveparticleswarmoptimizationwithmultiplevelocitystrategiesanditsapplicationforp-Xyleneoxidationreactionprocessoptimization[J].Chemometricsandintelligentlaboratorysystem,139,2014),模拟蜂群采蜜行为的蜂群算法(RunklerThomasA.Waspswarmoptimizationofthec-meansclusteringmodel[J]Internationaljournalofintelligentsystems,23(3),2008)、模拟鱼群觅食行为的人工鱼群算法(NeshatMehdi,SepidnamGhodrat.Artificialfishswarmalgorithm:asurveyofthestate-of-the-art,hybridization,combinatorialandindicativeapplications[J].Artificialintelligentreview,42(4),2014)和模拟猫日常行为的猫群算法(P.M.Pradhan.G.Panda.SolvingMulti-ObjectiveProblemsUsingCatSwarmOptimization[J].ExpertSystemswithApplications,3(39),2012)等。但是这些算法都存在自身的不足,例如:蚁群算法引入了信息素,加大了算法的时间复杂度,需要较长的搜索时间,并且在搜索过程中容易出现停滞现象;粒子群算在算法后期有可能不能很好地跳出局部最优;猫群算法虽然在函数优化中能取得很好的效果,但是在图像处理中出现速度慢、时间过长的问题。为了解决在图像目标提取和分类中的问题,发明了一种基于改进猫群算法的目标提取与分类的方法。 The hotspots and difficulties of target object extraction and classification based on clustering methods in the fields of image processing and pattern recognition. Therefore, many scholars devote themselves to researching this hot spot and difficulty, and propose a series of clustering algorithms at the same time. For example, the well-known k-means algorithm (Terada Yoshikazu. Strong Consistency of Reduced K-means Clustering [J]. Scandinavian journal of statistics, 41 (4), 2014) and other traditional clustering algorithms. However, this algorithm has a big disadvantage, that is, it is sensitive to the selection of cluster centers, and it is easy to fall into local optimum prematurely. In order to overcome the shortcomings of traditional clustering algorithms, many swarm intelligence algorithms that simulate animal behavior have also been used to study this problem, such as the ant colony algorithm that simulates ant behavior (XiongZi-Yuan, XuZhen-Hai. An Innovative subarray partitioning method for clutter suppression by space-time adaptive processing based on the ant colony optimization [J]. IETradarsonarandnavigation,8(9),2014), particle swarm optimization algorithm for simulating bird behavior (FanQin-qin, YanXue-feng.Self-adaptiveparticleswarmoptimizationwithmultiplevelocitystrategiesanditsapplicationforp-Xyleneoxidationreactionprocessoptimization[J].systemChemometricsandintelligentlaboratory0,149), 2 Swarm algorithm (RunklerThomasA.Waspswarmoptimizationofthec-meansclusteringmodel[J]Internationaljournalofintelligentsystems,23(3),2008), artificial fishswarm algorithm for simulating fish foraging behavior (NeshatMehdi, SepidnamGhodrat.Artificialfishswarmalgorithm:asurveyofthestate-of-the-art, hybridizationandind [J].Artificialintelligentreview,42(4),2014) and the cat group algorithm for simulating the daily behavior of cats (P.M.Pradhan.G.Panda.SolvingMulti-ObjectiveProblemsUsingCatSwarmOptimization[J].ExpertSystemswithApplications,3(39),2012), etc. However, these algorithms have their own shortcomings. For example, the ant colony algorithm introduces pheromone, which increases the time complexity of the algorithm, requires a long search time, and is prone to stagnation during the search process; In the later stage, it may not be able to jump out of the local optimum; although the cat swarm algorithm can achieve good results in function optimization, it has problems of slow speed and long time in image processing. In order to solve the problems in image object extraction and classification, a method of object extraction and classification based on improved cat group algorithm is invented.
所谓的目标对象的提取就是根据目标对象的特征,从图像中获取感兴趣的目标对象,并进行标识、分割出来的一种技术。目标对象提取处于整个计算机视觉系统的底层,是各种高级应用如目标检测与跟踪等的基础。目标对象提取效果的好坏直接关系到目标对象的跟踪及整个系统的优劣。一个好的目标对象提取算法应该能适用于所监视的各种环境,比如:能适应各种天气条件,适应光线的变化,适应场景中个别物体运动产生的干扰,能处理阴影和遮挡等。 The so-called target object extraction is a technology to obtain the target object of interest from the image according to the characteristics of the target object, and to identify and segment it. Target object extraction is at the bottom of the entire computer vision system and is the basis for various advanced applications such as target detection and tracking. The quality of the target object extraction is directly related to the tracking of the target object and the quality of the whole system. A good target object extraction algorithm should be applicable to various monitored environments, for example: it can adapt to various weather conditions, adapt to changes in light, adapt to the interference caused by the movement of individual objects in the scene, and can handle shadows and occlusions.
目标对象分类技术是根据对象的底层视觉特征将对象分门别类到预定义的类中,它是实现计算机自动识别目标的重要途径。目标对象分类技术的实际操作中主要包括图像预处理、特征提取、分类器设计与学习等几个阶段。目标对象分类方法大致可以分为两种方式:基于生成模型的对象分类方法(如贝叶斯分类)和基于判别模型的对象分类方法(如k均值分类)。 Target object classification technology is to classify objects into predefined categories according to their underlying visual features, and it is an important way to realize automatic computer recognition of targets. The actual operation of target object classification technology mainly includes several stages such as image preprocessing, feature extraction, classifier design and learning. Target object classification methods can be roughly divided into two ways: object classification methods based on generative models (such as Bayesian classification) and object classification methods based on discriminative models (such as k-means classification).
在实际生活中,对象分类技术是解决上述计算机视觉的核心内容,被应用到实际生活中的方方面面。例如:自主车辆的视觉导航,它就是以对象的分类识别环境为基础;航空和卫星照片的读取判别与分类;工业机器人手眼系统的特定目标识别;生物特征的鉴别等。当然,对象分类技术最重要的一个应用例子是网络图像检索,它不仅帮助图像检索系统很好的理解图像语义信息,又大大消减了人工参与过程,为改善图像检索系统的准确率提供了有力支持。 In real life, object classification technology is the core content of solving the above-mentioned computer vision, and is applied to all aspects of real life. For example: the visual navigation of autonomous vehicles, which is based on the classification and recognition of the environment of objects; the reading, discrimination and classification of aerial and satellite photos; the specific target recognition of industrial robots' hand-eye systems; the identification of biological characteristics, etc. Of course, one of the most important application examples of object classification technology is network image retrieval. It not only helps the image retrieval system to understand the semantic information of the image well, but also greatly reduces the manual participation process, and provides strong support for improving the accuracy of the image retrieval system. .
群体智能算法的聚类问题就是要找到一个能使得总的类内离散度和最小的划分。当聚类中心确定时,聚类的划分可由最近邻法则决定。假设有一个目标特征集,X={Xi,i=1,2,…,n},这里Xi为n维特征向量,n是X中特征向量的数目。聚类的目的就是找到一个满足条件C1∪C2∪…∪CK=C和Ci∩Cj=Φ(i≠j,0<i,j≤K)的最优划分C={C1,C2,…CK,使得总的类内离散度和达到Jc最小,如下公式所示: The clustering problem of the swarm intelligence algorithm is to find a division that can minimize the sum of the total intra-class dispersion. When the cluster center is determined, the division of clusters can be determined by the nearest neighbor rule. Suppose there is a target feature set, X={X i , i=1, 2, . . . , n}, where X i is an n-dimensional feature vector, and n is the number of feature vectors in X. The purpose of clustering is to find an optimal partition C = { C 1 , C 2 , ... C K , so that the total intra-class dispersion sum reaches J c minimum, as shown in the following formula:
其中,Cj是第j个聚类的中心,d(Xi,Cj)是目标特征向量Xi和聚类中心Cj的欧氏距离的平方,可表示为如下所示: Among them, C j is the center of the jth cluster, d(X i , C j ) is the square of the Euclidean distance between the target feature vector Xi and the cluster center C j , which can be expressed as follows:
d(Xi,Cj)=|Xi-Cj|2 d(X i , C j )=|X i -C j | 2
当聚类中心确定时,聚类的划分可由最近邻法则决定。即对Xi,若第j类的聚类中心Cj满足下式时,则Xi属于类j: When the cluster center is determined, the division of clusters can be determined by the nearest neighbor rule. That is, for Xi, if the cluster center C j of the jth class satisfies the following formula, then Xi belongs to class j :
一些术语: Some terms:
目标对象分类:就是根据各自在图像信息中所反映的不同特征,把不同类别的目标对象区分开来的图像处理方法。它利用计算机对图像进行定量分析,把图像或图像中的每个目标或区域划归为若干个类别中的某一种,以代替人的视觉判读的方法。 Target object classification: It is an image processing method that distinguishes different types of target objects according to the different characteristics reflected in the image information. It uses computer to quantitatively analyze the image, and classifies the image or each target or area in the image into one of several categories to replace the human visual interpretation method.
目标对象提取:就是根据目标对象的特征,把图像中感兴趣的目标对象和背景对象分割开来的一种技术。 Target object extraction: It is a technique to separate the target object of interest from the background object in the image according to the characteristics of the target object.
猫的编码:猫的编码是问题解的形式表达。猫群算法中,猫是问题的可行解,每只猫的属性包括速度、位置、适应度和行为模式的标志位。 Coding of cats: Coding of cats is a formal representation of the solution of a problem. In the cat swarm algorithm, cats are a feasible solution to the problem, and the attributes of each cat include flag bits of speed, position, fitness and behavior mode.
适应度:适应度是个体对环境的适应程度,对于个体所求问题中个体的评价。 Fitness: Fitness is the degree of adaptation of the individual to the environment, and the evaluation of the individual in the problem that the individual seeks.
记忆池:记忆池是猫复制自身位置存放的空间,记忆池的大小代表猫能搜索的地点数量。 Memory pool: The memory pool is the space where the cat copies its own location. The size of the memory pool represents the number of places the cat can search.
分组率:分组率是猫群在两种模式下的数量关系,是跟踪模式的猫在整个猫群所占的比例。少部分的猫处于跟踪模式,多部分的猫处于搜寻模式。 Grouping rate: The grouping rate is the quantitative relationship between the two modes of the cat group, and it is the proportion of the cats in the tracking mode to the entire cat group. A small number of cats are in stalking mode and a large number of cats are in hunting mode.
搜寻模式:搜寻模式下,猫复制自身位置多份放到记忆池中,通过变异算子,改变记忆池中复制的副本,再计算副本的适应度值,并选取适应度值最高的位置作为下一步的位置。 Search mode: In the search mode, the cat copies its own position and puts it in the memory pool. Through the mutation operator, the copied copy in the memory pool is changed, and then the fitness value of the copy is calculated, and the position with the highest fitness value is selected as the next position. step position.
跟踪模式:跟踪模式下,猫将跟踪整个猫群找到的最优解的“极值”来更新自己的速度和位置,使自己向着最优解的位置移动。 Tracking mode: In tracking mode, the cat will track the "extreme" of the optimal solution found by the entire group of cats to update its own speed and position, so that it will move towards the position of the optimal solution.
变异算子:变异算子是一种局部搜索操作,每一只猫经过复制、变异产生邻域候选解,在邻域里找出最优解,即完成了变异算子。 Mutation operator: The mutation operator is a local search operation. Each cat is copied and mutated to generate candidate solutions in the neighborhood, and the optimal solution is found in the neighborhood, which completes the mutation operator.
选择算子:选择算子主要是在搜寻模式下,由猫自身位置的副本产生新的位置,放在记忆池中,再从记忆池中选取适应度最高的候选解作为新的位置来代替。 Selection operator: The selection operator is mainly to generate a new position from a copy of the cat's own position in the search mode, put it in the memory pool, and then select the candidate solution with the highest fitness from the memory pool as the new position to replace.
发明内容 Contents of the invention
本发明的目的是提供一种基于改进猫群算法的目标提取与分类的方法,该方法利用改进的猫群算法根据图像中目标对象的特征进行计算,从而达到对目标对象的精确分类。本发明的优点是:1)相比原始的猫群算法,速度有所提高,时间更短;2)能够对目标对象实现准确的分类。 The object of the present invention is to provide a method of target extraction and classification based on the improved cat group algorithm, which uses the improved cat group algorithm to perform calculations according to the characteristics of the target object in the image, so as to achieve accurate classification of the target object. The advantages of the invention are: 1) Compared with the original cat group algorithm, the speed is improved and the time is shorter; 2) The target object can be accurately classified.
为了达到上述目的,本发明采用如下技术方案: In order to achieve the above object, the present invention adopts following technical scheme:
(1)输入待处理的原始图像; (1) Input the original image to be processed;
(2)如原始图像有噪声,则首先对图像进行预处理。首先选取一个与背景一样无特色的区域,估计噪声模型和参数,然后根据噪声模型选取相应合适的滤波器进行滤波去噪.如果是椒盐噪声,则选用中值滤波;如果是高斯、均匀噪声,则选用均值滤波器;如果是周期噪声,则用频域滤波。如果没有噪声或模糊,则可跳过进行下一步; (2) If the original image is noisy, the image should be preprocessed first. First select an area that is as featureless as the background, estimate the noise model and parameters, and then select the appropriate filter for filtering and denoising according to the noise model. If it is salt and pepper noise, use median filtering; if it is Gaussian or uniform noise, Then use the mean value filter; if it is periodic noise, use frequency domain filtering. If there is no noise or blur, you can skip to the next step;
(3)把预处理后的图像阈值分割为二值图像,然后对其中感兴趣的目标图像进行分割和标记选取; (3) Segment the preprocessed image threshold into a binary image, and then segment and mark the target image of interest;
(4)选取和计算目标图像的四个特征:细度比例、偏心率、区域的固靠性程度和区域的扩展程度,组成新的特征向量; (4) Select and calculate four features of the target image: fineness ratio, eccentricity, degree of reliability of the region and degree of expansion of the region to form a new feature vector;
(5)对传统的猫群算法进行改进,以提高分类速度和准确率,猫群算法的改进如下: (5) Improve the traditional cat group algorithm to improve the classification speed and accuracy. The improvement of the cat group algorithm is as follows:
①群体智能算法为了在局部搜索和全局搜索之间保持平衡,通常会使用一个递增的线性惯性权重,例如粒子群算法。众所周知,一个大的惯性权重有利于全局搜索而小惯性权重有利于局部搜索,所以这些算法在迭代初期局部搜索能力较强。但是,如果在算法早期没有发现最优点,那就很容易陷入局部最优。因为随着惯性权重越来越大,全局搜索能力也越来越强。所以为了解决这样的不足,我们在猫群算法的速度更新公式中增加一个非线性递减的惯性权重,如下公式所示: ① In order to maintain a balance between local search and global search, swarm intelligence algorithms usually use an increasing linear inertia weight, such as particle swarm optimization. It is well known that a large inertial weight is beneficial to global search and a small inertial weight is beneficial to local search, so these algorithms have strong local search ability in the early stage of iteration. However, if the optimum is not found early in the algorithm, it is easy to get stuck in a local optimum. Because as the inertial weight becomes larger, the global search ability becomes stronger. So in order to solve this deficiency, we add a non-linear decreasing inertia weight to the speed update formula of the cat swarm algorithm, as shown in the following formula:
这里Wmax和Wmin是惯性权重的最大值和最小值,t是迭代次数,iterO是临界值,当迭代次数是iterO时,W(t)就等于Wmax。λ是一个常数。上式表明系数将会自适应的非线性递减; Here W max and W min are the maximum and minimum values of the inertia weight, t is the number of iterations, iter O is the critical value, when the number of iterations is iter O , W(t) is equal to W max . λ is a constant. The above formula shows that the coefficient will be adaptively decreased nonlinearly;
②在原始的猫群算法中,C(t)是速度更新公式中加速系数,通常为常数。这里我们同样让它通过如下的公式进行自适应的更新: ②In the original cat swarm algorithm, C(t) is the acceleration coefficient in the speed update formula, usually a constant. Here we also let it perform adaptive updates through the following formula:
其中t是迭代次数,itermax是最大迭代次数,Ci是初始加速系数,是一个常数; Where t is the number of iterations, iter max is the maximum number of iterations, and C i is the initial acceleration coefficient, which is a constant;
③通过上述两部分的两个参数,所以跟踪模式的速度更新公式变为如下所示: ③Through the two parameters of the above two parts, the speed update formula of the tracking mode becomes as follows:
VK,d(t+1)=W(t)*Vk,d(t)+r1*C(t)*(Xbest,d(t)-Xk,d(t)) V K,d (t+1)=W(t)*V k,d (t)+r 1 *C(t)*(X best,d (t)-X k,d (t))
XK,d(t+1)=XK,d(t)+VK,d(t+1) X K,d (t+1)=X K,d (t)+V K,d (t+1)
VKd(t+1)表示更新后第k只猫的速度值,Xbest,d(t)代表适应度最高的猫所处的位置;Xkd(t)指的是第k只猫的位置,C(t)是一个常数,r1是一个[0,1]之间的随机数。从上式可以看出,猫的移动方向由两部分决定:自己原来的速度Vkd(t)、与猫群经历的最佳距离Xbest,d(t)-Xk,d(t),分别由动态的惯性权重,加速系数C(t),随机数r1决定其值; V Kd (t+1) represents the speed value of the k-th cat after the update, X best, d (t) represents the position of the cat with the highest fitness; X kd (t) refers to the position of the k-th cat , C(t) is a constant, r 1 is a random number between [0,1]. It can be seen from the above formula that the moving direction of the cat is determined by two parts: its own original speed V kd (t), the best distance X best experienced by the cat group, d (t)-X k, d (t), The values are determined by the dynamic inertia weight, the acceleration coefficient C(t), and the random number r 1 respectively;
(6)将新的特征向量作为输入特征库,作为上面改进猫群算法的输入部分,利用新的猫群算法对目标对象进行分类,详细步骤如下: (6) Use the new feature vector as the input feature library, as the input part of the above improved cat swarm algorithm, and use the new cat swarm algorithm to classify the target object. The detailed steps are as follows:
①对猫进行编码,把新的特征向量作为猫的速度,设定分组率、基因改变范围和记忆池大小等; ① Encode the cat, use the new feature vector as the speed of the cat, set the grouping rate, gene change range and memory pool size, etc.;
②初始化猫的位置和速度,最大迭代次数等;最近邻聚类,根据新的聚类中心计算适应度值; ② Initialize the position and speed of the cat, the maximum number of iterations, etc.; the nearest neighbor clustering, calculate the fitness value according to the new clustering center;
③让一部分猫处于搜索模式,另一部分猫处于跟踪模式;根据分组率随机设定猫群中执行搜寻模式的猫和跟踪模式的猫,标志位0的猫执行搜寻模式,标志位1的猫执行跟踪模式; ③Let some cats be in the search mode and the other cats in the tracking mode; according to the grouping rate, randomly set the cats in the search mode and the cats in the tracking mode in the cat group, the cat with the flag 0 executes the search mode, and the cat with the flag 1 executes tracking mode;
④猫需要找到全局最优位置,根据位置公式和改进后的速度更新公式来更新猫的速度及位置,向着最优解的方向逼近; ④ The cat needs to find the global optimal position, update the speed and position of the cat according to the position formula and the improved speed update formula, and approach the optimal solution;
⑤对每一只猫的自身位置复制j份,并对副本进行变异算子,根据位置公式对他们进行位置改变。计算位置更新后副本的适应度值,选取适应度值最高的位置作为猫移动的下一个位置; ⑤ Copy j copies of each cat's own position, and perform a mutation operator on the copies, and change their positions according to the position formula. Calculate the fitness value of the copy after the position is updated, and select the position with the highest fitness value as the next position for the cat to move;
⑥根据猫的聚类中心编码,按照最近邻法确定样品的聚类划分,计算新的聚类中心,更新猫的适应度值,寻找并记录当前的最优解; ⑥According to the code of the cluster center of the cat, determine the cluster division of the sample according to the nearest neighbor method, calculate the new cluster center, update the fitness value of the cat, find and record the current optimal solution;
⑦如果算法达到结束条件,则结束算法,输出全局最优解,否则调至第③步。最后返回各目标对象的分类标号,并输出相应的结果。 ⑦ If the algorithm meets the end condition, then end the algorithm and output the global optimal solution, otherwise transfer to step ③. Finally, the classification label of each target object is returned, and the corresponding result is output.
附图说明 Description of drawings
图1为本发明的原理图; Fig. 1 is a schematic diagram of the present invention;
图2为本发明实施例的原始图像之一; Fig. 2 is one of the original images of the embodiment of the present invention;
图3为本发明实施例的图像目标标记图; Fig. 3 is the image target marking figure of the embodiment of the present invention;
图4为本发明实施例的图像目标提取和分类结果1; Fig. 4 is the image target extraction and classification result 1 of the embodiment of the present invention;
图5为本发明实施例的图像目标提取和分类结果2; Fig. 5 is the image target extraction and classification result 2 of the embodiment of the present invention;
图6为本发明实施例的图像目标提取和分类结果3; Fig. 6 is the image target extraction and classification result 3 of the embodiment of the present invention;
图7为本发明实施例的四种不同算法时间性能对比图。 FIG. 7 is a time performance comparison chart of four different algorithms according to an embodiment of the present invention.
具体实施方式 detailed description
本实施例是在湖南工业大学智能信息研究所提供的PC机上实现的,该机的处理器为Intel(R)Pentium(R)CPUG20303.00GHz4GB内存,使用的操作系统是windows7,使用的仿真软件为MATLAB2014a。 This embodiment is realized on the PC provided by the Institute of Intelligent Information of Hunan University of Technology, the processor of this machine is Intel(R) Pentium(R) CPUG2030 3.00GHz4GB memory, the operating system used is windows7, and the simulation software used is MATLAB2014a.
结合附图1与实施例对本发明相关步骤进行详细描述,本发明总体上分为如下几个部分: The relevant steps of the present invention are described in detail in conjunction with accompanying drawing 1 and embodiment, and the present invention is generally divided into following several parts:
(1)输入图像。输入待处理的原始图像,如图2所示; (1) Input image. Input the original image to be processed, as shown in Figure 2;
(2)图像预处理。如原始图像有噪声,则首先对图像进行预处理,例如图像去噪等操作,以便去除掉图像中的干扰噪声。首先应该选取一个与背景一样无特色的区域,估计噪声模型和参数,然后根据噪声模型选取相应合适的滤波器进行滤波去噪。如果是椒盐噪声,则选用中值滤波;如果是高斯、均匀噪声,则选用均值滤波器;如果是周期噪声,则用频域滤波。如果没有噪声或模糊,则可跳过进行下一步; (2) Image preprocessing. If the original image is noisy, the image should be preprocessed first, such as image denoising and other operations, so as to remove the interfering noise in the image. First, an area that is as featureless as the background should be selected, the noise model and parameters should be estimated, and then an appropriate filter should be selected according to the noise model for filtering and denoising. If it is salt and pepper noise, use median filter; if it is Gaussian and uniform noise, use mean filter; if it is periodic noise, use frequency domain filter. If there is no noise or blur, you can skip to the next step;
(3)目标对象提取。首先把预处理后的图像阈值分割为二值图像,然后对其中感兴趣的目标图像进行分割和标记选取,如图3所示,以便进行下一步操作; (3) Target object extraction. First, the preprocessed image threshold is segmented into binary images, and then the target image of interest is segmented and marked for selection, as shown in Figure 3, in order to carry out the next step;
(4)特征选择和计算。根据上一步骤提取出的目标图像,选取和计算目标图的细度比例、偏心率、固性和程度四个特征,组成新的特征向量; (4) Feature selection and calculation. According to the target image extracted in the previous step, select and calculate the four features of the target image, such as fineness ratio, eccentricity, solidity and degree, to form a new feature vector;
(5)目标对象分类。将上一步计算所得的特征输入到改进后的猫群算法,按如下步骤进行目标对象分类: (5) Classification of target objects. Input the features calculated in the previous step into the improved cat group algorithm, and classify the target objects according to the following steps:
①初始化参数和建立初始种群:对猫进行编码,把新的特征向量作为猫的速度,设定分组率、基因改变范围和记忆池大小等。初始化猫的位置和速度,最大迭代次数等; ①Initialize parameters and establish initial population: encode the cat, use the new feature vector as the speed of the cat, set the grouping rate, gene change range and memory pool size, etc. Initialize the position and velocity of the cat, the maximum number of iterations, etc.;
②计算适应度值:对目标特征进行最近邻聚类,根据新聚类中心计算适应度值; ② Calculate the fitness value: perform nearest neighbor clustering on the target features, and calculate the fitness value according to the new cluster center;
③设定分组率:让一部分猫处于搜索模式,另一部分猫处于跟踪模式; ③Set the grouping rate: let some cats be in the search mode, and the other part of the cats are in the tracking mode;
④判断模式状态:根据分组率随机设定猫群中执行搜寻模式的猫和跟踪模式的猫,标志位0的猫执行搜寻模式,标志位1的猫执行跟踪模式; ④ Judgment mode status: According to the grouping rate, randomly set the cats in the search mode and the cats in the tracking mode in the cat group, the cat with the flag bit 0 executes the search mode, and the cat with the flag bit 1 executes the tracking mode;
⑤跟踪模式:猫需要找到全局最优位置,根据改进后新的速度更新公式来更新猫的速度和位置,向着最优解的方向逼近; ⑤Tracking mode: the cat needs to find the global optimal position, update the speed and position of the cat according to the new improved speed update formula, and approach the optimal solution;
⑥对每一只猫的自身位置复制j份,并对副本进行变异算子,根据公式对他们进行位置改变。计算位置更新后副本的适应度值,选取适应度值最高的位置作为猫移动的下一个位置; ⑥ Copy j copies of each cat's own position, and perform a mutation operator on the copies, and change their positions according to the formula. Calculate the fitness value of the copy after the position is updated, and select the position with the highest fitness value as the next position for the cat to move;
⑦计算适应度值和保留最优解:根据猫的聚类中心编码,按照最近邻法确定样品的聚类划分,计算新的聚类中心,更新猫的适应度值,寻找并记录当前的最优解; ⑦ Calculate the fitness value and retain the optimal solution: According to the code of the cluster center of the cat, determine the cluster division of the sample according to the nearest neighbor method, calculate the new cluster center, update the fitness value of the cat, find and record the current most Excellent solution;
⑧判断是否满足结束条件:如果算法达到结束条件,则结束算法,输出全局最优解,即目标对象分类结果,如图4、图5、图6所示;否则调至第③步。 ⑧Judging whether the end condition is satisfied: if the algorithm meets the end condition, then end the algorithm and output the global optimal solution, that is, the classification result of the target object, as shown in Figure 4, Figure 5, and Figure 6; otherwise, transfer to step ③.
在本发明中,为了分析算法的时间性能,我们分别对原始图像运用本发明算法(ICSO)、猫群算法(CSO)、粒子群算法(PSO)和蚁群算法(ASO)这四种不同算法分别进行一百次的实验,记录并对比实验结果。具体实验结果图7所示,该图是一个次数和时间对比图,横轴表示算法运行的次数,最大迭代次数为100次;纵轴代表时间结果,单位为秒(s)。从结果可以看出,最上面的青色的时间轴线为蚁群算法(ASO),然后是绿色的猫群算法(CSO),其次是蓝色的粒子群算法(PSO),最下面是红色的本发明算法。表明蚁群算法时间最长,本发明的改进算法时间最短,所以本算法比其它算法在时间性能上要优越,也比原始算法有所改善和提高。 In the present invention, in order to analyze the time performance of the algorithm, we apply the algorithm of the present invention (ICSO), the cat swarm algorithm (CSO), the particle swarm algorithm (PSO) and the ant colony algorithm (ASO) to the original image respectively. Conduct one hundred experiments respectively, record and compare the experimental results. The specific experimental results are shown in Figure 7, which is a graph comparing the number of times and time. The horizontal axis represents the number of times the algorithm runs, and the maximum number of iterations is 100; the vertical axis represents the time result, and the unit is seconds (s). It can be seen from the results that the top cyan time axis is the ant colony algorithm (ASO), then the green cat swarm algorithm (CSO), followed by the blue particle swarm algorithm (PSO), and the bottom is the red Ben Invent algorithms. It shows that the time of the ant colony algorithm is the longest, and the time of the improved algorithm of the present invention is the shortest, so this algorithm is superior to other algorithms in terms of time performance, and is also improved and improved compared with the original algorithm.
Claims (3)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510598578.6A CN105354585B (en) | 2015-07-09 | 2015-09-17 | A Method of Target Extraction and Classification Based on Improved Cat Swarm Algorithm |
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201520491628 | 2015-07-09 | ||
CN2015204916286 | 2015-07-09 | ||
CN201510598578.6A CN105354585B (en) | 2015-07-09 | 2015-09-17 | A Method of Target Extraction and Classification Based on Improved Cat Swarm Algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105354585A true CN105354585A (en) | 2016-02-24 |
CN105354585B CN105354585B (en) | 2019-07-16 |
Family
ID=55330552
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510598578.6A Active CN105354585B (en) | 2015-07-09 | 2015-09-17 | A Method of Target Extraction and Classification Based on Improved Cat Swarm Algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105354585B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105974794A (en) * | 2016-06-08 | 2016-09-28 | 江南大学 | Discrete manufacture workshop scheduling method based on improved cat group algorithm |
CN107292903A (en) * | 2017-08-10 | 2017-10-24 | 四川长虹电器股份有限公司 | Multi-Level Threshold Image Segmentation method |
CN113763404A (en) * | 2021-09-24 | 2021-12-07 | 湖南工业大学 | Foam image segmentation method based on optimization mark and edge constraint watershed algorithm |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104156945A (en) * | 2014-07-16 | 2014-11-19 | 西安电子科技大学 | Method for segmenting gray scale image based on multi-objective particle swarm optimization algorithm |
CN104361180A (en) * | 2014-11-20 | 2015-02-18 | 东莞理工学院 | Method for designing remote control maintenance assembly sequence of radiation parts based on cat swarm algorithm |
-
2015
- 2015-09-17 CN CN201510598578.6A patent/CN105354585B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104156945A (en) * | 2014-07-16 | 2014-11-19 | 西安电子科技大学 | Method for segmenting gray scale image based on multi-objective particle swarm optimization algorithm |
CN104361180A (en) * | 2014-11-20 | 2015-02-18 | 东莞理工学院 | Method for designing remote control maintenance assembly sequence of radiation parts based on cat swarm algorithm |
Non-Patent Citations (3)
Title |
---|
MAYSAM OROUSKHANI 等: "Average-Inertia Weighted Cat Swarm Optimization", 《INTERNATIONAL CONFERENCE ON ADVANCES IN SWARM INTELLIGENCE》 * |
杨凡稳: "基于猫群算法的图像分割与分类", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
王光彪 等: "基于猫群算法的图像分类研究", 《天津理工大学学报》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105974794A (en) * | 2016-06-08 | 2016-09-28 | 江南大学 | Discrete manufacture workshop scheduling method based on improved cat group algorithm |
CN105974794B (en) * | 2016-06-08 | 2018-07-17 | 江南大学 | Discrete Production Workshop dispatching method based on improved cat swarm optimization |
CN107292903A (en) * | 2017-08-10 | 2017-10-24 | 四川长虹电器股份有限公司 | Multi-Level Threshold Image Segmentation method |
CN113763404A (en) * | 2021-09-24 | 2021-12-07 | 湖南工业大学 | Foam image segmentation method based on optimization mark and edge constraint watershed algorithm |
CN113763404B (en) * | 2021-09-24 | 2023-06-06 | 湖南工业大学 | Foam image segmentation method based on optimization mark and edge constraint watershed algorithm |
Also Published As
Publication number | Publication date |
---|---|
CN105354585B (en) | 2019-07-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Mathur et al. | Crosspooled FishNet: transfer learning based fish species classification model | |
Wang et al. | A PSO and BFO-based learning strategy applied to faster R-CNN for object detection in autonomous driving | |
Sanida et al. | Tomato leaf disease identification via two–stage transfer learning approach | |
CN102799900B (en) | Target tracking method based on supporting online clustering in detection | |
Song et al. | A hybrid evolutionary computation approach with its application for optimizing text document clustering | |
Chen et al. | An Enhanced Region Proposal Network for object detection using deep learning method | |
CN103942568A (en) | A Classification Method Based on Unsupervised Feature Selection | |
Lin et al. | EM-ERNet for image-based banana disease recognition | |
CN117454124A (en) | Ship motion prediction method and system based on deep learning | |
Dubey et al. | Adaptive feature selection with deep learning MBi-LSTM model based paddy plant leaf disease classification | |
CN104102922B (en) | A Pest Image Classification Method Based on Context-Aware Dictionary Learning | |
Dubey et al. | An efficient adaptive feature selection with deep learning model-based paddy plant leaf disease classification | |
Xiao et al. | Traffic sign detection based on histograms of oriented gradients and boolean convolutional neural networks | |
CN105354585B (en) | A Method of Target Extraction and Classification Based on Improved Cat Swarm Algorithm | |
CN114384487A (en) | An XGBoost-based method for meteorological radar ground object echo recognition | |
CN117784615A (en) | Fire control system fault prediction method based on IMPA-RF | |
CN105512675B (en) | A Feature Selection Method Based on Memory Multipoint Cross Gravity Search | |
Senthilkumar et al. | Prediction of rice disease using modified feature weighted fuzzy clustering (MFWFC) based segmentation and hybrid classification model | |
Raja et al. | Radial basis function Neural Network optimized with Salp Swarm algorithm espoused paddy leaf disease classification | |
CN104794483A (en) | Image division method based on inter-class maximized PCM (Pulse Code Modulation) clustering technology | |
Yu | Research progress of crop disease image recognition based on wireless network communication and deep learning | |
Lestari et al. | Tomato Leaf Disease Classification with Optimized Hyperparameter: A DenseNet-PSO Approach | |
Sumaya et al. | Comparative Analysis of AlexNet, GoogLeNet, VGG19, ResNet50, and ResNet101 for Improved Plant Disease Detection Through Convolutional Neural Networks | |
CN104050451A (en) | Robust target tracking method based on multi-channel Haar-like characteristics | |
CN118038258A (en) | Underwater moving fish shoal small target real-time counting method based on convolutional neural network |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20201016 Address after: No.12, Lane 8, Longgang Village Committee, Lingnan village committee, Niujiang Town, Enping City, Jiangmen City, Guangdong Province Patentee after: Wu Yongqi Address before: 412007 Taishan Road, Tianyuan District, Hunan 88, Zhuzhou -- Hunan University of Technology Research Institute Patentee before: HUNAN University OF TECHNOLOGY Effective date of registration: 20201016 Address after: Room 501, No.32, Matai street, Gulou District, Nanjing City, Jiangsu Province Patentee after: Qian Jingye Address before: No.12, Lane 8, Longgang Village Committee, Lingnan village committee, Niujiang Town, Enping City, Jiangmen City, Guangdong Province Patentee before: Wu Yongqi |
|
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220801 Address after: 210000 room a2-513, hatching building, yanchuang Park, Pukou District, Nanjing, Jiangsu Province Patentee after: Nanjing zhongzhigu Storage Technology Co.,Ltd. Address before: 210011 Room 501, 32 Matai street, Gulou District, Nanjing City, Jiangsu Province Patentee before: Qian Jingye |