From the course: Code Clinic: Clojure

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Using OpenCV

Using OpenCV - Clojure Tutorial

From the course: Code Clinic: Clojure

Start my 1-month free trial

Using OpenCV

- [Narrator] In this video we'll get started using OpenCV in Clojure. I'm in the cv.clj file, and I'll define my namespace as thumb.cv. Next in a require expression, I'll pull in clojure.java.io as io. Now, I need to create an import expression, to pull in several Java classes. First from org.opencv.core, I'll pull in the Core and Mat classes, Mat stands for Matrix, and we'll use these classes throughout our solution. Next from org.opencv.highgui, we'll pull in the class Highgui, this is used to load the images. Next, from org.opencv.imgproc, we'll pull in the class Imgproc, this is used for image processing functions. Lastly, we'll call clojure.lang with RT. This will pull in the RT class, which we can use to load a dynamic library, which we'll do in just a moment. To use OpenCV, we need to load in its native library. Gonna do that inside of a defonce, so that this is only done once, if the file is reloaded in the REPL, call this opencv native dash loaded question mark. For its…

Contents