Ask Your Question

Vahid Dnt's profile - activity

2017-10-18 22:26:13 -0600 received badge  Supporter (source)
2017-10-17 01:36:30 -0600 marked best answer opencv c++ equivalent for arraylist in java

Whats the equivalent of the following lines in open cv c++? The first lines have written with java language.

  1. ArrayList<integer> x = new ArrayList<integer>(); is this its correct equivalent? std::vector< int > x = std::vector<int>();

  2. x.add(i); is this its correct equivalent? x.push_back(i);

  3. Mat[] m = new Mat[mCount]; is this its correct equivalent? std::vector<cv::mat> m = std::vector<cv::mat> (mCount);

  4. float[] fl = new float[flLength]; is this its correct equivalent? std::vector< float > fl = std::vector< float >(flLength);

  5. A.get(0, 0, ALists); is this its correct equivalent? ALists.push_back((float)A.at< float >(0,0));

  6. cv::Mat cropped = rotated.submat(offset, offset + cropSize, offset, offset + cropSize); is this its correct equivalent?
    cv::Mat tmpMat0 = rotated.rowRange(offset,offset + cropSize).colRange(offset,offset + cropSize); cv::Mat cropped; tmpMat0.copyTo(cropped);

Thanks for your help

2017-10-13 00:33:45 -0600 received badge  Enthusiast
2017-10-10 04:16:08 -0600 asked a question opencv c++ equivalent for arraylist in java

opencv c++ equivalent for arraylist in java Whats the equivalent of the following lines in open cv c++? The first lines

2017-10-10 04:12:47 -0600 marked best answer Whats the equivalent of put(in java) for opencv c++?

I would like to translate the code below from java to open cv c++. I don't know whats the equivalent for put. Please help on this.

Mat A = new Mat(1, 3, CvType.CV_32FC1); A.put(0, 0, -1); A.put(0, 1, 0); A.put(0, 2, 1);

2017-10-10 04:12:47 -0600 received badge  Scholar (source)
2017-10-08 22:56:24 -0600 asked a question Whats the equivalent of put(in java) for opencv c++?

Whats the equivalent of put(in java) for opencv c++? I would like to translate the code below from java to open cv c++.