Skip to content

imgproc: use clamp borders in convolution style filters#25

Merged
ozan956 merged 8 commits into
mainfrom
feature/clamp
Apr 14, 2026
Merged

imgproc: use clamp borders in convolution style filters#25
ozan956 merged 8 commits into
mainfrom
feature/clamp

Conversation

@ozan956
Copy link
Copy Markdown
Contributor

@ozan956 ozan956 commented Apr 14, 2026

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.

@ozan956 ozan956 self-assigned this Apr 14, 2026
ozan956 added 3 commits April 14, 2026 23:08
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>
@ozan956 ozan956 force-pushed the feature/clamp branch 2 times, most recently from 352c17f to a9445cd Compare April 14, 2026 21:29
ozan956 added 5 commits April 14, 2026 23:43
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>
@ozan956 ozan956 merged commit bee4af0 into main Apr 14, 2026
1 check passed
@ozan956 ozan956 deleted the feature/clamp branch April 14, 2026 21:47
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.

1 participant