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

Code: Synthetic test image output and input

parent 8b0a27ca
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,7 @@ thickness value output by the new detector. ...@@ -15,7 +15,7 @@ thickness value output by the new detector.
Moreover, we did not find any data base with ground truth including Moreover, we did not find any data base with ground truth including
line thickness. line thickness.
Therefore, we proceed in two steps: Therefore, we proceed in two steps:
(i) evaluation on synthetic images of the new concepts enhancements (i) evaluation on synthetic images of the new concepts enhancement
on line orientation and thickness estimation; on line orientation and thickness estimation;
(ii) evaluation of more global performance of the proposed approach (ii) evaluation of more global performance of the proposed approach
compared to other detectors. compared to other detectors.
......
This diff is collapsed.
...@@ -29,7 +29,13 @@ public: ...@@ -29,7 +29,13 @@ public:
~BSRandomTester (); ~BSRandomTester ();
/** /**
* \brief Runs a random test. * \brief Runs or replays a single random test.
* @param in Replays if set to true, otherwise runs a new test.
*/
void singleTest (bool in);
/**
* \brief Runs a complete random test.
*/ */
void randomTest (); void randomTest ();
...@@ -150,11 +156,27 @@ private: ...@@ -150,11 +156,27 @@ private:
double *m_long_absadiff; double *m_long_absadiff;
/**
* \brief Initializes local data associated to the count of runs.
*/
void initRuns ();
/**
* \brief Initializes local data associated to the count of random segments.
*/
void initSegs ();
/** /**
* \brief Generates a new random image of segments. * \brief Generates a new random image of segments.
*/ */
void generateImage (); void generateImage ();
/**
* \brief Loads a randomly generated image of segments.
* Returns the loading success condition.
*/
bool reloadImage ();
/** /**
* \brief Builds and returns the tested maps. * \brief Builds and returns the tested maps.
*/ */
......
...@@ -11,6 +11,7 @@ int main (int argc, char *argv[]) ...@@ -11,6 +11,7 @@ int main (int argc, char *argv[])
int val = 0; int val = 0;
int imageName = 0; int imageName = 0;
bool random = false, testing = false; bool random = false, testing = false;
bool randout = false, randin = false; // DEV
bool xt = false, yt = false; // DEV bool xt = false, yt = false; // DEV
bool out = false; bool out = false;
QApplication app (argc, argv); QApplication app (argc, argv);
...@@ -33,6 +34,18 @@ int main (int argc, char *argv[]) ...@@ -33,6 +34,18 @@ int main (int argc, char *argv[])
if (string(argv[i]).at(0) == '-') if (string(argv[i]).at(0) == '-')
{ {
if (string(argv[i]) == string ("-random")) random = true; if (string(argv[i]) == string ("-random")) random = true;
// DEV IN
else if (string(argv[i]) == string ("-randout"))
{
random = true;
randout = true;
}
else if (string(argv[i]) == string ("-randin"))
{
random = true;
randin = true;
}
// DEV OUT
else if (string(argv[i]) == string ("-test")) testing = true; else if (string(argv[i]) == string ("-test")) testing = true;
// DEV IN // DEV IN
else if (string(argv[i]) == string ("-own")) else if (string(argv[i]) == string ("-own"))
...@@ -100,11 +113,16 @@ int main (int argc, char *argv[]) ...@@ -100,11 +113,16 @@ int main (int argc, char *argv[])
if (random) if (random)
{ {
BSRandomTester *tester = new BSRandomTester (); BSRandomTester *tester = new BSRandomTester ();
tester->randomTest (); // DEV IN
if (randout) tester->singleTest (false);
else if (randin) tester->singleTest (true);
else
// DEV OUT
tester->randomTest ();
delete tester; delete tester;
return (EXIT_SUCCESS); return (EXIT_SUCCESS);
} }
else if (out) if (out)
{ {
QImage im; QImage im;
if (imageName != 0) im.load (argv[imageName]); if (imageName != 0) im.load (argv[imageName]);
......
...@@ -34,7 +34,7 @@ We would like to thank the editors and reviewers for their work and ...@@ -34,7 +34,7 @@ We would like to thank the editors and reviewers for their work and
for their constructive comments, questions and suggestions. for their constructive comments, questions and suggestions.
Because the paper already reaches the 10 pages limit, and in order to Because the paper already reaches the 10 pages limit, and in order to
avoid removal of possibly valuable contents for paper understanding, avoid removal of possibly valuable contents for paper understanding,
additional data are added to the github, that is referenced in the paper complementary data are added to the github, that is referenced in the paper
({\tt https://github.com/evenp/FBSD}). ({\tt https://github.com/evenp/FBSD}).
A detailed list of the changes is given below with also some specific A detailed list of the changes is given below with also some specific
answers to raised questions. answers to raised questions.
...@@ -73,7 +73,7 @@ encourages reproducibility. ...@@ -73,7 +73,7 @@ encourages reproducibility.
\item Writing quality of the paper is good. \item Writing quality of the paper is good.
\end{itemize} \end{itemize}
\begin{answer} \begin{answer}
Thanks. Thanks for positive remarks.
\end{answer} \end{answer}
\item {\bf 3. Weaknesses. Consider significance of key ideas, experiments, \item {\bf 3. Weaknesses. Consider significance of key ideas, experiments,
...@@ -90,7 +90,7 @@ Recognition (pp. 2031-2039).]), but mainly with three literature works, ...@@ -90,7 +90,7 @@ Recognition (pp. 2031-2039).]), but mainly with three literature works,
latest of which was published in 2015. \\ latest of which was published in 2015. \\
\begin{answer} \begin{answer}
Thanks for pointing this out. We have added this reference to the paper. Thanks for pointing this out. We have added this reference in the paper.
However, we prefer let the evaluations to be completed in an extended journal However, we prefer let the evaluations to be completed in an extended journal
version for several reasons: version for several reasons:
(i) the source code provided by the authors is written in Matlab, that (i) the source code provided by the authors is written in Matlab, that
...@@ -99,7 +99,7 @@ language); ...@@ -99,7 +99,7 @@ language);
(ii) this method presents some important ranking level parameters which (ii) this method presents some important ranking level parameters which
could largely influence achieved results, could largely influence achieved results,
and it should require more time to ensure fair comparisons. \\ and it should require more time to ensure fair comparisons. \\
We briefly mention it at the beginning of section 4. We briefly mention these points in the paper at the beginning of section 4.
\end{answer} \end{answer}
Some notes are as belows: Some notes are as belows:
...@@ -125,13 +125,13 @@ that were used in the experiments and the performance of both versions of ...@@ -125,13 +125,13 @@ that were used in the experiments and the performance of both versions of
the method obtained on them ? the method obtained on them ?
\begin{answer} \begin{answer}
Due to page limitations (the organizers rather suggested us to add Due to page limitations (the organizers rather suggested us to add
complementary materials in a web page), we could not add any figure nor complementary materials in a referenced web page), we could not add any
respective performance result in the paper. However, a couple of examples figure nor respective performance result in the paper. However, a couple
of synthesized images is already available in the mentioned github, and of examples of synthesized images is already available in the mentioned
we have completed the table with associated results. In accordance to the github, and we have completed the table with associated results.
measured standard deviations obtained on the whole set of 1000 randomly In accordance to the measured standard deviations obtained on the whole
generated images, large variations can be observed in such results on set of 1000 randomly generated images, large variations can be observed
individual images. in such results on individual images.
\end{answer} \end{answer}
\item What is understood from the paper is the performance results presented \item What is understood from the paper is the performance results presented
...@@ -169,7 +169,7 @@ Experiments on synthetic images aim at assessing the improved performance ...@@ -169,7 +169,7 @@ Experiments on synthetic images aim at assessing the improved performance
beween formal and actual versions of the detector, including the thickness beween formal and actual versions of the detector, including the thickness
value estimation. The synthesized images are generated with a thickness value estimation. The synthesized images are generated with a thickness
varying from 2 up to 5 pixels. varying from 2 up to 5 pixels.
Therefore the initial assigned thickness is set to a greater value : 7. \\ Therefore the initial assigned thickness is set to a greater value: 7. \\
The other detectors aim at providing thin lines and may reject too The other detectors aim at providing thin lines and may reject too
scattered image lines. To adapt to this behavior, we retrict the detection scattered image lines. To adapt to this behavior, we retrict the detection
to thin lines using the initial assigned thickness to 3 pixels. \\ to thin lines using the initial assigned thickness to 3 pixels. \\
...@@ -189,7 +189,7 @@ We have added all the required informations in the github ...@@ -189,7 +189,7 @@ We have added all the required informations in the github
table (T, N and L values were already available, along with mean thickness W). table (T, N and L values were already available, along with mean thickness W).
We notice that achieved values have less meaning here, because as explained We notice that achieved values have less meaning here, because as explained
in the paper, the lines detected by the former method are more likely to in the paper, the lines detected by the former method are more likely to
incorporate spurious points, that artificially grow the width and length incorporate spurious points, that artificially grows the width and length
values. values.
\end{answer} \end{answer}
......
...@@ -116,7 +116,11 @@ $< \wedge > \vee$ && D\'ecalage de l'observation \\ ...@@ -116,7 +116,11 @@ $< \wedge > \vee$ && D\'ecalage de l'observation \\
\multicolumn{3}{|l|}{Param\`etres d'ex\'ecution :} \\ \multicolumn{3}{|l|}{Param\`etres d'ex\'ecution :} \\
{\tt -out} && Sort les lignes d'une d\'etection auto sur l'image fournie {\tt -out} && Sort les lignes d'une d\'etection auto sur l'image fournie
dans {\tt naivelines.txt}. \\ dans {\tt naivelines.txt}. \\
{\tt -random} && Lance un test de perfomance sur images synth\'etiques. \\ {\tt -random} && Lance un test de perfomance sur 1000 images synth\'etiques. \\
{\tt -randout}
&& Lance un test de perfomance sur 1 image synth\'etique avec sauvegarde. \\
{\tt -randin}
&& Rejoue un test de perfomance sur 1 image synth\'etique sauvegard\'ee. \\
\hline \hline
\end{tabular} \end{tabular}
......
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