上QQ阅读APP看书,第一时间看更新
There's more...
In this recipe, the start and end positions of the iterator were obtained using the begin and end template methods. As we did in the first recipe of this chapter, we could also have obtained them using a reference to a cv::Mat_ instance. This would avoid the need to specify the iterator type in the begin and end methods since this one is specified when the cv::Mat_ reference is created:
cv::Mat_<cv::Vec3b> cimage(image); cv::Mat_<cv::Vec3b>::iterator it= cimage.begin(); cv::Mat_<cv::Vec3b>::iterator itend= cimage.end();