本文是小编为大家收集整理的关于OpenIMAJ Jar文件的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。
问题描述
我是OpenImaj的新手,我想使用它处理一些图片.有很多教程可用,但他们都告诉使用Maven.有人知道我可以下载openimaj的jar文件以直接在我的Java项目中使用吗? 谢谢!
推荐答案
OpenImaj非常复杂,并且包含许多模块,您可能不需要在项目中使用这些模块(即,如果您做某事要进行图像处理,您可能不太在乎音频分析,或网页的内容分析).此外,每个OpenIMAJ模块都对许多其他项目(本身具有依赖性等)都有依赖性.由于这些原因,直接下载所有模块及其依赖项并不是什么实用的,因为用户需要一项令人难以置信的努力来尝试确定需要哪些位,而哪些位却不是.
指定所需的openimaj位的理想方法是使用自动依赖关系管理系统;但是,这不需要做些 - 任何Maven兼容的依赖管理器都可以使用(即IVY,SBT,葡萄等...).您需要在 OpenImaj首页上 openimaj首页正确(您可能需要向下滚动一点).
如果您确实想在现有项目中手动将相关的JAR文件手动包含在内,我建议使用Maven根据您需要的确切的OpenIMAJ模块来构建自定义的JARS集合:
- 运行mvn -DarchetypeRepository=http://maven.openimaj.org -DarchetypeArtifactId=openimaj-quickstart-archetype -DarchetypeGroupId=org.openimaj -DarchetypeVersion=1.2.1 -DartifactId=oi-deps -DgroupId=oi-deps -Dversion=1.0-SNAPSHOT -DinteractiveMode=false archetype:generate创建一个基本的OpenIMAJ项目(在这种情况下称为oi-deps).
- 转到oi-deps目录:cd oi-deps
- 编辑pom.xml文件仅包括您所需的openimaj的位来删除任何不必要的<dependency>部分.
- 运行mvn dependency:copy-dependencies.这将创建一个target/dependencies文件夹,其中包含您需要添加到项目的所有罐子.
其他推荐答案
对于OpenImaj的所有功能,您需要单独下载超过50个JAR文件.另外,如果您以某种方式设法在Internet上手动找到所有这些文件,则最终可能会混合一些或其他版本,这会使某些类不兼容.尽管我强烈建议您尝试了解Maven是什么及其功能,但是如果您不想使用Maven添加依赖项,甚至不想知道它是什么.
1.)转到帮助菜单 - >开放市场.
2.)搜索Maven并下载插件.
3.)在文件菜单中创建新 - >新的Maven项目
4.)选择您的工作空间,然后单击"下一步"
5.)在"选择原型"窗口中查看添加原型并输入以下详细信息
GroupID: org.openimaj ArtifactID: openimaj-quickstart-archetype version: 1.1 URL: http://maven.openimaj.org/
6.)单击下一步并提供您自己的项目的详细信息,然后单击"完成"
将下载所有罐子,您可以在项目结构中看到.现在,您可以停止担心Maven并开始专注于OpenImaj.
其他推荐答案
我也找不到任何"下载"网站.我认为原因是某些JAR文件中有很多依赖.
我最近提取了一些罐子,以便在没有Maven的项目中使用,但这很巧妙. 而且我只能使用Maven的另一个项目来做到这一点.
我认为Maven是好东西,易于在IE中使用. Netbeans.所以尝试一下.
问题描述
I am new to openIMAJ and I want to process some pictures using it. There are a lot of tutorial available but they all tell using Maven. Does anyone know from where I can download the jar files of openIMAJ to directly use in my Java project? Thanks!
推荐答案
OpenIMAJ is rather complex and contains a lot of modules that you probably don't need to use in your project (i.e. if your making something to do image processing, you probably don't care to much about audio analysis, or content analysis of web-pages). In addition each of the OpenIMAJ modules has dependencies on numerous other projects (which themselves have dependencies, and so on). For these reasons, it isn't really all that practical to provide direct downloads of all the modules and their dependencies as it would take an incredible effort for the user to try and figure out which bits are needed and which bits are not.
The ideal way to specify which bits of OpenIMAJ you need is to use an automatic dependency management system; this does not need to be Maven however - any Maven compatible dependency manager will work (i.e. Ivy, SBT, Grape, etc...). There are examples of the snippets you need to add to your build system configuration for these on the OpenIMAJ front page in the box on the right (you might need to scroll down a bit).
If you really do want to manually include the relevant jar files in your existing project, I'd recommend the following approach, which uses Maven to build a customised set of jars based on the exact OpenIMAJ modules you need:
- Run mvn -DarchetypeRepository=http://maven.openimaj.org -DarchetypeArtifactId=openimaj-quickstart-archetype -DarchetypeGroupId=org.openimaj -DarchetypeVersion=1.2.1 -DartifactId=oi-deps -DgroupId=oi-deps -Dversion=1.0-SNAPSHOT -DinteractiveMode=false archetype:generate to create a basic OpenIMAJ project (called oi-deps in this case).
- Go to the oi-deps directory: cd oi-deps
- Edit the pom.xml file to include only the bits of OpenIMAJ you need by removing any unnecessary <dependency> sections.
- Run mvn dependency:copy-dependencies. This will create a target/dependencies folder that contains all the jars you need to add to your project.
其他推荐答案
For all the features of OpenIMAJ there are more than 50 Jar file that you need to Download individually. Also if you somehow manage to find all those files manually on internet you may end up mixing some or other version which will make some classes incompatible. Although I would strongly suggest you to try understand what maven is and its capabilities, you can follow the below steps if you dont want to add dependencies using maven or even don't even want to know what it is.
1.) Go to Help Menu -> Open MarketPlace.
2.) Search for maven and download the plugin.
3.) In file menu create new-> new maven project
4.) Select your workspace and click next
5.) In the select an Archetype window look for add archetype and enter the following details
GroupID: org.openimaj ArtifactID: openimaj-quickstart-archetype version: 1.1 URL: http://maven.openimaj.org/
6.) Click next and give details of your own project and click finish
All the jars will be downloaded which you can see in your project structure. You can now stop worrying about maven and start concentrating on openimaj.
其他推荐答案
I also didn't find any 'download all' site. And I think the reason is that there are a lot of dependences in some jar files.
I extracted some jars recently to use in a project without maven but that was quite wiry. And I was only able to do this using another project with maven.
I think maven is good stuff and easy to use within ie. netbeans. So give it a try.