English 中文(简体)
发现先天缺陷? 开放C 2.3V, c++, 配有MS视觉演播室
原标题:Finding convex defects? in OpenCV 2.3, c++ with MS Visual Studio2010

I am currently attempting to use OpenCV 2.3 and c++ to detect a hand (wearing a green glove), and distinguish between different hand gestures.

此时此刻,我下一步是获取手上的具体特征(复杂的缺陷)。

迄今为止,我已在我的工作中利用了这些职能:

mixChannels(); //to subtract non-green channels from green. 
threshold(); //to convert to binary
erode(); dialate(); //to get rid of any excess noise
findContours(); //to find contours of course

通过使用<代码>drawContours(<>)。

Next step, and this is where I m at, is using convexHull(), which also works in OpenCV 2.3. I have however yet to find out how the vector results of convexHull() actually look (what features they contains).

但是,这是trick尽的。

我发现,较老的开放式的版本(使用<代码>IplImage)几乎没有什么功能称为cvConvexityDefects(),从而在轮椅上造成一系列缺陷。 这些都是我所需要的,但开放式公民团体2.3似乎没有这种职能,我看不出我如何利用旧的辛迪加来取得这些结果。

这里有 链接到开放式中心文件cvConvDefects<<>>>>>>。

我要求的是,要么是类似的开放CV 2.3功能,要么是找到这些缺陷的自成文法或算法。 或者使用原2.1辛奈的病媒结果或类似情况的方法。

(我知道,我可以使用其他特征、直截了当的箱子和合适的圈子。) 但我确信,先天缺陷会产生最可区分的特点。

Solution - I ended up using a c++ wrapper from this post The only thing not working for this wrapper seems to be a leek of the defects vector, which should be easily solvable.

下一步是从这些缺陷中获得一些可用数据。 (第一 gl。) 这些数据似乎是汇合点的单一点。 Hu或 Con或 count。 我最初预计有两点,即一点和长点,似乎不是这样。 如果我打碎砖墙,我就再打另一个哨所。

最佳回答

新的C++接口不支持C的所有职能。 反之亦然(并非一切都存在)。 原因多种多样,但好消息是,你可以轻松地利用你想要的任何功能。 例如,在座各位必须把轮.转换成序列(CvSeq),并将其送至您。

此外,“FindContours”方法比“vFindContours”是一种包装。 你们可以称之为

cvFindContours((IplImage*)matImage, ...);

然后直接使用结果。

另一种办法是,在CvConvexDefects(CvConvexDefects)上建立一个冰层、清洁的C++包装仪,并将其提交给开放CV。 在发现场景中,你会为此找到一些帮助(相反的转变)。

问题回答

我谨试图改变我的轮 to。 病媒从C++的yn到你所提到的顺序,但我不知道何时开始。 或许你可以就此提出一些看法?

在这里,我要谈谈这个问题。

C++ 露天





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

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 ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签