CN102855501A - Multi-direction object image recognition method - Google Patents

Multi-direction object image recognition method Download PDF

Info

Publication number
CN102855501A
CN102855501A CN2012102629822A CN201210262982A CN102855501A CN 102855501 A CN102855501 A CN 102855501A CN 2012102629822 A CN2012102629822 A CN 2012102629822A CN 201210262982 A CN201210262982 A CN 201210262982A CN 102855501 A CN102855501 A CN 102855501A
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.)
Granted
Application number
CN2012102629822A
Other languages
Chinese (zh)
Other versions
CN102855501B (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

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a multi-direction object image recognition method and belongs to the field of intelligent computer recognition. The method comprises the following steps of: 1) reading an image to be detected and a trained unidirectional haar characteristic sequence, and rotating the characteristic sequence to form a characteristic sequence in a plurality of set directions; 2) setting the image to be detected as a grayscale image, and performing histogram equalization on the grayscale image; 3) performing pixel integration on the equalized image to be detected, and forming an integral image; 4) scaling the image to be detected, and calculating the characteristic sequence in each set direction and the characteristic value of the integral image; and 5) sliding a monitoring window in the image, and judging whether the calculated characteristic values are matched in each set direction, outputting a matched monitoring window range if the matching is successful, and detecting the recognition failure if the matching in all the set directions fails. According to the method, only once training is required, a multi-direction picture can be recognized, and the recognition efficiency is greatly improved.

Description

A kind of multi-direction subject image recognition methods
Technical field
The present invention relates to computer intelligence identification field, relate in particular to a kind of multi-direction subject image recognition methods.
Background technology
At present computer intelligence identification field object identification has a lot of methods.Its accuracy and speed has all reached the degree of practical application.
Wherein relatively more outstanding a kind of method is carried out object identification by the haar feature exactly.In this method, use very cleverly the reduced form of haar feature, and by using integral image to calculate the pixel integration value of rectangle to be detected, just can reach according to the calculating that rectangular characteristic is carried out the haar feature purpose of recognition object.
Haar simplifies feature
Haar simplifies feature and sees intuitively it is a kind of pixel comparison information based on rectangle.At first proposed by people such as Paul Viola, its effect be exactly use in the rectangle zoning pixel 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.Such as the definition of Haar_x3 feature among Fig. 1, there is the darker zone of color in the zone that meets this feature in the middle of must being, and the zone on both sides is more shallow.Such as Haar_y2 feature among Fig. 1, the zone that meets its feature must be that the upper area color is more shallow, and the 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 is the relative position in the detection window that determines in training and when identification, and the monitoring window is to slide with convergent-divergent according to different scale in the zones of different of mapping to be checked.
In practical application, the description of this type of haar feature also determines that by describing three parts mainly comprise the coordinate of upper left angle point, peak width contrasts the degree threshold value in addition.
Its eigenwert can be formulated as
feature j = Σ i ∈ ( 1,2 ) ω i RectSum ( r i )
Wherein: feature jRepresent the eigenwert of j kind Haar piece; ω iThe weights of j Haar piece i sub-rectangle (black rectangle or white rectangle); RectSum (r i) representing the pixel value sum of all picture elements that comprise in i the Haar piece, the weights in the eigenwert of different Haar block feature prototypes are than (ω 1: ω 2) can be in training determine progressively that a kind of method that initial value is set is exactly that inverse ratio according to area arranges (feature result calculate after near 0).If feature value result of calculation in image rectangular area is near 0 (less than a threshold value) then think that this rectangular area meets feature during follow-up judgement.
In order to calculate fast RectSum (r i), adopt the integrogram method.Each pixel gray scale of the method definition piece image is i (x, y), and each the pixel value ii (x, y) in the integrogram of this width of cloth image is expressed as so:
ii ( x , y ) = &Sigma; x &prime; < x , y &prime; < y i ( x &prime; , y &prime; )
For the integrogram value of piece image in the arbitrfary point, integral domain be upper left angle point to the rectangular pixels integrated value take this point as the lower right corner, can by to row and column accumulate once the circulation obtain
s(x,y)=s(x,y-1)+i(x,y)
ii(x,y)=ii(x-1,y)+s(x,y)
Wherein, s (x, y) is the row integrated value of point (x, y) position, but does not comprise the value of (x, y) point.
S when iteration is initial (x ,-1)=0, and ii (1, y)=0.The integrogram value of Fig. 2 (a) mid point (x, y) is the pixel gray-scale value summation in grey rectangle zone.Utilize integrogram to sue for peace to the gray-scale value in any one rectangle in the image easily, shown in Fig. 2 (b).
Identifying
Identifying at first requires the picture (preferably this object to be identified position in picture, shape, direction are relatively consistent) of a large amount of objects to be identified, is called positive sample.Also need in addition a large amount of not pictures of this object, be called negative sample.
Use above sample training, training process utilizes the haar feature to use the adaboost method through a large amount of circulations, uses the mass data training.Finally obtain to represent the sequence of the Haar feature of object to be identified.Sequence by these features can guarantee that object to be detected is identified according to discrimination and the false drop rate that the user needs.
There have been this data just can the picture to be detected of arbitrary content to be detected.
Testing process:
At present, realization has been arranged in the software project that some are increased income.It roughly uses flow process as follows:
1. read in image to be detected
2. read in the haar characteristic sequence (one direction) that has trained
3. picture to be detected is changed to gray level image
4. picture to be detected is carried out histogram equalization
5. picture to be detected is carried out pixel integration, and form integral image
6. picture to be detected is carried out proportional zoom
7. carry out eigenwert calculating in conjunction with haar characteristic sequence and integral image.
8. in image, carry out window sliding, and whether judging characteristic mates.
9. if coupling then detect and to return is not successfully mated then to detect and is returned failure
10. the window ranges of coupling is monitored in output
Present computer intelligence identification field has a lot of algorithms all to support object identification.Discrimination also reaches higher level.But a lot of problems are also arranged in the process of object identification, are exactly a larger problem for the identification of rotating rear object.Such as the most frequently used method for detecting human face.Often all can reach accuracy rate more than 90% for the detection of homo erectus's face.But in the uncertain situation of the shooting angle of some image.In a single day people's face rotates variation.The sorter that has trained just can not adapt to new variation, and the postrotational people's face of None-identified.In this model of cognition, often the feature of training is that what direction is so feature of identification of what direction also be.If needs detect different directions, need to be detecting again behind the picture integral-rotation.
Summary of the invention
The recognition methods that the present invention is directed to above-mentioned prior art only can be carried out the defective that one direction detects, and has developed a kind of new multi-direction object identification method, can carry out on the basis of original unidirectional training characteristics sequence the object identification of 4 directions.
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 that has trained;
3. image to be detected is made as gray level image;
4. gray level image to be detected is carried out histogram equalization;
5. the image to be detected after the 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 the characteristic sequence that becomes the four direction of 90 degree multiples with the training direction) of some direction initializations;
8. the eigenwert of calculating each direction initialization according to haar characteristic sequence and the integral image of each direction initialization;
9. whether the monitoring window slides in image, mate at each direction initialization judging characteristic;
10. if any direction at direction initialization has characteristic matching, the scope of the monitoring window of output matching then.
Described haar characteristic sequence is the characteristic rectangle sequence, and each eigenmatrix is with the upper left corner horizontal ordinate of this rectangle, upper left corner ordinate, and rectangle is wide, and the rectangle height represents.
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 j kind Haar piece; ω iThe weights of j Haar piece i sub-rectangle; RectSum (r i) represent the pixel value sum of all picture elements that comprise in i the Haar piece.
Described sub-rectangle is white or black rectangle.
Described one direction haar characteristic sequence is rotated to be the characteristic sequence of four direction, its method is:
1) one direction haar characteristic sequence is copied as four parts;
2) four parts of haar characteristic sequences are spent by same direction rotation 0 degree, 90 degree, 180 degree and 270 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, carries out the identification of 4 directions and improves.In most of the cases.Use the fixing positive unidirectional object features of shape to train for object identification training process General Requirements, final identification also is to identify for the unidirectional object in front.Can maximize the accuracy rate of identification like this, and minimize the error rate of identification.Narrow but but the shortcoming of doing so but is the scope that has fixedly caused recognition result of sample, in case the identification of will having no idea the problem of picture rotation appears.The present invention has solved above problem to a certain extent.90 degree interval rotations by the haar rectangular characteristic.Only need to carry out its training result of use that positive unidirectional training just can four times of efficient, can solve the identification problem of four direction in the flow process of once identification, the differentiation angular interval of algorithm identified has also enlarged four times.Can only support the identification of direct picture such as original algorithm, but can be picture or the handstand picture one-off recognitions of positive and negative 90 degree of camera shooting by the method; Original identification angle only covers positive and negative 15 degree, and this method just can expand theoretic positive and negative 60 degree to so.And the method has minimized the outer treatment step of identifying, has improved the efficient of computing.
Reason has following several:
1. feature itself is carried out the rotation of 90 degree easily based on the shape of rectangle.Postrotational feature remains rectangle.Do not change for characteristic sequence.
2. the calculating of integral image as long as feature itself is rectangle, just can be recomputated integral image and directly carries out the calculating of haar feature.
3. do not change in the situation of rectangle size in rotation, the characteristic threshold value of corresponding moving window is constant.
4. all carry out in the situation of same angle (multiples of 90 degree) rotation at whole piece haar characteristic sequence.The detectability of characteristic sequence is constant.
Wherein as follows for the spinning solution of characteristic rectangle:
If the rectangle after transforming is r[k]; Rectangle before transforming is reck[k]; K rectangle in the k representative feature.Window_height and window_width be the Gao Yukuan of window that representative feature relies on respectively.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, rectangle is wide, and rectangle is high.Reck[k] expression and r[k] the same.
But find that after scrutinizing there is easily spinning solution in Haar feature itself.
In conjunction with the Haar feature and to the thinking of its rotation, when judging, only need carry out feature the simple change of following four direction, both can obtain the judged result of four direction.
Feature rotation 0 degree
r[k]=rect[k]
Take picture centre as initial point, 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, the 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;
Take picture centre as initial point, 270 degree turn clockwise
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 need train once, just can be high efficiency for handstand, and the picture of 90-degree rotation and 270 degree is identified.In daily life, and the maximum rotation of picture also be carry out 90 the degree 180 the degree and 270 the degree rotations.Therefore the invention solves above problem.
Description of drawings
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 the integral image synoptic diagram;
(a) any pixel integration surface area of minute dot image representative (from the image upper left corner);
(b) pixel integration obtains by the long-pending plus-minus of four dot product score values of rectangle in any rectangular area;
Fig. 3 is the inventive method process flow diagram.
Embodiment
Be illustrated in figure 3 as a kind of multi-direction object identification method of the present invention, comprise the steps:
1, reads in image to be detected;
2, read in the one direction haar characteristic sequence that has trained;
The haar characteristic sequence is the characteristic rectangle sequence, and each eigenmatrix is with the upper left corner horizontal ordinate of this rectangle, upper left corner ordinate, and rectangle is wide, and the rectangle height represents.
3, image to be detected is made as gray level image;
4, gray level image to be detected is carried out histogram equalization;
5, the image to be detected after the 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 respectively by same direction rotation 0 degree, 90 degree, 180 degree and 270 degree, are obtained the haar characteristic sequence of four direction.
7, carry out eigenwert calculating 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 j kind Haar piece; ω iThe weights of j Haar piece i sub-rectangle; RectSum (r i) represent the pixel value sum of all picture elements that comprise in i the Haar piece.Sub-rectangle is white or black rectangle.
8, the monitoring window slides in image to be detected, and (size variation, the minimum window that allows from feature begin the size that maximum is no more than image itself such as 2 pixels.Position movement begins to move to the lower right corner of image always from the upper left corner of image), whether mate at the four direction judging characteristic;
If 9 have direction coupling then detect and return successfully, and the scope of the monitoring window of output matching.Four direction does not mate then detection and returns failure

Claims (7)

1. a multi-direction subject image recognition methods the steps include:
1) reads in image to be detected; Read in the one direction haar characteristic sequence that has trained, and one direction haar characteristic sequence is rotated to be the characteristic sequence of some direction initializations;
2) image to be detected is made as gray level image, then this gray level image is carried out histogram equalization;
3) image to be detected after the 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;
Whether 5) the monitoring window slides in image, mate at each direction initialization judging characteristic successively according to the eigenwert of calculating;
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 the characteristic sequence of described some direction initializations is for becoming the characteristic sequence of the four direction of 90 degree multiples with the training direction.
3. method as claimed in claim 2 is characterized in that the acquisition methods of the characteristic sequence of described four direction is: at first one direction haar characteristic sequence is copied as four parts; Then four parts of haar characteristic sequences are spent by same direction rotation 0 degree, 90 degree, 180 degree and 270 respectively, obtain the haar characteristic sequence of four direction.
4. method as claimed in claim 3 is characterized in that take the testing image center as initial point, and the haar characteristic sequence turns clockwise.
5. as claimed in claim 1 or 2 or 3 or 4 method is characterized in that described haar characteristic sequence is the characteristic rectangle sequence,
Each eigenmatrix is with the upper left corner horizontal ordinate of this rectangle, upper left corner ordinate, and rectangle is wide, and the rectangle height represents.
6. method as claimed in claim 5 is characterized in that the computing formula of described eigenwert feature is:
Figure FDA00001937535600011
Wherein, feature jRepresent the eigenwert of j kind Haar piece, ω iThe weights of j Haar piece i sub-rectangle, RectSum (r i) represent the pixel value sum of all picture elements that comprise in i the Haar piece.
7. method as claimed in claim 6, 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 true CN102855501A (en) 2013-01-02
CN102855501B 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)

Cited By (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
CN110223263A (en) * 2019-04-23 2019-09-10 上海上湖信息技术有限公司 Imaging direction detection method and device, readable storage medium storing program for executing
CN110603541A (en) * 2017-05-05 2019-12-20 北京嘀嘀无限科技发展有限公司 System and method for image redirection
CN112907510A (en) * 2021-01-15 2021-06-04 中国人民解放军国防科技大学 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
张杰: "《基于及其视觉的图像采集与处理系统研究》", 《中国优秀硕士学位论文全文数据库》, 1 April 2006 (2006-04-01) *

Cited By (6)

* 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
CN110603541A (en) * 2017-05-05 2019-12-20 北京嘀嘀无限科技发展有限公司 System and method for image redirection
CN110603541B (en) * 2017-05-05 2023-04-25 北京嘀嘀无限科技发展有限公司 System and method for image redirection
CN110223263A (en) * 2019-04-23 2019-09-10 上海上湖信息技术有限公司 Imaging direction detection method and device, readable storage medium storing program for executing
CN110223263B (en) * 2019-04-23 2021-07-13 上海上湖信息技术有限公司 Imaging direction detection method and device and readable storage medium
CN112907510A (en) * 2021-01-15 2021-06-04 中国人民解放军国防科技大学 Surface defect detection method

Also Published As

Publication number Publication date
CN102855501B (en) 2015-12-02

Similar Documents

Publication Publication Date Title
Walther et al. Selective visual attention enables learning and recognition of multiple objects in cluttered scenes
Mahadevan et al. Saliency-based discriminant tracking
CN110619628B (en) Face image quality assessment method
Holte et al. A local 3-D motion descriptor for multi-view human action recognition from 4-D spatio-temporal interest points
Faraji et al. Face recognition under varying illuminations using logarithmic fractal dimension-based complete eight local directional patterns
US20070242856A1 (en) Object Recognition Method and Apparatus Therefor
CN107423690A (en) A kind of face identification method and device
CN105913040A (en) Real time double cameras provided pedestrian detection system for use under scotopic vision conditions
Bak et al. Improving person re-identification by viewpoint cues
Patil et al. Yoga tutor visualization and analysis using SURF algorithm
CN104732601A (en) Automatic high-recognition-rate attendance checking device and method based on face recognition technology
CN105335725A (en) Gait identification identity authentication method based on feature fusion
CN103136504A (en) Face recognition method and device
CN108416291B (en) Face detection and recognition method, device and system
Nikisins et al. RGB-DT based face recognition
García et al. Modeling feature distances by orientation driven classifiers for person re-identification
CN102855501B (en) A kind of multi-direction subject image recognition methods
CN111009005A (en) Scene classification point cloud rough registration method combining geometric information and photometric information
Bhanu et al. Introduction to the special section on learning in computer vision
CN110633691A (en) Binocular in-vivo detection method based on visible light and near-infrared camera
JP5201184B2 (en) Image processing apparatus and program
CN111950452A (en) Face recognition method
Kumar et al. Intelligent parking vehicle identification and classification system
CN110910497A (en) Method and system for realizing augmented reality map
Unnikrishnan et al. Texture-based estimation of age and gender from wild conditions

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
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