Repository navigation
Improve stripe detector to reject texture false positives - #4
Vivu-github wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93fd78e761
ℹ️ 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".
| int thetaStripe = thetaF - 90; | ||
| if (thetaStripe < 0) thetaStripe += 180; | ||
|
|
||
| double stripeSpacing = static_cast<double>(energy.cols) / rPeak; |
There was a problem hiding this comment.
Compute stripe spacing with both image dimensions
The spacing estimate uses energy.cols / rPeak, which assumes frequency radius is scaled only by the x-axis. In a 2D DFT, the radial frequency depends on both axes (u/N, v/M), so this formula is only correct for peaks on the horizontal frequency
8000
axis; for horizontal stripes or any non-square image/orientation, the reported pixel spacing can be systematically wrong (often by the aspect ratio). This affects experiment accuracy because the detector can report a valid stripe with an incorrect period.
Useful? React with 👍 / 👎.
Motivation
Description
stripe_detect.cppimplementing a revised detector that separates displayable log-spectrum from the raw centered power spectrum used for decisions.Testing
g++ -std=c++17 stripe_detect.cpp -o StripeDetect \pkg-config --cflags --libs opencv4`and the build failed because OpenCV development files were not available (opencv4.pc/opencv2/opencv.hpp` not found).Codex Task