Changes between Initial Version and Version 3 of Ticket #2597


Ignore:
Timestamp:
Dec 27, 2017 9:10:51 AM (3 weeks ago)
Author:
Bborie Park
Comment:

This can be written as a set of MapAlgebra? callback functions (one per particular algorithm) and a ST_Grayscale user (wrapper) function.

Basic implementation should just use the following:

Y = 0.2989 * R + 0.5870 * G + 0.1140 * B

Map Algebra callback function

ST_Grayscale4ma(double precision[][][] value, integer[][] pos, text[] VARIADIC userargs)

User function

ST_Grayscale(raster rast, integer redband=1, integer blueband=2, integer greenband=3)

Bands provided should be preprocessed before grayscaling to make sure input pixel types are 8BUI (via ST_Reclass if necessary)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2597

    • Property Owner changed from pramsey to Bborie Park
    • Property Component changed from postgis to raster
    • Property Milestone changed from PostGIS Future to PostGIS Fund Me
  • Ticket #2597 – Description

    initial v3  
    1 Returns a single band gray-scale representation of a RGB or HSV raster.
    2 ST_Grayscale(raster img, pixeltype default 32BF )
     1Returns a single band 8BUI representation of a RGB raster.