View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

4.0 | 21 ratings Rate this file 39 Downloads (last 30 days) File Size: 1.94 MB File ID: #2682 Version: 1.0




11 Nov 2002 (Updated )

Reads and writes files in the new JPEG 2000 image format.

| Watch this File

File Information

This is just an inteface to the external program "jasper" that can code/decode JPEG 2000 images (.JP2/.JPC). Todays version of jasper (1.6) do not support all features folly in the full specification of JPEG 2000.
You need to have the free available program "jasper" installed at your search path to make it working. You can find it here:


This file inspired Jpeg Compression.

MATLAB release MATLAB 6.5 (R13)
Other requirements The free "jasper" softwere. Works on unix platform, Windows not tested but minor changes may be needed. The for erlier versions of matlab
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (37)
21 Jul 2016 zeeshan akhtar

It is not clear how to use this code. It has been written that we have to install jasper, but how to link it with mail file is not mentioned.

23 Jul 2015 Ning Zhigang Ning Zhigang

Dear peter
I need JPEG2000 encoder, but I don't know how can I read JPEG2000 files from matlab.
please help me, thanks in adnavce

Comment only
07 Apr 2014 malika charfi

Dear peter
I try to apply the ROI(region of intersest)codec definite berforhand . So which are the ordres can I use for JPEG2000 encoder, knowing that i downloaded jasper software but I don't know how can I read JPEG2000 files from matlab.
please help me, thanks in adnavce

Comment only
22 Sep 2011 Luqman

Luqman (view profile)

how to use this with matlab? i already downloaded the files but not sure how to use it. tried before on matlab to use the jp2write function but failed. please help

Comment only
23 Mar 2011 daxa

daxa (view profile)

hello sir, i try lot to read jp2 file in matlab. would you provide some example or doc to my email how to use this with matlab.

Comment only
21 Mar 2009 Dzung

Dzung (view profile)

Would you mind providing some examples to use this code? Plz send some to my email Ty very much

Comment only
09 Feb 2009 Greg Tsagkatakis

Great work.
Only a small suggestion. For use in windows XP
the "2>/dev/null" in sprintf in both jp2write and jp2read cause errors but if you remove them everything works fine

21 Jan 2009 Naveen Neelapala

thank u sir for d information,can i get the code for it from any website

Comment only
09 May 2008 a s

13 Mar 2008 yonguk lee

thank you for your information

08 Mar 2008 a smurov

nice one

14 Feb 2008 ashik a s

07 Jan 2008 Samy Ayesh

Dear Peter:
I downloaded jasper software but i dont know how can to read jpeg 2000 files from matlab??? help me plzz...

Comment only
19 Nov 2007 Changhoon Son

woo~wang^^ good^^

24 Oct 2007 ofer israel adam

03 Oct 2007 Zheng Robert

Dear peter:My problem is I don't know how to install 'jpaper'. My jasper is "jasper-1.900.1".I use matlab7.01.Please help me.

Comment only
29 Sep 2007 aleksej avramovic

The code works good under windows, with minor corrections, but is it possible to create Region of Intrest and compres it with better quality than background. Thanks in advance

29 May 2007 anis anis

need jpeg2000 (matlab implementaion)

29 May 2007 anis anis

30 Mar 2007 yubao wu

Hello,how to install the JasPer?My windows can't identify the file.

Comment only
17 Mar 2007 nusrath mateen

even i want to know to install jasper in winXP and execute the above code ....

Comment only
27 Feb 2007 kin y

How to install jasper in WinXP? Do anyone know?

06 Feb 2007 saidani taoufik

i worked whith this code but i found errors

Comment only
11 Nov 2006 bougouia abdeslam

good luck

26 Sep 2006 stauros dalabiras

hello peter! i install jasper but there is a problem delete.m script file which is a file come with matlab installation. i won't change it. anyway it doesn't seem to work. does anyone know a way to open jp2 files in matlab??

Comment only
03 Jul 2006 YAN FANG


25 Jun 2006 saidani taoufik

20 Feb 2006 Wang xiaolin

I install "jasper" Software but I can't run JPEG2000 for matlab program. Please help me, thank you.

Comment only
03 Jan 2005 Jackie Chen

Dear Peter:

My OS is win32 ,
Can I install "jasper" software in my OS ?
If "YES"
How do I install this software.
Please help me, thank you.


Comment only
03 Jan 2005 Jackie Chen

How to install "jasper" Software ?
I can't run JPEG2000 for matlab program.

04 Dec 2004 yousef anwar

Dir sir:
im student who try to make image compression
i want c program that conver image to matrix .
thanx alot .

Comment only
05 Jul 2004 Habibe Ngangoue

Hello Peter! There is a problem when running the command "jp2read" in a Matlab console : the filename must be specified (done easily) but what's the meaning of the second parameter of the function??You indicate in the comments that the filename only is necessary. But it appears that the variable "varargin" is mandatory for the rest of the process. Can you help me?
Moreover, what do you mean by "You need to have the free available program "jasper" installed at your search path" ??



Comment only
26 Jun 2004 milad toutounchian

12 Jan 2004 Talib Hussain

I have not tested this on windows but i hope that u have done very well. plz try ur best to improve more..

09 Nov 2003 aman kumar

i required matlab program for my project work pls send me or tell me from where i can get it. i will be very thankfull to u.

07 Sep 2003 dfh dfh

08 Jun 2003 chu he

Contact us