How can I do image processing operations only in ROI part of original image directly?

前端 未结 3 1614
遇见更好的自我
遇见更好的自我 2021-01-03 15:49

Is that possible by using OpenCV to do some image processing operations only in ROI part of original image?

I search some articles on Internet. Most of codes look li

3条回答
  •  执笔经年
    2021-01-03 16:38

    To blur the required region follow the following steps:

    cv::Rect roi(x, y, w, h);
    cv::GaussianBlur(image(roi), image(roi), Size(0, 0), 4); 
    

    Follow this link for more information http://docs.opencv.org/modules/core/doc/basic_structures.html#id6

    Mat::operator()(Range rowRange, Range colRange)

    Mat::operator()(const Rect& roi)

提交回复
热议问题