Skip to content

Commit 420c2b9

Browse files
committed
numerical-linear-algebra - svd - actually taking the first image
1 parent ededcca commit 420c2b9

File tree

1 file changed

+10
-9
lines changed
  • projects/math/numerical-linalg/notebooks

1 file changed

+10
-9
lines changed

projects/math/numerical-linalg/notebooks/svd.clj

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,16 @@
5454
;; frame and convert it to an image:
5555

5656
(def first-image
57-
(reduce (fn [_ frame] (clj-media.model/image
58-
frame))
59-
(take 1)
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

6768
first-image
6869

0 commit comments

Comments
 (0)