HK MVS Camera Used in OpenCV

1.Open Samples_LinuxSDK.

2.In demo, there’re many examples such as display, GrabImage, ImageProcess etc.

3.But if we want to use the image in OpenCV, format should be changed.

4.In ImageProcess.cpp, after line:

fwrite(pDataForRGB, 1, stConvertParam.nDstLen, fp);

we add :

cv::Mat src(stImageInfo.nWidth, stImageInfo.nHeight, CV_8UC3, pDataForRGB);

Then we could use the image proceesing algorithm in OpenCV to process the image if we want.

猜你喜欢

转载自blog.csdn.net/lxy_2011/article/details/79655051
HK