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
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Android Application Programming with OpenCV

You're reading from   Android Application Programming with OpenCV For Java developers OpenCV is a fantastic opportunity to benefit from the popularity of image related mobile apps on Android. This book teaches you all you need to know about computer vision with practical projects.

Arrow left icon
Product type Paperback
Published in Sep 2013
Publisher Packt
ISBN-13 9781849695206
Length 130 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Joseph Howse Joseph Howse
Author Profile Icon Joseph Howse
Joseph Howse
Arrow right icon
View More author details
Toc

Mixing color channels


As we saw in Chapter 2, Working with Camera Frames, OpenCV stores image data in a matrix of type Mat, which is like a two-dimensional array. The columns and rows (specified by the first and second indices, respectively) correspond to the y and x pixel coordinates in the image. The elements are the pixel values. A pixel value may be represented by one number (in the case of a grayscale image) or multiple numbers (in the case of a color image). Each of these numbers is said to belong to a channel. A grayscale image may have just one channel, value (brightness), which is abbreviated as V. A color image may have as many as four channels—for example, red, green, blue, and alpha (transparency), which constitute the RGBA format. Other useful formats for color images include RGB (red, green, blue), HSV (hue, saturation, value), and L*a*b (luminosity, green-versus-magenta, yellow-versus-blue). In this book, we focus on RGB and RGBA images, but OpenCV supports other formats...

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