draw_util.h
Go to the documentation of this file.
00001 // *****************************************************************************
00002 //
00003 // Copyright (c) 2014, Southwest Research Institute® (SwRI®)
00004 // All rights reserved.
00005 //
00006 // Redistribution and use in source and binary forms, with or without
00007 // modification, are permitted provided that the following conditions are met:
00008 //     * Redistributions of source code must retain the above copyright
00009 //       notice, this list of conditions and the following disclaimer.
00010 //     * Redistributions in binary form must reproduce the above copyright
00011 //       notice, this list of conditions and the following disclaimer in the
00012 //       documentation and/or other materials provided with the distribution.
00013 //     * Neither the name of Southwest Research Institute® (SwRI®) nor the
00014 //       names of its contributors may be used to endorse or promote products
00015 //       derived from this software without specific prior written permission.
00016 //
00017 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00018 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00019 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00020 // ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
00021 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00022 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00023 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00024 // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00025 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00026 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00027 //
00028 // *****************************************************************************
00029 
00030 #ifndef IMAGE_UTIL_DRAW_UTIL_H_
00031 #define IMAGE_UTIL_DRAW_UTIL_H_
00032 
00033 #include <string>
00034 
00035 #include <opencv2/core/core.hpp>
00036 
00037 namespace swri_image_util
00038 {
00039   void RandomColor(int32_t seed, double& r, double& g, double& b);
00040 
00054   void JetColorMap(
00055       unsigned char &r,
00056       unsigned char &g,
00057       unsigned char &b,
00058       float value,
00059       float min,
00060       float max);
00061 
00062   void DrawOverlap(
00063       const std::string& title,
00064       const cv::Mat& image1,
00065       const cv::Mat& image2,
00066       const cv::Mat& transform);
00067 
00068   void DrawMatches(
00069       cv::Mat& image_out,
00070       const cv::Mat image1,
00071       const cv::Mat image2,
00072       const cv::Mat points1,
00073       const cv::Mat points2,
00074       const cv::Scalar& color = cv::Scalar::all(-1),
00075       bool draw_image_borders = false);
00076 
00077   void DrawMatches(
00078       const std::string& title,
00079       const cv::Mat image1,
00080       const cv::Mat image2,
00081       const cv::Mat points1,
00082       const cv::Mat points2,
00083       const cv::Scalar& color = cv::Scalar::all(-1),
00084       bool draw_image_borders = false);
00085 
00086   void DrawMatches(
00087       const std::string& title,
00088       const cv::Mat image,
00089       const cv::Mat points1,
00090       const cv::Mat points2,
00091       const cv::Scalar& color1,
00092       const cv::Scalar& color2,
00093       bool draw_image_borders = false);
00094 }
00095 
00096 #endif  // IMAGE_UTIL_DRAW_UTIL_H_
00097 


swri_image_util
Author(s): Kris Kozak
autogenerated on Tue Oct 3 2017 03:19:34