C++多媒體處理庫 libCVD
libCVD 是一個高可移植和具備高性能的用于處理計算機視覺、圖像、視頻的C++庫。其重點是提供簡單高效的高質量的圖形和視頻處理方法。
示例代碼:
#include <cvd/image_io.h>
//Very cheap and cheerful X window with OpenGL capabilities
#include <cvd/videodisplay.h>
//OpenGL wrappers for various CVD types
#include <cvd/gl_helpers.h>
using namespace CVD;
int main()
{
Image<Rgb<byte> > in;
in = img_load("test_image.jpg");
//Create an OpenGL window with the dimensions of `in'
VideoDisplay window(in.size());
glDrawPixels(in);
glColor3f(1,0,0);
glBegin(GL_LINES);
glVertex(in.size()/2);
glVertex(in.size());
glEnd();
glFlush();
std::cin.get();
return 0;
}
本文由用戶 openkk 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!