Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

How to read binary image file in julia? imread(file) gives following error:

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

Output of 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

file is this binary file:

Image Link

Original RGB image is this, (which has been processed to obtain the above file) This does not give error.:

enter image description here

share|improve this question
    
Can you post the output of versioninfo(true) and what the contents of the file variable is? –  ivarne Sep 20 at 13:05

1 Answer 1

This was a bug, thanks for reporting it. It should be fixed if you do a Pkg.update().

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.