How to check MatOfKeyPoint in java?

How to check if MatOfKeyPoints is empty or not?

MatOfKeyPoint matOfKeyPoint = new MatOfKeyPoint();

I need something like

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

The error is as follows:

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.

+4
source share
1 answer

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

You should use:

if(matOfKeyPoint.empty())
+2
source

Source: https://habr.com/ru/post/1613653/


All Articles