# PyOcclusion


[](https://pepy.tech/project/pyocclusion)
PyOcclusion is a Python package for adding noise of occlusionary type to video files. There is a broad range of parameters for altering in order to achieve the desirded occlusion density, coverage percent, etc. The process is automated and requires no additional prescribing.
Here is an example of what can be done with PyOcclusion:

# Statement Of Need
While most of the software tends to reduce noise in the file, there are many cases when people need to add noise in order to test the new visual model, recognition software, etc. However, most of software tends to generate Gaussian noise, Salt-and-Pepper Noise and so on. PyOcclusion gives an opportunity to overlay an occlusion on both image and video files. There is a broad variety of parameters for customizing occlusionary noise to achieve desired result.
# Installation
PyOcclusion can be installed from PyPI:
```pip install PyOcclusion```
Once installed, package can be loaded as:
```import PyOcclusion```
# Example
```
import PyOcclusion
# instantiate an editor
row_velocity = 20
column_velocity = 0
height_of_shape = 17
width_of_shape = 17
num = 500
height_of_frame = 1080
width_of_frame = 1920
editor = PyOcclusion.VideoEditor(row_velocity, column_velocity, height_of_shape, width_of_shape, num, height_of_frame, width_of_frame)
# generate new video
path_to_file = "./video.mp4"
path_to_new_file = "./newVideo.mp4"
editor.editVideo(path_to_file, path_to_new_file)
```
# Documentation
General:
[API](PyOcclusion-Package/docs/API.md)
[Usage Examples](PyOcclusion-Package/examples/Example1.ipynb)
# Citation
The package can be cited as follows:
```
@software{Synytskyi_PyOcclusion_2024,
author = {Synytskyi, Bohdan and Livingstone, Steven R},
month = {08},
title = {{PyOcclusion}},
url = {https://github.com/BohdanSynytskyi/PyOcclusion},
version = {1.0.0},
year = {2024},
}
```
Raw data
{
"_id": null,
"home_page": "https://github.com/BohdanSynytskyi/PyOcclusion",
"name": "PyOcclusion",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Bohdan Synytskyi",
"author_email": "bodiasynytskiy@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/86/24/ece8c00b66765f32dfd9ad641fec6ba7306f035b42c0d954052988cbc007/PyOcclusion-1.0.2.tar.gz",
"platform": null,
"description": "# PyOcclusion\n\n\n[](https://pepy.tech/project/pyocclusion)\n\nPyOcclusion is a Python package for adding noise of occlusionary type to video files. There is a broad range of parameters for altering in order to achieve the desirded occlusion density, coverage percent, etc. The process is automated and requires no additional prescribing.\n\nHere is an example of what can be done with PyOcclusion:\n\n\n\n# Statement Of Need\n\nWhile most of the software tends to reduce noise in the file, there are many cases when people need to add noise in order to test the new visual model, recognition software, etc. However, most of software tends to generate Gaussian noise, Salt-and-Pepper Noise and so on. PyOcclusion gives an opportunity to overlay an occlusion on both image and video files. There is a broad variety of parameters for customizing occlusionary noise to achieve desired result. \n\n# Installation\n\nPyOcclusion can be installed from PyPI:\n\n```pip install PyOcclusion```\n\nOnce installed, package can be loaded as:\n\n```import PyOcclusion```\n\n# Example\n\n``` \nimport PyOcclusion\n\n# instantiate an editor\n\nrow_velocity = 20\ncolumn_velocity = 0\nheight_of_shape = 17\nwidth_of_shape = 17\nnum = 500\nheight_of_frame = 1080\nwidth_of_frame = 1920\n\neditor = PyOcclusion.VideoEditor(row_velocity, column_velocity, height_of_shape, width_of_shape, num, height_of_frame, width_of_frame)\n\n# generate new video\n\npath_to_file = \"./video.mp4\"\n\npath_to_new_file = \"./newVideo.mp4\"\n\neditor.editVideo(path_to_file, path_to_new_file)\n```\n\n# Documentation\n\nGeneral:\n\n[API](PyOcclusion-Package/docs/API.md)\n\n[Usage Examples](PyOcclusion-Package/examples/Example1.ipynb)\n\n# Citation\n\nThe package can be cited as follows:\n\n```\n@software{Synytskyi_PyOcclusion_2024,\n author = {Synytskyi, Bohdan and Livingstone, Steven R},\n month = {08},\n title = {{PyOcclusion}},\n url = {https://github.com/BohdanSynytskyi/PyOcclusion},\n version = {1.0.0},\n year = {2024},\n}\n```\n\n",
"bugtrack_url": null,
"license": null,
"summary": "A package for video editing with occlusion noise",
"version": "1.0.2",
"project_urls": {
"Homepage": "https://github.com/BohdanSynytskyi/PyOcclusion"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "11b4352c924e9e901c83556bd57f441a016f8a7bdf4a6f4a23f5c1cf24a93605",
"md5": "3e91e2641e2fea7b5a7f07a9b2079d8c",
"sha256": "c98470b1add61e9f39a586e1a895887f363205e9242e39cd370bbf72d977fc1a"
},
"downloads": -1,
"filename": "PyOcclusion-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3e91e2641e2fea7b5a7f07a9b2079d8c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 7470,
"upload_time": "2024-09-03T19:15:04",
"upload_time_iso_8601": "2024-09-03T19:15:04.051410Z",
"url": "https://files.pythonhosted.org/packages/11/b4/352c924e9e901c83556bd57f441a016f8a7bdf4a6f4a23f5c1cf24a93605/PyOcclusion-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8624ece8c00b66765f32dfd9ad641fec6ba7306f035b42c0d954052988cbc007",
"md5": "a6470c60b4e46603e19fac57a0e6d75d",
"sha256": "39950cf06e6921b90010c41bee8e186f31fa82b3b7b17a0b5e10bd13e30c6a69"
},
"downloads": -1,
"filename": "PyOcclusion-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "a6470c60b4e46603e19fac57a0e6d75d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 5962,
"upload_time": "2024-09-03T19:15:05",
"upload_time_iso_8601": "2024-09-03T19:15:05.262834Z",
"url": "https://files.pythonhosted.org/packages/86/24/ece8c00b66765f32dfd9ad641fec6ba7306f035b42c0d954052988cbc007/PyOcclusion-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-03 19:15:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "BohdanSynytskyi",
"github_project": "PyOcclusion",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pyocclusion"
}