2010-12-11 52 views

回答

4

我用重量在過去,它是非常有用,儘管體積龐大。它的膨脹與支持各種網頁瀏覽器有關,因此在某些情況下它是一個功能。

如果您更緊密的與金屬的程序員,我建議PION,並使用你的一些網頁製作技巧實現你的GUI:

http://www.pion.org/projects/pion-network-library

您可以使用OpenCV的使用幾乎所有的網絡庫都在那裏。你選擇一個良好的複習可以在這裏找到在計算器上:

https://stackoverflow.com/questions/175507/c-c-web-server-library

1

我想你問什麼是可能的重量。我無法預見在Wt中連接OpenCV的問題,並且系統絕對具有足夠的交互性,足以提供您描述的功能。首先使用服務器端操作來實現它,如果需要,您仍然可以使用少量的客戶端JS優化部件。

0

FWIW,這是一個簡單的代碼來顯示圖像的OpenCV(可能改變圖像的應用程序正在運行時):

Wt::WMemoryResource* cvMat2res(const cv::Mat& img){ 
    std::vector<uchar> buf; 
    cv::imencode(".png",img,buf); // by default, the fastest compression 
    auto ret=new Wt::WMemoryResource(this); 
    ret->setMimeType("mime/png"); 
    ret->setData(buf); // data is copied here 
    return ret; 
} 

/* ... */ 
auto img=new Wt::Image(); 
root()->addWidget(img); 
Wt::WMemoryResource* imgRes=nullptr; 

/* set image data; this can be done also in event handler and the image updates itself automatically from the new resource */ 
if(imgRes) delete imgRes; 
imgRes=cvMat2res(cvImage); 
img->setImageLink(imgRes);