Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

CvMat imread alpha

Hello,

I was wondering what was the method to obtain,

  • from a cv::Mat obtained by imread({myFile}, CV_LOAD_IMAGE_COLOR)
  • a cv::Mat identical to the one obtained by imread({myFile}, CV_LOAD_IMAGE_UNCHANGED)

If I well understand, i need to remove the alpha channel from my cv::Mat ? so I have to remove one dimension of my matrix by iterate over cols & rows ?

(I precise if it wasn't obvious, i dunno anything in image treatment ;))

Thanx a lot :)

click to hide/show revision 2
retagged

updated 2013-09-25 11:11:34 -0600

berak gravatar image

CvMat imread alpha

Hello,

I was wondering what was the method to obtain,

  • from a cv::Mat obtained by imread({myFile}, CV_LOAD_IMAGE_COLOR)
  • a cv::Mat identical to the one obtained by imread({myFile}, CV_LOAD_IMAGE_UNCHANGED)

If I well understand, i need to remove the alpha channel from my cv::Mat ? so I have to remove one dimension of my matrix by iterate over cols & rows ?

(I precise if it wasn't obvious, i dunno anything in image treatment ;))

Thanx a lot :)

click to hide/show revision 3
fixed content, i inverted my question :s

CvMat imread alpha

Hello,

I was wondering what was the method to obtain,

  • from a cv::Mat obtained by imread({myFile}, CV_LOAD_IMAGE_COLOR)CV_LOAD_IMAGE_UNCHANGED)
  • a cv::Mat identical to the one obtained by imread({myFile}, CV_LOAD_IMAGE_UNCHANGED)CV_LOAD_IMAGE_COLOR)

If I well understand, i need to remove the alpha channel from my cv::Mat ? so I have to remove one dimension of my matrix by iterate over cols & rows ?

(I precise if it wasn't obvious, i dunno anything in image treatment ;))

Thanx a lot :)