commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Rahkonen (Jira)" <j...@apache.org>
Subject [jira] [Commented] (IMAGING-267) Colorful rendering of b/w Monoband TIF
Date Tue, 22 Sep 2020 14:33:00 GMT

    [ https://issues.apache.org/jira/browse/IMAGING-267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17200118#comment-17200118
] 

Jukka Rahkonen commented on IMAGING-267:
----------------------------------------

A few comments that hopefully clarify some points

 

Georeferencing

The image is georeferenced, or perhaps better say oriented with the ESRI world file system [https://en.wikipedia.org/wiki/World_file].
The .tfw sidecar file is telling the coordinates of the centre of the top left corner. Same
information seems to be copied into the  ModelTiepointTag but there are no other GeoTIFF
tags and normally .tfw file is used with a baseline TIFF without any GeoTIFF tags.

 

The coordinate system is unknown because .tfw does not report the coordinate system. The ESRI
way for presenting the CRS is to include another sidecar file .prj but this sample is missing
it. Thus the image should be considered to be in some engineering coordinate system, the
top-left being at coordinates 262846.525725 4464275.

 

Bit depth and histogram

Data type of the image 32 bit floating point but the data are in the low end of the full 32
bit range, between 514 and 2410. Because of this very many TIFF viewers would show this image
as totally black to bare eyes (black because of min-is-black metadata). Viewers which are
prepared to meet this kind of imagery are using the min/max data range and stretch this range
to 0-255 range for viewing. More clever clients are analyzing the histogram and stretch by
the 5 - 95% of the full range. Clients can either analyze the image (slow for big images)
or read the statistics from the normal tiff tags [https://www.awaresystems.be/imaging/tiff/tifftags/baseline.html] MinSampleValue
and MaxSampleValue if they are present. Geo viewers may support other ways, in this case by
reading the sidecar file .aux.xml

<PAMDataset>
 <PAMRasterBand band="1">
 <Metadata>
 <MDI key="STATISTICS_MAXIMUM">2410</MDI>
 <MDI key="STATISTICS_MEAN">1410.9055247993</MDI>
 <MDI key="STATISTICS_MINIMUM">514</MDI>
 <MDI key="STATISTICS_STDDEV">427.16367167723</MDI>
 <MDI key="STATISTICS_VALID_PERCENT">100</MDI>
 </Metadata>
 </PAMRasterBand>
 </PAMDataset>

Min-is-black question

The image is indeed min-is-black and the attached sextante.png is rendered as min-is-white.
Either that is a bug in sextante of perhaps sextante has an option for reversed colors.

> Colorful rendering of b/w Monoband TIF
> --------------------------------------
>
>                 Key: IMAGING-267
>                 URL: https://issues.apache.org/jira/browse/IMAGING-267
>             Project: Commons Imaging
>          Issue Type: Bug
>            Reporter: edgar soldin
>            Priority: Major
>         Attachments: ISSUE_267.JPG, mdt25a-commons.png, mdt25a-sextante.png, mdt25a.tfw,
mdt25a.tif, mdt25a.tif.aux.xml
>
>
> see attached images.
> mdt25a.tif - the original tif
> mdt25a-commons.png - as rendered/read with Commons Imaging
> mdt25a-sextante.png - as rendered /read properly with ImageIO-Core from https://github.com/jai-imageio/jai-imageio-core
> thanks!.. ede



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message