Ask Your Question
0

i am new at iopencv

asked 2014-02-24 03:51:35 -0500

shiv.butekar gravatar image

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

edit retag flag offensive close merge delete

Comments

3

oh, read a bit (and welcome, btw ..)

berak gravatar imageberak ( 2014-02-24 03:54:39 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-02-24 04:58:12 -0500

  1. Google it.
  2. If don't find anything - ask here.

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.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-02-24 03:51:35 -0500

Seen: 118 times

Last updated: Feb 24 '14