OpenCV C++, getting Region Of Interest (ROI) using cv::Mat -
i'm new opencv (started using 2 days ago), i'm trying cut hand image depth image got kinect, need hand image gesture recognition. have image cv::mat type. questions are:
- is there way convert
cv::matcvmatcan usecvgetsubrectmethod region of interest? - are there methods in
cv::matcan use getting part of image?
i wanted use iplimage read somewhere cv::mat preferred way now.
you can use overloaded function call operator on cv::mat:
cv::mat img = ...; cv::mat subimg = img(cv::range(0, 100), cv::range(0, 100)); check opencv documentation more information , overloaded function takes cv::rect. note using form of slicing creates creates new matrix header, not copy data.
Comments
Post a Comment