import android.util.Log; ublic class Card ! public static final Str public stati
ID: 3708567 • Letter: I
Question
import android.util.Log; ublic class Card ! public static final Str public static final double CARD_AREA MIN 10000; public static final Scalar COLOR-YELLOW = new Scalar(255, 255, 0); public static final int RECTANGLE-NOT-FOUND-CANNY = 1; public static final int RECTANGLE COULD NOT ROTATE=2; public static final int RECTANGLE FOUND 3; public static final int RECTANGLE OUT_OF SCENE 4; public static final int IMG_PROCESS_WIDTH- 320; public static final int IMG PROCESS HEIGHT 240; G-"Card" * Given an image, attempts to find a card in it *@return static ArrayList detect(Mat imageGray) List MatOfPoint> edgeContours- new ArrayList0; Mat imgCanny ImageCanny(imageGray); Mat hierarchy- new Mat0; Imgproc.findContours(imgCanny, edgeContours, hierarchy, Imgproc.RETR LIST, Imgproc.CHAIN_APPROX SIMPLE); Log.d(TAG, "Contour size:"); for (MatOfPoint point : edgeContours) Log.d(TAG, "tcontour size " + point.width0 + "x" + point.height)+"-"point.cols) + "x" + point.rows0): return null;Explanation / Answer
android.util.log is a Logging API for android. Used to send logs to output.
There are different types of methods available in log Log.v(), Log.d(), Log.i(), Log.w(), and Log.e().
Log.d
d is one such method which is used to send logs to
output only during debug and dont send logs to output at runtime.
int d (String tag, String msg)
Send a DEBUG log message.
tag String: Used to identify the source of a log message. In your case Card class. Please refer line 3
msg String: The message you would like logged. In your case "Contour size" . Refer line Log.d(TAG,"Contour size");
If you dont want to use android.util.log then In java the alternate logging package is java.util.logging
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.