Ask Your Question
0

Android: Mat converting to CV_8U

asked Feb 7 '13

pietmau gravatar image

Hi and thanks for your help!

I am trying to use CascadeClassifier.detectMultiScale()

I understand that it takes as an input a Mat of type CV_8U.

Therefore, after using bitmapToMat()

I try to convert the Mat to CV_8U. with

mat.convertTo(mat2, CV_8U);

but apparently Eclipse does not take as an argument CV_8U

image description

Thank you for your help!!

Preview: (hide)

2 answers

Sort by » oldest newest most voted
3

answered Feb 7 '13

You have to use CvType.CV_8U

Preview: (hide)

Comments

@Mathieu Barnachon Thanks a lot!!!

pietmau gravatar imagepietmau (Feb 7 '13)edit

thanks a lot

nischal r gravatar imagenischal r (Mar 7 '15)edit
1

answered Feb 8 '13

Andrey Pavlenko gravatar image

updated Feb 8 '13

Actually this code line does just copying. The bitmapToMat() already returns Mat-s of depth CV_8U.

Preview: (hide)

Question Tools

Stats

Asked: Feb 7 '13

Seen: 4,883 times

Last updated: Feb 08 '13