Permalink
Browse files

Merge pull request #785 from taka-no-me:split_c_cpp2

  • Loading branch information...
2 parents f03c752 + dd74a85 commit 913e6833d5e28d0c308bb8e8ffdc718dd42e4cfc @taka-no-me taka-no-me committed with opencv-pushbot Apr 9, 2013
Showing with 2,146 additions and 1,745 deletions.
  1. +1 −0 3rdparty/ffmpeg/ffmpeg_version.cmake
  2. +1 −1 apps/haartraining/CMakeLists.txt
  3. +1 −1 apps/traincascade/CMakeLists.txt
  4. +2 −1 apps/traincascade/imagestorage.cpp
  5. +3 −3 cmake/OpenCVFindLibsVideo.cmake
  6. +2 −1 include/opencv/cv.h
  7. +3 −0 include/opencv/cv.hpp
  8. +2 −1 include/opencv/cvaux.h
  9. +0 −1 include/opencv/highgui.h
  10. +7 −8 modules/calib3d/test/test_chesscorners_timing.cpp
  11. +1 −2 modules/contrib/src/chamfermatching.cpp
  12. +17 −12 modules/core/doc/drawing_functions.rst
  13. +27 −16 modules/core/include/opencv2/core.hpp
  14. +1 −2 modules/features2d/include/opencv2/features2d.hpp
  15. +0 −5 modules/flann/include/opencv2/flann.hpp
  16. +0 −4 modules/flann/include/opencv2/flann/miniflann.hpp
  17. +3 −3 modules/flann/test/test_lshtable_badarg.cpp
  18. +9 −4 modules/gpu/perf/perf_imgproc.cpp
  19. +1 −0 modules/highgui/CMakeLists.txt
  20. +3 −3 modules/highgui/doc/qt_new_functions.rst
  21. +3 −3 modules/highgui/doc/reading_and_writing_images_and_video.rst
  22. +399 −99 modules/highgui/include/opencv2/highgui.hpp
  23. +0 −3 modules/highgui/include/opencv2/highgui/highgui_c.h
  24. +1 −1 modules/highgui/perf/perf_output.cpp
  25. +9 −4 modules/highgui/src/cap.cpp
  26. +1 −1 modules/highgui/src/cap_ffmpeg.cpp
  27. +5 −1 modules/highgui/src/ffmpeg_codecs.hpp
  28. +0 −37 modules/highgui/src/precomp.hpp
  29. +8 −7 modules/highgui/src/window.cpp
  30. +5 −5 modules/highgui/test/test_ffmpeg.cpp
  31. +2 −2 modules/highgui/test/test_framecount.cpp
  32. +8 −8 modules/highgui/test/test_grfmt.cpp
  33. +2 −2 modules/highgui/test/test_gui.cpp
  34. +5 −5 modules/highgui/test/test_positioning.cpp
  35. +1 −0 modules/highgui/test/test_precomp.hpp
  36. +12 −12 modules/highgui/test/test_video_io.cpp
  37. +5 −5 modules/highgui/test/test_video_pos.cpp
  38. +1 −1 modules/imgproc/doc/filtering.rst
  39. +779 −689 modules/imgproc/include/opencv2/imgproc.hpp
  40. +22 −0 modules/imgproc/include/opencv2/imgproc/types_c.h
  41. +142 −142 modules/imgproc/perf/perf_cvt_color.cpp
  42. +7 −7 modules/imgproc/perf/perf_matchTemplate.cpp
  43. +1 −1 modules/imgproc/src/corner.cpp
  44. +0 −4 modules/imgproc/src/histogram.cpp
  45. +0 −19 modules/imgproc/src/moments.cpp
  46. +0 −3 modules/imgproc/src/morph.cpp
  47. +8 −8 modules/imgproc/test/test_color.cpp
  48. +2 −2 modules/imgproc/test/test_grabcut.cpp
  49. +2 −2 modules/imgproc/test/test_precomp.hpp
  50. +2 −3 modules/java/generator/src/cpp/VideoCapture.cpp
  51. +6 −6 modules/java/generator/src/cpp/utils.cpp
  52. +0 −1 modules/legacy/include/opencv2/legacy.hpp
  53. +1 −1 modules/legacy/include/opencv2/legacy/legacy.hpp
  54. +5 −6 modules/legacy/src/oneway.cpp
  55. +2 −2 modules/nonfree/src/sift.cpp
  56. +8 −10 modules/nonfree/src/surf.cpp
  57. +5 −5 modules/nonfree/test/test_detectors.cpp
  58. +6 −6 modules/nonfree/test/test_rotation_and_scale_invariance.cpp
  59. +1 −1 modules/objdetect/doc/cascade_classification.rst
  60. +3 −3 modules/objdetect/src/latentsvm.cpp
  61. +2 −2 modules/objdetect/test/test_cascadeandhog.cpp
  62. +4 −5 modules/objdetect/test/test_latentsvmdetector.cpp
  63. +2 −2 modules/ocl/include/opencv2/ocl/private/util.hpp
  64. +1 −1 modules/ocl/perf/perf_canny.cpp
  65. +5 −5 modules/ocl/perf/perf_color.cpp
  66. +1 −1 modules/ocl/perf/perf_haar.cpp
  67. +10 −10 modules/ocl/perf/perf_match_template.cpp
  68. +5 −2 modules/ocl/test/test_color.cpp
  69. +1 −1 modules/ocl/test/test_haar.cpp
  70. +5 −5 modules/ocl/test/test_hog.cpp
  71. +1 −1 modules/ocl/test/utility.cpp
  72. +3 −9 modules/photo/include/opencv2/photo.hpp
  73. +12 −12 modules/photo/src/denoising.cpp
  74. +10 −3 modules/photo/src/inpaint.cpp
  75. +8 −8 modules/photo/test/test_denoising.cpp
  76. +3 −3 modules/photo/test/test_inpaint.cpp
  77. +3 −0 modules/python/src2/cv2.cpp
  78. +1 −0 modules/python/src2/cv2.cv.hpp
  79. +1 −0 modules/python/src2/gen2.py
  80. +4 −4 modules/stitching/include/opencv2/stitching/detail/motion_estimators.hpp
  81. +1 −1 modules/stitching/src/blenders.cpp
  82. +4 −4 modules/stitching/src/matchers.cpp
  83. +6 −6 modules/stitching/src/seam_finders.cpp
  84. +1 −1 modules/ts/src/gpu_test.cpp
  85. +3 −1 modules/video/include/opencv2/video/tracking.hpp
  86. +2 −2 modules/video/test/test_camshift.cpp
  87. +10 −10 modules/video/test/test_optflowpyrlk.cpp
  88. +4 −4 modules/videostab/src/frame_source.cpp
  89. +2 −2 samples/android/hello-android/main.cpp
  90. +1 −1 samples/c/adaptiveskindetector.cpp
  91. +1 −1 samples/c/bgfg_codebook.cpp
  92. +1 −1 samples/c/blobtrack_sample.cpp
  93. +1 −1 samples/c/convert_cascade.c
  94. +2 −2 samples/c/delaunay.c
  95. +6 −4 samples/c/facedetect.cpp
  96. +1 −1 samples/c/fback_c.c
  97. +1 −1 samples/c/find_obj.cpp
  98. +2 −2 samples/c/find_obj_calonder.cpp
  99. +5 −5 samples/c/find_obj_ferns.cpp
  100. +2 −2 samples/c/latentsvmdetect.cpp
  101. +1 −1 samples/c/morphology.c
  102. +1 −1 samples/c/motempl.c
  103. +2 −2 samples/c/one_way_sample.cpp
  104. +1 −3 samples/c/polar_transforms.c
  105. +2 −3 samples/c/pyramid_segmentation.c
  106. +6 −4 samples/c/smiledetect.cpp
  107. +2 −2 samples/cpp/3calibration.cpp
  108. +25 −20 samples/cpp/Qt_sample/main.cpp
  109. +4 −4 samples/cpp/bgfg_segm.cpp
  110. +2 −2 samples/cpp/brief_match_test.cpp
  111. +1 −1 samples/cpp/build3dmodel.cpp
  112. +1 −1 samples/cpp/calibration.cpp
  113. +1 −1 samples/cpp/calibration_artificial.cpp
  114. +2 −2 samples/cpp/camshiftdemo.cpp
  115. +1 −1 samples/cpp/chamfer.cpp
  116. +1 −1 samples/cpp/contours2.cpp
  117. +2 −2 samples/cpp/convexhull.cpp
  118. +1 −1 samples/cpp/dbt_face_detection.cpp
  119. +8 −8 samples/cpp/delaunay2.cpp
  120. +1 −1 samples/cpp/demhist.cpp
  121. +1 −1 samples/cpp/detection_based_tracker_sample.cpp
  122. +2 −2 samples/cpp/dft.cpp
  123. +22 −22 samples/cpp/distrans.cpp
  124. +3 −3 samples/cpp/drawing.cpp
  125. +1 −1 samples/cpp/edge.cpp
  126. +6 −6 samples/cpp/ffilldemo.cpp
  127. +4 −4 samples/cpp/fitellipse.cpp
  128. +3 −3 samples/cpp/freak_demo.cpp
  129. +2 −2 samples/cpp/generic_descriptor_match.cpp
  130. +15 −15 samples/cpp/grabcut.cpp
  131. +4 −4 samples/cpp/houghcircles.cpp
  132. +2 −2 samples/cpp/houghlines.cpp
  133. +5 −5 samples/cpp/hybridtrackingsample.cpp
  134. +11 −7 samples/cpp/image.cpp
  135. +4 −4 samples/cpp/image_alignment.cpp
  136. +4 −4 samples/cpp/inpaint.cpp
  137. +3 −3 samples/cpp/kmeans.cpp
  138. +10 −8 samples/cpp/laplace.cpp
  139. +8 −8 samples/cpp/linemod.cpp
  140. +1 −1 samples/cpp/lkdemo.cpp
  141. +2 −2 samples/cpp/matcher_simple.cpp
  142. +2 −2 samples/cpp/matching_to_many_images.cpp
  143. +1 −1 samples/cpp/meanshift_segmentation.cpp
  144. +4 −4 samples/cpp/minarea.cpp
  145. +3 −3 samples/cpp/morphology2.cpp
  146. +24 −24 samples/cpp/openni_capture.cpp
  147. +6 −6 samples/cpp/pca.cpp
  148. +3 −3 samples/cpp/phase_corr.cpp
  149. +3 −3 samples/cpp/points_classifier.cpp
  150. +2 −2 samples/cpp/rgbdodometry.cpp
  151. +2 −2 samples/cpp/segment_objects.cpp
  152. +5 −5 samples/cpp/select3dobj.cpp
  153. +2 −2 samples/cpp/squares.cpp
  154. +9 −9 samples/cpp/starter_imagelist.cpp
  155. +1 −1 samples/cpp/starter_video.cpp
  156. +4 −4 samples/cpp/stereo_calib.cpp
  157. +10 −10 samples/cpp/tutorial_code/HighGUI/video-input-psnr-ssim/video-input-psnr-ssim.cpp
  158. +6 −6 samples/cpp/tutorial_code/HighGUI/video-write/video-write.cpp
  159. +3 −3 samples/cpp/tutorial_code/Histograms_Matching/EqualizeHist_Demo.cpp
  160. +3 −3 samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp
  161. +2 −2 samples/cpp/tutorial_code/Histograms_Matching/calcBackProject_Demo1.cpp
  162. +3 −3 samples/cpp/tutorial_code/Histograms_Matching/calcBackProject_Demo2.cpp
  163. +1 −1 samples/cpp/tutorial_code/Histograms_Matching/calcHist_Demo.cpp
  164. +3 −3 samples/cpp/tutorial_code/Histograms_Matching/compareHist_Demo.cpp
  165. +3 −3 samples/cpp/tutorial_code/ImgProc/Morphology_1.cpp
  166. +1 −1 samples/cpp/tutorial_code/ImgProc/Morphology_2.cpp
  167. +1 −1 samples/cpp/tutorial_code/ImgProc/Pyramids.cpp
  168. +2 −2 samples/cpp/tutorial_code/ImgProc/Smoothing.cpp
  169. +2 −2 samples/cpp/tutorial_code/ImgProc/Threshold.cpp
  170. +2 −2 samples/cpp/tutorial_code/ImgTrans/CannyDetector_Demo.cpp
  171. +3 −3 samples/cpp/tutorial_code/ImgTrans/Geometric_Transforms_Demo.cpp
  172. +3 −3 samples/cpp/tutorial_code/ImgTrans/HoughCircle_Demo.cpp
  173. +7 −7 samples/cpp/tutorial_code/ImgTrans/HoughLines_Demo.cpp
  174. +2 −2 samples/cpp/tutorial_code/ImgTrans/Laplace_Demo.cpp
  175. +2 −2 samples/cpp/tutorial_code/ImgTrans/Remap_Demo.cpp
  176. +2 −2 samples/cpp/tutorial_code/ImgTrans/Sobel_Demo.cpp
  177. +1 −1 samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp
  178. +1 −1 samples/cpp/tutorial_code/ImgTrans/filter2D_demo.cpp
  179. +4 −4 samples/cpp/tutorial_code/ShapeDescriptors/findContours_demo.cpp
  180. +4 −4 samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo1.cpp
  181. +4 −4 samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo2.cpp
  182. +4 −4 samples/cpp/tutorial_code/ShapeDescriptors/hull_demo.cpp
  183. +4 −4 samples/cpp/tutorial_code/ShapeDescriptors/moments_demo.cpp
  184. +2 −2 samples/cpp/tutorial_code/ShapeDescriptors/pointPolygonTest_demo.cpp
  185. +3 −3 samples/cpp/tutorial_code/TrackingMotion/cornerDetector_Demo.cpp
  186. +3 −3 samples/cpp/tutorial_code/TrackingMotion/cornerHarris_Demo.cpp
  187. +4 −4 samples/cpp/tutorial_code/TrackingMotion/cornerSubPix_Demo.cpp
  188. +3 −3 samples/cpp/tutorial_code/TrackingMotion/goodFeaturesToTrack_Demo.cpp
  189. +2 −2 samples/cpp/tutorial_code/calib3d/camera_calibration/camera_calibration.cpp
  190. +3 −3 samples/cpp/tutorial_code/calib3d/stereoBM/SBM_Sample.cpp
  191. +2 −2 samples/cpp/tutorial_code/core/Matrix/Drawing_1.cpp
  192. +2 −2 samples/cpp/tutorial_code/core/Matrix/Drawing_2.cpp
  193. +2 −2 samples/cpp/tutorial_code/core/discrete_fourier_transform/discrete_fourier_transform.cpp
  194. +2 −2 samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp
  195. +7 −3 samples/cpp/tutorial_code/core/interoperability_with_OpenCV_1/interoperability_with_OpenCV_1.cpp
  196. +6 −6 samples/cpp/tutorial_code/core/mat_mask_operations/mat_mask_operations.cpp
  197. +2 −2 samples/cpp/tutorial_code/features2D/SURF_FlannMatcher.cpp
  198. +2 −2 samples/cpp/tutorial_code/features2D/SURF_Homography.cpp
  199. +2 −2 samples/cpp/tutorial_code/features2D/SURF_descriptor.cpp
  200. +2 −2 samples/cpp/tutorial_code/features2D/SURF_detector.cpp
  201. +5 −5 samples/cpp/tutorial_code/introduction/display_image/display_image.cpp
  202. +10 −10 samples/cpp/tutorial_code/introduction/windows_visual_studio_Opencv/Test.cpp
  203. +3 −1 samples/cpp/tutorial_code/objectDetection/objectDetection.cpp
  204. +3 −1 samples/cpp/tutorial_code/objectDetection/objectDetection2.cpp
  205. +2 −2 samples/cpp/video_dmtx.cpp
  206. +1 −1 samples/cpp/video_homography.cpp
  207. +1 −1 samples/cpp/videostab.cpp
  208. +6 −6 samples/cpp/watershed.cpp
  209. +2 −2 samples/gpu/cascadeclassifier.cpp
  210. +3 −3 samples/gpu/generalized_hough.cpp
  211. +5 −5 samples/gpu/hog.cpp
  212. +1 −1 samples/gpu/houghlines.cpp
  213. +4 −4 samples/gpu/morphology.cpp
  214. +4 −4 samples/gpu/performance/tests.cpp
  215. +6 −6 samples/gpu/stereo_match.cpp
  216. +1 −1 samples/gpu/super_resolution.cpp
  217. +2 −2 samples/gpu/surf_keypoint_matcher.cpp
  218. +1 −1 samples/gpu/video_writer.cpp
  219. +4 −1 samples/ocl/facedetect.cpp
  220. +5 −5 samples/ocl/hog.cpp
  221. +1 −1 samples/ocl/squares.cpp
  222. +4 −4 samples/ocl/surf_matcher.cpp
@@ -1,3 +1,4 @@
+set(HAVE_FFMPEG 1)
set(NEW_FFMPEG 1)
set(HAVE_FFMPEG_CODEC 1)
set(HAVE_FFMPEG_FORMAT 1)
@@ -1,4 +1,4 @@
-SET(OPENCV_HAARTRAINING_DEPS opencv_core opencv_imgproc opencv_highgui opencv_objdetect opencv_calib3d opencv_video opencv_features2d opencv_flann opencv_legacy)
+SET(OPENCV_HAARTRAINING_DEPS opencv_core opencv_imgproc opencv_photo opencv_highgui opencv_objdetect opencv_calib3d opencv_video opencv_features2d opencv_flann opencv_legacy)
ocv_check_dependencies(${OPENCV_HAARTRAINING_DEPS})
if(NOT OCV_DEPENDENCIES_FOUND)
@@ -1,4 +1,4 @@
-set(OPENCV_TRAINCASCADE_DEPS opencv_core opencv_ml opencv_imgproc opencv_objdetect opencv_highgui opencv_calib3d opencv_video opencv_features2d opencv_flann opencv_legacy)
+set(OPENCV_TRAINCASCADE_DEPS opencv_core opencv_ml opencv_imgproc opencv_photo opencv_objdetect opencv_highgui opencv_calib3d opencv_video opencv_features2d opencv_flann opencv_legacy)
ocv_check_dependencies(${OPENCV_TRAINCASCADE_DEPS})
if(NOT OCV_DEPENDENCIES_FOUND)
@@ -1,6 +1,7 @@
#include "opencv2/core.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/highgui.hpp"
-#include "cv.h"
#include "imagestorage.h"
#include <stdio.h>
#include <iostream>
@@ -29,7 +29,7 @@ if(WITH_GSTREAMER AND NOT WITH_GSTREAMER_1_X)
set(GSTREAMER_RIFF_VERSION ${ALIASOF_gstreamer-riff-0.10_VERSION})
set(GSTREAMER_PBUTILS_VERSION ${ALIASOF_gstreamer-pbutils-0.10_VERSION})
endif()
-
+
endif(WITH_GSTREAMER AND NOT WITH_GSTREAMER_1_X)
# if gstreamer 0.10 was not found, or we specified we wanted 1.x, try to find it
@@ -40,7 +40,7 @@ if(WITH_GSTREAMER_1_X OR NOT HAVE_GSTREAMER)
CHECK_MODULE(gstreamer-app-1.0 HAVE_GSTREAMER_APP)
CHECK_MODULE(gstreamer-riff-1.0 HAVE_GSTREAMER_RIFF)
CHECK_MODULE(gstreamer-pbutils-1.0 HAVE_GSTREAMER_PBUTILS)
-
+
if(HAVE_GSTREAMER_BASE AND HAVE_GSTREAMER_VIDEO AND HAVE_GSTREAMER_APP AND HAVE_GSTREAMER_RIFF AND HAVE_GSTREAMER_PBUTILS)
set(HAVE_GSTREAMER TRUE)
set(GSTREAMER_BASE_VERSION ${ALIASOF_gstreamer-base-1.0_VERSION})
@@ -49,7 +49,7 @@ if(WITH_GSTREAMER_1_X OR NOT HAVE_GSTREAMER)
set(GSTREAMER_RIFF_VERSION ${ALIASOF_gstreamer-riff-1.0_VERSION})
set(GSTREAMER_PBUTILS_VERSION ${ALIASOF_gstreamer-pbutils-1.0_VERSION})
endif()
-
+
endif(WITH_GSTREAMER_1_X OR NOT HAVE_GSTREAMER)
# --- unicap ---
View
@@ -62,7 +62,8 @@
#include "opencv2/core/core_c.h"
#include "opencv2/imgproc/imgproc_c.h"
-#include "opencv2/imgproc.hpp"
+#include "opencv2/photo/photo_c.h"
+
#include "opencv2/video.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/flann.hpp"
View
@@ -49,5 +49,8 @@
#include "cv.h"
#include "opencv2/core.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/photo.hpp"
+#include "opencv2/highgui.hpp"
#endif
View
@@ -48,7 +48,8 @@
#include "opencv2/core/core_c.h"
#include "opencv2/imgproc/imgproc_c.h"
-#include "opencv2/imgproc.hpp"
+#include "opencv2/photo/photo_c.h"
+
#include "opencv2/video.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/calib3d.hpp"
View
@@ -44,6 +44,5 @@
#include "opencv2/core/core_c.h"
#include "opencv2/highgui/highgui_c.h"
-#include "opencv2/highgui.hpp"
#endif
@@ -66,7 +66,7 @@ void CV_ChessboardDetectorTimingTest::run( int start_from )
CvMat* _v = 0;
CvPoint2D32f* v;
- IplImage* img = 0;
+ IplImage img;
IplImage* gray = 0;
IplImage* thresh = 0;
@@ -105,9 +105,10 @@ void CV_ChessboardDetectorTimingTest::run( int start_from )
/* read the image */
sprintf( filename, "%s%s", filepath, imgname );
- img = cvLoadImage( filename );
+ cv::Mat img2 = cv::imread( filename );
+ img = img2;
- if( !img )
+ if( img2.empty() )
{
ts->printf( cvtest::TS::LOG, "one of chessboard images can't be read: %s\n", filename );
if( max_idx == 1 )
@@ -120,9 +121,9 @@ void CV_ChessboardDetectorTimingTest::run( int start_from )
ts->printf(cvtest::TS::LOG, "%s: chessboard %d:\n", imgname, is_chessboard);
- gray = cvCreateImage( cvSize( img->width, img->height ), IPL_DEPTH_8U, 1 );
- thresh = cvCreateImage( cvSize( img->width, img->height ), IPL_DEPTH_8U, 1 );
- cvCvtColor( img, gray, CV_BGR2GRAY );
+ gray = cvCreateImage( cvSize( img.width, img.height ), IPL_DEPTH_8U, 1 );
+ thresh = cvCreateImage( cvSize( img.width, img.height ), IPL_DEPTH_8U, 1 );
+ cvCvtColor( &img, gray, CV_BGR2GRAY );
count0 = pattern_size.width*pattern_size.height;
@@ -164,7 +165,6 @@ void CV_ChessboardDetectorTimingTest::run( int start_from )
find_chessboard_time*1e-6, find_chessboard_time/num_pixels);
cvReleaseMat( &_v );
- cvReleaseImage( &img );
cvReleaseImage( &gray );
cvReleaseImage( &thresh );
progress = update_progress( progress, idx-1, max_idx, 0 );
@@ -175,7 +175,6 @@ void CV_ChessboardDetectorTimingTest::run( int start_from )
/* release occupied memory */
cvReleaseMat( &_v );
cvReleaseFileStorage( &fs );
- cvReleaseImage( &img );
cvReleaseImage( &gray );
cvReleaseImage( &thresh );
@@ -912,8 +912,7 @@ void ChamferMatcher::Template::show() const
#ifdef HAVE_OPENCV_HIGHGUI
namedWindow("templ",1);
imshow("templ",templ_color);
-
- cvWaitKey(0);
+ waitKey();
#else
CV_Error(CV_StsNotImplemented, "OpenCV has been compiled without GUI support");
#endif
@@ -30,7 +30,7 @@ circle
----------
Draws a circle.
-.. ocv:function:: void circle(Mat& img, Point center, int radius, const Scalar& color, int thickness=1, int lineType=8, int shift=0)
+.. ocv:function:: void circle( Mat& img, Point center, int radius, const Scalar& color, int thickness=1, int lineType=LINE_8, int shift=0 )
.. ocv:pyfunction:: cv2.circle(img, center, radius, color[, thickness[, lineType[, shift]]]) -> img
@@ -83,9 +83,9 @@ ellipse
-----------
Draws a simple or thick elliptic arc or fills an ellipse sector.
-.. ocv:function:: void ellipse(Mat& img, Point center, Size axes, double angle, double startAngle, double endAngle, const Scalar& color, int thickness=1, int lineType=8, int shift=0)
+.. ocv:function:: void ellipse( Mat& img, Point center, Size axes, double angle, double startAngle, double endAngle, const Scalar& color, int thickness=1, int lineType=LINE_8, int shift=0 )
-.. ocv:function:: void ellipse(Mat& img, const RotatedRect& box, const Scalar& color, int thickness=1, int lineType=8)
+.. ocv:function:: void ellipse( Mat& img, const RotatedRect& box, const Scalar& color, int thickness=1, int lineType=LINE_8 )
.. ocv:pyfunction:: cv2.ellipse(img, center, axes, angle, startAngle, endAngle, color[, thickness[, lineType[, shift]]]) -> img
@@ -162,7 +162,9 @@ fillConvexPoly
------------------
Fills a convex polygon.
-.. ocv:function:: void fillConvexPoly(Mat& img, const Point* pts, int npts, const Scalar& color, int lineType=8, int shift=0)
+.. ocv:function:: void fillConvexPoly( Mat& img, const Point* pts, int npts, const Scalar& color, int lineType=LINE_8, int shift=0 )
+
+.. ocv:function:: void fillConvexPoly( InputOutputArray img, InputArray points, const Scalar& color, int lineType=LINE_8, int shift=0 )
.. ocv:pyfunction:: cv2.fillConvexPoly(img, points, color[, lineType[, shift]]) -> img
@@ -192,7 +194,9 @@ fillPoly
------------
Fills the area bounded by one or more polygons.
-.. ocv:function:: void fillPoly(Mat& img, const Point** pts, const int* npts, int ncontours, const Scalar& color, int lineType=8, int shift=0, Point offset=Point() )
+.. ocv:function:: void fillPoly( Mat& img, const Point** pts, const int* npts, int ncontours, const Scalar& color, int lineType=LINE_8, int shift=0, Point offset=Point() )
+
+.. ocv:function:: void fillPoly( InputOutputArray img, InputArrayOfArrays pts, const Scalar& color, int lineType=LINE_8, int shift=0, Point offset=Point() )
.. ocv:pyfunction:: cv2.fillPoly(img, pts, color[, lineType[, shift[, offset]]]) -> img
@@ -330,7 +334,7 @@ line
--------
Draws a line segment connecting two points.
-.. ocv:function:: void line(Mat& img, Point pt1, Point pt2, const Scalar& color, int thickness=1, int lineType=8, int shift=0)
+.. ocv:function:: void line( Mat& img, Point pt1, Point pt2, const Scalar& color, int thickness=1, int lineType=LINE_8, int shift=0 )
.. ocv:pyfunction:: cv2.line(img, pt1, pt2, color[, thickness[, lineType[, shift]]]) -> img
@@ -418,9 +422,9 @@ rectangle
-------------
Draws a simple, thick, or filled up-right rectangle.
-.. ocv:function:: void rectangle(Mat& img, Point pt1, Point pt2, const Scalar& color, int thickness=1, int lineType=8, int shift=0)
+.. ocv:function:: void rectangle( Mat& img, Point pt1, Point pt2, const Scalar& color, int thickness=1, int lineType=LINE_8, int shift=0 )
-.. ocv:function:: void rectangle( Mat& img, Rect rec, const Scalar& color, int thickness=1, int lineType=8, int shift=0 )
+.. ocv:function:: void rectangle( Mat& img, Rect rec, const Scalar& color, int thickness=1, int lineType=LINE_8, int shift=0 )
.. ocv:pyfunction:: cv2.rectangle(img, pt1, pt2, color[, thickness[, lineType[, shift]]]) -> img
@@ -452,9 +456,9 @@ polylines
-------------
Draws several polygonal curves.
-.. ocv:function:: void polylines( Mat& img, const Point* const* pts, const int* npts, int ncontours, bool isClosed, const Scalar& color, int thickness=1, int lineType=8, int shift=0 )
+.. ocv:function:: void polylines( Mat& img, const Point* const* pts, const int* npts, int ncontours, bool isClosed, const Scalar& color, int thickness=1, int lineType=LINE_8, int shift=0 )
-.. ocv:function:: void polylines( InputOutputArray img, InputArrayOfArrays pts, bool isClosed, const Scalar& color, int thickness=1, int lineType=8, int shift=0 )
+.. ocv:function:: void polylines( InputOutputArray img, InputArrayOfArrays pts, bool isClosed, const Scalar& color, int thickness=1, int lineType=LINE_8, int shift=0 )
.. ocv:pyfunction:: cv2.polylines(img, pts, isClosed, color[, thickness[, lineType[, shift]]]) -> img
@@ -487,7 +491,7 @@ drawContours
----------------
Draws contours outlines or filled contours.
-.. ocv:function:: void drawContours( InputOutputArray image, InputArrayOfArrays contours, int contourIdx, const Scalar& color, int thickness=1, int lineType=8, InputArray hierarchy=noArray(), int maxLevel=INT_MAX, Point offset=Point() )
+.. ocv:function:: void drawContours( InputOutputArray image, InputArrayOfArrays contours, int contourIdx, const Scalar& color, int thickness=1, int lineType=LINE_8, InputArray hierarchy=noArray(), int maxLevel=INT_MAX, Point offset=Point() )
.. ocv:pyfunction:: cv2.drawContours(image, contours, contourIdx, color[, thickness[, lineType[, hierarchy[, maxLevel[, offset]]]]]) -> image
@@ -570,11 +574,12 @@ putText
-----------
Draws a text string.
-.. ocv:function:: void putText( Mat& img, const String& text, Point org, int fontFace, double fontScale, Scalar color, int thickness=1, int lineType=8, bool bottomLeftOrigin=false )
+.. ocv:function:: void putText( Mat& img, const String& text, Point org, int fontFace, double fontScale, Scalar color, int thickness=1, int lineType=LINE_8, bool bottomLeftOrigin=false )
.. ocv:pyfunction:: cv2.putText(img, text, org, fontFace, fontScale, color[, thickness[, lineType[, bottomLeftOrigin]]]) -> None
.. ocv:cfunction:: void cvPutText( CvArr* img, const char* text, CvPoint org, const CvFont* font, CvScalar color )
+
.. ocv:pyoldfunction:: cv.PutText(img, text, org, font, color)-> None
:param img: Image.
@@ -496,67 +496,73 @@ CV_EXPORTS void randShuffle(InputOutputArray dst, double iterFactor = 1., RNG* r
CV_EXPORTS_AS(randShuffle) void randShuffle_(InputOutputArray dst, double iterFactor = 1.);
+enum { FILLED = -1,
+ LINE_4 = 4,
+ LINE_8 = 8,
+ LINE_AA = 16
+ };
+
//! draws the line segment (pt1, pt2) in the image
CV_EXPORTS_W void line(CV_IN_OUT Mat& img, Point pt1, Point pt2, const Scalar& color,
- int thickness = 1, int lineType = 8, int shift = 0);
+ int thickness = 1, int lineType = LINE_8, int shift = 0);
//! draws the rectangle outline or a solid rectangle with the opposite corners pt1 and pt2 in the image
CV_EXPORTS_W void rectangle(CV_IN_OUT Mat& img, Point pt1, Point pt2,
const Scalar& color, int thickness = 1,
- int lineType = 8, int shift = 0);
+ int lineType = LINE_8, int shift = 0);
//! draws the rectangle outline or a solid rectangle covering rec in the image
CV_EXPORTS void rectangle(CV_IN_OUT Mat& img, Rect rec,
const Scalar& color, int thickness = 1,
- int lineType = 8, int shift = 0);
+ int lineType = LINE_8, int shift = 0);
//! draws the circle outline or a solid circle in the image
CV_EXPORTS_W void circle(CV_IN_OUT Mat& img, Point center, int radius,
const Scalar& color, int thickness = 1,
- int lineType = 8, int shift = 0);
+ int lineType = LINE_8, int shift = 0);
//! draws an elliptic arc, ellipse sector or a rotated ellipse in the image
CV_EXPORTS_W void ellipse(CV_IN_OUT Mat& img, Point center, Size axes,
double angle, double startAngle, double endAngle,
const Scalar& color, int thickness = 1,
- int lineType = 8, int shift = 0);
+ int lineType = LINE_8, int shift = 0);
//! draws a rotated ellipse in the image
CV_EXPORTS_W void ellipse(CV_IN_OUT Mat& img, const RotatedRect& box, const Scalar& color,
- int thickness = 1, int lineType = 8);
+ int thickness = 1, int lineType = LINE_8);
//! draws a filled convex polygon in the image
CV_EXPORTS void fillConvexPoly(Mat& img, const Point* pts, int npts,
- const Scalar& color, int lineType = 8,
+ const Scalar& color, int lineType = LINE_8,
int shift = 0);
CV_EXPORTS_W void fillConvexPoly(InputOutputArray img, InputArray points,
- const Scalar& color, int lineType = 8,
+ const Scalar& color, int lineType = LINE_8,
int shift = 0);
//! fills an area bounded by one or more polygons
CV_EXPORTS void fillPoly(Mat& img, const Point** pts,
const int* npts, int ncontours,
- const Scalar& color, int lineType = 8, int shift = 0,
+ const Scalar& color, int lineType = LINE_8, int shift = 0,
Point offset = Point() );
CV_EXPORTS_W void fillPoly(InputOutputArray img, InputArrayOfArrays pts,
- const Scalar& color, int lineType = 8, int shift = 0,
+ const Scalar& color, int lineType = LINE_8, int shift = 0,
Point offset = Point() );
//! draws one or more polygonal curves
CV_EXPORTS void polylines(Mat& img, const Point* const* pts, const int* npts,
int ncontours, bool isClosed, const Scalar& color,
- int thickness = 1, int lineType = 8, int shift = 0 );
+ int thickness = 1, int lineType = LINE_8, int shift = 0 );
CV_EXPORTS_W void polylines(InputOutputArray img, InputArrayOfArrays pts,
bool isClosed, const Scalar& color,
- int thickness = 1, int lineType = 8, int shift = 0 );
+ int thickness = 1, int lineType = LINE_8, int shift = 0 );
//! draws contours in the image
CV_EXPORTS_W void drawContours( InputOutputArray image, InputArrayOfArrays contours,
int contourIdx, const Scalar& color,
- int thickness = 1, int lineType = 8,
+ int thickness = 1, int lineType = LINE_8,
InputArray hierarchy = noArray(),
int maxLevel = INT_MAX, Point offset = Point() );
@@ -587,7 +593,7 @@ enum
//! renders text string in the image
CV_EXPORTS_W void putText( Mat& img, const String& text, Point org,
int fontFace, double fontScale, Scalar color,
- int thickness = 1, int lineType = 8,
+ int thickness = 1, int lineType = LINE_8,
bool bottomLeftOrigin = false );
//! returns bounding box of the text string
@@ -631,9 +637,9 @@ CV_EXPORTS ConvertScaleData getConvertScaleElem(int fromType, int toType);
PCA pca(pcaset, // pass the data
Mat(), // we do not have a pre-computed mean vector,
// so let the PCA engine to compute it
- CV_PCA_DATA_AS_ROW, // indicate that the vectors
+ PCA::DATA_AS_ROW, // indicate that the vectors
// are stored as matrix rows
- // (use CV_PCA_DATA_AS_COL if the vectors are
+ // (use PCA::DATA_AS_COL if the vectors are
// the matrix columns)
maxComponents // specify, how many principal components to retain
);
@@ -663,6 +669,11 @@ CV_EXPORTS ConvertScaleData getConvertScaleElem(int fromType, int toType);
class CV_EXPORTS PCA
{
public:
+ enum { DATA_AS_ROW = 0,
+ DATA_AS_COL = 1,
+ USE_AVG = 2
+ };
+
//! default constructor
PCA();
@@ -43,10 +43,9 @@
#ifndef __OPENCV_FEATURES_2D_HPP__
#define __OPENCV_FEATURES_2D_HPP__
-#include "opencv2/flann/miniflann.hpp"
-
#ifdef __cplusplus
#include "opencv2/core.hpp"
+#include "opencv2/flann/miniflann.hpp"
#include <limits>
namespace cv
@@ -43,9 +43,6 @@
#ifndef _OPENCV_FLANN_HPP_
#define _OPENCV_FLANN_HPP_
-#ifdef __cplusplus
-
-#include "opencv2/core/types_c.h"
#include "opencv2/core.hpp"
#include "opencv2/flann/miniflann.hpp"
#include "opencv2/flann/flann_base.hpp"
@@ -422,6 +419,4 @@ FLANN_DEPRECATED int hierarchicalClustering(const Mat& features, Mat& centers, c
} } // namespace cv::flann
-#endif // __cplusplus
-
#endif
Oops, something went wrong.

0 comments on commit 913e683

Please sign in to comment.