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

Histogram stretch and overlay of other rasters #57

Open
EmanuelCastanho opened this issue Dec 30, 2022 · 2 comments
Open

Histogram stretch and overlay of other rasters #57

EmanuelCastanho opened this issue Dec 30, 2022 · 2 comments

Comments

@EmanuelCastanho
Copy link

Continuing the discussion from this post.

The bright dots in the following image are targets, the low Rayleigh corrected reflectances values are expected since land was masked out and water absorbs most of the radiation.

Screenshot 2022-12-30 at 10 24 28

According to this tutorial, I used histogram(Ir_img, auto=true, bin=10, show=true) to find good stretch points

Screenshot 2022-12-30 at 10 34 44

I used imshow(Ir_img, stretch=[0 100]), didn't notice any difference on the Ir_img plot and receive this warning the following options were not consumed in grdimage => [:stretch].

I am trying to reduce the darkness of the water in the RGB image.

Also, is it possible to overlay a fourth raster on the RGB plot? If not, is this a future feature?

@joa-quim
Copy link
Member

I'll try to give a more complete answer later today but meanwhile see the histogram docs (from the GMT package) as it allows to manually set the histogram limits for the stretch.

Also, is it possible to overlay a fourth raster on the RGB plot? If not, is this a future feature?

Not sure what you mean here. A transparency layer? If yes the answer is also yes.

@joa-quim
Copy link
Member

I tried an example like that one in the tutorial and it worked. What is the type of Ir_img? Note that this is all done for UInt32 images.

function imshow(arg1::GMTimage; kw...)
	# Here the default is to show, but if a 'show' was used let it rule
	see::Bool = (!haskey(kw, :show)) ? true : kw[:show]		# No explicit 'show' keyword means show=true
	if (isa(arg1.image, Array{UInt16}))
		I::GMTimage = mat2img(arg1; kw...)

Not that it can't be made to work with floats but those are trickier and not accounted for in those functions.

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