# Machine Vision Toolbox for Python - data package
[![A Python Robotics Package](https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/master/.github/svg/py_collection.min.svg)](https://github.com/petercorke/machine-vision-toolbox-python)
[![PyPI version](https://badge.fury.io/py/mvtb-data.svg)](https://badge.fury.io/py/mvtb-data)
[![Anaconda version](https://anaconda.org/conda-forge/mvtb-data/badges/version.svg)](https://anaconda.org/conda-forge/mvtb-data)
<table style="border:0px">
<tr style="border:0px">
<td style="border:0px">
<img src="https://github.com/petercorke/machinevision-toolbox-python/raw/master/figs/MVTBDataLogo.png" width="250"></td>
<td style="border:0px">
This package includes large data files associated with the <a href="https://pypi.org/project/machinevision-toolbox-python">Machine Vision Toolbox for Python (MVTB-P)</a>.
</td>
</tr>
</table>
## Rationale
The data files are provided as a separate package to work around disk space limitations on PyPI. Including these data with the MVTB code adds nearly 200MB to every release, which will blow the PyPI limit quite quickly.
Since the data doesn't change very much, it's mostly images models and a few data files, it makes sense for it to be a standalone package.
## Package contents
| Folder | Purpose |
| ------ | ------------------------------ |
| data | miscellaneous spectral data |
| images | example images, videos |
## Accessing data within the package
The Toolbox function `mvtb_path_to_datafile(file)` will return an absolute
`Path` object that contains the path to `file` which is given relative to the
root of the data package:
```
mvtb_path_to_datafile("images/monalisa.png")
```
which can also be used like `os.path.join` as
```
mvtb_path_to_datafile("images", "monalisa.png")
```
Image files are assumed to be in the `images` folder of the data package, and this will be searched
by the image loading function
```
iread("myimage.png") # read ./myimage.png
iread("monalisa.png") # read from data package
```
or class method
```
Image.Read("myimage.png") # read ./myimage.png
Image.Read("monalisa.png") # read from data package
```
A matching local file takes precendence over a file in the data package.
## Installing the package
You don't need to explicitly install this package, it happens automatically when you when you install MVTB-P
```
pip install machinevisiontoolbox-python
```
since it is a dependency.
## Install big image files
There are two very large zip files containing image sequences which are used in
Sec. 14.8.3 Visual Odometry, each is 116M and exceeds the total PyPI quota. They
are not included in the `mvtbdata` package, but you can download them into your
*local* `mvtbdata` package by running
```
import mvtbdata.mvtb_load_image_data
```
from inside a Python session. You only need to do this once.
Raw data
{
"_id": null,
"home_page": "https://github.com/petercorke/machinevision-toolbox-python/mvtb-data",
"name": "mvtb-data",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python machine vision",
"author": "Peter Corke",
"author_email": "rvc@petercorke.com",
"download_url": "",
"platform": null,
"description": "# Machine Vision Toolbox for Python - data package\n\n[![A Python Robotics Package](https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/master/.github/svg/py_collection.min.svg)](https://github.com/petercorke/machine-vision-toolbox-python)\n[![PyPI version](https://badge.fury.io/py/mvtb-data.svg)](https://badge.fury.io/py/mvtb-data)\n[![Anaconda version](https://anaconda.org/conda-forge/mvtb-data/badges/version.svg)](https://anaconda.org/conda-forge/mvtb-data)\n\n<table style=\"border:0px\">\n<tr style=\"border:0px\">\n<td style=\"border:0px\">\n<img src=\"https://github.com/petercorke/machinevision-toolbox-python/raw/master/figs/MVTBDataLogo.png\" width=\"250\"></td>\n<td style=\"border:0px\">\nThis package includes large data files associated with the <a href=\"https://pypi.org/project/machinevision-toolbox-python\">Machine Vision Toolbox for Python (MVTB-P)</a>.\n</td>\n</tr>\n</table>\n\n\n## Rationale\n\nThe data files are provided as a separate package to work around disk space limitations on PyPI. Including these data with the MVTB code adds nearly 200MB to every release, which will blow the PyPI limit quite quickly. \nSince the data doesn't change very much, it's mostly images models and a few data files, it makes sense for it to be a standalone package.\n\n## Package contents\n\n| Folder | Purpose |\n| ------ | ------------------------------ |\n| data | miscellaneous spectral data |\n| images | example images, videos |\n\n## Accessing data within the package\n\nThe Toolbox function `mvtb_path_to_datafile(file)` will return an absolute\n`Path` object that contains the path to `file` which is given relative to the\nroot of the data package:\n\n```\nmvtb_path_to_datafile(\"images/monalisa.png\")\n```\n\nwhich can also be used like `os.path.join` as\n\n```\nmvtb_path_to_datafile(\"images\", \"monalisa.png\")\n```\n\nImage files are assumed to be in the `images` folder of the data package, and this will be searched\nby the image loading function\n\n```\niread(\"myimage.png\") # read ./myimage.png\niread(\"monalisa.png\") # read from data package\n```\n\nor class method\n\n```\nImage.Read(\"myimage.png\") # read ./myimage.png\nImage.Read(\"monalisa.png\") # read from data package\n```\n\n\nA matching local file takes precendence over a file in the data package.\n\n## Installing the package\n\nYou don't need to explicitly install this package, it happens automatically when you when you install MVTB-P\n\n```\npip install machinevisiontoolbox-python\n```\nsince it is a dependency.\n\n## Install big image files\n\nThere are two very large zip files containing image sequences which are used in\nSec. 14.8.3 Visual Odometry, each is 116M and exceeds the total PyPI quota. They\nare not included in the `mvtbdata` package, but you can download them into your\n*local* `mvtbdata` package by running\n\n```\nimport mvtbdata.mvtb_load_image_data\n```\n\nfrom inside a Python session. You only need to do this once.\n",
"bugtrack_url": null,
"license": "",
"summary": "Data files for the Machine Vision Toolbox for Python.",
"version": "1.5",
"split_keywords": [
"python",
"machine",
"vision"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "783bbd59b9c5bc99b25e6f2ec4839944bd225c1818a2e8c557ba0fb5695dc201",
"md5": "51b22f0b90840cebf91862ea9732b0b5",
"sha256": "a65d6569289b124b61a5f99e395bf080b035686f637740163b6f9608e7729fd7"
},
"downloads": -1,
"filename": "mvtb_data-1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "51b22f0b90840cebf91862ea9732b0b5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 128665430,
"upload_time": "2023-01-15T07:33:14",
"upload_time_iso_8601": "2023-01-15T07:33:14.938902Z",
"url": "https://files.pythonhosted.org/packages/78/3b/bd59b9c5bc99b25e6f2ec4839944bd225c1818a2e8c557ba0fb5695dc201/mvtb_data-1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-15 07:33:14",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "mvtb-data"
}