4

I am trying to convert a matlab code to Opencv Code.
I need to convert the below code to opencv.
I would like to know is there any equivalent of matlab find function in opencv.

S has (x,y) data and size of S is 100x2

ind = find(S(:,1) >= xm & S(:,1) <= xM & S(:,2) >= ym & Sm(:,2) <= yM);
Snew = S(ind,:);

Edit: In the question OpenCV function similar to matlab's “find”, the output Snew and the input S are of same size, but here in my question, Snew is not of the same size as S.. For example:

S = [ 76    96
    26    55
    51    14
    70    15
    90    26]

ind = find(S(:,1) > 50);
Snew = S(ind3,:);

Snew = [ 76    96
    51    14
    70    15
    90    26]

As you can see, Snew and S are not of same size...

The im in the refered question is of the same size of initial input im...

Community
  • 1
  • 1
2vision2
  • 4,933
  • 16
  • 83
  • 164

0 Answers0