// OpenCV-Demo, Bräunl 2019
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "eyebot++.h"
using namespace cv;

int main()
{ QVGAcol img;
  Mat edges;

  CAMInit(QVGA);
  while(1)
  { CAMGet(img);                                      // Get color image
    Mat frame(240, 320, CV_8UC3, img);                // Convert to OpenCV
    cvtColor(frame, edges, COLOR_RGB2GRAY);           // Convert RGB to GRAY
    GaussianBlur(edges, edges, Size(7, 7), 1.5, 1.5); // Gaussian Blur
    Canny(edges, edges, 50, 100, 3);                  // Canny edge detection
    LCDImageGray(edges.data);                         // Display
  }
}