LINK_INTERFACE_LIBRARIES ""
)
-install(TARGETS ${the_module} LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main)
+install(TARGETS ${the_module}
+ LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main
+ ARCHIVE DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main)
set(lib_target ${the_module}_library)
if(ANDROID)
\r
env->SetDoubleArrayRegion(result, 0, 2, fill);\r
\r
- if (baseLine != NULL)\r
- env->SetIntArrayRegion(baseLine, 0, 1, pbaseLine);\r
+ if (baseLine != NULL) {\r
+ jint jbaseLine = (jint)(*pbaseLine);\r
+ env->SetIntArrayRegion(baseLine, 0, 1, &jbaseLine);\r
+ }\r
\r
return result;\r
\r
#include "converters.h"\r
\r
#if defined DEBUG && defined ANDROID\r
-#include <android/log.h>\r
-#define MODULE_LOG_TAG "OpenCV.%(m)s"\r
-#define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, MODULE_LOG_TAG, __VA_ARGS__))\r
+# include <android/log.h>\r
+# define MODULE_LOG_TAG "OpenCV.%(m)s"\r
+# define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, MODULE_LOG_TAG, __VA_ARGS__))\r
#else //DEBUG\r
-#define LOGD(...)\r
+# define LOGD(...)\r
#endif //DEBUG\r
\r
+#ifdef _MSC_VER\r
+# pragma warning(disable:4800 4244)\r
+#endif\r
+\r
#include "opencv2/%(m)s/%(m)s.hpp"\r
\r
using namespace cv;\r
#define LOGD(...)\r
#endif\r
\r
+#ifdef _MSC_VER\r
+# pragma warning(disable:4800)\r
+#endif\r
+\r
#include "opencv2/core/core.hpp"\r
\r
using namespace cv;\r
if(! buff) return 0;\r
\r
count *= sizeof(T);\r
- int rest = ((m->rows - row) * m->cols - col) * m->elemSize();\r
+ int rest = ((m->rows - row) * m->cols - col) * (int)m->elemSize();\r
if(count>rest) count = rest;\r
int res = count;\r
\r
memcpy(m->ptr(row, col), buff, count);\r
} else {\r
// row by row\r
- int num = (m->cols - col) * m->elemSize(); // 1st partial row\r
+ int num = (m->cols - col) * (int)m->elemSize(); // 1st partial row\r
if(count<num) num = count;\r
uchar* data = m->ptr(row++, col);\r
while(count>0){\r
memcpy(data, buff, num);\r
count -= num;\r
buff += num;\r
- num = m->cols * m->elemSize();\r
+ num = m->cols * (int)m->elemSize();\r
if(count<num) num = count;\r
data = m->ptr(row++, 0);\r
}\r
if(! buff) return 0;\r
\r
int bytesToCopy = count * sizeof(T);\r
- int bytesRestInMat = ((m->rows - row) * m->cols - col) * m->elemSize();\r
+ int bytesRestInMat = ((m->rows - row) * m->cols - col) * (int)m->elemSize();\r
if(bytesToCopy > bytesRestInMat) bytesToCopy = bytesRestInMat;\r
int res = bytesToCopy;\r
\r
memcpy(buff, m->ptr(row, col), bytesToCopy);\r
} else {\r
// row by row\r
- int bytesInRow = (m->cols - col) * m->elemSize(); // 1st partial row\r
+ int bytesInRow = (m->cols - col) * (int)m->elemSize(); // 1st partial row\r
while(bytesToCopy > 0)\r
{\r
int len = std::min(bytesToCopy, bytesInRow);\r
buff += len;\r
row++;\r
col = 0;\r
- bytesInRow = m->cols * m->elemSize();\r
+ bytesInRow = m->cols * (int)m->elemSize();\r
}\r
}\r
return res;\r
\r
jdoubleArray res = env->NewDoubleArray(me->channels());\r
if(res){\r
- jdouble buff[me->channels()];\r
+ jdouble buff[CV_CN_MAX];//me->channels()\r
int i;\r
switch(me->depth()){\r
case CV_8U: for(i=0; i<me->channels(); i++) buff[i] = *((unsigned char*) me->ptr(row, col) + i); break;\r
\r
void vector_KeyPoint_to_Mat(vector<KeyPoint>& v_kp, Mat& mat)\r
{\r
- int count = v_kp.size();\r
+ int count = (int)v_kp.size();\r
mat.create(count, 1, CV_32FC(7));\r
for(int i=0; i<count; i++)\r
{\r
KeyPoint kp = v_kp[i];\r
- mat.at< Vec<float, 7> >(i, 0) = Vec<float, 7>(kp.pt.x, kp.pt.y, kp.size, kp.angle, kp.response, kp.octave, kp.class_id);\r
+ mat.at< Vec<float, 7> >(i, 0) = Vec<float, 7>(kp.pt.x, kp.pt.y, kp.size, kp.angle, kp.response, (float)kp.octave, (float)kp.class_id);\r
}\r
}\r
#endif\r
\r
void vector_Mat_to_Mat(std::vector<cv::Mat>& v_mat, cv::Mat& mat)\r
{\r
- int count = v_mat.size();\r
+ int count = (int)v_mat.size();\r
mat.create(count, 1, CV_32SC2);\r
for(int i=0; i<count; i++)\r
{\r
\r
void vector_DMatch_to_Mat(vector<DMatch>& v_dm, Mat& mat)\r
{\r
- int count = v_dm.size();\r
+ int count = (int)v_dm.size();\r
mat.create(count, 1, CV_32FC4);\r
for(int i=0; i<count; i++)\r
{\r
DMatch dm = v_dm[i];\r
- mat.at< Vec<float, 4> >(i, 0) = Vec<float, 4>(dm.queryIdx, dm.trainIdx, dm.imgIdx, dm.distance);\r
+ mat.at< Vec<float, 4> >(i, 0) = Vec<float, 4>((float)dm.queryIdx, (float)dm.trainIdx, (float)dm.imgIdx, dm.distance);\r
}\r
}\r
#endif\r
#ifdef HAVE_OPENCV_FEATURES2D\r
#include "opencv2/features2d/features2d.hpp"\r
\r
+#undef SIMPLEBLOB // to solve conflict with wincrypt.h on windows\r
+\r
namespace cv\r
{\r
\r