Initial commit: video effects processing system
Add S-expression based video effects pipeline with modular effect definitions, constructs, and recipe files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
13
sexp_effects/effects/threshold.sexp
Normal file
13
sexp_effects/effects/threshold.sexp
Normal file
@@ -0,0 +1,13 @@
|
||||
;; Threshold effect - converts to black and white
|
||||
;; @param level int [0, 255] default 128
|
||||
;; @param invert bool default false
|
||||
|
||||
(define-effect threshold
|
||||
((level 128) (invert false))
|
||||
(map-pixels frame
|
||||
(lambda (x y c)
|
||||
(let* ((lum (luminance c))
|
||||
(above (if invert (< lum level) (> lum level))))
|
||||
(if above
|
||||
(rgb 255 255 255)
|
||||
(rgb 0 0 0))))))
|
||||
Reference in New Issue
Block a user