Unverified Commit 93a48ba8 authored by Wieland Morgenstern's avatar Wieland Morgenstern Committed by GitHub

Merge pull request #98 from stitchEm/w-m/pto-parsing

PTGui file parsing with float e+ notation
parents 20b4202b 2fee5d2a
......@@ -894,7 +894,7 @@ add_subdirectory(samples/depth)
# ----------------------------------------------------------------------------
# libvideostitch unit tests
# ----------------------------------------------------------------------------
if(LIB_TESTS)
if(BUILD_LIB_TESTS)
add_subdirectory(src/test)
endif()
......
......@@ -538,8 +538,8 @@ Potential<ReaderInputDefinition> ReaderInputDefinition::parseFromPtoLine(
}
break;
default:
//[0-9.eE]
if (!(('0' <= *lp && *lp <= '9') || *lp == 'e' || *lp == 'E' || *lp == '.' || *lp == '-')) {
//[0-9.eE+-]
if (!(('0' <= *lp && *lp <= '9') || *lp == 'e' || *lp == 'E' || *lp == '.' || *lp == '-' || *lp == '+')) {
char c = *lp;
*lp = 0;
switch (state) {
......@@ -758,8 +758,8 @@ Potential<InputDefinition> InputDefinition::parseFromPtoLine(char* line,
}
break;
default:
//[0-9.eE]
if (!(('0' <= *lp && *lp <= '9') || *lp == 'e' || *lp == 'E' || *lp == '.' || *lp == '-')) {
//[0-9.eE+-]
if (!(('0' <= *lp && *lp <= '9') || *lp == 'e' || *lp == 'E' || *lp == '.' || *lp == '-' || *lp == '+')) {
char c = *lp;
*lp = 0;
switch (state) {
......@@ -1062,8 +1062,8 @@ Status PanoDefinition::readParams(char* line) {
}
break;
default:
//[0-9.eE]
if (!(('0' <= *lp && *lp <= '9') || *lp == 'e' || *lp == 'E' || *lp == '.' || *lp == '-')) {
//[0-9.eE+-]
if (!(('0' <= *lp && *lp <= '9') || *lp == 'e' || *lp == 'E' || *lp == '.' || *lp == '-' || *lp == '+')) {
char c = *lp;
*lp = 0;
switch (state) {
......
......@@ -122,7 +122,7 @@ void ptsToPanoDefinitionTest() {
"# input images:\n"
"#-dummyimage\n"
"# The following line contains a 'dummy image' containing some global parameters for the project\n"
"o w1 h1 y0 r0 p0 v124.785166312651 a-0.1712794685889779 b0.6799971985994054 c-0.7660565920132166 f3 "
"o w1 h1 y0 r0 p0 v1.24785166312651e+02 a-0.1712794685889779 b0.6799971985994054 c-0.7660565920132166 f3 "
"d0.0009362105412644209 e-0.0007190110954970641 g0 t0\n"
"#-imgfile 1920 1440 \"input-00.jpg\"\n"
"#-metadata -1 -1 -1 0000-00-00T00:00:00 3*8 0 -1 -1 -1 * * * curve -1 * T *\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment