Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you stretch in multiple RGB channels at the same time? #9

Open
robintw opened this issue May 20, 2016 · 4 comments
Open

Can you stretch in multiple RGB channels at the same time? #9

robintw opened this issue May 20, 2016 · 4 comments

Comments

@robintw
Copy link
Collaborator

robintw commented May 20, 2016

When displaying an image as RGB there is a set of radio buttons labelled 'Contrast', presumably to choose which channel to do the contrast stretch on.

Is there a way to do a contrast stretch on all of the RGB channels? When I choose a different channel and stretch on that, it seems to undo previous stretches.

The reason this is important is that satellite images are usually displayed with a contrast stretch in all three displayed channels (RGB). The default contrast stretch is also usually 98%, which isn't actually in the list of standard contrast stretches - but I've put that in a separate issue (#10)

(By the way, I'm using the logic of 'raise an issue for everything that caused me an issue when experimenting this evening' - I'm not trying to pester you into changing things, or even saying that all of these things even need fixing)

@astrofrog
Copy link
Member

(By the way, I'm using the logic of 'raise an issue for everything that caused me an issue when experimenting this evening' - I'm not trying to pester you into changing things, or even saying that all of these things even need fixing)

This is great - best way to make sure we keep track of these things!

Is there a way to do a contrast stretch on all of the RGB channels? When I choose a different channel and stretch on that, it seems to undo previous stretches.

There isn't, but that would be a nice feature to add :)

@robintw
Copy link
Collaborator Author

robintw commented May 21, 2016

I agree this would be a good feature to add. I've had a look at the code, and to be honest it looks a bit too complicated for me at the moment: there seem to be multiple different levels at which RGB stretching is dealt with (eg. RGBImageLayerArtist, RGBEdit) and choosing an individual band to stretch on seems to be baked into the code at quite a low level.

I'd say this was a fairly important feature for satellite imaging, but I think I'll leave it for the moment. If you've got any specific ideas on how best to approach this then I may be able to try and hack something together.

@astrofrog
Copy link
Member

@robintw - I'm planning on completely refactoring the code for the viewers which is indeed far too complex for what it does at the moment, so maybe it makes sense to punt on this until I've had a chance to do this? (and maybe I can even implement it as part of the refactoring). I should have time to work on it next week.

I will check if there is an easy fix in the mean time though.

@robintw
Copy link
Collaborator Author

robintw commented May 21, 2016

Perfect - a refactor here would be great, and there's no immediate rush for the stretching (at the moment the majority of the images on my current project are single-band)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants