Change copyright and format the code using clang-format

This commit is contained in:
jfmcarreira committed 2017-01-28 19:43:48 +00:00
1 parent a69c32bfbf
commit 8a60bb2766
122 files changed
+12950 -12139

No files matched your search

+9 -9
View File
@@ -1,5 +1,5 @@
/* This file is a part of plaYUVer project
* Copyright (C) 2014-2016 by Luis Lucas (luisfrlucas@gmail.com)
* Copyright (C) 2014-2017 by Luis Lucas (luisfrlucas@gmail.com)
* Joao Carreira (jfmcarreira@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -35,26 +35,27 @@ DisparityStereoSGBM::DisparityStereoSGBM()
m_uiNumberOfFrames = MODULE_REQUIRES_TWO_FRAMES;
m_uiModuleRequirements = MODULE_REQUIRES_SKIP_WHILE_PLAY | MODULE_REQUIRES_NEW_WINDOW | MODULE_REQUIRES_OPTIONS;
m_cModuleOptions.addOptions()/**/
( "block_size", m_uiBlockSize, "Block Size (positive odd number) [3]" )( "HHAlgorithm", m_bUseHH, "Use HH algorithm [false]" );
m_cModuleOptions.addOptions() /**/
( "block_size", m_uiBlockSize, "Block Size (positive odd number) [3]" )( "HHAlgorithm", m_bUseHH,
"Use HH algorithm [false]" );
m_pcDisparityFrame = NULL;
m_uiBlockSize = 3;
m_uiNumberOfDisparities = 0;
}
Bool DisparityStereoSGBM::create( std::vector<PlaYUVerFrame*> apcFrameList )
{
_BASIC_MODULE_API_2_CHECK_
m_pcDisparityFrame = new PlaYUVerFrame( apcFrameList[0]->getWidth(), apcFrameList[0]->getHeight(), PlaYUVerFrame::GRAY );
m_pcDisparityFrame =
new PlaYUVerFrame( apcFrameList[0]->getWidth(), apcFrameList[0]->getHeight(), PlaYUVerFrame::GRAY );
if( ( m_uiBlockSize % 2 ) == 0 )
{
m_uiBlockSize++;
}
m_uiNumberOfDisparities = ( ( apcFrameList[0]->getWidth() / 8 ) + 15 ) & -16;
Int cn = apcFrameList[0]->getNumberChannels();
#if( CV_MAJOR_VERSION == 3)
#if( CV_MAJOR_VERSION == 3 )
m_cStereoMatch = cv::StereoSGBM::create( 0, 16, m_uiBlockSize );
m_cStereoMatch->setPreFilterCap( 63 );
@@ -66,7 +67,7 @@ Bool DisparityStereoSGBM::create( std::vector<PlaYUVerFrame*> apcFrameList )
m_cStereoMatch->setSpeckleWindowSize( 100 );
m_cStereoMatch->setSpeckleRange( 32 );
m_cStereoMatch->setDisp12MaxDiff( 1 );
//m_cStereoMatch->setMode( alg == STEREO_HH ? StereoSGBM::MODE_HH : StereoSGBM::MODE_SGBM );
// m_cStereoMatch->setMode( alg == STEREO_HH ? StereoSGBM::MODE_HH : StereoSGBM::MODE_SGBM );
m_cStereoMatch->setMode( m_bUseHH ? cv::StereoSGBM::MODE_HH : cv::StereoSGBM::MODE_SGBM );
#else
m_cStereoMatch.preFilterCap = 63;
@@ -94,7 +95,7 @@ PlaYUVerFrame* DisparityStereoSGBM::process( std::vector<PlaYUVerFrame*> apcFram
return m_pcDisparityFrame;
}
cv::Mat disparityImage, disparityImage8;
#if( CV_MAJOR_VERSION == 3)
#if( CV_MAJOR_VERSION == 3 )
m_cStereoMatch->compute( leftImage, rightImage, disparityImage );
#else
m_cStereoMatch( leftImage, rightImage, disparityImage );
@@ -110,4 +111,3 @@ Void DisparityStereoSGBM::destroy()
delete m_pcDisparityFrame;
m_pcDisparityFrame = NULL;
}