这是为项目做的准备,将部分MATLAB函数的功能在C#上实现。完成标题中所说的功能,当然首先需要定义我自己的RGB类和HSI类。
RGB类:
///
<summary>
/// RGB colorspace
/// </summary>
public sealed class RGB
{
/// <summary>
/// Red component
/// </summary>
public byte Red;
/// <summary>
/// Green component
/// </summary>
public byte Green;
/// <summary>
/// Blue component
/// </summary>
public byte Blue;
/// <summary>
/// Index of Red component
/// </summary>
public const short R = 2 ;
/// <summary>
/// Index of Green component
/// </summary>
public const short G = 1 ;
/// <summary>
/// Index of Blue component
/// </summary>
public const short B = 0 ;
/// <summary>
/// Initializes a new instance of the RGB class
/// </summary>
public RGB() { }
/// <summary>
/// Initializes a new instance of the RGB class
/// </summary>
/// <param name="red"> Red component </param>
/// <param name="green"> Green component </param>
/// <param name="blue">
/// RGB colorspace
/// </summary>
public sealed class RGB
{
/// <summary>
/// Red component
/// </summary>
public byte Red;
/// <summary>
/// Green component
/// </summary>
public byte Green;
/// <summary>
/// Blue component
/// </summary>
public byte Blue;
/// <summary>
/// Index of Red component
/// </summary>
public const short R = 2 ;
/// <summary>
/// Index of Green component
/// </summary>
public const short G = 1 ;
/// <summary>
/// Index of Blue component
/// </summary>
public const short B = 0 ;
/// <summary>
/// Initializes a new instance of the RGB class
/// </summary>
public RGB() { }
/// <summary>
/// Initializes a new instance of the RGB class
/// </summary>
/// <param name="red"> Red component </param>
/// <param name="green"> Green component </param>
/// <param name="blue">