Hi i am new to OpenCV and trying to to detect aruco marker from https://chev.me/arucogen/
but corner.size() always returns 4 if there is only 3 markers in picture.
Log.d("testCorner: "," hitted image capture "+image);
final Bitmap bitmap = textureView.getBitmap();
if (bitmap == null)
return;
Mat rgba = new Mat();
Utils.bitmapToMat(bitmap, rgba);
rgb = new Mat();
Imgproc.cvtColor(rgba, rgb, Imgproc.COLOR_RGBA2RGB);
gray = new Mat();
Imgproc.cvtColor(rgba, gray, Imgproc.COLOR_RGBA2GRAY);
Utils.matToBitmap(rgb, bitmap);
image.close();
detectArucoCode(gray, bitmap);
Detecting Aruoco code() ->function
ids = null;
ids = new MatOfInt();
if (corners != null)
corners.clear();
Aruco.detectMarkers(mat, dictionary, corners, ids, parameters);
Log.d("ITC: IDs", ids.dump());
Log.d("ITC: corners", ""+corners.size());
if (corners != null)
Log.d("testCorner: "," "+corners.size());
Its really appreciable for all replies