diff --git a/Article/Fig_notions/escapeFirst_zoom.png b/Article/Fig_notions/escapeFirst_zoom.png index a9038d5ccc3185c179f98e2f6a6432666bd88c95..283b80117b047d51d14981778746eb7d200d125c 100644 Binary files a/Article/Fig_notions/escapeFirst_zoom.png and b/Article/Fig_notions/escapeFirst_zoom.png differ diff --git a/Article/method.tex b/Article/method.tex index 355e76c21b8bea560e24725a9365c8528945ac73..6563452f20335f03a82abbbf4bf7dda2ddeaae54 100755 --- a/Article/method.tex +++ b/Article/method.tex @@ -77,11 +77,21 @@ fail again on a blurred segment escape from the directional scan. \begin{figure}[h] \center - \begin{tabular}{c} - \includegraphics[width=0.49\textwidth]{Fig_notions/escapeFirst_zoom.png} + \begin{tabular}{c@{\hspace{0.2cm}}c@{\hspace{0.2cm}}c} + \includegraphics[width=0.31\textwidth]{Fig_notions/escapeFirst_zoom.png} & + \includegraphics[width=0.31\textwidth]{Fig_notions/escapeSecond_zoom.png} & + \includegraphics[width=0.31\textwidth]{Fig_notions/escapeThird_zoom.png} \end{tabular} - \caption{Example of early detection failures - on side escapes from the directional scan.} + \begin{picture}(1,1)(0,0) + \put(-314,-12){a)} + \put(-200,-12){b)} + \put(-86,-12){c)} + \end{picture} + \caption{Aborted detections on side escapes from the directional scan + during the initial tracking step (a) and during the fine tracking + step (b), and complete detection using an adaptive directional + scan (c). The input selection is drawn in red colour, the scan + strip bounds in blue and the detected blurred segment in green.} \label{fig:escape} \end{figure} diff --git a/Code/Seg/BSTools/bsstructureitem.cpp b/Code/Seg/BSTools/bsstructureitem.cpp index 77bc856b50688abcfc227c707e4fc6e218a61063..ce96bb346905f998befd50ea296c93aab985fc37 100755 --- a/Code/Seg/BSTools/bsstructureitem.cpp +++ b/Code/Seg/BSTools/bsstructureitem.cpp @@ -36,6 +36,7 @@ BSStructureItem::BSStructureItem (int width, int height, const QImage *im, det = detector; displayItem = DISPLAY_MIN; displayScanLines = false; + displayInput = false; this->im = im; verbose = true; infoPen = QPen (Qt::red, DEFAULT_PEN_WIDTH, Qt::SolidLine, @@ -274,6 +275,17 @@ void BSStructureItem::paintScansAndFilter (QPainter *painter, int step) } } + // Display the input selection + if (displayInput) + { + vector<Pt2i> stroke; + Pt2i ip1, ip2, ipc; + int iw; + det->getScanInput (BSDetector::STEP_INITIAL, ip1, ip2, iw, ipc); + ip1.draw (stroke, ip2); + paintPixels (painter, stroke, Qt::red); + } + // Displays filter output if (det->isFiltering (step)) { @@ -282,6 +294,13 @@ void BSStructureItem::paintScansAndFilter (QPainter *painter, int step) BlurredSegment *bs = det->getBlurredSegment (step); if (bs != NULL) paintPixels (painter, bs->getStartPt (), Qt::yellow); } + + // Displays the blurred segment + else + { + BlurredSegment *bs = det->getBlurredSegment (step); + if (bs != NULL) paintPixels (painter, bs->getAllPoints (), Qt::green); + } } if (verbose) diff --git a/Code/Seg/BSTools/bsstructureitem.h b/Code/Seg/BSTools/bsstructureitem.h index 4b2d66036731eeef39a4fcc1584c3b9029cc447c..d1e8e809809ed3ddfcf3309e064ecc082ceeabd3 100755 --- a/Code/Seg/BSTools/bsstructureitem.h +++ b/Code/Seg/BSTools/bsstructureitem.h @@ -76,10 +76,14 @@ public: /** * \brief Switches on or off the scan line display modality. - * @param next Get next information if true, previous on otherwise. */ inline void switchScanDisplay () { displayScanLines = ! displayScanLines; } + /** + * \brief Switches on or off the input selection display modality. + */ + inline void switchInputDisplay () { displayInput = ! displayInput; } + /** * \brief Returns the displayed information title. */ @@ -168,6 +172,8 @@ private: int displayItem; /** Scan display modality. */ bool displayScanLines; + /** Input selection display modality. */ + bool displayInput; /** Information text modality. */ bool verbose; /** Information text style. */ diff --git a/Code/Seg/BSTools/bsstructureview.cpp b/Code/Seg/BSTools/bsstructureview.cpp index e40b0f11ed683cfebf6cd2915abaf2cff4eb9d84..606444f06c591878aad00ff185990507ed019e48 100755 --- a/Code/Seg/BSTools/bsstructureview.cpp +++ b/Code/Seg/BSTools/bsstructureview.cpp @@ -97,6 +97,14 @@ bool BSStructureView::processKeyEvent (QKeyEvent *event) processed = false; break; + case Qt::Key_J : // Input selection display + if (event->modifiers () & Qt::ControlModifier) + grid->switchInputDisplay (); + scene()->update (); + update (); + processed = false; + break; + case Qt::Key_V : // Info display grid->switchInfoDisplay (); scene()->update (); @@ -120,7 +128,7 @@ bool BSStructureView::processKeyEvent (QKeyEvent *event) // QRect (QPoint (0, 0), // QSize (grid->getWidth(), grid->getHeight())) // ).toImage().save ("structure.png"); - // cout << "Structure shot in capture.png" << endl; + // cout << "Structure shot in structure.png" << endl; break; case Qt::Key_Plus : // Zoom in diff --git a/Methode/ctrl.tex b/Methode/ctrl.tex index 86e186c39e3417191b20433209b0aa69874e089e..0c66a0e10f65cf38cd1cd7e5bfab021167cd1dce 100755 --- a/Methode/ctrl.tex +++ b/Methode/ctrl.tex @@ -83,6 +83,7 @@ p && Capture la fen\^etre dans un fichier .png \\ \hline \hline \multicolumn{3}{|l|}{Analyse des segments flous extraits :} \\ Ctrl-i && Commute le type d'affichage des scans \\ +Ctrl-j && Commute l'affichage de la barre de s\'election \\ Ctrl-b && Commute le fond d'\'ecran de la fen\^etre principale. \\ + -- && Zoom \\ $< \wedge > \vee$ && D\'ecalage de l'observation \\