i have an image with band1 and band 2. i select a pixel using pin and i would to use band1 pin value in a band math expression as threshold.
If i create a roi with band math expression “band1 > pins” the result is wrong … how could i write this?
This is not possible. You need to write this value explicitly into the expression.
what DarioS aksed for would a be very useful way to use pin to define ROIs on an image by selecting a threshold with pins. It seems strange that it is not possible at all since pins valuesfor each band are all listed in the pins window. So the possibility to refer to, say, pins or pins and pass the value back to band math would be very handy.
Since it is not possible, is this a band math limit? Is there any possible workaround to this? Would it make sense for example to extract pins with snappy, select the right band for the threshold, and the pass it back to the band math editor as a variable?
Yes this is a limitation of the band maths. Probably we will enhance it in the future.
Right now, you need to look up the value from the pin manager and write it directly into the expression.
In order to automate this, you could write a python script which does this. Then you can do it on a bunch of products, too.