Ask Your Question

Weifa Gan's profile - activity

2018-04-13 07:32:55 -0600 received badge  Student (source)
2018-03-27 03:52:47 -0600 marked best answer negative value of cv::Mat

I observe that when the Mat data,which were loaded from a picture, transform negative value to zero after subtracting by a number.But I don't need this transform,what should i do ?pleace. The codes are as follows.

#include<iostream>
#include<opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>
#include<opencv2/imgproc/imgproc.hpp>
using namespace std;
using namespace cv;
int main()
{

        Mat M;
    Point2i p;
    M = imread("D:\\Documents\\Desktop\\Face data\\AR1\\001\\AR001-1.tif", 1);
    cvtColor(M, M, CV_BGR2GRAY);
    M = M - 300;
    cout << M << endl;

      waitKey(0);
    system("pause");
}
2018-03-27 03:52:43 -0600 commented answer negative value of cv::Mat

Thank you very much!

2018-03-27 03:15:49 -0600 asked a question negative value of cv::Mat

negative value of cv::Mat I observe that when the Mat data,which were loaded from a picture, transform negative value to

2018-03-15 22:29:20 -0600 marked best answer about push_back

the book of learning opencv3 said that m0.push_back( s ) is used to extend an m × 1 matrix and insert the singleton s at the end while m0.push_back( m1 ) is used to extend an m × n by k rows and copy m1 into those rows; Cloud you tell me what's the different between s and m1 in the term of class?Does the singleton means the a single number?

2018-03-15 04:25:04 -0600 commented answer about push_back

Thanks your explain!

2018-03-15 04:06:26 -0600 asked a question about push_back

about push_back the book of learning opencv3 said that m0.push_back( s ) is used to extend an m × 1 matrix and insert th

2018-03-12 07:02:24 -0600 marked best answer The problem of the mask?

I don't know how to use the mask. Some problem has occur when i use the following codes,but i don't know why. please help me to understand.thank you!

#include<iostream>
#include<opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>

using namespace std;
using namespace cv;
int main()
{
    Mat_<float> m(3, 3);
    m << 1.0f, 2.0f, 3.9f, 4.0f, 5.0f, 6.0f, 7.7f, 8.0f, 9.0f;

    Mat_<int> mask1(3, 3);
    mask1 << 1, 2, 3, 0,1,2,3,0,0;

    Mat m2;
    m.copyTo(m2,mask1);

    cout<< m2 << endl;

       system("pause");
}
2018-03-12 07:02:20 -0600 received badge  Critic (source)
2018-03-12 07:02:17 -0600 commented answer The problem of the mask?

Yeah,Thanks a lot.And how do you know that?

2018-03-11 08:20:11 -0600 edited question The problem of the mask?

The problem of the mask? I don't know how to use the mask. Some problem has occur when i use the following codes,but i d

2018-03-11 08:08:24 -0600 asked a question The problem of the mask?

The problem of the mask? I don't know how to use the mask. Some problem has occur when i use the following codes,but i d

2018-03-11 07:58:30 -0600 marked best answer question of using iterator

I want to set the iterator to the specified element of the matrix, but the output is nothing or messy code. The codes are following. pleace help me to understand.Thank you!

#include<iostream>
#include<opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>

using namespace std;
using namespace cv;
int main()
{

    Point2i pi(0,0);
    Mat n=(Mat_<float>(2,2) << 1.0f, 2.0f, 3.0f, 4.0f);
    Mat* m=& n;
    MatConstIterator ito(m, pi);
    cout <<(*ito);
    system("pause");

}
2018-03-10 01:40:10 -0600 received badge  Enthusiast
2018-03-09 00:33:39 -0600 commented answer question of using iterator

Thanks! But it still have some problem,reminding that the constructors do not match the parameter list. Does MatConst

2018-03-09 00:32:58 -0600 commented answer question of using iterator

Thanks! But it still have some problem,reminding that the constructors do not match the parameter list. Does MatConst

2018-03-08 08:21:37 -0600 asked a question question of using iterator

question of using iterator I want to set the iterator to the specified element of the matrix, but the output is nothing

2018-03-07 02:50:44 -0600 commented answer Question of using CV::MatConstIterator

thanks your guidance!

2018-03-06 23:25:01 -0600 commented answer Question of using CV::MatConstIterator

Yeah.Thank you very much! how do you know typo? and MatConstIterator_<vec3f> it = m.begin<vec3f>() what mean

2018-03-06 23:24:29 -0600 commented answer Question of using CV::MatConstIterator

Yeah.Thank you very much! and how do you know that? MatConstIterator_<vec3f> it = m.begin<vec3f>() what mean

2018-03-06 23:22:55 -0600 commented answer Question of using CV::MatConstIterator

Yeah.Thank you very much! and how do you know that?

2018-03-06 23:20:47 -0600 marked best answer Question of using CV::MatConstIterator

I am new learner for opencv,so i wan to ask some question about it. I type some codes, which can find in the book learning opencv3 ,but error has occur when i use the CV::MatConstlerator. The error is that it is not contain a list of template parameters .It make me confused. Pleace help to understand.Thank you very much.

codes are as followed:

#include"iostream"
#include"opencv2/core/core.hpp"
#include"opencv2/highgui/highgui.hpp"

using namespace std;
using namespace cv;
int main()
{

    int sz[3] = { 4,4,4 };
    Mat m(3, sz, CV_32FC3);
    randu(m, -1.0f, 1.0f);

    float mat = 0.0f;
    MatConstIterator<Vec3f>it = m.begin();



    system("pause");
}
2018-03-06 23:20:43 -0600 commented answer Question of using CV::MatConstIterator

Yeah.Thank you very much! but how do you know that?

2018-03-06 07:57:11 -0600 edited question Question of using CV::MatConstIterator

Question of using CV::MatConstIterator I am new learner for opencv,so i wan to ask some question about it. I type some c

2018-03-06 07:56:41 -0600 edited question Question of using CV::MatConstIterator

Question of using CV::MatConstIterator I am new learner for opencv,so i wan to ask some question about it. I type some c

2018-03-06 07:51:10 -0600 edited question Question of using CV::MatConstIterator

Question of using CV::MatConstIterator I am new learner for opencv,so i wan to ask some question about it. I type some c

2018-03-06 07:49:57 -0600 edited question Question of using CV::MatConstIterator

Question of using CV::MatConstIterator I am new learner for opencv,so i wan to ask some question about it. I type some c

2018-03-06 07:47:39 -0600 edited question Question of using CV::MatConstIterator

Question of using CV::MatConstIterator I am new learner for opencv,so i wan to ask some question about it. I type some c

2018-03-06 07:28:59 -0600 edited question Question of using CV::MatConstIterator

Question of using CV::MatConstIterator I am new learner for opencv,so i wan to ask some question about it. I type some c

2018-03-06 07:19:41 -0600 asked a question Question of using CV::MatConstIterator

Question of using CV::MatConstIterator I am new learner for opencv,so i wan to ask some question about it. I type some c

2018-01-20 00:21:57 -0600 commented answer Question of Reshaping a matrix

Great! Thanks your help.

2018-01-20 00:09:46 -0600 marked best answer Question of Reshaping a matrix

I am a new learner for opencv. When I want to reshape m33f to m91f, it will be error due to no "typedef Matx<float,9,1> Matx91f". Then what shoud i do ?pleace help me to deal with the problem. Thank you in advance. image description image description.

2018-01-19 21:33:09 -0600 edited question Question of Reshaping a matrix

Question of Reshaping a matrix I am a new learner for opencv. When I want to reshape m33f to m91f, it will be error due

2018-01-19 21:30:50 -0600 edited question Question of Reshaping a matrix

Question of Reshaping a matrix I am a new learner for opencv. When I want to reshape m33f to m91f, it will be error due

2018-01-19 21:29:28 -0600 edited question Question of Reshaping a matrix

Question of Reshaping a matrix I am a new learner for opencv. When I want to reshape m33f to m91f, it will be error due

2018-01-19 21:28:55 -0600 edited question Question of Reshaping a matrix

Question of Reshaping a matrix I am a new learner for opencv. When I want to reshape m33f to m91f, it will be error due

2018-01-19 21:27:48 -0600 edited question Question of Reshaping a matrix

Question of Reshaping a matrix I am a new learner for opencv. When I want to reshape m33f to m91f, it will be error due

2018-01-19 21:27:25 -0600 edited question Question of Reshaping a matrix

Question of Reshaping a matrix I am a new learner for opencv. When I want to reshape m33f to m91f, it will be error due

2018-01-19 21:27:13 -0600 edited question Question of Reshaping a matrix

Question of Reshaping a matrix I am a new learner for opencv. When I want to reshape m33f to m91f, it will be error due

2018-01-19 21:26:34 -0600 received badge  Editor (source)
2018-01-19 21:26:34 -0600 edited question Question of Reshaping a matrix

Question of Reshaping a matrix I am a new learner for opencv. When I want to reshape m33f to m91f, it will be error due

2018-01-19 21:26:05 -0600 asked a question Question of Reshaping a matrix

Question of Reshaping a matrix I am a new learner for opencv. When I want to reshape m33f to m91f, it will be error due

2018-01-19 01:44:36 -0600 commented question Question of using cv::Scalar

I am sorry for regarding " , " as " . ".