Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void filter2(const cv::Mat &image, cv::Mat &out)
- {
- CV_Assert(!image.empty() && (image.type() == CV_8UC3));
- out.create(image.rows / 2, image.cols / 2, image.type());
- for (int i = 0; i < out.rows; i++) {
- for (int j = 0; j < out.cols; j++) {
- out.at<cv::Vec3b>(i, j) = image.at<cv::Vec3b>(i * 2, j * 2);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement