1 2 /////////////////////////////////////////////////////////// 3 // // 4 // SAGA // 5 // // 6 // System for Automated Geoscientific Analyses // 7 // // 8 // Tool Library // 9 // OpenCV // 10 // // 11 //-------------------------------------------------------// 12 // // 13 // opencv.h // 14 // // 15 // Copyright (C) 2009 by // 16 // Olaf Conrad // 17 // // 18 //-------------------------------------------------------// 19 // // 20 // This file is part of 'SAGA - System for Automated // 21 // Geoscientific Analyses'. SAGA is free software; you // 22 // can redistribute it and/or modify it under the terms // 23 // of the GNU General Public License as published by the // 24 // Free Software Foundation, either version 2 of the // 25 // License, or (at your option) any later version. // 26 // // 27 // SAGA is distributed in the hope that it will be // 28 // useful, but WITHOUT ANY WARRANTY; without even the // 29 // implied warranty of MERCHANTABILITY or FITNESS FOR A // 30 // PARTICULAR PURPOSE. See the GNU General Public // 31 // License for more details. // 32 // // 33 // You should have received a copy of the GNU General // 34 // Public License along with this program; if not, see // 35 // <http://www.gnu.org/licenses/>. // 36 // // 37 //-------------------------------------------------------// 38 // // 39 // e-mail: oconrad@saga-gis.org // 40 // // 41 // contact: Olaf Conrad // 42 // Institute of Geography // 43 // University of Hamburg // 44 // Germany // 45 // // 46 /////////////////////////////////////////////////////////// 47 48 //--------------------------------------------------------- 49 #ifndef HEADER_INCLUDED__opencv_H 50 #define HEADER_INCLUDED__opencv_H 51 52 53 /////////////////////////////////////////////////////////// 54 // // 55 // // 56 // // 57 /////////////////////////////////////////////////////////// 58 59 //--------------------------------------------------------- 60 #include <saga_api/saga_api.h> 61 62 #include <opencv2/core.hpp> 63 #include <opencv2/core/types_c.h> 64 #include <opencv2/core/core_c.h> 65 66 67 /////////////////////////////////////////////////////////// 68 // // 69 // // 70 // // 71 /////////////////////////////////////////////////////////// 72 73 //--------------------------------------------------------- 74 int Get_CVMatrix_Type (TSG_Data_Type Type); 75 76 bool Copy_Grid_To_CVMatrix (CSG_Grid *pGrid, cv::Mat &Matrix, bool bCheckSize = true); 77 bool Copy_CVMatrix_To_Grid (CSG_Grid *pGrid, cv::Mat &Matrix, bool bCheckSize = true); 78 79 bool Get_CVMatrix (cv::Mat &Matrix, int nx, int ny , TSG_Data_Type Type); 80 bool Get_CVMatrix (cv::Mat &Matrix, CSG_Grid *pGrid, TSG_Data_Type Type = SG_DATATYPE_Undefined); 81 82 //--------------------------------------------------------- 83 int Get_CVImage_Type (TSG_Data_Type Type); 84 85 bool Copy_Grid_To_CVImage (CSG_Grid *pGrid, IplImage *pImage, bool bCheckSize = true); 86 bool Copy_CVImage_To_Grid (CSG_Grid *pGrid, IplImage *pImage, bool bCheckSize = true); 87 88 IplImage * Get_CVImage (int nx, int ny , TSG_Data_Type Type); 89 IplImage * Get_CVImage (CSG_Grid *pGrid, TSG_Data_Type Type = SG_DATATYPE_Undefined); 90 91 92 /////////////////////////////////////////////////////////// 93 // // 94 // // 95 // // 96 /////////////////////////////////////////////////////////// 97 98 //--------------------------------------------------------- 99 #endif // #ifndef HEADER_INCLUDED__opencv_H 100