                                (if (some #(similar-rect (Imgproc/boundingRect %) (Imgproc/boundingRect c)) cs)
                                  cs
                                  (conj cs c)))
-                             []))]
+                             []))
+          card-props (atom [])]
 
       ;(clojure.pprint/pprint (map #(Imgproc/boundingRect %) cards))
 

                             :else :shaded)

                  ]

              (Imgproc/putText drawing #_(str (round inside-h) "/"
                                            (round outside-h) "/"

                ))))


        )
      (let [sets (find-sets @card-props)]
        (doseq [[s i] (map vector sets (range (count sets) 1 -1))
                :let [color (Scalar. (rand-int 255) (rand-int 255) (rand-int 255))]]
          ;(Imgproc/drawContours drawing (map :contour s) -1 color (* 30 i))
          (doseq [c s]
            (Imgproc/rectangle drawing
                               (point-sub (.br (:bb c))
                                          (Point. 300 (* 100 (inc i))))
                               (point-sub (.br (:bb c))
                                          (Point. 0 (* 100 i))) color -1))
          ))
      )



    (comment
      (let [pairs (map vector
