From fb456eb69c273c68e85602e774589163d0ffae9b Mon Sep 17 00:00:00 2001 From: LaurentBerger Date: Mon, 21 Nov 2016 02:28:59 +0100 Subject: [PATCH] Merge pull request #7691 from LaurentBerger:I7676 * Solve issue 7676 * I7676 bis --- samples/cpp/detect_blob.cpp | 18 +++++++++--------- samples/cpp/detect_mser.cpp | 20 ++++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/samples/cpp/detect_blob.cpp b/samples/cpp/detect_blob.cpp index 9c9670632f..6abe03be4f 100644 --- a/samples/cpp/detect_blob.cpp +++ b/samples/cpp/detect_blob.cpp @@ -21,14 +21,14 @@ static String Legende(SimpleBlobDetector::Params &pAct) String s = ""; if (pAct.filterByArea) { - String inf = static_cast(&(ostringstream() << pAct.minArea))->str(); - String sup = static_cast(&(ostringstream() << pAct.maxArea))->str(); + String inf = static_cast(ostringstream() << pAct.minArea).str(); + String sup = static_cast(ostringstream() << pAct.maxArea).str(); s = " Area range [" + inf + " to " + sup + "]"; } if (pAct.filterByCircularity) { - String inf = static_cast(&(ostringstream() << pAct.minCircularity))->str(); - String sup = static_cast(&(ostringstream() << pAct.maxCircularity))->str(); + String inf = static_cast(ostringstream() << pAct.minCircularity).str(); + String sup = static_cast(ostringstream() << pAct.maxCircularity).str(); if (s.length() == 0) s = " Circularity range [" + inf + " to " + sup + "]"; else @@ -36,7 +36,7 @@ static String Legende(SimpleBlobDetector::Params &pAct) } if (pAct.filterByColor) { - String inf = static_cast(&(ostringstream() << (int)pAct.blobColor))->str(); + String inf = static_cast(ostringstream() << (int)pAct.blobColor).str(); if (s.length() == 0) s = " Blob color " + inf; else @@ -44,8 +44,8 @@ static String Legende(SimpleBlobDetector::Params &pAct) } if (pAct.filterByConvexity) { - String inf = static_cast(&(ostringstream() << pAct.minConvexity))->str(); - String sup = static_cast(&(ostringstream() << pAct.maxConvexity))->str(); + String inf = static_cast(ostringstream() << pAct.minConvexity).str(); + String sup = static_cast(ostringstream() << pAct.maxConvexity).str(); if (s.length() == 0) s = " Convexity range[" + inf + " to " + sup + "]"; else @@ -53,8 +53,8 @@ static String Legende(SimpleBlobDetector::Params &pAct) } if (pAct.filterByInertia) { - String inf = static_cast(&(ostringstream() << pAct.minInertiaRatio))->str(); - String sup = static_cast(&(ostringstream() << pAct.maxInertiaRatio))->str(); + String inf = static_cast(ostringstream() << pAct.minInertiaRatio).str(); + String sup = static_cast(ostringstream() << pAct.maxInertiaRatio).str(); if (s.length() == 0) s = " Inertia ratio range [" + inf + " to " + sup + "]"; else diff --git a/samples/cpp/detect_mser.cpp b/samples/cpp/detect_mser.cpp index 7e3248db45..ce29db3d3b 100644 --- a/samples/cpp/detect_mser.cpp +++ b/samples/cpp/detect_mser.cpp @@ -73,25 +73,25 @@ struct MSERParams static String Legende(MSERParams &pAct) { String s=""; - String inf = static_cast(&(ostringstream() << pAct.minArea))->str(); - String sup = static_cast(&(ostringstream() << pAct.maxArea))->str(); + String inf = static_cast(ostringstream() << pAct.minArea).str(); + String sup = static_cast(ostringstream() << pAct.maxArea).str(); s = " Area[" + inf + "," + sup + "]"; - inf = static_cast(&(ostringstream() << pAct.delta))->str(); + inf = static_cast(ostringstream() << pAct.delta).str(); s += " del. [" + inf + "]"; - inf = static_cast(&(ostringstream() << pAct.maxVariation))->str(); + inf = static_cast(ostringstream() << pAct.maxVariation).str(); s += " var. [" + inf + "]"; - inf = static_cast(&(ostringstream() << (int)pAct.minDiversity))->str(); + inf = static_cast(ostringstream() << (int)pAct.minDiversity).str(); s += " div. [" + inf + "]"; - inf = static_cast(&(ostringstream() << (int)pAct.pass2Only))->str(); + inf = static_cast(ostringstream() << (int)pAct.pass2Only).str(); s += " pas. [" + inf + "]"; - inf = static_cast(&(ostringstream() << (int)pAct.maxEvolution))->str(); + inf = static_cast(ostringstream() << (int)pAct.maxEvolution).str(); s += "RGb-> evo. [" + inf + "]"; - inf = static_cast(&(ostringstream() << (int)pAct.areaThreshold))->str(); + inf = static_cast(ostringstream() << (int)pAct.areaThreshold).str(); s += " are. [" + inf + "]"; - inf = static_cast(&(ostringstream() << (int)pAct.minMargin))->str(); + inf = static_cast(ostringstream() << (int)pAct.minMargin).str(); s += " mar. [" + inf + "]"; - inf = static_cast(&(ostringstream() << (int)pAct.edgeBlurSize))->str(); + inf = static_cast(ostringstream() << (int)pAct.edgeBlurSize).str(); s += " siz. [" + inf + "]"; return s; }