Closed weidtn closed 3 years ago
what project.clj are you using ?
opencv-native is hosted here: http://repository.hellonico.info/#browse/browse:hellonico:opencv%2Fopencv-native
You should have somewhere a reference to that repository:
:repositories [["vendredi" {:url "https://repository.hellonico.info/repository/hellonico/"}]
It's in the templates by default.
We can do a zoom/googlemeet or chat on slack https://origami-hyj7796.slack.com/archives/C02B4N0E1TR
To get you started ASAP
I just started a new project with clj-new then added this to the deps.edn:
:deps {org.clojure/clojure {:mvn/version "1.10.1"}
origami/origami {:mvn/version "4.5.1-7"}
Then when running the project with clj -M -m name.clj
it starts downloading the dependencies but shows the error from before
Ah ... clj does not download the deps the way lein/maven do it. You can take example from this deps.edn:
https://github.com/hellonico/origami_samples/blob/master/deps.edn
{:mvn/repos
{
"vendredi" {:url "https://repository.hellonico.info/repository/hellonico/"}
}
:deps {
origami {:mvn/version "4.5.1-6"}
origami/filters {:mvn/version "1.29"}
; using master
; origami {:git/url "https://github.com/hellonico/origami" :deps/manifest :mvn :sha "816ad908efac02050581f46a1763e1f98ce0695e"}
; origami {:mvn/version "4.3.0-6" :exclusions [opencv/opencv-native]}
; opencv/opencv-native {:mvn/version "4.3.0-6" :classifier "osx_64"}
; opencv/opencv-native {:mvn/version "4.3.0-6" :classifier "limux_64"}
; opencv/opencv-native {:mvn/version "4.3.0-6" :classifier "windows_64"}
}
}
or simply
{:mvn/repos
{
"vendredi" {:url "https://repository.hellonico.info/repository/hellonico/"}
}
:deps {
origami {:mvn/version "4.5.1-6"}
origami/filters {:mvn/version "1.29"}
}
}
That works. Thanks. Maybe you can add this as a snippet in the readme for clj-cli users?
:mvn/repos
{
"vendredi" {:url "https://repository.hellonico.info/repository/hellonico/"}
}
I did not find the examples as they are in another repo that appears to not be linked in here.
Should be in the docs already: http://origamidocs.hellonico.info/#/units/guide?id=_2-minutes-intro-using-clj
But maybe hard to find... :/
Supposing you have the new
alias setup in (~/.clojure/deps.edn)
:aliases
{:new {:extra-deps {com.github.seancorfield/clj-new {:mvn/version "1.1.331"}}
:exec-fn clj-new/create
:exec-args {:template "app"}}}
This is the command to generate a project with the template:
clojure -X:new :template clj-opencv :name hellonico/origami :force true
Then
cd hellonico/origami
clj
Within the REPL:
(->
(imread "resources/lena.png")
(cvt-color! COLOR_RGB2GRAY)
(canny! 300.0 100.0 3 true)
(bitwise-not!)
(u/resize-by 0.5)
(imwrite "lena.png"))
Could you try it and see if it works for you ? Then I will add that in the http://origamidocs.hellonico.info/
@hellonico thank you for making this library. This is topic is solved, however I have a general question: Is there a special reason, why you use your own maven repository. Are there any advantages over uploading it to maven central under your own organisation id (e.g. hellonico/open-cv-native)? Since the claim of origami is the "Lowest barrier of entry ", this would be one step less required to start. Just include the origami dependency and start using it :)
i had numerous problems in the past ... but in 2022, that would be awesome ! wanna help ?
When running my clojure file for the first time it tries to download a wrong opencv-native version i think:
Error building classpath. Could not find artifact opencv:opencv-native:jar:4.5.1-0 in central (https://repo1.maven.org/maven2/)
2.4.6.1
is the only one I find.