Update OpenCV/JavaCPP, reduce warnings by petebankhead · Pull Request #2017 · qupath/qupath

@petebankhead

Update to use OpenCV 4.11.0 and JavaCPP 1.5.12.

This removes a warning on launch about JavaCPP versions being inconsistent (caused by TensorFlow pulling in a more recent JavaCPP version than we were using for OpenCV).

Also, remove use of `Gson.setLenient()` to remove more startup warnings.

Finally, update `QP.getCurrentServer()` to return `ImageServer<BufferedImage>` instead of `ImageServer<?>`. This didn't cause warnings on startup, but it could cause annoyances when trying to write scripts in an IDE.

@petebankhead

This was failing on Windows, but passing on macOS.

The OpenCV docs suggest that meanStdDev should not be used for more than 4 channels; that didn't appear to be related to the problem that caused the failing tests, but now we extract channels anyway to try to ensure the results are reliable.