-
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
-
RollingWheel
VC++应用实例,使用message 传递机制,以实现圆形滚动的动画效果,(VC++ application example of using message passing mechanism in order to achieve a circular scrolling animation effects,)
- 2014-03-02 22:18:45下载
- 积分:1
-
31019415
浅析VC与matlab接口编程 On VC and matlab interface programming(Shallow of VC and matlab interface programming interface On VC and matlab programming)
- 2017-04-23 00:36:24下载
- 积分:1
-
0-Ping
说明: W5500在STM32F103RC平台下实现基本ping 功能(W5500 realizes basic ping function on stm32f103rc platform)
- 2021-03-08 16:09:28下载
- 积分:1
-
<Proficient in LINQ data access technology C#> This is an introduction the...
这是一本介绍vs2008开发数据库的好书,用来连接Database system 系统- This is an introduction the development of databases of books vs2008, Database system used to connect the system
- 2022-08-11 11:39:16下载
- 积分:1
-
截屏程序
实现当前时间的屏幕截屏
- 2022-07-20 13:55:51下载
- 积分:1
-
AD_SOFT
用华北工控pc104嵌入式主板开发的ad数据采集系统应用于传感器采集处理(
您是不是要找: 用华北工控pc 104嵌入式主板开发的ad数据采集系统应用于传感器采集处理
NORCO pc104 with embedded motherboards developed ad data acquisition system applied to the sensor acquisition and processing)
- 2014-12-30 12:23:21下载
- 积分:1
-
Scientific-Calculator
用编译的科学计算器,代码详细,清楚。设计简单。(Scientific Calculator with compiled code in detail, clearly.)
- 2013-05-16 15:07:58下载
- 积分:1
-
IPM-OPF
程序用于求解电力系统最优潮流,采用原-对偶内点算法,并辅以文献,有利于对内点法的学习。(Procedures for solving optimal power flow, the use of primal- dual interior point algorithm, supplemented by literature, internal point of law in favor of learning.)
- 2021-03-22 09:29:17下载
- 积分:1
-
基于C、C++ 的五子棋实现代码
基于C、C++ 的五子棋实现代码
基于C、C++ 的五子棋实现代码
基于C、C++ 的五子棋实现代码
基于C、C++ 的五子棋实现代码
基于C、C++ 的五子棋实现代码
基于C、C++ 的五子棋实现代码
- 2022-04-20 16:21:54下载
- 积分:1