1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
//
// MainPage.xaml.h
// Declaration of the MainPage class.
//
#pragma once
#include "MainPage.g.h"
#include <opencv2\core\core.hpp>
#include <opencv2\imgproc\imgproc.hpp>
#include <opencv2\features2d\features2d.hpp>
namespace OcvImageProcessing
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public ref class MainPage sealed
{
public:
MainPage();
protected:
virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
private:
static const int PREVIEW = 0;
static const int GRAY = 1;
static const int CANNY = 2;
static const int BLUR = 3;
static const int FEATURES = 4;
static const int SEPIA = 5;
void Button_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
cv::Mat ApplyGrayFilter(const cv::Mat& image);
cv::Mat ApplyCannyFilter(const cv::Mat& image);
cv::Mat ApplyBlurFilter(const cv::Mat& image);
cv::Mat ApplyFindFeaturesFilter(const cv::Mat& image);
cv::Mat ApplySepiaFilter(const cv::Mat& image);
void UpdateImage(const cv::Mat& image);
cv::Mat Lena;
unsigned int frameWidth, frameHeight;
};
}
|