-
chenggongchengxu
rgb to HSV,很有用,调试成功,可以应用(rgb to HSV,#include "stdafx.h"
#include <iostream.h>
void main(float R, float G, float B, float& H, float& S, float&V)
{
// r,g,b values are from 0 to 1
// h = [0,360], s = [0,1], v = [0,1]
// if s == 0, then h =-1 (undefined)
float min, max, delta,tmp
tmp = R>G?G:R
min = tmp>B?B:tmp
tmp = R>G?R:G
max = tmp>B?tmp:B
V = max // v
delta = max- min
if( max != 0 )
S = delta/max // s
else
{
// r = g = b = 0 // s = 0, v is undefined
S = 0
H = 0
return
}
if (delta == 0){
H = 0
return
}
else if(R == max){
if (G >= B)
H = (G- B)/delta // between yellow & magenta
else
H = (G- B)/delta+ 6
}
else if( G == max )
H = 2+ ( B- R )/delta // between cyan & yellow
else if (B == ma)
- 2011-12-02 10:09:24下载
- 积分:1
-
Exercises
2014年西安电子科技大学数字图像处理上机实验,同时是研究生和本科生的代码及作业
(2014 Xi' an University of Electronic Science and Technology of digital image processing experiments on board, while the graduate and undergraduate students and job code)
- 2014-01-27 17:37:16下载
- 积分:1
-
process_kang
基于颜色的图像检索,将RGB转化成HSV的方法(Color-based image retrieval, the method of RGB into HSV)
- 2011-02-09 14:24:04下载
- 积分:1
-
hog
方向梯度直方图(Histogram of Oriented Gradient, HOG)特征,计算机视觉和图像处理中用来进行物体检测的特征描述子的实现(Histogram of oriented gradients (Histogram of Oriented Gradient, HOG) characteristics, computer vision and image processing used for object detection feature descriptor realization)
- 2015-09-07 20:12:43下载
- 积分:1
-
Gauss-domain-time-frequency--
s变换;广义s变换;高斯邻域;时频分析;滤波(s transformation generalized s transformation Gaussian neighborhood time-frequency analysis Filtering)
- 2015-07-28 10:16:49下载
- 积分:1
-
EM_GM
混合高斯分布EM算法,可以算混合高斯分布的三个参数。混合高斯分布更接近系数分布。(mixed Gaussian distribution EM algorithm can calculate mixed Gaussian distribution of the three parameters. Mixed closer to the Gaussian distribution coefficient.)
- 2007-03-01 14:56:03下载
- 积分:1
-
dazhenshu
用大整数乘法来计算两个n位二进制数相乘(With large integer multiplication to calculate the multiplication of two n-bit binary number)
- 2010-12-31 00:20:19下载
- 积分:1
-
halcon检测胶圈闭合
halcon检测封闭胶圈,halcon12版本(Halcon detection of closed aprons)
- 2020-07-02 06:20:01下载
- 积分:1
-
CIE_chromaticity_diagram
CIE色度图, CIE 1931 RGB, CIE 1931 XYZ, CIE 1931 xyY(CIE chromaticity diagram, CIE 1931 RGB, CIE 1931 XYZ, CIE 1931 xyY)
- 2020-10-28 20:39:58下载
- 积分:1
-
Cohen-SutherlandLiang-Barsky
基于VC环境下的直线裁剪算法Cohen-Sutherland算法和Liang-Barsky算法的实现(Based on the realization of linear cutting algorithm VC environment under the Cohen-Sutherland algorithm and Liang-Barsky algorithm)
- 2012-10-24 18:58:06下载
- 积分:1