如何在julia中读取二进制图像文件?
imread(file)
出现以下错误:
ERROR: type: Gray: in T, expected T<:Union(FixedPoint,FloatingPoint), got Type{Bool}
in imread at C:\Users\Harsh\.julia\v0.3\Images\src\io.jl:259
in imread at C:\Users\Harsh\.julia\v0.3\Images\src\io.jl:113
versioinfo的输出(true):
julia> versioninfo(true)
Julia Version 0.3.0
Commit 7681878 (2014-08-20 20:43 UTC)
Platform Info:
System: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz
WORD_SIZE: 64
Microsoft Windows [Version 6.3.9600]
uname: MINGW32_NT-6.2 1.0.12(0.46/3/2) 2012-07-05 14:56 i686 unknown
Memory: 7.948513031005859 GB (4763.9375 MB free)
Uptime: 111087.5328943 sec
Load Avg: 0.0 0.0 0.0
Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz:
speed user nice sys idle irq ticks
#1 2195 MHz 13078796 0 2444890 22142265 348375 ticks
#2 2195 MHz 10343718 0 1964375 25357578 165765 ticks
#3 2195 MHz 15137796 0 1628015 20899875 89390 ticks
#4 2195 MHz 15702750 0 1140187 20822718 73968 ticks
#5 2195 MHz 12287718 0 1952390 23425562 52781 ticks
#6 2195 MHz 9467671 0 1546562 26651421 49406 ticks
#7 2195 MHz 13431750 0 1668484 22565437 36375 ticks
#8 2195 MHz 12820796 0 1473484 23371359 30500 ticks
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3
Environment:
ANT_HOME = C:\PROGRA~1\APACHE~1.2
CUDA_BIN_PATH = C:\CUDA\bin64
CUDA_INC_PATH = C:\CUDA\include
CUDA_LIB_PATH = C:\CUDA\lib64
HOMEDRIVE = C:
HOMEPATH = \Users\Harsh
JAVA_HOME = C:\Progra~1\Java\jre6
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW
Package Directory: C:\Users\Harsh\.julia\v0.3
3 required packages:
- DataFrames 0.5.7
- DecisionTree 0.3.4
- Images 0.4.10
14 additional packages:
- ArrayViews 0.4.6
- BinDeps 0.3.5
- Color 0.3.8
- DataArrays 0.2.1
- FixedPointNumbers 0.0.4
- GZip 0.2.13
- Reexport 0.0.1
- SHA 0.0.3
- SIUnits 0.0.2
- SortingAlgorithms 0.0.1
- StatsBase 0.6.5
- TexExtensions 0.0.2
- URIParser 0.0.2
- Zlib 0.1.7
文件是这个二进制文件:
原始RGB图像是这样的,(已经过处理以获得上述文件)这不会给出错误。:
答案 0 :(得分:1)
这是一个错误,感谢报道。如果您执行Pkg.update()
,则应该修复。