mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 10:49:59 +01:00
Original implementation of Edge Image filters
This commit is contained in:
@@ -148,6 +148,8 @@ public:
|
||||
SHARPEN_MASK = 0,
|
||||
SHARPEN_CONVOLUTION,
|
||||
SHARPEN_EDGE,
|
||||
SHARPEN_WHITEHAT,
|
||||
SHARPEN_BLACKHAT,
|
||||
SHARPEN_INVALID
|
||||
} SharpenMethod;
|
||||
static const char* method_label[SHARPEN_INVALID];
|
||||
@@ -166,5 +168,36 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class EdgeFilter : public ImageFilter
|
||||
{
|
||||
public:
|
||||
|
||||
EdgeFilter();
|
||||
|
||||
// Algorithms used for edge detection
|
||||
typedef enum {
|
||||
EDGE_THRESHOLD = 0,
|
||||
EDGE_SOBEL,
|
||||
EDGE_FREICHEN,
|
||||
EDGE_CONTOUR,
|
||||
EDGE_INVALID
|
||||
} EdgeMethod;
|
||||
static const char* method_label[EDGE_INVALID];
|
||||
EdgeMethod method () const { return method_; }
|
||||
void setMethod(int method);
|
||||
|
||||
// implementation of FrameBufferFilter
|
||||
Type type() const override { return FrameBufferFilter::FILTER_EDGE; }
|
||||
|
||||
void draw (FrameBuffer *input) override;
|
||||
void accept (Visitor& v) override;
|
||||
|
||||
private:
|
||||
EdgeMethod method_;
|
||||
static std::vector< FilteringProgram > programs_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // IMAGEFILTER_H
|
||||
|
||||
Reference in New Issue
Block a user