Wolfram Computation Meets Knowledge

Advance Your Image Processing Knowledge with the Latest Wolfram U Course

Advance Your Image Processing Knowledge with the Latest Wolfram U Course

Today, the world around us is being captured by imaging devices ranging from cell phones and action cameras to microscopes and telescopes. With ever-increasing generation of images, image processing and automatic image analysis are used in a wide range of individual, academic and industry applications.

We are excited to announce Introduction to Image Processing, a free interactive course from Wolfram U, which makes cutting-edge image processing simple with graphical and visual examples that demonstrate how image operations work. It includes 14 video lessons, each lasting 20 minutes or fewer, and 5 short quizzes, as well as a certificate for finishing all course materials. Topics range from how to control brightness and contrast or crop and resize images, to advanced topics including segmentation, image enhancement, feature detection and using machine learning to perform modern image processing—no machine learning knowledge necessary!

This course is targeted at anyone looking to build skills in image processing—no prior knowledge is required, so it works well as a general introduction to image processing concepts and methods.

How the Course Works

The course starts with the Course Overview video, which gives a brief summary of each topic covered. The series of lessons with interactive examples and assessments help build a student’s knowledge in each image processing area:

  • Importing images
  • Adjusting brightness and contrast
  • Histogram operations
  • Geometric operations
  • Segmentation
  • Selective coloring
  • Image enhancement
  • Perspective correction
  • Object detection and recognition

Each lesson begins with an example to demonstrate why the topic is important and how it is generally applied. Lessons are backed with interactive expressions to build intuition for the algorithms discussed, as the Wolfram Language provides a range of functionality for modern industrial-strength image processing.

For instance, here is one dynamic example from the Segmentation lesson that illustrates the effect of thresholding and the different built-in methods for image binarization (converting to black and white):

Image binarization

You can use the lesson transcript in each section as a quick reference for the learning goals. Each lesson begins with a brief introductory paragraph and ends with a summary of the topics and Wolfram Language functions covered. You can also copy code from the transcript into your interactive scratch notebook to try it yourself.

Scratch notebook

Every few lessons, you’ll find a quiz with about five multiple-choice questions. Successful completion of the quizzes helps reinforce concepts and algorithms discussed during lessons, and also counts toward the final course certification.

Lesson quiz

The Capstone Examples section concludes the course with four complete real-world examples using many of the tools and methods from earlier sections, as well as introducing some new functions specific to each application. After completing this lesson (and the course), you should have a thorough enough understanding of image processing to start your own projects!

Lesson Previews

Lesson topics and functions covered range from fundamentals like brightness and contrast to advanced features such as facial recognition. For a brief look inside the course, let’s explore a few code samples.

Contrast Control

First, here is some code from the Controlling Contrast section that demonstrates how to adjust contrast in an image by rescaling the range of intensity values. This involves first finding the minimum and maximum pixel values in the image:

{minValue, maxValue} = MinMax
&#10005

{minValue, maxValue} = MinMax[CloudGet["https://wolfr.am/JXZ9iuXk"]]

Then we define a linear function that returns 0 for the minimum value and 1 for the maximum value:

f
&#10005

f[p_] = (p - minValue)/(maxValue - minValue);

Finally, we apply that function across every pixel in the image:

ImageApply
&#10005

ImageApply[f, CloudGet["https://wolfr.am/JXZ9iuXk"]]

The same sort of transformation can be applied even when the pixel values do not fall in a narrow value range as the previous example. Here is a function that gives a linear transformation for a certain range of pixel values (0.4 to 0.6) and transforms values below that range to 0 and values above that range to 1:

f
&#10005

f[x_] = Piecewise[{{0, x < 0.4}, {(x - 0.4)/(0.6 - 0.4), 
     0.4 < x < 0.6}, {1, x > 0.6}}];

The effect of that transformation is to maximize contrast for pixels in the selected range and to turn everything else either black or white. This has a more dramatic effect on the image—making light areas white and dark areas black, with only a narrow range of gray in the middle:

ImageApply
&#10005

ImageApply[f, CloudGet["https://wolfr.am/JXZ9tJxN"]]

Here is an interactive interface for adjusting the interval to emphasize different aspects of the image:

Manipulate
&#10005

With[{img = CloudGet["https://wolfr.am/JXZ9tJxN"]}, 
 Manipulate[{x1, x2} = int;
  g = Piecewise[{{0, # < x1}, {(# - x1)/(x2 - x1), 
       x1 < # < x2}, {1, # > x2}}] &;
  GraphicsRow[{Plot[g[x], {x, 0, 1}], ImageApply[g, img]}, 
   ImageSize -> 400], {{int, {0, 1}}, 0, 1, 
   ControlType -> IntervalSlider}]]

Clustering Components

The next example comes from the Clustering section, where we use component measurements to create and apply masks. We start with this image of some vivid orange flowers:

img
&#10005

img = CloudGet["https://wolfr.am/JXZ9BCzn"];

We can segment the image into five similarly colored areas:

lmat5 = ClusteringComponents
&#10005

lmat5 = ClusteringComponents[img, 5];
Colorize[lmat5]

Then we extract each component as a mask:

masks = ComponentMeasurements
&#10005

masks = ComponentMeasurements[lmat5, "Mask"]

This gives us a list of rules for applying functions to the different parts of the image. Putting it all together, here is a short program that replaces the background with black and adjusts the colors of the flowers while leaving the green parts of the image unchanged:

ImageAdd
&#10005

ImageAdd[ImageApply[RotateLeft, 
  ImageMultiply[img, ImageAdd[Image[2 /. masks], Image[4 /. masks]]]],
  ImageMultiply[img, ImageAdd[Image[3 /. masks], Image[5 /. masks]]]]

Facial Recognition

Finally, here is a high-level example from the Machine Learning for Images section that shows how to locate human faces in an image. This is done by first generating a list of rectangles marking the locations of faces in the image:

faces = FindFaces
&#10005

faces = FindFaces[CloudGet["https://wolfr.am/JXZ9YxvX"]]

We can then show those rectangles as highlights on the original image:

HighlightImage
&#10005

HighlightImage[CloudGet["https://wolfr.am/JXZ9YxvX"], faces]

Certification

After watching all the videos and successfully passing the quizzes, you will earn a course completion certificate. We also have additional certification options coming soon; when available, you’ll be able to complete additional exercises to become Wolfram Certified Level I in Image Processing. Check back at the Image Processing course page for updates.

Wolfram Certificate of Course Completion

This course is part of our series of completely free and open learning resources; you can get started with just a Wolfram ID and a browser. So head over to the course page now to start doing more with your images!

Take Introduction to Image Processing now to perfect your image processing skills, or check out the Image & Signal Processing page for related Wolfram U events and courses.

Comments

Join the discussion

!Please enter your comment (at least 5 characters).

!Please enter your name.

!Please enter a valid email address.