FastLineDetector.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. //
  2. // This file is auto-generated. Please don't modify it!
  3. //
  4. #pragma once
  5. #ifdef __cplusplus
  6. //#import "opencv.hpp"
  7. #import "opencv2/ximgproc.hpp"
  8. #import "opencv2/ximgproc/fast_line_detector.hpp"
  9. #else
  10. #define CV_EXPORTS
  11. #endif
  12. #import <Foundation/Foundation.h>
  13. #import "Algorithm.h"
  14. @class Mat;
  15. @class Scalar;
  16. NS_ASSUME_NONNULL_BEGIN
  17. // C++: class FastLineDetector
  18. /**
  19. * Class implementing the FLD (Fast Line Detector) algorithm described
  20. * in CITE: Lee14 .
  21. *
  22. * Member of `Ximgproc`
  23. */
  24. CV_EXPORTS @interface FastLineDetector : Algorithm
  25. #ifdef __cplusplus
  26. @property(readonly)cv::Ptr<cv::ximgproc::FastLineDetector> nativePtrFastLineDetector;
  27. #endif
  28. #ifdef __cplusplus
  29. - (instancetype)initWithNativePtr:(cv::Ptr<cv::ximgproc::FastLineDetector>)nativePtr;
  30. + (instancetype)fromNative:(cv::Ptr<cv::ximgproc::FastLineDetector>)nativePtr;
  31. #endif
  32. #pragma mark - Methods
  33. //
  34. // void cv::ximgproc::FastLineDetector::detect(Mat image, Mat& lines)
  35. //
  36. /**
  37. * Finds lines in the input image.
  38. * This is the output of the default parameters of the algorithm on the above
  39. * shown image.
  40. *
  41. * ![image](pics/corridor_fld.jpg)
  42. *
  43. * @param image A grayscale (CV_8UC1) input image. If only a roi needs to be
  44. * selected, use: `fld_ptr-\>detect(image(roi), lines, ...);
  45. * lines += Scalar(roi.x, roi.y, roi.x, roi.y);`
  46. * @param lines A vector of Vec4f elements specifying the beginning
  47. * and ending point of a line. Where Vec4f is (x1, y1, x2, y2), point
  48. * 1 is the start, point 2 - end. Returned lines are directed so that the
  49. * brighter side is on their left.
  50. */
  51. - (void)detect:(Mat*)image lines:(Mat*)lines NS_SWIFT_NAME(detect(image:lines:));
  52. //
  53. // void cv::ximgproc::FastLineDetector::drawSegments(Mat& image, Mat lines, bool draw_arrow = false, Scalar linecolor = Scalar(0, 0, 255), int linethickness = 1)
  54. //
  55. /**
  56. * Draws the line segments on a given image.
  57. * @param image The image, where the lines will be drawn. Should be bigger
  58. * or equal to the image, where the lines were found.
  59. * @param lines A vector of the lines that needed to be drawn.
  60. * @param draw_arrow If true, arrow heads will be drawn.
  61. * @param linecolor Line color.
  62. * @param linethickness Line thickness.
  63. */
  64. - (void)drawSegments:(Mat*)image lines:(Mat*)lines draw_arrow:(BOOL)draw_arrow linecolor:(Scalar*)linecolor linethickness:(int)linethickness NS_SWIFT_NAME(drawSegments(image:lines:draw_arrow:linecolor:linethickness:));
  65. /**
  66. * Draws the line segments on a given image.
  67. * @param image The image, where the lines will be drawn. Should be bigger
  68. * or equal to the image, where the lines were found.
  69. * @param lines A vector of the lines that needed to be drawn.
  70. * @param draw_arrow If true, arrow heads will be drawn.
  71. * @param linecolor Line color.
  72. */
  73. - (void)drawSegments:(Mat*)image lines:(Mat*)lines draw_arrow:(BOOL)draw_arrow linecolor:(Scalar*)linecolor NS_SWIFT_NAME(drawSegments(image:lines:draw_arrow:linecolor:));
  74. /**
  75. * Draws the line segments on a given image.
  76. * @param image The image, where the lines will be drawn. Should be bigger
  77. * or equal to the image, where the lines were found.
  78. * @param lines A vector of the lines that needed to be drawn.
  79. * @param draw_arrow If true, arrow heads will be drawn.
  80. */
  81. - (void)drawSegments:(Mat*)image lines:(Mat*)lines draw_arrow:(BOOL)draw_arrow NS_SWIFT_NAME(drawSegments(image:lines:draw_arrow:));
  82. /**
  83. * Draws the line segments on a given image.
  84. * @param image The image, where the lines will be drawn. Should be bigger
  85. * or equal to the image, where the lines were found.
  86. * @param lines A vector of the lines that needed to be drawn.
  87. */
  88. - (void)drawSegments:(Mat*)image lines:(Mat*)lines NS_SWIFT_NAME(drawSegments(image:lines:));
  89. @end
  90. NS_ASSUME_NONNULL_END