小编ann*_*ohn的帖子

将C++与Go链接

我试图用Go绑定C++ OpenCV程序.我正在使用你如何使用cgo静态链接ac库的概念[1].我的myimgcom.cpp档案是:

/**
* @file SURF_FlannMatcher
* @brief SURF detector + descriptor + FLANN Matcher
* @author A. Huaman
 Edited: nnnnn
*/

#include <stdio.h>
#include <string>
#include <iostream>
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/nonfree/features2d.hpp"

using namespace cv;

void readme();

int mysurf( int myarg)
{

 string option1= "./Lenna.png";
 string option2= "./Lenna.png";

 if( myarg != 3 )
 { readme(); return -1; }

 std::cout << option1 << option2;

 Mat img_1 = imread( option1, CV_LOAD_IMAGE_GRAYSCALE ); …
Run Code Online (Sandbox Code Playgroud)

c++ opencv go cgo

6
推荐指数
1
解决办法
681
查看次数

标签 统计

c++ ×1

cgo ×1

go ×1

opencv ×1