hellonico / origami

Lowest barrier of entry to Image Processing, Computer Vision and Neural Networks on the JavaVM
https://hellonico.github.io/origami-docs/#/
Eclipse Public License 1.0
122 stars 7 forks source link

simple debug info for mats #93

Closed hellonico closed 1 year ago

hellonico commented 1 year ago

(defn info
  ([out] (info out "mat" false))
  ([out debug-name] (info out debug-name false))
  ([out debug-name debug]
  (clojure.pprint/print-table
    [
     {:header "name" :value debug-name}
     {:header "class" :value (.getName (.getClass out))}
     {:header "dims" :value (.dims ^Mat out)}
     {:header "chans" :value (.channels out)}
     {:header "height" :value (int (.-height (.size out)))}
     {:header "width" :value (int (.-width (.size out)))}
     {:header "type" :value (.type out)}
     {:header "submat?" :value (.isSubmatrix out)}
     ])))