Skip to content

Introducing new API to seperate arch and board from each other#26

Merged
ozan956 merged 18 commits into
mainfrom
feature/new-api
Apr 23, 2026
Merged

Introducing new API to seperate arch and board from each other#26
ozan956 merged 18 commits into
mainfrom
feature/new-api

Conversation

@ozan956
Copy link
Copy Markdown
Contributor

@ozan956 ozan956 commented Apr 17, 2026

No description provided.

ozan956 added 6 commits April 15, 2026 20:31
Update memory_init declaration in memory_manager.h from
memory_init(void) to memory_init(uintptr_t pool_start_addr).

Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Change board memory backends to adopt to new memory_init.

For STM32F7, define DEFAULT_MEMORY_POOL_ADDR and use it for lazy
initialization call sites.

For ESP32, adopt the same signature and explicitly mark the parameter
unused to keep backend behavior unchanged.

Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Replace single-platform selection with explicit EMBEDDIP_TARGET_BOARD,
EMBEDDIP_ARCH and EMBEDDIP_CPU cache variables and enforce a strict
compatibility matrix at configure time.

Load board and arch profiles independently, then compose sources,
include dirs, defines and compile options from those profiles so new
ports can be added without touching central build logic.

Move package config template to embedDIP root and update
configure_package_config_file path accordingly.

Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Remove board level common/fft implementation units and keep board
ownership limited to board specific memory/config responsibilities.

Update board memory implementation to match the new split and add the
new ESP32 board memory source naming/layout used by the refactor.

Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Move device implementations out of nested vendor subfolders into the
top level device category paths and update build references to the new
locations.

This reduces path depth, makes board profile source lists simpler and
keeps driver discovery consistent across STM32 and ESP32 backends.

Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Introduce a shared imgproc FFT implementation for common 2D flow and
move arch-specific math calls behind a small backend hook interface.

Implement ARM and XTENSA backend hooks in arch specific files and
remove duplications.

Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
@ozan956 ozan956 self-assigned this Apr 17, 2026
@ozan956 ozan956 added the enhancement New feature or request label Apr 17, 2026
Update embedDIP public headers/config checks to validate one board and
one arch/cpu selection under the new model.

Adopt EMBED_DIP_BOARD_* and EMBED_DIP_ARCH_* style compile contracts and
drop legacy TARGET_BOARD_* assumptions from the public interface.

Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Update EmbedDIP semantic version from 0.1.0 to 0.2.0 to reflect
build/config contract changes introduced by the board/arch/cpu
decoupling and related refactors.

This release marks a compatibility boundary for consumers migrating from
the legacy single-platform selection flow.

Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
ozan956 added 10 commits April 18, 2026 16:17
Drop the C++ wrapper declaration/definition for Image::ifftshift().

The wrapper only forwarded to fftshift() and provided no distinct behavior.
Keeping a single shift API simplifies ImageWrapper surface area and avoids
duplicate frequency-shift entry points.

Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Introduce board and architecture profile files for STM32F7/ESP32 and
ARM/XTENSA targets, and move source/define/include selection into those
profiles to support board-arch-cpu split configuration.

Adjust .gitignore CMake patterns so new profile cmake files are tracked.

Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Drop large commented-out legacy UART implementations from stm32_uart.c
to keep the active serial backend clear and maintainable.

Also remove the per-chunk HAL_Delay(1) in serial_send_jpeg(), relying
on normal blocking UART transmit behavior for chunk pacing.

Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Introduce a new imgproc compression module.

Implement JPEG encoding via libjpeg when available, including a
fixed-capacity destination manager with overflow detection and
input support for various images. When libjpeg is not present,
keep a safe stub that returns -1.

Wire the module into the build by adding sources, STM32F7 libjpeg
include paths, and EMBEDDIP_HAVE_LIBJPEG compile definition when
jpeglib.h is found.

Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Drop unfinished/duplicate GrabCut entry points
and consolidate the API around grabCut() and grabCutLite().

Implement a memory-aware grayscale graph-cut path with:
  - ROI-bounded processing and argument/format validation
  - adaptive downsampling for embedded node limits
  - Dinic-style maxflow (BFS/DFS residual graph)
  - hard border/background constraints and n-link smoothness terms
  - mask upsampling back to full-resolution ROI

Update public headers and C++ wrapper accordingly:
  - add Image::grabCut(mask, roi, iterations) returning status
  - remove obsolete RGB/legacy wrapper methods

Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Fix several robustness bugs in NMS/double-threshold/hysteresis and
tighten Canny error handling. This removes crash-prone paths and
makes edge linking behavior deterministic on embedded targets.

Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Use one global visited map and one global stack across all seeds.

Switch grayscale and color growth to adaptive running region mean
grow by distance to region mean instead of fixed seed value.

Return INVALID_ARG when no valid seeds are provided.

Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Allow memory_init() to accept either an SDRAM offset or an
absolute SDRAM address for compatibility, validate computed bounds, and
fall back to the default reserved pool start when input is
invalid or leaves no room for allocator metadata.

Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Add clarifying comments in erode() and dilate() that the ping buffer is
initialized from source pixels before the loop so the first iteration
runs on original image data.

Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Signed-off-by: Ozan Durgut <ozandurgut.2001@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce JPEG compress within the library. canny somehow doesnt work device: camera: add format selection to initialization

1 participant