René's URL Explorer Experiment


Title: Image Processing (Video) – Real Python

Open Graph Title: Image Processing – Real Python

Description: Image Processing Using Pillow in Python. Previously in the course, you’ve learned how to crop and rotate images, resize them, and extract color bands from color images. However, none of the actions that you’ve taken so far have made any changes to…

Open Graph Description: Image Processing Using Pillow in Python. Previously in the course, you’ve learned how to crop and rotate images, resize them, and extract color bands from color images. However, none of the actions that you’ve taken so far have made any changes to…

Opengraph URL: https://realpython.com/lessons/python-pillow-image-processing/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
  {
    "@context": "https://schema.org",
    "@type": "VideoObject",
    "name": "Image Processing",
    "description": "Image Processing Using Pillow in Python. Previously in the course, you’ve learned how to crop and rotate images, resize them, and extract color bands from color images. However, none of the actions that you’ve taken so far have made any changes to…",
    "thumbnailUrl": ["https://files.realpython.com/media/Image-Processing-in-Python-With-Pillow_Watermarked.b86d7e55f981.jpg"],
    "uploadDate": "2023-08-15T14:00:00+00:00",
    "duration": "PT4M39S",
    
    "potentialAction": {
      "@type": "SeekToAction",
      "target": "https://realpython.com/lessons/python-pillow-image-processing/#t={seek_to_second_number}",
      "startOffset-input": "required name=seek_to_second_number"
    }
  }
  

authorReal Python
twitter:cardsummary_large_image
twitter:imagehttps://files.realpython.com/media/Image-Processing-in-Python-With-Pillow_Watermarked.b86d7e55f981.jpg
og:imagehttps://files.realpython.com/media/Image-Processing-in-Python-With-Pillow_Watermarked.b86d7e55f981.jpg
twitter:creator@realpython
og:typevideo.episode

Links:

https://realpython.com/
Start Herehttps://realpython.com/start-here/
Learn Python https://realpython.com/lessons/python-pillow-image-processing/
Python Tutorials →In-depth articles and video courseshttps://realpython.com/search?kind=article&kind=course&order=newest
Learning Paths →Guided study plans for accelerated learninghttps://realpython.com/learning-paths/
Quizzes & Exercises →Check your learning progresshttps://realpython.com/quizzes/
Browse Topics →Focus on a specific area or skill levelhttps://realpython.com/tutorials/all/
Community Chat →Learn with other Pythonistashttps://realpython.com/community/
Office Hours →Live Q&A calls with Python expertshttps://realpython.com/office-hours/
Podcast →Hear what’s new in the world of Pythonhttps://realpython.com/podcasts/rpp/
Books →Round out your knowledge and learn offlinehttps://realpython.com/products/books/
Reference →Concise definitions for common Python termshttps://realpython.com/ref/
Code Mentor →BetaPersonalized code assistance & learning toolshttps://realpython.com/mentor/
Unlock All Content →https://realpython.com/account/join/
More https://realpython.com/lessons/python-pillow-image-processing/
Learner Storieshttps://realpython.com/learner-stories/
Python Newsletterhttps://realpython.com/newsletter/
Python Job Boardhttps://www.pythonjobshq.com
Meet the Teamhttps://realpython.com/team/
Become a Tutorial Writerhttps://realpython.com/write-for-us/
Become a Video Instructorhttps://realpython.com/become-an-instructor/
Searchhttps://realpython.com/search
https://realpython.com/search
Joinhttps://realpython.com/account/join/
Sign‑Inhttps://realpython.com/account/login/?next=%2Flessons%2Fpython-pillow-image-processing%2F
Unlock This Lessonhttps://realpython.com/account/join/?utm_source=rp_lesson&utm_content=python-pillow
Unlock This Lessonhttps://realpython.com/account/join/?utm_source=rp_lesson&utm_content=python-pillow
https://realpython.com/courses/python-pillow/#team
Process Images Using the Pillow Library and Pythonhttps://realpython.com/courses/python-pillow/
Darren Joneshttps://realpython.com/courses/python-pillow/#team
Recommended Tutorialhttps://realpython.com/image-processing-with-the-python-pillow-library/
Course Slides (.pdf)https://realpython.com/courses/python-pillow/downloads/python-pillow-slides/
Sample Code (.zip)https://realpython.com/courses/python-pillow/downloads/python-pillow-code/
Ask a Questionhttps://realpython.com/lessons/python-pillow-image-processing/#discussion
https://realpython.com/feedback/survey/course/python-pillow/liked/?from=lesson-title
https://realpython.com/feedback/survey/course/python-pillow/disliked/?from=lesson-title
Transcripthttps://realpython.com/lessons/python-pillow-image-processing/#transcript
Discussionhttps://realpython.com/lessons/python-pillow-image-processing/#discussion
00:00https://realpython.com/lessons/python-pillow-image-processing/#t=0.45
Image Processing Using Pillow in Python. Previously in the course,https://realpython.com/lessons/python-pillow-image-processing/#t=0.45
you’ve learned how to crop and rotate images, resize them,https://realpython.com/lessons/python-pillow-image-processing/#t=5.43
and extract color bands from color images. However,https://realpython.com/lessons/python-pillow-image-processing/#t=8.95
none of the actions that you’ve taken so far have made any changes to thehttps://realpython.com/lessons/python-pillow-image-processing/#t=12.96
content of the image. In these sections of the course,https://realpython.com/lessons/python-pillow-image-processing/#t=16.29
you’ll learn about image processing features in the Python Pillow library.https://realpython.com/lessons/python-pillow-image-processing/#t=19.27
00:23https://realpython.com/lessons/python-pillow-image-processing/#t=23.91
To do this, you’ll make use of the ImageFilter module in Pillow.https://realpython.com/lessons/python-pillow-image-processing/#t=23.91
00:29https://realpython.com/lessons/python-pillow-image-processing/#t=29.1
One of the methods that’s used in image processing is image convolution usinghttps://realpython.com/lessons/python-pillow-image-processing/#t=29.1
kernels.https://realpython.com/lessons/python-pillow-image-processing/#t=33.32
A detailed explanation of image processing theory is outside the scope of thishttps://realpython.com/lessons/python-pillow-image-processing/#t=34.44
course, but if you’re interested in the science of image processing,https://realpython.com/lessons/python-pillow-image-processing/#t=37.96
one of the best resources you can use is Digital Image Processing by Gonzaleshttps://realpython.com/lessons/python-pillow-image-processing/#t=41.86
and Woods, which is seen on-screen. In this section,https://realpython.com/lessons/python-pillow-image-processing/#t=46.28
you’ll learn the basics of how you can use convolution kernels to perform imagehttps://realpython.com/lessons/python-pillow-image-processing/#t=50.46
processing. But what is a convolution kernel?https://realpython.com/lessons/python-pillow-image-processing/#t=54.16
00:58https://realpython.com/lessons/python-pillow-image-processing/#t=58.23
A kernel is a matrix.https://realpython.com/lessons/python-pillow-image-processing/#t=58.23
You can consider a simple image to understand the process of convolution usinghttps://realpython.com/lessons/python-pillow-image-processing/#t=60.9
kernels.https://realpython.com/lessons/python-pillow-image-processing/#t=65.32
The image has a size of 30x30 pixels and contains a vertical line and a dot.https://realpython.com/lessons/python-pillow-image-processing/#t=66.38
01:12https://realpython.com/lessons/python-pillow-image-processing/#t=72.02
The line is four pixels wide,https://realpython.com/lessons/python-pillow-image-processing/#t=72.02
and the dot consists of a 4x4 pixel square.https://realpython.com/lessons/python-pillow-image-processing/#t=73.7
The image is seen on-screen, enlarged for display purposes.https://realpython.com/lessons/python-pillow-image-processing/#t=77.31
You can place the kernel anywhere on the image and use the location of thehttps://realpython.com/lessons/python-pillow-image-processing/#t=81.9
kernel’s central cell as a reference.https://realpython.com/lessons/python-pillow-image-processing/#t=85.56
01:28https://realpython.com/lessons/python-pillow-image-processing/#t=88.71
The diagram on-screen is a representation of the top-left portion of the image.https://realpython.com/lessons/python-pillow-image-processing/#t=88.71
The white squares represent pixels in the image that have a value of zero.https://realpython.com/lessons/python-pillow-image-processing/#t=93.6
01:37https://realpython.com/lessons/python-pillow-image-processing/#t=97.79
The red squares represent pixels in the image that have a value of 255.https://realpython.com/lessons/python-pillow-image-processing/#t=97.79
Each purple region represents the kernel.https://realpython.com/lessons/python-pillow-image-processing/#t=102.79
The diagram shows a kernel in three different positions labeled 1, 2,https://realpython.com/lessons/python-pillow-image-processing/#t=105.75
and 3.https://realpython.com/lessons/python-pillow-image-processing/#t=109.75
01:51https://realpython.com/lessons/python-pillow-image-processing/#t=111.33
A new image can be created as a result of the convolution of the image with thehttps://realpython.com/lessons/python-pillow-image-processing/#t=111.33
kernel. Let’s take a look at kernel position 1.https://realpython.com/lessons/python-pillow-image-processing/#t=115.05
The position of the kernel is (3, 2),https://realpython.com/lessons/python-pillow-image-processing/#t=120.27
which is the position of its central cell because it’s in the fourth row withhttps://realpython.com/lessons/python-pillow-image-processing/#t=122.05
index of 3, and the third column with index of 2.https://realpython.com/lessons/python-pillow-image-processing/#t=125.73
02:09https://realpython.com/lessons/python-pillow-image-processing/#t=129.95
Each image pixel in the region covered by the kernel has a value of zero,https://realpython.com/lessons/python-pillow-image-processing/#t=129.95
so therefore, all of the multiplication from step 2 will be zero,https://realpython.com/lessons/python-pillow-image-processing/#t=134.06
and the addition will also be zero.https://realpython.com/lessons/python-pillow-image-processing/#t=138.43
02:21https://realpython.com/lessons/python-pillow-image-processing/#t=141.59
The new image will have a value of zero at pixel (3, 2).https://realpython.com/lessons/python-pillow-image-processing/#t=141.59
02:26https://realpython.com/lessons/python-pillow-image-processing/#t=146.25
In the case of the other kernel positions, the situation is different.https://realpython.com/lessons/python-pillow-image-processing/#t=146.25
Take a look at kernel position 2, located at (4, 7). One of the image pixelshttps://realpython.com/lessons/python-pillow-image-processing/#t=150.16
overlapping this is not zero.https://realpython.com/lessons/python-pillow-image-processing/#t=155.09
02:37https://realpython.com/lessons/python-pillow-image-processing/#t=157.83
The multiplication of this pixel value, 255,https://realpython.com/lessons/python-pillow-image-processing/#t=157.83
multiplied by the kernel value of 1/9, gives 28.33.https://realpython.com/lessons/python-pillow-image-processing/#t=162.17
The eight remaining multiplications are still zero because all of those otherhttps://realpython.com/lessons/python-pillow-image-processing/#t=167.45
image pixels are zero.https://realpython.com/lessons/python-pillow-image-processing/#t=171.03
02:53https://realpython.com/lessons/python-pillow-image-processing/#t=173.8
This will mean the value at pixel position (4, 7) would behttps://realpython.com/lessons/python-pillow-image-processing/#t=173.8
28.33.https://realpython.com/lessons/python-pillow-image-processing/#t=177.37
03:00https://realpython.com/lessons/python-pillow-image-processing/#t=180.76
The third kernel position is at (8, 11).https://realpython.com/lessons/python-pillow-image-processing/#t=180.76
There are four non-zero image pixels overlapping with this kernel.https://realpython.com/lessons/python-pillow-image-processing/#t=184.21
Each one has a value of 255,https://realpython.com/lessons/python-pillow-image-processing/#t=188.39
so the multiplication result for each of them will be 28.33.https://realpython.com/lessons/python-pillow-image-processing/#t=191.14
03:15https://realpython.com/lessons/python-pillow-image-processing/#t=195.58
The overall result for this kernel position is 113.33,https://realpython.com/lessons/python-pillow-image-processing/#t=195.58
and the new image will have this value at (8, 11).https://realpython.com/lessons/python-pillow-image-processing/#t=200.45
03:24https://realpython.com/lessons/python-pillow-image-processing/#t=204.94
Remember that this is only the three kernel positions shown in the diagram.https://realpython.com/lessons/python-pillow-image-processing/#t=204.94
The convolution process repeats this process for every possible kernel positionhttps://realpython.com/lessons/python-pillow-image-processing/#t=208.76
in the image, which gives a new value for each pixel position. In the imagehttps://realpython.com/lessons/python-pillow-image-processing/#t=212.74
03:38https://realpython.com/lessons/python-pillow-image-processing/#t=218.4
on-screen,https://realpython.com/lessons/python-pillow-image-processing/#t=218.4
you can see the result of the convolution shown on the right, with the originalhttps://realpython.com/lessons/python-pillow-image-processing/#t=219.16
image on the left.https://realpython.com/lessons/python-pillow-image-processing/#t=222.78
03:45https://realpython.com/lessons/python-pillow-image-processing/#t=225.78
The kernel you saw previously is called a box blur kernel.https://realpython.com/lessons/python-pillow-image-processing/#t=225.78
The factor of 1/9 is there so that the overall weighting of the kernel ishttps://realpython.com/lessons/python-pillow-image-processing/#t=229.62
one, as it covers nine pixels.https://realpython.com/lessons/python-pillow-image-processing/#t=233.1
03:55https://realpython.com/lessons/python-pillow-image-processing/#t=235.66
The result of the convolution is a blurred version of the original image.https://realpython.com/lessons/python-pillow-image-processing/#t=235.66
04:01https://realpython.com/lessons/python-pillow-image-processing/#t=241.46
There are other kernels that perform different functions, including differenthttps://realpython.com/lessons/python-pillow-image-processing/#t=241.46
blurring methods, edge detection, sharpening, and more.https://realpython.com/lessons/python-pillow-image-processing/#t=245.37
04:11https://realpython.com/lessons/python-pillow-image-processing/#t=251.73
The Pillow library has several built-in kernels and functions that will performhttps://realpython.com/lessons/python-pillow-image-processing/#t=251.73
the convolution described here.https://realpython.com/lessons/python-pillow-image-processing/#t=255.55
You don’t need to understand the math of filtering through convolution to usehttps://realpython.com/lessons/python-pillow-image-processing/#t=257.89
these filters,https://realpython.com/lessons/python-pillow-image-processing/#t=261.43
but it always helps to know what’s happening behind the scenes when using thesehttps://realpython.com/lessons/python-pillow-image-processing/#t=262.53
tools. The following sections of the course will look at the kernels and imagehttps://realpython.com/lessons/python-pillow-image-processing/#t=266.03
filtering capabilities available in the ImageFilter module in Pillow,https://realpython.com/lessons/python-pillow-image-processing/#t=270.45
starting by looking at blurring, sharpening, and smoothing.https://realpython.com/lessons/python-pillow-image-processing/#t=274.61
Become a Memberhttps://realpython.com/account/join/
https://realpython.com/lessons/python-pillow-bands-modes/
Overviewhttps://realpython.com/courses/python-pillow/
https://realpython.com/lessons/python-pillow-blur-sharpen-smooth/
Process Images Using the Pillow Library and Python (Overview) 01:59 https://realpython.com/videos/python-pillow-overview/
Basic Image Operations 07:51 https://realpython.com/videos/python-pillow-operations/
Basic Manipulations 02:42 https://realpython.com/videos/python-pillow-manipulations/
Bands and Modes of an Image 05:25 https://realpython.com/lessons/python-pillow-bands-modes/
Image Processing 04:39 https://realpython.com/lessons/python-pillow-image-processing/
Blurring, Sharpening, and Smoothing 04:31 https://realpython.com/lessons/python-pillow-blur-sharpen-smooth/
Edge Detection, Enhancement, and Embossing 03:05 https://realpython.com/lessons/python-pillow-edge-enhance-emboss/
Segmentation and Superimposition 05:36 https://realpython.com/lessons/python-pillow-segment-superimpose/
Erosion and Dilation 04:18 https://realpython.com/lessons/python-pillow-erode-dilate/
Image Segmentation 03:38 https://realpython.com/lessons/python-pillow-segmentation/
Superimposition of Images 04:55 https://realpython.com/lessons/python-pillow-superimpose-images/
Using NumPy With Pillow 03:19 https://realpython.com/lessons/python-numpy-pillow/
Creating Images With NumPy 03:09 https://realpython.com/lessons/python-numpy-create-image/
Creating Animations With NumPy 03:14 https://realpython.com/lessons/python-pillow-numpy-animate/
Process Images Using the Pillow Library and Python (Summary) 00:47 https://realpython.com/lessons/python-pillow-summary/
Privacy Policyhttps://realpython.com/privacy-policy/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover

Robots: max-image-preview:large


URLs of crawlers that visited me.