Here after square operation, the value can never falls below 0. As a result, all the lstd values will be 0.
When referring to the implementation in python BRISQUE (https://github.com/bukalapak/pybrisque), it should be compare->square instead of square->compare.
https://github.com/guptapraful/niqe/blob/e5e4069597ad14d761a42d67c64302940d469067/niqe.py#L25
Here after square operation, the value can never falls below 0. As a result, all the lstd values will be 0.
When referring to the implementation in python BRISQUE (https://github.com/bukalapak/pybrisque), it should be compare->square instead of square->compare.