File Exchange

image thumbnail


version (1.94 MB) by Peter Rydesäter
Reads and writes files in the new JPEG 2000 image format.


Updated 12 Nov 2002

View License

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:

Cite As

Peter Rydesäter (2021). JPEG2000 (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (40)

suragini kulshrestha

is there any other way to use JPEG2000 instead of using JasPer?please help

pan xia

Giulio Castelli

Do you have any updated guide on how to install JasPer? It seems quite difficult. Microsoft Visual Studio is required, but JasPer tutorial does not give complete information on how to install the software.

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.

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

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


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


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.


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

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

Naveen Neelapala

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

a s

yonguk lee

thank you for your information

a smurov

nice one

ashik a s

Samy Ayesh

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

Changhoon Son

woo~wang^^ good^^

ofer israel adam

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.

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

anis anis

need jpeg2000 (matlab implementaion)

anis anis

yubao wu

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

nusrath mateen

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

kin y

How to install jasper in WinXP? Do anyone know?

saidani taoufik

i worked whith this code but i found errors

bougouia abdeslam

good luck

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??



saidani taoufik

Wang xiaolin

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

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.


Jackie Chen

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

yousef anwar

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

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" ??



milad toutounchian

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..

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.

dfh dfh

chu he

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: jpeg compression

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!