O'Reilly logo

Android Application Programming with OpenCV by Joseph Howse

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required