Skip to content
Snippets Groups Projects
Commit abdb6275 authored by evenp's avatar evenp
Browse files

Crosswise tracking modality withdrawn

parent 71a10cca
No related branches found
No related tags found
No related merge requests found
......@@ -784,17 +784,6 @@ void BSDetectionWidget::keyPressEvent (QKeyEvent *event)
break;
case Qt::Key_U :
// DEV IN
if (event->modifiers () & Qt::ControlModifier)
{
// Switches the crosswise segment detection
detector.switchTrackCrosswise ();
extract ();
cout << "Crosswise segment detection "
<< (detector.trackCrosswiseOn () ? "on" : "off") << endl;
}
else
// DEV OUT
{
// Replays last extraction
cerr << "p1 update: " << p1.x () << " " << p1.y () << endl;
......
......@@ -256,16 +256,6 @@ public:
*/
inline void switchAutoRestart () { bst2->switchAutoRestart (); }
/**
* \brief Returns whether the crosswise segment detection is set.
*/
inline bool trackCrosswiseOn () const { return bst2->trackCrosswiseOn (); }
/**
* \brief Switches on or off the crosswise segment detection.
*/
inline void switchTrackCrosswise () { bst2->switchTrackCrosswise (); }
/**
* \brief Returns the preliminary detection modality status.
*/
......
......@@ -40,7 +40,7 @@ public:
/**
* \brief Checks if the blurred segment has at least two points.
*/
inline bool isLineable () const {
inline bool isExtending () const {
return (bsOK || bsFlat || leftOK || rightOK); }
/**
......
......@@ -26,7 +26,6 @@ BSTracker::BSTracker ()
fittingDelay = DEFAULT_FITTING_DELAY;
recordScans = false;
trackCrosswise = false;
assignedThicknessControlDelay = DEFAULT_ASSIGNED_THICKNESS_CONTROL_DELAY;
......@@ -261,14 +260,14 @@ BlurredSegment *BSTracker::fineTrack (int bsMaxWidth,
}
// Resets the scan stripe
if (count > fittingDelay && bs.isLineable ())
if (count > fittingDelay && bs.isExtending ())
{
// Stops the detection if the segment gets crosswise
if (count == fittingDelay + 1)
{
Vr2i dirn = bs.getSupportVector ();
if (4 * dirn.squaredScalarProduct (scandir)
< 3 * dirn.norm2 () * scandir.norm2 ())
< 3 * dirn.norm2 () * scandir.norm2 ()) // div. angle > 30 degrees
{
scanningLeft = false;
scanningRight = false;
......@@ -276,20 +275,9 @@ BlurredSegment *BSTracker::fineTrack (int bsMaxWidth,
}
}
int ppa, ppb, ppc;
bs.getLine()->getMedialAxis (ppa, ppb, ppc);
bs.getLine()->getCentralLine (ppa, ppb, ppc);
ds->bindTo (ppa, ppb, ppc);
}
else if (trackCrosswise && count > 3 && bs.isLineable ())
{
Vr2i dirn = bs.getSupportVector ();
if (4 * dirn.squaredScalarProduct (scandir)
< 3 * dirn.norm2 () * scandir.norm2 ())
{
scanningLeft = false;
scanningRight = false;
fail += FAILURE_LOST_ORIENTATION;
}
}
// Extends on right
if (scanningRight)
......
......@@ -56,7 +56,7 @@ public:
* Finer detection using gradient ridges and direction input.
* @param bsMaxWidth Initial assigned maximal width of the blurred segment.
* @param center Central point of the scan.
* @param scandir Scan direction
* @param scandir Scan stripe direction.
* @param scanwidth Width of the scan strip.
* @param gref Gradient vector reference to select candidates.
*/
......@@ -86,16 +86,6 @@ public:
inline void switchAutoRestart () {
minRestart = (minRestart == 1 ? acceptedLacks : 1); }
/**
* \brief Returns whether the crosswise segment detection is set.
*/
inline bool trackCrosswiseOn () const { return trackCrosswise; }
/**
* \brief Switches on or off the crosswise segment detection.
*/
inline void switchTrackCrosswise () { trackCrosswise = ! trackCrosswise; }
/**
* \brief Returns the proximity test status.
*/
......@@ -209,8 +199,6 @@ private :
/** Minimal detection width before activating the dynamical scans. */
int fittingDelay;
/** Crosswise segment detection modality. */
bool trackCrosswise;
/** Count of stable point insertion before activation of ATC. */
int assignedThicknessControlDelay;
......
......@@ -82,12 +82,12 @@ public:
a = this->a; b = this->b; c = this->c; nu = this->nu; }
/**
* \brief Sets given values with the three medial axis parameters.
* \brief Sets given values with the three central naive line parameters.
* @param a X Slope parameter to provide.
* @param b Y Slope parameter to provide.
* @param c0 Intercept parameter of the median axis.
* @param c0 Intercept parameter of the central naive line.
*/
inline void getMedialAxis (int &a, int &b, int &c0) const {
inline void getCentralLine (int &a, int &b, int &c0) const {
a = this->a; b = this->b; c0 = c + nu / 2; }
/**
......
......@@ -28,6 +28,7 @@ b && Ajuste le contraste de l'image \\
c && Commute le jeu de couleurs d'affichage des segments flous \\
d && Commute le style d'affichage des segments flous \\
e && Inverse la direction de r\'ef\'erence (autre bord) \\
f && Ajuste le rapport de longueur appliqu\'e lors du test NFA \\
g && Ajuste la sensibilit\'e du d\'etecteur (seuil du gradient) \\
j && Ajuste le seuil de voisinage pour les suivis rapides \\
k && Ajuste la taille minimale des fragments \\
......@@ -47,9 +48,7 @@ z && Ajuste le d\'elai de d\'eclenchement du contr\^ole de la consigne d'\'epais
Ctrl-b && Commute le fond d'\'ecran de la fen\^etre principale \\
Ctrl-d && Commute la d\'etection des bords oppos\'es en multi-d\'etection \\
Ctrl-e && Commute la prise en compte de la direction du bord (trait / contour) \\
Ctrl-f && Commute le pr\'e-filtrage (segment initial) \\
Ctrl-g && Commute la directionnalit\'e (ortho) des scans \\
Ctrl-h && Commute le filtrage du segment final \\
Ctrl-f && Commute le filtrage NFA \\
Ctrl-j && Commute la contrainte de voisinage pour les suivis rapides \\
Ctrl-k && Commute le test de fragmentation \\
Ctrl-l && Commute le test initial de densit\'e \\
......@@ -57,16 +56,12 @@ Ctrl-m && Commute la d\'etection multiple \\
Ctrl-n && Commute la limitation de l'extension de la d\'etection initiale \\
Ctrl-o && Commute l'affichage des mesures des segments d\'etect\'es \\
Ctrl-p && Commute la d\'etection pr\'eliminaire \\
Ctrl-q && Commute le contr\^ole dynamique des scans \\
Ctrl-r && Commute la dilatation du masque d'occupation \\
Ctrl-s && Commute le test final de taille minimale des segments flous \\
Ctrl-t && Commute la gestion des reprises sur interruption (1 / longueur absence) \\
Ctrl-u && Commute la d\'etection des segments en travers \\
Ctrl-v && Commute l'affichage du r\'esultat de la d\'etection en console (verbose) \\
Ctrl-w && Commute le recentrage du scan sur le segment d\'etect\'e \\
Ctrl-x && Commute l'ancien (sans ADS et ATC) et le nouveau d\'etecteur \\
Ctrl-y && Commute le test de densit\'e final \\
Ctrl-z && Commute le contr\^ole de la consigne d'\'epaisseur \\
$<>$ && D\'ecale horizontalement l'affichage sur une grosse image \\
$\wedge\vee$ && D\'ecale verticalement l'affichage sur une grosse image \\
+- && Zoom (ou d\'ezoome) sur une grosse image \\
......@@ -114,6 +109,10 @@ $\wedge \vee$ && Parcours des bandes \\
$< \wedge > \vee$ && D\'ecalage de l'observation \\
\hline \hline
\multicolumn{3}{|l|}{Param\`etres d'ex\'ecution :} \\
{\tt -p} && Lance FBSD avec la fen\^etre d'analyse des profils. \\
{\tt -s} && Lance FBSD avec la fen\^etre d'analyse de la d\'etection. \\
{\tt -i} && Lance FBSD avec la fen\^etre d'analyse de la d\'etection initiale. \\
{\tt -psi} && Lance FBSD avec les 3 fen\^etres auxiliaires. \\
{\tt -out} && Sort les lignes d'une d\'etection auto sur l'image fournie
dans {\tt naivelines.txt}. \\
{\tt -random} && Lance un test de perfomance sur 1000 images synth\'etiques. \\
......
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