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
OpenCV Essentials

You're reading from   OpenCV Essentials Acquire, process, and analyze visual content to build full-fledged imaging applications using OpenCV

Arrow left icon
Product type Paperback
Published in Aug 2014
Publisher
ISBN-13 9781783984244
Length 214 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (10) Chapters Close

Preface 1. Getting Started FREE CHAPTER 2. Something We Look At – Graphical User Interfaces 3. First Things First – Image Processing 4. What's in the Image? Segmentation 5. Focusing on the Interesting 2D Features 6. Where's Wally? Object Detection 7. What Is He Doing? Motion 8. Advanced Topics Index

Histogram matching and LUT


The histogram may also be used to modify the color of an image. Histogram matching is a method of color adjustment between two color images. Given a reference image and a target image, the result (destination image) will be equal to the target image except that its (three) histograms will look like those of the reference image. This effect is known as color mapping or color transfer.

The histogram matching algorithm is run over each of the three color histograms independently. For each channel, the cumulative distribution function (cdf) has to be calculated. For a given channel, let Fr be the cdf of the reference image and Ft be the cdf of the target image. Then, for each pixel v in the reference image, we find the gray level w, for which Fr(v)=Ft(w). The pixel with value v is thus changed to w.

Next, we provide another example of histograms in which we use a technique called histogram matching. The example also uses look-up tables (LUT). A look-up table transformation...

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