appkit  1.5.1
RoadNarrows Robotics Application Kit
WinOpenCv.h File Reference

RoadNarrows Robotics OpenCV Utilities. More...

#include <stdio.h>
#include <math.h>
#include "rnr/rnrconfig.h"
#include "opencv2/core/core.hpp"

Go to the source code of this file.

Namespaces

 rnr
 RoadNarrows Robotics.
 

Macros

#define CHANNEL_GRAY   -1
 all channels summed to gray
 
#define CHANNEL_BLUE   0
 blue channel
 
#define CHANNEL_GREEN   1
 green channel
 
#define CHANNEL_RED   2
 red channel
 
#define CHANNEL_HUE   0
 hue (color) channel
 
#define CHANNEL_SATURATION   1
 saturation (intensity) channel
 
#define CHANNEL_VALUE   2
 value (brightness) channel
 

Functions

const cv::Point rnr::nopoint (-1,-1)
 integer 2D "No Point"
 
const cv::Point2f rnr::nopoint2D (-1.0,-1.0)
 fpn 2D "No Point"
 
const cv::Point3f rnr::nopoint3D (-1.0,-1.0,-1.0)
 fpn 3D "No Point"
 
bool rnr::isnopoint (const cv::Point &pt)
 Check if point is not set ("no point"). More...
 
bool rnr::isnopoint (const cv::Point2f &pt)
 Check if point is not set ("no point"). More...
 
bool rnr::isnopoint (const cv::Point3f &pt)
 Check if point is not set ("no point"). More...
 
int rnr::distL1 (const cv::Point &p1, const cv::Point &p2)
 Calculate the L1 (taxi cab) distance between two 2D points. More...
 
int rnr::distL1 (const cv::Point2f &p1, const cv::Point2f &p2)
 Calculate the L1 (taxi cab) distance between two 2D points. More...
 
int rnr::distL1 (const cv::Point3f &p1, const cv::Point3f &p2)
 Calculate the L1 (taxi cab) distance between two 3D points. More...
 
int rnr::distL2 (const cv::Point &p1, const cv::Point &p2)
 Calculate the L2 (euclidean) distance between two 2D points. More...
 
double rnr::distL2 (const cv::Point2f &p1, const cv::Point2f &p2)
 Calculate the L2 (euclidean) distance between two 2D points. More...
 
double rnr::distL2 (const cv::Point3f &p1, const cv::Point3f &p2)
 Calculate the L2 (euclidean) distance between two 3D points. More...
 
int rnr::distLinf (const cv::Point &p1, const cv::Point &p2)
 Calculate the Linf distance between two 2D points. More...
 
int rnr::distLinf (const cv::Point2f &p1, const cv::Point2f &p2)
 Calculate the Linf distance between two 2D points. More...
 
int rnr::distLinf (const cv::Point3f &p1, const cv::Point3f &p2)
 Calculate the Linf distance between two 3D points. More...
 
bool rnr::isinrect (int x, int y, cv::Rect &r)
 Check if point x,y is with rectangle r. More...
 
cv::Size rnr::ar43width (cv::Size &siz)
 Calculate the nearest 4:3 aspect ratio from the width component of the target size. More...
 
cv::Size rnr::ar43width (int width)
 Calculate the nearest 4:3 aspect ratio from the target width. More...
 
cv::Size rnr::ar43height (cv::Size &siz)
 Calculate the nearest 4:3 aspect ratio from the height component of the target size. More...
 
cv::Size rnr::ar43height (int height)
 Calculate the nearest 4:3 aspect ratio from the target height. More...
 
void rnr::dbgrect (const std::string &str, const cv::Rect &r)
 Debug print rectangle. More...
 
void rnr::dbgpoint (const std::string &str, const cv::Point &pt)
 Debug print point. More...
 
void rnr::dbgsize (const std::string &str, const cv::Size &siz)
 Debug print size. More...
 

Detailed Description

RoadNarrows Robotics OpenCV Utilities.

LastChangedDate
2013-05-03 07:45:13 -0600 (Fri, 03 May 2013)
Rev
2904
Author
Robin Knight (robin.nosp@m..kni.nosp@m.ght@r.nosp@m.oadn.nosp@m.arrow.nosp@m.s.co.nosp@m.m)
Daniel Packard (danie.nosp@m.l@ro.nosp@m.adnar.nosp@m.rows.nosp@m..com)
Copyright
© 2011-2017. RoadNarrows LLC.
http://www.roadnarrows.com
All Rights Reserved

Definition in file WinOpenCv.h.