Null array of points issue
Closed this issue · 2 comments
touseefahmad commented
i get this error when i try to call "nativeClass.getPoint(tempBitmap);"
// this is my error
Attempt to invoke virtual method 'org.opencv.core.Point[] org.opencv.core.MatOfPoint2f.toArray()' on a null object reference
touseefahmad commented
it always calls this block of code
List rectangles = getPoints(downscaled);
if (rectangles.size() == 0) {
return null;
}
pankaj046 commented
try this it sovle your issue. it show error when not detect rectangle in scan image
if (isRectangle(approx, srcArea)) {
rectangles.add(approx);
}else{
rectangles.add(approx);
}