TWI447655B - An image recognition method - Google Patents

An image recognition method Download PDF

Info

Publication number
TWI447655B
TWI447655B TW100117664A TW100117664A TWI447655B TW I447655 B TWI447655 B TW I447655B TW 100117664 A TW100117664 A TW 100117664A TW 100117664 A TW100117664 A TW 100117664A TW I447655 B TWI447655 B TW I447655B
Authority
TW
Taiwan
Prior art keywords
image
training
feature vector
recognition method
training image
Prior art date
Application number
TW100117664A
Other languages
Chinese (zh)
Other versions
TW201248518A (en
Inventor
Shi Xun Huang
Er Liang Jian
Ji Liang Jian
Min Fang Lo
Original Assignee
Nat Inst Chung Shan Science & Technology
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 Nat Inst Chung Shan Science & Technology filed Critical Nat Inst Chung Shan Science & Technology
Priority to TW100117664A priority Critical patent/TWI447655B/en
Publication of TW201248518A publication Critical patent/TW201248518A/en
Application granted granted Critical
Publication of TWI447655B publication Critical patent/TWI447655B/en

Links

Landscapes

  • Image Analysis (AREA)

Description

一種影像辨識方法Image recognition method

本發明係有關於一種影像辨識方法,特別是關於一種利用背景差異及有效避免光線影響的影像辨識方法。The invention relates to an image recognition method, in particular to an image recognition method which utilizes background differences and effectively avoids the influence of light.

安全氣囊的設計與發明,確實有效降低了交通意外發生時的傷害,其設計原理系當車輛遭受強烈撞擊時,立即引爆藥包並快速充氣,以達到保護乘客之目的。但由於瞬間充氣力道強烈,安全氣囊***本身卻也對使用者(例如乘車駕駛、乘客)造成一定傷害。早期安全氣囊並未針對不同的保護對象而設計不同的***壓制,往往造成***傷害或保護不足的結果。有鑑於此,目前許多產業界以及學術機構皆著手在研發感測器用以偵測駕駛、乘客及其乘坐狀態,以正確控制安全氣囊爆,避免***傷害,其中,影像辨識方法便可用來偵測駕駛、乘客及其乘坐狀態。The design and invention of the airbag effectively reduces the damage caused by traffic accidents. The design principle is that when the vehicle is subjected to a strong impact, the package is immediately detonated and rapidly inflated to protect the passenger. However, due to the strong inflationary force, the airbag blasting itself also causes certain damage to the user (such as driving, passengers). Early airbags did not design different bursts of compression for different objects of protection, often resulting in blast damage or inadequate protection. In view of this, many industry and academic institutions are currently developing sensors to detect driving, passengers and their ride status to properly control airbag bursts and avoid blast damage. Image recognition methods can be used to detect Driving, passengers and their ride status.

以電腦影像為基礎之乘客辨識技術,根據使用相機數量之不同,大致上可區分為單眼視覺辨識技術(Monocular Vision)以及立體視覺辨識技術(Stereo Vision)兩大類。目前單眼視覺辨識技術主要先擷取與分析出有效之乘客特徵,接著透過特徵偵測與比對之技術,達到乘客辨識之目的。立體視覺辨識技術,主要採用兩臺相機模仿人類視覺成像原理,進以感測三維空間物體與相機之相對距離,稱為視差圖(Disparity Map),經由分析相對不同乘客狀態之視差圖,達成辨識之目的。Computer image-based passenger identification technology can be roughly divided into two categories: Monocular Vision and Stereo Vision, depending on the number of cameras used. At present, the monocular vision recognition technology mainly captures and analyzes the effective passenger characteristics, and then achieves the purpose of passenger identification through the feature detection and comparison technology. Stereoscopic vision recognition technology mainly uses two cameras to imitate the principle of human visual imaging. It senses the relative distance between the three-dimensional object and the camera, called the disparity map. By analyzing the disparity maps of different passenger states, the identification is achieved. The purpose.

然上述之習用技術,無論採用單眼或立體視覺以達成乘客狀態辨識,其皆直接擷取與分析車內乘客影像,但由於人體姿態、衣著顏色種類,亦或嬰兒座椅種類多樣,所選取之特徵通常無法有效涵蓋所有乘客狀態之外觀,因此容易導致辨識結果不穩定。另一方面,用以描述乘客狀態外觀之特徵,先前技藝主要利用外觀之全域特徵(Global Feature)為主,舉凡包含:人體形狀,整張影像之邊緣強度(Dense Edge Cue),然由於車輛於移動過程中,光線會產生劇烈變化,導致部分影像過度曝光(Blooming)或不可視(Invisible)。因此,運用全域特徵以描述乘客影像並不適當,其亦受光線變化導致誤辨識。由此可見,上述之習用技術仍有缺點,且有待改良。因此需發展出一套能有效克服光線變化(Lighting Change)以及乘客外觀差異(Intra-Class Variance)之演算法,如此一來,方能同時兼具成本與時效,符合達到有效、確實辨識出乘客及其狀態的影像辨識方法。However, the above-mentioned conventional technology, whether using single-eye or stereoscopic vision to achieve passenger status recognition, directly captures and analyzes the image of the passengers in the vehicle, but due to the human body posture, the type of clothing color, or the variety of baby seats, the selected ones are selected. Features often do not effectively cover the appearance of all passenger states, and thus tend to result in unstable identification results. On the other hand, to describe the characteristics of the appearance of the passenger state, the prior art mainly uses the Global Feature of the appearance, including: the shape of the human body, the edge intensity of the entire image (Dense Edge Cue), but because of the vehicle During the movement, the light changes drastically, causing some of the image to be over-exposed (Blooming) or invisible (Invisible). Therefore, the use of global features to describe passenger images is not appropriate, and it is also misidentified by light changes. It can be seen that the above-mentioned conventional techniques still have shortcomings and need to be improved. Therefore, it is necessary to develop a set of algorithms that can effectively overcome the lighting change and the Intra-Class Variance. In this way, the cost and the time effect can be simultaneously achieved, and the passengers can be effectively recognized and recognized. Image recognition method of its state.

鑒於上述習知技術之缺點,本發明之主要目的在於提供一種影像辨識方法,整合一狀態影像、一影像區塊、一訓練影像區塊、一特徵向量及錯誤率演算法等,以有效克服光線變化(Lighting Change)以及乘客外觀差異所造成的辨識誤差。In view of the above disadvantages of the prior art, the main object of the present invention is to provide an image recognition method, which integrates a state image, an image block, a training image block, a feature vector, and an error rate algorithm to effectively overcome the light. Identification error caused by Lightning Change and differences in passenger appearance.

為了達到上述目的,根據本發明所提出之一方案,提供一種影像辨識方法,其步驟包括:(A)首先擷取一目標物之一狀態影像,例如一乘客的坐姿或睡姿;(B)將該狀態影像分為複數影像區塊,其中,各該複數影像區塊包含一影像特徵向量及一座標;(C)提供複數訓練影像區塊,各該訓練影像區塊包含一訓練影像特徵向量及一座標;(D)利用一演算法比對每一座標之該影像特徵向量與該訓練影像特徵向量而得一錯誤率,其中,每一各該錯誤率可對應出一各該訓練影像區塊;(E)選取出各座標最小錯誤率之各該訓練影像區塊而成一訓練影像。藉此,透過本發明得以達到製備出利用背景差異及有效避免光線影響的影像辨識方法。In order to achieve the above object, according to one aspect of the present invention, an image recognition method is provided, the steps comprising: (A) first capturing a state image of a target, such as a seated or sleeping position of a passenger; (B) The state image is divided into a plurality of image blocks, wherein each of the plurality of image blocks includes an image feature vector and a target; (C) provides a plurality of training image blocks, each of the training image blocks including a training image feature vector And a flag; (D) using an algorithm to compare the image feature vector of each coordinate with the training image feature vector to obtain an error rate, wherein each of the error rates can correspond to each of the training image regions. (E) selecting each of the training image blocks of each coordinate minimum error rate to form a training image. Thereby, through the invention, an image recognition method using the background difference and effectively avoiding the influence of light can be prepared.

上述之步驟(B)中將該狀態影像分為複數影像區塊,每一影像區塊可有有一個座標,根據座標可識別出影像區塊,同時每一個影像區塊有其一範圍,在整個範圍內有皆有影像資訊,將這影像資訊做一演算,將可得一特徵向量。In the above step (B), the state image is divided into a plurality of image blocks, each image block may have a coordinate, and the image block may be identified according to the coordinates, and each image block has a range thereof. There is image information in the entire range. By performing a calculation on this image information, a feature vector will be obtained.

訓練影像區塊,如同上述之影像區塊,每一訓練影像區塊皆有其座標及一訓練影像特徵向量,訓練影像區塊的來源係來自先前即存在之影像,例如事前即擷取一乘客各種坐姿狀態影像,根據不同影像資訊做處理即可得到不同的訓練影像區塊,因此,同一座標將有複數訓練影像區塊。訓練影像區塊的存在是用來當做比對的資料庫,當擷取一目標物之一狀態影像後,可得到複數影像區塊,利用座標可擷取出某一座標一影像區塊與複數訓練影像區塊,利用一演算法比對一影像區塊與複數訓練影像區塊,可得到影像資訊最類似的一影像區塊與一訓練影像區塊,再將各座標中比對後影像資訊最類似的訓練影像區塊集合而成一訓練影像,該訓練影像例如可為事前擷取的一乘客各種坐姿狀態影像,因而藉由訓練影像可辨識出是何乘客以及其坐姿狀態等。The training image block, like the image block described above, each training image block has its coordinates and a training image feature vector. The source of the training image block is from an image that exists before, for example, a passenger is captured beforehand. Various sitting posture images can be processed according to different image information to obtain different training image blocks. Therefore, the same coordinate will have multiple training image blocks. The existence of the training image block is used as a database for comparison. After capturing a state image of a target object, a plurality of image blocks can be obtained, and a coordinate image block and a plurality of training blocks can be extracted by using the coordinates. The image block uses an algorithm to compare an image block with a plurality of training image blocks to obtain an image block and a training image block with the most similar image information, and then compare the image information of each coordinate in each coordinate. A similar training image block is assembled into a training image, which can be, for example, a passenger's various sitting posture images captured in advance, so that the training image can identify the passenger and the sitting state.

影像區塊與訓練影像區塊的比對有眾多方法,例如,可用一Adaboost演算法,可得一錯誤率,所謂錯誤率是比對影像區塊與訓練影像區塊的差異,利用一演算法計算得到一錯誤率,以表示影像區塊與訓練影像區塊的差異度,錯誤率越小表示影像區塊與訓練影像區塊越相似。There are many methods for comparing image blocks with training image blocks. For example, an Adaboost algorithm can be used to obtain an error rate. The so-called error rate is the difference between the image block and the training image block. An error rate is calculated to indicate the difference between the image block and the training image block. The smaller the error rate, the more similar the image block is to the training image block.

影像區塊或訓練影像區塊中包含應用一背景減法技術而得該影像特徵向量,背景減法技術中包含識別出該影像區塊中一前景影像資訊與一背景影像資訊,再將其中的背景影像資訊除去,即可得只包含一前景影像資訊的影像區塊或訓練影像區塊,因此利用前景影像資訊經一影像特徵向量運算之後,可得一沒有背景影像資訊的影像特徵向量或訓練影像特徵向量。The image block or the training image block includes the image feature vector by applying a background subtraction technique, and the background subtraction technique includes identifying a foreground image information and a background image information in the image block, and then displaying the background image therein. If the information is removed, an image block or a training image block containing only a foreground image information can be obtained. Therefore, after using the image feature vector operation, an image feature vector or training image feature without background image information can be obtained. vector.

上述得到的訓練影像,是包含前景資訊的影像,例如一乘客及其乘坐狀態,但不包含背景資訊,例如無乘客時的座椅等影像,因此,可結合一包含背景資訊的背景影像與該訓練影像而成一辨識影像,其中,辨識影像包含前景資訊以及背景資訊,例如一乘客及其乘坐狀態與背椅等影像,因而更相似於擷取目標之狀態影像。The training image obtained above is an image containing foreground information, such as a passenger and its riding state, but does not include background information, such as a seat without a passenger, and the like, so that a background image containing background information can be combined with the background image. The training image is an identification image, wherein the identification image includes foreground information and background information, such as a passenger and its riding state and the back chair, and thus is more similar to the state image of the captured target.

以上之概述與接下來的詳細說明及附圖,皆是為了能進一步說明本發明為達成預定目的所採取的方式、手段及功效。而有關本發明的其他目的及優點,將在後續的說明及圖示中加以闡述。The above summary, the following detailed description and the accompanying drawings are intended to further illustrate the manner, the Other objects and advantages of the present invention will be described in the following description and drawings.

以下係藉由特定的具體實例說明本發明之實施方式,熟悉此技藝之人士可由本說明書所揭示之內容輕易地瞭解本發明之其他優點與功效。The embodiments of the present invention are described below by way of specific examples, and those skilled in the art can readily appreciate other advantages and functions of the present invention from the disclosure herein.

請參考第一圖,為一種影像辨識方法流程示意圖。如圖所示,本發明提供一種影像辨識方法,其步驟包括:(A)擷取一目標物之一狀態影像S101;(B)將該狀態影像分為複數影像區塊,其中,各該複數影像區塊包含一影像特徵向量及一座標S102;(C)提供複數訓練影像區塊,各該訓練影像區塊包含一訓練影像特徵向量及一座標S103;(D)利用一演算法比對每一座標之該影像特徵向量與該訓練影像特徵向量而得一錯誤率,其中,每一各該錯誤率可對應出一各該訓練影像區塊S104;(E)選取出各座標最小錯誤率之各該訓練影像區塊而成一訓練影像S105。Please refer to the first figure, which is a schematic flow chart of an image recognition method. As shown in the figure, the present invention provides an image recognition method, the steps of which include: (A) capturing a state image S101 of a target; (B) dividing the state image into a plurality of image blocks, wherein each of the plurality The image block includes an image feature vector and a standard S102; (C) provides a plurality of training image blocks, each of the training image blocks includes a training image feature vector and a standard S103; (D) uses an algorithm to compare each An error rate is obtained by the image image feature vector and the training image feature vector, wherein each of the error rates can correspond to each of the training image blocks S104; (E) selecting the minimum error rate of each coordinate Each of the training image blocks is formed into a training image S105.

為了能夠更有效克服光線變化(Lighting Change)以及乘客外觀差異(Intra-Class Variance),因此不採用擷取全域特徵為影像,本發明之構想為利用許多外觀區塊(Parts)來描述乘客外觀,而區塊選取則透過一演算法來達成,可有效降低光線變化所造成之部分區域曝光或不可視之現象。本發明中步驟(B),將目標物(例如一乘客)的該狀態影像分為複數影像區塊,其中,該狀態影像係為一全域特徵為影像,例如,一乘客某種坐姿的照片,複數影像區塊則將狀態影像分為眾多小塊影像區塊,分類的方法例如可將狀態影像利用座標系的方法,每一座標包括一影像區塊,每一影像區塊為狀態影像的一部份,其包含狀態影像一小部份的影像資訊。In order to be able to more effectively overcome the Lightning Change and the Intra-Class Variance, the global feature is not taken as an image. The idea of the present invention is to use a number of appearance blocks to describe the appearance of the passenger. The block selection is achieved through an algorithm, which can effectively reduce the exposure or invisibility of parts caused by light changes. In the step (B) of the present invention, the state image of the target object (for example, a passenger) is divided into a plurality of image blocks, wherein the state image is a global feature image, for example, a photograph of a seated posture of a passenger. The plurality of image blocks divide the state image into a plurality of small image blocks. For example, the state image can be used by the coordinate system. Each coordinate includes an image block, and each image block is a state image. In part, it contains a small portion of the image information of the state image.

本實施例將每一座標的每一影像區塊數位化,利用一影像特徵向量運算給予每一影像區塊一特徵向量,因此每一影像區塊包含一特徵向量及一座標。In this embodiment, each image block of each coordinate is digitized, and a feature vector is given to each image block by using an image feature vector operation. Therefore, each image block includes a feature vector and a target.

另外,為有效克服相同乘客狀態之外觀差異影響,本實施例提出一背景減法技術,例如,利用無人乘客背景(背景影像資訊)模型之建構,在擷取乘客外觀(前景影像資訊)之特徵時,非採用直接描述乘客影像之方式,而是透過描述影像(前景影像資訊)與背景模型(背景影像資訊)之差異量(Difference Measure)來達成。一般而言,背景影像(背景影像資訊)的建立需排除光線因素,根據影像成像原理,影像主要由兩個部分所組成:照度影像(Illumination Image)以及反射影像(Reflectance Image),照度影樣主要描述光現在環境中的分布狀態;反射影像為成像物體表面之反射特性,主要取決於物體材質。彼此關係可依下列方程式表示:In addition, in order to effectively overcome the influence of the appearance difference of the same passenger state, the present embodiment proposes a background subtraction technique, for example, using the construction of an unmanned passenger background (background image information) model to capture the characteristics of the passenger appearance (foreground image information). Instead of using a direct description of the passenger image, it is achieved by describing the difference between the image (foreground image information) and the background model (background image information). In general, the background image (background image information) needs to be excluded from the light factor. According to the image imaging principle, the image is mainly composed of two parts: Illumination Image and Reflectance Image. The illuminance image is mainly Describe the distribution state of light in the current environment; the reflection image is the reflection characteristic of the surface of the imaged object, mainly depending on the material of the object. The relationship between each other can be expressed by the following equation:

I (x ,y )=R (x ,yL (x ,y ), I ( x , y )= R ( x , yL ( x , y ),

其中I (x ,y )表示目前所觀察到之影像;L (x ,y )以及R (x ,y )分別表示照度影像及反射影像,基於照度影像變化比例較反射影像緩和的假設前提下,於此實施例中,例如可採用無人乘客狀態(背景影像資訊)時之反射影像作為車內場景之背景影像(背景影像資訊)。Where I ( x , y ) represents the currently observed image; L ( x , y ) and R ( x , y ) represent the illuminance image and the reflection image, respectively, based on the assumption that the proportion of the illuminance image changes is more moderate than the reflection image. In this embodiment, for example, the reflected image when the unmanned passenger state (background image information) is used may be used as the background image (background image information) of the in-vehicle scene.

複數的影像區塊,可使用多個微分濾波器(Derivative Filters)對影像區塊中的影像i (x ,y )做處理。假設計算法中選用N個微分濾波器{f n },對應所獲得之影像為{o n },則o n =i *f n 。若針對所有影像{o n }取其中間值(Median Value),其表示式如下所示:For multiple image blocks, multiple images of the image i ( x , y ) in the image block can be processed using multiple differential filters. In the fake design algorithm, N differential filters { f n } are selected, and corresponding to the obtained image is { o n }, then o n = i * f n . If the median value is taken for all images { o n }, the expression is as follows:

則透過所謂Psuedo-Inverse的線性解題技巧,反射影像(背景影像資訊)(x ,y )可表示如下:Through the so-called Psuedo-Inverse linear problem-solving technique, the reflected image (background image information) ( x , y ) can be expressed as follows:

其中among them

本實施例中上述影像特徵向量運算法,首先針對影像中所有影像點,計算於x與y方向之反射比例係數,並求取背景影像資訊與前景影像資訊相對映點之向量差異,因此影像特徵向量F (i ,j )=δ B (i ,j )-δ F (i ,j )。然而若以單一影像點作為辨識乘客狀態的特徵,容易受到雜訊的影像,因此本計畫中,特徵的擷取主要是針對每個特定的區域,例如,每一座標(於此計畫中為區域形狀設定為矩形),累積並統計所有影像點差異向量分別於[0,90,180,270]四個方向的值,作為此區域之特徵向量。其詳細定義如下:In the embodiment, the image feature vector algorithm first calculates the reflection scale coefficient in the x and y directions for all image points in the image, and obtains the vector difference between the background image information and the foreground image information, so the image feature The vector F ( i , j ) = δ B ( i , j ) - δ F ( i , j ). However, if a single image point is used as a feature for recognizing the state of the passenger, it is easy to be imaged by the noise. Therefore, in this plan, the feature is captured mainly for each specific area, for example, each coordinate (in this plan) Set the area shape to a rectangle. Accumulate and count the values of all the image point difference vectors in the four directions [0, 90, 180, 270] as the feature vectors of this area. Its detailed definition is as follows:

其中θ {0,90,180,270}且代表於θ 角度的單位向量。因此,特徵向量即是利用背景影像資訊及前景影像資訊中所有影像點,計算其反射比例係數向量,最後計算兩向量間之差異向量,並分別對四個方向進行累積與統計,最後可得此區塊之特徵向量之四維向量。Where θ {0,90,180,270} and A unit vector representing the angle of θ . Therefore, the feature vector is to use the background image information and all the image points in the foreground image information to calculate the reflection coefficient vector, and finally calculate the difference vector between the two vectors, and accumulate and count the four directions respectively. The four-dimensional vector of the feature vector of the block.

本實施例中的訓練影像區塊,如同上述之影像區塊,每一訓練影像區塊皆有其座標及一訓練影像特徵向量,其中,該訓練影像特徵向量的運算由一訓練影像特徵向量運算法而來,該訓練影像特徵向量運算法運算方式係如同上述影像特徵向量運算法。訓練影像區塊的來源係來自先前即存在之影像,例如事前即擷取一乘客各種坐姿狀態影像,根據不同影像資訊做處理即可得到不同的訓練影像區塊,因此,同一座標將有複數塊訓練影像區塊,其中,訓練影像特徵向量的計算方法如同上述影像特徵向量的計算方法。訓練影像區塊的存在是用來當做比對的資料庫,當擷取一目標物之一狀態影像後,可得到複數影像區塊,利用座標可擷取出某一座標一影像區塊與複數訓練影像區塊,利用一演算法比對一影像區塊與複數訓練影像區塊,可得到影像資訊最類似的一影像區塊與一訓練影像區塊,再將各座標中比對後影像資訊最類似的訓練影像區塊集合而成一訓練影像,該訓練影像例如可為事前擷取的一乘客各種坐姿狀態影像,因而藉由訓練影像可辨識出是何乘客以及其坐姿狀態。In the training image block in this embodiment, as in the above image block, each training image block has its coordinates and a training image feature vector, wherein the operation of the training image feature vector is operated by a training image feature vector. From the law, the training image feature vector operation method is like the image feature vector algorithm described above. The source of the training image block is from the image that existed before. For example, a passenger's various sitting posture images are captured beforehand, and different training image blocks can be obtained according to different image information. Therefore, the same coordinate will have multiple blocks. The image block is trained, wherein the calculation method of the image feature vector is like the calculation method of the image feature vector. The existence of the training image block is used as a database for comparison. After capturing a state image of a target object, a plurality of image blocks can be obtained, and a coordinate image block and a plurality of training blocks can be extracted by using the coordinates. The image block uses an algorithm to compare an image block with a plurality of training image blocks to obtain an image block and a training image block with the most similar image information, and then compare the image information of each coordinate in each coordinate. A similar training image block is assembled into a training image, which can be, for example, a passenger's various sitting posture images captured in advance, so that the training image can identify the passenger and the sitting state.

影像區塊與訓練影像區塊的比對有眾多方法,例如,可用一Adaboost演算法。本實施例透過許多影像區塊與訓練影像區塊之特徵向量來表示一乘客狀態,並經由所謂鑑別性之一般性模型(Discriminatively Generative Model)選取出能有效代表不同乘客狀態之訓練影像區塊,作為估算可能機率的特徵。在給定一組N 個訓練樣板,其中為o i 表示所觀察之影像;y i 為該影像之乘客狀態,其中t i {C empty , C RFIS ,C FFCS ,C child ,C adult }。訓練階段的主要目標,在針對所有可能之乘客狀態,分別選取N P 個具有鑑別度之訓練影像區塊(Patches)There are many methods for comparing image blocks with training image blocks. For example, an Adaboost algorithm can be used. In this embodiment, a plurality of image blocks and feature vectors of the training image block are used to represent a passenger state, and a training image block capable of effectively representing different passenger states is selected via a so-called Discriminatively Generative Model. As a feature to estimate the probability of being. Given a set of N training templates Where o i represents the observed image; y i is the passenger state of the image, where t i { C empty , C RFIS , C FFCS , C child , C adult }. The main goal of the training phase is to select N P training images (Patches) with discriminative degrees for all possible passenger states. .

首先假設(w p ,h p )分別表示影像區塊與訓練影像區塊之長度以及寬度;(x p ,y p )分別表示影像區塊與訓練影像區塊於影像中之座標,影像區塊與訓練影像區塊p i 的組態(Configuration)可表示為p i ={x p (i ),y p (i ),w p (i ),h p (i )}。而訓練影像區塊選取可描述為,改變區塊組態,使其為由左至右,由上至下,掃描整張影像,最後選取出一組具鑑別度之訓練影像區塊。換言之,每一個訓練影像區塊所扮演之角色於Adaboost演算法中可被視為一個weak classifier。接著為套用Adaboost演算法架構,首先對於每一個乘客狀態c ,採用One-Against-All規則將訓練樣本區分為正樣板(Positive Samples)以及負樣板(Negative Samples)兩類(如下方程式),並設定本各樣本具有相同之權重(Weight)w i =1/NFirst, it is assumed that ( w p , h p ) respectively represent the length and width of the image block and the training image block; ( x p , y p ) respectively represent the coordinates of the image block and the training image block in the image, and the image block The configuration with the training image block p i can be expressed as p i ={ x p ( i ), y p ( i ), w p ( i ), h p ( i )}. The training image block selection can be described as changing the block configuration so that the entire image is scanned from left to right and from top to bottom, and finally a set of training image blocks with discriminative degree is selected. In other words, the role played by each training image block can be considered a weak classifier in the Adaboost algorithm. Next, to apply the Adaboost algorithm architecture, first for each passenger state c , use the One-Against-All rule to train the sample. It is divided into two types (Positive Samples) and Negative Samples (the following equations), and the samples are set to have the same weight ( W ) = 1 / N.

在詳述正樣板、負樣板以及所屬之權重參數如何設定後,Adaboost演算法核心部分在如何定義推論函數h t (.)(Hypothesis Function),以及辨識錯誤率ε t (Error Rate)。推論函數的定義主要採用區分性分類器(Discriminative Classifier),支援向量機(Support Vector Machine),是被廣泛使用之區分性分類器,其主要概念是在高維空間估算出一個超平面,能夠區分正樣本以及負樣本,並使其正負樣本距離此平面的距離最大。支援向量機分類方式為將分佈於超平面兩邊的樣本視為不同類別,因此選取樣本之分佈狀況會顯著影響超平面之參數,換言之,採用區分性分類器做為推論函數,會使所獲得模型具備較有效之分類效果,但卻易受到訓練樣本的影響。為克服上述問題,本實施例設計出一個具有鑑別性之一般性分類器,作為乘客辨識系統之推論函數。After detailing how the positive template, the negative template, and the associated weight parameters are set, the core of the Adaboost algorithm defines how the inference function h t (.) (Hypothesis Function) and the error rate ε t (Error Rate). The definition of inferential function mainly uses Discriminative Classifier, Support Vector Machine, which is a widely used discriminant classifier. Its main concept is to estimate a hyperplane in high-dimensional space and distinguish it. Positive and negative samples, and the positive and negative samples are the largest distance from this plane. The support vector machine classification method is to treat the samples distributed on both sides of the hyperplane as different categories. Therefore, the distribution of the selected samples will significantly affect the parameters of the hyperplane. In other words, using the discriminant classifier as the inference function will make the obtained model It has a more effective classification effect but is susceptible to training samples. To overcome the above problems, the present embodiment designs a discriminating general classifier as an inferential function of the passenger identification system.

針對特定所選定之區塊p i ,依據上述所討論之特徵向量運算法,計算所有正樣本於此區塊中之四維特徵向量(Feature Vector),,其中N pos 為正樣本之個數,並透過一個四維高斯模型N~(μ ,Σ)(Gaussian Model)來描述此乘客類別之特徵性質,其中μ 以及Σ分別表示如下:Calculating a four-dimensional feature vector of all positive samples in the block according to the feature vector algorithm discussed above for a particular selected block p i , , where N pos is the number of positive samples, and the characteristic properties of this passenger category are described by a four-dimensional Gaussian model N~( μ , Σ), where μ and Σ are expressed as follows:

不同於一般之區分性分類器定義推論函數h t (.)的方式(一個樣本需被歸類為正樣本或負樣本),樣本歸類為一個機率值,h t (.)的方式定義為:Unlike the general discriminant classifier that defines the inference function h t (.) (a sample needs to be classified as a positive or negative sample), the sample is classified as a probability value, and h t (.) is defined as :

h t (.)的錯誤率ε t 可定義為:Then the error rate ε t of h t (.) can be defined as:

上述得到的訓練影像,是包含前景資訊的影像,例如一乘客及其乘坐狀態,但不包含背景資訊,例如無乘客時的座椅等影像,因此,可結合一包含背景資訊的背景影像與該訓練影像而成一辨識影像,其中,辨識影像包含前景資訊以及背景資訊,例如一乘客及其乘坐狀態與背椅等影像,因而更相似於擷取目標之狀態影像,進而完成辨識影像的工作。The training image obtained above is an image containing foreground information, such as a passenger and its riding state, but does not include background information, such as a seat without a passenger, and the like, so that a background image containing background information can be combined with the background image. The training image is an identification image, wherein the identification image includes foreground information and background information, such as a passenger and its riding state and the back chair, and thus is more similar to the state image of the captured target, thereby completing the work of recognizing the image.

上述之實施例僅為例示性說明本發明之特點及其功效,而非用於限制本發明之實質技術內容的範圍。任何熟習此技藝之人士均可在不違背本發明之精神及範疇下,對上述實施例進行修飾與變化。因此,本發明之權利保護範圍,應如後述之申請專利範圍所列。The above-described embodiments are merely illustrative of the features and functions of the present invention, and are not intended to limit the scope of the technical scope of the present invention. Modifications and variations of the above-described embodiments can be made by those skilled in the art without departing from the spirit and scope of the invention. Therefore, the scope of protection of the present invention should be as set forth in the scope of the claims described below.

S101-S105...步驟S101-S105. . . step

第一圖係為本發明一種影像辨識方法流程示意圖。The first figure is a schematic flow chart of an image recognition method according to the present invention.

S101-S105...步驟S101-S105. . . step

Claims (10)

一種影像辨識方法,其步驟包括:(A)擷取一目標物之一狀態影像;(B)將該狀態影像分為複數影像區塊,其中,各該複數影像區塊包含一影像特徵向量及一座標;(C)提供複數訓練影像區塊,各該訓練影像區塊包含一訓練影像特徵向量及一座標;(D)利用一演算法比對每一座標之該影像特徵向量與該訓練影像特徵向量而得一錯誤率,其中,每一各該錯誤率可對應出一各該訓練影像區塊;(E)選取出各座標最小錯誤率之各該訓練影像區塊而成一訓練影像;其中該影像特徵向量係利用影像區塊中一背景影像資訊及一前景影像資訊,分別計算出該背景影像資訊及該前景影像資訊之反射比例係數向量,再計算兩反射比例係數向量間之差異向量,並分別對四個方向進行累積與統計,而得該影像區塊具有四維向量之影像特徵向量。 An image recognition method includes the steps of: (A) capturing a state image of a target object; (B) dividing the state image into a plurality of image blocks, wherein each of the plurality of image blocks includes an image feature vector and a standard (C) provides a plurality of training image blocks, each of the training image blocks includes a training image feature vector and a target; (D) an algorithm is used to compare the image feature vector of each coordinate with the training image The feature vector obtains an error rate, wherein each of the error rates can correspond to each of the training image blocks; (E) selecting each of the training image blocks of each coordinate minimum error rate to form a training image; The image feature vector uses a background image information and a foreground image information in the image block to respectively calculate the background image information and the reflection scale coefficient vector of the foreground image information, and then calculate a difference vector between the two reflection scale coefficient vectors. The four directions are accumulated and counted separately, and the image block has an image feature vector of a four-dimensional vector. 如申請專利範圍第1項之影像辨識方法,其中,該影像區塊包含應用一背景減法技術而得該影像特徵向量。 The image recognition method of claim 1, wherein the image block comprises the image feature vector by applying a background subtraction technique. 如申請專利範圍第2項之影像辨識方法,其中,該背景減法技術係包含識別出該影像區塊中一前景影像資訊與一背景影像資訊。 The image recognition method of claim 2, wherein the background subtraction technique comprises identifying a foreground image information and a background image information in the image block. 如申請專利範圍第3項之影像辨識方法,其中,該影像特徵向量係利用一影像特徵向量運算,其中,該影像特徵 向量運算包含該前景影像資訊。 The image recognition method of claim 3, wherein the image feature vector is operated by an image feature vector, wherein the image feature The vector operation contains the foreground image information. 如申請專利範圍第1項之影像辨識方法,其中,該訓練影像區塊包含應用一背景減法技術而得該訓練影像特徵向量。 The image recognition method of claim 1, wherein the training image block comprises applying the background subtraction technique to obtain the training image feature vector. 如申請專利範圍第5項之影像辨識方法,其中,該背景減法技術係包含識別出該訓練影像區塊中一前景訓練影像資訊與一背景訓練影像資訊。 The image recognition method of claim 5, wherein the background subtraction technique comprises identifying a foreground training image information and a background training image information in the training image block. 如申請專利範圍第6項之影像辨識方法,其中,該訓練影像特徵向量係利用一訓練影像特徵向量運算,其中,該訓練影像特徵向量運算包含該前景訓練影像資訊。 The image recognition method of claim 6, wherein the training image feature vector uses a training image feature vector operation, wherein the training image feature vector operation includes the foreground training image information. 如申請專利範圍第1項之影像辨識方法,其中,步驟(D)中該演算法係包含一Adaboost演算法。 For example, in the image recognition method of claim 1, wherein the algorithm in step (D) includes an Adaboost algorithm. 如申請專利範圍第1項之影像辨識方法,其中,步驟(D)中該錯誤率之計算係為: 其中,For example, in the image recognition method of claim 1, wherein the error rate in step (D) is calculated as: among them, , . 如申請專利範圍第1項之影像辨識方法,步驟(E)中更包含一步驟,其中,結合一背景影像與該訓練影像而成一辨識影像。 For example, in the image recognition method of claim 1, the step (E) further includes a step of combining a background image and the training image to form an identification image.
TW100117664A 2011-05-20 2011-05-20 An image recognition method TWI447655B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW100117664A TWI447655B (en) 2011-05-20 2011-05-20 An image recognition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW100117664A TWI447655B (en) 2011-05-20 2011-05-20 An image recognition method

Publications (2)

Publication Number Publication Date
TW201248518A TW201248518A (en) 2012-12-01
TWI447655B true TWI447655B (en) 2014-08-01

Family

ID=48138753

Family Applications (1)

Application Number Title Priority Date Filing Date
TW100117664A TWI447655B (en) 2011-05-20 2011-05-20 An image recognition method

Country Status (1)

Country Link
TW (1) TWI447655B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI613618B (en) * 2014-08-22 2018-02-01 Papago Inc System and method for obtaining a motion region through image vector analysis
TWI629666B (en) * 2017-03-27 2018-07-11 銘傳大學 Block-based error measurement method for image object segmentation

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060209072A1 (en) * 2005-03-21 2006-09-21 Marc Jairam Image-based vehicle occupant classification system
TW200725482A (en) * 2005-12-29 2007-07-01 Metal Ind Res & Dev Ct Recognition method for pattern matching

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060209072A1 (en) * 2005-03-21 2006-09-21 Marc Jairam Image-based vehicle occupant classification system
TW200725482A (en) * 2005-12-29 2007-07-01 Metal Ind Res & Dev Ct Recognition method for pattern matching

Also Published As

Publication number Publication date
TW201248518A (en) 2012-12-01

Similar Documents

Publication Publication Date Title
JP4873631B2 (en) System and method for detecting occupant and head poses using a stereo detector
US7372996B2 (en) Method and apparatus for determining the position of a vehicle seat
JP5493108B2 (en) Human body identification method and human body identification device using range image camera
WO2003073359A2 (en) Method and apparatus for recognizing objects
CN106407951B (en) A kind of night front vehicles detection method based on monocular vision
Xu et al. Integrated approach of skin-color detection and depth information for hand and face localization
JP6855872B2 (en) Face recognition device
JP2019106193A (en) Information processing device, information processing program and information processing method
JP7180445B2 (en) object detector
TW201520907A (en) Vision-based cyclist and pedestrian detection system and the methods
TWI447655B (en) An image recognition method
Ikemura et al. Human detection by Haar-like filtering using depth information
JP2019106149A (en) Information processing device, information processing program and information processing method
CN109690555B (en) Curvature-based face detector
CN112611360B (en) Object detection device, vehicle, and object detection processing method
Klomark Occupant detection using computer vision
TWI442326B (en) Image classification method and image classification system
Faber et al. A system architecture for an intelligent airbag deployment
JP6359866B2 (en) Subject presence range estimation device and subject presence range estimation method
JP3751467B2 (en) In-vehicle device control apparatus and method
JP7081526B2 (en) Object detector
TWI465961B (en) Intelligent seat passenger image sensing device
Zao et al. Occupant pose and location detect for intelligent airbag system based on computer vision
Joung et al. Background-aware pedestrian/vehicle detection system for driving environments
CN117710946A (en) Safety belt use identification method and device based on vehicle-mounted camera and storage medium