Poltting with TVSCL [message #93453] |
Tue, 19 July 2016 23:38  |
d.poreh
Messages: 406 Registered: October 2007
|
Senior Member |
|
|
Folks,
Hi,
I am plotting some gray images. I need to use TVSCL, but i need to impose to plot between two limits that i want to be. I mean my images are between 0 and 1, but the max and min of them are different. I need to plot them *all* in [min, max] that I am going to give them. So I can tell that my images have got same min and max...
Thanks for any kind of help in advance,
All the best,
Cheers,
Dave
|
|
|
Re: Poltting with TVSCL [message #93454 is a reply to message #93453] |
Wed, 20 July 2016 01:52   |
Helder Marchetto
Messages: 520 Registered: November 2011
|
Senior Member |
|
|
On Wednesday, July 20, 2016 at 8:38:54 AM UTC+2, dave poreh wrote:
> Folks,
> Hi,
> I am plotting some gray images. I need to use TVSCL, but i need to impose to plot between two limits that i want to be. I mean my images are between 0 and 1, but the max and min of them are different. I need to plot them *all* in [min, max] that I am going to give them. So I can tell that my images have got same min and max...
> Thanks for any kind of help in advance,
> All the best,
> Cheers,
> Dave
Hi,
I think you need to use the tv procedure and pass your image with the bytscl function:
tv, bytscl(img, min=min, max=max)
or if you prefer:
tvscl, bytscl(img, min=min, max=max)
The result, using tvscl or tv, will be the same.
For bytscl, see: http://www.harrisgeospatial.com/docs/BYTSCL.html
Cheers,
Helder
PS: there are loads of better image display procedures. Just to mention two: cgImage and image(). Both give you the possibility to do the above.
|
|
|
Re: Poltting with TVSCL [message #93456 is a reply to message #93454] |
Thu, 21 July 2016 10:00  |
d.poreh
Messages: 406 Registered: October 2007
|
Senior Member |
|
|
On Wednesday, July 20, 2016 at 10:52:45 AM UTC+2, Helder wrote:
> On Wednesday, July 20, 2016 at 8:38:54 AM UTC+2, dave poreh wrote:
>> Folks,
>> Hi,
>> I am plotting some gray images. I need to use TVSCL, but i need to impose to plot between two limits that i want to be. I mean my images are between 0 and 1, but the max and min of them are different. I need to plot them *all* in [min, max] that I am going to give them. So I can tell that my images have got same min and max...
>> Thanks for any kind of help in advance,
>> All the best,
>> Cheers,
>> Dave
>
> Hi,
> I think you need to use the tv procedure and pass your image with the bytscl function:
>
> tv, bytscl(img, min=min, max=max)
>
> or if you prefer:
>
> tvscl, bytscl(img, min=min, max=max)
>
> The result, using tvscl or tv, will be the same.
>
> For bytscl, see: http://www.harrisgeospatial.com/docs/BYTSCL.html
>
> Cheers,
> Helder
>
> PS: there are loads of better image display procedures. Just to mention two: cgImage and image(). Both give you the possibility to do the above.
Thanks Helder,
That does the trick:)
Cheers,
Dave
|
|
|