{ "info": { "author": "VasistaReddy", "author_email": "vasista.1245@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: Freeware", "Programming Language :: Python :: 3.5", "Topic :: Scientific/Engineering :: Image Recognition", "Topic :: Software Development :: Version Control :: Git" ], "description": "# Project Description\n\n\t- RUN LENGTH SMOOTHING ALGORITHM(RLSA) is a method mainly used for block segmentation and text discrimination.\n\t- It mainly uses in Document Image Processing to extract out the ROI(region of interest) like block-of-text/title/content with applied heuristics.\n\n# Install requirements\n\n\t- pip install -r requirements.txt\n\n# Install\n\n\t- pip install pythonRLSA\n\n# Input & Output\n\n[Output of 3 cases with value \"10\" can be seen here](https://github.com/Vasistareddy/pythonRLSA/tree/master/pythonRLSA/test_images/image1.png)\n\nMore results can be seen [here](https://github.com/Vasistareddy/pythonRLSA/tree/master/pythonRLSA/test_images)\n\n# How it works\n\n\t- '255'(white pixel) wil be converted to '0'(black pixel) in a image, if the number of adjacent 255's are less than the predefined limit \"value\".\n\t- The \"value\" varies among the different images.\n\n# Sample Test Case\n\n\t- value = 3\n\t- input - [0, 0, 255, 255, 255, 0, 0, 255, 0, 0, 255, 0, 255]\n\t- output - [0, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 255]\n\n# To test\n\n\t- python pythonRLSA/test_rlsa_unittest.py -v\n\n# Unittest Results\n\n\t- test_bool (__main__.TestRLSA) ... ok\n\t- test_image (__main__.TestRLSA) ... Image must be an numpy ndarray and must be in binary ... ok\n\t- test_rlsa_hori (__main__.TestRLSA) ... ok\n\t- test_rlsa_hori_vert (__main__.TestRLSA) ... ok\n\t- test_rlsa_vert (__main__.TestRLSA) ... ok\n\t- test_value (__main__.TestRLSA) ... ok\n\n----------------------------------------------------------------------\nRan 6 tests in 0.003s\n\nOK\n\n# Prerequisites\n\n\t- python3.5+\n\t- Image must be a binary ndarray(255's/1's/0's)\n\t- Must pass a predefined limit, a certain integer \"value\"\n\n# Method\n\n\t- rlsa\n\n# Parameters\n\n\t- image - numpy.ndarray(required)\n\t- horizantal - boolean(required)\n\t- vertial - boolean(required)\n\t- value - any positive integer(int)(required)\n\n# IPython code to convert Image to Binary and RLSA usage\n\n\t- # convert the image to binary\n\t- import cv2\n\t- image = cv2.imread('test_images/image.jpg')\n\t- gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)\n\t- (thresh, image_binary) = cv2.threshold(gray, 150, 255, cv2.THRESH_BINARY | cv2.THRESH_OTSU)\n\t- # function call\n\t- from pythonRLSA import rlsa\n\t- image_rlsa_horizontal = rlsa.rlsa(image_binary, True, False, 10)\n\n# Bugs/Errors\n\nPlease ensure that you have updated pip to the latest version before installing pythonRLSA.\n\nIf you find any bugs/errors in the usage of above code, please raise an issue through [Github](https://github.com/Vasistareddy/pythonRLSA) or send an email to vasista.1245@gmail.com with a clear example that can reproduce the issue.\n\n\n\n\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/Vasistareddy/pythonRLSA", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Vasistareddy/pythonRLSA", "keywords": "opencv,rlsa,image,documents,article,OCR,extraction", "license": "", "maintainer": "", "maintainer_email": "", "name": "pythonRLSA", "package_url": "https://pypi.org/project/pythonRLSA/", "platform": "", "project_url": "https://pypi.org/project/pythonRLSA/", "project_urls": { "Download": "https://github.com/Vasistareddy/pythonRLSA", "Homepage": "https://github.com/Vasistareddy/pythonRLSA" }, "release_url": "https://pypi.org/project/pythonRLSA/0.0.1/", "requires_dist": [ "numpy (==1.14.5)" ], "requires_python": "", "summary": "Python Run Length Smoothing Algorithm for Document Processing", "version": "0.0.1" }, "last_serial": 4374888, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7d0bd09c0317879e60308cc5f9a81492", "sha256": "a932b2e514d1b8691da0ca6617fbaa15edca9b4cd128cef9a643fdcfc5d18df2" }, "downloads": -1, "filename": "pythonRLSA-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7d0bd09c0317879e60308cc5f9a81492", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3829243, "upload_time": "2018-10-14T18:56:00", "url": "https://files.pythonhosted.org/packages/9d/46/b8b2d27c70e12b83081851e4ccf79fdbb7c2d12b9d7c219441073a4aab22/pythonRLSA-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7d3242a2a3f1842b0dd88adb9d6a5a7d", "sha256": "bcf259febb5febbd8894a6a39dcceadc9f22424376c02b88b95bb2d192fcef54" }, "downloads": -1, "filename": "pythonRLSA-0.0.1.tar.gz", "has_sig": false, "md5_digest": "7d3242a2a3f1842b0dd88adb9d6a5a7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3830978, "upload_time": "2018-10-14T18:56:07", "url": "https://files.pythonhosted.org/packages/f4/7f/7527272b08d3729a87c98c631765f1de1f97519e553e05967d9679e8ee00/pythonRLSA-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7d0bd09c0317879e60308cc5f9a81492", "sha256": "a932b2e514d1b8691da0ca6617fbaa15edca9b4cd128cef9a643fdcfc5d18df2" }, "downloads": -1, "filename": "pythonRLSA-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7d0bd09c0317879e60308cc5f9a81492", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3829243, "upload_time": "2018-10-14T18:56:00", "url": "https://files.pythonhosted.org/packages/9d/46/b8b2d27c70e12b83081851e4ccf79fdbb7c2d12b9d7c219441073a4aab22/pythonRLSA-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7d3242a2a3f1842b0dd88adb9d6a5a7d", "sha256": "bcf259febb5febbd8894a6a39dcceadc9f22424376c02b88b95bb2d192fcef54" }, "downloads": -1, "filename": "pythonRLSA-0.0.1.tar.gz", "has_sig": false, "md5_digest": "7d3242a2a3f1842b0dd88adb9d6a5a7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3830978, "upload_time": "2018-10-14T18:56:07", "url": "https://files.pythonhosted.org/packages/f4/7f/7527272b08d3729a87c98c631765f1de1f97519e553e05967d9679e8ee00/pythonRLSA-0.0.1.tar.gz" } ] }