   (s/keys :opt-un [::color-flag ::to-rgb ::output]))
 
 (defn decode-image
-  "Decodes an image from an input stream"
+  "Decodes an image from an input stream with OpenCV
+    `input-stream`: `InputStream` - Contains the binary encoded image
+    `color-flag`: 0 or 1 - Convert decoded image to grayscale (0) or color (1)
+    `to-rgb`: boolean - Whether to convert decoded image to mxnet's default RGB
+            format (instead of opencv's default BGR)
+    `output`: nil or `NDArray`
+    returns: `NDArray` with dtype uint8
+
+  Ex:
+    (decode-image input-stream)
+    (decode-image input-stream {:color-flag 1})
+    (decode-image input-stream {:color-flag 0 :output nd})"
   ([input-stream {:keys [color-flag to-rgb output]
                   :or {color-flag COLOR to-rgb true output nil}
                   :as opts}]

  (s/or :none nil? :some ::to-rgb))

(defn read-image
  "Reads an image file and returns an ndarray"
  ([filename {:keys [color-flag to-rgb output]
              :or {color-flag nil to-rgb nil output nil}
              :as opts}]

   (apply-border input top bottom left right {})))

(defn fixed-crop
  "Return a fixed crop of the image.
   `input`: `NDArray` - Source image in NDArray
   `x0`: int - Starting x point
   `y0`: int - Starting y point
   `w`: int - Width of the image
   `h`: int - Height of the image
   returns: cropped `NDArray`

   Ex:
     (fixed-crop nd-img 0 0 28 28)
     (fixed-crop nd-img 10 0 100 300)"
  [input x0 y0 w h]
  (util/validate! ::ndarray input "Invalid input array")
  (util/validate! ::int x0 "Invalid starting x coordinate")
