{"id":16837812,"url":"https://github.com/zhreshold/openzl","last_synced_at":"2025-08-06T15:08:19.660Z","repository":{"id":24834428,"uuid":"28249132","full_name":"zhreshold/OpenZL","owner":"zhreshold","description":"Open EZ Library for CV projects","archived":false,"fork":false,"pushed_at":"2015-07-22T22:11:56.000Z","size":2136,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T10:48:02.228Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/zhreshold.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-19T22:39:45.000Z","updated_at":"2017-11-08T13:34:47.000Z","dependencies_parsed_at":"2022-08-23T06:51:11.435Z","dependency_job_id":null,"html_url":"https://github.com/zhreshold/OpenZL","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/zhreshold%2FOpenZL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhreshold%2FOpenZL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhreshold%2FOpenZL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhreshold%2FOpenZL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhreshold","download_url":"https://codeload.github.com/zhreshold/OpenZL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244153308,"owners_count":20406995,"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":[],"created_at":"2024-10-13T12:18:53.437Z","updated_at":"2025-03-18T03:42:37.989Z","avatar_url":"https://github.com/zhreshold.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"OpenZL - Open EZ Library\n====================================\n\nOpenZL is a light weighted portable X-platform library packed with fundamental functions for simple Computer Vision projects.\n\nWrapped in C++ as itself lacks image IO libraries, meanwhile provide more convenience over C.\n\nFull documentation in doc/html/\n\n## Note\nThis project is waiting for a major update including structure and API re-write. No exact timeline scheduled.\n\n## License\nMIT License.\n\n## Usage\n* Make sure you have c++11 support(vc11+, -std=c++11 in gcc 4.6+/clang3.3+)\n\n* include \"core.hpp\" for basic class\n\n* include \"imgcodecs.h\" for image read/write capabilities\n\n* include \"highgui.h\" for GUI related functions, e.g. imshow().\n\n* using namespace zl\n\n\n## Examples\nAn example for reading an image into a zl::Mat\n\n```\nusing namespace zl;\nMat image;\nbool retval = imread(image, \"c:/test.png\", IMREAD_COLOR);\n ```\nand the example code for writing a zl::Mat to disk\n \n ```\n bool retval = imwrite(\"c:/test_out.jpg\", image, IMWRITE_COLOR, 90);\n ```\nwhere 90 is the quality option only work for JPEG format.\n \nAn example for display an image in zl::Mat container\n \n ```\n imshow(\"debug\", image);  // show image in \"debug\" window\n destroy_window(\"debug\"); // destroy window named \"debug\"\n ```\n \nor\n \n ```\n destroy_all_windows(); // close all opened windows\n ```\n \n Convert RGB image to Gray\n ```\ncvt_color(image, gray, ZL_RGB2GRAY);\n```\n \nDraw a red line with thickness\n \n ```\n draw_line(image, Point(100, 100), Point(200, 200), Scalar(255, 0, 0), thickness);\n imshow(\"Drawn\", image);\n ```\n \nSimilarly, draw rectangles, circles, and even polygons with fill/no_fill option\n```\ndraw_rectangle(image, Pt1, Pt2, Scalar(255, 255, 0), thickness, fill);\ndraw_circle(image, Point(300, 300), radius, Scalar(255, 255, 0), thickness, fill);\n// fill in polygon vertices\nVecpt pts;\npts.push_back(Point(30, 40));\npts.push_back(Point(50, 5));\npts.push_back(Point(100, 60));\npts.push_back(Point(200, 400));\npts.push_back(Point(50, 70));\ndraw_polygon(image, pts, Scalar(0, 255, 0));\n```\n\nAsynchronus waitkey function(won't block keyboard input) \n```\n// wait for 10 sec or until any keypress\nwaitkey(10000);\n// or wait forever\nwaitkey(0);\n// which equals to \nhold_screen();\n```\n\n\n## Capability\n\n+ Get rid of bulky OpenCV library and messy configuration steps when you want start a very simple app.\n\n+ Classes like Point, Rect, Mat are implemented either copied from OpenCV or rewritten to make it simple and clean.\n\n+ Support cross-platform time() function.\n\n+ Support cross-platform waitkey() function without pressing enter.\n\n+ Support read image from BMP,JPG,PNG, TGA, PSD, GIF, HDR, PIC (thanks to Sean T. Barrett's stb_image library).\n\n+ Support save image to BMP, JPG, PNG, TGA (thanks to Sean T. Barrett's stb_image_write library and Jon Olick's jpeg writer).\n\n+ Support image display (thanks to CImg library).\n\n+ Support various drawing functions(line, rectangle, circle, polygon...).\n\n## What's under Construction...\n+ More color space convertion\n\n+ Image resize functions\n\n+ More TBD\n\n## Acknowledgement\n\n[stb_image Library](https://github.com/nothings/stb) by Sean T. Barrett\n[JPEG_Writer](http://www.jonolick.com/code.html) by Jon Olick\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhreshold%2Fopenzl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhreshold%2Fopenzl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhreshold%2Fopenzl/lists"}