Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Raspberry Pi

You're reading from   Learning Raspberry Pi Unlock your creative programming potential by creating web technologies, image processing, electronics- and robotics-based projects using the Raspberry Pi

Arrow left icon
Product type Paperback
Published in Apr 2015
Publisher
ISBN-13 9781783982820
Length 258 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Serge Schneider Serge Schneider
Author Profile Icon Serge Schneider
Serge Schneider
Samarth Shah Samarth Shah
Author Profile Icon Samarth Shah
Samarth Shah
Arrow right icon
View More author details
Toc

Important image processing operations

In the previous chapter, you learned about the basic image processing operations. This section will cover an important image processing operation, which is widely used in complex image processing algorithms:

  • The image smoothing filter
  • Morphological operations

The image smoothing filter

Image smoothing is used to remove the noise. Basically, it removes high frequency contents from the image. Noise and sharp edges are typically high frequency contents. As it removes edges along with the noise from an image, it will blur the image. OpenCV has mainly four types of smoothing filters:

  • Averaging filter
  • Gaussian filtering
  • Median filtering
  • Bilateral filtering

Averaging

The averaging technique takes the average of all the pixels under the kernel area and replaces the central element with this average. This can be achieved using cv2.blur() or cv2.boxFilter() functions. The following are the steps to achieve averaging:

  1. Create a new folder named chapter6 under your home folder...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image