Changeset 604 in 3DVCSoftware


Ignore:
Timestamp:
31 Aug 2013, 20:04:13 (11 years ago)
Author:
tech
Message:
  • Modified fix regarding camera parameter warnings. (H_3D_FIX_REN_WARNING)
  • Added shark sequence cfg files
Location:
branches/HTM-DEV-2.0-dev0
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-2.0-dev0/source/App/TAppEncoder/TAppEncTop.cpp

    r603 r604  
    772772  printRateSummary();
    773773
    774 #if H_3D_FIX_REN_WARNING
     774#if H_3D_REN_MAX_DEV_OUT
    775775  Double dMaxDispDiff = m_cCameraData.getMaxShiftDeviation();
    776776
  • branches/HTM-DEV-2.0-dev0/source/App/TAppRenderer/TAppRendererTop.cpp

    r603 r604  
    480480  }
    481481
    482 #if H_3D_FIX_REN_WARNING
     482#if H_3D_REN_MAX_DEV_OUT
    483483  Double dMaxDispDiff = m_cCameraData.getMaxShiftDeviation();
    484484
  • branches/HTM-DEV-2.0-dev0/source/Lib/TAppCommon/TAppComCamPara.cpp

    r603 r604  
    611611}
    612612
    613 
    614613Void
    615614TAppComCamPara::xGetGeometryData( Int iView, UInt uiFrame, Double& rdFocalLength, Double& rdPosition, Double& rdCameraShift, Bool& rbInterpolated )
    616615{
    617616  UInt uiFoundLine = -1;
     617#if H_3D_FIX_REN_WARNING
     618  if ( !xGetCameraDataRow( iView, uiFrame, uiFoundLine ) && xIsIn( m_aiSortedBaseViews, iView ))
     619#else 
    618620  if ( !xGetCameraDataRow( iView, uiFrame, uiFoundLine ) )
     621#endif
    619622  {
    620623    AOT( m_aadCameraParameters[ uiFoundLine ].size() < 6 );
     
    632635    Int  iDummy;
    633636
     637#if H_3D_FIX_REN_WARNING
     638    if( !xGetLeftRightView( iView, m_aiSortedBaseViews, iLeftView, iRightView, iDummy, iDummy ) ||
     639#else
    634640    if( !xGetLeftRightView( iView, m_aiViewsInCfgFile, iLeftView, iRightView, iDummy, iDummy ) ||
     641#endif
    635642         xGetCameraDataRow( iLeftView,  uiFrame, uiLeftViewLine  )                             ||
    636643         xGetCameraDataRow( iRightView, uiFrame, uiRightViewLine )
    637644      )
    638645    {
     646#if H_3D_FIX_REN_WARNING
     647      std::cerr << "No left or no right base view next to view " << (Double)iView / m_dViewNumPrec << " for Frame " << uiFrame << " given in CameraParameterFile" << std::endl;
     648#else
    639649      std::cerr << "No Left or no Right View next to View " << (Double)iView / m_dViewNumPrec << " for Frame " << uiFrame << " given in CameraParameterFile" << std::endl;
     650#endif
    640651      AOT(true);
    641652      exit( EXIT_FAILURE );
     
    841852  Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_uiCamParsCodedPrecision + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
    842853  Int     iLog2DivChroma = iLog2DivLuma + 1;
    843 #if !H_3D_FIX_REN_WARNING
     854
    844855  Double  dMaxDispDev    = 0.0;
    845856  Double  dMaxRndDispDvL = 0.0;
    846857  Double  dMaxRndDispDvC = 0.0;
    847 #endif
     858
    848859  for( UInt uiSourceView = 0; uiSourceView < uiNumberSourceViews; uiSourceView++ )
    849860  {
     
    887898        // integer-valued look-up tables
    888899        Int64   iTempScale      = (Int64)uiDepthValue * iScale;
    889 #if !H_3D_FIX_REN_WARNING       
    890900        Int64   iTestScale      = ( iTempScale + iOffset       );   // for checking accuracy of camera parameters
    891 #endif
    892901        Int64   iShiftLuma      = ( iTempScale + iOffsetLuma   ) >> iLog2DivLuma;
    893902        Int64   iShiftChroma    = ( iTempScale + iOffsetChroma ) >> iLog2DivChroma;
     
    896905
    897906        // maximum deviation
    898 #if H_3D_FIX_REN_WARNING       
     907#if H_3D_REN_MAX_DEV_OUT
    899908        m_dMaxShiftDeviation = std::max( m_dMaxShiftDeviation, fabs( Double( (Int) iShiftLuma   ) - dShiftLuma   ) / Double( 1 << m_iLog2Precision ) );       
    900 #else
     909#endif
    901910        dMaxDispDev     = std::max( dMaxDispDev,    fabs( Double( (Int) iTestScale   ) - dShiftLuma * Double( 1 << iLog2DivLuma ) ) / Double( 1 << iLog2DivLuma ) );
    902911        dMaxRndDispDvL  = std::max( dMaxRndDispDvL, fabs( Double( (Int) iShiftLuma   ) - dShiftLuma   ) );
    903912        dMaxRndDispDvC  = std::max( dMaxRndDispDvC, fabs( Double( (Int) iShiftChroma ) - dShiftChroma ) );
    904 #endif
    905913      }
    906914
     
    912920  }
    913921
    914 #if !H_3D_FIX_REN_WARNING
    915922  // check maximum deviation
    916923  Double  dMaxAllowedDispDev    =       Double( 1 << m_iLog2Precision ) / Double( 1 << m_uiCamParsCodedPrecision );       //  counting only the impact of camera parameter rounding
     
    934941    }
    935942  }
    936 #endif
    937943}
    938944
     
    10361042  m_bCamParsCodedPrecSet      = false;
    10371043
    1038 #if H_3D_FIX_REN_WARNING
     1044#if H_3D_REN_MAX_DEV_OUT
    10391045  m_dMaxShiftDeviation        = -1;
    10401046#endif
     
    11671173    if( m_aiViewsInCfgFile.size() < 2 )
    11681174    {
    1169     std::cerr << "Failed reading config file" << std::endl;
     1175      std::cerr << "Failed reading config file" << std::endl;
    11701176      std::cerr << "At least two views must be given" << std::endl;
    11711177      exit( EXIT_FAILURE );
     
    13321338      else
    13331339      {
    1334       for( UInt uiFrame = m_uiFirstFrameId; uiFrame <= m_uiLastFrameId; uiFrame++ )
    1335       {
    1336         Bool bInterpolatedCur;
    1337         xGetGeometryData( m_aiBaseViews[ uiBaseView ], uiFrame, dDummy, dDummy, dDummy, bInterpolatedCur );
    1338         xGetZNearZFar   ( m_aiBaseViews[ uiBaseView ], uiFrame, dDummy, dDummy );
    1339 
    1340         if( bInterpolatedCur )
     1340        for( UInt uiFrame = m_uiFirstFrameId; uiFrame <= m_uiLastFrameId; uiFrame++ )
    13411341        {
    1342           std::cerr << "Error: CameraParameters for BaseView " << (Double)m_aiBaseViews[ uiBaseView ] / m_dViewNumPrec << " and Frame " << uiFrame << " not defined. "  << std::endl;
    1343           exit( EXIT_FAILURE );
     1342          Bool bInterpolatedCur;
     1343          xGetGeometryData( m_aiBaseViews[ uiBaseView ], uiFrame, dDummy, dDummy, dDummy, bInterpolatedCur );
     1344          xGetZNearZFar   ( m_aiBaseViews[ uiBaseView ], uiFrame, dDummy, dDummy );
     1345
     1346          if( bInterpolatedCur )
     1347          {
     1348            std::cerr << "Error: CameraParameters for BaseView " << (Double)m_aiBaseViews[ uiBaseView ] / m_dViewNumPrec << " and Frame " << uiFrame << " not defined. "  << std::endl;
     1349            exit( EXIT_FAILURE );
     1350          }
    13441351        }
    13451352      }
    1346 
    1347       }
    1348     }
     1353    }
     1354#if H_3D_FIX_REN_WARNING
     1355    Bool bIgnoreFirst = true;     
     1356    for( UInt uiERView = 0; uiERView < m_aiSynthViews.size() && !m_bSetupFromCoded; uiERView++ )
     1357    {
     1358      if ( xIsIn(m_aiViewsInCfgFile, m_aiSynthViews[ uiERView ] ) )
     1359      {
     1360        if ( bIgnoreFirst )
     1361        {
     1362          std::cout << "Ignoring CameraParameterFile entries for virtual view(s): " ;
     1363          //GT: Integer precision virtual view camera parameters are always interpolated from coded views camera parameters.
     1364          bIgnoreFirst = false;
     1365        }
     1366        std::cout << (Double)m_aiSynthViews[ uiERView ] / m_dViewNumPrec << " " ;
     1367      }
     1368    }
     1369    if ( !bIgnoreFirst )
     1370    {
     1371      std::cout << std::endl;
     1372    }
     1373#endif
    13491374
    13501375    Bool bInterpolateFirst = true;
     
    13651390        if ( bInterpolateFirst )
    13661391        {
     1392#if H_3D_FIX_REN_WARNING                       
     1393          std::cout << "Interpolating camera parameters      for virtual view(s): " ;
     1394#else
    13671395          std::cout << "Interpolating Camera Parameters for View(s) " ;
     1396#endif
    13681397            bInterpolateFirst = false;
    13691398        }         
     
    14691498}
    14701499
     1500#if H_3D_FIX_REN_WARNING
     1501Bool
     1502  TAppComCamPara::xIsIn( std::vector<Int>& rVec, Int iElem)
     1503{
     1504  Bool bFound = false;
     1505  for (Int idx = 0; idx < rVec.size() && !bFound; idx++)
     1506  {
     1507    bFound = bFound || rVec[idx] == iElem;
     1508  }
     1509  return bFound;
     1510}
     1511#endif
     1512
    14711513Int TAppComCamPara::getRelDistLeft( Int iSynthViewIdx, Int iLeftViewIdx, Int iRightViewIdx )
    14721514{
  • branches/HTM-DEV-2.0-dev0/source/Lib/TAppCommon/TAppComCamPara.h

    r603 r604  
    6767  Bool                m_bCamParsCodedPrecSet;                 ///< Coded Cam Para precision set for current frame;
    6868 
    69 #if H_3D_FIX_REN_WARNING
     69#if H_3D_REN_MAX_DEV_OUT
    7070  Double              m_dMaxShiftDeviation;                   ///< Maximum deviation of shifts with integer precision compare to double precision
    7171#endif
     
    129129  Void  xSetupBaseViewsFromCoded  ();
    130130  Void  xSetupBaseViews           ( Char* pchBaseViewNumbers, UInt uiNumBaseViews );
     131#if H_3D_FIX_REN_WARNING
     132  Bool  xIsIn                     ( std::vector<Int>& rVec, Int iNumber);
     133#endif
     134
    131135
    132136  // functions for getting and setting scales and offsets
     
    183187  UInt                getCurFrameId             ()  { return m_iCurrentFrameId;   }
    184188  static Void         convertNumberString       ( Char* pchViewNumberString, std::vector<Int>& raiViewNumbers, Double dViewNumPrec );
    185 #if H_3D_FIX_REN_WARNING
     189#if H_3D_REN_MAX_DEV_OUT
    186190  Double              getMaxShiftDeviation      () { return m_dMaxShiftDeviation; };
    187191#endif
     
    217221  Int**               getCodedOffset            ()  { return m_aaiCodedOffset;          }
    218222};
    219 
    220 
    221223
    222224
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TypeDef.h

    r603 r604  
    141141
    142142/////////////////////////////////////////////////////////////////////////////////////////
    143 ///////////////////////////////////   NEW ADOPTIONS       ///////////////////////////////
     143///////////////////////////////////   HTM-8.0 INTEGRATIONS //////////////////////////////
    144144/////////////////////////////////////////////////////////////////////////////////////////
    145145
     
    196196#endif
    197197
     198#define H_3D_REN_MAX_DEV_OUT              0  // Output maximal possible shift deviation
     199
    198200/// FIXES
    199201#define H_3D_FIX_BVSP                     1  // DV from NBDV instead of DoNBDV should be used
     
    201203#define H_3D_FIX_REN                      1  // fix of erroneous inpainting for renderer
    202204#define H_3D_FIX_REN_WARNING              1  // fix of warning related to camera parameter precision
     205
    203206#define H_3D_FIX_UINT_WARNING             1  // explicit in VSD
    204207#endif // H_3D
     208
     209
     210/////////////////////////////////////////////////////////////////////////////////////////
     211///////////////////////////////////   HTM-8.1 INTEGRATIONS //////////////////////////////
     212/////////////////////////////////////////////////////////////////////////////////////////
     213
     214// Please put HTM-8.1 Integration defines here, when possible
     215
     216
     217
    205218
    206219/////////////////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.