Skip to content

Conversation

@NiklasNeugebauer
Copy link
Contributor

@NiklasNeugebauer NiklasNeugebauer commented Nov 12, 2025

Motivation

We are still using numpy 1.X. This is because we were stuck at on opencv 4.8 since newer versions at the time had issues with the omnidir camera calibration module. This seems to have been fixed and as such we want to allow newer numpy versions and a new opencv minor version.

Implementation

  • The numpy dependency is now <3.0.
  • The opencv-python-contrib dependency is now >=4.12.0.88 (current newest) and <4.13.0.0.
  • opencv-python was removed (not needed with opencv-python-contrib)
  • cv2 is ignored by mypy (installing stubs takes more than 5 minutes)
  • Tests for real hardware cameras were fixed (likely unrelated, but was not a big fix)

Progress

  • I chose a meaningful title that completes the sentence: "If applied, this PR will..."
  • I chose meaningful labels (if GitHub allows me to so).
  • The implementation is complete.
  • Pytests have been added (or are not necessary).
  • Documentation has been added (or is not necessary).

@NiklasNeugebauer NiklasNeugebauer added the enhancement New feature or request label Nov 12, 2025
@NiklasNeugebauer NiklasNeugebauer added this to the 0.31.0 milestone Nov 12, 2025
@NiklasNeugebauer
Copy link
Contributor Author

There seem to be some issues with opencv`s jpeg encode/ decode. Let's wait for #356 where we use PIL and TurboJPEG instead.

@pascalzauberzeug pascalzauberzeug modified the milestones: 0.31.0, 0.32.0 Nov 20, 2025
Copy link
Contributor

@falkoschindler falkoschindler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checks are still failing 🫤

@NiklasNeugebauer
Copy link
Contributor Author

yes...

falkoschindler
falkoschindler previously approved these changes Dec 18, 2025
Copy link
Contributor

@falkoschindler falkoschindler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, some of the newly required type annotations feel a bit redundand, but I guess we can't do much about it.

In d4e292e I made just some minor changes:

  • improved the computation of percentiles to get all five values in one pass,
  • refactored the instantiation of intrinsics to reduce the diff and avoid # type: ignore,
  • wrapped a very long line,
  • reverted decoded = decode_jpeg_image(...) by specifying a more precise return type ImageArray, and
  • using ImageArray in the signature or from_array.

Ready to merge if you agree. 👍🏻

@NiklasNeugebauer NiklasNeugebauer merged commit e90b424 into main Dec 18, 2025
5 checks passed
@NiklasNeugebauer NiklasNeugebauer deleted the opencv-update branch December 18, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants