Skip to content

Commit

Permalink
docs: use another picture for the "Image Processing" tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-reimann committed Jul 12, 2023
1 parent f515c39 commit e80d993
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
Binary file removed docs/tutorials/data/boy.png
Binary file not shown.
Binary file added docs/tutorials/data/plane.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 17 additions & 17 deletions docs/tutorials/image_processing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@
"source": [
"from safeds.data.image.containers import Image\n",
"\n",
"boy = Image.from_png_file(\"data/boy.png\")\n",
"boy"
"plane = Image.from_png_file(\"data/plane.png\")\n",
"plane"
]
},
{
"cell_type": "markdown",
"source": [
"## Process the image\n",
"\n",
"1. Resize the `Image` to have the width 300 and height 250:"
"1. Resize the `Image` to have the width 284 and height 160:"
],
"metadata": {
"collapsed": false
Expand All @@ -52,7 +52,7 @@
"metadata": {},
"outputs": [],
"source": [
"boy.resize(200,170)"
"plane.resize(284, 160)"
]
},
{
Expand All @@ -69,7 +69,7 @@
"execution_count": null,
"outputs": [],
"source": [
"boy.convert_to_grayscale()\n"
"plane.convert_to_grayscale()\n"
],
"metadata": {
"collapsed": false
Expand All @@ -78,7 +78,7 @@
{
"cell_type": "markdown",
"source": [
"3. Crop the `Image` to be 200x200 with the top-left corner being at (250, 130):"
"3. Crop the `Image` to be 200x200 with the top-left corner being at (255, 30):"
],
"metadata": {
"collapsed": false
Expand All @@ -89,7 +89,7 @@
"execution_count": null,
"outputs": [],
"source": [
"boy.crop(250, 130, 200, 200)\n"
"plane.crop(x=255, y=30, width=200, height=200)\n"
],
"metadata": {
"collapsed": false
Expand All @@ -109,7 +109,7 @@
"execution_count": null,
"outputs": [],
"source": [
"boy.flip_horizontally()\n"
"plane.flip_horizontally()\n"
],
"metadata": {
"collapsed": false
Expand All @@ -131,7 +131,7 @@
"execution_count": null,
"outputs": [],
"source": [
"boy.adjust_brightness(1.5)\n"
"plane.adjust_brightness(1.5)\n"
],
"metadata": {
"collapsed": false
Expand All @@ -153,7 +153,7 @@
"execution_count": null,
"outputs": [],
"source": [
"boy.adjust_contrast(1.5)\n"
"plane.adjust_contrast(1.5)\n"
],
"metadata": {
"collapsed": false
Expand All @@ -175,7 +175,7 @@
"execution_count": null,
"outputs": [],
"source": [
"boy.adjust_color_balance(0.5)"
"plane.adjust_color_balance(0.5)"
],
"metadata": {
"collapsed": false
Expand All @@ -198,7 +198,7 @@
"execution_count": null,
"outputs": [],
"source": [
"boy.blur(5)\n"
"plane.blur(5)\n"
],
"metadata": {
"collapsed": false
Expand All @@ -220,7 +220,7 @@
"execution_count": null,
"outputs": [],
"source": [
"boy.sharpen(5)\n"
"plane.sharpen(5)\n"
],
"metadata": {
"collapsed": false
Expand All @@ -240,7 +240,7 @@
"execution_count": null,
"outputs": [],
"source": [
"boy.invert_colors()\n"
"plane.invert_colors()\n"
],
"metadata": {
"collapsed": false
Expand All @@ -260,7 +260,7 @@
"execution_count": null,
"outputs": [],
"source": [
"boy.rotate_right()\n"
"plane.rotate_right()\n"
],
"metadata": {
"collapsed": false
Expand All @@ -280,7 +280,7 @@
"execution_count": null,
"outputs": [],
"source": [
"boy.find_edges()\n"
"plane.find_edges()\n"
],
"metadata": {
"collapsed": false
Expand All @@ -300,7 +300,7 @@
"execution_count": null,
"outputs": [],
"source": [
"boy.add_gaussian_noise(standard_deviation=0.1)\n"
"plane.add_gaussian_noise(standard_deviation=0.1)\n"
],
"metadata": {
"collapsed": false
Expand Down

0 comments on commit e80d993

Please sign in to comment.