a-cv2-easy-resize


Namea-cv2-easy-resize JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/a_cv2_easy_resize
SummaryDifferent ways of resizing pictures in OpenCV
upload_time2022-11-24 13:13:21
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords opencv
VCS
bugtrack_url
requirements numpy opencv_python
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
### Different ways of resizing pictures in OpenCV



```python

pip install a-cv2-easy-resize



from a_cv2_easy_resize import add_easy_resize_to_cv2

from a_cv_imwrite_imread_plus import add_imwrite_plus_imread_plus_to_cv2

add_imwrite_plus_imread_plus_to_cv2()

add_easy_resize_to_cv2()

import cv2

pic = cv2.imread_plus(r"https://raw.githubusercontent.com/hansalemaos/screenshots/main/splitted1.jpeg")

pic1 = cv2.easy_resize_image(

    pic.copy(), width=200, height=None, percent=None, interpolation=cv2.INTER_AREA

)

pic2 = cv2.easy_resize_image(

    pic.copy(), width=None, height=200, percent=None, interpolation=cv2.INTER_AREA

)

pic3 = cv2.easy_resize_image(

    pic.copy(), width=100, height=200, percent=None, interpolation=cv2.INTER_AREA

)

pic4 = cv2.easy_resize_image(

    pic.copy(), width=None, height=None, percent=40, interpolation=cv2.INTER_AREA

)

pic5 = cv2.easy_resize_image(

    pic.copy(), width=None, height=None, percent=None, interpolation=cv2.INTER_AREA

)  # returns original

cv2.imwrite('f:\\papagei\\pic1.png', pic1)

cv2.imwrite('f:\\papagei\\pic2.png', pic2)

cv2.imwrite('f:\\papagei\\pic3.png', pic3)

cv2.imwrite('f:\\papagei\\pic4.png', pic4)

cv2.imwrite('f:\\papagei\\pic5.png', pic5)



```





<img src="https://github.com/hansalemaos/screenshots/raw/main/pic1.png"/>





<img src="https://github.com/hansalemaos/screenshots/raw/main/pic2.png"/>





<img src="https://github.com/hansalemaos/screenshots/raw/main/pic3.png"/>





<img src="https://github.com/hansalemaos/screenshots/raw/main/pic4.png"/>





<img src="https://github.com/hansalemaos/screenshots/raw/main/pic5.png"/>






            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/a_cv2_easy_resize",
    "name": "a-cv2-easy-resize",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "openCV",
    "author": "Johannes Fischer",
    "author_email": "<aulasparticularesdealemaosp@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/7d/49/f98d4b2aa3bcf2f2664ad28f0cdc5df5c02ff3921262f55983d3c2250a40/a_cv2_easy_resize-0.10.tar.gz",
    "platform": null,
    "description": "\n### Different ways of resizing pictures in OpenCV\n\n\n\n```python\n\npip install a-cv2-easy-resize\n\n\n\nfrom a_cv2_easy_resize import add_easy_resize_to_cv2\n\nfrom a_cv_imwrite_imread_plus import add_imwrite_plus_imread_plus_to_cv2\n\nadd_imwrite_plus_imread_plus_to_cv2()\n\nadd_easy_resize_to_cv2()\n\nimport cv2\n\npic = cv2.imread_plus(r\"https://raw.githubusercontent.com/hansalemaos/screenshots/main/splitted1.jpeg\")\n\npic1 = cv2.easy_resize_image(\n\n    pic.copy(), width=200, height=None, percent=None, interpolation=cv2.INTER_AREA\n\n)\n\npic2 = cv2.easy_resize_image(\n\n    pic.copy(), width=None, height=200, percent=None, interpolation=cv2.INTER_AREA\n\n)\n\npic3 = cv2.easy_resize_image(\n\n    pic.copy(), width=100, height=200, percent=None, interpolation=cv2.INTER_AREA\n\n)\n\npic4 = cv2.easy_resize_image(\n\n    pic.copy(), width=None, height=None, percent=40, interpolation=cv2.INTER_AREA\n\n)\n\npic5 = cv2.easy_resize_image(\n\n    pic.copy(), width=None, height=None, percent=None, interpolation=cv2.INTER_AREA\n\n)  # returns original\n\ncv2.imwrite('f:\\\\papagei\\\\pic1.png', pic1)\n\ncv2.imwrite('f:\\\\papagei\\\\pic2.png', pic2)\n\ncv2.imwrite('f:\\\\papagei\\\\pic3.png', pic3)\n\ncv2.imwrite('f:\\\\papagei\\\\pic4.png', pic4)\n\ncv2.imwrite('f:\\\\papagei\\\\pic5.png', pic5)\n\n\n\n```\n\n\n\n\n\n<img src=\"https://github.com/hansalemaos/screenshots/raw/main/pic1.png\"/>\n\n\n\n\n\n<img src=\"https://github.com/hansalemaos/screenshots/raw/main/pic2.png\"/>\n\n\n\n\n\n<img src=\"https://github.com/hansalemaos/screenshots/raw/main/pic3.png\"/>\n\n\n\n\n\n<img src=\"https://github.com/hansalemaos/screenshots/raw/main/pic4.png\"/>\n\n\n\n\n\n<img src=\"https://github.com/hansalemaos/screenshots/raw/main/pic5.png\"/>\n\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Different ways of resizing pictures in OpenCV",
    "version": "0.10",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/a_cv2_easy_resize"
    },
    "split_keywords": [
        "opencv"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "19203fbda986be3afa540b80fbf3d27cff3d73a8ebc9b97f0d96bdc205f80377",
                "md5": "126ec524b5fc220cf0f7139452de0e2e",
                "sha256": "ac5d0ee0cd428100b83d2760673b90d4c392945514dd4694e2ac69956c234ae7"
            },
            "downloads": -1,
            "filename": "a_cv2_easy_resize-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "126ec524b5fc220cf0f7139452de0e2e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5305,
            "upload_time": "2022-11-24T13:13:20",
            "upload_time_iso_8601": "2022-11-24T13:13:20.647032Z",
            "url": "https://files.pythonhosted.org/packages/19/20/3fbda986be3afa540b80fbf3d27cff3d73a8ebc9b97f0d96bdc205f80377/a_cv2_easy_resize-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7d49f98d4b2aa3bcf2f2664ad28f0cdc5df5c02ff3921262f55983d3c2250a40",
                "md5": "dbb1dc313cb622beeb950bb7f5b7568f",
                "sha256": "3156b97cac7bae0db9cb7a50d98e9bd85fd15d38d3f1942f3accdc1e4d60634d"
            },
            "downloads": -1,
            "filename": "a_cv2_easy_resize-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "dbb1dc313cb622beeb950bb7f5b7568f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3697,
            "upload_time": "2022-11-24T13:13:21",
            "upload_time_iso_8601": "2022-11-24T13:13:21.912365Z",
            "url": "https://files.pythonhosted.org/packages/7d/49/f98d4b2aa3bcf2f2664ad28f0cdc5df5c02ff3921262f55983d3c2250a40/a_cv2_easy_resize-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-11-24 13:13:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "a_cv2_easy_resize",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "opencv_python",
            "specs": []
        }
    ],
    "lcname": "a-cv2-easy-resize"
}
        
Elapsed time: 1.86648s