{ "info": { "author": "Maksym Balatsko", "author_email": "mbalatsko@gmail.com", "bugtrack_url": null, "classifiers": [ "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.0", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering :: Image Recognition" ], "description": "# Rolling ball and sliding paraboloid background subtraction algorithms \n\n[![PyPI version](https://badge.fury.io/py/opencv-rolling-ball.svg)](https://badge.fury.io/py/opencv-rolling-ball)\n[![Downloads](https://pepy.tech/badge/opencv-rolling-ball)](https://pepy.tech/project/pypylon-opencv-viewer)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\nFully Ported to Python from ImageJ's Background Subtractor.\nOnly works for 8-bit greyscale images currently.\nBased on the concept of the rolling ball algorithm described\nin Stanley Sternberg's article,\n\"Biomedical Image Processing\", IEEE Computer, January 1983.\nImagine that the 2D grayscale image has a third (height) dimension by the image\nvalue at every point in the image, creating a surface. A ball of given radius\nis rolled over the bottom side of this surface; the hull of the volume\nreachable by the ball is the background.\nhttp://rsbweb.nih.gov/ij/developer/source/ij/plugin/filter/BackgroundSubtracter.java.html\n\n**This algorithms are perfect for microscope images, to distinguish particles\nfrom background.**\n\n## Installation\n\n```bash\npip install opencv-rolling-ball\n```\n\n## Usage\n\n```python\nimport cv2\nfrom cv2_rolling_ball import subtract_background_rolling_ball\n\nimg = cv2.imread(f'path/to/img.tif', 0)\nimg, background = subtract_background_rolling_ball(img, 30, light_background=True,\n use_paraboloid=False, do_presmooth=True)\n```\n\n## Example outputs\n\n#### Input\n\n![Input](https://raw.githubusercontent.com/mbalatsko/opencv-rolling-ball/master/outputs/example.png)\n\n#### Subtracted background\n\n![Background](https://raw.githubusercontent.com/mbalatsko/opencv-rolling-ball/master/outputs/example_bg.png)\n\n#### Without background\n\n![Without background](https://raw.githubusercontent.com/mbalatsko/opencv-rolling-ball/master/outputs/example_roll.png)", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/mbalatsko/opencv-rolling-ball/archive/1.0.1.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mbalatsko/opencv-rolling-ball", "keywords": "opencv,background subtraction,rolling ball algorithm", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "opencv-rolling-ball", "package_url": "https://pypi.org/project/opencv-rolling-ball/", "platform": "", "project_url": "https://pypi.org/project/opencv-rolling-ball/", "project_urls": { "Download": "https://github.com/mbalatsko/opencv-rolling-ball/archive/1.0.1.tar.gz", "Homepage": "https://github.com/mbalatsko/opencv-rolling-ball" }, "release_url": "https://pypi.org/project/opencv-rolling-ball/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "Now function returns both result image and subtracted background", "version": "1.0.1" }, "last_serial": 4333282, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "21a3f17100cae8297f11a68b4f10663c", "sha256": "95bbc4b55801cc39970a5e5d1869be699ec975f9b350bbfbd33e109e36fec3c9" }, "downloads": -1, "filename": "opencv-rolling-ball-1.000000.tar.gz", "has_sig": false, "md5_digest": "21a3f17100cae8297f11a68b4f10663c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6072, "upload_time": "2018-09-28T21:02:11", "url": "https://files.pythonhosted.org/packages/25/52/21def60639ac831ed057afb32d8ab3d979232bba3cf65e437c5a823f85b2/opencv-rolling-ball-1.000000.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "ecd9f2f35bdcdfd362c7e776bd74d1e1", "sha256": "095111fae47056692b44fee9e8f635dcc095276f07ba496738d9f06a27d1fe46" }, "downloads": -1, "filename": "opencv-rolling-ball-1.0.1.tar.gz", "has_sig": false, "md5_digest": "ecd9f2f35bdcdfd362c7e776bd74d1e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6214, "upload_time": "2018-10-02T16:10:55", "url": "https://files.pythonhosted.org/packages/86/a7/b210b66daf1d6beb12f5d5c8bc2f91a3b37f5fb520d6728d7c05ef4e6c14/opencv-rolling-ball-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ecd9f2f35bdcdfd362c7e776bd74d1e1", "sha256": "095111fae47056692b44fee9e8f635dcc095276f07ba496738d9f06a27d1fe46" }, "downloads": -1, "filename": "opencv-rolling-ball-1.0.1.tar.gz", "has_sig": false, "md5_digest": "ecd9f2f35bdcdfd362c7e776bd74d1e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6214, "upload_time": "2018-10-02T16:10:55", "url": "https://files.pythonhosted.org/packages/86/a7/b210b66daf1d6beb12f5d5c8bc2f91a3b37f5fb520d6728d7c05ef4e6c14/opencv-rolling-ball-1.0.1.tar.gz" } ] }