Rename module DisparityCVVar
This commit is contained in:
1 parent
a528b686ec
commit
93095363b8
3 files changed
+16
-16
No files matched your search
@@ -7,6 +7,6 @@ ADD_MODULE( FrameDifference "FrameDifference.cpp" )
|
||||
#ADD_MODULE( MeasurePSNR "MeasurePSNR.cpp" )
|
||||
|
||||
IF( USE_OPENCV )
|
||||
ADD_MODULE( DisparityCVVar "DisparityCVVar.cpp" )
|
||||
ADD_MODULE( DisparityStereoVar "DisparityStereoVar.cpp" )
|
||||
ENDIF()
|
||||
|
||||
@@ -18,19 +18,19 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file DisparityCVVar.cpp
|
||||
* \file DisparityStereoVar.cpp
|
||||
* \brief Measure the disparity between two images using the Stereo Var method (OpenCV)
|
||||
*/
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "DisparityCVVar.h"
|
||||
#include "DisparityStereoVar.h"
|
||||
#include "PlaYUVerFrame.h"
|
||||
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
static PlaYUVerModuleDefinition DisparityCVVarDef =
|
||||
static PlaYUVerModuleDefinition DisparityStereoVarDef =
|
||||
{
|
||||
FRAME_LEVEL_MODULE,
|
||||
"Disparity",
|
||||
@@ -41,9 +41,9 @@ static PlaYUVerModuleDefinition DisparityCVVarDef =
|
||||
!APPLY_WHILE_PLAYING,
|
||||
};
|
||||
|
||||
DisparityCVVar::DisparityCVVar()
|
||||
DisparityStereoVar::DisparityStereoVar()
|
||||
{
|
||||
setModuleDefinition( DisparityCVVarDef );
|
||||
setModuleDefinition( DisparityStereoVarDef );
|
||||
m_pcDisparityFrame = NULL;
|
||||
m_cStereoVar.levels = 3; // ignored with USE_AUTO_PARAMS
|
||||
m_cStereoVar.pyrScale = 0.5; // ignored with USE_AUTO_PARAMS
|
||||
@@ -59,13 +59,13 @@ DisparityCVVar::DisparityCVVar()
|
||||
m_cStereoVar.flags = m_cStereoVar.USE_SMART_ID | m_cStereoVar.USE_AUTO_PARAMS | m_cStereoVar.USE_INITIAL_DISPARITY | m_cStereoVar.USE_MEDIAN_FILTERING;
|
||||
}
|
||||
|
||||
Void DisparityCVVar::create( PlaYUVerFrame* InputFrame )
|
||||
Void DisparityStereoVar::create( PlaYUVerFrame* InputFrame )
|
||||
{
|
||||
m_pcDisparityFrame = new PlaYUVerFrame( InputFrame->getWidth(), InputFrame->getHeight(), PlaYUVerFrame::GRAY );
|
||||
m_cStereoVar.minDisp = -( ( ( InputFrame->getWidth() / 8 ) + 15 ) & -16 );
|
||||
}
|
||||
|
||||
PlaYUVerFrame* DisparityCVVar::process( PlaYUVerFrame* InputLeft, PlaYUVerFrame* InputRight )
|
||||
PlaYUVerFrame* DisparityStereoVar::process( PlaYUVerFrame* InputLeft, PlaYUVerFrame* InputRight )
|
||||
{
|
||||
cv::Mat leftImage = InputLeft->getCvMat();
|
||||
cv::Mat rightImage = InputRight->getCvMat();
|
||||
@@ -78,7 +78,7 @@ PlaYUVerFrame* DisparityCVVar::process( PlaYUVerFrame* InputLeft, PlaYUVerFrame*
|
||||
return m_pcDisparityFrame;
|
||||
}
|
||||
|
||||
Void DisparityCVVar::destroy()
|
||||
Void DisparityStereoVar::destroy()
|
||||
{
|
||||
if( m_pcDisparityFrame )
|
||||
delete m_pcDisparityFrame;
|
||||
@@ -18,12 +18,12 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file DisparityCVVar.h
|
||||
* \file DisparityStereoVar.h
|
||||
* \brief Measure the disparity between two images using the Stereo Var method (OpenCV)
|
||||
*/
|
||||
|
||||
#ifndef __DISPARITYCVVAR_H__
|
||||
#define __DISPARITYCVVAR_H__
|
||||
#ifndef __DISPARITYSTEREOVAR_H__
|
||||
#define __DISPARITYSTEREOVAR_H__
|
||||
|
||||
#include "config.h"
|
||||
|
||||
@@ -39,14 +39,14 @@
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
class DisparityCVVar: public PlaYUVerModuleIf
|
||||
class DisparityStereoVar: public PlaYUVerModuleIf
|
||||
{
|
||||
private:
|
||||
PlaYUVerFrame* m_pcDisparityFrame;
|
||||
cv::StereoVar m_cStereoVar;
|
||||
public:
|
||||
DisparityCVVar();
|
||||
virtual ~DisparityCVVar()
|
||||
DisparityStereoVar();
|
||||
virtual ~DisparityStereoVar()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -57,5 +57,5 @@ public:
|
||||
|
||||
} // NAMESPACE
|
||||
|
||||
#endif // __DISPARITYCVVAR_H__
|
||||
#endif // __DISPARITYSTEREOVAR_H__
|
||||
|
||||
Reference in new issue
Block a user