locate-pixelcolor-numbacuda


Namelocate-pixelcolor-numbacuda JSON
Version 0.12 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/locate_pixelcolor_numbacuda
SummaryRGB search with numba.cuda - 10 x faster than numpy
upload_time2023-04-15 00:45:44
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords numpy numba cuda rgb search
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # RGB search with numba.cuda - 10 x faster than numpy 

### pip install locate-pixelcolor-numbacuda


```python
from locate_pixelcolor_numbacuda import search_colors
from a_cv_imwrite_imread_plus import open_image_in_cv
import numpy as np
colors=[(66,  71,  69),(62,  67,  65),(144, 155, 153),(52,  57,  55),(127, 138, 136),(53,  58,  56),(51,  56,  54),(32,  27,  18),(24,  17,   8),]
```

#### image'https://www.pexels.com/pt-br/foto/foto-da-raposa-sentada-no-chao-2295744/'

```python
picnp = open_image_in_cv('pexels-alex-andrews-2295744.jpg',channels_in_output=3)
coords=search_colors(pic=picnp,colors=colors,threadsperblock=(18, 18,3),dtypetouse = np.int32)
print(coords)
%timeit search_colors(pic=picnp,colors=colors,threadsperblock=(18, 18,3),dtypetouse = np.int32)


# [[[  19   14]
#   [  19   14]
#   [  11   17]
#   ...
#   [6613 4524]
#   [6614 4524]
#   [6615 4524]]]
# 135 ms ± 3.5 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)

# More benchmarks: https://github.com/hansalemaos/locate_pixelcolor_cpp

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/locate_pixelcolor_numbacuda",
    "name": "locate-pixelcolor-numbacuda",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "numpy,numba,CUDA,rgb,search",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d9/5c/56f7f6951b5ea88ebf3add799807f5ada620639c17cb81f94b507420ad79/locate_pixelcolor_numbacuda-0.12.tar.gz",
    "platform": null,
    "description": "# RGB search with numba.cuda - 10 x faster than numpy \r\n\r\n### pip install locate-pixelcolor-numbacuda\r\n\r\n\r\n```python\r\nfrom locate_pixelcolor_numbacuda import search_colors\r\nfrom a_cv_imwrite_imread_plus import open_image_in_cv\r\nimport numpy as np\r\ncolors=[(66,  71,  69),(62,  67,  65),(144, 155, 153),(52,  57,  55),(127, 138, 136),(53,  58,  56),(51,  56,  54),(32,  27,  18),(24,  17,   8),]\r\n```\r\n\r\n#### image'https://www.pexels.com/pt-br/foto/foto-da-raposa-sentada-no-chao-2295744/'\r\n\r\n```python\r\npicnp = open_image_in_cv('pexels-alex-andrews-2295744.jpg',channels_in_output=3)\r\ncoords=search_colors(pic=picnp,colors=colors,threadsperblock=(18, 18,3),dtypetouse = np.int32)\r\nprint(coords)\r\n%timeit search_colors(pic=picnp,colors=colors,threadsperblock=(18, 18,3),dtypetouse = np.int32)\r\n\r\n\r\n# [[[  19   14]\r\n#   [  19   14]\r\n#   [  11   17]\r\n#   ...\r\n#   [6613 4524]\r\n#   [6614 4524]\r\n#   [6615 4524]]]\r\n# 135 ms \u00c2\u00b1 3.5 ms per loop (mean \u00c2\u00b1 std. dev. of 7 runs, 10 loops each)\r\n\r\n# More benchmarks: https://github.com/hansalemaos/locate_pixelcolor_cpp\r\n\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "RGB search with numba.cuda - 10 x faster than numpy",
    "version": "0.12",
    "split_keywords": [
        "numpy",
        "numba",
        "cuda",
        "rgb",
        "search"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b81325c3bf17022eedb479f4070a5f9cde95b8b5ccc87dc9fea2d6a21887ee90",
                "md5": "2afd284b9d38e6828967c8db78251ace",
                "sha256": "a544ca61fc2edb326aa301717ff536f119d4a5e6bbdb3be4225a5e847c9cc8fe"
            },
            "downloads": -1,
            "filename": "locate_pixelcolor_numbacuda-0.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2afd284b9d38e6828967c8db78251ace",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6835,
            "upload_time": "2023-04-15T00:45:42",
            "upload_time_iso_8601": "2023-04-15T00:45:42.412070Z",
            "url": "https://files.pythonhosted.org/packages/b8/13/25c3bf17022eedb479f4070a5f9cde95b8b5ccc87dc9fea2d6a21887ee90/locate_pixelcolor_numbacuda-0.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d95c56f7f6951b5ea88ebf3add799807f5ada620639c17cb81f94b507420ad79",
                "md5": "6a1e70d691f1166345fb2ea20bbdac1f",
                "sha256": "4be17bc1996ba6dff3e21e6f9ef698411b768c75cc60149dd2d79cfaaa0f4bc1"
            },
            "downloads": -1,
            "filename": "locate_pixelcolor_numbacuda-0.12.tar.gz",
            "has_sig": false,
            "md5_digest": "6a1e70d691f1166345fb2ea20bbdac1f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4774,
            "upload_time": "2023-04-15T00:45:44",
            "upload_time_iso_8601": "2023-04-15T00:45:44.648694Z",
            "url": "https://files.pythonhosted.org/packages/d9/5c/56f7f6951b5ea88ebf3add799807f5ada620639c17cb81f94b507420ad79/locate_pixelcolor_numbacuda-0.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-15 00:45:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "hansalemaos",
    "github_project": "locate_pixelcolor_numbacuda",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "locate-pixelcolor-numbacuda"
}
        
Elapsed time: 0.05664s