Filter selection and several filters implemented for WinRT sample.
authorAlexander Smorkalov <alexander.smorkalov@itseez.com>
Mon, 30 Sep 2013 04:22:18 +0000 (08:22 +0400)
committerAlexander Smorkalov <alexander.smorkalov@itseez.com>
Fri, 29 Nov 2013 05:47:25 +0000 (09:47 +0400)
14 files changed:
samples/winrt/OcvImageProcessing/OcvImageProcessing/App.xaml
samples/winrt/OcvImageProcessing/OcvImageProcessing/App.xaml.cpp
samples/winrt/OcvImageProcessing/OcvImageProcessing/App.xaml.h
samples/winrt/OcvImageProcessing/OcvImageProcessing/Assets/Logo.png
samples/winrt/OcvImageProcessing/OcvImageProcessing/Assets/SmallLogo.png
samples/winrt/OcvImageProcessing/OcvImageProcessing/Assets/SplashScreen.png
samples/winrt/OcvImageProcessing/OcvImageProcessing/Assets/StoreLogo.png
samples/winrt/OcvImageProcessing/OcvImageProcessing/Common/StandardStyles.xaml
samples/winrt/OcvImageProcessing/OcvImageProcessing/MainPage.xaml
samples/winrt/OcvImageProcessing/OcvImageProcessing/MainPage.xaml.cpp
samples/winrt/OcvImageProcessing/OcvImageProcessing/MainPage.xaml.h
samples/winrt/OcvImageProcessing/OcvImageProcessing/OcvImageProcessing.vcxproj
samples/winrt/OcvImageProcessing/OcvImageProcessing/OcvImageProcessing.vcxproj.filters
samples/winrt/OcvImageProcessing/OcvImageProcessing/Package.appxmanifest

index 253dba4..78409d5 100644 (file)
@@ -8,7 +8,7 @@
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
 
-                <!-- 
+                <!--
                     Styles that define common aspects of the platform look and feel
                     Required by Visual Studio project and item templates
                  -->
index ce383cf..228e24a 100644 (file)
@@ -30,8 +30,8 @@ using namespace Windows::UI::Xaml::Navigation;
 /// </summary>
 App::App()
 {
-       InitializeComponent();
-       Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
+    InitializeComponent();
+    Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
 }
 
 /// <summary>
@@ -42,53 +42,53 @@ App::App()
 /// <param name="args">Details about the launch request and process.</param>
 void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ args)
 {
-       auto rootFrame = dynamic_cast<Frame^>(Window::Current->Content);
+    auto rootFrame = dynamic_cast<Frame^>(Window::Current->Content);
 
-       // Do not repeat app initialization when the Window already has content,
-       // just ensure that the window is active
-       if (rootFrame == nullptr)
-       {
-               // Create a Frame to act as the navigation context and associate it with
-               // a SuspensionManager key
-               rootFrame = ref new Frame();
+    // Do not repeat app initialization when the Window already has content,
+    // just ensure that the window is active
+    if (rootFrame == nullptr)
+    {
+        // Create a Frame to act as the navigation context and associate it with
+        // a SuspensionManager key
+        rootFrame = ref new Frame();
 
-               if (args->PreviousExecutionState == ApplicationExecutionState::Terminated)
-               {
-                       // TODO: Restore the saved session state only when appropriate, scheduling the
-                       // final launch steps after the restore is complete
+        if (args->PreviousExecutionState == ApplicationExecutionState::Terminated)
+        {
+            // TODO: Restore the saved session state only when appropriate, scheduling the
+            // final launch steps after the restore is complete
 
-               }
+        }
 
-               if (rootFrame->Content == nullptr)
-               {
-                       // When the navigation stack isn't restored navigate to the first page,
-                       // configuring the new page by passing required information as a navigation
-                       // parameter
-                       if (!rootFrame->Navigate(TypeName(MainPage::typeid), args->Arguments))
-                       {
-                               throw ref new FailureException("Failed to create initial page");
-                       }
-               }
-               // Place the frame in the current Window
-               Window::Current->Content = rootFrame;
-               // Ensure the current window is active
-               Window::Current->Activate();
-       }
-       else
-       {
-               if (rootFrame->Content == nullptr)
-               {
-                       // When the navigation stack isn't restored navigate to the first page,
-                       // configuring the new page by passing required information as a navigation
-                       // parameter
-                       if (!rootFrame->Navigate(TypeName(MainPage::typeid), args->Arguments))
-                       {
-                               throw ref new FailureException("Failed to create initial page");
-                       }
-               }
-               // Ensure the current window is active
-               Window::Current->Activate();
-       }
+        if (rootFrame->Content == nullptr)
+        {
+            // When the navigation stack isn't restored navigate to the first page,
+            // configuring the new page by passing required information as a navigation
+            // parameter
+            if (!rootFrame->Navigate(TypeName(MainPage::typeid), args->Arguments))
+            {
+                throw ref new FailureException("Failed to create initial page");
+            }
+        }
+        // Place the frame in the current Window
+        Window::Current->Content = rootFrame;
+        // Ensure the current window is active
+        Window::Current->Activate();
+    }
+    else
+    {
+        if (rootFrame->Content == nullptr)
+        {
+            // When the navigation stack isn't restored navigate to the first page,
+            // configuring the new page by passing required information as a navigation
+            // parameter
+            if (!rootFrame->Navigate(TypeName(MainPage::typeid), args->Arguments))
+            {
+                throw ref new FailureException("Failed to create initial page");
+            }
+        }
+        // Ensure the current window is active
+        Window::Current->Activate();
+    }
 }
 
 /// <summary>
@@ -100,8 +100,8 @@ void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEvent
 /// <param name="e">Details about the suspend request.</param>
 void App::OnSuspending(Object^ sender, SuspendingEventArgs^ e)
 {
-       (void) sender;  // Unused parameter
-       (void) e;       // Unused parameter
+    (void) sender; // Unused parameter
+    (void) e;      // Unused parameter
 
-       //TODO: Save application state and stop any background activity
+    //TODO: Save application state and stop any background activity
 }
index 2004513..8e16532 100644 (file)
@@ -9,16 +9,16 @@
 
 namespace OcvImageProcessing
 {
-       /// <summary>
-       /// Provides application-specific behavior to supplement the default Application class.
-       /// </summary>
-       ref class App sealed
-       {
-       public:
-               App();
-               virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ args) override;
+    /// <summary>
+    /// Provides application-specific behavior to supplement the default Application class.
+    /// </summary>
+    ref class App sealed
+    {
+    public:
+        App();
+        virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ args) override;
 
-       private:
-               void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e);
-       };
+    private:
+        void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e);
+    };
 }
index e26771c..ea685d6 100644 (file)
Binary files a/samples/winrt/OcvImageProcessing/OcvImageProcessing/Assets/Logo.png and b/samples/winrt/OcvImageProcessing/OcvImageProcessing/Assets/Logo.png differ
index 1eb0d9d..efaf546 100644 (file)
Binary files a/samples/winrt/OcvImageProcessing/OcvImageProcessing/Assets/SmallLogo.png and b/samples/winrt/OcvImageProcessing/OcvImageProcessing/Assets/SmallLogo.png differ
index c951e03..901c3b0 100644 (file)
Binary files a/samples/winrt/OcvImageProcessing/OcvImageProcessing/Assets/SplashScreen.png and b/samples/winrt/OcvImageProcessing/OcvImageProcessing/Assets/SplashScreen.png differ
index dcb6727..af64bf0 100644 (file)
Binary files a/samples/winrt/OcvImageProcessing/OcvImageProcessing/Assets/StoreLogo.png and b/samples/winrt/OcvImageProcessing/OcvImageProcessing/Assets/StoreLogo.png differ
index 85f4ed6..4def039 100644 (file)
     </Style>
 
     <!-- Button styles -->
-    
-    <!--
+ <!--
         TextButtonStyle is used to style a Button using subheader-styled text with no other adornment.  There
         are two styles that are based on TextButtonStyle (TextPrimaryButtonStyle and TextSecondaryButtonStyle)
         which are used in the GroupedItemsPage as a group header and in the FileOpenPickerPage for triggering
     </Style>
 
     <!--
-        AppBarButtonStyle is used to style a Button (or ToggleButton) for use in an App Bar.  Content will be centered 
-        and should fit within the 40 pixel radius glyph provided.  16-point Segoe UI Symbol is used for content text 
+        AppBarButtonStyle is used to style a Button (or ToggleButton) for use in an App Bar.  Content will be centered
+        and should fit within the 40 pixel radius glyph provided.  16-point Segoe UI Symbol is used for content text
         to simplify the use of glyphs from that font.  AutomationProperties.Name is used for the text below the glyph.
     -->
     <Style x:Key="AppBarButtonStyle" TargetType="ButtonBase">
         </Setter>
     </Style>
 
-    <!-- 
+    <!--
         Standard AppBarButton Styles for use with Button and ToggleButton
-    
-        An AppBarButton Style is provided for each of the glyphs in the Segoe UI Symbol font.  
-        Uncomment any style you reference (as not all may be required).
+
+  An AppBarButton Style is provided for each of the glyphs in the Segoe UI Symbol font.
+       Uncomment any style you reference (as not all may be required).
     -->
 
     <!--
-    
-    <Style x:Key="SkipBackAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <
+Style x:Key="SkipBackAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
         <Setter Property="AutomationProperties.AutomationId" Value="SkipBackAppBarButton"/>
         <Setter Property="AutomationProperties.Name" Value="Skip Back"/>
         <Setter Property="Content" Value="&#xE100;"/>
     <!--
         SnappedBackButtonStyle is used to style a Button for use in the title area of a snapped page.  Margins appropriate
         for the conventional page layout are included as part of the style.
-        
-        The obvious duplication here is necessary as the glyphs used in snapped are not merely smaller versions of the same
+ The o
+bvious duplication here is necessary as the glyphs used in snapped are not merely smaller versions of the same
         glyph but are actually distinct.
     -->
     <Style x:Key="SnappedBackButtonStyle" TargetType="Button">
index 0e49948..86db7b8 100644 (file)
@@ -8,8 +8,16 @@
     mc:Ignorable="d">
 
     <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
-        <Image x:Name="PreviewWidget" HorizontalAlignment="Left" Height="748" Margin="10,10,0,0" VerticalAlignment="Top" Width="1146"/>
-        <Button Content="Button" HorizontalAlignment="Left" Margin="1161,10,0,0" VerticalAlignment="Top" Width="195" Height="63" Click="Button_Click"/>
+        <Image x:Name="PreviewWidget" HorizontalAlignment="Left" Height="512" Margin="10,10,0,0" VerticalAlignment="Top" Width="512"/>
+        <Button Content="Apply" HorizontalAlignment="Left" Margin="527,71,0,0" VerticalAlignment="Top" Width="293" Height="63" Click="Button_Click"/>
+        <ComboBox x:Name="FilterTypeWidget" HorizontalAlignment="Left" Margin="527,10,0,0" VerticalAlignment="Top" Width="293" Height="56" SelectedIndex="0">
+            <ComboBoxItem Content="Preview"/>
+            <ComboBoxItem Content="GrayScale"/>
+            <ComboBoxItem Content="Canny"/>
+            <ComboBoxItem Content="Blur"/>
+            <ComboBoxItem Content="Features"/>
+            <ComboBoxItem Content="Sepia"/>
+        </ComboBox>
 
     </Grid>
 </Page>
index 85f18c0..4de1340 100644 (file)
@@ -8,6 +8,7 @@
 #include <ppltasks.h>
 #include <wrl\client.h>
 #include <Robuffer.h>
+#include <vector>
 using namespace OcvImageProcessing;
 
 using namespace Microsoft::WRL;
@@ -26,35 +27,18 @@ using namespace Windows::UI::Xaml::Input;
 using namespace Windows::UI::Xaml::Media;
 using namespace Windows::UI::Xaml::Navigation;
 
-#include <opencv2\core\core.hpp>
-#include <opencv2\imgproc\imgproc.hpp>
-
 Uri^ InputImageUri = ref new Uri(L"ms-appx:///Assets/Lena.png");
 
 // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
 
 MainPage::MainPage()
 {
-       InitializeComponent();
-}
-
-/// <summary>
-/// Invoked when this page is about to be displayed in a Frame.
-/// </summary>
-/// <param name="e">Event data that describes how this page was reached.  The Parameter
-/// property is typically used to configure the page.</param>
-void MainPage::OnNavigatedTo(NavigationEventArgs^ e)
-{
-       (void) e;       // Unused parameter
-}
+    InitializeComponent();
 
-
-void OcvImageProcessing::MainPage::Button_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
-{
-       RandomAccessStreamReference^ streamRef = RandomAccessStreamReference::CreateFromUri(InputImageUri);
+    RandomAccessStreamReference^ streamRef = RandomAccessStreamReference::CreateFromUri(InputImageUri);
 
     task<IRandomAccessStreamWithContentType^> (streamRef->OpenReadAsync()).
-       then([](task<IRandomAccessStreamWithContentType^> thisTask)
+    then([](task<IRandomAccessStreamWithContentType^> thisTask)
     {
         IRandomAccessStreamWithContentType^ fileStream = thisTask.get();
         return BitmapDecoder::CreateAsync(fileStream);
@@ -66,7 +50,7 @@ void OcvImageProcessing::MainPage::Button_Click(Platform::Object^ sender, Window
     }).
     then([this](task<BitmapFrame^> thisTask)
     {
-        BitmapFrame^ frame = thisTask.get();   
+        BitmapFrame^ frame = thisTask.get();
 
         // Save some information as fields
         frameWidth = frame->PixelWidth;
@@ -77,32 +61,128 @@ void OcvImageProcessing::MainPage::Button_Click(Platform::Object^ sender, Window
     then([this](task<PixelDataProvider^> thisTask)
     {
         PixelDataProvider^ pixelProvider = thisTask.get();
-               Platform::Array<byte>^ srcPixels = pixelProvider->DetachPixelData();
-               
-               cv::Mat inputImage(frameHeight, frameWidth, CV_8UC4, srcPixels->Data);
-               unsigned char* dstPixels;
-               
-        // Create the WriteableBitmap 
-        WriteableBitmap^ bitmap = ref new WriteableBitmap(frameWidth, frameHeight);
-
-               // Get access to the pixels
-               IBuffer^ buffer = bitmap->PixelBuffer;
-
-               // Obtain IBufferByteAccess
-               ComPtr<IBufferByteAccess> pBufferByteAccess;
-               ComPtr<IUnknown> pBuffer((IUnknown*)buffer);
-               pBuffer.As(&pBufferByteAccess);
-
-               // Get pointer to pixel bytes
-               pBufferByteAccess->Buffer(&dstPixels);
-               cv::Mat outputImage(frameHeight, frameWidth, CV_8UC4, dstPixels);
-
-               cv::Mat intermediateMat;
-               cv::Canny(inputImage, intermediateMat, 80, 90);
-               cv::cvtColor(intermediateMat, outputImage, CV_GRAY2BGRA);
-               //cv::blur(inputImage, outputImage, cv::Size(3,3));
-
-        // Set the bitmap to the Image element
-               PreviewWidget->Source = bitmap;       
+        Platform::Array<byte>^ srcPixels = pixelProvider->DetachPixelData();
+        Lena = cv::Mat(frameHeight, frameWidth, CV_8UC4);
+        memcpy(Lena.data, srcPixels->Data, 4*frameWidth*frameHeight);
+        UpdateImage(Lena);
     });
 }
+
+/// <summary>
+/// Invoked when this page is about to be displayed in a Frame.
+/// </summary>
+/// <param name="e">Event data that describes how this page was reached.  The Parameter
+/// property is typically used to configure the page.</param>
+void MainPage::OnNavigatedTo(NavigationEventArgs^ e)
+{
+    (void) e;    // Unused parameter
+}
+
+void OcvImageProcessing::MainPage::UpdateImage(const cv::Mat& image)
+{
+    // Create the WriteableBitmap
+    WriteableBitmap^ bitmap = ref new WriteableBitmap(image.cols, image.rows);
+
+    // Get access to the pixels
+    IBuffer^ buffer = bitmap->PixelBuffer;
+    unsigned char* dstPixels;
+
+    // Obtain IBufferByteAccess
+    ComPtr<IBufferByteAccess> pBufferByteAccess;
+    ComPtr<IUnknown> pBuffer((IUnknown*)buffer);
+    pBuffer.As(&pBufferByteAccess);
+
+    // Get pointer to pixel bytes
+    pBufferByteAccess->Buffer(&dstPixels);
+    memcpy(dstPixels, image.data, 4*image.cols*image.rows);
+
+    // Set the bitmap to the Image element
+    PreviewWidget->Source = bitmap;}
+
+
+cv::Mat OcvImageProcessing::MainPage::ApplyGrayFilter(const cv::Mat& image)
+{
+    cv::Mat result;
+    cv::Mat intermediateMat;
+    cv::cvtColor(image, intermediateMat, CV_RGBA2GRAY);
+    cv::cvtColor(intermediateMat, result, CV_GRAY2BGRA);
+    return result;
+}
+
+cv::Mat OcvImageProcessing::MainPage::ApplyCannyFilter(const cv::Mat& image)
+{
+    cv::Mat result;
+    cv::Mat intermediateMat;
+    cv::Canny(image, intermediateMat, 80, 90);
+    cv::cvtColor(intermediateMat, result, CV_GRAY2BGRA);
+    return result;
+}
+
+cv::Mat OcvImageProcessing::MainPage::ApplyBlurFilter(const cv::Mat& image)
+{
+    cv::Mat result;
+    cv::blur(image, result, cv::Size(3,3));
+    return result;
+}
+
+cv::Mat OcvImageProcessing::MainPage::ApplyFindFeaturesFilter(const cv::Mat& image)
+{
+    cv::Mat result;
+    cv::Mat intermediateMat;
+    cv::FastFeatureDetector detector(50);
+    std::vector<cv::KeyPoint> features;
+
+    image.copyTo(result);
+    cv::cvtColor(image, intermediateMat, CV_RGBA2GRAY);
+    detector.detect(intermediateMat, features);
+
+    for( unsigned int i = 0; i < std::min(features.size(), (size_t)50); i++ )
+    {
+        const cv::KeyPoint& kp = features[i];
+        cv::circle(result, cv::Point((int)kp.pt.x, (int)kp.pt.y), 10, cv::Scalar(255,0,0,255));
+    }
+
+    return result;
+}
+
+cv::Mat OcvImageProcessing::MainPage::ApplySepiaFilter(const cv::Mat& image)
+{
+    const float SepiaKernelData[16] =
+    {
+        /* B */0.131f, 0.534f, 0.272f, 0.f,
+        /* G */0.168f, 0.686f, 0.349f, 0.f,
+        /* R */0.189f, 0.769f, 0.393f, 0.f,
+        /* A */0.000f, 0.000f, 0.000f, 1.f
+    };
+    const cv::Mat SepiaKernel(4, 4, CV_32FC1, (void*)SepiaKernelData);
+    cv::Mat result;
+    cv::transform(image, result, SepiaKernel);
+    return result;
+}
+
+void OcvImageProcessing::MainPage::Button_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
+{
+    switch(FilterTypeWidget->SelectedIndex)
+    {
+    case PREVIEW:
+        UpdateImage(Lena);
+        break;
+    case GRAY:
+        UpdateImage(ApplyGrayFilter(Lena));
+        break;
+    case CANNY:
+        UpdateImage(ApplyCannyFilter(Lena));
+        break;
+    case BLUR:
+        UpdateImage(ApplyBlurFilter(Lena));
+        break;
+    case FEATURES:
+        UpdateImage(ApplyFindFeaturesFilter(Lena));
+        break;
+    case SEPIA:
+        UpdateImage(ApplySepiaFilter(Lena));
+        break;
+    default:
+        UpdateImage(Lena);
+    }
+}
index 8466621..79c1ac7 100644 (file)
@@ -6,22 +6,41 @@
 #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:
-               void Button_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
-
-               unsigned int frameWidth, frameHeight;
-       };
+    /// <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;
+    };
 }
index b85d9cf..1d862b7 100644 (file)
@@ -91,6 +91,7 @@
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
     <PackageCertificateKeyFile>OcvImageProcessing_TemporaryKey.pfx</PackageCertificateKeyFile>
+    <AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
     <ClCompile>
     <ClCompile>
       <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
       <DisableSpecificWarnings>4453</DisableSpecificWarnings>
-      <AdditionalIncludeDirectories>C:\Users\asmorkalov\Projects\opencv\build\install\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(OPENCV_DIR)\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ClCompile>
     <Link>
-      <AdditionalLibraryDirectories>C:\Users\asmorkalov\Projects\opencv\build\install\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <AdditionalDependencies>opencv_core246.lib;opencv_imgproc246.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>$(OPENCV_DIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalDependencies>opencv_core247d.lib;opencv_imgproc247d.lib;opencv_features2d247d.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
       <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
       <DisableSpecificWarnings>4453</DisableSpecificWarnings>
-      <AdditionalIncludeDirectories>C:\Users\asmorkalov\Projects\opencv\build\install\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(OPENCV_DIR)\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ClCompile>
     <Link>
-      <AdditionalLibraryDirectories>C:\Users\asmorkalov\Projects\opencv\build\install\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>$(OPENCV_DIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalDependencies>opencv_core247.lib;opencv_imgproc247.lib;opencv_features2d247.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <AppxManifest Include="Package.appxmanifest">
       <SubType>Designer</SubType>
     </AppxManifest>
-    <None Include="..\..\opencv\build\install\bin\opencv_core246.dll">
+    <None Include="$(OPENCV_DIR)\bin\opencv_calib3d247.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_calib3d247d.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_contrib247.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_contrib247d.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_core247.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_core247d.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_features2d247.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_features2d247d.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_flann247.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_flann247d.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_gpu247.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_highgui247.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_highgui247d.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_imgproc247.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_imgproc247d.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_legacy247.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_legacy247d.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_ml247.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_ml247d.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_nonfree247.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_nonfree247d.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_objdetect247.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_objdetect247d.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_photo247.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_photo247d.dll">
       <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_stitching247.dll">
       <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
     </None>
-    <None Include="..\..\opencv\build\install\bin\opencv_imgproc246.dll">
+    <None Include="$(OPENCV_DIR)\bin\opencv_stitching247d.dll">
       <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_superres247.dll">
       <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
     </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_superres247d.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_video247.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_video247d.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_videostab247.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
+    </None>
+    <None Include="$(OPENCV_DIR)\bin\opencv_videostab247d.dll">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
+    </None>
     <None Include="OcvImageProcessing_TemporaryKey.pfx" />
   </ItemGroup>
   <ItemGroup>
index 0004d0c..607c601 100644 (file)
   </ItemGroup>
   <ItemGroup>
     <None Include="OcvImageProcessing_TemporaryKey.pfx" />
-    <None Include="..\..\opencv\build\install\bin\opencv_core246.dll" />
-    <None Include="..\..\opencv\build\install\bin\opencv_imgproc246.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_calib3d247.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_calib3d247d.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_contrib247.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_contrib247d.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_core247.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_core247d.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_features2d247.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_features2d247d.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_flann247.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_flann247d.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_gpu247.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_highgui247.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_highgui247d.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_imgproc247.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_imgproc247d.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_legacy247.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_legacy247d.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_ml247.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_ml247d.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_nonfree247.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_nonfree247d.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_objdetect247.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_objdetect247d.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_photo247.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_photo247d.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_stitching247.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_stitching247d.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_superres247.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_superres247d.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_video247.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_video247d.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_videostab247.dll" />
+    <None Include="$(OPENCV_DIR)\bin\opencv_videostab247d.dll" />
   </ItemGroup>
   <ItemGroup>
     <Page Include="MainPage.xaml" />
index d888e4f..40f61cf 100644 (file)
@@ -1,42 +1,24 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
-
-  <Identity Name="96635370-3751-48a8-84a6-afd4229cf435"
-            Publisher="CN=asmorkalov"
-            Version="1.0.0.0" />
-
+  <Identity Name="96635370-3751-48a8-84a6-afd4229cf435" Publisher="CN=asmorkalov" Version="1.0.0.0" />
   <Properties>
     <DisplayName>OcvImageProcessing</DisplayName>
     <PublisherDisplayName>asmorkalov</PublisherDisplayName>
     <Logo>Assets\StoreLogo.png</Logo>
   </Properties>
-
   <Prerequisites>
     <OSMinVersion>6.2.1</OSMinVersion>
     <OSMaxVersionTested>6.2.1</OSMaxVersionTested>
   </Prerequisites>
-
   <Resources>
-    <Resource Language="x-generate"/>
+    <Resource Language="x-generate" />
   </Resources>
-
   <Applications>
-    <Application Id="App"
-        Executable="$targetnametoken$.exe"
-        EntryPoint="OcvImageProcessing.App">
-        <VisualElements
-            DisplayName="OcvImageProcessing"
-            Logo="Assets\Logo.png"
-            SmallLogo="Assets\SmallLogo.png"
-            Description="OcvImageProcessing"
-            ForegroundText="light"
-            BackgroundColor="#464646">
-            <DefaultTile ShowName="allLogos" />
-            <SplashScreen Image="Assets\SplashScreen.png" />
-        </VisualElements>
+    <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="OcvImageProcessing.App">
+      <VisualElements DisplayName="OcvImageProcessing" Logo="Assets\Logo.png" SmallLogo="Assets\SmallLogo.png" Description="OcvImageProcessing" ForegroundText="light" BackgroundColor="#464646">
+        <DefaultTile ShowName="allLogos" />
+        <SplashScreen Image="Assets\SplashScreen.png" />
+      </VisualElements>
     </Application>
   </Applications>
-  <Capabilities>
-    <Capability Name="internetClient" />
-  </Capabilities>
 </Package>
\ No newline at end of file