|
| 1 | +# 📸 Python Computer Vision Snippets |
| 2 | + |
| 3 | +[](https://packagecontrol.io/packages/Python%20Computer%20Vision%20Snippets) |
| 4 | +[](https://github.com/futureprogrammer360/Python-Computer-Vision-Snippets/tags) |
| 5 | +[](https://github.com/futureprogrammer360/Python-Computer-Vision-Snippets) |
| 6 | +[](https://github.com/futureprogrammer360/Python-Computer-Vision-Snippets/blob/master/LICENSE) |
| 7 | + |
| 8 | +[Python Computer Vision Snippets](https://github.com/futureprogrammer360/Python-Computer-Vision-Snippets) is a collection of [Sublime Text](https://www.sublimetext.com/) snippets for computer vision and image processing in Python. |
| 9 | + |
| 10 | +## 💻 Installation |
| 11 | + |
| 12 | +The easiest way to install Python Computer Vision Snippets is through [Package Control](https://packagecontrol.io/packages/Python%20Computer%20Vision%20Snippets). After it is enabled inside Sublime Text, open the command palette and find **Package Control: Install Package** and press `ENTER`. Then, find **Python Computer Vision Snippets** in the list. Press `ENTER` again, and this package is installed! |
| 13 | + |
| 14 | +## 📈 Snippets |
| 15 | + |
| 16 | +* [Imports](#imports) |
| 17 | +* [OpenCV](#opencv) |
| 18 | +* [Pillow](#pillow) |
| 19 | + |
| 20 | +### Imports |
| 21 | + |
| 22 | +Import snippets start with `i` followed by the package/module's import alias. |
| 23 | + |
| 24 | +| Trigger | Description | |
| 25 | +|----------|-------------------------| |
| 26 | +| `icv2` | `import cv2` | |
| 27 | +| `iImage` | `from PIL import Image` | |
| 28 | + |
| 29 | +### OpenCV |
| 30 | + |
| 31 | +| Trigger | Description | |
| 32 | +|---------------------|-------------------------| |
| 33 | +| `circle` | `cv2.circle` | |
| 34 | +| `cvtColor` | `cv2.cvtColor` | |
| 35 | +| `destroyAllWindows` | `cv2.destroyAllWindows` | |
| 36 | +| `imread` | `cv2.imread` | |
| 37 | +| `imshow` | `cv2.imshow` | |
| 38 | +| `imwrite` | `cv2.imwrite` | |
| 39 | +| `line` | `cv2.line` | |
| 40 | +| `putText` | `cv2.putText` | |
| 41 | +| `rectangle` | `cv2.rectangle` | |
| 42 | +| `resize` | `cv2.resize` | |
| 43 | +| `rotate` | `cv2.rotate` | |
| 44 | +| `VideoCapture` | `cv2.VideoCapture` | |
| 45 | +| `waitKey` | `cv2.waitKey` | |
| 46 | + |
| 47 | +### Pillow |
| 48 | + |
| 49 | +| Trigger | Description | |
| 50 | +|-------------|-----------------------| |
| 51 | +| `convert` | `Image.convert` | |
| 52 | +| `crop` | `Image.crop` | |
| 53 | +| `fromarray` | `PIL.Image.fromarray` | |
| 54 | +| `open` | `PIL.Image.open` | |
| 55 | +| `resize` | `Image.resize` | |
| 56 | +| `rotate` | `Image.rotate` | |
| 57 | +| `save` | `Image.save` | |
| 58 | + |
| 59 | +The snippet files are in the [`snippets`](https://github.com/futureprogrammer360/Python-Computer-Vision-Snippets/tree/master/snippets) folder of [this GitHub repository](https://github.com/futureprogrammer360/Python-Computer-Vision-Snippets). |
0 commit comments