RemoteS.jl icon indicating copy to clipboard operation
RemoteS.jl copied to clipboard

Histogram stretch and overlay of other rasters

Open EmanuelCastanho opened this issue 3 years ago • 2 comments

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?

EmanuelCastanho avatar Dec 30 '22 11:12 EmanuelCastanho

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 avatar Dec 30 '22 13:12 joa-quim

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.

joa-quim avatar Dec 31 '22 01:12 joa-quim