diff --git a/CMakeLists.txt b/CMakeLists.txt index 665ffe3d62..cd2095db86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,6 +52,11 @@ if(POLICY CMP0026) cmake_policy(SET CMP0026 OLD) endif() +if (POLICY CMP0042) + # silence cmake 3.0+ warnings about MACOSX_RPATH + cmake_policy(SET CMP0042 OLD) +endif() + # must go before the project command set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configs" FORCE) if(DEFINED CMAKE_BUILD_TYPE AND CMAKE_VERSION VERSION_GREATER "2.8") diff --git a/modules/highgui/doc/reading_and_writing_images_and_video.rst b/modules/highgui/doc/reading_and_writing_images_and_video.rst index 316012a279..a17ad90ebd 100644 --- a/modules/highgui/doc/reading_and_writing_images_and_video.rst +++ b/modules/highgui/doc/reading_and_writing_images_and_video.rst @@ -193,8 +193,8 @@ VideoCapture ------------ .. ocv:class:: VideoCapture -Class for video capturing from video files or cameras. -The class provides C++ API for capturing video from cameras or for reading video files. Here is how the class can be used: :: +Class for video capturing from video files, image sequences or cameras. +The class provides C++ API for capturing video from cameras or for reading video files and image sequences. Here is how the class can be used: :: #include "opencv2/opencv.hpp" diff --git a/modules/highgui/src/grfmt_tiff.cpp b/modules/highgui/src/grfmt_tiff.cpp index 9b05b364ec..eeee318c79 100644 --- a/modules/highgui/src/grfmt_tiff.cpp +++ b/modules/highgui/src/grfmt_tiff.cpp @@ -491,13 +491,18 @@ bool TiffEncoder::writeLibTiff( const Mat& img, const vector& params) || !TIFFSetField(pTiffHandle, TIFFTAG_SAMPLESPERPIXEL, channels) || !TIFFSetField(pTiffHandle, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG) || !TIFFSetField(pTiffHandle, TIFFTAG_ROWSPERSTRIP, rowsPerStrip) - || !TIFFSetField(pTiffHandle, TIFFTAG_PREDICTOR, predictor) ) { TIFFClose(pTiffHandle); return false; } + if (compression != COMPRESSION_NONE && !TIFFSetField(pTiffHandle, TIFFTAG_PREDICTOR, predictor) ) + { + TIFFClose(pTiffHandle); + return false; + } + // row buffer, because TIFFWriteScanline modifies the original data! size_t scanlineSize = TIFFScanlineSize(pTiffHandle); AutoBuffer _buffer(scanlineSize+32); diff --git a/modules/java/generator/src/java/android+AsyncServiceHelper.java b/modules/java/generator/src/java/android+AsyncServiceHelper.java index 568f3da170..e18d5a5001 100644 --- a/modules/java/generator/src/java/android+AsyncServiceHelper.java +++ b/modules/java/generator/src/java/android+AsyncServiceHelper.java @@ -21,8 +21,9 @@ class AsyncServiceHelper final LoaderCallbackInterface Callback) { AsyncServiceHelper helper = new AsyncServiceHelper(Version, AppContext, Callback); - if (AppContext.bindService(new Intent("org.opencv.engine.BIND"), - helper.mServiceConnection, Context.BIND_AUTO_CREATE)) + Intent intent = new Intent("org.opencv.engine.BIND"); + intent.setPackage("org.opencv.engine"); + if (AppContext.bindService(intent, helper.mServiceConnection, Context.BIND_AUTO_CREATE)) { return true; } diff --git a/samples/cpp/delaunay2.cpp b/samples/cpp/delaunay2.cpp index 87e6664b67..794f97d90d 100644 --- a/samples/cpp/delaunay2.cpp +++ b/samples/cpp/delaunay2.cpp @@ -98,7 +98,7 @@ static void paint_voronoi( Mat& img, Subdiv2D& subdiv ) ifacets[0] = ifacet; polylines(img, ifacets, true, Scalar(), 1, CV_AA, 0); - circle(img, centers[i], 3, Scalar(), -1, CV_AA, 0); + circle(img, centers[i], 3, Scalar(), CV_FILLED, CV_AA, 0); } } diff --git a/samples/cpp/grabcut.cpp b/samples/cpp/grabcut.cpp index b7d0d4dfd9..71a44ca522 100644 --- a/samples/cpp/grabcut.cpp +++ b/samples/cpp/grabcut.cpp @@ -21,10 +21,10 @@ static void help() "\tleft mouse button - set rectangle\n" "\n" "\tCTRL+left mouse button - set GC_BGD pixels\n" - "\tSHIFT+left mouse button - set CG_FGD pixels\n" + "\tSHIFT+left mouse button - set GC_FGD pixels\n" "\n" "\tCTRL+right mouse button - set GC_PR_BGD pixels\n" - "\tSHIFT+right mouse button - set CG_PR_FGD pixels\n" << endl; + "\tSHIFT+right mouse button - set GC_PR_FGD pixels\n" << endl; } const Scalar RED = Scalar(0,0,255); diff --git a/samples/cpp/houghcircles.cpp b/samples/cpp/houghcircles.cpp index a10e0d2d0e..99ddd7920d 100644 --- a/samples/cpp/houghcircles.cpp +++ b/samples/cpp/houghcircles.cpp @@ -10,7 +10,7 @@ static void help() { cout << "\nThis program demonstrates circle finding with the Hough transform.\n" "Usage:\n" - "./houghcircles , Default is pic1.png\n" << endl; + "./houghcircles , Default is board.jpg\n" << endl; } int main(int argc, char** argv) diff --git a/samples/cpp/kalman.cpp b/samples/cpp/kalman.cpp index f54adec922..8b429e2ad8 100644 --- a/samples/cpp/kalman.cpp +++ b/samples/cpp/kalman.cpp @@ -12,7 +12,7 @@ static inline Point calcPoint(Point2f center, double R, double angle) static void help() { - printf( "\nExamle of c calls to OpenCV's Kalman filter.\n" + printf( "\nExample of c calls to OpenCV's Kalman filter.\n" " Tracking of rotating point.\n" " Rotation speed is constant.\n" " Both state and measurements vectors are 1D (a point angle),\n" diff --git a/samples/cpp/lkdemo.cpp b/samples/cpp/lkdemo.cpp index 90078f3abf..ad3cc7072a 100644 --- a/samples/cpp/lkdemo.cpp +++ b/samples/cpp/lkdemo.cpp @@ -60,12 +60,11 @@ int main( int argc, char** argv ) namedWindow( "LK Demo", 1 ); setMouseCallback( "LK Demo", onMouse, 0 ); - Mat gray, prevGray, image; + Mat gray, prevGray, image, frame; vector points[2]; for(;;) { - Mat frame; cap >> frame; if( frame.empty() ) break; diff --git a/samples/cpp/openni_capture.cpp b/samples/cpp/openni_capture.cpp index ba4cb73843..549f16e6f0 100644 --- a/samples/cpp/openni_capture.cpp +++ b/samples/cpp/openni_capture.cpp @@ -12,14 +12,14 @@ static void help() "The user gets some of the supported output images.\n" "\nAll supported output map types:\n" "1.) Data given from depth generator\n" - " OPENNI_DEPTH_MAP - depth values in mm (CV_16UC1)\n" - " OPENNI_POINT_CLOUD_MAP - XYZ in meters (CV_32FC3)\n" - " OPENNI_DISPARITY_MAP - disparity in pixels (CV_8UC1)\n" - " OPENNI_DISPARITY_MAP_32F - disparity in pixels (CV_32FC1)\n" - " OPENNI_VALID_DEPTH_MASK - mask of valid pixels (not ocluded, not shaded etc.) (CV_8UC1)\n" + " CV_CAP_OPENNI_DEPTH_MAP - depth values in mm (CV_16UC1)\n" + " CV_CAP_OPENNI_POINT_CLOUD_MAP - XYZ in meters (CV_32FC3)\n" + " CV_CAP_OPENNI_DISPARITY_MAP - disparity in pixels (CV_8UC1)\n" + " CV_CAP_OPENNI_DISPARITY_MAP_32F - disparity in pixels (CV_32FC1)\n" + " CV_CAP_OPENNI_VALID_DEPTH_MASK - mask of valid pixels (not ocluded, not shaded etc.) (CV_8UC1)\n" "2.) Data given from RGB image generator\n" - " OPENNI_BGR_IMAGE - color image (CV_8UC3)\n" - " OPENNI_GRAY_IMAGE - gray image (CV_8UC1)\n" + " CV_CAP_OPENNI_BGR_IMAGE - color image (CV_8UC3)\n" + " CV_CAP_OPENNI_GRAY_IMAGE - gray image (CV_8UC1)\n" << endl; } diff --git a/samples/cpp/starter_video.cpp b/samples/cpp/starter_video.cpp index b8f4086c45..7f9dafd6bc 100644 --- a/samples/cpp/starter_video.cpp +++ b/samples/cpp/starter_video.cpp @@ -4,31 +4,34 @@ * Created on: Nov 23, 2010 * Author: Ethan Rublee * -* A starter sample for using opencv, get a video stream and display the images +* Modified on: April 17, 2013 +* Author: Kevin Hughes +* +* A starter sample for using OpenCV VideoCapture with capture devices, video files or image sequences * easy as CV_PI right? */ -#include "opencv2/highgui/highgui.hpp" + +#include + #include -#include #include using namespace cv; using namespace std; - - //hide the local functions in an anon namespace namespace { void help(char** av) { - cout << "\nThis program justs gets you started reading images from video\n" - "Usage:\n./" << av[0] << "