2016年3月31日 星期四

學習筆記 [body detection using opencv入門2]

1. pixels值都增加 => 整張相片變白
    pixels值都乘以某個倍數 => 相片對比變大
2. Mat 包含兩個parts:
(1) matrix header: matrix information =>size : constant
(ex:
 the size of the matrix, the method used for storing, at which address is the matrix stored, and so on)
(2) 
a pointer to the matrix containing the pixel values =>size : varied

key point : (1) assign and copy => only header

ABC實際上指到同一個matrix,所以其中一個更動到matrix就會影響到其他人

                 (2) 要複製matrix本身 => clone() or copyTo()
FGA彼此互不影響(指到各自的matrix)
hue : 色調
saturation : 飽和
value / luminance : 明視度

2016年3月22日 星期二

2016/3/22學習筆記 [body detection using opencv入門]

1.feature descriptor : The intent of a feature descriptor is to generalize the object in such a way that the same object (in this case a person) produces as close as possible to the same feature descriptor when viewed under different conditions.

2.HOG(Histograms of Oriented Gradients) person detector 較簡單,因為使用的是global feature而不是一堆local feature的集合(一個人可以用single feature vector就可表示,而不是用many feature vectors representing smaller parts of the person)

3. gradient vector: 針對每個像素a,將像素a左邊的像素b和右邊的像素c相減(要b-c或c-b都可,但整張圖所有像素減的方向要一致),得到x;y方向同理得到y,(x,y)可用來算tan值(角度)和大小(平方相加開根號),由此可得到一個向量
原教學: 
https://chrisjmccormick.wordpress.com/2013/05/07/gradient-vectors/     (英文,不過講解超清楚!!!)
gradient vector用途: (1)edge detection (2)feature extraction(可避免掉lighting對影像造成的影響) 

資料來源: https://chrisjmccormick.wordpress.com/2013/05/09/hog-person-detector-tutorial/