Skip to content

Fix issue with auto and eigen return type #236

Open
simogasp wants to merge 1 commit into
developfrom
fix/eigen_auto
Open

Fix issue with auto and eigen return type #236
simogasp wants to merge 1 commit into
developfrom
fix/eigen_auto

Conversation

@simogasp

Copy link
Copy Markdown
Member

A problem with deducing the proper return type for eigen was detected in #219. In #226 also it shows that this affects the markers detection on some platforms.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a temporary variable to store eigenvectors before extracting their real parts in src/cctag/Fitting.cpp. The reviewer advised against using auto with Eigen expressions due to the risk of dangling references and suggested explicitly typing the variable as Array33f to ensure immediate evaluation and eliminate the need for the temporary variable.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/cctag/Fitting.cpp Outdated
@codacy-production

codacy-production Bot commented Jun 10, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a platform-dependent Eigen expression type deduction issue that caused incorrect eigenvector real-part handling, impacting ellipse fitting and ultimately marker detection accuracy (as reported in #219 and #226).

Changes:

  • Replace auto-deduced Eigen expression storage with an explicit Array33f materialization of eigenvectors().real().array() to avoid problematic template/return-type deduction on some compilers/platforms.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@simogasp

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request replaces the use of auto with the explicit type Array33f when assigning the real part of eigenvectors in src/cctag/Fitting.cpp. This is a standard practice in Eigen-based code to prevent issues related to lazy evaluation and expression templates. There are no review comments, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]Only one marker got detected [bug] ctest failure on compilation and low accuracy

2 participants