+add_definition(-D__OPENCV_BUILD=1)
+
add_subdirectory(haartraining)
add_subdirectory(traincascade)
add_subdirectory(sft)
#ifndef __CVCOMMON_H_
#define __CVCOMMON_H_
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/core/internal.hpp"
#include "cxcore.h"
*
* Measure performance of classifier
*/
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/core/internal.hpp"
#include "cv.h"
//M*/
#include <sft/dataset.hpp>
-#include <opencv2/highgui/highgui.hpp>
+#include <opencv2/highgui.hpp>
#include <iostream>
#include <queue>
return (int)((type == POSITIVE)? pos.size():neg.size());
}
-sft::ScaledDataset::~ScaledDataset(){}
\ No newline at end of file
+sft::ScaledDataset::~ScaledDataset(){}
#ifndef __SFT_COMMON_HPP__
#define __SFT_COMMON_HPP__
-#include <opencv2/core/core.hpp>
-#include <opencv2/softcascade/softcascade.hpp>
+#include <opencv2/core.hpp>
+#include <opencv2/softcascade.hpp>
namespace cv {using namespace softcascade;}
namespace sft
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/core/internal.hpp"
#include "HOGfeatures.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/core/internal.hpp"
#include "boost.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/core/internal.hpp"
#include "cascadeclassifier.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/core/internal.hpp"
#include "traincascade_features.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/core/internal.hpp"
#include "haarfeatures.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/core/internal.hpp"
#include "cv.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/core/internal.hpp"
#include "lbpfeatures.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/core/internal.hpp"
#include "cv.h"
macro(ocv_glob_module_sources)
file(GLOB lib_srcs "src/*.cpp")
file(GLOB lib_int_hdrs "src/*.hpp" "src/*.h")
- file(GLOB lib_hdrs "include/opencv2/${name}/*.hpp" "include/opencv2/${name}/*.h")
+ file(GLOB lib_hdrs "include/opencv2/*.hpp" "include/opencv2/${name}/*.hpp" "include/opencv2/${name}/*.h")
file(GLOB lib_hdrs_detail "include/opencv2/${name}/detail/*.hpp" "include/opencv2/${name}/detail/*.h")
file(GLOB lib_device_srcs "src/cuda/*.cu")
import hdr_parser as hp
opencv_hdr_list = [
-"../modules/core/include/opencv2/core/core.hpp",
-"../modules/ml/include/opencv2/ml/ml.hpp",
-"../modules/imgproc/include/opencv2/imgproc/imgproc.hpp",
-"../modules/calib3d/include/opencv2/calib3d/calib3d.hpp",
-"../modules/features2d/include/opencv2/features2d/features2d.hpp",
+"../modules/core/include/opencv2/core.hpp",
+"../modules/ml/include/opencv2/ml.hpp",
+"../modules/imgproc/include/opencv2/imgproc.hpp",
+"../modules/calib3d/include/opencv2/calib3d.hpp",
+"../modules/features2d/include/opencv2/features2d.hpp",
"../modules/video/include/opencv2/video/tracking.hpp",
"../modules/video/include/opencv2/video/background_segm.hpp",
-"../modules/objdetect/include/opencv2/objdetect/objdetect.hpp",
-"../modules/highgui/include/opencv2/highgui/highgui.hpp",
+"../modules/objdetect/include/opencv2/objdetect.hpp",
+"../modules/highgui/include/opencv2/highgui.hpp",
]
opencv_module_list = [
.. code-block:: cpp
- #include <opencv2/core/core.hpp>
- #include <opencv2/imgproc/imgproc.hpp>
- #include <opencv2/highgui/highgui.hpp>
+ #include <opencv2/core.hpp>
+ #include <opencv2/imgproc.hpp>
+ #include <opencv2/highgui.hpp>
All the OpenCV related stuff is put into the *cv* namespace to avoid name conflicts with other libraries data structures and functions. Therefore, either you need to prepend the *cv::* keyword before everything that comes from OpenCV or after the includes, you just add a directive to use this:
#include <stdio.h>
#include <iostream>
- #include "opencv2/core/core.hpp"
- #include "opencv2/features2d/features2d.hpp"
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/nonfree/features2d.hpp"
+ #include "opencv2/core.hpp"
+ #include "opencv2/features2d.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/nonfree.hpp"
using namespace cv;
#include <stdio.h>
#include <iostream>
- #include "opencv2/core/core.hpp"
- #include "opencv2/features2d/features2d.hpp"
- #include "opencv2/highgui/highgui.hpp"
+ #include "opencv2/core.hpp"
+ #include "opencv2/features2d.hpp"
+ #include "opencv2/highgui.hpp"
using namespace cv;
#include <stdio.h>
#include <iostream>
- #include "opencv2/core/core.hpp"
- #include "opencv2/features2d/features2d.hpp"
- #include "opencv2/highgui/highgui.hpp"
+ #include "opencv2/core.hpp"
+ #include "opencv2/features2d.hpp"
+ #include "opencv2/highgui.hpp"
using namespace cv;
#include <stdio.h>
#include <iostream>
- #include "opencv2/core/core.hpp"
- #include "opencv2/features2d/features2d.hpp"
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/calib3d/calib3d.hpp"
+ #include "opencv2/core.hpp"
+ #include "opencv2/features2d.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/calib3d.hpp"
using namespace cv;
.. code-block:: cpp
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
.. code-block:: cpp
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
.. code-block:: cpp
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
-.. _gpuBasicsSimilarity:\r\rSimilarity check (PNSR and SSIM) on the GPU\r*******************************************\r\rGoal\r====\r\rIn the :ref:`videoInputPSNRMSSIM` tutorial I already presented the PSNR and SSIM methods for checking the similarity between the two images. And as you could see there performing these takes quite some time, especially in the case of the SSIM. However, if the performance numbers of an OpenCV implementation for the CPU do not satisfy you and you happen to have an NVidia CUDA GPU device in your system all is not lost. You may try to port or write your algorithm for the video card. \r\rThis tutorial will give a good grasp on how to approach coding by using the GPU module of OpenCV. As a prerequisite you should already know how to handle the core, highgui and imgproc modules. So, our goals are: \r\r.. container:: enumeratevisibleitemswithsquare\r\r + What's different compared to the CPU?\r + Create the GPU code for the PSNR and SSIM \r + Optimize the code for maximal performance\r\rThe source code\r===============\r\rYou may also find the source code and these video file in the :file:`samples/cpp/tutorial_code/gpu/gpu-basics-similarity/gpu-basics-similarity` folder of the OpenCV source library or :download:`download it from here <../../../../samples/cpp/tutorial_code/gpu/gpu-basics-similarity/gpu-basics-similarity.cpp>`. The full source code is quite long (due to the controlling of the application via the command line arguments and performance measurement). Therefore, to avoid cluttering up these sections with those you'll find here only the functions itself. \r\rThe PSNR returns a float number, that if the two inputs are similar between 30 and 50 (higher is better). \r\r.. literalinclude:: ../../../../samples/cpp/tutorial_code/gpu/gpu-basics-similarity/gpu-basics-similarity.cpp\r :language: cpp\r :linenos:\r :tab-width: 4\r :lines: 165-210, 18-23, 210-235\r\rThe SSIM returns the MSSIM of the images. This is too a float number between zero and one (higher is better), however we have one for each channel. Therefore, we return a *Scalar* OpenCV data structure:\r\r.. literalinclude:: ../../../../samples/cpp/tutorial_code/gpu/gpu-basics-similarity/gpu-basics-similarity.cpp\r :language: cpp\r :linenos:\r :tab-width: 4\r :lines: 235-355, 26-42, 357-\r\rHow to do it? - The GPU\r=======================\r\rNow as you can see we have three types of functions for each operation. One for the CPU and two for the GPU. The reason I made two for the GPU is too illustrate that often simple porting your CPU to GPU will actually make it slower. If you want some performance gain you will need to remember a few rules, whose I'm going to detail later on.\r\rThe development of the GPU module was made so that it resembles as much as possible its CPU counterpart. This is to make porting easy. The first thing you need to do before writing any code is to link the GPU module to your project, and include the header file for the module. All the functions and data structures of the GPU are in a *gpu* sub namespace of the *cv* namespace. You may add this to the default one via the *use namespace* keyword, or mark it everywhere explicitly via the cv:: to avoid confusion. I'll do the later. \r\r.. code-block:: cpp\r\r #include <opencv2/gpu/gpu.hpp> // GPU structures and methods\r\rGPU stands for **g**\ raphics **p**\ rocessing **u**\ nit. It was originally build to render graphical scenes. These scenes somehow build on a lot of data. Nevertheless, these aren't all dependent one from another in a sequential way and as it is possible a parallel processing of them. Due to this a GPU will contain multiple smaller processing units. These aren't the state of the art processors and on a one on one test with a CPU it will fall behind. However, its strength lies in its numbers. In the last years there has been an increasing trend to harvest these massive parallel powers of the GPU in non-graphical scene rendering too. This gave birth to the general-purpose computation on graphics processing units (GPGPU). \r\rThe GPU has its own memory. When you read data from the hard drive with OpenCV into a *Mat* object that takes place in your systems memory. The CPU works somehow directly on this (via its cache), however the GPU cannot. He has too transferred the information he will use for calculations from the system memory to its own. This is done via an upload process and takes time. In the end the result will have to be downloaded back to your system memory for your CPU to see it and use it. Porting small functions to GPU is not recommended as the upload/download time will be larger than the amount you gain by a parallel execution. \r\r*Mat* objects are stored **only** in the system memory (or the CPU cache). For getting an OpenCV matrix to the GPU you'll need to use its GPU counterpart :gpudatastructure:`GpuMat <gpu-gpumat>`. It works similar to the *Mat* with a 2D only limitation and no reference returning for its functions (cannot mix GPU references with CPU ones). To upload a *Mat* object to the *GPU* you need to call the *upload* function after creating an instance of the class. To download you may use simple assignment to a *Mat* object or use the *download* function.\r\r.. code-block:: cpp \r\r Mat I1; // Main memory item - read image into with imread for example\r gpu::GpuMat gI; // GPU matrix - for now empty\r gI1.upload(I1); // Upload a data from the system memory to the GPU memory\r\r I1 = gI1; // Download, gI1.download(I1) will work too\r\rOnce you have your data up in the GPU memory you may call GPU enabled functions of OpenCV. Most of the functions keep the same name just as on the CPU, with the difference that they only accept *GpuMat* inputs. A full list of these you will find in the documentation: `online here <http://opencv.itseez.com/modules/gpu/doc/gpu.html>`_ or the OpenCV reference manual that comes with the source code.\r\rAnother thing to keep in mind is that not for all channel numbers you can make efficient algorithms on the GPU. Generally, I found that the input images for the GPU images need to be either one or four channel ones and one of the char or float type for the item sizes. No double support on the GPU, sorry. Passing other types of objects for some functions will result in an exception thrown, and an error message on the error output. The documentation details in most of the places the types accepted for the inputs. If you have three channel images as an input you can do two things: either adds a new channel (and use char elements) or split up the image and call the function for each image. The first one isn't really recommended as you waste memory. \r\rFor some functions, where the position of the elements (neighbor items) doesn't matter quick solution is to just reshape it into a single channel image. This is the case for the PSNR implementation where for the *absdiff* method the value of the neighbors is not important. However, for the *GaussianBlur* this isn't an option and such need to use the split method for the SSIM. With this knowledge you can already make a GPU viable code (like mine GPU one) and run it. You'll be surprised to see that it might turn out slower than your CPU implementation. \r\rOptimization\r============\r\rThe reason for this is that you're throwing out on the window the price for memory allocation and data transfer. And on the GPU this is damn high. Another possibility for optimization is to introduce asynchronous OpenCV GPU calls too with the help of the :gpudatastructure:`gpu::Stream <gpu-stream>`. \r\r1. Memory allocation on the GPU is considerable. Therefore, if it’s possible allocate new memory as few times as possible. If you create a function what you intend to call multiple times it is a good idea to allocate any local parameters for the function only once, during the first call. To do this you create a data structure containing all the local variables you will use. For instance in case of the PSNR these are: \r\r .. code-block:: cpp \r\r struct BufferPSNR // Optimized GPU versions\r { // Data allocations are very expensive on GPU. Use a buffer to solve: allocate once reuse later.\r gpu::GpuMat gI1, gI2, gs, t1,t2;\r\r gpu::GpuMat buf;\r };\r\r Then create an instance of this in the main program: \r\r .. code-block:: cpp\r\r BufferPSNR bufferPSNR;\r\r And finally pass this to the function each time you call it: \r\r .. code-block:: cpp\r\r double getPSNR_GPU_optimized(const Mat& I1, const Mat& I2, BufferPSNR& b)\r\r Now you access these local parameters as: *b.gI1*, *b.buf* and so on. The GpuMat will only reallocate itself on a new call if the new matrix size is different from the previous one. \r\r#. Avoid unnecessary function data transfers. Any small data transfer will be significant one once you go to the GPU. Therefore, if possible make all calculations in-place (in other words do not create new memory objects - for reasons explained at the previous point). For example, although expressing arithmetical operations may be easier to express in one line formulas, it will be slower. In case of the SSIM at one point I need to calculate:\r\r .. code-block:: cpp \r\r b.t1 = 2 * b.mu1_mu2 + C1; \r\r Although the upper call will succeed observe that there is a hidden data transfer present. Before it makes the addition it needs to store somewhere the multiplication. Therefore, it will create a local matrix in the background, add to that the *C1* value and finally assign that to *t1*. To avoid this we use the gpu functions, instead of the arithmetic operators: \r\r .. code-block:: cpp\r\r gpu::multiply(b.mu1_mu2, 2, b.t1); //b.t1 = 2 * b.mu1_mu2 + C1; \r gpu::add(b.t1, C1, b.t1);\r\r#. Use asynchronous calls (the :gpudatastructure:`gpu::Stream <gpu-stream>`). By default whenever you call a gpu function it will wait for the call to finish and return with the result afterwards. However, it is possible to make asynchronous calls, meaning it will call for the operation execution, make the costly data allocations for the algorithm and return back right away. Now you can call another function if you wish to do so. For the MSSIM this is a small optimization point. In our default implementation we split up the image into channels and call then for each channel the gpu functions. A small degree of parallelization is possible with the stream. By using a stream we can make the data allocation, upload operations while the GPU is already executing a given method. For example we need to upload two images. We queue these one after another and call already the function that processes it. The functions will wait for the upload to finish, however while that happens makes the output buffer allocations for the function to be executed next. \r\r .. code-block:: cpp \r\r gpu::Stream stream;\r\r stream.enqueueConvert(b.gI1, b.t1, CV_32F); // Upload\r\r gpu::split(b.t1, b.vI1, stream); // Methods (pass the stream as final parameter).\r gpu::multiply(b.vI1[i], b.vI1[i], b.I1_2, stream); // I1^2\r\rResult and conclusion\r=====================\r\rOn an Intel P8700 laptop CPU paired with a low end NVidia GT220M here are the performance numbers: \r\r.. code-block:: cpp\r\r Time of PSNR CPU (averaged for 10 runs): 41.4122 milliseconds. With result of: 19.2506\r Time of PSNR GPU (averaged for 10 runs): 158.977 milliseconds. With result of: 19.2506\r Initial call GPU optimized: 31.3418 milliseconds. With result of: 19.2506\r Time of PSNR GPU OPTIMIZED ( / 10 runs): 24.8171 milliseconds. With result of: 19.2506\r\r Time of MSSIM CPU (averaged for 10 runs): 484.343 milliseconds. With result of B0.890964 G0.903845 R0.936934\r Time of MSSIM GPU (averaged for 10 runs): 745.105 milliseconds. With result of B0.89922 G0.909051 R0.968223\r Time of MSSIM GPU Initial Call 357.746 milliseconds. With result of B0.890964 G0.903845 R0.936934\r Time of MSSIM GPU OPTIMIZED ( / 10 runs): 203.091 milliseconds. With result of B0.890964 G0.903845 R0.936934\r\rIn both cases we managed a performance increase of almost 100% compared to the CPU implementation. It may be just the improvement needed for your application to work. You may observe a runtime instance of this on the `YouTube here <https://www.youtube.com/watch?v=3_ESXmFlnvY>`_. \r\r.. raw:: html\r\r <div align="center">\r <iframe title="Similarity check (PNSR and SSIM) on the GPU" width="560" height="349" src="http://www.youtube.com/embed/3_ESXmFlnvY?rel=0&loop=1" frameborder="0" allowfullscreen align="middle"></iframe>\r </div>
\ No newline at end of file
+.. _gpuBasicsSimilarity:\r\rSimilarity check (PNSR and SSIM) on the GPU\r*******************************************\r\rGoal\r====\r\rIn the :ref:`videoInputPSNRMSSIM` tutorial I already presented the PSNR and SSIM methods for\rchecking the similarity between the two images. And as you could see there performing these takes\rquite some time, especially in the case of the SSIM. However, if the performance numbers of an\rOpenCV implementation for the CPU do not satisfy you and you happen to have an NVidia CUDA GPU\rdevice in your system all is not lost. You may try to port or write your algorithm for the video\rcard.\r\rThis tutorial will give a good grasp on how to approach coding by using the GPU module of OpenCV. As\ra prerequisite you should already know how to handle the core, highgui and imgproc modules. So, our\rgoals are:\r\r.. container:: enumeratevisibleitemswithsquare\r\r + What's different compared to the CPU?\r + Create the GPU code for the PSNR and SSIM\r + Optimize the code for maximal performance\r\rThe source code\r===============\r\rYou may also find the source code and these video file in the\r:file:`samples/cpp/tutorial_code/gpu/gpu-basics-similarity/gpu-basics-similarity` folder of the\rOpenCV source library or :download:`download it from here\r<../../../../samples/cpp/tutorial_code/gpu/gpu-basics-similarity/gpu-basics-similarity.cpp>`. The\rfull source code is quite long (due to the controlling of the application via the command line\rarguments and performance measurement). Therefore, to avoid cluttering up these sections with those\ryou'll find here only the functions itself.\r\rThe PSNR returns a float number, that if the two inputs are similar between 30 and 50 (higher is\rbetter).\r\r.. literalinclude:: ../../../../samples/cpp/tutorial_code/gpu/gpu-basics-similarity/gpu-basics-similarity.cpp\r :language: cpp\r :linenos:\r :tab-width: 4\r :lines: 165-210, 18-23, 210-235\r\rThe SSIM returns the MSSIM of the images. This is too a float number between zero and one (higher is\rbetter), however we have one for each channel. Therefore, we return a *Scalar* OpenCV data\rstructure:\r\r.. literalinclude:: ../../../../samples/cpp/tutorial_code/gpu/gpu-basics-similarity/gpu-basics-similarity.cpp\r :language: cpp\r :linenos:\r :tab-width: 4\r :lines: 235-355, 26-42, 357-\r\rHow to do it? - The GPU\r=======================\r\rNow as you can see we have three types of functions for each operation. One for the CPU and two for\rthe GPU. The reason I made two for the GPU is too illustrate that often simple porting your CPU to\rGPU will actually make it slower. If you want some performance gain you will need to remember a few\rrules, whose I'm going to detail later on.\r\rThe development of the GPU module was made so that it resembles as much as possible its CPU\rcounterpart. This is to make porting easy. The first thing you need to do before writing any code is\rto link the GPU module to your project, and include the header file for the module. All the\rfunctions and data structures of the GPU are in a *gpu* sub namespace of the *cv* namespace. You may\radd this to the default one via the *use namespace* keyword, or mark it everywhere explicitly via\rthe cv:: to avoid confusion. I'll do the later.\r\r.. code-block:: cpp\r\r #include <opencv2/gpu.hpp> // GPU structures and methods\r\rGPU stands for **g**\ raphics **p**\ rocessing **u**\ nit. It was originally build to render\rgraphical scenes. These scenes somehow build on a lot of data. Nevertheless, these aren't all\rdependent one from another in a sequential way and as it is possible a parallel processing of them.\rDue to this a GPU will contain multiple smaller processing units. These aren't the state of the art\rprocessors and on a one on one test with a CPU it will fall behind. However, its strength lies in\rits numbers. In the last years there has been an increasing trend to harvest these massive parallel\rpowers of the GPU in non-graphical scene rendering too. This gave birth to the general-purpose\rcomputation on graphics processing units (GPGPU).\r\rThe GPU has its own memory. When you read data from the hard drive with OpenCV into a *Mat* object\rthat takes place in your systems memory. The CPU works somehow directly on this (via its cache),\rhowever the GPU cannot. He has too transferred the information he will use for calculations from the\rsystem memory to its own. This is done via an upload process and takes time. In the end the result\rwill have to be downloaded back to your system memory for your CPU to see it and use it. Porting\rsmall functions to GPU is not recommended as the upload/download time will be larger than the amount\ryou gain by a parallel execution.\r\rMat objects are stored only in the system memory (or the CPU cache). For getting an OpenCV matrix\rto the GPU you'll need to use its GPU counterpart :gpudatastructure:`GpuMat <gpu-gpumat>`. It works\rsimilar to the Mat with a 2D only limitation and no reference returning for its functions (cannot\rmix GPU references with CPU ones). To upload a Mat object to the GPU you need to call the upload\rfunction after creating an instance of the class. To download you may use simple assignment to a\rMat object or use the download function.\r\r.. code-block:: cpp\r\r Mat I1; // Main memory item - read image into with imread for example\r gpu::GpuMat gI; // GPU matrix - for now empty\r gI1.upload(I1); // Upload a data from the system memory to the GPU memory\r\r I1 = gI1; // Download, gI1.download(I1) will work too\r\rOnce you have your data up in the GPU memory you may call GPU enabled functions of OpenCV. Most of\rthe functions keep the same name just as on the CPU, with the difference that they only accept\r*GpuMat* inputs. A full list of these you will find in the documentation: `online here\r<http://opencv.itseez.com/modules/gpu/doc/gpu.html>`_ or the OpenCV reference manual that comes with\rthe source code.\r\rAnother thing to keep in mind is that not for all channel numbers you can make efficient algorithms\ron the GPU. Generally, I found that the input images for the GPU images need to be either one or\rfour channel ones and one of the char or float type for the item sizes. No double support on the\rGPU, sorry. Passing other types of objects for some functions will result in an exception thrown,\rand an error message on the error output. The documentation details in most of the places the types\raccepted for the inputs. If you have three channel images as an input you can do two things: either\radds a new channel (and use char elements) or split up the image and call the function for each\rimage. The first one isn't really recommended as you waste memory.\r\rFor some functions, where the position of the elements (neighbor items) doesn't matter quick\rsolution is to just reshape it into a single channel image. This is the case for the PSNR\rimplementation where for the *absdiff* method the value of the neighbors is not important. However,\rfor the *GaussianBlur* this isn't an option and such need to use the split method for the SSIM. With\rthis knowledge you can already make a GPU viable code (like mine GPU one) and run it. You'll be\rsurprised to see that it might turn out slower than your CPU implementation.\r\rOptimization\r============\r\rThe reason for this is that you're throwing out on the window the price for memory allocation and\rdata transfer. And on the GPU this is damn high. Another possibility for optimization is to\rintroduce asynchronous OpenCV GPU calls too with the help of the\r:gpudatastructure:`gpu::Stream<gpu-stream>`.\r\r1. Memory allocation on the GPU is considerable. Therefore, if it’s possible allocate new memory as\r few times as possible. If you create a function what you intend to call multiple times it is a\r good idea to allocate any local parameters for the function only once, during the first call.\r To do this you create a data structure containing all the local variables you will use. For\r instance in case of the PSNR these are:\r\r .. code-block:: cpp\r\r struct BufferPSNR // Optimized GPU versions\r { // Data allocations are very expensive on GPU. Use a buffer to solve: allocate once reuse later.\r gpu::GpuMat gI1, gI2, gs, t1,t2;\r\r gpu::GpuMat buf;\r };\r\r Then create an instance of this in the main program:\r\r .. code-block:: cpp\r\r BufferPSNR bufferPSNR;\r\r And finally pass this to the function each time you call it:\r\r .. code-block:: cpp\r\r double getPSNR_GPU_optimized(const Mat& I1, const Mat& I2, BufferPSNR& b)\r\r Now you access these local parameters as: *b.gI1*, *b.buf* and so on. The GpuMat will only\r reallocate itself on a new call if the new matrix size is different from the previous one.\r\r#. Avoid unnecessary function data transfers. Any small data transfer will be significant one once\r you go to the GPU. Therefore, if possible make all calculations in-place (in other words do not\r create new memory objects - for reasons explained at the previous point). For example, although\r expressing arithmetical operations may be easier to express in one line formulas, it will be\r slower. In case of the SSIM at one point I need to calculate:\r\r .. code-block:: cpp\r\r b.t1 = 2 * b.mu1_mu2 + C1;\r\r Although the upper call will succeed observe that there is a hidden data transfer present. Before\r it makes the addition it needs to store somewhere the multiplication. Therefore, it will create a\r local matrix in the background, add to that the *C1* value and finally assign that to *t1*. To\r avoid this we use the gpu functions, instead of the arithmetic operators:\r\r .. code-block:: cpp\r\r gpu::multiply(b.mu1_mu2, 2, b.t1); //b.t1 = 2 * b.mu1_mu2 + C1;\r gpu::add(b.t1, C1, b.t1);\r\r#. Use asynchronous calls (the :gpudatastructure:`gpu::Stream <gpu-stream>`). By default whenever\r you call a gpu function it will wait for the call to finish and return with the result\r afterwards. However, it is possible to make asynchronous calls, meaning it will call for the\r operation execution, make the costly data allocations for the algorithm and return back right\r away. Now you can call another function if you wish to do so. For the MSSIM this is a small\r optimization point. In our default implementation we split up the image into channels and call\r then for each channel the gpu functions. A small degree of parallelization is possible with the\r stream. By using a stream we can make the data allocation, upload operations while the GPU is\r already executing a given method. For example we need to upload two images. We queue these one\r after another and call already the function that processes it. The functions will wait for the\r upload to finish, however while that happens makes the output buffer allocations for the function\r to be executed next.\r\r .. code-block:: cpp\r\r gpu::Stream stream;\r\r stream.enqueueConvert(b.gI1, b.t1, CV_32F); // Upload\r\r gpu::split(b.t1, b.vI1, stream); // Methods (pass the stream as final parameter).\r gpu::multiply(b.vI1[i], b.vI1[i], b.I1_2, stream); // I1^2\r\rResult and conclusion\r=====================\r\rOn an Intel P8700 laptop CPU paired with a low end NVidia GT220M here are the performance numbers:\r\r.. code-block:: cpp\r\r Time of PSNR CPU (averaged for 10 runs): 41.4122 milliseconds. With result of: 19.2506\r Time of PSNR GPU (averaged for 10 runs): 158.977 milliseconds. With result of: 19.2506\r Initial call GPU optimized: 31.3418 milliseconds. With result of: 19.2506\r Time of PSNR GPU OPTIMIZED ( / 10 runs): 24.8171 milliseconds. With result of: 19.2506\r\r Time of MSSIM CPU (averaged for 10 runs): 484.343 milliseconds. With result of B0.890964 G0.903845 R0.936934\r Time of MSSIM GPU (averaged for 10 runs): 745.105 milliseconds. With result of B0.89922 G0.909051 R0.968223\r Time of MSSIM GPU Initial Call 357.746 milliseconds. With result of B0.890964 G0.903845 R0.936934\r Time of MSSIM GPU OPTIMIZED ( / 10 runs): 203.091 milliseconds. With result of B0.890964 G0.903845 R0.936934\r\rIn both cases we managed a performance increase of almost 100% compared to the CPU implementation.\rIt may be just the improvement needed for your application to work. You may observe a runtime\rinstance of this on the `YouTube here <https://www.youtube.com/watch?v=3_ESXmFlnvY>`_.\r\r.. raw:: html\r\r <div align="center">\r <iframe title="Similarity check (PNSR and SSIM) on the GPU" width="560" height="349" src="http://www.youtube.com/embed/3_ESXmFlnvY?rel=0&loop=1" frameborder="0" allowfullscreen align="middle"></iframe>\r </div>
\ No newline at end of file
.. code-block:: cpp
- #include "opencv2/imgproc/imgproc.hpp"
- #include "opencv2/highgui/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
#include "highgui.h"
#include <stdlib.h>
#include <stdio.h>
.. code-block:: cpp
- #include "opencv2/imgproc/imgproc.hpp"
- #include "opencv2/highgui/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
using namespace std;
using namespace cv;
.. code-block:: cpp
- #include "opencv2/imgproc/imgproc.hpp"
- #include "opencv2/highgui/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
#include <iostream>
.. code-block:: cpp
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
.. code-block:: cpp
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
.. code-block:: cpp
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
.. code-block:: cpp
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
.. code-block:: cpp
- #include "opencv2/imgproc/imgproc.hpp"
- #include "opencv2/highgui/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
#include <stdlib.h>
#include <stdio.h>
.. code-block:: cpp
- #include "opencv2/imgproc/imgproc.hpp"
- #include "opencv2/highgui/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
#include <stdlib.h>
#include <stdio.h>
.. code-block:: cpp
- #include "opencv2/imgproc/imgproc.hpp"
- #include "opencv2/highgui/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
#include <stdlib.h>
#include <stdio.h>
.. code-block:: cpp
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
.. code-block:: cpp
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
.. code-block:: cpp
- #include "opencv2/imgproc/imgproc.hpp"
- #include "opencv2/highgui/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
#include <stdlib.h>
#include <stdio.h>
.. code-block:: cpp
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
.. code-block:: cpp
- #include "opencv2/imgproc/imgproc.hpp"
- #include "opencv2/highgui/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
#include <stdlib.h>
#include <stdio.h>
.. code-block:: cpp
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
.. code-block:: cpp
- #include "opencv2/imgproc/imgproc.hpp"
- #include "opencv2/highgui/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
#include <stdlib.h>
#include <stdio.h>
.. code-block:: cpp
- #include "opencv2/imgproc/imgproc.hpp"
- #include "opencv2/highgui/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
.. code-block:: cpp
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
.. code-block:: cpp
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
.. code-block:: cpp
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
.. code-block:: cpp
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
.. code-block:: cpp
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
.. code-block:: cpp
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
.. code-block:: cpp
- #include "opencv2/imgproc/imgproc.hpp"
- #include "opencv2/highgui/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
+ #include "opencv2/highgui.hpp"
#include <stdlib.h>
#include <stdio.h>
.. code-block:: cpp
- #include "opencv2/objdetect/objdetect.hpp"
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
+ #include "opencv2/objdetect.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
//CV_WARNING("This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module")
#include "opencv2/core/core_c.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/imgproc/imgproc_c.h"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/video/tracking.hpp"
-#include "opencv2/features2d/features2d.hpp"
-#include "opencv2/flann/flann.hpp"
-#include "opencv2/calib3d/calib3d.hpp"
-#include "opencv2/objdetect/objdetect.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/video.hpp"
+#include "opencv2/features2d.hpp"
+#include "opencv2/flann.hpp"
+#include "opencv2/calib3d.hpp"
+#include "opencv2/objdetect.hpp"
#include "opencv2/legacy/compat.hpp"
#if !defined(CV_IMPL)
//#endif
#include "opencv2/core/core_c.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/imgproc/imgproc_c.h"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/video/tracking.hpp"
-#include "opencv2/video/background_segm.hpp"
-#include "opencv2/features2d/features2d.hpp"
-#include "opencv2/calib3d/calib3d.hpp"
-#include "opencv2/objdetect/objdetect.hpp"
-#include "opencv2/legacy/legacy.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/video.hpp"
+#include "opencv2/features2d.hpp"
+#include "opencv2/calib3d.hpp"
+#include "opencv2/objdetect.hpp"
+#include "opencv2/legacy.hpp"
#include "opencv2/legacy/compat.hpp"
#include "opencv2/legacy/blobtrack.hpp"
-#include "opencv2/contrib/contrib.hpp"
+#include "opencv2/contrib.hpp"
#endif
//#endif
#include "opencv2/core/core_c.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#endif
#define __OPENCV_OLD_HIGHGUI_H__
#include "opencv2/core/core_c.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/highgui/highgui_c.h"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
#endif
#define __OPENCV_OLD_ML_H__
#include "opencv2/core/core_c.h"
-#include "opencv2/core/core.hpp"
-#include "opencv2/ml/ml.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/ml.hpp"
#endif
#define __OPENCV_ALL_HPP__
#include "opencv2/core/core_c.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/flann/miniflann.hpp"
#include "opencv2/imgproc/imgproc_c.h"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/photo/photo.hpp"
-#include "opencv2/video/video.hpp"
-#include "opencv2/features2d/features2d.hpp"
-#include "opencv2/objdetect/objdetect.hpp"
-#include "opencv2/calib3d/calib3d.hpp"
-#include "opencv2/ml/ml.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/photo.hpp"
+#include "opencv2/video.hpp"
+#include "opencv2/features2d.hpp"
+#include "opencv2/objdetect.hpp"
+#include "opencv2/calib3d.hpp"
+#include "opencv2/ml.hpp"
#include "opencv2/highgui/highgui_c.h"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/contrib/contrib.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/contrib.hpp"
#endif
+add_definition(-D__OPENCV_BUILD=1)
+
if(NOT OPENCV_MODULES_PATH)
set(OPENCV_MODULES_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
endif()
#define _CAMERAACTIVITY_H_
#include <camera_properties.h>
-//#include <opencv2/core/core.hpp>
class CameraActivity
{
#ifndef __OPENCV_CALIB3D_HPP__
#define __OPENCV_CALIB3D_HPP__
-#include "opencv2/core/core.hpp"
-#include "opencv2/features2d/features2d.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/features2d.hpp"
#ifdef __cplusplus
extern "C" {
double param1=3., double param2=0.99);
//! finds essential matrix from a set of corresponding 2D points using five-point algorithm
-CV_EXPORTS Mat findEssentialMat( InputArray points1, InputArray points2, double focal = 1.0, Point2d pp = Point2d(0, 0),
- int method = CV_RANSAC,
- double prob = 0.999, double threshold = 1.0, OutputArray mask = noArray() );
+CV_EXPORTS Mat findEssentialMat( InputArray points1, InputArray points2, double focal = 1.0, Point2d pp = Point2d(0, 0),
+ int method = CV_RANSAC,
+ double prob = 0.999, double threshold = 1.0, OutputArray mask = noArray() );
//! decompose essential matrix to possible rotation matrix and one translation vector
-CV_EXPORTS void decomposeEssentialMat( InputArray E, OutputArray R1, OutputArray R2, OutputArray t );
+CV_EXPORTS void decomposeEssentialMat( InputArray E, OutputArray R1, OutputArray R2, OutputArray t );
//! recover relative camera pose from a set of corresponding 2D points
-CV_EXPORTS int recoverPose( InputArray E, InputArray points1, InputArray points2, OutputArray R, OutputArray t,
- double focal = 1.0, Point2d pp = Point2d(0, 0),
- InputOutputArray mask = noArray());
-
+CV_EXPORTS int recoverPose( InputArray E, InputArray points1, InputArray points2, OutputArray R, OutputArray t,
+ double focal = 1.0, Point2d pp = Point2d(0, 0),
+ InputOutputArray mask = noArray());
+
//! finds coordinates of epipolar lines corresponding the specified points
CV_EXPORTS void computeCorrespondEpilines( InputArray points,
enum { STEREO_DISP_SCALE=16, STEREO_PREFILTER_NORMALIZED_RESPONSE = 0, STEREO_PREFILTER_XSOBEL = 1 };
CV_EXPORTS Ptr<StereoMatcher> createStereoBM(int numDisparities=0, int SADWindowSize=21);
-
+
CV_EXPORTS Ptr<StereoMatcher> createStereoSGBM(int minDisparity, int numDisparities, int SADWindowSize,
int P1=0, int P2=0, int disp12MaxDiff=0,
int preFilterCap=0, int uniquenessRatio=0,
#ifndef __OPENCV_PERF_PRECOMP_HPP__
#define __OPENCV_PERF_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/calib3d/calib3d.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/calib3d.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
#ifdef GTEST_CREATE_SHARED_LIBRARY
#error no modules except ts should have GTEST_CREATE_SHARED_LIBRARY defined
#ifdef DEBUG_CHESSBOARD
# include "opencv2/opencv_modules.hpp"
# ifdef HAVE_OPENCV_HIGHGUI
-# include "opencv2/highgui/highgui.hpp"
+# include "opencv2/highgui.hpp"
# else
# undef DEBUG_CHESSBOARD
# endif
#if defined(DEBUG_WINDOWS)
# include "opencv2/opencv_modules.hpp"
# ifdef HAVE_OPENCV_HIGHGUI
-# include "opencv2/highgui/highgui.hpp"
+# include "opencv2/highgui.hpp"
# else
# undef DEBUG_WINDOWS
# endif
#ifdef DEBUG_CIRCLES
# include "opencv2/opencv_modules.hpp"
# ifdef HAVE_OPENCV_HIGHGUI
-# include "opencv2/highgui/highgui.hpp"
+# include "opencv2/highgui.hpp"
# else
# undef DEBUG_CIRCLES
# endif
#include "cvconfig.h"
#endif
-#include "opencv2/calib3d/calib3d.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/calib3d.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/internal.hpp"
-#include "opencv2/features2d/features2d.hpp"
+#include "opencv2/features2d.hpp"
#include <vector>
#ifdef HAVE_TEGRA_OPTIMIZATION
#ifndef CV_CHESSBOARDGENERATOR_H143KJTVYM389YTNHKFDHJ89NYVMO3VLMEJNTBGUEIYVCM203P
#define CV_CHESSBOARDGENERATOR_H143KJTVYM389YTNHKFDHJ89NYVMO3VLMEJNTBGUEIYVCM203P
-#include "opencv2/calib3d/calib3d.hpp"
+#include "opencv2/calib3d.hpp"
namespace cv
{
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
-#include "opencv2/calib3d/calib3d.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/calib3d.hpp"
+#include "opencv2/highgui.hpp"
#include <iostream>
namespace cvtest
.. code-block:: cpp
- #include <opencv2/contrib/contrib.hpp>
- #include <opencv2/core/core.hpp>
- #include <opencv2/highgui/highgui.hpp>
+ #include <opencv2/contrib.hpp>
+ #include <opencv2/core.hpp>
+ #include <opencv2/highgui.hpp>
using namespace cv;
* See <http://www.opensource.org/licenses/bsd-license>
*/
-#include "opencv2/core/core.hpp"
-#include "opencv2/contrib/contrib.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/contrib.hpp"
+#include "opencv2/highgui.hpp"
#include <iostream>
* See <http://www.opensource.org/licenses/bsd-license>
*/
-#include "opencv2/core/core.hpp"
-#include "opencv2/contrib/contrib.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/contrib.hpp"
+#include "opencv2/highgui.hpp"
#include <iostream>
#include <fstream>
* See <http://www.opensource.org/licenses/bsd-license>
*/
-#include "opencv2/core/core.hpp"
-#include "opencv2/contrib/contrib.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/contrib.hpp"
+#include "opencv2/highgui.hpp"
#include <iostream>
#include <fstream>
* See <http://www.opensource.org/licenses/bsd-license>
*/
-#include "opencv2/core/core.hpp"
-#include "opencv2/contrib/contrib.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/contrib.hpp"
+#include "opencv2/highgui.hpp"
#include <iostream>
#include <fstream>
* See <http://www.opensource.org/licenses/bsd-license>
*/
-#include "opencv2/contrib/contrib.hpp"
-#include "opencv2/core/core.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/contrib.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/highgui.hpp"
#include <iostream>
#include <fstream>
* See <http://www.opensource.org/licenses/bsd-license>
*/
-#include "opencv2/core/core.hpp"
-#include "opencv2/contrib/contrib.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/objdetect/objdetect.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/contrib.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/objdetect.hpp"
#include <iostream>
#include <fstream>
#ifndef __OPENCV_CONTRIB_HPP__
#define __OPENCV_CONTRIB_HPP__
-#include "opencv2/core/core.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/features2d/features2d.hpp"
-#include "opencv2/objdetect/objdetect.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/features2d.hpp"
+#include "opencv2/objdetect.hpp"
#ifdef __cplusplus
#endif
#endif
-
#if defined(__linux__) || defined(LINUX) || defined(__APPLE__) || defined(ANDROID)
-#include <opencv2/core/core.hpp>
-#include <opencv2/objdetect/objdetect.hpp>
+#include <opencv2/core.hpp>
+#include <opencv2/objdetect.hpp>
#include <vector>
#ifndef __OPENCV_HYBRIDTRACKER_H_
#define __OPENCV_HYBRIDTRACKER_H_
-#include "opencv2/core/core.hpp"
-#include "opencv2/core/operations.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/features2d/features2d.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/features2d.hpp"
#include "opencv2/video/tracking.hpp"
-#include "opencv2/ml/ml.hpp"
+#include "opencv2/ml.hpp"
#ifdef __cplusplus
#ifndef __OPENCV_OPENFABMAP_H_
#define __OPENCV_OPENFABMAP_H_
-#include "opencv2/core/core.hpp"
-#include "opencv2/features2d/features2d.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/features2d.hpp"
#include <vector>
#include <list>
* Author: Alexandre Benoit
*/
-#include "opencv2/core/core.hpp" // for all OpenCV core functionalities access, including cv::Exception support
+#include "opencv2/core.hpp" // for all OpenCV core functionalities access, including cv::Exception support
#include <valarray>
namespace cv
//M*/
#include "precomp.hpp"
-#include "opencv2/calib3d/calib3d.hpp"
+#include "opencv2/calib3d.hpp"
#include <iostream>
using namespace cv;
#include "precomp.hpp"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_HIGHGUI
-# include "opencv2/highgui/highgui.hpp"
+# include "opencv2/highgui.hpp"
#endif
#include <iostream>
#include <queue>
#include "precomp.hpp"
#include <stdio.h>
#include <iostream>
-#include "opencv2/calib3d/calib3d.hpp"
+#include "opencv2/calib3d.hpp"
#include "opencv2/contrib/hybridtracker.hpp"
using namespace cv;
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
-#include "opencv2/core/core.hpp"
#include "precomp.hpp"
#include <iostream>
-#include "opencv2/contrib/contrib.hpp"
+#include "opencv2/contrib.hpp"
#ifdef WIN32
#include <windows.h>
#include "cvconfig.h"
#endif
-#include "opencv2/contrib/contrib.hpp"
-#include "opencv2/features2d/features2d.hpp"
-#include "opencv2/objdetect/objdetect.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/contrib.hpp"
+#include "opencv2/features2d.hpp"
+#include "opencv2/objdetect.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/internal.hpp"
#define SHOW_DEBUG_IMAGES 0
-#include "opencv2/core/core.hpp"
-#include "opencv2/calib3d/calib3d.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/calib3d.hpp"
#if SHOW_DEBUG_IMAGES
-# include "opencv2/highgui/highgui.hpp"
+# include "opencv2/highgui.hpp"
#endif
#include <iostream>
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/contrib/contrib.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/contrib.hpp"
#include <iostream>
#endif
Here is example of SIFT use in your application via Algorithm interface: ::
#include "opencv2/opencv.hpp"
- #include "opencv2/nonfree/nonfree.hpp"
+ #include "opencv2/nonfree.hpp"
...
.. code-block:: c
- #include "opencv2/core/core.hpp"
+ #include "opencv2/core.hpp"
...
cv::Mat H = cv::findHomography(points1, points2, CV_RANSAC, 5);
...
or ::
- #include "opencv2/core/core.hpp"
+ #include "opencv2/core.hpp"
using namespace cv;
...
Mat H = findHomography(points1, points2, CV_RANSAC, 5 );
void deallocate();
//! resizes the buffer and preserves the content
void resize(size_t _size);
- //! returns the current buffer size
- size_t size() const;
+ //! returns the current buffer size
+ size_t size() const;
//! returns pointer to the real buffer, stack-allocated or head-allocated
operator _Tp* ();
//! returns read-only pointer to the real buffer, stack-allocated or head-allocated
#ifdef __cplusplus
#include "opencv2/core/core_c.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#if defined _MSC_VER && _MSC_VER >= 1200
#pragma warning( disable: 4714 ) //__forceinline is not inlined
#ifdef __cplusplus
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/core/cuda_devptrs.hpp"
namespace cv { namespace gpu
#ifdef __cplusplus
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
namespace cv { namespace ogl {
#ifndef __OPENCV_PERF_PRECOMP_HPP__
#define __OPENCV_PERF_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
+#include "opencv2/ts.hpp"
#ifdef GTEST_CREATE_SHARED_LIBRARY
#error no modules except ts should have GTEST_CREATE_SHARED_LIBRARY defined
#include <string>
#include <sstream>
#include "cvconfig.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "gl_core_3_1.hpp"
#ifdef HAVE_OPENGL
#include "precomp.hpp"
#include "opencv2/core/gpumat.hpp"
-#include "opencv2/core/opengl_interop.hpp"
+#include "opencv2/core/opengl.hpp"
/****************************************************************************************\
* [scaled] Identity matrix initialization *
//M*/
#include "precomp.hpp"
-#include "opencv2/core/opengl_interop.hpp"
+#include "opencv2/core/opengl.hpp"
#include "opencv2/core/gpumat.hpp"
#ifdef HAVE_OPENGL
#include "cvconfig.h"
#endif
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/core/core_c.h"
#include "opencv2/core/internal.hpp"
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
+#include "opencv2/ts.hpp"
#include "opencv2/core/core_c.h"
#include <iostream>
#ifndef __OPENCV_FEATURES_2D_HPP__
#define __OPENCV_FEATURES_2D_HPP__
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/flann/miniflann.hpp"
#ifdef __cplusplus
#ifndef __OPENCV_PERF_PRECOMP_HPP__
#define __OPENCV_PERF_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/features2d/features2d.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/features2d.hpp"
#ifdef GTEST_CREATE_SHARED_LIBRARY
#error no modules except ts should have GTEST_CREATE_SHARED_LIBRARY defined
#ifdef DEBUG_BLOB_DETECTOR
# include "opencv2/opencv_modules.hpp"
# ifdef HAVE_OPENCV_HIGHGUI
-# include "opencv2/highgui/highgui.hpp"
+# include "opencv2/highgui.hpp"
# else
# undef DEBUG_BLOB_DETECTOR
# endif
the IEEE International Conference on Computer Vision (ICCV2011).
*/
-#include <opencv2/features2d/features2d.hpp>
-#include <opencv2/core/core.hpp>
-#include <opencv2/imgproc/imgproc.hpp>
+#include <opencv2/features2d.hpp>
+#include <opencv2/core.hpp>
+#include <opencv2/imgproc.hpp>
#include <fstream>
#include <stdlib.h>
#include "cvconfig.h"
#endif
-#include "opencv2/features2d/features2d.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/features2d.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/internal.hpp"
//M*/
#include "test_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
using namespace std;
using namespace cv;
//M*/
#include "test_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
using namespace std;
using namespace cv;
//M*/
#include "test_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
using namespace std;
using namespace cv;
//M*/
#include "test_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
using namespace std;
using namespace cv;
//M*/
#include "test_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
using namespace std;
using namespace cv;
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
-#include "opencv2/features2d/features2d.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/features2d.hpp"
+#include "opencv2/highgui.hpp"
#include <iostream>
#endif
//M*/
#include "test_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
using namespace std;
using namespace cv;
#ifdef __cplusplus
#include "opencv2/core/types_c.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/flann/flann_base.hpp"
#include "opencv2/flann/miniflann.hpp"
#ifdef __cplusplus
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/flann/defines.h"
namespace cv
#define OPENCV_FLANN_TIMER_H
#include <time.h>
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
namespace cvflann
{
*************************************************************************/
#include "precomp.hpp"
-#include "opencv2/flann/flann.hpp"
+#include "opencv2/flann.hpp"
namespace cvflann
{
#ifdef HAVE_CVCONFIG_H
# include "cvconfig.h"
#endif
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/core/internal.hpp"
#include "opencv2/flann/miniflann.hpp"
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/core/core.hpp"
-#include "opencv2/flann/flann.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/flann.hpp"
#include <iostream>
#endif
ocv_module_include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/cuda")
-file(GLOB lib_hdrs "include/opencv2/${name}/*.hpp" "include/opencv2/${name}/*.h")
+file(GLOB lib_hdrs "include/opencv2/*.hpp" "include/opencv2/${name}/*.hpp" "include/opencv2/${name}/*.h")
file(GLOB lib_device_hdrs "include/opencv2/${name}/device/*.hpp" "include/opencv2/${name}/device/*.h")
file(GLOB lib_device_hdrs_detail "include/opencv2/${name}/device/detail/*.hpp" "include/opencv2/${name}/device/detail/*.h")
file(GLOB lib_int_hdrs "src/*.hpp" "src/*.h")
#include <cstdio>
#define HAVE_CUDA 1
-#include <opencv2/core/core.hpp>
-#include <opencv2/gpu/gpu.hpp>
-#include <opencv2/highgui/highgui.hpp>
-#include <opencv2/video/video.hpp>
-#include <opencv2/legacy/legacy.hpp>
-#include <opencv2/ts/ts.hpp>
-#include <opencv2/ts/ts_perf.hpp>
+#include <opencv2/core.hpp>
+#include <opencv2/gpu.hpp>
+#include <opencv2/highgui.hpp>
+#include <opencv2/video.hpp>
+#include <opencv2/legacy.hpp>
+#include <opencv2/ts.hpp>
static void printOsInfo()
{
#endif
#include "opencv2/core/gpumat.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/objdetect/objdetect.hpp"
-#include "opencv2/features2d/features2d.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/objdetect.hpp"
+#include "opencv2/features2d.hpp"
namespace cv { namespace gpu {
#ifndef __OPENCV_GPU_STREAM_ACCESSOR_HPP__
#define __OPENCV_GPU_STREAM_ACCESSOR_HPP__
-#include "opencv2/gpu/gpu.hpp"
+#include "opencv2/gpu.hpp"
#include "cuda_runtime_api.h"
namespace cv
#include <cuda_runtime.h>
#endif
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/ts/ts_perf.hpp"
-
-#include "opencv2/core/core.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/gpu/gpu.hpp"
-#include "opencv2/calib3d/calib3d.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/video/video.hpp"
-#include "opencv2/nonfree/nonfree.hpp"
-#include "opencv2/legacy/legacy.hpp"
-#include "opencv2/photo/photo.hpp"
+#include "opencv2/ts.hpp"
+
+#include "opencv2/core.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/gpu.hpp"
+#include "opencv2/calib3d.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/video.hpp"
+#include "opencv2/nonfree.hpp"
+#include "opencv2/legacy.hpp"
+#include "opencv2/photo.hpp"
#include "utility.hpp"
#ifndef __OPENCV_PERF_GPU_UTILITY_HPP__
#define __OPENCV_PERF_GPU_UTILITY_HPP__
-#include "opencv2/core/core.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/ts/ts_perf.hpp"
cv::Mat readImage(const std::string& fileName, int flags = cv::IMREAD_COLOR);
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
-#include "opencv2/core/core.hpp"
-#include "opencv2/gpu/gpu.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/video/video.hpp"
-#include "opencv2/legacy/legacy.hpp"
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/ts/ts_perf.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/gpu.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/video.hpp"
+#include "opencv2/legacy.hpp"
+#include "opencv2/ts.hpp"
static void printOsInfo()
{
#include <memory>
#include <string>
-#include "opencv2/gpu/gpu.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/gpu.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
-#include "opencv2/calib3d/calib3d.hpp"
+#include "opencv2/calib3d.hpp"
#include "opencv2/core/internal.hpp"
-#include "opencv2/video/video.hpp"
+#include "opencv2/video.hpp"
#if defined WIN32 || defined WINCE
#include <windows.h>
#ifndef __OPENCV_TEST_INTERPOLATION_HPP__
#define __OPENCV_TEST_INTERPOLATION_HPP__
-#include "opencv2/core/core.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/imgproc.hpp"
template <typename T> T readVal(const cv::Mat& src, int y, int x, int c, int border_type, cv::Scalar borderVal = cv::Scalar())
{
#include <memory>
#include "NCV.hpp"
-#include <opencv2/highgui/highgui.hpp>
+#include <opencv2/highgui.hpp>
template <class T>
#include <cuda.h>
#include <cuda_runtime.h>
- #include "opencv2/core/core.hpp"
- #include "opencv2/core/opengl_interop.hpp"
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/calib3d/calib3d.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
- #include "opencv2/video/video.hpp"
- #include "opencv2/ts/ts.hpp"
- #include "opencv2/ts/ts_perf.hpp"
- #include "opencv2/gpu/gpu.hpp"
- #include "opencv2/nonfree/nonfree.hpp"
- #include "opencv2/legacy/legacy.hpp"
+ #include "opencv2/core.hpp"
+ #include "opencv2/core/opengl.hpp"
+ #include "opencv2/highgui.hpp"
+ #include "opencv2/calib3d.hpp"
+ #include "opencv2/imgproc.hpp"
+ #include "opencv2/video.hpp"
+ #include "opencv2/ts.hpp"
+ #include "opencv2/gpu.hpp"
+ #include "opencv2/nonfree.hpp"
+ #include "opencv2/legacy.hpp"
#include "utility.hpp"
#include "interpolation.hpp"
#ifndef __OPENCV_GPU_TEST_UTILITY_HPP__
#define __OPENCV_GPU_TEST_UTILITY_HPP__
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/core/gpumat.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/ts/ts_perf.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/ts.hpp"
//////////////////////////////////////////////////////////////////////
// random generators
src/window.cpp
)
-file(GLOB highgui_ext_hdrs "include/opencv2/${name}/*.hpp" "include/opencv2/${name}/*.h")
+file(GLOB highgui_ext_hdrs "include/opencv2/*.hpp" "include/opencv2/${name}/*.hpp" "include/opencv2/${name}/*.h")
if(HAVE_QT)
if (HAVE_QT_OPENGL)
#ifndef __OPENCV_HIGHGUI_HPP__
#define __OPENCV_HIGHGUI_HPP__
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/highgui/highgui_c.h"
#ifdef __cplusplus
#import <Accelerate/Accelerate.h>
#import <AVFoundation/AVFoundation.h>
#import <ImageIO/ImageIO.h>
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
/////////////////////////////////////// CvAbstractCamera /////////////////////////////////////
#ifndef __OPENCV_PERF_PRECOMP_HPP__
#define __OPENCV_PERF_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/highgui.hpp"
#ifdef GTEST_CREATE_SHARED_LIBRARY
#error no modules except ts should have GTEST_CREATE_SHARED_LIBRARY defined
#ifdef HAVE_ANDROID_NATIVE_CAMERA
-#include <opencv2/imgproc/imgproc.hpp>
+#include <opencv2/imgproc.hpp>
#include <pthread.h>
#include <android/log.h>
#include <camera_activity.hpp>
*/
#include "precomp.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
#include <iostream>
#import <AVFoundation/AVFoundation.h>
#import <Foundation/NSException.h>
#include "ffmpeg_codecs.hpp"
-#include <libavutil/opt.h>
#include <libavutil/mathematics.h>
#ifdef WIN32
#define HAVE_FFMPEG_SWSCALE 1
+ #include <libavutil/opt.h>
#include <libavcodec/avcodec.h>
#include <libswscale/swscale.h>
#else
//
//M*/
#include "precomp.hpp"
-#include "opencv2/core/core.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/imgproc.hpp"
#ifdef HAVE_OPENNI
*/
#include "precomp.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
#include <iostream>
#import <QTKit/QTKit.h>
#include "grfmt_webp.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
namespace cv
{
#include "cvconfig.h"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
#include "opencv2/highgui/highgui_c.h"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/internal.hpp"
#include "precomp.hpp"
#include <map>
-#include "opencv2/core/opengl_interop.hpp"
+#include "opencv2/core/opengl.hpp"
// in later times, use this file as a dispatcher to implementations like cvcap.cpp
#include <algorithm>
#include <vector>
#include <functional>
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
#include <GL\gl.h>
#endif
//M*/
#include "test_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
using namespace std;
using namespace cv;
//M*/
#include "test_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
using namespace cv;
//M*/
#include "test_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
#undef DEFINE_GUID
#define DEFINE_GUID(n, fourcc, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) fourcc,
//M*/
#include "test_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
#include <stdio.h>
using namespace cv;
//M*/
#include "test_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
using namespace cv;
using namespace std;
//M*/
#include "test_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
#if defined HAVE_GTK || defined HAVE_QT || defined WIN32 || defined _WIN32 || defined HAVE_CARBON || defined HAVE_COCOA
//M*/
#include "test_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
#include <stdio.h>
using namespace cv;
# include "cvconfig.h"
#endif
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include <iostream>
//M*/
#include "test_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
using namespace cv;
using namespace std;
//M*/
#include "test_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
using namespace cv;
using namespace std;
#ifndef __OPENCV_IMGPROC_HPP__
#define __OPENCV_IMGPROC_HPP__
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/imgproc/types_c.h"
#ifdef __cplusplus
#ifndef __OPENCV_PERF_PRECOMP_HPP__
#define __OPENCV_PERF_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/highgui.hpp"
#ifdef GTEST_CREATE_SHARED_LIBRARY
#error no modules except ts should have GTEST_CREATE_SHARED_LIBRARY defined
#include "cvconfig.h"
#endif
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/internal.hpp"
#include <math.h>
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
#include "opencv2/highgui/highgui_c.h"
#include <iostream>
-include/opencv2/core/core.hpp
+include/opencv2/core.hpp
../java/generator/src/cpp/core_manual.hpp
#define LOG_TAG "org.opencv.%(m)s"
#include "common.h"
-#include "opencv2/%(m)s/%(m)s.hpp"
+#include "opencv2/%(m)s.hpp"
using namespace cv;
#define LOG_TAG "org.opencv.core.Mat"
#include "common.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
using namespace cv;
#ifdef HAVE_OPENCV_HIGHGUI
#include "opencv2/highgui/highgui_c.h"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
using namespace cv;
#include "opencv2/opencv_modules.hpp"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "features2d_manual.hpp"
void Mat_to_vector_int(cv::Mat& mat, std::vector<int>& v_int);
#pragma once
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
namespace cv
{
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_FEATURES2D
-#include "opencv2/features2d/features2d.hpp"
+#include "opencv2/features2d.hpp"
#undef SIMPLEBLOB // to solve conflict with wincrypt.h on windows
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_NONFREE
-# include "opencv2/nonfree/nonfree.hpp"
+# include "opencv2/nonfree.hpp"
#endif
#ifdef HAVE_OPENCV_FEATURES2D
-# include "opencv2/features2d/features2d.hpp"
+# include "opencv2/features2d.hpp"
#endif
#ifdef HAVE_OPENCV_VIDEO
-# include "opencv2/video/video.hpp"
+# include "opencv2/video.hpp"
#endif
#ifdef HAVE_OPENCV_ML
-# include "opencv2/ml/ml.hpp"
+# include "opencv2/ml.hpp"
#endif
#ifdef HAVE_OPENCV_CONTRIB
-# include "opencv2/contrib/contrib.hpp"
+# include "opencv2/contrib.hpp"
#endif
extern "C" {
#define LOG_TAG "org.opencv.android.Utils"
#include "common.h"
-#include "opencv2/core/core.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/imgproc.hpp"
#ifdef __ANDROID__
#include <android/bitmap.h>
#ifndef __OPENCV_LEGACY_HPP__
#define __OPENCV_LEGACY_HPP__
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
-#include "opencv2/features2d/features2d.hpp"
-#include "opencv2/calib3d/calib3d.hpp"
-#include "opencv2/ml/ml.hpp"
+#include "opencv2/features2d.hpp"
+#include "opencv2/calib3d.hpp"
+#include "opencv2/ml.hpp"
#ifdef __cplusplus
extern "C" {
#include "precomp.hpp"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_HIGHGUI
-# include "opencv2/highgui/highgui.hpp"
+# include "opencv2/highgui.hpp"
#endif
#include <stdio.h>
#include "cvconfig.h"
#endif
-#include "opencv2/legacy/legacy.hpp"
+#include "opencv2/legacy.hpp"
#include "opencv2/core/internal.hpp"
-#include "opencv2/video/tracking.hpp"
-#include "opencv2/video/background_segm.hpp"
+#include "opencv2/video.hpp"
#include "opencv2/legacy/blobtrack.hpp"
#include "opencv2/legacy/compat.hpp"
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
#include "opencv2/highgui/highgui_c.h"
-#include "opencv2/legacy/legacy.hpp"
+#include "opencv2/legacy.hpp"
#include <iostream>
#endif
#ifndef __OPENCV_ML_HPP__
#define __OPENCV_ML_HPP__
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include <limits.h>
#ifdef __cplusplus
const float* another, float* results,
double alpha, double beta );
virtual void calc_intersec( int vcount, int var_count, const float** vecs,
- const float* another, float* results );
+ const float* another, float* results );
virtual void calc_chi2( int vec_count, int vec_size, const float** vecs,
const float* another, float* results );
virtual void calc_linear( int vec_count, int vec_size, const float** vecs,
#include "cvconfig.h"
#endif
-#include "opencv2/ml/ml.hpp"
+#include "opencv2/ml.hpp"
#include "opencv2/core/core_c.h"
#include "opencv2/core/internal.hpp"
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/ml/ml.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/ml.hpp"
#include "opencv2/core/core_c.h"
#include <iostream>
#include <map>
#ifndef __OPENCV_NONFREE_FEATURES_2D_HPP__
#define __OPENCV_NONFREE_FEATURES_2D_HPP__
-#include "opencv2/features2d/features2d.hpp"
+#include "opencv2/features2d.hpp"
#ifdef __cplusplus
#ifndef __OPENCV_PERF_PRECOMP_HPP__
#define __OPENCV_PERF_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/nonfree/nonfree.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/nonfree.hpp"
+#include "opencv2/highgui.hpp"
#ifdef GTEST_CREATE_SHARED_LIBRARY
#error no modules except ts should have GTEST_CREATE_SHARED_LIBRARY defined
#include "cvconfig.h"
#endif
-#include "opencv2/nonfree/nonfree.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/nonfree.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/core/internal.hpp"
#endif
//M*/
#include "test_precomp.hpp"
-#include "opencv2/calib3d/calib3d.hpp"
+#include "opencv2/calib3d.hpp"
using namespace std;
using namespace cv;
//M*/
#include "test_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
using namespace std;
using namespace cv;
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/nonfree/nonfree.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/nonfree.hpp"
#include <iostream>
#endif
//M*/
#include "test_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
using namespace std;
using namespace cv;
#ifndef __OPENCV_OBJDETECT_HPP__
#define __OPENCV_OBJDETECT_HPP__
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#ifdef __cplusplus
#include <map>
#include "perf_precomp.hpp"
-#include <opencv2/imgproc/imgproc.hpp>
+#include <opencv2/imgproc.hpp>
using namespace std;
using namespace cv;
#ifndef __OPENCV_PERF_PRECOMP_HPP__
#define __OPENCV_PERF_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/objdetect/objdetect.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/objdetect.hpp"
+#include "opencv2/highgui.hpp"
#ifdef GTEST_CREATE_SHARED_LIBRARY
#error no modules except ts should have GTEST_CREATE_SHARED_LIBRARY defined
#endif
}
-#include <opencv2/imgproc/imgproc.hpp>
+#include <opencv2/imgproc.hpp>
namespace cv
{
#include "cvconfig.h"
#endif
-#include "opencv2/objdetect/objdetect.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/objdetect.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/core_c.h"
#include "opencv2/core/internal.hpp"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_HIGHGUI
-# include "opencv2/highgui/highgui.hpp"
+# include "opencv2/highgui.hpp"
#endif
#ifdef HAVE_TEGRA_OPTIMIZATION
//M*/
#include "test_precomp.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
using namespace cv;
using namespace std;
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/objdetect/objdetect.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/objdetect.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/highgui.hpp"
#endif
#include <memory>
#include <vector>
-#include "opencv2/core/core.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/objdetect/objdetect.hpp"
-#include "opencv2/features2d/features2d.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/objdetect.hpp"
+#include "opencv2/features2d.hpp"
namespace cv
{
//
//M*/
-#include "opencv2/objdetect/objdetect.hpp"
#include "precomp.hpp"
#ifdef HAVE_OPENCL
//
//M*/
-#include "opencv2/core/core.hpp"
#include "precomp.hpp"
#include <iomanip>
#ifdef HAVE_OPENCL
#include <string>
#include <cstdarg>
#include "cvconfig.h"
-#include "opencv2/core/core.hpp"
-#include "opencv2/highgui/highgui.hpp"
-//#include "opencv2/calib3d/calib3d.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/video/video.hpp"
-#include "opencv2/ts/ts.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/highgui.hpp"
+//#include "opencv2/calib3d.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/video.hpp"
+#include "opencv2/ts.hpp"
#include "opencv2/ts/ts_perf.hpp"
-#include "opencv2/ocl/ocl.hpp"
-//#include "opencv2/nonfree/nonfree.hpp"
+#include "opencv2/ocl.hpp"
+//#include "opencv2/nonfree.hpp"
#include "utility.hpp"
#include "interpolation.hpp"
#include <exception>
#include <stdio.h>
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/ocl.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/core_c.h"
-#include "opencv2/objdetect/objdetect.hpp"
-#include "opencv2/ocl/ocl.hpp"
#include "opencv2/core/internal.hpp"
-//#include "opencv2/highgui/highgui.hpp"
+//#include "opencv2/highgui.hpp"
#define __ATI__
#include <iomanip>
#include "precomp.hpp"
#include "mcwutil.hpp"
-//#include "opencv2/highgui/highgui.hpp"
using namespace cv;
using namespace cv::ocl;
#include <string>
#include <cstdarg>
#include "cvconfig.h"
-#include "opencv2/core/core.hpp"
-#include "opencv2/highgui/highgui.hpp"
-//#include "opencv2/calib3d/calib3d.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/video/video.hpp"
-#include "opencv2/ts/ts.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/highgui.hpp"
+//#include "opencv2/calib3d.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/video.hpp"
+#include "opencv2/ts.hpp"
#include "opencv2/ts/ts_perf.hpp"
-#include "opencv2/ocl/ocl.hpp"
-//#include "opencv2/nonfree/nonfree.hpp"
+#include "opencv2/ocl.hpp"
+//#include "opencv2/nonfree.hpp"
#include "utility.hpp"
#include "interpolation.hpp"
//
//M*/
-#include "opencv2/objdetect/objdetect.hpp"
+#include "opencv2/objdetect.hpp"
#include "precomp.hpp"
#ifdef HAVE_OPENCL
//M*/
#include "precomp.hpp"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
using namespace std;
#ifdef HAVE_OPENCL
//M*/
#include "precomp.hpp"
-#include "opencv2/core/core.hpp"
#ifdef HAVE_OPENCL
#ifndef __OPENCV_PHOTO_HPP__
#define __OPENCV_PHOTO_HPP__
-#include "opencv2/core/core.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/photo/photo_c.h"
#ifndef __OPENCV_PERF_PRECOMP_HPP__
#define __OPENCV_PERF_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/photo/photo.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/photo.hpp"
+#include "opencv2/highgui.hpp"
#ifdef GTEST_CREATE_SHARED_LIBRARY
#error no modules except ts should have GTEST_CREATE_SHARED_LIBRARY defined
//M*/
#include "precomp.hpp"
-#include "opencv2/photo/photo.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/photo.hpp"
+#include "opencv2/imgproc.hpp"
#include "fast_nlmeans_denoising_invoker.hpp"
#include "fast_nlmeans_multi_denoising_invoker.hpp"
#define __OPENCV_FAST_NLMEANS_DENOISING_INVOKER_HPP__
#include "precomp.hpp"
-#include <opencv2/core/core.hpp>
+#include <opencv2/core.hpp>
#include <opencv2/core/internal.hpp>
-#include <opencv2/imgproc/imgproc.hpp>
+#include <opencv2/imgproc.hpp>
#include <limits>
#include "fast_nlmeans_denoising_invoker_commons.hpp"
#ifndef __OPENCV_FAST_NLMEANS_DENOISING_INVOKER_COMMONS_HPP__
#define __OPENCV_FAST_NLMEANS_DENOISING_INVOKER_COMMONS_HPP__
-#include <opencv2/core/core.hpp>
+#include <opencv2/core.hpp>
#include <opencv2/core/internal.hpp>
-#include <opencv2/imgproc/imgproc.hpp>
+#include <opencv2/imgproc.hpp>
using namespace cv;
#define __OPENCV_FAST_NLMEANS_MULTI_DENOISING_INVOKER_HPP__
#include "precomp.hpp"
-#include <opencv2/core/core.hpp>
+#include <opencv2/core.hpp>
#include <opencv2/core/internal.hpp>
-#include <opencv2/imgproc/imgproc.hpp>
+#include <opencv2/imgproc.hpp>
#include <limits>
#include "fast_nlmeans_denoising_invoker_commons.hpp"
#include "cvconfig.h"
#endif
-#include "opencv2/photo/photo.hpp"
+#include "opencv2/photo.hpp"
#ifdef HAVE_TEGRA_OPTIMIZATION
#include "opencv2/photo/photo_tegra.hpp"
//M*/
#include "test_precomp.hpp"
-#include "opencv2/photo/photo.hpp"
+#include "opencv2/photo.hpp"
#include <string>
using namespace cv;
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/photo/photo.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/photo.hpp"
+#include "opencv2/highgui.hpp"
#include <iostream>
#endif
set(opencv_hdrs
- "${OPENCV_MODULE_opencv_core_LOCATION}/include/opencv2/core/core.hpp"
+ "${OPENCV_MODULE_opencv_core_LOCATION}/include/opencv2/core.hpp"
"${OPENCV_MODULE_opencv_flann_LOCATION}/include/opencv2/flann/miniflann.hpp"
- "${OPENCV_MODULE_opencv_imgproc_LOCATION}/include/opencv2/imgproc/imgproc.hpp"
+ "${OPENCV_MODULE_opencv_imgproc_LOCATION}/include/opencv2/imgproc.hpp"
"${OPENCV_MODULE_opencv_video_LOCATION}/include/opencv2/video/background_segm.hpp"
"${OPENCV_MODULE_opencv_video_LOCATION}/include/opencv2/video/tracking.hpp"
- "${OPENCV_MODULE_opencv_photo_LOCATION}/include/opencv2/photo/photo.hpp"
- "${OPENCV_MODULE_opencv_highgui_LOCATION}/include/opencv2/highgui/highgui.hpp"
- "${OPENCV_MODULE_opencv_ml_LOCATION}/include/opencv2/ml/ml.hpp"
- "${OPENCV_MODULE_opencv_features2d_LOCATION}/include/opencv2/features2d/features2d.hpp"
- "${OPENCV_MODULE_opencv_calib3d_LOCATION}/include/opencv2/calib3d/calib3d.hpp"
- "${OPENCV_MODULE_opencv_objdetect_LOCATION}/include/opencv2/objdetect/objdetect.hpp"
- "${OPENCV_MODULE_opencv_softcascade_LOCATION}/include/opencv2/softcascade/softcascade.hpp"
- "${OPENCV_MODULE_opencv_contrib_LOCATION}/include/opencv2/contrib/contrib.hpp")
+ "${OPENCV_MODULE_opencv_photo_LOCATION}/include/opencv2/photo.hpp"
+ "${OPENCV_MODULE_opencv_highgui_LOCATION}/include/opencv2/highgui.hpp"
+ "${OPENCV_MODULE_opencv_ml_LOCATION}/include/opencv2/ml.hpp"
+ "${OPENCV_MODULE_opencv_features2d_LOCATION}/include/opencv2/features2d.hpp"
+ "${OPENCV_MODULE_opencv_calib3d_LOCATION}/include/opencv2/calib3d.hpp"
+ "${OPENCV_MODULE_opencv_objdetect_LOCATION}/include/opencv2/objdetect.hpp"
+ "${OPENCV_MODULE_opencv_softcascade_LOCATION}/include/opencv2/softcascade.hpp"
+ "${OPENCV_MODULE_opencv_contrib_LOCATION}/include/opencv2/contrib.hpp")
if(HAVE_opencv_nonfree)
list(APPEND opencv_hdrs "${OPENCV_MODULE_opencv_nonfree_LOCATION}/include/opencv2/nonfree/features2d.hpp"
- "${OPENCV_MODULE_opencv_nonfree_LOCATION}/include/opencv2/nonfree/nonfree.hpp")
+ "${OPENCV_MODULE_opencv_nonfree_LOCATION}/include/opencv2/nonfree.hpp")
endif()
set(cv2_generated_hdrs
#include "numpy/ndarrayobject.h"
-#include "opencv2/core/core.hpp"
-#include "opencv2/contrib/contrib.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/contrib.hpp"
#include "opencv2/flann/miniflann.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/calib3d/calib3d.hpp"
-#include "opencv2/ml/ml.hpp"
-#include "opencv2/features2d/features2d.hpp"
-#include "opencv2/objdetect/objdetect.hpp"
-#include "opencv2/softcascade/softcascade.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/calib3d.hpp"
+#include "opencv2/ml.hpp"
+#include "opencv2/features2d.hpp"
+#include "opencv2/objdetect.hpp"
+#include "opencv2/softcascade.hpp"
#include "opencv2/video/tracking.hpp"
#include "opencv2/video/background_segm.hpp"
-#include "opencv2/photo/photo.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/photo.hpp"
+#include "opencv2/highgui.hpp"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_NONFREE
-# include "opencv2/nonfree/nonfree.hpp"
+# include "opencv2/nonfree.hpp"
#endif
using cv::flann::IndexParams;
-#include "opencv2/legacy/legacy.hpp"
+#include "opencv2/legacy.hpp"
#include "opencv2/legacy/compat.hpp"
#define OLD_MODULESTR "cv2.cv"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_NONFREE
-# include "opencv2/nonfree/nonfree.hpp"
+# include "opencv2/nonfree.hpp"
#endif
#ifdef HAVE_OPENCV_FEATURES2D
-# include "opencv2/features2d/features2d.hpp"
+# include "opencv2/features2d.hpp"
#endif
#ifdef HAVE_OPENCV_VIDEO
-# include "opencv2/video/video.hpp"
+# include "opencv2/video.hpp"
#endif
#ifdef HAVE_OPENCV_ML
-# include "opencv2/ml/ml.hpp"
+# include "opencv2/ml.hpp"
#endif
#ifdef HAVE_OPENCV_CONTRIB
-# include "opencv2/contrib/contrib.hpp"
+# include "opencv2/contrib.hpp"
#endif
static PyObject* init_cv()
# the list only for debugging. The real list, used in the real OpenCV build, is specified in CMakeLists.txt
opencv_hdr_list = [
-"../../core/include/opencv2/core/core.hpp",
+"../../core/include/opencv2/core.hpp",
"../../flann/include/opencv2/flann/miniflann.hpp",
-"../../ml/include/opencv2/ml/ml.hpp",
-"../../imgproc/include/opencv2/imgproc/imgproc.hpp",
-"../../calib3d/include/opencv2/calib3d/calib3d.hpp",
-"../../features2d/include/opencv2/features2d/features2d.hpp",
+"../../ml/include/opencv2/ml.hpp",
+"../../imgproc/include/opencv2/imgproc.hpp",
+"../../calib3d/include/opencv2/calib3d.hpp",
+"../../features2d/include/opencv2/features2d.hpp",
"../../video/include/opencv2/video/tracking.hpp",
"../../video/include/opencv2/video/background_segm.hpp",
-"../../objdetect/include/opencv2/objdetect/objdetect.hpp",
-"../../contrib/include/opencv2/contrib/contrib.hpp",
-"../../highgui/include/opencv2/highgui/highgui.hpp"
+"../../objdetect/include/opencv2/objdetect.hpp",
+"../../contrib/include/opencv2/contrib.hpp",
+"../../highgui/include/opencv2/highgui.hpp"
]
"""
#ifndef __OPENCV_SOFTCASCADE_HPP__
#define __OPENCV_SOFTCASCADE_HPP__
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
namespace cv { namespace softcascade {
#ifndef __OPENCV_PERF_PRECOMP_HPP__
#define __OPENCV_PERF_PRECOMP_HPP__
-# include "opencv2/ts/ts.hpp"
-# include "opencv2/softcascade/softcascade.hpp"
-# include "opencv2/highgui/highgui.hpp"
+# include "opencv2/ts.hpp"
+# include "opencv2/softcascade.hpp"
+# include "opencv2/highgui.hpp"
#ifdef GTEST_CREATE_SHARED_LIBRARY
# error no modules except ts should have GTEST_CREATE_SHARED_LIBRARY defined
#include "perf_precomp.hpp"
-#include <opencv2/imgproc/imgproc.hpp>
+#include <opencv2/imgproc.hpp>
using cv::Rect;
using std::tr1::get;
#include "cvconfig.h"
#endif
-#include "opencv2/softcascade/softcascade.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/softcascade.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/core_c.h"
#include "opencv2/core/internal.hpp"
-#include "opencv2/ml/ml.hpp"
+#include "opencv2/ml.hpp"
namespace cv { namespace softcascade { namespace internal
{
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
-# include "opencv2/ts/ts.hpp"
-# include "opencv2/softcascade/softcascade.hpp"
-# include "opencv2/imgproc/imgproc.hpp"
-# include "opencv2/highgui/highgui.hpp"
+# include "opencv2/ts.hpp"
+# include "opencv2/softcascade.hpp"
+# include "opencv2/imgproc.hpp"
+# include "opencv2/highgui.hpp"
#endif
#ifndef __OPENCV_STITCHING_STITCHER_HPP__
#define __OPENCV_STITCHING_STITCHER_HPP__
-#include "opencv2/core/core.hpp"
-#include "opencv2/features2d/features2d.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/features2d.hpp"
#include "opencv2/stitching/warpers.hpp"
#include "opencv2/stitching/detail/matchers.hpp"
#include "opencv2/stitching/detail/motion_estimators.hpp"
#ifndef __OPENCV_STITCHING_AUTOCALIB_HPP__
#define __OPENCV_STITCHING_AUTOCALIB_HPP__
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "matchers.hpp"
namespace cv {
#ifndef __OPENCV_STITCHING_BLENDERS_HPP__
#define __OPENCV_STITCHING_BLENDERS_HPP__
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
namespace cv {
namespace detail {
#ifndef __OPENCV_STITCHING_CAMERA_HPP__
#define __OPENCV_STITCHING_CAMERA_HPP__
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
namespace cv {
namespace detail {
#ifndef __OPENCV_STITCHING_EXPOSURE_COMPENSATE_HPP__
#define __OPENCV_STITCHING_EXPOSURE_COMPENSATE_HPP__
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
namespace cv {
namespace detail {
#ifndef __OPENCV_STITCHING_MATCHERS_HPP__
#define __OPENCV_STITCHING_MATCHERS_HPP__
-#include "opencv2/core/core.hpp"
-#include "opencv2/features2d/features2d.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/features2d.hpp"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_GPU
-#include "opencv2/gpu/gpu.hpp"
+#include "opencv2/gpu.hpp"
#endif
namespace cv {
#ifndef __OPENCV_STITCHING_MOTION_ESTIMATORS_HPP__
#define __OPENCV_STITCHING_MOTION_ESTIMATORS_HPP__
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "matchers.hpp"
#include "util.hpp"
#include "camera.hpp"
#define __OPENCV_STITCHING_SEAM_FINDERS_HPP__
#include <set>
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/opencv_modules.hpp"
namespace cv {
#define __OPENCV_STITCHING_UTIL_HPP__
#include <list>
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#define ENABLE_LOG 0
#define __OPENCV_STITCHING_UTIL_INL_HPP__
#include <queue>
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "util.hpp" // Make your IDE see declarations
namespace cv {
#ifndef __OPENCV_STITCHING_WARPERS_HPP__
#define __OPENCV_STITCHING_WARPERS_HPP__
-#include "opencv2/core/core.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_GPU
-# include "opencv2/gpu/gpu.hpp"
+# include "opencv2/gpu.hpp"
#endif
namespace cv {
#ifndef __OPENCV_STITCHING_WARPERS_INL_HPP__
#define __OPENCV_STITCHING_WARPERS_INL_HPP__
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "warpers.hpp" // Make your IDE see declarations
namespace cv {
#ifndef __OPENCV_PERF_PRECOMP_HPP__
#define __OPENCV_PERF_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-
-#include "opencv2/stitching/stitcher.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/stitching.hpp"
#ifdef GTEST_CREATE_SHARED_LIBRARY
#error no modules except ts should have GTEST_CREATE_SHARED_LIBRARY defined
#include "perf_precomp.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
#include "opencv2/core/internal.hpp"
-#include "opencv2/flann/flann.hpp"
+#include "opencv2/flann.hpp"
#include "opencv2/opencv_modules.hpp"
using namespace std;
#endif
#ifdef HAVE_OPENCV_NONFREE
-#include "opencv2/nonfree/nonfree.hpp"
+#include "opencv2/nonfree.hpp"
static bool makeUseOfNonfree = initModule_nonfree();
#endif
#include <functional>
#include <sstream>
#include <cmath>
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/core/internal.hpp"
-#include "opencv2/stitching/stitcher.hpp"
+#include "opencv2/stitching.hpp"
#include "opencv2/stitching/detail/autocalib.hpp"
#include "opencv2/stitching/detail/blenders.hpp"
#include "opencv2/stitching/detail/camera.hpp"
#include "opencv2/stitching/detail/seam_finders.hpp"
#include "opencv2/stitching/detail/util.hpp"
#include "opencv2/stitching/detail/warpers.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/features2d/features2d.hpp"
-#include "opencv2/calib3d/calib3d.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/features2d.hpp"
+#include "opencv2/calib3d.hpp"
#ifdef HAVE_OPENCV_GPU
-# include "opencv2/gpu/gpu.hpp"
+# include "opencv2/gpu.hpp"
#endif
#include "../../imgproc/src/gcgraph.hpp"
#include <iostream>
#include <string>
-#include <opencv2/ts/ts.hpp>
-#include <opencv2/highgui/highgui.hpp>
-#include <opencv2/stitching/stitcher.hpp>
+#include <opencv2/ts.hpp>
+#include <opencv2/highgui.hpp>
+#include <opencv2/stitching.hpp>
#include <opencv2/stitching/detail/matchers.hpp>
#include <opencv2/stitching/detail/blenders.hpp>
# define GTEST_USES_POSIX_RE 0
#endif
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
namespace cvtest
{
#endif
-#include "ts_perf.hpp"
+#include "opencv2/ts/ts_perf.hpp"
#ifndef __OPENCV_TS_PERF_HPP__
#define __OPENCV_TS_PERF_HPP__
-#include "opencv2/core/core.hpp"
-#include "opencv2/features2d/features2d.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/features2d.hpp"
#include "ts_gtest.h"
#ifdef HAVE_TBB
#include "opencv2/core/core_c.h"
-#include "opencv2/ts/ts.hpp"
+#include "opencv2/ts.hpp"
#ifdef GTEST_LINKED_AS_SHARED_LIBRARY
#error ts module should not have GTEST_LINKED_AS_SHARED_LIBRARY defined
..math::
-\texttt{warpMatrix} =
- \texttt{warpMatrix} = \arg\max_{W} \texttt{ECC}(\texttt{templateImage}(x,y),\texttt{inputImage}(x',y'))
+ \texttt{warpMatrix} = \texttt{warpMatrix} = \arg\max_{W} \texttt{ECC}(\texttt{templateImage}(x,y),\texttt{inputImage}(x',y'))
where
#ifndef __OPENCV_BACKGROUND_SEGM_HPP__
#define __OPENCV_BACKGROUND_SEGM_HPP__
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include <list>
namespace cv
{
#ifndef __OPENCV_TRACKING_HPP__
#define __OPENCV_TRACKING_HPP__
-#include "opencv2/core/core.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/imgproc.hpp"
#ifdef __cplusplus
extern "C" {
#ifndef __OPENCV_VIDEO_PRECOMP_HPP__
#define __OPENCV_VIDEO_PRECOMP_HPP__
-#include <opencv2/imgproc/imgproc.hpp>
-#include <opencv2/video/video.hpp>
-#include <opencv2/highgui/highgui.hpp>
-#include "opencv2/ts/ts.hpp"
+#include <opencv2/imgproc.hpp>
+#include <opencv2/video.hpp>
+#include <opencv2/highgui.hpp>
+#include "opencv2/ts.hpp"
#ifdef GTEST_CREATE_SHARED_LIBRARY
#error no modules except ts should have GTEST_CREATE_SHARED_LIBRARY defined
//M*/
#include "precomp.hpp"
-#include "opencv2/video/video.hpp"
+#include "opencv2/video.hpp"
namespace cv
{
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
-#include "opencv2/ts/ts.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/ts.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
-#include "opencv2/video/tracking.hpp"
-#include "opencv2/video/background_segm.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/video.hpp"
+#include "opencv2/highgui.hpp"
#include <iostream>
#endif
#define __OPENCV_VIDEOSTAB_DEBLURRING_HPP__
#include <vector>
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
namespace cv
{
#include <cmath>
#include <queue>
#include <algorithm>
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
namespace cv
{
#include <vector>
#include <string>
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
namespace cv
{
#include <vector>
#include <string>
#include <fstream>
-#include "opencv2/core/core.hpp"
-#include "opencv2/features2d/features2d.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/features2d.hpp"
#include "opencv2/opencv_modules.hpp"
#include "opencv2/videostab/optical_flow.hpp"
#include "opencv2/videostab/motion_core.hpp"
#include "opencv2/videostab/outlier_rejection.hpp"
#ifdef HAVE_OPENCV_GPU
- #include "opencv2/gpu/gpu.hpp"
+ #include "opencv2/gpu.hpp"
#endif
namespace cv
#define __OPENCV_VIDEOSTAB_INPAINTINT_HPP__
#include <vector>
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/videostab/optical_flow.hpp"
#include "opencv2/videostab/fast_marching.hpp"
#include "opencv2/videostab/global_motion.hpp"
-#include "opencv2/photo/photo.hpp"
+#include "opencv2/photo.hpp"
namespace cv
{
#ifndef __OPENCV_VIDEOSTAB_LOG_HPP__
#define __OPENCV_VIDEOSTAB_LOG_HPP__
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
namespace cv
{
#define __OPENCV_VIDEOSTAB_MOTION_CORE_HPP__
#include <cmath>
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
namespace cv
{
#include <vector>
#include <utility>
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/videostab/global_motion.hpp"
namespace cv
#ifndef __OPENCV_VIDEOSTAB_OPTICAL_FLOW_HPP__
#define __OPENCV_VIDEOSTAB_OPTICAL_FLOW_HPP__
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_GPU
- #include "opencv2/gpu/gpu.hpp"
+ #include "opencv2/gpu.hpp"
#endif
namespace cv
#define __OPENCV_VIDEOSTAB_OUTLIER_REJECTION_HPP__
#include <vector>
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/videostab/motion_core.hpp"
namespace cv
#define __OPENCV_VIDEOSTAB_RING_BUFFER_HPP__
#include <vector>
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
namespace cv
{
#include <vector>
#include <ctime>
-#include "opencv2/core/core.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/imgproc.hpp"
#include "opencv2/videostab/global_motion.hpp"
#include "opencv2/videostab/motion_stabilizing.hpp"
#include "opencv2/videostab/frame_source.hpp"
#define __OPENCV_VIDEOSTAB_WOBBLE_SUPPRESSION_HPP__
#include <vector>
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#include "opencv2/videostab/global_motion.hpp"
#include "opencv2/videostab/log.hpp"
#ifdef HAVE_OPENCV_GPU
- #include "opencv2/gpu/gpu.hpp"
+ #include "opencv2/gpu.hpp"
#endif
namespace cv
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_HIGHGUI
-# include "opencv2/highgui/highgui.hpp"
+# include "opencv2/highgui.hpp"
#endif
namespace cv
//M*/
#include "precomp.hpp"
-#include "opencv2/video/video.hpp"
+#include "opencv2/video.hpp"
#include "opencv2/videostab/optical_flow.hpp"
#include "opencv2/videostab/ring_buffer.hpp"
//M*/
#include "precomp.hpp"
-#include "opencv2/core/core.hpp"
#include "opencv2/videostab/outlier_rejection.hpp"
namespace cv
#include <iostream>
#include <ctime>
#include <algorithm>
-#include "opencv2/core/core.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/video/video.hpp"
-#include "opencv2/features2d/features2d.hpp"
-#include "opencv2/calib3d/calib3d.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/video.hpp"
+#include "opencv2/features2d.hpp"
+#include "opencv2/calib3d.hpp"
// some aux. functions
#ifndef __OPENCV_WORLD_HPP__
#define __OPENCV_WORLD_HPP__
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
#ifdef __cplusplus
namespace cv
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_VIDEO
-#include "opencv2/video/video.hpp"
+#include "opencv2/video.hpp"
#endif
#ifdef HAVE_OPENCV_FEATURES2D
-#include "opencv2/features2d/features2d.hpp"
+#include "opencv2/features2d.hpp"
#endif
#ifdef HAVE_OPENCV_NONFREE
-#include "opencv2/nonfree/nonfree.hpp"
+#include "opencv2/nonfree.hpp"
#endif
#ifdef HAVE_OPENCV_ML
-#include "opencv2/ml/ml.hpp"
+#include "opencv2/ml.hpp"
#endif
-#include "opencv2/world/world.hpp"
+#include "opencv2/world.hpp"
#endif
#include <iostream>
#include <fstream>
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/stitching/stitcher.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/stitching.hpp"
using namespace std;
using namespace cv;
#include <fstream>
#include <sstream>
#include <stdexcept>
-#include "opencv2/core/core.hpp"
-#include "opencv2/video/video.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/videostab/videostab.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/video.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/videostab.hpp"
#include "opencv2/opencv_modules.hpp"
#define arg(name) cmd.get<string>(name)
#include <iostream>
-#include "opencv2/core/opengl_interop.hpp"
+#include "opencv2/core/opengl.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/gpu/gpu.hpp"
#endif
#include "opencv2/core/core.hpp"
-#include "opencv2/core/opengl_interop.hpp"
+#include "opencv2/core/opengl.hpp"
#include "opencv2/core/gpumat.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <numeric>
#include <opencv2/core/core.hpp>
-#include <opencv2/core/opengl_interop.hpp>
+#include <opencv2/core/opengl.hpp>
#include <opencv2/gpu/gpu.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/contrib/contrib.hpp>