Skip to content

Add support for robust plotting of RGB images #71

Open
@robintw

Description

@robintw

Firstly, thanks for this wonderful library. If it had been around during my PhD it would have saved me a lot of time!

My PhD was in satellite imaging, and I still work in that area today. When visualising satellite images, we often want to apply a robust image stretch (eg. a 2%-98% percentile stretch) to an RGB image. The way this works is by doing a stretch on each band separately, and then combining them together.

This doesn't seem to be possible with seaborn_image at the moment: I notice that in

robust = False # set robust to False if RGB image
, robust is set to False if it's a RGB image.

I've had a bit of a poke around in the code, and it seems like the robust image display is done using vmax and vmin parameters to matplotlib. It looks like those probably don't support doing a different stretch on each band - so it would probably have to be done manually, making it a bit more difficult.

Anyway, I might have time to play around with this sometime (depending on work constraints) - would this be something you'd be interested in? It might require a change to how the library deals with robust plotting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions