[Documentation] [TitleIndex] [WordIndex

Only released in EOL distros:  

Package Summary

Backporting features from the 2.4.x.y series of opencv releases to indigo.

  • Maintainer status: maintained
  • Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
  • Author: Daniel Stonier
  • License: BSD

Package Summary

Backporting features from the 2.4.x.y series of opencv releases to indigo.

  • Maintainer status: maintained
  • Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
  • Author: Daniel Stonier
  • License: BSD

Overview

This package contains api extracted from 2.4.x/3.y.z versions of opencv that are not included in the system opencv released for indigo platforms.

Zoomable Imshows

Usage

The api has been namespaced in a separate namespace, cv_backports so as to avoid conflicts with the regular opencv api.

A full listing of the api can be found in each header. Only the commonly used ones are shown here.

cv_backports/imshow.hpp

   1 void imshow(const std::string& winname, cv::InputArray mat);
   2 void namedWindow(const std::string& winname, int flags = cv::WINDOW_AUTOSIZE);
   3 void destroyWindow(const std::string& winname);
   4 void destroyAllWindows();
   5 int waitKey(int delay = 0);
   6 void imshow(const std::string& winname, cv::InputArray mat);
   7 int startWindowThread();
   8 void resizeWindow(const std::string& winname, int width, int height);
   9 void moveWindow(const std::string& winname, int x, int y);
  10 void setWindowProperty(const std::string& winname, int prop_id, double prop_value);//YV
  11 double getWindowProperty(const std::string& winname, int prop_id);//YV
  12 typedef void (*MouseCallback)(int event, int x, int y, int flags, void* userdata);
  13 void setMouseCallback(const std::string& winname, MouseCallback onMouse, void* userdata = 0);
  14 CvFont fontQt(const std::string& nameFont, int pointSize=-1,
  15                          cv::Scalar color=cv::Scalar::all(0), int weight=CV_FONT_NORMAL,
  16                          int style=CV_STYLE_NORMAL, int spacing=0);
  17 void addText( const cv::Mat& img, const std::string& text, cv::Point org, CvFont font);

Examples

imshow

   1 #include <cv_backports/imshow.hpp>
   2 
   3 cv::Mat image;
   4 // ...load the image
   5 std::string name = "Depth Image";
   6 cv_backports::namedWindow(name, CV_WINDOW_KEEPRATIO);
   7 cv_backports::imshow(name, image);
   8 // eventually
   9 cv_backports::destroyWindow(name);


2024-12-07 14:43