Ask Your Question

psykomantisita's profile - activity

2015-02-20 10:59:57 -0500 commented question Mat to int[] and vice versa

oh thank you very much!!

2015-02-20 10:50:19 -0500 commented question Mat to int[] and vice versa

ok i will convert my display component to bitmap obj. How can i convert ;Mat to Bitmap and vice versa?

2015-02-20 10:34:01 -0500 commented question Mat to int[] and vice versa

because all my operations and all my program (that is long) works with int[] arrays. Now i have to compute this warp, i'm using OpenCV only for : findHomography and warpPerspective, so the decisions are two : or I modify ALL my program to work with Mat (ofc no ;) or i try this solution. So i don't have solutions... by the way images are 800x600 so they aren't so expensive

2015-02-20 10:19:25 -0500 asked a question 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 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.

2015-02-19 11:50:56 -0500 asked a question Mat object from 1D array of integer

Hi all,


I'm using OpenCV 2.4.10 library for Android, so i'm programming in Java. I have a int[640x480] array (let's call it pixelsArray). I have 4 indexes of the array that identify 4 values therefore 4 points .


I need to convert pixelsArray into a Mat object in order to pass it to findHomography as source points.


Now what's the best practice? Is there any constructor of Mat that can do it automatically by passing a value that indicates the module to apply in order to fill properly the rows? Do I have to do it manually?


2015-02-19 11:36:05 -0500 received badge  Supporter (source)
2015-02-19 11:35:58 -0500 received badge  Scholar (source)
2015-02-19 09:17:02 -0500 received badge  Editor (source)
2015-02-19 08:40:35 -0500 commented answer FindHomography usage

What stands for rgb.cols? I have a int[] matrix (it's an array of int, rgb, values) so i have 4 indexes like 100, 1000, 2000, 3000. I've seen that findhomography wants point2f with x and y but i have only a single value. How can i overcome this? It's very frustrating that there isn't java documentation for this library....

2015-02-18 12:46:44 -0500 asked a question FindHomography usage

Hi all, i'm completely new, so i think it's very simple my problem.


I'm using OpenCV library for Android, i'm capturing a video with my device (fixed in a position, not in movement), with a component of my program i can determine 4 point from the scene. So at the end I have a 640x480 int array , and i have 4 values (indexes) of the four point in the scene.


I want to do this kind of transformation:



What do i have to do to make such a ("plane") transformation, in order to watch the scene from above? What i'm trying to saying is that: given 4 indexes of a rgb array that identify 4 real points of the scene, what do i have to pass to findHomography function? And after that, what do i have to do with Mat object to apply the change in real time?

I actually need detailed steps, because I'm completely new. Thanks a lot,.

Sorry i'm new to Computer Vision.