OpenCV 4.5.3(日本語機械翻訳)
imgproc.hpp
1 /*M///////////////////////////////////////////////////////////////////////////////////////
2 //
3 // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 //
5 // By downloading, copying, installing or using the software you agree to this license.
6 // If you do not agree to this license, do not download, install,
7 // copy or use the software.
8 //
9 //
10 // License Agreement
11 // For Open Source Computer Vision Library
12 //
13 // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
14 // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
15 // Third party copyrights are property of their respective owners.
16 //
17 // Redistribution and use in source and binary forms, with or without modification,
18 // are permitted provided that the following conditions are met:
19 //
20 // * Redistribution's of source code must retain the above copyright notice,
21 // this list of conditions and the following disclaimer.
22 //
23 // * Redistribution's in binary form must reproduce the above copyright notice,
24 // this list of conditions and the following disclaimer in the documentation
25 // and/or other materials provided with the distribution.
26 //
27 // * The name of the copyright holders may not be used to endorse or promote products
28 // derived from this software without specific prior written permission.
29 //
30 // This software is provided by the copyright holders and contributors "as is" and
31 // any express or implied warranties, including, but not limited to, the implied
32 // warranties of merchantability and fitness for a particular purpose are disclaimed.
33 // In no event shall the Intel Corporation or contributors be liable for any direct,
34 // indirect, incidental, special, exemplary, or consequential damages
35 // (including, but not limited to, procurement of substitute goods or services;
36 // loss of use, data, or profits; or business interruption) however caused
37 // and on any theory of liability, whether in contract, strict liability,
38 // or tort (including negligence or otherwise) arising in any way out of
39 // the use of this software, even if advised of the possibility of such damage.
40 //
41 //M*/
42
43 #ifndef OPENCV_IMGPROC_HPP
44 #define OPENCV_IMGPROC_HPP
45
46 #include "opencv2/core.hpp"
47
198 namespace cv
199{
200
207
208 enum SpecialFilter {
209 FILTER_SCHARR = -1
210};
211
216 MORPH_OPEN = 2,
218 MORPH_CLOSE = 3,
220 MORPH_GRADIENT = 4,
222 MORPH_TOPHAT = 5,
224 MORPH_BLACKHAT = 6,
226 MORPH_HITMISS = 7
228 };
229
233 MORPH_CROSS = 1,
235 MORPH_ELLIPSE = 2
237 };
238
240
243
275 };
276
281{
283 WARP_POLAR_LOG = 256
284 };
285
286 enum InterpolationMasks {
287 INTER_BITS = 5,
288 INTER_BITS2 = INTER_BITS * 2,
289 INTER_TAB_SIZE = 1 << INTER_BITS,
290 INTER_TAB_SIZE2 = INTER_TAB_SIZE * INTER_TAB_SIZE
291 };
292
294
297
304 DIST_C = 3,
308 DIST_HUBER = 7
309 };
310
315 DIST_MASK_PRECISE = 0
316};
317
326 THRESH_MASK = 7,
328 THRESH_TRIANGLE = 16
329 };
330
342 };
343
346 GC_BGD = 0,
347 GC_FGD = 1,
349 GC_PR_FGD = 3
350 };
351
365 };
366
374 };
375
384 FLOODFILL_MASK_ONLY = 1 << 17
385 };
386
388
391
394 CC_STAT_LEFT = 0,
396 CC_STAT_TOP = 1,
401 #ifndef CV_DOXYGEN
402 CC_STAT_MAX = 5
403 #endif
404 };
405
409 CCL_WU = 0,
415};
416
431 RETR_FLOODFILL = 4
432};
433
447 };
448
461 };
462
464
467
470
486};
487
492 LSD_REFINE_ADV = 2
494 };
495
497
526 };
527
534 COLOR_RGB2RGBA = COLOR_BGR2BGRA,
535
537 COLOR_RGBA2RGB = COLOR_BGRA2BGR,
538
540 COLOR_RGB2BGRA = COLOR_BGR2RGBA,
541
542 COLOR_RGBA2BGR = 3,
543 COLOR_BGRA2RGB = COLOR_RGBA2BGR,
544
545 COLOR_BGR2RGB = 4,
546 COLOR_RGB2BGR = COLOR_BGR2RGB,
547
548 COLOR_BGRA2RGBA = 5,
549 COLOR_RGBA2BGRA = COLOR_BGRA2RGBA,
550
552 COLOR_RGB2GRAY = 7,
553 COLOR_GRAY2BGR = 8,
554 COLOR_GRAY2RGB = COLOR_GRAY2BGR,
555 COLOR_GRAY2BGRA = 9,
556 COLOR_GRAY2RGBA = COLOR_GRAY2BGRA,
557 COLOR_BGRA2GRAY = 10,
558 COLOR_RGBA2GRAY = 11,
559
561 COLOR_RGB2BGR565 = 13,
562 COLOR_BGR5652BGR = 14,
563 COLOR_BGR5652RGB = 15,
564 COLOR_BGRA2BGR565 = 16,
565 COLOR_RGBA2BGR565 = 17,
566 COLOR_BGR5652BGRA = 18,
567 COLOR_BGR5652RGBA = 19,
568
570 COLOR_BGR5652GRAY = 21,
571
573 COLOR_RGB2BGR555 = 23,
574 COLOR_BGR5552BGR = 24,
575 COLOR_BGR5552RGB = 25,
576 COLOR_BGRA2BGR555 = 26,
577 COLOR_RGBA2BGR555 = 27,
578 COLOR_BGR5552BGRA = 28,
579 COLOR_BGR5552RGBA = 29,
580
582 COLOR_BGR5552GRAY = 31,
583
585 COLOR_RGB2XYZ = 33,
586 COLOR_XYZ2BGR = 34,
587 COLOR_XYZ2RGB = 35,
588
590 COLOR_RGB2YCrCb = 37,
591 COLOR_YCrCb2BGR = 38,
592 COLOR_YCrCb2RGB = 39,
593
595 COLOR_RGB2HSV = 41,
596
598 COLOR_RGB2Lab = 45,
599
601 COLOR_RGB2Luv = 51,
603 COLOR_RGB2HLS = 53,
604
606 COLOR_HSV2RGB = 55,
607
608 COLOR_Lab2BGR = 56,
609 COLOR_Lab2RGB = 57,
610 COLOR_Luv2BGR = 58,
611 COLOR_Luv2RGB = 59,
613 COLOR_HLS2RGB = 61,
614
616 COLOR_RGB2HSV_FULL = 67,
618 COLOR_RGB2HLS_FULL = 69,
619
621 COLOR_HSV2RGB_FULL = 71,
623 COLOR_HLS2RGB_FULL = 73,
624
625 COLOR_LBGR2Lab = 74,
626 COLOR_LRGB2Lab = 75,
627 COLOR_LBGR2Luv = 76,
628 COLOR_LRGB2Luv = 77,
629
630 COLOR_Lab2LBGR = 78,
631 COLOR_Lab2LRGB = 79,
632 COLOR_Luv2LBGR = 80,
633 COLOR_Luv2LRGB = 81,
634
636 COLOR_RGB2YUV = 83,
637 COLOR_YUV2BGR = 84,
638 COLOR_YUV2RGB = 85,
639
642 COLOR_YUV2BGR_NV12 = 91,
643 COLOR_YUV2RGB_NV21 = 92,
644 COLOR_YUV2BGR_NV21 = 93,
645 COLOR_YUV420sp2RGB = COLOR_YUV2RGB_NV21,
646 COLOR_YUV420sp2BGR = COLOR_YUV2BGR_NV21,
647
648 COLOR_YUV2RGBA_NV12 = 94,
649 COLOR_YUV2BGRA_NV12 = 95,
650 COLOR_YUV2RGBA_NV21 = 96,
651 COLOR_YUV2BGRA_NV21 = 97,
652 COLOR_YUV420sp2RGBA = COLOR_YUV2RGBA_NV21,
653 COLOR_YUV420sp2BGRA = COLOR_YUV2BGRA_NV21,
654
655 COLOR_YUV2RGB_YV12 = 98,
656 COLOR_YUV2BGR_YV12 = 99,
657 COLOR_YUV2RGB_IYUV = 100,
658 COLOR_YUV2BGR_IYUV = 101,
659 COLOR_YUV2RGB_I420 = COLOR_YUV2RGB_IYUV,
660 COLOR_YUV2BGR_I420 = COLOR_YUV2BGR_IYUV,
661 COLOR_YUV420p2RGB = COLOR_YUV2RGB_YV12,
662 COLOR_YUV420p2BGR = COLOR_YUV2BGR_YV12,
663
664 COLOR_YUV2RGBA_YV12 = 102,
665 COLOR_YUV2BGRA_YV12 = 103,
666 COLOR_YUV2RGBA_IYUV = 104,
667 COLOR_YUV2BGRA_IYUV = 105,
668 COLOR_YUV2RGBA_I420 = COLOR_YUV2RGBA_IYUV,
669 COLOR_YUV2BGRA_I420 = COLOR_YUV2BGRA_IYUV,
670 COLOR_YUV420p2RGBA = COLOR_YUV2RGBA_YV12,
671 COLOR_YUV420p2BGRA = COLOR_YUV2BGRA_YV12,
672
673 COLOR_YUV2GRAY_420 = 106,
674 COLOR_YUV2GRAY_NV21 = COLOR_YUV2GRAY_420,
675 COLOR_YUV2GRAY_NV12 = COLOR_YUV2GRAY_420,
676 COLOR_YUV2GRAY_YV12 = COLOR_YUV2GRAY_420,
677 COLOR_YUV2GRAY_IYUV = COLOR_YUV2GRAY_420,
678 COLOR_YUV2GRAY_I420 = COLOR_YUV2GRAY_420,
679 COLOR_YUV420sp2GRAY = COLOR_YUV2GRAY_420,
680 COLOR_YUV420p2GRAY = COLOR_YUV2GRAY_420,
681
684 COLOR_YUV2BGR_UYVY = 108,
685 //COLOR_YUV2RGB_VYUY = 109,
686 //COLOR_YUV2BGR_VYUY = 110,
687 COLOR_YUV2RGB_Y422 = COLOR_YUV2RGB_UYVY,
688 COLOR_YUV2BGR_Y422 = COLOR_YUV2BGR_UYVY,
689 COLOR_YUV2RGB_UYNV = COLOR_YUV2RGB_UYVY,
690 COLOR_YUV2BGR_UYNV = COLOR_YUV2BGR_UYVY,
691
692 COLOR_YUV2RGBA_UYVY = 111,
693 COLOR_YUV2BGRA_UYVY = 112,
694 //COLOR_YUV2RGBA_VYUY = 113,
695 //COLOR_YUV2BGRA_VYUY = 114,
696 COLOR_YUV2RGBA_Y422 = COLOR_YUV2RGBA_UYVY,
697 COLOR_YUV2BGRA_Y422 = COLOR_YUV2BGRA_UYVY,
698 COLOR_YUV2RGBA_UYNV = COLOR_YUV2RGBA_UYVY,
699 COLOR_YUV2BGRA_UYNV = COLOR_YUV2BGRA_UYVY,
700
701 COLOR_YUV2RGB_YUY2 = 115,
702 COLOR_YUV2BGR_YUY2 = 116,
703 COLOR_YUV2RGB_YVYU = 117,
704 COLOR_YUV2BGR_YVYU = 118,
705 COLOR_YUV2RGB_YUYV = COLOR_YUV2RGB_YUY2,
706 COLOR_YUV2BGR_YUYV = COLOR_YUV2BGR_YUY2,
707 COLOR_YUV2RGB_YUNV = COLOR_YUV2RGB_YUY2,
708 COLOR_YUV2BGR_YUNV = COLOR_YUV2BGR_YUY2,
709
710 COLOR_YUV2RGBA_YUY2 = 119,
711 COLOR_YUV2BGRA_YUY2 = 120,
712 COLOR_YUV2RGBA_YVYU = 121,
713 COLOR_YUV2BGRA_YVYU = 122,
714 COLOR_YUV2RGBA_YUYV = COLOR_YUV2RGBA_YUY2,
715 COLOR_YUV2BGRA_YUYV = COLOR_YUV2BGRA_YUY2,
716 COLOR_YUV2RGBA_YUNV = COLOR_YUV2RGBA_YUY2,
717 COLOR_YUV2BGRA_YUNV = COLOR_YUV2BGRA_YUY2,
718
719 COLOR_YUV2GRAY_UYVY = 123,
720 COLOR_YUV2GRAY_YUY2 = 124,
721 //CV_YUV2GRAY_VYUY = CV_YUV2GRAY_UYVY,
722 COLOR_YUV2GRAY_Y422 = COLOR_YUV2GRAY_UYVY,
723 COLOR_YUV2GRAY_UYNV = COLOR_YUV2GRAY_UYVY,
724 COLOR_YUV2GRAY_YVYU = COLOR_YUV2GRAY_YUY2,
725 COLOR_YUV2GRAY_YUYV = COLOR_YUV2GRAY_YUY2,
726 COLOR_YUV2GRAY_YUNV = COLOR_YUV2GRAY_YUY2,
727
730 COLOR_mRGBA2RGBA = 126,
731
734 COLOR_BGR2YUV_I420 = 128,
735 COLOR_RGB2YUV_IYUV = COLOR_RGB2YUV_I420,
736 COLOR_BGR2YUV_IYUV = COLOR_BGR2YUV_I420,
737
738 COLOR_RGBA2YUV_I420 = 129,
739 COLOR_BGRA2YUV_I420 = 130,
740 COLOR_RGBA2YUV_IYUV = COLOR_RGBA2YUV_I420,
741 COLOR_BGRA2YUV_IYUV = COLOR_BGRA2YUV_I420,
742 COLOR_RGB2YUV_YV12 = 131,
743 COLOR_BGR2YUV_YV12 = 132,
744 COLOR_RGBA2YUV_YV12 = 133,
745 COLOR_BGRA2YUV_YV12 = 134,
746
749 COLOR_BayerGB2BGR = 47,
750 COLOR_BayerRG2BGR = 48,
751 COLOR_BayerGR2BGR = 49,
752
753 COLOR_BayerBG2RGB = COLOR_BayerRG2BGR,
754 COLOR_BayerGB2RGB = COLOR_BayerGR2BGR,
755 COLOR_BayerRG2RGB = COLOR_BayerBG2BGR,
756 COLOR_BayerGR2RGB = COLOR_BayerGB2BGR,
757
758 COLOR_BayerBG2GRAY = 86,
759 COLOR_BayerGB2GRAY = 87,
760 COLOR_BayerRG2GRAY = 88,
761 COLOR_BayerGR2GRAY = 89,
762
765 COLOR_BayerGB2BGR_VNG = 63,
766 COLOR_BayerRG2BGR_VNG = 64,
767 COLOR_BayerGR2BGR_VNG = 65,
768
769 COLOR_BayerBG2RGB_VNG = COLOR_BayerRG2BGR_VNG,
770 COLOR_BayerGB2RGB_VNG = COLOR_BayerGR2BGR_VNG,
771 COLOR_BayerRG2RGB_VNG = COLOR_BayerBG2BGR_VNG,
772 COLOR_BayerGR2RGB_VNG = COLOR_BayerGB2BGR_VNG,
773
776 COLOR_BayerGB2BGR_EA = 136,
777 COLOR_BayerRG2BGR_EA = 137,
778 COLOR_BayerGR2BGR_EA = 138,
779
780 COLOR_BayerBG2RGB_EA = COLOR_BayerRG2BGR_EA,
781 COLOR_BayerGB2RGB_EA = COLOR_BayerGR2BGR_EA,
782 COLOR_BayerRG2RGB_EA = COLOR_BayerBG2BGR_EA,
783 COLOR_BayerGR2RGB_EA = COLOR_BayerGB2BGR_EA,
784
787 COLOR_BayerGB2BGRA = 140,
788 COLOR_BayerRG2BGRA = 141,
789 COLOR_BayerGR2BGRA = 142,
790
791 COLOR_BayerBG2RGBA = COLOR_BayerRG2BGRA,
792 COLOR_BayerGB2RGBA = COLOR_BayerGR2BGRA,
793 COLOR_BayerRG2RGBA = COLOR_BayerBG2BGRA,
794 COLOR_BayerGR2RGBA = COLOR_BayerGB2BGRA,
795
796 COLOR_COLORCVT_MAX = 143
797};
798
801
806 INTERSECT_FULL = 2
807 };
808
813 FILLED = -1,
814 LINE_4 = 4,
815 LINE_8 = 8,
816 LINE_AA = 16
817 };
818
831 FONT_ITALIC = 16
832 };
833
838{
846 };
847
850 class CV_EXPORTS_W GeneralizedHough : public Algorithm
851{
852 public:
854 CV_WRAP virtual void setTemplate(InputArray templ, Point templCenter = Point(-1, -1)) = 0;
855 CV_WRAP virtual void setTemplate(InputArray edges, InputArray dx, InputArray dy, Point templCenter = Point(-1, -1)) = 0;
856
858 CV_WRAP virtual void detect(InputArray image, OutputArray positions, OutputArray votes = noArray()) = 0;
859 CV_WRAP virtual void detect(InputArray edges, InputArray dx, InputArray dy, OutputArray positions, OutputArray votes = noArray()) = 0;
860
862 CV_WRAP virtual void setCannyLowThresh(int cannyLowThresh) = 0;
863 CV_WRAP virtual int getCannyLowThresh() const = 0;
864
866 CV_WRAP virtual void setCannyHighThresh(int cannyHighThresh) = 0;
867 CV_WRAP virtual int getCannyHighThresh() const = 0;
868
870 CV_WRAP virtual void setMinDist(double minDist) = 0;
871 CV_WRAP virtual double getMinDist() const = 0;
872
874 CV_WRAP virtual void setDp(double dp) = 0;
875 CV_WRAP virtual double getDp() const = 0;
876
878 CV_WRAP virtual void setMaxBufferSize(int maxBufferSize) = 0;
879 CV_WRAP virtual int getMaxBufferSize() const = 0;
880};
881
886 class CV_EXPORTS_W GeneralizedHoughBallard : public GeneralizedHough
887{
888 public:
890 CV_WRAP virtual void setLevels(int levels) = 0;
891 CV_WRAP virtual int getLevels() const = 0;
892
894 CV_WRAP virtual void setVotesThreshold(int votesThreshold) = 0;
895 CV_WRAP virtual int getVotesThreshold() const = 0;
896};
897
902 class CV_EXPORTS_W GeneralizedHoughGuil : public GeneralizedHough
903{
904 public:
906 CV_WRAP virtual void setXi(double xi) = 0;
907 CV_WRAP virtual double getXi() const = 0;
908
910 CV_WRAP virtual void setLevels(int levels) = 0;
911 CV_WRAP virtual int getLevels() const = 0;
912
914 CV_WRAP virtual void setAngleEpsilon(double angleEpsilon) = 0;
915 CV_WRAP virtual double getAngleEpsilon() const = 0;
916
918 CV_WRAP virtual void setMinAngle(double minAngle) = 0;
919 CV_WRAP virtual double getMinAngle() const = 0;
920
922 CV_WRAP virtual void setMaxAngle(double maxAngle) = 0;
923 CV_WRAP virtual double getMaxAngle() const = 0;
924
926 CV_WRAP virtual void setAngleStep(double angleStep) = 0;
927 CV_WRAP virtual double getAngleStep() const = 0;
928
930 CV_WRAP virtual void setAngleThresh(int angleThresh) = 0;
931 CV_WRAP virtual int getAngleThresh() const = 0;
932
934 CV_WRAP virtual void setMinScale(double minScale) = 0;
935 CV_WRAP virtual double getMinScale() const = 0;
936
938 CV_WRAP virtual void setMaxScale(double maxScale) = 0;
939 CV_WRAP virtual double getMaxScale() const = 0;
940
942 CV_WRAP virtual void setScaleStep(double scaleStep) = 0;
943 CV_WRAP virtual double getScaleStep() const = 0;
944
946 CV_WRAP virtual void setScaleThresh(int scaleThresh) = 0;
947 CV_WRAP virtual int getScaleThresh() const = 0;
948
950 CV_WRAP virtual void setPosThresh(int posThresh) = 0;
951 CV_WRAP virtual int getPosThresh() const = 0;
952};
953
955
958
961 class CV_EXPORTS_W CLAHE : public Algorithm
962{
963 public:
969 CV_WRAP virtual void apply(InputArray src, OutputArray dst) = 0;
970
975 CV_WRAP virtual void setClipLimit(double clipLimit) = 0;
976
978 CV_WRAP virtual double getClipLimit() const = 0;
979
985 CV_WRAP virtual void setTilesGridSize(Size tileGridSize) = 0;
986
988 CV_WRAP virtual Size getTilesGridSize() const = 0;
989
990 CV_WRAP virtual void collectGarbage() = 0;
991};
992
994
997
998 class CV_EXPORTS_W Subdiv2D
999{
1000 public:
1002 enum { PTLOC_ERROR = -2,
1003 PTLOC_OUTSIDE_RECT = -1,
1004 PTLOC_INSIDE = 0,
1005 PTLOC_VERTEX = 1,
1006 PTLOC_ON_EDGE = 2
1008
1010 enum { NEXT_AROUND_ORG = 0x00,
1011 NEXT_AROUND_DST = 0x22,
1012 PREV_AROUND_ORG = 0x11,
1013 PREV_AROUND_DST = 0x33,
1014 NEXT_AROUND_LEFT = 0x13,
1015 NEXT_AROUND_RIGHT = 0x31,
1016 PREV_AROUND_LEFT = 0x20,
1017 PREV_AROUND_RIGHT = 0x02
1018 };
1019
1023 CV_WRAP Subdiv2D();
1024
1033 CV_WRAP Subdiv2D(Rect rect);
1034
1040 CV_WRAP void initDelaunay(Rect rect);
1041
1052 CV_WRAP int insert(Point2f pt);
1053
1061 CV_WRAP void insert(const std::vector<Point2f>& ptvec);
1062
1083 CV_WRAP int locate(Point2f pt, CV_OUT int& edge, CV_OUT int& vertex);
1084
1097 CV_WRAP int findNearest(Point2f pt, CV_OUT Point2f* nearestPt = 0);
1098
1106 CV_WRAP void getEdgeList(CV_OUT std::vector<Vec4f>& edgeList) const;
1107
1114 CV_WRAP void getLeadingEdgeList(CV_OUT std::vector<int>& leadingEdgeList) const;
1115
1123 CV_WRAP void getTriangleList(CV_OUT std::vector<Vec6f>& triangleList) const;
1124
1132 CV_WRAP void getVoronoiFacetList(const std::vector<int>& idx, CV_OUT std::vector<std::vector<Point2f> >& facetList,
1133 CV_OUT std::vector<Point2f>& facetCenters);
1134
1142 CV_WRAP Point2f getVertex(int vertex, CV_OUT int* firstEdge = 0) const;
1143
1162 CV_WRAP int getEdge( int edge, int nextEdgeType ) const;
1163
1171 CV_WRAP int nextEdge(int edge) const;
1172
1185 CV_WRAP int rotateEdge(int edge, int rotate) const;
1186 CV_WRAP int symEdge(int edge) const;
1187
1195 CV_WRAP int edgeOrg(int edge, CV_OUT Point2f* orgpt = 0) const;
1196
1204 CV_WRAP int edgeDst(int edge, CV_OUT Point2f* dstpt = 0) const;
1205
1206 protected:
1207 int newEdge();
1208 void deleteEdge(int edge);
1209 int newPoint(Point2f pt, bool isvirtual, int firstEdge = 0);
1210 void deletePoint(int vtx);
1211 void setEdgePoints( int edge, int orgPt, int dstPt );
1212 void splice( int edgeA, int edgeB );
1213 int connectEdges( int edgeA, int edgeB );
1214 void swapEdges( int edge );
1215 int isRightOf(Point2f pt, int edge) const;
1216 void calcVoronoi();
1217 void clearVoronoi();
1218 void checkSubdiv() const;
1219
1220 struct CV_EXPORTS Vertex
1221 {
1222 Vertex();
1223 Vertex(Point2f pt, bool isvirtual, int firstEdge=0);
1224 bool isvirtual() const;
1225 bool isfree() const;
1226
1227 int firstEdge;
1228 int type;
1229 Point2f pt;
1230 };
1231
1232 struct CV_EXPORTS QuadEdge
1233 {
1234 QuadEdge();
1235 QuadEdge(int edgeidx);
1236 bool isfree() const;
1237
1238 int next[4];
1239 int pt[4];
1240 };
1241
1243 std::vector<Vertex> vtx;
1245 std::vector<QuadEdge> qedges;
1246 int freeQEdge;
1247 int freePoint;
1248 bool validGeometry;
1249
1250 int recentEdge;
1255};
1256
1258
1261
1269 class CV_EXPORTS_W LineSegmentDetector : public Algorithm
1270{
1271 public:
1272
1293 CV_WRAP virtual void detect(InputArray image, OutputArray lines,
1294 OutputArray width = noArray(), OutputArray prec = noArray(),
1295 OutputArray nfa = noArray()) = 0;
1296
1302 CV_WRAP virtual void drawSegments(InputOutputArray image, InputArray lines) = 0;
1303
1312 CV_WRAP virtual int compareSegments(const Size& size, InputArray lines1, InputArray lines2, InputOutputArray image = noArray()) = 0;
1313
1314 virtual ~LineSegmentDetector() { }
1315};
1316
1334 int refine = LSD_REFINE_STD, double scale = 0.8,
1335 double sigma_scale = 0.6, double quant = 2.0, double ang_th = 22.5,
1336 double log_eps = 0, double density_th = 0.7, int n_bins = 1024);
1337
1339
1342
1361 CV_EXPORTS_W Mat getGaussianKernel( int ksize, double sigma, int ktype = CV_64F );
1362
1381 CV_EXPORTS_W void getDerivKernels( OutputArray kx, OutputArray ky,
1382 int dx, int dy, int ksize,
1383 bool normalize = false, int ktype = CV_32F );
1384
1398 CV_EXPORTS_W Mat getGaborKernel( Size ksize, double sigma, double theta, double lambd,
1399 double gamma, double psi = CV_PI*0.5, int ktype = CV_64F );
1400
1402 static inline Scalar morphologyDefaultBorderValue() { return Scalar::all(DBL_MAX); }
1403
1417 CV_EXPORTS_W Mat getStructuringElement(int shape, Size ksize, Point anchor = Point(-1,-1));
1418
1439 CV_EXPORTS_W void medianBlur( InputArray src, OutputArray dst, int ksize );
1440
1461 CV_EXPORTS_W void GaussianBlur( InputArray src, OutputArray dst, Size ksize,
1462 double sigmaX, double sigmaY = 0,
1463 int borderType = BORDER_DEFAULT );
1464
1493 CV_EXPORTS_W void bilateralFilter( InputArray src, OutputArray dst, int d,
1494 double sigmaColor, double sigmaSpace,
1495 int borderType = BORDER_DEFAULT );
1496
1521 CV_EXPORTS_W void boxFilter( InputArray src, OutputArray dst, int ddepth,
1522 Size ksize, Point anchor = Point(-1,-1),
1523 bool normalize = true,
1524 int borderType = BORDER_DEFAULT );
1525
1544 CV_EXPORTS_W void sqrBoxFilter( InputArray src, OutputArray dst, int ddepth,
1545 Size ksize, Point anchor = Point(-1, -1),
1546 bool normalize = true,
1547 int borderType = BORDER_DEFAULT );
1548
1567 CV_EXPORTS_W void blur( InputArray src, OutputArray dst,
1568 Size ksize, Point anchor = Point(-1,-1),
1569 int borderType = BORDER_DEFAULT );
1570
1601 CV_EXPORTS_W void filter2D( InputArray src, OutputArray dst, int ddepth,
1602 InputArray kernel, Point anchor = Point(-1,-1),
1603 double delta = 0, int borderType = BORDER_DEFAULT );
1604
1622 CV_EXPORTS_W void sepFilter2D( InputArray src, OutputArray dst, int ddepth,
1623 InputArray kernelX, InputArray kernelY,
1624 Point anchor = Point(-1,-1),
1625 double delta = 0, int borderType = BORDER_DEFAULT );
1626
1675 CV_EXPORTS_W void Sobel( InputArray src, OutputArray dst, int ddepth,
1676 int dx, int dy, int ksize = 3,
1677 double scale = 1, double delta = 0,
1678 int borderType = BORDER_DEFAULT );
1679
1699 CV_EXPORTS_W void spatialGradient( InputArray src, OutputArray dx,
1700 OutputArray dy, int ksize = 3,
1701 int borderType = BORDER_DEFAULT );
1702
1725 CV_EXPORTS_W void Scharr( InputArray src, OutputArray dst, int ddepth,
1726 int dx, int dy, double scale = 1, double delta = 0,
1727 int borderType = BORDER_DEFAULT );
1728
1756 CV_EXPORTS_W void Laplacian( InputArray src, OutputArray dst, int ddepth,
1757 int ksize = 1, double scale = 1, double delta = 0,
1758 int borderType = BORDER_DEFAULT );
1759
1761
1764
1788 CV_EXPORTS_W void Canny( InputArray image, OutputArray edges,
1789 double threshold1, double threshold2,
1790 int apertureSize = 3, bool L2gradient = false );
1791
1806 CV_EXPORTS_W void Canny( InputArray dx, InputArray dy,
1807 OutputArray edges,
1808 double threshold1, double threshold2,
1809 bool L2gradient = false );
1810
1824 CV_EXPORTS_W void cornerMinEigenVal( InputArray src, OutputArray dst,
1825 int blockSize, int ksize = 3,
1826 int borderType = BORDER_DEFAULT );
1827
1847 CV_EXPORTS_W void cornerHarris( InputArray src, OutputArray dst, int blockSize,
1848 int ksize, double k,
1849 int borderType = BORDER_DEFAULT );
1850
1877 CV_EXPORTS_W void cornerEigenValsAndVecs( InputArray src, OutputArray dst,
1878 int blockSize, int ksize,
1879 int borderType = BORDER_DEFAULT );
1880
1904 CV_EXPORTS_W void preCornerDetect( InputArray src, OutputArray dst, int ksize,
1905 int borderType = BORDER_DEFAULT );
1906
1947 CV_EXPORTS_W void cornerSubPix( InputArray image, InputOutputArray corners,
1948 Size winSize, Size zeroZone,
1949 TermCriteria criteria );
1950
1995 CV_EXPORTS_W void goodFeaturesToTrack( InputArray image, OutputArray corners,
1996 int maxCorners, double qualityLevel, double minDistance,
1997 InputArray mask = noArray(), int blockSize = 3,
1998 bool useHarrisDetector = false, double k = 0.04 );
1999
2000CV_EXPORTS_W void goodFeaturesToTrack( InputArray image, OutputArray corners,
2001 int maxCorners, double qualityLevel, double minDistance,
2002 InputArray mask, int blockSize,
2003 int gradientSize, bool useHarrisDetector = false,
2004 double k = 0.04 );
2005
2031 CV_EXPORTS CV_WRAP_AS(goodFeaturesToTrackWithQuality) void goodFeaturesToTrack(
2032 InputArray image, OutputArray corners,
2033 int maxCorners, double qualityLevel, double minDistance,
2034 InputArray mask, OutputArray cornersQuality, int blockSize = 3,
2035 int gradientSize = 3, bool useHarrisDetector = false, double k = 0.04);
2036
2068 CV_EXPORTS_W void HoughLines( InputArray image, OutputArray lines,
2069 double rho, double theta, int threshold,
2070 double srn = 0, double stn = 0,
2071 double min_theta = 0, double max_theta = CV_PI );
2072
2101 CV_EXPORTS_W void HoughLinesP( InputArray image, OutputArray lines,
2102 double rho, double theta, int threshold,
2103 double minLineLength = 0, double maxLineGap = 0 );
2104
2122 CV_EXPORTS_W void HoughLinesPointSet( InputArray point, OutputArray lines, int lines_max, int threshold,
2123 double min_rho, double max_rho, double rho_step,
2124 double min_theta, double max_theta, double theta_step );
2125
2173 CV_EXPORTS_W void HoughCircles( InputArray image, OutputArray circles,
2174 int method, double dp, double minDist,
2175 double param1 = 100, double param2 = 100,
2176 int minRadius = 0, int maxRadius = 0 );
2177
2179
2182
2211 CV_EXPORTS_W void erode( InputArray src, OutputArray dst, InputArray kernel,
2212 Point anchor = Point(-1,-1), int iterations = 1,
2213 int borderType = BORDER_CONSTANT,
2214 const Scalar& borderValue = morphologyDefaultBorderValue() );
2215
2243 CV_EXPORTS_W void dilate( InputArray src, OutputArray dst, InputArray kernel,
2244 Point anchor = Point(-1,-1), int iterations = 1,
2245 int borderType = BORDER_CONSTANT,
2246 const Scalar& borderValue = morphologyDefaultBorderValue() );
2247
2272 CV_EXPORTS_W void morphologyEx( InputArray src, OutputArray dst,
2273 int op, InputArray kernel,
2274 Point anchor = Point(-1,-1), int iterations = 1,
2275 int borderType = BORDER_CONSTANT,
2276 const Scalar& borderValue = morphologyDefaultBorderValue() );
2277
2279
2282
2317 CV_EXPORTS_W void resize( InputArray src, OutputArray dst,
2318 Size dsize, double fx = 0, double fy = 0,
2319 int interpolation = INTER_LINEAR );
2320
2345 CV_EXPORTS_W void warpAffine( InputArray src, OutputArray dst,
2346 InputArray M, Size dsize,
2347 int flags = INTER_LINEAR,
2348 int borderMode = BORDER_CONSTANT,
2349 const Scalar& borderValue = Scalar());
2350
2377 CV_EXPORTS_W void warpPerspective( InputArray src, OutputArray dst,
2378 InputArray M, Size dsize,
2379 int flags = INTER_LINEAR,
2380 int borderMode = BORDER_CONSTANT,
2381 const Scalar& borderValue = Scalar());
2382
2415 CV_EXPORTS_W void remap( InputArray src, OutputArray dst,
2416 InputArray map1, InputArray map2,
2417 int interpolation, int borderMode = BORDER_CONSTANT,
2418 const Scalar& borderValue = Scalar());
2419
2450 CV_EXPORTS_W void convertMaps( InputArray map1, InputArray map2,
2451 OutputArray dstmap1, OutputArray dstmap2,
2452 int dstmap1type, bool nninterpolation = false );
2453
2473CV_EXPORTS_W Mat getRotationMatrix2D(Point2f center, double angle, double scale);
2474
2476 CV_EXPORTS Matx23d getRotationMatrix2D_(Point2f center, double angle, double scale);
2477
2478 inline
2479 Mat getRotationMatrix2D(Point2f center, double angle, double scale)
2480{
2481 return Mat(getRotationMatrix2D_(center, angle, scale), true);
2482}
2483
2499 CV_EXPORTS Mat getAffineTransform( const Point2f src[], const Point2f dst[] );
2500
2512 CV_EXPORTS_W void invertAffineTransform( InputArray M, OutputArray iM );
2513
2530 CV_EXPORTS_W Mat getPerspectiveTransform(InputArray src, InputArray dst, int solveMethod = DECOMP_LU);
2531
2533 CV_EXPORTS Mat getPerspectiveTransform(const Point2f src[], const Point2f dst[], int solveMethod = DECOMP_LU);
2534
2535
2536CV_EXPORTS_W Mat getAffineTransform( InputArray src, InputArray dst );
2537
2558 CV_EXPORTS_W void getRectSubPix( InputArray image, Size patchSize,
2559 Point2f center, OutputArray patch, int patchType = -1 );
2560
2604 CV_EXPORTS_W void logPolar( InputArray src, OutputArray dst,
2605 Point2f center, double M, int flags );
2606
2645 CV_EXPORTS_W void linearPolar( InputArray src, OutputArray dst,
2646 Point2f center, double maxRadius, int flags );
2647
2648
2736 CV_EXPORTS_W void warpPolar(InputArray src, OutputArray dst, Size dsize,
2737 Point2f center, double maxRadius, int flags);
2738
2739
2741
2744
2746 CV_EXPORTS_W void integral( InputArray src, OutputArray sum, int sdepth = -1 );
2747
2749 CV_EXPORTS_AS(integral2) void integral( InputArray src, OutputArray sum,
2750 OutputArray sqsum, int sdepth = -1, int sqdepth = -1 );
2751
2786 CV_EXPORTS_AS(integral3) void integral( InputArray src, OutputArray sum,
2787 OutputArray sqsum, OutputArray tilted,
2788 int sdepth = -1, int sqdepth = -1 );
2789
2791
2794
2812 CV_EXPORTS_W void accumulate( InputArray src, InputOutputArray dst,
2813 InputArray mask = noArray() );
2814
2831 CV_EXPORTS_W void accumulateSquare( InputArray src, InputOutputArray dst,
2832 InputArray mask = noArray() );
2833
2850 CV_EXPORTS_W void accumulateProduct( InputArray src1, InputArray src2,
2851 InputOutputArray dst, InputArray mask=noArray() );
2852
2871 CV_EXPORTS_W void accumulateWeighted( InputArray src, InputOutputArray dst,
2872 double alpha, InputArray mask = noArray() );
2873
2909 CV_EXPORTS_W Point2d phaseCorrelate(InputArray src1, InputArray src2,
2910 InputArray window = noArray(), CV_OUT double* response = 0);
2911
2927 CV_EXPORTS_W void createHanningWindow(OutputArray dst, Size winSize, int type);
2928
2942 CV_EXPORTS_W void divSpectrums(InputArray a, InputArray b, OutputArray c,
2943 int flags, bool conjB = false);
2944
2946
2949
2974 CV_EXPORTS_W double threshold( InputArray src, OutputArray dst,
2975 double thresh, double maxval, int type );
2976
2977
3003 CV_EXPORTS_W void adaptiveThreshold( InputArray src, OutputArray dst,
3004 double maxValue, int adaptiveMethod,
3005 int thresholdType, int blockSize, double C );
3006
3008
3011
3035 CV_EXPORTS_W void pyrDown( InputArray src, OutputArray dst,
3036 const Size& dstsize = Size(), int borderType = BORDER_DEFAULT );
3037
3055 CV_EXPORTS_W void pyrUp( InputArray src, OutputArray dst,
3056 const Size& dstsize = Size(), int borderType = BORDER_DEFAULT );
3057
3069 CV_EXPORTS void buildPyramid( InputArray src, OutputArrayOfArrays dst,
3070 int maxlevel, int borderType = BORDER_DEFAULT );
3071
3073
3076
3114 CV_EXPORTS void calcHist( const Mat* images, int nimages,
3115 const int* channels, InputArray mask,
3116 OutputArray hist, int dims, const int* histSize,
3117 const float** ranges, bool uniform = true, bool accumulate = false );
3118
3123 CV_EXPORTS void calcHist( const Mat* images, int nimages,
3124 const int* channels, InputArray mask,
3125 SparseMat& hist, int dims,
3126 const int* histSize, const float** ranges,
3127 bool uniform = true, bool accumulate = false );
3128
3130 CV_EXPORTS_W void calcHist( InputArrayOfArrays images,
3131 const std::vector<int>& channels,
3132 InputArray mask, OutputArray hist,
3133 const std::vector<int>& histSize,
3134 const std::vector<float>& ranges,
3135 bool accumulate = false );
3136
3176 CV_EXPORTS void calcBackProject( const Mat* images, int nimages,
3177 const int* channels, InputArray hist,
3178 OutputArray backProject, const float** ranges,
3179 double scale = 1, bool uniform = true );
3180
3182 CV_EXPORTS void calcBackProject( const Mat* images, int nimages,
3183 const int* channels, const SparseMat& hist,
3184 OutputArray backProject, const float** ranges,
3185 double scale = 1, bool uniform = true );
3186
3188 CV_EXPORTS_W void calcBackProject( InputArrayOfArrays images, const std::vector<int>& channels,
3189 InputArray hist, OutputArray dst,
3190 const std::vector<float>& ranges,
3191 double scale );
3192
3208 CV_EXPORTS_W double compareHist( InputArray H1, InputArray H2, int method );
3209
3211 CV_EXPORTS double compareHist( const SparseMat& H1, const SparseMat& H2, int method );
3212
3228 CV_EXPORTS_W void equalizeHist( InputArray src, OutputArray dst );
3229
3236 CV_EXPORTS_W Ptr<CLAHE> createCLAHE(double clipLimit = 40.0, Size tileGridSize = Size(8, 8));
3237
3272 CV_EXPORTS float EMD( InputArray signature1, InputArray signature2,
3273 int distType, InputArray cost=noArray(),
3274 float* lowerBound = 0, OutputArray flow = noArray() );
3275
3276 CV_EXPORTS_AS(EMD) float wrapperEMD( InputArray signature1, InputArray signature2,
3277 int distType, InputArray cost=noArray(),
3278 CV_IN_OUT Ptr<float> lowerBound = Ptr<float>(), OutputArray flow = noArray() );
3279
3281
3284
3313 CV_EXPORTS_W void watershed( InputArray image, InputOutputArray markers );
3314
3316
3319
3356 CV_EXPORTS_W void pyrMeanShiftFiltering( InputArray src, OutputArray dst,
3357 double sp, double sr, int maxLevel = 1,
3359
3361
3364
3388 CV_EXPORTS_W void grabCut( InputArray img, InputOutputArray mask, Rect rect,
3389 InputOutputArray bgdModel, InputOutputArray fgdModel,
3390 int iterCount, int mode = GC_EVAL );
3391
3393
3396
3454 CV_EXPORTS_AS(distanceTransformWithLabels) void distanceTransform( InputArray src, OutputArray dst,
3455 OutputArray labels, int distanceType, int maskSize,
3456 int labelType = DIST_LABEL_CCOMP );
3457
3469 CV_EXPORTS_W void distanceTransform( InputArray src, OutputArray dst,
3470 int distanceType, int maskSize, int dstType=CV_32F);
3471
3480 CV_EXPORTS int floodFill( InputOutputArray image,
3481 Point seedPoint, Scalar newVal, CV_OUT Rect* rect = 0,
3482 Scalar loDiff = Scalar(), Scalar upDiff = Scalar(),
3483 int flags = 4 );
3484
3556 CV_EXPORTS_W int floodFill( InputOutputArray image, InputOutputArray mask,
3557 Point seedPoint, Scalar newVal, CV_OUT Rect* rect=0,
3558 Scalar loDiff = Scalar(), Scalar upDiff = Scalar(),
3559 int flags = 4 );
3560
3568 CV_EXPORTS_W void blendLinear(InputArray src1, InputArray src2, InputArray weights1, InputArray weights2, OutputArray dst);
3569
3571
3574
3616 CV_EXPORTS_W void cvtColor( InputArray src, OutputArray dst, int code, int dstCn = 0 );
3617
3636 CV_EXPORTS_W void cvtColorTwoPlane( InputArray src1, InputArray src2, OutputArray dst, int code );
3637
3668 CV_EXPORTS_W void demosaicing(InputArray src, OutputArray dst, int code, int dstCn = 0);
3669
3671
3674
3691 CV_EXPORTS_W Moments moments( InputArray array, bool binaryImage = false );
3692
3712 CV_EXPORTS void HuMoments( const Moments& moments, double hu[7] );
3713
3715 CV_EXPORTS_W void HuMoments( const Moments& m, OutputArray hu );
3716
3718
3721
3724 TM_SQDIFF = 0,
3728 TM_SQDIFF_NORMED = 1,
3735 TM_CCORR = 2,
3739 TM_CCORR_NORMED = 3,
3746 TM_CCOEFF = 4,
3758 TM_CCOEFF_NORMED = 5
3762
3795 CV_EXPORTS_W void matchTemplate( InputArray image, InputArray templ,
3796 OutputArray result, int method, InputArray mask = noArray() );
3797
3799
3802
3824 CV_EXPORTS_AS(connectedComponentsWithAlgorithm) int connectedComponents(InputArray image, OutputArray labels,
3825 int connectivity, int ltype, int ccltype);
3826
3827
3835 CV_EXPORTS_W int connectedComponents(InputArray image, OutputArray labels,
3836 int connectivity = 8, int ltype = CV_32S);
3837
3838
3861 CV_EXPORTS_AS(connectedComponentsWithStatsWithAlgorithm) int connectedComponentsWithStats(InputArray image, OutputArray labels,
3862 OutputArray stats, OutputArray centroids,
3863 int connectivity, int ltype, int ccltype);
3864
3876 CV_EXPORTS_W int connectedComponentsWithStats(InputArray image, OutputArray labels,
3877 OutputArray stats, OutputArray centroids,
3878 int connectivity = 8, int ltype = CV_32S);
3879
3880
3906 CV_EXPORTS_W void findContours( InputArray image, OutputArrayOfArrays contours,
3907 OutputArray hierarchy, int mode,
3908 int method, Point offset = Point());
3909
3911 CV_EXPORTS void findContours( InputArray image, OutputArrayOfArrays contours,
3912 int mode, int method, Point offset = Point());
3913
3937 CV_EXPORTS_W void approxPolyDP( InputArray curve,
3938 OutputArray approxCurve,
3939 double epsilon, bool closed );
3940
3948 CV_EXPORTS_W double arcLength( InputArray curve, bool closed );
3949
3957 CV_EXPORTS_W Rect boundingRect( InputArray array );
3958
3989 CV_EXPORTS_W double contourArea( InputArray contour, bool oriented = false );
3990
3999 CV_EXPORTS_W RotatedRect minAreaRect( InputArray points );
4000
4010 CV_EXPORTS_W void boxPoints(RotatedRect box, OutputArray points);
4011
4020 CV_EXPORTS_W void minEnclosingCircle( InputArray points,
4021 CV_OUT Point2f& center, CV_OUT float& radius );
4022
4045 CV_EXPORTS_W double minEnclosingTriangle( InputArray points, CV_OUT OutputArray triangle );
4046
4056 CV_EXPORTS_W double matchShapes( InputArray contour1, InputArray contour2,
4057 int method, double parameter );
4058
4090 CV_EXPORTS_W void convexHull( InputArray points, OutputArray hull,
4091 bool clockwise = false, bool returnPoints = true );
4092
4110 CV_EXPORTS_W void convexityDefects( InputArray contour, InputArray convexhull, OutputArray convexityDefects );
4111
4119 CV_EXPORTS_W bool isContourConvex( InputArray contour );
4120
4138 CV_EXPORTS_W float intersectConvexConvex( InputArray p1, InputArray p2,
4139 OutputArray p12, bool handleNested = true );
4140
4155 CV_EXPORTS_W RotatedRect fitEllipse( InputArray points );
4156
4192 CV_EXPORTS_W RotatedRect fitEllipseAMS( InputArray points );
4193
4194
4237 CV_EXPORTS_W RotatedRect fitEllipseDirect( InputArray points );
4238
4273 CV_EXPORTS_W void fitLine( InputArray points, OutputArray line, int distType,
4274 double param, double reps, double aeps );
4275
4292 CV_EXPORTS_W double pointPolygonTest( InputArray contour, Point2f pt, bool measureDist );
4293
4309 CV_EXPORTS_W int rotatedRectangleIntersection( const RotatedRect& rect1, const RotatedRect& rect2, OutputArray intersectingRegion );
4310
4314
4318
4320
4323
4326{
4348 COLORMAP_DEEPGREEN = 21
4350
4361 CV_EXPORTS_W void applyColorMap(InputArray src, OutputArray dst, int colormap);
4362
4369 CV_EXPORTS_W void applyColorMap(InputArray src, OutputArray dst, InputArray userColor);
4370
4372
4375
4376
4378 #define CV_RGB(r, g, b) cv::Scalar((b), (g), (r), 0)
4379
4395 CV_EXPORTS_W void line(InputOutputArray img, Point pt1, Point pt2, const Scalar& color,
4396 int thickness = 1, int lineType = LINE_8, int shift = 0);
4397
4411 CV_EXPORTS_W void arrowedLine(InputOutputArray img, Point pt1, Point pt2, const Scalar& color,
4412 int thickness=1, int line_type=8, int shift=0, double tipLength=0.1);
4413
4428 CV_EXPORTS_W void rectangle(InputOutputArray img, Point pt1, Point pt2,
4429 const Scalar& color, int thickness = 1,
4430 int lineType = LINE_8, int shift = 0);
4431
4437 CV_EXPORTS_W void rectangle(InputOutputArray img, Rect rec,
4438 const Scalar& color, int thickness = 1,
4439 int lineType = LINE_8, int shift = 0);
4440
4457 CV_EXPORTS_W void circle(InputOutputArray img, Point center, int radius,
4458 const Scalar& color, int thickness = 1,
4459 int lineType = LINE_8, int shift = 0);
4460
4486 CV_EXPORTS_W void ellipse(InputOutputArray img, Point center, Size axes,
4487 double angle, double startAngle, double endAngle,
4488 const Scalar& color, int thickness = 1,
4489 int lineType = LINE_8, int shift = 0);
4490
4500 CV_EXPORTS_W void ellipse(InputOutputArray img, const RotatedRect& box, const Scalar& color,
4501 int thickness = 1, int lineType = LINE_8);
4502
4503 /* ----------------------------------------------------------------------------------------- */
4504 /* ADDING A SET OF PREDEFINED MARKERS WHICH COULD BE USED TO HIGHLIGHT POSITIONS IN AN IMAGE */
4505 /* ----------------------------------------------------------------------------------------- */
4506
4520 CV_EXPORTS_W void drawMarker(InputOutputArray img, Point position, const Scalar& color,
4521 int markerType = MARKER_CROSS, int markerSize=20, int thickness=1,
4522 int line_type=8);
4523
4524 /* ----------------------------------------------------------------------------------------- */
4525 /* END OF MARKER SECTION */
4526 /* ----------------------------------------------------------------------------------------- */
4527
4529 CV_EXPORTS void fillConvexPoly(InputOutputArray img, const Point* pts, int npts,
4530 const Scalar& color, int lineType = LINE_8,
4531 int shift = 0);
4532
4546 CV_EXPORTS_W void fillConvexPoly(InputOutputArray img, InputArray points,
4547 const Scalar& color, int lineType = LINE_8,
4548 int shift = 0);
4549
4551 CV_EXPORTS void fillPoly(InputOutputArray img, const Point** pts,
4552 const int* npts, int ncontours,
4553 const Scalar& color, int lineType = LINE_8, int shift = 0,
4554 Point offset = Point() );
4555
4574 CV_EXPORTS_W void fillPoly(InputOutputArray img, InputArrayOfArrays pts,
4575 const Scalar& color, int lineType = LINE_8, int shift = 0,
4576 Point offset = Point() );
4577
4579 CV_EXPORTS void polylines(InputOutputArray img, const Point* const* pts, const int* npts,
4580 int ncontours, bool isClosed, const Scalar& color,
4581 int thickness = 1, int lineType = LINE_8, int shift = 0 );
4582
4596 CV_EXPORTS_W void polylines(InputOutputArray img, InputArrayOfArrays pts,
4597 bool isClosed, const Scalar& color,
4598 int thickness = 1, int lineType = LINE_8, int shift = 0 );
4599
4637 CV_EXPORTS_W void drawContours( InputOutputArray image, InputArrayOfArrays contours,
4638 int contourIdx, const Scalar& color,
4639 int thickness = 1, int lineType = LINE_8,
4640 InputArray hierarchy = noArray(),
4641 int maxLevel = INT_MAX, Point offset = Point() );
4642
4652 CV_EXPORTS bool clipLine(Size imgSize, CV_IN_OUT Point& pt1, CV_IN_OUT Point& pt2);
4653
4659 CV_EXPORTS bool clipLine(Size2l imgSize, CV_IN_OUT Point2l& pt1, CV_IN_OUT Point2l& pt2);
4660
4666 CV_EXPORTS_W bool clipLine(Rect imgRect, CV_OUT CV_IN_OUT Point& pt1, CV_OUT CV_IN_OUT Point& pt2);
4667
4682 CV_EXPORTS_W void ellipse2Poly( Point center, Size axes, int angle,
4683 int arcStart, int arcEnd, int delta,
4684 CV_OUT std::vector<Point>& pts );
4685
4695 CV_EXPORTS void ellipse2Poly(Point2d center, Size2d axes, int angle,
4696 int arcStart, int arcEnd, int delta,
4697 CV_OUT std::vector<Point2d>& pts);
4698
4716 CV_EXPORTS_W void putText( InputOutputArray img, const String& text, Point org,
4717 int fontFace, double fontScale, Scalar color,
4718 int thickness = 1, int lineType = LINE_8,
4719 bool bottomLeftOrigin = false );
4720
4766 CV_EXPORTS_W Size getTextSize(const String& text, int fontFace,
4767 double fontScale, int thickness,
4768 CV_OUT int* baseLine);
4769
4770
4780 CV_EXPORTS_W double getFontScaleFromHeight(const int fontFace,
4781 const int pixelHeight,
4782 const int thickness = 1);
4783
4816 class CV_EXPORTS LineIterator
4817{
4818 public:
4828 LineIterator( const Mat& img, Point pt1, Point pt2,
4829 int connectivity = 8, bool leftToRight = false )
4830 {
4831 init(&img, Rect(0, 0, img.cols, img.rows), pt1, pt2, connectivity, leftToRight);
4832 ptmode = false;
4833 }
4834 LineIterator( Point pt1, Point pt2,
4835 int connectivity = 8, bool leftToRight = false )
4836 {
4837 init(0, Rect(std::min(pt1.x, pt2.x),
4838 std::min(pt1.y, pt2.y),
4839 std::max(pt1.x, pt2.x) - std::min(pt1.x, pt2.x) + 1,
4840 std::max(pt1.y, pt2.y) - std::min(pt1.y, pt2.y) + 1),
4841 pt1, pt2, connectivity, leftToRight);
4842 ptmode = true;
4843 }
4844 LineIterator( Size boundingAreaSize, Point pt1, Point pt2,
4845 int connectivity = 8, bool leftToRight = false )
4846 {
4847 init(0, Rect(0, 0, boundingAreaSize.width, boundingAreaSize.height),
4848 pt1, pt2, connectivity, leftToRight);
4849 ptmode = true;
4850 }
4851 LineIterator( Rect boundingAreaRect, Point pt1, Point pt2,
4852 int connectivity = 8, bool leftToRight = false )
4853 {
4854 init(0, boundingAreaRect, pt1, pt2, connectivity, leftToRight);
4855 ptmode = true;
4856 }
4857 void init(const Mat* img, Rect boundingAreaRect, Point pt1, Point pt2, int connectivity, bool leftToRight);
4858
4861 uchar* operator *();
4864 LineIterator& operator ++();
4867 LineIterator operator ++(int);
4870 Point pos() const;
4871
4872 uchar* ptr;
4873 const uchar* ptr0;
4874 int step, elemSize;
4875 int err, count;
4876 int minusDelta, plusDelta;
4877 int minusStep, plusStep;
4878 int minusShift, plusShift;
4879 Point p;
4880 bool ptmode;
4881};
4882
4884
4885 // === LineIterator implementation ===
4886
4887 inline
4889{
4890 return ptmode ? 0 : ptr;
4891}
4892
4893 inline
4894LineIterator& LineIterator::operator ++()
4895{
4896 int mask = err < 0 ? -1 : 0;
4897 err += minusDelta + (plusDelta & mask);
4898 if(!ptmode)
4899 {
4900 ptr += minusStep + (plusStep & mask);
4901 }
4902 else
4903 {
4904 p.x += minusShift + (plusShift & mask);
4905 p.y += minusStep + (plusStep & mask);
4906 }
4907 return *this;
4908}
4909
4910 inline
4911LineIterator LineIterator::operator ++(int)
4912{
4913 LineIterator it = *this;
4914 ++(*this);
4915 return it;
4916}
4917
4918 inline
4919Point LineIterator::pos() const
4920 {
4921 if(!ptmode)
4922 {
4923 size_t offset = (size_t)(ptr - ptr0);
4924 int y = (int)(offset/step);
4925 int x = (int)((offset - (size_t)y*step)/elemSize);
4926 return Point(x, y);
4927 }
4928 return p;
4929}
4930
4932
4934
4936
4937} // cv
4938
4939
4940 #include "./imgproc/segmentation.hpp"
4941
4942
4943 #endif
Definition: mat.hpp:386
This type is very similar to InputArray except that it is used for input/output and output function p...
Definition: mat.hpp:295
This is a base class for all more or less complex algorithms in OpenCV
Definition: core.hpp:3091
Base class for Contrast Limited Adaptive Histogram Equalization.
Definition: imgproc.hpp:962
finds arbitrary template in the grayscale image using Generalized Hough Transform
Definition: imgproc.hpp:887
finds arbitrary template in the grayscale image using Generalized Hough Transform
Definition: imgproc.hpp:903
finds arbitrary template in the grayscale image using Generalized Hough Transform
Definition: imgproc.hpp:851
Line iterator
Definition: imgproc.hpp:4817
LineIterator & operator++()
prefix increment operator (++it). shifts iterator to the next pixel
LineIterator(const Mat &img, Point pt1, Point pt2, int connectivity=8, bool leftToRight=false)
initializes the iterator
Definition: imgproc.hpp:4828
uchar * operator*()
returns pointer to the current pixel
Point pos() const
returns coordinates of the current pixel
Line segment detector class
Definition: imgproc.hpp:1270
n-dimensional dense array class
Definition: mat.hpp:802
int rows
the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions
Definition: mat.hpp:2107
Template class for small matrices whose type and size are known at compilation time
Definition: matx.hpp:100
struct returned by cv::moments
Definition: core/types.hpp:927
_Tp y
y coordinate of the point
Definition: core/types.hpp:187
_Tp x
x coordinate of the point
Definition: core/types.hpp:186
Template class for 2D rectangles
Definition: core/types.hpp:421
The class represents rotated (i.e. not up-right) rectangles on a plane.
Definition: core/types.hpp:504
static Scalar_< double > all(double v0)
returns a scalar with all elements set to v0
Template class for specifying the size of an image or rectangle.
Definition: core/types.hpp:316
The class SparseMat represents multi-dimensional sparse numerical arrays.
Definition: mat.hpp:2704
Definition: imgproc.hpp:999
Point2f topLeft
Top left corner of the bounding rect
Definition: imgproc.hpp:1252
Point2f bottomRight
Bottom right corner of the bounding rect
Definition: imgproc.hpp:1254
std::vector< QuadEdge > qedges
All of the edges
Definition: imgproc.hpp:1245
std::vector< Vertex > vtx
All of the vertices
Definition: imgproc.hpp:1243
The class defining termination criteria for iterative algorithms.
Definition: core/types.hpp:853
@ MAX_ITER
ditto
Definition: core/types.hpp:861
@ EPS
the desired accuracy or change in parameters at which the iterative algorithm stops
Definition: core/types.hpp:862
CV_EXPORTS_AS(calibrateCameraExtended) double calibrateCamera(InputArrayOfArrays objectPoints
Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
CV_EXPORTS_W void max(InputArray src1, InputArray src2, OutputArray dst)
Calculates per-element maximum of two arrays or an array and a scalar.
CV_EXPORTS_W void rotate(InputArray src, OutputArray dst, int rotateCode)
Rotates a 2D array in multiples of 90 degrees. The function cv::rotate rotates the array in one of th...
CV_EXPORTS_W void min(InputArray src1, InputArray src2, OutputArray dst)
Calculates per-element minimum of two arrays or an array and a scalar.
CV_EXPORTS_W void normalize(InputArray src, InputOutputArray dst, double alpha=1, double beta=0, int norm_type=NORM_L2, int dtype=-1, InputArray mask=noArray())
Normalizes the norm or value range of an array.
@ BORDER_CONSTANT
iiiiii|abcdefgh|iiiiiii with some specified i
Definition: base.hpp:269
@ BORDER_DEFAULT
same as BORDER_REFLECT_101
Definition: base.hpp:277
@ DECOMP_LU
Definition: base.hpp:135
CV_EXPORTS_W void demosaicing(InputArray src, OutputArray dst, int code, int dstCn=0)
main function for all demosaicing processes
ColorConversionCodes
Definition: imgproc.hpp:532
CV_EXPORTS_W void cvtColorTwoPlane(InputArray src1, InputArray src2, OutputArray dst, int code)
Converts an image from one color space to another where the source image is stored in two planes.
CV_EXPORTS_W void cvtColor(InputArray src, OutputArray dst, int code, int dstCn=0)
Converts an image from one color space to another.
@ COLOR_BayerBG2BGR_VNG
Demosaicing using Variable Number of Gradients
Definition: imgproc.hpp:764
@ COLOR_HLS2BGR
backward conversions HLS to RGB/BGR with H range 0..180 if 8 bit image
Definition: imgproc.hpp:612
@ COLOR_HSV2BGR
backward conversions HSV to RGB/BGR with H range 0..180 if 8 bit image
Definition: imgproc.hpp:605
@ COLOR_BGR2HSV_FULL
convert RGB/BGR to HSV (hue saturation value) with H range 0..255 if 8 bit image, color conversions
Definition: imgproc.hpp:615
@ COLOR_BGR2HLS
convert RGB/BGR to HLS (hue lightness saturation) with H range 0..180 if 8 bit image,...
Definition: imgproc.hpp:602
@ COLOR_BGR2GRAY
convert between RGB/BGR and grayscale, color conversions
Definition: imgproc.hpp:551
@ COLOR_BGRA2BGR
remove alpha channel from RGB or BGR image
Definition: imgproc.hpp:536
@ COLOR_YUV2RGB_UYVY
YUV 4:2:2 family to RGB
Definition: imgproc.hpp:683
@ COLOR_BGR2YUV
convert between RGB/BGR and YUV
Definition: imgproc.hpp:635
@ COLOR_BGR2YCrCb
convert RGB/BGR to luma-chroma (aka YCC), color conversions
Definition: imgproc.hpp:589
@ COLOR_BayerBG2BGRA
Demosaicing with alpha channel
Definition: imgproc.hpp:786
@ COLOR_GRAY2BGR555
convert between grayscale and BGR555 (16-bit images)
Definition: imgproc.hpp:581
@ COLOR_HLS2BGR_FULL
backward conversions HLS to RGB/BGR with H range 0..255 if 8 bit image
Definition: imgproc.hpp:622
@ COLOR_HSV2BGR_FULL
backward conversions HSV to RGB/BGR with H range 0..255 if 8 bit image
Definition: imgproc.hpp:620
@ COLOR_BGR2Luv
convert RGB/BGR to CIE Luv, color conversions
Definition: imgproc.hpp:600
@ COLOR_YUV2RGB_NV12
YUV 4:2:0 family to RGB
Definition: imgproc.hpp:641
@ COLOR_BGR2Lab
convert RGB/BGR to CIE Lab, color conversions
Definition: imgproc.hpp:597
@ COLOR_BayerBG2BGR
Demosaicing
Definition: imgproc.hpp:748
@ COLOR_GRAY2BGR565
convert between grayscale to BGR565 (16-bit images)
Definition: imgproc.hpp:569
@ COLOR_RGBA2mRGBA
alpha premultiplication
Definition: imgproc.hpp:729
@ COLOR_RGB2YUV_I420
RGB to YUV 4:2:0 family
Definition: imgproc.hpp:733
@ COLOR_BGR2BGRA
add alpha channel to RGB or BGR image
Definition: imgproc.hpp:533
@ COLOR_BGR2RGBA
convert between RGB and BGR color spaces (with or without alpha channel)
Definition: imgproc.hpp:539
@ COLOR_BGR2HSV
convert RGB/BGR to HSV (hue saturation value) with H range 0..180 if 8 bit image, color conversions
Definition: imgproc.hpp:594
@ COLOR_BGR2XYZ
convert RGB/BGR to CIE XYZ, color conversions
Definition: imgproc.hpp:584
@ COLOR_BGR2BGR555
convert between RGB/BGR and BGR555 (16-bit images)
Definition: imgproc.hpp:572
@ COLOR_BGR2HLS_FULL
convert RGB/BGR to HLS (hue lightness saturation) with H range 0..255 if 8 bit image,...
Definition: imgproc.hpp:617
@ COLOR_BGR2BGR565
convert between RGB/BGR and BGR565 (16-bit images)
Definition: imgproc.hpp:560
@ COLOR_BayerBG2BGR_EA
Edge-Aware Demosaicing
Definition: imgproc.hpp:775
CV_EXPORTS_W void applyColorMap(InputArray src, OutputArray dst, int colormap)
Applies a GNU Octave/MATLAB equivalent colormap on a given image.
ColormapTypes
GNU Octave/MATLAB equivalent colormaps
Definition: imgproc.hpp:4326
@ COLORMAP_HSV
Definition: imgproc.hpp:4336
@ COLORMAP_COOL
Definition: imgproc.hpp:4335
@ COLORMAP_TWILIGHT
Definition: imgproc.hpp:4345
@ COLORMAP_PARULA
Definition: imgproc.hpp:4339
@ COLORMAP_AUTUMN
Definition: imgproc.hpp:4327
@ COLORMAP_SUMMER
Definition: imgproc.hpp:4333
@ COLORMAP_TURBO
Definition: imgproc.hpp:4347
@ COLORMAP_WINTER
Definition: imgproc.hpp:4330
@ COLORMAP_PLASMA
Definition: imgproc.hpp:4342
@ COLORMAP_PINK
Definition: imgproc.hpp:4337
@ COLORMAP_DEEPGREEN
Definition: imgproc.hpp:4348
@ COLORMAP_OCEAN
Definition: imgproc.hpp:4332
@ COLORMAP_BONE
Definition: imgproc.hpp:4328
@ COLORMAP_CIVIDIS
Definition: imgproc.hpp:4344
@ COLORMAP_JET
Definition: imgproc.hpp:4329
@ COLORMAP_INFERNO
Definition: imgproc.hpp:4341
@ COLORMAP_MAGMA
Definition: imgproc.hpp:4340
@ COLORMAP_TWILIGHT_SHIFTED
Definition: imgproc.hpp:4346
@ COLORMAP_HOT
Definition: imgproc.hpp:4338
@ COLORMAP_RAINBOW
Definition: imgproc.hpp:4331
@ COLORMAP_VIRIDIS
Definition: imgproc.hpp:4343
@ COLORMAP_SPRING
Definition: imgproc.hpp:4334
CV_EXPORTS_W void arrowedLine(InputOutputArray img, Point pt1, Point pt2, const Scalar &color, int thickness=1, int line_type=8, int shift=0, double tipLength=0.1)
Draws a arrow segment pointing from the first point to the second one.
MarkerTypes
Definition: imgproc.hpp:838
HersheyFonts
Definition: imgproc.hpp:822
CV_EXPORTS_W Size getTextSize(const String &text, int fontFace, double fontScale, int thickness, CV_OUT int *baseLine)
Calculates the width and height of a text string.
CV_EXPORTS_W void rectangle(InputOutputArray img, Point pt1, Point pt2, const Scalar &color, int thickness=1, int lineType=LINE_8, int shift=0)
Draws a simple, thick, or filled up-right rectangle.
CV_EXPORTS_W double getFontScaleFromHeight(const int fontFace, const int pixelHeight, const int thickness=1)
Calculates the font-specific size to use to achieve a given height in pixels.
CV_EXPORTS_W void putText(InputOutputArray img, const String &text, Point org, int fontFace, double fontScale, Scalar color, int thickness=1, int lineType=LINE_8, bool bottomLeftOrigin=false)
Draws a text string.
CV_EXPORTS void fillPoly(InputOutputArray img, const Point **pts, const int *npts, int ncontours, const Scalar &color, int lineType=LINE_8, int shift=0, Point offset=Point())
CV_EXPORTS_W 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())
Draws contours outlines or filled contours.
CV_EXPORTS void polylines(InputOutputArray 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)
CV_EXPORTS_W void ellipse(InputOutputArray img, Point center, Size axes, double angle, double startAngle, double endAngle, const Scalar &color, int thickness=1, int lineType=LINE_8, int shift=0)
Draws a simple or thick elliptic arc or fills an ellipse sector.
CV_EXPORTS_W void line(InputOutputArray img, Point pt1, Point pt2, const Scalar &color, int thickness=1, int lineType=LINE_8, int shift=0)
Draws a line segment connecting two points.
CV_EXPORTS_W void ellipse2Poly(Point center, Size axes, int angle, int arcStart, int arcEnd, int delta, CV_OUT std::vector< Point > &pts)
Approximates an elliptic arc with a polyline.
CV_EXPORTS void fillConvexPoly(InputOutputArray img, const Point *pts, int npts, const Scalar &color, int lineType=LINE_8, int shift=0)
CV_EXPORTS bool clipLine(Size imgSize, CV_IN_OUT Point &pt1, CV_IN_OUT Point &pt2)
Clips the line against the image rectangle.
CV_EXPORTS_W void circle(InputOutputArray img, Point center, int radius, const Scalar &color, int thickness=1, int lineType=LINE_8, int shift=0)
Draws a circle.
LineTypes
Definition: imgproc.hpp:812
CV_EXPORTS_W void drawMarker(InputOutputArray img, Point position, const Scalar &color, int markerType=MARKER_CROSS, int markerSize=20, int thickness=1, int line_type=8)
Draws a marker on a predefined position in an image.
@ MARKER_SQUARE
A square marker shape
Definition: imgproc.hpp:843
@ MARKER_DIAMOND
A diamond marker shape
Definition: imgproc.hpp:842
@ MARKER_TILTED_CROSS
A 45 degree tilted crosshair marker shape
Definition: imgproc.hpp:840
@ MARKER_TRIANGLE_DOWN
A downwards pointing triangle marker shape
Definition: imgproc.hpp:845
@ MARKER_STAR
A star marker shape, combination of cross and tilted cross
Definition: imgproc.hpp:841
@ MARKER_TRIANGLE_UP
An upwards pointing triangle marker shape
Definition: imgproc.hpp:844
@ MARKER_CROSS
A crosshair marker shape
Definition: imgproc.hpp:839
@ FONT_HERSHEY_PLAIN
small size sans-serif font
Definition: imgproc.hpp:824
@ FONT_HERSHEY_TRIPLEX
normal size serif font (more complex than FONT_HERSHEY_COMPLEX)
Definition: imgproc.hpp:827
@ FONT_HERSHEY_SCRIPT_SIMPLEX
hand-writing style font
Definition: imgproc.hpp:829
@ FONT_HERSHEY_SCRIPT_COMPLEX
more complex variant of FONT_HERSHEY_SCRIPT_SIMPLEX
Definition: imgproc.hpp:830
@ FONT_HERSHEY_DUPLEX
normal size sans-serif font (more complex than FONT_HERSHEY_SIMPLEX)
Definition: imgproc.hpp:825
@ FONT_HERSHEY_COMPLEX_SMALL
smaller version of FONT_HERSHEY_COMPLEX
Definition: imgproc.hpp:828
@ FONT_ITALIC
flag for italic font
Definition: imgproc.hpp:831
@ FONT_HERSHEY_COMPLEX
normal size serif font
Definition: imgproc.hpp:826
@ FONT_HERSHEY_SIMPLEX
normal size sans-serif font
Definition: imgproc.hpp:823
@ LINE_8
8-connected line
Definition: imgproc.hpp:815
@ LINE_4
4-connected line
Definition: imgproc.hpp:814
@ LINE_AA
antialiased line
Definition: imgproc.hpp:816
HoughModes
Variants of a Hough transform
Definition: imgproc.hpp:469
CV_EXPORTS_W void HoughLines(InputArray image, OutputArray lines, double rho, double theta, int threshold, double srn=0, double stn=0, double min_theta=0, double max_theta=CV_PI)
Finds lines in a binary image using the standard Hough transform.
CV_EXPORTS CV_WRAP_AS(goodFeaturesToTrackWithQuality) void goodFeaturesToTrack(InputArray image
Same as above, but returns also quality measure of the detected corners.
CV_EXPORTS_W void HoughLinesP(InputArray image, OutputArray lines, double rho, double theta, int threshold, double minLineLength=0, double maxLineGap=0)
Finds line segments in a binary image using the probabilistic Hough transform.
CV_EXPORTS_W void goodFeaturesToTrack(InputArray image, OutputArray corners, int maxCorners, double qualityLevel, double minDistance, InputArray mask=noArray(), int blockSize=3, bool useHarrisDetector=false, double k=0.04)
Determines strong corners on an image.
CV_EXPORTS_W void cornerMinEigenVal(InputArray src, OutputArray dst, int blockSize, int ksize=3, int borderType=BORDER_DEFAULT)
Calculates the minimal eigenvalue of gradient matrices for corner detection.
CV_EXPORTS_W void cornerSubPix(InputArray image, InputOutputArray corners, Size winSize, Size zeroZone, TermCriteria criteria)
Refines the corner locations.
CV_EXPORTS_W void cornerEigenValsAndVecs(InputArray src, OutputArray dst, int blockSize, int ksize, int borderType=BORDER_DEFAULT)
Calculates eigenvalues and eigenvectors of image blocks for corner detection.
CV_EXPORTS_W void cornerHarris(InputArray src, OutputArray dst, int blockSize, int ksize, double k, int borderType=BORDER_DEFAULT)
Harris corner detector.
CV_EXPORTS_W void HoughLinesPointSet(InputArray point, OutputArray lines, int lines_max, int threshold, double min_rho, double max_rho, double rho_step, double min_theta, double max_theta, double theta_step)
Finds lines in a set of points using the standard Hough transform.
CV_EXPORTS_W void HoughCircles(InputArray image, OutputArray circles, int method, double dp, double minDist, double param1=100, double param2=100, int minRadius=0, int maxRadius=0)
Finds circles in a grayscale image using the Hough transform.
CV_EXPORTS_W void preCornerDetect(InputArray src, OutputArray dst, int ksize, int borderType=BORDER_DEFAULT)
Calculates a feature map for corner detection.
CV_EXPORTS_W Ptr< LineSegmentDetector > createLineSegmentDetector(int refine=LSD_REFINE_STD, double scale=0.8, double sigma_scale=0.6, double quant=2.0, double ang_th=22.5, double log_eps=0, double density_th=0.7, int n_bins=1024)
Creates a smart pointer to a LineSegmentDetector object and initializes it.
LineSegmentDetectorModes
Variants of Line Segment Detector
Definition: imgproc.hpp:489
CV_EXPORTS_W void Canny(InputArray image, OutputArray edges, double threshold1, double threshold2, int apertureSize=3, bool L2gradient=false)
Finds edges in an image using the Canny algorithm .
@ HOUGH_MULTI_SCALE
Definition: imgproc.hpp:483
@ HOUGH_PROBABILISTIC
Definition: imgproc.hpp:480
@ HOUGH_GRADIENT_ALT
variation of HOUGH_GRADIENT to get better accuracy
Definition: imgproc.hpp:485
@ HOUGH_GRADIENT
basically 21HT, described in
Definition: imgproc.hpp:484
@ HOUGH_STANDARD
Definition: imgproc.hpp:475
@ LSD_REFINE_NONE
No refinement applied
Definition: imgproc.hpp:490
@ LSD_REFINE_ADV
Definition: imgproc.hpp:492
@ LSD_REFINE_STD
Standard refinement is applied. E.g. breaking arches into smaller straighter line approximations.
Definition: imgproc.hpp:491
CV_EXPORTS_W Mat getGaborKernel(Size ksize, double sigma, double theta, double lambd, double gamma, double psi=CV_PI *0.5, int ktype=CV_64F)
Returns Gabor filter coefficients.
CV_EXPORTS_W void pyrDown(InputArray src, OutputArray dst, const Size &dstsize=Size(), int borderType=BORDER_DEFAULT)
Blurs an image and downsamples it.
CV_EXPORTS_W void bilateralFilter(InputArray src, OutputArray dst, int d, double sigmaColor, double sigmaSpace, int borderType=BORDER_DEFAULT)
Applies the bilateral filter to an image.
CV_EXPORTS_W void pyrMeanShiftFiltering(InputArray src, OutputArray dst, double sp, double sr, int maxLevel=1, TermCriteria termcrit=TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS, 5, 1))
Performs initial step of meanshift segmentation of an image.
CV_EXPORTS_W void erode(InputArray src, OutputArray dst, InputArray kernel, Point anchor=Point(-1,-1), int iterations=1, int borderType=BORDER_CONSTANT, const Scalar &borderValue=morphologyDefaultBorderValue())
Erodes an image by using a specific structuring element.
CV_EXPORTS_W void getDerivKernels(OutputArray kx, OutputArray ky, int dx, int dy, int ksize, bool normalize=false, int ktype=CV_32F)
Returns filter coefficients for computing spatial image derivatives.
CV_EXPORTS_W void filter2D(InputArray src, OutputArray dst, int ddepth, InputArray kernel, Point anchor=Point(-1,-1), double delta=0, int borderType=BORDER_DEFAULT)
Convolves an image with the kernel.
CV_EXPORTS_W void sepFilter2D(InputArray src, OutputArray dst, int ddepth, InputArray kernelX, InputArray kernelY, Point anchor=Point(-1,-1), double delta=0, int borderType=BORDER_DEFAULT)
Applies a separable linear filter to an image.
CV_EXPORTS_W Mat getStructuringElement(int shape, Size ksize, Point anchor=Point(-1,-1))
Returns a structuring element of the specified size and shape for morphological operations.
CV_EXPORTS_W Mat getGaussianKernel(int ksize, double sigma, int ktype=CV_64F)
Returns Gaussian filter coefficients.
CV_EXPORTS_W void Sobel(InputArray src, OutputArray dst, int ddepth, int dx, int dy, int ksize=3, double scale=1, double delta=0, int borderType=BORDER_DEFAULT)
Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator.
CV_EXPORTS_W void morphologyEx(InputArray src, OutputArray dst, int op, InputArray kernel, Point anchor=Point(-1,-1), int iterations=1, int borderType=BORDER_CONSTANT, const Scalar &borderValue=morphologyDefaultBorderValue())
Performs advanced morphological transformations.
CV_EXPORTS_W void spatialGradient(InputArray src, OutputArray dx, OutputArray dy, int ksize=3, int borderType=BORDER_DEFAULT)
Calculates the first order image derivative in both x and y using a Sobel operator
MorphTypes
type of morphological operation
Definition: imgproc.hpp:213
CV_EXPORTS_W void GaussianBlur(InputArray src, OutputArray dst, Size ksize, double sigmaX, double sigmaY=0, int borderType=BORDER_DEFAULT)
Blurs an image using a Gaussian filter.
static Scalar morphologyDefaultBorderValue()
returns "magic" border value for erosion and dilation. It is automatically transformed to Scalar::all...
Definition: imgproc.hpp:1402
CV_EXPORTS_W void boxFilter(InputArray src, OutputArray dst, int ddepth, Size ksize, Point anchor=Point(-1,-1), bool normalize=true, int borderType=BORDER_DEFAULT)
Blurs an image using the box filter.
CV_EXPORTS_W void sqrBoxFilter(InputArray src, OutputArray dst, int ddepth, Size ksize, Point anchor=Point(-1, -1), bool normalize=true, int borderType=BORDER_DEFAULT)
Calculates the normalized sum of squares of the pixel values overlapping the filter.
CV_EXPORTS_W void blur(InputArray src, OutputArray dst, Size ksize, Point anchor=Point(-1,-1), int borderType=BORDER_DEFAULT)
Blurs an image using the normalized box filter.
MorphShapes
shape of the structuring element
Definition: imgproc.hpp:231
CV_EXPORTS_W void medianBlur(InputArray src, OutputArray dst, int ksize)
Blurs an image using the median filter.
CV_EXPORTS_W void pyrUp(InputArray src, OutputArray dst, const Size &dstsize=Size(), int borderType=BORDER_DEFAULT)
Upsamples an image and then blurs it.
CV_EXPORTS_W void Scharr(InputArray src, OutputArray dst, int ddepth, int dx, int dy, double scale=1, double delta=0, int borderType=BORDER_DEFAULT)
Calculates the first x- or y- image derivative using Scharr operator.
CV_EXPORTS_W void dilate(InputArray src, OutputArray dst, InputArray kernel, Point anchor=Point(-1,-1), int iterations=1, int borderType=BORDER_CONSTANT, const Scalar &borderValue=morphologyDefaultBorderValue())
Dilates an image by using a specific structuring element.
CV_EXPORTS void buildPyramid(InputArray src, OutputArrayOfArrays dst, int maxlevel, int borderType=BORDER_DEFAULT)
Constructs the Gaussian pyramid for an image.
CV_EXPORTS_W void Laplacian(InputArray src, OutputArray dst, int ddepth, int ksize=1, double scale=1, double delta=0, int borderType=BORDER_DEFAULT)
Calculates the Laplacian of an image.
@ MORPH_OPEN
Definition: imgproc.hpp:216
@ MORPH_BLACKHAT
Definition: imgproc.hpp:224
@ MORPH_DILATE
see dilate
Definition: imgproc.hpp:215
@ MORPH_CLOSE
Definition: imgproc.hpp:218
@ MORPH_GRADIENT
Definition: imgproc.hpp:220
@ MORPH_ERODE
see erode
Definition: imgproc.hpp:214
@ MORPH_HITMISS
Definition: imgproc.hpp:226
@ MORPH_TOPHAT
Definition: imgproc.hpp:222
@ MORPH_RECT
a rectangular structuring element:
Definition: imgproc.hpp:232
@ MORPH_CROSS
Definition: imgproc.hpp:233
@ MORPH_ELLIPSE
Definition: imgproc.hpp:235
CV_EXPORTS_W double compareHist(InputArray H1, InputArray H2, int method)
Compares two histograms.
CV_EXPORTS float EMD(InputArray signature1, InputArray signature2, int distType, InputArray cost=noArray(), float *lowerBound=0, OutputArray flow=noArray())
Computes the "minimal work" distance between two weighted point configurations.
HistCompMethods
Definition: imgproc.hpp:501
CV_EXPORTS_W void equalizeHist(InputArray src, OutputArray dst)
Equalizes the histogram of a grayscale image.
CV_EXPORTS_W Ptr< CLAHE > createCLAHE(double clipLimit=40.0, Size tileGridSize=Size(8, 8))
Creates a smart pointer to a cv::CLAHE class and initializes it.
CV_EXPORTS void calcBackProject(const Mat *images, int nimages, const int *channels, InputArray hist, OutputArray backProject, const float **ranges, double scale=1, bool uniform=true)
Calculates the back projection of a histogram.
CV_EXPORTS void calcHist(const Mat *images, int nimages, const int *channels, InputArray mask, OutputArray hist, int dims, const int *histSize, const float **ranges, bool uniform=true, bool accumulate=false)
Calculates a histogram of a set of arrays.
@ HISTCMP_CHISQR_ALT
Definition: imgproc.hpp:522
@ HISTCMP_KL_DIV
Definition: imgproc.hpp:525
@ HISTCMP_CORREL
Definition: imgproc.hpp:507
@ HISTCMP_CHISQR
Definition: imgproc.hpp:510
@ HISTCMP_HELLINGER
Synonym for HISTCMP_BHATTACHARYYA
Definition: imgproc.hpp:518
@ HISTCMP_BHATTACHARYYA
Definition: imgproc.hpp:517
@ HISTCMP_INTERSECT
Definition: imgproc.hpp:513
CV_EXPORTS_W void distanceTransform(InputArray src, OutputArray dst, int distanceType, int maskSize, int dstType=CV_32F)
DistanceTransformLabelTypes
distanceTransform algorithm flags
Definition: imgproc.hpp:368
CV_EXPORTS_W void integral(InputArray src, OutputArray sum, int sdepth=-1)
CV_EXPORTS_W void adaptiveThreshold(InputArray src, OutputArray dst, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double C)
Applies an adaptive threshold to an array.
DistanceTypes
Definition: imgproc.hpp:300
AdaptiveThresholdTypes
Definition: imgproc.hpp:333
ThresholdTypes
Definition: imgproc.hpp:320
DistanceTransformMasks
Mask size for distance transform
Definition: imgproc.hpp:312
FloodFillFlags
floodfill algorithm flags
Definition: imgproc.hpp:377
CV_EXPORTS_W double threshold(InputArray src, OutputArray dst, double thresh, double maxval, int type)
Applies a fixed-level threshold to each array element.
CV_EXPORTS_W void blendLinear(InputArray src1, InputArray src2, InputArray weights1, InputArray weights2, OutputArray dst)
CV_EXPORTS int floodFill(InputOutputArray image, Point seedPoint, Scalar newVal, CV_OUT Rect *rect=0, Scalar loDiff=Scalar(), Scalar upDiff=Scalar(), int flags=4)
GrabCutClasses
class of the pixel in GrabCut algorithm
Definition: imgproc.hpp:345
GrabCutModes
GrabCut algorithm flags
Definition: imgproc.hpp:353
@ DIST_LABEL_PIXEL
Definition: imgproc.hpp:373
@ DIST_LABEL_CCOMP
Definition: imgproc.hpp:371
@ DIST_C
distance = max(|x1-x2|,|y1-y2|)
Definition: imgproc.hpp:304
@ DIST_L12
L1-L2 metric: distance = 2(sqrt(1+x*x/2) - 1))
Definition: imgproc.hpp:305
@ DIST_USER
User defined distance
Definition: imgproc.hpp:301
@ DIST_WELSCH
distance = c^2/2(1-exp(-(x/c)^2)), c = 2.9846
Definition: imgproc.hpp:307
@ DIST_HUBER
distance = |x|<c ? x^2/2 : c(|x|-c/2), c=1.345
Definition: imgproc.hpp:308
@ DIST_L1
distance = |x1-x2| + |y1-y2|
Definition: imgproc.hpp:302
@ DIST_FAIR
distance = c^2(|x|/c-log(1+|x|/c)), c = 1.3998
Definition: imgproc.hpp:306
@ DIST_L2
the simple euclidean distance
Definition: imgproc.hpp:303
@ ADAPTIVE_THRESH_MEAN_C
Definition: imgproc.hpp:336
@ ADAPTIVE_THRESH_GAUSSIAN_C
Definition: imgproc.hpp:341
@ THRESH_TOZERO
Definition: imgproc.hpp:324
@ THRESH_BINARY
Definition: imgproc.hpp:321
@ THRESH_BINARY_INV
Definition: imgproc.hpp:322
@ THRESH_TRIANGLE
flag, use Triangle algorithm to choose the optimal threshold value
Definition: imgproc.hpp:328
@ THRESH_TOZERO_INV
Definition: imgproc.hpp:325
@ THRESH_OTSU
flag, use Otsu algorithm to choose the optimal threshold value
Definition: imgproc.hpp:327
@ THRESH_TRUNC
Definition: imgproc.hpp:323
@ DIST_MASK_3
mask=3
Definition: imgproc.hpp:313
@ DIST_MASK_5
mask=5
Definition: imgproc.hpp:314
@ FLOODFILL_MASK_ONLY
Definition: imgproc.hpp:384
@ FLOODFILL_FIXED_RANGE
Definition: imgproc.hpp:380
@ GC_FGD
an obvious foreground (object) pixel
Definition: imgproc.hpp:347
@ GC_BGD
an obvious background pixels
Definition: imgproc.hpp:346
@ GC_PR_FGD
a possible foreground pixel
Definition: imgproc.hpp:349
@ GC_PR_BGD
a possible background pixel
Definition: imgproc.hpp:348
@ GC_INIT_WITH_RECT
Definition: imgproc.hpp:356
@ GC_EVAL_FREEZE_MODEL
Definition: imgproc.hpp:364
@ GC_INIT_WITH_MASK
Definition: imgproc.hpp:360
@ GC_EVAL
Definition: imgproc.hpp:362
CV_EXPORTS_W void accumulate(InputArray src, InputOutputArray dst, InputArray mask=noArray())
Adds an image to the accumulator image.
CV_EXPORTS_W void divSpectrums(InputArray a, InputArray b, OutputArray c, int flags, bool conjB=false)
Performs the per-element division of the first Fourier spectrum by the second Fourier spectrum.
CV_EXPORTS_W void accumulateSquare(InputArray src, InputOutputArray dst, InputArray mask=noArray())
Adds the square of a source image to the accumulator image.
CV_EXPORTS_W void accumulateWeighted(InputArray src, InputOutputArray dst, double alpha, InputArray mask=noArray())
Updates a running average.
CV_EXPORTS_W void createHanningWindow(OutputArray dst, Size winSize, int type)
This function computes a Hanning window coefficients in two dimensions.
CV_EXPORTS_W void accumulateProduct(InputArray src1, InputArray src2, InputOutputArray dst, InputArray mask=noArray())
Adds the per-element product of two input images to the accumulator image.
CV_EXPORTS_W Point2d phaseCorrelate(InputArray src1, InputArray src2, InputArray window=noArray(), CV_OUT double *response=0)
The function is used to detect translational shifts that occur between two images.
TemplateMatchModes
type of the template matching operation
Definition: imgproc.hpp:3723
CV_EXPORTS_W void matchTemplate(InputArray image, InputArray templ, OutputArray result, int method, InputArray mask=noArray())
Compares a template against overlapped image regions.
@ TM_SQDIFF_NORMED
Definition: imgproc.hpp:3728
@ TM_CCORR
Definition: imgproc.hpp:3735
@ TM_SQDIFF
Definition: imgproc.hpp:3724
@ TM_CCOEFF
Definition: imgproc.hpp:3746
@ TM_CCOEFF_NORMED
Definition: imgproc.hpp:3758
@ TM_CCORR_NORMED
Definition: imgproc.hpp:3739
CV_EXPORTS_W void watershed(InputArray image, InputOutputArray markers)
Performs a marker-based image segmentation using the watershed algorithm.
CV_EXPORTS_W void grabCut(InputArray img, InputOutputArray mask, Rect rect, InputOutputArray bgdModel, InputOutputArray fgdModel, int iterCount, int mode=GC_EVAL)
Runs the GrabCut algorithm.
CV_EXPORTS void HuMoments(const Moments &moments, double hu[7])
Calculates seven Hu invariants.
CV_EXPORTS_W bool isContourConvex(InputArray contour)
Tests a contour convexity.
CV_EXPORTS_W void findContours(InputArray image, OutputArrayOfArrays contours, OutputArray hierarchy, int mode, int method, Point offset=Point())
Finds contours in a binary image.
CV_EXPORTS_W void approxPolyDP(InputArray curve, OutputArray approxCurve, double epsilon, bool closed)
Approximates a polygonal curve(s) with the specified precision.
CV_EXPORTS_W void minEnclosingCircle(InputArray points, CV_OUT Point2f &center, CV_OUT float &radius)
Finds a circle of the minimum area enclosing a 2D point set.
CV_EXPORTS_W Ptr< GeneralizedHoughBallard > createGeneralizedHoughBallard()
Creates a smart pointer to a cv::GeneralizedHoughBallard class and initializes it.
CV_EXPORTS_W Rect boundingRect(InputArray array)
Calculates the up-right bounding rectangle of a point set or non-zero pixels of gray-scale image.
CV_EXPORTS_W void boxPoints(RotatedRect box, OutputArray points)
Finds the four vertices of a rotated rect. Useful to draw the rotated rectangle.
CV_EXPORTS_W double contourArea(InputArray contour, bool oriented=false)
Calculates a contour area.
CV_EXPORTS_W Moments moments(InputArray array, bool binaryImage=false)
Calculates all of the moments up to the third order of a polygon or rasterized shape.
CV_EXPORTS_W RotatedRect fitEllipseAMS(InputArray points)
Fits an ellipse around a set of 2D points.
CV_EXPORTS_W void convexityDefects(InputArray contour, InputArray convexhull, OutputArray convexityDefects)
Finds the convexity defects of a contour.
CV_EXPORTS_W double minEnclosingTriangle(InputArray points, CV_OUT OutputArray triangle)
Finds a triangle of minimum area enclosing a 2D point set and returns its area.
CV_EXPORTS_W double pointPolygonTest(InputArray contour, Point2f pt, bool measureDist)
Performs a point-in-contour test.
ContourApproximationModes
the contour approximation algorithm
Definition: imgproc.hpp:435
CV_EXPORTS_W RotatedRect fitEllipse(InputArray points)
Fits an ellipse around a set of 2D points.
CV_EXPORTS_W Ptr< GeneralizedHoughGuil > createGeneralizedHoughGuil()
Creates a smart pointer to a cv::GeneralizedHoughGuil class and initializes it.
ConnectedComponentsAlgorithmsTypes
connected components algorithm
Definition: imgproc.hpp:407
RetrievalModes
mode of the contour retrieval algorithm
Definition: imgproc.hpp:418
CV_EXPORTS_W int connectedComponentsWithStats(InputArray image, OutputArray labels, OutputArray stats, OutputArray centroids, int connectivity=8, int ltype=CV_32S)
CV_EXPORTS_W float intersectConvexConvex(InputArray p1, InputArray p2, OutputArray p12, bool handleNested=true)
Finds intersection of two convex polygons
CV_EXPORTS_W RotatedRect fitEllipseDirect(InputArray points)
Fits an ellipse around a set of 2D points.
CV_EXPORTS_W int rotatedRectangleIntersection(const RotatedRect &rect1, const RotatedRect &rect2, OutputArray intersectingRegion)
Finds out if there is any intersection between two rotated rectangles.
RectanglesIntersectTypes
types of intersection between rectangles
Definition: imgproc.hpp:803
CV_EXPORTS_W void convexHull(InputArray points, OutputArray hull, bool clockwise=false, bool returnPoints=true)
Finds the convex hull of a point set.
CV_EXPORTS_W int connectedComponents(InputArray image, OutputArray labels, int connectivity=8, int ltype=CV_32S)
CV_EXPORTS_W double matchShapes(InputArray contour1, InputArray contour2, int method, double parameter)
Compares two shapes.
ConnectedComponentsTypes
connected components statistics
Definition: imgproc.hpp:393
CV_EXPORTS_W RotatedRect minAreaRect(InputArray points)
Finds a rotated rectangle of the minimum area enclosing the input 2D point set.
CV_EXPORTS_W void fitLine(InputArray points, OutputArray line, int distType, double param, double reps, double aeps)
Fits a line to a 2D or 3D point set.
CV_EXPORTS_W double arcLength(InputArray curve, bool closed)
Calculates a contour perimeter or a curve length.
ShapeMatchModes
Shape matching methods
Definition: imgproc.hpp:457
@ CHAIN_APPROX_SIMPLE
Definition: imgproc.hpp:442
@ CHAIN_APPROX_TC89_KCOS
Definition: imgproc.hpp:446
@ CHAIN_APPROX_TC89_L1
Definition: imgproc.hpp:444
@ CHAIN_APPROX_NONE
Definition: imgproc.hpp:439
@ CCL_SAUF
Same as CCL_WU. It is preferable to use the flag with the name of the algorithm (CCL_SAUF) rather tha...
Definition: imgproc.hpp:412
@ CCL_GRANA
BBDT algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. The parallel implement...
Definition: imgproc.hpp:410
@ CCL_WU
SAUF algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. The parallel implement...
Definition: imgproc.hpp:409
@ CCL_SPAGHETTI
Same as CCL_BOLELLI. It is preferable to use the flag with the name of the algorithm (CCL_SPAGHETTI) ...
Definition: imgproc.hpp:414
@ CCL_DEFAULT
BBDT algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. The parallel implement...
Definition: imgproc.hpp:408
@ CCL_BOLELLI
Spaghetti algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity.
Definition: imgproc.hpp:411
@ CCL_BBDT
Same as CCL_GRANA. It is preferable to use the flag with the name of the algorithm (CCL_BBDT) rather ...
Definition: imgproc.hpp:413
@ RETR_LIST
Definition: imgproc.hpp:423
@ RETR_CCOMP
Definition: imgproc.hpp:428
@ RETR_EXTERNAL
Definition: imgproc.hpp:421
@ RETR_TREE
Definition: imgproc.hpp:430
@ INTERSECT_NONE
No intersection
Definition: imgproc.hpp:804
@ INTERSECT_FULL
One of the rectangle is fully enclosed in the other
Definition: imgproc.hpp:806
@ INTERSECT_PARTIAL
There is a partial intersection
Definition: imgproc.hpp:805
@ CC_STAT_LEFT
Definition: imgproc.hpp:394
@ CC_STAT_AREA
The total area (in pixels) of the connected component
Definition: imgproc.hpp:400
@ CC_STAT_TOP
Definition: imgproc.hpp:396
@ CC_STAT_MAX
Max enumeration value. Used internally only for memory allocation
Definition: imgproc.hpp:402
@ CC_STAT_HEIGHT
The vertical size of the bounding box
Definition: imgproc.hpp:399
@ CC_STAT_WIDTH
The horizontal size of the bounding box
Definition: imgproc.hpp:398
@ CONTOURS_MATCH_I1
Definition: imgproc.hpp:458
@ CONTOURS_MATCH_I3
Definition: imgproc.hpp:460
@ CONTOURS_MATCH_I2
Definition: imgproc.hpp:459
WarpPolarMode
Specify the polar mapping mode
Definition: imgproc.hpp:281
CV_EXPORTS_W void warpAffine(InputArray src, OutputArray dst, InputArray M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, const Scalar &borderValue=Scalar())
Applies an affine transformation to an image.
CV_EXPORTS_W Mat getPerspectiveTransform(InputArray src, InputArray dst, int solveMethod=DECOMP_LU)
Calculates a perspective transform from four pairs of the corresponding points.
CV_EXPORTS_W void linearPolar(InputArray src, OutputArray dst, Point2f center, double maxRadius, int flags)
Remaps an image to polar coordinates space.
CV_EXPORTS Mat getAffineTransform(const Point2f src[], const Point2f dst[])
Calculates an affine transform from three pairs of the corresponding points.
CV_EXPORTS_W void remap(InputArray src, OutputArray dst, InputArray map1, InputArray map2, int interpolation, int borderMode=BORDER_CONSTANT, const Scalar &borderValue=Scalar())
Applies a generic geometrical transformation to an image.
InterpolationFlags
interpolation algorithm
Definition: imgproc.hpp:245
CV_EXPORTS_W void warpPerspective(InputArray src, OutputArray dst, InputArray M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, const Scalar &borderValue=Scalar())
Applies a perspective transformation to an image.
CV_EXPORTS Matx23d getRotationMatrix2D_(Point2f center, double angle, double scale)
CV_EXPORTS_W void warpPolar(InputArray src, OutputArray dst, Size dsize, Point2f center, double maxRadius, int flags)
Remaps an image to polar or semilog-polar coordinates space
CV_EXPORTS_W void resize(InputArray src, OutputArray dst, Size dsize, double fx=0, double fy=0, int interpolation=INTER_LINEAR)
Resizes an image.
CV_EXPORTS_W void getRectSubPix(InputArray image, Size patchSize, Point2f center, OutputArray patch, int patchType=-1)
Retrieves a pixel rectangle from an image with sub-pixel accuracy.
CV_EXPORTS_W void convertMaps(InputArray map1, InputArray map2, OutputArray dstmap1, OutputArray dstmap2, int dstmap1type, bool nninterpolation=false)
Converts image transformation maps from one representation to another.
CV_EXPORTS_W void logPolar(InputArray src, OutputArray dst, Point2f center, double M, int flags)
Remaps an image to semilog-polar coordinates space.
CV_EXPORTS_W void invertAffineTransform(InputArray M, OutputArray iM)
Inverts an affine transformation.
CV_EXPORTS_W Mat getRotationMatrix2D(Point2f center, double angle, double scale)
Calculates an affine matrix of 2D rotation.
Definition: imgproc.hpp:2479
@ WARP_POLAR_LINEAR
Remaps an image to/from polar space.
Definition: imgproc.hpp:282
@ WARP_POLAR_LOG
Remaps an image to/from semilog-polar space.
Definition: imgproc.hpp:283
@ INTER_MAX
Definition: imgproc.hpp:264
@ INTER_CUBIC
Definition: imgproc.hpp:251
@ WARP_FILL_OUTLIERS
Definition: imgproc.hpp:267
@ INTER_NEAREST_EXACT
Definition: imgproc.hpp:262
@ WARP_INVERSE_MAP
Definition: imgproc.hpp:274
@ INTER_NEAREST
Definition: imgproc.hpp:247
@ INTER_LINEAR_EXACT
Definition: imgproc.hpp:259
@ INTER_LANCZOS4
Definition: imgproc.hpp:257
@ INTER_LINEAR
Definition: imgproc.hpp:249
@ INTER_AREA
Definition: imgproc.hpp:255
CV_EXPORTS_W void colormap(const Mat &quantized, CV_OUT Mat &dst)
Debug function to colormap a quantized image for viewing.
cv
"black box" representation of the file storage associated with a file on disk.
Definition: aruco.hpp:75
Definition: cvstd_wrapper.hpp:74
Definition: imgproc.hpp:1233
Definition: imgproc.hpp:1221