# Revision history [back]

### Mat to int[] and vice versa

I'm completely new to this library, so apologize for my simple question. I'm using OpenCV library in Android. So Java.

Given this four variables and a :

    Mat srcMat, dstMat;
int[] srcPixels, dstPixels;

//... srcPixels filled with int values of pixels

srcPixels conversion to srcMat

Imgproc.warpPerspective(srcMat, dstMat, homographyMatrix, dstMat.size())

dstMat conversion to dstPixels


this because i use int[] objects in order to display images.

Yes, i've already seen this question, but the answer is in c++ and does not really answer.

### Mat to int[] and vice versa

I'm completely new to this library, so apologize for my simple question. I'm using OpenCV library in Android. So Java.

Given this four variables and a homographyMatrix :

    Mat srcMat, dstMat;
int[] srcPixels, dstPixels;

//... srcPixels filled with int values of pixels

srcPixels conversion to srcMat

Imgproc.warpPerspective(srcMat, dstMat, homographyMatrix, dstMat.size())

dstMat conversion to dstPixels


this because i use int[] objects in order to display images.

Yes, i've already seen this question, but the answer is in c++ and does not really answer.