{"id":21710244,"url":"https://github.com/rhthomas/hybrid-images","last_synced_at":"2025-04-12T17:30:30.405Z","repository":{"id":40985167,"uuid":"156974976","full_name":"rhthomas/hybrid-images","owner":"rhthomas","description":"Creating and demonstrating hybrid images with OpenCV and Python3.","archived":false,"fork":false,"pushed_at":"2024-10-01T20:31:48.000Z","size":3057,"stargazers_count":24,"open_issues_count":1,"forks_count":18,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T11:51:07.707Z","etag":null,"topics":["hybrid-image","image-convolution","opencv","opencv-python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhthomas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-10T11:34:27.000Z","updated_at":"2025-03-25T06:47:14.000Z","dependencies_parsed_at":"2022-09-01T11:10:25.185Z","dependency_job_id":null,"html_url":"https://github.com/rhthomas/hybrid-images","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/rhthomas%2Fhybrid-images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhthomas%2Fhybrid-images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhthomas%2Fhybrid-images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhthomas%2Fhybrid-images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhthomas","download_url":"https://codeload.github.com/rhthomas/hybrid-images/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248604867,"owners_count":21132065,"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":["hybrid-image","image-convolution","opencv","opencv-python","python3"],"created_at":"2024-11-25T23:14:19.328Z","updated_at":"2025-04-12T17:30:30.372Z","avatar_url":"https://github.com/rhthomas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hybrid Images\n\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)\n\nHybrid images demonstrate how certain frequencies dominate at certain distances.\nMost notably, high frequencies dominate when the object is close you you, while lower frequencies dominate when it is further away.\n\nWe can demonstrate the effect of hybrid images by applying a Gaussian blur to an image in order to produce a low-pass filtered equivalent.\n\n![cat](./data/dog.bmp) ![cat hpf](./Output/low.jpg)\n\nFor a different (but aligned) image we again Gaussian blur, but then subtract the low-pass image from the original in order to produce a high pass image.\n\n![cat](./data/cat.bmp) ![cat hpf](./Output/high.jpg)\n\nThese two images can then be summed together to produce a hybrid image as shown below.\nThe image is downsampled to give the effect of moving the object closer/further away from your view point.\n\n![Hybrid effect](./Output/visual.jpg)\n\n## Installation\n\n(Optional) Setup a virtual environment to install the necessary packages.\n\n```bash\nvirtualenv .venv\nsource .venv/bin/activate\n```\n\nInstall the packages listed in the requirements file.\n\n```bash\npip install -r requirements.txt\n```\n\nRun the program!\n\n## Usage\n\nThis program has a command-line interface built up using [click](https://github.com/pallets/click).\nAn auto-generated help message is printed with the `-h/--help` flag.\n\n```\n\u003e python hybrid.py -h\nUsage: hybrid.py [OPTIONS] COMMAND [ARGS]...\n\n  Hybrid image demonstration program.\n\nOptions:\n  -h, --help  Show this message and exit.\n\nCommands:\n  hybrid  Create hybrid image from two source images.\n  kernel  Demonstrate the effect of kernel size.\n  sobel   Perform sobel edge detection.\n```\n\n```\n\u003e python hybrid.py hybrid -h\nUsage: hybrid.py hybrid [OPTIONS] IMAGES...\n\n  Create hybrid image from two source images.\n\nOptions:\n  -o, --output TEXT        Output file.\n  -c, --cutoff INTEGER...  High/low cutoff frequencies.\n  -v, --visual             Generate visualisation.\n  -f, --fourier            Use fourier convolution.\n  -h, --help               Show this message and exit.\n```\n\n```\n\u003e python hybrid.py kernel -h\nUsage: hybrid.py kernel [OPTIONS] IMAGE\n\n  Demonstrate the effect of kernel size.\n\nOptions:\n  -o, --output TEXT      Output file.\n  -s, --size INTEGER...  Kernel dimensions.\n  -h, --help             Show this message and exit.\n```\n\n```\n\u003e python hybrid.py sobel -h\nUsage: hybrid.py sobel [OPTIONS] IMAGE\n\n  Perform sobel edge detection.\n\nOptions:\n  -o, --output TEXT  Output file.\n  -h, --help         Show this message and exit.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhthomas%2Fhybrid-images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhthomas%2Fhybrid-images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhthomas%2Fhybrid-images/lists"}