Add .NET-specific OpenCvSharp guides - #2092
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThree new guides cover array proxies, native-memory ownership and copying, and ASP.NET Core image processing. DocFX navigation and related-guide links expose the new content. ChangesDocumentation guides and navigation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/docfx/articles/guides/aspnet-image-processing.md`:
- Around line 48-86: The try/catch around the image-processing flow currently
maps failures from Cv2.CvtColor and Cv2.ImEncode to HTTP 400. In the image
decode handler, limit OpenCVException translation to the Cv2.ImDecode
input/decode boundary, while allowing processing and encoding failures to
propagate to existing 5xx handling; preserve the existing invalid-image response
for decode errors.
In `@docs/docfx/articles/guides/input-output-arrays-and-in-place.md`:
- Line 57: Update the guidance in “InputArray.Create<T>” to explicitly document
that array/sequence overloads allocate a temporary array-backed Mat and pin the
managed input for the proxy lifetime, including the non-disposeable ref struct
behavior in OpenCvSharp5. Warn against using this pattern in hot loops and show
the existing explicit Mat ownership approach for repeated calls.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: af3cc19d-bc62-42b5-a2f0-54719bbd2a6a
📒 Files selected for processing (9)
docs/docfx/articles/guides/aspnet-image-processing.mddocs/docfx/articles/guides/image-conversion.mddocs/docfx/articles/guides/input-output-arrays-and-in-place.mddocs/docfx/articles/guides/mat-basics.mddocs/docfx/articles/guides/memory-copy-and-performance.mddocs/docfx/articles/guides/resource-management.mddocs/docfx/articles/index.mddocs/docfx/articles/toc.ymldocs/docfx/index.md
Add three guides focused on behavior that is specific to OpenCvSharp and .NET: InputArray/OutputArray proxies and in-place processing, copy and native-memory ownership, and ASP.NET Core upload and stream integration.
The guides explain the current OpenCvSharp5 ref-struct proxy design, distinguish C# aliases from shared ROI views and deep copies, and provide bounded IFormFile/Stream examples with decoding, encoding, cancellation, concurrency, and headless deployment guidance. Navigation and related-guide links now expose the new material from the documentation landing pages.
Test plan
git diff --checkA full DocFX build was not run because DocFX is not installed in the local environment.
Summary by CodeRabbit
InputArray,OutputArray, and in-place processing, with lifetime and common pitfalls.