imgproc: use clamp borders in convolution style filters#25
Merged
Conversation
Zero outside sampling creates artificial responses at image boundaries. Use replicate clamp indexing for spatial filtering paths. Update filter2D_single_channel, sepfilter2D, dogFilter, and logFilter. Add clamp_index() and reuse it in sep_conv_xy_f32 so border indexing stays consistent and duplicated clamp logic is removed. Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
The STM32F7 allocator accepted invalid block headers and could merge free blocks that were not physically adjacent. Add header magic validation, pool range checks, payload pointer verification, double-free guards, and adjacent-only coalescing. Also align realloc requests before size checks. In the FFT path, ensure complex output storage is allocated with createChalsComplex() and reallocated safely in polarToCart(). Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
resize writes results into chals->ch[0], but did not update dst->log accordingly. Set dst->log to IMAGE_DATA_CH0 so downstream code reads output from the correct data location. Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
352c17f to
a9445cd
Compare
The code quality workflow referenced parent-project paths that do not exist when running in the embedDIP repository context, causing cppcheck to fail with missing path errors. Use local source directories (core, imgproc, board, device, wrapper) for cppcheck include/source inputs and clang-format checks. Add explicit guards to fail early when no source directories are found. Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Keep documentation config with documentation assets by moving Doxyfile to docs/Doxyfile. Update docs/README.md path references to match the new location.
Check src_buf allocation result in logFilter instead of rechecking src. This fixes a real null-pointer warning path and keeps error handling consistent with other allocation checks. Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Run pointer validation before dereferencing image fields in fft() and _abs_(). This resolves cppcheck nullPointerRedundantCheck warnings for inImg and fftImg and makes error handling consistent.
Apply clang-format across C/C++ headers and sources in the repository to satisfy CI. Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Zero outside sampling creates artificial responses at image boundaries.
Use replicate clamp indexing for spatial filtering paths.
Update filter2D_single_channel, sepfilter2D, dogFilter, and logFilter.
Add clamp_index() and reuse it in sep_conv_xy_f32 so border indexing
stays consistent and duplicated clamp logic is removed.
Also some additional memory updates.