mat Questions

2

Solved

How to create empty Mat in OpenCV? After creation I want to use push_back method to push rows in Mat. Something like: Mat M(0,3,CV_32FC1); or only option is: Mat M; M.converTo(M,CV_32FC1); ?...
Outface asked 10/7, 2015 at 9:34

1

I'm trying to match an image with the camera input in Android using template matching. When i try this with static 2 images like in here: OpenCV Template Matching example in Android, everything wor...
Instantaneous asked 18/10, 2013 at 15:39

4

I am wondering about the way of accessing data in Mat in OpenCV. As you know, we can access to get data in many ways. I want to store image (Width x Height x 1-depth) in Mat and looping access each...
Ibrahim asked 11/1, 2013 at 11:51

2

I have openCV matrix in Java and I would like to print out the content of it.I tried the toString() function as follows descriptor.toString() so I could achieve this form "[[1,2,3,4],[4,5,6,7],[7,...
Greenock asked 18/5, 2013 at 18:53

1

So I make a bitmap from a blob with the next code: byte[] blob = contact.getMP(); ByteArrayInputStream inputStream = new ByteArrayInputStream(blob); Bitmap bitmap = BitmapFactory.decodeStream(inpu...
Cleat asked 18/5, 2013 at 22:46

2

Solved

I just want to add the contents of 2 different Mats to 1 other Mat. I tried: Mat1.copyTo(newMat); Mat2.copyTo(newMat); But that just seemed to overwrite the previous contents of the Mat. This m...
Jingo asked 18/2, 2015 at 17:32

3

Solved

I am creating a multi-dimensional MAT object, and would like to get the size of the object - e.g., const int sz[] = {10,10,9}; Mat temp(3,sz,CV_64F); std::cout << "temp.dims = " << tem...
Burger asked 18/9, 2013 at 20:58

2

Solved

I want to reduce a 16-Bit Mat using opencv. I tried to use opencv LUT function to reduce this mat. But it seems like it wont support 16-Bit Mat. What is the efficient way of reducing a 16-Bit Mat u...
Conventual asked 24/11, 2014 at 6:10

1

Solved

I have two points in an image, centre left eye (X, Y) and centre right eye (X, Y). I have drawn circles around both eyes using cv::circle, and this is fine. But what I'm now trying to do is get the...
Hurlee asked 8/10, 2014 at 7:4

1

have created a rtsp client in python that receives a h264 stream and returns single h264 raw frames as a binary strings. I am trying to process each h264 frames on-the-fly. I have unsuccessfully t...
Felice asked 16/1, 2014 at 11:53

2

Solved

Im attempting to analyze a memory leak that has been driving me crazy for weeks, I found out about the eclipse MAT tool that helps you to figure out what is wrong, the problem is every single tutor...
Sodom asked 5/1, 2013 at 4:9

1

Solved

Is there any easy way to multiplicate Mat and Vec_? (Provided, that they have proper sizes, e.g.: Mat_<double> M = Mat(3,3,CV_32F); Vec3f V=(1,2,3); result = M*V //? Maybe there is some ea...
Silures asked 21/7, 2014 at 11:28

3

Is there a simple way to set all values in a cv::Mat to a given value if they fulfill some condition. For instance, I have CV_32FC1, and I want set all values which are 0 to 20. In MATLAB I would h...
Arabia asked 9/5, 2014 at 20:20

1

Solved

[UPDATED WITH PARTIAL ANSWER] Here is my code: void cbVideoPrerender(void *p_video_data, uint8_t **pp_pixel_buffer, int size) { // Locking imageMutex.lock(); videoBuffer = (uint8_t *)malloc(si...
Sweltering asked 15/4, 2014 at 19:39

1

Solved

I have some image files in the drawable folder. And now, I want to convert them into opencv Mat object. I've found a function: Mat img = Highgui.imread(inFile); which is reading a file path to g...
Queeniequeenly asked 25/11, 2013 at 3:23

1

Solved

I've been trying to convert an array [R,G,B,..] in Mat object with opencv. But is returning wrong data, someone knows why? double data[12] = {0,0,255,0,0,255,0,0,255,0,0,255}; Mat src = Mat(2,2, C...
Backstroke asked 24/11, 2013 at 18:27

2

Solved

From my question, Can I determine the number of channels in cv::Mat Opencv I am using the same code, to find the Laplacian of Gaussian of the image. The edges around the objects are well detected i...
Vesuvian asked 28/6, 2013 at 12:42

2

Solved

This maybe rudimentary, but is it possible to know how many channels a cv::Mat has? For eg, we load an RGB image, I know there are 3 channels. I do the following operations, just to get the laplaci...
Inhospitality asked 28/6, 2013 at 11:39

2

Solved

//Sorry for my english. Tell me please, what I am doing wrong? I have read a lot about this. And write some code, but I have a terrible result. As I understand in Opencv CV_8UC3 is the same as QI...
Tachygraphy asked 15/6, 2013 at 20:51

1

Solved

i am using opencv in android. but when i am adding Mat() in my code my application unexpectedly stops after launch. my error log is as below: FATAL EXCEPTION: main java.lang.UnsatisfiedLinkError: ...
Hyphenate asked 4/2, 2013 at 18:57

1

Solved

This is the code which i tried, only the coordinate values are printed but not the pixel values. #include <iostream> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc...
Splay asked 17/2, 2013 at 9:56

1

Solved

I tried to display an image of CV_32F type using imshow function but it showed a WHITE image. In the Documentation its given that floating point images will be mapped to 0-255 and displayed but it ...
Decrescent asked 26/1, 2013 at 17:23

2

Solved

I am looking for an efficient way for editing/reading pixels from Mat (or Mat3b) variable. I have used :- Image.at<Vec3b>(i,j) but it seems to be very slow. I also used this:- A.data[A...
Weldon asked 2/4, 2012 at 10:43

© 2022 - 2024 — McMap. All rights reserved.