atilimcetin / guided-filter

Fast and complete guided filter implementation for OpenCV
MIT License
357 stars 113 forks source link

Feathering only edges? #4

Open antithing opened 3 years ago

antithing commented 3 years ago

Hi, and thank you for making this code available! I am trying top use it to clean up edges (as in the feathering example). This works great, but it is also adding grey noise to the rest of the image. Am I doing something wrong?

filter

Using the settings:

           int r = 60;
      double eps = 1e-6;
      eps *= 255 * 255;  

      cv::resize(image, image, cv::Size(1920, 1080));
      cv::Mat matte = segmentor.Predict(image, "person");
      cv::Mat q = guidedFilter(image, matte, r, eps);

What can I do to keep the feathering to the edges only?

mxjones commented 2 years ago

@antithing Did you manage to find a way forwards on this?