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.
\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}
......
......@@ -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)
......
......@@ -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. */
......
......@@ -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
......
......@@ -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 \\
......
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