├── .gitattributes
├── .gitignore
├── LicensePlateRecoginition.ipynb
├── QR CODE Scanner.ipynb
├── VPen.ipynb
├── Virtual Pen
├── VPen.ipynb
├── finding HSV value (screenshot).png
├── finding HSV values.ipynb
├── hsv_value.npy
├── virtual pen demo.mp4
└── virtual pen on action(screenshot).png
├── cartooning and sketching live app .ipynb
├── cartoonizing an image using opencv.ipynb
├── color detection
├── color detection.ipynb
├── color palette.jpg
└── colors.csv
├── color palette using OpenCV.ipynb
├── contrast enhancing of color images using opencv.ipynb
├── contrast enhancing of gray scale image using opencv.ipynb
├── document scanner.ipynb
├── draw vertical lines on coin.ipynb
├── face detection using opencv.ipynb
├── image bluring using opencv python.ipynb
├── image resizing using opencv.ipynb
├── image segmentation.ipynb
├── invisible cloak.ipynb
├── motion blurring effect .ipynb
├── negative flim.ipynb
├── noise removing using opencv.ipynb
├── non-photorealistic rendering .ipynb
├── number plate detection.ipynb
├── object tracking using OpenCV.ipynb
├── pencil drawing effect.ipynb
├── reversing video using opencv.ipynb
├── sharpening of images using opencv.ipynb
├── thresholding techniques.ipynb
└── watermarking on images using OpenCV.ipynb
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | build/
12 | develop-eggs/
13 | dist/
14 | downloads/
15 | eggs/
16 | .eggs/
17 | lib/
18 | lib64/
19 | parts/
20 | sdist/
21 | var/
22 | wheels/
23 | pip-wheel-metadata/
24 | share/python-wheels/
25 | *.egg-info/
26 | .installed.cfg
27 | *.egg
28 | MANIFEST
29 |
30 | # PyInstaller
31 | # Usually these files are written by a python script from a template
32 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
33 | *.manifest
34 | *.spec
35 |
36 | # Installer logs
37 | pip-log.txt
38 | pip-delete-this-directory.txt
39 |
40 | # Unit test / coverage reports
41 | htmlcov/
42 | .tox/
43 | .nox/
44 | .coverage
45 | .coverage.*
46 | .cache
47 | nosetests.xml
48 | coverage.xml
49 | *.cover
50 | *.py,cover
51 | .hypothesis/
52 | .pytest_cache/
53 |
54 | # Translations
55 | *.mo
56 | *.pot
57 |
58 | # Django stuff:
59 | *.log
60 | local_settings.py
61 | db.sqlite3
62 | db.sqlite3-journal
63 |
64 | # Flask stuff:
65 | instance/
66 | .webassets-cache
67 |
68 | # Scrapy stuff:
69 | .scrapy
70 |
71 | # Sphinx documentation
72 | docs/_build/
73 |
74 | # PyBuilder
75 | target/
76 |
77 | # Jupyter Notebook
78 | .ipynb_checkpoints
79 |
80 | # IPython
81 | profile_default/
82 | ipython_config.py
83 |
84 | # pyenv
85 | .python-version
86 |
87 | # pipenv
88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
91 | # install all needed dependencies.
92 | #Pipfile.lock
93 |
94 | # celery beat schedule file
95 | celerybeat-schedule
96 |
97 | # SageMath parsed files
98 | *.sage.py
99 |
100 | # Environments
101 | .env
102 | .venv
103 | env/
104 | venv/
105 | ENV/
106 | env.bak/
107 | venv.bak/
108 |
109 | # Spyder project settings
110 | .spyderproject
111 | .spyproject
112 |
113 | # Rope project settings
114 | .ropeproject
115 |
116 | # mkdocs documentation
117 | /site
118 |
119 | # mypy
120 | .mypy_cache/
121 | .dmypy.json
122 | dmypy.json
123 |
124 | # Pyre type checker
125 | .pyre/
126 |
--------------------------------------------------------------------------------
/LicensePlateRecoginition.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "follow on insta\n",
8 | "@programmimg_fever"
9 | ]
10 | },
11 | {
12 | "cell_type": "markdown",
13 | "metadata": {},
14 | "source": [
15 | "# LicensePlateRecognition using OpenCV python"
16 | ]
17 | },
18 | {
19 | "cell_type": "code",
20 | "execution_count": null,
21 | "metadata": {},
22 | "outputs": [
23 | {
24 | "name": "stdout",
25 | "output_type": "stream",
26 | "text": [
27 | "programming_fever's License Plate Recognition\n",
28 | "\n",
29 | "Detected license plate Number is: MH 20 EE 7598\n"
30 | ]
31 | }
32 | ],
33 | "source": [
34 | "import cv2\n",
35 | "import imutils\n",
36 | "import numpy as np\n",
37 | "import pytesseract\n",
38 | "pytesseract.pytesseract.tesseract_cmd = r'C:\\Program Files (x86)\\Tesseract-OCR\\tesseract.exe'\n",
39 | "\n",
40 | "img = cv2.imread('D://skoda1.jpg',cv2.IMREAD_COLOR)\n",
41 | "img = cv2.resize(img, (600,400) )\n",
42 | "\n",
43 | "gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) \n",
44 | "gray = cv2.bilateralFilter(gray, 13, 15, 15) \n",
45 | "\n",
46 | "edged = cv2.Canny(gray, 30, 200) \n",
47 | "contours = cv2.findContours(edged.copy(), cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)\n",
48 | "contours = imutils.grab_contours(contours)\n",
49 | "contours = sorted(contours, key = cv2.contourArea, reverse = True)[:10]\n",
50 | "screenCnt = None\n",
51 | "\n",
52 | "for c in contours:\n",
53 | " \n",
54 | " peri = cv2.arcLength(c, True)\n",
55 | " approx = cv2.approxPolyDP(c, 0.018 * peri, True)\n",
56 | " \n",
57 | " if len(approx) == 4:\n",
58 | " screenCnt = approx\n",
59 | " break\n",
60 | "\n",
61 | "if screenCnt is None:\n",
62 | " detected = 0\n",
63 | " print (\"No contour detected\")\n",
64 | "else:\n",
65 | " detected = 1\n",
66 | "\n",
67 | "if detected == 1:\n",
68 | " cv2.drawContours(img, [screenCnt], -1, (0, 0, 255), 3)\n",
69 | "\n",
70 | "mask = np.zeros(gray.shape,np.uint8)\n",
71 | "new_image = cv2.drawContours(mask,[screenCnt],0,255,-1,)\n",
72 | "new_image = cv2.bitwise_and(img,img,mask=mask)\n",
73 | "\n",
74 | "(x, y) = np.where(mask == 255)\n",
75 | "(topx, topy) = (np.min(x), np.min(y))\n",
76 | "(bottomx, bottomy) = (np.max(x), np.max(y))\n",
77 | "Cropped = gray[topx:bottomx+1, topy:bottomy+1]\n",
78 | "\n",
79 | "text = pytesseract.image_to_string(Cropped, config='--psm 11')\n",
80 | "print(\"programming_fever's License Plate Recognition\\n\")\n",
81 | "print(\"Detected license plate Number is:\",text)\n",
82 | "img = cv2.resize(img,(500,300))\n",
83 | "Cropped = cv2.resize(Cropped,(400,200))\n",
84 | "cv2.imshow('car',img)\n",
85 | "cv2.imshow('Cropped',Cropped)\n",
86 | "\n",
87 | "cv2.waitKey(0)\n",
88 | "cv2.destroyAllWindows()"
89 | ]
90 | },
91 | {
92 | "cell_type": "markdown",
93 | "metadata": {},
94 | "source": [
95 | "you can find code description @medium publication\n",
96 | "@programmimg_fever"
97 | ]
98 | },
99 | {
100 | "cell_type": "code",
101 | "execution_count": null,
102 | "metadata": {},
103 | "outputs": [],
104 | "source": []
105 | }
106 | ],
107 | "metadata": {
108 | "kernelspec": {
109 | "display_name": "Python 3",
110 | "language": "python",
111 | "name": "python3"
112 | },
113 | "language_info": {
114 | "codemirror_mode": {
115 | "name": "ipython",
116 | "version": 3
117 | },
118 | "file_extension": ".py",
119 | "mimetype": "text/x-python",
120 | "name": "python",
121 | "nbconvert_exporter": "python",
122 | "pygments_lexer": "ipython3",
123 | "version": "3.7.6"
124 | }
125 | },
126 | "nbformat": 4,
127 | "nbformat_minor": 4
128 | }
129 |
--------------------------------------------------------------------------------
/QR CODE Scanner.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# QR code Scanner"
8 | ]
9 | },
10 | {
11 | "cell_type": "code",
12 | "execution_count": null,
13 | "metadata": {},
14 | "outputs": [
15 | {
16 | "name": "stdout",
17 | "output_type": "stream",
18 | "text": [
19 | "Decoded Data : https://www.instagram.com/programming_fever/\n",
20 | "[[[ 40. 40.]]\n",
21 | "\n",
22 | " [[369. 40.]]\n",
23 | "\n",
24 | " [[369. 369.]]\n",
25 | "\n",
26 | " [[ 40. 369.]]]\n"
27 | ]
28 | }
29 | ],
30 | "source": [
31 | "#programming_fever\n",
32 | "import cv2\n",
33 | "import numpy as np\n",
34 | "import sys\n",
35 | "import time\n",
36 | "\n",
37 | "inputImage = cv2.imread(\"D://OpenCV//opencv jupyter files//programming_fever.png\")\n",
38 | "# Display barcode and QR code location\n",
39 | "def display(im, bbox):\n",
40 | " n = len(bbox)\n",
41 | " for j in range(n):\n",
42 | " cv2.line(im, tuple(bbox[j][0]), tuple(bbox[ (j+1) % n][0]), (255,0,0), 3)\n",
43 | "\n",
44 | " # Display results\n",
45 | " cv2.imshow(\"Results\", im)\n",
46 | " \n",
47 | "qrDecoder = cv2.QRCodeDetector()\n",
48 | "# Detect and decode the qrcode\n",
49 | "data,bbox,rectifiedImage = qrDecoder.detectAndDecode(inputImage)\n",
50 | "if len(data)>0:\n",
51 | " print(\"Decoded Data : {}\".format(data))\n",
52 | " display(inputImage, bbox)\n",
53 | " rectifiedImage = np.uint8(rectifiedImage)\n",
54 | " cv2.imshow(\"Rectified QRCode\", rectifiedImage)\n",
55 | "\n",
56 | "else:\n",
57 | " print(\"QR Code not detected\")\n",
58 | " cv2.imshow(\"Results\", inputImage)\n",
59 | "\n",
60 | "cv2.waitKey(0)\n",
61 | "cv2.destroyAllWindows()\n",
62 | "\n"
63 | ]
64 | },
65 | {
66 | "cell_type": "markdown",
67 | "metadata": {},
68 | "source": [
69 | "FB Page\n",
70 | "@programmimg_fever"
71 | ]
72 | },
73 | {
74 | "cell_type": "markdown",
75 | "metadata": {},
76 | "source": [
77 | "GitHub link\n",
78 | "@programmimg_fever"
79 | ]
80 | },
81 | {
82 | "cell_type": "markdown",
83 | "metadata": {},
84 | "source": [
85 | "Twitter \n",
86 | "@programmimg_fever"
87 | ]
88 | }
89 | ],
90 | "metadata": {
91 | "kernelspec": {
92 | "display_name": "Python 3",
93 | "language": "python",
94 | "name": "python3"
95 | },
96 | "language_info": {
97 | "codemirror_mode": {
98 | "name": "ipython",
99 | "version": 3
100 | },
101 | "file_extension": ".py",
102 | "mimetype": "text/x-python",
103 | "name": "python",
104 | "nbconvert_exporter": "python",
105 | "pygments_lexer": "ipython3",
106 | "version": "3.7.6"
107 | }
108 | },
109 | "nbformat": 4,
110 | "nbformat_minor": 4
111 | }
112 |
--------------------------------------------------------------------------------
/VPen.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# VIRTUAL PEN USING OPENCV PYTHON"
8 | ]
9 | },
10 | {
11 | "cell_type": "code",
12 | "execution_count": null,
13 | "metadata": {},
14 | "outputs": [],
15 | "source": []
16 | },
17 | {
18 | "cell_type": "code",
19 | "execution_count": 1,
20 | "metadata": {},
21 | "outputs": [
22 | {
23 | "ename": "FileNotFoundError",
24 | "evalue": "[Errno 2] No such file or directory: 'hsv value.npy'",
25 | "output_type": "error",
26 | "traceback": [
27 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
28 | "\u001b[1;31mFileNotFoundError\u001b[0m Traceback (most recent call last)",
29 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[0;32m 6\u001b[0m \u001b[0mload_from_disk\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 7\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mload_from_disk\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 8\u001b[1;33m \u001b[0mhsv_value\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mload\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'hsv value.npy'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 9\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 10\u001b[0m \u001b[0mcap\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcv2\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mVideoCapture\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
30 | "\u001b[1;32mE:\\Anaconda\\lib\\site-packages\\numpy\\lib\\npyio.py\u001b[0m in \u001b[0;36mload\u001b[1;34m(file, mmap_mode, allow_pickle, fix_imports, encoding)\u001b[0m\n\u001b[0;32m 426\u001b[0m \u001b[0mown_fid\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mFalse\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 427\u001b[0m \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 428\u001b[1;33m \u001b[0mfid\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mopen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mos_fspath\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mfile\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m\"rb\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 429\u001b[0m \u001b[0mown_fid\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 430\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
31 | "\u001b[1;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: 'hsv value.npy'"
32 | ]
33 | }
34 | ],
35 | "source": [
36 | "#programming_fever\n",
37 | "import cv2\n",
38 | "import numpy as np\n",
39 | "import time\n",
40 | "\n",
41 | "load_from_disk = True\n",
42 | "if load_from_disk:\n",
43 | " hsv_value = np.load('hsv_value.npy')\n",
44 | "\n",
45 | "cap = cv2.VideoCapture(0)\n",
46 | "cap.set(3,1280)\n",
47 | "cap.set(4,720)\n",
48 | "\n",
49 | "kernel = np.ones((5,5),np.uint8)\n",
50 | "\n",
51 | "# Initializing the canvas on which we will draw upon\n",
52 | "canvas = None\n",
53 | "\n",
54 | "# Initilize x1,y1 points\n",
55 | "x1,y1=0,0\n",
56 | "\n",
57 | "# Threshold for noise\n",
58 | "noiseth = 800\n",
59 | "\n",
60 | "while(1):\n",
61 | " _, frame = cap.read()\n",
62 | " frame = cv2.flip( frame, 1 )\n",
63 | " \n",
64 | " # Initialize the canvas as a black image of the same size as the frame.\n",
65 | " if canvas is None:\n",
66 | " canvas = np.zeros_like(frame)\n",
67 | "\n",
68 | " # Convert BGR to HSV\n",
69 | " hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)\n",
70 | " \n",
71 | " # If you're reading from memory then load the upper and lower ranges \n",
72 | " # from there\n",
73 | " if load_from_disk:\n",
74 | " lower_range = hsv_value[0]\n",
75 | " upper_range = hsv_value[1]\n",
76 | " \n",
77 | " # Otherwise define your own custom values for upper and lower range.\n",
78 | " #else: [[92, 116, 150], [179, 255, 255]]\n",
79 | " lower_range = np.array([134, 20, 204])\n",
80 | " upper_range = np.array([179, 255, 255])\n",
81 | " \n",
82 | " mask = cv2.inRange(hsv, lower_range, upper_range)\n",
83 | " \n",
84 | " # Perform morphological operations to get rid of the noise\n",
85 | " mask = cv2.erode(mask,kernel,iterations = 1)\n",
86 | " mask = cv2.dilate(mask,kernel,iterations = 2)\n",
87 | " \n",
88 | " # Find Contours\n",
89 | " contours, hierarchy = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)\n",
90 | " \n",
91 | " # Make sure there is a contour present and also its size is bigger than \n",
92 | " # the noise threshold.\n",
93 | " if contours and cv2.contourArea(max(contours, \n",
94 | " key = cv2.contourArea)) > noiseth:\n",
95 | " \n",
96 | " c = max(contours, key = cv2.contourArea) \n",
97 | " x2,y2,w,h = cv2.boundingRect(c)\n",
98 | " \n",
99 | " # If there were no previous points then save the detected x2,y2 \n",
100 | " # coordinates as x1,y1. \n",
101 | " # This is true when we writing for the first time or when writing \n",
102 | " # again when the pen had disappeared from view.\n",
103 | " if x1 == 0 and y1 == 0:\n",
104 | " x1,y1= x2,y2\n",
105 | " \n",
106 | " else:\n",
107 | " # Draw the line on the canvas\n",
108 | " canvas = cv2.line(canvas, (x1,y1),(x2,y2), [255,0,0], 4)\n",
109 | " \n",
110 | " # After the line is drawn the new points become the previous points.\n",
111 | " x1,y1= x2,y2\n",
112 | "\n",
113 | " else:\n",
114 | " # If there were no contours detected then make x1,y1 = 0\n",
115 | " x1,y1 =0,0\n",
116 | " \n",
117 | " # Merge the canvas and the frame.\n",
118 | " frame = cv2.add(frame,canvas)\n",
119 | " \n",
120 | " # Optionally stack both frames and show it.\n",
121 | " stacked = np.hstack((canvas,frame))\n",
122 | " cv2.imshow('Trackbars',cv2.resize(stacked,None,fx=0.6,fy=0.6))\n",
123 | "\n",
124 | " k = cv2.waitKey(1) & 0xFF\n",
125 | " if k == 27:\n",
126 | " break\n",
127 | " \n",
128 | " # When c is pressed clear the canvas\n",
129 | " if k == ord('c'):\n",
130 | " canvas = None\n",
131 | "\n",
132 | "cv2.destroyAllWindows()\n",
133 | "cap.release()\n"
134 | ]
135 | },
136 | {
137 | "cell_type": "markdown",
138 | "metadata": {},
139 | "source": [
140 | "# FB Page\n",
141 | "@programmimg_fever"
142 | ]
143 | },
144 | {
145 | "cell_type": "markdown",
146 | "metadata": {},
147 | "source": [
148 | "# GitHub link\n",
149 | "@programmimg_fever"
150 | ]
151 | },
152 | {
153 | "cell_type": "markdown",
154 | "metadata": {},
155 | "source": [
156 | "# Twitter \n",
157 | "@programmimg_fever"
158 | ]
159 | },
160 | {
161 | "cell_type": "markdown",
162 | "metadata": {},
163 | "source": [
164 | "# follow on insta\n",
165 | "@programmimg_fever"
166 | ]
167 | }
168 | ],
169 | "metadata": {
170 | "kernelspec": {
171 | "display_name": "Python 3",
172 | "language": "python",
173 | "name": "python3"
174 | },
175 | "language_info": {
176 | "codemirror_mode": {
177 | "name": "ipython",
178 | "version": 3
179 | },
180 | "file_extension": ".py",
181 | "mimetype": "text/x-python",
182 | "name": "python",
183 | "nbconvert_exporter": "python",
184 | "pygments_lexer": "ipython3",
185 | "version": "3.7.6"
186 | }
187 | },
188 | "nbformat": 4,
189 | "nbformat_minor": 4
190 | }
191 |
--------------------------------------------------------------------------------
/Virtual Pen/VPen.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# VIRTUAL PEN USING OPENCV PYTHON"
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "code description is available in medium \n",
15 | "@programmimg_fever"
16 | ]
17 | },
18 | {
19 | "cell_type": "code",
20 | "execution_count": null,
21 | "metadata": {},
22 | "outputs": [],
23 | "source": [
24 | "#programming_fever\n",
25 | "import cv2\n",
26 | "import numpy as np\n",
27 | "import time\n",
28 | "\n",
29 | "load_from_disk = True\n",
30 | "if load_from_disk:\n",
31 | " hsv_value = np.load('hsv_value.npy')\n",
32 | "\n",
33 | "cap = cv2.VideoCapture(0)\n",
34 | "cap.set(3,1280)\n",
35 | "cap.set(4,720)\n",
36 | "\n",
37 | "kernel = np.ones((5,5),np.uint8)\n",
38 | "\n",
39 | "# Initializing the canvas on which we will draw upon\n",
40 | "canvas = None\n",
41 | "\n",
42 | "# Initilize x1,y1 points\n",
43 | "x1,y1=0,0\n",
44 | "\n",
45 | "# Threshold for noise\n",
46 | "noiseth = 800\n",
47 | "\n",
48 | "while(1):\n",
49 | " _, frame = cap.read()\n",
50 | " frame = cv2.flip( frame, 1 )\n",
51 | " \n",
52 | " # Initialize the canvas as a black image of the same size as the frame.\n",
53 | " if canvas is None:\n",
54 | " canvas = np.zeros_like(frame)\n",
55 | "\n",
56 | " # Convert BGR to HSV\n",
57 | " hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)\n",
58 | " \n",
59 | " # If you're reading from memory then load the upper and lower ranges \n",
60 | " # from there\n",
61 | " if load_from_disk:\n",
62 | " lower_range = hsv_value[0]\n",
63 | " upper_range = hsv_value[1]\n",
64 | " \n",
65 | " # Otherwise define your own custom values for upper and lower range.\n",
66 | " else: \n",
67 | " lower_range = np.array([134, 20, 204])\n",
68 | " upper_range = np.array([179, 255, 255])\n",
69 | " \n",
70 | " mask = cv2.inRange(hsv, lower_range, upper_range)\n",
71 | " \n",
72 | " # Perform morphological operations to get rid of the noise\n",
73 | " mask = cv2.erode(mask,kernel,iterations = 1)\n",
74 | " mask = cv2.dilate(mask,kernel,iterations = 2)\n",
75 | " \n",
76 | " # Find Contours\n",
77 | " contours, hierarchy = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)\n",
78 | " \n",
79 | " # Make sure there is a contour present and also its size is bigger than \n",
80 | " # the noise threshold.\n",
81 | " if contours and cv2.contourArea(max(contours, \n",
82 | " key = cv2.contourArea)) > noiseth:\n",
83 | " \n",
84 | " c = max(contours, key = cv2.contourArea) \n",
85 | " x2,y2,w,h = cv2.boundingRect(c)\n",
86 | " \n",
87 | " # If there were no previous points then save the detected x2,y2 \n",
88 | " # coordinates as x1,y1. \n",
89 | " # This is true when we writing for the first time or when writing \n",
90 | " # again when the pen had disappeared from view.\n",
91 | " if x1 == 0 and y1 == 0:\n",
92 | " x1,y1= x2,y2\n",
93 | " \n",
94 | " else:\n",
95 | " # Draw the line on the canvas\n",
96 | " canvas = cv2.line(canvas, (x1,y1),(x2,y2), [255,0,0], 4)\n",
97 | " \n",
98 | " # After the line is drawn the new points become the previous points.\n",
99 | " x1,y1= x2,y2\n",
100 | "\n",
101 | " else:\n",
102 | " # If there were no contours detected then make x1,y1 = 0\n",
103 | " x1,y1 =0,0\n",
104 | " \n",
105 | " # Merge the canvas and the frame.\n",
106 | " frame = cv2.add(frame,canvas)\n",
107 | " \n",
108 | " # Optionally stack both frames and show it.\n",
109 | " stacked = np.hstack((canvas,frame))\n",
110 | " cv2.imshow('VIRTUAL PEN',cv2.resize(stacked,None,fx=0.6,fy=0.6))\n",
111 | "\n",
112 | " k = cv2.waitKey(1) & 0xFF\n",
113 | " if k == 27:\n",
114 | " break\n",
115 | " \n",
116 | " # When c is pressed clear the canvas\n",
117 | " if k == ord('c'):\n",
118 | " canvas = None\n",
119 | "\n",
120 | "cv2.destroyAllWindows()\n",
121 | "cap.release()\n"
122 | ]
123 | },
124 | {
125 | "cell_type": "markdown",
126 | "metadata": {},
127 | "source": [
128 | "# FB Page\n",
129 | "@programmimg_fever"
130 | ]
131 | },
132 | {
133 | "cell_type": "markdown",
134 | "metadata": {},
135 | "source": [
136 | "# GitHub link\n",
137 | "@programmimg_fever"
138 | ]
139 | },
140 | {
141 | "cell_type": "markdown",
142 | "metadata": {},
143 | "source": [
144 | "# Twitter \n",
145 | "@programmimg_fever"
146 | ]
147 | },
148 | {
149 | "cell_type": "markdown",
150 | "metadata": {},
151 | "source": [
152 | "# follow on insta\n",
153 | "@programmimg_fever"
154 | ]
155 | },
156 | {
157 | "cell_type": "code",
158 | "execution_count": null,
159 | "metadata": {},
160 | "outputs": [],
161 | "source": []
162 | }
163 | ],
164 | "metadata": {
165 | "kernelspec": {
166 | "display_name": "Python 3",
167 | "language": "python",
168 | "name": "python3"
169 | },
170 | "language_info": {
171 | "codemirror_mode": {
172 | "name": "ipython",
173 | "version": 3
174 | },
175 | "file_extension": ".py",
176 | "mimetype": "text/x-python",
177 | "name": "python",
178 | "nbconvert_exporter": "python",
179 | "pygments_lexer": "ipython3",
180 | "version": "3.7.6"
181 | }
182 | },
183 | "nbformat": 4,
184 | "nbformat_minor": 4
185 | }
186 |
--------------------------------------------------------------------------------
/Virtual Pen/finding HSV value (screenshot).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyPRAVEE/OpenCV-Projects/505fbbd86fc1281a870b3427555aff148aa44a08/Virtual Pen/finding HSV value (screenshot).png
--------------------------------------------------------------------------------
/Virtual Pen/finding HSV values.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# to find HSV value"
8 | ]
9 | },
10 | {
11 | "cell_type": "code",
12 | "execution_count": null,
13 | "metadata": {},
14 | "outputs": [],
15 | "source": [
16 | "import cv2\n",
17 | "import numpy as np\n",
18 | "import time\n",
19 | "# A required callback method that goes into the trackbar function.\n",
20 | "def nothing(x):\n",
21 | " pass\n",
22 | "\n",
23 | "# Initializing the webcam feed.\n",
24 | "cap = cv2.VideoCapture(0)\n",
25 | "cap.set(3,1280)\n",
26 | "cap.set(4,720)\n",
27 | "\n",
28 | "# Create a window named trackbars.\n",
29 | "cv2.namedWindow(\"Trackbars\")\n",
30 | "\n",
31 | "# Now create 6 trackbars that will control the lower and upper range of \n",
32 | "# H,S and V channels. The Arguments are like this: Name of trackbar, \n",
33 | "# window name, range,callback function. For Hue the range is 0-179 and\n",
34 | "# for S,V its 0-255.\n",
35 | "cv2.createTrackbar(\"L - H\", \"Trackbars\", 0, 179, nothing)\n",
36 | "cv2.createTrackbar(\"L - S\", \"Trackbars\", 0, 255, nothing)\n",
37 | "cv2.createTrackbar(\"L - V\", \"Trackbars\", 0, 255, nothing)\n",
38 | "cv2.createTrackbar(\"U - H\", \"Trackbars\", 179, 179, nothing)\n",
39 | "cv2.createTrackbar(\"U - S\", \"Trackbars\", 255, 255, nothing)\n",
40 | "cv2.createTrackbar(\"U - V\", \"Trackbars\", 255, 255, nothing)\n",
41 | " \n",
42 | "while True:\n",
43 | " \n",
44 | " # Start reading the webcam feed frame by frame.\n",
45 | " ret, frame = cap.read()\n",
46 | " if not ret:\n",
47 | " break\n",
48 | " # Flip the frame horizontally (Not required)\n",
49 | " frame = cv2.flip( frame, 1 ) \n",
50 | " \n",
51 | " # Convert the BGR image to HSV image.\n",
52 | " hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)\n",
53 | " \n",
54 | " # Get the new values of the trackbar in real time as the user changes \n",
55 | " # them\n",
56 | " l_h = cv2.getTrackbarPos(\"L - H\", \"Trackbars\")\n",
57 | " l_s = cv2.getTrackbarPos(\"L - S\", \"Trackbars\")\n",
58 | " l_v = cv2.getTrackbarPos(\"L - V\", \"Trackbars\")\n",
59 | " u_h = cv2.getTrackbarPos(\"U - H\", \"Trackbars\")\n",
60 | " u_s = cv2.getTrackbarPos(\"U - S\", \"Trackbars\")\n",
61 | " u_v = cv2.getTrackbarPos(\"U - V\", \"Trackbars\")\n",
62 | " \n",
63 | " # Set the lower and upper HSV range according to the value selected\n",
64 | " # by the trackbar\n",
65 | " lower_range = np.array([l_h, l_s, l_v])\n",
66 | " upper_range = np.array([u_h, u_s, u_v])\n",
67 | " \n",
68 | " # Filter the image and get the binary mask, where white represents \n",
69 | " # your target color\n",
70 | " mask = cv2.inRange(hsv, lower_range, upper_range)\n",
71 | " \n",
72 | " # You can also visualize the real part of the target color (Optional)\n",
73 | " res = cv2.bitwise_and(frame, frame, mask=mask)\n",
74 | " \n",
75 | " # Converting the binary mask to 3 channel image, this is just so \n",
76 | " # we can stack it with the others\n",
77 | " mask_3 = cv2.cvtColor(mask, cv2.COLOR_GRAY2BGR)\n",
78 | " \n",
79 | " # stack the mask, orginal frame and the filtered result\n",
80 | " stacked = np.hstack((mask_3,frame,res))\n",
81 | " \n",
82 | " # Show this stacked frame at 40% of the size.\n",
83 | " cv2.imshow('Trackbars',cv2.resize(stacked,None,fx=0.4,fy=0.4))\n",
84 | " \n",
85 | " # If the user presses ESC then exit the program\n",
86 | " key = cv2.waitKey(1)\n",
87 | " if key == 27:\n",
88 | " break\n",
89 | " \n",
90 | " # If the user presses `s` then print this array.\n",
91 | " if key == ord('s'):\n",
92 | " \n",
93 | " thearray = [[l_h,l_s,l_v],[u_h, u_s, u_v]]\n",
94 | " print(thearray)\n",
95 | " \n",
96 | " # Also save this array as penval.npy\n",
97 | " np.save('hsv values',thearray)\n",
98 | " break\n",
99 | " \n",
100 | "# Release the camera & destroy the windows. \n",
101 | "cap.release()\n",
102 | "cv2.destroyAllWindows()"
103 | ]
104 | }
105 | ],
106 | "metadata": {
107 | "kernelspec": {
108 | "display_name": "Python 3",
109 | "language": "python",
110 | "name": "python3"
111 | },
112 | "language_info": {
113 | "codemirror_mode": {
114 | "name": "ipython",
115 | "version": 3
116 | },
117 | "file_extension": ".py",
118 | "mimetype": "text/x-python",
119 | "name": "python",
120 | "nbconvert_exporter": "python",
121 | "pygments_lexer": "ipython3",
122 | "version": "3.7.6"
123 | }
124 | },
125 | "nbformat": 4,
126 | "nbformat_minor": 4
127 | }
128 |
--------------------------------------------------------------------------------
/Virtual Pen/hsv_value.npy:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyPRAVEE/OpenCV-Projects/505fbbd86fc1281a870b3427555aff148aa44a08/Virtual Pen/hsv_value.npy
--------------------------------------------------------------------------------
/Virtual Pen/virtual pen demo.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyPRAVEE/OpenCV-Projects/505fbbd86fc1281a870b3427555aff148aa44a08/Virtual Pen/virtual pen demo.mp4
--------------------------------------------------------------------------------
/Virtual Pen/virtual pen on action(screenshot).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyPRAVEE/OpenCV-Projects/505fbbd86fc1281a870b3427555aff148aa44a08/Virtual Pen/virtual pen on action(screenshot).png
--------------------------------------------------------------------------------
/cartooning and sketching live app .ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": 1,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "#programming_fever\n",
10 | "#press s for sketch mode\n",
11 | "#press c for caroon mode\n",
12 | "#press ENTER for normal mode\n",
13 | "import cv2\n",
14 | "import numpy as np\n",
15 | "def cartoonize_image(img, ds_factor=4, sketch_mode=False):\n",
16 | "\n",
17 | " img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\n",
18 | " img_gray = cv2.medianBlur(img_gray, 7)\n",
19 | "\n",
20 | " edges = cv2.Laplacian(img_gray, cv2.CV_8U, ksize=5)\n",
21 | " ret, mask = cv2.threshold(edges, 100, 255, cv2.THRESH_BINARY_INV)\n",
22 | "\n",
23 | " if sketch_mode:\n",
24 | " return cv2.cvtColor(mask, cv2.COLOR_GRAY2BGR)\n",
25 | "\n",
26 | " img_small = cv2.resize(img, None, fx=1.0/ds_factor, fy=1.0/ds_factor , interpolation=cv2.INTER_AREA)\n",
27 | " num_repetitions = 10\n",
28 | " sigma_color = 5\n",
29 | " sigma_space = 7\n",
30 | " size = 5\n",
31 | "\n",
32 | " for i in range(num_repetitions):\n",
33 | " img_small = cv2.bilateralFilter(img_small, size, sigma_color, sigma_space)\n",
34 | " img_output = cv2.resize(img_small, None, fx=ds_factor, fy=ds_factor, interpolation=cv2.INTER_LINEAR)\n",
35 | " dst = np.zeros(img_gray.shape)\n",
36 | " dst = cv2.bitwise_and(img_output, img_output, mask=mask)\n",
37 | " return dst\n",
38 | "\n",
39 | "if __name__=='__main__':\n",
40 | " cap = cv2.VideoCapture(0)\n",
41 | " cur_char = -1\n",
42 | " prev_char = -1\n",
43 | " while True:\n",
44 | " ret, frame = cap.read()\n",
45 | " frame = cv2.resize(frame, None, fx=0.5, fy=0.5,interpolation=cv2.INTER_AREA)\n",
46 | " c = cv2.waitKey(1)\n",
47 | " if c == 27:\n",
48 | " break\n",
49 | " if c > -1 and c != prev_char:\n",
50 | " cur_char = c\n",
51 | " prev_char = c\n",
52 | " if cur_char == ord('s'):\n",
53 | " cv2.imshow('sketch mode', cartoonize_image(frame, sketch_mode=True))\n",
54 | " elif cur_char == ord('c'):\n",
55 | " cv2.imshow('Cartoon mode', cartoonize_image(frame, sketch_mode=False))\n",
56 | " else:\n",
57 | " cv2.imshow('normal mode', frame)\n",
58 | " cap.release()\n",
59 | " cv2.destroyAllWindows()\n",
60 | " "
61 | ]
62 | },
63 | {
64 | "cell_type": "code",
65 | "execution_count": null,
66 | "metadata": {},
67 | "outputs": [],
68 | "source": []
69 | }
70 | ],
71 | "metadata": {
72 | "kernelspec": {
73 | "display_name": "Python 3",
74 | "language": "python",
75 | "name": "python3"
76 | },
77 | "language_info": {
78 | "codemirror_mode": {
79 | "name": "ipython",
80 | "version": 3
81 | },
82 | "file_extension": ".py",
83 | "mimetype": "text/x-python",
84 | "name": "python",
85 | "nbconvert_exporter": "python",
86 | "pygments_lexer": "ipython3",
87 | "version": "3.7.4"
88 | }
89 | },
90 | "nbformat": 4,
91 | "nbformat_minor": 2
92 | }
93 |
--------------------------------------------------------------------------------
/cartoonizing an image using opencv.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": null,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "#programming_fever\n",
10 | "#cartoonizing an image using OpenCV\n",
11 | "import cv2\n",
12 | "img_rgb = cv2.imread(\"E://OpenCV//bmw.png\") \n",
13 | "numBilateralFilters = 30 \n",
14 | "\n",
15 | "for _ in range(numBilateralFilters): \n",
16 | " img_rgb = cv2.bilateralFilter(img_rgb, 9, 9, 7) \n",
17 | "\n",
18 | "img_gray = cv2.cvtColor(img_rgb, cv2.COLOR_RGB2GRAY)\n",
19 | " \n",
20 | "img_blur = cv2.medianBlur(img_gray, 3) \n",
21 | " \n",
22 | "img_edge = cv2.adaptiveThreshold(img_blur, 255, \n",
23 | " cv2.ADAPTIVE_THRESH_MEAN_C, \n",
24 | " cv2.THRESH_BINARY, 9, 2) \n",
25 | "\n",
26 | "img_edge = cv2.cvtColor(img_edge, cv2.COLOR_GRAY2RGB) \n",
27 | "cv2.imshow(\"img_rgb\", img_rgb) \n",
28 | "cv2.imshow(\"img_edge\", img_edge) \n",
29 | "\n",
30 | "res=cv2.bitwise_and(img_rgb, img_edge) \n",
31 | " \n",
32 | "cv2.imshow(\"Cartoon version\", res) \n",
33 | "cv2.waitKey(0) \n",
34 | "cv2.destroyAllWindows() \n"
35 | ]
36 | }
37 | ],
38 | "metadata": {
39 | "kernelspec": {
40 | "display_name": "Python 3",
41 | "language": "python",
42 | "name": "python3"
43 | },
44 | "language_info": {
45 | "codemirror_mode": {
46 | "name": "ipython",
47 | "version": 3
48 | },
49 | "file_extension": ".py",
50 | "mimetype": "text/x-python",
51 | "name": "python",
52 | "nbconvert_exporter": "python",
53 | "pygments_lexer": "ipython3",
54 | "version": "3.7.4"
55 | }
56 | },
57 | "nbformat": 4,
58 | "nbformat_minor": 2
59 | }
60 |
--------------------------------------------------------------------------------
/color detection/color detection.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# color detection using OpenCV"
8 | ]
9 | },
10 | {
11 | "cell_type": "code",
12 | "execution_count": 11,
13 | "metadata": {},
14 | "outputs": [],
15 | "source": [
16 | "#programming_fever\n",
17 | "import cv2\n",
18 | "import numpy as np\n",
19 | "import pandas as pd\n",
20 | "\n",
21 | "img_path = \"D://OpenCV//shape-detection//New folder//palette.jpg\"\n",
22 | "img = cv2.imread(img_path)\n",
23 | "img=cv2.resize(img,(700,500))\n",
24 | "\n",
25 | "clicked = False\n",
26 | "r = g = b = xpos = ypos = 0\n",
27 | "\n",
28 | "#Reading csv file with pandas and giving names to each column\n",
29 | "index=[\"color\",\"color_name\",\"hex\",\"R\",\"G\",\"B\"]\n",
30 | "csv = pd.read_csv('colors.csv', names=index, header=None)\n",
31 | "\n",
32 | "#function to calculate minimum distance from all colors and get the most matching color\n",
33 | "def getColorName(R,G,B):\n",
34 | " minimum = 10000\n",
35 | " for i in range(len(csv)):\n",
36 | " d = abs(R- int(csv.loc[i,\"R\"])) + abs(G- int(csv.loc[i,\"G\"]))+ abs(B- int(csv.loc[i,\"B\"]))\n",
37 | " if(d<=minimum):\n",
38 | " minimum = d\n",
39 | " cname = csv.loc[i,\"color_name\"]\n",
40 | " return cname\n",
41 | "\n",
42 | "#function to get x,y coordinates of mouse double click\n",
43 | "def draw_function(event, x,y,flags,param):\n",
44 | " if event == cv2.EVENT_LBUTTONDBLCLK:\n",
45 | " global b,g,r,xpos,ypos, clicked\n",
46 | " clicked = True\n",
47 | " xpos = x\n",
48 | " ypos = y\n",
49 | " b,g,r = img[y,x]\n",
50 | " b = int(b)\n",
51 | " g = int(g)\n",
52 | " r = int(r)\n",
53 | "cv2.namedWindow('color detection by programming_fever')\n",
54 | "cv2.setMouseCallback('color detection by programming_fever',draw_function)\n",
55 | "\n",
56 | "while(1):\n",
57 | "\n",
58 | " cv2.imshow(\"color detection by programming_fever\",img)\n",
59 | " if (clicked):\n",
60 | " \n",
61 | " #cv2.rectangle(image, startpoint, endpoint, color, thickness)-1 fills entire rectangle \n",
62 | " cv2.rectangle(img,(20,20), (750,60), (b,g,r), -1)\n",
63 | "\n",
64 | " #Creating text string to display( Color name and RGB values )\n",
65 | " text = getColorName(r,g,b) + ' R='+ str(r) + ' G='+ str(g) + ' B='+ str(b)\n",
66 | " \n",
67 | " #cv2.putText(img,text,start,font(0-7),fontScale,color,thickness,lineType )\n",
68 | " cv2.putText(img, text,(50,50),2,0.8,(255,255,255),2,cv2.LINE_AA)\n",
69 | "\n",
70 | " #For very light colours we will display text in black colour\n",
71 | " if(r+g+b>=600):\n",
72 | " cv2.putText(img, text,(50,50),2,0.8,(0,0,0),2,cv2.LINE_AA)\n",
73 | " \n",
74 | " clicked=False\n",
75 | "\n",
76 | " if cv2.waitKey(20) & 0xFF ==27:\n",
77 | " break\n",
78 | " \n",
79 | "cv2.destroyAllWindows()"
80 | ]
81 | },
82 | {
83 | "cell_type": "code",
84 | "execution_count": null,
85 | "metadata": {},
86 | "outputs": [],
87 | "source": []
88 | },
89 | {
90 | "cell_type": "code",
91 | "execution_count": null,
92 | "metadata": {},
93 | "outputs": [],
94 | "source": []
95 | }
96 | ],
97 | "metadata": {
98 | "kernelspec": {
99 | "display_name": "Python 3",
100 | "language": "python",
101 | "name": "python3"
102 | },
103 | "language_info": {
104 | "codemirror_mode": {
105 | "name": "ipython",
106 | "version": 3
107 | },
108 | "file_extension": ".py",
109 | "mimetype": "text/x-python",
110 | "name": "python",
111 | "nbconvert_exporter": "python",
112 | "pygments_lexer": "ipython3",
113 | "version": "3.7.6"
114 | }
115 | },
116 | "nbformat": 4,
117 | "nbformat_minor": 4
118 | }
119 |
--------------------------------------------------------------------------------
/color detection/color palette.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyPRAVEE/OpenCV-Projects/505fbbd86fc1281a870b3427555aff148aa44a08/color detection/color palette.jpg
--------------------------------------------------------------------------------
/color detection/colors.csv:
--------------------------------------------------------------------------------
1 | air_force_blue_raf,"Air Force Blue (Raf)",#5d8aa8,93,138,168
2 | air_force_blue_usaf,"Air Force Blue (Usaf)",#00308f,0,48,143
3 | air_superiority_blue,"Air Superiority Blue",#72a0c1,114,160,193
4 | alabama_crimson,"Alabama Crimson",#a32638,163,38,56
5 | alice_blue,"Alice Blue",#f0f8ff,240,248,255
6 | alizarin_crimson,"Alizarin Crimson",#e32636,227,38,54
7 | alloy_orange,"Alloy Orange",#c46210,196,98,16
8 | almond,"Almond",#efdecd,239,222,205
9 | amaranth,"Amaranth",#e52b50,229,43,80
10 | amber,"Amber",#ffbf00,255,191,0
11 | amber_sae_ece,"Amber (Sae/Ece)",#ff7e00,255,126,0
12 | american_rose,"American Rose",#ff033e,255,3,62
13 | amethyst,"Amethyst",#96c,153,102,204
14 | android_green,"Android Green",#a4c639,164,198,57
15 | anti_flash_white,"Anti-Flash White",#f2f3f4,242,243,244
16 | antique_brass,"Antique Brass",#cd9575,205,149,117
17 | antique_fuchsia,"Antique Fuchsia",#915c83,145,92,131
18 | antique_ruby,"Antique Ruby",#841b2d,132,27,45
19 | antique_white,"Antique White",#faebd7,250,235,215
20 | ao_english,"Ao (English)",#008000,0,128,0
21 | apple_green,"Apple Green",#8db600,141,182,0
22 | apricot,"Apricot",#fbceb1,251,206,177
23 | aqua,"Aqua",#0ff,0,255,255
24 | aquamarine,"Aquamarine",#7fffd4,127,255,212
25 | army_green,"Army Green",#4b5320,75,83,32
26 | arsenic,"Arsenic",#3b444b,59,68,75
27 | arylide_yellow,"Arylide Yellow",#e9d66b,233,214,107
28 | ash_grey,"Ash Grey",#b2beb5,178,190,181
29 | asparagus,"Asparagus",#87a96b,135,169,107
30 | atomic_tangerine,"Atomic Tangerine",#f96,255,153,102
31 | auburn,"Auburn",#a52a2a,165,42,42
32 | aureolin,"Aureolin",#fdee00,253,238,0
33 | aurometalsaurus,"Aurometalsaurus",#6e7f80,110,127,128
34 | avocado,"Avocado",#568203,86,130,3
35 | azure,"Azure",#007fff,0,127,255
36 | azure_mist_web,"Azure Mist/Web",#f0ffff,240,255,255
37 | baby_blue,"Baby Blue",#89cff0,137,207,240
38 | baby_blue_eyes,"Baby Blue Eyes",#a1caf1,161,202,241
39 | baby_pink,"Baby Pink",#f4c2c2,244,194,194
40 | ball_blue,"Ball Blue",#21abcd,33,171,205
41 | banana_mania,"Banana Mania",#fae7b5,250,231,181
42 | banana_yellow,"Banana Yellow",#ffe135,255,225,53
43 | barn_red,"Barn Red",#7c0a02,124,10,2
44 | battleship_grey,"Battleship Grey",#848482,132,132,130
45 | bazaar,"Bazaar",#98777b,152,119,123
46 | beau_blue,"Beau Blue",#bcd4e6,188,212,230
47 | beaver,"Beaver",#9f8170,159,129,112
48 | beige,"Beige",#f5f5dc,245,245,220
49 | big_dip_o_ruby,"Big Dip O’Ruby",#9c2542,156,37,66
50 | bisque,"Bisque",#ffe4c4,255,228,196
51 | bistre,"Bistre",#3d2b1f,61,43,31
52 | bittersweet,"Bittersweet",#fe6f5e,254,111,94
53 | bittersweet_shimmer,"Bittersweet Shimmer",#bf4f51,191,79,81
54 | black,"Black",#000,0,0,0
55 | black_bean,"Black Bean",#3d0c02,61,12,2
56 | black_leather_jacket,"Black Leather Jacket",#253529,37,53,41
57 | black_olive,"Black Olive",#3b3c36,59,60,54
58 | blanched_almond,"Blanched Almond",#ffebcd,255,235,205
59 | blast_off_bronze,"Blast-Off Bronze",#a57164,165,113,100
60 | bleu_de_france,"Bleu De France",#318ce7,49,140,231
61 | blizzard_blue,"Blizzard Blue",#ace5ee,172,229,238
62 | blond,"Blond",#faf0be,250,240,190
63 | blue,"Blue",#00f,0,0,255
64 | blue_bell,"Blue Bell",#a2a2d0,162,162,208
65 | blue_crayola,"Blue (Crayola)",#1f75fe,31,117,254
66 | blue_gray,"Blue Gray",#69c,102,153,204
67 | blue_green,"Blue-Green",#0d98ba,13,152,186
68 | blue_munsell,"Blue (Munsell)",#0093af,0,147,175
69 | blue_ncs,"Blue (Ncs)",#0087bd,0,135,189
70 | blue_pigment,"Blue (Pigment)",#339,51,51,153
71 | blue_ryb,"Blue (Ryb)",#0247fe,2,71,254
72 | blue_sapphire,"Blue Sapphire",#126180,18,97,128
73 | blue_violet,"Blue-Violet",#8a2be2,138,43,226
74 | blush,"Blush",#de5d83,222,93,131
75 | bole,"Bole",#79443b,121,68,59
76 | bondi_blue,"Bondi Blue",#0095b6,0,149,182
77 | bone,"Bone",#e3dac9,227,218,201
78 | boston_university_red,"Boston University Red",#c00,204,0,0
79 | bottle_green,"Bottle Green",#006a4e,0,106,78
80 | boysenberry,"Boysenberry",#873260,135,50,96
81 | brandeis_blue,"Brandeis Blue",#0070ff,0,112,255
82 | brass,"Brass",#b5a642,181,166,66
83 | brick_red,"Brick Red",#cb4154,203,65,84
84 | bright_cerulean,"Bright Cerulean",#1dacd6,29,172,214
85 | bright_green,"Bright Green",#6f0,102,255,0
86 | bright_lavender,"Bright Lavender",#bf94e4,191,148,228
87 | bright_maroon,"Bright Maroon",#c32148,195,33,72
88 | bright_pink,"Bright Pink",#ff007f,255,0,127
89 | bright_turquoise,"Bright Turquoise",#08e8de,8,232,222
90 | bright_ube,"Bright Ube",#d19fe8,209,159,232
91 | brilliant_lavender,"Brilliant Lavender",#f4bbff,244,187,255
92 | brilliant_rose,"Brilliant Rose",#ff55a3,255,85,163
93 | brink_pink,"Brink Pink",#fb607f,251,96,127
94 | british_racing_green,"British Racing Green",#004225,0,66,37
95 | bronze,"Bronze",#cd7f32,205,127,50
96 | brown_traditional,"Brown (Traditional)",#964b00,150,75,0
97 | brown_web,"Brown (Web)",#a52a2a,165,42,42
98 | bubble_gum,"Bubble Gum",#ffc1cc,255,193,204
99 | bubbles,"Bubbles",#e7feff,231,254,255
100 | buff,"Buff",#f0dc82,240,220,130
101 | bulgarian_rose,"Bulgarian Rose",#480607,72,6,7
102 | burgundy,"Burgundy",#800020,128,0,32
103 | burlywood,"Burlywood",#deb887,222,184,135
104 | burnt_orange,"Burnt Orange",#c50,204,85,0
105 | burnt_sienna,"Burnt Sienna",#e97451,233,116,81
106 | burnt_umber,"Burnt Umber",#8a3324,138,51,36
107 | byzantine,"Byzantine",#bd33a4,189,51,164
108 | byzantium,"Byzantium",#702963,112,41,99
109 | cadet,"Cadet",#536872,83,104,114
110 | cadet_blue,"Cadet Blue",#5f9ea0,95,158,160
111 | cadet_grey,"Cadet Grey",#91a3b0,145,163,176
112 | cadmium_green,"Cadmium Green",#006b3c,0,107,60
113 | cadmium_orange,"Cadmium Orange",#ed872d,237,135,45
114 | cadmium_red,"Cadmium Red",#e30022,227,0,34
115 | cadmium_yellow,"Cadmium Yellow",#fff600,255,246,0
116 | caf_au_lait,"Café Au Lait",#a67b5b,166,123,91
117 | caf_noir,"Café Noir",#4b3621,75,54,33
118 | cal_poly_green,"Cal Poly Green",#1e4d2b,30,77,43
119 | cambridge_blue,"Cambridge Blue",#a3c1ad,163,193,173
120 | camel,"Camel",#c19a6b,193,154,107
121 | cameo_pink,"Cameo Pink",#efbbcc,239,187,204
122 | camouflage_green,"Camouflage Green",#78866b,120,134,107
123 | canary_yellow,"Canary Yellow",#ffef00,255,239,0
124 | candy_apple_red,"Candy Apple Red",#ff0800,255,8,0
125 | candy_pink,"Candy Pink",#e4717a,228,113,122
126 | capri,"Capri",#00bfff,0,191,255
127 | caput_mortuum,"Caput Mortuum",#592720,89,39,32
128 | cardinal,"Cardinal",#c41e3a,196,30,58
129 | caribbean_green,"Caribbean Green",#0c9,0,204,153
130 | carmine,"Carmine",#960018,150,0,24
131 | carmine_m_p,"Carmine (M&P)",#d70040,215,0,64
132 | carmine_pink,"Carmine Pink",#eb4c42,235,76,66
133 | carmine_red,"Carmine Red",#ff0038,255,0,56
134 | carnation_pink,"Carnation Pink",#ffa6c9,255,166,201
135 | carnelian,"Carnelian",#b31b1b,179,27,27
136 | carolina_blue,"Carolina Blue",#99badd,153,186,221
137 | carrot_orange,"Carrot Orange",#ed9121,237,145,33
138 | catalina_blue,"Catalina Blue",#062a78,6,42,120
139 | ceil,"Ceil",#92a1cf,146,161,207
140 | celadon,"Celadon",#ace1af,172,225,175
141 | celadon_blue,"Celadon Blue",#007ba7,0,123,167
142 | celadon_green,"Celadon Green",#2f847c,47,132,124
143 | celeste_colour,"Celeste (Colour)",#b2ffff,178,255,255
144 | celestial_blue,"Celestial Blue",#4997d0,73,151,208
145 | cerise,"Cerise",#de3163,222,49,99
146 | cerise_pink,"Cerise Pink",#ec3b83,236,59,131
147 | cerulean,"Cerulean",#007ba7,0,123,167
148 | cerulean_blue,"Cerulean Blue",#2a52be,42,82,190
149 | cerulean_frost,"Cerulean Frost",#6d9bc3,109,155,195
150 | cg_blue,"Cg Blue",#007aa5,0,122,165
151 | cg_red,"Cg Red",#e03c31,224,60,49
152 | chamoisee,"Chamoisee",#a0785a,160,120,90
153 | champagne,"Champagne",#fad6a5,250,214,165
154 | charcoal,"Charcoal",#36454f,54,69,79
155 | charm_pink,"Charm Pink",#e68fac,230,143,172
156 | chartreuse_traditional,"Chartreuse (Traditional)",#dfff00,223,255,0
157 | chartreuse_web,"Chartreuse (Web)",#7fff00,127,255,0
158 | cherry,"Cherry",#de3163,222,49,99
159 | cherry_blossom_pink,"Cherry Blossom Pink",#ffb7c5,255,183,197
160 | chestnut,"Chestnut",#cd5c5c,205,92,92
161 | china_pink,"China Pink",#de6fa1,222,111,161
162 | china_rose,"China Rose",#a8516e,168,81,110
163 | chinese_red,"Chinese Red",#aa381e,170,56,30
164 | chocolate_traditional,"Chocolate (Traditional)",#7b3f00,123,63,0
165 | chocolate_web,"Chocolate (Web)",#d2691e,210,105,30
166 | chrome_yellow,"Chrome Yellow",#ffa700,255,167,0
167 | cinereous,"Cinereous",#98817b,152,129,123
168 | cinnabar,"Cinnabar",#e34234,227,66,52
169 | cinnamon,"Cinnamon",#d2691e,210,105,30
170 | citrine,"Citrine",#e4d00a,228,208,10
171 | classic_rose,"Classic Rose",#fbcce7,251,204,231
172 | cobalt,"Cobalt",#0047ab,0,71,171
173 | cocoa_brown,"Cocoa Brown",#d2691e,210,105,30
174 | coffee,"Coffee",#6f4e37,111,78,55
175 | columbia_blue,"Columbia Blue",#9bddff,155,221,255
176 | congo_pink,"Congo Pink",#f88379,248,131,121
177 | cool_black,"Cool Black",#002e63,0,46,99
178 | cool_grey,"Cool Grey",#8c92ac,140,146,172
179 | copper,"Copper",#b87333,184,115,51
180 | copper_crayola,"Copper (Crayola)",#da8a67,218,138,103
181 | copper_penny,"Copper Penny",#ad6f69,173,111,105
182 | copper_red,"Copper Red",#cb6d51,203,109,81
183 | copper_rose,"Copper Rose",#966,153,102,102
184 | coquelicot,"Coquelicot",#ff3800,255,56,0
185 | coral,"Coral",#ff7f50,255,127,80
186 | coral_pink,"Coral Pink",#f88379,248,131,121
187 | coral_red,"Coral Red",#ff4040,255,64,64
188 | cordovan,"Cordovan",#893f45,137,63,69
189 | corn,"Corn",#fbec5d,251,236,93
190 | cornell_red,"Cornell Red",#b31b1b,179,27,27
191 | cornflower_blue,"Cornflower Blue",#6495ed,100,149,237
192 | cornsilk,"Cornsilk",#fff8dc,255,248,220
193 | cosmic_latte,"Cosmic Latte",#fff8e7,255,248,231
194 | cotton_candy,"Cotton Candy",#ffbcd9,255,188,217
195 | cream,"Cream",#fffdd0,255,253,208
196 | crimson,"Crimson",#dc143c,220,20,60
197 | crimson_glory,"Crimson Glory",#be0032,190,0,50
198 | cyan,"Cyan",#0ff,0,255,255
199 | cyan_process,"Cyan (Process)",#00b7eb,0,183,235
200 | daffodil,"Daffodil",#ffff31,255,255,49
201 | dandelion,"Dandelion",#f0e130,240,225,48
202 | dark_blue,"Dark Blue",#00008b,0,0,139
203 | dark_brown,"Dark Brown",#654321,101,67,33
204 | dark_byzantium,"Dark Byzantium",#5d3954,93,57,84
205 | dark_candy_apple_red,"Dark Candy Apple Red",#a40000,164,0,0
206 | dark_cerulean,"Dark Cerulean",#08457e,8,69,126
207 | dark_chestnut,"Dark Chestnut",#986960,152,105,96
208 | dark_coral,"Dark Coral",#cd5b45,205,91,69
209 | dark_cyan,"Dark Cyan",#008b8b,0,139,139
210 | dark_electric_blue,"Dark Electric Blue",#536878,83,104,120
211 | dark_goldenrod,"Dark Goldenrod",#b8860b,184,134,11
212 | dark_gray,"Dark Gray",#a9a9a9,169,169,169
213 | dark_green,"Dark Green",#013220,1,50,32
214 | dark_imperial_blue,"Dark Imperial Blue",#00416a,0,65,106
215 | dark_jungle_green,"Dark Jungle Green",#1a2421,26,36,33
216 | dark_khaki,"Dark Khaki",#bdb76b,189,183,107
217 | dark_lava,"Dark Lava",#483c32,72,60,50
218 | dark_lavender,"Dark Lavender",#734f96,115,79,150
219 | dark_magenta,"Dark Magenta",#8b008b,139,0,139
220 | dark_midnight_blue,"Dark Midnight Blue",#036,0,51,102
221 | dark_olive_green,"Dark Olive Green",#556b2f,85,107,47
222 | dark_orange,"Dark Orange",#ff8c00,255,140,0
223 | dark_orchid,"Dark Orchid",#9932cc,153,50,204
224 | dark_pastel_blue,"Dark Pastel Blue",#779ecb,119,158,203
225 | dark_pastel_green,"Dark Pastel Green",#03c03c,3,192,60
226 | dark_pastel_purple,"Dark Pastel Purple",#966fd6,150,111,214
227 | dark_pastel_red,"Dark Pastel Red",#c23b22,194,59,34
228 | dark_pink,"Dark Pink",#e75480,231,84,128
229 | dark_powder_blue,"Dark Powder Blue",#039,0,51,153
230 | dark_raspberry,"Dark Raspberry",#872657,135,38,87
231 | dark_red,"Dark Red",#8b0000,139,0,0
232 | dark_salmon,"Dark Salmon",#e9967a,233,150,122
233 | dark_scarlet,"Dark Scarlet",#560319,86,3,25
234 | dark_sea_green,"Dark Sea Green",#8fbc8f,143,188,143
235 | dark_sienna,"Dark Sienna",#3c1414,60,20,20
236 | dark_slate_blue,"Dark Slate Blue",#483d8b,72,61,139
237 | dark_slate_gray,"Dark Slate Gray",#2f4f4f,47,79,79
238 | dark_spring_green,"Dark Spring Green",#177245,23,114,69
239 | dark_tan,"Dark Tan",#918151,145,129,81
240 | dark_tangerine,"Dark Tangerine",#ffa812,255,168,18
241 | dark_taupe,"Dark Taupe",#483c32,72,60,50
242 | dark_terra_cotta,"Dark Terra Cotta",#cc4e5c,204,78,92
243 | dark_turquoise,"Dark Turquoise",#00ced1,0,206,209
244 | dark_violet,"Dark Violet",#9400d3,148,0,211
245 | dark_yellow,"Dark Yellow",#9b870c,155,135,12
246 | dartmouth_green,"Dartmouth Green",#00703c,0,112,60
247 | davy_s_grey,"Davy'S Grey",#555,85,85,85
248 | debian_red,"Debian Red",#d70a53,215,10,83
249 | deep_carmine,"Deep Carmine",#a9203e,169,32,62
250 | deep_carmine_pink,"Deep Carmine Pink",#ef3038,239,48,56
251 | deep_carrot_orange,"Deep Carrot Orange",#e9692c,233,105,44
252 | deep_cerise,"Deep Cerise",#da3287,218,50,135
253 | deep_champagne,"Deep Champagne",#fad6a5,250,214,165
254 | deep_chestnut,"Deep Chestnut",#b94e48,185,78,72
255 | deep_coffee,"Deep Coffee",#704241,112,66,65
256 | deep_fuchsia,"Deep Fuchsia",#c154c1,193,84,193
257 | deep_jungle_green,"Deep Jungle Green",#004b49,0,75,73
258 | deep_lilac,"Deep Lilac",#95b,153,85,187
259 | deep_magenta,"Deep Magenta",#c0c,204,0,204
260 | deep_peach,"Deep Peach",#ffcba4,255,203,164
261 | deep_pink,"Deep Pink",#ff1493,255,20,147
262 | deep_ruby,"Deep Ruby",#843f5b,132,63,91
263 | deep_saffron,"Deep Saffron",#f93,255,153,51
264 | deep_sky_blue,"Deep Sky Blue",#00bfff,0,191,255
265 | deep_tuscan_red,"Deep Tuscan Red",#66424d,102,66,77
266 | denim,"Denim",#1560bd,21,96,189
267 | desert,"Desert",#c19a6b,193,154,107
268 | desert_sand,"Desert Sand",#edc9af,237,201,175
269 | dim_gray,"Dim Gray",#696969,105,105,105
270 | dodger_blue,"Dodger Blue",#1e90ff,30,144,255
271 | dogwood_rose,"Dogwood Rose",#d71868,215,24,104
272 | dollar_bill,"Dollar Bill",#85bb65,133,187,101
273 | drab,"Drab",#967117,150,113,23
274 | duke_blue,"Duke Blue",#00009c,0,0,156
275 | earth_yellow,"Earth Yellow",#e1a95f,225,169,95
276 | ebony,"Ebony",#555d50,85,93,80
277 | ecru,"Ecru",#c2b280,194,178,128
278 | eggplant,"Eggplant",#614051,97,64,81
279 | eggshell,"Eggshell",#f0ead6,240,234,214
280 | egyptian_blue,"Egyptian Blue",#1034a6,16,52,166
281 | electric_blue,"Electric Blue",#7df9ff,125,249,255
282 | electric_crimson,"Electric Crimson",#ff003f,255,0,63
283 | electric_cyan,"Electric Cyan",#0ff,0,255,255
284 | electric_green,"Electric Green",#0f0,0,255,0
285 | electric_indigo,"Electric Indigo",#6f00ff,111,0,255
286 | electric_lavender,"Electric Lavender",#f4bbff,244,187,255
287 | electric_lime,"Electric Lime",#cf0,204,255,0
288 | electric_purple,"Electric Purple",#bf00ff,191,0,255
289 | electric_ultramarine,"Electric Ultramarine",#3f00ff,63,0,255
290 | electric_violet,"Electric Violet",#8f00ff,143,0,255
291 | electric_yellow,"Electric Yellow",#ff0,255,255,0
292 | emerald,"Emerald",#50c878,80,200,120
293 | english_lavender,"English Lavender",#b48395,180,131,149
294 | eton_blue,"Eton Blue",#96c8a2,150,200,162
295 | fallow,"Fallow",#c19a6b,193,154,107
296 | falu_red,"Falu Red",#801818,128,24,24
297 | fandango,"Fandango",#b53389,181,51,137
298 | fashion_fuchsia,"Fashion Fuchsia",#f400a1,244,0,161
299 | fawn,"Fawn",#e5aa70,229,170,112
300 | feldgrau,"Feldgrau",#4d5d53,77,93,83
301 | fern_green,"Fern Green",#4f7942,79,121,66
302 | ferrari_red,"Ferrari Red",#ff2800,255,40,0
303 | field_drab,"Field Drab",#6c541e,108,84,30
304 | fire_engine_red,"Fire Engine Red",#ce2029,206,32,41
305 | firebrick,"Firebrick",#b22222,178,34,34
306 | flame,"Flame",#e25822,226,88,34
307 | flamingo_pink,"Flamingo Pink",#fc8eac,252,142,172
308 | flavescent,"Flavescent",#f7e98e,247,233,142
309 | flax,"Flax",#eedc82,238,220,130
310 | floral_white,"Floral White",#fffaf0,255,250,240
311 | fluorescent_orange,"Fluorescent Orange",#ffbf00,255,191,0
312 | fluorescent_pink,"Fluorescent Pink",#ff1493,255,20,147
313 | fluorescent_yellow,"Fluorescent Yellow",#cf0,204,255,0
314 | folly,"Folly",#ff004f,255,0,79
315 | forest_green_traditional,"Forest Green (Traditional)",#014421,1,68,33
316 | forest_green_web,"Forest Green (Web)",#228b22,34,139,34
317 | french_beige,"French Beige",#a67b5b,166,123,91
318 | french_blue,"French Blue",#0072bb,0,114,187
319 | french_lilac,"French Lilac",#86608e,134,96,142
320 | french_lime,"French Lime",#cf0,204,255,0
321 | french_raspberry,"French Raspberry",#c72c48,199,44,72
322 | french_rose,"French Rose",#f64a8a,246,74,138
323 | fuchsia,"Fuchsia",#f0f,255,0,255
324 | fuchsia_crayola,"Fuchsia (Crayola)",#c154c1,193,84,193
325 | fuchsia_pink,"Fuchsia Pink",#f7f,255,119,255
326 | fuchsia_rose,"Fuchsia Rose",#c74375,199,67,117
327 | fulvous,"Fulvous",#e48400,228,132,0
328 | fuzzy_wuzzy,"Fuzzy Wuzzy",#c66,204,102,102
329 | gainsboro,"Gainsboro",#dcdcdc,220,220,220
330 | gamboge,"Gamboge",#e49b0f,228,155,15
331 | ghost_white,"Ghost White",#f8f8ff,248,248,255
332 | ginger,"Ginger",#b06500,176,101,0
333 | glaucous,"Glaucous",#6082b6,96,130,182
334 | glitter,"Glitter",#e6e8fa,230,232,250
335 | gold_metallic,"Gold (Metallic)",#d4af37,212,175,55
336 | gold_web_golden,"Gold (Web) (Golden)",#ffd700,255,215,0
337 | golden_brown,"Golden Brown",#996515,153,101,21
338 | golden_poppy,"Golden Poppy",#fcc200,252,194,0
339 | golden_yellow,"Golden Yellow",#ffdf00,255,223,0
340 | goldenrod,"Goldenrod",#daa520,218,165,32
341 | granny_smith_apple,"Granny Smith Apple",#a8e4a0,168,228,160
342 | gray,"Gray",#808080,128,128,128
343 | gray_asparagus,"Gray-Asparagus",#465945,70,89,69
344 | gray_html_css_gray,"Gray (Html/Css Gray)",#808080,128,128,128
345 | gray_x11_gray,"Gray (X11 Gray)",#bebebe,190,190,190
346 | green_color_wheel_x11_green,"Green (Color Wheel) (X11 Green)",#0f0,0,255,0
347 | green_crayola,"Green (Crayola)",#1cac78,28,172,120
348 | green_html_css_green,"Green (Html/Css Green)",#008000,0,128,0
349 | green_munsell,"Green (Munsell)",#00a877,0,168,119
350 | green_ncs,"Green (Ncs)",#009f6b,0,159,107
351 | green_pigment,"Green (Pigment)",#00a550,0,165,80
352 | green_ryb,"Green (Ryb)",#66b032,102,176,50
353 | green_yellow,"Green-Yellow",#adff2f,173,255,47
354 | grullo,"Grullo",#a99a86,169,154,134
355 | guppie_green,"Guppie Green",#00ff7f,0,255,127
356 | halay_be,"Halayà úBe",#663854,102,56,84
357 | han_blue,"Han Blue",#446ccf,68,108,207
358 | han_purple,"Han Purple",#5218fa,82,24,250
359 | hansa_yellow,"Hansa Yellow",#e9d66b,233,214,107
360 | harlequin,"Harlequin",#3fff00,63,255,0
361 | harvard_crimson,"Harvard Crimson",#c90016,201,0,22
362 | harvest_gold,"Harvest Gold",#da9100,218,145,0
363 | heart_gold,"Heart Gold",#808000,128,128,0
364 | heliotrope,"Heliotrope",#df73ff,223,115,255
365 | hollywood_cerise,"Hollywood Cerise",#f400a1,244,0,161
366 | honeydew,"Honeydew",#f0fff0,240,255,240
367 | honolulu_blue,"Honolulu Blue",#007fbf,0,127,191
368 | hooker_s_green,"Hooker'S Green",#49796b,73,121,107
369 | hot_magenta,"Hot Magenta",#ff1dce,255,29,206
370 | hot_pink,"Hot Pink",#ff69b4,255,105,180
371 | hunter_green,"Hunter Green",#355e3b,53,94,59
372 | iceberg,"Iceberg",#71a6d2,113,166,210
373 | icterine,"Icterine",#fcf75e,252,247,94
374 | imperial_blue,"Imperial Blue",#002395,0,35,149
375 | inchworm,"Inchworm",#b2ec5d,178,236,93
376 | india_green,"India Green",#138808,19,136,8
377 | indian_red,"Indian Red",#cd5c5c,205,92,92
378 | indian_yellow,"Indian Yellow",#e3a857,227,168,87
379 | indigo,"Indigo",#6f00ff,111,0,255
380 | indigo_dye,"Indigo (Dye)",#00416a,0,65,106
381 | indigo_web,"Indigo (Web)",#4b0082,75,0,130
382 | international_klein_blue,"International Klein Blue",#002fa7,0,47,167
383 | international_orange_aerospace,"International Orange (Aerospace)",#ff4f00,255,79,0
384 | international_orange_engineering,"International Orange (Engineering)",#ba160c,186,22,12
385 | international_orange_golden_gate_bridge,"International Orange (Golden Gate Bridge)",#c0362c,192,54,44
386 | iris,"Iris",#5a4fcf,90,79,207
387 | isabelline,"Isabelline",#f4f0ec,244,240,236
388 | islamic_green,"Islamic Green",#009000,0,144,0
389 | ivory,"Ivory",#fffff0,255,255,240
390 | jade,"Jade",#00a86b,0,168,107
391 | jasmine,"Jasmine",#f8de7e,248,222,126
392 | jasper,"Jasper",#d73b3e,215,59,62
393 | jazzberry_jam,"Jazzberry Jam",#a50b5e,165,11,94
394 | jet,"Jet",#343434,52,52,52
395 | jonquil,"Jonquil",#fada5e,250,218,94
396 | june_bud,"June Bud",#bdda57,189,218,87
397 | jungle_green,"Jungle Green",#29ab87,41,171,135
398 | kelly_green,"Kelly Green",#4cbb17,76,187,23
399 | kenyan_copper,"Kenyan Copper",#7c1c05,124,28,5
400 | khaki_html_css_khaki,"Khaki (Html/Css) (Khaki)",#c3b091,195,176,145
401 | khaki_x11_light_khaki,"Khaki (X11) (Light Khaki)",#f0e68c,240,230,140
402 | ku_crimson,"Ku Crimson",#e8000d,232,0,13
403 | la_salle_green,"La Salle Green",#087830,8,120,48
404 | languid_lavender,"Languid Lavender",#d6cadd,214,202,221
405 | lapis_lazuli,"Lapis Lazuli",#26619c,38,97,156
406 | laser_lemon,"Laser Lemon",#fefe22,254,254,34
407 | laurel_green,"Laurel Green",#a9ba9d,169,186,157
408 | lava,"Lava",#cf1020,207,16,32
409 | lavender_blue,"Lavender Blue",#ccf,204,204,255
410 | lavender_blush,"Lavender Blush",#fff0f5,255,240,245
411 | lavender_floral,"Lavender (Floral)",#b57edc,181,126,220
412 | lavender_gray,"Lavender Gray",#c4c3d0,196,195,208
413 | lavender_indigo,"Lavender Indigo",#9457eb,148,87,235
414 | lavender_magenta,"Lavender Magenta",#ee82ee,238,130,238
415 | lavender_mist,"Lavender Mist",#e6e6fa,230,230,250
416 | lavender_pink,"Lavender Pink",#fbaed2,251,174,210
417 | lavender_purple,"Lavender Purple",#967bb6,150,123,182
418 | lavender_rose,"Lavender Rose",#fba0e3,251,160,227
419 | lavender_web,"Lavender (Web)",#e6e6fa,230,230,250
420 | lawn_green,"Lawn Green",#7cfc00,124,252,0
421 | lemon,"Lemon",#fff700,255,247,0
422 | lemon_chiffon,"Lemon Chiffon",#fffacd,255,250,205
423 | lemon_lime,"Lemon Lime",#e3ff00,227,255,0
424 | licorice,"Licorice",#1a1110,26,17,16
425 | light_apricot,"Light Apricot",#fdd5b1,253,213,177
426 | light_blue,"Light Blue",#add8e6,173,216,230
427 | light_brown,"Light Brown",#b5651d,181,101,29
428 | light_carmine_pink,"Light Carmine Pink",#e66771,230,103,113
429 | light_coral,"Light Coral",#f08080,240,128,128
430 | light_cornflower_blue,"Light Cornflower Blue",#93ccea,147,204,234
431 | light_crimson,"Light Crimson",#f56991,245,105,145
432 | light_cyan,"Light Cyan",#e0ffff,224,255,255
433 | light_fuchsia_pink,"Light Fuchsia Pink",#f984ef,249,132,239
434 | light_goldenrod_yellow,"Light Goldenrod Yellow",#fafad2,250,250,210
435 | light_gray,"Light Gray",#d3d3d3,211,211,211
436 | light_green,"Light Green",#90ee90,144,238,144
437 | light_khaki,"Light Khaki",#f0e68c,240,230,140
438 | light_pastel_purple,"Light Pastel Purple",#b19cd9,177,156,217
439 | light_pink,"Light Pink",#ffb6c1,255,182,193
440 | light_red_ochre,"Light Red Ochre",#e97451,233,116,81
441 | light_salmon,"Light Salmon",#ffa07a,255,160,122
442 | light_salmon_pink,"Light Salmon Pink",#f99,255,153,153
443 | light_sea_green,"Light Sea Green",#20b2aa,32,178,170
444 | light_sky_blue,"Light Sky Blue",#87cefa,135,206,250
445 | light_slate_gray,"Light Slate Gray",#789,119,136,153
446 | light_taupe,"Light Taupe",#b38b6d,179,139,109
447 | light_thulian_pink,"Light Thulian Pink",#e68fac,230,143,172
448 | light_yellow,"Light Yellow",#ffffe0,255,255,224
449 | lilac,"Lilac",#c8a2c8,200,162,200
450 | lime_color_wheel,"Lime (Color Wheel)",#bfff00,191,255,0
451 | lime_green,"Lime Green",#32cd32,50,205,50
452 | lime_web_x11_green,"Lime (Web) (X11 Green)",#0f0,0,255,0
453 | limerick,"Limerick",#9dc209,157,194,9
454 | lincoln_green,"Lincoln Green",#195905,25,89,5
455 | linen,"Linen",#faf0e6,250,240,230
456 | lion,"Lion",#c19a6b,193,154,107
457 | little_boy_blue,"Little Boy Blue",#6ca0dc,108,160,220
458 | liver,"Liver",#534b4f,83,75,79
459 | lust,"Lust",#e62020,230,32,32
460 | magenta,"Magenta",#f0f,255,0,255
461 | magenta_dye,"Magenta (Dye)",#ca1f7b,202,31,123
462 | magenta_process,"Magenta (Process)",#ff0090,255,0,144
463 | magic_mint,"Magic Mint",#aaf0d1,170,240,209
464 | magnolia,"Magnolia",#f8f4ff,248,244,255
465 | mahogany,"Mahogany",#c04000,192,64,0
466 | maize,"Maize",#fbec5d,251,236,93
467 | majorelle_blue,"Majorelle Blue",#6050dc,96,80,220
468 | malachite,"Malachite",#0bda51,11,218,81
469 | manatee,"Manatee",#979aaa,151,154,170
470 | mango_tango,"Mango Tango",#ff8243,255,130,67
471 | mantis,"Mantis",#74c365,116,195,101
472 | mardi_gras,"Mardi Gras",#880085,136,0,133
473 | maroon_crayola,"Maroon (Crayola)",#c32148,195,33,72
474 | maroon_html_css,"Maroon (Html/Css)",#800000,128,0,0
475 | maroon_x11,"Maroon (X11)",#b03060,176,48,96
476 | mauve,"Mauve",#e0b0ff,224,176,255
477 | mauve_taupe,"Mauve Taupe",#915f6d,145,95,109
478 | mauvelous,"Mauvelous",#ef98aa,239,152,170
479 | maya_blue,"Maya Blue",#73c2fb,115,194,251
480 | meat_brown,"Meat Brown",#e5b73b,229,183,59
481 | medium_aquamarine,"Medium Aquamarine",#6da,102,221,170
482 | medium_blue,"Medium Blue",#0000cd,0,0,205
483 | medium_candy_apple_red,"Medium Candy Apple Red",#e2062c,226,6,44
484 | medium_carmine,"Medium Carmine",#af4035,175,64,53
485 | medium_champagne,"Medium Champagne",#f3e5ab,243,229,171
486 | medium_electric_blue,"Medium Electric Blue",#035096,3,80,150
487 | medium_jungle_green,"Medium Jungle Green",#1c352d,28,53,45
488 | medium_lavender_magenta,"Medium Lavender Magenta",#dda0dd,221,160,221
489 | medium_orchid,"Medium Orchid",#ba55d3,186,85,211
490 | medium_persian_blue,"Medium Persian Blue",#0067a5,0,103,165
491 | medium_purple,"Medium Purple",#9370db,147,112,219
492 | medium_red_violet,"Medium Red-Violet",#bb3385,187,51,133
493 | medium_ruby,"Medium Ruby",#aa4069,170,64,105
494 | medium_sea_green,"Medium Sea Green",#3cb371,60,179,113
495 | medium_slate_blue,"Medium Slate Blue",#7b68ee,123,104,238
496 | medium_spring_bud,"Medium Spring Bud",#c9dc87,201,220,135
497 | medium_spring_green,"Medium Spring Green",#00fa9a,0,250,154
498 | medium_taupe,"Medium Taupe",#674c47,103,76,71
499 | medium_turquoise,"Medium Turquoise",#48d1cc,72,209,204
500 | medium_tuscan_red,"Medium Tuscan Red",#79443b,121,68,59
501 | medium_vermilion,"Medium Vermilion",#d9603b,217,96,59
502 | medium_violet_red,"Medium Violet-Red",#c71585,199,21,133
503 | mellow_apricot,"Mellow Apricot",#f8b878,248,184,120
504 | mellow_yellow,"Mellow Yellow",#f8de7e,248,222,126
505 | melon,"Melon",#fdbcb4,253,188,180
506 | midnight_blue,"Midnight Blue",#191970,25,25,112
507 | midnight_green_eagle_green,"Midnight Green (Eagle Green)",#004953,0,73,83
508 | mikado_yellow,"Mikado Yellow",#ffc40c,255,196,12
509 | mint,"Mint",#3eb489,62,180,137
510 | mint_cream,"Mint Cream",#f5fffa,245,255,250
511 | mint_green,"Mint Green",#98ff98,152,255,152
512 | misty_rose,"Misty Rose",#ffe4e1,255,228,225
513 | moccasin,"Moccasin",#faebd7,250,235,215
514 | mode_beige,"Mode Beige",#967117,150,113,23
515 | moonstone_blue,"Moonstone Blue",#73a9c2,115,169,194
516 | mordant_red_19,"Mordant Red 19",#ae0c00,174,12,0
517 | moss_green,"Moss Green",#addfad,173,223,173
518 | mountain_meadow,"Mountain Meadow",#30ba8f,48,186,143
519 | mountbatten_pink,"Mountbatten Pink",#997a8d,153,122,141
520 | msu_green,"Msu Green",#18453b,24,69,59
521 | mulberry,"Mulberry",#c54b8c,197,75,140
522 | mustard,"Mustard",#ffdb58,255,219,88
523 | myrtle,"Myrtle",#21421e,33,66,30
524 | nadeshiko_pink,"Nadeshiko Pink",#f6adc6,246,173,198
525 | napier_green,"Napier Green",#2a8000,42,128,0
526 | naples_yellow,"Naples Yellow",#fada5e,250,218,94
527 | navajo_white,"Navajo White",#ffdead,255,222,173
528 | navy_blue,"Navy Blue",#000080,0,0,128
529 | neon_carrot,"Neon Carrot",#ffa343,255,163,67
530 | neon_fuchsia,"Neon Fuchsia",#fe4164,254,65,100
531 | neon_green,"Neon Green",#39ff14,57,255,20
532 | new_york_pink,"New York Pink",#d7837f,215,131,127
533 | non_photo_blue,"Non-Photo Blue",#a4dded,164,221,237
534 | north_texas_green,"North Texas Green",#059033,5,144,51
535 | ocean_boat_blue,"Ocean Boat Blue",#0077be,0,119,190
536 | ochre,"Ochre",#c72,204,119,34
537 | office_green,"Office Green",#008000,0,128,0
538 | old_gold,"Old Gold",#cfb53b,207,181,59
539 | old_lace,"Old Lace",#fdf5e6,253,245,230
540 | old_lavender,"Old Lavender",#796878,121,104,120
541 | old_mauve,"Old Mauve",#673147,103,49,71
542 | old_rose,"Old Rose",#c08081,192,128,129
543 | olive,"Olive",#808000,128,128,0
544 | olive_drab_7,"Olive Drab #7",#3c341f,60,52,31
545 | olive_drab_web_olive_drab_3,"Olive Drab (Web) (Olive Drab #3)",#6b8e23,107,142,35
546 | olivine,"Olivine",#9ab973,154,185,115
547 | onyx,"Onyx",#353839,53,56,57
548 | opera_mauve,"Opera Mauve",#b784a7,183,132,167
549 | orange_color_wheel,"Orange (Color Wheel)",#ff7f00,255,127,0
550 | orange_peel,"Orange Peel",#ff9f00,255,159,0
551 | orange_red,"Orange-Red",#ff4500,255,69,0
552 | orange_ryb,"Orange (Ryb)",#fb9902,251,153,2
553 | orange_web_color,"Orange (Web Color)",#ffa500,255,165,0
554 | orchid,"Orchid",#da70d6,218,112,214
555 | otter_brown,"Otter Brown",#654321,101,67,33
556 | ou_crimson_red,"Ou Crimson Red",#900,153,0,0
557 | outer_space,"Outer Space",#414a4c,65,74,76
558 | outrageous_orange,"Outrageous Orange",#ff6e4a,255,110,74
559 | oxford_blue,"Oxford Blue",#002147,0,33,71
560 | pakistan_green,"Pakistan Green",#060,0,102,0
561 | palatinate_blue,"Palatinate Blue",#273be2,39,59,226
562 | palatinate_purple,"Palatinate Purple",#682860,104,40,96
563 | pale_aqua,"Pale Aqua",#bcd4e6,188,212,230
564 | pale_blue,"Pale Blue",#afeeee,175,238,238
565 | pale_brown,"Pale Brown",#987654,152,118,84
566 | pale_carmine,"Pale Carmine",#af4035,175,64,53
567 | pale_cerulean,"Pale Cerulean",#9bc4e2,155,196,226
568 | pale_chestnut,"Pale Chestnut",#ddadaf,221,173,175
569 | pale_copper,"Pale Copper",#da8a67,218,138,103
570 | pale_cornflower_blue,"Pale Cornflower Blue",#abcdef,171,205,239
571 | pale_gold,"Pale Gold",#e6be8a,230,190,138
572 | pale_goldenrod,"Pale Goldenrod",#eee8aa,238,232,170
573 | pale_green,"Pale Green",#98fb98,152,251,152
574 | pale_lavender,"Pale Lavender",#dcd0ff,220,208,255
575 | pale_magenta,"Pale Magenta",#f984e5,249,132,229
576 | pale_pink,"Pale Pink",#fadadd,250,218,221
577 | pale_plum,"Pale Plum",#dda0dd,221,160,221
578 | pale_red_violet,"Pale Red-Violet",#db7093,219,112,147
579 | pale_robin_egg_blue,"Pale Robin Egg Blue",#96ded1,150,222,209
580 | pale_silver,"Pale Silver",#c9c0bb,201,192,187
581 | pale_spring_bud,"Pale Spring Bud",#ecebbd,236,235,189
582 | pale_taupe,"Pale Taupe",#bc987e,188,152,126
583 | pale_violet_red,"Pale Violet-Red",#db7093,219,112,147
584 | pansy_purple,"Pansy Purple",#78184a,120,24,74
585 | papaya_whip,"Papaya Whip",#ffefd5,255,239,213
586 | paris_green,"Paris Green",#50c878,80,200,120
587 | pastel_blue,"Pastel Blue",#aec6cf,174,198,207
588 | pastel_brown,"Pastel Brown",#836953,131,105,83
589 | pastel_gray,"Pastel Gray",#cfcfc4,207,207,196
590 | pastel_green,"Pastel Green",#7d7,119,221,119
591 | pastel_magenta,"Pastel Magenta",#f49ac2,244,154,194
592 | pastel_orange,"Pastel Orange",#ffb347,255,179,71
593 | pastel_pink,"Pastel Pink",#dea5a4,222,165,164
594 | pastel_purple,"Pastel Purple",#b39eb5,179,158,181
595 | pastel_red,"Pastel Red",#ff6961,255,105,97
596 | pastel_violet,"Pastel Violet",#cb99c9,203,153,201
597 | pastel_yellow,"Pastel Yellow",#fdfd96,253,253,150
598 | patriarch,"Patriarch",#800080,128,0,128
599 | payne_s_grey,"Payne'S Grey",#536878,83,104,120
600 | peach,"Peach",#ffe5b4,255,229,180
601 | peach_crayola,"Peach (Crayola)",#ffcba4,255,203,164
602 | peach_orange,"Peach-Orange",#fc9,255,204,153
603 | peach_puff,"Peach Puff",#ffdab9,255,218,185
604 | peach_yellow,"Peach-Yellow",#fadfad,250,223,173
605 | pear,"Pear",#d1e231,209,226,49
606 | pearl,"Pearl",#eae0c8,234,224,200
607 | pearl_aqua,"Pearl Aqua",#88d8c0,136,216,192
608 | pearly_purple,"Pearly Purple",#b768a2,183,104,162
609 | peridot,"Peridot",#e6e200,230,226,0
610 | periwinkle,"Periwinkle",#ccf,204,204,255
611 | persian_blue,"Persian Blue",#1c39bb,28,57,187
612 | persian_green,"Persian Green",#00a693,0,166,147
613 | persian_indigo,"Persian Indigo",#32127a,50,18,122
614 | persian_orange,"Persian Orange",#d99058,217,144,88
615 | persian_pink,"Persian Pink",#f77fbe,247,127,190
616 | persian_plum,"Persian Plum",#701c1c,112,28,28
617 | persian_red,"Persian Red",#c33,204,51,51
618 | persian_rose,"Persian Rose",#fe28a2,254,40,162
619 | persimmon,"Persimmon",#ec5800,236,88,0
620 | peru,"Peru",#cd853f,205,133,63
621 | phlox,"Phlox",#df00ff,223,0,255
622 | phthalo_blue,"Phthalo Blue",#000f89,0,15,137
623 | phthalo_green,"Phthalo Green",#123524,18,53,36
624 | piggy_pink,"Piggy Pink",#fddde6,253,221,230
625 | pine_green,"Pine Green",#01796f,1,121,111
626 | pink,"Pink",#ffc0cb,255,192,203
627 | pink_lace,"Pink Lace",#ffddf4,255,221,244
628 | pink_orange,"Pink-Orange",#f96,255,153,102
629 | pink_pearl,"Pink Pearl",#e7accf,231,172,207
630 | pink_sherbet,"Pink Sherbet",#f78fa7,247,143,167
631 | pistachio,"Pistachio",#93c572,147,197,114
632 | platinum,"Platinum",#e5e4e2,229,228,226
633 | plum_traditional,"Plum (Traditional)",#8e4585,142,69,133
634 | plum_web,"Plum (Web)",#dda0dd,221,160,221
635 | portland_orange,"Portland Orange",#ff5a36,255,90,54
636 | powder_blue_web,"Powder Blue (Web)",#b0e0e6,176,224,230
637 | princeton_orange,"Princeton Orange",#ff8f00,255,143,0
638 | prune,"Prune",#701c1c,112,28,28
639 | prussian_blue,"Prussian Blue",#003153,0,49,83
640 | psychedelic_purple,"Psychedelic Purple",#df00ff,223,0,255
641 | puce,"Puce",#c89,204,136,153
642 | pumpkin,"Pumpkin",#ff7518,255,117,24
643 | purple_heart,"Purple Heart",#69359c,105,53,156
644 | purple_html_css,"Purple (Html/Css)",#800080,128,0,128
645 | purple_mountain_majesty,"Purple Mountain Majesty",#9678b6,150,120,182
646 | purple_munsell,"Purple (Munsell)",#9f00c5,159,0,197
647 | purple_pizzazz,"Purple Pizzazz",#fe4eda,254,78,218
648 | purple_taupe,"Purple Taupe",#50404d,80,64,77
649 | purple_x11,"Purple (X11)",#a020f0,160,32,240
650 | quartz,"Quartz",#51484f,81,72,79
651 | rackley,"Rackley",#5d8aa8,93,138,168
652 | radical_red,"Radical Red",#ff355e,255,53,94
653 | rajah,"Rajah",#fbab60,251,171,96
654 | raspberry,"Raspberry",#e30b5d,227,11,93
655 | raspberry_glace,"Raspberry Glace",#915f6d,145,95,109
656 | raspberry_pink,"Raspberry Pink",#e25098,226,80,152
657 | raspberry_rose,"Raspberry Rose",#b3446c,179,68,108
658 | raw_umber,"Raw Umber",#826644,130,102,68
659 | razzle_dazzle_rose,"Razzle Dazzle Rose",#f3c,255,51,204
660 | razzmatazz,"Razzmatazz",#e3256b,227,37,107
661 | red,"Red",#f00,255,0,0
662 | red_brown,"Red-Brown",#a52a2a,165,42,42
663 | red_devil,"Red Devil",#860111,134,1,17
664 | red_munsell,"Red (Munsell)",#f2003c,242,0,60
665 | red_ncs,"Red (Ncs)",#c40233,196,2,51
666 | red_orange,"Red-Orange",#ff5349,255,83,73
667 | red_pigment,"Red (Pigment)",#ed1c24,237,28,36
668 | red_ryb,"Red (Ryb)",#fe2712,254,39,18
669 | red_violet,"Red-Violet",#c71585,199,21,133
670 | redwood,"Redwood",#ab4e52,171,78,82
671 | regalia,"Regalia",#522d80,82,45,128
672 | resolution_blue,"Resolution Blue",#002387,0,35,135
673 | rich_black,"Rich Black",#004040,0,64,64
674 | rich_brilliant_lavender,"Rich Brilliant Lavender",#f1a7fe,241,167,254
675 | rich_carmine,"Rich Carmine",#d70040,215,0,64
676 | rich_electric_blue,"Rich Electric Blue",#0892d0,8,146,208
677 | rich_lavender,"Rich Lavender",#a76bcf,167,107,207
678 | rich_lilac,"Rich Lilac",#b666d2,182,102,210
679 | rich_maroon,"Rich Maroon",#b03060,176,48,96
680 | rifle_green,"Rifle Green",#414833,65,72,51
681 | robin_egg_blue,"Robin Egg Blue",#0cc,0,204,204
682 | rose,"Rose",#ff007f,255,0,127
683 | rose_bonbon,"Rose Bonbon",#f9429e,249,66,158
684 | rose_ebony,"Rose Ebony",#674846,103,72,70
685 | rose_gold,"Rose Gold",#b76e79,183,110,121
686 | rose_madder,"Rose Madder",#e32636,227,38,54
687 | rose_pink,"Rose Pink",#f6c,255,102,204
688 | rose_quartz,"Rose Quartz",#aa98a9,170,152,169
689 | rose_taupe,"Rose Taupe",#905d5d,144,93,93
690 | rose_vale,"Rose Vale",#ab4e52,171,78,82
691 | rosewood,"Rosewood",#65000b,101,0,11
692 | rosso_corsa,"Rosso Corsa",#d40000,212,0,0
693 | rosy_brown,"Rosy Brown",#bc8f8f,188,143,143
694 | royal_azure,"Royal Azure",#0038a8,0,56,168
695 | royal_blue_traditional,"Royal Blue (Traditional)",#002366,0,35,102
696 | royal_blue_web,"Royal Blue (Web)",#4169e1,65,105,225
697 | royal_fuchsia,"Royal Fuchsia",#ca2c92,202,44,146
698 | royal_purple,"Royal Purple",#7851a9,120,81,169
699 | royal_yellow,"Royal Yellow",#fada5e,250,218,94
700 | rubine_red,"Rubine Red",#d10056,209,0,86
701 | ruby,"Ruby",#e0115f,224,17,95
702 | ruby_red,"Ruby Red",#9b111e,155,17,30
703 | ruddy,"Ruddy",#ff0028,255,0,40
704 | ruddy_brown,"Ruddy Brown",#bb6528,187,101,40
705 | ruddy_pink,"Ruddy Pink",#e18e96,225,142,150
706 | rufous,"Rufous",#a81c07,168,28,7
707 | russet,"Russet",#80461b,128,70,27
708 | rust,"Rust",#b7410e,183,65,14
709 | rusty_red,"Rusty Red",#da2c43,218,44,67
710 | sacramento_state_green,"Sacramento State Green",#00563f,0,86,63
711 | saddle_brown,"Saddle Brown",#8b4513,139,69,19
712 | safety_orange_blaze_orange,"Safety Orange (Blaze Orange)",#ff6700,255,103,0
713 | saffron,"Saffron",#f4c430,244,196,48
714 | salmon,"Salmon",#ff8c69,255,140,105
715 | salmon_pink,"Salmon Pink",#ff91a4,255,145,164
716 | sand,"Sand",#c2b280,194,178,128
717 | sand_dune,"Sand Dune",#967117,150,113,23
718 | sandstorm,"Sandstorm",#ecd540,236,213,64
719 | sandy_brown,"Sandy Brown",#f4a460,244,164,96
720 | sandy_taupe,"Sandy Taupe",#967117,150,113,23
721 | sangria,"Sangria",#92000a,146,0,10
722 | sap_green,"Sap Green",#507d2a,80,125,42
723 | sapphire,"Sapphire",#0f52ba,15,82,186
724 | sapphire_blue,"Sapphire Blue",#0067a5,0,103,165
725 | satin_sheen_gold,"Satin Sheen Gold",#cba135,203,161,53
726 | scarlet,"Scarlet",#ff2400,255,36,0
727 | scarlet_crayola,"Scarlet (Crayola)",#fd0e35,253,14,53
728 | school_bus_yellow,"School Bus Yellow",#ffd800,255,216,0
729 | screamin_green,"Screamin' Green",#76ff7a,118,255,122
730 | sea_blue,"Sea Blue",#006994,0,105,148
731 | sea_green,"Sea Green",#2e8b57,46,139,87
732 | seal_brown,"Seal Brown",#321414,50,20,20
733 | seashell,"Seashell",#fff5ee,255,245,238
734 | selective_yellow,"Selective Yellow",#ffba00,255,186,0
735 | sepia,"Sepia",#704214,112,66,20
736 | shadow,"Shadow",#8a795d,138,121,93
737 | shamrock_green,"Shamrock Green",#009e60,0,158,96
738 | shocking_pink,"Shocking Pink",#fc0fc0,252,15,192
739 | shocking_pink_crayola,"Shocking Pink (Crayola)",#ff6fff,255,111,255
740 | sienna,"Sienna",#882d17,136,45,23
741 | silver,"Silver",#c0c0c0,192,192,192
742 | sinopia,"Sinopia",#cb410b,203,65,11
743 | skobeloff,"Skobeloff",#007474,0,116,116
744 | sky_blue,"Sky Blue",#87ceeb,135,206,235
745 | sky_magenta,"Sky Magenta",#cf71af,207,113,175
746 | slate_blue,"Slate Blue",#6a5acd,106,90,205
747 | slate_gray,"Slate Gray",#708090,112,128,144
748 | smalt_dark_powder_blue,"Smalt (Dark Powder Blue)",#039,0,51,153
749 | smokey_topaz,"Smokey Topaz",#933d41,147,61,65
750 | smoky_black,"Smoky Black",#100c08,16,12,8
751 | snow,"Snow",#fffafa,255,250,250
752 | spiro_disco_ball,"Spiro Disco Ball",#0fc0fc,15,192,252
753 | spring_bud,"Spring Bud",#a7fc00,167,252,0
754 | spring_green,"Spring Green",#00ff7f,0,255,127
755 | st_patrick_s_blue,"St. Patrick'S Blue",#23297a,35,41,122
756 | steel_blue,"Steel Blue",#4682b4,70,130,180
757 | stil_de_grain_yellow,"Stil De Grain Yellow",#fada5e,250,218,94
758 | stizza,"Stizza",#900,153,0,0
759 | stormcloud,"Stormcloud",#4f666a,79,102,106
760 | straw,"Straw",#e4d96f,228,217,111
761 | sunglow,"Sunglow",#fc3,255,204,51
762 | sunset,"Sunset",#fad6a5,250,214,165
763 | tan,"Tan",#d2b48c,210,180,140
764 | tangelo,"Tangelo",#f94d00,249,77,0
765 | tangerine,"Tangerine",#f28500,242,133,0
766 | tangerine_yellow,"Tangerine Yellow",#fc0,255,204,0
767 | tango_pink,"Tango Pink",#e4717a,228,113,122
768 | taupe,"Taupe",#483c32,72,60,50
769 | taupe_gray,"Taupe Gray",#8b8589,139,133,137
770 | tea_green,"Tea Green",#d0f0c0,208,240,192
771 | tea_rose_orange,"Tea Rose (Orange)",#f88379,248,131,121
772 | tea_rose_rose,"Tea Rose (Rose)",#f4c2c2,244,194,194
773 | teal,"Teal",#008080,0,128,128
774 | teal_blue,"Teal Blue",#367588,54,117,136
775 | teal_green,"Teal Green",#00827f,0,130,127
776 | telemagenta,"Telemagenta",#cf3476,207,52,118
777 | tenn_tawny,"Tenné (Tawny)",#cd5700,205,87,0
778 | terra_cotta,"Terra Cotta",#e2725b,226,114,91
779 | thistle,"Thistle",#d8bfd8,216,191,216
780 | thulian_pink,"Thulian Pink",#de6fa1,222,111,161
781 | tickle_me_pink,"Tickle Me Pink",#fc89ac,252,137,172
782 | tiffany_blue,"Tiffany Blue",#0abab5,10,186,181
783 | tiger_s_eye,"Tiger'S Eye",#e08d3c,224,141,60
784 | timberwolf,"Timberwolf",#dbd7d2,219,215,210
785 | titanium_yellow,"Titanium Yellow",#eee600,238,230,0
786 | tomato,"Tomato",#ff6347,255,99,71
787 | toolbox,"Toolbox",#746cc0,116,108,192
788 | topaz,"Topaz",#ffc87c,255,200,124
789 | tractor_red,"Tractor Red",#fd0e35,253,14,53
790 | trolley_grey,"Trolley Grey",#808080,128,128,128
791 | tropical_rain_forest,"Tropical Rain Forest",#00755e,0,117,94
792 | true_blue,"True Blue",#0073cf,0,115,207
793 | tufts_blue,"Tufts Blue",#417dc1,65,125,193
794 | tumbleweed,"Tumbleweed",#deaa88,222,170,136
795 | turkish_rose,"Turkish Rose",#b57281,181,114,129
796 | turquoise,"Turquoise",#30d5c8,48,213,200
797 | turquoise_blue,"Turquoise Blue",#00ffef,0,255,239
798 | turquoise_green,"Turquoise Green",#a0d6b4,160,214,180
799 | tuscan_red,"Tuscan Red",#7c4848,124,72,72
800 | twilight_lavender,"Twilight Lavender",#8a496b,138,73,107
801 | tyrian_purple,"Tyrian Purple",#66023c,102,2,60
802 | ua_blue,"Ua Blue",#03a,0,51,170
803 | ua_red,"Ua Red",#d9004c,217,0,76
804 | ube,"Ube",#8878c3,136,120,195
805 | ucla_blue,"Ucla Blue",#536895,83,104,149
806 | ucla_gold,"Ucla Gold",#ffb300,255,179,0
807 | ufo_green,"Ufo Green",#3cd070,60,208,112
808 | ultra_pink,"Ultra Pink",#ff6fff,255,111,255
809 | ultramarine,"Ultramarine",#120a8f,18,10,143
810 | ultramarine_blue,"Ultramarine Blue",#4166f5,65,102,245
811 | umber,"Umber",#635147,99,81,71
812 | unbleached_silk,"Unbleached Silk",#ffddca,255,221,202
813 | united_nations_blue,"United Nations Blue",#5b92e5,91,146,229
814 | university_of_california_gold,"University Of California Gold",#b78727,183,135,39
815 | unmellow_yellow,"Unmellow Yellow",#ff6,255,255,102
816 | up_forest_green,"Up Forest Green",#014421,1,68,33
817 | up_maroon,"Up Maroon",#7b1113,123,17,19
818 | upsdell_red,"Upsdell Red",#ae2029,174,32,41
819 | urobilin,"Urobilin",#e1ad21,225,173,33
820 | usafa_blue,"Usafa Blue",#004f98,0,79,152
821 | usc_cardinal,"Usc Cardinal",#900,153,0,0
822 | usc_gold,"Usc Gold",#fc0,255,204,0
823 | utah_crimson,"Utah Crimson",#d3003f,211,0,63
824 | vanilla,"Vanilla",#f3e5ab,243,229,171
825 | vegas_gold,"Vegas Gold",#c5b358,197,179,88
826 | venetian_red,"Venetian Red",#c80815,200,8,21
827 | verdigris,"Verdigris",#43b3ae,67,179,174
828 | vermilion_cinnabar,"Vermilion (Cinnabar)",#e34234,227,66,52
829 | vermilion_plochere,"Vermilion (Plochere)",#d9603b,217,96,59
830 | veronica,"Veronica",#a020f0,160,32,240
831 | violet,"Violet",#8f00ff,143,0,255
832 | violet_blue,"Violet-Blue",#324ab2,50,74,178
833 | violet_color_wheel,"Violet (Color Wheel)",#7f00ff,127,0,255
834 | violet_ryb,"Violet (Ryb)",#8601af,134,1,175
835 | violet_web,"Violet (Web)",#ee82ee,238,130,238
836 | viridian,"Viridian",#40826d,64,130,109
837 | vivid_auburn,"Vivid Auburn",#922724,146,39,36
838 | vivid_burgundy,"Vivid Burgundy",#9f1d35,159,29,53
839 | vivid_cerise,"Vivid Cerise",#da1d81,218,29,129
840 | vivid_tangerine,"Vivid Tangerine",#ffa089,255,160,137
841 | vivid_violet,"Vivid Violet",#9f00ff,159,0,255
842 | warm_black,"Warm Black",#004242,0,66,66
843 | waterspout,"Waterspout",#a4f4f9,164,244,249
844 | wenge,"Wenge",#645452,100,84,82
845 | wheat,"Wheat",#f5deb3,245,222,179
846 | white,"White",#fff,255,255,255
847 | white_smoke,"White Smoke",#f5f5f5,245,245,245
848 | wild_blue_yonder,"Wild Blue Yonder",#a2add0,162,173,208
849 | wild_strawberry,"Wild Strawberry",#ff43a4,255,67,164
850 | wild_watermelon,"Wild Watermelon",#fc6c85,252,108,133
851 | wine,"Wine",#722f37,114,47,55
852 | wine_dregs,"Wine Dregs",#673147,103,49,71
853 | wisteria,"Wisteria",#c9a0dc,201,160,220
854 | wood_brown,"Wood Brown",#c19a6b,193,154,107
855 | xanadu,"Xanadu",#738678,115,134,120
856 | yale_blue,"Yale Blue",#0f4d92,15,77,146
857 | yellow,"Yellow",#ff0,255,255,0
858 | yellow_green,"Yellow-Green",#9acd32,154,205,50
859 | yellow_munsell,"Yellow (Munsell)",#efcc00,239,204,0
860 | yellow_ncs,"Yellow (Ncs)",#ffd300,255,211,0
861 | yellow_orange,"Yellow Orange",#ffae42,255,174,66
862 | yellow_process,"Yellow (Process)",#ffef00,255,239,0
863 | yellow_ryb,"Yellow (Ryb)",#fefe33,254,254,51
864 | zaffre,"Zaffre",#0014a8,0,20,168
865 | zinnwaldite_brown,"Zinnwaldite Brown",#2c1608,44,22,8
866 |
--------------------------------------------------------------------------------
/color palette using OpenCV.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": null,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "#programming_fever\n",
10 | "# Python program to create RGB color palette with trackbars \n",
11 | "import cv2 \n",
12 | "import numpy as np \n",
13 | "\n",
14 | "def emptyFunction(): \n",
15 | " pass\n",
16 | " \n",
17 | "def main(): \n",
18 | " image = np.zeros((512, 512, 3), np.uint8) \n",
19 | " windowName =\"Open CV Color Palette\"\n",
20 | " cv2.namedWindow(windowName) \n",
21 | " \n",
22 | " cv2.createTrackbar('Blue', windowName, 0, 255, emptyFunction) \n",
23 | " cv2.createTrackbar('Green', windowName, 0, 255, emptyFunction) \n",
24 | " cv2.createTrackbar('Red', windowName, 0, 255, emptyFunction) \n",
25 | " \n",
26 | " while(True): \n",
27 | " cv2.imshow(windowName, image) \n",
28 | " \n",
29 | " if cv2.waitKey(1) == 27: \n",
30 | " break\n",
31 | " \n",
32 | " blue = cv2.getTrackbarPos('Blue', windowName) \n",
33 | " green = cv2.getTrackbarPos('Green', windowName) \n",
34 | " red = cv2.getTrackbarPos('Red', windowName) \n",
35 | " \n",
36 | " image[:] = [blue, green, red] \n",
37 | " print(blue, green, red) \n",
38 | " \n",
39 | " cv2.destroyAllWindows() \n",
40 | " \n",
41 | "if __name__==\"__main__\": \n",
42 | " main() "
43 | ]
44 | }
45 | ],
46 | "metadata": {
47 | "kernelspec": {
48 | "display_name": "Python 3",
49 | "language": "python",
50 | "name": "python3"
51 | },
52 | "language_info": {
53 | "codemirror_mode": {
54 | "name": "ipython",
55 | "version": 3
56 | },
57 | "file_extension": ".py",
58 | "mimetype": "text/x-python",
59 | "name": "python",
60 | "nbconvert_exporter": "python",
61 | "pygments_lexer": "ipython3",
62 | "version": "3.7.4"
63 | }
64 | },
65 | "nbformat": 4,
66 | "nbformat_minor": 2
67 | }
68 |
--------------------------------------------------------------------------------
/contrast enhancing of color images using opencv.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": null,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "#programming_fever\n",
10 | "#contrast enhancing in color image\n",
11 | "import cv2\n",
12 | "import numpy as np\n",
13 | "img = cv2.imread('E://OpenCV//hi.png')\n",
14 | "img=cv2.resize(img,(500,500))\n",
15 | "img_yuv = cv2.cvtColor(img, cv2.COLOR_BGR2YUV)\n",
16 | "\n",
17 | "img_yuv[:,:,0] = cv2.equalizeHist(img_yuv[:,:,0])\n",
18 | "\n",
19 | "img_output = cv2.cvtColor(img_yuv, cv2.COLOR_YUV2BGR)\n",
20 | "cv2.imshow('Color input image', img)\n",
21 | "cv2.imshow('Histogram equalized', img_output)\n",
22 | "cv2.waitKey(0)\n",
23 | "cv2.destroyAllWindows()"
24 | ]
25 | }
26 | ],
27 | "metadata": {
28 | "kernelspec": {
29 | "display_name": "Python 3",
30 | "language": "python",
31 | "name": "python3"
32 | },
33 | "language_info": {
34 | "codemirror_mode": {
35 | "name": "ipython",
36 | "version": 3
37 | },
38 | "file_extension": ".py",
39 | "mimetype": "text/x-python",
40 | "name": "python",
41 | "nbconvert_exporter": "python",
42 | "pygments_lexer": "ipython3",
43 | "version": "3.7.4"
44 | }
45 | },
46 | "nbformat": 4,
47 | "nbformat_minor": 2
48 | }
49 |
--------------------------------------------------------------------------------
/contrast enhancing of gray scale image using opencv.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": null,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "#programming_fever\n",
10 | "#contrast enchancing in grayscale image\n",
11 | "import cv2\n",
12 | "import numpy as np\n",
13 | "img = cv2.imread('E://OpenCV//histog.png', 0)\n",
14 | "img=cv2.resize(img,(500,500))\n",
15 | "histeq = cv2.equalizeHist(img)\n",
16 | "cv2.imshow('Input', img)\n",
17 | "cv2.imshow('Histogram equalized', histeq)\n",
18 | "cv2.waitKey(0)\n",
19 | "cv2.destroyAllWindows()"
20 | ]
21 | }
22 | ],
23 | "metadata": {
24 | "kernelspec": {
25 | "display_name": "Python 3",
26 | "language": "python",
27 | "name": "python3"
28 | },
29 | "language_info": {
30 | "codemirror_mode": {
31 | "name": "ipython",
32 | "version": 3
33 | },
34 | "file_extension": ".py",
35 | "mimetype": "text/x-python",
36 | "name": "python",
37 | "nbconvert_exporter": "python",
38 | "pygments_lexer": "ipython3",
39 | "version": "3.7.4"
40 | }
41 | },
42 | "nbformat": 4,
43 | "nbformat_minor": 2
44 | }
45 |
--------------------------------------------------------------------------------
/document scanner.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": null,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "#programming_fever\n",
10 | "#document scanner using simple python code\n",
11 | "import numpy as np\n",
12 | "import cv2\n",
13 | "import imutils\n",
14 | "\n",
15 | "args_image =\"E://OpenCV//docu1.jpg\"\n",
16 | "\n",
17 | "image = cv2.imread(args_image)\n",
18 | "image=cv2.resize(image,(500,500))\n",
19 | "orig = image.copy()\n",
20 | "cv2.imshow(\"Original Image\", image)\n",
21 | "cv2.waitKey(0)\n",
22 | "cv2.destroyAllWindows()\n",
23 | "\n",
24 | "grayImage = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)\n",
25 | "grayImageBlur = cv2.blur(grayImage,(2,2))\n",
26 | "edgedImage = cv2.Canny(grayImageBlur, 100, 300, 3)\n",
27 | "\n",
28 | "cv2.imshow(\"gray\", grayImage)\n",
29 | "cv2.waitKey(0)\n",
30 | "cv2.destroyAllWindows()\n",
31 | "cv2.imshow(\"grayBlur\", grayImageBlur)\n",
32 | "cv2.waitKey(0)\n",
33 | "cv2.destroyAllWindows()\n",
34 | "cv2.imshow(\"Edge Detected Image\", edgedImage)\n",
35 | "cv2.waitKey(0)\n",
36 | "cv2.destroyAllWindows()\n",
37 | "\n",
38 | "allContours = cv2.findContours(edgedImage.copy(), cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)\n",
39 | "allContours = imutils.grab_contours(allContours)\n",
40 | "allContours = sorted(allContours, key=cv2.contourArea, reverse=True)[:1]\n",
41 | "\n",
42 | "perimeter = cv2.arcLength(allContours[0], True) \n",
43 | "ROIdimensions = cv2.approxPolyDP(allContours[0], 0.02*perimeter, True)\n",
44 | "cv2.drawContours(image, [ROIdimensions], -1, (0,255,0), 2)\n",
45 | "cv2.imshow(\"Contour Outline\", image)\n",
46 | "cv2.waitKey(0)\n",
47 | "cv2.destroyAllWindows()\n",
48 | "ROIdimensions = ROIdimensions.reshape(4,2)\n",
49 | "rect = np.zeros((4,2), dtype=\"float32\")\n",
50 | "s = np.sum(ROIdimensions, axis=1)\n",
51 | "rect[0] = ROIdimensions[np.argmin(s)]\n",
52 | "rect[2] = ROIdimensions[np.argmax(s)]\n",
53 | "diff = np.diff(ROIdimensions, axis=1)\n",
54 | "rect[1] = ROIdimensions[np.argmin(diff)]\n",
55 | "rect[3] = ROIdimensions[np.argmax(diff)]\n",
56 | "\n",
57 | "(tl, tr, br, bl) = rect\n",
58 | "\n",
59 | "widthA = np.sqrt((tl[0] -tr[0])**2 + (tl[1] - tr[1])**2 )\n",
60 | "widthB = np.sqrt((bl[0] - br[0])**2 + (bl[1] - br[1])**2 )\n",
61 | "maxWidth = max(int(widthA), int(widthB))\n",
62 | "\n",
63 | "heightA = np.sqrt((tl[0] - bl[0])**2 + (tl[1] - bl[1])**2 )\n",
64 | "heightB = np.sqrt((tr[0] - br[0])**2 + (tr[1] - br[1])**2 )\n",
65 | "maxHeight = max(int(heightA), int(heightB))\n",
66 | "dst = np.array([\n",
67 | " [0,0],\n",
68 | " [maxWidth-1, 0],\n",
69 | " [maxWidth-1, maxHeight-1],\n",
70 | " [0, maxHeight-1]], dtype=\"float32\")\n",
71 | "\n",
72 | "transformMatrix = cv2.getPerspectiveTransform(rect, dst)\n",
73 | "scan = cv2.warpPerspective(orig, transformMatrix, (maxWidth, maxHeight))\n",
74 | "cv2.imshow(\"Scaned\",scan)\n",
75 | "cv2.waitKey(0)\n",
76 | "cv2.destroyAllWindows()\n",
77 | "scanGray = cv2.cvtColor(scan, cv2.COLOR_BGR2GRAY)\n",
78 | "cv2.imshow(\"scanGray\", scanGray)\n",
79 | "cv2.waitKey(0)\n",
80 | "cv2.destroyAllWindows()\n",
81 | "from skimage.filters import threshold_local\n",
82 | "T = threshold_local(scanGray, 9, offset=8, method=\"gaussian\")\n",
83 | "scanBW = (scanGray > T).astype(\"uint8\") * 255\n",
84 | "cv2.imshow(\"scanned\", scanBW)\n",
85 | "cv2.waitKey(0)\n",
86 | "cv2.destroyAllWindows()\n"
87 | ]
88 | },
89 | {
90 | "cell_type": "code",
91 | "execution_count": null,
92 | "metadata": {},
93 | "outputs": [],
94 | "source": []
95 | },
96 | {
97 | "cell_type": "code",
98 | "execution_count": 1,
99 | "metadata": {},
100 | "outputs": [],
101 | "source": []
102 | },
103 | {
104 | "cell_type": "code",
105 | "execution_count": null,
106 | "metadata": {},
107 | "outputs": [],
108 | "source": []
109 | },
110 | {
111 | "cell_type": "code",
112 | "execution_count": null,
113 | "metadata": {},
114 | "outputs": [],
115 | "source": []
116 | },
117 | {
118 | "cell_type": "code",
119 | "execution_count": null,
120 | "metadata": {},
121 | "outputs": [],
122 | "source": []
123 | },
124 | {
125 | "cell_type": "code",
126 | "execution_count": null,
127 | "metadata": {},
128 | "outputs": [],
129 | "source": []
130 | },
131 | {
132 | "cell_type": "code",
133 | "execution_count": null,
134 | "metadata": {},
135 | "outputs": [],
136 | "source": []
137 | },
138 | {
139 | "cell_type": "code",
140 | "execution_count": null,
141 | "metadata": {},
142 | "outputs": [],
143 | "source": []
144 | }
145 | ],
146 | "metadata": {
147 | "kernelspec": {
148 | "display_name": "Python 3",
149 | "language": "python",
150 | "name": "python3"
151 | },
152 | "language_info": {
153 | "codemirror_mode": {
154 | "name": "ipython",
155 | "version": 3
156 | },
157 | "file_extension": ".py",
158 | "mimetype": "text/x-python",
159 | "name": "python",
160 | "nbconvert_exporter": "python",
161 | "pygments_lexer": "ipython3",
162 | "version": "3.7.4"
163 | }
164 | },
165 | "nbformat": 4,
166 | "nbformat_minor": 2
167 | }
168 |
--------------------------------------------------------------------------------
/image bluring using opencv python.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": 1,
6 | "metadata": {},
7 | "outputs": [
8 | {
9 | "name": "stdout",
10 | "output_type": "stream",
11 | "text": [
12 | "[[[0 0 0]\n",
13 | " [0 0 0]\n",
14 | " [0 0 0]\n",
15 | " ...\n",
16 | " [0 0 0]\n",
17 | " [0 0 0]\n",
18 | " [0 0 0]]\n",
19 | "\n",
20 | " [[0 0 0]\n",
21 | " [0 0 0]\n",
22 | " [0 0 0]\n",
23 | " ...\n",
24 | " [0 0 0]\n",
25 | " [0 0 0]\n",
26 | " [0 0 0]]\n",
27 | "\n",
28 | " [[0 0 0]\n",
29 | " [0 0 0]\n",
30 | " [0 0 0]\n",
31 | " ...\n",
32 | " [0 0 0]\n",
33 | " [0 0 0]\n",
34 | " [0 0 0]]\n",
35 | "\n",
36 | " ...\n",
37 | "\n",
38 | " [[0 0 0]\n",
39 | " [0 0 0]\n",
40 | " [0 0 0]\n",
41 | " ...\n",
42 | " [0 0 0]\n",
43 | " [0 0 0]\n",
44 | " [0 0 0]]\n",
45 | "\n",
46 | " [[0 0 0]\n",
47 | " [0 0 0]\n",
48 | " [0 0 0]\n",
49 | " ...\n",
50 | " [0 0 0]\n",
51 | " [0 0 0]\n",
52 | " [0 0 0]]\n",
53 | "\n",
54 | " [[0 0 0]\n",
55 | " [0 0 0]\n",
56 | " [0 0 0]\n",
57 | " ...\n",
58 | " [0 0 0]\n",
59 | " [0 0 0]\n",
60 | " [0 0 0]]]\n",
61 | "\n"
62 | ]
63 | }
64 | ],
65 | "source": [
66 | "#programming_fever\n",
67 | "#image bluring\n",
68 | "import cv2 \n",
69 | "import numpy as np \n",
70 | " \n",
71 | "imag = cv2.imread('E://OpenCV//programming_fever_.logo.jpg') \n",
72 | "image = cv2.resize(imag, (0, 0), fx =0.1, fy =0.1) \n",
73 | "\n",
74 | "blur_filter1 = np.ones((3, 3), np.float)/(9.0) \n",
75 | " \n",
76 | "blur_filter2 = np.ones((5, 5), np.float)/(25.0) \n",
77 | " \n",
78 | "blur_filter3 = np.ones((7, 7), np.float)/(49.0) \n",
79 | " \n",
80 | "image_blur1 = cv2.filter2D(image, -1, blur_filter1) \n",
81 | "image_blur2 = cv2.filter2D(image, -1, blur_filter2) \n",
82 | "image_blur3 = cv2.filter2D(image, -1, blur_filter3) \n",
83 | "print(image) \n",
84 | "print(type(image))\n",
85 | "cv2.imshow('programming_fever.logo.ORIGINAL', image) \n",
86 | "cv2.imshow('programming_fever.logo.BLUR1', image_blur1) \n",
87 | "cv2.imshow('programming_fever.logo.BLUR2', image_blur2) \n",
88 | "cv2.imshow('programming_fever.logo.BLUR3', image_blur3) \n",
89 | " \n",
90 | "cv2.waitKey(0) \n",
91 | "cv2.destroyAllWindows()"
92 | ]
93 | },
94 | {
95 | "cell_type": "code",
96 | "execution_count": null,
97 | "metadata": {},
98 | "outputs": [],
99 | "source": []
100 | }
101 | ],
102 | "metadata": {
103 | "kernelspec": {
104 | "display_name": "Python 3",
105 | "language": "python",
106 | "name": "python3"
107 | },
108 | "language_info": {
109 | "codemirror_mode": {
110 | "name": "ipython",
111 | "version": 3
112 | },
113 | "file_extension": ".py",
114 | "mimetype": "text/x-python",
115 | "name": "python",
116 | "nbconvert_exporter": "python",
117 | "pygments_lexer": "ipython3",
118 | "version": "3.7.4"
119 | }
120 | },
121 | "nbformat": 4,
122 | "nbformat_minor": 2
123 | }
124 |
--------------------------------------------------------------------------------
/image resizing using opencv.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": null,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "#programming_fever\n",
10 | "#image resizing\n",
11 | "import cv2 \n",
12 | "import numpy as np \n",
13 | "import matplotlib.pyplot as plt \n",
14 | "%matplotlib qt \n",
15 | " \n",
16 | "image = cv2.imread(\"E://OpenCV//programming_fever_.logo.jpg\", 1) \n",
17 | " \n",
18 | "half = cv2.resize(image, (0, 0), fx = 0.1, fy = 0.1) \n",
19 | "bigger = cv2.resize(image, (1050, 1610)) \n",
20 | " \n",
21 | "stretch_near = cv2.resize(image, (780, 540), \n",
22 | " interpolation = cv2.INTER_NEAREST) \n",
23 | " \n",
24 | "Titles =[\"Original\", \"Half\", \"Bigger\", \"Interpolation Nearest\"] \n",
25 | "images =[image, half, bigger, stretch_near] \n",
26 | "count = 4\n",
27 | " \n",
28 | "for i in range(count): \n",
29 | " plt.subplot(2, 2, i + 1) \n",
30 | " plt.title(Titles[i]) \n",
31 | " plt.imshow(images[i]) \n",
32 | "plt.show() "
33 | ]
34 | }
35 | ],
36 | "metadata": {
37 | "kernelspec": {
38 | "display_name": "Python 3",
39 | "language": "python",
40 | "name": "python3"
41 | },
42 | "language_info": {
43 | "codemirror_mode": {
44 | "name": "ipython",
45 | "version": 3
46 | },
47 | "file_extension": ".py",
48 | "mimetype": "text/x-python",
49 | "name": "python",
50 | "nbconvert_exporter": "python",
51 | "pygments_lexer": "ipython3",
52 | "version": "3.7.4"
53 | }
54 | },
55 | "nbformat": 4,
56 | "nbformat_minor": 2
57 | }
58 |
--------------------------------------------------------------------------------
/image segmentation.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# programming_fever"
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "image segmentation using OpenCV"
15 | ]
16 | },
17 | {
18 | "cell_type": "code",
19 | "execution_count": 24,
20 | "metadata": {},
21 | "outputs": [],
22 | "source": [
23 | "import cv2\n",
24 | "import numpy as np\n",
25 | "# Draw rectangle based on the input selection\n",
26 | "def draw_rectangle(event, x, y, flags, params):\n",
27 | " global x_init, y_init, drawing, top_left_pt, bottom_right_pt,img_orig\n",
28 | " # Detecting mouse button down event\n",
29 | " if event == cv2.EVENT_LBUTTONDOWN:\n",
30 | " drawing = True\n",
31 | " x_init, y_init = x, y\n",
32 | " # Detecting mouse movement\n",
33 | " elif event == cv2.EVENT_MOUSEMOVE:\n",
34 | " if drawing:\n",
35 | " top_left_pt, bottom_right_pt = (x_init,y_init), (x,y)\n",
36 | " img[y_init:y, x_init:x] = 255 - img_orig[y_init:y,\n",
37 | " x_init:x]\n",
38 | " cv2.rectangle(img, top_left_pt, bottom_right_pt,\n",
39 | " (0,255,0), 2)\n",
40 | " # Detecting mouse button up event\n",
41 | " elif event == cv2.EVENT_LBUTTONUP:\n",
42 | " drawing = False\n",
43 | " top_left_pt, bottom_right_pt = (x_init,y_init), (x,y)\n",
44 | " img[y_init:y, x_init:x] = 255 - img[y_init:y, x_init:x]\n",
45 | " cv2.rectangle(img, top_left_pt, bottom_right_pt,\n",
46 | " (0,255,0), 2)\n",
47 | " rect_final = (x_init, y_init, x-x_init, y-y_init)\n",
48 | " # Run Grabcut on the region of interest\n",
49 | " run_grabcut(img_orig, rect_final)\n",
50 | " # Grabcut algorithm\n",
51 | "def run_grabcut(img_orig, rect_final):\n",
52 | "# Initialize the mask\n",
53 | " mask = np.zeros(img_orig.shape[:2],np.uint8)\n",
54 | " # Extract the rectangle and set the region of\n",
55 | " # interest in the above mask\n",
56 | " x,y,w,h = rect_final\n",
57 | "\n",
58 | " mask[y:y+h, x:x+w] = 1\n",
59 | " # Initialize background and foreground models\n",
60 | " bgdModel = np.zeros((1,65), np.float64)\n",
61 | " fgdModel = np.zeros((1,65), np.float64)\n",
62 | " # Run Grabcut algorithm\n",
63 | " cv2.grabCut(img_orig, mask, rect_final, bgdModel, fgdModel, 5,\n",
64 | " cv2.GC_INIT_WITH_RECT)\n",
65 | " # Extract new mask\n",
66 | " mask2 = np.where((mask==2)|(mask==0),0,1).astype('uint8')\n",
67 | " # Apply the above mask to the image\n",
68 | " img_orig = img_orig*mask2[:,:,np.newaxis]\n",
69 | " # Display the image\n",
70 | " cv2.imshow('Output', img_orig)\n",
71 | "if __name__=='__main__':\n",
72 | " drawing = False\n",
73 | " top_left_pt, bottom_right_pt = (-1,-1), (-1,-1)\n",
74 | " # Read the input image\n",
75 | " img_orig = cv2.imread(\"D://OpenCV//sundarpichai.jpg\")\n",
76 | " img_orig = cv2.resize( img_orig ,(500,500))\n",
77 | " img = img_orig.copy()\n",
78 | " cv2.namedWindow('Input')\n",
79 | " cv2.setMouseCallback('Input', draw_rectangle)\n",
80 | " while True:\n",
81 | " cv2.imshow('Input', img)\n",
82 | " c = cv2.waitKey(1)\n",
83 | " if c == 27:\n",
84 | " break\n",
85 | " cv2.destroyAllWindows()"
86 | ]
87 | },
88 | {
89 | "cell_type": "code",
90 | "execution_count": null,
91 | "metadata": {},
92 | "outputs": [],
93 | "source": []
94 | },
95 | {
96 | "cell_type": "code",
97 | "execution_count": null,
98 | "metadata": {},
99 | "outputs": [],
100 | "source": []
101 | }
102 | ],
103 | "metadata": {
104 | "kernelspec": {
105 | "display_name": "Python 3",
106 | "language": "python",
107 | "name": "python3"
108 | },
109 | "language_info": {
110 | "codemirror_mode": {
111 | "name": "ipython",
112 | "version": 3
113 | },
114 | "file_extension": ".py",
115 | "mimetype": "text/x-python",
116 | "name": "python",
117 | "nbconvert_exporter": "python",
118 | "pygments_lexer": "ipython3",
119 | "version": "3.7.6"
120 | }
121 | },
122 | "nbformat": 4,
123 | "nbformat_minor": 4
124 | }
125 |
--------------------------------------------------------------------------------
/invisible cloak.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": null,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "#programming_fever\n",
10 | "#harry potter's invisibility cloak using OpenCV python\n",
11 | "import cv2\n",
12 | "import time\n",
13 | "import numpy as np\n",
14 | "## Preparation for writing the ouput video\n",
15 | "fourcc = cv2.VideoWriter_fourcc(*'XVID')\n",
16 | "out = cv2.VideoWriter('output.avi', fourcc, 20.0, (640, 480))\n",
17 | "##reading from the webcam\n",
18 | "cap = cv2.VideoCapture(0)\n",
19 | "## Allow the system to sleep for 3 seconds before the webcam starts\n",
20 | "time.sleep(3)\n",
21 | "count = 0\n",
22 | "background = 0\n",
23 | "## Capture the background in range of 60\n",
24 | "for i in range(60):\n",
25 | " ret, background = cap.read()\n",
26 | "background = np.flip(background, axis=1)\n",
27 | "## Read every frame from the webcam, until the camera is open\n",
28 | "while (cap.isOpened()):\n",
29 | " ret, img = cap.read()\n",
30 | " if not ret:\n",
31 | " break\n",
32 | " count += 1\n",
33 | " img = np.flip(img, axis=1)\n",
34 | " ## Convert the color space from BGR to HSV\n",
35 | " hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)\n",
36 | " ## Generat masks to detect red color\n",
37 | " ##YOU CAN CHANGE THE COLOR VALUE BELOW ACCORDING TO YOUR CLOTH COLOR\n",
38 | " lower_red = np.array([0, 120, 70])\n",
39 | " upper_red = np.array([10, 255,255])\n",
40 | " mask1 = cv2.inRange(hsv, lower_red, upper_red)\n",
41 | " lower_red = np.array([170, 120, 70])\n",
42 | " upper_red = np.array([180, 255, 255])\n",
43 | " mask2 = cv2.inRange(hsv, lower_red, upper_red)\n",
44 | " mask1 = mask1 + mask2\n",
45 | " ## Open and Dilate the mask image\n",
46 | " mask1 = cv2.morphologyEx(mask1, cv2.MORPH_OPEN, np.ones((3, 3), np.uint8))\n",
47 | " mask1 = cv2.morphologyEx(mask1, cv2.MORPH_DILATE, np.ones((3, 3), np.uint8))\n",
48 | " ## Create an inverted mask to segment out the red color from the frame\n",
49 | " mask2 = cv2.bitwise_not(mask1)\n",
50 | " ## Segment the red color part out of the frame using bitwise and with the inverted mask\n",
51 | " res1 = cv2.bitwise_and(img, img, mask=mask2)\n",
52 | " ## Create image showing static background frame pixels only for the masked region\n",
53 | " res2 = cv2.bitwise_and(background, background, mask=mask1)\n",
54 | " ## Generating the final output and writing\n",
55 | " finalOutput = cv2.addWeighted(res1, 1, res2, 1, 0)\n",
56 | " out.write(finalOutput)\n",
57 | " cv2.imshow(\"magic\", finalOutput)\n",
58 | " cv2.waitKey(1)\n",
59 | "cap.release()\n",
60 | "out.release()\n",
61 | "cv2.destroyAllWindows()\n"
62 | ]
63 | },
64 | {
65 | "cell_type": "code",
66 | "execution_count": null,
67 | "metadata": {},
68 | "outputs": [],
69 | "source": []
70 | }
71 | ],
72 | "metadata": {
73 | "kernelspec": {
74 | "display_name": "Python 3",
75 | "language": "python",
76 | "name": "python3"
77 | },
78 | "language_info": {
79 | "codemirror_mode": {
80 | "name": "ipython",
81 | "version": 3
82 | },
83 | "file_extension": ".py",
84 | "mimetype": "text/x-python",
85 | "name": "python",
86 | "nbconvert_exporter": "python",
87 | "pygments_lexer": "ipython3",
88 | "version": "3.7.6"
89 | }
90 | },
91 | "nbformat": 4,
92 | "nbformat_minor": 4
93 | }
94 |
--------------------------------------------------------------------------------
/motion blurring effect .ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": null,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "#programming_fever\n",
10 | "#applying motion blur filter\n",
11 | "import cv2\n",
12 | "import numpy as np\n",
13 | "img = cv2.imread('input.jpg')\n",
14 | "cv2.imshow('Original', img)\n",
15 | "size = 15\n",
16 | "\n",
17 | "kernel_motion_blur = np.zeros((size, size))\n",
18 | "kernel_motion_blur[int((size-1)/2), :] = np.ones(size)\n",
19 | "kernel_motion_blur = kernel_motion_blur / size\n",
20 | "\n",
21 | "output = cv2.filter2D(img, -1, kernel_motion_blur)\n",
22 | "cv2.imshow('Motion Blur', output)\n",
23 | "cv2.waitKey(0)"
24 | ]
25 | }
26 | ],
27 | "metadata": {
28 | "kernelspec": {
29 | "display_name": "Python 3",
30 | "language": "python",
31 | "name": "python3"
32 | },
33 | "language_info": {
34 | "codemirror_mode": {
35 | "name": "ipython",
36 | "version": 3
37 | },
38 | "file_extension": ".py",
39 | "mimetype": "text/x-python",
40 | "name": "python",
41 | "nbconvert_exporter": "python",
42 | "pygments_lexer": "ipython3",
43 | "version": "3.7.4"
44 | }
45 | },
46 | "nbformat": 4,
47 | "nbformat_minor": 2
48 | }
49 |
--------------------------------------------------------------------------------
/negative flim.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": 1,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "#PROGRAMMING_FEVER\n",
10 | "#pravee\n",
11 | "import cv2\n",
12 | "import numpy as np\n",
13 | "def draw_rectangle(event, x, y, flags, params):\n",
14 | " global x_init, y_init, drawing, top_left_pt, bottom_right_pt\n",
15 | " if event == cv2.EVENT_LBUTTONDOWN:\n",
16 | " drawing = True\n",
17 | " x_init, y_init = x, y\n",
18 | " elif event == cv2.EVENT_MOUSEMOVE:\n",
19 | " if drawing:\n",
20 | " top_left_pt = (min(x_init, x), min(y_init, y))\n",
21 | " bottom_right_pt = (max(x_init, x), max(y_init, y))\n",
22 | " img[y_init:y, x_init:x] = 255 - img[y_init:y, x_init:x]\n",
23 | " elif event == cv2.EVENT_LBUTTONUP:\n",
24 | " drawing = False\n",
25 | " top_left_pt = (min(x_init, x), min(y_init, y))\n",
26 | " bottom_right_pt = (max(x_init, x), max(y_init, y))\n",
27 | " img[y_init:y, x_init:x] = 255 - img[y_init:y, x_init:x]\n",
28 | "if __name__=='__main__':\n",
29 | " drawing = False\n",
30 | " top_left_pt, bottom_right_pt = (-1,-1), (-1,-1)\n",
31 | " cap = cv2.VideoCapture(0)\n",
32 | " if not cap.isOpened():\n",
33 | " raise IOError(\"Cannot open webcam\")\n",
34 | " cv2.namedWindow('Webcam')\n",
35 | " cv2.setMouseCallback('Webcam', draw_rectangle)\n",
36 | " while True:\n",
37 | " ret, frame = cap.read()\n",
38 | " img = cv2.resize(frame, None, fx=0.5, fy=0.5,interpolation=cv2.INTER_AREA)\n",
39 | " (x0,y0), (x1,y1) = top_left_pt, bottom_right_pt\n",
40 | " img[y0:y1, x0:x1] = 255 - img[y0:y1, x0:x1]\n",
41 | " cv2.imshow('Webcam', img)\n",
42 | " c = cv2.waitKey(1)\n",
43 | " if c == 27:\n",
44 | " break\n",
45 | "cap.release()\n",
46 | "cv2.destroyAllWindows()"
47 | ]
48 | },
49 | {
50 | "cell_type": "code",
51 | "execution_count": null,
52 | "metadata": {},
53 | "outputs": [],
54 | "source": []
55 | }
56 | ],
57 | "metadata": {
58 | "kernelspec": {
59 | "display_name": "Python 3",
60 | "language": "python",
61 | "name": "python3"
62 | },
63 | "language_info": {
64 | "codemirror_mode": {
65 | "name": "ipython",
66 | "version": 3
67 | },
68 | "file_extension": ".py",
69 | "mimetype": "text/x-python",
70 | "name": "python",
71 | "nbconvert_exporter": "python",
72 | "pygments_lexer": "ipython3",
73 | "version": "3.7.4"
74 | }
75 | },
76 | "nbformat": 4,
77 | "nbformat_minor": 2
78 | }
79 |
--------------------------------------------------------------------------------
/non-photorealistic rendering .ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": null,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "#programming_fever\n",
10 | "#non-photorealistic rendering\n",
11 | "#using cv2.edgePreservingFilter()\n",
12 | "import cv2\n",
13 | "img = cv2.imread(\"E://OpenCV//labrador.jpg\")\n",
14 | "img=cv2.resize(img,(450,500))\n",
15 | "img1 = cv2.edgePreservingFilter(img,\n",
16 | " flags=cv2.RECURS_FILTER, sigma_s=60, sigma_r=0.5)\n",
17 | "img2 = cv2.edgePreservingFilter(img,\n",
18 | " flags=cv2.NORMCONV_FILTER, sigma_s=100, sigma_r=0.4)\n",
19 | "cv2.imshow('sourceimg', img)\n",
20 | "cv2.imshow('edgepreserving1', img1)\n",
21 | "cv2.imshow('edgepreserving2', img2)\n",
22 | "cv2.waitKey() \n",
23 | "cv2.destroyAllWindows() "
24 | ]
25 | },
26 | {
27 | "cell_type": "code",
28 | "execution_count": null,
29 | "metadata": {},
30 | "outputs": [],
31 | "source": [
32 | "#programming_fever\n",
33 | "#non-photorealistic rendering\n",
34 | "#using cv2.DetailEnhance()\n",
35 | "import cv2\n",
36 | "img = cv2.imread(\"E://OpenCV//cow.jpg\")\n",
37 | "img=cv2.resize(img,(500,500))\n",
38 | "dst = cv2.detailEnhance(img, sigma_s=200, sigma_r=0.1)\n",
39 | "cv2.imshow('sourceimg', img)\n",
40 | "cv2.imshow('detail enhanaced',dst)\n",
41 | "cv2.waitKey() \n",
42 | "cv2.destroyAllWindows() "
43 | ]
44 | },
45 | {
46 | "cell_type": "code",
47 | "execution_count": null,
48 | "metadata": {},
49 | "outputs": [],
50 | "source": [
51 | "#programming_fever\n",
52 | "#non-photorealistic rendering\n",
53 | "#using cv2.pencilSketch()\n",
54 | "import cv2\n",
55 | "img = cv2.imread(\"E://OpenCV//gold.jpg\")\n",
56 | "img=cv2.resize(img,(450,500))\n",
57 | "img1, img2 = cv2.pencilSketch(img, \n",
58 | " sigma_s=200, sigma_r=0.1, shade_factor=0.3)\n",
59 | "cv2.imshow('sourceimg', img)\n",
60 | "cv2.imshow('graysketch', img1)\n",
61 | "cv2.imshow('colorsketch', img2)\n",
62 | "cv2.waitKey() \n",
63 | "cv2.destroyAllWindows() "
64 | ]
65 | },
66 | {
67 | "cell_type": "code",
68 | "execution_count": null,
69 | "metadata": {},
70 | "outputs": [],
71 | "source": [
72 | "#programming_fever\n",
73 | "#non-photorealistic rendering\n",
74 | "#using cv2.stylization()\n",
75 | "import cv2\n",
76 | "img = cv2.imread(\"E://OpenCV//gold.jpg\")\n",
77 | "img=cv2.resize(img,(600,600))\n",
78 | "dst = cv2.stylization(img, sigma_s=200,sigma_r=0.45)\n",
79 | "gst=cv2.resize(img,(600,600))\n",
80 | "cv2.imshow('sourceimg', img)\n",
81 | "cv2.imshow('stylization', dst)\n",
82 | "cv2.waitKey() \n",
83 | "cv2.destroyAllWindows() "
84 | ]
85 | }
86 | ],
87 | "metadata": {
88 | "kernelspec": {
89 | "display_name": "Python 3",
90 | "language": "python",
91 | "name": "python3"
92 | },
93 | "language_info": {
94 | "codemirror_mode": {
95 | "name": "ipython",
96 | "version": 3
97 | },
98 | "file_extension": ".py",
99 | "mimetype": "text/x-python",
100 | "name": "python",
101 | "nbconvert_exporter": "python",
102 | "pygments_lexer": "ipython3",
103 | "version": "3.7.4"
104 | }
105 | },
106 | "nbformat": 4,
107 | "nbformat_minor": 2
108 | }
109 |
--------------------------------------------------------------------------------
/number plate detection.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": null,
6 | "metadata": {},
7 | "outputs": [
8 | {
9 | "name": "stdout",
10 | "output_type": "stream",
11 | "text": [
12 | "Number of Contours found : 10\n",
13 | "[[[396 134]]\n",
14 | "\n",
15 | " [[270 139]]\n",
16 | "\n",
17 | " [[270 173]]\n",
18 | "\n",
19 | " [[395 167]]]\n"
20 | ]
21 | }
22 | ],
23 | "source": [
24 | "#programming_fever\n",
25 | "#number plate detection\n",
26 | "import cv2\n",
27 | "import imutils as im\n",
28 | "\n",
29 | "input = 'E://OpenCV//car1.jpg'\n",
30 | "image = cv2.imread(input)\n",
31 | "\n",
32 | "newwidth = 500\n",
33 | "image = im.resize(image, width=newwidth)\n",
34 | "\n",
35 | "gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)\n",
36 | "\n",
37 | "d, sigmaColor, sigmaSpace = 11,17,17\n",
38 | "filtered_img = cv2.bilateralFilter(gray, d, sigmaColor, sigmaSpace)\n",
39 | "\n",
40 | "lower, upper = 170, 200\n",
41 | "edged = cv2.Canny(filtered_img, lower, upper)\n",
42 | "\n",
43 | "\n",
44 | "cnts,hir = cv2.findContours(edged.copy(), cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)\n",
45 | "\n",
46 | "cnts=sorted(cnts, key = cv2.contourArea, reverse = True)[:10]\n",
47 | "NumberPlateCnt = None\n",
48 | "print(\"Number of Contours found : \" + str(len(cnts)))\n",
49 | "\n",
50 | "count = 0\n",
51 | "for c in cnts:\n",
52 | " peri = cv2.arcLength(c, True)\n",
53 | " epsilon = 0.01 * peri\n",
54 | " approx = cv2.approxPolyDP(c, epsilon, True)\n",
55 | " if len(approx) == 4: \n",
56 | " print(approx)\n",
57 | " NumberPlateCnt = approx \n",
58 | " break\n",
59 | "\n",
60 | "\n",
61 | "cv2.imshow(\"Input Image\", image)\n",
62 | "cv2.imshow(\"Gray scale Image\", gray)\n",
63 | "cv2.imshow(\"After Applying Bilateral Filter\", filtered_img)\n",
64 | "cv2.imshow(\"After Canny Edges\", edged)\n",
65 | "\n",
66 | "cv2.drawContours(image, [NumberPlateCnt], -1, (255,0,0), 2)\n",
67 | "cv2.imshow(\"Output\", image)\n",
68 | "\n",
69 | "cv2.waitKey(0) "
70 | ]
71 | },
72 | {
73 | "cell_type": "code",
74 | "execution_count": null,
75 | "metadata": {},
76 | "outputs": [],
77 | "source": []
78 | }
79 | ],
80 | "metadata": {
81 | "kernelspec": {
82 | "display_name": "Python 3",
83 | "language": "python",
84 | "name": "python3"
85 | },
86 | "language_info": {
87 | "codemirror_mode": {
88 | "name": "ipython",
89 | "version": 3
90 | },
91 | "file_extension": ".py",
92 | "mimetype": "text/x-python",
93 | "name": "python",
94 | "nbconvert_exporter": "python",
95 | "pygments_lexer": "ipython3",
96 | "version": "3.7.4"
97 | }
98 | },
99 | "nbformat": 4,
100 | "nbformat_minor": 2
101 | }
102 |
--------------------------------------------------------------------------------
/object tracking using OpenCV.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": 1,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "#programming_fever\n",
10 | "#objectTracking\n",
11 | "#in this code I tried to extract blue color object\n",
12 | "import cv2 \n",
13 | "import numpy as np \n",
14 | "cap = cv2.VideoCapture(0) \n",
15 | "while(1): \n",
16 | " _,frame = cap.read() \n",
17 | " hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV) \n",
18 | " lower_blue = np.array([110, 50, 50]) \n",
19 | " upper_blue = np.array([130, 255, 255]) \n",
20 | " mask = cv2.inRange(hsv, lower_blue, upper_blue) \n",
21 | " result = cv2.bitwise_and(frame, frame, mask = mask) \n",
22 | " cv2.imshow('frame', frame) \n",
23 | " cv2.imshow('mask', mask) \n",
24 | " cv2.imshow('result', result) \n",
25 | " k= cv2.waitKey(1)& 0XFF\n",
26 | " if k==27:\n",
27 | " break\n",
28 | "cv2.destroyAllWindows() \n",
29 | "cap.release() "
30 | ]
31 | },
32 | {
33 | "cell_type": "code",
34 | "execution_count": null,
35 | "metadata": {},
36 | "outputs": [],
37 | "source": []
38 | }
39 | ],
40 | "metadata": {
41 | "kernelspec": {
42 | "display_name": "Python 3",
43 | "language": "python",
44 | "name": "python3"
45 | },
46 | "language_info": {
47 | "codemirror_mode": {
48 | "name": "ipython",
49 | "version": 3
50 | },
51 | "file_extension": ".py",
52 | "mimetype": "text/x-python",
53 | "name": "python",
54 | "nbconvert_exporter": "python",
55 | "pygments_lexer": "ipython3",
56 | "version": "3.7.4"
57 | }
58 | },
59 | "nbformat": 4,
60 | "nbformat_minor": 2
61 | }
62 |
--------------------------------------------------------------------------------
/pencil drawing effect.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": 6,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "#programming_fever\n",
10 | "#pencil drawing effect using opencv\n",
11 | "import numpy as np\n",
12 | "import cv2\n",
13 | "\n",
14 | "img =\"E://OpenCV//elonobama.jpg\"\n",
15 | "img_obj = cv2.imread(img)\n",
16 | "\n",
17 | "\n",
18 | "\n",
19 | "dim = (width,height)\n",
20 | "resized = cv2.resize(img_obj,dim,interpolation = cv2.INTER_AREA) \n",
21 | "\n",
22 | "kernel_sharpening = np.array([[-1,-1,-1], \n",
23 | " [-1, 9,-1],\n",
24 | " [-1,-1,-1]])\n",
25 | "sharpened = cv2.filter2D(resized,-1,kernel_sharpening) \n",
26 | "\n",
27 | "\n",
28 | "gray = cv2.cvtColor(sharpened , cv2.COLOR_BGR2GRAY) \n",
29 | "object_detection = cv2.cvtColor(sharpened, cv2.COLOR_BGR2HSV ) \n",
30 | "\n",
31 | "\n",
32 | "inv = 255-gray\n",
33 | "gauss = cv2.GaussianBlur(inv,ksize=(15,15),sigmaX=0,sigmaY=0) \n",
34 | "\n",
35 | "pencil = cv2.divide(gray,255-gauss,scale=256)\n",
36 | "\n",
37 | "cv2.imshow('resized',resized)\n",
38 | "cv2.imshow('sharp',sharpened)\n",
39 | "cv2.imshow(\"gray\", gray)\n",
40 | "cv2.imshow('pencil drawing',pencil)\n",
41 | "cv2.waitKey(0)\n",
42 | "cv2.destroyAllWindows()"
43 | ]
44 | },
45 | {
46 | "cell_type": "code",
47 | "execution_count": null,
48 | "metadata": {},
49 | "outputs": [],
50 | "source": []
51 | }
52 | ],
53 | "metadata": {
54 | "kernelspec": {
55 | "display_name": "Python 3",
56 | "language": "python",
57 | "name": "python3"
58 | },
59 | "language_info": {
60 | "codemirror_mode": {
61 | "name": "ipython",
62 | "version": 3
63 | },
64 | "file_extension": ".py",
65 | "mimetype": "text/x-python",
66 | "name": "python",
67 | "nbconvert_exporter": "python",
68 | "pygments_lexer": "ipython3",
69 | "version": "3.7.4"
70 | }
71 | },
72 | "nbformat": 4,
73 | "nbformat_minor": 2
74 | }
75 |
--------------------------------------------------------------------------------
/reversing video using opencv.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": null,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "#programming_fever\n",
10 | "#play video in reverse mode using OpenCV python\n",
11 | "import cv2 \n",
12 | "cap = cv2.VideoCapture(\"E://OpenCV//video 2 img//BMW M4.mp4\") \n",
13 | "check , vid = cap.read()\n",
14 | "counter = 0\n",
15 | "check = True \n",
16 | "frame_list = [] \n",
17 | "while(check == True): \n",
18 | " cv2.imwrite(\"frame%d.jpg\" %counter , vid) \n",
19 | " check , vid = cap.read() \n",
20 | " frame_list.append(vid) \n",
21 | " counter += 1\n",
22 | "frame_list.pop() \n",
23 | "frame_list.reverse() \n",
24 | "for frame in frame_list: \n",
25 | " cv2.imshow(\"Frame\" , frame) \n",
26 | " if cv2.waitKey(25) and 0xFF == ord(\"q\"): \n",
27 | " break\n",
28 | "cap.release() \n",
29 | "cv2.destroyAllWindows()"
30 | ]
31 | }
32 | ],
33 | "metadata": {
34 | "kernelspec": {
35 | "display_name": "Python 3",
36 | "language": "python",
37 | "name": "python3"
38 | },
39 | "language_info": {
40 | "codemirror_mode": {
41 | "name": "ipython",
42 | "version": 3
43 | },
44 | "file_extension": ".py",
45 | "mimetype": "text/x-python",
46 | "name": "python",
47 | "nbconvert_exporter": "python",
48 | "pygments_lexer": "ipython3",
49 | "version": "3.7.4"
50 | }
51 | },
52 | "nbformat": 4,
53 | "nbformat_minor": 4
54 | }
55 |
--------------------------------------------------------------------------------
/sharpening of images using opencv.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": 1,
6 | "metadata": {},
7 | "outputs": [
8 | {
9 | "data": {
10 | "text/plain": [
11 | ""
12 | ]
13 | },
14 | "metadata": {},
15 | "output_type": "display_data"
16 | }
17 | ],
18 | "source": [
19 | "#programming_fever\n",
20 | "#sharepenning of images using OpenCV\n",
21 | "import cv2\n",
22 | "import numpy as np\n",
23 | "import matplotlib.pyplot as plt\n",
24 | "img = cv2.imread('E://OpenCV//bmw.png')\n",
25 | "img=cv2.resize(img,(300,300))\n",
26 | "cv2.imshow('Original', img)\n",
27 | "\n",
28 | "kernel_sharpen_1 = np.array([[-1,-1,-1], [-1,9,-1], [-1,-1,-1]])\n",
29 | "kernel_sharpen_2 = np.array([[1,1,1], [1,-7,1], [1,1,1]])\n",
30 | "kernel_sharpen_3 = np.array([[-1,-1,-1,-1,-1],\n",
31 | " [-1,3,3,3,-1],\n",
32 | " [-1,3,8,3,-1],\n",
33 | " [-1,3,3,3,-1],\n",
34 | " [-1,-1,-1,-1,-1]]) / 25.0\n",
35 | "\n",
36 | "output_1 = cv2.filter2D(img, -1, kernel_sharpen_1)\n",
37 | "output_2 = cv2.filter2D(img, -1, kernel_sharpen_2)\n",
38 | "output_3 = cv2.filter2D(img, -1, kernel_sharpen_3)\n",
39 | "\n",
40 | "cv2.imshow('Sharpening', output_1)\n",
41 | "cv2.imshow('Excessive Sharpening', output_2)\n",
42 | "cv2.imshow('Edge Enhancement', output_3)\n",
43 | "cv2.waitKey(0)\n",
44 | "cv2.destroyAllWindows()"
45 | ]
46 | },
47 | {
48 | "cell_type": "code",
49 | "execution_count": null,
50 | "metadata": {},
51 | "outputs": [],
52 | "source": []
53 | }
54 | ],
55 | "metadata": {
56 | "kernelspec": {
57 | "display_name": "Python 3",
58 | "language": "python",
59 | "name": "python3"
60 | },
61 | "language_info": {
62 | "codemirror_mode": {
63 | "name": "ipython",
64 | "version": 3
65 | },
66 | "file_extension": ".py",
67 | "mimetype": "text/x-python",
68 | "name": "python",
69 | "nbconvert_exporter": "python",
70 | "pygments_lexer": "ipython3",
71 | "version": "3.7.4"
72 | }
73 | },
74 | "nbformat": 4,
75 | "nbformat_minor": 2
76 | }
77 |
--------------------------------------------------------------------------------
/thresholding techniques.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": null,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "#programming_fever\n",
10 | "import cv2 \n",
11 | "import numpy as np \n",
12 | "\n",
13 | "img = cv2.imread('E://OpenCV//bentley.png',0) \n",
14 | "cv2.imshow('original image',img) \n",
15 | "\n",
16 | "ret, thresh1 = cv2.threshold(img, 120, 255, cv2.THRESH_BINARY) \n",
17 | "ret, thresh2 = cv2.threshold(img, 120, 255, cv2.THRESH_BINARY_INV) \n",
18 | "ret, thresh3 = cv2.threshold(img, 120, 255, cv2.THRESH_TRUNC) \n",
19 | "ret, thresh4 = cv2.threshold(img, 120, 255, cv2.THRESH_TOZERO) \n",
20 | "ret, thresh5 = cv2.threshold(img, 120, 255, cv2.THRESH_TOZERO_INV) \n",
21 | " \n",
22 | "cv2.imshow('Binary Threshold', thresh1) \n",
23 | "cv2.imshow('Binary Threshold Inverted', thresh2) \n",
24 | "cv2.imshow('Truncated Threshold', thresh3) \n",
25 | "cv2.imshow('Set to zero', thresh4) \n",
26 | "cv2.imshow('Set to zero Inverted', thresh5) \n",
27 | " \n",
28 | "if cv2.waitKey(0) & 0xff == 27: \n",
29 | " cv2.destroyAllWindows() "
30 | ]
31 | }
32 | ],
33 | "metadata": {
34 | "kernelspec": {
35 | "display_name": "Python 3",
36 | "language": "python",
37 | "name": "python3"
38 | },
39 | "language_info": {
40 | "codemirror_mode": {
41 | "name": "ipython",
42 | "version": 3
43 | },
44 | "file_extension": ".py",
45 | "mimetype": "text/x-python",
46 | "name": "python",
47 | "nbconvert_exporter": "python",
48 | "pygments_lexer": "ipython3",
49 | "version": "3.7.4"
50 | }
51 | },
52 | "nbformat": 4,
53 | "nbformat_minor": 2
54 | }
55 |
--------------------------------------------------------------------------------