4

How to check if a MatOfKeyPoints is empty or not?

MatOfKeyPoint matOfKeyPoint = new MatOfKeyPoint();

What I need is something like

    if(matOfKeyPoint.size() != 1x0){
    //..............................
    }

The Error is as below:

Multiple markers a this line:
Syntax Error on token "x0",delete this token
Incompatible operand types size and int

Any idea how to solve this problem?

Any help would be appreciated.

Jürgen K.
  • 3,427
  • 9
  • 30
  • 66

1 Answers1

2

1x0 is not a valid hex integer in Java. matOfKeyPoint.size() has return type of Size.

You should use:

if(matOfKeyPoint.empty())
Juvanis
  • 25,802
  • 5
  • 69
  • 87