{"id":16115007,"url":"https://github.com/olefasting/libaegis","last_synced_at":"2026-05-16T11:03:32.213Z","repository":{"id":132843079,"uuid":"382849930","full_name":"olefasting/libaegis","owner":"olefasting","description":"OpenCV pipelines with lambda functions","archived":false,"fork":false,"pushed_at":"2021-11-18T10:29:01.000Z","size":17683,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T13:55:30.843Z","etag":null,"topics":["cpp20","cpp20-lib","cpp20-library","opencv"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olefasting.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["olefasting"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-07-04T12:45:33.000Z","updated_at":"2021-11-18T10:29:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"a358ff93-7946-46d9-8b21-cd155e631cc7","html_url":"https://github.com/olefasting/libaegis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olefasting%2Flibaegis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olefasting%2Flibaegis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olefasting%2Flibaegis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olefasting%2Flibaegis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olefasting","download_url":"https://codeload.github.com/olefasting/libaegis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247451885,"owners_count":20940986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp20","cpp20-lib","cpp20-library","opencv"],"created_at":"2024-10-09T20:16:57.828Z","updated_at":"2025-10-16T20:16:01.290Z","avatar_url":"https://github.com/olefasting.png","language":"C++","funding_links":["https://github.com/sponsors/olefasting"],"categories":[],"sub_categories":[],"readme":"# libaegis\n\nA library for building OpenCV pipelines from lambda functions.\n\nIn early development so expect breaking changes.\n\nIt currently has no documentation but here is an example:\n\n```c++\n#include \u003copencv2/imgproc.hpp\u003e\n#include \u003copencv2/highgui.hpp\u003e\n\n#include \"aegis/aegis.h\"\n\nusing namespace aegis;\n\nReducer create_color_convert_reducer(int code) {\n    return [code](InputArray input, OutputArray output) {\n        cv::cvtColor(input, output, code);\n    };\n}\n\nReducer create_gaussian_blur_reducer(const int* width, const int* height, const int* sigma_x,const int* sigma_y) {\n    return [width, height, sigma_x, sigma_y](InputArray input, OutputArray output) {\n        cv::GaussianBlur(input, output, cv::Size(*width, *height),*sigma_x, *sigma_y);\n    };\n}\n\nReducer create_canny_reducer(const int* threshold_1, const int* threshold_2) {\n    return [threshold_1, threshold_2](InputArray input, OutputArray output) {\n        cv::Canny(input, output, *threshold_1, *threshold_2);\n    };\n}\n\nReducer create_dilate_reducer(const int* width, const int* height) {\n    return [width, height](InputArray input, OutputArray output) {\n        auto kernel = cv::getStructuringElement(\n            cv::MORPH_RECT, cv::Size(*width, *height));\n        cv::dilate(input, output, kernel);\n    };\n}\n\nReducer create_erode_reducer(const int* width, const int* height) {\n    return [width, height](InputArray input, OutputArray output) {\n        auto kernel = cv::getStructuringElement(\n            cv::MORPH_RECT, cv::Size(*width, *height));\n        cv::erode(input, output, kernel);\n    };\n}\n\nint main() {\n    int gauss_width = 3, gauss_height = 3, gauss_sigma_x = 3, gauss_sigma_y = 0;\n    int canny_threshold_1 = 25, canny_threshold_2 = 75;\n    int dilate_width = 5, dilate_height = 5;\n    int erode_width = 5, erode_height = 5;\n    auto source = CaptureSource(0);\n    auto pipeline = Pipeline(source, {\n        create_color_convert_reducer(cv::COLOR_BGR2GRAY),\n        create_gaussian_blur_reducer(\u0026gauss_width, \u0026gauss_height, \u0026gauss_sigma_x, \u0026gauss_sigma_y),\n        create_canny_reducer(\u0026canny_threshold_1, \u0026canny_threshold_2),\n        create_dilate_reducer(\u0026dilate_width, \u0026dilate_height),\n        create_erode_reducer(\u0026erode_width, \u0026erode_height),\n    });\n\n    Matrix output;\n    auto should_quit = false;\n    while (!should_quit) {\n        if (pipeline.read(output)) {\n            cv::imshow(\"Output\", output);\n        }\n        cv::namedWindow(\"Settings\", cv::WINDOW_AUTOSIZE);\n        cv::createTrackbar(\"Canny Threshold 1\", \"Settings\", \u0026canny_threshold_1, 200);\n        cv::createTrackbar(\"Canny Threshold 2\", \"Settings\", \u0026canny_threshold_2, 200);\n        cv::createTrackbar(\"Dilate Kernel Width\", \"Settings\", \u0026dilate_width, 20);\n        cv::createTrackbar(\"Dilate Kernel Height\", \"Settings\", \u0026dilate_height, 20);\n        cv::createTrackbar(\"Erode Kernel Width\", \"Settings\", \u0026erode_width, 20);\n        cv::createTrackbar(\"Erode Kernel Height\", \"Settings\", \u0026erode_height, 20);\n        switch (cv::waitKey(1)) {\n            case KEY_ESC:\n            case KEY_Q:\n                should_quit = true;\n        }\n    }\n\n    return 0;\n}\n```\n\nLICENSE MIT\n\nCopyright 2021 Ole A. Sjo Fasting\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folefasting%2Flibaegis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folefasting%2Flibaegis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folefasting%2Flibaegis/lists"}