English 中文(简体)
认可
原标题:EmguCV Colour Recognition
  • 时间:2011-11-06 17:15:57
  •  标签:
  • c#
  • emgucv

I m 试图制定一项方案,检测Rubiks cube的颜色:/></p>

<p>在对我迄今所掌握和运行情况进行筛选时,我基本上利用了“边缘探测”的范例,即带有 em状CV并用于探测小孔径的船舶(但正如你看到一些小孔径被探测到的,但我不想在此讨论这个问题)。</p>

<p>如今,在发现小孔径为WHERE之后,我想发现它们有什么样的颜色。</p>

<pre><code>if (current_colour.Hue > 120 && current_colour.Hue < 170)
{
     Colours[(int)colornames.W]++;
}
else if (current_colour.Hue > (170))
{
     Colours[(int)colornames.R]++;
}
else if (current_colour.Hue > 5 && current_colour.Hue < 20 )
{
     Colours[(int)colornames.O]++;
}
else if (current_colour.Hue > 47 && current_colour.Hue< 60)
{
     Colours[(int)colornames.G]++;
}
else if (current_colour.Hue > 15 && current_colour.Hue < 30)
{
     Colours[(int)colornames.Y]++;
}
else if (current_colour.Hue > 100 && current_colour.Hue < 110)
{
     Colours[(int)colornames.B]++;
}
</code></pre>

<p>where the values for each colour I got from trial and error using photoshop...I am sure there must be some better way as Im getting results that are jumbled up (especially with the white and red)
Any help?</p>
    </div>

           </div>
   
      <div class=

最佳回答

如果你的形象像你那样简单,你就能够用自己的图画。 贵方克的峰值将与你使用的颜色相对应。

因此,你必须做一图或三面,带上10(或不管怎样)最高双面价值,远远超出彼此,并且有你的肤色。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...