嘗試MFC和matlab的混合編程,按網上的例子,
1.先用matlab(2019a)寫了一個很簡單的小程式
new=imread("E:\zh\xuexiyong\CCDsdk\Demo-giveout\testbak.bmp");
[r,c]=size(new);
sum1=sum(new);
x=1:1:c;
plot(x,sum1,'-b');
運行出來是一個曲線圖:

2.然后生成dll,lib,h等后綴檔案。
在vs(2017)里頭專案屬性里添加了相關的目錄地址。
c++部分的基礎代碼:
#include "pch.h"
#include <iostream>
#include"test2.h"
int main()
{
if (!test2Initialize()) {
std::cout << "Could not initialize test2!" << std::endl;
return -1;
}
std::cout << "Hello World!\n";
}
運行后顯示:

轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/51465.html
標籤:界面
上一篇:運動目標檢測追蹤
下一篇:想基于邊緣的輪廓對區域進行提取
