Ask Your Question

adrian's profile - activity

2013-04-17 00:42:21 -0600 commented answer How could I transfer Mat data from Windows Application to Android application?

Thanks for your help, problem solved!

2013-04-16 04:54:14 -0600 received badge  Scholar (source)
2013-04-16 04:26:33 -0600 asked a question FaceRecognizer in Java (for Windows)?

Hi,

I would to develop a Face Recognition application in Java (Windows) and I want to know if there exists a similar class for Java like the "FaceRecognizer" one for C++.

2013-04-12 11:24:09 -0600 commented answer How could I transfer Mat data from Windows Application to Android application?

I have implemented with 'imencode' and 'imdecode' functions, but the result is an image which I can't open it...

This is my code for the client application (Android - OpenCV): MatOfByte buf = new MatOfByte(); Highgui.imencode(".jpg", matCameraBitmap, buf);

byte[] bufferByte; bufferByte = buf.toArray(); BufferedWriter out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())); out.write(bufferByte.toString()); out.flush();

And this is my code for the server application (Windows - OpenCV): if((bytecount = recv(new_sock, buffer, dim_imagine, 0)) == SOCKET_ERROR) { fprintf(stderr, "Error receiving data %d\n", WSAGetLastError()); return 0; }

std::vector<char> data(buffer, buffer + bytecount); Mat matrixJprg = imdecode(Mat(data), 1); cv::imwrite("aaa.jpg", matrixJprg);

2013-04-10 12:47:32 -0600 asked a question How could I transfer Mat data from Windows Application to Android application?

1 down vote favorite 1

I want to transfer a Mat image through tcp ip sockets from an Android device to a PC running Windows. Android application is made in Java and Windows application is made in C++; both are using OpenCV.

More exactly, I would like to transfer the data from Mat image, but I couldn't find the equivalent of 'data' class member from Windows OpenCV for Android OpenCV.

Any ideas?