This repository has been archived by the owner on May 3, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move "split img to base + detail" logic to img module
- Loading branch information
1 parent
aebbbfe
commit 63280ea
Showing
2 changed files
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from guided_filter.core.filters import FastGuidedFilter | ||
|
||
def split(img): | ||
gf = FastGuidedFilter(img, 16, 2, 4) | ||
base = gf.filter(img) | ||
detail = img / 255.0 - base | ||
return (base, detail) |