HSV值在opencv中的映射關係

cv在把RGB空間轉換爲HSVCIELab)空間之前先把RGB的值轉換到01 

然後,對於HSV 
On output 0≤V≤1, 0≤S≤1, 0≤H≤360. 
The values are then converted to the destination data type: 
8-bit images: 
V <- V*255, S <- S*255, H <- H/2 (to fit to 0..255) 
16-bit images (currently not supported): 
V <- V*65535, S <- S*65535, H <- H 
32-bit images: 
H, S, V are left as is 

對於CIELab): 
On output 0≤L≤100, -127≤a≤127, -127≤b≤127 
The values are then converted to the destination data type: 
8-bit images: 
L <- L*255/100, a <- a + 128, b <- b + 128 
16-bit images are currently not supported 
32-bit images: 
L, a, b are left as is

 

 

由於是之前做轉換的時候摘抄的一個文檔,所以原地址已經不見了,後來在做項目的時候都用opencv自帶的進行轉換,不過具體的取值範圍對於後續的計算還是有一定的幫助的

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章