Ask Your Question
0

how to convert int array to mat in android?

asked 2018-08-28 05:14:00 -0600

rainY gravatar image

how to convert int array to Mat in android?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-08-28 05:19:23 -0600

berak gravatar image

updated 2018-08-28 05:22:00 -0600

since this is probably still about the face rcognition, -- you have some options:

// 1. use an int[]
int[] data = {1,2,3,4,5,6}; // however you fill it
Mat labels(6,1,CV_32S);
labels.put(0,0, data);

// 2. use MatOfInt
MatOfInt labels = new MatOfInt(); // initially empty !
for (each item)
    labels.push_back(new MatOfInt(17));
edit flag offensive delete link more

Comments

thanks , let me try.

rainY gravatar imagerainY ( 2018-08-28 05:24:34 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-08-28 05:14:00 -0600

Seen: 1,214 times

Last updated: Aug 28 '18