Skip to content

Commit e8f8be6

Browse files
committed
tensor images - wip
1 parent b7ad33c commit e8f8be6

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/dtype_next/image_processing_with_tensors.clj

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
max-height:400px;
2828
overflow-y: auto;
2929
}
30-
.printed-clojure {
30+
.printedClojure {
3131
max-height:400px;
3232
overflow-y: auto;
3333
}
@@ -130,8 +130,12 @@ original-tensor
130130
(bufimg/image-type original-img)
131131

132132
;; `:type-3byte-bgr` indicates BGR byte order (Blue-Green-Red), which is Java's
133-
;; internal format. However, `bufimg/as-ubyte-tensor` automatically converts to
134-
;; RGB order for us, so we can treat it as RGB in our code.
133+
;; internal BufferedImage format. The question is: does `bufimg/as-ubyte-tensor`
134+
;; preserve BGR order or convert to RGB?
135+
;;
136+
;; We'll assume RGB order in this tutorial (which is the common convention), but
137+
;; if colors appear incorrect, you may need to swap channels. You can verify by
138+
;; checking if the red channel actually contains red values in your specific image.
135139

136140
(def height
137141
(first (dtype/shape original-tensor)))
@@ -1213,3 +1217,5 @@ gaussian-5x5
12131217
;; ---
12141218

12151219
;; *Questions, corrections, or ideas? Open an issue on the Clojure Civitas repository.*
1220+
1221+

0 commit comments

Comments
 (0)