cesine / AndroidOpenCVforHackathons

A hackathon ready project with selfdocumenting OpenCV debugging so you can get programming with OpenCV as soon as possible
4 stars 7 forks source link

Logging #9

Open cesine opened 12 years ago

cesine commented 12 years ago

see jni/image_processing.cpp

Step 1: Define your log functions using the handy android functions

define LOG_TAG "Image Processing"

define LOGI(...) android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS)

define LOGE(...) android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS)

Step 2: log to your hearts content:

LOGI("Using thresholds to find contrast and then contours around those highcontrast items...");

LOGI("Contours: %d", contours.size());

If you haven't touched C++ in a while, here is a quick link for string formatting that will save you time: http://www.cplusplus.com/reference/clibrary/cstdio/printf/