Skip to content

Commit 373d57e

Browse files
committed
opencv
1 parent 0fa5840 commit 373d57e

File tree

3 files changed

+11
-23
lines changed

3 files changed

+11
-23
lines changed

image_proc01.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
},
8282
{
8383
"cell_type": "code",
84-
"execution_count": 1,
84+
"execution_count": 17,
8585
"metadata": {},
8686
"outputs": [
8787
{
@@ -569,14 +569,14 @@
569569
},
570570
{
571571
"cell_type": "code",
572-
"execution_count": 15,
572+
"execution_count": 18,
573573
"metadata": {},
574574
"outputs": [
575575
{
576576
"name": "stdout",
577577
"output_type": "stream",
578578
"text": [
579-
"hsv -> 120 0 97\n"
579+
"hsv -> 104 114 112\n"
580580
]
581581
}
582582
],
@@ -631,7 +631,7 @@
631631
},
632632
{
633633
"cell_type": "code",
634-
"execution_count": 16,
634+
"execution_count": 19,
635635
"metadata": {},
636636
"outputs": [
637637
{

image_proc02.ipynb

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
{
2222
"cell_type": "code",
23-
"execution_count": 2,
23+
"execution_count": 4,
2424
"metadata": {},
2525
"outputs": [
2626
{
@@ -131,21 +131,9 @@
131131
},
132132
{
133133
"cell_type": "code",
134-
"execution_count": 1,
134+
"execution_count": 5,
135135
"metadata": {},
136-
"outputs": [
137-
{
138-
"ename": "NameError",
139-
"evalue": "name 'cv2' is not defined",
140-
"output_type": "error",
141-
"traceback": [
142-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
143-
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
144-
"\u001b[0;32m/tmp/ipykernel_258104/4170100247.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mcap\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcv2\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mVideoCapture\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mmin_area\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m100\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0;36m100\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32mwhile\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcap\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misOpened\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0m_\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mframe\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcap\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
145-
"\u001b[0;31mNameError\u001b[0m: name 'cv2' is not defined"
146-
]
147-
}
148-
],
136+
"outputs": [],
149137
"source": [
150138
"cap = cv2.VideoCapture(0)\n",
151139
"min_area = 100*100\n",
@@ -154,7 +142,7 @@
154142
" _,frame = cap.read()\n",
155143
" hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)\n",
156144
" \n",
157-
" upper = np.array([54,134,93])\n",
145+
" upper = np.array([104,114,112])\n",
158146
" lower = np.array([255,255,255])\n",
159147
" \n",
160148
" mask = cv2.inRange(hsv, upper, lower)\n",
@@ -198,7 +186,7 @@
198186
"metadata": {},
199187
"source": [
200188
"### Future Workshops\n",
201-
"We at ***s*** have a strong belief in sharing information and keep learning, adopting, and adapting to newer and advanced concepts. In the future we are working on a new project for you which is solely on further image processing and machine learning. We are glad that you attended this workshop and we hope that you have learnt something from our team.\n",
189+
"We at ***Sciengit (Ejaarat)*** have a strong belief in sharing information and keep learning, adopting, and adapting to newer and advanced concepts. In the future we are working on a new project for you which is solely on further image processing and machine learning. We are glad that you attended this workshop and we hope that you have learnt something from our team.\n",
202190
"\n",
203191
"### The End\n",
204192
"<img src=\"data/theend.gif\" width=\"800\">"

image_proc03.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
"print(im_cx,im_cy)\n",
193193
"# Contour Finding\n",
194194
"hsv = cv2.cvtColor(im, cv2.COLOR_BGR2HSV)\n",
195-
"upper = np.array([100,128,48])\n",
195+
"upper = np.array([104,114,112])\n",
196196
"lower = np.array([255,255,255])\n",
197197
"\n",
198198
"mask = cv2.inRange(hsv, upper, lower)\n",
@@ -292,7 +292,7 @@
292292
"\n",
293293
" hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)\n",
294294
"\n",
295-
" upper = np.array([100,128,48])\n",
295+
" upper = np.array([104,114,112])\n",
296296
" lower = np.array([255,255,255])\n",
297297
"\n",
298298
" mask = cv2.inRange(hsv, upper, lower)\n",

0 commit comments

Comments
 (0)