我想使用OpenCV對來自Bumblebee2相機的矯正圖像進行一些處理。我使用FlyCapture2和Triclops從傳感器獲取圖像並糾正它們。我想將TriclopsColorImage轉換成cv :: Mat以與OpenCV一起使用。將圖像從Triclops轉換爲opencv RGB圖像。
從TriclopsColorImage對象,我可以得到以下幾點:
int nrows; // The number of rows in the image
int ncols; //The number of columns in the image
int rowinc; //The row increment of the image
unsigned char * blue; //pixel data for the blue band of the image
unsigned char * red; //pixel data for the red band of the image
unsigned char * green; //pixel data for the green band of the image
我不知道如何將這種信息轉換爲CV ::墊的圖像,這樣我可以在它的工作。有人可以請指點我正確的方向嗎?
謝謝!奇蹟般有效。我剛剛提出了一個備用解決方案,我將其作爲替代方案發布,以備有人想知道。 – Jompa234 2013-04-05 14:20:05