BandMathX: min of a neighborhood


Context

I would like to compute the minimum value inside a neighborhood using BandMathX, which seems to be possible according to the cookbook (Many operators come with this new functionality: - dotpr - mean - var - median - min - max - etc. ) It didn’t work so I’ve used grayscale morphological operator, but I would like to understand BandMathX so that I can run more complex map algebra.

Configuration setup

My system: Linux
Version of the OTB: 7.2 (and also tested on 6.7)?
I installed the OTB with: * the SuperBuild*

Description of my issue

I’ve tried with "otbcli_BandMathX -il in.tif -out out.tif -exp “min(im1b1N5x5)”

My error message

2022-03-02 10:22:33 (INFO): Image #1 has 1 components
2022-03-02 10:22:33 (INFO): Using expression : min(im1b1N5x5)
2022-03-02 10:22:33 (FATAL): itk::ERROR: ParserXImpl(0x19c91e0):
Message: Can’t evaluate function/operator “min”: Argument 1 of function/operator “” is of type ‘m’ whereas type ‘f’ was expected.
Formula: min(im1b1N5x5)
Token: min
Position: 0

remark : it works fine with “mean(im1b1N5x5)” or “min(im1b1,im1b2)”, but I want to apply min to a neighborhood.

Dear @radouxju,

Did you try with vmin? => vmin(im1b1N5x5)

It works with vmin, thank you.

1 Like