ios - Objective C unsharp mask filter Xcode -
what efficient way create unsharp mask filter in objective c targeting ios? best implement open source imagemagick or build scratch.
i think basic formula follows (please comment if have not gotten right).
- duplicate original
- blur duplicate (gaussian)
- blend original via "difference"
- use result mask original
- increase contrast in unmasked areas of original.
core image has ciunsharpmask filter built-in, although i'm not sure if it's available on ios yet. brad larson's gpuimage framework has unsharp mask filter.
both methods should fast , easier implement cross-compiling imagemagick or writing own.
Comments
Post a Comment