mat Questions

3

I am trying to read the mat file given in the following website, ufldl.stanford.edu/housenumbers, in the file train.tar.gz, there is a mat file named digitStruct.mat. when i used scipy.io to read ...
Friedly asked 3/11, 2015 at 21:12

10

I have two matbadges, I want one in red and one in yellow. For the one in red I'm using: = 0" matBadge="{{element.failedTests}}" matBadgeColor="warn"> For the other one, I can't find a yellow col...
Rostov asked 24/10, 2019 at 8:34

2

Solved

Is there a way of initializing a opencv cv::Mat using a vector<float> object? Or do I need to loop over every entry of the vector and write it into the cv::Mat object?
Counterfoil asked 19/4, 2016 at 14:54

4

Solved

I'm trying to set a new color value to some pixel into a cv::Mat image my code is below: Mat image = img; for(int y=0;y<img.rows;y++) { for(int x=0;x<img.cols;x++) { Vec3b color = imag...
Dizen asked 11/4, 2014 at 0:33

5

Solved

I'm using the EmguCV 3.0.0 wrapper to the OpenCV 3.0 library. I'm using the Mat class in a few places. Here's an example of a single channel, 8x8 image made of double values: Mat image = new Mat(8...
Tarentarentum asked 27/8, 2015 at 17:4

6

Solved

I try to copy a image to other image using opencv, but I got a problem. Two image is not the same, like this: This is the code I used: #include <opencv2\opencv.hpp> #include <opencv2/...
Analysis asked 16/7, 2015 at 15:32

4

My current code is shown below - I'm importing a MAT file and trying to create a DataFrame from variables within it: mat = loadmat(file_path) # load mat-file Variables = mat.keys() # identify varia...
Dubonnet asked 7/5, 2014 at 15:6

6

Solved

I have a matrix, Mat B(480,640,CV_32FC1); containing floating-point values. I want to write this matrix to a file which could be opened in Notepad or Microsoft Word or Excel to see the values insid...
Scissile asked 1/5, 2013 at 4:52

6

Solved

I have a struct array created by matlab and stored in v7.3 format mat file: struArray = struct('name', {'one', 'two', 'three'}, 'id', {1,2,3}, 'data', {[1:10], [3:9], [0]}) save('test.mat', 's...
Francophile asked 11/10, 2013 at 5:24

2

I am used to Java's implementation of OpenCV. I want to create a Mat structure, fill data into it, extract a submat and then apply some image transform. In Java, I use: my_mat = new Mat(my_ro...
Vardon asked 12/5, 2016 at 9:29

2

Solved

I am working on a project that detects some features of two input images(handwritten signatures) and compares those two features using cosine similarity. Here When I mean two input images, one is a...
Regolith asked 22/5, 2015 at 19:2

9

Solved

How can I convert a BufferedImage to a Mat in OpenCV? I'm using the JAVA wrapper for OpenCV(not JavaCV). As I am new to OpenCV I have some problems understanding how Mat works. I want to do som...
Asarum asked 19/2, 2013 at 13:24

4

Solved

Is there a direct way to create a mask where values in a cv::Mat_<double> are compared against NAN? cv::Mat_<real> mat = ... cv::Mat_<uchar> mask = (mat == NAN); does not work ...
Ultraconservative asked 20/1, 2017 at 8:36

1

I'm working with c# and OpenCV. I have a Bitmap that I want to write as a frame of video using the VideoWriter provided by OpenCV. I've done this in Python so know it will work. I just need the con...
Hintze asked 28/4, 2018 at 17:59

2

I have defined an array char buf[], and need to convert it into Opencv Mat. Is there a way? char buf[Max_size];
Gumbotil asked 9/5, 2016 at 13:36

2

Solved

I know the version issues of mat files which correspond to different loading modules in python, namely scipy.io and h5py. I also searched a lot of similar problems like scipy.io.loadmat nested stru...
Britton asked 25/2, 2018 at 6:15

5

I want to load an image using Mat in openCV My code is: Mat I = imread("C:/images/apple.jpg", 0); namedWindow( "Display window", CV_WINDOW_AUTOSIZE );// Create a window for display. imshow( "Disp...
Throttle asked 19/4, 2013 at 16:38

2

Solved

I tried to use the following function in OpenCV (C++) calcOpticalFlowPyrLK(prev_frame_gray, frame_gray, points[0], points[1], status, err, winSize, 3, termcrit, 0, 0.001); and I get this error ...
Acro asked 6/5, 2015 at 20:35

3

Solved

How can I crop an image and only keep the bottom half of it? I tried: Mat cropped frame = frame(Rect(frame.cols/2, 0, frame.cols, frame.rows/2)); but it gives me an error. I also tried: doubl...
Psittacosis asked 29/7, 2016 at 18:24

2

Solved

I've got an image as grayscale image using Mat m = Highgui.imread(path, Highgui.CV_LOAD_IMAGE_GRAYSCALE); in Java and now I want to calculate the median value, the mean value and the standard de...
Abstractionist asked 13/3, 2014 at 20:26

2

I'm looking to create a function for converting a QImage into OpenCV's (CV2) Mat format from within the PyQt. How do I do this? My input images I've been working with so far are PNGs (either RGB o...
Argentum asked 23/8, 2013 at 15:6

2

Solved

I know that the function cv::imwrite can compress a cv::Mat into Jpeg and save it to a file. But now I want to save it into memory, like a array of uchar. So, I can send the array to another one ,a...
Reasonable asked 5/11, 2015 at 1:27

4

Hi i have being able to write a Mat object in to a text file. As follows, std::fstream outputFile; outputFile.open( "myFile.txt", std::ios::out ) ; outputFile << des_object.rows << ...
Puffy asked 5/10, 2013 at 17:48

2

Solved

Trying to create an input with a clear button following the example from Angular Material, link to the example, what I want is to get the input value on a keypress enter event. HTML: <mat-for...
Pergola asked 13/8, 2018 at 10:4

1

Is anybody else still getting freezes in VS 15.7.5 while hovering over the Mat keyword in openCV 3.4.1? (note: I have included openCV 3.4.1 and the contrib modules into VS using cmake.) Reference ...
Reisfield asked 17/7, 2018 at 1:36

© 2022 - 2024 — McMap. All rights reserved.