Bug report #14167

JPEG2000 rendering issue

Added by Mathieu SIG almost 5 years ago. Updated over 4 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Rasters
Affected QGIS version:2.12.2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:up/downstream
Crashes QGIS or corrupts data:No Copied to github as #:22169

Description

Hi,

I'm experiencing trouble with the QGIS renderer for JPEG2000.
I have to validate an image mosaic product, with an output in JPEG2000.
Though, when I'm trying to open it in QGIS (2.4, 2.8, 2.12), the image presents abnormal residue on some parts of the canvas. It looks like some kind of odd fuzziness. I join you a quick capture and a gdalinfo result on this file, so you can take a look at it.

I've tried to open it on Intergraph's ER Viewer 2014 : same problem.
I've tried to open it on ESRI's ArcMap 10.2 : the image is perfectly rendered...!

I'm pretty sure that the image was not produced thanks to an ESRI suite, but probably from another software (TNTMips I reckon).
Plus, the JP2 metadata highlights a JP2ECW 5.0 driver.

What can explain that difference?
Thanks for any explanation.

And thanks for everything you're doing for the geospatial community, btw.

Best regards,
Mathieu K.,
from the CRIGE PACA, France

mkazmiers_renderer_qgis2.12.PNG (108 KB) Mathieu SIG, 2016-01-25 08:00 AM

gdalininfo_compo.txt Magnifier (1.92 KB) Mathieu SIG, 2016-01-25 08:00 AM

History

#1 Updated by Martin Dobias almost 5 years ago

Hi, thanks for the report. Could you please attach a raster file that has this problem?

#2 Updated by Martin Dobias almost 5 years ago

  • Status changed from Open to Feedback

#3 Updated by Mathieu SIG almost 5 years ago

Hi,

Thanks for your answer.
Unfortunately, I cannot link the image due to licence issues, for the moment at least. I'll try to speed up the publication and will get back to you (in few weeks).
I was wandering if it was a known issue?

Regards,
Mathieu

#4 Updated by Martin Dobias almost 5 years ago

To my knowledge it is not a known issue. If linking the raster publicly is an issue, feel free to share it privately (e.g. by mail / using dropbox) with me or other dev, it will not be disclosed to a third party.

#5 Updated by Giovanni Manghi almost 5 years ago

  • Category set to Rasters

see #14206

try installing the ecw library(?).

Please give it a try and leave feedback.

#6 Updated by Mathieu SIG almost 5 years ago

Hi Giovanni,

ECW library are installed I suppose. I've tried to tick/untick as following :
  • JP2ECW inactive, JP2OpenJPEG active : causes major problem to my computer, it freezes, no other alternative than reboot it...(whether with QGIS 2.8 (or 2.12))
  • JP2ECW active, JP2OpenJPEG inactive : I observe the same artifacts on my image as given above...

As soon as I get the green light to publish my image, I'll get back to you with it!
Thanks.

Regards,
Mathieu

#7 Updated by Mathieu SIG almost 5 years ago

Hi,

Please find here the URL to download the incriminated raster :
http://we.tl/vAaXs6KMxO
Thanks for absolutly NOT DISTRIBUTING it in any way, since it's not yet under the ownership of my company.

And thanks for any piece of information about that issue!

Regards,
Mathieu

#8 Updated by Giovanni Manghi over 4 years ago

Mathieu SIG wrote:

Hi,

Please find here the URL to download the incriminated raster :
http://we.tl/vAaXs6KMxO
Thanks for absolutly NOT DISTRIBUTING it in any way, since it's not yet under the ownership of my company.

Hi, the download is not available anymore, please provide another link. Thanks.

#9 Updated by Mathieu SIG over 4 years ago

Hi,

Here's an updated url :
https://we.tl/3NIUS7iuMF
Thanks,
Mathieu

#10 Updated by Jukka Rahkonen over 4 years ago

Gdalinfo report shows which driver was used for reading the file. With kdu_show viewer's properties tool I could see that JPEG2000 is actually written with Kakadu v. 6.4.1 SDK. However, kdu_show viewer compiled with Kakadu SDK v. 7.3.2 does not show the image correctly at all. Only when zoomed in into 800% resolution the image look good but at any courser resolution kdu_show shows very bad artifacts.

I would say that only a good JPEG2000 expert can tell what is wrong or uncommon in the image.

#11 Updated by Mathieu SIG over 4 years ago

Thanks for the feedback.
Very interesting to know that Kakadu encounters problem reading it.
And that it was produced using Kakadu drivers.

However, these artifacts don't appear in ArcMap10.2.
That led me to think that the matter doesn't come from the file itself but from the drivers/renderers.

Is it smg known when using Kakadu drivers to produce files?
I adress this question since I am more and more concerned about the jpeg2000 "practical" interoperability for our end users...

#12 Updated by Giovanni Manghi over 4 years ago

anyway, how this is a qgis issue? isn't eventually an issue of the libraries that allow open such formats vis gdal?

#13 Updated by Mathieu SIG over 4 years ago

I'm not sure how to answer to the latter?

It is certainly a QGIS issue since I face it using this softwre, and I don't get the "right" image on screen.
But it's not certain that the problem is in its source code, as far as I understand Jukkha contribution, cause it might have something relate to the library (GDAL) it has chosen to implement.

But then, how/where should I address the problem?

#14 Updated by Giovanni Manghi over 4 years ago

But then, how/where should I address the problem?

if it turns to be a gdal problem then it must be filed there not here.

#15 Updated by Jukka Rahkonen over 4 years ago

The image is in one tile with a size of 54116, 51734. It will mean that the OpenJPEG2000 driver will not open it because it runs out of memory. This limitation is in the OpenJPEG library, not in QGIS or GDAL.

I made further tests with kdu_show 6.0 (32-bit) which opens image fine. Kdu_show v. 7.3.2 (32-bit) opens image also fine but 64-bit version which I used first makes bad result. Also converting the jp2 image into GeoTIFF with kdu_expand (64-bit) gives an unusable result.

If Intergraph's ER Viewer 2014 has problems with this image as well as GDAL with ECWJP2 driver then the problem probably comes from the SDK itself. I am not sure what it means that 64-bit kdu_show 7.3.2 has problems as well. It may be some faulty Windows build or bug in that SDK version. Newest Kakadu version is 7.8.

I would suggest to file a GDAL ticket and follow it through this QGIS issue.

#16 Updated by Giovanni Manghi over 4 years ago

  • Status changed from Feedback to Closed
  • Resolution set to up/downstream

Also available in: Atom PDF