CN102855501B - A kind of multi-direction subject image recognition methods - Google Patents

A kind of multi-direction subject image recognition methods Download PDF

Info

Publication number
CN102855501B
CN102855501B CN201210262982.2A CN201210262982A CN102855501B CN 102855501 B CN102855501 B CN 102855501B CN 201210262982 A CN201210262982 A CN 201210262982A CN 102855501 B CN102855501 B CN 102855501B
Authority
CN
China
Prior art keywords
image
haar
characteristic sequence
rectangle
detected
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
CN201210262982.2A
Other languages
Chinese (zh)
Other versions
CN102855501A (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.)
Beijing Ruian Technology Co Ltd
Original Assignee
Beijing Ruian Technology 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 Beijing Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN201210262982.2A priority Critical patent/CN102855501B/en
Publication of CN102855501A publication Critical patent/CN102855501A/en
Application granted granted Critical
Publication of CN102855501B publication Critical patent/CN102855501B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of multi-direction subject image recognition methods, belong to computer intelligence identification field.This method is: the one direction haar characteristic sequence 1) reading in image to be detected and trained, and characteristic sequence is rotated to be the characteristic sequence of some direction initializations; 2) image to be detected is set to gray level image, then histogram equalization is carried out to this gray level image; 3) image to be detected after equalization is carried out pixel integration, form integral image; 4) treat detected image and carry out proportional zoom, then calculate the characteristic sequence of each direction initialization and the eigenwert of integral image; 5) monitor window to slide in the picture, whether the eigenwert according to calculating mates at each direction initialization judging characteristic successively; If the match is successful, the scope of the monitoring window of output matching, if all it fails to match for all direction initializations, then detects recognition failures.The present invention only needs training once, just can identify multiple directions picture, substantially increase recognition efficiency.

Description

A kind of multi-direction subject image recognition methods
Technical field
The present invention relates to computer intelligence identification field, particularly relate to a kind of multi-direction subject image recognition methods.
Background technology
Current computer intelligence identification field object identification has a lot of method.Its accuracy and speed all reaches the degree of practical application.
A kind of wherein relatively more outstanding method carries out object identification by haar feature exactly.Employ the reduced form of haar feature in this approach very cleverly, and by using integral image to calculate the pixel integration value of rectangle to be detected, the calculating just can carrying out haar feature according to rectangular characteristic reaches the object of recognition object.
Haar simplifies feature
Haar simplifies feature and sees it is a kind of pixel comparison information based on rectangle intuitively.First proposed by people such as PaulViola, its effect be exactly use pixel in rectangle zoning and, the area pixel that pixel color is dark and value can be lower; The area pixel that pixel color is shallow and value can be higher.As the definition of Haar_x3 feature in Fig. 1, the region meeting this feature must be the region that centre has color darker, and the region on both sides is more shallow.As Haar_y2 feature in Fig. 1, the region meeting its feature must be that upper area color is more shallow, and bottom color is darker.The description of certainly complete haar feature, must also have the position of area coordinate, the description of area size, also have field color and comparison threshold value.
The position of area coordinate be training and identify time the detection window that determines in relative position, and to monitor window be can carry out sliding with convergent-divergent according to different scale in the zones of different of mapping to be checked.
Specific in practical application, the description of this type of haar feature is also determined by describing three parts, mainly comprises the coordinate of upper left angle point, peak width, also has contrast degree threshold value.
Its eigenwert can be formulated as
feature j = Σ i ∈ ( 1,2 ) ω i RectSum ( r i )
Wherein: feature jrepresent the eigenwert of jth kind Haar block; ω ithe weights of a jth Haar block i-th sub-rectangle (black rectangle or white rectangle); RectSum (r i) represent the pixel value sum of all picture elements comprised in i-th Haar block, the weights ratio (ω in the eigenwert of different Haar block feature prototypes 1: ω 2) progressively can determine in training, a kind of method arranging initial value is exactly carry out arranging (characteristic results calculate after close to 0) according to the inverse ratio of area.If feature value result of calculation in image rectangular area is close to 0 (being less than a threshold value) during follow-up judgement, think that this rectangular area meets feature.
In order to calculate RectSum (r fast i), adopt integrogram method.Each pixel gray level of the method definition piece image is i (x, y), and each pixel value ii (x, y) in the integrogram of so this width image is expressed as:
ii ( x , y ) = &Sigma; x &prime; < x , y &prime; < y i ( x &prime; , y &prime; )
For the integration map values of piece image in arbitrfary point, integral domain be upper left angle point to the rectangular pixels integrated value being the lower right corner with this, can by obtaining the circulation that accumulates once of row and column
s(x,y)=s(x,y-1)+i(x,y)
ii(x,y)=ii(x-1,y)+s(x,y)
Wherein, the row integrated value that s (x, y) is point (x, y) position, but the value not comprising that (x, y) put.
S (x ,-1)=0, ii (-1, y)=0 when iteration is initial.The integration map values of Fig. 2 (a) mid point (x, y) is the pixel gray value summation of grey rectangular area.Integrogram is utilized to sue for peace, as shown in Fig. 2 (b) to the gray-scale value in any one rectangle in image easily.
Identifying
First identifying requires the picture (direction is relatively consistent for preferably this object to be identified position in picture, shape) of a large amount of objects to be identified, is called positive sample.Also need the picture of a large amount of not this object in addition, be called negative sample.
Use above sample training, training process utilizes haar feature to use adaboost method through a large amount of circulation, uses mass data training.Finally obtain the sequence of the Haar feature that can represent object to be identified.Can ensure that the discrimination that object to be detected needs according to user and false drop rate are identified by the sequence of these features.
There are this data just can detect the picture to be detected of arbitrary content.
Testing process:
At present, in some software projects of increasing income, realization is had.It roughly uses flow process as follows:
1. read in image to be detected
2. read in the haar characteristic sequence (one direction) trained
3. pair picture to be detected is changed to gray level image
4. pair picture to be detected carries out histogram equalization
5. pair picture to be detected carries out pixel integration, and forms integral image
6. pair picture to be detected carries out proportional zoom
7. carry out eigenwert calculating in conjunction with haar characteristic sequence and integral image.
8. carry out window sliding in the picture, and whether judging characteristic mates.
If 9. mated, detect and return successfully, do not mate, detect and return failure
10. export the window ranges of monitoring coupling
Current computer intelligence identification field has a lot of algorithm all to support object identification.Discrimination also reaches higher level.But also having a lot of problem in the process of object identification, is exactly a larger problem for the identification of object after rotation.Such as the most frequently used method for detecting human face.Detection for upright face often all can reach the accuracy rate of more than 90%.But in the uncertain situation of the shooting angle of some image.Face is once rotate change.The sorter trained just can not adapt to new change, and the postrotational face of None-identified.In this model of cognition, the feature of often training is the feature so identified in what direction is also any direction.If need to detect different directions, need to detect again after picture integral-rotation.
Summary of the invention
The recognition methods that the present invention is directed to above-mentioned prior art only can carry out the defect of one direction detection, develops a kind of multi-direction object identification method newly, can carry out the object identification in 4 directions on the basis of original unidirectional training characteristics sequence.
Technical scheme of the present invention is: a kind of multi-direction object identification method, comprises the steps:
1. read in image to be detected;
2. read in the one direction haar characteristic sequence trained;
3. image to be detected is set to gray level image;
4. gray level image to be detected is carried out histogram equalization;
5. the image to be detected after equalization is carried out pixel integration, form integral image;
6. treat detected image and carry out proportional zoom;
7. one direction haar characteristic sequence is rotated to be the characteristic sequence (such as becoming the characteristic sequence of the four direction of 90 degree of multiples with training direction) of some direction initializations;
8. the eigenwert of each direction initialization is calculated according to the haar characteristic sequence of each direction initialization and integral image;
9. monitor window to slide in the picture, whether mate at each direction initialization judging characteristic;
If 10. have characteristic matching on any direction of direction initialization, then the scope of the monitoring window of output matching.
Described haar characteristic sequence is characteristic rectangle sequence, each eigenmatrix upper left corner horizontal ordinate of this rectangle, upper left corner ordinate, and rectangle is wide, and rectangle is high to be represented.
The computing method of described eigenwert are:
feature j = &Sigma; i &Element; ( 1,2 ) &omega; i RectSum ( r i )
Wherein: feature jrepresent the eigenwert of jth kind Haar block; ω ithe weights of jth Haar block i-th sub-rectangle; RectSum (r i) represent the pixel value sum of all picture elements comprised in i-th Haar block.
Described sub-rectangle is white or black rectangle.
Described characteristic sequence one direction haar characteristic sequence being rotated to be four direction, its method is:
1) one direction haar characteristic sequence is copied as four parts;
2) four parts of haar characteristic sequences are rotated 0 degree, 90 degree, 180 degree and 270 degree by same direction respectively, obtain the haar characteristic sequence of four direction.
It is on the basis of one direction object identification system that the present invention realizes, and carries out 4 direction discernment improvement.In most of the cases.Use shape to fix the unidirectional object features in front for object identification training process General Requirements to train, final identification is also identify for the unidirectional object in front.The accuracy rate of identification can be maximized like this, and minimize the error rate of identification.But the shortcoming done so is but the narrow scope that fixedly result in identifiable design result of sample, once there is the problem of picture rotation, will have no idea to identify.The present invention solves above problem to a certain extent.Rotated by 90 degree of intervals of haar rectangular characteristic.Only needing to carry out the unidirectional training in front just can its training result of use of four times of efficiency, and can solve the identification problem of four direction in the flow process once identified, the differentiation angular interval of algorithm identification have also been enlarged four times.As original algorithm can only support the identification of direct picture, but can the picture of positive and negative 90 degree of camera shooting or handstand picture one-off recognition by the method; Original identification angle only covers positive and negative 15 degree, and so this method just can expand theoretic positive and negative 60 degree to.And the method minimizes the treatment step outside identifying, improve the efficiency of computing.
Reason has several as follows:
1. feature itself is based on the shape of rectangle, easily carries out the rotation of 90 degree.Postrotational feature remains rectangle.Characteristic sequence is not changed.
2. the calculating of integral image, as long as feature itself is rectangle, just can recalculates integral image and directly carry out the calculating of haar feature.
3., when not changing rectangle size in rotation, the characteristic threshold value of corresponding moving window is constant.
4. when whole piece haar characteristic sequence all carry out same angle (multiples of 90 degree) rotate.The detectability of characteristic sequence is constant.
Spinning solution wherein for characteristic rectangle is as follows:
If the rectangle after transforming is r [k]; Rectangle before conversion is reck [k]; A kth rectangle in k representative feature.Window_height and window_width respectively representative feature rely on the Gao Yukuan of window.R [k] .x, r [k] .y, r [k] .width, r [k] .heigh is respectively the upper left corner horizontal ordinate of rectangle, upper left corner ordinate, and rectangle is wide, and rectangle is high.The expression of reck [k] is the same with r [k].
But after carefully studying, find that Haar feature itself exists spinning solution easily.
In conjunction with Haar feature and the thinking to its rotation, only needing the simple change of feature being carried out to following four direction when judging, both can obtain the judged result of four direction.
Feature rotates 0 degree
r[k]=rect[k]
Be initial point with picture centre, dextrorotation turn 90 degrees,
r[k].x=window_height-rect[k].y-rect[k].height;
r[k].y=window_width-rect[k].x-rect[k].width;
r[k].width=rect[k].height;
r[k].height=rect[k].width;
Take picture centre as initial point, dextrorotation turnback
r[k].x=window.width-rect[k].x-rect[k].width;
r[k].y=window.height-rect[k].y-rect[k].height;
r[k].width=rect[k].width;
r[k].height=rect[k].height;
Be initial point with picture centre, turn clockwise 270 degree
r[k].x=rect[k].y;
r[k].y=rect[k].x;
r[k].width=rect[k].height;
r[k].height=rect[k].width。
Compared with prior art, good effect of the present invention is:
The present invention only needs training once, just can be high efficiency for handstand, and the picture of 90-degree rotation and 270 degree identifies.In daily life, and the maximum rotation of picture is also the rotation carrying out 90 degree 180 degree and 270 degree.Therefore the invention solves above problem.
Accompanying drawing explanation
Fig. 1 is that haar simplifies characterizing definition figure;
(a) Haar_x3 feature legend, (b) Haar_y2 feature legend,
(c) central point feature legend, (d) inclination central point feature legend;
Fig. 2 is integral image schematic diagram;
(a) pixel integration surface area (from the image upper left corner) arbitrarily representated by point dot image;
B in () any rectangular area, pixel integration is obtained by the plus-minus that rectangle four dot product score values are long-pending;
Fig. 3 is the inventive method process flow diagram.
Embodiment
Be illustrated in figure 3 a kind of multi-direction object identification method of the present invention, comprise the steps:
1, image to be detected is read in;
2, the one direction haar characteristic sequence trained is read in;
Haar characteristic sequence is characteristic rectangle sequence, each eigenmatrix upper left corner horizontal ordinate of this rectangle, upper left corner ordinate, and rectangle is wide, and rectangle is high to be represented.
3, image to be detected is set to gray level image;
4, gray level image to be detected is carried out histogram equalization;
5, the image to be detected after equalization is carried out pixel integration, form integral image;
6, one direction haar characteristic sequence is rotated to be the characteristic sequence of four direction;
One direction haar characteristic sequence is copied as four parts;
Four parts of haar characteristic sequences are rotated 0 degree, 90 degree, 180 degree and 270 degree by same direction respectively, obtains the haar characteristic sequence of four direction.
7, eigenwert calculating is carried out in conjunction with haar characteristic sequence and integral image.(calculating the eigenwert of four direction)
The computing method of eigenwert are:
feature j = &Sigma; i &Element; ( 1,2 ) &omega; i RectSum ( r i )
Wherein: feature jrepresent the eigenwert of jth kind Haar block; ω ithe weights of jth Haar block i-th sub-rectangle; RectSum (r i) represent the pixel value sum of all picture elements comprised in i-th Haar block.Sub-rectangle is white or black rectangle.
8, monitor window slides in image to be detected (size variation, from feature permission minimum window as the size being no more than image itself maximum 2 pixels.Position is moved, and moves to the lower right corner of image from the upper left corner of image always), whether mate at four direction judging characteristic;
If 9 have a direction coupling, detect and return successfully, and the scope of the monitoring window of output matching.Four direction does not mate, and detects and returns failure.

Claims (5)

1. a multi-direction subject image recognition methods, the steps include:
1) image to be detected is read in; Read in the one direction haar characteristic sequence trained, and one direction haar characteristic sequence is rotated to be the characteristic sequence of some direction initializations; The acquisition methods of the characteristic sequence of direction initialization is: first one direction haar characteristic sequence is copied as four parts; Then four parts of haar characteristic sequences are rotated 0 degree, 90 degree, 180 degree and 270 degree by same direction respectively, obtain the haar characteristic sequence of four direction;
2) image to be detected is set to gray level image, then histogram equalization is carried out to this gray level image;
3) image to be detected after equalization is carried out pixel integration, form integral image;
4) treat detected image and carry out proportional zoom, then calculate the haar characteristic sequence of each direction initialization and the eigenwert of integral image;
5) monitor window to slide in the picture, whether the eigenwert according to calculating mates at each direction initialization judging characteristic successively; If characteristic matching on certain direction initialization, then the match is successful and the scope of the monitoring window of output matching, if all it fails to match for all direction initializations, then detects recognition failures.
2. the method for claim 1, is characterized in that turn clockwise haar characteristic sequence with testing image center for initial point.
3. method as claimed in claim 1 or 2, it is characterized in that described haar characteristic sequence is characteristic rectangle sequence, each eigenmatrix upper left corner horizontal ordinate of this rectangle, upper left corner ordinate, rectangle is wide, and rectangle is high to be represented.
4. method as claimed in claim 3, is characterized in that the computing formula of described eigenwert feature is:
wherein, feature jrepresent the eigenwert of jth kind Haar block, ω ithe weights of jth Haar block i-th sub-rectangle, RectSum (r i) represent the pixel value sum of all picture elements comprised in i-th Haar block.
5. method as claimed in claim 4, its feature is white or black rectangle at described sub-rectangle.
CN201210262982.2A 2012-07-26 2012-07-26 A kind of multi-direction subject image recognition methods Active CN102855501B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210262982.2A CN102855501B (en) 2012-07-26 2012-07-26 A kind of multi-direction subject image recognition methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210262982.2A CN102855501B (en) 2012-07-26 2012-07-26 A kind of multi-direction subject image recognition methods

Publications (2)

Publication Number Publication Date
CN102855501A CN102855501A (en) 2013-01-02
CN102855501B true CN102855501B (en) 2015-12-02

Family

ID=47402077

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210262982.2A Active CN102855501B (en) 2012-07-26 2012-07-26 A kind of multi-direction subject image recognition methods

Country Status (1)

Country Link
CN (1) CN102855501B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636749A (en) * 2013-11-14 2015-05-20 中国移动通信集团公司 Target object detection method and device
WO2018201441A1 (en) * 2017-05-05 2018-11-08 Beijing Didi Infinity Technology And Development Co., Ltd. System and method for image re-orientation
CN110223263B (en) * 2019-04-23 2021-07-13 上海上湖信息技术有限公司 Imaging direction detection method and device and readable storage medium
CN112907510B (en) * 2021-01-15 2023-07-07 中国人民解放军国防科技大学 Surface defect detection method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101546375A (en) * 2009-04-30 2009-09-30 上海交通大学 Face detection method with characteristic reduction
CN101697199A (en) * 2009-08-11 2010-04-21 北京盈科成章科技有限公司 Detection method of head-face gesture and disabled assisting system using same to manipulate computer

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101546375A (en) * 2009-04-30 2009-09-30 上海交通大学 Face detection method with characteristic reduction
CN101697199A (en) * 2009-08-11 2010-04-21 北京盈科成章科技有限公司 Detection method of head-face gesture and disabled assisting system using same to manipulate computer

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《基于及其视觉的图像采集与处理系统研究》;张杰;《中国优秀硕士学位论文全文数据库》;20060401 *

Also Published As

Publication number Publication date
CN102855501A (en) 2013-01-02

Similar Documents

Publication Publication Date Title
Oh et al. Approaching the computational color constancy as a classification problem through deep learning
CN110348319B (en) Face anti-counterfeiting method based on face depth information and edge image fusion
Faraji et al. Face recognition under varying illuminations using logarithmic fractal dimension-based complete eight local directional patterns
Li et al. Robust and accurate iris segmentation in very noisy iris images
CN101576953B (en) Classification method and device of human body posture
CN104778453B (en) A kind of night pedestrian detection method based on infrared pedestrian&#39;s brightness statistics feature
CN110619628B (en) Face image quality assessment method
Lu et al. Face detection and recognition algorithm in digital image based on computer vision sensor
CN111695522B (en) In-plane rotation invariant face detection method and device and storage medium
CN110490158B (en) Robust face alignment method based on multistage model
CN105913040A (en) Real time double cameras provided pedestrian detection system for use under scotopic vision conditions
CN109255375A (en) Panoramic picture method for checking object based on deep learning
CN105335725A (en) Gait identification identity authentication method based on feature fusion
Rouhi et al. A review on feature extraction techniques in face recognition
CN106682678B (en) Image corner detection and classification method based on support domain
CN102855501B (en) A kind of multi-direction subject image recognition methods
Hsu et al. A novel eye center localization method for multiview faces
CN107886507A (en) A kind of salient region detecting method based on image background and locus
CN110633691A (en) Binocular in-vivo detection method based on visible light and near-infrared camera
CN110795975B (en) Face false detection optimization method and device
Faraji et al. Face recognition under varying illuminations with multi-scale gradient maximum response
CN110910497B (en) Method and system for realizing augmented reality map
CN111950452A (en) Face recognition method
Hewitt et al. Active learning in face recognition: Using tracking to build a face model
Zhang et al. Double-pupil location of face images

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A Method for Multidirectional Object Image Recognition

Effective date of registration: 20230807

Granted publication date: 20151202

Pledgee: Bank of China Limited Beijing Xicheng Branch

Pledgor: RUN TECHNOLOGIES Co.,Ltd. BEIJING

Registration number: Y2023980051158

PE01 Entry into force of the registration of the contract for pledge of patent right