I test the following codes.
vsdk::Mat frame_map = lFrame.mUMat.getMat(vsdk::ACCESS_READ | OAL_USAGE_CACHED);
printf("channel is d%",frame_map.channels());
printf("rows is d%",frame_map.rows);
printf("cols is d%",frame_map.cols);
printf("depth is d%",frame_map.depth());
printf("elemSize is d%",frame_map.elemSize());
printf("elemSize1 is d%",frame_map.elemSize1());
printf("total is d%",frame_map.total());
printf("type is d%",frame_map.type());
result is:
channel is 2
rows is 960
cols is 1280
depth is 0
elemSize is 2
elemSize1 is 1
total is 1228800
type is 8
what’s meaning of “channel is 2”
OpenCV Error: Assertion failed (image.channels() == 1 || image.channels() == 3 || image.channels() == 4) in imwrite_, file /home/b45336/git/vsdk/opencv_src/modules/imgcodecs/src/loadsave.cpp, line 455
../src/sdi.cpp:1548/SeqEventHandler : [Note]: Grabber got Sequencer event number 4098.
Frame done message arrived #3.
../src/sdi.cpp:1566/SeqEventHandler : [Note]: Frame done.
terminate called after throwing an instance of 'cv::Exception'
what(): /home/b45336/git/vsdk/opencv_src/modules/imgcodecs/src/loadsave.cpp:455: error: (-215) image.channels() == 1 || image.channels() == 3 || image.channels() == 4 in function imwrite_
Aborted
Thanks,