public abstract

Inheritance Graph

graph BT
	AbstractOnGpuComparator
	AbstractOnGpuComparator --> AbstractImageComparator
	AverageComparator --> AbstractOnGpuComparator
	PyramidComparator --> AbstractOnGpuComparator
	SSIMComparator --> AbstractOnGpuComparator
	click AbstractOnGpuComparator "classMinSG_1_1ImageCompare_1_1AbstractOnGpuComparator"
	click AbstractImageComparator "classMinSG_1_1ImageCompare_1_1AbstractImageComparator"
	click AverageComparator "classMinSG_1_1ImageCompare_1_1AverageComparator"
	click PyramidComparator "classMinSG_1_1ImageCompare_1_1PyramidComparator"
	click SSIMComparator "classMinSG_1_1ImageCompare_1_1SSIMComparator"

Description

Classes

   
class MinSG::ImageCompare::AbstractOnGpuComparator::TexRef
struct MinSG::ImageCompare::AbstractOnGpuComparator::Vec2iComp

Public Types

   
   
enum FilterType {GAUSS, BOX}

Protected Types

   
   
typedef Util::Reference < TexRef > TexRef_t

Protected Attributes

   
   
Util::Reference < Rendering::Shader > shaderShrink
   
Util::Reference < Rendering::Shader > shaderCopy
   
Util::Reference < Rendering::Shader > shaderFilterH
   
Util::Reference < Rendering::Shader > shaderFilterV
   
Util::Reference < Rendering::FBO > fbo
   
uint32_t texDownSize
   
int32_t filterSize
   
FilterType filterType
   
bool filterValid
   
bool initialized

Protected Static Attributes

   
   
std::set< Util::Reference < Rendering::Texture > > usedTextures
   
std::map< Geometry::Vec2i , std::vector< Util::Reference < Rendering::Texture > >, Vec2iComp > freeTextures

Public Static Functions

   
   
void initShaderFileLocator(const Util::FileLocator & locator)
   
const Util::FileLocator & getShaderFileLocator()

Public Functions

   
   
  AbstractOnGpuComparator(int32_t _filterSize)
   
  ~AbstractOnGpuComparator()
   
bool compare( Rendering::RenderingContext & context, Rendering::Texture * firstTex, Rendering::Texture * secondTex, double & value, Rendering::Texture * resultTex)
   
bool doCompare( Rendering::RenderingContext & context, Rendering::Texture * firstTex, Rendering::Texture * secondTex, double & value, Rendering::Texture * resultTex)
   
int32_t getFilterSize() const
   
void setFilterSize(int32_t _filterSize)
   
void setFilterType( FilterType type)
   
FilterType getFilterType() const
   
uint32_t getTextureDownloadSize() const
   
void setTextureDownloadSize(uint32_t sideLength)
   
void setFBO( Util::Reference < Rendering::FBO > _fbo)
   
bool init( Rendering::RenderingContext & context)

Protected Functions

   
   
void prepare( Rendering::RenderingContext & context)
   
void finish( Rendering::RenderingContext & context)
   
void checkTextureSize( Geometry::Vec2i size)
   
void checkTextureSize(uint32_t width, uint32_t height)
   
float average( Rendering::RenderingContext & context, TexRef_t src)
   
void filter( Rendering::RenderingContext & context, TexRef_t src, TexRef_t dst)
   
void copy( Rendering::RenderingContext & context, TexRef_t src, TexRef_t dst)

Protected Static Functions

   
   
void deleteTextures()
   
Util::Reference < Rendering::Texture > createTexture(const Geometry::Vec2i & size)
   
void releaseTexture(const Util::Reference < Rendering::Texture > & tex)

Documentation

enum
MinSG::ImageCompare::AbstractOnGpuComparator::FilterType

public
 
 
enum FilterType
Enumerator   Description
Enumerator   Description
GAUSS    
BOX    

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:82


typedef
MinSG::ImageCompare::AbstractOnGpuComparator::TexRef_t

protected
 
 
typedef Util::Reference < TexRef > TexRef_t

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:70


variable
MinSG::ImageCompare::AbstractOnGpuComparator::shaderShrink

protected
 
 
Util::Reference < Rendering::Shader > shaderShrink

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:133


variable
MinSG::ImageCompare::AbstractOnGpuComparator::shaderCopy

protected
 
 
Util::Reference < Rendering::Shader > shaderCopy

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:134


variable
MinSG::ImageCompare::AbstractOnGpuComparator::shaderFilterH

protected
 
 
Util::Reference < Rendering::Shader > shaderFilterH

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:135


variable
MinSG::ImageCompare::AbstractOnGpuComparator::shaderFilterV

protected
 
 
Util::Reference < Rendering::Shader > shaderFilterV

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:136


variable
MinSG::ImageCompare::AbstractOnGpuComparator::fbo

protected
 
 
Util::Reference < Rendering::FBO > fbo

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:138


variable
MinSG::ImageCompare::AbstractOnGpuComparator::texDownSize

protected
 
 
uint32_t texDownSize

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:140


variable
MinSG::ImageCompare::AbstractOnGpuComparator::filterSize

protected
 
 
int32_t filterSize

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:141


variable
MinSG::ImageCompare::AbstractOnGpuComparator::filterType

protected
 
 
FilterType filterType

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:142


variable
MinSG::ImageCompare::AbstractOnGpuComparator::filterValid

protected
 
 
bool filterValid

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:143


variable
MinSG::ImageCompare::AbstractOnGpuComparator::initialized

protected
 
 
bool initialized

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:144


variable
MinSG::ImageCompare::AbstractOnGpuComparator::usedTextures

protected static
 
 
std::set< Util::Reference < Rendering::Texture > > usedTextures

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:149


variable
MinSG::ImageCompare::AbstractOnGpuComparator::freeTextures

protected static
 
 
std::map< Geometry::Vec2i , std::vector< Util::Reference < Rendering::Texture > >, Vec2iComp > freeTextures

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:150


function
MinSG::ImageCompare::AbstractOnGpuComparator::initShaderFileLocator

public static
     
     
void initShaderFileLocator( const Util::FileLocator & locator )

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:79


function
MinSG::ImageCompare::AbstractOnGpuComparator::getShaderFileLocator

public static
   
   
const Util::FileLocator & getShaderFileLocator( )

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:80


function
MinSG::ImageCompare::AbstractOnGpuComparator::AbstractOnGpuComparator

public
     
     
AbstractOnGpuComparator( int32_t _filterSize )

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:86


function
MinSG::ImageCompare::AbstractOnGpuComparator::~AbstractOnGpuComparator

public virtual
   
   
~AbstractOnGpuComparator( )

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:87


function
MinSG::ImageCompare::AbstractOnGpuComparator::compare

public virtual
     
     
bool compare( Rendering::RenderingContext & context,
  Rendering::Texture * firstTex,
  Rendering::Texture * secondTex,
  double & value,
  Rendering::Texture * resultTex
)    

Compare two images to each other. Return a value from [0.0, 1.0], where 1.0 means that the two images are the same.

Parameters

context
Current rendering context.
firstTex
First source image to use for comparison. Must not benullptr.
secondTex
Second source image to use for comparison. Must not benullptr.
value
Result of the image comparison. The interpretation of the value depends on the actual implementation.
resultTex
Resulting texture that contains any kind of difference image specific to the actual implementation. May benullptr.

Returns

trueif the comparison was successful,falseif something went wrong.

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:89


function
MinSG::ImageCompare::AbstractOnGpuComparator::doCompare

public virtual
     
     
bool doCompare( Rendering::RenderingContext & context,
  Rendering::Texture * firstTex,
  Rendering::Texture * secondTex,
  double & value,
  Rendering::Texture * resultTex
)    

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:92


function
MinSG::ImageCompare::AbstractOnGpuComparator::getFilterSize

public const inline
   
   
int32_t getFilterSize( ) const

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:95


function
MinSG::ImageCompare::AbstractOnGpuComparator::setFilterSize

public inline virtual
     
     
void setFilterSize( int32_t _filterSize )

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:97


function
MinSG::ImageCompare::AbstractOnGpuComparator::setFilterType

public inline virtual
     
     
void setFilterType( FilterType type )

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:102


function
MinSG::ImageCompare::AbstractOnGpuComparator::getFilterType

public const inline
   
   
FilterType getFilterType( ) const

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:107


function
MinSG::ImageCompare::AbstractOnGpuComparator::getTextureDownloadSize

public const inline
   
   
uint32_t getTextureDownloadSize( ) const

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:109


function
MinSG::ImageCompare::AbstractOnGpuComparator::setTextureDownloadSize

public inline virtual
     
     
void setTextureDownloadSize( uint32_t sideLength )

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:111


function
MinSG::ImageCompare::AbstractOnGpuComparator::setFBO

public virtual
     
     
void setFBO( Util::Reference < Rendering::FBO > _fbo )

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:113


function
MinSG::ImageCompare::AbstractOnGpuComparator::init

public virtual
     
     
bool init( Rendering::RenderingContext & context )

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:114


function
MinSG::ImageCompare::AbstractOnGpuComparator::prepare

protected
     
     
void prepare( Rendering::RenderingContext & context )

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:118


function
MinSG::ImageCompare::AbstractOnGpuComparator::finish

protected
     
     
void finish( Rendering::RenderingContext & context )

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:120


function
MinSG::ImageCompare::AbstractOnGpuComparator::checkTextureSize

protected
     
     
void checkTextureSize( Geometry::Vec2i size )

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:122


function
MinSG::ImageCompare::AbstractOnGpuComparator::checkTextureSize

protected
     
     
void checkTextureSize( uint32_t width,
  uint32_t height
)    

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:123


function
MinSG::ImageCompare::AbstractOnGpuComparator::average

protected
     
     
float average( Rendering::RenderingContext & context,
  TexRef_t src
)    

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:125


function
MinSG::ImageCompare::AbstractOnGpuComparator::filter

protected
     
     
void filter( Rendering::RenderingContext & context,
  TexRef_t src,
  TexRef_t dst
)    

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:126


function
MinSG::ImageCompare::AbstractOnGpuComparator::copy

protected
     
     
void copy( Rendering::RenderingContext & context,
  TexRef_t src,
  TexRef_t dst
)    

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:127


function
MinSG::ImageCompare::AbstractOnGpuComparator::deleteTextures

protected static
   
   
void deleteTextures( )

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:129


function
MinSG::ImageCompare::AbstractOnGpuComparator::createTexture

protected static
     
     
Util::Reference < Rendering::Texture > createTexture( const Geometry::Vec2i & size )

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:130


function
MinSG::ImageCompare::AbstractOnGpuComparator::releaseTexture

protected static
     
     
void releaseTexture( const Util::Reference < Rendering::Texture > & tex )

Defined in MinSG/Ext/ImageCompare/AbstractOnGpuComparator.h:131