0

I have a challenge of where there is a sun glint which includes both specular and non-specular brightening of a water surface on Unmanned Aerial Vehicle (UAS) imagery. Please see the raw image below before vignette correction is applied. The sun glint is the lower orange and red part of the image. The red spots are specular reflection and the orange pixels are brightening due to the sunlight.

enter image description here

I am able to identify the sun glint with the following code, which is not perfect as it requires seeing the image and estimating the percent of the sun glint on the map which is variable. I am dealing with thousands of images, which makes it difficult to use a single percent for all images as level of sun glint varies.

glint_min_value = np.percentile(band.ReadAsArray(), 85.0)
final_gl_tif = glint_tif.replace('_gl', '_fi_gl')

if not os.path.isfile(final_gl_tif):
    cmd = 'gdal_calc.py -A "{}" --quiet --outfile="{}" --calc="A*(A{}{})" --NoDataValue=0'.format(
        img, glint_tif, operator, glint_min_value, nodata
    )
    call(cmd, shell=True)
    print('Glint tiff {} {}'.format(glint_tif, os.path.isfile(glint_tif)))
    # project and set 0 to -9999 nodata value

    gdal_wrap = 'gdalwarp -q -srcnodata {} -dstnodata {} {} {}'.format(
        SOURCE_NODATA, nodata, glint_tif, final_gl_tif)

    call(gdal_wrap, shell=True)

I would like to find away to adjust the image so that the sun glint is effect is corrected. Is there any known method or approach for this?

2
  • 1
    Maybe this paper (or the many citations) will contain information useful to your problem.researchgate.net/publication/… – GBG Mar 23 '20 at 18:09
  • @GBG my challenge is that, the research and its citations are focusing on specular reflection. Even though, specular reflection is a problme, my main problem is a gradient effect which is higher brightness due to the sun glint. – wondim Mar 23 '20 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.