Skip to content
Snippets Groups Projects
Commit c5848d78 authored by even's avatar even
Browse files

Article: scan escapes

parent 072e9e29
No related branches found
No related tags found
No related merge requests found
Article/Fig_notions/escapeFirst_zoom.png

3.37 KiB | W: | H:

Article/Fig_notions/escapeFirst_zoom.png

15 KiB | W: | H:

Article/Fig_notions/escapeFirst_zoom.png
Article/Fig_notions/escapeFirst_zoom.png
Article/Fig_notions/escapeFirst_zoom.png
Article/Fig_notions/escapeFirst_zoom.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -77,11 +77,21 @@ fail again on a blurred segment escape from the directional scan. ...@@ -77,11 +77,21 @@ fail again on a blurred segment escape from the directional scan.
\begin{figure}[h] \begin{figure}[h]
\center \center
\begin{tabular}{c} \begin{tabular}{c@{\hspace{0.2cm}}c@{\hspace{0.2cm}}c}
\includegraphics[width=0.49\textwidth]{Fig_notions/escapeFirst_zoom.png} \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} \end{tabular}
\caption{Example of early detection failures \begin{picture}(1,1)(0,0)
on side escapes from the directional scan.} \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} \label{fig:escape}
\end{figure} \end{figure}
......
...@@ -36,6 +36,7 @@ BSStructureItem::BSStructureItem (int width, int height, const QImage *im, ...@@ -36,6 +36,7 @@ BSStructureItem::BSStructureItem (int width, int height, const QImage *im,
det = detector; det = detector;
displayItem = DISPLAY_MIN; displayItem = DISPLAY_MIN;
displayScanLines = false; displayScanLines = false;
displayInput = false;
this->im = im; this->im = im;
verbose = true; verbose = true;
infoPen = QPen (Qt::red, DEFAULT_PEN_WIDTH, Qt::SolidLine, infoPen = QPen (Qt::red, DEFAULT_PEN_WIDTH, Qt::SolidLine,
...@@ -274,6 +275,17 @@ void BSStructureItem::paintScansAndFilter (QPainter *painter, int step) ...@@ -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 // Displays filter output
if (det->isFiltering (step)) if (det->isFiltering (step))
{ {
...@@ -282,6 +294,13 @@ void BSStructureItem::paintScansAndFilter (QPainter *painter, int step) ...@@ -282,6 +294,13 @@ void BSStructureItem::paintScansAndFilter (QPainter *painter, int step)
BlurredSegment *bs = det->getBlurredSegment (step); BlurredSegment *bs = det->getBlurredSegment (step);
if (bs != NULL) paintPixels (painter, bs->getStartPt (), Qt::yellow); 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) if (verbose)
......
...@@ -76,10 +76,14 @@ public: ...@@ -76,10 +76,14 @@ public:
/** /**
* \brief Switches on or off the scan line display modality. * \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; } 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. * \brief Returns the displayed information title.
*/ */
...@@ -168,6 +172,8 @@ private: ...@@ -168,6 +172,8 @@ private:
int displayItem; int displayItem;
/** Scan display modality. */ /** Scan display modality. */
bool displayScanLines; bool displayScanLines;
/** Input selection display modality. */
bool displayInput;
/** Information text modality. */ /** Information text modality. */
bool verbose; bool verbose;
/** Information text style. */ /** Information text style. */
......
...@@ -97,6 +97,14 @@ bool BSStructureView::processKeyEvent (QKeyEvent *event) ...@@ -97,6 +97,14 @@ bool BSStructureView::processKeyEvent (QKeyEvent *event)
processed = false; processed = false;
break; 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 case Qt::Key_V : // Info display
grid->switchInfoDisplay (); grid->switchInfoDisplay ();
scene()->update (); scene()->update ();
...@@ -120,7 +128,7 @@ bool BSStructureView::processKeyEvent (QKeyEvent *event) ...@@ -120,7 +128,7 @@ bool BSStructureView::processKeyEvent (QKeyEvent *event)
// QRect (QPoint (0, 0), // QRect (QPoint (0, 0),
// QSize (grid->getWidth(), grid->getHeight())) // QSize (grid->getWidth(), grid->getHeight()))
// ).toImage().save ("structure.png"); // ).toImage().save ("structure.png");
// cout << "Structure shot in capture.png" << endl; // cout << "Structure shot in structure.png" << endl;
break; break;
case Qt::Key_Plus : // Zoom in case Qt::Key_Plus : // Zoom in
......
...@@ -83,6 +83,7 @@ p && Capture la fen\^etre dans un fichier .png \\ ...@@ -83,6 +83,7 @@ p && Capture la fen\^etre dans un fichier .png \\
\hline \hline \hline \hline
\multicolumn{3}{|l|}{Analyse des segments flous extraits :} \\ \multicolumn{3}{|l|}{Analyse des segments flous extraits :} \\
Ctrl-i && Commute le type d'affichage des scans \\ 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. \\ Ctrl-b && Commute le fond d'\'ecran de la fen\^etre principale. \\
+ -- && Zoom \\ + -- && Zoom \\
$< \wedge > \vee$ && D\'ecalage de l'observation \\ $< \wedge > \vee$ && D\'ecalage de l'observation \\
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment