aloboa
aloboa
It is not inevitable, it just needs to clamp the output to conform to the specified ymin, ymax range. In effect, what I want to do is what you do...
Good we finally agree! Should I fill another ticket with that request or is this one sufficient? Agus
I've deleted my last comment, I was mixing things up with` raster::stretch()` (which works now, see https://github.com/rspatial/raster/issues/70 )
Thanks to a recent improvemnt of raster::clamp(), https://github.com/rspatial/raster/issues/120 ``` r
Note: ``` > ggplot(data=wave, aes(x, y)) + + ggRGB(rlogo, ext=terra::ext(rlogo),ggLayer = TRUE) + + geom_polygon(alpha=0.2) + + coord_equal(ylim=c(0,75)) Error in .local(x, y, ...) : Cannot get an Extent object from...
In that case, as it is a local filter, take advantage to implement CLAHE as well https://imagej.net/Enhance_Local_Contrast_(CLAHE) Zuiderveld, Karel (1994), "Contrast limited adaptive histogram equalization", Graphics gems IV, Academic Press...
If zlim refers to the input object and the output range is always the same, yes. In that case, please clarify in the doc: zlim: "numeric vector of length 2....
This is a little real example: https://www.dropbox.com/s/p9tzrak01w3vowh/a.rds?dl=0 ``` a
Sorry about that. Here: https://www.dropbox.com/s/p9tzrak01w3vowh/a.rds?dl=0 ``` > a global(a,range,na.rm=TRUE) X1 X2 B170 950.0561 1865.897 B14 903.6075 1768.794 B86 1214.1776 2435.019 ```
I certainly use stretch() a lot and can achieve what I need by generating previous stretched 3-band versions of the images, but this is complicated for fast visualizaitions. My suggestion...