Questions tagged [mat]

Use this tag for questions dealing with opencv cv::Mat (or cvMat) data structure. Use [mat-file] tag for Matlab binary file format. Use [matrix] tag for other types of 2D numeric data structures.

cv::Mat (or cvMat) is a basic data structure defined by to handle tabular (2D or 3D) numeric data.

DO NOT CONFUSE THIS TAG WITH
for general data structures for tabular numeric data.
for Matlab's binary file format.

941 questions
0
votes
1 answer

UIImage returning from OpenCV is too LARGE (6 MB) in iPhone

I was checking the allocations of my OpenCV app on iPhone and perceived that photos from the camera takes about 300kb and photos transformed by the app take 6 MB (20 times bigger). Isn`t that strange? Look at the function I am using to transform…
marcelosalloum
  • 3,481
  • 4
  • 39
  • 63
0
votes
1 answer

Android - Open cv : Errors while Accessing the rows and columns of a vector of Mat image

I was online searching about Face recognition on Andoid and and found this project >>> https://github.com/Ajay191191/Opencv-Face-Recognition I have fixed lots of errors including configurations but stacked here. In the JNI part of the project in the…
Sisay
  • 681
  • 7
  • 16
  • 31
0
votes
0 answers

Pad array with last element

I have a matrix of a Mat object, I have to pad bigger Mat object with the last elements of every rows and cols of the original object around the original array. In This is the way I tried but padding with all zeros(I have to change it). Mat…
Elvio
  • 17
  • 7
0
votes
0 answers

Convert String to Mat Java

I have a String saved that is full with Keypoints, but I need to use this string in the descriptor, which only takes Mat. How can I change my String to a Mat? String log = "[KeyPoint [pt={123.0, 164.0}, size=7.0, angle=-1.0, response=214.0,…
user1393500
  • 199
  • 1
  • 3
  • 16
0
votes
1 answer

how to write an opencv function that take one image as paramater and returns 2 images

i wanna build an opencv function that takes one IplImage image as parameter and returns 2 IplImage images. is this doable in opencv (c++). I prefer if it's using IplImage but i will appreciate other options
Nermeeno Alami
  • 69
  • 1
  • 4
  • 9
0
votes
1 answer

How to inialize and access the entries in Mat scalars matrix in openCV using C++ interface?

I am trying to do some basic algebraic operations on matrices. I would like to use the class Mat from openCV. I used the following simple code which wouldn't work: void main() { float data[2][5] = {{1,2,3,4,5},{7,8,9,10,11}}; Mat H = Mat(2,…
0
votes
1 answer

data conversion between FlyCaptureImage and OpenCV Mat

I'm working with a PointGrey camera which returns an image having type: typedef struct FlyCaptureImage { // Rows, in pixels, of the image. int iRows; // Columns, in pixels, of the image. int iCols; // Row increment. The number of…
TSL_
  • 2,049
  • 3
  • 34
  • 55
0
votes
1 answer

getting values return by commands in stata

I am trying to run the reg and geting back the coefficient values in Stata. I did the following. Assume that y is dependent variable, k,l,m,n are independent variables, and there is a new variable new that I created. loc vars k l m n reg y `vars' #…
Metrics
  • 15,172
  • 7
  • 54
  • 83
0
votes
1 answer

Read a matrix file into Android

I'm trying to read a big matrix from MATLAt and read it on my android. Would you convert it to text and read it from a text file, or XML file? How do you read it and display it to the user?
Ramin Anushir
  • 175
  • 2
  • 3
  • 8
0
votes
1 answer

MAT space vs. TaskManager space

after searching the web for a while I decided to ask you for help with my problem. My program should analyze logfiles, which are really big. They are about 100mb up to 2gb. I want to read the files using NIO-classes like FileChannel. I don't want…
0
votes
1 answer

Android determine memory leak in program

OK so I have been at this for days and I still can make sense of the MAT program for eclipse. I can tell I have a memory leak because when running my application I only have about 2% free memory. here is an image from mat…
Gallo2fire
  • 153
  • 1
  • 9
0
votes
1 answer

Null Pointer exception on new Mat() function of openCV

In my app I got NullPointerException in the line: Mat edges = new Mat(); I debug it, and come to here: public Mat() { nativeObj = n_Mat(); return; } On line of nativeObj = n_Mat(); this . And got NullPointerException. So can…
Hayk Nahapetyan
  • 4,452
  • 8
  • 42
  • 61
0
votes
1 answer

get histogram data from Mat , opencv android

i am working on an android project using opencv , i am creating a histogram for a black and white image (1-0 values on image file) . i am following some tutorials i found on internet on how to create the histogram . i am doing something like this …
Diamantatos Paraskevas
  • 3,874
  • 1
  • 20
  • 15
0
votes
1 answer

Android how to trace memory leak?

I have an application just like Pulse and its in beta stage https://play.google.com/store/apps/details?id=com.braindigit.nepal.khabar I have a main layout which holds a LinearLayout named NewsCategoryHolder and on this layout I dynamically…
laaptu
  • 2,963
  • 5
  • 30
  • 49
0
votes
1 answer

OpenCV: Assigning to Mat of type int16_t gives all zeros

I have the following code: string filename = "frame_00003_depth.bin"; int16_t* depth_img = loadDepthImageCompressed(filename.c_str()); Mat depth_img_meters = Mat(480, 640, CV_16UC1); for(int row = 0; row < 480; row++){ for(int col = 0; col <…
Aly
  • 15,865
  • 47
  • 119
  • 191