{"id":20018861,"url":"https://github.com/team334/vision_utils","last_synced_at":"2026-04-20T14:31:07.589Z","repository":{"id":67312856,"uuid":"79152828","full_name":"Team334/vision_utils","owner":"Team334","description":":eye: Vision utilities","archived":false,"fork":false,"pushed_at":"2018-02-03T21:46:26.000Z","size":4,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-02T03:23:39.889Z","etag":null,"topics":["computer-vision","opencv"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Team334.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-16T19:39:48.000Z","updated_at":"2017-04-18T19:21:48.000Z","dependencies_parsed_at":"2023-02-21T13:30:44.904Z","dependency_job_id":null,"html_url":"https://github.com/Team334/vision_utils","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Team334/vision_utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team334%2Fvision_utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team334%2Fvision_utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team334%2Fvision_utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team334%2Fvision_utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Team334","download_url":"https://codeload.github.com/Team334/vision_utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team334%2Fvision_utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32050872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["computer-vision","opencv"],"created_at":"2024-11-13T08:24:38.869Z","updated_at":"2026-04-20T14:31:07.569Z","avatar_url":"https://github.com/Team334.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vision utils\n\nVarious utilities for OpenCV.\n\n## Documentation\n\n### `fps.py`\n\n- **`class FPSCounter`**: utility for measuring frames per second (FPS) with a rolling average\n  - `FPSCounter(avg_len=30)`: create a new FPS counter that averages `avg_len` measurements\n  - `got_frame()`: tell the counter that a frame was processed\n  - `fps()`: get the average FPS\n  - `draw_fps(self, img, pos=(10,30), prec=1, size=2, thickness=2, color=(255,255,255), fmt='%.1f FPS')`: draw the FPS on an image\n    - `img`: the image to draw on\n    - `pos`: the position to draw the text at\n    - `prec`: the number of decimal digits to display\n    - `size`: the size of the text\n    - `thickness`: the thickness of the text\n    - `color`: the color of the text\n    - `fmt`: the format string for the text. Must format a float.\n    \n### `colors.py`\n\nColor-related utilities\n\n- `hex2bgr(h)`: converts a hexadecimal color into a BGR numpy array. E.g. `0x00FF01` -\u003e `[1, 255, 0]`\n- `cvtPixel(color, code)`: converts a color into another color space.\n  - `color`: the color to convert. Can be a list, numpy array, or tuple – e.g. `(255, 0, 0)`\n  - `code`: an OpenCV color conversion code, e.g. `cv2.COLOR_HSV2BGR`\n- Color constants (in BGR): `MAROON`, `RED`, `ORANGE`, `YELLOW`, `OLIVE`, `GREEN`, `PURPLE`, `FUCHSIA`, `LIME`, `TEAL`, `AQUA`, `BLUE`,\n`NAVY`, `BLACK`, `GRAY`, `SILVER`, `WHITE`.\n\n### `contours.py`\n\n- `sort_contour(contour)`: sorts a contour's points in clockwise order.\n  - `contour`: a numpy array of points with shape `(n_points, 1, 2)`\n- `center(contour)`: returns the center of a contour as tuple `(cx, cy)`\n- `iou(contour1, contour2)`: returns the intersection over union (IOU) of two contours. IOU = (area of intersection) / (area of union)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteam334%2Fvision_utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteam334%2Fvision_utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteam334%2Fvision_utils/lists"}