File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
projects/math/numerical-linalg/notebooks Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change 5454; ; frame and convert it to an image:
5555
5656(def first-image
57- (reduce (fn [_ frame] (clj-media.model/image
58- frame))
59- nil
60- (clj-media/frames
61- (clj-media/file video-path)
62- :video
63- {:format (clj-media/video-format
64- {:pixel-format
65- :pixel-format/rgba })})))
57+ (first
58+ (into []
59+ (comp (take 1 )
60+ (map clj-media.model/image))
61+ (clj-media/frames
62+ (clj-media/file video-path)
63+ :video
64+ {:format (clj-media/video-format
65+ {:pixel-format
66+ :pixel-format/rgba })}))))
6667
6768first-image
6869
@@ -86,7 +87,7 @@ first-image
8687; ; the images to a lower resolution, and
8788; ; turn them to gray-scale.
8889
89- ; ; See [Luma](https://en.wikipedia.org/wiki/Luma_(video)
90+ ; ; See [Luma](https://en.wikipedia.org/wiki/Luma_(video))
9091; ; for discussion of the gray-scale formula:
9192; ; 0.299 ∙ Red + 0.587 ∙ Green + 0.114 ∙ Blue
9293
You can’t perform that action at this time.
0 commit comments