René's URL Explorer Experiment


Title: Creating Images With NumPy (Video) – Real Python

Open Graph Title: Creating Images With NumPy – Real Python

Description: Using NumPy to Create Images. Having seen how to manipulate images using NumPy and Pillow, you can go further and create them from scratch. You can start by creating a grayscale image. On-screen, you’ll see how to create a simple image containing a…

Open Graph Description: Using NumPy to Create Images. Having seen how to manipulate images using NumPy and Pillow, you can go further and create them from scratch. You can start by creating a grayscale image. On-screen, you’ll see how to create a simple image containing a…

Opengraph URL: https://realpython.com/lessons/python-numpy-create-image/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
  {
    "@context": "https://schema.org",
    "@type": "VideoObject",
    "name": "Creating Images With NumPy",
    "description": "Using NumPy to Create Images. Having seen how to manipulate images using NumPy and Pillow, you can go further and create them from scratch. You can start by creating a grayscale image. On\u002Dscreen, you’ll see how to create a simple image containing a…",
    "thumbnailUrl": ["https://files.realpython.com/media/Image-Processing-in-Python-With-Pillow_Watermarked.b86d7e55f981.jpg"],
    "uploadDate": "2023-08-15T14:00:00+00:00",
    "duration": "PT3M9S",
    
    "potentialAction": {
      "@type": "SeekToAction",
      "target": "https://realpython.com/lessons/python-numpy-create-image/#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-numpy-create-image/
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-numpy-create-image/
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-numpy-create-image%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-numpy-create-image/#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-numpy-create-image/#transcript
Discussionhttps://realpython.com/lessons/python-numpy-create-image/#discussion
00:00https://realpython.com/lessons/python-numpy-create-image/#t=0.51
Using NumPy to Create Images.https://realpython.com/lessons/python-numpy-create-image/#t=0.51
Having seen how to manipulate images using NumPy and Pillow,https://realpython.com/lessons/python-numpy-create-image/#t=3.55
you can go further and create them from scratch.https://realpython.com/lessons/python-numpy-create-image/#t=6.83
You can start by creating a grayscale image. On-screen,https://realpython.com/lessons/python-numpy-create-image/#t=9.91
you’ll see how to create a simple image containing a square,https://realpython.com/lessons/python-numpy-create-image/#t=13.54
but you can create more elaborate images in the same way.https://realpython.com/lessons/python-numpy-create-image/#t=16.26
00:25https://realpython.com/lessons/python-numpy-create-image/#t=25.69
You create a 600x600 array containing zeros everywhere,https://realpython.com/lessons/python-numpy-create-image/#t=25.69
and then you set the value of a set of pixels at the center of the array to 255.https://realpython.com/lessons/python-numpy-create-image/#t=33.31
You can index NumPy arrays using both rows and columns. In this example,https://realpython.com/lessons/python-numpy-create-image/#t=42.38
the first slice of 200:400 represents the rows 200 tohttps://realpython.com/lessons/python-numpy-create-image/#t=47.1
399.https://realpython.com/lessons/python-numpy-create-image/#t=51.84
00:53https://realpython.com/lessons/python-numpy-create-image/#t=53.82
The second slice represents the columns 200 to 399.https://realpython.com/lessons/python-numpy-create-image/#t=53.82
Once again,https://realpython.com/lessons/python-numpy-create-image/#t=59.16
you use Image.fromarray() to convert the NumPy array into an object of typehttps://realpython.com/lessons/python-numpy-create-image/#t=59.79
Image. Finally,https://realpython.com/lessons/python-numpy-create-image/#t=64.3
you show the output on-screen.https://realpython.com/lessons/python-numpy-create-image/#t=67.63
01:11https://realpython.com/lessons/python-numpy-create-image/#t=71.67
You’ve created a grayscale image containing a square.https://realpython.com/lessons/python-numpy-create-image/#t=71.67
The mode of the image is inferred automatically when you use Image.fromarray().https://realpython.com/lessons/python-numpy-create-image/#t=75.75
In this case, mode "F" is used,https://realpython.com/lessons/python-numpy-create-image/#t=80.75
which corresponds to an image with 32-bit floating-point pixels.https://realpython.com/lessons/python-numpy-create-image/#t=83.1
01:27https://realpython.com/lessons/python-numpy-create-image/#t=87.87
It’s easy to convert this into a simpler grayscale imagehttps://realpython.com/lessons/python-numpy-create-image/#t=87.87
with 8-bit pixels.https://realpython.com/lessons/python-numpy-create-image/#t=90.84
01:37https://realpython.com/lessons/python-numpy-create-image/#t=97.69
You can go further and create a color image.https://realpython.com/lessons/python-numpy-create-image/#t=97.69
The process is repeated to create three images: one corresponding to the red,https://realpython.com/lessons/python-numpy-create-image/#t=100.65
one to the green,https://realpython.com/lessons/python-numpy-create-image/#t=106.85
and a final one corresponding to the blue channel. Once more,https://realpython.com/lessons/python-numpy-create-image/#t=110.18
you create a square in each, but in different locations.https://realpython.com/lessons/python-numpy-create-image/#t=114.2
02:07https://realpython.com/lessons/python-numpy-create-image/#t=127.05
You create an Image object from each NumPy array and convert them to grayscalehttps://realpython.com/lessons/python-numpy-create-image/#t=127.05
images using mode "L".https://realpython.com/lessons/python-numpy-create-image/#t=130.95
02:31https://realpython.com/lessons/python-numpy-create-image/#t=151.59
Now,https://realpython.com/lessons/python-numpy-create-image/#t=151.59
you can combine these three separate images into one RGB image using Image.merge().https://realpython.com/lessons/python-numpy-create-image/#t=151.81
The first argument in Image.merge() is the mode of the image output.https://realpython.com/lessons/python-numpy-create-image/#t=159.88
02:44https://realpython.com/lessons/python-numpy-create-image/#t=164.73
The second argument is a sequence with the individual single-band images.https://realpython.com/lessons/python-numpy-create-image/#t=164.73
Finally, you show the image on-screen.https://realpython.com/lessons/python-numpy-create-image/#t=171.63
You combine the separate bands into an RGB color image.https://realpython.com/lessons/python-numpy-create-image/#t=176.76
03:01https://realpython.com/lessons/python-numpy-create-image/#t=181.98
In the next section of the course,https://realpython.com/lessons/python-numpy-create-image/#t=181.98
you’ll go a step further and create an animation using NumPy and Pillow.https://realpython.com/lessons/python-numpy-create-image/#t=183.46
Become a Memberhttps://realpython.com/account/join/
https://realpython.com/lessons/python-numpy-pillow/
Overviewhttps://realpython.com/courses/python-pillow/
https://realpython.com/lessons/python-pillow-numpy-animate/
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.