Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/364.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
im4java读取图像_Java_Image_Im4java - Fatal编程技术网

im4java读取图像

im4java读取图像,java,image,im4java,Java,Image,Im4java,我尝试使用im4java库读取Java中的图像: File file = new File("img\\test.jpg"); Info imageInfo = new Info(file.getPath(),true); 问题是Info()无法识别图像。异常被称为: Exception in thread "main" org.im4java.core.InfoException: org.im4java.core.CommandException: java.io.IOExcep

我尝试使用im4java库读取Java中的图像:

File file = new File("img\\test.jpg");
Info imageInfo = new Info(file.getPath(),true);
问题是Info()无法识别图像。异常被称为:

Exception in thread "main" org.im4java.core.InfoException: org.im4java.core.CommandException:      java.io.IOException: Cannot run program "identify": CreateProcess error=2, The sistem can not find the specific file.
at org.im4java.core.Info.getBaseInfo(Info.java:360)
at org.im4java.core.Info.<init>(Info.java:151)
at FeatureExtractor.main(FeatureExtractor.java:51)
错误是:

org.im4java.core.CommandException: org.im4java.core.CommandException: Specification not valid.
at org.im4java.core.ImageCommand.run(ImageCommand.java:219)
at FeatureExtractor.main(FeatureExtractor.java:28)

您可以设置ImageMagick安装的搜索路径,然后重试: setGlobalSearchPath($PATH:)

org.im4java.core.CommandException: org.im4java.core.CommandException: Specification not valid.
at org.im4java.core.ImageCommand.run(ImageCommand.java:219)
at FeatureExtractor.main(FeatureExtractor.java:28)