Ogre Procedural  0.3.0 unstable
Procedural Geometry & Textures for Ogre3D
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Procedural::EdgeDetection Class Reference

Edge detection on input image. More...

#include <ProceduralTextureModifiers.h>

Inheritance diagram for Procedural::EdgeDetection:
Inheritance graph
[legend]

Public Types

enum  DETECTION_TYPE { DETECTION_HOMOGENITY, DETECTION_DIFFERENCE, DETECTION_SOBEL, DETECTION_CANNY }
 List of algorithms used for edge detection. More...
 

Public Member Functions

 EdgeDetection (TextureBufferPtr pBuffer)
 Default constructor. More...
 
EdgeDetectionsetThresholdLow (Ogre::uchar threshold)
 Set the lower threshold for canny filter. More...
 
EdgeDetectionsetThresholdHigh (Ogre::uchar threshold)
 Set the upper threshold for canny filter. More...
 
EdgeDetectionsetSigma (Ogre::uchar sigma)
 Set sigma constant for canny filter. More...
 
EdgeDetectionsetType (DETECTION_TYPE type)
 Set the algorithm to sharp. More...
 
TextureBufferPtr process ()
 Run image manipulation. More...
 
Ogre::String getName ()
 Get name of the filter as string. More...
 
void setLog (bool enable=true)
 Enable/Disable logging. More...
 

Protected Member Functions

void logMsg (Ogre::String msg)
 

Protected Attributes

TextureBufferPtr mBuffer
 
Ogre::String mName
 
bool mLog
 

Detailed Description

Edge detection on input image.

Perform an edge detection with specified algorithm.

Example (Sobel):

dot_texture_13.png

Member Enumeration Documentation

◆ DETECTION_TYPE

List of algorithms used for edge detection.

Enumerator
DETECTION_HOMOGENITY 

Homogenity edge detector.

DETECTION_DIFFERENCE 

Difference edge detector.

DETECTION_SOBEL 

Sobel edge detector.

DETECTION_CANNY 

Canny edge detector.

Constructor & Destructor Documentation

◆ EdgeDetection()

Procedural::EdgeDetection::EdgeDetection ( TextureBufferPtr  pBuffer)

Default constructor.

Parameters
pBufferImage buffer where to modify the image.

Member Function Documentation

◆ getName()

Ogre::String Procedural::TextureProcessing::getName ( )
inherited

Get name of the filter as string.

◆ logMsg()

void Procedural::TextureProcessing::logMsg ( Ogre::String  msg)
protectedinherited

◆ process()

TextureBufferPtr Procedural::EdgeDetection::process ( )
virtual

Run image manipulation.

Returns
Pointer to image buffer which has been set in the constructor.

Implements Procedural::TextureProcessing.

◆ setLog()

void Procedural::TextureProcessing::setLog ( bool  enable = true)
inherited

Enable/Disable logging.

Parameters
enabletrue enables logging of filter actions

◆ setSigma()

EdgeDetection& Procedural::EdgeDetection::setSigma ( Ogre::uchar  sigma)

Set sigma constant for canny filter.

Parameters
sigmaNew sigma constant for gaussian filter in canny filter [0, 255] (default 92)

◆ setThresholdHigh()

EdgeDetection& Procedural::EdgeDetection::setThresholdHigh ( Ogre::uchar  threshold)

Set the upper threshold for canny filter.

Parameters
thresholdNew upper threshold value for canny filter [0, 255] (default 100)

◆ setThresholdLow()

EdgeDetection& Procedural::EdgeDetection::setThresholdLow ( Ogre::uchar  threshold)

Set the lower threshold for canny filter.

Parameters
thresholdNew lower threshold value for canny filter [0, 255] (default 20)

◆ setType()

EdgeDetection& Procedural::EdgeDetection::setType ( DETECTION_TYPE  type)

Set the algorithm to sharp.

Parameters
typeNew algorithm to sharp (default SHARP_BASIC)

Member Data Documentation

◆ mBuffer

TextureBufferPtr Procedural::TextureProcessing::mBuffer
protectedinherited

◆ mLog

bool Procedural::TextureProcessing::mLog
protectedinherited

◆ mName

Ogre::String Procedural::TextureProcessing::mName
protectedinherited

The documentation for this class was generated from the following file:
Procedural::Cell::setDensity
Cell & setDensity(Ogre::uint density)
Set the density of cells in texture.
Procedural::EdgeDetection
Edge detection on input image.
Definition: ProceduralTextureModifiers.h:1321
Procedural::Cell::setRegularity
Cell & setRegularity(Ogre::uchar regularity)
Set the regularity of texture.
Procedural::EdgeDetection::setType
EdgeDetection & setType(DETECTION_TYPE type)
Set the algorithm to sharp.
Procedural::Cell
Create a texture consisting of cells aligned in a grid, or a chessboard.
Definition: ProceduralTextureGenerator.h:71
Procedural::Cell::process
TextureBufferPtr process()
Run image generation.
Procedural::TextureBuffer
class to store image data while processing
Definition: ProceduralTextureBuffer.h:50
Procedural::EdgeDetection::process
TextureBufferPtr process()
Run image manipulation.
Procedural::EdgeDetection::DETECTION_SOBEL
@ DETECTION_SOBEL
Sobel edge detector.
Definition: ProceduralTextureModifiers.h:1329