Repository navigation
docs: Update documentation #388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 13 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
4f47ccb
generated docs with codex
Krasner be56d58
formatting
Krasner 945cade
updated links
Krasner fc139ab
doc strings and doxygen
Krasner ed49ba2
doc strings and doxygen
Krasner b37467d
fix docusaurus build... but is it correct?
Krasner 5a68a7d
format docs
Krasner 719a0a4
Merge branch 'main' into fix/docs
Krasner 3b6ed39
bindings/py docs
Krasner 14a9913
Merge branch 'main' into fix/docs
Krasner 6c70689
mermaid format
Krasner 07b1854
Merge branch 'fix/docs' of https://github.com/Krasner/Img2Num into fi…
Krasner 6bc77fd
formatting
Krasner 1c47bd0
Merge branch 'dev' into fix/docs
Krasner 6da7296
Merge branch 'dev' into fix/docs
Krasner 151772b
Merge branch 'dev' into fix/docs
Krasner c5de571
add dev ownership to /opt/emsdk/
Krasner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| @INCLUDE = ../../doxygen/Doxyfile.base | ||
|
|
||
| PROJECT_NAME = "Img2Num Python Bindings (Internal Developer Docs)" | ||
|
|
||
| PROJECT_NUMBER = dev | ||
|
|
||
| INPUT = src ../../doxygen/*.dox doxygen/home_page.dox | ||
| OUTPUT_DIRECTORY = ../../docs/static/docs/internal/bindings/py/api | ||
|
|
||
| RECURSIVE = YES | ||
|
|
||
| EXTRACT_PRIVATE = YES | ||
| EXTRACT_STATIC = YES | ||
| INTERNAL_DOCS = YES |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| /*! \mainpage Img2Num Python Bindings | ||
| * | ||
| * \section intro_sec Introduction | ||
| * | ||
| * The **Img2Num Python Bindings** provide a Python interface to the core Img2Num | ||
| * image processing library via pybind11. These bindings wrap the underlying C++ | ||
| * functionality, exposing image processing operations such as filtering, clustering, | ||
| * thresholding, and SVG conversion to Python code. | ||
| * | ||
| * All functions operate on `numpy.ndarray` buffers and return new image data, making | ||
| * them easy to integrate into Python-based image processing pipelines. | ||
| * | ||
| * \section features_sec Key Features | ||
| * | ||
| * The Python bindings expose the following core capabilities: | ||
| * - **FFT-based Gaussian blur** — Fast frequency-domain blurring | ||
| * - **Image inversion** — Invert pixel values | ||
| * - **Thresholding** — Standard and black-thresholding operations | ||
| * - **K-means clustering** — Pixel clustering for color quantization | ||
| * - **Bilateral filtering** — Edge-preserving smoothing | ||
| * - **Label-to-SVG conversion** — Convert labeled images to SVG strings | ||
| * - **Image-to-SVG conversion** — Full image vectorization with configurable parameters | ||
| * - **ImageToSvgConfig** — Python-accessible configuration for SVG generation | ||
| * | ||
| * \section building_sec Building the Python Bindings | ||
| * | ||
| * The Python bindings are built using CMake from the project root: | ||
| * | ||
| * \code{.sh} | ||
| * cmake -B build . | ||
| * cmake --build build | ||
| * \endcode | ||
| * | ||
| * \section install_sec Installation | ||
| * | ||
| * Install the bindings to your system: | ||
| * | ||
| * \code{.sh} | ||
| * cmake --install build | ||
| * \endcode | ||
| * | ||
| * The compiled `_img2num` module will be available for import in Python: | ||
| * | ||
| * \code{.py} | ||
| * import _img2num | ||
| * \endcode | ||
| * | ||
| * \section usage_sec Usage Example | ||
| * | ||
| * \code{.py} | ||
| * import numpy as np | ||
| * import _img2num | ||
| * | ||
| * # Load image as uint8 numpy array | ||
| * image = np.array([...], dtype=np.uint8).reshape((height, width, 3)) | ||
| * | ||
| * # Apply Gaussian blur | ||
| * blurred = _img2num.gaussian_blur_fft(image, width, height, sigma=2.0) | ||
| * | ||
| * # Invert colors | ||
| * inverted = _img2num.invert_image(image, width, height) | ||
| * | ||
| * # Threshold | ||
| * thresholded = _img2num.threshold_image(image, width, height, num_thresholds=4) | ||
| * | ||
| * # K-means clustering | ||
| * clustered_data, labels = _img2num.kmeans(image, width, height, k=8, max_iter=50) | ||
|
Ryan-Millard marked this conversation as resolved.
Resolved
|
||
| * | ||
| * # Bilateral filtering | ||
| * filtered = _img2num.bilateral_filter(image, width, height, sigma_spatial=3.0, sigma_range=50.0) | ||
|
Ryan-Millard marked this conversation as resolved.
Resolved
|
||
| * | ||
| * # SVG conversion | ||
| * config = _img2num.ImageToSvgConfig() | ||
| * svg_str = _img2num.image_to_svg(image, width, height, config) | ||
| * \endcode | ||
| * | ||
| * \section api_sec API Reference | ||
| * | ||
| * Browse the detailed function and class documentation: | ||
| * - \ref img2num_functions "Core Image Processing Functions" | ||
| * - \ref img2num_classes "Configuration Classes" | ||
| */ | ||
|
|
||
| /** \defgroup img2num_functions Image Processing Functions | ||
| * @ingroup mainpage | ||
| * @brief Image processing functions exposed via Python bindings. | ||
| * @{ | ||
| */ | ||
|
|
||
| /** \defgroup img2num_classes Configuration Classes | ||
| * @ingroup mainpage | ||
| * @brief Configuration classes for image processing and SVG generation. | ||
| * @{ | ||
| */ | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Ryan-Millard/Img2Num
Length of output: 586
🏁 Script executed:
Repository: Ryan-Millard/Img2Num
Length of output: 5350
🏁 Script executed:
Repository: Ryan-Millard/Img2Num
Length of output: 24179
🏁 Script executed:
Repository: Ryan-Millard/Img2Num
Length of output: 502
🌐 Web query:
C++ designated initializer syntax without '='.member{...}is it valid and which compilers/standards support it?💡 Result:
Yes, the designated initializer syntax using braces without an equals sign, such as.member{value}, is valid in C++20 and later standards [1][2]. In C++20, designated initializers were introduced for aggregate initialization [1][3]. The syntax allows for both the assignment-style (.member = value) and the brace-initialization-style (.member{value}) [2]. Key points regarding this syntax: - Standard Support: This is a standard feature of C++20 and subsequent versions [1][2]. - Aggregate Initialization: It is strictly limited to aggregate types [1][2]. - Syntax Flexibility: You can use either.member = value or.member{value} [2]. These can also be mixed within the same initializer list if desired [2]. - Compiler Support: Modern compilers that support the C++20 standard (such as GCC, Clang, and MSVC) support this syntax when the appropriate standard flag (e.g., -std=c++20) is enabled [2][3]. Note that this differs from the C programming language, which requires the equals sign (.member = value) and does not support the brace-only syntax for designated initializers [1][4]. Additionally, C++ designated initializers have stricter requirements than C, such as requiring members to be initialized in their declaration order [1][2].
Citations:
🏁 Script executed:
Repository: Ryan-Millard/Img2Num
Length of output: 1279
🏁 Script executed:
Repository: Ryan-Millard/Img2Num
Length of output: 1202
🏁 Script executed:
Repository: Ryan-Millard/Img2Num
Length of output: 107
🏁 Script executed:
Repository: Ryan-Millard/Img2Num
Length of output: 3868
Fix C++17 build break in bindings/c/src/cimg2num.cpp
return {.member{...}, ...}uses C++20 designated-initializer syntax (.field = .../ brace form), but this repo forcesCMAKE_CXX_STANDARD 17, so it can fail to compile on C++17 toolchains. Replace with C++17-compatible aggregate initialization (or explicit assignments) forimg2num::ImageToSvgConfig.Proposed fix
🤖 Prompt for AI Agents