Merge remote-tracking branch 'origin/2.4' into merge-2.4

Conflicts:
	modules/calib3d/perf/perf_pnp.cpp
	modules/contrib/src/imagelogpolprojection.cpp
	modules/contrib/src/templatebuffer.hpp
	modules/core/perf/opencl/perf_gemm.cpp
	modules/cudafeatures2d/doc/feature_detection_and_description.rst
	modules/cudafeatures2d/perf/perf_features2d.cpp
	modules/cudafeatures2d/src/fast.cpp
	modules/cudafeatures2d/test/test_features2d.cpp
	modules/features2d/doc/feature_detection_and_description.rst
	modules/features2d/include/opencv2/features2d/features2d.hpp
	modules/features2d/perf/opencl/perf_brute_force_matcher.cpp
	modules/gpu/include/opencv2/gpu/gpu.hpp
	modules/gpu/perf/perf_imgproc.cpp
	modules/gpu/perf4au/main.cpp
	modules/imgproc/perf/opencl/perf_blend.cpp
	modules/imgproc/perf/opencl/perf_color.cpp
	modules/imgproc/perf/opencl/perf_moments.cpp
	modules/imgproc/perf/opencl/perf_pyramid.cpp
	modules/objdetect/perf/opencl/perf_hogdetect.cpp
	modules/ocl/perf/perf_arithm.cpp
	modules/ocl/perf/perf_bgfg.cpp
	modules/ocl/perf/perf_blend.cpp
	modules/ocl/perf/perf_brute_force_matcher.cpp
	modules/ocl/perf/perf_canny.cpp
	modules/ocl/perf/perf_filters.cpp
	modules/ocl/perf/perf_gftt.cpp
	modules/ocl/perf/perf_haar.cpp
	modules/ocl/perf/perf_imgproc.cpp
	modules/ocl/perf/perf_imgwarp.cpp
	modules/ocl/perf/perf_match_template.cpp
	modules/ocl/perf/perf_matrix_operation.cpp
	modules/ocl/perf/perf_ml.cpp
	modules/ocl/perf/perf_moments.cpp
	modules/ocl/perf/perf_opticalflow.cpp
	modules/ocl/perf/perf_precomp.hpp
	modules/ocl/src/cl_context.cpp
	modules/ocl/src/opencl/haarobjectdetect.cl
	modules/video/src/lkpyramid.cpp
	modules/video/src/precomp.hpp
	samples/gpu/morphology.cpp
pull/2465/head
Roman Donchenko 11 years ago
commit 95a55453df
  1. 2
      modules/calib3d/perf/perf_pnp.cpp
  2. 2
      modules/calib3d/test/test_solvepnp_ransac.cpp
  3. 2
      modules/contrib/src/lda.cpp
  4. 2
      modules/core/include/opencv2/core/core_c.h
  5. 2
      modules/core/src/array.cpp
  6. 12
      modules/cudafeatures2d/doc/feature_detection_and_description.rst
  7. 12
      modules/cudafeatures2d/include/opencv2/cudafeatures2d.hpp
  8. 4
      modules/cudafeatures2d/perf/perf_features2d.cpp
  9. 8
      modules/cudafeatures2d/src/cuda/fast.cu
  10. 14
      modules/cudafeatures2d/src/fast.cpp
  11. 14
      modules/cudafeatures2d/test/test_features2d.cpp
  12. 6
      modules/cudaimgproc/perf/perf_hough.cpp
  13. 6
      modules/features2d/doc/feature_detection_and_description.rst
  14. 4
      modules/features2d/include/opencv2/features2d.hpp
  15. 2
      modules/features2d/src/evaluation.cpp
  16. 29
      modules/highgui/src/cap_libv4l.cpp
  17. 24
      modules/highgui/src/cap_v4l.cpp
  18. 2
      modules/highgui/src/window_QT.cpp
  19. 2
      modules/highgui/src/window_carbon.cpp
  20. 2
      modules/imgproc/doc/feature_detection.rst
  21. 6
      modules/imgproc/include/opencv2/imgproc/imgproc_c.h
  22. 2
      modules/imgproc/src/approx.cpp
  23. 2
      modules/imgproc/src/canny.cpp
  24. 2
      modules/ts/include/opencv2/ts.hpp
  25. 5
      modules/ts/misc/summary.py
  26. 2
      modules/viz/doc/widget.rst
  27. 14
      platforms/android/service/engine/src/org/opencv/engine/manager/ManagerActivity.java
  28. 2
      samples/cpp/morphology2.cpp
  29. 2
      samples/gpu/morphology.cpp

@ -129,7 +129,7 @@ PERF_TEST_P(PointsNum, DISABLED_SolvePnPRansac, testing::Values(4, 3*9, 7*13))
Mat tvec; Mat tvec;
#ifdef HAVE_TBB #ifdef HAVE_TBB
// limit concurrency to get determenistic result // limit concurrency to get deterministic result
tbb::task_scheduler_init one_thread(1); tbb::task_scheduler_init one_thread(1);
#endif #endif

@ -274,7 +274,7 @@ TEST(DISABLED_Calib3d_SolvePnPRansac, concurrency)
Mat tvec1, tvec2; Mat tvec1, tvec2;
{ {
// limit concurrency to get determenistic result // limit concurrency to get deterministic result
cv::theRNG().state = 20121010; cv::theRNG().state = 20121010;
tbb::task_scheduler_init one_thread(1); tbb::task_scheduler_init one_thread(1);
solvePnPRansac(object, image, camera_mat, dist_coef, rvec1, tvec1); solvePnPRansac(object, image, camera_mat, dist_coef, rvec1, tvec1);

@ -224,7 +224,7 @@ Mat subspaceReconstruct(InputArray _W, InputArray _mean, InputArray _src)
String error_message = format("Wrong mean shape for the given eigenvector matrix. Expected %d, but was %d.", W.cols, mean.total()); String error_message = format("Wrong mean shape for the given eigenvector matrix. Expected %d, but was %d.", W.cols, mean.total());
CV_Error(Error::StsBadArg, error_message); CV_Error(Error::StsBadArg, error_message);
} }
// initalize temporary matrices // initialize temporary matrices
Mat X, Y; Mat X, Y;
// copy data & make sure we are using the correct type // copy data & make sure we are using the correct type
src.convertTo(Y, W.type()); src.convertTo(Y, W.type());

@ -120,7 +120,7 @@ CVAPI(void) cvResetImageROI( IplImage* image );
/* Retrieves image ROI */ /* Retrieves image ROI */
CVAPI(CvRect) cvGetImageROI( const IplImage* image ); CVAPI(CvRect) cvGetImageROI( const IplImage* image );
/* Allocates and initalizes CvMat header */ /* Allocates and initializes CvMat header */
CVAPI(CvMat*) cvCreateMatHeader( int rows, int cols, int type ); CVAPI(CvMat*) cvCreateMatHeader( int rows, int cols, int type );
#define CV_AUTOSTEP 0x7fffffff #define CV_AUTOSTEP 0x7fffffff

@ -2904,7 +2904,7 @@ cvCreateImage( CvSize size, int depth, int channels )
} }
// initalize IplImage header, allocated by the user // initialize IplImage header, allocated by the user
CV_IMPL IplImage* CV_IMPL IplImage*
cvInitImageHeader( IplImage * image, CvSize size, int depth, cvInitImageHeader( IplImage * image, CvSize size, int depth,
int channels, int origin, int align ) int channels, int origin, int align )

@ -24,7 +24,7 @@ Class used for corner detection using the FAST algorithm. ::
// all features have same size // all features have same size
static const int FEATURE_SIZE = 7; static const int FEATURE_SIZE = 7;
explicit FAST_CUDA(int threshold, bool nonmaxSupression = true, explicit FAST_CUDA(int threshold, bool nonmaxSuppression = true,
double keypointsRatio = 0.05); double keypointsRatio = 0.05);
void operator ()(const GpuMat& image, const GpuMat& mask, GpuMat& keypoints); void operator ()(const GpuMat& image, const GpuMat& mask, GpuMat& keypoints);
@ -39,7 +39,7 @@ Class used for corner detection using the FAST algorithm. ::
void release(); void release();
bool nonmaxSupression; bool nonmaxSuppression;
int threshold; int threshold;
@ -61,11 +61,11 @@ cuda::FAST_CUDA::FAST_CUDA
-------------------------- --------------------------
Constructor. Constructor.
.. ocv:function:: cuda::FAST_CUDA::FAST_CUDA(int threshold, bool nonmaxSupression = true, double keypointsRatio = 0.05) .. ocv:function:: cuda::FAST_CUDA::FAST_CUDA(int threshold, bool nonmaxSuppression = true, double keypointsRatio = 0.05)
:param threshold: Threshold on difference between intensity of the central pixel and pixels on a circle around this pixel. :param threshold: Threshold on difference between intensity of the central pixel and pixels on a circle around this pixel.
:param nonmaxSupression: If it is true, non-maximum suppression is applied to detected corners (keypoints). :param nonmaxSuppression: If it is true, non-maximum suppression is applied to detected corners (keypoints).
:param keypointsRatio: Inner buffer size for keypoints store is determined as (keypointsRatio * image_width * image_height). :param keypointsRatio: Inner buffer size for keypoints store is determined as (keypointsRatio * image_width * image_height).
@ -115,7 +115,7 @@ Releases inner buffer memory.
cuda::FAST_CUDA::calcKeyPointsLocation cuda::FAST_CUDA::calcKeyPointsLocation
-------------------------------------- --------------------------------------
Find keypoints and compute it's response if ``nonmaxSupression`` is true. Find keypoints and compute it's response if ``nonmaxSuppression`` is true.
.. ocv:function:: int cuda::FAST_CUDA::calcKeyPointsLocation(const GpuMat& image, const GpuMat& mask) .. ocv:function:: int cuda::FAST_CUDA::calcKeyPointsLocation(const GpuMat& image, const GpuMat& mask)
@ -185,7 +185,7 @@ Class for extracting ORB features and descriptors from an image. ::
int descriptorSize() const; int descriptorSize() const;
void setParams(size_t n_features, const ORB::CommonParams& detector_params); void setParams(size_t n_features, const ORB::CommonParams& detector_params);
void setFastParams(int threshold, bool nonmaxSupression = true); void setFastParams(int threshold, bool nonmaxSuppression = true);
void release(); void release();

@ -216,7 +216,7 @@ public:
// all features have same size // all features have same size
static const int FEATURE_SIZE = 7; static const int FEATURE_SIZE = 7;
explicit FAST_CUDA(int threshold, bool nonmaxSupression = true, double keypointsRatio = 0.05); explicit FAST_CUDA(int threshold, bool nonmaxSuppression = true, double keypointsRatio = 0.05);
//! finds the keypoints using FAST detector //! finds the keypoints using FAST detector
//! supports only CV_8UC1 images //! supports only CV_8UC1 images
@ -232,19 +232,19 @@ public:
//! release temporary buffer's memory //! release temporary buffer's memory
void release(); void release();
bool nonmaxSupression; bool nonmaxSuppression;
int threshold; int threshold;
//! max keypoints = keypointsRatio * img.size().area() //! max keypoints = keypointsRatio * img.size().area()
double keypointsRatio; double keypointsRatio;
//! find keypoints and compute it's response if nonmaxSupression is true //! find keypoints and compute it's response if nonmaxSuppression is true
//! return count of detected keypoints //! return count of detected keypoints
int calcKeyPointsLocation(const GpuMat& image, const GpuMat& mask); int calcKeyPointsLocation(const GpuMat& image, const GpuMat& mask);
//! get final array of keypoints //! get final array of keypoints
//! performs nonmax supression if needed //! performs nonmax suppression if needed
//! return final count of keypoints //! return final count of keypoints
int getKeyPoints(GpuMat& keypoints); int getKeyPoints(GpuMat& keypoints);
@ -303,10 +303,10 @@ public:
//! returns the descriptor size in bytes //! returns the descriptor size in bytes
inline int descriptorSize() const { return kBytes; } inline int descriptorSize() const { return kBytes; }
inline void setFastParams(int threshold, bool nonmaxSupression = true) inline void setFastParams(int threshold, bool nonmaxSuppression = true)
{ {
fastDetector_.threshold = threshold; fastDetector_.threshold = threshold;
fastDetector_.nonmaxSupression = nonmaxSupression; fastDetector_.nonmaxSuppression = nonmaxSuppression;
} }
//! release temporary buffer's memory //! release temporary buffer's memory

@ -49,9 +49,9 @@ using namespace perf;
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// FAST // FAST
DEF_PARAM_TEST(Image_Threshold_NonMaxSupression, string, int, bool); DEF_PARAM_TEST(Image_Threshold_NonMaxSuppression, string, int, bool);
PERF_TEST_P(Image_Threshold_NonMaxSupression, FAST, PERF_TEST_P(Image_Threshold_NonMaxSuppression, FAST,
Combine(Values<string>("gpu/perf/aloe.png"), Combine(Values<string>("gpu/perf/aloe.png"),
Values(20), Values(20),
Bool())) Bool()))

@ -318,9 +318,9 @@ namespace cv { namespace cuda { namespace device
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// nonmaxSupression // nonmaxSuppression
__global__ void nonmaxSupression(const short2* kpLoc, int count, const PtrStepSzi scoreMat, short2* locFinal, float* responseFinal) __global__ void nonmaxSuppression(const short2* kpLoc, int count, const PtrStepSzi scoreMat, short2* locFinal, float* responseFinal)
{ {
#if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ >= 110) #if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ >= 110)
@ -356,7 +356,7 @@ namespace cv { namespace cuda { namespace device
#endif #endif
} }
int nonmaxSupression_gpu(const short2* kpLoc, int count, PtrStepSzi score, short2* loc, float* response) int nonmaxSuppression_gpu(const short2* kpLoc, int count, PtrStepSzi score, short2* loc, float* response)
{ {
void* counter_ptr; void* counter_ptr;
cudaSafeCall( cudaGetSymbolAddress(&counter_ptr, g_counter) ); cudaSafeCall( cudaGetSymbolAddress(&counter_ptr, g_counter) );
@ -368,7 +368,7 @@ namespace cv { namespace cuda { namespace device
cudaSafeCall( cudaMemset(counter_ptr, 0, sizeof(unsigned int)) ); cudaSafeCall( cudaMemset(counter_ptr, 0, sizeof(unsigned int)) );
nonmaxSupression<<<grid, block>>>(kpLoc, count, score, loc, response); nonmaxSuppression<<<grid, block>>>(kpLoc, count, score, loc, response);
cudaSafeCall( cudaGetLastError() ); cudaSafeCall( cudaGetLastError() );
cudaSafeCall( cudaDeviceSynchronize() ); cudaSafeCall( cudaDeviceSynchronize() );

@ -58,8 +58,8 @@ int cv::cuda::FAST_CUDA::getKeyPoints(GpuMat&) { throw_no_cuda(); return 0; }
#else /* !defined (HAVE_CUDA) */ #else /* !defined (HAVE_CUDA) */
cv::cuda::FAST_CUDA::FAST_CUDA(int _threshold, bool _nonmaxSupression, double _keypointsRatio) : cv::cuda::FAST_CUDA::FAST_CUDA(int _threshold, bool _nonmaxSuppression, double _keypointsRatio) :
nonmaxSupression(_nonmaxSupression), threshold(_threshold), keypointsRatio(_keypointsRatio), count_(0) nonmaxSuppression(_nonmaxSuppression), threshold(_threshold), keypointsRatio(_keypointsRatio), count_(0)
{ {
} }
@ -113,7 +113,7 @@ namespace cv { namespace cuda { namespace device
namespace fast namespace fast
{ {
int calcKeypoints_gpu(PtrStepSzb img, PtrStepSzb mask, short2* kpLoc, int maxKeypoints, PtrStepSzi score, int threshold); int calcKeypoints_gpu(PtrStepSzb img, PtrStepSzb mask, short2* kpLoc, int maxKeypoints, PtrStepSzi score, int threshold);
int nonmaxSupression_gpu(const short2* kpLoc, int count, PtrStepSzi score, short2* loc, float* response); int nonmaxSuppression_gpu(const short2* kpLoc, int count, PtrStepSzi score, short2* loc, float* response);
} }
}}} }}}
@ -128,13 +128,13 @@ int cv::cuda::FAST_CUDA::calcKeyPointsLocation(const GpuMat& img, const GpuMat&
ensureSizeIsEnough(1, maxKeypoints, CV_16SC2, kpLoc_); ensureSizeIsEnough(1, maxKeypoints, CV_16SC2, kpLoc_);
if (nonmaxSupression) if (nonmaxSuppression)
{ {
ensureSizeIsEnough(img.size(), CV_32SC1, score_); ensureSizeIsEnough(img.size(), CV_32SC1, score_);
score_.setTo(Scalar::all(0)); score_.setTo(Scalar::all(0));
} }
count_ = calcKeypoints_gpu(img, mask, kpLoc_.ptr<short2>(), maxKeypoints, nonmaxSupression ? score_ : PtrStepSzi(), threshold); count_ = calcKeypoints_gpu(img, mask, kpLoc_.ptr<short2>(), maxKeypoints, nonmaxSuppression ? score_ : PtrStepSzi(), threshold);
count_ = std::min(count_, maxKeypoints); count_ = std::min(count_, maxKeypoints);
return count_; return count_;
@ -149,8 +149,8 @@ int cv::cuda::FAST_CUDA::getKeyPoints(GpuMat& keypoints)
ensureSizeIsEnough(ROWS_COUNT, count_, CV_32FC1, keypoints); ensureSizeIsEnough(ROWS_COUNT, count_, CV_32FC1, keypoints);
if (nonmaxSupression) if (nonmaxSuppression)
return nonmaxSupression_gpu(kpLoc_.ptr<short2>(), count_, score_, keypoints.ptr<short2>(LOCATION_ROW), keypoints.ptr<float>(RESPONSE_ROW)); return nonmaxSuppression_gpu(kpLoc_.ptr<short2>(), count_, score_, keypoints.ptr<short2>(LOCATION_ROW), keypoints.ptr<float>(RESPONSE_ROW));
GpuMat locRow(1, count_, kpLoc_.type(), keypoints.ptr(0)); GpuMat locRow(1, count_, kpLoc_.type(), keypoints.ptr(0));
kpLoc_.colRange(0, count_).copyTo(locRow); kpLoc_.colRange(0, count_).copyTo(locRow);

@ -52,20 +52,20 @@ using namespace cvtest;
namespace namespace
{ {
IMPLEMENT_PARAM_CLASS(FAST_Threshold, int) IMPLEMENT_PARAM_CLASS(FAST_Threshold, int)
IMPLEMENT_PARAM_CLASS(FAST_NonmaxSupression, bool) IMPLEMENT_PARAM_CLASS(FAST_NonmaxSuppression, bool)
} }
PARAM_TEST_CASE(FAST, cv::cuda::DeviceInfo, FAST_Threshold, FAST_NonmaxSupression) PARAM_TEST_CASE(FAST, cv::cuda::DeviceInfo, FAST_Threshold, FAST_NonmaxSuppression)
{ {
cv::cuda::DeviceInfo devInfo; cv::cuda::DeviceInfo devInfo;
int threshold; int threshold;
bool nonmaxSupression; bool nonmaxSuppression;
virtual void SetUp() virtual void SetUp()
{ {
devInfo = GET_PARAM(0); devInfo = GET_PARAM(0);
threshold = GET_PARAM(1); threshold = GET_PARAM(1);
nonmaxSupression = GET_PARAM(2); nonmaxSuppression = GET_PARAM(2);
cv::cuda::setDevice(devInfo.deviceID()); cv::cuda::setDevice(devInfo.deviceID());
} }
@ -77,7 +77,7 @@ CUDA_TEST_P(FAST, Accuracy)
ASSERT_FALSE(image.empty()); ASSERT_FALSE(image.empty());
cv::cuda::FAST_CUDA fast(threshold); cv::cuda::FAST_CUDA fast(threshold);
fast.nonmaxSupression = nonmaxSupression; fast.nonmaxSuppression = nonmaxSuppression;
if (!supportFeature(devInfo, cv::cuda::GLOBAL_ATOMICS)) if (!supportFeature(devInfo, cv::cuda::GLOBAL_ATOMICS))
{ {
@ -97,7 +97,7 @@ CUDA_TEST_P(FAST, Accuracy)
fast(loadMat(image), cv::cuda::GpuMat(), keypoints); fast(loadMat(image), cv::cuda::GpuMat(), keypoints);
std::vector<cv::KeyPoint> keypoints_gold; std::vector<cv::KeyPoint> keypoints_gold;
cv::FAST(image, keypoints_gold, threshold, nonmaxSupression); cv::FAST(image, keypoints_gold, threshold, nonmaxSuppression);
ASSERT_KEYPOINTS_EQ(keypoints_gold, keypoints); ASSERT_KEYPOINTS_EQ(keypoints_gold, keypoints);
} }
@ -106,7 +106,7 @@ CUDA_TEST_P(FAST, Accuracy)
INSTANTIATE_TEST_CASE_P(CUDA_Features2D, FAST, testing::Combine( INSTANTIATE_TEST_CASE_P(CUDA_Features2D, FAST, testing::Combine(
ALL_DEVICES, ALL_DEVICES,
testing::Values(FAST_Threshold(25), FAST_Threshold(50)), testing::Values(FAST_Threshold(25), FAST_Threshold(50)),
testing::Values(FAST_NonmaxSupression(false), FAST_NonmaxSupression(true)))); testing::Values(FAST_NonmaxSuppression(false), FAST_NonmaxSuppression(true))));
///////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////
// ORB // ORB

@ -139,7 +139,7 @@ PERF_TEST_P(Image, HoughLinesP,
const float rho = 1.0f; const float rho = 1.0f;
const float theta = static_cast<float>(CV_PI / 180.0); const float theta = static_cast<float>(CV_PI / 180.0);
const int threshold = 100; const int threshold = 100;
const int minLineLenght = 50; const int minLineLength = 50;
const int maxLineGap = 5; const int maxLineGap = 5;
const cv::Mat image = cv::imread(fileName, cv::IMREAD_GRAYSCALE); const cv::Mat image = cv::imread(fileName, cv::IMREAD_GRAYSCALE);
@ -153,7 +153,7 @@ PERF_TEST_P(Image, HoughLinesP,
const cv::cuda::GpuMat d_mask(mask); const cv::cuda::GpuMat d_mask(mask);
cv::cuda::GpuMat d_lines; cv::cuda::GpuMat d_lines;
cv::Ptr<cv::cuda::HoughSegmentDetector> hough = cv::cuda::createHoughSegmentDetector(rho, theta, minLineLenght, maxLineGap); cv::Ptr<cv::cuda::HoughSegmentDetector> hough = cv::cuda::createHoughSegmentDetector(rho, theta, minLineLength, maxLineGap);
TEST_CYCLE() hough->detect(d_mask, d_lines); TEST_CYCLE() hough->detect(d_mask, d_lines);
@ -167,7 +167,7 @@ PERF_TEST_P(Image, HoughLinesP,
{ {
std::vector<cv::Vec4i> cpu_lines; std::vector<cv::Vec4i> cpu_lines;
TEST_CYCLE() cv::HoughLinesP(mask, cpu_lines, rho, theta, threshold, minLineLenght, maxLineGap); TEST_CYCLE() cv::HoughLinesP(mask, cpu_lines, rho, theta, threshold, minLineLength, maxLineGap);
SANITY_CHECK(cpu_lines); SANITY_CHECK(cpu_lines);
} }

@ -11,8 +11,8 @@ FAST
---- ----
Detects corners using the FAST algorithm Detects corners using the FAST algorithm
.. ocv:function:: void FAST( InputArray image, vector<KeyPoint>& keypoints, int threshold, bool nonmaxSupression=true ) .. ocv:function:: void FAST( InputArray image, vector<KeyPoint>& keypoints, int threshold, bool nonmaxSuppression=true )
.. ocv:function:: void FAST( InputArray image, vector<KeyPoint>& keypoints, int threshold, bool nonmaxSupression, int type ) .. ocv:function:: void FAST( InputArray image, vector<KeyPoint>& keypoints, int threshold, bool nonmaxSuppression, int type )
.. ocv:pyfunction:: cv2.FastFeatureDetector([, threshold[, nonmaxSuppression]]) -> <FastFeatureDetector object> .. ocv:pyfunction:: cv2.FastFeatureDetector([, threshold[, nonmaxSuppression]]) -> <FastFeatureDetector object>
.. ocv:pyfunction:: cv2.FastFeatureDetector(threshold, nonmaxSuppression, type) -> <FastFeatureDetector object> .. ocv:pyfunction:: cv2.FastFeatureDetector(threshold, nonmaxSuppression, type) -> <FastFeatureDetector object>
@ -25,7 +25,7 @@ Detects corners using the FAST algorithm
:param threshold: threshold on difference between intensity of the central pixel and pixels of a circle around this pixel. :param threshold: threshold on difference between intensity of the central pixel and pixels of a circle around this pixel.
:param nonmaxSupression: if true, non-maximum suppression is applied to detected corners (keypoints). :param nonmaxSuppression: if true, non-maximum suppression is applied to detected corners (keypoints).
:param type: one of the three neighborhoods as defined in the paper: ``FastFeatureDetector::TYPE_9_16``, ``FastFeatureDetector::TYPE_7_12``, ``FastFeatureDetector::TYPE_5_8`` :param type: one of the three neighborhoods as defined in the paper: ``FastFeatureDetector::TYPE_9_16``, ``FastFeatureDetector::TYPE_7_12``, ``FastFeatureDetector::TYPE_5_8``

@ -517,10 +517,10 @@ protected:
//! detects corners using FAST algorithm by E. Rosten //! detects corners using FAST algorithm by E. Rosten
CV_EXPORTS void FAST( InputArray image, CV_OUT std::vector<KeyPoint>& keypoints, CV_EXPORTS void FAST( InputArray image, CV_OUT std::vector<KeyPoint>& keypoints,
int threshold, bool nonmaxSupression=true ); int threshold, bool nonmaxSuppression=true );
CV_EXPORTS void FAST( InputArray image, CV_OUT std::vector<KeyPoint>& keypoints, CV_EXPORTS void FAST( InputArray image, CV_OUT std::vector<KeyPoint>& keypoints,
int threshold, bool nonmaxSupression, int type ); int threshold, bool nonmaxSuppression, int type );
class CV_EXPORTS_W FastFeatureDetector : public FeatureDetector class CV_EXPORTS_W FastFeatureDetector : public FeatureDetector
{ {

@ -127,7 +127,7 @@ public:
Point2f center; Point2f center;
Scalar ellipse; // 3 elements a, b, c: ax^2+2bxy+cy^2=1 Scalar ellipse; // 3 elements a, b, c: ax^2+2bxy+cy^2=1
Size_<float> axes; // half lenght of elipse axes Size_<float> axes; // half length of ellipse axes
Size_<float> boundingBox; // half sizes of bounding box which sides are parallel to the coordinate axes Size_<float> boundingBox; // half sizes of bounding box which sides are parallel to the coordinate axes
}; };

@ -321,7 +321,6 @@ typedef struct CvCaptureCAM_V4L
struct v4l2_control control; struct v4l2_control control;
enum v4l2_buf_type type; enum v4l2_buf_type type;
struct v4l2_queryctrl queryctrl; struct v4l2_queryctrl queryctrl;
struct v4l2_querymenu querymenu;
/* V4L2 control variables */ /* V4L2 control variables */
v4l2_ctrl_range** v4l2_ctrl_ranges; v4l2_ctrl_range** v4l2_ctrl_ranges;
@ -491,25 +490,6 @@ static int try_init_v4l2(CvCaptureCAM_V4L* capture, char *deviceName)
} }
static void v4l2_scan_controls_enumerate_menu(CvCaptureCAM_V4L* capture)
{
// printf (" Menu items:\n");
CLEAR (capture->querymenu);
capture->querymenu.id = capture->queryctrl.id;
for (capture->querymenu.index = capture->queryctrl.minimum;
(int)capture->querymenu.index <= capture->queryctrl.maximum;
capture->querymenu.index++)
{
if (0 == xioctl (capture->deviceHandle, VIDIOC_QUERYMENU,
&capture->querymenu))
{
//printf (" %s\n", capture->querymenu.name);
} else {
perror ("VIDIOC_QUERYMENU");
}
}
}
static void v4l2_free_ranges(CvCaptureCAM_V4L* capture) { static void v4l2_free_ranges(CvCaptureCAM_V4L* capture) {
int i; int i;
if (capture->v4l2_ctrl_ranges != NULL) { if (capture->v4l2_ctrl_ranges != NULL) {
@ -590,9 +570,6 @@ static void v4l2_scan_controls(CvCaptureCAM_V4L* capture) {
if(capture->queryctrl.flags & V4L2_CTRL_FLAG_DISABLED) { if(capture->queryctrl.flags & V4L2_CTRL_FLAG_DISABLED) {
continue; continue;
} }
if (capture->queryctrl.type == V4L2_CTRL_TYPE_MENU) {
v4l2_scan_controls_enumerate_menu(capture);
}
if(capture->queryctrl.type != V4L2_CTRL_TYPE_INTEGER && if(capture->queryctrl.type != V4L2_CTRL_TYPE_INTEGER &&
capture->queryctrl.type != V4L2_CTRL_TYPE_BOOLEAN && capture->queryctrl.type != V4L2_CTRL_TYPE_BOOLEAN &&
capture->queryctrl.type != V4L2_CTRL_TYPE_MENU) { capture->queryctrl.type != V4L2_CTRL_TYPE_MENU) {
@ -613,9 +590,6 @@ static void v4l2_scan_controls(CvCaptureCAM_V4L* capture) {
if(capture->queryctrl.flags & V4L2_CTRL_FLAG_DISABLED) { if(capture->queryctrl.flags & V4L2_CTRL_FLAG_DISABLED) {
continue; continue;
} }
if (capture->queryctrl.type == V4L2_CTRL_TYPE_MENU) {
v4l2_scan_controls_enumerate_menu(capture);
}
if(capture->queryctrl.type != V4L2_CTRL_TYPE_INTEGER && if(capture->queryctrl.type != V4L2_CTRL_TYPE_INTEGER &&
capture->queryctrl.type != V4L2_CTRL_TYPE_BOOLEAN && capture->queryctrl.type != V4L2_CTRL_TYPE_BOOLEAN &&
capture->queryctrl.type != V4L2_CTRL_TYPE_MENU) { capture->queryctrl.type != V4L2_CTRL_TYPE_MENU) {
@ -637,9 +611,6 @@ static void v4l2_scan_controls(CvCaptureCAM_V4L* capture) {
continue; continue;
} }
if (capture->queryctrl.type == V4L2_CTRL_TYPE_MENU) {
v4l2_scan_controls_enumerate_menu(capture);
}
if(capture->queryctrl.type != V4L2_CTRL_TYPE_INTEGER && if(capture->queryctrl.type != V4L2_CTRL_TYPE_INTEGER &&
capture->queryctrl.type != V4L2_CTRL_TYPE_BOOLEAN && capture->queryctrl.type != V4L2_CTRL_TYPE_BOOLEAN &&

@ -325,7 +325,6 @@ typedef struct CvCaptureCAM_V4L
struct v4l2_control control; struct v4l2_control control;
enum v4l2_buf_type type; enum v4l2_buf_type type;
struct v4l2_queryctrl queryctrl; struct v4l2_queryctrl queryctrl;
struct v4l2_querymenu querymenu;
struct timeval timestamp; struct timeval timestamp;
@ -641,24 +640,6 @@ static int autosetup_capture_mode_v4l(CvCaptureCAM_V4L* capture)
#ifdef HAVE_CAMV4L2 #ifdef HAVE_CAMV4L2
static void v4l2_scan_controls_enumerate_menu(CvCaptureCAM_V4L* capture)
{
// printf (" Menu items:\n");
CLEAR (capture->querymenu);
capture->querymenu.id = capture->queryctrl.id;
for (capture->querymenu.index = capture->queryctrl.minimum;
(int)capture->querymenu.index <= capture->queryctrl.maximum;
capture->querymenu.index++)
{
if (0 == ioctl (capture->deviceHandle, VIDIOC_QUERYMENU,
&capture->querymenu))
{
// printf (" %s\n", capture->querymenu.name);
} else {
perror ("VIDIOC_QUERYMENU");
}
}
}
static void v4l2_scan_controls(CvCaptureCAM_V4L* capture) static void v4l2_scan_controls(CvCaptureCAM_V4L* capture)
{ {
@ -723,8 +704,6 @@ static void v4l2_scan_controls(CvCaptureCAM_V4L* capture)
capture->v4l2_exposure_max = capture->queryctrl.maximum; capture->v4l2_exposure_max = capture->queryctrl.maximum;
} }
if (capture->queryctrl.type == V4L2_CTRL_TYPE_MENU)
v4l2_scan_controls_enumerate_menu(capture);
} else { } else {
@ -793,9 +772,6 @@ static void v4l2_scan_controls(CvCaptureCAM_V4L* capture)
capture->v4l2_exposure_max = capture->queryctrl.maximum; capture->v4l2_exposure_max = capture->queryctrl.maximum;
} }
if (capture->queryctrl.type == V4L2_CTRL_TYPE_MENU)
v4l2_scan_controls_enumerate_menu(capture);
} else { } else {
if (errno == EINVAL) if (errno == EINVAL)

@ -1536,7 +1536,7 @@ CvWindow::CvWindow(QString name, int arg2)
setWindowTitle(name); setWindowTitle(name);
setObjectName(name); setObjectName(name);
setFocus( Qt::PopupFocusReason ); //#1695 arrow keys are not recieved without the explicit focus setFocus( Qt::PopupFocusReason ); //#1695 arrow keys are not received without the explicit focus
resize(400, 300); resize(400, 300);
setMinimumSize(1, 1); setMinimumSize(1, 1);

@ -569,7 +569,7 @@ static int icvCreateTrackbar (const char* trackbar_name,
//pad size maxvalue in pixel //pad size maxvalue in pixel
Point qdSize; Point qdSize;
char valueinchar[strlen(trackbar_name)+1 +1 +1+nbDigit+1];//lenght+\n +space +(+nbDigit+) char valueinchar[strlen(trackbar_name)+1 +1 +1+nbDigit+1];//length+\n +space +(+nbDigit+)
sprintf(valueinchar, "%s (%d)",trackbar_name, trackbar->maxval); sprintf(valueinchar, "%s (%d)",trackbar_name, trackbar->maxval);
SInt16 baseline; SInt16 baseline;
CFStringRef text = CFStringCreateWithCString(NULL,valueinchar,kCFStringEncodingASCII); CFStringRef text = CFStringCreateWithCString(NULL,valueinchar,kCFStringEncodingASCII);

@ -97,7 +97,7 @@ Harris corner detector.
.. ocv:pyfunction:: cv2.cornerHarris(src, blockSize, ksize, k[, dst[, borderType]]) -> dst .. ocv:pyfunction:: cv2.cornerHarris(src, blockSize, ksize, k[, dst[, borderType]]) -> dst
.. ocv:cfunction:: void cvCornerHarris( const CvArr* image, CvArr* harris_responce, int block_size, int aperture_size=3, double k=0.04 ) .. ocv:cfunction:: void cvCornerHarris( const CvArr* image, CvArr* harris_response, int block_size, int aperture_size=3, double k=0.04 )
:param src: Input single-channel 8-bit or floating-point image. :param src: Input single-channel 8-bit or floating-point image.

@ -303,7 +303,7 @@ CVAPI(int) cvFindContours( CvArr* image, CvMemStorage* storage, CvSeq** first_c
int method CV_DEFAULT(CV_CHAIN_APPROX_SIMPLE), int method CV_DEFAULT(CV_CHAIN_APPROX_SIMPLE),
CvPoint offset CV_DEFAULT(cvPoint(0,0))); CvPoint offset CV_DEFAULT(cvPoint(0,0)));
/* Initalizes contour retrieving process. /* Initializes contour retrieving process.
Calls cvStartFindContours. Calls cvStartFindContours.
Calls cvFindNextContour until null pointer is returned Calls cvFindNextContour until null pointer is returned
or some other condition becomes true. or some other condition becomes true.
@ -333,7 +333,7 @@ CVAPI(CvSeq*) cvApproxChains( CvSeq* src_seq, CvMemStorage* storage,
int minimal_perimeter CV_DEFAULT(0), int minimal_perimeter CV_DEFAULT(0),
int recursive CV_DEFAULT(0)); int recursive CV_DEFAULT(0));
/* Initalizes Freeman chain reader. /* Initializes Freeman chain reader.
The reader is used to iteratively get coordinates of all the chain points. The reader is used to iteratively get coordinates of all the chain points.
If the Freeman codes should be read as is, a simple sequence reader should be used */ If the Freeman codes should be read as is, a simple sequence reader should be used */
CVAPI(void) cvStartReadChainPoints( CvChain* chain, CvChainPtReader* reader ); CVAPI(void) cvStartReadChainPoints( CvChain* chain, CvChainPtReader* reader );
@ -572,7 +572,7 @@ CVAPI(void) cvCornerMinEigenVal( const CvArr* image, CvArr* eigenval,
/* Harris corner detector: /* Harris corner detector:
Calculates det(M) - k*(trace(M)^2), where M is 2x2 gradient covariation matrix for each pixel */ Calculates det(M) - k*(trace(M)^2), where M is 2x2 gradient covariation matrix for each pixel */
CVAPI(void) cvCornerHarris( const CvArr* image, CvArr* harris_responce, CVAPI(void) cvCornerHarris( const CvArr* image, CvArr* harris_response,
int block_size, int aperture_size CV_DEFAULT(3), int block_size, int aperture_size CV_DEFAULT(3),
double k CV_DEFAULT(0.04) ); double k CV_DEFAULT(0.04) );

@ -220,7 +220,7 @@ CvSeq* icvApproximateChainTC89( CvChain* chain, int header_size,
current = temp.next; current = temp.next;
/* Pass 2. /* Pass 2.
Performs non-maxima supression */ Performs non-maxima suppression */
do do
{ {
int k2 = current->k >> 1; int k2 = current->k >> 1;

@ -325,7 +325,7 @@ void cv::Canny( InputArray _src, OutputArray _dst,
#define CANNY_PUSH(d) *(d) = uchar(2), *stack_top++ = (d) #define CANNY_PUSH(d) *(d) = uchar(2), *stack_top++ = (d)
#define CANNY_POP(d) (d) = *--stack_top #define CANNY_POP(d) (d) = *--stack_top
// calculate magnitude and angle of gradient, perform non-maxima supression. // calculate magnitude and angle of gradient, perform non-maxima suppression.
// fill the map with one of the following values: // fill the map with one of the following values:
// 0 - the pixel might belong to an edge // 0 - the pixel might belong to an edge
// 1 - the pixel can not belong to an edge // 1 - the pixel can not belong to an edge

@ -376,7 +376,7 @@ public:
// processing time (in this case there should be possibility to interrupt such a function // processing time (in this case there should be possibility to interrupt such a function
FAIL_HANG=-13, FAIL_HANG=-13,
// unexpected responce on passing bad arguments to the tested function // unexpected response on passing bad arguments to the tested function
// (the function crashed, proceed succesfully (while it should not), or returned // (the function crashed, proceed succesfully (while it should not), or returned
// error code that is different from what is expected) // error code that is different from what is expected)
FAIL_BAD_ARG_CHECK=-14, FAIL_BAD_ARG_CHECK=-14,

@ -44,6 +44,7 @@ if __name__ == "__main__":
parser.add_option("", "--match", dest="match", default=None) parser.add_option("", "--match", dest="match", default=None)
parser.add_option("", "--match-replace", dest="match_replace", default="") parser.add_option("", "--match-replace", dest="match_replace", default="")
parser.add_option("", "--regressions-only", dest="regressionsOnly", default=None, metavar="X-FACTOR", help="show only tests with performance regressions not") parser.add_option("", "--regressions-only", dest="regressionsOnly", default=None, metavar="X-FACTOR", help="show only tests with performance regressions not")
parser.add_option("", "--intersect-logs", dest="intersect_logs", default=False, help="show only tests present in all log files")
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
options.generateHtml = detectHtmlOutputType(options.format) options.generateHtml = detectHtmlOutputType(options.format)
@ -162,6 +163,10 @@ if __name__ == "__main__":
for i in range(setsCount): for i in range(setsCount):
case = cases[i] case = cases[i]
if case is None: if case is None:
if options.intersect_logs:
needNewRow = False
break
tbl.newCell(str(i), "-") tbl.newCell(str(i), "-")
if options.calc_relatives and i > 0: if options.calc_relatives and i > 0:
tbl.newCell(str(i) + "%", "-") tbl.newCell(str(i) + "%", "-")

@ -398,7 +398,7 @@ This 3D Widget defines a cone. ::
{ {
public: public:
//! create default cone, oriented along x-axis with center of its base located at origin //! create default cone, oriented along x-axis with center of its base located at origin
WCone(double lenght, double radius, int resolution = 6.0, const Color &color = Color::white()); WCone(double length, double radius, int resolution = 6.0, const Color &color = Color::white());
//! creates repositioned cone //! creates repositioned cone
WCone(double radius, const Point3d& center, const Point3d& tip, int resolution = 6.0, const Color &color = Color::white()); WCone(double radius, const Point3d& center, const Point3d& tip, int resolution = 6.0, const Color &color = Color::white());

@ -214,12 +214,12 @@ public class ManagerActivity extends Activity
} }
}); });
mPackageChangeReciever = new BroadcastReceiver() { mPackageChangeReceiver = new BroadcastReceiver() {
@Override @Override
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
Log.d("OpenCVManager/Reciever", "Bradcast message " + intent.getAction() + " reciever"); Log.d("OpenCVManager/Receiver", "Broadcast message " + intent.getAction() + " receiver");
Log.d("OpenCVManager/Reciever", "Filling package list on broadcast message"); Log.d("OpenCVManager/Receiver", "Filling package list on broadcast message");
if (!bindService(new Intent("org.opencv.engine.BIND"), new OpenCVEngineServiceConnection(), Context.BIND_AUTO_CREATE)) if (!bindService(new Intent("org.opencv.engine.BIND"), new OpenCVEngineServiceConnection(), Context.BIND_AUTO_CREATE))
{ {
TextView EngineVersionView = (TextView)findViewById(R.id.EngineVersionValue); TextView EngineVersionView = (TextView)findViewById(R.id.EngineVersionValue);
@ -235,14 +235,14 @@ public class ManagerActivity extends Activity
filter.addAction(Intent.ACTION_PACKAGE_REMOVED); filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
filter.addAction(Intent.ACTION_PACKAGE_REPLACED); filter.addAction(Intent.ACTION_PACKAGE_REPLACED);
registerReceiver(mPackageChangeReciever, filter); registerReceiver(mPackageChangeReceiver, filter);
} }
@Override @Override
protected void onDestroy() { protected void onDestroy() {
super.onDestroy(); super.onDestroy();
if (mPackageChangeReciever != null) if (mPackageChangeReceiver != null)
unregisterReceiver(mPackageChangeReciever); unregisterReceiver(mPackageChangeReceiver);
} }
@Override @Override
@ -273,7 +273,7 @@ public class ManagerActivity extends Activity
protected int ManagerApiLevel = 0; protected int ManagerApiLevel = 0;
protected String ManagerVersion; protected String ManagerVersion;
protected BroadcastReceiver mPackageChangeReciever = null; protected BroadcastReceiver mPackageChangeReceiver = null;
protected class OpenCVEngineServiceConnection implements ServiceConnection protected class OpenCVEngineServiceConnection implements ServiceConnection
{ {

@ -10,7 +10,7 @@ static void help()
printf("\nShow off image morphology: erosion, dialation, open and close\n" printf("\nShow off image morphology: erosion, dialation, open and close\n"
"Call:\n morphology2 [image]\n" "Call:\n morphology2 [image]\n"
"This program also shows use of rect, elipse and cross kernels\n\n"); "This program also shows use of rect, ellipse and cross kernels\n\n");
printf( "Hot keys: \n" printf( "Hot keys: \n"
"\tESC - quit the program\n" "\tESC - quit the program\n"
"\tr - use rectangle structuring element\n" "\tr - use rectangle structuring element\n"

@ -113,7 +113,7 @@ void App::help()
cout << "Show off image morphology: erosion, dialation, open and close \n"; cout << "Show off image morphology: erosion, dialation, open and close \n";
cout << "Call: \n"; cout << "Call: \n";
cout << " gpu-example-morphology [image] \n"; cout << " gpu-example-morphology [image] \n";
cout << "This program also shows use of rect, elipse and cross kernels \n" << endl; cout << "This program also shows use of rect, ellipse and cross kernels \n" << endl;
cout << "Hot keys: \n"; cout << "Hot keys: \n";
cout << "\tESC - quit the program \n"; cout << "\tESC - quit the program \n";

Loading…
Cancel
Save