   ([img x1 y1 x2 y2 col fill?]
      (Core/rectangle img (Point. x1 y1) (Point. x2 y2) col (if fill? Core/FILLED 1))))
 
+(defn matrix-multiplication [m1 m2]
+  (let [res-mat (Mat.)]
+    (Core/gemm h p2 1  (Mat.) 0 res-mat 0))
+    res-mat
+  )
 ;; ----------------------------------------------------------------
 ;; Feature detection
 ;; ----------------------------------------------------------------



  (def iv1 [i1 i2 i3 i4 i5])
  (def iv2 [i5 i6])
  (def s123456789 (reduce stitch iv1))
  (write-image "test_stitches/1/s56789.jpg" s56789)

)

        dists   (map #(.distance %) matches)
        d-min (apply min dists)
        d-max (apply max dists)
        good (filter (fn [x] (<= (.distance x) (max (* 5 d-min) 0.005))) matches)]
    (dmatch-mat good)))

(defn calculate-homography [img-a img-b]
