Giter Club home page Giter Club logo

visualstudiomienginepictureviewer's Introduction

PictureViewer

Sample MIEngine debugger UIVisualizer for RasberryPi cameras.

This repo contains two projects, in /src is the PictureView VSIX project and in /simpletest_raspicam is a sample CMake project that can be used to test the PictureViewer. These instructions assume you are already familiar with the Linux build and debugging features of Visual Studio and have already set up your raspberryPi with a camera and installed installed gdb.

PictureViewer Project

This is a VSIX project. You will need to edit the PictureView.csproj and change this line:

<HintPath>......\MIEngine\bin\Lab.Debug\Microsoft.DebugEngineHost.dll</HintPath>

to point to your instance of Visual Studio. Something like:

<HintPath>my-VS-root-path\Common7\IDE\CommonExtensions\Microsoft\MDD\Debugger\Microsoft.DebugEngineHost.dll</HintPath>

Open the .sln file in Visual Studio. Build and debug PictureViewer. Once running VS will open a new experimental version of Visual Studio with your VSIX installed. When it opens then open the folder simpletest_raspicam. Build the project and configure for debugging according to the instructions below.

In order to test the PictureViewer:

  1. Set a breakpoint on simpletest_raspicam.cpp at the line containing "Camera.grab()".
  2. Select the "DebugOnPi" debug target.
  3. Hit F5.

At this point gdb will fire up on the remote target and VS will eventually stop at the breakpoint.

  1. Open the Locals window.
  2. On the line containing the value for variable "Camera" you should see a small magifying glass icon in the "Value" column. Click on the icon.

At this point VS will open a window which will initially be blank, but will eventually contain a picture from the camera on your Pi. Hitting the "next" button below the picture will refresh the view with another shot from the camera.

simpletest_raspicam Project

This project builds using raspberry pi cross compiler tools. You will need to adjust the values of the environment variables RASPIAN_ROOTFS and PATH in CMAKESettings.json for the location of your tools. You will also need to set the value of cmakeToolchain to point to your raspberryPi toolchain file.

The project depends upon two other packages: raspicam and opencv. You will need to copy, build, and install these projects also using the raspberryPi toolset. So you will have to make similar CMakeSettings configuration changes when building those projects as well.

The simpletest_raspicam project needs to know where to find the above two packages. Adjust the values of OpenCV_DIR and raspicam_DIR in CMakeSettings .json to point to your package installations.

Once you have successfully built simpletest_raspicam copy the shared libraries from your package installations to some directory (e.g. ~/camera) on your raspberryPi.

~/camera:

libopencv_calib3d.so.405 libopencv_gapi.so.405 libopencv_objdetect.so.405 libraspicam_cv.so libopencv_core.so.405 libopencv_highgui.so.405 libopencv_photo.so.405 libraspicam.so.0.1 libopencv_dnn.so.405 libopencv_imgcodecs.so.405 libopencv_stitching.so.405
libopencv_features2d.so.405 libopencv_imgproc.so.405 libopencv_videoio.so.405 libopencv_flann.so.405 libopencv_ml.so.405 libopencv_video.so.405

Add a Linux Launch (gdb) debugging configuration to your project. It should look something like this:

{
  "version": "0.2.1",
  "defaults": {},
  "configurations": [
    {
      "type": "cppgdb",
      "name": "DebugOnPi",
      "project": "CMakeLists.txt",
      "projectTarget": "simpletest_raspicam",
      "debuggerConfiguration": "gdb",
      "MIMode": "gdb",
      "args": [],
      "env": {},
      "deployDirectory": "~/camera",
      "remoteMachineName": "-1836894802;xxx.yyy.zz.ppp (username=pi, port=22, authentication=Password)",
      "preDebugCommand": "export LD_LIBRARY_PATH=~/camera"
    }
  ]
}

visualstudiomienginepictureviewer's People

Contributors

microsoft-github-operations[bot] avatar microsoftopensource avatar paulmaybee avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

davidoster

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.