jpeg2000 compression of hyperspectral image data (imwrite not working)
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to apply add noise to a hyperspectral image data matrix(m-n-layers) by applying jpeg2000 compression on each of the layers saparately. So we can't use it like a nomal .jgp or .png image. I tried the imwrite scheme in loop format (not actual code here),
a = image(:,:,1); % a can only be a gray scale or rgb or an indexed data as I remember
imwrite(a,'image1.jpg', 'Compression','jpeg','CompressionRatio',10);
% the upper line threw an error that "not valid arguments"
% neither the next line work
imwrite(a,'image1.jpg','Mode','lossy','CompressionRatio',10); %according to the documentation
%the syntax doesn't allow the output to be a data matrix like the input itself too
imwrite(a,imageNoise(:,:,1), 'Compression','jpeg','CompressionRatio',10);
, but apparantely it allows compression for HDF format only. I want to store the output in a data matrix format(m-n-layers) only (compression applied layerwise). Can you suggest me any alternate way to apply jpeg2000 compression without imwrite. Thanks in advance.
4 comentarios
Walter Roberson
el 7 de Abr. de 2019
'Compression' as an option is available only for HDF4 and TIFF.
'CompressionRatio' as an option is available only for JPEG2000. To get JPEG2000 you need to use the 'jp2' option (before the keyword/value pairs), or you need to use 'jp2' or 'jpx' as the file extension. JPEG2000 options are not available for .jpeg file extension.
Pushkar Khatri
el 8 de Abr. de 2019
Editada: Pushkar Khatri
el 8 de Abr. de 2019
Respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!