Skip to content

Commit

Permalink
common notebook updates for v3.0 (#1390)
Browse files Browse the repository at this point in the history
* getting rid of remaining freebuffer() calls

* added extra check to zynq_clocks notebook to avoid error

* updated overlay_download notebook to showcase raw bitstream download and Overlay class with caching

* suppress opencv warning on display_port intro notebook

* update overlay_download notebook to reflect BaseOverlay paths/performance
  • Loading branch information
skalade authored Oct 3, 2022
1 parent 16e40cc commit c7a519f
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 46 deletions.
12 changes: 6 additions & 6 deletions boards/Pynq-Z1/base/notebooks/video/hdmi_introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
"for _ in range(numframes):\n",
" inframe = hdmi_in.readframe()\n",
" cv2.cvtColor(inframe,cv2.COLOR_BGR2GRAY,dst=grayscale)\n",
" inframe.freebuffer()\n",
" # inframe.freebuffer()\n",
" cv2.Laplacian(grayscale, cv2.CV_8U, dst=result)\n",
"\n",
" outframe = hdmi_out.newframe()\n",
Expand Down Expand Up @@ -287,7 +287,7 @@
"for _ in range(numframes):\n",
" inframe = hdmi_in.readframe()\n",
" cv2.cvtColor(inframe,cv2.COLOR_BGR2GRAY,dst=grayscale)\n",
" inframe.freebuffer()\n",
" # inframe.freebuffer()\n",
" cv2.Laplacian(grayscale, cv2.CV_8U, dst=result)\n",
"\n",
" outframe = hdmi_out.newframe()\n",
Expand Down Expand Up @@ -365,7 +365,7 @@
" inframe = hdmi_in.readframe()\n",
" outframe = hdmi_out.newframe()\n",
" cv2.Laplacian(inframe, cv2.CV_8U, dst=outframe)\n",
" inframe.freebuffer()\n",
" # inframe.freebuffer()\n",
" hdmi_out.writeframe(outframe)\n",
" \n",
"end = time.time()\n",
Expand Down Expand Up @@ -527,7 +527,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -541,9 +541,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.0"
"version": "3.10.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -101,6 +104,8 @@
}
],
"source": [
"import os\n",
"os.environ[\"OPENCV_LOG_LEVEL\"]=\"SILENT\"\n",
"import cv2\n",
"\n",
"capture = cv2.VideoCapture(0)\n",
Expand Down Expand Up @@ -163,7 +168,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -177,9 +182,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.10.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
Loading

0 comments on commit c7a519f

Please sign in to comment.