Conert Code C ++ to C#? (OPEN CV ===> EMGU CV) [英] Conert Code C++ to C# ? ( OPEN CV ===> EMGU CV)

查看:87
本文介绍了Conert Code C ++ to C#? (OPEN CV ===> EMGU CV)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi

Conert Code C ++如何进行C#? (OPEN CV ===> EMGU CV)







hi
how do Conert Code C++ to C# ? ( OPEN CV ===> EMGU CV)



#include <cv.h>
#include <highgui.h>
#include <iostream>
#include <cmath>

using namespace std;

#define blue  CV_RGB(0,0,255)
#define green CV_RGB(0,255,0)
#define red   CV_RGB(255,0,0)
#define white CV_RGB(255,255,255)
#define black CV_RGB(0,0,0)

void ClearScreen(IplImage* imgScribble, IplImage* imgDrawing)
{
    cvSet(imgScribble, black);
    cvSet(imgDrawing, white);
}










IplImage* GetThresholdedImage(IplImage* img, CvScalar& lowerBound, CvScalar& upperBound)
{
    // Convert the image into an HSV image
    IplImage* imgHSV = cvCreateImage(cvGetSize(img), 8, 3);
    cvCvtColor(img, imgHSV, CV_BGR2HSV);

    IplImage* imgThreshed = cvCreateImage(cvGetSize(img), 8, 1);

    cvInRangeS(imgHSV, lowerBound, upperBound, imgThreshed);

    cvReleaseImage(&imgHSV);
    return imgThreshed;
}















教程:

http://www.emgu.com/wiki/index.php/Tutorial [ ^ ]

推荐答案

请勿转换。改写。你找到了这个教程。您可能拥有OpenCV的文档。 .net版本有详细记载: http://www.emgu.com/wiki/ files / 2.3.0 / document / Index.html [ ^ ],以及自我记录。

所以,继续这样做。
Do not convert. Rewrite. You have found the tutorial. You probably have the documentation on OpenCV. The .net edition is well documented: http://www.emgu.com/wiki/files/2.3.0/document/Index.html[^], and self-documenting also.
So, go ahead and do it.


这篇关于Conert Code C ++ to C#? (OPEN CV ===&gt; EMGU CV)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆