1

I just started use OpenCV and trying to create sequence of numbers , let's say 99,100,...,103. In Matlab I can do that with

99:103

Does OpenCV have something like this? And for indexing matrix / vectors.

I feel like

cv::Range()

the thing that I need but still wasn't able to figure how to use it.

Il'ya Zhenin
  • 1,272
  • 2
  • 20
  • 31
  • What do you want to do? For matrix indexing, `cv::Range()` is the right choice, to crate an iterator or a list, it's the wrong choice. Could you describe the use-case you are interested in? – Daniel Oct 23 '15 at 14:14
  • Daniel, intrested in both. Trying to grasp a concept in OpenCV to connect it with Matlab programming expirience, but here's thing that I'm dealing with now: I created Range, for ex. cv::Range(99, 103), and now want to use values of such a vector as argument to some function. Let's suppose I want to substract from each value of this vector number 3 and save result. – Il'ya Zhenin Oct 23 '15 at 14:26
  • 2
    To create an array with the values, I would use [`std:itoa`](http://stackoverflow.com/questions/13152252/is-there-a-compact-equivalent-to-python-range-in-c-stl) – Daniel Oct 23 '15 at 14:32
  • @Daniel - That's a good duplicate. Have marked it as such. – rayryeng Oct 23 '15 at 15:25

0 Answers0