Skip to content

Fisheye cameras in camera calibration block#1996

Merged
Erol444 merged 3 commits intomainfrom
cam_calib_fisheye_support
Feb 11, 2026
Merged

Fisheye cameras in camera calibration block#1996
Erol444 merged 3 commits intomainfrom
cam_calib_fisheye_support

Conversation

@Erol444
Copy link
Contributor

@Erol444 Erol444 commented Feb 11, 2026

What does this PR do?

Before (current cam model)
image
After (with fisheye model enabled):
image

Type of Change

  • New feature (non-breaking change that adds functionality)

Testing

  • I have tested this change locally
  • I have added/updated tests for this change

Test details:

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in hard-to-understand areas
  • My changes generate no new warnings or errors
  • I have updated the documentation accordingly (if applicable)

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 91b618015b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +235 to +236
x = (grid_x - cx) / fx
y = (grid_y - cy) / fy

Choose a reason for hiding this comment

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

P1 Badge Keep fisheye remap arrays in float32

In the fisheye branch, x and y are computed from float32 grids using Python float intrinsics (cx, cy, fx, fy), which promotes them to float64; all downstream arrays (r2, discriminant, scale, map_x, map_y) then stay float64 as well. For high-resolution inputs (for example 4K), this creates several full-frame 8-byte temporaries and can spike per-frame memory into hundreds of MB, causing severe throughput drops or OOMs when use_fisheye_model is enabled. Casting intrinsics once to np.float32 (or otherwise forcing float32 math) avoids this regression.

Useful? React with 👍 / 👎.

Co-authored-by: Grzegorz Klimaszewski <166530809+grzegorz-roboflow@users.noreply.github.com>
@Erol444 Erol444 merged commit 67236da into main Feb 11, 2026
51 checks passed
@Erol444 Erol444 deleted the cam_calib_fisheye_support branch February 11, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants