Simplygon C++ API  8.3.35800.0
SimplygonSDK::IImageComparer Class Referenceabstract

#include <SimplygonSDK.h>

Inheritance diagram for SimplygonSDK::IImageComparer:
SimplygonSDK::IObject

Public Member Functions

virtual int CompareImages ()=0
 
virtual const char * GetClass ()
 
virtual CountedPointer< IImageDataGetDiffHighlights ()=0
 
virtual unsigned int GetHighlightAreaCoverage ()=0
 
virtual CountedPointer< IImageDataGetImageDiff ()=0
 
virtual float GetMaxPixelError ()=0
 
virtual unsigned int GetTotalMaskCoverage ()=0
 
virtual float GetTotalPixelError ()=0
 
virtual bool IsA (const char *type) const
 
virtual void SetDiffHighlightsExportPath (const char *value)=0
 
virtual void SetImageDiffExportPath (const char *value)=0
 
virtual void SetImageMasks (IBoolArray *beforeImgMask, IBoolArray *afterImgMask)=0
 
virtual void SetImagePathAfterImg (const char *value)=0
 
virtual void SetImagePathBeforeImg (const char *value)=0
 
virtual void SetImages (IImageData *beforeImg, IImageData *afterImg)=0
 
virtual void SetSilhouetteDifferenceError (float value)=0
 
- Public Member Functions inherited from SimplygonSDK::IObject
virtual rid AddObserver (robserver *Observer, rid EventId)=0
 
virtual void AddRef ()=0
 
virtual rstring GetName ()=0
 
virtual void * GetUserComponentArea (rid userid)=0
 
virtual void PrintInfo ()=0
 
virtual void Release ()=0
 
virtual void RemoveObserver (rid ObserverId)=0
 
virtual void SetName (const char *Name)=0
 

Static Public Member Functions

static bool IsClassA (const char *type)
 
static IImageComparerSafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::IObject
static bool IsClassA (const char *type)
 
static IObjectSafeCast (IObject *ptr)
 

Detailed Description

compares images

Definition at line 20609 of file SimplygonSDK.h.

Member Function Documentation

◆ CompareImages()

virtual int SimplygonSDK::IImageComparer::CompareImages ( )
pure virtual

Compares the images either set from "SetImages" or the two images set from the "ImagePathBeforeImg" and "ImagePathAfterImg" strings. Will return -1 if two images were not set (in the same manner)
Returns -2 if images aren't of the same size
Returns -3 if images are not 2D images (ImageData supports 3D images for example - don't try to use these)
Returns -4 if ImgMasks are set, but are not same size as the Before and AfterImg.
On success, will return 0

◆ GetClass()

virtual const char* SimplygonSDK::IImageComparer::GetClass ( )
virtual

GetClass returns the name of the class of the object.

Returns
the name of the actual class of the object, as a const char string

Reimplemented from SimplygonSDK::IObject.

◆ GetDiffHighlights()

virtual CountedPointer<IImageData> SimplygonSDK::IImageComparer::GetDiffHighlights ( )
pure virtual

Returns the image for the most heavily impacted areas of the comparison. Can be used to get a visual feedback of the results of the comparison, to see the highlighted "problem areas".

◆ GetHighlightAreaCoverage()

virtual unsigned int SimplygonSDK::IImageComparer::GetHighlightAreaCoverage ( )
pure virtual

Returns the sum of all pixels that are in a "high-problem" area. Used together with the TotalMaskCoverage value, this can let you know how large the problem-areas are compared to the size of the model.

◆ GetImageDiff()

virtual CountedPointer<IImageData> SimplygonSDK::IImageComparer::GetImageDiff ( )
pure virtual

Returns the image for the resulting comparison. Can be used to get a visual feedback of the results of the comparison.

◆ GetMaxPixelError()

virtual float SimplygonSDK::IImageComparer::GetMaxPixelError ( )
pure virtual

Returns the size of the largest problem-areas. Preferably this value should be not much larger than the 1-2 range, or the model should probably be further away from the camera to get a good looking LOD-switch.

◆ GetTotalMaskCoverage()

virtual unsigned int SimplygonSDK::IImageComparer::GetTotalMaskCoverage ( )
pure virtual

Returns the number of pixels that either the before- or the after-masks covers. Can be good to know when looking at the TotalPixelError and HighlightAreaCoverage numbers, to get a feel for the big the error of the image is relative to how big the measured area actually was.

◆ GetTotalPixelError()

virtual float SimplygonSDK::IImageComparer::GetTotalPixelError ( )
pure virtual

Return the sum of all pixel-errors of the whole image. Can be used to get a feel for the over-all similarity between the two images. Especially when scaled with the TotalMaskCoverage value. That way you can get the avarage pixel-error of the model.

◆ IsA()

virtual bool SimplygonSDK::IImageComparer::IsA ( const char *  type) const
virtual

The IsA function returns true if the object is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the object is, or is a descendant of
Returns
true if the object is of the specified class, false if not

Reimplemented from SimplygonSDK::IObject.

◆ IsClassA()

static bool SimplygonSDK::IImageComparer::IsClassA ( const char *  type)
inlinestatic

The IsClassA function returns true if IImageComparer is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the class is, or is a descendant of
Returns
true if the class is of the specified class, false if not

Definition at line 20630 of file SimplygonSDK.h.

◆ SafeCast()

static IImageComparer* SimplygonSDK::IImageComparer::SafeCast ( IObject ptr)
inlinestatic

SafeCast makes sure the pointer is of a class that can be cast into a IImageComparer pointer, and if this is possible, returns the cast pointer.

Parameters
ptris the pointer to be cast into a IImageComparer pointer
Returns
a pointer to the IImageComparer object, if the cast can be made, and a NULL pointer otherwise

Definition at line 20643 of file SimplygonSDK.h.

◆ SetDiffHighlightsExportPath()

virtual void SimplygonSDK::IImageComparer::SetDiffHighlightsExportPath ( const char *  value)
pure virtual

Sets the export-path for the most heavily impacted areas of the comparison. Can be used to get a visual feedback of the results of the comparison, to see the highlighted "problem areas".

Parameters
valuethe file path to the image

◆ SetImageDiffExportPath()

virtual void SimplygonSDK::IImageComparer::SetImageDiffExportPath ( const char *  value)
pure virtual

Sets the export-path for the resulting comparison. Can be used to get a visual feedback of the results of the comparison.

Parameters
valuethe file path to the image

◆ SetImageMasks()

virtual void SimplygonSDK::IImageComparer::SetImageMasks ( IBoolArray beforeImgMask,
IBoolArray afterImgMask 
)
pure virtual

Sets the two image-masks for the comparison. Both image-masks needs to be of the same size as the compared images (same item-count as the number of pixels in the images). True means a pixel in the compared image contains a part of the rendered object, false means the pixel is only "background" and does not need to be compared. When a pixel in the mask is set to "true" in one image and "false" in the other image, this means that there is a silhouette-error. How much this error should be measured can be set with the "SilhouetteDifferenceError" setting. If masks are not set, all pixels in the images will be compared as is, without taking into account what part of the images are of the actual model and which parts are just background.

Parameters
beforeImgMaskthe bool array for the before image mask
afterImgMaskthe bool array for the after image mask

◆ SetImagePathAfterImg()

virtual void SimplygonSDK::IImageComparer::SetImagePathAfterImg ( const char *  value)
pure virtual

Sets the path to the other of the images to be compared. Both images needs to be of the same type and size for this to work. This can be used instead of setting the images from the "SetImage" function, and will only be used if the "SetImage" function was never used.

Parameters
valuethe file path to the image

◆ SetImagePathBeforeImg()

virtual void SimplygonSDK::IImageComparer::SetImagePathBeforeImg ( const char *  value)
pure virtual

Sets the path to one of the images to be compared. Both images needs to be of the same type and size for this to work. This can be used instead of setting the images from the "SetImage" function, and will only be used if the "SetImage" function was never used.

Parameters
valuethe file path to the image

◆ SetImages()

virtual void SimplygonSDK::IImageComparer::SetImages ( IImageData beforeImg,
IImageData afterImg 
)
pure virtual

Sets the two images that will be compared. Both images needs to be of the same type and the same size.

Parameters
beforeImgthe image data obejct for the before image
afterImgthe image data obejct for the after image

◆ SetSilhouetteDifferenceError()

virtual void SimplygonSDK::IImageComparer::SetSilhouetteDifferenceError ( float  value)
pure virtual

Decides how big of an impact the silhouette-difference between the two masks will be. 0.0 means the silhouette difference will not be taken into account at all, and 1.0 means it will be counted as maximum possible error. Default is set to 0.5. This is because a lot of times the background behind the model blends in somewhat with the model, and most times the difference in silhouette will not be fully seen.

Parameters
valuethe value of silhouette-difference (0.0 - 1.0)

The documentation for this class was generated from the following file: