[go: up one dir, main page]

CN104268503B - pedestrian detection method and device - Google Patents

pedestrian detection method and device Download PDF

Info

Publication number
CN104268503B
CN104268503B CN201410431439.XA CN201410431439A CN104268503B CN 104268503 B CN104268503 B CN 104268503B CN 201410431439 A CN201410431439 A CN 201410431439A CN 104268503 B CN104268503 B CN 104268503B
Authority
CN
China
Prior art keywords
pedestrian
sample
dictionary
tested
residual error
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410431439.XA
Other languages
Chinese (zh)
Other versions
CN104268503A (en
Inventor
孙锐
谷明琴
王海
王继贞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chery Automobile Co Ltd
Original Assignee
Chery Automobile Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chery Automobile Co Ltd filed Critical Chery Automobile Co Ltd
Priority to CN201410431439.XA priority Critical patent/CN104268503B/en
Publication of CN104268503A publication Critical patent/CN104268503A/en
Application granted granted Critical
Publication of CN104268503B publication Critical patent/CN104268503B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/103Static body considered as a whole, e.g. static pedestrian or occupant recognition
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

本发明是关于一种行人检测方法和装置,属于计算机视觉技术领域。所述方法包括:分别获取行人样本和非行人样本;通过K‑SVD算法得到行人样本字典和非行人样本字典;获取待测样本在行人样本字典和非行人样本字典中的残留误差;当待测样本在行人样本字典中的残留误差小于在非行人样本字典中的残留误差时,确定待测样本中包含有行人。本发明通过K‑SVD算法将行人样本和非行人样本分别训练为两类字典,并根据待测样本在两类字典中的残留误差的大小关系,判断待测样本中是否含有行人;解决了相关技术中应用于存在遮挡和光照变化的环境时,存在误报率高的问题,达到了可以有效地应用于存在遮挡和光照变化的环境时的行人检测的效果。

The invention relates to a pedestrian detection method and device, and belongs to the technical field of computer vision. The method includes: obtaining pedestrian samples and non-pedestrian samples respectively; obtaining a pedestrian sample dictionary and a non-pedestrian sample dictionary through the K-SVD algorithm; obtaining the residual error of the sample to be tested in the pedestrian sample dictionary and the non-pedestrian sample dictionary; When the residual error of the sample in the pedestrian sample dictionary is smaller than the residual error in the non-pedestrian sample dictionary, it is determined that the sample to be tested contains pedestrians. The present invention trains pedestrian samples and non-pedestrian samples into two types of dictionaries respectively through the K-SVD algorithm, and judges whether pedestrians are contained in the samples to be tested according to the size relationship of the residual errors of the samples to be tested in the two types of dictionaries; When the technology is applied to environments with occlusion and illumination changes, there is a problem of high false alarm rate, and the effect of pedestrian detection can be effectively applied to environments with occlusion and illumination changes.

Description

行人检测方法和装置Pedestrian detection method and device

技术领域technical field

本发明涉及计算机视觉技术领域,特别涉及一种行人检测方法和装置。The invention relates to the technical field of computer vision, in particular to a pedestrian detection method and device.

背景技术Background technique

近年来,行人检测越来越受到人们的关注,在图像和视频中行人检测可用于智能监控、智能交通和运动分析等领域。与此同时,人们对行人检测的各种要求也越来越多。In recent years, pedestrian detection has attracted more and more attention, and pedestrian detection in images and videos can be used in areas such as intelligent surveillance, intelligent transportation, and motion analysis. At the same time, people have more and more requirements for pedestrian detection.

相关技术中有一种行人检测方法,首先通过计算出的目标特征训练AdaBoost(Adaptive Boosting,自适应增强)检测分类器,在得到需要进行检测的图像之后,利用AdaBoost检测分类器通过滑动窗口的方法分块检测该图像中是否有行人出现。There is a pedestrian detection method in the related art. Firstly, the AdaBoost (Adaptive Boosting, self-adaptive enhancement) detection classifier is trained by the calculated target features. The block detects whether a pedestrian is present in this image.

发明人在实现本发明的过程中,发现上述方式至少存在如下缺陷:上述方法通过固定的特征提取过程,无法从多个角度对图像信息进行描述,分类器的训练过程也较为复杂,在应用于存在遮挡和光照变化的环境时,误报率较高。In the process of realizing the present invention, the inventor found that the above-mentioned method has at least the following defects: the above-mentioned method cannot describe the image information from multiple angles through the fixed feature extraction process, and the training process of the classifier is also relatively complicated. False positive rates are higher in environments with occlusions and lighting changes.

发明内容Contents of the invention

为了解决相关技术中无法从多个角度对图像信息进行描述,分类器的训练过程也较为复杂,在应用于存在遮挡和光照变化的环境时,误报率较高的问题,本发明实施例提供了一种行人检测方法和装置,所述技术方案如下:In order to solve the problem that image information cannot be described from multiple angles in the related art, the training process of the classifier is also relatively complicated, and when it is applied to an environment with occlusion and illumination changes, the problem of a high false alarm rate, the embodiment of the present invention provides Provided a pedestrian detection method and device, the technical solution is as follows:

根据本发明实施例的第一方面,提供一种行人检测方法,所述方法包括:According to a first aspect of an embodiment of the present invention, a pedestrian detection method is provided, the method comprising:

分别获取行人样本和非行人样本;Obtain pedestrian samples and non-pedestrian samples respectively;

通过K-奇异值分解K-SVD算法将所述行人样本训练为行人样本字典;The pedestrian sample is trained as a pedestrian sample dictionary by K-singular value decomposition K-SVD algorithm;

通过所述K-SVD算法将所述非行人样本训练为非行人样本字典;Using the K-SVD algorithm to train the non-pedestrian samples into a dictionary of non-pedestrian samples;

获取待测样本在所述行人样本字典中的残留误差,所述待测样本为需要进行行人检测的样本;Acquiring the residual error of the sample to be tested in the pedestrian sample dictionary, the sample to be tested is a sample that needs to be detected by pedestrians;

获取所述待测样本在所述非行人样本字典中的残留误差;Obtain the residual error of the sample to be tested in the dictionary of non-pedestrian samples;

当所述待测样本在所述行人样本字典中的残留误差小于所述待测样本在所述非行人样本字典中的残留误差时,确定所述待测样本中包含有行人。When the residual error of the sample to be tested in the dictionary of pedestrian samples is smaller than the residual error of the sample to be tested in the dictionary of non-pedestrian samples, it is determined that the sample to be tested contains a pedestrian.

可选地,所述通过K-奇异值分解K-SVD算法将所述行人样本训练为行人样本字典,包括:Optionally, said pedestrian sample training is a dictionary of pedestrian samples through the K-singular value decomposition K-SVD algorithm, including:

将所述行人样本转化为行人边缘特征样本;Converting the pedestrian samples into pedestrian edge feature samples;

通过所述K-SVD算法将所述行人边缘特征样本训练为行人样本字典;The pedestrian edge feature sample is trained as a pedestrian sample dictionary by the K-SVD algorithm;

所述通过所述K-SVD算法将所述非行人样本训练为非行人样本字典,包括:Said training said non-pedestrian sample as a non-pedestrian sample dictionary through said K-SVD algorithm includes:

将所述非行人样本转化为非行人边缘特征样本;Converting the non-pedestrian samples into non-pedestrian edge feature samples;

通过所述K-SVD算法将所述非行人边缘特征样本训练为非行人样本字典。The non-pedestrian edge feature samples are trained as a non-pedestrian sample dictionary through the K-SVD algorithm.

可选地,所述通过所述K-SVD算法将所述行人边缘特征样本训练为行人样本字典,包括:Optionally, using the K-SVD algorithm to train the pedestrian edge feature samples into a pedestrian sample dictionary includes:

通过求解训练方程将所述行人边缘特征样本训练为行人样本字典;By solving the training equation, the pedestrian edge feature sample is trained as a pedestrian sample dictionary;

所述通过所述K-SVD算法将所述非行人边缘特征样本训练为非行人样本字典,包括:The non-pedestrian edge feature sample is trained as a non-pedestrian sample dictionary by the K-SVD algorithm, including:

通过求解训练方程将所述非行人边缘特征样本训练为非行人样本字典;By solving the training equation, the non-pedestrian edge feature sample is trained as a non-pedestrian sample dictionary;

其中所述训练方程为:Wherein said training equation is:

所述训练方程的约束条件为:||xj||0≤L;其中Di表示字典,yij表示所述行人边缘特征样本或非行人边缘特征样本,i=0或1,i=0时Di表示非行人样本字典,yij表示非行人边缘特征样本,i=1时Di表示行人样本字典,yij表示行人边缘特征样本,xj表示稀疏编码,1≤j≤K且j为整数,L为稀疏度控制系数。The constraints of the training equation are: ||x j || 0 ≤ L; where D i represents a dictionary, y ij represents the pedestrian edge feature sample or non-pedestrian edge feature sample, i=0 or 1, when i=0, D i represents the non-pedestrian sample dictionary, y ij represents non-pedestrian edge feature samples, when i=1, D i represents pedestrian sample dictionary, y ij represents pedestrian edge feature samples, x j represents sparse coding, 1≤j≤K and j is an integer, L is the sparsity control coefficient .

可选地,所述获取待测样本在所述行人样本字典中的残留误差,所述待测样本为需要进行行人检测的样本,包括:Optionally, the obtaining the residual error of the sample to be tested in the pedestrian sample dictionary, the sample to be tested is a sample that requires pedestrian detection, including:

通过求解稀疏编码方程得到所述待测样本在所述行人样本字典中的行人稀疏编码,所述待测样本为需要进行行人检测的样本;Obtaining the pedestrian sparse coding of the sample to be tested in the pedestrian sample dictionary by solving the sparse coding equation, the sample to be tested is a sample that requires pedestrian detection;

根据所述行人稀疏编码计算所述待测样本在所述行人样本字典中的残留误差;calculating the residual error of the sample to be tested in the pedestrian sample dictionary according to the pedestrian sparse coding;

所述获取所述待测样本在非行人样本字典中的残留误差,包括:The acquisition of the residual error of the sample to be tested in the non-pedestrian sample dictionary includes:

通过求解稀疏编码方程得到所述待测样本在所述非行人样本字典中的非行人稀疏编码;Obtaining the non-pedestrian sparse coding of the sample to be tested in the non-pedestrian sample dictionary by solving the sparse coding equation;

根据所述非行人稀疏编码计算所述待测样本在所述非行人样本字典中的残留误差;calculating the residual error of the sample to be tested in the non-pedestrian sample dictionary according to the non-pedestrian sparse coding;

其中,所述稀疏编码方程为:Wherein, the sparse coding equation is:

xi=argmin||xi||0 x i =argmin||x i || 0

所述稀疏编码方程的约束条件为:Dixi=q,i=0或1;其中xi表示稀疏编码,Di表示字典,i=0时Di表示非行人样本字典,xi表示非行人稀疏编码,i=1时Di表示行人样本字典,xi表示行人稀疏编码,q表示待测样本的边缘特征样本。The constraints of the sparse coding equation are: D i x i =q, i=0 or 1; where xi represents sparse coding, D i represents a dictionary, when i=0, D i represents a dictionary of non-pedestrian samples, and xi represents For non-pedestrian sparse coding, when i=1, D i represents the pedestrian sample dictionary, x i represents the pedestrian sparse coding, and q represents the edge feature sample of the sample to be tested.

可选地,所述根据所述行人稀疏编码计算所述待测样本在所述行人样本字典中的残留误差,包括:Optionally, the calculating the residual error of the sample to be tested in the pedestrian sample dictionary according to the pedestrian sparse coding includes:

通过求解残留误差方程获得所述待测样本在所述行人样本字典中的残留误差;Obtaining the residual error of the sample to be tested in the pedestrian sample dictionary by solving the residual error equation;

所述根据所述非行人稀疏编码计算所述待测样本在所述非行人样本字典中的残留误差,包括:The calculation of the residual error of the sample to be tested in the non-pedestrian sample dictionary according to the non-pedestrian sparse coding includes:

通过求解残留误差方程获得所述待测样本在所述非行人样本字典中的残留误差;Obtaining the residual error of the sample to be tested in the non-pedestrian sample dictionary by solving the residual error equation;

所述残留误差方程为:The residual error equation is:

ri(y)=||q-Dixi||2 r i (y)=||qD i x i || 2

其中,ri(y)表示残留误差,i=0或1,i=0时ri(y)表示所述待测样本在所述非行人样本字典中的残留误差,i=1时ri(y)表示所述待测样本在所述行人样本字典中的残留误差。Among them, r i (y) represents the residual error, i=0 or 1, when i=0, r i (y) represents the residual error of the sample to be tested in the non-pedestrian sample dictionary, and when i=1, r i (y) represents the residual error of the test sample in the pedestrian sample dictionary.

根据本发明实施例的第二方面,提供一种行人检测装置,所述装置包括:According to a second aspect of an embodiment of the present invention, a pedestrian detection device is provided, the device comprising:

样本获取模块,用于分别获取行人样本和非行人样本;The sample acquisition module is used to obtain pedestrian samples and non-pedestrian samples respectively;

行人字典模块,用于通过K-奇异值分解K-SVD算法将所述行人样本训练为行人样本字典;The pedestrian dictionary module is used to train the pedestrian sample as a pedestrian sample dictionary by the K-singular value decomposition K-SVD algorithm;

非行人字典模块,用于通过所述K-SVD算法将所述非行人样本训练为非行人样本字典;A non-pedestrian dictionary module, configured to train the non-pedestrian samples into a non-pedestrian sample dictionary by the K-SVD algorithm;

行人误差模块,用于获取待测样本在所述行人样本字典中的残留误差,所述待测样本为需要进行行人检测的样本;Pedestrian error module, used to obtain the residual error of the sample to be tested in the pedestrian sample dictionary, the sample to be tested is a sample that needs to be detected by pedestrians;

非行人误差模块,用于获取所述待测样本在所述非行人样本字典中的残留误差;A non-pedestrian error module, configured to obtain the residual error of the sample to be tested in the non-pedestrian sample dictionary;

行人确定模块,用于当所述待测样本在所述行人样本字典中的残留误差小于所述待测样本在所述非行人样本字典中的残留误差时,确定所述待测样本中包含有行人。a pedestrian determination module, configured to determine that the sample to be tested contains pedestrian.

可选的,所述行人字典模块,包括:Optionally, the pedestrian dictionary module includes:

行人特征单元,用于将所述行人样本转化为行人边缘特征样本;A pedestrian feature unit, configured to convert the pedestrian sample into a pedestrian edge feature sample;

行人训练单元,用于通过所述K-SVD算法将所述行人边缘特征样本训练为行人样本字典;A pedestrian training unit, configured to train the pedestrian edge feature samples as a pedestrian sample dictionary through the K-SVD algorithm;

所述非行人字典模块,包括:The non-pedestrian dictionary module includes:

非行人特征单元,用于将所述非行人样本转化为非行人边缘特征样本;A non-pedestrian feature unit, configured to convert the non-pedestrian sample into a non-pedestrian edge feature sample;

非行人训练单元,用于通过所述K-SVD算法将所述非行人边缘特征样本训练为非行人样本字典。The non-pedestrian training unit is configured to use the K-SVD algorithm to train the non-pedestrian edge feature samples into a non-pedestrian sample dictionary.

可选的,所述行人训练单元,具体用于通过求解训练方程将所述行人边缘特征样本训练为行人样本字典;Optionally, the pedestrian training unit is specifically configured to train the pedestrian edge feature samples into a pedestrian sample dictionary by solving a training equation;

所述非行人训练单元,具体用于通过求解训练方程将所述非行人边缘特征样本训练为非行人样本字典;The non-pedestrian training unit is specifically used to train the non-pedestrian edge feature samples into a non-pedestrian sample dictionary by solving a training equation;

其中,所述训练方程为:Wherein, the training equation is:

所述训练方程的约束条件为:||xj||0≤L;其中Di表示字典,yij表示所述行人边缘特征样本或非行人边缘特征样本,i=0或1,i=0时Di表示非行人样本字典,yij表示非行人边缘特征样本,i=1时Di表示行人样本字典,yij表示行人边缘特征样本,xj表示稀疏编码,1≤j≤K且j为整数,L为稀疏度控制系数。The constraints of the training equation are: ||x j || 0 ≤ L; where D i represents a dictionary, y ij represents the pedestrian edge feature sample or non-pedestrian edge feature sample, i=0 or 1, when i=0, D i represents the non-pedestrian sample dictionary, y ij represents non-pedestrian edge feature samples, when i=1, D i represents pedestrian sample dictionary, y ij represents pedestrian edge feature samples, x j represents sparse coding, 1≤j≤K and j is an integer, L is the sparsity control coefficient .

可选的,所述行人误差模块,包括:Optionally, the pedestrian error module includes:

行人编码单元,用于通过求解稀疏编码方程得到所述待测样本在所述行人样本字典中的行人稀疏编码,所述待测样本为需要进行行人检测的样本;a pedestrian encoding unit, configured to obtain the pedestrian sparse encoding of the sample to be tested in the pedestrian sample dictionary by solving a sparse encoding equation, and the sample to be tested is a sample that requires pedestrian detection;

行人误差单元,用于根据所述行人稀疏编码计算所述待测样本在所述行人样本字典中的残留误差;a pedestrian error unit, configured to calculate the residual error of the sample to be tested in the pedestrian sample dictionary according to the pedestrian sparse coding;

所述非行人误差模块,包括:The non-pedestrian error module includes:

非行人编码单元,用于通过求解稀疏编码方程得到所述待测样本在所述非行人样本字典中的非行人稀疏编码;A non-pedestrian encoding unit, configured to obtain the non-pedestrian sparse encoding of the sample to be tested in the non-pedestrian sample dictionary by solving a sparse encoding equation;

非行人误差单元,用于根据所述非行人稀疏编码计算所述待测样本在所述非行人样本字典中的残留误差;A non-pedestrian error unit, configured to calculate the residual error of the sample to be tested in the non-pedestrian sample dictionary according to the non-pedestrian sparse coding;

其中,所述稀疏编码方程为:Wherein, the sparse coding equation is:

xi=argmin||xi||0 x i =argmin||x i || 0

所述稀疏编码方程的约束条件为:Dixi=q,i=0或1;其中xi表示稀疏编码,Di表示字典,i=0时Di表示非行人样本字典,xi表示非行人稀疏编码,i=1时Di表示行人样本字典,xi表示行人稀疏编码,q表示待测样本的边缘特征样本。The constraints of the sparse coding equation are: D i x i =q, i=0 or 1; where xi represents sparse coding, D i represents a dictionary, when i=0, D i represents a dictionary of non-pedestrian samples, and xi represents For non-pedestrian sparse coding, when i=1, D i represents the pedestrian sample dictionary, x i represents the pedestrian sparse coding, and q represents the edge feature sample of the sample to be tested.

可选的,所述行人误差单元,具体用于通过求解残留误差方程获得所述待测样本在所述行人样本字典中的残留误差;Optionally, the pedestrian error unit is specifically configured to obtain the residual error of the sample to be tested in the pedestrian sample dictionary by solving a residual error equation;

所述非行人误差单元,具体用于通过求解残留误差方程获得所述待测样本在所述非行人样本字典中的残留误差;The non-pedestrian error unit is specifically used to obtain the residual error of the sample to be tested in the non-pedestrian sample dictionary by solving a residual error equation;

所述残留误差方程为:The residual error equation is:

ri(y)=||q-Dixi||2 r i (y)=||qD i x i || 2

其中,ri(y)表示残留误差,i=0或1,i=0时ri(y)表示所述待测样本在所述非行人样本字典中的残留误差,i=1时ri(y)表示所述待测样本在所述行人样本字典中的残留误差。Among them, r i (y) represents the residual error, i=0 or 1, when i=0, r i (y) represents the residual error of the sample to be tested in the non-pedestrian sample dictionary, and when i=1, r i (y) represents the residual error of the test sample in the pedestrian sample dictionary.

本发明实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:

通过K-SVD算法将行人样本和非行人样本分别训练为两类字典,并根据待测样本在两类字典中的残留误差的大小关系,判断待测样本中是否含有行人;解决了相关技术中无法从多个角度对图像信息进行描述,分类器的训练过程也较为复杂,在应用于存在遮挡和光照变化的环境时,误报率较高的问题,达到了从整体上对图像的匹配度进行检测,且可以有效地应用于存在遮挡和光照变化的环境时的行人检测的效果。Through the K-SVD algorithm, the pedestrian samples and non-pedestrian samples are trained into two types of dictionaries, and according to the size relationship of the residual errors of the samples to be tested in the two types of dictionaries, it is judged whether there are pedestrians in the samples to be tested; solves the problem in related technologies It is impossible to describe the image information from multiple angles, and the training process of the classifier is also relatively complicated. When it is applied to an environment with occlusion and illumination changes, the problem of high false alarm rate has reached the matching degree of the image as a whole. It is detected and can be effectively applied to the effect of pedestrian detection in environments with occlusion and illumination changes.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本发明。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description serve to explain the principles of the invention.

图1是根据一示例性实施例示出的一种行人检测方法的流程图;Fig. 1 is a flowchart of a pedestrian detection method shown according to an exemplary embodiment;

图2是根据另一示例性实施例示出的一种行人检测方法的流程图;Fig. 2 is a flow chart of a pedestrian detection method according to another exemplary embodiment;

图3是根据一示例性实施例示出的一种行人检测装置的框图;Fig. 3 is a block diagram of a pedestrian detection device according to an exemplary embodiment;

图4是根据另一示例性实施例示出的一种行人检测装置的框图。Fig. 4 is a block diagram of a pedestrian detection device according to another exemplary embodiment.

通过上述附图,已示出本发明明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本发明构思的范围,而是通过参考特定实施例为本领域技术人员说明本发明的概念。By way of the above drawings, specific embodiments of the invention have been shown and will be described in more detail hereinafter. These drawings and written descriptions are not intended to limit the scope of the inventive concept in any way, but to illustrate the inventive concept for those skilled in the art by referring to specific embodiments.

具体实施方式Detailed ways

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with aspects of the invention as recited in the appended claims.

图1是根据一示例性实施例示出的一种行人检测方法的流程图,本实施例以该行人检测方法应用于终端中来举例说明。本发明实施例中的终端可以是手机、平板电脑、膝上型便携计算机、行车记录仪、相机、台式计算机和摄像机中的任意一个。该行人检测方法可以包括如下几个步骤:Fig. 1 is a flow chart of a pedestrian detection method according to an exemplary embodiment. This embodiment is described by taking the pedestrian detection method applied to a terminal as an example. The terminal in the embodiment of the present invention may be any one of a mobile phone, a tablet computer, a laptop computer, a driving recorder, a camera, a desktop computer, and a video camera. The pedestrian detection method may include the following steps:

在步骤101中,分别获取行人样本和非行人样本。In step 101, pedestrian samples and non-pedestrian samples are obtained respectively.

在步骤102中,通过K-奇异值分解K-SVD算法将行人样本训练为行人样本字典。In step 102, the pedestrian samples are trained as a dictionary of pedestrian samples through the K-singular value decomposition K-SVD algorithm.

在步骤103中,通过K-SVD算法将非行人样本训练为非行人样本字典。In step 103, the non-pedestrian samples are trained into a dictionary of non-pedestrian samples through the K-SVD algorithm.

在步骤104中,获取待测样本在行人样本字典中的残留误差,待测样本为需要进行行人检测的样本。In step 104, the residual error of the sample to be tested in the dictionary of pedestrian samples is obtained, and the sample to be tested is a sample that needs to be detected for pedestrians.

在步骤105中,获取待测样本在非行人样本字典中的残留误差。In step 105, the residual error of the sample to be tested in the non-pedestrian sample dictionary is obtained.

在步骤106中,当待测样本在行人样本字典中的残留误差小于待测样本在非行人样本字典中的残留误差时,确定待测样本中包含有行人。In step 106, when the residual error of the sample to be tested in the pedestrian sample dictionary is smaller than the residual error of the sample to be tested in the non-pedestrian sample dictionary, it is determined that the sample to be tested contains a pedestrian.

综上所述,本实施例提供的行人检测方法,通过K-SVD算法将行人样本和非行人样本分别训练为两类字典,并根据待测样本在两类字典中的残留误差的大小关系,判断待测样本中是否含有行人;解决了相关技术中无法从多个角度对图像信息进行描述,分类器的训练过程也较为复杂,在应用于存在遮挡和光照变化的环境时,误报率较高的问题,达到了从整体上对图像的匹配度进行检测,且可以有效地应用于存在遮挡和光照变化的环境时的行人检测的效果。In summary, the pedestrian detection method provided in this embodiment uses the K-SVD algorithm to train pedestrian samples and non-pedestrian samples into two types of dictionaries respectively, and according to the relationship between the residual errors of the samples to be tested in the two types of dictionaries, Judging whether there are pedestrians in the sample to be tested; solving the problem that the image information cannot be described from multiple angles in related technologies, and the training process of the classifier is also relatively complicated. When applied to environments with occlusion and illumination changes, the false positive rate is relatively high The high problem has achieved the detection of the matching degree of the image as a whole, and can be effectively applied to the effect of pedestrian detection in environments with occlusion and illumination changes.

图2是根据另一示例性实施例示出的一种行人检测方法的流程图,本实施例以该行人检测方法应用于终端中来举例说明。该行人检测方法可以包括如下几个步骤:Fig. 2 is a flow chart showing a pedestrian detection method according to another exemplary embodiment. This embodiment is described by taking the pedestrian detection method applied to a terminal as an example. The pedestrian detection method may include the following steps:

在步骤201中,终端分别获取行人样本和非行人样本。In step 201, the terminal acquires pedestrian samples and non-pedestrian samples respectively.

终端在进行行人检测时,首先分别获取行人样本和非行人样本,其中行人样本和非行人样本可以包含有相同的预订数量的图像,即行人样本包含有预订数量的行人图像,非行人样本包含有预订数量的非行人图像。优选的,该预订数量可以在600至2000中进行选择。When the terminal detects pedestrians, it first obtains pedestrian samples and non-pedestrian samples respectively, where pedestrian samples and non-pedestrian samples can contain the same predetermined number of images, that is, pedestrian samples contain a predetermined number of pedestrian images, and non-pedestrian samples contain Book number of non-pedestrian images. Preferably, the subscription quantity can be selected from 600 to 2000.

其中非行人样本可以是预定数量不包含行人的非行人图像,比如行车记录仪采集的预定数量的不包含行人的图像;行人样本可以是预定数量包含有一个行人的行人图像,比如行车记录仪采集的预定数量的包含有一个行人的图像。Wherein the non-pedestrian sample can be a predetermined number of non-pedestrian images that do not contain pedestrians, such as a predetermined number of images that do not contain pedestrians collected by a driving recorder; pedestrian samples can be a predetermined number of pedestrian images that include a pedestrian, such as collected by a driving recorder A predetermined number of images of a pedestrian are included.

在步骤202中,终端将行人样本转化为行人边缘特征样本。In step 202, the terminal converts pedestrian samples into pedestrian edge feature samples.

终端在获取了行人样本后,将获取的行人样本转化为行人边缘特征样本。After acquiring the pedestrian samples, the terminal converts the acquired pedestrian samples into pedestrian edge feature samples.

在行人样本为预定数量的行人图像时,下面以将其中一个图像转化为边缘特征样本为例,来说明本步骤的转化过程:When the pedestrian samples are a predetermined number of pedestrian images, the following takes converting one of the images into an edge feature sample as an example to illustrate the conversion process in this step:

1)将行人图像缩放至预定尺寸并转化为灰度图像。1) Scale the pedestrian image to a predetermined size and convert it into a grayscale image.

2)对灰度图像中的每一个像素点利用索贝尔算子计算其梯度。2) Use the Sobel operator to calculate the gradient of each pixel in the grayscale image.

其中索贝尔算子可以是:where the Sobel operator can be:

每一个像素在x方向的梯度为gx,在y方向的梯度为gy,gx=t*sx,gy=t*sy,t可以为围绕该像素点的8个像素点的灰度值。The gradient of each pixel in the x direction is g x , the gradient in the y direction is g y , g x =t*s x , g y =t*s y , t can be the 8 pixels around the pixel grayscale value.

3)终端根据梯度计算该像素点的梯度幅值。3) The terminal calculates the gradient magnitude of the pixel point according to the gradient.

梯度幅值M(x,y)=|gx|+|gy|。Gradient magnitude M(x,y)=|g x |+|g y |.

4)在计算完灰度图像的所有像素点的梯度幅值后,利用梯度幅值构成该灰度图像的边缘特征图,将该边缘特征图以预定比例进行下抽样后,将其转化为一维矢量得到一个行人边缘特征样本。4) After calculating the gradient magnitudes of all pixels in the grayscale image, use the gradient magnitudes to form the edge feature map of the grayscale image, and then convert the edge feature map into a dimension vector to obtain a pedestrian edge feature sample.

在行人样本包含有预订数量的行人图像时,对其中每一个行人图像都进行如1)至4)的处理,得到预订数量的行人边缘特征样本。When the pedestrian samples include a predetermined number of pedestrian images, each of the pedestrian images is processed as 1) to 4) to obtain a predetermined number of pedestrian edge feature samples.

在步骤203中,终端通过K-SVD算法将行人边缘特征样本训练为行人样本字典。In step 203, the terminal uses the K-SVD algorithm to train pedestrian edge feature samples into a dictionary of pedestrian samples.

终端在得到预订数量的行人边缘特征样本后,再通过K-SVD算法将预订数量的行人边缘特征样本训练为行人样本字典。After obtaining the predetermined number of pedestrian edge feature samples, the terminal trains the predetermined number of pedestrian edge feature samples into a pedestrian sample dictionary through the K-SVD algorithm.

其中,终端可以通过求解训练方程将行人边缘特征样本训练为行人样本字典,而训练方程为:Among them, the terminal can train the pedestrian edge feature samples into a pedestrian sample dictionary by solving the training equation, and the training equation is:

该训练方程的约束条件为:||xj||0≤L;其中Di表示字典,yij表示行人边缘特征样本或非行人边缘特征样本,i=0或1,i=0时Di表示非行人样本字典,yij表示非行人边缘特征样本,i=1时Di表示行人样本字典,yij表示行人边缘特征样本,xj表示稀疏编码,1≤j≤K且j为整数,j为样本的数量,L为稀疏度控制系数,可以由用户进行设置,比如3或4。该训练方程目的在与求出在xj中的非零元素很少时,可以使得Dixj和yij最为接近的Di,得到的Di可以表示为一个n维的列矢量,n表示字典的大小,||yij-Dixj||2表示yij-Dixj的L2范数。The constraints of the training equation are: ||x j || 0 ≤ L; where D i represents a dictionary, y ij represents a pedestrian edge feature sample or a non-pedestrian edge feature sample, i=0 or 1, when i=0, D i represents a non-pedestrian sample dictionary, y ij Represents non-pedestrian edge feature samples, when i=1, D i represents pedestrian sample dictionary, y ij represents pedestrian edge feature samples, x j represents sparse coding, 1≤j≤K and j is an integer, j is the number of samples, L is Sparsity control coefficient, which can be set by the user, such as 3 or 4. The purpose of this training equation is to find the D i that is the closest to D i x j and y ij when there are few non-zero elements in x j , and the obtained D i can be expressed as an n-dimensional column vector, n Represents the size of the dictionary, ||y ij -D i x j || 2 represents the L2 norm of y ij -D i x j .

即,终端可以通过行人边缘特征样本y1j求解该训练方程得到行人样本字典D1That is, the terminal can solve the training equation by using the pedestrian edge feature samples y 1j to obtain the pedestrian sample dictionary D 1 .

上述训练方程为一个稀疏编码方程,可以由正交匹配追踪算法求解,因为利用正交匹配追踪算法求解稀疏编码方程属于本领域技术人员的常用技术手段,在此不再敷述,此外,其他常用技术手段还有基追踪算法等等。The above training equation is a sparse coding equation, which can be solved by the orthogonal matching pursuit algorithm, because using the orthogonal matching pursuit algorithm to solve the sparse coding equation is a common technical means for those skilled in the art, so it will not be described here. In addition, other commonly used There are also technical means such as base tracking algorithm and so on.

在步骤204中,终端将非行人样本转化为非行人边缘特征样本。In step 204, the terminal converts the non-pedestrian samples into non-pedestrian edge feature samples.

本步骤和步骤202中的方法基本一致,在此不再敷述。This step is basically the same as the method in step 202, and will not be described here.

在步骤205中,终端通过K-SVD算法将非行人边缘特征样本训练为非行人样本字典。In step 205, the terminal uses the K-SVD algorithm to train non-pedestrian edge feature samples into a dictionary of non-pedestrian samples.

本步骤和步骤203中的方法基本一致,即终端通过非行人边缘特征样本y0j求解训练方程得到非行人样本字典D0This step is basically the same as the method in step 203, that is, the terminal obtains the non-pedestrian sample dictionary D 0 by solving the training equation through the non-pedestrian edge feature sample y 0j .

需要说明的是,本发明实施例提供的行人检测方法步骤的先后顺序可以进行适当调整,步骤也可以根据情况进行相应增减,示例的,步骤204和步骤205也可以在步骤202和步骤203之前进行,即,本实施例提供的行人检测方法只需要步骤203在步骤202之后进行,步骤205在步骤204之后进行,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化的方法,都应涵盖在本发明的保护范围之内,因此不再赘述。It should be noted that the order of the steps of the pedestrian detection method provided by the embodiment of the present invention can be adjusted appropriately, and the steps can also be increased or decreased according to the situation. For example, step 204 and step 205 can also be before step 202 and step 203 That is, the pedestrian detection method provided in this embodiment only needs to perform step 203 after step 202, and step 205 after step 204. Any person familiar with the technical field can easily think of The changing methods should all be included in the protection scope of the present invention, so no more details are given here.

在步骤206中,终端通过求解稀疏编码方程得到待测样本在行人样本字典中的行人稀疏编码,待测样本为需要进行行人检测的样本。In step 206, the terminal obtains the pedestrian sparse coding of the sample to be tested in the pedestrian sample dictionary by solving the sparse coding equation, and the sample to be tested is a sample that requires pedestrian detection.

本步骤可以包括如下3个子步骤:This step can include the following three sub-steps:

1)终端获取待测样本。1) The terminal obtains the sample to be tested.

该待测样本可以是终端获取的一个图像,比如行车记录仪实时抓拍的车辆前方的图像。The sample to be tested may be an image acquired by the terminal, such as an image in front of the vehicle captured in real time by a driving recorder.

2)终端将待测样本转化为边缘特征样本。2) The terminal converts the samples to be tested into edge feature samples.

遮挡可以通过步骤202中的方法将待测样本转化为边缘特征样本q。For occlusion, the samples to be tested can be transformed into edge feature samples q by the method in step 202 .

3)终端通过求解稀疏编码方程得到该边缘特征样本在行人样本字典中的稀疏编码。3) The terminal obtains the sparse coding of the edge feature sample in the pedestrian sample dictionary by solving the sparse coding equation.

终端通过边缘特征样本q求解稀疏编码方程,得到待测样本在行人样本字典中的稀疏编码。The terminal solves the sparse coding equation through the edge feature sample q, and obtains the sparse coding of the sample to be tested in the pedestrian sample dictionary.

其中,稀疏编码方程为:Among them, the sparse coding equation is:

xi=argmin||xi||0 x i =argmin||x i || 0

稀疏编码方程的约束条件为:Dixi=q,i=0或1;其中xi表示稀疏编码,Di表示字典,i=0时Di表示非行人样本字典,xi表示非行人稀疏编码,i=1时Di表示行人样本字典,xi表示行人稀疏编码,q表示待测样本的边缘特征样本,||xi||0表示xi的L0范数。The constraints of the sparse coding equation are: D i x i =q, i=0 or 1; where xi represents sparse coding, D i represents a dictionary, when i=0, D i represents a dictionary of non-pedestrian samples, and xi represents a non-pedestrian Sparse coding, when i=1, D i represents the pedestrian sample dictionary, xi represents pedestrian sparse coding, q represents the edge feature sample of the sample to be tested, and || xi || 0 represents the L0 norm of xi .

即,可以通过该稀疏编码方程求得待测样本在行人样本字典中的行人稀疏编码x1That is, the pedestrian sparse coding x 1 of the sample to be tested in the pedestrian sample dictionary can be obtained through the sparse coding equation.

在步骤207中,终端根据行人稀疏编码计算待测样本在行人样本字典中的残留误差。In step 207, the terminal calculates the residual error of the sample to be tested in the pedestrian sample dictionary according to the pedestrian sparse coding.

终端通过求解残留误差方程获得待测样本在行人样本字典中的残留误差。The terminal obtains the residual error of the sample to be tested in the pedestrian sample dictionary by solving the residual error equation.

残留误差方程为:The residual error equation is:

ri(y)=||q-Dixi||2 r i (y)=||qD i x i || 2

其中,ri(y)表示残留误差,i=0或1,i=0时ri(y)表示待测样本在非行人样本字典中的残留误差,i=1时ri(y)表示待测样本在行人样本字典中的残留误差。Among them, ri (y) represents the residual error, i =0 or 1, when i =0, ri (y) represents the residual error of the sample to be tested in the non-pedestrian sample dictionary, and when i =1, ri (y) represents The residual error of the tested sample in the pedestrian sample dictionary.

即,终端可以通过该误差方程求得待测样本在行人样本字典中的残留误差r1(y)。That is, the terminal can obtain the residual error r 1 (y) of the sample to be tested in the pedestrian sample dictionary through the error equation.

在步骤208中,终端通过求解稀疏编码方程得到待测样本在非行人样本字典中的非行人稀疏编码。In step 208, the terminal obtains the non-pedestrian sparse coding of the sample to be tested in the non-pedestrian sample dictionary by solving the sparse coding equation.

本步骤和步骤206中的方法基本一致,即,可以通过步骤206中的方法求得待测样本在非行人样本字典中的非行人稀疏编码。This step is basically the same as the method in step 206, that is, the non-pedestrian sparse coding of the sample to be tested in the non-pedestrian sample dictionary can be obtained through the method in step 206.

在步骤209中,终端根据非行人稀疏编码计算待测样本在非行人样本字典中的残留误差。In step 209, the terminal calculates the residual error of the sample to be tested in the non-pedestrian sample dictionary according to the non-pedestrian sparse coding.

本步骤和步骤207中的方法基本一致,即,可以通过步骤207中的方法求得待测样本在非行人样本字典中的残留误差r0(y)。This step is basically the same as the method in step 207, that is, the residual error r 0 (y) of the sample to be tested in the non-pedestrian sample dictionary can be obtained by the method in step 207.

需要说明的是,本发明实施例提供的行人检测方法步骤的先后顺序可以进行适当调整,步骤也可以根据情况进行相应增减,示例的,步骤208和步骤209也可以在步骤206和步骤207之前进行,即,本实施例提供的行人检测方法只需要步骤209在步骤208之后进行,步骤208在步骤205之后进行,步骤207在步骤206之后进行,步骤206在步骤203之后进行,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化的方法,都应涵盖在本发明的保护范围之内,因此不再赘述。It should be noted that the sequence of the steps of the pedestrian detection method provided by the embodiment of the present invention can be appropriately adjusted, and the steps can also be increased or decreased according to the situation. For example, step 208 and step 209 can also be before step 206 and step 207 That is, the pedestrian detection method provided by this embodiment only needs to carry out step 209 after step 208, step 208 is carried out after step 205, step 207 is carried out after step 206, and step 206 is carried out after step 203, anyone familiar with the technology Those skilled in the art within the technical scope disclosed in the present invention can easily think of changing methods, all of which should be covered within the protection scope of the present invention, so details are not repeated here.

在步骤210中,当待测样本在行人样本字典中的残留误差小于待测样本在非行人样本字典中的残留误差时,终端确定待测样本中包含有行人。In step 210, when the residual error of the sample to be tested in the dictionary of pedestrian samples is smaller than the residual error of the sample to be tested in the dictionary of non-pedestrian samples, the terminal determines that the sample to be tested contains pedestrians.

终端判断r0(y)和r1(y)的大小关系,在r0(y)>r1(y)时,终端确定该待测样本中包含有行人,在r0(y)≤r1(y)时,终端确定该待测样本中不包含有行人。The terminal judges the size relationship between r 0 (y) and r 1 (y). When r 0 (y) > r 1 (y), the terminal determines that the sample to be tested contains pedestrians. When r 0 (y) ≤ r 1 (y), the terminal determines that the sample to be tested does not include pedestrians.

需要补充说明的是,本实施例提供的行人检测方法通过边缘特征样本来训练行人样本字典与非行人样本字典,而识别物体的关键依赖于物体的边缘,因而此方法可以有效的减少背景的干扰。It should be added that the pedestrian detection method provided in this embodiment uses edge feature samples to train the pedestrian sample dictionary and non-pedestrian sample dictionary, and the key to identifying objects depends on the edges of objects, so this method can effectively reduce background interference .

需要补充说明的是,现有技术中的Adaboost检测分类器,需要设置样本权重和错误率阈值等参数,滑动窗口的尺寸和检测时的步长也需要进行设定,而本实施例提供的行人检测方法,仅需要简单设置一个稀疏度控制系数L,达到了使行人检测方法结构简单,便于实际场景的使用的效果。It should be added that the Adaboost detection classifier in the prior art needs to set parameters such as sample weight and error rate threshold, the size of the sliding window and the step size during detection also need to be set, and the pedestrian provided by this embodiment The detection method only needs to simply set a sparsity control coefficient L, which achieves the effect of making the structure of the pedestrian detection method simple and easy to use in actual scenes.

需要补充说明的是,本实施例提供的行人检测方法通过训练行人与非行人两类字典,并通过比较待测样本在两类字典中的残留误差来确定待测样本中是否包含有行人,达到了增大行人检测方法正确率的效果。It should be added that the pedestrian detection method provided in this embodiment is to determine whether there are pedestrians in the sample to be tested by training two types of dictionaries for pedestrians and non-pedestrians, and by comparing the residual errors of the samples to be tested in the two types of dictionaries. It has the effect of increasing the accuracy rate of pedestrian detection method.

需要补充说明的是,本实施例提供的行人检测方法训练出的两类字典中每个列矢量都可以表示成组成图像的基元,目标和遮挡可以实现在不同基元上的分离,达到了提高本实施例行人检测方法在有遮挡的情况下的性能的效果。It needs to be added that each column vector in the two types of dictionaries trained by the pedestrian detection method provided in this embodiment can be expressed as a primitive that composes an image, and the object and occlusion can be separated on different primitives, achieving The effect of improving the performance of the pedestrian detection method of this embodiment in the case of occlusion.

综上所述,本实施例提供的行人检测方法,通过K-SVD算法将行人样本和非行人样本分别训练为两类字典,并根据待测样本在两类字典中的残留误差的大小关系,判断待测样本中是否含有行人;解决了相关技术中无法从多个角度对图像信息进行描述,分类器的训练过程也较为复杂,在应用于存在遮挡和光照变化的环境时,误报率较高的问题,达到了从整体上对图像的匹配度进行检测,且可以有效地应用于存在遮挡和光照变化的环境时的行人检测的效果。In summary, the pedestrian detection method provided in this embodiment uses the K-SVD algorithm to train pedestrian samples and non-pedestrian samples into two types of dictionaries respectively, and according to the relationship between the residual errors of the samples to be tested in the two types of dictionaries, Judging whether there are pedestrians in the sample to be tested; solving the problem that the image information cannot be described from multiple angles in related technologies, and the training process of the classifier is also relatively complicated. When applied to environments with occlusion and illumination changes, the false positive rate is relatively high The high problem has achieved the detection of the matching degree of the image as a whole, and can be effectively applied to the effect of pedestrian detection in environments with occlusion and illumination changes.

下述为本发明装置实施例,可以用于执行本发明方法实施例。对于本发明装置实施例中未披露的细节,请参照本发明方法实施例。The following are device embodiments of the present invention, which can be used to implement the method embodiments of the present invention. For the details not disclosed in the device embodiment of the present invention, please refer to the method embodiment of the present invention.

图3是根据一示例性实施例示出的一种行人检测装置的框图,该行人检测装置可以通过软件、硬件或者两者的结合实现成为终端的部分或者全部。该行人检测制装置可以包括:样本获取模块310、行人字典模块320、非行人字典模块330、行人误差模块340、非行人误差模块350和行人确定模块360;Fig. 3 is a block diagram of a pedestrian detection device according to an exemplary embodiment. The pedestrian detection device can be implemented as part or all of a terminal by software, hardware or a combination of the two. The pedestrian detection system may include: a sample acquisition module 310, a pedestrian dictionary module 320, a non-pedestrian dictionary module 330, a pedestrian error module 340, a non-pedestrian error module 350 and a pedestrian determination module 360;

样本获取模块310,用于分别获取行人样本和非行人样本;A sample acquisition module 310, configured to acquire pedestrian samples and non-pedestrian samples respectively;

行人字典模块320,用于通过K-奇异值分解K-SVD算法将行人样本训练为行人样本字典;The pedestrian dictionary module 320 is used to train the pedestrian sample as a pedestrian sample dictionary through the K-singular value decomposition K-SVD algorithm;

非行人字典模块330,用于通过K-SVD算法将非行人样本训练为非行人样本字典;The non-pedestrian dictionary module 330 is used to train non-pedestrian samples into a non-pedestrian sample dictionary by the K-SVD algorithm;

行人误差模块340,用于获取待测样本在行人样本字典中的残留误差,待测样本为需要进行行人检测的样本;The pedestrian error module 340 is used to obtain the residual error of the sample to be tested in the pedestrian sample dictionary, and the sample to be tested is a sample that needs to be detected by pedestrians;

非行人误差模块350,用于获取待测样本在非行人样本字典中的残留误差;The non-pedestrian error module 350 is used to obtain the residual error of the sample to be tested in the non-pedestrian sample dictionary;

行人确定模块360,用于当待测样本在行人样本字典中的残留误差小于待测样本在非行人样本字典中的残留误差时,确定待测样本中包含有行人。The pedestrian determining module 360 is configured to determine that the sample to be tested contains a pedestrian when the residual error of the sample to be tested in the dictionary of pedestrian samples is smaller than the residual error of the sample to be tested in the dictionary of non-pedestrian samples.

综上所述,本实施例提供的行人检测装置,通过K-SVD算法将行人样本和非行人样本分别训练为两类字典,并根据待测样本在两类字典中的残留误差的大小关系,判断待测样本中是否含有行人;解决了相关技术中无法从多个角度对图像信息进行描述,分类器的训练过程也较为复杂,在应用于存在遮挡和光照变化的环境时,误报率较高的问题,达到了从整体上对图像的匹配度进行检测,且可以有效地应用于存在遮挡和光照变化的环境时的行人检测的效果。In summary, the pedestrian detection device provided in this embodiment uses the K-SVD algorithm to train pedestrian samples and non-pedestrian samples into two types of dictionaries respectively, and according to the relationship between the residual errors of the samples to be tested in the two types of dictionaries, Judging whether there are pedestrians in the sample to be tested; solving the problem that the image information cannot be described from multiple angles in related technologies, and the training process of the classifier is also relatively complicated. When applied to environments with occlusion and illumination changes, the false positive rate is relatively high The high problem has achieved the detection of the matching degree of the image as a whole, and can be effectively applied to the effect of pedestrian detection in environments with occlusion and illumination changes.

图4是根据另一示例性实施例示出的一种行人检测装置的框图,该行人检测装置可以通过软件、硬件或者两者的结合实现成为终端的部分或者全部。该行人检测制装置可以包括:样本获取模块310、行人字典模块320、非行人字典模块330、行人误差模块340、非行人误差模块350和行人确定模块360;Fig. 4 is a block diagram of a pedestrian detection device according to another exemplary embodiment. The pedestrian detection device may be implemented as part or all of a terminal by software, hardware or a combination of the two. The pedestrian detection system may include: a sample acquisition module 310, a pedestrian dictionary module 320, a non-pedestrian dictionary module 330, a pedestrian error module 340, a non-pedestrian error module 350 and a pedestrian determination module 360;

样本获取模块310,用于分别获取行人样本和非行人样本;A sample acquisition module 310, configured to acquire pedestrian samples and non-pedestrian samples respectively;

行人字典模块320,用于通过K-奇异值分解K-SVD算法将行人样本训练为行人样本字典;The pedestrian dictionary module 320 is used to train the pedestrian sample as a pedestrian sample dictionary through the K-singular value decomposition K-SVD algorithm;

非行人字典模块330,用于通过K-SVD算法将非行人样本训练为非行人样本字典;The non-pedestrian dictionary module 330 is used to train non-pedestrian samples into a non-pedestrian sample dictionary by the K-SVD algorithm;

行人误差模块340,用于获取待测样本在行人样本字典中的残留误差,待测样本为需要进行行人检测的样本;The pedestrian error module 340 is used to obtain the residual error of the sample to be tested in the pedestrian sample dictionary, and the sample to be tested is a sample that needs to be detected by pedestrians;

非行人误差模块350,用于获取待测样本在非行人样本字典中的残留误差;The non-pedestrian error module 350 is used to obtain the residual error of the sample to be tested in the non-pedestrian sample dictionary;

行人确定模块360,用于当待测样本在行人样本字典中的残留误差小于待测样本在非行人样本字典中的残留误差时,确定待测样本中包含有行人。The pedestrian determining module 360 is configured to determine that the sample to be tested contains a pedestrian when the residual error of the sample to be tested in the dictionary of pedestrian samples is smaller than the residual error of the sample to be tested in the dictionary of non-pedestrian samples.

可选的,行人字典模块320,包括:Optionally, the pedestrian dictionary module 320 includes:

行人特征单元321,用于将行人样本转化为行人边缘特征样本;Pedestrian feature unit 321, for converting pedestrian samples into pedestrian edge feature samples;

行人训练单元322,用于通过K-SVD算法将行人边缘特征样本训练为行人样本字典;Pedestrian training unit 322, used to train pedestrian edge feature samples as pedestrian sample dictionary by K-SVD algorithm;

非行人字典模块330,包括:Non-pedestrian dictionary module 330, comprising:

非行人特征单元331,用于将非行人样本转化为非行人边缘特征样本;Non-pedestrian feature unit 331, for converting non-pedestrian samples into non-pedestrian edge feature samples;

非行人训练单元332,用于通过K-SVD算法将非行人边缘特征样本训练为非行人样本字典。The non-pedestrian training unit 332 is configured to train non-pedestrian edge feature samples into a dictionary of non-pedestrian samples through the K-SVD algorithm.

可选的,行人训练单元322,具体用于通过求解训练方程将行人边缘特征样本训练为行人样本字典;Optionally, the pedestrian training unit 322 is specifically configured to train pedestrian edge feature samples into a pedestrian sample dictionary by solving a training equation;

非行人训练单元332,具体用于通过求解训练方程将非行人边缘特征样本训练为非行人样本字典;The non-pedestrian training unit 332 is specifically used to train the non-pedestrian edge feature samples into a non-pedestrian sample dictionary by solving the training equation;

其中,训练方程为:Among them, the training equation is:

训练方程的约束条件为:||xj||0≤L;其中Di表示字典,yij表示行人边缘特征样本或非行人边缘特征样本,i=0或1,i=0时Di表示非行人样本字典,yij表示非行人边缘特征样本,i=1时Di表示行人样本字典,yij表示行人边缘特征样本,xj表示稀疏编码,1≤j≤K且j为整数,L为稀疏度控制系数。The constraints of the training equation are: ||x j || 0 ≤ L; where D i represents a dictionary, y ij represents a pedestrian edge feature sample or a non-pedestrian edge feature sample, i=0 or 1, when i=0, D i represents a non-pedestrian sample dictionary, y ij Represents non-pedestrian edge feature samples, when i=1, D i represents pedestrian sample dictionary, y ij represents pedestrian edge feature samples, x j represents sparse coding, 1≤j≤K and j is an integer, L is the sparsity control coefficient.

可选的,行人误差模块340,包括:Optionally, the pedestrian error module 340 includes:

行人编码单元341,用于通过求解稀疏编码方程得到待测样本在行人样本字典中的行人稀疏编码,待测样本为需要进行行人检测的样本;The pedestrian encoding unit 341 is used to obtain the pedestrian sparse encoding of the sample to be tested in the pedestrian sample dictionary by solving the sparse encoding equation, and the sample to be tested is a sample that requires pedestrian detection;

行人误差单元342,用于根据行人稀疏编码计算待测样本在行人样本字典中的残留误差;Pedestrian error unit 342, for calculating the residual error of the sample to be tested in the pedestrian sample dictionary according to the pedestrian sparse coding;

非行人误差模块350,包括:A non-pedestrian error module 350 comprising:

非行人编码单元351,用于通过求解稀疏编码方程得到待测样本在非行人样本字典中的非行人稀疏编码;The non-pedestrian coding unit 351 is used to obtain the non-pedestrian sparse coding of the sample to be tested in the non-pedestrian sample dictionary by solving the sparse coding equation;

非行人误差单元352,用于根据非行人稀疏编码计算待测样本在非行人样本字典中的残留误差;The non-pedestrian error unit 352 is used to calculate the residual error of the sample to be tested in the non-pedestrian sample dictionary according to the non-pedestrian sparse coding;

其中,稀疏编码方程为:Among them, the sparse coding equation is:

xi=argmin||xi||0 x i =argmin||x i || 0

稀疏编码方程的约束条件为:Dixi=q,i=0或1;其中xi表示稀疏编码,Di表示字典,i=0时Di表示非行人样本字典,xi表示非行人稀疏编码,i=1时Di表示行人样本字典,xi表示行人稀疏编码,q表示待测样本的边缘特征样本。The constraints of the sparse coding equation are: D i x i =q, i=0 or 1; where xi represents sparse coding, D i represents a dictionary, when i=0, D i represents a dictionary of non-pedestrian samples, and xi represents a non-pedestrian Sparse coding, when i=1, D i represents the pedestrian sample dictionary, x i represents the pedestrian sparse coding, and q represents the edge feature sample of the sample to be tested.

可选的,行人误差单元342,具体用于通过求解残留误差方程获得待测样本在行人样本字典中的残留误差;Optionally, the pedestrian error unit 342 is specifically configured to obtain the residual error of the sample to be tested in the pedestrian sample dictionary by solving the residual error equation;

非行人误差单元352,具体用于通过求解残留误差方程获得待测样本在非行人样本字典中的残留误差;The non-pedestrian error unit 352 is specifically used to obtain the residual error of the sample to be tested in the non-pedestrian sample dictionary by solving the residual error equation;

残留误差方程为:The residual error equation is:

ri(y)=||q-Dixi||2 r i (y)=||qD i x i || 2

其中,ri(y)表示残留误差,i=0或1,i=0时ri(y)表示待测样本在非行人样本字典中的残留误差,i=1时ri(y)表示待测样本在行人样本字典中的残留误差。Among them, ri (y) represents the residual error, i =0 or 1, when i =0, ri (y) represents the residual error of the sample to be tested in the non-pedestrian sample dictionary, and when i =1, ri (y) represents The residual error of the tested sample in the pedestrian sample dictionary.

综上所述,本实施例提供的行人检测装置,通过K-SVD算法将行人样本和非行人样本分别训练为两类字典,并根据待测样本在两类字典中的残留误差的大小关系,判断待测样本中是否含有行人;解决了相关技术中无法从多个角度对图像信息进行描述,分类器的训练过程也较为复杂,在应用于存在遮挡和光照变化的环境时,误报率较高的问题,达到了从整体上对图像的匹配度进行检测,且可以有效地应用于存在遮挡和光照变化的环境时的行人检测的效果。In summary, the pedestrian detection device provided in this embodiment uses the K-SVD algorithm to train pedestrian samples and non-pedestrian samples into two types of dictionaries respectively, and according to the relationship between the residual errors of the samples to be tested in the two types of dictionaries, Judging whether there are pedestrians in the sample to be tested; solving the problem that the image information cannot be described from multiple angles in related technologies, and the training process of the classifier is also relatively complicated. When applied to environments with occlusion and illumination changes, the false positive rate is relatively high The high problem has achieved the detection of the matching degree of the image as a whole, and can be effectively applied to the effect of pedestrian detection in environments with occlusion and illumination changes.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

本领域技术人员在考虑说明书及实践这里发明的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本发明未发明的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。Other embodiments of the invention will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention invented herein. This application is intended to cover any modification, use or adaptation of the present invention, these modifications, uses or adaptations follow the general principles of the present invention and include common knowledge or conventional technical means in the technical field not invented by the present invention . The specification and examples are to be considered exemplary only, with a true scope and spirit of the invention being indicated by the following claims.

应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。It should be understood that the present invention is not limited to the precise constructions which have been described above and shown in the accompanying drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (4)

1.一种行人检测方法,其特征在于,所述方法包括:1. A pedestrian detection method, characterized in that the method comprises: 分别获取行人样本和非行人样本;Obtain pedestrian samples and non-pedestrian samples respectively; 通过K-奇异值分解K-SVD算法将所述行人样本训练为行人样本字典;The pedestrian sample is trained as a pedestrian sample dictionary by K-singular value decomposition K-SVD algorithm; 通过所述K-SVD算法将所述非行人样本训练为非行人样本字典;Using the K-SVD algorithm to train the non-pedestrian samples into a dictionary of non-pedestrian samples; 获取待测样本在所述行人样本字典中的残留误差,所述待测样本为需要进行行人检测的样本;Acquiring the residual error of the sample to be tested in the pedestrian sample dictionary, the sample to be tested is a sample that needs to be detected by pedestrians; 获取所述待测样本在所述非行人样本字典中的残留误差;Obtain the residual error of the sample to be tested in the dictionary of non-pedestrian samples; 当所述待测样本在所述行人样本字典中的残留误差小于所述待测样本在所述非行人样本字典中的残留误差时,确定所述待测样本中包含有行人;When the residual error of the sample to be tested in the pedestrian sample dictionary is smaller than the residual error of the sample to be tested in the non-pedestrian sample dictionary, it is determined that the sample to be tested contains a pedestrian; 所述通过K-奇异值分解K-SVD算法将所述行人样本训练为行人样本字典,包括:The pedestrian sample is trained as a pedestrian sample dictionary by the K-singular value decomposition K-SVD algorithm, including: 将所述行人样本转化为行人边缘特征样本;Converting the pedestrian samples into pedestrian edge feature samples; 通过所述K-SVD算法将所述行人边缘特征样本训练为行人样本字典;The pedestrian edge feature sample is trained as a pedestrian sample dictionary by the K-SVD algorithm; 所述通过所述K-SVD算法将所述非行人样本训练为非行人样本字典,包括:Said training said non-pedestrian sample as a non-pedestrian sample dictionary through said K-SVD algorithm includes: 将所述非行人样本转化为非行人边缘特征样本;Converting the non-pedestrian samples into non-pedestrian edge feature samples; 通过所述K-SVD算法将所述非行人边缘特征样本训练为非行人样本字典;The non-pedestrian edge feature sample is trained as a non-pedestrian sample dictionary by the K-SVD algorithm; 所述通过所述K-SVD算法将所述行人边缘特征样本训练为行人样本字典,包括:The described pedestrian edge feature sample is trained as a pedestrian sample dictionary through the K-SVD algorithm, including: 通过求解训练方程将所述行人边缘特征样本训练为行人样本字典;By solving the training equation, the pedestrian edge feature sample is trained as a pedestrian sample dictionary; 所述通过所述K-SVD算法将所述非行人边缘特征样本训练为非行人样本字典,包括:The non-pedestrian edge feature sample is trained as a non-pedestrian sample dictionary by the K-SVD algorithm, including: 通过求解训练方程将所述非行人边缘特征样本训练为非行人样本字典;By solving the training equation, the non-pedestrian edge feature sample is trained as a non-pedestrian sample dictionary; 其中,所述训练方程为:Wherein, the training equation is: <mrow> <msub> <mi>D</mi> <mi>i</mi> </msub> <mo>=</mo> <mi>arg</mi> <munder> <mrow> <mi>m</mi> <mi>i</mi> <mi>n</mi> </mrow> <msub> <mi>x</mi> <mi>j</mi> </msub> </munder> <mrow> <mo>(</mo> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>j</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>K</mi> </munderover> <mo>|</mo> <mo>|</mo> <msub> <mi>y</mi> <mrow> <mi>i</mi> <mi>j</mi> </mrow> </msub> <mo>-</mo> <msub> <mi>D</mi> <mi>i</mi> </msub> <msub> <mi>x</mi> <mi>j</mi> </msub> <mo>|</mo> <msubsup> <mo>|</mo> <mn>2</mn> <mn>2</mn> </msubsup> <mo>)</mo> </mrow> </mrow> <mrow><msub><mi>D</mi><mi>i</mi></msub><mo>=</mo><mi>arg</mi><munder><mrow><mi>m</mi><mi>i</mi><mi>n</mi></mrow><msub><mi>x</mi><mi>j</mi></msub></munder><mrow><mo>(</mo><munderover><mo>&amp;Sigma;</mo><mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mi>K</mi></munderover><mo>|</mo><mo>|</mo><msub><mi>y</mi><mrow><mi>i</mi><mi>j</mi></mrow></msub><mo>-</mo><msub><mi>D</mi><mi>i</mi></msub><msub><mi>x</mi><mi>j</mi></msub><mo>|</mo><msubsup><mo>|</mo><mn>2</mn><mn>2</mn></msubsup><mo>)</mo></mrow></mrow> 所述训练方程的约束条件为:其中Di表示字典,yij表示所述行人边缘特征样本或非行人边缘特征样本,i=0或1,i=0时Di表示非行人样本字典,yij表示非行人边缘特征样本,i=1时Di表示行人样本字典,yij表示行人边缘特征样本,xj表示稀疏编码,1≤j≤K且j为整数,L为稀疏度控制系数;The constraints of the training equation are: Where D i represents a dictionary, y ij represents the pedestrian edge feature sample or non-pedestrian edge feature sample, i=0 or 1, when i=0, D i represents the non-pedestrian sample dictionary, y ij represents the non-pedestrian edge feature sample, i =1, D i represents the pedestrian sample dictionary, y ij represents the pedestrian edge feature samples, x j represents sparse coding, 1≤j≤K and j is an integer, L is the sparsity control coefficient; 所述获取待测样本在所述行人样本字典中的残留误差,所述待测样本为需要进行行人检测的样本,包括:The acquisition of the residual error of the sample to be tested in the pedestrian sample dictionary, the sample to be tested is a sample that requires pedestrian detection, including: 通过求解稀疏编码方程得到所述待测样本在所述行人样本字典中的行人稀疏编码,所述待测样本为需要进行行人检测的样本;Obtaining the pedestrian sparse coding of the sample to be tested in the pedestrian sample dictionary by solving the sparse coding equation, the sample to be tested is a sample that requires pedestrian detection; 根据所述行人稀疏编码计算所述待测样本在所述行人样本字典中的残留误差;calculating the residual error of the sample to be tested in the pedestrian sample dictionary according to the pedestrian sparse coding; 所述获取所述待测样本在非行人样本字典中的残留误差,包括:The acquisition of the residual error of the sample to be tested in the non-pedestrian sample dictionary includes: 通过求解稀疏编码方程得到所述待测样本在所述非行人样本字典中的非行人稀疏编码;Obtaining the non-pedestrian sparse coding of the sample to be tested in the non-pedestrian sample dictionary by solving the sparse coding equation; 根据所述非行人稀疏编码计算所述待测样本在所述非行人样本字典中的残留误差;calculating the residual error of the sample to be tested in the non-pedestrian sample dictionary according to the non-pedestrian sparse coding; 其中,所述稀疏编码方程为:Wherein, the sparse coding equation is: xi=argmin||xi||0 x i =argmin||x i || 0 所述稀疏编码方程的约束条件为:Dixi=q,i=0或1;其中xi表示稀疏编码,Di表示字典,i=0时Di表示非行人样本字典,xi表示非行人稀疏编码,i=1时Di表示行人样本字典,xi表示行人稀疏编码,q表示待测样本的边缘特征样本。The constraints of the sparse coding equation are: D i x i =q, i=0 or 1; where xi represents sparse coding, D i represents a dictionary, when i=0, D i represents a dictionary of non-pedestrian samples, and xi represents For non-pedestrian sparse coding, when i=1, D i represents the pedestrian sample dictionary, x i represents the pedestrian sparse coding, and q represents the edge feature sample of the sample to be tested. 2.根据权利要求1所述的方法,其特征在于,2. The method of claim 1, wherein, 所述根据所述行人稀疏编码计算所述待测样本在所述行人样本字典中的残留误差,包括:The calculating the residual error of the sample to be tested in the pedestrian sample dictionary according to the pedestrian sparse coding includes: 通过求解残留误差方程获得所述待测样本在所述行人样本字典中的残留误差;Obtaining the residual error of the sample to be tested in the pedestrian sample dictionary by solving the residual error equation; 所述根据所述非行人稀疏编码计算所述待测样本在所述非行人样本字典中的残留误差,包括:The calculation of the residual error of the sample to be tested in the non-pedestrian sample dictionary according to the non-pedestrian sparse coding includes: 通过求解残留误差方程获得所述待测样本在所述非行人样本字典中的残留误差;Obtaining the residual error of the sample to be tested in the non-pedestrian sample dictionary by solving the residual error equation; 所述残留误差方程为:The residual error equation is: ri(y)=||q-Dixi||2 r i (y)=||qD i x i || 2 其中,ri(y)表示残留误差,i=0或1,i=0时ri(y)表示所述待测样本在所述非行人样本字典中的残留误差,i=1时ri(y)表示所述待测样本在所述行人样本字典中的残留误差。Among them, r i (y) represents the residual error, i=0 or 1, when i=0, r i (y) represents the residual error of the sample to be tested in the non-pedestrian sample dictionary, and when i=1, r i (y) represents the residual error of the test sample in the pedestrian sample dictionary. 3.一种行人检测装置,其特征在于,所述装置包括:3. A pedestrian detection device, characterized in that the device comprises: 样本获取模块,用于分别获取行人样本和非行人样本;The sample acquisition module is used to obtain pedestrian samples and non-pedestrian samples respectively; 行人字典模块,用于通过K-奇异值分解K-SVD算法将所述行人样本训练为行人样本字典,所述行人字典模块,包括:The pedestrian dictionary module is used to train the pedestrian sample as a pedestrian sample dictionary through the K-singular value decomposition K-SVD algorithm, and the pedestrian dictionary module includes: 行人特征单元,用于将所述行人样本转化为行人边缘特征样本;A pedestrian feature unit, configured to convert the pedestrian sample into a pedestrian edge feature sample; 行人训练单元,用于通过所述K-SVD算法将所述行人边缘特征样本训练为行人样本字典;A pedestrian training unit, configured to train the pedestrian edge feature samples as a pedestrian sample dictionary through the K-SVD algorithm; 非行人字典模块,用于通过所述K-SVD算法将所述非行人样本训练为非行人样本字典,所述非行人字典模块,包括:The non-pedestrian dictionary module is used to train the non-pedestrian sample into a non-pedestrian sample dictionary by the K-SVD algorithm, and the non-pedestrian dictionary module includes: 非行人特征单元,用于将所述非行人样本转化为非行人边缘特征样本;A non-pedestrian feature unit, configured to convert the non-pedestrian sample into a non-pedestrian edge feature sample; 非行人训练单元,用于通过所述K-SVD算法将所述非行人边缘特征样本训练为非行人样本字典;A non-pedestrian training unit, configured to train the non-pedestrian edge feature samples as a non-pedestrian sample dictionary through the K-SVD algorithm; 行人误差模块,用于获取待测样本在所述行人样本字典中的残留误差,所述待测样本为需要进行行人检测的样本;Pedestrian error module, used to obtain the residual error of the sample to be tested in the pedestrian sample dictionary, the sample to be tested is a sample that needs to be detected by pedestrians; 非行人误差模块,用于获取所述待测样本在所述非行人样本字典中的残留误差;A non-pedestrian error module, configured to obtain the residual error of the sample to be tested in the non-pedestrian sample dictionary; 行人确定模块,用于当所述待测样本在所述行人样本字典中的残留误差小于所述待测样本在所述非行人样本字典中的残留误差时,确定所述待测样本中包含有行人;a pedestrian determination module, configured to determine that the sample to be tested contains pedestrian; 所述行人训练单元,具体用于通过求解训练方程将所述行人边缘特征样本训练为行人样本字典;The pedestrian training unit is specifically configured to train the pedestrian edge feature samples into a pedestrian sample dictionary by solving a training equation; 所述非行人训练单元,具体用于通过求解训练方程将所述非行人边缘特征样本训练为非行人样本字典;The non-pedestrian training unit is specifically used to train the non-pedestrian edge feature samples into a non-pedestrian sample dictionary by solving a training equation; 其中,所述训练方程为:Wherein, the training equation is: <mrow> <msub> <mi>D</mi> <mi>i</mi> </msub> <mo>=</mo> <mi>arg</mi> <munder> <mrow> <mi>m</mi> <mi>i</mi> <mi>n</mi> </mrow> <msub> <mi>x</mi> <mi>j</mi> </msub> </munder> <mrow> <mo>(</mo> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>j</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>K</mi> </munderover> <mo>|</mo> <mo>|</mo> <msub> <mi>y</mi> <mrow> <mi>i</mi> <mi>j</mi> </mrow> </msub> <mo>-</mo> <msub> <mi>D</mi> <mi>i</mi> </msub> <msub> <mi>x</mi> <mi>j</mi> </msub> <mo>|</mo> <msubsup> <mo>|</mo> <mn>2</mn> <mn>2</mn> </msubsup> <mo>)</mo> </mrow> </mrow> <mrow><msub><mi>D</mi><mi>i</mi></msub><mo>=</mo><mi>arg</mi><munder><mrow><mi>m</mi><mi>i</mi><mi>n</mi></mrow><msub><mi>x</mi><mi>j</mi></msub></munder><mrow><mo>(</mo><munderover><mo>&amp;Sigma;</mo><mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mi>K</mi></munderover><mo>|</mo><mo>|</mo><msub><mi>y</mi><mrow><mi>i</mi><mi>j</mi></mrow></msub><mo>-</mo><msub><mi>D</mi><mi>i</mi></msub><msub><mi>x</mi><mi>j</mi></msub><mo>|</mo><msubsup><mo>|</mo><mn>2</mn><mn>2</mn></msubsup><mo>)</mo></mrow></mrow> 所述训练方程的约束条件为:其中Di表示字典,yij表示所述行人边缘特征样本或非行人边缘特征样本,i=0或1,i=0时Di表示非行人样本字典,yij表示非行人边缘特征样本,i=1时Di表示行人样本字典,yij表示行人边缘特征样本,xj表示稀疏编码,1≤j≤K且j为整数,L为稀疏度控制系数;The constraints of the training equation are: Where D i represents a dictionary, y ij represents the pedestrian edge feature sample or non-pedestrian edge feature sample, i=0 or 1, when i=0, D i represents the non-pedestrian sample dictionary, y ij represents the non-pedestrian edge feature sample, i =1, D i represents the pedestrian sample dictionary, y ij represents the pedestrian edge feature samples, x j represents sparse coding, 1≤j≤K and j is an integer, L is the sparsity control coefficient; 所述行人误差模块,包括:The pedestrian error module includes: 行人编码单元,用于通过求解稀疏编码方程得到所述待测样本在所述行人样本字典中的行人稀疏编码,所述待测样本为需要进行行人检测的样本;a pedestrian encoding unit, configured to obtain the pedestrian sparse encoding of the sample to be tested in the pedestrian sample dictionary by solving a sparse encoding equation, and the sample to be tested is a sample that requires pedestrian detection; 行人误差单元,用于根据所述行人稀疏编码计算所述待测样本在所述行人样本字典中的残留误差;a pedestrian error unit, configured to calculate the residual error of the sample to be tested in the pedestrian sample dictionary according to the pedestrian sparse coding; 所述非行人误差模块,包括:The non-pedestrian error module includes: 非行人编码单元,用于通过求解稀疏编码方程得到所述待测样本在所述非行人样本字典中的非行人稀疏编码;A non-pedestrian encoding unit, configured to obtain the non-pedestrian sparse encoding of the sample to be tested in the non-pedestrian sample dictionary by solving a sparse encoding equation; 非行人误差单元,用于根据所述非行人稀疏编码计算所述待测样本在所述非行人样本字典中的残留误差;A non-pedestrian error unit, configured to calculate the residual error of the sample to be tested in the non-pedestrian sample dictionary according to the non-pedestrian sparse coding; 其中,所述稀疏编码方程为:Wherein, the sparse coding equation is: xi=argmin||xi||0 x i =argmin||x i || 0 所述稀疏编码方程的约束条件为:Dixi=q,i=0或1;其中xi表示稀疏编码,Di表示字典,i=0时Di表示非行人样本字典,xi表示非行人稀疏编码,i=1时Di表示行人样本字典,xi表示行人稀疏编码,q表示待测样本的边缘特征样本。The constraints of the sparse coding equation are: D i x i =q, i=0 or 1; where xi represents sparse coding, D i represents a dictionary, when i=0, D i represents a dictionary of non-pedestrian samples, and xi represents For non-pedestrian sparse coding, when i=1, D i represents the pedestrian sample dictionary, x i represents the pedestrian sparse coding, and q represents the edge feature sample of the sample to be tested. 4.根据权利要求3所述的装置,其特征在于,4. The device of claim 3, wherein: 所述行人误差单元,具体用于通过求解残留误差方程获得所述待测样本在所述行人样本字典中的残留误差;The pedestrian error unit is specifically used to obtain the residual error of the sample to be tested in the pedestrian sample dictionary by solving a residual error equation; 所述非行人误差单元,具体用于通过求解残留误差方程获得所述待测样本在所述非行人样本字典中的残留误差;The non-pedestrian error unit is specifically used to obtain the residual error of the sample to be tested in the non-pedestrian sample dictionary by solving a residual error equation; 所述残留误差方程为:The residual error equation is: ri(y)=||q-Dixi||2 r i (y)=||qD i x i || 2 其中,ri(y)表示残留误差,i=0或1,i=0时ri(y)表示所述待测样本在所述非行人样本字典中的残留误差,i=1时ri(y)表示所述待测样本在所述行人样本字典中的残留误差。Among them, r i (y) represents the residual error, i=0 or 1, when i=0, r i (y) represents the residual error of the sample to be tested in the non-pedestrian sample dictionary, and when i=1, r i (y) represents the residual error of the test sample in the pedestrian sample dictionary.
CN201410431439.XA 2014-08-28 2014-08-28 pedestrian detection method and device Active CN104268503B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410431439.XA CN104268503B (en) 2014-08-28 2014-08-28 pedestrian detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410431439.XA CN104268503B (en) 2014-08-28 2014-08-28 pedestrian detection method and device

Publications (2)

Publication Number Publication Date
CN104268503A CN104268503A (en) 2015-01-07
CN104268503B true CN104268503B (en) 2018-03-16

Family

ID=52160023

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410431439.XA Active CN104268503B (en) 2014-08-28 2014-08-28 pedestrian detection method and device

Country Status (1)

Country Link
CN (1) CN104268503B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740422B (en) * 2016-01-29 2019-10-29 北京大学 Pedestrian retrieval method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7362881B2 (en) * 1999-09-09 2008-04-22 Kabushiki Kaisha Toshiba Obstacle detection system and method therefor
CN102750533A (en) * 2012-07-05 2012-10-24 重庆大学 Infrared small and weak target detection method based on morphological component sparse representation
CN103218610A (en) * 2013-04-28 2013-07-24 宁波江丰生物信息技术有限公司 Formation method of dogface detector and dogface detection method
CN103440502A (en) * 2013-09-06 2013-12-11 重庆大学 Infrared small-target detection method based on mixing Gauss and sparse representation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509120B (en) * 2011-11-04 2013-09-25 西安电子科技大学 Supervised image segmentation method for hyperspectral image based migration dictionary learning

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7362881B2 (en) * 1999-09-09 2008-04-22 Kabushiki Kaisha Toshiba Obstacle detection system and method therefor
CN102750533A (en) * 2012-07-05 2012-10-24 重庆大学 Infrared small and weak target detection method based on morphological component sparse representation
CN103218610A (en) * 2013-04-28 2013-07-24 宁波江丰生物信息技术有限公司 Formation method of dogface detector and dogface detection method
CN103440502A (en) * 2013-09-06 2013-12-11 重庆大学 Infrared small-target detection method based on mixing Gauss and sparse representation

Also Published As

Publication number Publication date
CN104268503A (en) 2015-01-07

Similar Documents

Publication Publication Date Title
CN104915649B (en) A kind of biopsy method applied to recognition of face
US8917907B2 (en) Continuous linear dynamic systems
Singh et al. Muhavi: A multicamera human action video dataset for the evaluation of action recognition methods
US9665804B2 (en) Systems and methods for tracking an object
US10929676B2 (en) Video recognition using multiple modalities
US9514363B2 (en) Eye gaze driven spatio-temporal action localization
CN104615986B (en) The method that pedestrian detection is carried out to the video image of scene changes using multi-detector
Liu et al. CollabAR: Edge-assisted collaborative image recognition for mobile augmented reality
CN110674688A (en) Method, system and medium for obtaining face recognition model for video surveillance scene
CN102819733B (en) Rapid detection fuzzy method of face in street view image
CN108229280A (en) Time domain motion detection method and system, electronic equipment, computer storage media
US20150104062A1 (en) Probabilistic neural network based moving object detection method and an apparatus using the same
CN103971386A (en) Method for foreground detection in dynamic background scenario
CN113269722A (en) Training method for generating countermeasure network and high-resolution image reconstruction method
CN103489174A (en) Human face super-resolution method based on residual keeping
WO2019228450A1 (en) Image processing method, device, and equipment, and readable medium
CN108229494B (en) Network training method, processing method, device, storage medium and electronic equipment
CN111444803A (en) Image processing method, image processing device, electronic equipment and storage medium
CN113243015A (en) Video monitoring system and method
CN106447695A (en) Method and device for judging same object in multi-object tracking
CN112926552A (en) Remote sensing image vehicle target recognition model and method based on deep neural network
CN104504715A (en) Image segmentation method based on local quaternion-moment characteristic
CN104268503B (en) pedestrian detection method and device
CN104182931B (en) Super resolution method and device
CN107665325B (en) Video abnormal event detection method and system based on atomic feature bag model

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

Effective date of registration: 20220216

Address after: 241006 Anshan South Road, Wuhu Economic and Technological Development Zone, Anhui Province

Patentee after: Wuhu Sambalion auto technology Co.,Ltd.

Address before: 241006 Changchun Road, Wuhu economic and Technological Development Zone, Wuhu, Anhui, 8

Patentee before: CHERY AUTOMOBILE Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240426

Address after: 241000 10th Floor, Block B1, Wanjiang Wealth Plaza, Guandou Street, Jiujiang District, Wuhu City, Anhui Province

Patentee after: Dazhuo Intelligent Technology Co.,Ltd.

Country or region after: China

Patentee after: Dazhuo Quxing Intelligent Technology (Shanghai) Co.,Ltd.

Address before: 241006 Anshan South Road, Wuhu Economic and Technological Development Zone, Anhui Province

Patentee before: Wuhu Sambalion auto technology Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20251121

Address after: 241009 Wuhu economic and Technological Development Zone, Anhui, No. 8 Changchun Road

Patentee after: CHERY AUTOMOBILE Co.,Ltd.

Country or region after: China

Address before: 241000 10th Floor, Block B1, Wanjiang Wealth Plaza, Guandou Street, Jiujiang District, Wuhu City, Anhui Province

Patentee before: Dazhuo Intelligent Technology Co.,Ltd.

Country or region before: China

Patentee before: Dazhuo Quxing Intelligent Technology (Shanghai) Co.,Ltd.

TR01 Transfer of patent right