i am new at iopencv
i want to know how a color image is stored in matrix what are the vales of each cell how is bgr combination is being managed how much bytes it take to store the each pixel thaks in advance
i want to know how a color image is stored in matrix what are the vales of each cell how is bgr combination is being managed how much bytes it take to store the each pixel thaks in advance
Now on the question: In opencv are couple of formats for data in a matrix. For example CV_8UC3 - 3 channel image with 1 unsigned byte for each (B0,G0,R0,B1,G1,R1,B2....). That is the basic color image format (that you will get from imread function).
If your image is gray scale it will be CV_8UC1. You can convert BGR image to grayscale with cvtColor(src, dist, CV_BGR2GRAY).
For double is CV_64F, for float CV_32F and etc.
Asked: 2014-02-24 03:51:35 -0600
Seen: 249 times
Last updated: Feb 24 '14
Area of a single pixel object in OpenCV
build problems for android_binary_package - Eclipse Indigo, Ubuntu 12.04
OpenCV DescriptorMatcher matches
Can't compile .cu file when including opencv.hpp
Using OpenCV's stitching module, strange error when compositing images
compile error in opencv2/flann/lsh_table.h when compiling bgslibrary
oh, read a bit (and welcome, btw ..)