I'm getting the following error when I try to use Matlab's jpeg toolbox to read a jpeg Image:
Attempt to execute SCRIPT jpeg_read as a function
Although I'm not sure (because I got the toolbox together with the code I'm supposed to run), I believe everything that must be compiled already is. The files inside the toolbox folder are:
vec2im.m
quantize.m
jpeg_write.mexmaci64
jpeg_write.mexmaci
jpeg_write.mexa64
jpeg_write.m
jpeg_write.dll
jpeg_write.c
jpeg_read.mexmaci64
jpeg_read.mexmaci
jpeg_read.mexa64
jpeg_read.m
jpeg_read.dll
jpeg_read.c
jpeg_qtable.m
im2vec.m
ibdct.m
dequantize.m
bdctmtx.m
bdct.m
version is 1.4, the same as in http://www.philsallee.com/jpegtbx/index.html . I've added the folder to Matlab's path already. The call to the function jpeg_read is done as:
jpeg_read(path_to_image)
I'm trying to run it on Matlab R2011a, under windows 7 64.
Thanks in advance!
You do not have the mex file for windows. You should have a compiled library jpeg_read.mexw64
as well as jpeg_write.mexw64
. Since it seems like you have the source code all you need is to compile them in Matlab:
>> mex -largeArrayDims -O jpeg_read.c
>> mex -largeArrayDims -O jpeg_write.c
Before you run these commands make sure you have a mex compiler setup:
>> mex -setup
I usually use visual studio compiler on windows machines.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.