[Midnightbsd-cvs] mports [18971] trunk/graphics/opencv: update patchset

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri May 15 08:17:58 EDT 2015


Revision: 18971
          http://svnweb.midnightbsd.org/mports/?rev=18971
Author:   laffer1
Date:     2015-05-15 08:17:56 -0400 (Fri, 15 May 2015)
Log Message:
-----------
update patchset

Modified Paths:
--------------
    trunk/graphics/opencv/Makefile
    trunk/graphics/opencv/pkg-plist

Added Paths:
-----------
    trunk/graphics/opencv/files/FindOpenCVCore.cmake.in
    trunk/graphics/opencv/files/patch-apps__traincascade__imagestorage.h
    trunk/graphics/opencv/files/patch-cmake__OpenCVCompilerOptions.cmake
    trunk/graphics/opencv/files/patch-cmake__OpenCVFindLibsGUI.cmake
    trunk/graphics/opencv/files/patch-cmake__OpenCVVersion.cmake
    trunk/graphics/opencv/files/patch-modules__contrib__src__spinimages.cpp
    trunk/graphics/opencv/files/patch-modules__core__src__system.cpp
    trunk/graphics/opencv/files/patch-modules__highgui__src__cap_libv4l.cpp
    trunk/graphics/opencv/files/patch-modules__highgui__src__cap_v4l.cpp
    trunk/graphics/opencv/files/patch-modules__python__src2__cv2.cv.hpp
    trunk/graphics/opencv/files/patch-modules__ts__src__ts.cpp
    trunk/graphics/opencv/files/patch-modules_legacy_src_calibfilter.cpp
    trunk/graphics/opencv/files/patch-samples__cpp__tutorial_code__core__how_to_scan_images__how_to_scan_images.cpp

Modified: trunk/graphics/opencv/Makefile
===================================================================
--- trunk/graphics/opencv/Makefile	2015-05-15 12:07:29 UTC (rev 18970)
+++ trunk/graphics/opencv/Makefile	2015-05-15 12:17:56 UTC (rev 18971)
@@ -2,7 +2,7 @@
 
 PORTNAME?=	opencv
 PORTVERSION=	2.4.9
-PORTREVISION?=	0
+PORTREVISION?=	2
 CATEGORIES=	graphics
 MASTER_SITES=	SF/${PORTNAME}library/${PORTNAME}-unix/${PORTVERSION}
 
@@ -17,9 +17,6 @@
 WANT_GSTREAMER=	yes
 MAKE_JOBS_UNSAFE=	yes
 
-NOT_FOR_ARCHS=	sparc64
-NOT_FOR_ARCHS_REASON_sparc64=	does not compile on sparc64
-
 DATADIR=	${PREFIX}/share/OpenCV
 PLIST_SUB+=	VERSION=${DISTVERSION}
 
@@ -144,7 +141,7 @@
 .endif
 
 .if ${PORT_OPTIONS:MPNG}
-LIB_DEPENDS+=	libpng15.so:${PORTSDIR}/graphics/png
+LIB_DEPENDS+=	libpng.so:${PORTSDIR}/graphics/png
 CMAKE_ARGS+=	-DWITH_PNG:BOOL=On
 .else
 CMAKE_ARGS+=	-DWITH_PNG:BOOL=Off
@@ -229,6 +226,7 @@
 		 ${WRKSRC}/cmake/OpenCVGenPkgconfig.cmake
 	@${REINPLACE_CMD} -e 's|share/OpenCV/doc|${DOCSDIR_REL}|g' \
 		-e 's|share/OpenCV/samples|${EXAMPLESDIR_REL}|g' \
+		-e 's/FreeBSD|NetBSD|DragonFly/MidnightBSD|FreeBSD/g' \
 		${WRKSRC}/CMakeLists.txt
 	@${FIND} ${WRKSRC} -name '*.orig' -exec ${RM} {} \;
 .if defined(OCV_CORE)

Added: trunk/graphics/opencv/files/FindOpenCVCore.cmake.in
===================================================================
--- trunk/graphics/opencv/files/FindOpenCVCore.cmake.in	                        (rev 0)
+++ trunk/graphics/opencv/files/FindOpenCVCore.cmake.in	2015-05-15 12:17:56 UTC (rev 18971)
@@ -0,0 +1,38 @@
+# Module for finding the core components of OpenCV installed by
+# graphics/opencv-core.  Use for projects that require only
+# opencv_core or opencv_imgproc.  Others should use the
+# standard OpenCV CMake find routines provided by graphics/opencv.
+#
+# This module provides:
+# OPENCVCORE_FOUND - defined if the required OpenCV components are found
+# OpenCV_INCLUDE_DIRS - the path to the OpenCV headers
+# OpenCV_LIBS - the OpenCV libraries to link to
+# OpenCV_VERSION - the version of OpenCV
+#
+# Example usage: find_package( OpenCVCore COMPONENTS core imgproc REQUIRED )
+
+include( FindPackageHandleStandardArgs )
+
+set( OpenCV_VERSION %%OCV_VERSION%% )
+
+find_path( OpenCV_INCLUDE_DIRS NAMES opencv2/core/core.hpp )
+
+if( OpenCVCore_FIND_COMPONENTS )
+  foreach( component ${OpenCVCore_FIND_COMPONENTS} )
+    string( TOUPPER ${component} _COMPONENT )
+    set( OPENCV_USE_${_COMPONENT} 1 )
+  endforeach()
+endif()
+
+# opencv_core is always required
+find_library( OPENCV_CORE_LIBRARY NAMES opencv_core )
+
+if( OPENCV_USE_IMGPROC OR NOT OpenCVCore_FIND_COMPONENTS )
+  find_library( OPENCV_IMGPROC_LIBRARY NAMES opencv_imgproc )
+endif()
+
+set( OpenCV_LIBS ${OPENCV_CORE_LIBRARY} ${OPENCV_IMGPROC_LIBRARY} )
+
+find_package_handle_standard_args( OpenCVCore DEFAULT_MSG OpenCV_LIBS OpenCV_INCLUDE_DIRS )
+
+mark_as_advanced( ${OpenCV_LIBS} ${OpenCV_INCLUDE_DIRS} ${OpenCV_VERSION} )


Property changes on: trunk/graphics/opencv/files/FindOpenCVCore.cmake.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/opencv/files/patch-apps__traincascade__imagestorage.h
===================================================================
--- trunk/graphics/opencv/files/patch-apps__traincascade__imagestorage.h	                        (rev 0)
+++ trunk/graphics/opencv/files/patch-apps__traincascade__imagestorage.h	2015-05-15 12:17:56 UTC (rev 18971)
@@ -0,0 +1,10 @@
+--- ./apps/traincascade/imagestorage.h.orig	2013-07-10 07:49:00.000000000 -0400
++++ ./apps/traincascade/imagestorage.h	2013-10-23 23:52:32.000000000 -0400
+@@ -1,6 +1,7 @@
+ #ifndef _OPENCV_IMAGESTORAGE_H_
+ #define _OPENCV_IMAGESTORAGE_H_
+ 
++#include <cstdio>
+ #include "highgui.h"
+ 
+ using namespace cv;


Property changes on: trunk/graphics/opencv/files/patch-apps__traincascade__imagestorage.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/opencv/files/patch-cmake__OpenCVCompilerOptions.cmake
===================================================================
--- trunk/graphics/opencv/files/patch-cmake__OpenCVCompilerOptions.cmake	                        (rev 0)
+++ trunk/graphics/opencv/files/patch-cmake__OpenCVCompilerOptions.cmake	2015-05-15 12:17:56 UTC (rev 18971)
@@ -0,0 +1,27 @@
+--- ./cmake/OpenCVCompilerOptions.cmake.orig	2013-11-06 09:26:39.000000000 -0500
++++ ./cmake/OpenCVCompilerOptions.cmake	2013-11-30 05:56:46.000000000 -0500
+@@ -122,7 +122,7 @@
+     add_extra_compiler_option(-ffast-math)
+   endif()
+   if(ENABLE_POWERPC)
+-    add_extra_compiler_option("-mcpu=G3 -mtune=G5")
++    add_extra_compiler_option("-mtune=G5")
+   endif()
+   if(ENABLE_SSE)
+     add_extra_compiler_option(-msse)
+@@ -158,6 +158,7 @@
+   endif(NOT MINGW)
+ 
+   if(X86 OR X86_64)
++   if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+     if(NOT APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 4)
+       if(OPENCV_EXTRA_CXX_FLAGS MATCHES "-m(sse2|avx)")
+         add_extra_compiler_option(-mfpmath=sse)# !! important - be on the same wave with x64 compilers
+@@ -165,6 +166,7 @@
+         add_extra_compiler_option(-mfpmath=387)
+       endif()
+     endif()
++   endif()
+   endif()
+ 
+   # Profiling?


Property changes on: trunk/graphics/opencv/files/patch-cmake__OpenCVCompilerOptions.cmake
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/opencv/files/patch-cmake__OpenCVFindLibsGUI.cmake
===================================================================
--- trunk/graphics/opencv/files/patch-cmake__OpenCVFindLibsGUI.cmake	                        (rev 0)
+++ trunk/graphics/opencv/files/patch-cmake__OpenCVFindLibsGUI.cmake	2015-05-15 12:17:56 UTC (rev 18971)
@@ -0,0 +1,14 @@
+--- ./cmake/OpenCVFindLibsGUI.cmake.orig	2013-12-10 09:20:59.000000000 -0500
++++ ./cmake/OpenCVFindLibsGUI.cmake	2013-12-10 09:22:40.000000000 -0500
+@@ -56,10 +56,9 @@
+     if(OPENGL_FOUND)
+       set(HAVE_OPENGL TRUE)
+       list(APPEND OPENCV_LINKER_LIBS ${OPENGL_LIBRARIES})
++      ocv_include_directories(${OPENGL_INCLUDE_DIR})
+       if(QT_QTOPENGL_FOUND)
+         set(HAVE_QT_OPENGL TRUE)
+-      else()
+-        ocv_include_directories(${OPENGL_INCLUDE_DIR})
+       endif()
+     endif()
+   endif()


Property changes on: trunk/graphics/opencv/files/patch-cmake__OpenCVFindLibsGUI.cmake
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/opencv/files/patch-cmake__OpenCVVersion.cmake
===================================================================
--- trunk/graphics/opencv/files/patch-cmake__OpenCVVersion.cmake	                        (rev 0)
+++ trunk/graphics/opencv/files/patch-cmake__OpenCVVersion.cmake	2015-05-15 12:17:56 UTC (rev 18971)
@@ -0,0 +1,11 @@
+--- ./cmake/OpenCVVersion.cmake.orig	2013-10-24 00:12:48.000000000 -0400
++++ ./cmake/OpenCVVersion.cmake	2013-10-24 00:13:06.000000000 -0400
+@@ -11,7 +11,7 @@
+   set(OPENCV_VERSION "${OPENCV_VERSION}.${OPENCV_VERSION_TWEAK}")
+ endif()
+ 
+-set(OPENCV_SOVERSION "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}")
++set(OPENCV_SOVERSION "${OPENCV_VERSION_MAJOR}")
+ set(OPENCV_LIBVERSION "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}.${OPENCV_VERSION_PATCH}")
+ 
+ # create a dependency on version file


Property changes on: trunk/graphics/opencv/files/patch-cmake__OpenCVVersion.cmake
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/opencv/files/patch-modules__contrib__src__spinimages.cpp
===================================================================
--- trunk/graphics/opencv/files/patch-modules__contrib__src__spinimages.cpp	                        (rev 0)
+++ trunk/graphics/opencv/files/patch-modules__contrib__src__spinimages.cpp	2015-05-15 12:17:56 UTC (rev 18971)
@@ -0,0 +1,10 @@
+--- ./modules/contrib/src/spinimages.cpp.orig	2013-10-26 07:55:45.000000000 -0400
++++ ./modules/contrib/src/spinimages.cpp	2013-10-26 07:56:13.000000000 -0400
+@@ -46,6 +46,7 @@
+ #include <functional>
+ #include <fstream>
+ #include <limits>
++#include <numeric>
+ #include <set>
+ 
+ using namespace cv;


Property changes on: trunk/graphics/opencv/files/patch-modules__contrib__src__spinimages.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/opencv/files/patch-modules__core__src__system.cpp
===================================================================
--- trunk/graphics/opencv/files/patch-modules__core__src__system.cpp	                        (rev 0)
+++ trunk/graphics/opencv/files/patch-modules__core__src__system.cpp	2015-05-15 12:17:56 UTC (rev 18971)
@@ -0,0 +1,41 @@
+--- ./modules/core/src/system.cpp.orig	2013-11-25 05:42:32.000000000 -0500
++++ ./modules/core/src/system.cpp	2013-11-25 05:42:42.000000000 -0500
+@@ -126,7 +126,7 @@
+ 
+ #include <stdarg.h>
+ 
+-#if defined __linux__ || defined __APPLE__ || defined __EMSCRIPTEN__
++#if defined __linux__ || defined __APPLE__ || defined __EMSCRIPTEN__ || defined __FreeBSD__ || defined(__MidnightBSD__)
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+@@ -897,14 +897,23 @@
+ 
+ struct Mutex::Impl
+ {
+-    Impl() { pthread_mutex_init(&sl, 0); refcount = 1; }
+-    ~Impl() { pthread_mutex_destroy(&sl); }
++    Impl()
++    {
++        pthread_mutexattr_t attr;
++        pthread_mutexattr_init(&attr);
++        pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
++        pthread_mutex_init(&mt, &attr);
++        pthread_mutexattr_destroy(&attr);
+ 
+-    void lock() { pthread_mutex_lock(&sl); }
+-    bool trylock() { return pthread_mutex_trylock(&sl) == 0; }
+-    void unlock() { pthread_mutex_unlock(&sl); }
++        refcount = 1;
++    }
++    ~Impl() { pthread_mutex_destroy(&mt); }
+ 
+-    pthread_mutex_t sl;
++    void lock() { pthread_mutex_lock(&mt); }
++    bool trylock() { return pthread_mutex_trylock(&mt) == 0; }
++    void unlock() { pthread_mutex_unlock(&mt); }
++
++    pthread_mutex_t mt;
+     int refcount;
+ };
+ 


Property changes on: trunk/graphics/opencv/files/patch-modules__core__src__system.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/opencv/files/patch-modules__highgui__src__cap_libv4l.cpp
===================================================================
--- trunk/graphics/opencv/files/patch-modules__highgui__src__cap_libv4l.cpp	                        (rev 0)
+++ trunk/graphics/opencv/files/patch-modules__highgui__src__cap_libv4l.cpp	2015-05-15 12:17:56 UTC (rev 18971)
@@ -0,0 +1,19 @@
+--- ./modules/highgui/src/cap_libv4l.cpp.orig	2013-07-10 07:49:00.000000000 -0400
++++ ./modules/highgui/src/cap_libv4l.cpp	2013-10-23 23:52:32.000000000 -0400
+@@ -237,7 +237,6 @@
+ #include <sys/mman.h>
+ #include <string.h>
+ #include <stdlib.h>
+-#include <asm/types.h>          /* for videodev2.h */
+ #include <assert.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+@@ -574,7 +573,7 @@
+ 
+ static void v4l2_scan_controls(CvCaptureCAM_V4L* capture) {
+ 
+-  __u32 ctrl_id;
++  uint32_t ctrl_id;
+   struct v4l2_control c;
+   if (capture->v4l2_ctrl_ranges != NULL) {
+     v4l2_free_ranges(capture);


Property changes on: trunk/graphics/opencv/files/patch-modules__highgui__src__cap_libv4l.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/opencv/files/patch-modules__highgui__src__cap_v4l.cpp
===================================================================
--- trunk/graphics/opencv/files/patch-modules__highgui__src__cap_v4l.cpp	                        (rev 0)
+++ trunk/graphics/opencv/files/patch-modules__highgui__src__cap_v4l.cpp	2015-05-15 12:17:56 UTC (rev 18971)
@@ -0,0 +1,19 @@
+--- ./modules/highgui/src/cap_v4l.cpp.orig	2013-10-23 23:54:06.000000000 -0400
++++ ./modules/highgui/src/cap_v4l.cpp	2013-10-23 23:55:25.000000000 -0400
+@@ -232,7 +232,6 @@
+ #include <sys/ioctl.h>
+ 
+ #ifdef HAVE_CAMV4L2
+-#include <asm/types.h>          /* for videodev2.h */
+ #include <linux/videodev2.h>
+ #endif
+ 
+@@ -663,7 +662,7 @@
+ static void v4l2_scan_controls(CvCaptureCAM_V4L* capture)
+ {
+ 
+-  __u32 ctrl_id;
++  uint32_t ctrl_id;
+ 
+   for (ctrl_id = V4L2_CID_BASE;
+        ctrl_id < V4L2_CID_LASTP1;


Property changes on: trunk/graphics/opencv/files/patch-modules__highgui__src__cap_v4l.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/opencv/files/patch-modules__python__src2__cv2.cv.hpp
===================================================================
--- trunk/graphics/opencv/files/patch-modules__python__src2__cv2.cv.hpp	                        (rev 0)
+++ trunk/graphics/opencv/files/patch-modules__python__src2__cv2.cv.hpp	2015-05-15 12:17:56 UTC (rev 18971)
@@ -0,0 +1,11 @@
+--- ./modules/python/src2/cv2.cv.hpp.orig	2013-10-22 17:54:10.000000000 -0400
++++ ./modules/python/src2/cv2.cv.hpp	2013-10-22 17:55:03.000000000 -0400
+@@ -2169,7 +2169,7 @@
+ static int convert_to_CvNextEdgeType(PyObject *o, CvNextEdgeType *dst, const char *name = "no_name")
+ {
+   if (!PyInt_Check(o)) {
+-    *dst = (CvNextEdgeType)NULL;
++    *dst = (CvNextEdgeType)0;
+     return failmsg("Expected number for CvNextEdgeType argument '%s'", name);
+   } else {
+     *dst = (CvNextEdgeType)PyInt_AsLong(o);


Property changes on: trunk/graphics/opencv/files/patch-modules__python__src2__cv2.cv.hpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/opencv/files/patch-modules__ts__src__ts.cpp
===================================================================
--- trunk/graphics/opencv/files/patch-modules__ts__src__ts.cpp	                        (rev 0)
+++ trunk/graphics/opencv/files/patch-modules__ts__src__ts.cpp	2015-05-15 12:17:56 UTC (rev 18971)
@@ -0,0 +1,20 @@
+--- ./modules/ts/src/ts.cpp.orig	2013-10-26 08:01:35.000000000 -0400
++++ ./modules/ts/src/ts.cpp	2013-10-26 08:02:28.000000000 -0400
+@@ -562,7 +562,7 @@
+     for( int i = 0; i < MAX_IDX; i++ )
+         if( (streams & (1 << i)) )
+         {
+-            output_buf[i] += std::string(str);
++            output_buf[i] += ::std::string(str);
+             // in the new GTest-based framework we do not use
+             // any output files (except for the automatically generated xml report).
+             // if a test fails, all the buffers are printed, so we do not want to duplicate the information and
+@@ -617,7 +617,7 @@
+     Scalar s;
+     uchar *p = NULL;
+     int n = 100/delta;
+-    int nR = std::min(n, (img.rows+1)/2), nC = std::min(n, (img.cols+1)/2);
++    int nR = ::std::min(n, (img.rows+1)/2), nC = std::min(n, (img.cols+1)/2);
+ 
+     int r, c, i;
+     for(r=0; r<nR; r++)


Property changes on: trunk/graphics/opencv/files/patch-modules__ts__src__ts.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/opencv/files/patch-modules_legacy_src_calibfilter.cpp
===================================================================
--- trunk/graphics/opencv/files/patch-modules_legacy_src_calibfilter.cpp	                        (rev 0)
+++ trunk/graphics/opencv/files/patch-modules_legacy_src_calibfilter.cpp	2015-05-15 12:17:56 UTC (rev 18971)
@@ -0,0 +1,123 @@
+--- modules/legacy/src/calibfilter.cpp.orig	2014-04-11 10:15:26 UTC
++++ modules/legacy/src/calibfilter.cpp
+@@ -95,11 +95,8 @@ bool CvCalibFilter::SetEtalon( CvCalibEt
+ 
+     Stop();
+ 
+-    if (latestPoints != NULL)
+-    {
+-        for( i = 0; i < MAX_CAMERAS; i++ )
+-            cvFree( latestPoints + i );
+-    }
++    for( i = 0; i < MAX_CAMERAS; i++ )
++        cvFree( latestPoints + i );
+ 
+     if( type == CV_CALIB_ETALON_USER || type != etalonType )
+     {
+@@ -529,64 +526,61 @@ void CvCalibFilter::DrawPoints( CvMat** 
+         return;
+     }
+ 
+-    if( latestCounts )
++    for( i = 0; i < cameraCount; i++ )
+     {
+-        for( i = 0; i < cameraCount; i++ )
++        if( dstarr[i] && latestCounts[i] )
+         {
+-            if( dstarr[i] && latestCounts[i] )
+-            {
+-                CvMat dst_stub, *dst;
+-                int count = 0;
+-                bool found = false;
+-                CvPoint2D32f* pts = 0;
++            CvMat dst_stub, *dst;
++            int count = 0;
++            bool found = false;
++            CvPoint2D32f* pts = 0;
+ 
+-                GetLatestPoints( i, &pts, &count, &found );
++            GetLatestPoints( i, &pts, &count, &found );
+ 
+-                dst = cvGetMat( dstarr[i], &dst_stub );
++            dst = cvGetMat( dstarr[i], &dst_stub );
+ 
+-                static const CvScalar line_colors[] =
+-                {
+-                    {{0,0,255}},
+-                    {{0,128,255}},
+-                    {{0,200,200}},
+-                    {{0,255,0}},
+-                    {{200,200,0}},
+-                    {{255,0,0}},
+-                    {{255,0,255}}
+-                };
++            static const CvScalar line_colors[] =
++            {
++                {{0,0,255}},
++                {{0,128,255}},
++                {{0,200,200}},
++                {{0,255,0}},
++                {{200,200,0}},
++                {{255,0,0}},
++                {{255,0,255}}
++            };
+ 
+-                const int colorCount = sizeof(line_colors)/sizeof(line_colors[0]);
+-                const int r = 4;
+-                CvScalar color = line_colors[0];
+-                CvPoint prev_pt = { 0, 0};
++            const int colorCount = sizeof(line_colors)/sizeof(line_colors[0]);
++            const int r = 4;
++            CvScalar color = line_colors[0];
++            CvPoint prev_pt = { 0, 0};
+ 
+-                for( j = 0; j < count; j++ )
+-                {
+-                    CvPoint pt;
+-                    pt.x = cvRound(pts[j].x);
+-                    pt.y = cvRound(pts[j].y);
++            for( j = 0; j < count; j++ )
++            {
++                CvPoint pt;
++                pt.x = cvRound(pts[j].x);
++                pt.y = cvRound(pts[j].y);
+ 
+-                    if( found )
+-                    {
+-                        if( etalonType == CV_CALIB_ETALON_CHESSBOARD )
+-                            color = line_colors[(j/cvRound(etalonParams[0]))%colorCount];
+-                        else
+-                            color = CV_RGB(0,255,0);
++                if( found )
++                {
++                    if( etalonType == CV_CALIB_ETALON_CHESSBOARD )
++                        color = line_colors[(j/cvRound(etalonParams[0]))%colorCount];
++                    else
++                        color = CV_RGB(0,255,0);
+ 
+-                        if( j != 0 )
+-                            cvLine( dst, prev_pt, pt, color, 1, CV_AA );
+-                    }
++                    if( j != 0 )
++                        cvLine( dst, prev_pt, pt, color, 1, CV_AA );
++                }
+ 
+-                    cvLine( dst, cvPoint( pt.x - r, pt.y - r ),
+-                            cvPoint( pt.x + r, pt.y + r ), color, 1, CV_AA );
++                cvLine( dst, cvPoint( pt.x - r, pt.y - r ),
++                        cvPoint( pt.x + r, pt.y + r ), color, 1, CV_AA );
+ 
+-                    cvLine( dst, cvPoint( pt.x - r, pt.y + r),
+-                            cvPoint( pt.x + r, pt.y - r), color, 1, CV_AA );
++                cvLine( dst, cvPoint( pt.x - r, pt.y + r),
++                        cvPoint( pt.x + r, pt.y - r), color, 1, CV_AA );
+ 
+-                    cvCircle( dst, pt, r+1, color, 1, CV_AA );
++                cvCircle( dst, pt, r+1, color, 1, CV_AA );
+ 
+-                    prev_pt = pt;
+-                }
++                prev_pt = pt;
+             }
+         }
+     }


Property changes on: trunk/graphics/opencv/files/patch-modules_legacy_src_calibfilter.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/opencv/files/patch-samples__cpp__tutorial_code__core__how_to_scan_images__how_to_scan_images.cpp
===================================================================
--- trunk/graphics/opencv/files/patch-samples__cpp__tutorial_code__core__how_to_scan_images__how_to_scan_images.cpp	                        (rev 0)
+++ trunk/graphics/opencv/files/patch-samples__cpp__tutorial_code__core__how_to_scan_images__how_to_scan_images.cpp	2015-05-15 12:17:56 UTC (rev 18971)
@@ -0,0 +1,15 @@
+--- ./samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp.orig	2013-10-26 09:51:39.000000000 -0400
++++ ./samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp	2013-10-26 09:51:47.000000000 -0400
+@@ -1,4 +1,4 @@
+-#include <opencv2/core/core.hpp>
++#include <opencv2/core/core.hpp>
+ #include <opencv2/highgui/highgui.hpp>
+ #include <iostream>
+ #include <sstream>
+@@ -213,4 +213,4 @@
+     }
+ 
+     return I;
+-}
+\ No newline at end of file
++}


Property changes on: trunk/graphics/opencv/files/patch-samples__cpp__tutorial_code__core__how_to_scan_images__how_to_scan_images.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/graphics/opencv/pkg-plist
===================================================================
--- trunk/graphics/opencv/pkg-plist	2015-05-15 12:07:29 UTC (rev 18970)
+++ trunk/graphics/opencv/pkg-plist	2015-05-15 12:17:56 UTC (rev 18971)
@@ -224,27 +224,3 @@
 %%DATADIR%%/lbpcascades/lbpcascade_frontalface.xml
 %%DATADIR%%/lbpcascades/lbpcascade_profileface.xml
 %%DATADIR%%/lbpcascades/lbpcascade_silverware.xml
- at dirrm %%DATADIR%%/lbpcascades
- at dirrm %%DATADIR%%/haarcascades
- at dirrmtry %%DATADIR%%
- at dirrm include/opencv2/videostab
- at dirrm include/opencv2/video
- at dirrm include/opencv2/ts
- at dirrm include/opencv2/superres
- at dirrm include/opencv2/stitching/detail
- at dirrm include/opencv2/stitching
- at dirrm include/opencv2/photo
- at dirrm include/opencv2/ocl
- at dirrm include/opencv2/objdetect
-%%NONFREE%%@dirrm include/opencv2/nonfree
- at dirrm include/opencv2/ml
- at dirrm include/opencv2/legacy
- at dirrm include/opencv2/highgui
- at dirrm include/opencv2/gpu/device/detail
- at dirrm include/opencv2/gpu/device
- at dirrm include/opencv2/gpu
- at dirrm include/opencv2/flann
- at dirrm include/opencv2/features2d
- at dirrm include/opencv2/contrib
- at dirrm include/opencv2/calib3d
- at dirrm include/opencv



More information about the Midnightbsd-cvs mailing list