KSquare Utilities
MorphOpSobel.h
Go to the documentation of this file.
1 /* Sobel.h -- Performs Sobel Edge Detection on a Raster image.
2  * Copyright (C) 1994-2014 Kurt Kramer
3  * For conditions of distribution and use, see copyright notice in KKB.h
4  */
5 #ifndef _MORPHOPSOBEL_
6 #define _MORPHOPSOBEL_
7 
8 #include "MorphOp.h"
9 
10 namespace KKB
11 {
12  #ifndef _RASTER_
13  class Raster;
14  typedef Raster* RasterPtr;
15  #endif
16 
17 
18  class MorphOpSobel: public MorphOp
19  {
20  public:
21  MorphOpSobel ();
22  ~MorphOpSobel(void);
23 
24  virtual RasterPtr PerformOperation (Raster const* _image);
26 
27  private:
28  void AllocateMagnitudeSqrTable ();
29  void DeleteMagnitudeSqrTable ();
30  void BuildMagnitudeSqrTable ();
31  RasterPtr BuildMagnitudeImage () const;
32 
33  kkint32** magnitudeSqrTable; /**< Will be stored as square, to save the time of computing floating point operations. */
34  kkuint32 magnitudeSqrTableHeight;
35  kkuint32 magnitudeSqrTableWidth;
36  kkint32 maxMagnitude; /**< Like edgeMagnitudes will be stored as a Square */
37  }; /* Sobel */
38 
39 } /* namespace KKB; */
40 
41 #endif
__int32 kkint32
Definition: KKBaseTypes.h:88
A class that is used by to represent a single image in memory.
Definition: Raster.h:108
unsigned __int32 kkuint32
Definition: KKBaseTypes.h:89
KKTHread * KKTHreadPtr
Base class for all Morphological operations.
Definition: MorphOp.h:44
virtual OperationType Operation() const
Definition: MorphOpSobel.h:25
virtual RasterPtr PerformOperation(Raster const *_image)