How to apply mask in OpenCV

Updated post here: https://codeyarns.github.io/tech/2015-08-20-how-to-apply-mask-in-opencv.html

One thought on “How to apply mask in OpenCV

  1. cv::Mat in_mat; // Already created
    cv::Mat mask_mat; // Already created

    in_mat.setTo(cv::Scalar(255), mask_mat); // Set area of mask to value 255

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.