diff --git a/alg/libqr.cpp b/alg/libqr.cpp index c7827e7..3fa1c44 100644 --- a/alg/libqr.cpp +++ b/alg/libqr.cpp @@ -263,15 +263,7 @@ bool check_blur_by_sobel(ProcessState &ps, Mat &gray, string &err) static bool check_sharpness(ProcessState &ps, Mat &gray, int method, string &err) { - if (method == 0) { - return check_blur_by_laplacian(ps, gray, err); - } else if (method == 1) { - return check_blur_by_energy_gradient(gray, err); - } else if (method == 2) { - return check_blur_by_sobel(ps, gray, err); - } - err = "unknown sharpness method: " + to_string(method); - return false; + return check_blur_by_sobel(ps, gray, err); } #define COUNT_COMPONENTS 0 @@ -458,14 +450,8 @@ bool emblem_dot_angle(ProcessState &ps, InputArray in, float &angle, string &qrc return false; } - int a = emblem_detect_angle(ps.dot_area_gray, false, err); - if (a > 0) { - angle = a; - return true; - } else { - err = "cannot detect angle"; - return false; - } + angle = 0; + return true; } catch (const std::exception &exc) { std::cout << exc.what() << std::endl; err = "exception";