--- /srv/rebuilderd/tmp/rebuilderde35yZt/inputs/opencv-doc_4.10.0+dfsg-5_all.deb +++ /srv/rebuilderd/tmp/rebuilderde35yZt/out/opencv-doc_4.10.0+dfsg-5_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2025-03-18 19:39:02.000000 debian-binary │ --rw-r--r-- 0 0 0 239068 2025-03-18 19:39:02.000000 control.tar.xz │ --rw-r--r-- 0 0 0 97904872 2025-03-18 19:39:02.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 239076 2025-03-18 19:39:02.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 97902844 2025-03-18 19:39:02.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -11742,15 +11742,15 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 8955 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/oc_1d_testdata.png │ │ │ -rw-r--r-- 0 root (0) root (0) 10486 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/oc_2d_clustered.jpg │ │ │ -rw-r--r-- 0 root (0) root (0) 31684 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/oc_color_quantization.jpg │ │ │ -rw-r--r-- 0 root (0) root (0) 12012 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/oc_feature_representation.jpg │ │ │ -rw-r--r-- 0 root (0) root (0) 123 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/open.png │ │ │ -rw-r--r-- 0 root (0) root (0) 2155 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/opencv-logo-small.png │ │ │ -rw-r--r-- 0 root (0) root (0) 1114 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/opencv.ico.gz │ │ │ --rw-r--r-- 0 root (0) root (0) 1967950 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/opencv.tag.gz │ │ │ +-rw-r--r-- 0 root (0) root (0) 1967952 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/opencv.tag.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 83154 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/opencv_bus_res.jpg │ │ │ -rw-r--r-- 0 root (0) root (0) 5327 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/opencv_logo.jpg │ │ │ -rw-r--r-- 0 root (0) root (0) 60324 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/opencv_resnet50_test_res_c.jpg │ │ │ -rw-r--r-- 0 root (0) root (0) 2082 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/opening.png │ │ │ -rw-r--r-- 0 root (0) root (0) 6146 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/optical_flow_basic1.jpg │ │ │ -rw-r--r-- 0 root (0) root (0) 24600 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/opticalfb.jpg │ │ │ -rw-r--r-- 0 root (0) root (0) 22792 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/opticalflow_lk.jpg │ │ │ @@ -11870,15 +11870,15 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 102489 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/search/all_17.js │ │ │ -rw-r--r-- 0 root (0) root (0) 287547 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/search/all_18.js │ │ │ -rw-r--r-- 0 root (0) root (0) 110892 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/search/all_19.js │ │ │ -rw-r--r-- 0 root (0) root (0) 581917 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/search/all_1a.js │ │ │ -rw-r--r-- 0 root (0) root (0) 205491 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/search/all_1b.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15960 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/search/all_1c.js │ │ │ -rw-r--r-- 0 root (0) root (0) 189557 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/search/all_1d.js │ │ │ --rw-r--r-- 0 root (0) root (0) 414733 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/search/all_1e.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 414955 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/search/all_1e.js │ │ │ -rw-r--r-- 0 root (0) root (0) 214260 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/search/all_1f.js │ │ │ -rw-r--r-- 0 root (0) root (0) 6000 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/search/all_2.js │ │ │ -rw-r--r-- 0 root (0) root (0) 63213 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/search/all_20.js │ │ │ -rw-r--r-- 0 root (0) root (0) 5077013 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/search/all_21.js │ │ │ -rw-r--r-- 0 root (0) root (0) 104131 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/search/all_22.js │ │ │ -rw-r--r-- 0 root (0) root (0) 7002 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/search/all_23.js │ │ │ -rw-r--r-- 0 root (0) root (0) 16867 2025-03-18 19:39:02.000000 ./usr/share/doc/opencv-doc/opencv4/html/search/all_24.js │ │ ├── ./usr/share/doc/opencv-doc/opencv4/html/javadoc/org/opencv/aruco/Aruco.html │ │ │┄ Ordering differences only │ │ │ @@ -1424,334 +1424,14 @@ │ │ │
charucoIds - automatically generated
│ │ │
Returns:
│ │ │
automatically generated
│ │ │ │ │ │ │ │ │ │ │ │
  • │ │ │ -
    │ │ │ -

    interpolateCornersCharuco

    │ │ │ -
    @Deprecated │ │ │ -public static int interpolateCornersCharuco(List<Mat> markerCorners, │ │ │ - Mat markerIds, │ │ │ - Mat image, │ │ │ - CharucoBoard board, │ │ │ - Mat charucoCorners, │ │ │ - Mat charucoIds, │ │ │ - Mat cameraMatrix, │ │ │ - Mat distCoeffs, │ │ │ - int minMarkers)
    │ │ │ -
    Deprecated. │ │ │ -
    Use CharucoDetector::detectBoard
    │ │ │ -
    │ │ │ -
    Interpolate position of ChArUco board corners
    │ │ │ -
    │ │ │ -
    Parameters:
    │ │ │ -
    markerCorners - vector of already detected markers corners. For each marker, its four │ │ │ - corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the │ │ │ - dimensions of this array should be Nx4. The order of the corners should be clockwise.
    │ │ │ -
    markerIds - list of identifiers for each marker in corners
    │ │ │ -
    image - input image necesary for corner refinement. Note that markers are not detected and │ │ │ - should be sent in corners and ids parameters.
    │ │ │ -
    board - layout of ChArUco board.
    │ │ │ -
    charucoCorners - interpolated chessboard corners
    │ │ │ -
    charucoIds - interpolated chessboard corners identifiers
    │ │ │ -
    cameraMatrix - optional 3x3 floating-point camera matrix │ │ │ - \(A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\)
    │ │ │ -
    distCoeffs - optional vector of distortion coefficients │ │ │ - \((k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\) of 4, 5, 8 or 12 elements
    │ │ │ -
    minMarkers - number of adjacent markers that must be detected to return a charuco corner │ │ │ - │ │ │ - This function receives the detected markers and returns the 2D position of the chessboard corners │ │ │ - from a ChArUco board using the detected Aruco markers. If camera parameters are provided, │ │ │ - the process is based in an approximated pose estimation, else it is based on local homography. │ │ │ - Only visible corners are returned. For each corner, its corresponding identifier is │ │ │ - also returned in charucoIds. │ │ │ - The function returns the number of interpolated corners.
    │ │ │ -
    Returns:
    │ │ │ -
    automatically generated
    │ │ │ -
    │ │ │ -
    │ │ │ -
  • │ │ │ -
  • │ │ │ -
    │ │ │ -

    interpolateCornersCharuco

    │ │ │ -
    @Deprecated │ │ │ -public static int interpolateCornersCharuco(List<Mat> markerCorners, │ │ │ - Mat markerIds, │ │ │ - Mat image, │ │ │ - CharucoBoard board, │ │ │ - Mat charucoCorners, │ │ │ - Mat charucoIds, │ │ │ - Mat cameraMatrix, │ │ │ - Mat distCoeffs)
    │ │ │ -
    Deprecated. │ │ │ -
    Use CharucoDetector::detectBoard
    │ │ │ -
    │ │ │ -
    Interpolate position of ChArUco board corners
    │ │ │ -
    │ │ │ -
    Parameters:
    │ │ │ -
    markerCorners - vector of already detected markers corners. For each marker, its four │ │ │ - corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the │ │ │ - dimensions of this array should be Nx4. The order of the corners should be clockwise.
    │ │ │ -
    markerIds - list of identifiers for each marker in corners
    │ │ │ -
    image - input image necesary for corner refinement. Note that markers are not detected and │ │ │ - should be sent in corners and ids parameters.
    │ │ │ -
    board - layout of ChArUco board.
    │ │ │ -
    charucoCorners - interpolated chessboard corners
    │ │ │ -
    charucoIds - interpolated chessboard corners identifiers
    │ │ │ -
    cameraMatrix - optional 3x3 floating-point camera matrix │ │ │ - \(A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\)
    │ │ │ -
    distCoeffs - optional vector of distortion coefficients │ │ │ - \((k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\) of 4, 5, 8 or 12 elements │ │ │ - │ │ │ - This function receives the detected markers and returns the 2D position of the chessboard corners │ │ │ - from a ChArUco board using the detected Aruco markers. If camera parameters are provided, │ │ │ - the process is based in an approximated pose estimation, else it is based on local homography. │ │ │ - Only visible corners are returned. For each corner, its corresponding identifier is │ │ │ - also returned in charucoIds. │ │ │ - The function returns the number of interpolated corners.
    │ │ │ -
    Returns:
    │ │ │ -
    automatically generated
    │ │ │ -
    │ │ │ -
    │ │ │ -
  • │ │ │ -
  • │ │ │ -
    │ │ │ -

    interpolateCornersCharuco

    │ │ │ -
    @Deprecated │ │ │ -public static int interpolateCornersCharuco(List<Mat> markerCorners, │ │ │ - Mat markerIds, │ │ │ - Mat image, │ │ │ - CharucoBoard board, │ │ │ - Mat charucoCorners, │ │ │ - Mat charucoIds, │ │ │ - Mat cameraMatrix)
    │ │ │ -
    Deprecated. │ │ │ -
    Use CharucoDetector::detectBoard
    │ │ │ -
    │ │ │ -
    Interpolate position of ChArUco board corners
    │ │ │ -
    │ │ │ -
    Parameters:
    │ │ │ -
    markerCorners - vector of already detected markers corners. For each marker, its four │ │ │ - corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the │ │ │ - dimensions of this array should be Nx4. The order of the corners should be clockwise.
    │ │ │ -
    markerIds - list of identifiers for each marker in corners
    │ │ │ -
    image - input image necesary for corner refinement. Note that markers are not detected and │ │ │ - should be sent in corners and ids parameters.
    │ │ │ -
    board - layout of ChArUco board.
    │ │ │ -
    charucoCorners - interpolated chessboard corners
    │ │ │ -
    charucoIds - interpolated chessboard corners identifiers
    │ │ │ -
    cameraMatrix - optional 3x3 floating-point camera matrix │ │ │ - \(A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\) │ │ │ - \((k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\) of 4, 5, 8 or 12 elements │ │ │ - │ │ │ - This function receives the detected markers and returns the 2D position of the chessboard corners │ │ │ - from a ChArUco board using the detected Aruco markers. If camera parameters are provided, │ │ │ - the process is based in an approximated pose estimation, else it is based on local homography. │ │ │ - Only visible corners are returned. For each corner, its corresponding identifier is │ │ │ - also returned in charucoIds. │ │ │ - The function returns the number of interpolated corners.
    │ │ │ -
    Returns:
    │ │ │ -
    automatically generated
    │ │ │ -
    │ │ │ -
    │ │ │ -
  • │ │ │ -
  • │ │ │ -
    │ │ │ -

    interpolateCornersCharuco

    │ │ │ -
    @Deprecated │ │ │ -public static int interpolateCornersCharuco(List<Mat> markerCorners, │ │ │ - Mat markerIds, │ │ │ - Mat image, │ │ │ - CharucoBoard board, │ │ │ - Mat charucoCorners, │ │ │ - Mat charucoIds)
    │ │ │ -
    Deprecated. │ │ │ -
    Use CharucoDetector::detectBoard
    │ │ │ -
    │ │ │ -
    Interpolate position of ChArUco board corners
    │ │ │ -
    │ │ │ -
    Parameters:
    │ │ │ -
    markerCorners - vector of already detected markers corners. For each marker, its four │ │ │ - corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the │ │ │ - dimensions of this array should be Nx4. The order of the corners should be clockwise.
    │ │ │ -
    markerIds - list of identifiers for each marker in corners
    │ │ │ -
    image - input image necesary for corner refinement. Note that markers are not detected and │ │ │ - should be sent in corners and ids parameters.
    │ │ │ -
    board - layout of ChArUco board.
    │ │ │ -
    charucoCorners - interpolated chessboard corners
    │ │ │ -
    charucoIds - interpolated chessboard corners identifiers │ │ │ - \(A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\) │ │ │ - \((k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\) of 4, 5, 8 or 12 elements │ │ │ - │ │ │ - This function receives the detected markers and returns the 2D position of the chessboard corners │ │ │ - from a ChArUco board using the detected Aruco markers. If camera parameters are provided, │ │ │ - the process is based in an approximated pose estimation, else it is based on local homography. │ │ │ - Only visible corners are returned. For each corner, its corresponding identifier is │ │ │ - also returned in charucoIds. │ │ │ - The function returns the number of interpolated corners.
    │ │ │ -
    Returns:
    │ │ │ -
    automatically generated
    │ │ │ -
    │ │ │ -
    │ │ │ -
  • │ │ │ -
  • │ │ │ -
    │ │ │ -

    detectCharucoDiamond

    │ │ │ -
    @Deprecated │ │ │ -public static void detectCharucoDiamond(Mat image, │ │ │ - List<Mat> markerCorners, │ │ │ - Mat markerIds, │ │ │ - float squareMarkerLengthRate, │ │ │ - List<Mat> diamondCorners, │ │ │ - Mat diamondIds, │ │ │ - Mat cameraMatrix, │ │ │ - Mat distCoeffs, │ │ │ - Dictionary dictionary)
    │ │ │ -
    Deprecated. │ │ │ -
    Use CharucoDetector::detectDiamonds
    │ │ │ -
    │ │ │ -
    Detect ChArUco Diamond markers
    │ │ │ -
    │ │ │ -
    Parameters:
    │ │ │ -
    image - input image necessary for corner subpixel.
    │ │ │ -
    markerCorners - list of detected marker corners from detectMarkers function.
    │ │ │ -
    markerIds - list of marker ids in markerCorners.
    │ │ │ -
    squareMarkerLengthRate - rate between square and marker length: │ │ │ - squareMarkerLengthRate = squareLength/markerLength. The real units are not necessary.
    │ │ │ -
    diamondCorners - output list of detected diamond corners (4 corners per diamond). The order │ │ │ - is the same than in marker corners: top left, top right, bottom right and bottom left. Similar │ │ │ - format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
    │ │ │ -
    diamondIds - ids of the diamonds in diamondCorners. The id of each diamond is in fact of │ │ │ - type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the │ │ │ - diamond.
    │ │ │ -
    cameraMatrix - Optional camera calibration matrix.
    │ │ │ -
    distCoeffs - Optional camera distortion coefficients.
    │ │ │ -
    dictionary - dictionary of markers indicating the type of markers. │ │ │ - │ │ │ - This function detects Diamond markers from the previous detected ArUco markers. The diamonds │ │ │ - are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters │ │ │ - are provided, the diamond search is based on reprojection. If not, diamond search is based on │ │ │ - homography. Homography is faster than reprojection, but less accurate.
    │ │ │ -
    │ │ │ -
    │ │ │ -
  • │ │ │ -
  • │ │ │ -
    │ │ │ -

    detectCharucoDiamond

    │ │ │ -
    @Deprecated │ │ │ -public static void detectCharucoDiamond(Mat image, │ │ │ - List<Mat> markerCorners, │ │ │ - Mat markerIds, │ │ │ - float squareMarkerLengthRate, │ │ │ - List<Mat> diamondCorners, │ │ │ - Mat diamondIds, │ │ │ - Mat cameraMatrix, │ │ │ - Mat distCoeffs)
    │ │ │ -
    Deprecated. │ │ │ -
    Use CharucoDetector::detectDiamonds
    │ │ │ -
    │ │ │ -
    Detect ChArUco Diamond markers
    │ │ │ -
    │ │ │ -
    Parameters:
    │ │ │ -
    image - input image necessary for corner subpixel.
    │ │ │ -
    markerCorners - list of detected marker corners from detectMarkers function.
    │ │ │ -
    markerIds - list of marker ids in markerCorners.
    │ │ │ -
    squareMarkerLengthRate - rate between square and marker length: │ │ │ - squareMarkerLengthRate = squareLength/markerLength. The real units are not necessary.
    │ │ │ -
    diamondCorners - output list of detected diamond corners (4 corners per diamond). The order │ │ │ - is the same than in marker corners: top left, top right, bottom right and bottom left. Similar │ │ │ - format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
    │ │ │ -
    diamondIds - ids of the diamonds in diamondCorners. The id of each diamond is in fact of │ │ │ - type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the │ │ │ - diamond.
    │ │ │ -
    cameraMatrix - Optional camera calibration matrix.
    │ │ │ -
    distCoeffs - Optional camera distortion coefficients. │ │ │ - │ │ │ - This function detects Diamond markers from the previous detected ArUco markers. The diamonds │ │ │ - are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters │ │ │ - are provided, the diamond search is based on reprojection. If not, diamond search is based on │ │ │ - homography. Homography is faster than reprojection, but less accurate.
    │ │ │ -
    │ │ │ -
    │ │ │ -
  • │ │ │ -
  • │ │ │ -
    │ │ │ -

    detectCharucoDiamond

    │ │ │ -
    @Deprecated │ │ │ -public static void detectCharucoDiamond(Mat image, │ │ │ - List<Mat> markerCorners, │ │ │ - Mat markerIds, │ │ │ - float squareMarkerLengthRate, │ │ │ - List<Mat> diamondCorners, │ │ │ - Mat diamondIds, │ │ │ - Mat cameraMatrix)
    │ │ │ -
    Deprecated. │ │ │ -
    Use CharucoDetector::detectDiamonds
    │ │ │ -
    │ │ │ -
    Detect ChArUco Diamond markers
    │ │ │ -
    │ │ │ -
    Parameters:
    │ │ │ -
    image - input image necessary for corner subpixel.
    │ │ │ -
    markerCorners - list of detected marker corners from detectMarkers function.
    │ │ │ -
    markerIds - list of marker ids in markerCorners.
    │ │ │ -
    squareMarkerLengthRate - rate between square and marker length: │ │ │ - squareMarkerLengthRate = squareLength/markerLength. The real units are not necessary.
    │ │ │ -
    diamondCorners - output list of detected diamond corners (4 corners per diamond). The order │ │ │ - is the same than in marker corners: top left, top right, bottom right and bottom left. Similar │ │ │ - format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
    │ │ │ -
    diamondIds - ids of the diamonds in diamondCorners. The id of each diamond is in fact of │ │ │ - type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the │ │ │ - diamond.
    │ │ │ -
    cameraMatrix - Optional camera calibration matrix. │ │ │ - │ │ │ - This function detects Diamond markers from the previous detected ArUco markers. The diamonds │ │ │ - are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters │ │ │ - are provided, the diamond search is based on reprojection. If not, diamond search is based on │ │ │ - homography. Homography is faster than reprojection, but less accurate.
    │ │ │ -
    │ │ │ -
    │ │ │ -
  • │ │ │ -
  • │ │ │ -
    │ │ │ -

    detectCharucoDiamond

    │ │ │ -
    @Deprecated │ │ │ -public static void detectCharucoDiamond(Mat image, │ │ │ - List<Mat> markerCorners, │ │ │ - Mat markerIds, │ │ │ - float squareMarkerLengthRate, │ │ │ - List<Mat> diamondCorners, │ │ │ - Mat diamondIds)
    │ │ │ -
    Deprecated. │ │ │ -
    Use CharucoDetector::detectDiamonds
    │ │ │ -
    │ │ │ -
    Detect ChArUco Diamond markers
    │ │ │ -
    │ │ │ -
    Parameters:
    │ │ │ -
    image - input image necessary for corner subpixel.
    │ │ │ -
    markerCorners - list of detected marker corners from detectMarkers function.
    │ │ │ -
    markerIds - list of marker ids in markerCorners.
    │ │ │ -
    squareMarkerLengthRate - rate between square and marker length: │ │ │ - squareMarkerLengthRate = squareLength/markerLength. The real units are not necessary.
    │ │ │ -
    diamondCorners - output list of detected diamond corners (4 corners per diamond). The order │ │ │ - is the same than in marker corners: top left, top right, bottom right and bottom left. Similar │ │ │ - format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
    │ │ │ -
    diamondIds - ids of the diamonds in diamondCorners. The id of each diamond is in fact of │ │ │ - type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the │ │ │ - diamond. │ │ │ - │ │ │ - This function detects Diamond markers from the previous detected ArUco markers. The diamonds │ │ │ - are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters │ │ │ - are provided, the diamond search is based on reprojection. If not, diamond search is based on │ │ │ - homography. Homography is faster than reprojection, but less accurate.
    │ │ │ -
    │ │ │ -
    │ │ │ -
  • │ │ │ -
  • │ │ │
    │ │ │

    calibrateCameraArucoExtended

    │ │ │
    @Deprecated │ │ │ public static double calibrateCameraArucoExtended(List<Mat> corners, │ │ │ Mat ids, │ │ │ Mat counter, │ │ │ Board board, │ │ │ @@ -2408,14 +2088,334 @@ │ │ │
    cameraMatrix - automatically generated
    │ │ │
    distCoeffs - automatically generated
    │ │ │
    Returns:
    │ │ │
    automatically generated
    │ │ │ │ │ │
    │ │ │
  • │ │ │ +
  • │ │ │ +
    │ │ │ +

    interpolateCornersCharuco

    │ │ │ +
    @Deprecated │ │ │ +public static int interpolateCornersCharuco(List<Mat> markerCorners, │ │ │ + Mat markerIds, │ │ │ + Mat image, │ │ │ + CharucoBoard board, │ │ │ + Mat charucoCorners, │ │ │ + Mat charucoIds, │ │ │ + Mat cameraMatrix, │ │ │ + Mat distCoeffs, │ │ │ + int minMarkers)
    │ │ │ +
    Deprecated. │ │ │ +
    Use CharucoDetector::detectBoard
    │ │ │ +
    │ │ │ +
    Interpolate position of ChArUco board corners
    │ │ │ +
    │ │ │ +
    Parameters:
    │ │ │ +
    markerCorners - vector of already detected markers corners. For each marker, its four │ │ │ + corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the │ │ │ + dimensions of this array should be Nx4. The order of the corners should be clockwise.
    │ │ │ +
    markerIds - list of identifiers for each marker in corners
    │ │ │ +
    image - input image necesary for corner refinement. Note that markers are not detected and │ │ │ + should be sent in corners and ids parameters.
    │ │ │ +
    board - layout of ChArUco board.
    │ │ │ +
    charucoCorners - interpolated chessboard corners
    │ │ │ +
    charucoIds - interpolated chessboard corners identifiers
    │ │ │ +
    cameraMatrix - optional 3x3 floating-point camera matrix │ │ │ + \(A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\)
    │ │ │ +
    distCoeffs - optional vector of distortion coefficients │ │ │ + \((k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\) of 4, 5, 8 or 12 elements
    │ │ │ +
    minMarkers - number of adjacent markers that must be detected to return a charuco corner │ │ │ + │ │ │ + This function receives the detected markers and returns the 2D position of the chessboard corners │ │ │ + from a ChArUco board using the detected Aruco markers. If camera parameters are provided, │ │ │ + the process is based in an approximated pose estimation, else it is based on local homography. │ │ │ + Only visible corners are returned. For each corner, its corresponding identifier is │ │ │ + also returned in charucoIds. │ │ │ + The function returns the number of interpolated corners.
    │ │ │ +
    Returns:
    │ │ │ +
    automatically generated
    │ │ │ +
    │ │ │ +
    │ │ │ +
  • │ │ │ +
  • │ │ │ +
    │ │ │ +

    interpolateCornersCharuco

    │ │ │ +
    @Deprecated │ │ │ +public static int interpolateCornersCharuco(List<Mat> markerCorners, │ │ │ + Mat markerIds, │ │ │ + Mat image, │ │ │ + CharucoBoard board, │ │ │ + Mat charucoCorners, │ │ │ + Mat charucoIds, │ │ │ + Mat cameraMatrix, │ │ │ + Mat distCoeffs)
    │ │ │ +
    Deprecated. │ │ │ +
    Use CharucoDetector::detectBoard
    │ │ │ +
    │ │ │ +
    Interpolate position of ChArUco board corners
    │ │ │ +
    │ │ │ +
    Parameters:
    │ │ │ +
    markerCorners - vector of already detected markers corners. For each marker, its four │ │ │ + corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the │ │ │ + dimensions of this array should be Nx4. The order of the corners should be clockwise.
    │ │ │ +
    markerIds - list of identifiers for each marker in corners
    │ │ │ +
    image - input image necesary for corner refinement. Note that markers are not detected and │ │ │ + should be sent in corners and ids parameters.
    │ │ │ +
    board - layout of ChArUco board.
    │ │ │ +
    charucoCorners - interpolated chessboard corners
    │ │ │ +
    charucoIds - interpolated chessboard corners identifiers
    │ │ │ +
    cameraMatrix - optional 3x3 floating-point camera matrix │ │ │ + \(A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\)
    │ │ │ +
    distCoeffs - optional vector of distortion coefficients │ │ │ + \((k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\) of 4, 5, 8 or 12 elements │ │ │ + │ │ │ + This function receives the detected markers and returns the 2D position of the chessboard corners │ │ │ + from a ChArUco board using the detected Aruco markers. If camera parameters are provided, │ │ │ + the process is based in an approximated pose estimation, else it is based on local homography. │ │ │ + Only visible corners are returned. For each corner, its corresponding identifier is │ │ │ + also returned in charucoIds. │ │ │ + The function returns the number of interpolated corners.
    │ │ │ +
    Returns:
    │ │ │ +
    automatically generated
    │ │ │ +
    │ │ │ +
    │ │ │ +
  • │ │ │ +
  • │ │ │ +
    │ │ │ +

    interpolateCornersCharuco

    │ │ │ +
    @Deprecated │ │ │ +public static int interpolateCornersCharuco(List<Mat> markerCorners, │ │ │ + Mat markerIds, │ │ │ + Mat image, │ │ │ + CharucoBoard board, │ │ │ + Mat charucoCorners, │ │ │ + Mat charucoIds, │ │ │ + Mat cameraMatrix)
    │ │ │ +
    Deprecated. │ │ │ +
    Use CharucoDetector::detectBoard
    │ │ │ +
    │ │ │ +
    Interpolate position of ChArUco board corners
    │ │ │ +
    │ │ │ +
    Parameters:
    │ │ │ +
    markerCorners - vector of already detected markers corners. For each marker, its four │ │ │ + corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the │ │ │ + dimensions of this array should be Nx4. The order of the corners should be clockwise.
    │ │ │ +
    markerIds - list of identifiers for each marker in corners
    │ │ │ +
    image - input image necesary for corner refinement. Note that markers are not detected and │ │ │ + should be sent in corners and ids parameters.
    │ │ │ +
    board - layout of ChArUco board.
    │ │ │ +
    charucoCorners - interpolated chessboard corners
    │ │ │ +
    charucoIds - interpolated chessboard corners identifiers
    │ │ │ +
    cameraMatrix - optional 3x3 floating-point camera matrix │ │ │ + \(A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\) │ │ │ + \((k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\) of 4, 5, 8 or 12 elements │ │ │ + │ │ │ + This function receives the detected markers and returns the 2D position of the chessboard corners │ │ │ + from a ChArUco board using the detected Aruco markers. If camera parameters are provided, │ │ │ + the process is based in an approximated pose estimation, else it is based on local homography. │ │ │ + Only visible corners are returned. For each corner, its corresponding identifier is │ │ │ + also returned in charucoIds. │ │ │ + The function returns the number of interpolated corners.
    │ │ │ +
    Returns:
    │ │ │ +
    automatically generated
    │ │ │ +
    │ │ │ +
    │ │ │ +
  • │ │ │ +
  • │ │ │ +
    │ │ │ +

    interpolateCornersCharuco

    │ │ │ +
    @Deprecated │ │ │ +public static int interpolateCornersCharuco(List<Mat> markerCorners, │ │ │ + Mat markerIds, │ │ │ + Mat image, │ │ │ + CharucoBoard board, │ │ │ + Mat charucoCorners, │ │ │ + Mat charucoIds)
    │ │ │ +
    Deprecated. │ │ │ +
    Use CharucoDetector::detectBoard
    │ │ │ +
    │ │ │ +
    Interpolate position of ChArUco board corners
    │ │ │ +
    │ │ │ +
    Parameters:
    │ │ │ +
    markerCorners - vector of already detected markers corners. For each marker, its four │ │ │ + corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the │ │ │ + dimensions of this array should be Nx4. The order of the corners should be clockwise.
    │ │ │ +
    markerIds - list of identifiers for each marker in corners
    │ │ │ +
    image - input image necesary for corner refinement. Note that markers are not detected and │ │ │ + should be sent in corners and ids parameters.
    │ │ │ +
    board - layout of ChArUco board.
    │ │ │ +
    charucoCorners - interpolated chessboard corners
    │ │ │ +
    charucoIds - interpolated chessboard corners identifiers │ │ │ + \(A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\) │ │ │ + \((k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\) of 4, 5, 8 or 12 elements │ │ │ + │ │ │ + This function receives the detected markers and returns the 2D position of the chessboard corners │ │ │ + from a ChArUco board using the detected Aruco markers. If camera parameters are provided, │ │ │ + the process is based in an approximated pose estimation, else it is based on local homography. │ │ │ + Only visible corners are returned. For each corner, its corresponding identifier is │ │ │ + also returned in charucoIds. │ │ │ + The function returns the number of interpolated corners.
    │ │ │ +
    Returns:
    │ │ │ +
    automatically generated
    │ │ │ +
    │ │ │ +
    │ │ │ +
  • │ │ │ +
  • │ │ │ +
    │ │ │ +

    detectCharucoDiamond

    │ │ │ +
    @Deprecated │ │ │ +public static void detectCharucoDiamond(Mat image, │ │ │ + List<Mat> markerCorners, │ │ │ + Mat markerIds, │ │ │ + float squareMarkerLengthRate, │ │ │ + List<Mat> diamondCorners, │ │ │ + Mat diamondIds, │ │ │ + Mat cameraMatrix, │ │ │ + Mat distCoeffs, │ │ │ + Dictionary dictionary)
    │ │ │ +
    Deprecated. │ │ │ +
    Use CharucoDetector::detectDiamonds
    │ │ │ +
    │ │ │ +
    Detect ChArUco Diamond markers
    │ │ │ +
    │ │ │ +
    Parameters:
    │ │ │ +
    image - input image necessary for corner subpixel.
    │ │ │ +
    markerCorners - list of detected marker corners from detectMarkers function.
    │ │ │ +
    markerIds - list of marker ids in markerCorners.
    │ │ │ +
    squareMarkerLengthRate - rate between square and marker length: │ │ │ + squareMarkerLengthRate = squareLength/markerLength. The real units are not necessary.
    │ │ │ +
    diamondCorners - output list of detected diamond corners (4 corners per diamond). The order │ │ │ + is the same than in marker corners: top left, top right, bottom right and bottom left. Similar │ │ │ + format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
    │ │ │ +
    diamondIds - ids of the diamonds in diamondCorners. The id of each diamond is in fact of │ │ │ + type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the │ │ │ + diamond.
    │ │ │ +
    cameraMatrix - Optional camera calibration matrix.
    │ │ │ +
    distCoeffs - Optional camera distortion coefficients.
    │ │ │ +
    dictionary - dictionary of markers indicating the type of markers. │ │ │ + │ │ │ + This function detects Diamond markers from the previous detected ArUco markers. The diamonds │ │ │ + are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters │ │ │ + are provided, the diamond search is based on reprojection. If not, diamond search is based on │ │ │ + homography. Homography is faster than reprojection, but less accurate.
    │ │ │ +
    │ │ │ +
    │ │ │ +
  • │ │ │ +
  • │ │ │ +
    │ │ │ +

    detectCharucoDiamond

    │ │ │ +
    @Deprecated │ │ │ +public static void detectCharucoDiamond(Mat image, │ │ │ + List<Mat> markerCorners, │ │ │ + Mat markerIds, │ │ │ + float squareMarkerLengthRate, │ │ │ + List<Mat> diamondCorners, │ │ │ + Mat diamondIds, │ │ │ + Mat cameraMatrix, │ │ │ + Mat distCoeffs)
    │ │ │ +
    Deprecated. │ │ │ +
    Use CharucoDetector::detectDiamonds
    │ │ │ +
    │ │ │ +
    Detect ChArUco Diamond markers
    │ │ │ +
    │ │ │ +
    Parameters:
    │ │ │ +
    image - input image necessary for corner subpixel.
    │ │ │ +
    markerCorners - list of detected marker corners from detectMarkers function.
    │ │ │ +
    markerIds - list of marker ids in markerCorners.
    │ │ │ +
    squareMarkerLengthRate - rate between square and marker length: │ │ │ + squareMarkerLengthRate = squareLength/markerLength. The real units are not necessary.
    │ │ │ +
    diamondCorners - output list of detected diamond corners (4 corners per diamond). The order │ │ │ + is the same than in marker corners: top left, top right, bottom right and bottom left. Similar │ │ │ + format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
    │ │ │ +
    diamondIds - ids of the diamonds in diamondCorners. The id of each diamond is in fact of │ │ │ + type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the │ │ │ + diamond.
    │ │ │ +
    cameraMatrix - Optional camera calibration matrix.
    │ │ │ +
    distCoeffs - Optional camera distortion coefficients. │ │ │ + │ │ │ + This function detects Diamond markers from the previous detected ArUco markers. The diamonds │ │ │ + are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters │ │ │ + are provided, the diamond search is based on reprojection. If not, diamond search is based on │ │ │ + homography. Homography is faster than reprojection, but less accurate.
    │ │ │ +
    │ │ │ +
    │ │ │ +
  • │ │ │ +
  • │ │ │ +
    │ │ │ +

    detectCharucoDiamond

    │ │ │ +
    @Deprecated │ │ │ +public static void detectCharucoDiamond(Mat image, │ │ │ + List<Mat> markerCorners, │ │ │ + Mat markerIds, │ │ │ + float squareMarkerLengthRate, │ │ │ + List<Mat> diamondCorners, │ │ │ + Mat diamondIds, │ │ │ + Mat cameraMatrix)
    │ │ │ +
    Deprecated. │ │ │ +
    Use CharucoDetector::detectDiamonds
    │ │ │ +
    │ │ │ +
    Detect ChArUco Diamond markers
    │ │ │ +
    │ │ │ +
    Parameters:
    │ │ │ +
    image - input image necessary for corner subpixel.
    │ │ │ +
    markerCorners - list of detected marker corners from detectMarkers function.
    │ │ │ +
    markerIds - list of marker ids in markerCorners.
    │ │ │ +
    squareMarkerLengthRate - rate between square and marker length: │ │ │ + squareMarkerLengthRate = squareLength/markerLength. The real units are not necessary.
    │ │ │ +
    diamondCorners - output list of detected diamond corners (4 corners per diamond). The order │ │ │ + is the same than in marker corners: top left, top right, bottom right and bottom left. Similar │ │ │ + format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
    │ │ │ +
    diamondIds - ids of the diamonds in diamondCorners. The id of each diamond is in fact of │ │ │ + type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the │ │ │ + diamond.
    │ │ │ +
    cameraMatrix - Optional camera calibration matrix. │ │ │ + │ │ │ + This function detects Diamond markers from the previous detected ArUco markers. The diamonds │ │ │ + are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters │ │ │ + are provided, the diamond search is based on reprojection. If not, diamond search is based on │ │ │ + homography. Homography is faster than reprojection, but less accurate.
    │ │ │ +
    │ │ │ +
    │ │ │ +
  • │ │ │ +
  • │ │ │ +
    │ │ │ +

    detectCharucoDiamond

    │ │ │ +
    @Deprecated │ │ │ +public static void detectCharucoDiamond(Mat image, │ │ │ + List<Mat> markerCorners, │ │ │ + Mat markerIds, │ │ │ + float squareMarkerLengthRate, │ │ │ + List<Mat> diamondCorners, │ │ │ + Mat diamondIds)
    │ │ │ +
    Deprecated. │ │ │ +
    Use CharucoDetector::detectDiamonds
    │ │ │ +
    │ │ │ +
    Detect ChArUco Diamond markers
    │ │ │ +
    │ │ │ +
    Parameters:
    │ │ │ +
    image - input image necessary for corner subpixel.
    │ │ │ +
    markerCorners - list of detected marker corners from detectMarkers function.
    │ │ │ +
    markerIds - list of marker ids in markerCorners.
    │ │ │ +
    squareMarkerLengthRate - rate between square and marker length: │ │ │ + squareMarkerLengthRate = squareLength/markerLength. The real units are not necessary.
    │ │ │ +
    diamondCorners - output list of detected diamond corners (4 corners per diamond). The order │ │ │ + is the same than in marker corners: top left, top right, bottom right and bottom left. Similar │ │ │ + format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
    │ │ │ +
    diamondIds - ids of the diamonds in diamondCorners. The id of each diamond is in fact of │ │ │ + type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the │ │ │ + diamond. │ │ │ + │ │ │ + This function detects Diamond markers from the previous detected ArUco markers. The diamonds │ │ │ + are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters │ │ │ + are provided, the diamond search is based on reprojection. If not, diamond search is based on │ │ │ + homography. Homography is faster than reprojection, but less accurate.
    │ │ │ +
    │ │ │ +
    │ │ │ +
  • │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -684,290 +684,14 @@ │ │ │ │ Deprecated. │ │ │ │ Use CharucoBoard::checkCharucoCornersCollinear │ │ │ │ Parameters: │ │ │ │ board - automatically generated │ │ │ │ charucoIds - automatically generated │ │ │ │ Returns: │ │ │ │ automatically generated │ │ │ │ - o ******** iinntteerrppoollaatteeCCoorrnneerrssCChhaarruuccoo ******** │ │ │ │ - _@_D_e_p_r_e_c_a_t_e_d public static int interpolateCornersCharuco │ │ │ │ - (_L_i_s_t<_M_a_t> markerCorners, _M_a_t markerIds, _M_a_t image, │ │ │ │ - _C_h_a_r_u_c_o_B_o_a_r_d board, _M_a_t charucoCorners, _M_a_t charucoIds, │ │ │ │ - _M_a_t cameraMatrix, _M_a_t distCoeffs, int minMarkers) │ │ │ │ - Deprecated. │ │ │ │ - Use CharucoDetector::detectBoard │ │ │ │ - Interpolate position of ChArUco board corners │ │ │ │ - Parameters: │ │ │ │ - markerCorners - vector of already detected markers corners. │ │ │ │ - For each marker, its four corners are provided, (e.g std:: │ │ │ │ - vector > ). For N detected markers, │ │ │ │ - the dimensions of this array should be Nx4. The order of the │ │ │ │ - corners should be clockwise. │ │ │ │ - markerIds - list of identifiers for each marker in corners │ │ │ │ - image - input image necesary for corner refinement. Note that │ │ │ │ - markers are not detected and should be sent in corners and │ │ │ │ - ids parameters. │ │ │ │ - board - layout of ChArUco board. │ │ │ │ - charucoCorners - interpolated chessboard corners │ │ │ │ - charucoIds - interpolated chessboard corners identifiers │ │ │ │ - cameraMatrix - optional 3x3 floating-point camera matrix \(A │ │ │ │ - = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\) │ │ │ │ - distCoeffs - optional vector of distortion coefficients \( │ │ │ │ - (k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, │ │ │ │ - s_4]])\) of 4, 5, 8 or 12 elements │ │ │ │ - minMarkers - number of adjacent markers that must be detected │ │ │ │ - to return a charuco corner This function receives the │ │ │ │ - detected markers and returns the 2D position of the │ │ │ │ - chessboard corners from a ChArUco board using the detected │ │ │ │ - Aruco markers. If camera parameters are provided, the process │ │ │ │ - is based in an approximated pose estimation, else it is based │ │ │ │ - on local homography. Only visible corners are returned. For │ │ │ │ - each corner, its corresponding identifier is also returned in │ │ │ │ - charucoIds. The function returns the number of interpolated │ │ │ │ - corners. │ │ │ │ - Returns: │ │ │ │ - automatically generated │ │ │ │ - o ******** iinntteerrppoollaatteeCCoorrnneerrssCChhaarruuccoo ******** │ │ │ │ - _@_D_e_p_r_e_c_a_t_e_d public static int interpolateCornersCharuco │ │ │ │ - (_L_i_s_t<_M_a_t> markerCorners, _M_a_t markerIds, _M_a_t image, │ │ │ │ - _C_h_a_r_u_c_o_B_o_a_r_d board, _M_a_t charucoCorners, _M_a_t charucoIds, │ │ │ │ - _M_a_t cameraMatrix, _M_a_t distCoeffs) │ │ │ │ - Deprecated. │ │ │ │ - Use CharucoDetector::detectBoard │ │ │ │ - Interpolate position of ChArUco board corners │ │ │ │ - Parameters: │ │ │ │ - markerCorners - vector of already detected markers corners. │ │ │ │ - For each marker, its four corners are provided, (e.g std:: │ │ │ │ - vector > ). For N detected markers, │ │ │ │ - the dimensions of this array should be Nx4. The order of the │ │ │ │ - corners should be clockwise. │ │ │ │ - markerIds - list of identifiers for each marker in corners │ │ │ │ - image - input image necesary for corner refinement. Note that │ │ │ │ - markers are not detected and should be sent in corners and │ │ │ │ - ids parameters. │ │ │ │ - board - layout of ChArUco board. │ │ │ │ - charucoCorners - interpolated chessboard corners │ │ │ │ - charucoIds - interpolated chessboard corners identifiers │ │ │ │ - cameraMatrix - optional 3x3 floating-point camera matrix \(A │ │ │ │ - = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\) │ │ │ │ - distCoeffs - optional vector of distortion coefficients \( │ │ │ │ - (k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, │ │ │ │ - s_4]])\) of 4, 5, 8 or 12 elements This function receives the │ │ │ │ - detected markers and returns the 2D position of the │ │ │ │ - chessboard corners from a ChArUco board using the detected │ │ │ │ - Aruco markers. If camera parameters are provided, the process │ │ │ │ - is based in an approximated pose estimation, else it is based │ │ │ │ - on local homography. Only visible corners are returned. For │ │ │ │ - each corner, its corresponding identifier is also returned in │ │ │ │ - charucoIds. The function returns the number of interpolated │ │ │ │ - corners. │ │ │ │ - Returns: │ │ │ │ - automatically generated │ │ │ │ - o ******** iinntteerrppoollaatteeCCoorrnneerrssCChhaarruuccoo ******** │ │ │ │ - _@_D_e_p_r_e_c_a_t_e_d public static int interpolateCornersCharuco │ │ │ │ - (_L_i_s_t<_M_a_t> markerCorners, _M_a_t markerIds, _M_a_t image, │ │ │ │ - _C_h_a_r_u_c_o_B_o_a_r_d board, _M_a_t charucoCorners, _M_a_t charucoIds, │ │ │ │ - _M_a_t cameraMatrix) │ │ │ │ - Deprecated. │ │ │ │ - Use CharucoDetector::detectBoard │ │ │ │ - Interpolate position of ChArUco board corners │ │ │ │ - Parameters: │ │ │ │ - markerCorners - vector of already detected markers corners. │ │ │ │ - For each marker, its four corners are provided, (e.g std:: │ │ │ │ - vector > ). For N detected markers, │ │ │ │ - the dimensions of this array should be Nx4. The order of the │ │ │ │ - corners should be clockwise. │ │ │ │ - markerIds - list of identifiers for each marker in corners │ │ │ │ - image - input image necesary for corner refinement. Note that │ │ │ │ - markers are not detected and should be sent in corners and │ │ │ │ - ids parameters. │ │ │ │ - board - layout of ChArUco board. │ │ │ │ - charucoCorners - interpolated chessboard corners │ │ │ │ - charucoIds - interpolated chessboard corners identifiers │ │ │ │ - cameraMatrix - optional 3x3 floating-point camera matrix \(A │ │ │ │ - = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\) \((k_1, │ │ │ │ - k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\) │ │ │ │ - of 4, 5, 8 or 12 elements This function receives the detected │ │ │ │ - markers and returns the 2D position of the chessboard corners │ │ │ │ - from a ChArUco board using the detected Aruco markers. If │ │ │ │ - camera parameters are provided, the process is based in an │ │ │ │ - approximated pose estimation, else it is based on local │ │ │ │ - homography. Only visible corners are returned. For each │ │ │ │ - corner, its corresponding identifier is also returned in │ │ │ │ - charucoIds. The function returns the number of interpolated │ │ │ │ - corners. │ │ │ │ - Returns: │ │ │ │ - automatically generated │ │ │ │ - o ******** iinntteerrppoollaatteeCCoorrnneerrssCChhaarruuccoo ******** │ │ │ │ - _@_D_e_p_r_e_c_a_t_e_d public static int interpolateCornersCharuco │ │ │ │ - (_L_i_s_t<_M_a_t> markerCorners, _M_a_t markerIds, _M_a_t image, │ │ │ │ - _C_h_a_r_u_c_o_B_o_a_r_d board, _M_a_t charucoCorners, _M_a_t charucoIds) │ │ │ │ - Deprecated. │ │ │ │ - Use CharucoDetector::detectBoard │ │ │ │ - Interpolate position of ChArUco board corners │ │ │ │ - Parameters: │ │ │ │ - markerCorners - vector of already detected markers corners. │ │ │ │ - For each marker, its four corners are provided, (e.g std:: │ │ │ │ - vector > ). For N detected markers, │ │ │ │ - the dimensions of this array should be Nx4. The order of the │ │ │ │ - corners should be clockwise. │ │ │ │ - markerIds - list of identifiers for each marker in corners │ │ │ │ - image - input image necesary for corner refinement. Note that │ │ │ │ - markers are not detected and should be sent in corners and │ │ │ │ - ids parameters. │ │ │ │ - board - layout of ChArUco board. │ │ │ │ - charucoCorners - interpolated chessboard corners │ │ │ │ - charucoIds - interpolated chessboard corners identifiers \(A │ │ │ │ - = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\) \((k_1, │ │ │ │ - k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\) │ │ │ │ - of 4, 5, 8 or 12 elements This function receives the detected │ │ │ │ - markers and returns the 2D position of the chessboard corners │ │ │ │ - from a ChArUco board using the detected Aruco markers. If │ │ │ │ - camera parameters are provided, the process is based in an │ │ │ │ - approximated pose estimation, else it is based on local │ │ │ │ - homography. Only visible corners are returned. For each │ │ │ │ - corner, its corresponding identifier is also returned in │ │ │ │ - charucoIds. The function returns the number of interpolated │ │ │ │ - corners. │ │ │ │ - Returns: │ │ │ │ - automatically generated │ │ │ │ - o ******** ddeetteeccttCChhaarruuccooDDiiaammoonndd ******** │ │ │ │ - _@_D_e_p_r_e_c_a_t_e_d public static void detectCharucoDiamond(_M_a_t image, │ │ │ │ - _L_i_s_t<_M_a_t> markerCorners, _M_a_t markerIds, │ │ │ │ - float squareMarkerLengthRate, _L_i_s_t<_M_a_t> diamondCorners, │ │ │ │ - _M_a_t diamondIds, _M_a_t cameraMatrix, _M_a_t distCoeffs, │ │ │ │ - _D_i_c_t_i_o_n_a_r_y dictionary) │ │ │ │ - Deprecated. │ │ │ │ - Use CharucoDetector::detectDiamonds │ │ │ │ - Detect ChArUco Diamond markers │ │ │ │ - Parameters: │ │ │ │ - image - input image necessary for corner subpixel. │ │ │ │ - markerCorners - list of detected marker corners from │ │ │ │ - detectMarkers function. │ │ │ │ - markerIds - list of marker ids in markerCorners. │ │ │ │ - squareMarkerLengthRate - rate between square and marker │ │ │ │ - length: squareMarkerLengthRate = squareLength/markerLength. │ │ │ │ - The real units are not necessary. │ │ │ │ - diamondCorners - output list of detected diamond corners (4 │ │ │ │ - corners per diamond). The order is the same than in marker │ │ │ │ - corners: top left, top right, bottom right and bottom left. │ │ │ │ - Similar format than the corners returned by detectMarkers │ │ │ │ - (e.g std::vector > ). │ │ │ │ - diamondIds - ids of the diamonds in diamondCorners. The id of │ │ │ │ - each diamond is in fact of type Vec4i, so each diamond has 4 │ │ │ │ - ids, which are the ids of the aruco markers composing the │ │ │ │ - diamond. │ │ │ │ - cameraMatrix - Optional camera calibration matrix. │ │ │ │ - distCoeffs - Optional camera distortion coefficients. │ │ │ │ - dictionary - dictionary of markers indicating the type of │ │ │ │ - markers. This function detects Diamond markers from the │ │ │ │ - previous detected ArUco markers. The diamonds are returned in │ │ │ │ - the diamondCorners and diamondIds parameters. If camera │ │ │ │ - calibration parameters are provided, the diamond search is │ │ │ │ - based on reprojection. If not, diamond search is based on │ │ │ │ - homography. Homography is faster than reprojection, but less │ │ │ │ - accurate. │ │ │ │ - o ******** ddeetteeccttCChhaarruuccooDDiiaammoonndd ******** │ │ │ │ - _@_D_e_p_r_e_c_a_t_e_d public static void detectCharucoDiamond(_M_a_t image, │ │ │ │ - _L_i_s_t<_M_a_t> markerCorners, _M_a_t markerIds, │ │ │ │ - float squareMarkerLengthRate, _L_i_s_t<_M_a_t> diamondCorners, │ │ │ │ - _M_a_t diamondIds, _M_a_t cameraMatrix, _M_a_t distCoeffs) │ │ │ │ - Deprecated. │ │ │ │ - Use CharucoDetector::detectDiamonds │ │ │ │ - Detect ChArUco Diamond markers │ │ │ │ - Parameters: │ │ │ │ - image - input image necessary for corner subpixel. │ │ │ │ - markerCorners - list of detected marker corners from │ │ │ │ - detectMarkers function. │ │ │ │ - markerIds - list of marker ids in markerCorners. │ │ │ │ - squareMarkerLengthRate - rate between square and marker │ │ │ │ - length: squareMarkerLengthRate = squareLength/markerLength. │ │ │ │ - The real units are not necessary. │ │ │ │ - diamondCorners - output list of detected diamond corners (4 │ │ │ │ - corners per diamond). The order is the same than in marker │ │ │ │ - corners: top left, top right, bottom right and bottom left. │ │ │ │ - Similar format than the corners returned by detectMarkers │ │ │ │ - (e.g std::vector > ). │ │ │ │ - diamondIds - ids of the diamonds in diamondCorners. The id of │ │ │ │ - each diamond is in fact of type Vec4i, so each diamond has 4 │ │ │ │ - ids, which are the ids of the aruco markers composing the │ │ │ │ - diamond. │ │ │ │ - cameraMatrix - Optional camera calibration matrix. │ │ │ │ - distCoeffs - Optional camera distortion coefficients. This │ │ │ │ - function detects Diamond markers from the previous detected │ │ │ │ - ArUco markers. The diamonds are returned in the │ │ │ │ - diamondCorners and diamondIds parameters. If camera │ │ │ │ - calibration parameters are provided, the diamond search is │ │ │ │ - based on reprojection. If not, diamond search is based on │ │ │ │ - homography. Homography is faster than reprojection, but less │ │ │ │ - accurate. │ │ │ │ - o ******** ddeetteeccttCChhaarruuccooDDiiaammoonndd ******** │ │ │ │ - _@_D_e_p_r_e_c_a_t_e_d public static void detectCharucoDiamond(_M_a_t image, │ │ │ │ - _L_i_s_t<_M_a_t> markerCorners, _M_a_t markerIds, │ │ │ │ - float squareMarkerLengthRate, _L_i_s_t<_M_a_t> diamondCorners, │ │ │ │ - _M_a_t diamondIds, _M_a_t cameraMatrix) │ │ │ │ - Deprecated. │ │ │ │ - Use CharucoDetector::detectDiamonds │ │ │ │ - Detect ChArUco Diamond markers │ │ │ │ - Parameters: │ │ │ │ - image - input image necessary for corner subpixel. │ │ │ │ - markerCorners - list of detected marker corners from │ │ │ │ - detectMarkers function. │ │ │ │ - markerIds - list of marker ids in markerCorners. │ │ │ │ - squareMarkerLengthRate - rate between square and marker │ │ │ │ - length: squareMarkerLengthRate = squareLength/markerLength. │ │ │ │ - The real units are not necessary. │ │ │ │ - diamondCorners - output list of detected diamond corners (4 │ │ │ │ - corners per diamond). The order is the same than in marker │ │ │ │ - corners: top left, top right, bottom right and bottom left. │ │ │ │ - Similar format than the corners returned by detectMarkers │ │ │ │ - (e.g std::vector > ). │ │ │ │ - diamondIds - ids of the diamonds in diamondCorners. The id of │ │ │ │ - each diamond is in fact of type Vec4i, so each diamond has 4 │ │ │ │ - ids, which are the ids of the aruco markers composing the │ │ │ │ - diamond. │ │ │ │ - cameraMatrix - Optional camera calibration matrix. This │ │ │ │ - function detects Diamond markers from the previous detected │ │ │ │ - ArUco markers. The diamonds are returned in the │ │ │ │ - diamondCorners and diamondIds parameters. If camera │ │ │ │ - calibration parameters are provided, the diamond search is │ │ │ │ - based on reprojection. If not, diamond search is based on │ │ │ │ - homography. Homography is faster than reprojection, but less │ │ │ │ - accurate. │ │ │ │ - o ******** ddeetteeccttCChhaarruuccooDDiiaammoonndd ******** │ │ │ │ - _@_D_e_p_r_e_c_a_t_e_d public static void detectCharucoDiamond(_M_a_t image, │ │ │ │ - _L_i_s_t<_M_a_t> markerCorners, _M_a_t markerIds, │ │ │ │ - float squareMarkerLengthRate, _L_i_s_t<_M_a_t> diamondCorners, │ │ │ │ - _M_a_t diamondIds) │ │ │ │ - Deprecated. │ │ │ │ - Use CharucoDetector::detectDiamonds │ │ │ │ - Detect ChArUco Diamond markers │ │ │ │ - Parameters: │ │ │ │ - image - input image necessary for corner subpixel. │ │ │ │ - markerCorners - list of detected marker corners from │ │ │ │ - detectMarkers function. │ │ │ │ - markerIds - list of marker ids in markerCorners. │ │ │ │ - squareMarkerLengthRate - rate between square and marker │ │ │ │ - length: squareMarkerLengthRate = squareLength/markerLength. │ │ │ │ - The real units are not necessary. │ │ │ │ - diamondCorners - output list of detected diamond corners (4 │ │ │ │ - corners per diamond). The order is the same than in marker │ │ │ │ - corners: top left, top right, bottom right and bottom left. │ │ │ │ - Similar format than the corners returned by detectMarkers │ │ │ │ - (e.g std::vector > ). │ │ │ │ - diamondIds - ids of the diamonds in diamondCorners. The id of │ │ │ │ - each diamond is in fact of type Vec4i, so each diamond has 4 │ │ │ │ - ids, which are the ids of the aruco markers composing the │ │ │ │ - diamond. This function detects Diamond markers from the │ │ │ │ - previous detected ArUco markers. The diamonds are returned in │ │ │ │ - the diamondCorners and diamondIds parameters. If camera │ │ │ │ - calibration parameters are provided, the diamond search is │ │ │ │ - based on reprojection. If not, diamond search is based on │ │ │ │ - homography. Homography is faster than reprojection, but less │ │ │ │ - accurate. │ │ │ │ o ******** ccaalliibbrraatteeCCaammeerraaAArruuccooEExxtteennddeedd ******** │ │ │ │ _@_D_e_p_r_e_c_a_t_e_d public static double calibrateCameraArucoExtended │ │ │ │ (_L_i_s_t<_M_a_t> corners, _M_a_t ids, _M_a_t counter, _B_o_a_r_d board, │ │ │ │ _S_i_z_e imageSize, _M_a_t cameraMatrix, _M_a_t distCoeffs, _L_i_s_t<_M_a_t> rvecs, │ │ │ │ _L_i_s_t<_M_a_t> tvecs, _M_a_t stdDeviationsIntrinsics, │ │ │ │ _M_a_t stdDeviationsExtrinsics, _M_a_t perViewErrors, int flags, │ │ │ │ _T_e_r_m_C_r_i_t_e_r_i_a criteria) │ │ │ │ @@ -1505,8 +1229,284 @@ │ │ │ │ charucoIds - automatically generated │ │ │ │ board - automatically generated │ │ │ │ imageSize - automatically generated │ │ │ │ cameraMatrix - automatically generated │ │ │ │ distCoeffs - automatically generated │ │ │ │ Returns: │ │ │ │ automatically generated │ │ │ │ + o ******** iinntteerrppoollaatteeCCoorrnneerrssCChhaarruuccoo ******** │ │ │ │ + _@_D_e_p_r_e_c_a_t_e_d public static int interpolateCornersCharuco │ │ │ │ + (_L_i_s_t<_M_a_t> markerCorners, _M_a_t markerIds, _M_a_t image, │ │ │ │ + _C_h_a_r_u_c_o_B_o_a_r_d board, _M_a_t charucoCorners, _M_a_t charucoIds, │ │ │ │ + _M_a_t cameraMatrix, _M_a_t distCoeffs, int minMarkers) │ │ │ │ + Deprecated. │ │ │ │ + Use CharucoDetector::detectBoard │ │ │ │ + Interpolate position of ChArUco board corners │ │ │ │ + Parameters: │ │ │ │ + markerCorners - vector of already detected markers corners. │ │ │ │ + For each marker, its four corners are provided, (e.g std:: │ │ │ │ + vector > ). For N detected markers, │ │ │ │ + the dimensions of this array should be Nx4. The order of the │ │ │ │ + corners should be clockwise. │ │ │ │ + markerIds - list of identifiers for each marker in corners │ │ │ │ + image - input image necesary for corner refinement. Note that │ │ │ │ + markers are not detected and should be sent in corners and │ │ │ │ + ids parameters. │ │ │ │ + board - layout of ChArUco board. │ │ │ │ + charucoCorners - interpolated chessboard corners │ │ │ │ + charucoIds - interpolated chessboard corners identifiers │ │ │ │ + cameraMatrix - optional 3x3 floating-point camera matrix \(A │ │ │ │ + = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\) │ │ │ │ + distCoeffs - optional vector of distortion coefficients \( │ │ │ │ + (k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, │ │ │ │ + s_4]])\) of 4, 5, 8 or 12 elements │ │ │ │ + minMarkers - number of adjacent markers that must be detected │ │ │ │ + to return a charuco corner This function receives the │ │ │ │ + detected markers and returns the 2D position of the │ │ │ │ + chessboard corners from a ChArUco board using the detected │ │ │ │ + Aruco markers. If camera parameters are provided, the process │ │ │ │ + is based in an approximated pose estimation, else it is based │ │ │ │ + on local homography. Only visible corners are returned. For │ │ │ │ + each corner, its corresponding identifier is also returned in │ │ │ │ + charucoIds. The function returns the number of interpolated │ │ │ │ + corners. │ │ │ │ + Returns: │ │ │ │ + automatically generated │ │ │ │ + o ******** iinntteerrppoollaatteeCCoorrnneerrssCChhaarruuccoo ******** │ │ │ │ + _@_D_e_p_r_e_c_a_t_e_d public static int interpolateCornersCharuco │ │ │ │ + (_L_i_s_t<_M_a_t> markerCorners, _M_a_t markerIds, _M_a_t image, │ │ │ │ + _C_h_a_r_u_c_o_B_o_a_r_d board, _M_a_t charucoCorners, _M_a_t charucoIds, │ │ │ │ + _M_a_t cameraMatrix, _M_a_t distCoeffs) │ │ │ │ + Deprecated. │ │ │ │ + Use CharucoDetector::detectBoard │ │ │ │ + Interpolate position of ChArUco board corners │ │ │ │ + Parameters: │ │ │ │ + markerCorners - vector of already detected markers corners. │ │ │ │ + For each marker, its four corners are provided, (e.g std:: │ │ │ │ + vector > ). For N detected markers, │ │ │ │ + the dimensions of this array should be Nx4. The order of the │ │ │ │ + corners should be clockwise. │ │ │ │ + markerIds - list of identifiers for each marker in corners │ │ │ │ + image - input image necesary for corner refinement. Note that │ │ │ │ + markers are not detected and should be sent in corners and │ │ │ │ + ids parameters. │ │ │ │ + board - layout of ChArUco board. │ │ │ │ + charucoCorners - interpolated chessboard corners │ │ │ │ + charucoIds - interpolated chessboard corners identifiers │ │ │ │ + cameraMatrix - optional 3x3 floating-point camera matrix \(A │ │ │ │ + = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\) │ │ │ │ + distCoeffs - optional vector of distortion coefficients \( │ │ │ │ + (k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, │ │ │ │ + s_4]])\) of 4, 5, 8 or 12 elements This function receives the │ │ │ │ + detected markers and returns the 2D position of the │ │ │ │ + chessboard corners from a ChArUco board using the detected │ │ │ │ + Aruco markers. If camera parameters are provided, the process │ │ │ │ + is based in an approximated pose estimation, else it is based │ │ │ │ + on local homography. Only visible corners are returned. For │ │ │ │ + each corner, its corresponding identifier is also returned in │ │ │ │ + charucoIds. The function returns the number of interpolated │ │ │ │ + corners. │ │ │ │ + Returns: │ │ │ │ + automatically generated │ │ │ │ + o ******** iinntteerrppoollaatteeCCoorrnneerrssCChhaarruuccoo ******** │ │ │ │ + _@_D_e_p_r_e_c_a_t_e_d public static int interpolateCornersCharuco │ │ │ │ + (_L_i_s_t<_M_a_t> markerCorners, _M_a_t markerIds, _M_a_t image, │ │ │ │ + _C_h_a_r_u_c_o_B_o_a_r_d board, _M_a_t charucoCorners, _M_a_t charucoIds, │ │ │ │ + _M_a_t cameraMatrix) │ │ │ │ + Deprecated. │ │ │ │ + Use CharucoDetector::detectBoard │ │ │ │ + Interpolate position of ChArUco board corners │ │ │ │ + Parameters: │ │ │ │ + markerCorners - vector of already detected markers corners. │ │ │ │ + For each marker, its four corners are provided, (e.g std:: │ │ │ │ + vector > ). For N detected markers, │ │ │ │ + the dimensions of this array should be Nx4. The order of the │ │ │ │ + corners should be clockwise. │ │ │ │ + markerIds - list of identifiers for each marker in corners │ │ │ │ + image - input image necesary for corner refinement. Note that │ │ │ │ + markers are not detected and should be sent in corners and │ │ │ │ + ids parameters. │ │ │ │ + board - layout of ChArUco board. │ │ │ │ + charucoCorners - interpolated chessboard corners │ │ │ │ + charucoIds - interpolated chessboard corners identifiers │ │ │ │ + cameraMatrix - optional 3x3 floating-point camera matrix \(A │ │ │ │ + = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\) \((k_1, │ │ │ │ + k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\) │ │ │ │ + of 4, 5, 8 or 12 elements This function receives the detected │ │ │ │ + markers and returns the 2D position of the chessboard corners │ │ │ │ + from a ChArUco board using the detected Aruco markers. If │ │ │ │ + camera parameters are provided, the process is based in an │ │ │ │ + approximated pose estimation, else it is based on local │ │ │ │ + homography. Only visible corners are returned. For each │ │ │ │ + corner, its corresponding identifier is also returned in │ │ │ │ + charucoIds. The function returns the number of interpolated │ │ │ │ + corners. │ │ │ │ + Returns: │ │ │ │ + automatically generated │ │ │ │ + o ******** iinntteerrppoollaatteeCCoorrnneerrssCChhaarruuccoo ******** │ │ │ │ + _@_D_e_p_r_e_c_a_t_e_d public static int interpolateCornersCharuco │ │ │ │ + (_L_i_s_t<_M_a_t> markerCorners, _M_a_t markerIds, _M_a_t image, │ │ │ │ + _C_h_a_r_u_c_o_B_o_a_r_d board, _M_a_t charucoCorners, _M_a_t charucoIds) │ │ │ │ + Deprecated. │ │ │ │ + Use CharucoDetector::detectBoard │ │ │ │ + Interpolate position of ChArUco board corners │ │ │ │ + Parameters: │ │ │ │ + markerCorners - vector of already detected markers corners. │ │ │ │ + For each marker, its four corners are provided, (e.g std:: │ │ │ │ + vector > ). For N detected markers, │ │ │ │ + the dimensions of this array should be Nx4. The order of the │ │ │ │ + corners should be clockwise. │ │ │ │ + markerIds - list of identifiers for each marker in corners │ │ │ │ + image - input image necesary for corner refinement. Note that │ │ │ │ + markers are not detected and should be sent in corners and │ │ │ │ + ids parameters. │ │ │ │ + board - layout of ChArUco board. │ │ │ │ + charucoCorners - interpolated chessboard corners │ │ │ │ + charucoIds - interpolated chessboard corners identifiers \(A │ │ │ │ + = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\) \((k_1, │ │ │ │ + k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\) │ │ │ │ + of 4, 5, 8 or 12 elements This function receives the detected │ │ │ │ + markers and returns the 2D position of the chessboard corners │ │ │ │ + from a ChArUco board using the detected Aruco markers. If │ │ │ │ + camera parameters are provided, the process is based in an │ │ │ │ + approximated pose estimation, else it is based on local │ │ │ │ + homography. Only visible corners are returned. For each │ │ │ │ + corner, its corresponding identifier is also returned in │ │ │ │ + charucoIds. The function returns the number of interpolated │ │ │ │ + corners. │ │ │ │ + Returns: │ │ │ │ + automatically generated │ │ │ │ + o ******** ddeetteeccttCChhaarruuccooDDiiaammoonndd ******** │ │ │ │ + _@_D_e_p_r_e_c_a_t_e_d public static void detectCharucoDiamond(_M_a_t image, │ │ │ │ + _L_i_s_t<_M_a_t> markerCorners, _M_a_t markerIds, │ │ │ │ + float squareMarkerLengthRate, _L_i_s_t<_M_a_t> diamondCorners, │ │ │ │ + _M_a_t diamondIds, _M_a_t cameraMatrix, _M_a_t distCoeffs, │ │ │ │ + _D_i_c_t_i_o_n_a_r_y dictionary) │ │ │ │ + Deprecated. │ │ │ │ + Use CharucoDetector::detectDiamonds │ │ │ │ + Detect ChArUco Diamond markers │ │ │ │ + Parameters: │ │ │ │ + image - input image necessary for corner subpixel. │ │ │ │ + markerCorners - list of detected marker corners from │ │ │ │ + detectMarkers function. │ │ │ │ + markerIds - list of marker ids in markerCorners. │ │ │ │ + squareMarkerLengthRate - rate between square and marker │ │ │ │ + length: squareMarkerLengthRate = squareLength/markerLength. │ │ │ │ + The real units are not necessary. │ │ │ │ + diamondCorners - output list of detected diamond corners (4 │ │ │ │ + corners per diamond). The order is the same than in marker │ │ │ │ + corners: top left, top right, bottom right and bottom left. │ │ │ │ + Similar format than the corners returned by detectMarkers │ │ │ │ + (e.g std::vector > ). │ │ │ │ + diamondIds - ids of the diamonds in diamondCorners. The id of │ │ │ │ + each diamond is in fact of type Vec4i, so each diamond has 4 │ │ │ │ + ids, which are the ids of the aruco markers composing the │ │ │ │ + diamond. │ │ │ │ + cameraMatrix - Optional camera calibration matrix. │ │ │ │ + distCoeffs - Optional camera distortion coefficients. │ │ │ │ + dictionary - dictionary of markers indicating the type of │ │ │ │ + markers. This function detects Diamond markers from the │ │ │ │ + previous detected ArUco markers. The diamonds are returned in │ │ │ │ + the diamondCorners and diamondIds parameters. If camera │ │ │ │ + calibration parameters are provided, the diamond search is │ │ │ │ + based on reprojection. If not, diamond search is based on │ │ │ │ + homography. Homography is faster than reprojection, but less │ │ │ │ + accurate. │ │ │ │ + o ******** ddeetteeccttCChhaarruuccooDDiiaammoonndd ******** │ │ │ │ + _@_D_e_p_r_e_c_a_t_e_d public static void detectCharucoDiamond(_M_a_t image, │ │ │ │ + _L_i_s_t<_M_a_t> markerCorners, _M_a_t markerIds, │ │ │ │ + float squareMarkerLengthRate, _L_i_s_t<_M_a_t> diamondCorners, │ │ │ │ + _M_a_t diamondIds, _M_a_t cameraMatrix, _M_a_t distCoeffs) │ │ │ │ + Deprecated. │ │ │ │ + Use CharucoDetector::detectDiamonds │ │ │ │ + Detect ChArUco Diamond markers │ │ │ │ + Parameters: │ │ │ │ + image - input image necessary for corner subpixel. │ │ │ │ + markerCorners - list of detected marker corners from │ │ │ │ + detectMarkers function. │ │ │ │ + markerIds - list of marker ids in markerCorners. │ │ │ │ + squareMarkerLengthRate - rate between square and marker │ │ │ │ + length: squareMarkerLengthRate = squareLength/markerLength. │ │ │ │ + The real units are not necessary. │ │ │ │ + diamondCorners - output list of detected diamond corners (4 │ │ │ │ + corners per diamond). The order is the same than in marker │ │ │ │ + corners: top left, top right, bottom right and bottom left. │ │ │ │ + Similar format than the corners returned by detectMarkers │ │ │ │ + (e.g std::vector > ). │ │ │ │ + diamondIds - ids of the diamonds in diamondCorners. The id of │ │ │ │ + each diamond is in fact of type Vec4i, so each diamond has 4 │ │ │ │ + ids, which are the ids of the aruco markers composing the │ │ │ │ + diamond. │ │ │ │ + cameraMatrix - Optional camera calibration matrix. │ │ │ │ + distCoeffs - Optional camera distortion coefficients. This │ │ │ │ + function detects Diamond markers from the previous detected │ │ │ │ + ArUco markers. The diamonds are returned in the │ │ │ │ + diamondCorners and diamondIds parameters. If camera │ │ │ │ + calibration parameters are provided, the diamond search is │ │ │ │ + based on reprojection. If not, diamond search is based on │ │ │ │ + homography. Homography is faster than reprojection, but less │ │ │ │ + accurate. │ │ │ │ + o ******** ddeetteeccttCChhaarruuccooDDiiaammoonndd ******** │ │ │ │ + _@_D_e_p_r_e_c_a_t_e_d public static void detectCharucoDiamond(_M_a_t image, │ │ │ │ + _L_i_s_t<_M_a_t> markerCorners, _M_a_t markerIds, │ │ │ │ + float squareMarkerLengthRate, _L_i_s_t<_M_a_t> diamondCorners, │ │ │ │ + _M_a_t diamondIds, _M_a_t cameraMatrix) │ │ │ │ + Deprecated. │ │ │ │ + Use CharucoDetector::detectDiamonds │ │ │ │ + Detect ChArUco Diamond markers │ │ │ │ + Parameters: │ │ │ │ + image - input image necessary for corner subpixel. │ │ │ │ + markerCorners - list of detected marker corners from │ │ │ │ + detectMarkers function. │ │ │ │ + markerIds - list of marker ids in markerCorners. │ │ │ │ + squareMarkerLengthRate - rate between square and marker │ │ │ │ + length: squareMarkerLengthRate = squareLength/markerLength. │ │ │ │ + The real units are not necessary. │ │ │ │ + diamondCorners - output list of detected diamond corners (4 │ │ │ │ + corners per diamond). The order is the same than in marker │ │ │ │ + corners: top left, top right, bottom right and bottom left. │ │ │ │ + Similar format than the corners returned by detectMarkers │ │ │ │ + (e.g std::vector > ). │ │ │ │ + diamondIds - ids of the diamonds in diamondCorners. The id of │ │ │ │ + each diamond is in fact of type Vec4i, so each diamond has 4 │ │ │ │ + ids, which are the ids of the aruco markers composing the │ │ │ │ + diamond. │ │ │ │ + cameraMatrix - Optional camera calibration matrix. This │ │ │ │ + function detects Diamond markers from the previous detected │ │ │ │ + ArUco markers. The diamonds are returned in the │ │ │ │ + diamondCorners and diamondIds parameters. If camera │ │ │ │ + calibration parameters are provided, the diamond search is │ │ │ │ + based on reprojection. If not, diamond search is based on │ │ │ │ + homography. Homography is faster than reprojection, but less │ │ │ │ + accurate. │ │ │ │ + o ******** ddeetteeccttCChhaarruuccooDDiiaammoonndd ******** │ │ │ │ + _@_D_e_p_r_e_c_a_t_e_d public static void detectCharucoDiamond(_M_a_t image, │ │ │ │ + _L_i_s_t<_M_a_t> markerCorners, _M_a_t markerIds, │ │ │ │ + float squareMarkerLengthRate, _L_i_s_t<_M_a_t> diamondCorners, │ │ │ │ + _M_a_t diamondIds) │ │ │ │ + Deprecated. │ │ │ │ + Use CharucoDetector::detectDiamonds │ │ │ │ + Detect ChArUco Diamond markers │ │ │ │ + Parameters: │ │ │ │ + image - input image necessary for corner subpixel. │ │ │ │ + markerCorners - list of detected marker corners from │ │ │ │ + detectMarkers function. │ │ │ │ + markerIds - list of marker ids in markerCorners. │ │ │ │ + squareMarkerLengthRate - rate between square and marker │ │ │ │ + length: squareMarkerLengthRate = squareLength/markerLength. │ │ │ │ + The real units are not necessary. │ │ │ │ + diamondCorners - output list of detected diamond corners (4 │ │ │ │ + corners per diamond). The order is the same than in marker │ │ │ │ + corners: top left, top right, bottom right and bottom left. │ │ │ │ + Similar format than the corners returned by detectMarkers │ │ │ │ + (e.g std::vector > ). │ │ │ │ + diamondIds - ids of the diamonds in diamondCorners. The id of │ │ │ │ + each diamond is in fact of type Vec4i, so each diamond has 4 │ │ │ │ + ids, which are the ids of the aruco markers composing the │ │ │ │ + diamond. This function detects Diamond markers from the │ │ │ │ + previous detected ArUco markers. The diamonds are returned in │ │ │ │ + the diamondCorners and diamondIds parameters. If camera │ │ │ │ + calibration parameters are provided, the diamond search is │ │ │ │ + based on reprojection. If not, diamond search is based on │ │ │ │ + homography. Homography is faster than reprojection, but less │ │ │ │ + accurate. │ │ │ │ =============================================================================== │ │ ├── ./usr/share/doc/opencv-doc/opencv4/html/javadoc/org/opencv/img_hash/Img_hash.html │ │ │┄ Ordering differences only │ │ │ @@ -276,139 +276,152 @@ │ │ │ │ │ │ │ │ │
  • │ │ │
    │ │ │

    Method Details

    │ │ │
      │ │ │
    • │ │ │ -
      │ │ │ -

      radialVarianceHash

      │ │ │ -
      public static void radialVarianceHash(Mat inputArr, │ │ │ +
      │ │ │ +

      marrHildrethHash

      │ │ │ +
      public static void marrHildrethHash(Mat inputArr, │ │ │ Mat outputArr, │ │ │ - double sigma, │ │ │ - int numOfAngleLine)
      │ │ │ -
      Computes radial variance hash of the input image
      │ │ │ + float alpha, │ │ │ + float scale)
      │ │ │ +
      Computes average hash value of the input image
      │ │ │
      │ │ │
      Parameters:
      │ │ │
      inputArr - input image want to compute hash value, │ │ │ type should be CV_8UC4, CV_8UC3, CV_8UC1.
      │ │ │ -
      outputArr - Hash value of input
      │ │ │ -
      sigma - Gaussian kernel standard deviation
      │ │ │ -
      numOfAngleLine - The number of angles to consider
      │ │ │ +
      outputArr - Hash value of input, it will contain 16 hex │ │ │ + decimal number, return type is CV_8U
      │ │ │ +
      alpha - int scale factor for marr wavelet (default=2).
      │ │ │ +
      scale - int level of scale factor (default = 1)
      │ │ │
      │ │ │
      │ │ │
    • │ │ │
    • │ │ │ -
      │ │ │ -

      radialVarianceHash

      │ │ │ -
      public static void radialVarianceHash(Mat inputArr, │ │ │ +
      │ │ │ +

      marrHildrethHash

      │ │ │ +
      public static void marrHildrethHash(Mat inputArr, │ │ │ Mat outputArr, │ │ │ - double sigma)
      │ │ │ -
      Computes radial variance hash of the input image
      │ │ │ + float alpha)
      │ │ │ +
      Computes average hash value of the input image
      │ │ │
      │ │ │
      Parameters:
      │ │ │
      inputArr - input image want to compute hash value, │ │ │ type should be CV_8UC4, CV_8UC3, CV_8UC1.
      │ │ │ -
      outputArr - Hash value of input
      │ │ │ -
      sigma - Gaussian kernel standard deviation
      │ │ │ +
      outputArr - Hash value of input, it will contain 16 hex │ │ │ + decimal number, return type is CV_8U
      │ │ │ +
      alpha - int scale factor for marr wavelet (default=2).
      │ │ │
      │ │ │
      │ │ │
    • │ │ │
    • │ │ │ -
      │ │ │ -

      radialVarianceHash

      │ │ │ -
      public static void radialVarianceHash(Mat inputArr, │ │ │ +
      │ │ │ +

      marrHildrethHash

      │ │ │ +
      public static void marrHildrethHash(Mat inputArr, │ │ │ Mat outputArr)
      │ │ │ -
      Computes radial variance hash of the input image
      │ │ │ +
      Computes average hash value of the input image
      │ │ │
      │ │ │
      Parameters:
      │ │ │
      inputArr - input image want to compute hash value, │ │ │ type should be CV_8UC4, CV_8UC3, CV_8UC1.
      │ │ │ -
      outputArr - Hash value of input
      │ │ │ +
      outputArr - Hash value of input, it will contain 16 hex │ │ │ + decimal number, return type is CV_8U
      │ │ │
      │ │ │
      │ │ │
    • │ │ │
    • │ │ │ -
      │ │ │ -

      pHash

      │ │ │ -
      public static void pHash(Mat inputArr, │ │ │ +
      │ │ │ +

      averageHash

      │ │ │ +
      public static void averageHash(Mat inputArr, │ │ │ Mat outputArr)
      │ │ │ -
      Computes pHash value of the input image
      │ │ │ +
      Calculates img_hash::AverageHash in one call
      │ │ │ +
      │ │ │ +
      Parameters:
      │ │ │ +
      inputArr - input image want to compute hash value, type should be CV_8UC4, CV_8UC3 or CV_8UC1.
      │ │ │ +
      outputArr - Hash value of input, it will contain 16 hex decimal number, return type is CV_8U
      │ │ │ +
      │ │ │ +
      │ │ │ +
    • │ │ │ +
    • │ │ │ +
      │ │ │ +

      colorMomentHash

      │ │ │ +
      public static void colorMomentHash(Mat inputArr, │ │ │ + Mat outputArr)
      │ │ │ +
      Computes color moment hash of the input, the algorithm │ │ │ + is come from the paper "Perceptual Hashing for Color Images │ │ │ + Using Invariant Moments"
      │ │ │
      │ │ │
      Parameters:
      │ │ │
      inputArr - input image want to compute hash value, │ │ │ - type should be CV_8UC4, CV_8UC3, CV_8UC1.
      │ │ │ -
      outputArr - Hash value of input, it will contain 8 uchar value
      │ │ │ + type should be CV_8UC4, CV_8UC3 or CV_8UC1. │ │ │ +
      outputArr - 42 hash values with type CV_64F(double)
      │ │ │
      │ │ │
      │ │ │
    • │ │ │
    • │ │ │ -
      │ │ │ -

      marrHildrethHash

      │ │ │ -
      public static void marrHildrethHash(Mat inputArr, │ │ │ +
      │ │ │ +

      radialVarianceHash

      │ │ │ +
      public static void radialVarianceHash(Mat inputArr, │ │ │ Mat outputArr, │ │ │ - float alpha, │ │ │ - float scale)
      │ │ │ -
      Computes average hash value of the input image
      │ │ │ + double sigma, │ │ │ + int numOfAngleLine)
      │ │ │ +
      Computes radial variance hash of the input image
      │ │ │
      │ │ │
      Parameters:
      │ │ │
      inputArr - input image want to compute hash value, │ │ │ type should be CV_8UC4, CV_8UC3, CV_8UC1.
      │ │ │ -
      outputArr - Hash value of input, it will contain 16 hex │ │ │ - decimal number, return type is CV_8U
      │ │ │ -
      alpha - int scale factor for marr wavelet (default=2).
      │ │ │ -
      scale - int level of scale factor (default = 1)
      │ │ │ +
      outputArr - Hash value of input
      │ │ │ +
      sigma - Gaussian kernel standard deviation
      │ │ │ +
      numOfAngleLine - The number of angles to consider
      │ │ │
      │ │ │
      │ │ │
    • │ │ │
    • │ │ │ -
      │ │ │ -

      marrHildrethHash

      │ │ │ -
      public static void marrHildrethHash(Mat inputArr, │ │ │ +
      │ │ │ +

      radialVarianceHash

      │ │ │ +
      public static void radialVarianceHash(Mat inputArr, │ │ │ Mat outputArr, │ │ │ - float alpha)
      │ │ │ -
      Computes average hash value of the input image
      │ │ │ + double sigma)
      │ │ │ +
      Computes radial variance hash of the input image
      │ │ │
      │ │ │
      Parameters:
      │ │ │
      inputArr - input image want to compute hash value, │ │ │ type should be CV_8UC4, CV_8UC3, CV_8UC1.
      │ │ │ -
      outputArr - Hash value of input, it will contain 16 hex │ │ │ - decimal number, return type is CV_8U
      │ │ │ -
      alpha - int scale factor for marr wavelet (default=2).
      │ │ │ +
      outputArr - Hash value of input
      │ │ │ +
      sigma - Gaussian kernel standard deviation
      │ │ │
      │ │ │
      │ │ │
    • │ │ │
    • │ │ │ -
      │ │ │ -

      marrHildrethHash

      │ │ │ -
      public static void marrHildrethHash(Mat inputArr, │ │ │ +
      │ │ │ +

      radialVarianceHash

      │ │ │ +
      public static void radialVarianceHash(Mat inputArr, │ │ │ Mat outputArr)
      │ │ │ -
      Computes average hash value of the input image
      │ │ │ +
      Computes radial variance hash of the input image
      │ │ │
      │ │ │
      Parameters:
      │ │ │
      inputArr - input image want to compute hash value, │ │ │ type should be CV_8UC4, CV_8UC3, CV_8UC1.
      │ │ │ -
      outputArr - Hash value of input, it will contain 16 hex │ │ │ - decimal number, return type is CV_8U
      │ │ │ +
      outputArr - Hash value of input
      │ │ │
      │ │ │
      │ │ │
    • │ │ │
    • │ │ │ -
      │ │ │ -

      colorMomentHash

      │ │ │ -
      public static void colorMomentHash(Mat inputArr, │ │ │ +
      │ │ │ +

      pHash

      │ │ │ +
      public static void pHash(Mat inputArr, │ │ │ Mat outputArr)
      │ │ │ -
      Computes color moment hash of the input, the algorithm │ │ │ - is come from the paper "Perceptual Hashing for Color Images │ │ │ - Using Invariant Moments"
      │ │ │ +
      Computes pHash value of the input image
      │ │ │
      │ │ │
      Parameters:
      │ │ │
      inputArr - input image want to compute hash value, │ │ │ - type should be CV_8UC4, CV_8UC3 or CV_8UC1.
      │ │ │ -
      outputArr - 42 hash values with type CV_64F(double)
      │ │ │ + type should be CV_8UC4, CV_8UC3, CV_8UC1. │ │ │ +
      outputArr - Hash value of input, it will contain 8 uchar value
      │ │ │
      │ │ │
      │ │ │
    • │ │ │
    • │ │ │
      │ │ │

      blockMeanHash

      │ │ │
      public static void blockMeanHash(Mat inputArr, │ │ │ @@ -432,27 +445,14 @@ │ │ │
      │ │ │
      Parameters:
      │ │ │
      inputArr - input image want to compute hash value, type should be CV_8UC4, CV_8UC3 or CV_8UC1.
      │ │ │
      outputArr - Hash value of input, it will contain 16 hex decimal number, return type is CV_8U
      │ │ │
      │ │ │
      │ │ │
    • │ │ │ -
    • │ │ │ -
      │ │ │ -

      averageHash

      │ │ │ -
      public static void averageHash(Mat inputArr, │ │ │ - Mat outputArr)
      │ │ │ -
      Calculates img_hash::AverageHash in one call
      │ │ │ -
      │ │ │ -
      Parameters:
      │ │ │ -
      inputArr - input image want to compute hash value, type should be CV_8UC4, CV_8UC3 or CV_8UC1.
      │ │ │ -
      outputArr - Hash value of input, it will contain 16 hex decimal number, return type is CV_8U
      │ │ │ -
      │ │ │ -
      │ │ │ -
    • │ │ │
    │ │ │
    │ │ │
  • │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -102,48 +102,14 @@ │ │ │ │ public static final int BLOCK_MEAN_HASH_MODE_1 │ │ │ │ See Also: │ │ │ │ # _C_o_n_s_t_a_n_t_ _F_i_e_l_d_ _V_a_l_u_e_s │ │ │ │ * ********** CCoonnssttrruuccttoorr DDeettaaiillss ********** │ │ │ │ o ******** IImmgg__hhaasshh ******** │ │ │ │ public Img_hash() │ │ │ │ * ********** MMeetthhoodd DDeettaaiillss ********** │ │ │ │ - o ******** rraaddiiaallVVaarriiaanncceeHHaasshh ******** │ │ │ │ - public static void radialVarianceHash(_M_a_t inputArr, _M_a_t outputArr, │ │ │ │ - double sigma, int numOfAngleLine) │ │ │ │ - Computes radial variance hash of the input image │ │ │ │ - Parameters: │ │ │ │ - inputArr - input image want to compute hash value, type │ │ │ │ - should be CV_8UC4, CV_8UC3, CV_8UC1. │ │ │ │ - outputArr - Hash value of input │ │ │ │ - sigma - Gaussian kernel standard deviation │ │ │ │ - numOfAngleLine - The number of angles to consider │ │ │ │ - o ******** rraaddiiaallVVaarriiaanncceeHHaasshh ******** │ │ │ │ - public static void radialVarianceHash(_M_a_t inputArr, _M_a_t outputArr, │ │ │ │ - double sigma) │ │ │ │ - Computes radial variance hash of the input image │ │ │ │ - Parameters: │ │ │ │ - inputArr - input image want to compute hash value, type │ │ │ │ - should be CV_8UC4, CV_8UC3, CV_8UC1. │ │ │ │ - outputArr - Hash value of input │ │ │ │ - sigma - Gaussian kernel standard deviation │ │ │ │ - o ******** rraaddiiaallVVaarriiaanncceeHHaasshh ******** │ │ │ │ - public static void radialVarianceHash(_M_a_t inputArr, _M_a_t outputArr) │ │ │ │ - Computes radial variance hash of the input image │ │ │ │ - Parameters: │ │ │ │ - inputArr - input image want to compute hash value, type │ │ │ │ - should be CV_8UC4, CV_8UC3, CV_8UC1. │ │ │ │ - outputArr - Hash value of input │ │ │ │ - o ******** ppHHaasshh ******** │ │ │ │ - public static void pHash(_M_a_t inputArr, _M_a_t outputArr) │ │ │ │ - Computes pHash value of the input image │ │ │ │ - Parameters: │ │ │ │ - inputArr - input image want to compute hash value, type │ │ │ │ - should be CV_8UC4, CV_8UC3, CV_8UC1. │ │ │ │ - outputArr - Hash value of input, it will contain 8 uchar │ │ │ │ - value │ │ │ │ o ******** mmaarrrrHHiillddrreetthhHHaasshh ******** │ │ │ │ public static void marrHildrethHash(_M_a_t inputArr, _M_a_t outputArr, │ │ │ │ float alpha, float scale) │ │ │ │ Computes average hash value of the input image │ │ │ │ Parameters: │ │ │ │ inputArr - input image want to compute hash value, type │ │ │ │ should be CV_8UC4, CV_8UC3, CV_8UC1. │ │ │ │ @@ -165,23 +131,65 @@ │ │ │ │ public static void marrHildrethHash(_M_a_t inputArr, _M_a_t outputArr) │ │ │ │ Computes average hash value of the input image │ │ │ │ Parameters: │ │ │ │ inputArr - input image want to compute hash value, type │ │ │ │ should be CV_8UC4, CV_8UC3, CV_8UC1. │ │ │ │ outputArr - Hash value of input, it will contain 16 hex │ │ │ │ decimal number, return type is CV_8U │ │ │ │ + o ******** aavveerraaggeeHHaasshh ******** │ │ │ │ + public static void averageHash(_M_a_t inputArr, _M_a_t outputArr) │ │ │ │ + Calculates img_hash::AverageHash in one call │ │ │ │ + Parameters: │ │ │ │ + inputArr - input image want to compute hash value, type │ │ │ │ + should be CV_8UC4, CV_8UC3 or CV_8UC1. │ │ │ │ + outputArr - Hash value of input, it will contain 16 hex │ │ │ │ + decimal number, return type is CV_8U │ │ │ │ o ******** ccoolloorrMMoommeennttHHaasshh ******** │ │ │ │ public static void colorMomentHash(_M_a_t inputArr, _M_a_t outputArr) │ │ │ │ Computes color moment hash of the input, the algorithm is come from │ │ │ │ the paper "Perceptual Hashing for Color Images Using Invariant │ │ │ │ Moments" │ │ │ │ Parameters: │ │ │ │ inputArr - input image want to compute hash value, type │ │ │ │ should be CV_8UC4, CV_8UC3 or CV_8UC1. │ │ │ │ outputArr - 42 hash values with type CV_64F(double) │ │ │ │ + o ******** rraaddiiaallVVaarriiaanncceeHHaasshh ******** │ │ │ │ + public static void radialVarianceHash(_M_a_t inputArr, _M_a_t outputArr, │ │ │ │ + double sigma, int numOfAngleLine) │ │ │ │ + Computes radial variance hash of the input image │ │ │ │ + Parameters: │ │ │ │ + inputArr - input image want to compute hash value, type │ │ │ │ + should be CV_8UC4, CV_8UC3, CV_8UC1. │ │ │ │ + outputArr - Hash value of input │ │ │ │ + sigma - Gaussian kernel standard deviation │ │ │ │ + numOfAngleLine - The number of angles to consider │ │ │ │ + o ******** rraaddiiaallVVaarriiaanncceeHHaasshh ******** │ │ │ │ + public static void radialVarianceHash(_M_a_t inputArr, _M_a_t outputArr, │ │ │ │ + double sigma) │ │ │ │ + Computes radial variance hash of the input image │ │ │ │ + Parameters: │ │ │ │ + inputArr - input image want to compute hash value, type │ │ │ │ + should be CV_8UC4, CV_8UC3, CV_8UC1. │ │ │ │ + outputArr - Hash value of input │ │ │ │ + sigma - Gaussian kernel standard deviation │ │ │ │ + o ******** rraaddiiaallVVaarriiaanncceeHHaasshh ******** │ │ │ │ + public static void radialVarianceHash(_M_a_t inputArr, _M_a_t outputArr) │ │ │ │ + Computes radial variance hash of the input image │ │ │ │ + Parameters: │ │ │ │ + inputArr - input image want to compute hash value, type │ │ │ │ + should be CV_8UC4, CV_8UC3, CV_8UC1. │ │ │ │ + outputArr - Hash value of input │ │ │ │ + o ******** ppHHaasshh ******** │ │ │ │ + public static void pHash(_M_a_t inputArr, _M_a_t outputArr) │ │ │ │ + Computes pHash value of the input image │ │ │ │ + Parameters: │ │ │ │ + inputArr - input image want to compute hash value, type │ │ │ │ + should be CV_8UC4, CV_8UC3, CV_8UC1. │ │ │ │ + outputArr - Hash value of input, it will contain 8 uchar │ │ │ │ + value │ │ │ │ o ******** bblloocckkMMeeaannHHaasshh ******** │ │ │ │ public static void blockMeanHash(_M_a_t inputArr, _M_a_t outputArr, │ │ │ │ int mode) │ │ │ │ Computes block mean hash of the input image │ │ │ │ Parameters: │ │ │ │ inputArr - input image want to compute hash value, type │ │ │ │ should be CV_8UC4, CV_8UC3 or CV_8UC1. │ │ │ │ @@ -192,16 +200,8 @@ │ │ │ │ public static void blockMeanHash(_M_a_t inputArr, _M_a_t outputArr) │ │ │ │ Computes block mean hash of the input image │ │ │ │ Parameters: │ │ │ │ inputArr - input image want to compute hash value, type │ │ │ │ should be CV_8UC4, CV_8UC3 or CV_8UC1. │ │ │ │ outputArr - Hash value of input, it will contain 16 hex │ │ │ │ decimal number, return type is CV_8U │ │ │ │ - o ******** aavveerraaggeeHHaasshh ******** │ │ │ │ - public static void averageHash(_M_a_t inputArr, _M_a_t outputArr) │ │ │ │ - Calculates img_hash::AverageHash in one call │ │ │ │ - Parameters: │ │ │ │ - inputArr - input image want to compute hash value, type │ │ │ │ - should be CV_8UC4, CV_8UC3 or CV_8UC1. │ │ │ │ - outputArr - Hash value of input, it will contain 16 hex │ │ │ │ - decimal number, return type is CV_8U │ │ │ │ =============================================================================== │ │ ├── ./usr/share/doc/opencv-doc/opencv4/html/javadoc/org/opencv/objdetect/Objdetect.html │ │ │┄ Ordering differences only │ │ │ @@ -879,146 +879,14 @@ │ │ │

    groupRectangles

    │ │ │
    public static void groupRectangles(MatOfRect rectList, │ │ │ MatOfInt weights, │ │ │ int groupThreshold)
    │ │ │ │ │ │ │ │ │
  • │ │ │ -
    │ │ │ -

    drawDetectedCornersCharuco

    │ │ │ -
    public static void drawDetectedCornersCharuco(Mat image, │ │ │ - Mat charucoCorners, │ │ │ - Mat charucoIds, │ │ │ - Scalar cornerColor)
    │ │ │ -
    Draws a set of Charuco corners
    │ │ │ -
    │ │ │ -
    Parameters:
    │ │ │ -
    image - input/output image. It must have 1 or 3 channels. The number of channels is not │ │ │ - altered.
    │ │ │ -
    charucoCorners - vector of detected charuco corners
    │ │ │ -
    charucoIds - list of identifiers for each corner in charucoCorners
    │ │ │ -
    cornerColor - color of the square surrounding each corner │ │ │ - │ │ │ - This function draws a set of detected Charuco corners. If identifiers vector is provided, it also │ │ │ - draws the id of each corner.
    │ │ │ -
    │ │ │ -
    │ │ │ -
  • │ │ │ -
  • │ │ │ -
    │ │ │ -

    drawDetectedCornersCharuco

    │ │ │ -
    public static void drawDetectedCornersCharuco(Mat image, │ │ │ - Mat charucoCorners, │ │ │ - Mat charucoIds)
    │ │ │ -
    Draws a set of Charuco corners
    │ │ │ -
    │ │ │ -
    Parameters:
    │ │ │ -
    image - input/output image. It must have 1 or 3 channels. The number of channels is not │ │ │ - altered.
    │ │ │ -
    charucoCorners - vector of detected charuco corners
    │ │ │ -
    charucoIds - list of identifiers for each corner in charucoCorners │ │ │ - │ │ │ - This function draws a set of detected Charuco corners. If identifiers vector is provided, it also │ │ │ - draws the id of each corner.
    │ │ │ -
    │ │ │ -
    │ │ │ -
  • │ │ │ -
  • │ │ │ -
    │ │ │ -

    drawDetectedCornersCharuco

    │ │ │ -
    public static void drawDetectedCornersCharuco(Mat image, │ │ │ - Mat charucoCorners)
    │ │ │ -
    Draws a set of Charuco corners
    │ │ │ -
    │ │ │ -
    Parameters:
    │ │ │ -
    image - input/output image. It must have 1 or 3 channels. The number of channels is not │ │ │ - altered.
    │ │ │ -
    charucoCorners - vector of detected charuco corners │ │ │ - │ │ │ - This function draws a set of detected Charuco corners. If identifiers vector is provided, it also │ │ │ - draws the id of each corner.
    │ │ │ -
    │ │ │ -
    │ │ │ -
  • │ │ │ -
  • │ │ │ -
    │ │ │ -

    drawDetectedDiamonds

    │ │ │ -
    public static void drawDetectedDiamonds(Mat image, │ │ │ - List<Mat> diamondCorners, │ │ │ - Mat diamondIds, │ │ │ - Scalar borderColor)
    │ │ │ -
    Draw a set of detected ChArUco Diamond markers
    │ │ │ -
    │ │ │ -
    Parameters:
    │ │ │ -
    image - input/output image. It must have 1 or 3 channels. The number of channels is not │ │ │ - altered.
    │ │ │ -
    diamondCorners - positions of diamond corners in the same format returned by │ │ │ - detectCharucoDiamond(). (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, │ │ │ - the dimensions of this array should be Nx4. The order of the corners should be clockwise.
    │ │ │ -
    diamondIds - vector of identifiers for diamonds in diamondCorners, in the same format │ │ │ - returned by detectCharucoDiamond() (e.g. std::vector<Vec4i>). │ │ │ - Optional, if not provided, ids are not painted.
    │ │ │ -
    borderColor - color of marker borders. Rest of colors (text color and first corner color) │ │ │ - are calculated based on this one. │ │ │ - │ │ │ - Given an array of detected diamonds, this functions draws them in the image. The marker borders │ │ │ - are painted and the markers identifiers if provided. │ │ │ - Useful for debugging purposes.
    │ │ │ -
    │ │ │ -
    │ │ │ -
  • │ │ │ -
  • │ │ │ -
    │ │ │ -

    drawDetectedDiamonds

    │ │ │ -
    public static void drawDetectedDiamonds(Mat image, │ │ │ - List<Mat> diamondCorners, │ │ │ - Mat diamondIds)
    │ │ │ -
    Draw a set of detected ChArUco Diamond markers
    │ │ │ -
    │ │ │ -
    Parameters:
    │ │ │ -
    image - input/output image. It must have 1 or 3 channels. The number of channels is not │ │ │ - altered.
    │ │ │ -
    diamondCorners - positions of diamond corners in the same format returned by │ │ │ - detectCharucoDiamond(). (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, │ │ │ - the dimensions of this array should be Nx4. The order of the corners should be clockwise.
    │ │ │ -
    diamondIds - vector of identifiers for diamonds in diamondCorners, in the same format │ │ │ - returned by detectCharucoDiamond() (e.g. std::vector<Vec4i>). │ │ │ - Optional, if not provided, ids are not painted. │ │ │ - are calculated based on this one. │ │ │ - │ │ │ - Given an array of detected diamonds, this functions draws them in the image. The marker borders │ │ │ - are painted and the markers identifiers if provided. │ │ │ - Useful for debugging purposes.
    │ │ │ -
    │ │ │ -
    │ │ │ -
  • │ │ │ -
  • │ │ │ -
    │ │ │ -

    drawDetectedDiamonds

    │ │ │ -
    public static void drawDetectedDiamonds(Mat image, │ │ │ - List<Mat> diamondCorners)
    │ │ │ -
    Draw a set of detected ChArUco Diamond markers
    │ │ │ -
    │ │ │ -
    Parameters:
    │ │ │ -
    image - input/output image. It must have 1 or 3 channels. The number of channels is not │ │ │ - altered.
    │ │ │ -
    diamondCorners - positions of diamond corners in the same format returned by │ │ │ - detectCharucoDiamond(). (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, │ │ │ - the dimensions of this array should be Nx4. The order of the corners should be clockwise. │ │ │ - returned by detectCharucoDiamond() (e.g. std::vector<Vec4i>). │ │ │ - Optional, if not provided, ids are not painted. │ │ │ - are calculated based on this one. │ │ │ - │ │ │ - Given an array of detected diamonds, this functions draws them in the image. The marker borders │ │ │ - are painted and the markers identifiers if provided. │ │ │ - Useful for debugging purposes.
    │ │ │ -
    │ │ │ -
    │ │ │ -
  • │ │ │ -
  • │ │ │
    │ │ │

    getPredefinedDictionary

    │ │ │
    public static Dictionary getPredefinedDictionary(int dict)
    │ │ │
    Returns one of the predefined dictionaries referenced by DICT_*.
    │ │ │
    │ │ │
    Parameters:
    │ │ │
    dict - automatically generated
    │ │ │ @@ -1198,14 +1066,146 @@ │ │ │
    sidePixels - size of the image in pixels
    │ │ │
    img - output image with the marker │ │ │ │ │ │ This function returns a marker image in its canonical form (i.e. ready to be printed)
    │ │ │
    │ │ │
    │ │ │
  • │ │ │ +
  • │ │ │ +
    │ │ │ +

    drawDetectedCornersCharuco

    │ │ │ +
    public static void drawDetectedCornersCharuco(Mat image, │ │ │ + Mat charucoCorners, │ │ │ + Mat charucoIds, │ │ │ + Scalar cornerColor)
    │ │ │ +
    Draws a set of Charuco corners
    │ │ │ +
    │ │ │ +
    Parameters:
    │ │ │ +
    image - input/output image. It must have 1 or 3 channels. The number of channels is not │ │ │ + altered.
    │ │ │ +
    charucoCorners - vector of detected charuco corners
    │ │ │ +
    charucoIds - list of identifiers for each corner in charucoCorners
    │ │ │ +
    cornerColor - color of the square surrounding each corner │ │ │ + │ │ │ + This function draws a set of detected Charuco corners. If identifiers vector is provided, it also │ │ │ + draws the id of each corner.
    │ │ │ +
    │ │ │ +
    │ │ │ +
  • │ │ │ +
  • │ │ │ +
    │ │ │ +

    drawDetectedCornersCharuco

    │ │ │ +
    public static void drawDetectedCornersCharuco(Mat image, │ │ │ + Mat charucoCorners, │ │ │ + Mat charucoIds)
    │ │ │ +
    Draws a set of Charuco corners
    │ │ │ +
    │ │ │ +
    Parameters:
    │ │ │ +
    image - input/output image. It must have 1 or 3 channels. The number of channels is not │ │ │ + altered.
    │ │ │ +
    charucoCorners - vector of detected charuco corners
    │ │ │ +
    charucoIds - list of identifiers for each corner in charucoCorners │ │ │ + │ │ │ + This function draws a set of detected Charuco corners. If identifiers vector is provided, it also │ │ │ + draws the id of each corner.
    │ │ │ +
    │ │ │ +
    │ │ │ +
  • │ │ │ +
  • │ │ │ +
    │ │ │ +

    drawDetectedCornersCharuco

    │ │ │ +
    public static void drawDetectedCornersCharuco(Mat image, │ │ │ + Mat charucoCorners)
    │ │ │ +
    Draws a set of Charuco corners
    │ │ │ +
    │ │ │ +
    Parameters:
    │ │ │ +
    image - input/output image. It must have 1 or 3 channels. The number of channels is not │ │ │ + altered.
    │ │ │ +
    charucoCorners - vector of detected charuco corners │ │ │ + │ │ │ + This function draws a set of detected Charuco corners. If identifiers vector is provided, it also │ │ │ + draws the id of each corner.
    │ │ │ +
    │ │ │ +
    │ │ │ +
  • │ │ │ +
  • │ │ │ +
    │ │ │ +

    drawDetectedDiamonds

    │ │ │ +
    public static void drawDetectedDiamonds(Mat image, │ │ │ + List<Mat> diamondCorners, │ │ │ + Mat diamondIds, │ │ │ + Scalar borderColor)
    │ │ │ +
    Draw a set of detected ChArUco Diamond markers
    │ │ │ +
    │ │ │ +
    Parameters:
    │ │ │ +
    image - input/output image. It must have 1 or 3 channels. The number of channels is not │ │ │ + altered.
    │ │ │ +
    diamondCorners - positions of diamond corners in the same format returned by │ │ │ + detectCharucoDiamond(). (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, │ │ │ + the dimensions of this array should be Nx4. The order of the corners should be clockwise.
    │ │ │ +
    diamondIds - vector of identifiers for diamonds in diamondCorners, in the same format │ │ │ + returned by detectCharucoDiamond() (e.g. std::vector<Vec4i>). │ │ │ + Optional, if not provided, ids are not painted.
    │ │ │ +
    borderColor - color of marker borders. Rest of colors (text color and first corner color) │ │ │ + are calculated based on this one. │ │ │ + │ │ │ + Given an array of detected diamonds, this functions draws them in the image. The marker borders │ │ │ + are painted and the markers identifiers if provided. │ │ │ + Useful for debugging purposes.
    │ │ │ +
    │ │ │ +
    │ │ │ +
  • │ │ │ +
  • │ │ │ +
    │ │ │ +

    drawDetectedDiamonds

    │ │ │ +
    public static void drawDetectedDiamonds(Mat image, │ │ │ + List<Mat> diamondCorners, │ │ │ + Mat diamondIds)
    │ │ │ +
    Draw a set of detected ChArUco Diamond markers
    │ │ │ +
    │ │ │ +
    Parameters:
    │ │ │ +
    image - input/output image. It must have 1 or 3 channels. The number of channels is not │ │ │ + altered.
    │ │ │ +
    diamondCorners - positions of diamond corners in the same format returned by │ │ │ + detectCharucoDiamond(). (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, │ │ │ + the dimensions of this array should be Nx4. The order of the corners should be clockwise.
    │ │ │ +
    diamondIds - vector of identifiers for diamonds in diamondCorners, in the same format │ │ │ + returned by detectCharucoDiamond() (e.g. std::vector<Vec4i>). │ │ │ + Optional, if not provided, ids are not painted. │ │ │ + are calculated based on this one. │ │ │ + │ │ │ + Given an array of detected diamonds, this functions draws them in the image. The marker borders │ │ │ + are painted and the markers identifiers if provided. │ │ │ + Useful for debugging purposes.
    │ │ │ +
    │ │ │ +
    │ │ │ +
  • │ │ │ +
  • │ │ │ +
    │ │ │ +

    drawDetectedDiamonds

    │ │ │ +
    public static void drawDetectedDiamonds(Mat image, │ │ │ + List<Mat> diamondCorners)
    │ │ │ +
    Draw a set of detected ChArUco Diamond markers
    │ │ │ +
    │ │ │ +
    Parameters:
    │ │ │ +
    image - input/output image. It must have 1 or 3 channels. The number of channels is not │ │ │ + altered.
    │ │ │ +
    diamondCorners - positions of diamond corners in the same format returned by │ │ │ + detectCharucoDiamond(). (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, │ │ │ + the dimensions of this array should be Nx4. The order of the corners should be clockwise. │ │ │ + returned by detectCharucoDiamond() (e.g. std::vector<Vec4i>). │ │ │ + Optional, if not provided, ids are not painted. │ │ │ + are calculated based on this one. │ │ │ + │ │ │ + Given an array of detected diamonds, this functions draws them in the image. The marker borders │ │ │ + are painted and the markers identifiers if provided. │ │ │ + Useful for debugging purposes.
    │ │ │ +
    │ │ │ +
    │ │ │ +
  • │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -357,110 +357,14 @@ │ │ │ │ * ********** MMeetthhoodd DDeettaaiillss ********** │ │ │ │ o ******** ggrroouuppRReeccttaanngglleess ******** │ │ │ │ public static void groupRectangles(_M_a_t_O_f_R_e_c_t rectList, │ │ │ │ _M_a_t_O_f_I_n_t weights, int groupThreshold, double eps) │ │ │ │ o ******** ggrroouuppRReeccttaanngglleess ******** │ │ │ │ public static void groupRectangles(_M_a_t_O_f_R_e_c_t rectList, │ │ │ │ _M_a_t_O_f_I_n_t weights, int groupThreshold) │ │ │ │ - o ******** ddrraawwDDeetteecctteeddCCoorrnneerrssCChhaarruuccoo ******** │ │ │ │ - public static void drawDetectedCornersCharuco(_M_a_t image, │ │ │ │ - _M_a_t charucoCorners, _M_a_t charucoIds, _S_c_a_l_a_r cornerColor) │ │ │ │ - Draws a set of Charuco corners │ │ │ │ - Parameters: │ │ │ │ - image - input/output image. It must have 1 or 3 channels. The │ │ │ │ - number of channels is not altered. │ │ │ │ - charucoCorners - vector of detected charuco corners │ │ │ │ - charucoIds - list of identifiers for each corner in │ │ │ │ - charucoCorners │ │ │ │ - cornerColor - color of the square surrounding each corner │ │ │ │ - This function draws a set of detected Charuco corners. If │ │ │ │ - identifiers vector is provided, it also draws the id of each │ │ │ │ - corner. │ │ │ │ - o ******** ddrraawwDDeetteecctteeddCCoorrnneerrssCChhaarruuccoo ******** │ │ │ │ - public static void drawDetectedCornersCharuco(_M_a_t image, │ │ │ │ - _M_a_t charucoCorners, _M_a_t charucoIds) │ │ │ │ - Draws a set of Charuco corners │ │ │ │ - Parameters: │ │ │ │ - image - input/output image. It must have 1 or 3 channels. The │ │ │ │ - number of channels is not altered. │ │ │ │ - charucoCorners - vector of detected charuco corners │ │ │ │ - charucoIds - list of identifiers for each corner in │ │ │ │ - charucoCorners This function draws a set of detected Charuco │ │ │ │ - corners. If identifiers vector is provided, it also draws the │ │ │ │ - id of each corner. │ │ │ │ - o ******** ddrraawwDDeetteecctteeddCCoorrnneerrssCChhaarruuccoo ******** │ │ │ │ - public static void drawDetectedCornersCharuco(_M_a_t image, │ │ │ │ - _M_a_t charucoCorners) │ │ │ │ - Draws a set of Charuco corners │ │ │ │ - Parameters: │ │ │ │ - image - input/output image. It must have 1 or 3 channels. The │ │ │ │ - number of channels is not altered. │ │ │ │ - charucoCorners - vector of detected charuco corners This │ │ │ │ - function draws a set of detected Charuco corners. If │ │ │ │ - identifiers vector is provided, it also draws the id of each │ │ │ │ - corner. │ │ │ │ - o ******** ddrraawwDDeetteecctteeddDDiiaammoonnddss ******** │ │ │ │ - public static void drawDetectedDiamonds(_M_a_t image, │ │ │ │ - _L_i_s_t<_M_a_t> diamondCorners, _M_a_t diamondIds, _S_c_a_l_a_r borderColor) │ │ │ │ - Draw a set of detected ChArUco Diamond markers │ │ │ │ - Parameters: │ │ │ │ - image - input/output image. It must have 1 or 3 channels. The │ │ │ │ - number of channels is not altered. │ │ │ │ - diamondCorners - positions of diamond corners in the same │ │ │ │ - format returned by detectCharucoDiamond(). (e.g std:: │ │ │ │ - vector > ). For N detected markers, │ │ │ │ - the dimensions of this array should be Nx4. The order of the │ │ │ │ - corners should be clockwise. │ │ │ │ - diamondIds - vector of identifiers for diamonds in │ │ │ │ - diamondCorners, in the same format returned by │ │ │ │ - detectCharucoDiamond() (e.g. std::vector). Optional, │ │ │ │ - if not provided, ids are not painted. │ │ │ │ - borderColor - color of marker borders. Rest of colors (text │ │ │ │ - color and first corner color) are calculated based on this │ │ │ │ - one. Given an array of detected diamonds, this functions │ │ │ │ - draws them in the image. The marker borders are painted and │ │ │ │ - the markers identifiers if provided. Useful for debugging │ │ │ │ - purposes. │ │ │ │ - o ******** ddrraawwDDeetteecctteeddDDiiaammoonnddss ******** │ │ │ │ - public static void drawDetectedDiamonds(_M_a_t image, │ │ │ │ - _L_i_s_t<_M_a_t> diamondCorners, _M_a_t diamondIds) │ │ │ │ - Draw a set of detected ChArUco Diamond markers │ │ │ │ - Parameters: │ │ │ │ - image - input/output image. It must have 1 or 3 channels. The │ │ │ │ - number of channels is not altered. │ │ │ │ - diamondCorners - positions of diamond corners in the same │ │ │ │ - format returned by detectCharucoDiamond(). (e.g std:: │ │ │ │ - vector > ). For N detected markers, │ │ │ │ - the dimensions of this array should be Nx4. The order of the │ │ │ │ - corners should be clockwise. │ │ │ │ - diamondIds - vector of identifiers for diamonds in │ │ │ │ - diamondCorners, in the same format returned by │ │ │ │ - detectCharucoDiamond() (e.g. std::vector). Optional, │ │ │ │ - if not provided, ids are not painted. are calculated based on │ │ │ │ - this one. Given an array of detected diamonds, this functions │ │ │ │ - draws them in the image. The marker borders are painted and │ │ │ │ - the markers identifiers if provided. Useful for debugging │ │ │ │ - purposes. │ │ │ │ - o ******** ddrraawwDDeetteecctteeddDDiiaammoonnddss ******** │ │ │ │ - public static void drawDetectedDiamonds(_M_a_t image, │ │ │ │ - _L_i_s_t<_M_a_t> diamondCorners) │ │ │ │ - Draw a set of detected ChArUco Diamond markers │ │ │ │ - Parameters: │ │ │ │ - image - input/output image. It must have 1 or 3 channels. The │ │ │ │ - number of channels is not altered. │ │ │ │ - diamondCorners - positions of diamond corners in the same │ │ │ │ - format returned by detectCharucoDiamond(). (e.g std:: │ │ │ │ - vector > ). For N detected markers, │ │ │ │ - the dimensions of this array should be Nx4. The order of the │ │ │ │ - corners should be clockwise. returned by detectCharucoDiamond │ │ │ │ - () (e.g. std::vector). Optional, if not provided, ids │ │ │ │ - are not painted. are calculated based on this one. Given an │ │ │ │ - array of detected diamonds, this functions draws them in the │ │ │ │ - image. The marker borders are painted and the markers │ │ │ │ - identifiers if provided. Useful for debugging purposes. │ │ │ │ o ******** ggeettPPrreeddeeffiinneeddDDiiccttiioonnaarryy ******** │ │ │ │ public static _D_i_c_t_i_o_n_a_r_y getPredefinedDictionary(int dict) │ │ │ │ Returns one of the predefined dictionaries referenced by DICT_*. │ │ │ │ Parameters: │ │ │ │ dict - automatically generated │ │ │ │ Returns: │ │ │ │ automatically generated │ │ │ │ @@ -593,8 +497,104 @@ │ │ │ │ dictionary - dictionary of markers indicating the type of │ │ │ │ markers │ │ │ │ id - identifier of the marker that will be returned. It has │ │ │ │ to be a valid id in the specified dictionary. │ │ │ │ sidePixels - size of the image in pixels │ │ │ │ img - output image with the marker This function returns a │ │ │ │ marker image in its canonical form (i.e. ready to be printed) │ │ │ │ + o ******** ddrraawwDDeetteecctteeddCCoorrnneerrssCChhaarruuccoo ******** │ │ │ │ + public static void drawDetectedCornersCharuco(_M_a_t image, │ │ │ │ + _M_a_t charucoCorners, _M_a_t charucoIds, _S_c_a_l_a_r cornerColor) │ │ │ │ + Draws a set of Charuco corners │ │ │ │ + Parameters: │ │ │ │ + image - input/output image. It must have 1 or 3 channels. The │ │ │ │ + number of channels is not altered. │ │ │ │ + charucoCorners - vector of detected charuco corners │ │ │ │ + charucoIds - list of identifiers for each corner in │ │ │ │ + charucoCorners │ │ │ │ + cornerColor - color of the square surrounding each corner │ │ │ │ + This function draws a set of detected Charuco corners. If │ │ │ │ + identifiers vector is provided, it also draws the id of each │ │ │ │ + corner. │ │ │ │ + o ******** ddrraawwDDeetteecctteeddCCoorrnneerrssCChhaarruuccoo ******** │ │ │ │ + public static void drawDetectedCornersCharuco(_M_a_t image, │ │ │ │ + _M_a_t charucoCorners, _M_a_t charucoIds) │ │ │ │ + Draws a set of Charuco corners │ │ │ │ + Parameters: │ │ │ │ + image - input/output image. It must have 1 or 3 channels. The │ │ │ │ + number of channels is not altered. │ │ │ │ + charucoCorners - vector of detected charuco corners │ │ │ │ + charucoIds - list of identifiers for each corner in │ │ │ │ + charucoCorners This function draws a set of detected Charuco │ │ │ │ + corners. If identifiers vector is provided, it also draws the │ │ │ │ + id of each corner. │ │ │ │ + o ******** ddrraawwDDeetteecctteeddCCoorrnneerrssCChhaarruuccoo ******** │ │ │ │ + public static void drawDetectedCornersCharuco(_M_a_t image, │ │ │ │ + _M_a_t charucoCorners) │ │ │ │ + Draws a set of Charuco corners │ │ │ │ + Parameters: │ │ │ │ + image - input/output image. It must have 1 or 3 channels. The │ │ │ │ + number of channels is not altered. │ │ │ │ + charucoCorners - vector of detected charuco corners This │ │ │ │ + function draws a set of detected Charuco corners. If │ │ │ │ + identifiers vector is provided, it also draws the id of each │ │ │ │ + corner. │ │ │ │ + o ******** ddrraawwDDeetteecctteeddDDiiaammoonnddss ******** │ │ │ │ + public static void drawDetectedDiamonds(_M_a_t image, │ │ │ │ + _L_i_s_t<_M_a_t> diamondCorners, _M_a_t diamondIds, _S_c_a_l_a_r borderColor) │ │ │ │ + Draw a set of detected ChArUco Diamond markers │ │ │ │ + Parameters: │ │ │ │ + image - input/output image. It must have 1 or 3 channels. The │ │ │ │ + number of channels is not altered. │ │ │ │ + diamondCorners - positions of diamond corners in the same │ │ │ │ + format returned by detectCharucoDiamond(). (e.g std:: │ │ │ │ + vector > ). For N detected markers, │ │ │ │ + the dimensions of this array should be Nx4. The order of the │ │ │ │ + corners should be clockwise. │ │ │ │ + diamondIds - vector of identifiers for diamonds in │ │ │ │ + diamondCorners, in the same format returned by │ │ │ │ + detectCharucoDiamond() (e.g. std::vector). Optional, │ │ │ │ + if not provided, ids are not painted. │ │ │ │ + borderColor - color of marker borders. Rest of colors (text │ │ │ │ + color and first corner color) are calculated based on this │ │ │ │ + one. Given an array of detected diamonds, this functions │ │ │ │ + draws them in the image. The marker borders are painted and │ │ │ │ + the markers identifiers if provided. Useful for debugging │ │ │ │ + purposes. │ │ │ │ + o ******** ddrraawwDDeetteecctteeddDDiiaammoonnddss ******** │ │ │ │ + public static void drawDetectedDiamonds(_M_a_t image, │ │ │ │ + _L_i_s_t<_M_a_t> diamondCorners, _M_a_t diamondIds) │ │ │ │ + Draw a set of detected ChArUco Diamond markers │ │ │ │ + Parameters: │ │ │ │ + image - input/output image. It must have 1 or 3 channels. The │ │ │ │ + number of channels is not altered. │ │ │ │ + diamondCorners - positions of diamond corners in the same │ │ │ │ + format returned by detectCharucoDiamond(). (e.g std:: │ │ │ │ + vector > ). For N detected markers, │ │ │ │ + the dimensions of this array should be Nx4. The order of the │ │ │ │ + corners should be clockwise. │ │ │ │ + diamondIds - vector of identifiers for diamonds in │ │ │ │ + diamondCorners, in the same format returned by │ │ │ │ + detectCharucoDiamond() (e.g. std::vector). Optional, │ │ │ │ + if not provided, ids are not painted. are calculated based on │ │ │ │ + this one. Given an array of detected diamonds, this functions │ │ │ │ + draws them in the image. The marker borders are painted and │ │ │ │ + the markers identifiers if provided. Useful for debugging │ │ │ │ + purposes. │ │ │ │ + o ******** ddrraawwDDeetteecctteeddDDiiaammoonnddss ******** │ │ │ │ + public static void drawDetectedDiamonds(_M_a_t image, │ │ │ │ + _L_i_s_t<_M_a_t> diamondCorners) │ │ │ │ + Draw a set of detected ChArUco Diamond markers │ │ │ │ + Parameters: │ │ │ │ + image - input/output image. It must have 1 or 3 channels. The │ │ │ │ + number of channels is not altered. │ │ │ │ + diamondCorners - positions of diamond corners in the same │ │ │ │ + format returned by detectCharucoDiamond(). (e.g std:: │ │ │ │ + vector > ). For N detected markers, │ │ │ │ + the dimensions of this array should be Nx4. The order of the │ │ │ │ + corners should be clockwise. returned by detectCharucoDiamond │ │ │ │ + () (e.g. std::vector). Optional, if not provided, ids │ │ │ │ + are not painted. are calculated based on this one. Given an │ │ │ │ + array of detected diamonds, this functions draws them in the │ │ │ │ + image. The marker borders are painted and the markers │ │ │ │ + identifiers if provided. Useful for debugging purposes. │ │ │ │ =============================================================================== │ │ ├── ./usr/share/doc/opencv-doc/opencv4/html/javadoc/org/opencv/structured_light/Structured_light.html │ │ │┄ Ordering differences only │ │ │ @@ -147,28 +147,14 @@ │ │ │
      │ │ │ │ │ │
    • │ │ │
      │ │ │

      Field Details

      │ │ │
        │ │ │
      • │ │ │ -
        │ │ │ -

        DECODE_3D_UNDERWORLD

        │ │ │ -
        public static final int DECODE_3D_UNDERWORLD
        │ │ │ -
        │ │ │ -
        See Also:
        │ │ │ -
        │ │ │ - │ │ │ -
        │ │ │ -
        │ │ │ -
        │ │ │ -
      • │ │ │ -
      • │ │ │
        │ │ │

        FTP

        │ │ │
        public static final int FTP
        │ │ │
        │ │ │
        See Also:
        │ │ │
        │ │ │
          │ │ │ @@ -202,14 +188,28 @@ │ │ │ │ │ │
        │ │ │
        │ │ │
        │ │ │
      • │ │ │ +
      • │ │ │ +
        │ │ │ +

        DECODE_3D_UNDERWORLD

        │ │ │ +
        public static final int DECODE_3D_UNDERWORLD
        │ │ │ +
        │ │ │ +
        See Also:
        │ │ │ +
        │ │ │ + │ │ │ +
        │ │ │ +
        │ │ │ +
        │ │ │ +
      • │ │ │
      │ │ │
      │ │ │
    • │ │ │ │ │ │
    • │ │ │
      │ │ │

      Constructor Details

      │ │ │ ├── html2text {} │ │ │ │ @@ -57,27 +57,27 @@ │ │ │ │ _S_t_r_u_c_t_u_r_e_d___l_i_g_h_t() │ │ │ │   │ │ │ │ * ********** MMeetthhoodd SSuummmmaarryy ********** │ │ │ │ ******** MMeetthhooddss iinnhheerriitteedd ffrroomm ccllaassss? jjaavvaa..llaanngg.._OO_bb_jj_ee_cc_tt ******** │ │ │ │ _c_l_o_n_e, _e_q_u_a_l_s, _f_i_n_a_l_i_z_e, _g_e_t_C_l_a_s_s, _h_a_s_h_C_o_d_e, _n_o_t_i_f_y, _n_o_t_i_f_y_A_l_l, _t_o_S_t_r_i_n_g, │ │ │ │ _w_a_i_t, _w_a_i_t, _w_a_i_t │ │ │ │ * ********** FFiieelldd DDeettaaiillss ********** │ │ │ │ - o ******** DDEECCOODDEE__33DD__UUNNDDEERRWWOORRLLDD ******** │ │ │ │ - public static final int DECODE_3D_UNDERWORLD │ │ │ │ - See Also: │ │ │ │ - # _C_o_n_s_t_a_n_t_ _F_i_e_l_d_ _V_a_l_u_e_s │ │ │ │ o ******** FFTTPP ******** │ │ │ │ public static final int FTP │ │ │ │ See Also: │ │ │ │ # _C_o_n_s_t_a_n_t_ _F_i_e_l_d_ _V_a_l_u_e_s │ │ │ │ o ******** PPSSPP ******** │ │ │ │ public static final int PSP │ │ │ │ See Also: │ │ │ │ # _C_o_n_s_t_a_n_t_ _F_i_e_l_d_ _V_a_l_u_e_s │ │ │ │ o ******** FFAAPPSS ******** │ │ │ │ public static final int FAPS │ │ │ │ See Also: │ │ │ │ # _C_o_n_s_t_a_n_t_ _F_i_e_l_d_ _V_a_l_u_e_s │ │ │ │ + o ******** DDEECCOODDEE__33DD__UUNNDDEERRWWOORRLLDD ******** │ │ │ │ + public static final int DECODE_3D_UNDERWORLD │ │ │ │ + See Also: │ │ │ │ + # _C_o_n_s_t_a_n_t_ _F_i_e_l_d_ _V_a_l_u_e_s │ │ │ │ * ********** CCoonnssttrruuccttoorr DDeettaaiillss ********** │ │ │ │ o ******** SSttrruuccttuurreedd__lliigghhtt ******** │ │ │ │ public Structured_light() │ │ │ │ =============================================================================== │ │ ├── ./usr/share/doc/opencv-doc/opencv4/html/javadoc/org/opencv/text/Text.html │ │ │ @@ -3429,129 +3429,129 @@ │ │ │ 0000d640: 3d22 6669 656c 642d 6465 7461 696c 7322 ="field-details" │ │ │ 0000d650: 2069 643d 2266 6965 6c64 2d64 6574 6169 id="field-detai │ │ │ 0000d660: 6c22 3e0a 3c68 323e 4669 656c 6420 4465 l">.

      Field De │ │ │ 0000d670: 7461 696c 733c 2f68 323e 0a3c 756c 2063 tails

      .
        .
      • ..

        OCR_LE │ │ │ -0000d6d0: 5645 4c5f 574f 5244 3c2f 6833 3e0a 3c64 VEL_WORD

        .public stati │ │ │ -0000d720: 6320 6669 6e61 6c3c 2f73 7061 6e3e 266e c final&n │ │ │ -0000d730: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;in │ │ │ -0000d750: 743c 2f73 7061 6e3e 266e 6273 703b 3c73 t OCR_LEV │ │ │ -0000d780: 454c 5f57 4f52 443c 2f73 7061 6e3e 3c2f EL_WORD.
        .
        See │ │ │ -0000d7b0: 416c 736f 3a3c 2f64 743e 0a3c 6464 3e0a Also:
        .
        . │ │ │ -0000d7c0: 3c75 6c20 636c 6173 733d 2274 6167 2d6c .
        │ │ │ -0000d850: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
        .
      .
    • .
    • ..OCR_LEVEL_TEXT │ │ │ -0000d8b0: 4c49 4e45 3c2f 6833 3e0a 3c64 6976 2063 LINE.
      │ │ │ -0000d8f0: 7075 626c 6963 2073 7461 7469 6320 6669 public static fi │ │ │ -0000d900: 6e61 6c3c 2f73 7061 6e3e 266e 6273 703b nal  │ │ │ -0000d910: 3c73 7061 6e20 636c 6173 733d 2272 6574 int OCR_LEVEL_T │ │ │ -0000d960: 4558 544c 494e 453c 2f73 7061 6e3e 3c2f EXTLINE.
      .
      See │ │ │ -0000d990: 416c 736f 3a3c 2f64 743e 0a3c 6464 3e0a Also:
      .
      . │ │ │ -0000d9a0: 3c75 6c20 636c 6173 733d 2274 6167 2d6c .< │ │ │ -0000da30: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.
      ..
    • .
    • │ │ │ -0000da50: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
      .

      ERFILTER │ │ │ -0000da90: 5f4e 4d5f 5247 424c 4772 6164 3c2f 6833 _NM_RGBLGrad

      .
      │ │ │ -0000dac0: 3c73 7061 6e20 636c 6173 733d 226d 6f64 public s │ │ │ -0000dae0: 7461 7469 6320 6669 6e61 6c3c 2f73 7061 tatic final int&nbs │ │ │ -0000db20: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;ERF │ │ │ -0000db40: 494c 5445 525f 4e4d 5f52 4742 4c47 7261 ILTER_NM_RGBLGra │ │ │ -0000db50: 643c 2f73 7061 6e3e 3c2f 6469 763e 0a3c d
      .< │ │ │ -0000db60: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ -0000db70: 3e0a 3c64 743e 5365 6520 416c 736f 3a3c >.
      See Also:< │ │ │ -0000db80: 2f64 743e 0a3c 6464 3e0a 3c75 6c20 636c /dt>.
      ..
      │ │ │ -0000dc20: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e ..
      .
    • .
    • ..< │ │ │ -0000dc70: 6833 3e45 5246 494c 5445 525f 4e4d 5f49 h3>ERFILTER_NM_I │ │ │ -0000dc80: 4853 4772 6164 3c2f 6833 3e0a 3c64 6976 HSGrad.
      public static │ │ │ -0000dcd0: 6669 6e61 6c3c 2f73 7061 6e3e 266e 6273 final&nbs │ │ │ -0000dce0: 703b 3c73 7061 6e20 636c 6173 733d 2272 p;int< │ │ │ -0000dd00: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> ERFILTER_ │ │ │ -0000dd30: 4e4d 5f49 4853 4772 6164 3c2f 7370 616e NM_IHSGrad
      .
      .
      S │ │ │ -0000dd60: 6565 2041 6c73 6f3a 3c2f 6474 3e0a 3c64 ee Also:
      ..
      ..
    • .
    • ..

      detectT │ │ │ -00010d50: 6578 7453 5754 3c2f 6833 3e0a 3c64 6976 extSWT

      .
      public static< │ │ │ -00010da0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> void detectTextSWT< │ │ │ -00010e00: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(Mat in │ │ │ -00010e70: 7075 742c 0a20 3c61 2068 7265 663d 222e put,. MatOfRec │ │ │ -00010ec0: 743c 2f61 3e26 6e62 7370 3b72 6573 756c t resul │ │ │ -00010ed0: 742c 0a20 626f 6f6c 6561 6e26 6e62 7370 t,. boolean  │ │ │ -00010ee0: 3b64 6172 6b5f 6f6e 5f6c 6967 6874 2c0a ;dark_on_light,. │ │ │ -00010ef0: 203c 6120 6872 6566 3d22 2e2e 2f63 6f72 Mat │ │ │ -00010f30: 3c2f 613e 266e 6273 703b 6472 6177 293c  draw)< │ │ │ -00010f40: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      . │ │ │ -00010f60: 4170 706c 6965 7320 7468 6520 5374 726f Applies the Stro │ │ │ -00010f70: 6b65 2057 6964 7468 2054 7261 6e73 666f ke Width Transfo │ │ │ -00010f80: 726d 206f 7065 7261 746f 7220 666f 6c6c rm operator foll │ │ │ -00010f90: 6f77 6564 2062 7920 6669 6c74 6572 696e owed by filterin │ │ │ -00010fa0: 6720 6f66 2063 6f6e 6e65 6374 6564 2063 g of connected c │ │ │ -00010fb0: 6f6d 706f 6e65 6e74 7320 6f66 2073 696d omponents of sim │ │ │ -00010fc0: 696c 6172 2053 7472 6f6b 6520 5769 6474 ilar Stroke Widt │ │ │ -00010fd0: 6873 2074 6f20 7265 7475 726e 206c 6574 hs to return let │ │ │ -00010fe0: 7465 7220 6361 6e64 6964 6174 6573 2e20 ter candidates. │ │ │ -00010ff0: 4974 2061 6c73 6f20 6368 6169 6e20 7468 It also chain th │ │ │ -00011000: 656d 2062 7920 7072 6f78 696d 6974 7920 em by proximity │ │ │ -00011010: 616e 6420 7369 7a65 2c20 7361 7669 6e67 and size, saving │ │ │ -00011020: 2074 6865 2072 6573 756c 7420 696e 2063 the result in c │ │ │ -00011030: 6861 696e 4242 732e 3c2f 6469 763e 0a3c hainBBs..< │ │ │ -00011040: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ -00011050: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
      Parameters │ │ │ -00011060: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
      .
      input - │ │ │ -00011080: 7468 6520 696e 7075 7420 696d 6167 6520 the input image │ │ │ -00011090: 7769 7468 2033 2063 6861 6e6e 656c 732e with 3 channels. │ │ │ -000110a0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
      .
      │ │ │ -000110b0: 7265 7375 6c74 3c2f 636f 6465 3e20 2d20 result - │ │ │ -000110c0: 6120 7665 6374 6f72 206f 6620 7265 7375 a vector of resu │ │ │ -000110d0: 6c74 696e 6720 626f 756e 6469 6e67 2062 lting bounding b │ │ │ -000110e0: 6f78 6573 2077 6865 7265 2070 726f 6261 oxes where proba │ │ │ -000110f0: 6269 6c69 7479 206f 6620 6669 6e64 696e bility of findin │ │ │ -00011100: 6720 7465 7874 2069 7320 6869 6768 3c2f g text is high.
      da │ │ │ -00011120: 726b 5f6f 6e5f 6c69 6768 743c 2f63 6f64 rk_on_light - a boolean v │ │ │ -00011140: 616c 7565 2073 6967 6e69 6679 696e 6720 alue signifying │ │ │ -00011150: 7768 6574 6865 7220 7468 6520 7465 7874 whether the text │ │ │ -00011160: 2069 7320 6461 726b 6572 206f 7220 6c69 is darker or li │ │ │ -00011170: 6768 7465 7220 7468 616e 2074 6865 2062 ghter than the b │ │ │ -00011180: 6163 6b67 726f 756e 642c 2069 7420 6973 ackground, it is │ │ │ -00011190: 206f 6273 6572 7665 6420 746f 2072 6576 observed to rev │ │ │ -000111a0: 6572 7365 2074 6865 2067 7261 6469 656e erse the gradien │ │ │ -000111b0: 7420 6f62 7461 696e 6564 2066 726f 6d20 t obtained from │ │ │ -000111c0: 5363 6861 7272 206f 7065 7261 746f 722c Scharr operator, │ │ │ -000111d0: 2061 6e64 2073 6967 6e69 6669 6361 6e74 and significant │ │ │ -000111e0: 6c79 2061 6666 6563 7420 7468 6520 7265 ly affect the re │ │ │ -000111f0: 7375 6c74 2e3c 2f64 643e 0a3c 6464 3e3c sult.
      .
      < │ │ │ -00011200: 636f 6465 3e64 7261 773c 2f63 6f64 653e code>draw │ │ │ -00011210: 202d 2061 6e20 6f70 7469 6f6e 616c 204d - an optional M │ │ │ -00011220: 6174 206f 6620 7479 7065 2043 565f 3855 at of type CV_8U │ │ │ -00011230: 4333 2077 6869 6368 2076 6973 7561 6c69 C3 which visuali │ │ │ -00011240: 7365 7320 7468 6520 6465 7465 6374 6564 ses the detected │ │ │ -00011250: 206c 6574 7465 7273 2075 7369 6e67 2062 letters using b │ │ │ -00011260: 6f75 6e64 696e 6720 626f 7865 732e 3c2f ounding boxes....
    • .
    • . │ │ │ -00011290: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
      .

      detectTex │ │ │ -00011300: 7453 5754 3c2f 6833 3e0a 3c64 6976 2063 tSWT

      .
      │ │ │ -00011340: 7075 626c 6963 2073 7461 7469 633c 2f73 public static void& │ │ │ -00011380: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ -000113a0: 6465 7465 6374 5465 7874 5357 543c 2f73 detectTextSWT(M │ │ │ -00011410: 6174 3c2f 613e 266e 6273 703b 696e 7075 at inpu │ │ │ -00011420: 742c 0a20 3c61 2068 7265 663d 222e 2e2f t,. MatOfRect< │ │ │ -00011470: 2f61 3e26 6e62 7370 3b72 6573 756c 742c /a> result, │ │ │ -00011480: 0a20 626f 6f6c 6561 6e26 6e62 7370 3b64 . boolean d │ │ │ -00011490: 6172 6b5f 6f6e 5f6c 6967 6874 293c 2f73 ark_on_light)
      .
      Ap │ │ │ -000114c0: 706c 6965 7320 7468 6520 5374 726f 6b65 plies the Stroke │ │ │ -000114d0: 2057 6964 7468 2054 7261 6e73 666f 726d Width Transform │ │ │ -000114e0: 206f 7065 7261 746f 7220 666f 6c6c 6f77 operator follow │ │ │ -000114f0: 6564 2062 7920 6669 6c74 6572 696e 6720 ed by filtering │ │ │ -00011500: 6f66 2063 6f6e 6e65 6374 6564 2063 6f6d of connected com │ │ │ -00011510: 706f 6e65 6e74 7320 6f66 2073 696d 696c ponents of simil │ │ │ -00011520: 6172 2053 7472 6f6b 6520 5769 6474 6873 ar Stroke Widths │ │ │ -00011530: 2074 6f20 7265 7475 726e 206c 6574 7465 to return lette │ │ │ -00011540: 7220 6361 6e64 6964 6174 6573 2e20 4974 r candidates. It │ │ │ -00011550: 2061 6c73 6f20 6368 6169 6e20 7468 656d also chain them │ │ │ -00011560: 2062 7920 7072 6f78 696d 6974 7920 616e by proximity an │ │ │ -00011570: 6420 7369 7a65 2c20 7361 7669 6e67 2074 d size, saving t │ │ │ -00011580: 6865 2072 6573 756c 7420 696e 2063 6861 he result in cha │ │ │ -00011590: 696e 4242 732e 3c2f 6469 763e 0a3c 646c inBBs.
      .
      . │ │ │ -000115b0: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
      Parameters:< │ │ │ -000115c0: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e69 /dt>.
      i │ │ │ -000115d0: 6e70 7574 3c2f 636f 6465 3e20 2d20 7468 nput - th │ │ │ -000115e0: 6520 696e 7075 7420 696d 6167 6520 7769 e input image wi │ │ │ -000115f0: 7468 2033 2063 6861 6e6e 656c 732e 3c2f th 3 channels..
      re │ │ │ -00011610: 7375 6c74 3c2f 636f 6465 3e20 2d20 6120 sult - a │ │ │ -00011620: 7665 6374 6f72 206f 6620 7265 7375 6c74 vector of result │ │ │ -00011630: 696e 6720 626f 756e 6469 6e67 2062 6f78 ing bounding box │ │ │ -00011640: 6573 2077 6865 7265 2070 726f 6261 6269 es where probabi │ │ │ -00011650: 6c69 7479 206f 6620 6669 6e64 696e 6720 lity of finding │ │ │ -00011660: 7465 7874 2069 7320 6869 6768 3c2f 6464 text is high
      .
      dark │ │ │ -00011680: 5f6f 6e5f 6c69 6768 743c 2f63 6f64 653e _on_light │ │ │ -00011690: 202d 2061 2062 6f6f 6c65 616e 2076 616c - a boolean val │ │ │ -000116a0: 7565 2073 6967 6e69 6679 696e 6720 7768 ue signifying wh │ │ │ -000116b0: 6574 6865 7220 7468 6520 7465 7874 2069 ether the text i │ │ │ -000116c0: 7320 6461 726b 6572 206f 7220 6c69 6768 s darker or ligh │ │ │ -000116d0: 7465 7220 7468 616e 2074 6865 2062 6163 ter than the bac │ │ │ -000116e0: 6b67 726f 756e 642c 2069 7420 6973 206f kground, it is o │ │ │ -000116f0: 6273 6572 7665 6420 746f 2072 6576 6572 bserved to rever │ │ │ -00011700: 7365 2074 6865 2067 7261 6469 656e 7420 se the gradient │ │ │ -00011710: 6f62 7461 696e 6564 2066 726f 6d20 5363 obtained from Sc │ │ │ -00011720: 6861 7272 206f 7065 7261 746f 722c 2061 harr operator, a │ │ │ -00011730: 6e64 2073 6967 6e69 6669 6361 6e74 6c79 nd significantly │ │ │ -00011740: 2061 6666 6563 7420 7468 6520 7265 7375 affect the resu │ │ │ -00011750: 6c74 2e3c 2f64 643e 0a3c 2f64 6c3e 0a3c lt.
      .
      .< │ │ │ -00011760: 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 3e0a /section>.
    • . │ │ │ -00011770: 3c6c 693e 0a3c 7365 6374 696f 6e20 636c
    • .
      .

      │ │ │ -000117c0: 6c6f 6164 4f43 5248 4d4d 436c 6173 7369 loadOCRHMMClassi │ │ │ -000117d0: 6669 6572 4e4d 3c2f 6833 3e0a 3c64 6976 fierNM

      .
      │ │ │ -00011ac0: 0a3c 6469 7620 636c 6173 733d 2264 6570 .
      │ │ │ -00011ae0: 3c73 7061 6e20 636c 6173 733d 2264 6570 D │ │ │ -00011b00: 6570 7265 6361 7465 642e 3c2f 7370 616e eprecated..
      loadOCRHMMCla │ │ │ -00011b40: 7373 6966 6965 7220 696e 7374 6561 643c ssifier instead< │ │ │ -00011b50: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 6469 /div>.
      . │ │ │ -00011b70: 416c 6c6f 7720 746f 2069 6d70 6c69 6369 Allow to implici │ │ │ -00011b80: 746c 7920 6c6f 6164 2074 6865 2064 6566 tly load the def │ │ │ -00011b90: 6175 6c74 2063 6861 7261 6374 6572 2063 ault character c │ │ │ -00011ba0: 6c61 7373 6966 6965 7220 7768 656e 2063 lassifier when c │ │ │ -00011bb0: 7265 6174 696e 6720 616e 204f 4352 484d reating an OCRHM │ │ │ -00011bc0: 4d44 6563 6f64 6572 206f 626a 6563 742e MDecoder object. │ │ │ -00011bd0: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
      .
      .
      Pa │ │ │ -00011bf0: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
      .< │ │ │ -00011c00: 6464 3e3c 636f 6465 3e66 696c 656e 616d dd>filenam │ │ │ -00011c10: 653c 2f63 6f64 653e 202d 2054 6865 2058 e - The X │ │ │ -00011c20: 4d4c 206f 7220 5941 4d4c 2066 696c 6520 ML or YAML file │ │ │ -00011c30: 7769 7468 2074 6865 2063 6c61 7373 6966 with the classif │ │ │ -00011c40: 6965 7220 6d6f 6465 6c20 2865 2e67 2e20 ier model (e.g. │ │ │ -00011c50: 4f43 5248 4d4d 5f6b 6e6e 5f6d 6f64 656c OCRHMM_knn_model │ │ │ -00011c60: 5f64 6174 612e 786d 6c29 0a0a 2054 6865 _data.xml).. The │ │ │ -00011c70: 204b 4e4e 2064 6566 6175 6c74 2063 6c61 KNN default cla │ │ │ -00011c80: 7373 6966 6965 7220 6973 2062 6173 6564 ssifier is based │ │ │ -00011c90: 2069 6e20 7468 6520 7363 656e 6520 7465 in the scene te │ │ │ -00011ca0: 7874 2072 6563 6f67 6e69 7469 6f6e 206d xt recognition m │ │ │ -00011cb0: 6574 686f 6420 7072 6f70 6f73 6564 2062 ethod proposed b │ │ │ -00011cc0: 7920 4c75 6bc3 a173 204e 6575 6d61 6e6e y Luk..s Neumann │ │ │ -00011cd0: 2026 616d 703b 0a20 4a69 7269 204d 6174 &. Jiri Mat │ │ │ -00011ce0: 6173 2069 6e20 5b4e 6575 6d61 6e6e 3131 as in [Neumann11 │ │ │ -00011cf0: 625d 2e20 4261 7369 6361 6c6c 792c 2074 b]. Basically, t │ │ │ -00011d00: 6865 2072 6567 696f 6e20 2863 6f6e 746f he region (conto │ │ │ -00011d10: 7572 2920 696e 2074 6865 2069 6e70 7574 ur) in the input │ │ │ -00011d20: 2069 6d61 6765 2069 7320 6e6f 726d 616c image is normal │ │ │ -00011d30: 697a 6564 2074 6f20 610a 2066 6978 6564 ized to a. fixed │ │ │ -00011d40: 2073 697a 652c 2077 6869 6c65 2072 6574 size, while ret │ │ │ -00011d50: 6169 6e69 6e67 2074 6865 2063 656e 7472 aining the centr │ │ │ -00011d60: 6f69 6420 616e 6420 6173 7065 6374 2072 oid and aspect r │ │ │ -00011d70: 6174 696f 2c20 696e 206f 7264 6572 2074 atio, in order t │ │ │ -00011d80: 6f20 6578 7472 6163 7420 6120 6665 6174 o extract a feat │ │ │ -00011d90: 7572 6520 7665 6374 6f72 0a20 6261 7365 ure vector. base │ │ │ -00011da0: 6420 6f6e 2067 7261 6469 656e 7420 6f72 d on gradient or │ │ │ -00011db0: 6965 6e74 6174 696f 6e73 2061 6c6f 6e67 ientations along │ │ │ -00011dc0: 2074 6865 2063 6861 696e 2d63 6f64 6520 the chain-code │ │ │ -00011dd0: 6f66 2069 7473 2070 6572 696d 6574 6572 of its perimeter │ │ │ -00011de0: 2e20 5468 656e 2c20 7468 6520 7265 6769 . Then, the regi │ │ │ -00011df0: 6f6e 2069 7320 636c 6173 7369 6669 6564 on is classified │ │ │ -00011e00: 0a20 7573 696e 6720 6120 4b4e 4e20 6d6f . using a KNN mo │ │ │ -00011e10: 6465 6c20 7472 6169 6e65 6420 7769 7468 del trained with │ │ │ -00011e20: 2073 796e 7468 6574 6963 2064 6174 6120 synthetic data │ │ │ -00011e30: 6f66 2072 656e 6465 7265 6420 6368 6172 of rendered char │ │ │ -00011e40: 6163 7465 7273 2077 6974 6820 6469 6666 acters with diff │ │ │ -00011e50: 6572 656e 7420 7374 616e 6461 7264 2066 erent standard f │ │ │ -00011e60: 6f6e 740a 2074 7970 6573 2e3c 2f64 643e ont. types. │ │ │ -00011e70: 0a3c 6474 3e52 6574 7572 6e73 3a3c 2f64 .
      Returns:.
      automatic │ │ │ -00011e90: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      ..
    • .
    • . │ │ │ -00011ec0: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
      .

      load │ │ │ -00011f10: 4f43 5248 4d4d 436c 6173 7369 6669 6572 OCRHMMClassifier │ │ │ -00011f20: 434e 4e3c 2f68 333e 0a3c 6469 7620 636c CNN

      .
      @Depreca │ │ │ -00012010: 7465 643c 2f61 3e0a 3c2f 7370 616e 3e3c ted.< │ │ │ -00012020: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ -00012030: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ -00012040: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ -00012050: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;OCRH │ │ │ -000120c0: 4d4d 4465 636f 6465 725f 436c 6173 7369 MMDecoder_Classi │ │ │ -000120d0: 6669 6572 4361 6c6c 6261 636b 3c2f 613e fierCallback │ │ │ -000120e0: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  loadOCRH │ │ │ -00012110: 4d4d 436c 6173 7369 6669 6572 434e 4e3c MMClassifierCNN< │ │ │ -00012120: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(String filename │ │ │ -00012200: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
      .< │ │ │ -00012210: 6469 7620 636c 6173 733d 2264 6570 7265 div class="depre │ │ │ -00012220: 6361 7469 6f6e 2d62 6c6f 636b 223e 3c73 cation-block">Dep │ │ │ -00012250: 7265 6361 7465 642e 3c2f 7370 616e 3e0a recated.. │ │ │ -00012260: 3c64 6976 2063 6c61 7373 3d22 6465 7072
      use loadOCRHMMC │ │ │ -00012290: 6c61 7373 6966 6965 7220 696e 7374 6561 lassifier instea │ │ │ -000122a0: 643c 2f64 6976 3e0a 3c2f 6469 763e 0a3c d
      ..< │ │ │ -000122b0: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ -000122c0: 223e 416c 6c6f 7720 746f 2069 6d70 6c69 ">Allow to impli │ │ │ -000122d0: 6369 746c 7920 6c6f 6164 2074 6865 2064 citly load the d │ │ │ -000122e0: 6566 6175 6c74 2063 6861 7261 6374 6572 efault character │ │ │ -000122f0: 2063 6c61 7373 6966 6965 7220 7768 656e classifier when │ │ │ -00012300: 2063 7265 6174 696e 6720 616e 204f 4352 creating an OCR │ │ │ -00012310: 484d 4d44 6563 6f64 6572 206f 626a 6563 HMMDecoder objec │ │ │ -00012320: 742e 3c2f 6469 763e 0a3c 646c 2063 6c61 t..
      .
      │ │ │ -00012340: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
      │ │ │ -00012350: 0a3c 6464 3e3c 636f 6465 3e66 696c 656e .
      filen │ │ │ -00012360: 616d 653c 2f63 6f64 653e 202d 2054 6865 ame - The │ │ │ -00012370: 2058 4d4c 206f 7220 5941 4d4c 2066 696c XML or YAML fil │ │ │ -00012380: 6520 7769 7468 2074 6865 2063 6c61 7373 e with the class │ │ │ -00012390: 6966 6965 7220 6d6f 6465 6c20 2865 2e67 ifier model (e.g │ │ │ -000123a0: 2e20 4f43 5242 6561 6d53 6561 7263 685f . OCRBeamSearch_ │ │ │ -000123b0: 434e 4e5f 6d6f 6465 6c5f 6461 7461 2e78 CNN_model_data.x │ │ │ -000123c0: 6d6c 2e67 7a29 0a0a 2054 6865 2043 4e4e ml.gz).. The CNN │ │ │ -000123d0: 2064 6566 6175 6c74 2063 6c61 7373 6966 default classif │ │ │ -000123e0: 6965 7220 6973 2062 6173 6564 2069 6e20 ier is based in │ │ │ -000123f0: 7468 6520 7363 656e 6520 7465 7874 2072 the scene text r │ │ │ -00012400: 6563 6f67 6e69 7469 6f6e 206d 6574 686f ecognition metho │ │ │ -00012410: 6420 7072 6f70 6f73 6564 2062 7920 4164 d proposed by Ad │ │ │ -00012420: 616d 2043 6f61 7465 7320 2661 6d70 3b0a am Coates &. │ │ │ -00012430: 2041 6e64 7265 7720 4e47 2069 6e20 5b43 Andrew NG in [C │ │ │ -00012440: 6f61 7465 7331 3161 5d2e 2054 6865 2063 oates11a]. The c │ │ │ -00012450: 6861 7261 6374 6572 2063 6c61 7373 6966 haracter classif │ │ │ -00012460: 6965 7220 636f 6e73 6973 7473 2069 6e20 ier consists in │ │ │ -00012470: 6120 5369 6e67 6c65 204c 6179 6572 2043 a Single Layer C │ │ │ -00012480: 6f6e 766f 6c75 7469 6f6e 616c 204e 6575 onvolutional Neu │ │ │ -00012490: 7261 6c20 4e65 7477 6f72 6b20 616e 640a ral Network and. │ │ │ -000124a0: 2061 206c 696e 6561 7220 636c 6173 7369 a linear classi │ │ │ -000124b0: 6669 6572 2e20 4974 2069 7320 6170 706c fier. It is appl │ │ │ -000124c0: 6965 6420 746f 2074 6865 2069 6e70 7574 ied to the input │ │ │ -000124d0: 2069 6d61 6765 2069 6e20 6120 736c 6964 image in a slid │ │ │ -000124e0: 696e 6720 7769 6e64 6f77 2066 6173 6869 ing window fashi │ │ │ -000124f0: 6f6e 2c20 7072 6f76 6964 696e 6720 6120 on, providing a │ │ │ -00012500: 7365 7420 6f66 2072 6563 6f67 6e69 7469 set of recogniti │ │ │ -00012510: 6f6e 730a 2061 7420 6561 6368 2077 696e ons. at each win │ │ │ -00012520: 646f 7720 6c6f 6361 7469 6f6e 2e3c 2f64 dow location..
      Returns:< │ │ │ -00012540: 2f64 743e 0a3c 6464 3e61 7574 6f6d 6174 /dt>.
      automat │ │ │ -00012550: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ -00012560: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365
      .
      ..
    • .
    • .
      .

      l │ │ │ -000125d0: 6f61 644f 4352 484d 4d43 6c61 7373 6966 oadOCRHMMClassif │ │ │ -000125e0: 6965 723c 2f68 333e 0a3c 6469 7620 636c ier

      .
      p │ │ │ -00012620: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static OCRHMMDecode │ │ │ -000126b0: 725f 436c 6173 7369 6669 6572 4361 6c6c r_ClassifierCall │ │ │ -000126c0: 6261 636b 3c2f 613e 3c2f 7370 616e 3e26 back& │ │ │ -000126d0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ -000126f0: 6c6f 6164 4f43 5248 4d4d 436c 6173 7369 loadOCRHMMClassi │ │ │ -00012700: 6669 6572 3c2f 7370 616e 3e3c 7762 723e fier │ │ │ -00012710: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Str │ │ │ -000127d0: 696e 673c 2f61 3e26 6e62 7370 3b66 696c ing fil │ │ │ -000127e0: 656e 616d 652c 0a20 696e 7426 6e62 7370 ename,. int  │ │ │ -000127f0: 3b63 6c61 7373 6966 6965 7229 3c2f 7370 ;classifier)
      .
      All │ │ │ -00012820: 6f77 2074 6f20 696d 706c 6963 6974 6c79 ow to implicitly │ │ │ -00012830: 206c 6f61 6420 7468 6520 6465 6661 756c load the defaul │ │ │ -00012840: 7420 6368 6172 6163 7465 7220 636c 6173 t character clas │ │ │ -00012850: 7369 6669 6572 2077 6865 6e20 6372 6561 sifier when crea │ │ │ -00012860: 7469 6e67 2061 6e20 4f43 5248 4d4d 4465 ting an OCRHMMDe │ │ │ -00012870: 636f 6465 7220 6f62 6a65 6374 2e3c 2f64 coder object..
      .
      Param │ │ │ -000128a0: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
      .
      │ │ │ -000128b0: 3c63 6f64 653e 6669 6c65 6e61 6d65 3c2f filename - The XML │ │ │ -000128d0: 6f72 2059 414d 4c20 6669 6c65 2077 6974 or YAML file wit │ │ │ -000128e0: 6820 7468 6520 636c 6173 7369 6669 6572 h the classifier │ │ │ -000128f0: 206d 6f64 656c 2028 652e 672e 204f 4352 model (e.g. OCR │ │ │ -00012900: 4265 616d 5365 6172 6368 5f43 4e4e 5f6d BeamSearch_CNN_m │ │ │ -00012910: 6f64 656c 5f64 6174 612e 786d 6c2e 677a odel_data.xml.gz │ │ │ -00012920: 293c 2f64 643e 0a3c 6464 3e3c 636f 6465 )
      .
      classifier - Can be one │ │ │ -00012950: 6f66 2063 6c61 7373 6966 6965 725f 7479 of classifier_ty │ │ │ -00012960: 7065 2065 6e75 6d20 7661 6c75 6573 2e3c pe enum values.< │ │ │ -00012970: 2f64 643e 0a3c 6474 3e52 6574 7572 6e73 /dd>.
      Returns │ │ │ -00012980: 3a3c 2f64 743e 0a3c 6464 3e61 7574 6f6d :
      .
      autom │ │ │ -00012990: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -000129a0: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
      .
      ..
    • .< │ │ │ -000129c0: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
      . │ │ │ -00012a20: 3c68 333e 6372 6561 7465 4f43 5248 4d4d

      createOCRHMM │ │ │ -00012a30: 5472 616e 7369 7469 6f6e 7354 6162 6c65 TransitionsTable │ │ │ -00012a40: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

      .
      publ │ │ │ -00012a80: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ -00012a90: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ -00012ab0: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ -00012af0: 2f61 3e3c 2f73 7061 6e3e 266e 6273 703b /a>  │ │ │ -00012b00: 3c73 7061 6e20 636c 6173 733d 2265 6c65 creat │ │ │ -00012b20: 654f 4352 484d 4d54 7261 6e73 6974 696f eOCRHMMTransitio │ │ │ -00012b30: 6e73 5461 626c 653c 2f73 7061 6e3e 3c77 nsTable( │ │ │ -00012c00: 5374 7269 6e67 3c2f 613e 266e 6273 703b String  │ │ │ -00012c10: 766f 6361 6275 6c61 7279 2c0a 203c 6120 vocabulary,. Li │ │ │ -00012cc0: 7374 3c2f 613e 266c 743b 3c61 2068 7265 st<Str │ │ │ -00012d70: 696e 673c 2f61 3e26 6774 3b26 6e62 7370 ing>  │ │ │ -00012d80: 3b6c 6578 6963 6f6e 293c 2f73 7061 6e3e ;lexicon) │ │ │ -00012d90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      Utilit │ │ │ -00012db0: 7920 6675 6e63 7469 6f6e 2074 6f20 6372 y function to cr │ │ │ -00012dc0: 6561 7465 2061 2074 6169 6c6f 7265 6420 eate a tailored │ │ │ -00012dd0: 6c61 6e67 7561 6765 206d 6f64 656c 2074 language model t │ │ │ -00012de0: 7261 6e73 6974 696f 6e73 2074 6162 6c65 ransitions table │ │ │ -00012df0: 2066 726f 6d20 6120 6769 7665 6e20 6c69 from a given li │ │ │ -00012e00: 7374 206f 6620 776f 7264 7320 286c 6578 st of words (lex │ │ │ -00012e10: 6963 6f6e 292e 3c2f 6469 763e 0a3c 646c icon).
      .
      . │ │ │ -00012e30: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
      Parameters:< │ │ │ -00012e40: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e76 /dt>.
      v │ │ │ -00012e50: 6f63 6162 756c 6172 793c 2f63 6f64 653e ocabulary │ │ │ -00012e60: 202d 2054 6865 206c 616e 6775 6167 6520 - The language │ │ │ -00012e70: 766f 6361 6275 6c61 7279 2028 6368 6172 vocabulary (char │ │ │ -00012e80: 7320 7768 656e 2041 5343 4949 2045 6e67 s when ASCII Eng │ │ │ -00012e90: 6c69 7368 2074 6578 7429 2e3c 2f64 643e lish text).
      │ │ │ -00012ea0: 0a3c 6464 3e3c 636f 6465 3e6c 6578 6963 .
      lexic │ │ │ -00012eb0: 6f6e 3c2f 636f 6465 3e20 2d20 5468 6520 on - The │ │ │ -00012ec0: 6c69 7374 206f 6620 776f 7264 7320 7468 list of words th │ │ │ -00012ed0: 6174 2061 7265 2065 7870 6563 7465 6420 at are expected │ │ │ -00012ee0: 746f 2062 6520 666f 756e 6420 696e 2061 to be found in a │ │ │ -00012ef0: 2070 6172 7469 6375 6c61 7220 696d 6167 particular imag │ │ │ -00012f00: 652e 0a0a 0a20 5468 6520 6675 6e63 7469 e.... The functi │ │ │ -00012f10: 6f6e 2063 616c 6375 6c61 7465 2066 7265 on calculate fre │ │ │ -00012f20: 7175 656e 6379 2073 7461 7469 7374 6963 quency statistic │ │ │ -00012f30: 7320 6f66 2063 6861 7261 6374 6572 2070 s of character p │ │ │ -00012f40: 6169 7273 2066 726f 6d20 7468 6520 6769 airs from the gi │ │ │ -00012f50: 7665 6e20 6c65 7869 636f 6e20 616e 6420 ven lexicon and │ │ │ -00012f60: 6669 6c6c 7320 7468 6520 6f75 7470 7574 fills the output │ │ │ -00012f70: 2074 7261 6e73 6974 696f 6e5f 7072 6f62 transition_prob │ │ │ -00012f80: 6162 696c 6974 6965 735f 7461 626c 6520 abilities_table │ │ │ -00012f90: 7769 7468 2074 6865 6d2e 2054 6865 2074 with them. The t │ │ │ -00012fa0: 7261 6e73 6974 696f 6e5f 7072 6f62 6162 ransition_probab │ │ │ -00012fb0: 696c 6974 6965 735f 7461 626c 6520 6361 ilities_table ca │ │ │ -00012fc0: 6e20 6265 2075 7365 6420 6173 2069 6e70 n be used as inp │ │ │ -00012fd0: 7574 2069 6e20 7468 6520 4f43 5248 4d4d ut in the OCRHMM │ │ │ -00012fe0: 4465 636f 6465 723a 3a63 7265 6174 6528 Decoder::create( │ │ │ -00012ff0: 2920 616e 6420 4f43 5242 6561 6d53 6561 ) and OCRBeamSea │ │ │ -00013000: 7263 6844 6563 6f64 6572 3a3a 6372 6561 rchDecoder::crea │ │ │ -00013010: 7465 2829 206d 6574 686f 6473 2e0a 203c te() methods.. < │ │ │ -00013020: 623e 4e6f 7465 3a3c 2f62 3e0a 202d 2020 b>Note:. - │ │ │ -00013030: 2028 432b 2b29 2041 6e20 616c 7465 726e (C++) An altern │ │ │ -00013040: 6174 6976 6520 776f 756c 6420 6265 2074 ative would be t │ │ │ -00013050: 6f20 6c6f 6164 2074 6865 2064 6566 6175 o load the defau │ │ │ -00013060: 6c74 2067 656e 6572 6963 206c 616e 6775 lt generic langu │ │ │ -00013070: 6167 6520 7472 616e 7369 7469 6f6e 2074 age transition t │ │ │ -00013080: 6162 6c65 2070 726f 7669 6465 6420 696e able provided in │ │ │ -00013090: 2074 6865 2074 6578 7420 6d6f 6475 6c65 the text module │ │ │ -000130a0: 2073 616d 706c 6573 2066 6f6c 6465 7220 samples folder │ │ │ -000130b0: 2863 7265 6174 6564 2066 726f 6d20 6973 (created from is │ │ │ -000130c0: 7065 6c6c 2034 3238 3639 2065 6e67 6c69 pell 42869 engli │ │ │ -000130d0: 7368 2077 6f72 6473 206c 6973 7429 203a sh words list) : │ │ │ -000130e0: 0a20 266c 743b 6874 7470 733a 2f2f 6769 . <https://gi │ │ │ -000130f0: 7468 7562 2e63 6f6d 2f6f 7065 6e63 762f thub.com/opencv/ │ │ │ -00013100: 6f70 656e 6376 5f63 6f6e 7472 6962 2f62 opencv_contrib/b │ │ │ -00013110: 6c6f 622f 6d61 7374 6572 2f6d 6f64 756c lob/master/modul │ │ │ -00013120: 6573 2f74 6578 742f 7361 6d70 6c65 732f es/text/samples/ │ │ │ -00013130: 4f43 5248 4d4d 5f74 7261 6e73 6974 696f OCRHMM_transitio │ │ │ -00013140: 6e73 5f74 6162 6c65 2e78 6d6c 2667 743b ns_table.xml> │ │ │ -00013150: 3c2f 6464 3e0a 3c64 743e 5265 7475 726e
      .
      Return │ │ │ -00013160: 733a 3c2f 6474 3e0a 3c64 643e 6175 746f s:
      .
      auto │ │ │ -00013170: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ -00013180: 7465 643c 2f64 643e 0a3c 2f64 6c3e 0a3c ted
      .
      .< │ │ │ -00013190: 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 3e0a /section>.. │ │ │ -000131a0: 3c6c 693e 0a3c 7365 6374 696f 6e20 636c
    • .
      .

      loadOCRB │ │ │ -00013200: 6561 6d53 6561 7263 6843 6c61 7373 6966 eamSearchClassif │ │ │ -00013210: 6965 7243 4e4e 3c2f 6833 3e0a 3c64 6976 ierCNN

      .
      public static< │ │ │ -00013260: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> OC │ │ │ -000132e0: 5242 6561 6d53 6561 7263 6844 6563 6f64 RBeamSearchDecod │ │ │ -000132f0: 6572 5f43 6c61 7373 6966 6965 7243 616c er_ClassifierCal │ │ │ -00013300: 6c62 6163 6b3c 2f61 3e3c 2f73 7061 6e3e lback │ │ │ -00013310: 266e 6273 703b 3c73 7061 6e20 636c 6173  loadOCRBeamSear │ │ │ -00013340: 6368 436c 6173 7369 6669 6572 434e 4e3c chClassifierCNN< │ │ │ -00013350: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(String filename │ │ │ -00013430: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
      .< │ │ │ -00013440: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ -00013450: 223e 416c 6c6f 7720 746f 2069 6d70 6c69 ">Allow to impli │ │ │ -00013460: 6369 746c 7920 6c6f 6164 2074 6865 2064 citly load the d │ │ │ -00013470: 6566 6175 6c74 2063 6861 7261 6374 6572 efault character │ │ │ -00013480: 2063 6c61 7373 6966 6965 7220 7768 656e classifier when │ │ │ -00013490: 2063 7265 6174 696e 6720 616e 204f 4352 creating an OCR │ │ │ -000134a0: 4265 616d 5365 6172 6368 4465 636f 6465 BeamSearchDecode │ │ │ -000134b0: 7220 6f62 6a65 6374 2e3c 2f64 6976 3e0a r object.. │ │ │ -000134c0: 3c64 6c20 636c 6173 733d 226e 6f74 6573
      .
      Parameter │ │ │ -000134e0: 733a 3c2f 6474 3e0a 3c64 643e 3c63 6f64 s:
      .
      filename - The XML or Y │ │ │ -00013510: 414d 4c20 6669 6c65 2077 6974 6820 7468 AML file with th │ │ │ -00013520: 6520 636c 6173 7369 6669 6572 206d 6f64 e classifier mod │ │ │ -00013530: 656c 2028 652e 672e 204f 4352 4265 616d el (e.g. OCRBeam │ │ │ -00013540: 5365 6172 6368 5f43 4e4e 5f6d 6f64 656c Search_CNN_model │ │ │ -00013550: 5f64 6174 612e 786d 6c2e 677a 290a 0a20 _data.xml.gz).. │ │ │ -00013560: 5468 6520 434e 4e20 6465 6661 756c 7420 The CNN default │ │ │ -00013570: 636c 6173 7369 6669 6572 2069 7320 6261 classifier is ba │ │ │ -00013580: 7365 6420 696e 2074 6865 2073 6365 6e65 sed in the scene │ │ │ -00013590: 2074 6578 7420 7265 636f 676e 6974 696f text recognitio │ │ │ -000135a0: 6e20 6d65 7468 6f64 2070 726f 706f 7365 n method propose │ │ │ -000135b0: 6420 6279 2041 6461 6d20 436f 6174 6573 d by Adam Coates │ │ │ -000135c0: 2026 616d 703b 0a20 416e 6472 6577 204e &. Andrew N │ │ │ -000135d0: 4720 696e 205b 436f 6174 6573 3131 615d G in [Coates11a] │ │ │ -000135e0: 2e20 5468 6520 6368 6172 6163 7465 7220 . The character │ │ │ -000135f0: 636c 6173 7369 6669 6572 2063 6f6e 7369 classifier consi │ │ │ -00013600: 7374 7320 696e 2061 2053 696e 676c 6520 sts in a Single │ │ │ -00013610: 4c61 7965 7220 436f 6e76 6f6c 7574 696f Layer Convolutio │ │ │ -00013620: 6e61 6c20 4e65 7572 616c 204e 6574 776f nal Neural Netwo │ │ │ -00013630: 726b 2061 6e64 0a20 6120 6c69 6e65 6172 rk and. a linear │ │ │ -00013640: 2063 6c61 7373 6966 6965 722e 2049 7420 classifier. It │ │ │ -00013650: 6973 2061 7070 6c69 6564 2074 6f20 7468 is applied to th │ │ │ -00013660: 6520 696e 7075 7420 696d 6167 6520 696e e input image in │ │ │ -00013670: 2061 2073 6c69 6469 6e67 2077 696e 646f a sliding windo │ │ │ -00013680: 7720 6661 7368 696f 6e2c 2070 726f 7669 w fashion, provi │ │ │ -00013690: 6469 6e67 2061 2073 6574 206f 6620 7265 ding a set of re │ │ │ -000136a0: 636f 676e 6974 696f 6e73 0a20 6174 2065 cognitions. at e │ │ │ -000136b0: 6163 6820 7769 6e64 6f77 206c 6f63 6174 ach window locat │ │ │ -000136c0: 696f 6e2e 3c2f 6464 3e0a 3c64 743e 5265 ion.
      .
      Re │ │ │ -000136d0: 7475 726e 733a 3c2f 6474 3e0a 3c64 643e turns:
      .
      │ │ │ -000136e0: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ -000136f0: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
      ..
      ..
    • .. │ │ │ -00013790: 3c68 333e 6372 6561 7465 4552 4669 6c74

      createERFilt │ │ │ -000137a0: 6572 4e4d 313c 2f68 333e 0a3c 6469 7620 erNM1

      .
      public static ER │ │ │ -00013850: 4669 6c74 6572 3c2f 613e 3c2f 7370 616e Filter createERFilter │ │ │ -00013890: 4e4d 313c 2f73 7061 6e3e 3c77 6272 3e3c NM1< │ │ │ -000138a0: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ -000138b0: 6d65 7465 7273 223e 283c 6120 6872 6566 meters">(ERFil │ │ │ -00013900: 7465 725f 4361 6c6c 6261 636b 3c2f 613e ter_Callback │ │ │ -00013910: 266e 6273 703b 6362 2c0a 2069 6e74 266e  cb,. int&n │ │ │ -00013920: 6273 703b 7468 7265 7368 6f6c 6444 656c bsp;thresholdDel │ │ │ -00013930: 7461 2c0a 2066 6c6f 6174 266e 6273 703b ta,. float  │ │ │ -00013940: 6d69 6e41 7265 612c 0a20 666c 6f61 7426 minArea,. float& │ │ │ -00013950: 6e62 7370 3b6d 6178 4172 6561 2c0a 2066 nbsp;maxArea,. f │ │ │ -00013960: 6c6f 6174 266e 6273 703b 6d69 6e50 726f loat minPro │ │ │ -00013970: 6261 6269 6c69 7479 2c0a 2062 6f6f 6c65 bability,. boole │ │ │ -00013980: 616e 266e 6273 703b 6e6f 6e4d 6178 5375 an nonMaxSu │ │ │ -00013990: 7070 7265 7373 696f 6e2c 0a20 666c 6f61 ppression,. floa │ │ │ -000139a0: 7426 6e62 7370 3b6d 696e 5072 6f62 6162 t minProbab │ │ │ -000139b0: 696c 6974 7944 6966 6629 3c2f 7370 616e ilityDiff)
      .
      Creat │ │ │ -000139e0: 6520 616e 2045 7874 7265 6d61 6c20 5265 e an Extremal Re │ │ │ -000139f0: 6769 6f6e 2046 696c 7465 7220 666f 7220 gion Filter for │ │ │ -00013a00: 7468 6520 3173 7420 7374 6167 6520 636c the 1st stage cl │ │ │ -00013a10: 6173 7369 6669 6572 206f 6620 4e26 616d assifier of N&am │ │ │ -00013a20: 703b 4d20 616c 676f 7269 7468 6d20 4349 p;M algorithm CI │ │ │ -00013a30: 5445 3a20 4e65 756d 616e 6e31 322e 0a0a TE: Neumann12... │ │ │ -00013a40: 206c 6f61 6443 6c61 7373 6966 6965 724e loadClassifierN │ │ │ -00013a50: 4d31 2c20 652e 672e 2066 726f 6d20 6669 M1, e.g. from fi │ │ │ -00013a60: 6c65 2069 6e20 7361 6d70 6c65 732f 6370 le in samples/cp │ │ │ -00013a70: 702f 7472 6169 6e65 645f 636c 6173 7369 p/trained_classi │ │ │ -00013a80: 6669 6572 4e4d 312e 786d 6c0a 0a20 5468 fierNM1.xml.. Th │ │ │ -00013a90: 6520 636f 6d70 6f6e 656e 7420 7472 6565 e component tree │ │ │ -00013aa0: 206f 6620 7468 6520 696d 6167 6520 6973 of the image is │ │ │ -00013ab0: 2065 7874 7261 6374 6564 2062 7920 6120 extracted by a │ │ │ -00013ac0: 7468 7265 7368 6f6c 6420 696e 6372 6561 threshold increa │ │ │ -00013ad0: 7365 6420 7374 6570 2062 7920 7374 6570 sed step by step │ │ │ -00013ae0: 2066 726f 6d20 3020 746f 2032 3535 2c0a from 0 to 255,. │ │ │ -00013af0: 2069 6e63 7265 6d65 6e74 616c 6c79 2063 incrementally c │ │ │ -00013b00: 6f6d 7075 7461 626c 6520 6465 7363 7269 omputable descri │ │ │ -00013b10: 7074 6f72 7320 2861 7370 6563 745f 7261 ptors (aspect_ra │ │ │ -00013b20: 7469 6f2c 2063 6f6d 7061 6374 6e65 7373 tio, compactness │ │ │ -00013b30: 2c20 6e75 6d62 6572 206f 6620 686f 6c65 , number of hole │ │ │ -00013b40: 732c 2061 6e64 206e 756d 6265 7220 6f66 s, and number of │ │ │ -00013b50: 0a20 686f 7269 7a6f 6e74 616c 2063 726f . horizontal cro │ │ │ -00013b60: 7373 696e 6773 2920 6172 6520 636f 6d70 ssings) are comp │ │ │ -00013b70: 7574 6564 2066 6f72 2065 6163 6820 4552 uted for each ER │ │ │ -00013b80: 2061 6e64 2075 7365 6420 6173 2066 6561 and used as fea │ │ │ -00013b90: 7475 7265 7320 666f 7220 6120 636c 6173 tures for a clas │ │ │ -00013ba0: 7369 6669 6572 2077 6869 6368 2065 7374 sifier which est │ │ │ -00013bb0: 696d 6174 6573 0a20 7468 6520 636c 6173 imates. the clas │ │ │ -00013bc0: 732d 636f 6e64 6974 696f 6e61 6c20 7072 s-conditional pr │ │ │ -00013bd0: 6f62 6162 696c 6974 7920 5028 6572 7c63 obability P(er|c │ │ │ -00013be0: 6861 7261 6374 6572 292e 2054 6865 2076 haracter). The v │ │ │ -00013bf0: 616c 7565 206f 6620 5028 6572 7c63 6861 alue of P(er|cha │ │ │ -00013c00: 7261 6374 6572 2920 6973 2074 7261 636b racter) is track │ │ │ -00013c10: 6564 2075 7369 6e67 2074 6865 0a20 696e ed using the. in │ │ │ -00013c20: 636c 7573 696f 6e20 7265 6c61 7469 6f6e clusion relation │ │ │ -00013c30: 206f 6620 4552 2061 6372 6f73 7320 616c of ER across al │ │ │ -00013c40: 6c20 7468 7265 7368 6f6c 6473 2061 6e64 l thresholds and │ │ │ -00013c50: 206f 6e6c 7920 7468 6520 4552 7320 7768 only the ERs wh │ │ │ -00013c60: 6963 6820 636f 7272 6573 706f 6e64 2074 ich correspond t │ │ │ -00013c70: 6f20 6c6f 6361 6c20 6d61 7869 6d75 6d20 o local maximum │ │ │ -00013c80: 6f66 0a20 7468 6520 7072 6f62 6162 696c of. the probabil │ │ │ -00013c90: 6974 7920 5028 6572 7c63 6861 7261 6374 ity P(er|charact │ │ │ -00013ca0: 6572 2920 6172 6520 7365 6c65 6374 6564 er) are selected │ │ │ -00013cb0: 2028 6966 2074 6865 206c 6f63 616c 206d (if the local m │ │ │ -00013cc0: 6178 696d 756d 206f 6620 7468 6520 7072 aximum of the pr │ │ │ -00013cd0: 6f62 6162 696c 6974 7920 6973 2061 626f obability is abo │ │ │ -00013ce0: 7665 2061 0a20 676c 6f62 616c 206c 696d ve a. global lim │ │ │ -00013cf0: 6974 2070 6d69 6e20 616e 6420 7468 6520 it pmin and the │ │ │ -00013d00: 6469 6666 6572 656e 6365 2062 6574 7765 difference betwe │ │ │ -00013d10: 656e 206c 6f63 616c 206d 6178 696d 756d en local maximum │ │ │ -00013d20: 2061 6e64 206c 6f63 616c 206d 696e 696d and local minim │ │ │ -00013d30: 756d 2069 7320 6772 6561 7465 7220 7468 um is greater th │ │ │ -00013d40: 616e 0a20 6d69 6e50 726f 6261 6269 6c69 an. minProbabili │ │ │ -00013d50: 7479 4469 6666 292e 3c2f 6469 763e 0a3c tyDiff).
      .< │ │ │ -00013d60: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ -00013d70: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
      Parameters │ │ │ -00013d80: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
      .
      cb - aut │ │ │ -00013da0: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ -00013db0: 6174 6564 3c2f 6464 3e0a 3c64 643e 3c63 ated
      .
      thresholdDel │ │ │ -00013dd0: 7461 3c2f 636f 6465 3e20 2d20 6175 746f ta - auto │ │ │ -00013de0: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ -00013df0: 7465 643c 2f64 643e 0a3c 6464 3e3c 636f ted
      .
      minArea - automaticall │ │ │ -00013e20: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
      │ │ │ -00013e30: 0a3c 6464 3e3c 636f 6465 3e6d 6178 4172 .
      maxAr │ │ │ -00013e40: 6561 3c2f 636f 6465 3e20 2d20 6175 746f ea - auto │ │ │ -00013e50: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ -00013e60: 7465 643c 2f64 643e 0a3c 6464 3e3c 636f ted
      .
      minProbabilit │ │ │ -00013e80: 793c 2f63 6f64 653e 202d 2061 7574 6f6d y - autom │ │ │ -00013e90: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -00013ea0: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
      .
      nonMaxSuppress │ │ │ -00013ec0: 696f 6e3c 2f63 6f64 653e 202d 2061 7574 ion - aut │ │ │ -00013ed0: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ -00013ee0: 6174 6564 3c2f 6464 3e0a 3c64 643e 3c63 ated
      .
      minProbabili │ │ │ -00013f00: 7479 4469 6666 3c2f 636f 6465 3e20 2d20 tyDiff - │ │ │ -00013f10: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ -00013f20: 6e65 7261 7465 643c 2f64 643e 0a3c 6474 nerated
      .
      Returns:
      .< │ │ │ -00013f40: 6464 3e61 7574 6f6d 6174 6963 616c 6c79 dd>automatically │ │ │ -00013f50: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated. │ │ │ -00013f60: 3c2f 646c 3e0a 3c2f 7365 6374 696f 6e3e .
    • │ │ │ -00013f70: 0a3c 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 ..
    • ..

      createERFilterN │ │ │ -00014000: 4d31 3c2f 6833 3e0a 3c64 6976 2063 6c61 M1

      .
      pu │ │ │ -00014040: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static ERFil │ │ │ -000140b0: 7465 723c 2f61 3e3c 2f73 7061 6e3e 266e ter&n │ │ │ -000140c0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;c │ │ │ -000140e0: 7265 6174 6545 5246 696c 7465 724e 4d31 reateERFilterNM1 │ │ │ -000140f0: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (ERFilter │ │ │ -00014160: 5f43 616c 6c62 6163 6b3c 2f61 3e26 6e62 _Callback&nb │ │ │ -00014170: 7370 3b63 622c 0a20 696e 7426 6e62 7370 sp;cb,. int  │ │ │ -00014180: 3b74 6872 6573 686f 6c64 4465 6c74 612c ;thresholdDelta, │ │ │ -00014190: 0a20 666c 6f61 7426 6e62 7370 3b6d 696e . float min │ │ │ -000141a0: 4172 6561 2c0a 2066 6c6f 6174 266e 6273 Area,. float&nbs │ │ │ -000141b0: 703b 6d61 7841 7265 612c 0a20 666c 6f61 p;maxArea,. floa │ │ │ -000141c0: 7426 6e62 7370 3b6d 696e 5072 6f62 6162 t minProbab │ │ │ -000141d0: 696c 6974 792c 0a20 626f 6f6c 6561 6e26 ility,. boolean& │ │ │ -000141e0: 6e62 7370 3b6e 6f6e 4d61 7853 7570 7072 nbsp;nonMaxSuppr │ │ │ -000141f0: 6573 7369 6f6e 293c 2f73 7061 6e3e 3c2f ession).
      Create a │ │ │ -00014220: 6e20 4578 7472 656d 616c 2052 6567 696f n Extremal Regio │ │ │ -00014230: 6e20 4669 6c74 6572 2066 6f72 2074 6865 n Filter for the │ │ │ -00014240: 2031 7374 2073 7461 6765 2063 6c61 7373 1st stage class │ │ │ -00014250: 6966 6965 7220 6f66 204e 2661 6d70 3b4d ifier of N&M │ │ │ -00014260: 2061 6c67 6f72 6974 686d 2043 4954 453a algorithm CITE: │ │ │ -00014270: 204e 6575 6d61 6e6e 3132 2e0a 0a20 6c6f Neumann12... lo │ │ │ -00014280: 6164 436c 6173 7369 6669 6572 4e4d 312c adClassifierNM1, │ │ │ -00014290: 2065 2e67 2e20 6672 6f6d 2066 696c 6520 e.g. from file │ │ │ -000142a0: 696e 2073 616d 706c 6573 2f63 7070 2f74 in samples/cpp/t │ │ │ -000142b0: 7261 696e 6564 5f63 6c61 7373 6966 6965 rained_classifie │ │ │ -000142c0: 724e 4d31 2e78 6d6c 0a0a 2054 6865 2063 rNM1.xml.. The c │ │ │ -000142d0: 6f6d 706f 6e65 6e74 2074 7265 6520 6f66 omponent tree of │ │ │ -000142e0: 2074 6865 2069 6d61 6765 2069 7320 6578 the image is ex │ │ │ -000142f0: 7472 6163 7465 6420 6279 2061 2074 6872 tracted by a thr │ │ │ -00014300: 6573 686f 6c64 2069 6e63 7265 6173 6564 eshold increased │ │ │ -00014310: 2073 7465 7020 6279 2073 7465 7020 6672 step by step fr │ │ │ -00014320: 6f6d 2030 2074 6f20 3235 352c 0a20 696e om 0 to 255,. in │ │ │ -00014330: 6372 656d 656e 7461 6c6c 7920 636f 6d70 crementally comp │ │ │ -00014340: 7574 6162 6c65 2064 6573 6372 6970 746f utable descripto │ │ │ -00014350: 7273 2028 6173 7065 6374 5f72 6174 696f rs (aspect_ratio │ │ │ -00014360: 2c20 636f 6d70 6163 746e 6573 732c 206e , compactness, n │ │ │ -00014370: 756d 6265 7220 6f66 2068 6f6c 6573 2c20 umber of holes, │ │ │ -00014380: 616e 6420 6e75 6d62 6572 206f 660a 2068 and number of. h │ │ │ -00014390: 6f72 697a 6f6e 7461 6c20 6372 6f73 7369 orizontal crossi │ │ │ -000143a0: 6e67 7329 2061 7265 2063 6f6d 7075 7465 ngs) are compute │ │ │ -000143b0: 6420 666f 7220 6561 6368 2045 5220 616e d for each ER an │ │ │ -000143c0: 6420 7573 6564 2061 7320 6665 6174 7572 d used as featur │ │ │ -000143d0: 6573 2066 6f72 2061 2063 6c61 7373 6966 es for a classif │ │ │ -000143e0: 6965 7220 7768 6963 6820 6573 7469 6d61 ier which estima │ │ │ -000143f0: 7465 730a 2074 6865 2063 6c61 7373 2d63 tes. the class-c │ │ │ -00014400: 6f6e 6469 7469 6f6e 616c 2070 726f 6261 onditional proba │ │ │ -00014410: 6269 6c69 7479 2050 2865 727c 6368 6172 bility P(er|char │ │ │ -00014420: 6163 7465 7229 2e20 5468 6520 7661 6c75 acter). The valu │ │ │ -00014430: 6520 6f66 2050 2865 727c 6368 6172 6163 e of P(er|charac │ │ │ -00014440: 7465 7229 2069 7320 7472 6163 6b65 6420 ter) is tracked │ │ │ -00014450: 7573 696e 6720 7468 650a 2069 6e63 6c75 using the. inclu │ │ │ -00014460: 7369 6f6e 2072 656c 6174 696f 6e20 6f66 sion relation of │ │ │ -00014470: 2045 5220 6163 726f 7373 2061 6c6c 2074 ER across all t │ │ │ -00014480: 6872 6573 686f 6c64 7320 616e 6420 6f6e hresholds and on │ │ │ -00014490: 6c79 2074 6865 2045 5273 2077 6869 6368 ly the ERs which │ │ │ -000144a0: 2063 6f72 7265 7370 6f6e 6420 746f 206c correspond to l │ │ │ -000144b0: 6f63 616c 206d 6178 696d 756d 206f 660a ocal maximum of. │ │ │ -000144c0: 2074 6865 2070 726f 6261 6269 6c69 7479 the probability │ │ │ -000144d0: 2050 2865 727c 6368 6172 6163 7465 7229 P(er|character) │ │ │ -000144e0: 2061 7265 2073 656c 6563 7465 6420 2869 are selected (i │ │ │ -000144f0: 6620 7468 6520 6c6f 6361 6c20 6d61 7869 f the local maxi │ │ │ -00014500: 6d75 6d20 6f66 2074 6865 2070 726f 6261 mum of the proba │ │ │ -00014510: 6269 6c69 7479 2069 7320 6162 6f76 6520 bility is above │ │ │ -00014520: 610a 2067 6c6f 6261 6c20 6c69 6d69 7420 a. global limit │ │ │ -00014530: 706d 696e 2061 6e64 2074 6865 2064 6966 pmin and the dif │ │ │ -00014540: 6665 7265 6e63 6520 6265 7477 6565 6e20 ference between │ │ │ -00014550: 6c6f 6361 6c20 6d61 7869 6d75 6d20 616e local maximum an │ │ │ -00014560: 6420 6c6f 6361 6c20 6d69 6e69 6d75 6d20 d local minimum │ │ │ -00014570: 6973 2067 7265 6174 6572 2074 6861 6e0a is greater than. │ │ │ -00014580: 206d 696e 5072 6f62 6162 696c 6974 7944 minProbabilityD │ │ │ -00014590: 6966 6629 2e3c 2f64 6976 3e0a 3c64 6c20 iff).
      .
      .< │ │ │ -000145b0: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
      cb │ │ │ -000145d0: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ -000145e0: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -000145f0: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d
      .
      thresholdDelta< │ │ │ -00014610: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ -00014620: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ -00014630: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
      .
      │ │ │ -00014640: 6d69 6e41 7265 613c 2f63 6f64 653e 202d minArea - │ │ │ -00014650: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ -00014660: 656e 6572 6174 6564 3c2f 6464 3e0a 3c64 enerated
      .maxArea< │ │ │ -00014680: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ -00014690: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ -000146a0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e .
      │ │ │ -000146b0: 6d69 6e50 726f 6261 6269 6c69 7479 3c2f minProbability - automati │ │ │ -000146d0: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -000146e0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e6e /dd>.
      n │ │ │ -000146f0: 6f6e 4d61 7853 7570 7072 6573 7369 6f6e onMaxSuppression │ │ │ -00014700: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ -00014710: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -00014720: 643c 2f64 643e 0a3c 6474 3e52 6574 7572 d
      .
      Retur │ │ │ -00014730: 6e73 3a3c 2f64 743e 0a3c 6464 3e61 7574 ns:
      .
      aut │ │ │ -00014740: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ -00014750: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
      .
      . │ │ │ -00014760: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e .
    • │ │ │ -00014770: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
    • .
      .< │ │ │ -000147e0: 6833 3e63 7265 6174 6545 5246 696c 7465 h3>createERFilte │ │ │ -000147f0: 724e 4d31 3c2f 6833 3e0a 3c64 6976 2063 rNM1.
      │ │ │ -00014830: 7075 626c 6963 2073 7461 7469 633c 2f73 public static ERF │ │ │ -000148a0: 696c 7465 723c 2f61 3e3c 2f73 7061 6e3e ilter │ │ │ -000148b0: 266e 6273 703b 3c73 7061 6e20 636c 6173  createERFilterN │ │ │ -000148e0: 4d31 3c2f 7370 616e 3e3c 7762 723e 3c73 M1(ERFilt │ │ │ -00014950: 6572 5f43 616c 6c62 6163 6b3c 2f61 3e26 er_Callback& │ │ │ -00014960: 6e62 7370 3b63 622c 0a20 696e 7426 6e62 nbsp;cb,. int&nb │ │ │ -00014970: 7370 3b74 6872 6573 686f 6c64 4465 6c74 sp;thresholdDelt │ │ │ -00014980: 612c 0a20 666c 6f61 7426 6e62 7370 3b6d a,. float m │ │ │ -00014990: 696e 4172 6561 2c0a 2066 6c6f 6174 266e inArea,. float&n │ │ │ -000149a0: 6273 703b 6d61 7841 7265 612c 0a20 666c bsp;maxArea,. fl │ │ │ -000149b0: 6f61 7426 6e62 7370 3b6d 696e 5072 6f62 oat minProb │ │ │ -000149c0: 6162 696c 6974 7929 3c2f 7370 616e 3e3c ability)< │ │ │ -000149d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      Create │ │ │ -000149f0: 616e 2045 7874 7265 6d61 6c20 5265 6769 an Extremal Regi │ │ │ -00014a00: 6f6e 2046 696c 7465 7220 666f 7220 7468 on Filter for th │ │ │ -00014a10: 6520 3173 7420 7374 6167 6520 636c 6173 e 1st stage clas │ │ │ -00014a20: 7369 6669 6572 206f 6620 4e26 616d 703b sifier of N& │ │ │ -00014a30: 4d20 616c 676f 7269 7468 6d20 4349 5445 M algorithm CITE │ │ │ -00014a40: 3a20 4e65 756d 616e 6e31 322e 0a0a 206c : Neumann12... l │ │ │ -00014a50: 6f61 6443 6c61 7373 6966 6965 724e 4d31 oadClassifierNM1 │ │ │ -00014a60: 2c20 652e 672e 2066 726f 6d20 6669 6c65 , e.g. from file │ │ │ -00014a70: 2069 6e20 7361 6d70 6c65 732f 6370 702f in samples/cpp/ │ │ │ -00014a80: 7472 6169 6e65 645f 636c 6173 7369 6669 trained_classifi │ │ │ -00014a90: 6572 4e4d 312e 786d 6c0a 0a20 5468 6520 erNM1.xml.. The │ │ │ -00014aa0: 636f 6d70 6f6e 656e 7420 7472 6565 206f component tree o │ │ │ -00014ab0: 6620 7468 6520 696d 6167 6520 6973 2065 f the image is e │ │ │ -00014ac0: 7874 7261 6374 6564 2062 7920 6120 7468 xtracted by a th │ │ │ -00014ad0: 7265 7368 6f6c 6420 696e 6372 6561 7365 reshold increase │ │ │ -00014ae0: 6420 7374 6570 2062 7920 7374 6570 2066 d step by step f │ │ │ -00014af0: 726f 6d20 3020 746f 2032 3535 2c0a 2069 rom 0 to 255,. i │ │ │ -00014b00: 6e63 7265 6d65 6e74 616c 6c79 2063 6f6d ncrementally com │ │ │ -00014b10: 7075 7461 626c 6520 6465 7363 7269 7074 putable descript │ │ │ -00014b20: 6f72 7320 2861 7370 6563 745f 7261 7469 ors (aspect_rati │ │ │ -00014b30: 6f2c 2063 6f6d 7061 6374 6e65 7373 2c20 o, compactness, │ │ │ -00014b40: 6e75 6d62 6572 206f 6620 686f 6c65 732c number of holes, │ │ │ -00014b50: 2061 6e64 206e 756d 6265 7220 6f66 0a20 and number of. │ │ │ -00014b60: 686f 7269 7a6f 6e74 616c 2063 726f 7373 horizontal cross │ │ │ -00014b70: 696e 6773 2920 6172 6520 636f 6d70 7574 ings) are comput │ │ │ -00014b80: 6564 2066 6f72 2065 6163 6820 4552 2061 ed for each ER a │ │ │ -00014b90: 6e64 2075 7365 6420 6173 2066 6561 7475 nd used as featu │ │ │ -00014ba0: 7265 7320 666f 7220 6120 636c 6173 7369 res for a classi │ │ │ -00014bb0: 6669 6572 2077 6869 6368 2065 7374 696d fier which estim │ │ │ -00014bc0: 6174 6573 0a20 7468 6520 636c 6173 732d ates. the class- │ │ │ -00014bd0: 636f 6e64 6974 696f 6e61 6c20 7072 6f62 conditional prob │ │ │ -00014be0: 6162 696c 6974 7920 5028 6572 7c63 6861 ability P(er|cha │ │ │ -00014bf0: 7261 6374 6572 292e 2054 6865 2076 616c racter). The val │ │ │ -00014c00: 7565 206f 6620 5028 6572 7c63 6861 7261 ue of P(er|chara │ │ │ -00014c10: 6374 6572 2920 6973 2074 7261 636b 6564 cter) is tracked │ │ │ -00014c20: 2075 7369 6e67 2074 6865 0a20 696e 636c using the. incl │ │ │ -00014c30: 7573 696f 6e20 7265 6c61 7469 6f6e 206f usion relation o │ │ │ -00014c40: 6620 4552 2061 6372 6f73 7320 616c 6c20 f ER across all │ │ │ -00014c50: 7468 7265 7368 6f6c 6473 2061 6e64 206f thresholds and o │ │ │ -00014c60: 6e6c 7920 7468 6520 4552 7320 7768 6963 nly the ERs whic │ │ │ -00014c70: 6820 636f 7272 6573 706f 6e64 2074 6f20 h correspond to │ │ │ -00014c80: 6c6f 6361 6c20 6d61 7869 6d75 6d20 6f66 local maximum of │ │ │ -00014c90: 0a20 7468 6520 7072 6f62 6162 696c 6974 . the probabilit │ │ │ -00014ca0: 7920 5028 6572 7c63 6861 7261 6374 6572 y P(er|character │ │ │ -00014cb0: 2920 6172 6520 7365 6c65 6374 6564 2028 ) are selected ( │ │ │ -00014cc0: 6966 2074 6865 206c 6f63 616c 206d 6178 if the local max │ │ │ -00014cd0: 696d 756d 206f 6620 7468 6520 7072 6f62 imum of the prob │ │ │ -00014ce0: 6162 696c 6974 7920 6973 2061 626f 7665 ability is above │ │ │ -00014cf0: 2061 0a20 676c 6f62 616c 206c 696d 6974 a. global limit │ │ │ -00014d00: 2070 6d69 6e20 616e 6420 7468 6520 6469 pmin and the di │ │ │ -00014d10: 6666 6572 656e 6365 2062 6574 7765 656e fference between │ │ │ -00014d20: 206c 6f63 616c 206d 6178 696d 756d 2061 local maximum a │ │ │ -00014d30: 6e64 206c 6f63 616c 206d 696e 696d 756d nd local minimum │ │ │ -00014d40: 2069 7320 6772 6561 7465 7220 7468 616e is greater than │ │ │ -00014d50: 0a20 6d69 6e50 726f 6261 6269 6c69 7479 . minProbability │ │ │ -00014d60: 4469 6666 292e 3c2f 6469 763e 0a3c 646c Diff).
      .
      . │ │ │ -00014d80: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
      Parameters:< │ │ │ -00014d90: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e63 /dt>.
      c │ │ │ -00014da0: 623c 2f63 6f64 653e 202d 2061 7574 6f6d b - autom │ │ │ -00014db0: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -00014dc0: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
      .
      thresholdDelta │ │ │ -00014de0: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ -00014df0: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -00014e00: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d
      .
      minArea │ │ │ -00014e20: 2d20 6175 746f 6d61 7469 6361 6c6c 7920 - automatically │ │ │ -00014e30: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated
      .< │ │ │ -00014e40: 6464 3e3c 636f 6465 3e6d 6178 4172 6561 dd>maxArea │ │ │ -00014e50: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ -00014e60: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -00014e70: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d.
      minProbability< │ │ │ -00014e90: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ -00014ea0: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ -00014eb0: 3c2f 6464 3e0a 3c64 743e 5265 7475 726e
      .
      Return │ │ │ -00014ec0: 733a 3c2f 6474 3e0a 3c64 643e 6175 746f s:
      .
      auto │ │ │ -00014ed0: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ -00014ee0: 7465 643c 2f64 643e 0a3c 2f64 6c3e 0a3c ted
      .
      .< │ │ │ -00014ef0: 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 3e0a /section>.
    • . │ │ │ -00014f00: 3c6c 693e 0a3c 7365 6374 696f 6e20 636c
    • .
      .

      crea │ │ │ -00014f70: 7465 4552 4669 6c74 6572 4e4d 313c 2f68 teERFilterNM1.
      public │ │ │ -00014fc0: 7374 6174 6963 3c2f 7370 616e 3e26 6e62 static&nb │ │ │ -00014fd0: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;ERFilter < │ │ │ -00015040: 7370 616e 2063 6c61 7373 3d22 656c 656d span class="elem │ │ │ -00015050: 656e 742d 6e61 6d65 223e 6372 6561 7465 ent-name">create │ │ │ -00015060: 4552 4669 6c74 6572 4e4d 313c 2f73 7061 ERFilterNM1 │ │ │ -00015090: 283c 6120 6872 6566 3d22 4552 4669 6c74 (ERFilter_Call │ │ │ -000150e0: 6261 636b 3c2f 613e 266e 6273 703b 6362 back cb │ │ │ -000150f0: 2c0a 2069 6e74 266e 6273 703b 7468 7265 ,. int thre │ │ │ -00015100: 7368 6f6c 6444 656c 7461 2c0a 2066 6c6f sholdDelta,. flo │ │ │ -00015110: 6174 266e 6273 703b 6d69 6e41 7265 612c at minArea, │ │ │ -00015120: 0a20 666c 6f61 7426 6e62 7370 3b6d 6178 . float max │ │ │ -00015130: 4172 6561 293c 2f73 7061 6e3e 3c2f 6469 Area).
      Create an │ │ │ -00015160: 4578 7472 656d 616c 2052 6567 696f 6e20 Extremal Region │ │ │ -00015170: 4669 6c74 6572 2066 6f72 2074 6865 2031 Filter for the 1 │ │ │ -00015180: 7374 2073 7461 6765 2063 6c61 7373 6966 st stage classif │ │ │ -00015190: 6965 7220 6f66 204e 2661 6d70 3b4d 2061 ier of N&M a │ │ │ -000151a0: 6c67 6f72 6974 686d 2043 4954 453a 204e lgorithm CITE: N │ │ │ -000151b0: 6575 6d61 6e6e 3132 2e0a 0a20 6c6f 6164 eumann12... load │ │ │ -000151c0: 436c 6173 7369 6669 6572 4e4d 312c 2065 ClassifierNM1, e │ │ │ -000151d0: 2e67 2e20 6672 6f6d 2066 696c 6520 696e .g. from file in │ │ │ -000151e0: 2073 616d 706c 6573 2f63 7070 2f74 7261 samples/cpp/tra │ │ │ -000151f0: 696e 6564 5f63 6c61 7373 6966 6965 724e ined_classifierN │ │ │ -00015200: 4d31 2e78 6d6c 0a0a 2054 6865 2063 6f6d M1.xml.. The com │ │ │ -00015210: 706f 6e65 6e74 2074 7265 6520 6f66 2074 ponent tree of t │ │ │ -00015220: 6865 2069 6d61 6765 2069 7320 6578 7472 he image is extr │ │ │ -00015230: 6163 7465 6420 6279 2061 2074 6872 6573 acted by a thres │ │ │ -00015240: 686f 6c64 2069 6e63 7265 6173 6564 2073 hold increased s │ │ │ -00015250: 7465 7020 6279 2073 7465 7020 6672 6f6d tep by step from │ │ │ -00015260: 2030 2074 6f20 3235 352c 0a20 696e 6372 0 to 255,. incr │ │ │ -00015270: 656d 656e 7461 6c6c 7920 636f 6d70 7574 ementally comput │ │ │ -00015280: 6162 6c65 2064 6573 6372 6970 746f 7273 able descriptors │ │ │ -00015290: 2028 6173 7065 6374 5f72 6174 696f 2c20 (aspect_ratio, │ │ │ -000152a0: 636f 6d70 6163 746e 6573 732c 206e 756d compactness, num │ │ │ -000152b0: 6265 7220 6f66 2068 6f6c 6573 2c20 616e ber of holes, an │ │ │ -000152c0: 6420 6e75 6d62 6572 206f 660a 2068 6f72 d number of. hor │ │ │ -000152d0: 697a 6f6e 7461 6c20 6372 6f73 7369 6e67 izontal crossing │ │ │ -000152e0: 7329 2061 7265 2063 6f6d 7075 7465 6420 s) are computed │ │ │ -000152f0: 666f 7220 6561 6368 2045 5220 616e 6420 for each ER and │ │ │ -00015300: 7573 6564 2061 7320 6665 6174 7572 6573 used as features │ │ │ -00015310: 2066 6f72 2061 2063 6c61 7373 6966 6965 for a classifie │ │ │ -00015320: 7220 7768 6963 6820 6573 7469 6d61 7465 r which estimate │ │ │ -00015330: 730a 2074 6865 2063 6c61 7373 2d63 6f6e s. the class-con │ │ │ -00015340: 6469 7469 6f6e 616c 2070 726f 6261 6269 ditional probabi │ │ │ -00015350: 6c69 7479 2050 2865 727c 6368 6172 6163 lity P(er|charac │ │ │ -00015360: 7465 7229 2e20 5468 6520 7661 6c75 6520 ter). The value │ │ │ -00015370: 6f66 2050 2865 727c 6368 6172 6163 7465 of P(er|characte │ │ │ -00015380: 7229 2069 7320 7472 6163 6b65 6420 7573 r) is tracked us │ │ │ -00015390: 696e 6720 7468 650a 2069 6e63 6c75 7369 ing the. inclusi │ │ │ -000153a0: 6f6e 2072 656c 6174 696f 6e20 6f66 2045 on relation of E │ │ │ -000153b0: 5220 6163 726f 7373 2061 6c6c 2074 6872 R across all thr │ │ │ -000153c0: 6573 686f 6c64 7320 616e 6420 6f6e 6c79 esholds and only │ │ │ -000153d0: 2074 6865 2045 5273 2077 6869 6368 2063 the ERs which c │ │ │ -000153e0: 6f72 7265 7370 6f6e 6420 746f 206c 6f63 orrespond to loc │ │ │ -000153f0: 616c 206d 6178 696d 756d 206f 660a 2074 al maximum of. t │ │ │ -00015400: 6865 2070 726f 6261 6269 6c69 7479 2050 he probability P │ │ │ -00015410: 2865 727c 6368 6172 6163 7465 7229 2061 (er|character) a │ │ │ -00015420: 7265 2073 656c 6563 7465 6420 2869 6620 re selected (if │ │ │ -00015430: 7468 6520 6c6f 6361 6c20 6d61 7869 6d75 the local maximu │ │ │ -00015440: 6d20 6f66 2074 6865 2070 726f 6261 6269 m of the probabi │ │ │ -00015450: 6c69 7479 2069 7320 6162 6f76 6520 610a lity is above a. │ │ │ -00015460: 2067 6c6f 6261 6c20 6c69 6d69 7420 706d global limit pm │ │ │ -00015470: 696e 2061 6e64 2074 6865 2064 6966 6665 in and the diffe │ │ │ -00015480: 7265 6e63 6520 6265 7477 6565 6e20 6c6f rence between lo │ │ │ -00015490: 6361 6c20 6d61 7869 6d75 6d20 616e 6420 cal maximum and │ │ │ -000154a0: 6c6f 6361 6c20 6d69 6e69 6d75 6d20 6973 local minimum is │ │ │ -000154b0: 2067 7265 6174 6572 2074 6861 6e0a 206d greater than. m │ │ │ -000154c0: 696e 5072 6f62 6162 696c 6974 7944 6966 inProbabilityDif │ │ │ -000154d0: 6629 2e3c 2f64 6976 3e0a 3c64 6c20 636c f).
      .
      .
      Parameters:
      .
      cb - automati │ │ │ -00015520: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -00015530: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e74 /dd>.
      t │ │ │ -00015540: 6872 6573 686f 6c64 4465 6c74 613c 2f63 hresholdDelta - automatic │ │ │ -00015560: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      mi │ │ │ -00015580: 6e41 7265 613c 2f63 6f64 653e 202d 2061 nArea - a │ │ │ -00015590: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ -000155a0: 6572 6174 6564 3c2f 6464 3e0a 3c64 643e erated
      .
      │ │ │ -000155b0: 3c63 6f64 653e 6d61 7841 7265 613c 2f63 maxArea - automatic │ │ │ -000155d0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      Returns: │ │ │ -000155f0: 3c2f 6474 3e0a 3c64 643e 6175 746f 6d61
      .
      automa │ │ │ -00015600: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -00015610: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
      .
      .
      .

    • ..
      . │ │ │ -00015690: 3c68 333e 6372 6561 7465 4552 4669 6c74

      createERFilt │ │ │ -000156a0: 6572 4e4d 313c 2f68 333e 0a3c 6469 7620 erNM1

      .
      public static ER │ │ │ -00015750: 4669 6c74 6572 3c2f 613e 3c2f 7370 616e Filter createERFilter │ │ │ -00015790: 4e4d 313c 2f73 7061 6e3e 3c77 6272 3e3c NM1< │ │ │ -000157a0: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ -000157b0: 6d65 7465 7273 223e 283c 6120 6872 6566 meters">(ERFil │ │ │ -00015800: 7465 725f 4361 6c6c 6261 636b 3c2f 613e ter_Callback │ │ │ -00015810: 266e 6273 703b 6362 2c0a 2069 6e74 266e  cb,. int&n │ │ │ -00015820: 6273 703b 7468 7265 7368 6f6c 6444 656c bsp;thresholdDel │ │ │ -00015830: 7461 2c0a 2066 6c6f 6174 266e 6273 703b ta,. float  │ │ │ -00015840: 6d69 6e41 7265 6129 3c2f 7370 616e 3e3c minArea)< │ │ │ -00015850: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      Create │ │ │ -00015870: 616e 2045 7874 7265 6d61 6c20 5265 6769 an Extremal Regi │ │ │ -00015880: 6f6e 2046 696c 7465 7220 666f 7220 7468 on Filter for th │ │ │ -00015890: 6520 3173 7420 7374 6167 6520 636c 6173 e 1st stage clas │ │ │ -000158a0: 7369 6669 6572 206f 6620 4e26 616d 703b sifier of N& │ │ │ -000158b0: 4d20 616c 676f 7269 7468 6d20 4349 5445 M algorithm CITE │ │ │ -000158c0: 3a20 4e65 756d 616e 6e31 322e 0a0a 206c : Neumann12... l │ │ │ -000158d0: 6f61 6443 6c61 7373 6966 6965 724e 4d31 oadClassifierNM1 │ │ │ -000158e0: 2c20 652e 672e 2066 726f 6d20 6669 6c65 , e.g. from file │ │ │ -000158f0: 2069 6e20 7361 6d70 6c65 732f 6370 702f in samples/cpp/ │ │ │ -00015900: 7472 6169 6e65 645f 636c 6173 7369 6669 trained_classifi │ │ │ -00015910: 6572 4e4d 312e 786d 6c0a 0a20 5468 6520 erNM1.xml.. The │ │ │ -00015920: 636f 6d70 6f6e 656e 7420 7472 6565 206f component tree o │ │ │ -00015930: 6620 7468 6520 696d 6167 6520 6973 2065 f the image is e │ │ │ -00015940: 7874 7261 6374 6564 2062 7920 6120 7468 xtracted by a th │ │ │ -00015950: 7265 7368 6f6c 6420 696e 6372 6561 7365 reshold increase │ │ │ -00015960: 6420 7374 6570 2062 7920 7374 6570 2066 d step by step f │ │ │ -00015970: 726f 6d20 3020 746f 2032 3535 2c0a 2069 rom 0 to 255,. i │ │ │ -00015980: 6e63 7265 6d65 6e74 616c 6c79 2063 6f6d ncrementally com │ │ │ -00015990: 7075 7461 626c 6520 6465 7363 7269 7074 putable descript │ │ │ -000159a0: 6f72 7320 2861 7370 6563 745f 7261 7469 ors (aspect_rati │ │ │ -000159b0: 6f2c 2063 6f6d 7061 6374 6e65 7373 2c20 o, compactness, │ │ │ -000159c0: 6e75 6d62 6572 206f 6620 686f 6c65 732c number of holes, │ │ │ -000159d0: 2061 6e64 206e 756d 6265 7220 6f66 0a20 and number of. │ │ │ -000159e0: 686f 7269 7a6f 6e74 616c 2063 726f 7373 horizontal cross │ │ │ -000159f0: 696e 6773 2920 6172 6520 636f 6d70 7574 ings) are comput │ │ │ -00015a00: 6564 2066 6f72 2065 6163 6820 4552 2061 ed for each ER a │ │ │ -00015a10: 6e64 2075 7365 6420 6173 2066 6561 7475 nd used as featu │ │ │ -00015a20: 7265 7320 666f 7220 6120 636c 6173 7369 res for a classi │ │ │ -00015a30: 6669 6572 2077 6869 6368 2065 7374 696d fier which estim │ │ │ -00015a40: 6174 6573 0a20 7468 6520 636c 6173 732d ates. the class- │ │ │ -00015a50: 636f 6e64 6974 696f 6e61 6c20 7072 6f62 conditional prob │ │ │ -00015a60: 6162 696c 6974 7920 5028 6572 7c63 6861 ability P(er|cha │ │ │ -00015a70: 7261 6374 6572 292e 2054 6865 2076 616c racter). The val │ │ │ -00015a80: 7565 206f 6620 5028 6572 7c63 6861 7261 ue of P(er|chara │ │ │ -00015a90: 6374 6572 2920 6973 2074 7261 636b 6564 cter) is tracked │ │ │ -00015aa0: 2075 7369 6e67 2074 6865 0a20 696e 636c using the. incl │ │ │ -00015ab0: 7573 696f 6e20 7265 6c61 7469 6f6e 206f usion relation o │ │ │ -00015ac0: 6620 4552 2061 6372 6f73 7320 616c 6c20 f ER across all │ │ │ -00015ad0: 7468 7265 7368 6f6c 6473 2061 6e64 206f thresholds and o │ │ │ -00015ae0: 6e6c 7920 7468 6520 4552 7320 7768 6963 nly the ERs whic │ │ │ -00015af0: 6820 636f 7272 6573 706f 6e64 2074 6f20 h correspond to │ │ │ -00015b00: 6c6f 6361 6c20 6d61 7869 6d75 6d20 6f66 local maximum of │ │ │ -00015b10: 0a20 7468 6520 7072 6f62 6162 696c 6974 . the probabilit │ │ │ -00015b20: 7920 5028 6572 7c63 6861 7261 6374 6572 y P(er|character │ │ │ -00015b30: 2920 6172 6520 7365 6c65 6374 6564 2028 ) are selected ( │ │ │ -00015b40: 6966 2074 6865 206c 6f63 616c 206d 6178 if the local max │ │ │ -00015b50: 696d 756d 206f 6620 7468 6520 7072 6f62 imum of the prob │ │ │ -00015b60: 6162 696c 6974 7920 6973 2061 626f 7665 ability is above │ │ │ -00015b70: 2061 0a20 676c 6f62 616c 206c 696d 6974 a. global limit │ │ │ -00015b80: 2070 6d69 6e20 616e 6420 7468 6520 6469 pmin and the di │ │ │ -00015b90: 6666 6572 656e 6365 2062 6574 7765 656e fference between │ │ │ -00015ba0: 206c 6f63 616c 206d 6178 696d 756d 2061 local maximum a │ │ │ -00015bb0: 6e64 206c 6f63 616c 206d 696e 696d 756d nd local minimum │ │ │ -00015bc0: 2069 7320 6772 6561 7465 7220 7468 616e is greater than │ │ │ -00015bd0: 0a20 6d69 6e50 726f 6261 6269 6c69 7479 . minProbability │ │ │ -00015be0: 4469 6666 292e 3c2f 6469 763e 0a3c 646c Diff).
      .
      . │ │ │ -00015c00: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
      Parameters:< │ │ │ -00015c10: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e63 /dt>.
      c │ │ │ -00015c20: 623c 2f63 6f64 653e 202d 2061 7574 6f6d b - autom │ │ │ -00015c30: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -00015c40: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
      .
      thresholdDelta │ │ │ -00015c60: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ -00015c70: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -00015c80: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d
      .
      minArea │ │ │ -00015ca0: 2d20 6175 746f 6d61 7469 6361 6c6c 7920 - automatically │ │ │ -00015cb0: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated
      .< │ │ │ -00015cc0: 6474 3e52 6574 7572 6e73 3a3c 2f64 743e dt>Returns: │ │ │ -00015cd0: 0a3c 6464 3e61 7574 6f6d 6174 6963 616c .
      automatical │ │ │ -00015ce0: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
      .
      ...
    • ..

      createE │ │ │ -00015d70: 5246 696c 7465 724e 4d31 3c2f 6833 3e0a RFilterNM1

      . │ │ │ -00015d80: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
      public sta │ │ │ -00015dc0: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ -00015dd0: 3c73 7061 6e20 636c 6173 733d 2272 6574 ERFilter< │ │ │ -00015e30: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> createERF │ │ │ -00015e60: 696c 7465 724e 4d31 3c2f 7370 616e 3e3c ilterNM1< │ │ │ -00015e70: 7762 723e 3c73 7061 6e20 636c 6173 733d wbr>( │ │ │ -00015ed0: 4552 4669 6c74 6572 5f43 616c 6c62 6163 ERFilter_Callbac │ │ │ -00015ee0: 6b3c 2f61 3e26 6e62 7370 3b63 622c 0a20 k cb,. │ │ │ -00015ef0: 696e 7426 6e62 7370 3b74 6872 6573 686f int thresho │ │ │ -00015f00: 6c64 4465 6c74 6129 3c2f 7370 616e 3e3c ldDelta)< │ │ │ -00015f10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      Create │ │ │ -00015f30: 616e 2045 7874 7265 6d61 6c20 5265 6769 an Extremal Regi │ │ │ -00015f40: 6f6e 2046 696c 7465 7220 666f 7220 7468 on Filter for th │ │ │ -00015f50: 6520 3173 7420 7374 6167 6520 636c 6173 e 1st stage clas │ │ │ -00015f60: 7369 6669 6572 206f 6620 4e26 616d 703b sifier of N& │ │ │ -00015f70: 4d20 616c 676f 7269 7468 6d20 4349 5445 M algorithm CITE │ │ │ -00015f80: 3a20 4e65 756d 616e 6e31 322e 0a0a 206c : Neumann12... l │ │ │ -00015f90: 6f61 6443 6c61 7373 6966 6965 724e 4d31 oadClassifierNM1 │ │ │ -00015fa0: 2c20 652e 672e 2066 726f 6d20 6669 6c65 , e.g. from file │ │ │ -00015fb0: 2069 6e20 7361 6d70 6c65 732f 6370 702f in samples/cpp/ │ │ │ -00015fc0: 7472 6169 6e65 645f 636c 6173 7369 6669 trained_classifi │ │ │ -00015fd0: 6572 4e4d 312e 786d 6c0a 0a20 5468 6520 erNM1.xml.. The │ │ │ -00015fe0: 636f 6d70 6f6e 656e 7420 7472 6565 206f component tree o │ │ │ -00015ff0: 6620 7468 6520 696d 6167 6520 6973 2065 f the image is e │ │ │ -00016000: 7874 7261 6374 6564 2062 7920 6120 7468 xtracted by a th │ │ │ -00016010: 7265 7368 6f6c 6420 696e 6372 6561 7365 reshold increase │ │ │ -00016020: 6420 7374 6570 2062 7920 7374 6570 2066 d step by step f │ │ │ -00016030: 726f 6d20 3020 746f 2032 3535 2c0a 2069 rom 0 to 255,. i │ │ │ -00016040: 6e63 7265 6d65 6e74 616c 6c79 2063 6f6d ncrementally com │ │ │ -00016050: 7075 7461 626c 6520 6465 7363 7269 7074 putable descript │ │ │ -00016060: 6f72 7320 2861 7370 6563 745f 7261 7469 ors (aspect_rati │ │ │ -00016070: 6f2c 2063 6f6d 7061 6374 6e65 7373 2c20 o, compactness, │ │ │ -00016080: 6e75 6d62 6572 206f 6620 686f 6c65 732c number of holes, │ │ │ -00016090: 2061 6e64 206e 756d 6265 7220 6f66 0a20 and number of. │ │ │ -000160a0: 686f 7269 7a6f 6e74 616c 2063 726f 7373 horizontal cross │ │ │ -000160b0: 696e 6773 2920 6172 6520 636f 6d70 7574 ings) are comput │ │ │ -000160c0: 6564 2066 6f72 2065 6163 6820 4552 2061 ed for each ER a │ │ │ -000160d0: 6e64 2075 7365 6420 6173 2066 6561 7475 nd used as featu │ │ │ -000160e0: 7265 7320 666f 7220 6120 636c 6173 7369 res for a classi │ │ │ -000160f0: 6669 6572 2077 6869 6368 2065 7374 696d fier which estim │ │ │ -00016100: 6174 6573 0a20 7468 6520 636c 6173 732d ates. the class- │ │ │ -00016110: 636f 6e64 6974 696f 6e61 6c20 7072 6f62 conditional prob │ │ │ -00016120: 6162 696c 6974 7920 5028 6572 7c63 6861 ability P(er|cha │ │ │ -00016130: 7261 6374 6572 292e 2054 6865 2076 616c racter). The val │ │ │ -00016140: 7565 206f 6620 5028 6572 7c63 6861 7261 ue of P(er|chara │ │ │ -00016150: 6374 6572 2920 6973 2074 7261 636b 6564 cter) is tracked │ │ │ -00016160: 2075 7369 6e67 2074 6865 0a20 696e 636c using the. incl │ │ │ -00016170: 7573 696f 6e20 7265 6c61 7469 6f6e 206f usion relation o │ │ │ -00016180: 6620 4552 2061 6372 6f73 7320 616c 6c20 f ER across all │ │ │ -00016190: 7468 7265 7368 6f6c 6473 2061 6e64 206f thresholds and o │ │ │ -000161a0: 6e6c 7920 7468 6520 4552 7320 7768 6963 nly the ERs whic │ │ │ -000161b0: 6820 636f 7272 6573 706f 6e64 2074 6f20 h correspond to │ │ │ -000161c0: 6c6f 6361 6c20 6d61 7869 6d75 6d20 6f66 local maximum of │ │ │ -000161d0: 0a20 7468 6520 7072 6f62 6162 696c 6974 . the probabilit │ │ │ -000161e0: 7920 5028 6572 7c63 6861 7261 6374 6572 y P(er|character │ │ │ -000161f0: 2920 6172 6520 7365 6c65 6374 6564 2028 ) are selected ( │ │ │ -00016200: 6966 2074 6865 206c 6f63 616c 206d 6178 if the local max │ │ │ -00016210: 696d 756d 206f 6620 7468 6520 7072 6f62 imum of the prob │ │ │ -00016220: 6162 696c 6974 7920 6973 2061 626f 7665 ability is above │ │ │ -00016230: 2061 0a20 676c 6f62 616c 206c 696d 6974 a. global limit │ │ │ -00016240: 2070 6d69 6e20 616e 6420 7468 6520 6469 pmin and the di │ │ │ -00016250: 6666 6572 656e 6365 2062 6574 7765 656e fference between │ │ │ -00016260: 206c 6f63 616c 206d 6178 696d 756d 2061 local maximum a │ │ │ -00016270: 6e64 206c 6f63 616c 206d 696e 696d 756d nd local minimum │ │ │ -00016280: 2069 7320 6772 6561 7465 7220 7468 616e is greater than │ │ │ -00016290: 0a20 6d69 6e50 726f 6261 6269 6c69 7479 . minProbability │ │ │ -000162a0: 4469 6666 292e 3c2f 6469 763e 0a3c 646c Diff).
      .
      . │ │ │ -000162c0: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
      Parameters:< │ │ │ -000162d0: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e63 /dt>.
      c │ │ │ -000162e0: 623c 2f63 6f64 653e 202d 2061 7574 6f6d b - autom │ │ │ -000162f0: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -00016300: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
      .
      thresholdDelta │ │ │ -00016320: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ -00016330: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -00016340: 643c 2f64 643e 0a3c 6474 3e52 6574 7572 d
      .
      Retur │ │ │ -00016350: 6e73 3a3c 2f64 743e 0a3c 6464 3e61 7574 ns:
      .
      aut │ │ │ -00016360: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ -00016370: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
      .
      . │ │ │ -00016380: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e
    • . │ │ │ -00016390: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
    • .
      .

      cre │ │ │ -000163f0: 6174 6545 5246 696c 7465 724e 4d31 3c2f ateERFilterNM1.
      public │ │ │ -00016440: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ -00016450: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;ERFilter< │ │ │ -000164b0: 2f61 3e3c 2f73 7061 6e3e 266e 6273 703b /a>  │ │ │ -000164c0: 3c73 7061 6e20 636c 6173 733d 2265 6c65 creat │ │ │ -000164e0: 6545 5246 696c 7465 724e 4d31 3c2f 7370 eERFilterNM1(ERFilter_Cal │ │ │ -00016560: 6c62 6163 6b3c 2f61 3e26 6e62 7370 3b63 lback c │ │ │ -00016570: 6229 3c2f 7370 616e 3e3c 2f64 6976 3e0a b)
      . │ │ │ -00016580: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
      Create an Ext │ │ │ -000165a0: 7265 6d61 6c20 5265 6769 6f6e 2046 696c remal Region Fil │ │ │ -000165b0: 7465 7220 666f 7220 7468 6520 3173 7420 ter for the 1st │ │ │ -000165c0: 7374 6167 6520 636c 6173 7369 6669 6572 stage classifier │ │ │ -000165d0: 206f 6620 4e26 616d 703b 4d20 616c 676f of N&M algo │ │ │ -000165e0: 7269 7468 6d20 4349 5445 3a20 4e65 756d rithm CITE: Neum │ │ │ -000165f0: 616e 6e31 322e 0a0a 206c 6f61 6443 6c61 ann12... loadCla │ │ │ -00016600: 7373 6966 6965 724e 4d31 2c20 652e 672e ssifierNM1, e.g. │ │ │ -00016610: 2066 726f 6d20 6669 6c65 2069 6e20 7361 from file in sa │ │ │ -00016620: 6d70 6c65 732f 6370 702f 7472 6169 6e65 mples/cpp/traine │ │ │ -00016630: 645f 636c 6173 7369 6669 6572 4e4d 312e d_classifierNM1. │ │ │ -00016640: 786d 6c0a 0a20 5468 6520 636f 6d70 6f6e xml.. The compon │ │ │ -00016650: 656e 7420 7472 6565 206f 6620 7468 6520 ent tree of the │ │ │ -00016660: 696d 6167 6520 6973 2065 7874 7261 6374 image is extract │ │ │ -00016670: 6564 2062 7920 6120 7468 7265 7368 6f6c ed by a threshol │ │ │ -00016680: 6420 696e 6372 6561 7365 6420 7374 6570 d increased step │ │ │ -00016690: 2062 7920 7374 6570 2066 726f 6d20 3020 by step from 0 │ │ │ -000166a0: 746f 2032 3535 2c0a 2069 6e63 7265 6d65 to 255,. increme │ │ │ -000166b0: 6e74 616c 6c79 2063 6f6d 7075 7461 626c ntally computabl │ │ │ -000166c0: 6520 6465 7363 7269 7074 6f72 7320 2861 e descriptors (a │ │ │ -000166d0: 7370 6563 745f 7261 7469 6f2c 2063 6f6d spect_ratio, com │ │ │ -000166e0: 7061 6374 6e65 7373 2c20 6e75 6d62 6572 pactness, number │ │ │ -000166f0: 206f 6620 686f 6c65 732c 2061 6e64 206e of holes, and n │ │ │ -00016700: 756d 6265 7220 6f66 0a20 686f 7269 7a6f umber of. horizo │ │ │ -00016710: 6e74 616c 2063 726f 7373 696e 6773 2920 ntal crossings) │ │ │ -00016720: 6172 6520 636f 6d70 7574 6564 2066 6f72 are computed for │ │ │ -00016730: 2065 6163 6820 4552 2061 6e64 2075 7365 each ER and use │ │ │ -00016740: 6420 6173 2066 6561 7475 7265 7320 666f d as features fo │ │ │ -00016750: 7220 6120 636c 6173 7369 6669 6572 2077 r a classifier w │ │ │ -00016760: 6869 6368 2065 7374 696d 6174 6573 0a20 hich estimates. │ │ │ -00016770: 7468 6520 636c 6173 732d 636f 6e64 6974 the class-condit │ │ │ -00016780: 696f 6e61 6c20 7072 6f62 6162 696c 6974 ional probabilit │ │ │ -00016790: 7920 5028 6572 7c63 6861 7261 6374 6572 y P(er|character │ │ │ -000167a0: 292e 2054 6865 2076 616c 7565 206f 6620 ). The value of │ │ │ -000167b0: 5028 6572 7c63 6861 7261 6374 6572 2920 P(er|character) │ │ │ -000167c0: 6973 2074 7261 636b 6564 2075 7369 6e67 is tracked using │ │ │ -000167d0: 2074 6865 0a20 696e 636c 7573 696f 6e20 the. inclusion │ │ │ -000167e0: 7265 6c61 7469 6f6e 206f 6620 4552 2061 relation of ER a │ │ │ -000167f0: 6372 6f73 7320 616c 6c20 7468 7265 7368 cross all thresh │ │ │ -00016800: 6f6c 6473 2061 6e64 206f 6e6c 7920 7468 olds and only th │ │ │ -00016810: 6520 4552 7320 7768 6963 6820 636f 7272 e ERs which corr │ │ │ -00016820: 6573 706f 6e64 2074 6f20 6c6f 6361 6c20 espond to local │ │ │ -00016830: 6d61 7869 6d75 6d20 6f66 0a20 7468 6520 maximum of. the │ │ │ -00016840: 7072 6f62 6162 696c 6974 7920 5028 6572 probability P(er │ │ │ -00016850: 7c63 6861 7261 6374 6572 2920 6172 6520 |character) are │ │ │ -00016860: 7365 6c65 6374 6564 2028 6966 2074 6865 selected (if the │ │ │ -00016870: 206c 6f63 616c 206d 6178 696d 756d 206f local maximum o │ │ │ -00016880: 6620 7468 6520 7072 6f62 6162 696c 6974 f the probabilit │ │ │ -00016890: 7920 6973 2061 626f 7665 2061 0a20 676c y is above a. gl │ │ │ -000168a0: 6f62 616c 206c 696d 6974 2070 6d69 6e20 obal limit pmin │ │ │ -000168b0: 616e 6420 7468 6520 6469 6666 6572 656e and the differen │ │ │ -000168c0: 6365 2062 6574 7765 656e 206c 6f63 616c ce between local │ │ │ -000168d0: 206d 6178 696d 756d 2061 6e64 206c 6f63 maximum and loc │ │ │ -000168e0: 616c 206d 696e 696d 756d 2069 7320 6772 al minimum is gr │ │ │ -000168f0: 6561 7465 7220 7468 616e 0a20 6d69 6e50 eater than. minP │ │ │ -00016900: 726f 6261 6269 6c69 7479 4469 6666 292e robabilityDiff). │ │ │ -00016910: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
      .
      .
      Pa │ │ │ -00016930: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
      .< │ │ │ -00016940: 6464 3e3c 636f 6465 3e63 623c 2f63 6f64 dd>cb - automatical │ │ │ -00016960: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated.
      Returns:.
      automati │ │ │ -00016990: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -000169a0: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.
      ..

    • .
    • │ │ │ -000169c0: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
      .

      cr │ │ │ -00016a20: 6561 7465 4552 4669 6c74 6572 4e4d 323c eateERFilterNM2< │ │ │ -00016a30: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
      publi │ │ │ -00016a70: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ -00016a80: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;< │ │ │ -00016aa0: 6120 6872 6566 3d22 4552 4669 6c74 6572 a href="ERFilter │ │ │ -00016ab0: 2e68 746d 6c22 2074 6974 6c65 3d22 636c .html" title="cl │ │ │ -00016ac0: 6173 7320 696e 206f 7267 2e6f 7065 6e63 ass in org.openc │ │ │ -00016ad0: 762e 7465 7874 223e 4552 4669 6c74 6572 v.text">ERFilter │ │ │ -00016ae0: 3c2f 613e 3c2f 7370 616e 3e26 6e62 7370   │ │ │ -00016af0: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;crea │ │ │ -00016b10: 7465 4552 4669 6c74 6572 4e4d 323c 2f73 teERFilterNM2(ERFilter_Ca │ │ │ -00016b90: 6c6c 6261 636b 3c2f 613e 266e 6273 703b llback  │ │ │ -00016ba0: 6362 2c0a 2066 6c6f 6174 266e 6273 703b cb,. float  │ │ │ -00016bb0: 6d69 6e50 726f 6261 6269 6c69 7479 293c minProbability)< │ │ │ -00016bc0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      . │ │ │ -00016be0: 4372 6561 7465 2061 6e20 4578 7472 656d Create an Extrem │ │ │ -00016bf0: 616c 2052 6567 696f 6e20 4669 6c74 6572 al Region Filter │ │ │ -00016c00: 2066 6f72 2074 6865 2032 6e64 2073 7461 for the 2nd sta │ │ │ -00016c10: 6765 2063 6c61 7373 6966 6965 7220 6f66 ge classifier of │ │ │ -00016c20: 204e 2661 6d70 3b4d 2061 6c67 6f72 6974 N&M algorit │ │ │ -00016c30: 686d 2043 4954 453a 204e 6575 6d61 6e6e hm CITE: Neumann │ │ │ -00016c40: 3132 2e0a 0a20 6c6f 6164 436c 6173 7369 12... loadClassi │ │ │ -00016c50: 6669 6572 4e4d 322c 2065 2e67 2e20 6672 fierNM2, e.g. fr │ │ │ -00016c60: 6f6d 2066 696c 6520 696e 2073 616d 706c om file in sampl │ │ │ -00016c70: 6573 2f63 7070 2f74 7261 696e 6564 5f63 es/cpp/trained_c │ │ │ -00016c80: 6c61 7373 6966 6965 724e 4d32 2e78 6d6c lassifierNM2.xml │ │ │ -00016c90: 0a0a 2049 6e20 7468 6520 7365 636f 6e64 .. In the second │ │ │ -00016ca0: 2073 7461 6765 2c20 7468 6520 4552 7320 stage, the ERs │ │ │ -00016cb0: 7468 6174 2070 6173 7365 6420 7468 6520 that passed the │ │ │ -00016cc0: 6669 7273 7420 7374 6167 6520 6172 6520 first stage are │ │ │ -00016cd0: 636c 6173 7369 6669 6564 2069 6e74 6f20 classified into │ │ │ -00016ce0: 6368 6172 6163 7465 7220 616e 640a 206e character and. n │ │ │ -00016cf0: 6f6e 2d63 6861 7261 6374 6572 2063 6c61 on-character cla │ │ │ -00016d00: 7373 6573 2075 7369 6e67 206d 6f72 6520 sses using more │ │ │ -00016d10: 696e 666f 726d 6174 6976 6520 6275 7420 informative but │ │ │ -00016d20: 616c 736f 206d 6f72 6520 636f 6d70 7574 also more comput │ │ │ -00016d30: 6174 696f 6e61 6c6c 7920 6578 7065 6e73 ationally expens │ │ │ -00016d40: 6976 6520 6665 6174 7572 6573 2e20 5468 ive features. Th │ │ │ -00016d50: 650a 2063 6c61 7373 6966 6965 7220 7573 e. classifier us │ │ │ -00016d60: 6573 2061 6c6c 2074 6865 2066 6561 7475 es all the featu │ │ │ -00016d70: 7265 7320 6361 6c63 756c 6174 6564 2069 res calculated i │ │ │ -00016d80: 6e20 7468 6520 6669 7273 7420 7374 6167 n the first stag │ │ │ -00016d90: 6520 616e 6420 7468 6520 666f 6c6c 6f77 e and the follow │ │ │ -00016da0: 696e 6720 6164 6469 7469 6f6e 616c 0a20 ing additional. │ │ │ -00016db0: 6665 6174 7572 6573 3a20 686f 6c65 2061 features: hole a │ │ │ -00016dc0: 7265 6120 7261 7469 6f2c 2063 6f6e 7665 rea ratio, conve │ │ │ -00016dd0: 7820 6875 6c6c 2072 6174 696f 2c20 616e x hull ratio, an │ │ │ -00016de0: 6420 6e75 6d62 6572 206f 6620 6f75 7465 d number of oute │ │ │ -00016df0: 7220 696e 666c 6578 696f 6e20 706f 696e r inflexion poin │ │ │ -00016e00: 7473 2e3c 2f64 6976 3e0a 3c64 6c20 636c ts..
      .
      Parameters:
      .
      cb - automati │ │ │ -00016e50: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -00016e60: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e6d /dd>.
      m │ │ │ -00016e70: 696e 5072 6f62 6162 696c 6974 793c 2f63 inProbability - automatic │ │ │ -00016e90: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      Returns: │ │ │ -00016eb0: 3c2f 6474 3e0a 3c64 643e 6175 746f 6d61
      .
      automa │ │ │ -00016ec0: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -00016ed0: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
      .
      .
      .

    • ..
      .

      create │ │ │ -00016f50: 4552 4669 6c74 6572 4e4d 323c 2f68 333e ERFilterNM2

      │ │ │ -00016f60: 0a3c 6469 7620 636c 6173 733d 226d 656d .
      < │ │ │ -00016f80: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ -00016f90: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ -00016fa0: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ -00016fb0: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;ERFilter │ │ │ -00017010: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  createER │ │ │ -00017040: 4669 6c74 6572 4e4d 323c 2f73 7061 6e3e FilterNM2 │ │ │ -00017050: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ -00017070: 6120 6872 6566 3d22 4552 4669 6c74 6572 a href="ERFilter │ │ │ -00017080: 5f43 616c 6c62 6163 6b2e 6874 6d6c 2220 _Callback.html" │ │ │ -00017090: 7469 746c 653d 2263 6c61 7373 2069 6e20 title="class in │ │ │ -000170a0: 6f72 672e 6f70 656e 6376 2e74 6578 7422 org.opencv.text" │ │ │ -000170b0: 3e45 5246 696c 7465 725f 4361 6c6c 6261 >ERFilter_Callba │ │ │ -000170c0: 636b 3c2f 613e 266e 6273 703b 6362 293c ck cb)< │ │ │ -000170d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      . │ │ │ -000170f0: 4372 6561 7465 2061 6e20 4578 7472 656d Create an Extrem │ │ │ -00017100: 616c 2052 6567 696f 6e20 4669 6c74 6572 al Region Filter │ │ │ -00017110: 2066 6f72 2074 6865 2032 6e64 2073 7461 for the 2nd sta │ │ │ -00017120: 6765 2063 6c61 7373 6966 6965 7220 6f66 ge classifier of │ │ │ -00017130: 204e 2661 6d70 3b4d 2061 6c67 6f72 6974 N&M algorit │ │ │ -00017140: 686d 2043 4954 453a 204e 6575 6d61 6e6e hm CITE: Neumann │ │ │ -00017150: 3132 2e0a 0a20 6c6f 6164 436c 6173 7369 12... loadClassi │ │ │ -00017160: 6669 6572 4e4d 322c 2065 2e67 2e20 6672 fierNM2, e.g. fr │ │ │ -00017170: 6f6d 2066 696c 6520 696e 2073 616d 706c om file in sampl │ │ │ -00017180: 6573 2f63 7070 2f74 7261 696e 6564 5f63 es/cpp/trained_c │ │ │ -00017190: 6c61 7373 6966 6965 724e 4d32 2e78 6d6c lassifierNM2.xml │ │ │ -000171a0: 0a0a 2049 6e20 7468 6520 7365 636f 6e64 .. In the second │ │ │ -000171b0: 2073 7461 6765 2c20 7468 6520 4552 7320 stage, the ERs │ │ │ -000171c0: 7468 6174 2070 6173 7365 6420 7468 6520 that passed the │ │ │ -000171d0: 6669 7273 7420 7374 6167 6520 6172 6520 first stage are │ │ │ -000171e0: 636c 6173 7369 6669 6564 2069 6e74 6f20 classified into │ │ │ -000171f0: 6368 6172 6163 7465 7220 616e 640a 206e character and. n │ │ │ -00017200: 6f6e 2d63 6861 7261 6374 6572 2063 6c61 on-character cla │ │ │ -00017210: 7373 6573 2075 7369 6e67 206d 6f72 6520 sses using more │ │ │ -00017220: 696e 666f 726d 6174 6976 6520 6275 7420 informative but │ │ │ -00017230: 616c 736f 206d 6f72 6520 636f 6d70 7574 also more comput │ │ │ -00017240: 6174 696f 6e61 6c6c 7920 6578 7065 6e73 ationally expens │ │ │ -00017250: 6976 6520 6665 6174 7572 6573 2e20 5468 ive features. Th │ │ │ -00017260: 650a 2063 6c61 7373 6966 6965 7220 7573 e. classifier us │ │ │ -00017270: 6573 2061 6c6c 2074 6865 2066 6561 7475 es all the featu │ │ │ -00017280: 7265 7320 6361 6c63 756c 6174 6564 2069 res calculated i │ │ │ -00017290: 6e20 7468 6520 6669 7273 7420 7374 6167 n the first stag │ │ │ -000172a0: 6520 616e 6420 7468 6520 666f 6c6c 6f77 e and the follow │ │ │ -000172b0: 696e 6720 6164 6469 7469 6f6e 616c 0a20 ing additional. │ │ │ -000172c0: 6665 6174 7572 6573 3a20 686f 6c65 2061 features: hole a │ │ │ -000172d0: 7265 6120 7261 7469 6f2c 2063 6f6e 7665 rea ratio, conve │ │ │ -000172e0: 7820 6875 6c6c 2072 6174 696f 2c20 616e x hull ratio, an │ │ │ -000172f0: 6420 6e75 6d62 6572 206f 6620 6f75 7465 d number of oute │ │ │ -00017300: 7220 696e 666c 6578 696f 6e20 706f 696e r inflexion poin │ │ │ -00017310: 7473 2e3c 2f64 6976 3e0a 3c64 6c20 636c ts..
      .
      Parameters:
      .
      cb - automati │ │ │ -00017360: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -00017370: 2f64 643e 0a3c 6474 3e52 6574 7572 6e73 /dd>.
      Returns │ │ │ -00017380: 3a3c 2f64 743e 0a3c 6464 3e61 7574 6f6d :
      .
      autom │ │ │ -00017390: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -000173a0: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
      .
      ...< │ │ │ -000173c0: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
      .

      cr │ │ │ -00017430: 6561 7465 4552 4669 6c74 6572 4e4d 313c eateERFilterNM1< │ │ │ -00017440: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
      publi │ │ │ -00017480: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ -00017490: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;< │ │ │ -000174b0: 6120 6872 6566 3d22 4552 4669 6c74 6572 a href="ERFilter │ │ │ -000174c0: 2e68 746d 6c22 2074 6974 6c65 3d22 636c .html" title="cl │ │ │ -000174d0: 6173 7320 696e 206f 7267 2e6f 7065 6e63 ass in org.openc │ │ │ -000174e0: 762e 7465 7874 223e 4552 4669 6c74 6572 v.text">ERFilter │ │ │ -000174f0: 3c2f 613e 3c2f 7370 616e 3e26 6e62 7370   │ │ │ -00017500: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;crea │ │ │ -00017520: 7465 4552 4669 6c74 6572 4e4d 313c 2f73 teERFilterNM1(String │ │ │ -00017600: 266e 6273 703b 6669 6c65 6e61 6d65 2c0a  filename,. │ │ │ -00017610: 2069 6e74 266e 6273 703b 7468 7265 7368 int thresh │ │ │ -00017620: 6f6c 6444 656c 7461 2c0a 2066 6c6f 6174 oldDelta,. float │ │ │ -00017630: 266e 6273 703b 6d69 6e41 7265 612c 0a20  minArea,. │ │ │ -00017640: 666c 6f61 7426 6e62 7370 3b6d 6178 4172 float maxAr │ │ │ -00017650: 6561 2c0a 2066 6c6f 6174 266e 6273 703b ea,. float  │ │ │ -00017660: 6d69 6e50 726f 6261 6269 6c69 7479 2c0a minProbability,. │ │ │ -00017670: 2062 6f6f 6c65 616e 266e 6273 703b 6e6f boolean no │ │ │ -00017680: 6e4d 6178 5375 7070 7265 7373 696f 6e2c nMaxSuppression, │ │ │ -00017690: 0a20 666c 6f61 7426 6e62 7370 3b6d 696e . float min │ │ │ -000176a0: 5072 6f62 6162 696c 6974 7944 6966 6629 ProbabilityDiff) │ │ │ -000176b0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .Reads an Extrem │ │ │ -000176e0: 616c 2052 6567 696f 6e20 4669 6c74 6572 al Region Filter │ │ │ -000176f0: 2066 6f72 2074 6865 2031 7374 2073 7461 for the 1st sta │ │ │ -00017700: 6765 2063 6c61 7373 6966 6965 7220 6f66 ge classifier of │ │ │ -00017710: 204e 2661 6d70 3b4d 2061 6c67 6f72 6974 N&M algorit │ │ │ -00017720: 686d 0a20 2020 2020 6672 6f6d 2074 6865 hm. from the │ │ │ -00017730: 2070 726f 7669 6465 6420 7061 7468 2065 provided path e │ │ │ -00017740: 2e67 2e20 2f70 6174 682f 746f 2f63 7070 .g. /path/to/cpp │ │ │ -00017750: 2f74 7261 696e 6564 5f63 6c61 7373 6966 /trained_classif │ │ │ -00017760: 6965 724e 4d31 2e78 6d6c 3c2f 6469 763e ierNM1.xml │ │ │ -00017770: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
      .
      Paramete │ │ │ -00017790: 7273 3a3c 2f64 743e 0a3c 6464 3e3c 636f rs:
      .
      filename - automatical │ │ │ -000177c0: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
      .
      thre │ │ │ -000177e0: 7368 6f6c 6444 656c 7461 3c2f 636f 6465 sholdDelta - automaticall │ │ │ -00017800: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
      │ │ │ -00017810: 0a3c 6464 3e3c 636f 6465 3e6d 696e 4172 .
      minAr │ │ │ -00017820: 6561 3c2f 636f 6465 3e20 2d20 6175 746f ea - auto │ │ │ -00017830: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ -00017840: 7465 643c 2f64 643e 0a3c 6464 3e3c 636f ted
      .
      maxArea - automaticall │ │ │ -00017870: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
      │ │ │ -00017880: 0a3c 6464 3e3c 636f 6465 3e6d 696e 5072 .
      minPr │ │ │ -00017890: 6f62 6162 696c 6974 793c 2f63 6f64 653e obability │ │ │ -000178a0: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ -000178b0: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
      . │ │ │ -000178c0: 3c64 643e 3c63 6f64 653e 6e6f 6e4d 6178
      nonMax │ │ │ -000178d0: 5375 7070 7265 7373 696f 6e3c 2f63 6f64 Suppression - automatical │ │ │ -000178f0: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
      .
      minP │ │ │ -00017910: 726f 6261 6269 6c69 7479 4469 6666 3c2f robabilityDiff - automati │ │ │ -00017930: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -00017940: 2f64 643e 0a3c 6474 3e52 6574 7572 6e73 /dd>.
      Returns │ │ │ -00017950: 3a3c 2f64 743e 0a3c 6464 3e61 7574 6f6d :
      .
      autom │ │ │ -00017960: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -00017970: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
      .
      ...< │ │ │ -00017990: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
      .

      createER │ │ │ -00017a00: 4669 6c74 6572 4e4d 313c 2f68 333e 0a3c FilterNM1

      .< │ │ │ -00017a10: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ -00017a20: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ -00017a50: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ -00017a60: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ -00017a70: 726e 2d74 7970 6522 3e3c 6120 6872 6566 rn-type">ERFilter createERFi │ │ │ -00017af0: 6c74 6572 4e4d 313c 2f73 7061 6e3e 3c77 lterNM1( │ │ │ -00017bc0: 5374 7269 6e67 3c2f 613e 266e 6273 703b String  │ │ │ -00017bd0: 6669 6c65 6e61 6d65 2c0a 2069 6e74 266e filename,. int&n │ │ │ -00017be0: 6273 703b 7468 7265 7368 6f6c 6444 656c bsp;thresholdDel │ │ │ -00017bf0: 7461 2c0a 2066 6c6f 6174 266e 6273 703b ta,. float  │ │ │ -00017c00: 6d69 6e41 7265 612c 0a20 666c 6f61 7426 minArea,. float& │ │ │ -00017c10: 6e62 7370 3b6d 6178 4172 6561 2c0a 2066 nbsp;maxArea,. f │ │ │ -00017c20: 6c6f 6174 266e 6273 703b 6d69 6e50 726f loat minPro │ │ │ -00017c30: 6261 6269 6c69 7479 2c0a 2062 6f6f 6c65 bability,. boole │ │ │ -00017c40: 616e 266e 6273 703b 6e6f 6e4d 6178 5375 an nonMaxSu │ │ │ -00017c50: 7070 7265 7373 696f 6e29 3c2f 7370 616e ppression).
      Reads │ │ │ -00017c80: 2061 6e20 4578 7472 656d 616c 2052 6567 an Extremal Reg │ │ │ -00017c90: 696f 6e20 4669 6c74 6572 2066 6f72 2074 ion Filter for t │ │ │ -00017ca0: 6865 2031 7374 2073 7461 6765 2063 6c61 he 1st stage cla │ │ │ -00017cb0: 7373 6966 6965 7220 6f66 204e 2661 6d70 ssifier of N& │ │ │ -00017cc0: 3b4d 2061 6c67 6f72 6974 686d 0a20 2020 ;M algorithm. │ │ │ -00017cd0: 2020 6672 6f6d 2074 6865 2070 726f 7669 from the provi │ │ │ -00017ce0: 6465 6420 7061 7468 2065 2e67 2e20 2f70 ded path e.g. /p │ │ │ -00017cf0: 6174 682f 746f 2f63 7070 2f74 7261 696e ath/to/cpp/train │ │ │ -00017d00: 6564 5f63 6c61 7373 6966 6965 724e 4d31 ed_classifierNM1 │ │ │ -00017d10: 2e78 6d6c 3c2f 6469 763e 0a3c 646c 2063 .xml
      .
      .Parameters:.
      fil │ │ │ -00017d50: 656e 616d 653c 2f63 6f64 653e 202d 2061 ename - a │ │ │ -00017d60: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ -00017d70: 6572 6174 6564 3c2f 6464 3e0a 3c64 643e erated
      .
      │ │ │ -00017d80: 3c63 6f64 653e 7468 7265 7368 6f6c 6444 thresholdD │ │ │ -00017d90: 656c 7461 3c2f 636f 6465 3e20 2d20 6175 elta - au │ │ │ -00017da0: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -00017db0: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated
      .
      < │ │ │ -00017dc0: 636f 6465 3e6d 696e 4172 6561 3c2f 636f code>minArea - automatica │ │ │ -00017de0: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
      max │ │ │ -00017e00: 4172 6561 3c2f 636f 6465 3e20 2d20 6175 Area - au │ │ │ -00017e10: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -00017e20: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated
      .
      < │ │ │ -00017e30: 636f 6465 3e6d 696e 5072 6f62 6162 696c code>minProbabil │ │ │ -00017e40: 6974 793c 2f63 6f64 653e 202d 2061 7574 ity - aut │ │ │ -00017e50: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ -00017e60: 6174 6564 3c2f 6464 3e0a 3c64 643e 3c63 ated
      .
      nonMaxSuppre │ │ │ -00017e80: 7373 696f 6e3c 2f63 6f64 653e 202d 2061 ssion - a │ │ │ -00017e90: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ -00017ea0: 6572 6174 6564 3c2f 6464 3e0a 3c64 743e erated
      .
      │ │ │ -00017eb0: 5265 7475 726e 733a 3c2f 6474 3e0a 3c64 Returns:
      .automatically │ │ │ -00017ed0: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated.< │ │ │ -00017ee0: 2f64 6c3e 0a3c 2f73 6563 7469 6f6e 3e0a /dl>.
      . │ │ │ -00017ef0: 3c2f 6c69 3e0a 3c6c 693e 0a3c 7365 6374 .
    • ..

      createERF │ │ │ -00017f60: 696c 7465 724e 4d31 3c2f 6833 3e0a 3c64 ilterNM1

      .public stati │ │ │ -00017fb0: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c ERFilter createERFil │ │ │ -00018050: 7465 724e 4d31 3c2f 7370 616e 3e3c 7762 terNM1(S │ │ │ -00018120: 7472 696e 673c 2f61 3e26 6e62 7370 3b66 tring f │ │ │ -00018130: 696c 656e 616d 652c 0a20 696e 7426 6e62 ilename,. int&nb │ │ │ -00018140: 7370 3b74 6872 6573 686f 6c64 4465 6c74 sp;thresholdDelt │ │ │ -00018150: 612c 0a20 666c 6f61 7426 6e62 7370 3b6d a,. float m │ │ │ -00018160: 696e 4172 6561 2c0a 2066 6c6f 6174 266e inArea,. float&n │ │ │ -00018170: 6273 703b 6d61 7841 7265 612c 0a20 666c bsp;maxArea,. fl │ │ │ -00018180: 6f61 7426 6e62 7370 3b6d 696e 5072 6f62 oat minProb │ │ │ -00018190: 6162 696c 6974 7929 3c2f 7370 616e 3e3c ability)< │ │ │ -000181a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      Reads a │ │ │ -000181c0: 6e20 4578 7472 656d 616c 2052 6567 696f n Extremal Regio │ │ │ -000181d0: 6e20 4669 6c74 6572 2066 6f72 2074 6865 n Filter for the │ │ │ -000181e0: 2031 7374 2073 7461 6765 2063 6c61 7373 1st stage class │ │ │ -000181f0: 6966 6965 7220 6f66 204e 2661 6d70 3b4d ifier of N&M │ │ │ -00018200: 2061 6c67 6f72 6974 686d 0a20 2020 2020 algorithm. │ │ │ -00018210: 6672 6f6d 2074 6865 2070 726f 7669 6465 from the provide │ │ │ -00018220: 6420 7061 7468 2065 2e67 2e20 2f70 6174 d path e.g. /pat │ │ │ -00018230: 682f 746f 2f63 7070 2f74 7261 696e 6564 h/to/cpp/trained │ │ │ -00018240: 5f63 6c61 7373 6966 6965 724e 4d31 2e78 _classifierNM1.x │ │ │ -00018250: 6d6c 3c2f 6469 763e 0a3c 646c 2063 6c61 ml
      .
      .
      │ │ │ -00018270: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
      │ │ │ -00018280: 0a3c 6464 3e3c 636f 6465 3e66 696c 656e .
      filen │ │ │ -00018290: 616d 653c 2f63 6f64 653e 202d 2061 7574 ame - aut │ │ │ -000182a0: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ -000182b0: 6174 6564 3c2f 6464 3e0a 3c64 643e 3c63 ated
      .
      thresholdDel │ │ │ -000182d0: 7461 3c2f 636f 6465 3e20 2d20 6175 746f ta - auto │ │ │ -000182e0: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ -000182f0: 7465 643c 2f64 643e 0a3c 6464 3e3c 636f ted
      .
      minArea - automaticall │ │ │ -00018320: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
      │ │ │ -00018330: 0a3c 6464 3e3c 636f 6465 3e6d 6178 4172 .
      maxAr │ │ │ -00018340: 6561 3c2f 636f 6465 3e20 2d20 6175 746f ea - auto │ │ │ -00018350: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ -00018360: 7465 643c 2f64 643e 0a3c 6464 3e3c 636f ted
      .
      minProbabilit │ │ │ -00018380: 793c 2f63 6f64 653e 202d 2061 7574 6f6d y - autom │ │ │ -00018390: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -000183a0: 6564 3c2f 6464 3e0a 3c64 743e 5265 7475 ed
      .
      Retu │ │ │ -000183b0: 726e 733a 3c2f 6474 3e0a 3c64 643e 6175 rns:
      .
      au │ │ │ -000183c0: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -000183d0: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
      .
      │ │ │ -000183e0: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .
    • ..
    • .
      .

      cre │ │ │ -00018450: 6174 6545 5246 696c 7465 724e 4d31 3c2f ateERFilterNM1.
      public │ │ │ -000184a0: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ -000184b0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;ERFilter< │ │ │ -00018510: 2f61 3e3c 2f73 7061 6e3e 266e 6273 703b /a>  │ │ │ -00018520: 3c73 7061 6e20 636c 6173 733d 2265 6c65 creat │ │ │ -00018540: 6545 5246 696c 7465 724e 4d31 3c2f 7370 eERFilterNM1(String& │ │ │ -00018620: 6e62 7370 3b66 696c 656e 616d 652c 0a20 nbsp;filename,. │ │ │ -00018630: 696e 7426 6e62 7370 3b74 6872 6573 686f int thresho │ │ │ -00018640: 6c64 4465 6c74 612c 0a20 666c 6f61 7426 ldDelta,. float& │ │ │ -00018650: 6e62 7370 3b6d 696e 4172 6561 2c0a 2066 nbsp;minArea,. f │ │ │ -00018660: 6c6f 6174 266e 6273 703b 6d61 7841 7265 loat maxAre │ │ │ -00018670: 6129 3c2f 7370 616e 3e3c 2f64 6976 3e0a a)
      . │ │ │ -00018680: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
      Reads an Extr │ │ │ -000186a0: 656d 616c 2052 6567 696f 6e20 4669 6c74 emal Region Filt │ │ │ -000186b0: 6572 2066 6f72 2074 6865 2031 7374 2073 er for the 1st s │ │ │ -000186c0: 7461 6765 2063 6c61 7373 6966 6965 7220 tage classifier │ │ │ -000186d0: 6f66 204e 2661 6d70 3b4d 2061 6c67 6f72 of N&M algor │ │ │ -000186e0: 6974 686d 0a20 2020 2020 6672 6f6d 2074 ithm. from t │ │ │ -000186f0: 6865 2070 726f 7669 6465 6420 7061 7468 he provided path │ │ │ -00018700: 2065 2e67 2e20 2f70 6174 682f 746f 2f63 e.g. /path/to/c │ │ │ -00018710: 7070 2f74 7261 696e 6564 5f63 6c61 7373 pp/trained_class │ │ │ -00018720: 6966 6965 724e 4d31 2e78 6d6c 3c2f 6469 ifierNM1.xml.
      .
      Parame │ │ │ -00018750: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
      .
      < │ │ │ -00018760: 636f 6465 3e66 696c 656e 616d 653c 2f63 code>filename - automatic │ │ │ -00018780: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      th │ │ │ -000187a0: 7265 7368 6f6c 6444 656c 7461 3c2f 636f resholdDelta - automatica │ │ │ -000187c0: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
      min │ │ │ -000187e0: 4172 6561 3c2f 636f 6465 3e20 2d20 6175 Area - au │ │ │ -000187f0: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -00018800: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated
      .
      < │ │ │ -00018810: 636f 6465 3e6d 6178 4172 6561 3c2f 636f code>maxArea - automatica │ │ │ -00018830: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
      Returns:< │ │ │ -00018850: 2f64 743e 0a3c 6464 3e61 7574 6f6d 6174 /dt>.
      automat │ │ │ -00018860: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ -00018870: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365
      .
      ..

    • .
    • .
      .createERFilter │ │ │ -000188f0: 4e4d 313c 2f68 333e 0a3c 6469 7620 636c NM1.
      p │ │ │ -00018930: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static ERFi │ │ │ -000189a0: 6c74 6572 3c2f 613e 3c2f 7370 616e 3e26 lter& │ │ │ -000189b0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ -000189d0: 6372 6561 7465 4552 4669 6c74 6572 4e4d createERFilterNM │ │ │ -000189e0: 313c 2f73 7061 6e3e 3c77 6272 3e3c 7370 1(String │ │ │ -00018ab0: 3c2f 613e 266e 6273 703b 6669 6c65 6e61  filena │ │ │ -00018ac0: 6d65 2c0a 2069 6e74 266e 6273 703b 7468 me,. int th │ │ │ -00018ad0: 7265 7368 6f6c 6444 656c 7461 2c0a 2066 resholdDelta,. f │ │ │ -00018ae0: 6c6f 6174 266e 6273 703b 6d69 6e41 7265 loat minAre │ │ │ -00018af0: 6129 3c2f 7370 616e 3e3c 2f64 6976 3e0a a)
      . │ │ │ -00018b00: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
      Reads an Extr │ │ │ -00018b20: 656d 616c 2052 6567 696f 6e20 4669 6c74 emal Region Filt │ │ │ -00018b30: 6572 2066 6f72 2074 6865 2031 7374 2073 er for the 1st s │ │ │ -00018b40: 7461 6765 2063 6c61 7373 6966 6965 7220 tage classifier │ │ │ -00018b50: 6f66 204e 2661 6d70 3b4d 2061 6c67 6f72 of N&M algor │ │ │ -00018b60: 6974 686d 0a20 2020 2020 6672 6f6d 2074 ithm. from t │ │ │ -00018b70: 6865 2070 726f 7669 6465 6420 7061 7468 he provided path │ │ │ -00018b80: 2065 2e67 2e20 2f70 6174 682f 746f 2f63 e.g. /path/to/c │ │ │ -00018b90: 7070 2f74 7261 696e 6564 5f63 6c61 7373 pp/trained_class │ │ │ -00018ba0: 6966 6965 724e 4d31 2e78 6d6c 3c2f 6469 ifierNM1.xml.
      .
      Parame │ │ │ -00018bd0: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
      .
      < │ │ │ -00018be0: 636f 6465 3e66 696c 656e 616d 653c 2f63 code>filename - automatic │ │ │ -00018c00: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      th │ │ │ -00018c20: 7265 7368 6f6c 6444 656c 7461 3c2f 636f resholdDelta - automatica │ │ │ -00018c40: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
      min │ │ │ -00018c60: 4172 6561 3c2f 636f 6465 3e20 2d20 6175 Area - au │ │ │ -00018c70: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -00018c80: 7261 7465 643c 2f64 643e 0a3c 6474 3e52 rated
      .
      R │ │ │ -00018c90: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
      .
      automatically g │ │ │ -00018cb0: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
      ..
      .< │ │ │ -00018cd0: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
    • .. │ │ │ -00018d20: 3c68 333e 6372 6561 7465 4552 4669 6c74

      createERFilt │ │ │ -00018d30: 6572 4e4d 313c 2f68 333e 0a3c 6469 7620 erNM1

      .
      public static ER │ │ │ -00018de0: 4669 6c74 6572 3c2f 613e 3c2f 7370 616e Filter createERFilter │ │ │ -00018e20: 4e4d 313c 2f73 7061 6e3e 3c77 6272 3e3c NM1< │ │ │ -00018e30: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ -00018e40: 6d65 7465 7273 223e 283c 6120 6872 6566 meters">(Stri │ │ │ -00018ef0: 6e67 3c2f 613e 266e 6273 703b 6669 6c65 ng file │ │ │ -00018f00: 6e61 6d65 2c0a 2069 6e74 266e 6273 703b name,. int  │ │ │ -00018f10: 7468 7265 7368 6f6c 6444 656c 7461 293c thresholdDelta)< │ │ │ -00018f20: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      . │ │ │ -00018f40: 5265 6164 7320 616e 2045 7874 7265 6d61 Reads an Extrema │ │ │ -00018f50: 6c20 5265 6769 6f6e 2046 696c 7465 7220 l Region Filter │ │ │ -00018f60: 666f 7220 7468 6520 3173 7420 7374 6167 for the 1st stag │ │ │ -00018f70: 6520 636c 6173 7369 6669 6572 206f 6620 e classifier of │ │ │ -00018f80: 4e26 616d 703b 4d20 616c 676f 7269 7468 N&M algorith │ │ │ -00018f90: 6d0a 2020 2020 2066 726f 6d20 7468 6520 m. from the │ │ │ -00018fa0: 7072 6f76 6964 6564 2070 6174 6820 652e provided path e. │ │ │ -00018fb0: 672e 202f 7061 7468 2f74 6f2f 6370 702f g. /path/to/cpp/ │ │ │ -00018fc0: 7472 6169 6e65 645f 636c 6173 7369 6669 trained_classifi │ │ │ -00018fd0: 6572 4e4d 312e 786d 6c3c 2f64 6976 3e0a erNM1.xml. │ │ │ -00018fe0: 3c64 6c20 636c 6173 733d 226e 6f74 6573
      .
      Parameter │ │ │ -00019000: 733a 3c2f 6474 3e0a 3c64 643e 3c63 6f64 s:
      .
      filename - automaticall │ │ │ -00019030: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
      │ │ │ -00019040: 0a3c 6464 3e3c 636f 6465 3e74 6872 6573 .
      thres │ │ │ -00019050: 686f 6c64 4465 6c74 613c 2f63 6f64 653e holdDelta │ │ │ -00019060: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ -00019070: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
      . │ │ │ -00019080: 3c64 743e 5265 7475 726e 733a 3c2f 6474
      Returns:
      .
      automatica │ │ │ -000190a0: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
      ..
    • .
    • .< │ │ │ -000190d0: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ -000190e0: 6574 6169 6c22 2069 643d 2263 7265 6174 etail" id="creat │ │ │ -000190f0: 6545 5246 696c 7465 724e 4d31 286a 6176 eERFilterNM1(jav │ │ │ -00019100: 612e 6c61 6e67 2e53 7472 696e 6729 223e a.lang.String)"> │ │ │ -00019110: 0a3c 6833 3e63 7265 6174 6545 5246 696c .

      createERFil │ │ │ -00019120: 7465 724e 4d31 3c2f 6833 3e0a 3c64 6976 terNM1

      .
      public static< │ │ │ -00019170: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> E │ │ │ -000191d0: 5246 696c 7465 723c 2f61 3e3c 2f73 7061 RFilter createERFilte │ │ │ -00019210: 724e 4d31 3c2f 7370 616e 3e3c 7762 723e rNM1 │ │ │ -00019220: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Str │ │ │ -000192e0: 696e 673c 2f61 3e26 6e62 7370 3b66 696c ing fil │ │ │ -000192f0: 656e 616d 6529 3c2f 7370 616e 3e3c 2f64 ename).
      Reads an │ │ │ -00019320: 4578 7472 656d 616c 2052 6567 696f 6e20 Extremal Region │ │ │ -00019330: 4669 6c74 6572 2066 6f72 2074 6865 2031 Filter for the 1 │ │ │ -00019340: 7374 2073 7461 6765 2063 6c61 7373 6966 st stage classif │ │ │ -00019350: 6965 7220 6f66 204e 2661 6d70 3b4d 2061 ier of N&M a │ │ │ -00019360: 6c67 6f72 6974 686d 0a20 2020 2020 6672 lgorithm. fr │ │ │ -00019370: 6f6d 2074 6865 2070 726f 7669 6465 6420 om the provided │ │ │ -00019380: 7061 7468 2065 2e67 2e20 2f70 6174 682f path e.g. /path/ │ │ │ -00019390: 746f 2f63 7070 2f74 7261 696e 6564 5f63 to/cpp/trained_c │ │ │ -000193a0: 6c61 7373 6966 6965 724e 4d31 2e78 6d6c lassifierNM1.xml │ │ │ -000193b0: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
      .
      .
      Pa │ │ │ -000193d0: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
      .< │ │ │ -000193e0: 6464 3e3c 636f 6465 3e66 696c 656e 616d dd>filenam │ │ │ -000193f0: 653c 2f63 6f64 653e 202d 2061 7574 6f6d e - autom │ │ │ -00019400: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -00019410: 6564 3c2f 6464 3e0a 3c64 743e 5265 7475 ed.
      Retu │ │ │ -00019420: 726e 733a 3c2f 6474 3e0a 3c64 643e 6175 rns:
      .
      au │ │ │ -00019430: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -00019440: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
      .
      │ │ │ -00019450: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .
    • ..
    • .
      .< │ │ │ -000194b0: 6833 3e63 7265 6174 6545 5246 696c 7465 h3>createERFilte │ │ │ -000194c0: 724e 4d32 3c2f 6833 3e0a 3c64 6976 2063 rNM2.
      │ │ │ -00019500: 7075 626c 6963 2073 7461 7469 633c 2f73 public static ERF │ │ │ -00019570: 696c 7465 723c 2f61 3e3c 2f73 7061 6e3e ilter │ │ │ -00019580: 266e 6273 703b 3c73 7061 6e20 636c 6173  createERFilterN │ │ │ -000195b0: 4d32 3c2f 7370 616e 3e3c 7762 723e 3c73 M2(Strin │ │ │ -00019680: 673c 2f61 3e26 6e62 7370 3b66 696c 656e g filen │ │ │ -00019690: 616d 652c 0a20 666c 6f61 7426 6e62 7370 ame,. float  │ │ │ -000196a0: 3b6d 696e 5072 6f62 6162 696c 6974 7929 ;minProbability) │ │ │ -000196b0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .Reads an Extrem │ │ │ -000196e0: 616c 2052 6567 696f 6e20 4669 6c74 6572 al Region Filter │ │ │ -000196f0: 2066 6f72 2074 6865 2032 6e64 2073 7461 for the 2nd sta │ │ │ -00019700: 6765 2063 6c61 7373 6966 6965 7220 6f66 ge classifier of │ │ │ -00019710: 204e 2661 6d70 3b4d 2061 6c67 6f72 6974 N&M algorit │ │ │ -00019720: 686d 0a20 2020 2020 6672 6f6d 2074 6865 hm. from the │ │ │ -00019730: 2070 726f 7669 6465 6420 7061 7468 2065 provided path e │ │ │ -00019740: 2e67 2e20 2f70 6174 682f 746f 2f63 7070 .g. /path/to/cpp │ │ │ -00019750: 2f74 7261 696e 6564 5f63 6c61 7373 6966 /trained_classif │ │ │ -00019760: 6965 724e 4d32 2e78 6d6c 3c2f 6469 763e ierNM2.xml │ │ │ -00019770: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
      .
      Paramete │ │ │ -00019790: 7273 3a3c 2f64 743e 0a3c 6464 3e3c 636f rs:
      .
      filename - automatical │ │ │ -000197c0: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
      .
      minP │ │ │ -000197e0: 726f 6261 6269 6c69 7479 3c2f 636f 6465 robability - automaticall │ │ │ -00019800: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
      │ │ │ -00019810: 0a3c 6474 3e52 6574 7572 6e73 3a3c 2f64 .
      Returns:.
      automatic │ │ │ -00019830: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      ..
    • .
    • . │ │ │ -00019860: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
      .

      createERFi │ │ │ -000198b0: 6c74 6572 4e4d 323c 2f68 333e 0a3c 6469 lterNM2

      .public static │ │ │ -00019900: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370   │ │ │ -00019960: 4552 4669 6c74 6572 3c2f 613e 3c2f 7370 ERFilter createERFilt │ │ │ -000199a0: 6572 4e4d 323c 2f73 7061 6e3e 3c77 6272 erNM2(St │ │ │ -00019a70: 7269 6e67 3c2f 613e 266e 6273 703b 6669 ring fi │ │ │ -00019a80: 6c65 6e61 6d65 293c 2f73 7061 6e3e 3c2f lename).
      Reads an │ │ │ -00019ab0: 2045 7874 7265 6d61 6c20 5265 6769 6f6e Extremal Region │ │ │ -00019ac0: 2046 696c 7465 7220 666f 7220 7468 6520 Filter for the │ │ │ -00019ad0: 326e 6420 7374 6167 6520 636c 6173 7369 2nd stage classi │ │ │ -00019ae0: 6669 6572 206f 6620 4e26 616d 703b 4d20 fier of N&M │ │ │ -00019af0: 616c 676f 7269 7468 6d0a 2020 2020 2066 algorithm. f │ │ │ -00019b00: 726f 6d20 7468 6520 7072 6f76 6964 6564 rom the provided │ │ │ -00019b10: 2070 6174 6820 652e 672e 202f 7061 7468 path e.g. /path │ │ │ -00019b20: 2f74 6f2f 6370 702f 7472 6169 6e65 645f /to/cpp/trained_ │ │ │ -00019b30: 636c 6173 7369 6669 6572 4e4d 322e 786d classifierNM2.xm │ │ │ -00019b40: 6c3c 2f64 6976 3e0a 3c64 6c20 636c 6173 l
      .
      .
      P │ │ │ -00019b60: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
      . │ │ │ -00019b70: 3c64 643e 3c63 6f64 653e 6669 6c65 6e61
      filena │ │ │ -00019b80: 6d65 3c2f 636f 6465 3e20 2d20 6175 746f me - auto │ │ │ -00019b90: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ -00019ba0: 7465 643c 2f64 643e 0a3c 6474 3e52 6574 ted
      .
      Ret │ │ │ -00019bb0: 7572 6e73 3a3c 2f64 743e 0a3c 6464 3e61 urns:
      .
      a │ │ │ -00019bc0: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ -00019bd0: 6572 6174 6564 3c2f 6464 3e0a 3c2f 646c erated
      .
      .
      ..
    • .
      .

      lo │ │ │ -00019c40: 6164 436c 6173 7369 6669 6572 4e4d 313c adClassifierNM1< │ │ │ -00019c50: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
      publi │ │ │ -00019c90: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ -00019ca0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;< │ │ │ -00019cc0: 6120 6872 6566 3d22 4552 4669 6c74 6572 a href="ERFilter │ │ │ -00019cd0: 5f43 616c 6c62 6163 6b2e 6874 6d6c 2220 _Callback.html" │ │ │ -00019ce0: 7469 746c 653d 2263 6c61 7373 2069 6e20 title="class in │ │ │ -00019cf0: 6f72 672e 6f70 656e 6376 2e74 6578 7422 org.opencv.text" │ │ │ -00019d00: 3e45 5246 696c 7465 725f 4361 6c6c 6261 >ERFilter_Callba │ │ │ -00019d10: 636b 3c2f 613e 3c2f 7370 616e 3e26 6e62 ck&nb │ │ │ -00019d20: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;lo │ │ │ -00019d40: 6164 436c 6173 7369 6669 6572 4e4d 313c adClassifierNM1< │ │ │ -00019d50: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(String filename │ │ │ -00019e30: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
      .< │ │ │ -00019e40: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ -00019e50: 223e 416c 6c6f 7720 746f 2069 6d70 6c69 ">Allow to impli │ │ │ -00019e60: 6369 746c 7920 6c6f 6164 2074 6865 2064 citly load the d │ │ │ -00019e70: 6566 6175 6c74 2063 6c61 7373 6966 6965 efault classifie │ │ │ -00019e80: 7220 7768 656e 2063 7265 6174 696e 6720 r when creating │ │ │ -00019e90: 616e 2045 5246 696c 7465 7220 6f62 6a65 an ERFilter obje │ │ │ -00019ea0: 6374 2e3c 2f64 6976 3e0a 3c64 6c20 636c ct..
      .
      Parameters:
      .
      file │ │ │ -00019ee0: 6e61 6d65 3c2f 636f 6465 3e20 2d20 5468 name - Th │ │ │ -00019ef0: 6520 584d 4c20 6f72 2059 414d 4c20 6669 e XML or YAML fi │ │ │ -00019f00: 6c65 2077 6974 6820 7468 6520 636c 6173 le with the clas │ │ │ -00019f10: 7369 6669 6572 206d 6f64 656c 2028 652e sifier model (e. │ │ │ -00019f20: 672e 2074 7261 696e 6564 5f63 6c61 7373 g. trained_class │ │ │ -00019f30: 6966 6965 724e 4d31 2e78 6d6c 290a 0a20 ifierNM1.xml).. │ │ │ -00019f40: 7265 7475 726e 7320 6120 706f 696e 7465 returns a pointe │ │ │ -00019f50: 7220 746f 2045 5246 696c 7465 723a 3a43 r to ERFilter::C │ │ │ -00019f60: 616c 6c62 6163 6b2e 3c2f 6464 3e0a 3c64 allback.
      .Returns:. │ │ │ -00019f80: 3c64 643e 6175 746f 6d61 7469 6361 6c6c
      automaticall │ │ │ -00019f90: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
      │ │ │ -00019fa0: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
      .

      .
    • .
    • ..< │ │ │ -0001a000: 6833 3e6c 6f61 6443 6c61 7373 6966 6965 h3>loadClassifie │ │ │ -0001a010: 724e 4d32 3c2f 6833 3e0a 3c64 6976 2063 rNM2.
      │ │ │ -0001a050: 7075 626c 6963 2073 7461 7469 633c 2f73 public static ERFilter_C │ │ │ -0001a0d0: 616c 6c62 6163 6b3c 2f61 3e3c 2f73 7061 allback loadClassifie │ │ │ -0001a110: 724e 4d32 3c2f 7370 616e 3e3c 7762 723e rNM2 │ │ │ -0001a120: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Str │ │ │ -0001a1e0: 696e 673c 2f61 3e26 6e62 7370 3b66 696c ing fil │ │ │ -0001a1f0: 656e 616d 6529 3c2f 7370 616e 3e3c 2f64 ename).
      Allow to │ │ │ -0001a220: 696d 706c 6963 6974 6c79 206c 6f61 6420 implicitly load │ │ │ -0001a230: 7468 6520 6465 6661 756c 7420 636c 6173 the default clas │ │ │ -0001a240: 7369 6669 6572 2077 6865 6e20 6372 6561 sifier when crea │ │ │ -0001a250: 7469 6e67 2061 6e20 4552 4669 6c74 6572 ting an ERFilter │ │ │ -0001a260: 206f 626a 6563 742e 3c2f 6469 763e 0a3c object.
      .< │ │ │ -0001a270: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ -0001a280: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
      Parameters │ │ │ -0001a290: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
      .
      filename │ │ │ -0001a2b0: 202d 2054 6865 2058 4d4c 206f 7220 5941 - The XML or YA │ │ │ -0001a2c0: 4d4c 2066 696c 6520 7769 7468 2074 6865 ML file with the │ │ │ -0001a2d0: 2063 6c61 7373 6966 6965 7220 6d6f 6465 classifier mode │ │ │ -0001a2e0: 6c20 2865 2e67 2e20 7472 6169 6e65 645f l (e.g. trained_ │ │ │ -0001a2f0: 636c 6173 7369 6669 6572 4e4d 322e 786d classifierNM2.xm │ │ │ -0001a300: 6c29 0a0a 2072 6574 7572 6e73 2061 2070 l).. returns a p │ │ │ -0001a310: 6f69 6e74 6572 2074 6f20 4552 4669 6c74 ointer to ERFilt │ │ │ -0001a320: 6572 3a3a 4361 6c6c 6261 636b 2e3c 2f64 er::Callback..
      Returns:< │ │ │ -0001a340: 2f64 743e 0a3c 6464 3e61 7574 6f6d 6174 /dt>.
      automat │ │ │ -0001a350: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ -0001a360: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365
      ...
    • .
    • .
      .

      co │ │ │ -0001a3e0: 6d70 7574 654e 4d43 6861 6e6e 656c 733c mputeNMChannels< │ │ │ -0001a3f0: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
      publi │ │ │ -0001a430: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ -0001a440: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;v │ │ │ -0001a460: 6f69 643c 2f73 7061 6e3e 266e 6273 703b oid  │ │ │ -0001a470: 3c73 7061 6e20 636c 6173 733d 2265 6c65 compu │ │ │ -0001a490: 7465 4e4d 4368 616e 6e65 6c73 3c2f 7370 teNMChannels(Ma │ │ │ -0001a500: 743c 2f61 3e26 6e62 7370 3b5f 7372 632c t _src, │ │ │ -0001a510: 0a20 3c61 2068 7265 663d 2268 7474 7073 . List<< │ │ │ -0001a5c0: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -0001a5d0: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -0001a5e0: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -0001a5f0: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat> _cha │ │ │ -0001a610: 6e6e 656c 732c 0a20 696e 7426 6e62 7370 nnels,. int  │ │ │ -0001a620: 3b5f 6d6f 6465 293c 2f73 7061 6e3e 3c2f ;_mode).
      Compute │ │ │ -0001a650: 7468 6520 6469 6666 6572 656e 7420 6368 the different ch │ │ │ -0001a660: 616e 6e65 6c73 2074 6f20 6265 2070 726f annels to be pro │ │ │ -0001a670: 6365 7373 6564 2069 6e64 6570 656e 6465 cessed independe │ │ │ -0001a680: 6e74 6c79 2069 6e20 7468 6520 4e26 616d ntly in the N&am │ │ │ -0001a690: 703b 4d20 616c 676f 7269 7468 6d20 4349 p;M algorithm CI │ │ │ -0001a6a0: 5445 3a20 4e65 756d 616e 6e31 322e 3c2f TE: Neumann12..
      .
      Para │ │ │ -0001a6d0: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
      .
      _src - Source imag │ │ │ -0001a700: 652e 204d 7573 7420 6265 2052 4742 2043 e. Must be RGB C │ │ │ -0001a710: 565f 3855 4333 2e3c 2f64 643e 0a3c 6464 V_8UC3.
      .
      _channels │ │ │ -0001a730: 3c2f 636f 6465 3e20 2d20 4f75 7470 7574 - Output │ │ │ -0001a740: 2076 6563 746f 7226 6c74 3b4d 6174 2667 vector<Mat&g │ │ │ -0001a750: 743b 2077 6865 7265 2063 6f6d 7075 7465 t; where compute │ │ │ -0001a760: 6420 6368 616e 6e65 6c73 2061 7265 2073 d channels are s │ │ │ -0001a770: 746f 7265 642e 3c2f 6464 3e0a 3c64 643e tored.
      .
      │ │ │ -0001a780: 3c63 6f64 653e 5f6d 6f64 653c 2f63 6f64 _mode - Mode of ope │ │ │ -0001a7a0: 7261 7469 6f6e 2e20 4375 7272 656e 746c ration. Currentl │ │ │ -0001a7b0: 7920 7468 6520 6f6e 6c79 2061 7661 696c y the only avail │ │ │ -0001a7c0: 6162 6c65 206f 7074 696f 6e73 2061 7265 able options are │ │ │ -0001a7d0: 3a0a 203c 623e 4552 4649 4c54 4552 5f4e :. ERFILTER_N │ │ │ -0001a7e0: 4d5f 5247 424c 4772 6164 3c2f 623e 2028 M_RGBLGrad ( │ │ │ -0001a7f0: 7573 6564 2062 7920 6465 6661 756c 7429 used by default) │ │ │ -0001a800: 2061 6e64 203c 623e 4552 4649 4c54 4552 and ERFILTER │ │ │ -0001a810: 5f4e 4d5f 4948 5347 7261 643c 2f62 3e2e _NM_IHSGrad. │ │ │ -0001a820: 0a0a 2049 6e20 4e26 616d 703b 4d20 616c .. In N&M al │ │ │ -0001a830: 676f 7269 7468 6d2c 2074 6865 2063 6f6d gorithm, the com │ │ │ -0001a840: 6269 6e61 7469 6f6e 206f 6620 696e 7465 bination of inte │ │ │ -0001a850: 6e73 6974 7920 2849 292c 2068 7565 2028 nsity (I), hue ( │ │ │ -0001a860: 4829 2c20 7361 7475 7261 7469 6f6e 2028 H), saturation ( │ │ │ -0001a870: 5329 2c20 616e 6420 6772 6164 6965 6e74 S), and gradient │ │ │ -0001a880: 206d 6167 6e69 7475 6465 0a20 6368 616e magnitude. chan │ │ │ -0001a890: 6e65 6c73 2028 4772 6164 2920 6172 6520 nels (Grad) are │ │ │ -0001a8a0: 7573 6564 2069 6e20 6f72 6465 7220 746f used in order to │ │ │ -0001a8b0: 206f 6274 6169 6e20 6869 6768 206c 6f63 obtain high loc │ │ │ -0001a8c0: 616c 697a 6174 696f 6e20 7265 6361 6c6c alization recall │ │ │ -0001a8d0: 2e20 5468 6973 2069 6d70 6c65 6d65 6e74 . This implement │ │ │ -0001a8e0: 6174 696f 6e20 616c 736f 0a20 7072 6f76 ation also. prov │ │ │ -0001a8f0: 6964 6573 2061 6e20 616c 7465 726e 6174 ides an alternat │ │ │ -0001a900: 6976 6520 636f 6d62 696e 6174 696f 6e20 ive combination │ │ │ -0001a910: 6f66 2072 6564 2028 5229 2c20 6772 6565 of red (R), gree │ │ │ -0001a920: 6e20 2847 292c 2062 6c75 6520 2842 292c n (G), blue (B), │ │ │ -0001a930: 206c 6967 6874 6e65 7373 2028 4c29 2c20 lightness (L), │ │ │ -0001a940: 616e 6420 6772 6164 6965 6e74 0a20 6d61 and gradient. ma │ │ │ -0001a950: 676e 6974 7564 6520 2847 7261 6429 2e3c gnitude (Grad).< │ │ │ -0001a960: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.
      ..

    • .
    • │ │ │ -0001a980: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
      .

      compute │ │ │ -0001a9e0: 4e4d 4368 616e 6e65 6c73 3c2f 6833 3e0a NMChannels

      . │ │ │ -0001a9f0: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
      public sta │ │ │ -0001aa30: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ -0001aa40: 3c73 7061 6e20 636c 6173 733d 2272 6574 void computeNMC │ │ │ -0001aa90: 6861 6e6e 656c 733c 2f73 7061 6e3e 3c77 hannels(Mat │ │ │ -0001ab00: 266e 6273 703b 5f73 7263 2c0a 203c 6120  _src,. Li │ │ │ -0001abb0: 7374 3c2f 613e 266c 743b 3c61 2068 7265 st<Mat> │ │ │ -0001ac00: 3b26 6e62 7370 3b5f 6368 616e 6e65 6c73 ; _channels │ │ │ -0001ac10: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
      .< │ │ │ -0001ac20: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ -0001ac30: 223e 436f 6d70 7574 6520 7468 6520 6469 ">Compute the di │ │ │ -0001ac40: 6666 6572 656e 7420 6368 616e 6e65 6c73 fferent channels │ │ │ -0001ac50: 2074 6f20 6265 2070 726f 6365 7373 6564 to be processed │ │ │ -0001ac60: 2069 6e64 6570 656e 6465 6e74 6c79 2069 independently i │ │ │ -0001ac70: 6e20 7468 6520 4e26 616d 703b 4d20 616c n the N&M al │ │ │ -0001ac80: 676f 7269 7468 6d20 4349 5445 3a20 4e65 gorithm CITE: Ne │ │ │ -0001ac90: 756d 616e 6e31 322e 3c2f 6469 763e 0a3c umann12..< │ │ │ -0001aca0: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ -0001acb0: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
      Parameters │ │ │ -0001acc0: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
      .
      _src - S │ │ │ -0001ace0: 6f75 7263 6520 696d 6167 652e 204d 7573 ource image. Mus │ │ │ -0001acf0: 7420 6265 2052 4742 2043 565f 3855 4333 t be RGB CV_8UC3 │ │ │ -0001ad00: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
      .
      _channels - Output vecto │ │ │ -0001ad30: 7226 6c74 3b4d 6174 2667 743b 2077 6865 r<Mat> whe │ │ │ -0001ad40: 7265 2063 6f6d 7075 7465 6420 6368 616e re computed chan │ │ │ -0001ad50: 6e65 6c73 2061 7265 2073 746f 7265 642e nels are stored. │ │ │ -0001ad60: 0a0a 203c 623e 4552 4649 4c54 4552 5f4e .. ERFILTER_N │ │ │ -0001ad70: 4d5f 5247 424c 4772 6164 3c2f 623e 2028 M_RGBLGrad ( │ │ │ -0001ad80: 7573 6564 2062 7920 6465 6661 756c 7429 used by default) │ │ │ -0001ad90: 2061 6e64 203c 623e 4552 4649 4c54 4552 and ERFILTER │ │ │ -0001ada0: 5f4e 4d5f 4948 5347 7261 643c 2f62 3e2e _NM_IHSGrad. │ │ │ -0001adb0: 0a0a 2049 6e20 4e26 616d 703b 4d20 616c .. In N&M al │ │ │ -0001adc0: 676f 7269 7468 6d2c 2074 6865 2063 6f6d gorithm, the com │ │ │ -0001add0: 6269 6e61 7469 6f6e 206f 6620 696e 7465 bination of inte │ │ │ -0001ade0: 6e73 6974 7920 2849 292c 2068 7565 2028 nsity (I), hue ( │ │ │ -0001adf0: 4829 2c20 7361 7475 7261 7469 6f6e 2028 H), saturation ( │ │ │ -0001ae00: 5329 2c20 616e 6420 6772 6164 6965 6e74 S), and gradient │ │ │ -0001ae10: 206d 6167 6e69 7475 6465 0a20 6368 616e magnitude. chan │ │ │ -0001ae20: 6e65 6c73 2028 4772 6164 2920 6172 6520 nels (Grad) are │ │ │ -0001ae30: 7573 6564 2069 6e20 6f72 6465 7220 746f used in order to │ │ │ -0001ae40: 206f 6274 6169 6e20 6869 6768 206c 6f63 obtain high loc │ │ │ -0001ae50: 616c 697a 6174 696f 6e20 7265 6361 6c6c alization recall │ │ │ -0001ae60: 2e20 5468 6973 2069 6d70 6c65 6d65 6e74 . This implement │ │ │ -0001ae70: 6174 696f 6e20 616c 736f 0a20 7072 6f76 ation also. prov │ │ │ -0001ae80: 6964 6573 2061 6e20 616c 7465 726e 6174 ides an alternat │ │ │ -0001ae90: 6976 6520 636f 6d62 696e 6174 696f 6e20 ive combination │ │ │ -0001aea0: 6f66 2072 6564 2028 5229 2c20 6772 6565 of red (R), gree │ │ │ -0001aeb0: 6e20 2847 292c 2062 6c75 6520 2842 292c n (G), blue (B), │ │ │ -0001aec0: 206c 6967 6874 6e65 7373 2028 4c29 2c20 lightness (L), │ │ │ -0001aed0: 616e 6420 6772 6164 6965 6e74 0a20 6d61 and gradient. ma │ │ │ -0001aee0: 676e 6974 7564 6520 2847 7261 6429 2e3c gnitude (Grad).< │ │ │ -0001aef0: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>...
    • .
    • │ │ │ -0001af10: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
      .

      erGro │ │ │ -0001afb0: 7570 696e 673c 2f68 333e 0a3c 6469 7620 uping

      .
      public static void │ │ │ -0001b030: 266e 6273 703b 3c73 7061 6e20 636c 6173  erGrouping │ │ │ -0001b080: 283c 6120 6872 6566 3d22 2e2e 2f63 6f72 (Mat │ │ │ -0001b0c0: 3c2f 613e 266e 6273 703b 696d 6167 652c  image, │ │ │ -0001b0d0: 0a20 3c61 2068 7265 663d 222e 2e2f 636f . Ma │ │ │ -0001b110: 743c 2f61 3e26 6e62 7370 3b63 6861 6e6e t chann │ │ │ -0001b120: 656c 2c0a 203c 6120 6872 6566 3d22 6874 el,. List&l │ │ │ -0001b1d0: 743b 3c61 2068 7265 663d 222e 2e2f 636f t;MatOfPoint< │ │ │ -0001b220: 2f61 3e26 6774 3b26 6e62 7370 3b72 6567 /a>> reg │ │ │ -0001b230: 696f 6e73 2c0a 203c 6120 6872 6566 3d22 ions,. MatOfRe │ │ │ -0001b280: 6374 3c2f 613e 266e 6273 703b 6772 6f75 ct grou │ │ │ -0001b290: 7073 5f72 6563 7473 2c0a 2069 6e74 266e ps_rects,. int&n │ │ │ -0001b2a0: 6273 703b 6d65 7468 6f64 2c0a 203c 6120 bsp;method,. │ │ │ -0001b350: 5374 7269 6e67 3c2f 613e 266e 6273 703b String  │ │ │ -0001b360: 6669 6c65 6e61 6d65 2c0a 2066 6c6f 6174 filename,. float │ │ │ -0001b370: 266e 6273 703b 6d69 6e50 726f 6261 626c  minProbabl │ │ │ -0001b380: 6974 7929 3c2f 7370 616e 3e3c 2f64 6976 ity)
      .
      Find groups │ │ │ -0001b3b0: 206f 6620 4578 7472 656d 616c 2052 6567 of Extremal Reg │ │ │ -0001b3c0: 696f 6e73 2074 6861 7420 6172 6520 6f72 ions that are or │ │ │ -0001b3d0: 6761 6e69 7a65 6420 6173 2074 6578 7420 ganized as text │ │ │ -0001b3e0: 626c 6f63 6b73 2e3c 2f64 6976 3e0a 3c64 blocks.
      . │ │ │ -0001b400: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
      Parameters: │ │ │ -0001b410: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
      .
      │ │ │ -0001b420: 696d 6167 653c 2f63 6f64 653e 202d 2061 image - a │ │ │ -0001b430: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ -0001b440: 6572 6174 6564 3c2f 6464 3e0a 3c64 643e erated
      .
      │ │ │ -0001b450: 3c63 6f64 653e 6368 616e 6e65 6c3c 2f63 channel - automatic │ │ │ -0001b470: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      re │ │ │ -0001b490: 6769 6f6e 733c 2f63 6f64 653e 202d 2056 gions - V │ │ │ -0001b4a0: 6563 746f 7220 6f66 2045 5227 7320 7265 ector of ER's re │ │ │ -0001b4b0: 7472 6965 7665 6420 6672 6f6d 2074 6865 trieved from the │ │ │ -0001b4c0: 2045 5246 696c 7465 7220 616c 676f 7269 ERFilter algori │ │ │ -0001b4d0: 7468 6d20 6672 6f6d 2065 6163 6820 6368 thm from each ch │ │ │ -0001b4e0: 616e 6e65 6c2e 0a0a 2070 726f 7669 6465 annel... provide │ │ │ -0001b4f0: 6420 7265 6769 6f6e 732e 3c2f 6464 3e0a d regions.
      . │ │ │ -0001b500: 3c64 643e 3c63 6f64 653e 6772 6f75 7073
      groups │ │ │ -0001b510: 5f72 6563 7473 3c2f 636f 6465 3e20 2d20 _rects - │ │ │ -0001b520: 5468 6520 6f75 7470 7574 206f 6620 7468 The output of th │ │ │ -0001b530: 6520 616c 676f 7269 7468 6d20 6172 6520 e algorithm are │ │ │ -0001b540: 7374 6f72 6564 2069 6e20 7468 6973 2070 stored in this p │ │ │ -0001b550: 6172 616d 6574 6572 2061 7320 6c69 7374 arameter as list │ │ │ -0001b560: 206f 6620 7265 6374 616e 676c 6573 2e3c of rectangles.< │ │ │ -0001b570: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e6d /dd>.
      m │ │ │ -0001b580: 6574 686f 643c 2f63 6f64 653e 202d 2047 ethod - G │ │ │ -0001b590: 726f 7570 696e 6720 6d65 7468 6f64 2028 rouping method ( │ │ │ -0001b5a0: 7365 6520 7465 7874 3a3a 6572 4772 6f75 see text::erGrou │ │ │ -0001b5b0: 7069 6e67 5f4d 6f64 6573 292e 2043 616e ping_Modes). Can │ │ │ -0001b5c0: 2062 6520 6f6e 6520 6f66 2045 5247 524f be one of ERGRO │ │ │ -0001b5d0: 5550 494e 475f 4f52 4945 4e54 4154 494f UPING_ORIENTATIO │ │ │ -0001b5e0: 4e5f 484f 5249 5a2c 0a20 4552 4752 4f55 N_HORIZ,. ERGROU │ │ │ -0001b5f0: 5049 4e47 5f4f 5249 454e 5441 5449 4f4e PING_ORIENTATION │ │ │ -0001b600: 5f41 4e59 2e3c 2f64 643e 0a3c 6464 3e3c _ANY.
      .
      < │ │ │ -0001b610: 636f 6465 3e66 696c 656e 616d 653c 2f63 code>filename - The XML o │ │ │ -0001b630: 7220 5941 4d4c 2066 696c 6520 7769 7468 r YAML file with │ │ │ -0001b640: 2074 6865 2063 6c61 7373 6966 6965 7220 the classifier │ │ │ -0001b650: 6d6f 6465 6c20 2865 2e67 2e0a 2073 616d model (e.g.. sam │ │ │ -0001b660: 706c 6573 2f74 7261 696e 6564 5f63 6c61 ples/trained_cla │ │ │ -0001b670: 7373 6966 6965 725f 6572 4772 6f75 7069 ssifier_erGroupi │ │ │ -0001b680: 6e67 2e78 6d6c 292e 204f 6e6c 7920 746f ng.xml). Only to │ │ │ -0001b690: 2075 7365 2077 6865 6e20 6772 6f75 7069 use when groupi │ │ │ -0001b6a0: 6e67 206d 6574 686f 6420 6973 0a20 4552 ng method is. ER │ │ │ -0001b6b0: 4752 4f55 5049 4e47 5f4f 5249 454e 5441 GROUPING_ORIENTA │ │ │ -0001b6c0: 5449 4f4e 5f41 4e59 2e3c 2f64 643e 0a3c TION_ANY.
      .< │ │ │ -0001b6d0: 6464 3e3c 636f 6465 3e6d 696e 5072 6f62 dd>minProb │ │ │ -0001b6e0: 6162 6c69 7479 3c2f 636f 6465 3e20 2d20 ablity - │ │ │ -0001b6f0: 5468 6520 6d69 6e69 6d75 6d20 7072 6f62 The minimum prob │ │ │ -0001b700: 6162 696c 6974 7920 666f 7220 6163 6365 ability for acce │ │ │ -0001b710: 7074 696e 6720 6120 6772 6f75 702e 204f pting a group. O │ │ │ -0001b720: 6e6c 7920 746f 2075 7365 2077 6865 6e20 nly to use when │ │ │ -0001b730: 6772 6f75 7069 6e67 0a20 6d65 7468 6f64 grouping. method │ │ │ -0001b740: 2069 7320 4552 4752 4f55 5049 4e47 5f4f is ERGROUPING_O │ │ │ -0001b750: 5249 454e 5441 5449 4f4e 5f41 4e59 2e3c RIENTATION_ANY.< │ │ │ -0001b760: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>...
    • .
    • │ │ │ -0001b780: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
      │ │ │ -0001b810: 0a3c 6833 3e65 7247 726f 7570 696e 673c .

      erGrouping< │ │ │ -0001b820: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
      publi │ │ │ -0001b860: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ -0001b870: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;v │ │ │ -0001b890: 6f69 643c 2f73 7061 6e3e 266e 6273 703b oid  │ │ │ -0001b8a0: 3c73 7061 6e20 636c 6173 733d 2265 6c65 erGro │ │ │ -0001b8c0: 7570 696e 673c 2f73 7061 6e3e 3c77 6272 uping(Mat&n │ │ │ -0001b930: 6273 703b 696d 6167 652c 0a20 3c61 2068 bsp;image,. Mat& │ │ │ -0001b980: 6e62 7370 3b63 6861 6e6e 656c 2c0a 203c nbsp;channel,. < │ │ │ -0001b990: 6120 6872 6566 3d22 6874 7470 733a 2f2f a href="https:// │ │ │ -0001b9a0: 646f 776e 6c6f 6164 2e6a 6176 612e 6e65 download.java.ne │ │ │ -0001b9b0: 742f 6a61 7661 2f65 6172 6c79 5f61 6363 t/java/early_acc │ │ │ -0001b9c0: 6573 732f 6a64 6b32 312f 646f 6373 2f61 ess/jdk21/docs/a │ │ │ -0001b9d0: 7069 2f6a 6176 612e 6261 7365 2f6a 6176 pi/java.base/jav │ │ │ -0001b9e0: 612f 7574 696c 2f4c 6973 742e 6874 6d6c a/util/List.html │ │ │ -0001b9f0: 2220 7469 746c 653d 2263 6c61 7373 206f " title="class o │ │ │ -0001ba00: 7220 696e 7465 7266 6163 6520 696e 206a r interface in j │ │ │ -0001ba10: 6176 612e 7574 696c 2220 636c 6173 733d ava.util" class= │ │ │ -0001ba20: 2265 7874 6572 6e61 6c2d 6c69 6e6b 223e "external-link"> │ │ │ -0001ba30: 4c69 7374 3c2f 613e 266c 743b 3c61 2068 List<M │ │ │ -0001ba80: 6174 4f66 506f 696e 743c 2f61 3e26 6774 atOfPoint> │ │ │ -0001ba90: 3b26 6e62 7370 3b72 6567 696f 6e73 2c0a ; regions,. │ │ │ -0001baa0: 203c 6120 6872 6566 3d22 2e2e 2f63 6f72 MatOfRect │ │ │ -0001baf0: 266e 6273 703b 6772 6f75 7073 5f72 6563  groups_rec │ │ │ -0001bb00: 7473 2c0a 2069 6e74 266e 6273 703b 6d65 ts,. int me │ │ │ -0001bb10: 7468 6f64 2c0a 203c 6120 6872 6566 3d22 thod,. String │ │ │ -0001bbc0: 3c2f 613e 266e 6273 703b 6669 6c65 6e61  filena │ │ │ -0001bbd0: 6d65 293c 2f73 7061 6e3e 3c2f 6469 763e me)
      │ │ │ -0001bbe0: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
      Find groups │ │ │ -0001bc00: 6f66 2045 7874 7265 6d61 6c20 5265 6769 of Extremal Regi │ │ │ -0001bc10: 6f6e 7320 7468 6174 2061 7265 206f 7267 ons that are org │ │ │ -0001bc20: 616e 697a 6564 2061 7320 7465 7874 2062 anized as text b │ │ │ -0001bc30: 6c6f 636b 732e 3c2f 6469 763e 0a3c 646c locks.
      .
      . │ │ │ -0001bc50: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
      Parameters:< │ │ │ -0001bc60: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e69 /dt>.
      i │ │ │ -0001bc70: 6d61 6765 3c2f 636f 6465 3e20 2d20 6175 mage - au │ │ │ -0001bc80: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -0001bc90: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated
      .
      < │ │ │ -0001bca0: 636f 6465 3e63 6861 6e6e 656c 3c2f 636f code>channel - automatica │ │ │ -0001bcc0: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
      reg │ │ │ -0001bce0: 696f 6e73 3c2f 636f 6465 3e20 2d20 5665 ions - Ve │ │ │ -0001bcf0: 6374 6f72 206f 6620 4552 2773 2072 6574 ctor of ER's ret │ │ │ -0001bd00: 7269 6576 6564 2066 726f 6d20 7468 6520 rieved from the │ │ │ -0001bd10: 4552 4669 6c74 6572 2061 6c67 6f72 6974 ERFilter algorit │ │ │ -0001bd20: 686d 2066 726f 6d20 6561 6368 2063 6861 hm from each cha │ │ │ -0001bd30: 6e6e 656c 2e0a 0a20 7072 6f76 6964 6564 nnel... provided │ │ │ -0001bd40: 2072 6567 696f 6e73 2e3c 2f64 643e 0a3c regions.
      .< │ │ │ -0001bd50: 6464 3e3c 636f 6465 3e67 726f 7570 735f dd>groups_ │ │ │ -0001bd60: 7265 6374 733c 2f63 6f64 653e 202d 2054 rects - T │ │ │ -0001bd70: 6865 206f 7574 7075 7420 6f66 2074 6865 he output of the │ │ │ -0001bd80: 2061 6c67 6f72 6974 686d 2061 7265 2073 algorithm are s │ │ │ -0001bd90: 746f 7265 6420 696e 2074 6869 7320 7061 tored in this pa │ │ │ -0001bda0: 7261 6d65 7465 7220 6173 206c 6973 7420 rameter as list │ │ │ -0001bdb0: 6f66 2072 6563 7461 6e67 6c65 732e 3c2f of rectangles..
      me │ │ │ -0001bdd0: 7468 6f64 3c2f 636f 6465 3e20 2d20 4772 thod - Gr │ │ │ -0001bde0: 6f75 7069 6e67 206d 6574 686f 6420 2873 ouping method (s │ │ │ -0001bdf0: 6565 2074 6578 743a 3a65 7247 726f 7570 ee text::erGroup │ │ │ -0001be00: 696e 675f 4d6f 6465 7329 2e20 4361 6e20 ing_Modes). Can │ │ │ -0001be10: 6265 206f 6e65 206f 6620 4552 4752 4f55 be one of ERGROU │ │ │ -0001be20: 5049 4e47 5f4f 5249 454e 5441 5449 4f4e PING_ORIENTATION │ │ │ -0001be30: 5f48 4f52 495a 2c0a 2045 5247 524f 5550 _HORIZ,. ERGROUP │ │ │ -0001be40: 494e 475f 4f52 4945 4e54 4154 494f 4e5f ING_ORIENTATION_ │ │ │ -0001be50: 414e 592e 3c2f 6464 3e0a 3c64 643e 3c63 ANY.
      .
      filename - The XML or │ │ │ -0001be80: 2059 414d 4c20 6669 6c65 2077 6974 6820 YAML file with │ │ │ -0001be90: 7468 6520 636c 6173 7369 6669 6572 206d the classifier m │ │ │ -0001bea0: 6f64 656c 2028 652e 672e 0a20 7361 6d70 odel (e.g.. samp │ │ │ -0001beb0: 6c65 732f 7472 6169 6e65 645f 636c 6173 les/trained_clas │ │ │ -0001bec0: 7369 6669 6572 5f65 7247 726f 7570 696e sifier_erGroupin │ │ │ -0001bed0: 672e 786d 6c29 2e20 4f6e 6c79 2074 6f20 g.xml). Only to │ │ │ -0001bee0: 7573 6520 7768 656e 2067 726f 7570 696e use when groupin │ │ │ -0001bef0: 6720 6d65 7468 6f64 2069 730a 2045 5247 g method is. ERG │ │ │ -0001bf00: 524f 5550 494e 475f 4f52 4945 4e54 4154 ROUPING_ORIENTAT │ │ │ -0001bf10: 494f 4e5f 414e 592e 0a0a 206d 6574 686f ION_ANY... metho │ │ │ -0001bf20: 6420 6973 2045 5247 524f 5550 494e 475f d is ERGROUPING_ │ │ │ -0001bf30: 4f52 4945 4e54 4154 494f 4e5f 414e 592e ORIENTATION_ANY. │ │ │ -0001bf40: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365
      .
      ..

    • .
    • .
      │ │ │ -0001bfe0: 0a3c 6833 3e65 7247 726f 7570 696e 673c .

      erGrouping< │ │ │ -0001bff0: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
      publi │ │ │ -0001c030: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ -0001c040: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;v │ │ │ -0001c060: 6f69 643c 2f73 7061 6e3e 266e 6273 703b oid  │ │ │ -0001c070: 3c73 7061 6e20 636c 6173 733d 2265 6c65 erGro │ │ │ -0001c090: 7570 696e 673c 2f73 7061 6e3e 3c77 6272 uping(Mat&n │ │ │ -0001c100: 6273 703b 696d 6167 652c 0a20 3c61 2068 bsp;image,. Mat& │ │ │ -0001c150: 6e62 7370 3b63 6861 6e6e 656c 2c0a 203c nbsp;channel,. < │ │ │ -0001c160: 6120 6872 6566 3d22 6874 7470 733a 2f2f a href="https:// │ │ │ -0001c170: 646f 776e 6c6f 6164 2e6a 6176 612e 6e65 download.java.ne │ │ │ -0001c180: 742f 6a61 7661 2f65 6172 6c79 5f61 6363 t/java/early_acc │ │ │ -0001c190: 6573 732f 6a64 6b32 312f 646f 6373 2f61 ess/jdk21/docs/a │ │ │ -0001c1a0: 7069 2f6a 6176 612e 6261 7365 2f6a 6176 pi/java.base/jav │ │ │ -0001c1b0: 612f 7574 696c 2f4c 6973 742e 6874 6d6c a/util/List.html │ │ │ -0001c1c0: 2220 7469 746c 653d 2263 6c61 7373 206f " title="class o │ │ │ -0001c1d0: 7220 696e 7465 7266 6163 6520 696e 206a r interface in j │ │ │ -0001c1e0: 6176 612e 7574 696c 2220 636c 6173 733d ava.util" class= │ │ │ -0001c1f0: 2265 7874 6572 6e61 6c2d 6c69 6e6b 223e "external-link"> │ │ │ -0001c200: 4c69 7374 3c2f 613e 266c 743b 3c61 2068 List<M │ │ │ -0001c250: 6174 4f66 506f 696e 743c 2f61 3e26 6774 atOfPoint> │ │ │ -0001c260: 3b26 6e62 7370 3b72 6567 696f 6e73 2c0a ; regions,. │ │ │ -0001c270: 203c 6120 6872 6566 3d22 2e2e 2f63 6f72 MatOfRect │ │ │ -0001c2c0: 266e 6273 703b 6772 6f75 7073 5f72 6563  groups_rec │ │ │ -0001c2d0: 7473 2c0a 2069 6e74 266e 6273 703b 6d65 ts,. int me │ │ │ -0001c2e0: 7468 6f64 293c 2f73 7061 6e3e 3c2f 6469 thod).
      Find group │ │ │ -0001c310: 7320 6f66 2045 7874 7265 6d61 6c20 5265 s of Extremal Re │ │ │ -0001c320: 6769 6f6e 7320 7468 6174 2061 7265 206f gions that are o │ │ │ -0001c330: 7267 616e 697a 6564 2061 7320 7465 7874 rganized as text │ │ │ -0001c340: 2062 6c6f 636b 732e 3c2f 6469 763e 0a3c blocks.
      .< │ │ │ -0001c350: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ -0001c360: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
      Parameters │ │ │ -0001c370: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
      .
      image - │ │ │ -0001c390: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ -0001c3a0: 6e65 7261 7465 643c 2f64 643e 0a3c 6464 nerated
      .
      channel - automati │ │ │ -0001c3d0: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -0001c3e0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e72 /dd>.
      r │ │ │ -0001c3f0: 6567 696f 6e73 3c2f 636f 6465 3e20 2d20 egions - │ │ │ -0001c400: 5665 6374 6f72 206f 6620 4552 2773 2072 Vector of ER's r │ │ │ -0001c410: 6574 7269 6576 6564 2066 726f 6d20 7468 etrieved from th │ │ │ -0001c420: 6520 4552 4669 6c74 6572 2061 6c67 6f72 e ERFilter algor │ │ │ -0001c430: 6974 686d 2066 726f 6d20 6561 6368 2063 ithm from each c │ │ │ -0001c440: 6861 6e6e 656c 2e0a 0a20 7072 6f76 6964 hannel... provid │ │ │ -0001c450: 6564 2072 6567 696f 6e73 2e3c 2f64 643e ed regions.
      │ │ │ -0001c460: 0a3c 6464 3e3c 636f 6465 3e67 726f 7570 .
      group │ │ │ -0001c470: 735f 7265 6374 733c 2f63 6f64 653e 202d s_rects - │ │ │ -0001c480: 2054 6865 206f 7574 7075 7420 6f66 2074 The output of t │ │ │ -0001c490: 6865 2061 6c67 6f72 6974 686d 2061 7265 he algorithm are │ │ │ -0001c4a0: 2073 746f 7265 6420 696e 2074 6869 7320 stored in this │ │ │ -0001c4b0: 7061 7261 6d65 7465 7220 6173 206c 6973 parameter as lis │ │ │ -0001c4c0: 7420 6f66 2072 6563 7461 6e67 6c65 732e t of rectangles. │ │ │ -0001c4d0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
      .
      │ │ │ -0001c4e0: 6d65 7468 6f64 3c2f 636f 6465 3e20 2d20 method - │ │ │ -0001c4f0: 4772 6f75 7069 6e67 206d 6574 686f 6420 Grouping method │ │ │ -0001c500: 2873 6565 2074 6578 743a 3a65 7247 726f (see text::erGro │ │ │ -0001c510: 7570 696e 675f 4d6f 6465 7329 2e20 4361 uping_Modes). Ca │ │ │ -0001c520: 6e20 6265 206f 6e65 206f 6620 4552 4752 n be one of ERGR │ │ │ -0001c530: 4f55 5049 4e47 5f4f 5249 454e 5441 5449 OUPING_ORIENTATI │ │ │ -0001c540: 4f4e 5f48 4f52 495a 2c0a 2045 5247 524f ON_HORIZ,. ERGRO │ │ │ -0001c550: 5550 494e 475f 4f52 4945 4e54 4154 494f UPING_ORIENTATIO │ │ │ -0001c560: 4e5f 414e 592e 0a0a 2073 616d 706c 6573 N_ANY... samples │ │ │ -0001c570: 2f74 7261 696e 6564 5f63 6c61 7373 6966 /trained_classif │ │ │ -0001c580: 6965 725f 6572 4772 6f75 7069 6e67 2e78 ier_erGrouping.x │ │ │ -0001c590: 6d6c 292e 204f 6e6c 7920 746f 2075 7365 ml). Only to use │ │ │ -0001c5a0: 2077 6865 6e20 6772 6f75 7069 6e67 206d when grouping m │ │ │ -0001c5b0: 6574 686f 6420 6973 0a20 4552 4752 4f55 ethod is. ERGROU │ │ │ -0001c5c0: 5049 4e47 5f4f 5249 454e 5441 5449 4f4e PING_ORIENTATION │ │ │ -0001c5d0: 5f41 4e59 2e0a 0a20 6d65 7468 6f64 2069 _ANY... method i │ │ │ -0001c5e0: 7320 4552 4752 4f55 5049 4e47 5f4f 5249 s ERGROUPING_ORI │ │ │ -0001c5f0: 454e 5441 5449 4f4e 5f41 4e59 2e3c 2f64 ENTATION_ANY....

    • .
    • .< │ │ │ -0001c620: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ -0001c630: 6574 6169 6c22 2069 643d 2265 7247 726f etail" id="erGro │ │ │ -0001c640: 7570 696e 6728 6f72 672e 6f70 656e 6376 uping(org.opencv │ │ │ -0001c650: 2e63 6f72 652e 4d61 742c 6f72 672e 6f70 .core.Mat,org.op │ │ │ -0001c660: 656e 6376 2e63 6f72 652e 4d61 742c 6a61 encv.core.Mat,ja │ │ │ -0001c670: 7661 2e75 7469 6c2e 4c69 7374 2c6f 7267 va.util.List,org │ │ │ -0001c680: 2e6f 7065 6e63 762e 636f 7265 2e4d 6174 .opencv.core.Mat │ │ │ -0001c690: 4f66 5265 6374 2922 3e0a 3c68 333e 6572 OfRect)">.

      er │ │ │ -0001c6a0: 4772 6f75 7069 6e67 3c2f 6833 3e0a 3c64 Grouping

      .public stati │ │ │ -0001c6f0: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c void erGrouping( │ │ │ -0001c7b0: 4d61 743c 2f61 3e26 6e62 7370 3b69 6d61 Mat ima │ │ │ -0001c7c0: 6765 2c0a 203c 6120 6872 6566 3d22 2e2e ge,. Mat ch │ │ │ -0001c810: 616e 6e65 6c2c 0a20 3c61 2068 7265 663d annel,. List<MatOfPoi │ │ │ -0001c910: 6e74 3c2f 613e 2667 743b 266e 6273 703b nt>  │ │ │ -0001c920: 7265 6769 6f6e 732c 0a20 3c61 2068 7265 regions,. MatO │ │ │ -0001c970: 6652 6563 743c 2f61 3e26 6e62 7370 3b67 fRect g │ │ │ -0001c980: 726f 7570 735f 7265 6374 7329 3c2f 7370 roups_rects).
      Fin │ │ │ -0001c9b0: 6420 6772 6f75 7073 206f 6620 4578 7472 d groups of Extr │ │ │ -0001c9c0: 656d 616c 2052 6567 696f 6e73 2074 6861 emal Regions tha │ │ │ -0001c9d0: 7420 6172 6520 6f72 6761 6e69 7a65 6420 t are organized │ │ │ -0001c9e0: 6173 2074 6578 7420 626c 6f63 6b73 2e3c as text blocks.< │ │ │ -0001c9f0: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
      .
      Par │ │ │ -0001ca10: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
      .image - automatic │ │ │ -0001ca40: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      ch │ │ │ -0001ca60: 616e 6e65 6c3c 2f63 6f64 653e 202d 2061 annel - a │ │ │ -0001ca70: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ -0001ca80: 6572 6174 6564 3c2f 6464 3e0a 3c64 643e erated
      .
      │ │ │ -0001ca90: 3c63 6f64 653e 7265 6769 6f6e 733c 2f63 regions - Vector of │ │ │ -0001cab0: 2045 5227 7320 7265 7472 6965 7665 6420 ER's retrieved │ │ │ -0001cac0: 6672 6f6d 2074 6865 2045 5246 696c 7465 from the ERFilte │ │ │ -0001cad0: 7220 616c 676f 7269 7468 6d20 6672 6f6d r algorithm from │ │ │ -0001cae0: 2065 6163 6820 6368 616e 6e65 6c2e 0a0a each channel... │ │ │ -0001caf0: 2070 726f 7669 6465 6420 7265 6769 6f6e provided region │ │ │ -0001cb00: 732e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 s.
      .
      groups_rects - The outp │ │ │ -0001cb30: 7574 206f 6620 7468 6520 616c 676f 7269 ut of the algori │ │ │ -0001cb40: 7468 6d20 6172 6520 7374 6f72 6564 2069 thm are stored i │ │ │ -0001cb50: 6e20 7468 6973 2070 6172 616d 6574 6572 n this parameter │ │ │ -0001cb60: 2061 7320 6c69 7374 206f 6620 7265 6374 as list of rect │ │ │ -0001cb70: 616e 676c 6573 2e0a 0a20 4552 4752 4f55 angles... ERGROU │ │ │ -0001cb80: 5049 4e47 5f4f 5249 454e 5441 5449 4f4e PING_ORIENTATION │ │ │ -0001cb90: 5f41 4e59 2e0a 0a20 7361 6d70 6c65 732f _ANY... samples/ │ │ │ -0001cba0: 7472 6169 6e65 645f 636c 6173 7369 6669 trained_classifi │ │ │ -0001cbb0: 6572 5f65 7247 726f 7570 696e 672e 786d er_erGrouping.xm │ │ │ -0001cbc0: 6c29 2e20 4f6e 6c79 2074 6f20 7573 6520 l). Only to use │ │ │ -0001cbd0: 7768 656e 2067 726f 7570 696e 6720 6d65 when grouping me │ │ │ -0001cbe0: 7468 6f64 2069 730a 2045 5247 524f 5550 thod is. ERGROUP │ │ │ -0001cbf0: 494e 475f 4f52 4945 4e54 4154 494f 4e5f ING_ORIENTATION_ │ │ │ -0001cc00: 414e 592e 0a0a 206d 6574 686f 6420 6973 ANY... method is │ │ │ -0001cc10: 2045 5247 524f 5550 494e 475f 4f52 4945 ERGROUPING_ORIE │ │ │ -0001cc20: 4e54 4154 494f 4e5f 414e 592e 3c2f 6464 NTATION_ANY.
      .
      ..
    • .
    • .. │ │ │ -0001ccd0: 3c68 333e 6465 7465 6374 5265 6769 6f6e

      detectRegion │ │ │ -0001cce0: 733c 2f68 333e 0a3c 6469 7620 636c 6173 s

      .
      pub │ │ │ -0001cd20: 6c69 6320 7374 6174 6963 3c2f 7370 616e lic static void&nbs │ │ │ -0001cd60: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;det │ │ │ -0001cd80: 6563 7452 6567 696f 6e73 3c2f 7370 616e ectRegions( │ │ │ -0001cdb0: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ -0001cdf0: 2f61 3e26 6e62 7370 3b69 6d61 6765 2c0a /a> image,. │ │ │ -0001ce00: 203c 6120 6872 6566 3d22 4552 4669 6c74 ERFilt │ │ │ -0001ce40: 6572 3c2f 613e 266e 6273 703b 6572 5f66 er er_f │ │ │ -0001ce50: 696c 7465 7231 2c0a 203c 6120 6872 6566 ilter1,. ERFilter&n │ │ │ -0001cea0: 6273 703b 6572 5f66 696c 7465 7232 2c0a bsp;er_filter2,. │ │ │ -0001ceb0: 203c 6120 6872 6566 3d22 6874 7470 733a List<MatOfPoint& │ │ │ -0001cfb0: 6774 3b26 6e62 7370 3b72 6567 696f 6e73 gt; regions │ │ │ -0001cfc0: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
      .< │ │ │ -0001cfd0: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ -0001cfe0: 223e 436f 6e76 6572 7473 204d 5345 5220 ">Converts MSER │ │ │ -0001cff0: 636f 6e74 6f75 7273 2028 7665 6374 6f72 contours (vector │ │ │ -0001d000: 266c 743b 506f 696e 7426 6774 3b29 2074 <Point>) t │ │ │ -0001d010: 6f20 4552 5374 6174 2072 6567 696f 6e73 o ERStat regions │ │ │ -0001d020: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 ..
      .
      P │ │ │ -0001d040: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
      . │ │ │ -0001d050: 3c64 643e 3c63 6f64 653e 696d 6167 653c
      image< │ │ │ -0001d060: 2f63 6f64 653e 202d 2053 6f75 7263 6520 /code> - Source │ │ │ -0001d070: 696d 6167 6520 4356 5f38 5543 3120 6672 image CV_8UC1 fr │ │ │ -0001d080: 6f6d 2077 6869 6368 2074 6865 204d 5345 om which the MSE │ │ │ -0001d090: 5273 2077 6865 7265 2065 7874 7261 6374 Rs where extract │ │ │ -0001d0a0: 6564 2e3c 2f64 643e 0a3c 6464 3e3c 636f ed.
      .
      er_filter1 - automatic │ │ │ -0001d0d0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      er │ │ │ -0001d0f0: 5f66 696c 7465 7232 3c2f 636f 6465 3e20 _filter2 │ │ │ -0001d100: 2d20 6175 746f 6d61 7469 6361 6c6c 7920 - automatically │ │ │ -0001d110: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated
      .< │ │ │ -0001d120: 6464 3e3c 636f 6465 3e72 6567 696f 6e73 dd>regions │ │ │ -0001d130: 3c2f 636f 6465 3e20 2d20 4f75 7470 7574 - Output │ │ │ -0001d140: 2077 6865 7265 2074 6865 2045 5253 7461 where the ERSta │ │ │ -0001d150: 7420 7265 6769 6f6e 7320 6172 6520 7374 t regions are st │ │ │ -0001d160: 6f72 6564 2e0a 0a20 4974 2074 616b 6573 ored... It takes │ │ │ -0001d170: 2061 7320 696e 7075 7420 7468 6520 636f as input the co │ │ │ -0001d180: 6e74 6f75 7273 2070 726f 7669 6465 6420 ntours provided │ │ │ -0001d190: 6279 2074 6865 204f 7065 6e43 5620 4d53 by the OpenCV MS │ │ │ -0001d1a0: 4552 2066 6561 7475 7265 2064 6574 6563 ER feature detec │ │ │ -0001d1b0: 746f 7220 616e 6420 7265 7475 726e 7320 tor and returns │ │ │ -0001d1c0: 6173 206f 7574 7075 740a 2074 776f 2076 as output. two v │ │ │ -0001d1d0: 6563 746f 7273 206f 6620 4552 5374 6174 ectors of ERStat │ │ │ -0001d1e0: 732e 2054 6869 7320 6973 2062 6563 6175 s. This is becau │ │ │ -0001d1f0: 7365 204d 5345 5228 2920 6f75 7470 7574 se MSER() output │ │ │ -0001d200: 2063 6f6e 7461 696e 7320 626f 7468 204d contains both M │ │ │ -0001d210: 5345 522b 2061 6e64 204d 5345 522d 2072 SER+ and MSER- r │ │ │ -0001d220: 6567 696f 6e73 2069 6e20 610a 2073 696e egions in a. sin │ │ │ -0001d230: 676c 6520 7665 6374 6f72 266c 743b 506f gle vector<Po │ │ │ -0001d240: 696e 7426 6774 3b2c 2074 6865 2066 756e int>, the fun │ │ │ -0001d250: 6374 696f 6e20 7365 7061 7261 7465 7320 ction separates │ │ │ -0001d260: 7468 656d 2069 6e20 7477 6f20 6469 6666 them in two diff │ │ │ -0001d270: 6572 656e 7420 7665 6374 6f72 7320 2874 erent vectors (t │ │ │ -0001d280: 6869 7320 6973 2061 7320 6966 2074 6865 his is as if the │ │ │ -0001d290: 0a20 4552 5374 6174 7320 7768 6572 6520 . ERStats where │ │ │ -0001d2a0: 6578 7472 6163 7465 6420 6672 6f6d 2074 extracted from t │ │ │ -0001d2b0: 776f 2064 6966 6665 7265 6e74 2063 6861 wo different cha │ │ │ -0001d2c0: 6e6e 656c 7329 2e0a 0a20 416e 2065 7861 nnels)... An exa │ │ │ -0001d2d0: 6d70 6c65 206f 6620 4d53 4552 7354 6f45 mple of MSERsToE │ │ │ -0001d2e0: 5253 7461 7473 2069 6e20 7573 6520 6361 RStats in use ca │ │ │ -0001d2f0: 6e20 6265 2066 6f75 6e64 2069 6e20 7468 n be found in th │ │ │ -0001d300: 6520 7465 7874 2064 6574 6563 7469 6f6e e text detection │ │ │ -0001d310: 2077 6562 6361 6d5f 6465 6d6f 3a0a 2026 webcam_demo:. & │ │ │ -0001d320: 6c74 3b68 7474 7073 3a2f 2f67 6974 6875 lt;https://githu │ │ │ -0001d330: 622e 636f 6d2f 6f70 656e 6376 2f6f 7065 b.com/opencv/ope │ │ │ -0001d340: 6e63 765f 636f 6e74 7269 622f 626c 6f62 ncv_contrib/blob │ │ │ -0001d350: 2f6d 6173 7465 722f 6d6f 6475 6c65 732f /master/modules/ │ │ │ -0001d360: 7465 7874 2f73 616d 706c 6573 2f77 6562 text/samples/web │ │ │ -0001d370: 6361 6d5f 6465 6d6f 2e63 7070 2667 743b cam_demo.cpp> │ │ │ -0001d380: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365 .
      ..
    • .
    • .
      .

      de │ │ │ -0001d450: 7465 6374 5265 6769 6f6e 733c 2f68 333e tectRegions

      │ │ │ -0001d460: 0a3c 6469 7620 636c 6173 733d 226d 656d .
      < │ │ │ -0001d480: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ -0001d490: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ -0001d4a0: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ -0001d4b0: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;void< │ │ │ -0001d4d0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> detectReg │ │ │ -0001d500: 696f 6e73 3c2f 7370 616e 3e3c 7762 723e ions │ │ │ -0001d510: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Mat&nb │ │ │ -0001d570: 7370 3b69 6d61 6765 2c0a 203c 6120 6872 sp;image,. ERFilter │ │ │ -0001d5c0: 266e 6273 703b 6572 5f66 696c 7465 7231  er_filter1 │ │ │ -0001d5d0: 2c0a 203c 6120 6872 6566 3d22 4552 4669 ,. ERFi │ │ │ -0001d610: 6c74 6572 3c2f 613e 266e 6273 703b 6572 lter er │ │ │ -0001d620: 5f66 696c 7465 7232 2c0a 203c 6120 6872 _filter2,. Mat │ │ │ -0001d670: 4f66 5265 6374 3c2f 613e 266e 6273 703b OfRect  │ │ │ -0001d680: 6772 6f75 7073 5f72 6563 7473 2c0a 2069 groups_rects,. i │ │ │ -0001d690: 6e74 266e 6273 703b 6d65 7468 6f64 2c0a nt method,. │ │ │ -0001d6a0: 203c 6120 6872 6566 3d22 6874 7470 733a String&n │ │ │ -0001d750: 6273 703b 6669 6c65 6e61 6d65 2c0a 2066 bsp;filename,. f │ │ │ -0001d760: 6c6f 6174 266e 6273 703b 6d69 6e50 726f loat minPro │ │ │ -0001d770: 6261 6269 6c69 7479 293c 2f73 7061 6e3e bability) │ │ │ -0001d780: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      Extrac │ │ │ -0001d7a0: 7473 2074 6578 7420 7265 6769 6f6e 7320 ts text regions │ │ │ -0001d7b0: 6672 6f6d 2069 6d61 6765 2e3c 2f64 6976 from image.
      .
      .
      Paramet │ │ │ -0001d7e0: 6572 733a 3c2f 6474 3e0a 3c64 643e 3c63 ers:
      .
      image │ │ │ -0001d800: 202d 2053 6f75 7263 6520 696d 6167 6520 - Source image │ │ │ -0001d810: 7768 6572 6520 7465 7874 2062 6c6f 636b where text block │ │ │ -0001d820: 7320 6e65 6564 7320 746f 2062 6520 6578 s needs to be ex │ │ │ -0001d830: 7472 6163 7465 6420 6672 6f6d 2e20 2053 tracted from. S │ │ │ -0001d840: 686f 756c 6420 6265 2043 565f 3855 4333 hould be CV_8UC3 │ │ │ -0001d850: 2028 636f 6c6f 7229 2e3c 2f64 643e 0a3c (color).
      .< │ │ │ -0001d860: 6464 3e3c 636f 6465 3e65 725f 6669 6c74 dd>er_filt │ │ │ -0001d870: 6572 313c 2f63 6f64 653e 202d 2045 7874 er1 - Ext │ │ │ -0001d880: 7265 6d61 6c20 5265 6769 6f6e 2046 696c remal Region Fil │ │ │ -0001d890: 7465 7220 666f 7220 7468 6520 3173 7420 ter for the 1st │ │ │ -0001d8a0: 7374 6167 6520 636c 6173 7369 6669 6572 stage classifier │ │ │ -0001d8b0: 206f 6620 4e26 616d 703b 4d20 616c 676f of N&M algo │ │ │ -0001d8c0: 7269 7468 6d20 4349 5445 3a20 4e65 756d rithm CITE: Neum │ │ │ -0001d8d0: 616e 6e31 323c 2f64 643e 0a3c 6464 3e3c ann12.
      < │ │ │ -0001d8e0: 636f 6465 3e65 725f 6669 6c74 6572 323c code>er_filter2< │ │ │ -0001d8f0: 2f63 6f64 653e 202d 2045 7874 7265 6d61 /code> - Extrema │ │ │ -0001d900: 6c20 5265 6769 6f6e 2046 696c 7465 7220 l Region Filter │ │ │ -0001d910: 666f 7220 7468 6520 326e 6420 7374 6167 for the 2nd stag │ │ │ -0001d920: 6520 636c 6173 7369 6669 6572 206f 6620 e classifier of │ │ │ -0001d930: 4e26 616d 703b 4d20 616c 676f 7269 7468 N&M algorith │ │ │ -0001d940: 6d20 4349 5445 3a20 4e65 756d 616e 6e31 m CITE: Neumann1 │ │ │ -0001d950: 323c 2f64 643e 0a3c 6464 3e3c 636f 6465 2
      .
      groups_rects - Output li │ │ │ -0001d980: 7374 206f 6620 7265 6374 616e 676c 6520 st of rectangle │ │ │ -0001d990: 626c 6f63 6b73 2077 6974 6820 7465 7874 blocks with text │ │ │ -0001d9a0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
      .
      │ │ │ -0001d9b0: 6d65 7468 6f64 3c2f 636f 6465 3e20 2d20 method - │ │ │ -0001d9c0: 4772 6f75 7069 6e67 206d 6574 686f 6420 Grouping method │ │ │ -0001d9d0: 2873 6565 2074 6578 743a 3a65 7247 726f (see text::erGro │ │ │ -0001d9e0: 7570 696e 675f 4d6f 6465 7329 2e20 4361 uping_Modes). Ca │ │ │ -0001d9f0: 6e20 6265 206f 6e65 206f 6620 4552 4752 n be one of ERGR │ │ │ -0001da00: 4f55 5049 4e47 5f4f 5249 454e 5441 5449 OUPING_ORIENTATI │ │ │ -0001da10: 4f4e 5f48 4f52 495a 2c20 4552 4752 4f55 ON_HORIZ, ERGROU │ │ │ -0001da20: 5049 4e47 5f4f 5249 454e 5441 5449 4f4e PING_ORIENTATION │ │ │ -0001da30: 5f41 4e59 2e3c 2f64 643e 0a3c 6464 3e3c _ANY.
      .
      < │ │ │ -0001da40: 636f 6465 3e66 696c 656e 616d 653c 2f63 code>filename - The XML o │ │ │ -0001da60: 7220 5941 4d4c 2066 696c 6520 7769 7468 r YAML file with │ │ │ -0001da70: 2074 6865 2063 6c61 7373 6966 6965 7220 the classifier │ │ │ -0001da80: 6d6f 6465 6c20 2865 2e67 2e20 7361 6d70 model (e.g. samp │ │ │ -0001da90: 6c65 732f 7472 6169 6e65 645f 636c 6173 les/trained_clas │ │ │ -0001daa0: 7369 6669 6572 5f65 7247 726f 7570 696e sifier_erGroupin │ │ │ -0001dab0: 672e 786d 6c29 2e20 4f6e 6c79 2074 6f20 g.xml). Only to │ │ │ -0001dac0: 7573 6520 7768 656e 2067 726f 7570 696e use when groupin │ │ │ -0001dad0: 6720 6d65 7468 6f64 2069 7320 4552 4752 g method is ERGR │ │ │ -0001dae0: 4f55 5049 4e47 5f4f 5249 454e 5441 5449 OUPING_ORIENTATI │ │ │ -0001daf0: 4f4e 5f41 4e59 2e3c 2f64 643e 0a3c 6464 ON_ANY.
      .
      minProbab │ │ │ -0001db10: 696c 6974 793c 2f63 6f64 653e 202d 2054 ility - T │ │ │ -0001db20: 6865 206d 696e 696d 756d 2070 726f 6261 he minimum proba │ │ │ -0001db30: 6269 6c69 7479 2066 6f72 2061 6363 6570 bility for accep │ │ │ -0001db40: 7469 6e67 2061 2067 726f 7570 2e20 4f6e ting a group. On │ │ │ -0001db50: 6c79 2074 6f20 7573 6520 7768 656e 2067 ly to use when g │ │ │ -0001db60: 726f 7570 696e 6720 6d65 7468 6f64 2069 rouping method i │ │ │ -0001db70: 7320 4552 4752 4f55 5049 4e47 5f4f 5249 s ERGROUPING_ORI │ │ │ -0001db80: 454e 5441 5449 4f4e 5f41 4e59 2e3c 2f64 ENTATION_ANY..
      ..
    • .
    • .< │ │ │ -0001dbb0: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ -0001dbc0: 6574 6169 6c22 2069 643d 2264 6574 6563 etail" id="detec │ │ │ -0001dbd0: 7452 6567 696f 6e73 286f 7267 2e6f 7065 tRegions(org.ope │ │ │ -0001dbe0: 6e63 762e 636f 7265 2e4d 6174 2c6f 7267 ncv.core.Mat,org │ │ │ -0001dbf0: 2e6f 7065 6e63 762e 7465 7874 2e45 5246 .opencv.text.ERF │ │ │ -0001dc00: 696c 7465 722c 6f72 672e 6f70 656e 6376 ilter,org.opencv │ │ │ -0001dc10: 2e74 6578 742e 4552 4669 6c74 6572 2c6f .text.ERFilter,o │ │ │ -0001dc20: 7267 2e6f 7065 6e63 762e 636f 7265 2e4d rg.opencv.core.M │ │ │ -0001dc30: 6174 4f66 5265 6374 2c69 6e74 2c6a 6176 atOfRect,int,jav │ │ │ -0001dc40: 612e 6c61 6e67 2e53 7472 696e 6729 223e a.lang.String)"> │ │ │ -0001dc50: 0a3c 6833 3e64 6574 6563 7452 6567 696f .

      detectRegio │ │ │ -0001dc60: 6e73 3c2f 6833 3e0a 3c64 6976 2063 6c61 ns

      .
      pu │ │ │ -0001dca0: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static void&nb │ │ │ -0001dce0: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;de │ │ │ -0001dd00: 7465 6374 5265 6769 6f6e 733c 2f73 7061 tectRegions │ │ │ -0001dd30: 283c 6120 6872 6566 3d22 2e2e 2f63 6f72 (Mat │ │ │ -0001dd70: 3c2f 613e 266e 6273 703b 696d 6167 652c  image, │ │ │ -0001dd80: 0a20 3c61 2068 7265 663d 2245 5246 696c . ERFil │ │ │ -0001ddc0: 7465 723c 2f61 3e26 6e62 7370 3b65 725f ter er_ │ │ │ -0001ddd0: 6669 6c74 6572 312c 0a20 3c61 2068 7265 filter1,. ERFilter& │ │ │ -0001de20: 6e62 7370 3b65 725f 6669 6c74 6572 322c nbsp;er_filter2, │ │ │ -0001de30: 0a20 3c61 2068 7265 663d 222e 2e2f 636f . MatOfRect groups_re │ │ │ -0001de90: 6374 732c 0a20 696e 7426 6e62 7370 3b6d cts,. int m │ │ │ -0001dea0: 6574 686f 642c 0a20 3c61 2068 7265 663d ethod,. Strin │ │ │ -0001df50: 673c 2f61 3e26 6e62 7370 3b66 696c 656e g filen │ │ │ -0001df60: 616d 6529 3c2f 7370 616e 3e3c 2f64 6976 ame)
      .
      Extracts te │ │ │ -0001df90: 7874 2072 6567 696f 6e73 2066 726f 6d20 xt regions from │ │ │ -0001dfa0: 696d 6167 652e 3c2f 6469 763e 0a3c 646c image.
      .
      . │ │ │ -0001dfc0: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
      Parameters:< │ │ │ -0001dfd0: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e69 /dt>.
      i │ │ │ -0001dfe0: 6d61 6765 3c2f 636f 6465 3e20 2d20 536f mage - So │ │ │ -0001dff0: 7572 6365 2069 6d61 6765 2077 6865 7265 urce image where │ │ │ -0001e000: 2074 6578 7420 626c 6f63 6b73 206e 6565 text blocks nee │ │ │ -0001e010: 6473 2074 6f20 6265 2065 7874 7261 6374 ds to be extract │ │ │ -0001e020: 6564 2066 726f 6d2e 2020 5368 6f75 6c64 ed from. Should │ │ │ -0001e030: 2062 6520 4356 5f38 5543 3320 2863 6f6c be CV_8UC3 (col │ │ │ -0001e040: 6f72 292e 3c2f 6464 3e0a 3c64 643e 3c63 or).
      .
      er_filter1 - Extremal │ │ │ -0001e070: 2052 6567 696f 6e20 4669 6c74 6572 2066 Region Filter f │ │ │ -0001e080: 6f72 2074 6865 2031 7374 2073 7461 6765 or the 1st stage │ │ │ -0001e090: 2063 6c61 7373 6966 6965 7220 6f66 204e classifier of N │ │ │ -0001e0a0: 2661 6d70 3b4d 2061 6c67 6f72 6974 686d &M algorithm │ │ │ -0001e0b0: 2043 4954 453a 204e 6575 6d61 6e6e 3132 CITE: Neumann12 │ │ │ -0001e0c0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
      .
      │ │ │ -0001e0d0: 6572 5f66 696c 7465 7232 3c2f 636f 6465 er_filter2 - Extremal Reg │ │ │ -0001e0f0: 696f 6e20 4669 6c74 6572 2066 6f72 2074 ion Filter for t │ │ │ -0001e100: 6865 2032 6e64 2073 7461 6765 2063 6c61 he 2nd stage cla │ │ │ -0001e110: 7373 6966 6965 7220 6f66 204e 2661 6d70 ssifier of N& │ │ │ -0001e120: 3b4d 2061 6c67 6f72 6974 686d 2043 4954 ;M algorithm CIT │ │ │ -0001e130: 453a 204e 6575 6d61 6e6e 3132 3c2f 6464 E: Neumann12
      .
      grou │ │ │ -0001e150: 7073 5f72 6563 7473 3c2f 636f 6465 3e20 ps_rects │ │ │ -0001e160: 2d20 4f75 7470 7574 206c 6973 7420 6f66 - Output list of │ │ │ -0001e170: 2072 6563 7461 6e67 6c65 2062 6c6f 636b rectangle block │ │ │ -0001e180: 7320 7769 7468 2074 6578 743c 2f64 643e s with text
      │ │ │ -0001e190: 0a3c 6464 3e3c 636f 6465 3e6d 6574 686f .
      metho │ │ │ -0001e1a0: 643c 2f63 6f64 653e 202d 2047 726f 7570 d - Group │ │ │ -0001e1b0: 696e 6720 6d65 7468 6f64 2028 7365 6520 ing method (see │ │ │ -0001e1c0: 7465 7874 3a3a 6572 4772 6f75 7069 6e67 text::erGrouping │ │ │ -0001e1d0: 5f4d 6f64 6573 292e 2043 616e 2062 6520 _Modes). Can be │ │ │ -0001e1e0: 6f6e 6520 6f66 2045 5247 524f 5550 494e one of ERGROUPIN │ │ │ -0001e1f0: 475f 4f52 4945 4e54 4154 494f 4e5f 484f G_ORIENTATION_HO │ │ │ -0001e200: 5249 5a2c 2045 5247 524f 5550 494e 475f RIZ, ERGROUPING_ │ │ │ -0001e210: 4f52 4945 4e54 4154 494f 4e5f 414e 592e ORIENTATION_ANY. │ │ │ -0001e220: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
      .
      │ │ │ -0001e230: 6669 6c65 6e61 6d65 3c2f 636f 6465 3e20 filename │ │ │ -0001e240: 2d20 5468 6520 584d 4c20 6f72 2059 414d - The XML or YAM │ │ │ -0001e250: 4c20 6669 6c65 2077 6974 6820 7468 6520 L file with the │ │ │ -0001e260: 636c 6173 7369 6669 6572 206d 6f64 656c classifier model │ │ │ -0001e270: 2028 652e 672e 2073 616d 706c 6573 2f74 (e.g. samples/t │ │ │ -0001e280: 7261 696e 6564 5f63 6c61 7373 6966 6965 rained_classifie │ │ │ -0001e290: 725f 6572 4772 6f75 7069 6e67 2e78 6d6c r_erGrouping.xml │ │ │ -0001e2a0: 292e 204f 6e6c 7920 746f 2075 7365 2077 ). Only to use w │ │ │ -0001e2b0: 6865 6e20 6772 6f75 7069 6e67 206d 6574 hen grouping met │ │ │ -0001e2c0: 686f 6420 6973 2045 5247 524f 5550 494e hod is ERGROUPIN │ │ │ -0001e2d0: 475f 4f52 4945 4e54 4154 494f 4e5f 414e G_ORIENTATION_AN │ │ │ -0001e2e0: 592e 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f Y.
      .
      ..
    • .< │ │ │ -0001e300: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
      .

      detectR │ │ │ -0001e3a0: 6567 696f 6e73 3c2f 6833 3e0a 3c64 6976 egions

      .
      public static< │ │ │ -0001e3f0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> void detectRegions< │ │ │ -0001e450: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(Mat im │ │ │ -0001e4c0: 6167 652c 0a20 3c61 2068 7265 663d 2245 age,. E │ │ │ -0001e500: 5246 696c 7465 723c 2f61 3e26 6e62 7370 RFilter  │ │ │ -0001e510: 3b65 725f 6669 6c74 6572 312c 0a20 3c61 ;er_filter1,. ERFilter< │ │ │ -0001e560: 2f61 3e26 6e62 7370 3b65 725f 6669 6c74 /a> er_filt │ │ │ -0001e570: 6572 322c 0a20 3c61 2068 7265 663d 222e er2,. MatOfRec │ │ │ -0001e5c0: 743c 2f61 3e26 6e62 7370 3b67 726f 7570 t group │ │ │ -0001e5d0: 735f 7265 6374 732c 0a20 696e 7426 6e62 s_rects,. int&nb │ │ │ -0001e5e0: 7370 3b6d 6574 686f 6429 3c2f 7370 616e sp;method)
      .
      Extra │ │ │ -0001e610: 6374 7320 7465 7874 2072 6567 696f 6e73 cts text regions │ │ │ -0001e620: 2066 726f 6d20 696d 6167 652e 3c2f 6469 from image..
      .
      Parame │ │ │ -0001e650: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
      .
      < │ │ │ -0001e660: 636f 6465 3e69 6d61 6765 3c2f 636f 6465 code>image - Source image │ │ │ -0001e680: 2077 6865 7265 2074 6578 7420 626c 6f63 where text bloc │ │ │ -0001e690: 6b73 206e 6565 6473 2074 6f20 6265 2065 ks needs to be e │ │ │ -0001e6a0: 7874 7261 6374 6564 2066 726f 6d2e 2020 xtracted from. │ │ │ -0001e6b0: 5368 6f75 6c64 2062 6520 4356 5f38 5543 Should be CV_8UC │ │ │ -0001e6c0: 3320 2863 6f6c 6f72 292e 3c2f 6464 3e0a 3 (color).
      . │ │ │ -0001e6d0: 3c64 643e 3c63 6f64 653e 6572 5f66 696c
      er_fil │ │ │ -0001e6e0: 7465 7231 3c2f 636f 6465 3e20 2d20 4578 ter1 - Ex │ │ │ -0001e6f0: 7472 656d 616c 2052 6567 696f 6e20 4669 tremal Region Fi │ │ │ -0001e700: 6c74 6572 2066 6f72 2074 6865 2031 7374 lter for the 1st │ │ │ -0001e710: 2073 7461 6765 2063 6c61 7373 6966 6965 stage classifie │ │ │ -0001e720: 7220 6f66 204e 2661 6d70 3b4d 2061 6c67 r of N&M alg │ │ │ -0001e730: 6f72 6974 686d 2043 4954 453a 204e 6575 orithm CITE: Neu │ │ │ -0001e740: 6d61 6e6e 3132 3c2f 6464 3e0a 3c64 643e mann12
      .
      │ │ │ -0001e750: 3c63 6f64 653e 6572 5f66 696c 7465 7232 er_filter2 │ │ │ -0001e760: 3c2f 636f 6465 3e20 2d20 4578 7472 656d - Extrem │ │ │ -0001e770: 616c 2052 6567 696f 6e20 4669 6c74 6572 al Region Filter │ │ │ -0001e780: 2066 6f72 2074 6865 2032 6e64 2073 7461 for the 2nd sta │ │ │ -0001e790: 6765 2063 6c61 7373 6966 6965 7220 6f66 ge classifier of │ │ │ -0001e7a0: 204e 2661 6d70 3b4d 2061 6c67 6f72 6974 N&M algorit │ │ │ -0001e7b0: 686d 2043 4954 453a 204e 6575 6d61 6e6e hm CITE: Neumann │ │ │ -0001e7c0: 3132 3c2f 6464 3e0a 3c64 643e 3c63 6f64 12
      .
      groups_rects - Output l │ │ │ -0001e7f0: 6973 7420 6f66 2072 6563 7461 6e67 6c65 ist of rectangle │ │ │ -0001e800: 2062 6c6f 636b 7320 7769 7468 2074 6578 blocks with tex │ │ │ -0001e810: 743c 2f64 643e 0a3c 6464 3e3c 636f 6465 t
      .
      method - │ │ │ -0001e830: 2047 726f 7570 696e 6720 6d65 7468 6f64 Grouping method │ │ │ -0001e840: 2028 7365 6520 7465 7874 3a3a 6572 4772 (see text::erGr │ │ │ -0001e850: 6f75 7069 6e67 5f4d 6f64 6573 292e 2043 ouping_Modes). C │ │ │ -0001e860: 616e 2062 6520 6f6e 6520 6f66 2045 5247 an be one of ERG │ │ │ -0001e870: 524f 5550 494e 475f 4f52 4945 4e54 4154 ROUPING_ORIENTAT │ │ │ -0001e880: 494f 4e5f 484f 5249 5a2c 2045 5247 524f ION_HORIZ, ERGRO │ │ │ -0001e890: 5550 494e 475f 4f52 4945 4e54 4154 494f UPING_ORIENTATIO │ │ │ -0001e8a0: 4e5f 414e 592e 3c2f 6464 3e0a 3c2f 646c N_ANY.
      .
      .
      ..
    • .
      .

      detectR │ │ │ -0001e960: 6567 696f 6e73 3c2f 6833 3e0a 3c64 6976 egions

      .
      public static< │ │ │ -0001e9b0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> void detectRegions< │ │ │ -0001ea10: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(Mat im │ │ │ -0001ea80: 6167 652c 0a20 3c61 2068 7265 663d 2245 age,. E │ │ │ -0001eac0: 5246 696c 7465 723c 2f61 3e26 6e62 7370 RFilter  │ │ │ -0001ead0: 3b65 725f 6669 6c74 6572 312c 0a20 3c61 ;er_filter1,. ERFilter< │ │ │ -0001eb20: 2f61 3e26 6e62 7370 3b65 725f 6669 6c74 /a> er_filt │ │ │ -0001eb30: 6572 322c 0a20 3c61 2068 7265 663d 222e er2,. MatOfRec │ │ │ -0001eb80: 743c 2f61 3e26 6e62 7370 3b67 726f 7570 t group │ │ │ -0001eb90: 735f 7265 6374 7329 3c2f 7370 616e 3e3c s_rects)< │ │ │ -0001eba0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      Extract │ │ │ -0001ebc0: 7320 7465 7874 2072 6567 696f 6e73 2066 s text regions f │ │ │ -0001ebd0: 726f 6d20 696d 6167 652e 3c2f 6469 763e rom image.
      │ │ │ -0001ebe0: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
      .
      Paramete │ │ │ -0001ec00: 7273 3a3c 2f64 743e 0a3c 6464 3e3c 636f rs:
      .
      image │ │ │ -0001ec20: 2d20 536f 7572 6365 2069 6d61 6765 2077 - Source image w │ │ │ -0001ec30: 6865 7265 2074 6578 7420 626c 6f63 6b73 here text blocks │ │ │ -0001ec40: 206e 6565 6473 2074 6f20 6265 2065 7874 needs to be ext │ │ │ -0001ec50: 7261 6374 6564 2066 726f 6d2e 2020 5368 racted from. Sh │ │ │ -0001ec60: 6f75 6c64 2062 6520 4356 5f38 5543 3320 ould be CV_8UC3 │ │ │ -0001ec70: 2863 6f6c 6f72 292e 3c2f 6464 3e0a 3c64 (color).
      .er_filte │ │ │ -0001ec90: 7231 3c2f 636f 6465 3e20 2d20 4578 7472 r1 - Extr │ │ │ -0001eca0: 656d 616c 2052 6567 696f 6e20 4669 6c74 emal Region Filt │ │ │ -0001ecb0: 6572 2066 6f72 2074 6865 2031 7374 2073 er for the 1st s │ │ │ -0001ecc0: 7461 6765 2063 6c61 7373 6966 6965 7220 tage classifier │ │ │ -0001ecd0: 6f66 204e 2661 6d70 3b4d 2061 6c67 6f72 of N&M algor │ │ │ -0001ece0: 6974 686d 2043 4954 453a 204e 6575 6d61 ithm CITE: Neuma │ │ │ -0001ecf0: 6e6e 3132 3c2f 6464 3e0a 3c64 643e 3c63 nn12.
      er_filter2 - Extremal │ │ │ -0001ed20: 2052 6567 696f 6e20 4669 6c74 6572 2066 Region Filter f │ │ │ -0001ed30: 6f72 2074 6865 2032 6e64 2073 7461 6765 or the 2nd stage │ │ │ -0001ed40: 2063 6c61 7373 6966 6965 7220 6f66 204e classifier of N │ │ │ -0001ed50: 2661 6d70 3b4d 2061 6c67 6f72 6974 686d &M algorithm │ │ │ -0001ed60: 2043 4954 453a 204e 6575 6d61 6e6e 3132 CITE: Neumann12 │ │ │ -0001ed70: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
      .
      │ │ │ -0001ed80: 6772 6f75 7073 5f72 6563 7473 3c2f 636f groups_rects - Output lis │ │ │ -0001eda0: 7420 6f66 2072 6563 7461 6e67 6c65 2062 t of rectangle b │ │ │ -0001edb0: 6c6f 636b 7320 7769 7468 2074 6578 743c locks with text< │ │ │ +00010600: 2263 7265 6174 6545 5246 696c 7465 724e "createERFilterN │ │ │ +00010610: 4d31 286f 7267 2e6f 7065 6e63 762e 7465 M1(org.opencv.te │ │ │ +00010620: 7874 2e45 5246 696c 7465 725f 4361 6c6c xt.ERFilter_Call │ │ │ +00010630: 6261 636b 2c69 6e74 2c66 6c6f 6174 2c66 back,int,float,f │ │ │ +00010640: 6c6f 6174 2c66 6c6f 6174 2c62 6f6f 6c65 loat,float,boole │ │ │ +00010650: 616e 2c66 6c6f 6174 2922 3e0a 3c68 333e an,float)">.

      │ │ │ +00010660: 6372 6561 7465 4552 4669 6c74 6572 4e4d createERFilterNM │ │ │ +00010670: 313c 2f68 333e 0a3c 6469 7620 636c 6173 1

      .
      pub │ │ │ +000106b0: 6c69 6320 7374 6174 6963 3c2f 7370 616e lic static ERFilt │ │ │ +00010720: 6572 3c2f 613e 3c2f 7370 616e 3e26 6e62 er&nb │ │ │ +00010730: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;cr │ │ │ +00010750: 6561 7465 4552 4669 6c74 6572 4e4d 313c eateERFilterNM1< │ │ │ +00010760: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(ERFilter_ │ │ │ +000107d0: 4361 6c6c 6261 636b 3c2f 613e 266e 6273 Callback&nbs │ │ │ +000107e0: 703b 6362 2c0a 2069 6e74 266e 6273 703b p;cb,. int  │ │ │ +000107f0: 7468 7265 7368 6f6c 6444 656c 7461 2c0a thresholdDelta,. │ │ │ +00010800: 2066 6c6f 6174 266e 6273 703b 6d69 6e41 float minA │ │ │ +00010810: 7265 612c 0a20 666c 6f61 7426 6e62 7370 rea,. float  │ │ │ +00010820: 3b6d 6178 4172 6561 2c0a 2066 6c6f 6174 ;maxArea,. float │ │ │ +00010830: 266e 6273 703b 6d69 6e50 726f 6261 6269  minProbabi │ │ │ +00010840: 6c69 7479 2c0a 2062 6f6f 6c65 616e 266e lity,. boolean&n │ │ │ +00010850: 6273 703b 6e6f 6e4d 6178 5375 7070 7265 bsp;nonMaxSuppre │ │ │ +00010860: 7373 696f 6e2c 0a20 666c 6f61 7426 6e62 ssion,. float&nb │ │ │ +00010870: 7370 3b6d 696e 5072 6f62 6162 696c 6974 sp;minProbabilit │ │ │ +00010880: 7944 6966 6629 3c2f 7370 616e 3e3c 2f64 yDiff).
      Create an │ │ │ +000108b0: 2045 7874 7265 6d61 6c20 5265 6769 6f6e Extremal Region │ │ │ +000108c0: 2046 696c 7465 7220 666f 7220 7468 6520 Filter for the │ │ │ +000108d0: 3173 7420 7374 6167 6520 636c 6173 7369 1st stage classi │ │ │ +000108e0: 6669 6572 206f 6620 4e26 616d 703b 4d20 fier of N&M │ │ │ +000108f0: 616c 676f 7269 7468 6d20 4349 5445 3a20 algorithm CITE: │ │ │ +00010900: 4e65 756d 616e 6e31 322e 0a0a 206c 6f61 Neumann12... loa │ │ │ +00010910: 6443 6c61 7373 6966 6965 724e 4d31 2c20 dClassifierNM1, │ │ │ +00010920: 652e 672e 2066 726f 6d20 6669 6c65 2069 e.g. from file i │ │ │ +00010930: 6e20 7361 6d70 6c65 732f 6370 702f 7472 n samples/cpp/tr │ │ │ +00010940: 6169 6e65 645f 636c 6173 7369 6669 6572 ained_classifier │ │ │ +00010950: 4e4d 312e 786d 6c0a 0a20 5468 6520 636f NM1.xml.. The co │ │ │ +00010960: 6d70 6f6e 656e 7420 7472 6565 206f 6620 mponent tree of │ │ │ +00010970: 7468 6520 696d 6167 6520 6973 2065 7874 the image is ext │ │ │ +00010980: 7261 6374 6564 2062 7920 6120 7468 7265 racted by a thre │ │ │ +00010990: 7368 6f6c 6420 696e 6372 6561 7365 6420 shold increased │ │ │ +000109a0: 7374 6570 2062 7920 7374 6570 2066 726f step by step fro │ │ │ +000109b0: 6d20 3020 746f 2032 3535 2c0a 2069 6e63 m 0 to 255,. inc │ │ │ +000109c0: 7265 6d65 6e74 616c 6c79 2063 6f6d 7075 rementally compu │ │ │ +000109d0: 7461 626c 6520 6465 7363 7269 7074 6f72 table descriptor │ │ │ +000109e0: 7320 2861 7370 6563 745f 7261 7469 6f2c s (aspect_ratio, │ │ │ +000109f0: 2063 6f6d 7061 6374 6e65 7373 2c20 6e75 compactness, nu │ │ │ +00010a00: 6d62 6572 206f 6620 686f 6c65 732c 2061 mber of holes, a │ │ │ +00010a10: 6e64 206e 756d 6265 7220 6f66 0a20 686f nd number of. ho │ │ │ +00010a20: 7269 7a6f 6e74 616c 2063 726f 7373 696e rizontal crossin │ │ │ +00010a30: 6773 2920 6172 6520 636f 6d70 7574 6564 gs) are computed │ │ │ +00010a40: 2066 6f72 2065 6163 6820 4552 2061 6e64 for each ER and │ │ │ +00010a50: 2075 7365 6420 6173 2066 6561 7475 7265 used as feature │ │ │ +00010a60: 7320 666f 7220 6120 636c 6173 7369 6669 s for a classifi │ │ │ +00010a70: 6572 2077 6869 6368 2065 7374 696d 6174 er which estimat │ │ │ +00010a80: 6573 0a20 7468 6520 636c 6173 732d 636f es. the class-co │ │ │ +00010a90: 6e64 6974 696f 6e61 6c20 7072 6f62 6162 nditional probab │ │ │ +00010aa0: 696c 6974 7920 5028 6572 7c63 6861 7261 ility P(er|chara │ │ │ +00010ab0: 6374 6572 292e 2054 6865 2076 616c 7565 cter). The value │ │ │ +00010ac0: 206f 6620 5028 6572 7c63 6861 7261 6374 of P(er|charact │ │ │ +00010ad0: 6572 2920 6973 2074 7261 636b 6564 2075 er) is tracked u │ │ │ +00010ae0: 7369 6e67 2074 6865 0a20 696e 636c 7573 sing the. inclus │ │ │ +00010af0: 696f 6e20 7265 6c61 7469 6f6e 206f 6620 ion relation of │ │ │ +00010b00: 4552 2061 6372 6f73 7320 616c 6c20 7468 ER across all th │ │ │ +00010b10: 7265 7368 6f6c 6473 2061 6e64 206f 6e6c resholds and onl │ │ │ +00010b20: 7920 7468 6520 4552 7320 7768 6963 6820 y the ERs which │ │ │ +00010b30: 636f 7272 6573 706f 6e64 2074 6f20 6c6f correspond to lo │ │ │ +00010b40: 6361 6c20 6d61 7869 6d75 6d20 6f66 0a20 cal maximum of. │ │ │ +00010b50: 7468 6520 7072 6f62 6162 696c 6974 7920 the probability │ │ │ +00010b60: 5028 6572 7c63 6861 7261 6374 6572 2920 P(er|character) │ │ │ +00010b70: 6172 6520 7365 6c65 6374 6564 2028 6966 are selected (if │ │ │ +00010b80: 2074 6865 206c 6f63 616c 206d 6178 696d the local maxim │ │ │ +00010b90: 756d 206f 6620 7468 6520 7072 6f62 6162 um of the probab │ │ │ +00010ba0: 696c 6974 7920 6973 2061 626f 7665 2061 ility is above a │ │ │ +00010bb0: 0a20 676c 6f62 616c 206c 696d 6974 2070 . global limit p │ │ │ +00010bc0: 6d69 6e20 616e 6420 7468 6520 6469 6666 min and the diff │ │ │ +00010bd0: 6572 656e 6365 2062 6574 7765 656e 206c erence between l │ │ │ +00010be0: 6f63 616c 206d 6178 696d 756d 2061 6e64 ocal maximum and │ │ │ +00010bf0: 206c 6f63 616c 206d 696e 696d 756d 2069 local minimum i │ │ │ +00010c00: 7320 6772 6561 7465 7220 7468 616e 0a20 s greater than. │ │ │ +00010c10: 6d69 6e50 726f 6261 6269 6c69 7479 4469 minProbabilityDi │ │ │ +00010c20: 6666 292e 3c2f 6469 763e 0a3c 646c 2063 ff).
      .
      .Parameters:.
      cb< │ │ │ +00010c60: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ +00010c70: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ +00010c80: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
      .
      │ │ │ +00010c90: 7468 7265 7368 6f6c 6444 656c 7461 3c2f thresholdDelta - automati │ │ │ +00010cb0: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +00010cc0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e6d /dd>.
      m │ │ │ +00010cd0: 696e 4172 6561 3c2f 636f 6465 3e20 2d20 inArea - │ │ │ +00010ce0: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +00010cf0: 6e65 7261 7465 643c 2f64 643e 0a3c 6464 nerated
      .
      maxArea - automati │ │ │ +00010d20: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +00010d30: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e6d /dd>.
      m │ │ │ +00010d40: 696e 5072 6f62 6162 696c 6974 793c 2f63 inProbability - automatic │ │ │ +00010d60: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      no │ │ │ +00010d80: 6e4d 6178 5375 7070 7265 7373 696f 6e3c nMaxSuppression< │ │ │ +00010d90: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ +00010da0: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ +00010db0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
      .
      │ │ │ +00010dc0: 6d69 6e50 726f 6261 6269 6c69 7479 4469 minProbabilityDi │ │ │ +00010dd0: 6666 3c2f 636f 6465 3e20 2d20 6175 746f ff - auto │ │ │ +00010de0: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ +00010df0: 7465 643c 2f64 643e 0a3c 6474 3e52 6574 ted
      .
      Ret │ │ │ +00010e00: 7572 6e73 3a3c 2f64 743e 0a3c 6464 3e61 urns:
      .
      a │ │ │ +00010e10: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ +00010e20: 6572 6174 6564 3c2f 6464 3e0a 3c2f 646c erated
      .
      .
      ..
    • .
      .

      cre │ │ │ +00010ec0: 6174 6545 5246 696c 7465 724e 4d31 3c2f ateERFilterNM1.
      public │ │ │ +00010f10: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ +00010f20: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;ERFilter< │ │ │ +00010f80: 2f61 3e3c 2f73 7061 6e3e 266e 6273 703b /a>  │ │ │ +00010f90: 3c73 7061 6e20 636c 6173 733d 2265 6c65 creat │ │ │ +00010fb0: 6545 5246 696c 7465 724e 4d31 3c2f 7370 eERFilterNM1(ERFilter_Cal │ │ │ +00011030: 6c62 6163 6b3c 2f61 3e26 6e62 7370 3b63 lback c │ │ │ +00011040: 622c 0a20 696e 7426 6e62 7370 3b74 6872 b,. int thr │ │ │ +00011050: 6573 686f 6c64 4465 6c74 612c 0a20 666c esholdDelta,. fl │ │ │ +00011060: 6f61 7426 6e62 7370 3b6d 696e 4172 6561 oat minArea │ │ │ +00011070: 2c0a 2066 6c6f 6174 266e 6273 703b 6d61 ,. float ma │ │ │ +00011080: 7841 7265 612c 0a20 666c 6f61 7426 6e62 xArea,. float&nb │ │ │ +00011090: 7370 3b6d 696e 5072 6f62 6162 696c 6974 sp;minProbabilit │ │ │ +000110a0: 792c 0a20 626f 6f6c 6561 6e26 6e62 7370 y,. boolean  │ │ │ +000110b0: 3b6e 6f6e 4d61 7853 7570 7072 6573 7369 ;nonMaxSuppressi │ │ │ +000110c0: 6f6e 293c 2f73 7061 6e3e 3c2f 6469 763e on)
      │ │ │ +000110d0: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
      Create an Ex │ │ │ +000110f0: 7472 656d 616c 2052 6567 696f 6e20 4669 tremal Region Fi │ │ │ +00011100: 6c74 6572 2066 6f72 2074 6865 2031 7374 lter for the 1st │ │ │ +00011110: 2073 7461 6765 2063 6c61 7373 6966 6965 stage classifie │ │ │ +00011120: 7220 6f66 204e 2661 6d70 3b4d 2061 6c67 r of N&M alg │ │ │ +00011130: 6f72 6974 686d 2043 4954 453a 204e 6575 orithm CITE: Neu │ │ │ +00011140: 6d61 6e6e 3132 2e0a 0a20 6c6f 6164 436c mann12... loadCl │ │ │ +00011150: 6173 7369 6669 6572 4e4d 312c 2065 2e67 assifierNM1, e.g │ │ │ +00011160: 2e20 6672 6f6d 2066 696c 6520 696e 2073 . from file in s │ │ │ +00011170: 616d 706c 6573 2f63 7070 2f74 7261 696e amples/cpp/train │ │ │ +00011180: 6564 5f63 6c61 7373 6966 6965 724e 4d31 ed_classifierNM1 │ │ │ +00011190: 2e78 6d6c 0a0a 2054 6865 2063 6f6d 706f .xml.. The compo │ │ │ +000111a0: 6e65 6e74 2074 7265 6520 6f66 2074 6865 nent tree of the │ │ │ +000111b0: 2069 6d61 6765 2069 7320 6578 7472 6163 image is extrac │ │ │ +000111c0: 7465 6420 6279 2061 2074 6872 6573 686f ted by a thresho │ │ │ +000111d0: 6c64 2069 6e63 7265 6173 6564 2073 7465 ld increased ste │ │ │ +000111e0: 7020 6279 2073 7465 7020 6672 6f6d 2030 p by step from 0 │ │ │ +000111f0: 2074 6f20 3235 352c 0a20 696e 6372 656d to 255,. increm │ │ │ +00011200: 656e 7461 6c6c 7920 636f 6d70 7574 6162 entally computab │ │ │ +00011210: 6c65 2064 6573 6372 6970 746f 7273 2028 le descriptors ( │ │ │ +00011220: 6173 7065 6374 5f72 6174 696f 2c20 636f aspect_ratio, co │ │ │ +00011230: 6d70 6163 746e 6573 732c 206e 756d 6265 mpactness, numbe │ │ │ +00011240: 7220 6f66 2068 6f6c 6573 2c20 616e 6420 r of holes, and │ │ │ +00011250: 6e75 6d62 6572 206f 660a 2068 6f72 697a number of. horiz │ │ │ +00011260: 6f6e 7461 6c20 6372 6f73 7369 6e67 7329 ontal crossings) │ │ │ +00011270: 2061 7265 2063 6f6d 7075 7465 6420 666f are computed fo │ │ │ +00011280: 7220 6561 6368 2045 5220 616e 6420 7573 r each ER and us │ │ │ +00011290: 6564 2061 7320 6665 6174 7572 6573 2066 ed as features f │ │ │ +000112a0: 6f72 2061 2063 6c61 7373 6966 6965 7220 or a classifier │ │ │ +000112b0: 7768 6963 6820 6573 7469 6d61 7465 730a which estimates. │ │ │ +000112c0: 2074 6865 2063 6c61 7373 2d63 6f6e 6469 the class-condi │ │ │ +000112d0: 7469 6f6e 616c 2070 726f 6261 6269 6c69 tional probabili │ │ │ +000112e0: 7479 2050 2865 727c 6368 6172 6163 7465 ty P(er|characte │ │ │ +000112f0: 7229 2e20 5468 6520 7661 6c75 6520 6f66 r). The value of │ │ │ +00011300: 2050 2865 727c 6368 6172 6163 7465 7229 P(er|character) │ │ │ +00011310: 2069 7320 7472 6163 6b65 6420 7573 696e is tracked usin │ │ │ +00011320: 6720 7468 650a 2069 6e63 6c75 7369 6f6e g the. inclusion │ │ │ +00011330: 2072 656c 6174 696f 6e20 6f66 2045 5220 relation of ER │ │ │ +00011340: 6163 726f 7373 2061 6c6c 2074 6872 6573 across all thres │ │ │ +00011350: 686f 6c64 7320 616e 6420 6f6e 6c79 2074 holds and only t │ │ │ +00011360: 6865 2045 5273 2077 6869 6368 2063 6f72 he ERs which cor │ │ │ +00011370: 7265 7370 6f6e 6420 746f 206c 6f63 616c respond to local │ │ │ +00011380: 206d 6178 696d 756d 206f 660a 2074 6865 maximum of. the │ │ │ +00011390: 2070 726f 6261 6269 6c69 7479 2050 2865 probability P(e │ │ │ +000113a0: 727c 6368 6172 6163 7465 7229 2061 7265 r|character) are │ │ │ +000113b0: 2073 656c 6563 7465 6420 2869 6620 7468 selected (if th │ │ │ +000113c0: 6520 6c6f 6361 6c20 6d61 7869 6d75 6d20 e local maximum │ │ │ +000113d0: 6f66 2074 6865 2070 726f 6261 6269 6c69 of the probabili │ │ │ +000113e0: 7479 2069 7320 6162 6f76 6520 610a 2067 ty is above a. g │ │ │ +000113f0: 6c6f 6261 6c20 6c69 6d69 7420 706d 696e lobal limit pmin │ │ │ +00011400: 2061 6e64 2074 6865 2064 6966 6665 7265 and the differe │ │ │ +00011410: 6e63 6520 6265 7477 6565 6e20 6c6f 6361 nce between loca │ │ │ +00011420: 6c20 6d61 7869 6d75 6d20 616e 6420 6c6f l maximum and lo │ │ │ +00011430: 6361 6c20 6d69 6e69 6d75 6d20 6973 2067 cal minimum is g │ │ │ +00011440: 7265 6174 6572 2074 6861 6e0a 206d 696e reater than. min │ │ │ +00011450: 5072 6f62 6162 696c 6974 7944 6966 6629 ProbabilityDiff) │ │ │ +00011460: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 .
      .
      .
      P │ │ │ +00011480: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
      . │ │ │ +00011490: 3c64 643e 3c63 6f64 653e 6362 3c2f 636f
      cb - automatica │ │ │ +000114b0: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
      thr │ │ │ +000114d0: 6573 686f 6c64 4465 6c74 613c 2f63 6f64 esholdDelta - automatical │ │ │ +000114f0: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
      .
      minA │ │ │ +00011510: 7265 613c 2f63 6f64 653e 202d 2061 7574 rea - aut │ │ │ +00011520: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ +00011530: 6174 6564 3c2f 6464 3e0a 3c64 643e 3c63 ated
      .
      maxArea - automatical │ │ │ +00011560: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
      .
      minP │ │ │ +00011580: 726f 6261 6269 6c69 7479 3c2f 636f 6465 robability - automaticall │ │ │ +000115a0: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
      │ │ │ +000115b0: 0a3c 6464 3e3c 636f 6465 3e6e 6f6e 4d61 .
      nonMa │ │ │ +000115c0: 7853 7570 7072 6573 7369 6f6e 3c2f 636f xSuppression - automatica │ │ │ +000115e0: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
      Returns:< │ │ │ +00011600: 2f64 743e 0a3c 6464 3e61 7574 6f6d 6174 /dt>.
      automat │ │ │ +00011610: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ +00011620: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365
      .
      ..

    • .
    • .
      .

      c │ │ │ +000116b0: 7265 6174 6545 5246 696c 7465 724e 4d31 reateERFilterNM1 │ │ │ +000116c0: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

      .
      publ │ │ │ +00011700: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ +00011710: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ +00011730: 3c61 2068 7265 663d 2245 5246 696c 7465 ERFilte │ │ │ +00011770: 723c 2f61 3e3c 2f73 7061 6e3e 266e 6273 r&nbs │ │ │ +00011780: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;cre │ │ │ +000117a0: 6174 6545 5246 696c 7465 724e 4d31 3c2f ateERFilterNM1(ERFilter_C │ │ │ +00011820: 616c 6c62 6163 6b3c 2f61 3e26 6e62 7370 allback  │ │ │ +00011830: 3b63 622c 0a20 696e 7426 6e62 7370 3b74 ;cb,. int t │ │ │ +00011840: 6872 6573 686f 6c64 4465 6c74 612c 0a20 hresholdDelta,. │ │ │ +00011850: 666c 6f61 7426 6e62 7370 3b6d 696e 4172 float minAr │ │ │ +00011860: 6561 2c0a 2066 6c6f 6174 266e 6273 703b ea,. float  │ │ │ +00011870: 6d61 7841 7265 612c 0a20 666c 6f61 7426 maxArea,. float& │ │ │ +00011880: 6e62 7370 3b6d 696e 5072 6f62 6162 696c nbsp;minProbabil │ │ │ +00011890: 6974 7929 3c2f 7370 616e 3e3c 2f64 6976 ity)
      .
      Create an E │ │ │ +000118c0: 7874 7265 6d61 6c20 5265 6769 6f6e 2046 xtremal Region F │ │ │ +000118d0: 696c 7465 7220 666f 7220 7468 6520 3173 ilter for the 1s │ │ │ +000118e0: 7420 7374 6167 6520 636c 6173 7369 6669 t stage classifi │ │ │ +000118f0: 6572 206f 6620 4e26 616d 703b 4d20 616c er of N&M al │ │ │ +00011900: 676f 7269 7468 6d20 4349 5445 3a20 4e65 gorithm CITE: Ne │ │ │ +00011910: 756d 616e 6e31 322e 0a0a 206c 6f61 6443 umann12... loadC │ │ │ +00011920: 6c61 7373 6966 6965 724e 4d31 2c20 652e lassifierNM1, e. │ │ │ +00011930: 672e 2066 726f 6d20 6669 6c65 2069 6e20 g. from file in │ │ │ +00011940: 7361 6d70 6c65 732f 6370 702f 7472 6169 samples/cpp/trai │ │ │ +00011950: 6e65 645f 636c 6173 7369 6669 6572 4e4d ned_classifierNM │ │ │ +00011960: 312e 786d 6c0a 0a20 5468 6520 636f 6d70 1.xml.. The comp │ │ │ +00011970: 6f6e 656e 7420 7472 6565 206f 6620 7468 onent tree of th │ │ │ +00011980: 6520 696d 6167 6520 6973 2065 7874 7261 e image is extra │ │ │ +00011990: 6374 6564 2062 7920 6120 7468 7265 7368 cted by a thresh │ │ │ +000119a0: 6f6c 6420 696e 6372 6561 7365 6420 7374 old increased st │ │ │ +000119b0: 6570 2062 7920 7374 6570 2066 726f 6d20 ep by step from │ │ │ +000119c0: 3020 746f 2032 3535 2c0a 2069 6e63 7265 0 to 255,. incre │ │ │ +000119d0: 6d65 6e74 616c 6c79 2063 6f6d 7075 7461 mentally computa │ │ │ +000119e0: 626c 6520 6465 7363 7269 7074 6f72 7320 ble descriptors │ │ │ +000119f0: 2861 7370 6563 745f 7261 7469 6f2c 2063 (aspect_ratio, c │ │ │ +00011a00: 6f6d 7061 6374 6e65 7373 2c20 6e75 6d62 ompactness, numb │ │ │ +00011a10: 6572 206f 6620 686f 6c65 732c 2061 6e64 er of holes, and │ │ │ +00011a20: 206e 756d 6265 7220 6f66 0a20 686f 7269 number of. hori │ │ │ +00011a30: 7a6f 6e74 616c 2063 726f 7373 696e 6773 zontal crossings │ │ │ +00011a40: 2920 6172 6520 636f 6d70 7574 6564 2066 ) are computed f │ │ │ +00011a50: 6f72 2065 6163 6820 4552 2061 6e64 2075 or each ER and u │ │ │ +00011a60: 7365 6420 6173 2066 6561 7475 7265 7320 sed as features │ │ │ +00011a70: 666f 7220 6120 636c 6173 7369 6669 6572 for a classifier │ │ │ +00011a80: 2077 6869 6368 2065 7374 696d 6174 6573 which estimates │ │ │ +00011a90: 0a20 7468 6520 636c 6173 732d 636f 6e64 . the class-cond │ │ │ +00011aa0: 6974 696f 6e61 6c20 7072 6f62 6162 696c itional probabil │ │ │ +00011ab0: 6974 7920 5028 6572 7c63 6861 7261 6374 ity P(er|charact │ │ │ +00011ac0: 6572 292e 2054 6865 2076 616c 7565 206f er). The value o │ │ │ +00011ad0: 6620 5028 6572 7c63 6861 7261 6374 6572 f P(er|character │ │ │ +00011ae0: 2920 6973 2074 7261 636b 6564 2075 7369 ) is tracked usi │ │ │ +00011af0: 6e67 2074 6865 0a20 696e 636c 7573 696f ng the. inclusio │ │ │ +00011b00: 6e20 7265 6c61 7469 6f6e 206f 6620 4552 n relation of ER │ │ │ +00011b10: 2061 6372 6f73 7320 616c 6c20 7468 7265 across all thre │ │ │ +00011b20: 7368 6f6c 6473 2061 6e64 206f 6e6c 7920 sholds and only │ │ │ +00011b30: 7468 6520 4552 7320 7768 6963 6820 636f the ERs which co │ │ │ +00011b40: 7272 6573 706f 6e64 2074 6f20 6c6f 6361 rrespond to loca │ │ │ +00011b50: 6c20 6d61 7869 6d75 6d20 6f66 0a20 7468 l maximum of. th │ │ │ +00011b60: 6520 7072 6f62 6162 696c 6974 7920 5028 e probability P( │ │ │ +00011b70: 6572 7c63 6861 7261 6374 6572 2920 6172 er|character) ar │ │ │ +00011b80: 6520 7365 6c65 6374 6564 2028 6966 2074 e selected (if t │ │ │ +00011b90: 6865 206c 6f63 616c 206d 6178 696d 756d he local maximum │ │ │ +00011ba0: 206f 6620 7468 6520 7072 6f62 6162 696c of the probabil │ │ │ +00011bb0: 6974 7920 6973 2061 626f 7665 2061 0a20 ity is above a. │ │ │ +00011bc0: 676c 6f62 616c 206c 696d 6974 2070 6d69 global limit pmi │ │ │ +00011bd0: 6e20 616e 6420 7468 6520 6469 6666 6572 n and the differ │ │ │ +00011be0: 656e 6365 2062 6574 7765 656e 206c 6f63 ence between loc │ │ │ +00011bf0: 616c 206d 6178 696d 756d 2061 6e64 206c al maximum and l │ │ │ +00011c00: 6f63 616c 206d 696e 696d 756d 2069 7320 ocal minimum is │ │ │ +00011c10: 6772 6561 7465 7220 7468 616e 0a20 6d69 greater than. mi │ │ │ +00011c20: 6e50 726f 6261 6269 6c69 7479 4469 6666 nProbabilityDiff │ │ │ +00011c30: 292e 3c2f 6469 763e 0a3c 646c 2063 6c61 ).
      .
      .
      │ │ │ +00011c50: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
      │ │ │ +00011c60: 0a3c 6464 3e3c 636f 6465 3e63 623c 2f63 .
      cb - automatic │ │ │ +00011c80: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      th │ │ │ +00011ca0: 7265 7368 6f6c 6444 656c 7461 3c2f 636f resholdDelta - automatica │ │ │ +00011cc0: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
      min │ │ │ +00011ce0: 4172 6561 3c2f 636f 6465 3e20 2d20 6175 Area - au │ │ │ +00011cf0: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ +00011d00: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated
      .
      < │ │ │ +00011d10: 636f 6465 3e6d 6178 4172 6561 3c2f 636f code>maxArea - automatica │ │ │ +00011d30: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
      min │ │ │ +00011d50: 5072 6f62 6162 696c 6974 793c 2f63 6f64 Probability - automatical │ │ │ +00011d70: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
      .
      Returns:.
      automati │ │ │ +00011da0: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +00011db0: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.
      ..
    • .
    • │ │ │ +00011dd0: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
      .

      createER │ │ │ +00011e40: 4669 6c74 6572 4e4d 313c 2f68 333e 0a3c FilterNM1

      .< │ │ │ +00011e50: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ +00011e60: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ +00011e90: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ +00011ea0: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ +00011eb0: 726e 2d74 7970 6522 3e3c 6120 6872 6566 rn-type">ERFilter createERFi │ │ │ +00011f30: 6c74 6572 4e4d 313c 2f73 7061 6e3e 3c77 lterNM1(E │ │ │ +00011fa0: 5246 696c 7465 725f 4361 6c6c 6261 636b RFilter_Callback │ │ │ +00011fb0: 3c2f 613e 266e 6273 703b 6362 2c0a 2069  cb,. i │ │ │ +00011fc0: 6e74 266e 6273 703b 7468 7265 7368 6f6c nt threshol │ │ │ +00011fd0: 6444 656c 7461 2c0a 2066 6c6f 6174 266e dDelta,. float&n │ │ │ +00011fe0: 6273 703b 6d69 6e41 7265 612c 0a20 666c bsp;minArea,. fl │ │ │ +00011ff0: 6f61 7426 6e62 7370 3b6d 6178 4172 6561 oat maxArea │ │ │ +00012000: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ).< │ │ │ +00012010: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ +00012020: 223e 4372 6561 7465 2061 6e20 4578 7472 ">Create an Extr │ │ │ +00012030: 656d 616c 2052 6567 696f 6e20 4669 6c74 emal Region Filt │ │ │ +00012040: 6572 2066 6f72 2074 6865 2031 7374 2073 er for the 1st s │ │ │ +00012050: 7461 6765 2063 6c61 7373 6966 6965 7220 tage classifier │ │ │ +00012060: 6f66 204e 2661 6d70 3b4d 2061 6c67 6f72 of N&M algor │ │ │ +00012070: 6974 686d 2043 4954 453a 204e 6575 6d61 ithm CITE: Neuma │ │ │ +00012080: 6e6e 3132 2e0a 0a20 6c6f 6164 436c 6173 nn12... loadClas │ │ │ +00012090: 7369 6669 6572 4e4d 312c 2065 2e67 2e20 sifierNM1, e.g. │ │ │ +000120a0: 6672 6f6d 2066 696c 6520 696e 2073 616d from file in sam │ │ │ +000120b0: 706c 6573 2f63 7070 2f74 7261 696e 6564 ples/cpp/trained │ │ │ +000120c0: 5f63 6c61 7373 6966 6965 724e 4d31 2e78 _classifierNM1.x │ │ │ +000120d0: 6d6c 0a0a 2054 6865 2063 6f6d 706f 6e65 ml.. The compone │ │ │ +000120e0: 6e74 2074 7265 6520 6f66 2074 6865 2069 nt tree of the i │ │ │ +000120f0: 6d61 6765 2069 7320 6578 7472 6163 7465 mage is extracte │ │ │ +00012100: 6420 6279 2061 2074 6872 6573 686f 6c64 d by a threshold │ │ │ +00012110: 2069 6e63 7265 6173 6564 2073 7465 7020 increased step │ │ │ +00012120: 6279 2073 7465 7020 6672 6f6d 2030 2074 by step from 0 t │ │ │ +00012130: 6f20 3235 352c 0a20 696e 6372 656d 656e o 255,. incremen │ │ │ +00012140: 7461 6c6c 7920 636f 6d70 7574 6162 6c65 tally computable │ │ │ +00012150: 2064 6573 6372 6970 746f 7273 2028 6173 descriptors (as │ │ │ +00012160: 7065 6374 5f72 6174 696f 2c20 636f 6d70 pect_ratio, comp │ │ │ +00012170: 6163 746e 6573 732c 206e 756d 6265 7220 actness, number │ │ │ +00012180: 6f66 2068 6f6c 6573 2c20 616e 6420 6e75 of holes, and nu │ │ │ +00012190: 6d62 6572 206f 660a 2068 6f72 697a 6f6e mber of. horizon │ │ │ +000121a0: 7461 6c20 6372 6f73 7369 6e67 7329 2061 tal crossings) a │ │ │ +000121b0: 7265 2063 6f6d 7075 7465 6420 666f 7220 re computed for │ │ │ +000121c0: 6561 6368 2045 5220 616e 6420 7573 6564 each ER and used │ │ │ +000121d0: 2061 7320 6665 6174 7572 6573 2066 6f72 as features for │ │ │ +000121e0: 2061 2063 6c61 7373 6966 6965 7220 7768 a classifier wh │ │ │ +000121f0: 6963 6820 6573 7469 6d61 7465 730a 2074 ich estimates. t │ │ │ +00012200: 6865 2063 6c61 7373 2d63 6f6e 6469 7469 he class-conditi │ │ │ +00012210: 6f6e 616c 2070 726f 6261 6269 6c69 7479 onal probability │ │ │ +00012220: 2050 2865 727c 6368 6172 6163 7465 7229 P(er|character) │ │ │ +00012230: 2e20 5468 6520 7661 6c75 6520 6f66 2050 . The value of P │ │ │ +00012240: 2865 727c 6368 6172 6163 7465 7229 2069 (er|character) i │ │ │ +00012250: 7320 7472 6163 6b65 6420 7573 696e 6720 s tracked using │ │ │ +00012260: 7468 650a 2069 6e63 6c75 7369 6f6e 2072 the. inclusion r │ │ │ +00012270: 656c 6174 696f 6e20 6f66 2045 5220 6163 elation of ER ac │ │ │ +00012280: 726f 7373 2061 6c6c 2074 6872 6573 686f ross all thresho │ │ │ +00012290: 6c64 7320 616e 6420 6f6e 6c79 2074 6865 lds and only the │ │ │ +000122a0: 2045 5273 2077 6869 6368 2063 6f72 7265 ERs which corre │ │ │ +000122b0: 7370 6f6e 6420 746f 206c 6f63 616c 206d spond to local m │ │ │ +000122c0: 6178 696d 756d 206f 660a 2074 6865 2070 aximum of. the p │ │ │ +000122d0: 726f 6261 6269 6c69 7479 2050 2865 727c robability P(er| │ │ │ +000122e0: 6368 6172 6163 7465 7229 2061 7265 2073 character) are s │ │ │ +000122f0: 656c 6563 7465 6420 2869 6620 7468 6520 elected (if the │ │ │ +00012300: 6c6f 6361 6c20 6d61 7869 6d75 6d20 6f66 local maximum of │ │ │ +00012310: 2074 6865 2070 726f 6261 6269 6c69 7479 the probability │ │ │ +00012320: 2069 7320 6162 6f76 6520 610a 2067 6c6f is above a. glo │ │ │ +00012330: 6261 6c20 6c69 6d69 7420 706d 696e 2061 bal limit pmin a │ │ │ +00012340: 6e64 2074 6865 2064 6966 6665 7265 6e63 nd the differenc │ │ │ +00012350: 6520 6265 7477 6565 6e20 6c6f 6361 6c20 e between local │ │ │ +00012360: 6d61 7869 6d75 6d20 616e 6420 6c6f 6361 maximum and loca │ │ │ +00012370: 6c20 6d69 6e69 6d75 6d20 6973 2067 7265 l minimum is gre │ │ │ +00012380: 6174 6572 2074 6861 6e0a 206d 696e 5072 ater than. minPr │ │ │ +00012390: 6f62 6162 696c 6974 7944 6966 6629 2e3c obabilityDiff).< │ │ │ +000123a0: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
      .
      Par │ │ │ +000123c0: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
      .cb - automaticall │ │ │ +000123f0: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated │ │ │ +00012400: 0a3c 6464 3e3c 636f 6465 3e74 6872 6573 .
      thres │ │ │ +00012410: 686f 6c64 4465 6c74 613c 2f63 6f64 653e holdDelta │ │ │ +00012420: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ +00012430: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
      . │ │ │ +00012440: 3c64 643e 3c63 6f64 653e 6d69 6e41 7265
      minAre │ │ │ +00012450: 613c 2f63 6f64 653e 202d 2061 7574 6f6d a - autom │ │ │ +00012460: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +00012470: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
      .
      maxArea │ │ │ +00012490: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ +000124a0: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
      . │ │ │ +000124b0: 3c64 743e 5265 7475 726e 733a 3c2f 6474
      Returns:
      .
      automatica │ │ │ +000124d0: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
      ..
    • .
    • .< │ │ │ +00012500: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ +00012510: 6574 6169 6c22 2069 643d 2263 7265 6174 etail" id="creat │ │ │ +00012520: 6545 5246 696c 7465 724e 4d31 286f 7267 eERFilterNM1(org │ │ │ +00012530: 2e6f 7065 6e63 762e 7465 7874 2e45 5246 .opencv.text.ERF │ │ │ +00012540: 696c 7465 725f 4361 6c6c 6261 636b 2c69 ilter_Callback,i │ │ │ +00012550: 6e74 2c66 6c6f 6174 2922 3e0a 3c68 333e nt,float)">.

      │ │ │ +00012560: 6372 6561 7465 4552 4669 6c74 6572 4e4d createERFilterNM │ │ │ +00012570: 313c 2f68 333e 0a3c 6469 7620 636c 6173 1

      .
      pub │ │ │ +000125b0: 6c69 6320 7374 6174 6963 3c2f 7370 616e lic static ERFilt │ │ │ +00012620: 6572 3c2f 613e 3c2f 7370 616e 3e26 6e62 er&nb │ │ │ +00012630: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;cr │ │ │ +00012650: 6561 7465 4552 4669 6c74 6572 4e4d 313c eateERFilterNM1< │ │ │ +00012660: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(ERFilter_ │ │ │ +000126d0: 4361 6c6c 6261 636b 3c2f 613e 266e 6273 Callback&nbs │ │ │ +000126e0: 703b 6362 2c0a 2069 6e74 266e 6273 703b p;cb,. int  │ │ │ +000126f0: 7468 7265 7368 6f6c 6444 656c 7461 2c0a thresholdDelta,. │ │ │ +00012700: 2066 6c6f 6174 266e 6273 703b 6d69 6e41 float minA │ │ │ +00012710: 7265 6129 3c2f 7370 616e 3e3c 2f64 6976 rea)
      .
      Create an E │ │ │ +00012740: 7874 7265 6d61 6c20 5265 6769 6f6e 2046 xtremal Region F │ │ │ +00012750: 696c 7465 7220 666f 7220 7468 6520 3173 ilter for the 1s │ │ │ +00012760: 7420 7374 6167 6520 636c 6173 7369 6669 t stage classifi │ │ │ +00012770: 6572 206f 6620 4e26 616d 703b 4d20 616c er of N&M al │ │ │ +00012780: 676f 7269 7468 6d20 4349 5445 3a20 4e65 gorithm CITE: Ne │ │ │ +00012790: 756d 616e 6e31 322e 0a0a 206c 6f61 6443 umann12... loadC │ │ │ +000127a0: 6c61 7373 6966 6965 724e 4d31 2c20 652e lassifierNM1, e. │ │ │ +000127b0: 672e 2066 726f 6d20 6669 6c65 2069 6e20 g. from file in │ │ │ +000127c0: 7361 6d70 6c65 732f 6370 702f 7472 6169 samples/cpp/trai │ │ │ +000127d0: 6e65 645f 636c 6173 7369 6669 6572 4e4d ned_classifierNM │ │ │ +000127e0: 312e 786d 6c0a 0a20 5468 6520 636f 6d70 1.xml.. The comp │ │ │ +000127f0: 6f6e 656e 7420 7472 6565 206f 6620 7468 onent tree of th │ │ │ +00012800: 6520 696d 6167 6520 6973 2065 7874 7261 e image is extra │ │ │ +00012810: 6374 6564 2062 7920 6120 7468 7265 7368 cted by a thresh │ │ │ +00012820: 6f6c 6420 696e 6372 6561 7365 6420 7374 old increased st │ │ │ +00012830: 6570 2062 7920 7374 6570 2066 726f 6d20 ep by step from │ │ │ +00012840: 3020 746f 2032 3535 2c0a 2069 6e63 7265 0 to 255,. incre │ │ │ +00012850: 6d65 6e74 616c 6c79 2063 6f6d 7075 7461 mentally computa │ │ │ +00012860: 626c 6520 6465 7363 7269 7074 6f72 7320 ble descriptors │ │ │ +00012870: 2861 7370 6563 745f 7261 7469 6f2c 2063 (aspect_ratio, c │ │ │ +00012880: 6f6d 7061 6374 6e65 7373 2c20 6e75 6d62 ompactness, numb │ │ │ +00012890: 6572 206f 6620 686f 6c65 732c 2061 6e64 er of holes, and │ │ │ +000128a0: 206e 756d 6265 7220 6f66 0a20 686f 7269 number of. hori │ │ │ +000128b0: 7a6f 6e74 616c 2063 726f 7373 696e 6773 zontal crossings │ │ │ +000128c0: 2920 6172 6520 636f 6d70 7574 6564 2066 ) are computed f │ │ │ +000128d0: 6f72 2065 6163 6820 4552 2061 6e64 2075 or each ER and u │ │ │ +000128e0: 7365 6420 6173 2066 6561 7475 7265 7320 sed as features │ │ │ +000128f0: 666f 7220 6120 636c 6173 7369 6669 6572 for a classifier │ │ │ +00012900: 2077 6869 6368 2065 7374 696d 6174 6573 which estimates │ │ │ +00012910: 0a20 7468 6520 636c 6173 732d 636f 6e64 . the class-cond │ │ │ +00012920: 6974 696f 6e61 6c20 7072 6f62 6162 696c itional probabil │ │ │ +00012930: 6974 7920 5028 6572 7c63 6861 7261 6374 ity P(er|charact │ │ │ +00012940: 6572 292e 2054 6865 2076 616c 7565 206f er). The value o │ │ │ +00012950: 6620 5028 6572 7c63 6861 7261 6374 6572 f P(er|character │ │ │ +00012960: 2920 6973 2074 7261 636b 6564 2075 7369 ) is tracked usi │ │ │ +00012970: 6e67 2074 6865 0a20 696e 636c 7573 696f ng the. inclusio │ │ │ +00012980: 6e20 7265 6c61 7469 6f6e 206f 6620 4552 n relation of ER │ │ │ +00012990: 2061 6372 6f73 7320 616c 6c20 7468 7265 across all thre │ │ │ +000129a0: 7368 6f6c 6473 2061 6e64 206f 6e6c 7920 sholds and only │ │ │ +000129b0: 7468 6520 4552 7320 7768 6963 6820 636f the ERs which co │ │ │ +000129c0: 7272 6573 706f 6e64 2074 6f20 6c6f 6361 rrespond to loca │ │ │ +000129d0: 6c20 6d61 7869 6d75 6d20 6f66 0a20 7468 l maximum of. th │ │ │ +000129e0: 6520 7072 6f62 6162 696c 6974 7920 5028 e probability P( │ │ │ +000129f0: 6572 7c63 6861 7261 6374 6572 2920 6172 er|character) ar │ │ │ +00012a00: 6520 7365 6c65 6374 6564 2028 6966 2074 e selected (if t │ │ │ +00012a10: 6865 206c 6f63 616c 206d 6178 696d 756d he local maximum │ │ │ +00012a20: 206f 6620 7468 6520 7072 6f62 6162 696c of the probabil │ │ │ +00012a30: 6974 7920 6973 2061 626f 7665 2061 0a20 ity is above a. │ │ │ +00012a40: 676c 6f62 616c 206c 696d 6974 2070 6d69 global limit pmi │ │ │ +00012a50: 6e20 616e 6420 7468 6520 6469 6666 6572 n and the differ │ │ │ +00012a60: 656e 6365 2062 6574 7765 656e 206c 6f63 ence between loc │ │ │ +00012a70: 616c 206d 6178 696d 756d 2061 6e64 206c al maximum and l │ │ │ +00012a80: 6f63 616c 206d 696e 696d 756d 2069 7320 ocal minimum is │ │ │ +00012a90: 6772 6561 7465 7220 7468 616e 0a20 6d69 greater than. mi │ │ │ +00012aa0: 6e50 726f 6261 6269 6c69 7479 4469 6666 nProbabilityDiff │ │ │ +00012ab0: 292e 3c2f 6469 763e 0a3c 646c 2063 6c61 ).
      .
      .
      │ │ │ +00012ad0: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
      │ │ │ +00012ae0: 0a3c 6464 3e3c 636f 6465 3e63 623c 2f63 .
      cb - automatic │ │ │ +00012b00: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      th │ │ │ +00012b20: 7265 7368 6f6c 6444 656c 7461 3c2f 636f resholdDelta - automatica │ │ │ +00012b40: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
      min │ │ │ +00012b60: 4172 6561 3c2f 636f 6465 3e20 2d20 6175 Area - au │ │ │ +00012b70: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ +00012b80: 7261 7465 643c 2f64 643e 0a3c 6474 3e52 rated
      .
      R │ │ │ +00012b90: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
      .
      automatically g │ │ │ +00012bb0: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
      ...< │ │ │ +00012bd0: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
    • . │ │ │ +00012c30: 0a3c 6833 3e63 7265 6174 6545 5246 696c .

      createERFil │ │ │ +00012c40: 7465 724e 4d31 3c2f 6833 3e0a 3c64 6976 terNM1

      .
      public static< │ │ │ +00012c90: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> E │ │ │ +00012cf0: 5246 696c 7465 723c 2f61 3e3c 2f73 7061 RFilter createERFilte │ │ │ +00012d30: 724e 4d31 3c2f 7370 616e 3e3c 7762 723e rNM1 │ │ │ +00012d40: 3c73 7061 6e20 636c 6173 733d 2270 6172 (ERFi │ │ │ +00012da0: 6c74 6572 5f43 616c 6c62 6163 6b3c 2f61 lter_Callback cb,. int& │ │ │ +00012dc0: 6e62 7370 3b74 6872 6573 686f 6c64 4465 nbsp;thresholdDe │ │ │ +00012dd0: 6c74 6129 3c2f 7370 616e 3e3c 2f64 6976 lta)
      .
      Create an E │ │ │ +00012e00: 7874 7265 6d61 6c20 5265 6769 6f6e 2046 xtremal Region F │ │ │ +00012e10: 696c 7465 7220 666f 7220 7468 6520 3173 ilter for the 1s │ │ │ +00012e20: 7420 7374 6167 6520 636c 6173 7369 6669 t stage classifi │ │ │ +00012e30: 6572 206f 6620 4e26 616d 703b 4d20 616c er of N&M al │ │ │ +00012e40: 676f 7269 7468 6d20 4349 5445 3a20 4e65 gorithm CITE: Ne │ │ │ +00012e50: 756d 616e 6e31 322e 0a0a 206c 6f61 6443 umann12... loadC │ │ │ +00012e60: 6c61 7373 6966 6965 724e 4d31 2c20 652e lassifierNM1, e. │ │ │ +00012e70: 672e 2066 726f 6d20 6669 6c65 2069 6e20 g. from file in │ │ │ +00012e80: 7361 6d70 6c65 732f 6370 702f 7472 6169 samples/cpp/trai │ │ │ +00012e90: 6e65 645f 636c 6173 7369 6669 6572 4e4d ned_classifierNM │ │ │ +00012ea0: 312e 786d 6c0a 0a20 5468 6520 636f 6d70 1.xml.. The comp │ │ │ +00012eb0: 6f6e 656e 7420 7472 6565 206f 6620 7468 onent tree of th │ │ │ +00012ec0: 6520 696d 6167 6520 6973 2065 7874 7261 e image is extra │ │ │ +00012ed0: 6374 6564 2062 7920 6120 7468 7265 7368 cted by a thresh │ │ │ +00012ee0: 6f6c 6420 696e 6372 6561 7365 6420 7374 old increased st │ │ │ +00012ef0: 6570 2062 7920 7374 6570 2066 726f 6d20 ep by step from │ │ │ +00012f00: 3020 746f 2032 3535 2c0a 2069 6e63 7265 0 to 255,. incre │ │ │ +00012f10: 6d65 6e74 616c 6c79 2063 6f6d 7075 7461 mentally computa │ │ │ +00012f20: 626c 6520 6465 7363 7269 7074 6f72 7320 ble descriptors │ │ │ +00012f30: 2861 7370 6563 745f 7261 7469 6f2c 2063 (aspect_ratio, c │ │ │ +00012f40: 6f6d 7061 6374 6e65 7373 2c20 6e75 6d62 ompactness, numb │ │ │ +00012f50: 6572 206f 6620 686f 6c65 732c 2061 6e64 er of holes, and │ │ │ +00012f60: 206e 756d 6265 7220 6f66 0a20 686f 7269 number of. hori │ │ │ +00012f70: 7a6f 6e74 616c 2063 726f 7373 696e 6773 zontal crossings │ │ │ +00012f80: 2920 6172 6520 636f 6d70 7574 6564 2066 ) are computed f │ │ │ +00012f90: 6f72 2065 6163 6820 4552 2061 6e64 2075 or each ER and u │ │ │ +00012fa0: 7365 6420 6173 2066 6561 7475 7265 7320 sed as features │ │ │ +00012fb0: 666f 7220 6120 636c 6173 7369 6669 6572 for a classifier │ │ │ +00012fc0: 2077 6869 6368 2065 7374 696d 6174 6573 which estimates │ │ │ +00012fd0: 0a20 7468 6520 636c 6173 732d 636f 6e64 . the class-cond │ │ │ +00012fe0: 6974 696f 6e61 6c20 7072 6f62 6162 696c itional probabil │ │ │ +00012ff0: 6974 7920 5028 6572 7c63 6861 7261 6374 ity P(er|charact │ │ │ +00013000: 6572 292e 2054 6865 2076 616c 7565 206f er). The value o │ │ │ +00013010: 6620 5028 6572 7c63 6861 7261 6374 6572 f P(er|character │ │ │ +00013020: 2920 6973 2074 7261 636b 6564 2075 7369 ) is tracked usi │ │ │ +00013030: 6e67 2074 6865 0a20 696e 636c 7573 696f ng the. inclusio │ │ │ +00013040: 6e20 7265 6c61 7469 6f6e 206f 6620 4552 n relation of ER │ │ │ +00013050: 2061 6372 6f73 7320 616c 6c20 7468 7265 across all thre │ │ │ +00013060: 7368 6f6c 6473 2061 6e64 206f 6e6c 7920 sholds and only │ │ │ +00013070: 7468 6520 4552 7320 7768 6963 6820 636f the ERs which co │ │ │ +00013080: 7272 6573 706f 6e64 2074 6f20 6c6f 6361 rrespond to loca │ │ │ +00013090: 6c20 6d61 7869 6d75 6d20 6f66 0a20 7468 l maximum of. th │ │ │ +000130a0: 6520 7072 6f62 6162 696c 6974 7920 5028 e probability P( │ │ │ +000130b0: 6572 7c63 6861 7261 6374 6572 2920 6172 er|character) ar │ │ │ +000130c0: 6520 7365 6c65 6374 6564 2028 6966 2074 e selected (if t │ │ │ +000130d0: 6865 206c 6f63 616c 206d 6178 696d 756d he local maximum │ │ │ +000130e0: 206f 6620 7468 6520 7072 6f62 6162 696c of the probabil │ │ │ +000130f0: 6974 7920 6973 2061 626f 7665 2061 0a20 ity is above a. │ │ │ +00013100: 676c 6f62 616c 206c 696d 6974 2070 6d69 global limit pmi │ │ │ +00013110: 6e20 616e 6420 7468 6520 6469 6666 6572 n and the differ │ │ │ +00013120: 656e 6365 2062 6574 7765 656e 206c 6f63 ence between loc │ │ │ +00013130: 616c 206d 6178 696d 756d 2061 6e64 206c al maximum and l │ │ │ +00013140: 6f63 616c 206d 696e 696d 756d 2069 7320 ocal minimum is │ │ │ +00013150: 6772 6561 7465 7220 7468 616e 0a20 6d69 greater than. mi │ │ │ +00013160: 6e50 726f 6261 6269 6c69 7479 4469 6666 nProbabilityDiff │ │ │ +00013170: 292e 3c2f 6469 763e 0a3c 646c 2063 6c61 ).
      .
      .
      │ │ │ +00013190: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
      │ │ │ +000131a0: 0a3c 6464 3e3c 636f 6465 3e63 623c 2f63 .
      cb - automatic │ │ │ +000131c0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      th │ │ │ +000131e0: 7265 7368 6f6c 6444 656c 7461 3c2f 636f resholdDelta - automatica │ │ │ +00013200: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
      Returns:< │ │ │ +00013220: 2f64 743e 0a3c 6464 3e61 7574 6f6d 6174 /dt>.
      automat │ │ │ +00013230: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ +00013240: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365
      .
      ..
    • .
    • .
      .

      createE │ │ │ +000132c0: 5246 696c 7465 724e 4d31 3c2f 6833 3e0a RFilterNM1

      . │ │ │ +000132d0: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
      public sta │ │ │ +00013310: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ +00013320: 3c73 7061 6e20 636c 6173 733d 2272 6574 ERFilter< │ │ │ +00013380: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> createERF │ │ │ +000133b0: 696c 7465 724e 4d31 3c2f 7370 616e 3e3c ilterNM1< │ │ │ +000133c0: 7762 723e 3c73 7061 6e20 636c 6173 733d wbr>( │ │ │ +00013420: 4552 4669 6c74 6572 5f43 616c 6c62 6163 ERFilter_Callbac │ │ │ +00013430: 6b3c 2f61 3e26 6e62 7370 3b63 6229 3c2f k cb)
      .
      C │ │ │ +00013460: 7265 6174 6520 616e 2045 7874 7265 6d61 reate an Extrema │ │ │ +00013470: 6c20 5265 6769 6f6e 2046 696c 7465 7220 l Region Filter │ │ │ +00013480: 666f 7220 7468 6520 3173 7420 7374 6167 for the 1st stag │ │ │ +00013490: 6520 636c 6173 7369 6669 6572 206f 6620 e classifier of │ │ │ +000134a0: 4e26 616d 703b 4d20 616c 676f 7269 7468 N&M algorith │ │ │ +000134b0: 6d20 4349 5445 3a20 4e65 756d 616e 6e31 m CITE: Neumann1 │ │ │ +000134c0: 322e 0a0a 206c 6f61 6443 6c61 7373 6966 2... loadClassif │ │ │ +000134d0: 6965 724e 4d31 2c20 652e 672e 2066 726f ierNM1, e.g. fro │ │ │ +000134e0: 6d20 6669 6c65 2069 6e20 7361 6d70 6c65 m file in sample │ │ │ +000134f0: 732f 6370 702f 7472 6169 6e65 645f 636c s/cpp/trained_cl │ │ │ +00013500: 6173 7369 6669 6572 4e4d 312e 786d 6c0a assifierNM1.xml. │ │ │ +00013510: 0a20 5468 6520 636f 6d70 6f6e 656e 7420 . The component │ │ │ +00013520: 7472 6565 206f 6620 7468 6520 696d 6167 tree of the imag │ │ │ +00013530: 6520 6973 2065 7874 7261 6374 6564 2062 e is extracted b │ │ │ +00013540: 7920 6120 7468 7265 7368 6f6c 6420 696e y a threshold in │ │ │ +00013550: 6372 6561 7365 6420 7374 6570 2062 7920 creased step by │ │ │ +00013560: 7374 6570 2066 726f 6d20 3020 746f 2032 step from 0 to 2 │ │ │ +00013570: 3535 2c0a 2069 6e63 7265 6d65 6e74 616c 55,. incremental │ │ │ +00013580: 6c79 2063 6f6d 7075 7461 626c 6520 6465 ly computable de │ │ │ +00013590: 7363 7269 7074 6f72 7320 2861 7370 6563 scriptors (aspec │ │ │ +000135a0: 745f 7261 7469 6f2c 2063 6f6d 7061 6374 t_ratio, compact │ │ │ +000135b0: 6e65 7373 2c20 6e75 6d62 6572 206f 6620 ness, number of │ │ │ +000135c0: 686f 6c65 732c 2061 6e64 206e 756d 6265 holes, and numbe │ │ │ +000135d0: 7220 6f66 0a20 686f 7269 7a6f 6e74 616c r of. horizontal │ │ │ +000135e0: 2063 726f 7373 696e 6773 2920 6172 6520 crossings) are │ │ │ +000135f0: 636f 6d70 7574 6564 2066 6f72 2065 6163 computed for eac │ │ │ +00013600: 6820 4552 2061 6e64 2075 7365 6420 6173 h ER and used as │ │ │ +00013610: 2066 6561 7475 7265 7320 666f 7220 6120 features for a │ │ │ +00013620: 636c 6173 7369 6669 6572 2077 6869 6368 classifier which │ │ │ +00013630: 2065 7374 696d 6174 6573 0a20 7468 6520 estimates. the │ │ │ +00013640: 636c 6173 732d 636f 6e64 6974 696f 6e61 class-conditiona │ │ │ +00013650: 6c20 7072 6f62 6162 696c 6974 7920 5028 l probability P( │ │ │ +00013660: 6572 7c63 6861 7261 6374 6572 292e 2054 er|character). T │ │ │ +00013670: 6865 2076 616c 7565 206f 6620 5028 6572 he value of P(er │ │ │ +00013680: 7c63 6861 7261 6374 6572 2920 6973 2074 |character) is t │ │ │ +00013690: 7261 636b 6564 2075 7369 6e67 2074 6865 racked using the │ │ │ +000136a0: 0a20 696e 636c 7573 696f 6e20 7265 6c61 . inclusion rela │ │ │ +000136b0: 7469 6f6e 206f 6620 4552 2061 6372 6f73 tion of ER acros │ │ │ +000136c0: 7320 616c 6c20 7468 7265 7368 6f6c 6473 s all thresholds │ │ │ +000136d0: 2061 6e64 206f 6e6c 7920 7468 6520 4552 and only the ER │ │ │ +000136e0: 7320 7768 6963 6820 636f 7272 6573 706f s which correspo │ │ │ +000136f0: 6e64 2074 6f20 6c6f 6361 6c20 6d61 7869 nd to local maxi │ │ │ +00013700: 6d75 6d20 6f66 0a20 7468 6520 7072 6f62 mum of. the prob │ │ │ +00013710: 6162 696c 6974 7920 5028 6572 7c63 6861 ability P(er|cha │ │ │ +00013720: 7261 6374 6572 2920 6172 6520 7365 6c65 racter) are sele │ │ │ +00013730: 6374 6564 2028 6966 2074 6865 206c 6f63 cted (if the loc │ │ │ +00013740: 616c 206d 6178 696d 756d 206f 6620 7468 al maximum of th │ │ │ +00013750: 6520 7072 6f62 6162 696c 6974 7920 6973 e probability is │ │ │ +00013760: 2061 626f 7665 2061 0a20 676c 6f62 616c above a. global │ │ │ +00013770: 206c 696d 6974 2070 6d69 6e20 616e 6420 limit pmin and │ │ │ +00013780: 7468 6520 6469 6666 6572 656e 6365 2062 the difference b │ │ │ +00013790: 6574 7765 656e 206c 6f63 616c 206d 6178 etween local max │ │ │ +000137a0: 696d 756d 2061 6e64 206c 6f63 616c 206d imum and local m │ │ │ +000137b0: 696e 696d 756d 2069 7320 6772 6561 7465 inimum is greate │ │ │ +000137c0: 7220 7468 616e 0a20 6d69 6e50 726f 6261 r than. minProba │ │ │ +000137d0: 6269 6c69 7479 4469 6666 292e 3c2f 6469 bilityDiff)..
      .
      Parame │ │ │ +00013800: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
      .
      < │ │ │ +00013810: 636f 6465 3e63 623c 2f63 6f64 653e 202d code>cb - │ │ │ +00013820: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ +00013830: 656e 6572 6174 6564 3c2f 6464 3e0a 3c64 enerated
      .Returns:. │ │ │ +00013850: 3c64 643e 6175 746f 6d61 7469 6361 6c6c
      automaticall │ │ │ +00013860: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
      │ │ │ +00013870: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
      .
      .
    • .
    • ..

      create │ │ │ +000138f0: 4552 4669 6c74 6572 4e4d 323c 2f68 333e ERFilterNM2

      │ │ │ +00013900: 0a3c 6469 7620 636c 6173 733d 226d 656d .
      < │ │ │ +00013920: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ +00013930: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ +00013940: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ +00013950: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;ERFilter │ │ │ +000139b0: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  createER │ │ │ +000139e0: 4669 6c74 6572 4e4d 323c 2f73 7061 6e3e FilterNM2 │ │ │ +000139f0: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ +00013a10: 6120 6872 6566 3d22 4552 4669 6c74 6572 a href="ERFilter │ │ │ +00013a20: 5f43 616c 6c62 6163 6b2e 6874 6d6c 2220 _Callback.html" │ │ │ +00013a30: 7469 746c 653d 2263 6c61 7373 2069 6e20 title="class in │ │ │ +00013a40: 6f72 672e 6f70 656e 6376 2e74 6578 7422 org.opencv.text" │ │ │ +00013a50: 3e45 5246 696c 7465 725f 4361 6c6c 6261 >ERFilter_Callba │ │ │ +00013a60: 636b 3c2f 613e 266e 6273 703b 6362 2c0a ck cb,. │ │ │ +00013a70: 2066 6c6f 6174 266e 6273 703b 6d69 6e50 float minP │ │ │ +00013a80: 726f 6261 6269 6c69 7479 293c 2f73 7061 robability)
      .
      Crea │ │ │ +00013ab0: 7465 2061 6e20 4578 7472 656d 616c 2052 te an Extremal R │ │ │ +00013ac0: 6567 696f 6e20 4669 6c74 6572 2066 6f72 egion Filter for │ │ │ +00013ad0: 2074 6865 2032 6e64 2073 7461 6765 2063 the 2nd stage c │ │ │ +00013ae0: 6c61 7373 6966 6965 7220 6f66 204e 2661 lassifier of N&a │ │ │ +00013af0: 6d70 3b4d 2061 6c67 6f72 6974 686d 2043 mp;M algorithm C │ │ │ +00013b00: 4954 453a 204e 6575 6d61 6e6e 3132 2e0a ITE: Neumann12.. │ │ │ +00013b10: 0a20 6c6f 6164 436c 6173 7369 6669 6572 . loadClassifier │ │ │ +00013b20: 4e4d 322c 2065 2e67 2e20 6672 6f6d 2066 NM2, e.g. from f │ │ │ +00013b30: 696c 6520 696e 2073 616d 706c 6573 2f63 ile in samples/c │ │ │ +00013b40: 7070 2f74 7261 696e 6564 5f63 6c61 7373 pp/trained_class │ │ │ +00013b50: 6966 6965 724e 4d32 2e78 6d6c 0a0a 2049 ifierNM2.xml.. I │ │ │ +00013b60: 6e20 7468 6520 7365 636f 6e64 2073 7461 n the second sta │ │ │ +00013b70: 6765 2c20 7468 6520 4552 7320 7468 6174 ge, the ERs that │ │ │ +00013b80: 2070 6173 7365 6420 7468 6520 6669 7273 passed the firs │ │ │ +00013b90: 7420 7374 6167 6520 6172 6520 636c 6173 t stage are clas │ │ │ +00013ba0: 7369 6669 6564 2069 6e74 6f20 6368 6172 sified into char │ │ │ +00013bb0: 6163 7465 7220 616e 640a 206e 6f6e 2d63 acter and. non-c │ │ │ +00013bc0: 6861 7261 6374 6572 2063 6c61 7373 6573 haracter classes │ │ │ +00013bd0: 2075 7369 6e67 206d 6f72 6520 696e 666f using more info │ │ │ +00013be0: 726d 6174 6976 6520 6275 7420 616c 736f rmative but also │ │ │ +00013bf0: 206d 6f72 6520 636f 6d70 7574 6174 696f more computatio │ │ │ +00013c00: 6e61 6c6c 7920 6578 7065 6e73 6976 6520 nally expensive │ │ │ +00013c10: 6665 6174 7572 6573 2e20 5468 650a 2063 features. The. c │ │ │ +00013c20: 6c61 7373 6966 6965 7220 7573 6573 2061 lassifier uses a │ │ │ +00013c30: 6c6c 2074 6865 2066 6561 7475 7265 7320 ll the features │ │ │ +00013c40: 6361 6c63 756c 6174 6564 2069 6e20 7468 calculated in th │ │ │ +00013c50: 6520 6669 7273 7420 7374 6167 6520 616e e first stage an │ │ │ +00013c60: 6420 7468 6520 666f 6c6c 6f77 696e 6720 d the following │ │ │ +00013c70: 6164 6469 7469 6f6e 616c 0a20 6665 6174 additional. feat │ │ │ +00013c80: 7572 6573 3a20 686f 6c65 2061 7265 6120 ures: hole area │ │ │ +00013c90: 7261 7469 6f2c 2063 6f6e 7665 7820 6875 ratio, convex hu │ │ │ +00013ca0: 6c6c 2072 6174 696f 2c20 616e 6420 6e75 ll ratio, and nu │ │ │ +00013cb0: 6d62 6572 206f 6620 6f75 7465 7220 696e mber of outer in │ │ │ +00013cc0: 666c 6578 696f 6e20 706f 696e 7473 2e3c flexion points.< │ │ │ +00013cd0: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
      .
      Par │ │ │ +00013cf0: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
      .cb - automaticall │ │ │ +00013d20: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated │ │ │ +00013d30: 0a3c 6464 3e3c 636f 6465 3e6d 696e 5072 .
      minPr │ │ │ +00013d40: 6f62 6162 696c 6974 793c 2f63 6f64 653e obability │ │ │ +00013d50: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ +00013d60: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
      . │ │ │ +00013d70: 3c64 743e 5265 7475 726e 733a 3c2f 6474
      Returns:
      .
      automatica │ │ │ +00013d90: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
      ..
    • .
    • .< │ │ │ +00013dc0: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ +00013dd0: 6574 6169 6c22 2069 643d 2263 7265 6174 etail" id="creat │ │ │ +00013de0: 6545 5246 696c 7465 724e 4d32 286f 7267 eERFilterNM2(org │ │ │ +00013df0: 2e6f 7065 6e63 762e 7465 7874 2e45 5246 .opencv.text.ERF │ │ │ +00013e00: 696c 7465 725f 4361 6c6c 6261 636b 2922 ilter_Callback)" │ │ │ +00013e10: 3e0a 3c68 333e 6372 6561 7465 4552 4669 >.

      createERFi │ │ │ +00013e20: 6c74 6572 4e4d 323c 2f68 333e 0a3c 6469 lterNM2

      .public static │ │ │ +00013e70: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370   │ │ │ +00013ed0: 4552 4669 6c74 6572 3c2f 613e 3c2f 7370 ERFilter createERFilt │ │ │ +00013f10: 6572 4e4d 323c 2f73 7061 6e3e 3c77 6272 erNM2(ERF │ │ │ +00013f80: 696c 7465 725f 4361 6c6c 6261 636b 3c2f ilter_Callback cb).
      Crea │ │ │ +00013fc0: 7465 2061 6e20 4578 7472 656d 616c 2052 te an Extremal R │ │ │ +00013fd0: 6567 696f 6e20 4669 6c74 6572 2066 6f72 egion Filter for │ │ │ +00013fe0: 2074 6865 2032 6e64 2073 7461 6765 2063 the 2nd stage c │ │ │ +00013ff0: 6c61 7373 6966 6965 7220 6f66 204e 2661 lassifier of N&a │ │ │ +00014000: 6d70 3b4d 2061 6c67 6f72 6974 686d 2043 mp;M algorithm C │ │ │ +00014010: 4954 453a 204e 6575 6d61 6e6e 3132 2e0a ITE: Neumann12.. │ │ │ +00014020: 0a20 6c6f 6164 436c 6173 7369 6669 6572 . loadClassifier │ │ │ +00014030: 4e4d 322c 2065 2e67 2e20 6672 6f6d 2066 NM2, e.g. from f │ │ │ +00014040: 696c 6520 696e 2073 616d 706c 6573 2f63 ile in samples/c │ │ │ +00014050: 7070 2f74 7261 696e 6564 5f63 6c61 7373 pp/trained_class │ │ │ +00014060: 6966 6965 724e 4d32 2e78 6d6c 0a0a 2049 ifierNM2.xml.. I │ │ │ +00014070: 6e20 7468 6520 7365 636f 6e64 2073 7461 n the second sta │ │ │ +00014080: 6765 2c20 7468 6520 4552 7320 7468 6174 ge, the ERs that │ │ │ +00014090: 2070 6173 7365 6420 7468 6520 6669 7273 passed the firs │ │ │ +000140a0: 7420 7374 6167 6520 6172 6520 636c 6173 t stage are clas │ │ │ +000140b0: 7369 6669 6564 2069 6e74 6f20 6368 6172 sified into char │ │ │ +000140c0: 6163 7465 7220 616e 640a 206e 6f6e 2d63 acter and. non-c │ │ │ +000140d0: 6861 7261 6374 6572 2063 6c61 7373 6573 haracter classes │ │ │ +000140e0: 2075 7369 6e67 206d 6f72 6520 696e 666f using more info │ │ │ +000140f0: 726d 6174 6976 6520 6275 7420 616c 736f rmative but also │ │ │ +00014100: 206d 6f72 6520 636f 6d70 7574 6174 696f more computatio │ │ │ +00014110: 6e61 6c6c 7920 6578 7065 6e73 6976 6520 nally expensive │ │ │ +00014120: 6665 6174 7572 6573 2e20 5468 650a 2063 features. The. c │ │ │ +00014130: 6c61 7373 6966 6965 7220 7573 6573 2061 lassifier uses a │ │ │ +00014140: 6c6c 2074 6865 2066 6561 7475 7265 7320 ll the features │ │ │ +00014150: 6361 6c63 756c 6174 6564 2069 6e20 7468 calculated in th │ │ │ +00014160: 6520 6669 7273 7420 7374 6167 6520 616e e first stage an │ │ │ +00014170: 6420 7468 6520 666f 6c6c 6f77 696e 6720 d the following │ │ │ +00014180: 6164 6469 7469 6f6e 616c 0a20 6665 6174 additional. feat │ │ │ +00014190: 7572 6573 3a20 686f 6c65 2061 7265 6120 ures: hole area │ │ │ +000141a0: 7261 7469 6f2c 2063 6f6e 7665 7820 6875 ratio, convex hu │ │ │ +000141b0: 6c6c 2072 6174 696f 2c20 616e 6420 6e75 ll ratio, and nu │ │ │ +000141c0: 6d62 6572 206f 6620 6f75 7465 7220 696e mber of outer in │ │ │ +000141d0: 666c 6578 696f 6e20 706f 696e 7473 2e3c flexion points.< │ │ │ +000141e0: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
      .
      Par │ │ │ +00014200: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
      .cb - automaticall │ │ │ +00014230: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated │ │ │ +00014240: 0a3c 6474 3e52 6574 7572 6e73 3a3c 2f64 .
      Returns:.
      automatic │ │ │ +00014260: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      ..
    • .
    • . │ │ │ +00014290: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
      .

      create │ │ │ +00014300: 4552 4669 6c74 6572 4e4d 313c 2f68 333e ERFilterNM1

      │ │ │ +00014310: 0a3c 6469 7620 636c 6173 733d 226d 656d .
      < │ │ │ +00014330: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ +00014340: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ +00014350: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ +00014360: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;ERFilter │ │ │ +000143c0: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  createER │ │ │ +000143f0: 4669 6c74 6572 4e4d 313c 2f73 7061 6e3e FilterNM1 │ │ │ +00014400: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ +00014420: 6120 6872 6566 3d22 6874 7470 733a 2f2f a href="https:// │ │ │ +00014430: 646f 776e 6c6f 6164 2e6a 6176 612e 6e65 download.java.ne │ │ │ +00014440: 742f 6a61 7661 2f65 6172 6c79 5f61 6363 t/java/early_acc │ │ │ +00014450: 6573 732f 6a64 6b32 312f 646f 6373 2f61 ess/jdk21/docs/a │ │ │ +00014460: 7069 2f6a 6176 612e 6261 7365 2f6a 6176 pi/java.base/jav │ │ │ +00014470: 612f 6c61 6e67 2f53 7472 696e 672e 6874 a/lang/String.ht │ │ │ +00014480: 6d6c 2220 7469 746c 653d 2263 6c61 7373 ml" title="class │ │ │ +00014490: 206f 7220 696e 7465 7266 6163 6520 696e or interface in │ │ │ +000144a0: 206a 6176 612e 6c61 6e67 2220 636c 6173 java.lang" clas │ │ │ +000144b0: 733d 2265 7874 6572 6e61 6c2d 6c69 6e6b s="external-link │ │ │ +000144c0: 223e 5374 7269 6e67 3c2f 613e 266e 6273 ">String&nbs │ │ │ +000144d0: 703b 6669 6c65 6e61 6d65 2c0a 2069 6e74 p;filename,. int │ │ │ +000144e0: 266e 6273 703b 7468 7265 7368 6f6c 6444  thresholdD │ │ │ +000144f0: 656c 7461 2c0a 2066 6c6f 6174 266e 6273 elta,. float&nbs │ │ │ +00014500: 703b 6d69 6e41 7265 612c 0a20 666c 6f61 p;minArea,. floa │ │ │ +00014510: 7426 6e62 7370 3b6d 6178 4172 6561 2c0a t maxArea,. │ │ │ +00014520: 2066 6c6f 6174 266e 6273 703b 6d69 6e50 float minP │ │ │ +00014530: 726f 6261 6269 6c69 7479 2c0a 2062 6f6f robability,. boo │ │ │ +00014540: 6c65 616e 266e 6273 703b 6e6f 6e4d 6178 lean nonMax │ │ │ +00014550: 5375 7070 7265 7373 696f 6e2c 0a20 666c Suppression,. fl │ │ │ +00014560: 6f61 7426 6e62 7370 3b6d 696e 5072 6f62 oat minProb │ │ │ +00014570: 6162 696c 6974 7944 6966 6629 3c2f 7370 abilityDiff)
      .
      Rea │ │ │ +000145a0: 6473 2061 6e20 4578 7472 656d 616c 2052 ds an Extremal R │ │ │ +000145b0: 6567 696f 6e20 4669 6c74 6572 2066 6f72 egion Filter for │ │ │ +000145c0: 2074 6865 2031 7374 2073 7461 6765 2063 the 1st stage c │ │ │ +000145d0: 6c61 7373 6966 6965 7220 6f66 204e 2661 lassifier of N&a │ │ │ +000145e0: 6d70 3b4d 2061 6c67 6f72 6974 686d 0a20 mp;M algorithm. │ │ │ +000145f0: 2020 2020 6672 6f6d 2074 6865 2070 726f from the pro │ │ │ +00014600: 7669 6465 6420 7061 7468 2065 2e67 2e20 vided path e.g. │ │ │ +00014610: 2f70 6174 682f 746f 2f63 7070 2f74 7261 /path/to/cpp/tra │ │ │ +00014620: 696e 6564 5f63 6c61 7373 6966 6965 724e ined_classifierN │ │ │ +00014630: 4d31 2e78 6d6c 3c2f 6469 763e 0a3c 646c M1.xml
      .
      . │ │ │ +00014650: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
      Parameters:< │ │ │ +00014660: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e66 /dt>.
      f │ │ │ +00014670: 696c 656e 616d 653c 2f63 6f64 653e 202d ilename - │ │ │ +00014680: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ +00014690: 656e 6572 6174 6564 3c2f 6464 3e0a 3c64 enerated
      .threshol │ │ │ +000146b0: 6444 656c 7461 3c2f 636f 6465 3e20 2d20 dDelta - │ │ │ +000146c0: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +000146d0: 6e65 7261 7465 643c 2f64 643e 0a3c 6464 nerated.
      minArea - automati │ │ │ +00014700: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +00014710: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e6d /dd>.
      m │ │ │ +00014720: 6178 4172 6561 3c2f 636f 6465 3e20 2d20 axArea - │ │ │ +00014730: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +00014740: 6e65 7261 7465 643c 2f64 643e 0a3c 6464 nerated
      .
      minProbab │ │ │ +00014760: 696c 6974 793c 2f63 6f64 653e 202d 2061 ility - a │ │ │ +00014770: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ +00014780: 6572 6174 6564 3c2f 6464 3e0a 3c64 643e erated
      .
      │ │ │ +00014790: 3c63 6f64 653e 6e6f 6e4d 6178 5375 7070 nonMaxSupp │ │ │ +000147a0: 7265 7373 696f 6e3c 2f63 6f64 653e 202d ression - │ │ │ +000147b0: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ +000147c0: 656e 6572 6174 6564 3c2f 6464 3e0a 3c64 enerated
      .minProba │ │ │ +000147e0: 6269 6c69 7479 4469 6666 3c2f 636f 6465 bilityDiff - automaticall │ │ │ +00014800: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated │ │ │ +00014810: 0a3c 6474 3e52 6574 7572 6e73 3a3c 2f64 .
      Returns:.
      automatic │ │ │ +00014830: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      ..
    • .
    • . │ │ │ +00014860: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
      . │ │ │ +000148c0: 3c68 333e 6372 6561 7465 4552 4669 6c74

      createERFilt │ │ │ +000148d0: 6572 4e4d 313c 2f68 333e 0a3c 6469 7620 erNM1

      .
      public static ER │ │ │ +00014980: 4669 6c74 6572 3c2f 613e 3c2f 7370 616e Filter createERFilter │ │ │ +000149c0: 4e4d 313c 2f73 7061 6e3e 3c77 6272 3e3c NM1< │ │ │ +000149d0: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ +000149e0: 6d65 7465 7273 223e 283c 6120 6872 6566 meters">(Stri │ │ │ +00014a90: 6e67 3c2f 613e 266e 6273 703b 6669 6c65 ng file │ │ │ +00014aa0: 6e61 6d65 2c0a 2069 6e74 266e 6273 703b name,. int  │ │ │ +00014ab0: 7468 7265 7368 6f6c 6444 656c 7461 2c0a thresholdDelta,. │ │ │ +00014ac0: 2066 6c6f 6174 266e 6273 703b 6d69 6e41 float minA │ │ │ +00014ad0: 7265 612c 0a20 666c 6f61 7426 6e62 7370 rea,. float  │ │ │ +00014ae0: 3b6d 6178 4172 6561 2c0a 2066 6c6f 6174 ;maxArea,. float │ │ │ +00014af0: 266e 6273 703b 6d69 6e50 726f 6261 6269  minProbabi │ │ │ +00014b00: 6c69 7479 2c0a 2062 6f6f 6c65 616e 266e lity,. boolean&n │ │ │ +00014b10: 6273 703b 6e6f 6e4d 6178 5375 7070 7265 bsp;nonMaxSuppre │ │ │ +00014b20: 7373 696f 6e29 3c2f 7370 616e 3e3c 2f64 ssion).
      Reads an │ │ │ +00014b50: 4578 7472 656d 616c 2052 6567 696f 6e20 Extremal Region │ │ │ +00014b60: 4669 6c74 6572 2066 6f72 2074 6865 2031 Filter for the 1 │ │ │ +00014b70: 7374 2073 7461 6765 2063 6c61 7373 6966 st stage classif │ │ │ +00014b80: 6965 7220 6f66 204e 2661 6d70 3b4d 2061 ier of N&M a │ │ │ +00014b90: 6c67 6f72 6974 686d 0a20 2020 2020 6672 lgorithm. fr │ │ │ +00014ba0: 6f6d 2074 6865 2070 726f 7669 6465 6420 om the provided │ │ │ +00014bb0: 7061 7468 2065 2e67 2e20 2f70 6174 682f path e.g. /path/ │ │ │ +00014bc0: 746f 2f63 7070 2f74 7261 696e 6564 5f63 to/cpp/trained_c │ │ │ +00014bd0: 6c61 7373 6966 6965 724e 4d31 2e78 6d6c lassifierNM1.xml │ │ │ +00014be0: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
      .
      .
      Pa │ │ │ +00014c00: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
      .< │ │ │ +00014c10: 6464 3e3c 636f 6465 3e66 696c 656e 616d dd>filenam │ │ │ +00014c20: 653c 2f63 6f64 653e 202d 2061 7574 6f6d e - autom │ │ │ +00014c30: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +00014c40: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed.
      thresholdDelta │ │ │ +00014c60: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ +00014c70: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +00014c80: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d
      .
      minArea │ │ │ +00014ca0: 2d20 6175 746f 6d61 7469 6361 6c6c 7920 - automatically │ │ │ +00014cb0: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated
      .< │ │ │ +00014cc0: 6464 3e3c 636f 6465 3e6d 6178 4172 6561 dd>maxArea │ │ │ +00014cd0: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ +00014ce0: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +00014cf0: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d.
      minProbability< │ │ │ +00014d10: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ +00014d20: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ +00014d30: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
      .
      │ │ │ +00014d40: 6e6f 6e4d 6178 5375 7070 7265 7373 696f nonMaxSuppressio │ │ │ +00014d50: 6e3c 2f63 6f64 653e 202d 2061 7574 6f6d n - autom │ │ │ +00014d60: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +00014d70: 6564 3c2f 6464 3e0a 3c64 743e 5265 7475 ed
      .
      Retu │ │ │ +00014d80: 726e 733a 3c2f 6474 3e0a 3c64 643e 6175 rns:
      .
      au │ │ │ +00014d90: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ +00014da0: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
      .
      │ │ │ +00014db0: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .
      .
    • .
    • .
      .< │ │ │ +00014e20: 6833 3e63 7265 6174 6545 5246 696c 7465 h3>createERFilte │ │ │ +00014e30: 724e 4d31 3c2f 6833 3e0a 3c64 6976 2063 rNM1.
      │ │ │ +00014e70: 7075 626c 6963 2073 7461 7469 633c 2f73 public static ERF │ │ │ +00014ee0: 696c 7465 723c 2f61 3e3c 2f73 7061 6e3e ilter │ │ │ +00014ef0: 266e 6273 703b 3c73 7061 6e20 636c 6173  createERFilterN │ │ │ +00014f20: 4d31 3c2f 7370 616e 3e3c 7762 723e 3c73 M1(Strin │ │ │ +00014ff0: 673c 2f61 3e26 6e62 7370 3b66 696c 656e g filen │ │ │ +00015000: 616d 652c 0a20 696e 7426 6e62 7370 3b74 ame,. int t │ │ │ +00015010: 6872 6573 686f 6c64 4465 6c74 612c 0a20 hresholdDelta,. │ │ │ +00015020: 666c 6f61 7426 6e62 7370 3b6d 696e 4172 float minAr │ │ │ +00015030: 6561 2c0a 2066 6c6f 6174 266e 6273 703b ea,. float  │ │ │ +00015040: 6d61 7841 7265 612c 0a20 666c 6f61 7426 maxArea,. float& │ │ │ +00015050: 6e62 7370 3b6d 696e 5072 6f62 6162 696c nbsp;minProbabil │ │ │ +00015060: 6974 7929 3c2f 7370 616e 3e3c 2f64 6976 ity)
      .
      Reads an Ex │ │ │ +00015090: 7472 656d 616c 2052 6567 696f 6e20 4669 tremal Region Fi │ │ │ +000150a0: 6c74 6572 2066 6f72 2074 6865 2031 7374 lter for the 1st │ │ │ +000150b0: 2073 7461 6765 2063 6c61 7373 6966 6965 stage classifie │ │ │ +000150c0: 7220 6f66 204e 2661 6d70 3b4d 2061 6c67 r of N&M alg │ │ │ +000150d0: 6f72 6974 686d 0a20 2020 2020 6672 6f6d orithm. from │ │ │ +000150e0: 2074 6865 2070 726f 7669 6465 6420 7061 the provided pa │ │ │ +000150f0: 7468 2065 2e67 2e20 2f70 6174 682f 746f th e.g. /path/to │ │ │ +00015100: 2f63 7070 2f74 7261 696e 6564 5f63 6c61 /cpp/trained_cla │ │ │ +00015110: 7373 6966 6965 724e 4d31 2e78 6d6c 3c2f ssifierNM1.xml.
      .
      Para │ │ │ +00015140: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
      .
      filename< │ │ │ +00015160: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ +00015170: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ +00015180: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
      .
      │ │ │ +00015190: 7468 7265 7368 6f6c 6444 656c 7461 3c2f thresholdDelta - automati │ │ │ +000151b0: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +000151c0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e6d /dd>.
      m │ │ │ +000151d0: 696e 4172 6561 3c2f 636f 6465 3e20 2d20 inArea - │ │ │ +000151e0: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +000151f0: 6e65 7261 7465 643c 2f64 643e 0a3c 6464 nerated
      .
      maxArea - automati │ │ │ +00015220: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +00015230: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e6d /dd>.
      m │ │ │ +00015240: 696e 5072 6f62 6162 696c 6974 793c 2f63 inProbability - automatic │ │ │ +00015260: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      Returns: │ │ │ +00015280: 3c2f 6474 3e0a 3c64 643e 6175 746f 6d61
      .
      automa │ │ │ +00015290: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +000152a0: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
      .
      .
      .
    • ..
      .

      createE │ │ │ +00015320: 5246 696c 7465 724e 4d31 3c2f 6833 3e0a RFilterNM1

      . │ │ │ +00015330: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
      public sta │ │ │ +00015370: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ +00015380: 3c73 7061 6e20 636c 6173 733d 2272 6574 ERFilter< │ │ │ +000153e0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> createERF │ │ │ +00015410: 696c 7465 724e 4d31 3c2f 7370 616e 3e3c ilterNM1< │ │ │ +00015420: 7762 723e 3c73 7061 6e20 636c 6173 733d wbr>(String  │ │ │ +000154f0: 3b66 696c 656e 616d 652c 0a20 696e 7426 ;filename,. int& │ │ │ +00015500: 6e62 7370 3b74 6872 6573 686f 6c64 4465 nbsp;thresholdDe │ │ │ +00015510: 6c74 612c 0a20 666c 6f61 7426 6e62 7370 lta,. float  │ │ │ +00015520: 3b6d 696e 4172 6561 2c0a 2066 6c6f 6174 ;minArea,. float │ │ │ +00015530: 266e 6273 703b 6d61 7841 7265 6129 3c2f  maxArea)
      .
      R │ │ │ +00015560: 6561 6473 2061 6e20 4578 7472 656d 616c eads an Extremal │ │ │ +00015570: 2052 6567 696f 6e20 4669 6c74 6572 2066 Region Filter f │ │ │ +00015580: 6f72 2074 6865 2031 7374 2073 7461 6765 or the 1st stage │ │ │ +00015590: 2063 6c61 7373 6966 6965 7220 6f66 204e classifier of N │ │ │ +000155a0: 2661 6d70 3b4d 2061 6c67 6f72 6974 686d &M algorithm │ │ │ +000155b0: 0a20 2020 2020 6672 6f6d 2074 6865 2070 . from the p │ │ │ +000155c0: 726f 7669 6465 6420 7061 7468 2065 2e67 rovided path e.g │ │ │ +000155d0: 2e20 2f70 6174 682f 746f 2f63 7070 2f74 . /path/to/cpp/t │ │ │ +000155e0: 7261 696e 6564 5f63 6c61 7373 6966 6965 rained_classifie │ │ │ +000155f0: 724e 4d31 2e78 6d6c 3c2f 6469 763e 0a3c rNM1.xml
      .< │ │ │ +00015600: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ +00015610: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
      Parameters │ │ │ +00015620: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
      .
      filename │ │ │ +00015640: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ +00015650: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
      . │ │ │ +00015660: 3c64 643e 3c63 6f64 653e 7468 7265 7368
      thresh │ │ │ +00015670: 6f6c 6444 656c 7461 3c2f 636f 6465 3e20 oldDelta │ │ │ +00015680: 2d20 6175 746f 6d61 7469 6361 6c6c 7920 - automatically │ │ │ +00015690: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated
      .< │ │ │ +000156a0: 6464 3e3c 636f 6465 3e6d 696e 4172 6561 dd>minArea │ │ │ +000156b0: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ +000156c0: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +000156d0: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d.
      maxArea │ │ │ +000156f0: 2d20 6175 746f 6d61 7469 6361 6c6c 7920 - automatically │ │ │ +00015700: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated
      .< │ │ │ +00015710: 6474 3e52 6574 7572 6e73 3a3c 2f64 743e dt>Returns: │ │ │ +00015720: 0a3c 6464 3e61 7574 6f6d 6174 6963 616c .
      automatical │ │ │ +00015730: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
      .
      ..
    • .
    • ..

      cr │ │ │ +000157b0: 6561 7465 4552 4669 6c74 6572 4e4d 313c eateERFilterNM1< │ │ │ +000157c0: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
      publi │ │ │ +00015800: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ +00015810: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;< │ │ │ +00015830: 6120 6872 6566 3d22 4552 4669 6c74 6572 a href="ERFilter │ │ │ +00015840: 2e68 746d 6c22 2074 6974 6c65 3d22 636c .html" title="cl │ │ │ +00015850: 6173 7320 696e 206f 7267 2e6f 7065 6e63 ass in org.openc │ │ │ +00015860: 762e 7465 7874 223e 4552 4669 6c74 6572 v.text">ERFilter │ │ │ +00015870: 3c2f 613e 3c2f 7370 616e 3e26 6e62 7370   │ │ │ +00015880: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;crea │ │ │ +000158a0: 7465 4552 4669 6c74 6572 4e4d 313c 2f73 teERFilterNM1(String │ │ │ +00015980: 266e 6273 703b 6669 6c65 6e61 6d65 2c0a  filename,. │ │ │ +00015990: 2069 6e74 266e 6273 703b 7468 7265 7368 int thresh │ │ │ +000159a0: 6f6c 6444 656c 7461 2c0a 2066 6c6f 6174 oldDelta,. float │ │ │ +000159b0: 266e 6273 703b 6d69 6e41 7265 6129 3c2f  minArea)
      .
      R │ │ │ +000159e0: 6561 6473 2061 6e20 4578 7472 656d 616c eads an Extremal │ │ │ +000159f0: 2052 6567 696f 6e20 4669 6c74 6572 2066 Region Filter f │ │ │ +00015a00: 6f72 2074 6865 2031 7374 2073 7461 6765 or the 1st stage │ │ │ +00015a10: 2063 6c61 7373 6966 6965 7220 6f66 204e classifier of N │ │ │ +00015a20: 2661 6d70 3b4d 2061 6c67 6f72 6974 686d &M algorithm │ │ │ +00015a30: 0a20 2020 2020 6672 6f6d 2074 6865 2070 . from the p │ │ │ +00015a40: 726f 7669 6465 6420 7061 7468 2065 2e67 rovided path e.g │ │ │ +00015a50: 2e20 2f70 6174 682f 746f 2f63 7070 2f74 . /path/to/cpp/t │ │ │ +00015a60: 7261 696e 6564 5f63 6c61 7373 6966 6965 rained_classifie │ │ │ +00015a70: 724e 4d31 2e78 6d6c 3c2f 6469 763e 0a3c rNM1.xml
      .< │ │ │ +00015a80: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ +00015a90: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
      Parameters │ │ │ +00015aa0: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
      .
      filename │ │ │ +00015ac0: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ +00015ad0: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
      . │ │ │ +00015ae0: 3c64 643e 3c63 6f64 653e 7468 7265 7368
      thresh │ │ │ +00015af0: 6f6c 6444 656c 7461 3c2f 636f 6465 3e20 oldDelta │ │ │ +00015b00: 2d20 6175 746f 6d61 7469 6361 6c6c 7920 - automatically │ │ │ +00015b10: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated
      .< │ │ │ +00015b20: 6464 3e3c 636f 6465 3e6d 696e 4172 6561 dd>minArea │ │ │ +00015b30: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ +00015b40: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +00015b50: 643c 2f64 643e 0a3c 6474 3e52 6574 7572 d.
      Retur │ │ │ +00015b60: 6e73 3a3c 2f64 743e 0a3c 6464 3e61 7574 ns:
      .
      aut │ │ │ +00015b70: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ +00015b80: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
      .. │ │ │ +00015b90: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e .

    • │ │ │ +00015ba0: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
    • .
      .

      │ │ │ +00015bf0: 6372 6561 7465 4552 4669 6c74 6572 4e4d createERFilterNM │ │ │ +00015c00: 313c 2f68 333e 0a3c 6469 7620 636c 6173 1

      .
      pub │ │ │ +00015c40: 6c69 6320 7374 6174 6963 3c2f 7370 616e lic static ERFilt │ │ │ +00015cb0: 6572 3c2f 613e 3c2f 7370 616e 3e26 6e62 er&nb │ │ │ +00015cc0: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;cr │ │ │ +00015ce0: 6561 7465 4552 4669 6c74 6572 4e4d 313c eateERFilterNM1< │ │ │ +00015cf0: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(String filename │ │ │ +00015dd0: 2c0a 2069 6e74 266e 6273 703b 7468 7265 ,. int thre │ │ │ +00015de0: 7368 6f6c 6444 656c 7461 293c 2f73 7061 sholdDelta)
      .
      Read │ │ │ +00015e10: 7320 616e 2045 7874 7265 6d61 6c20 5265 s an Extremal Re │ │ │ +00015e20: 6769 6f6e 2046 696c 7465 7220 666f 7220 gion Filter for │ │ │ +00015e30: 7468 6520 3173 7420 7374 6167 6520 636c the 1st stage cl │ │ │ +00015e40: 6173 7369 6669 6572 206f 6620 4e26 616d assifier of N&am │ │ │ +00015e50: 703b 4d20 616c 676f 7269 7468 6d0a 2020 p;M algorithm. │ │ │ +00015e60: 2020 2066 726f 6d20 7468 6520 7072 6f76 from the prov │ │ │ +00015e70: 6964 6564 2070 6174 6820 652e 672e 202f ided path e.g. / │ │ │ +00015e80: 7061 7468 2f74 6f2f 6370 702f 7472 6169 path/to/cpp/trai │ │ │ +00015e90: 6e65 645f 636c 6173 7369 6669 6572 4e4d ned_classifierNM │ │ │ +00015ea0: 312e 786d 6c3c 2f64 6976 3e0a 3c64 6c20 1.xml
      .
      .< │ │ │ +00015ec0: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
      fi │ │ │ +00015ee0: 6c65 6e61 6d65 3c2f 636f 6465 3e20 2d20 lename - │ │ │ +00015ef0: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +00015f00: 6e65 7261 7465 643c 2f64 643e 0a3c 6464 nerated
      .
      threshold │ │ │ +00015f20: 4465 6c74 613c 2f63 6f64 653e 202d 2061 Delta - a │ │ │ +00015f30: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ +00015f40: 6572 6174 6564 3c2f 6464 3e0a 3c64 743e erated
      .
      │ │ │ +00015f50: 5265 7475 726e 733a 3c2f 6474 3e0a 3c64 Returns:
      .automatically │ │ │ +00015f70: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated.< │ │ │ +00015f80: 2f64 6c3e 0a3c 2f73 6563 7469 6f6e 3e0a /dl>.
      . │ │ │ +00015f90: 3c2f 6c69 3e0a 3c6c 693e 0a3c 7365 6374
    • .
    • ..

      createERFilterN │ │ │ +00015ff0: 4d31 3c2f 6833 3e0a 3c64 6976 2063 6c61 M1

      .
      pu │ │ │ +00016030: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static ERFil │ │ │ +000160a0: 7465 723c 2f61 3e3c 2f73 7061 6e3e 266e ter&n │ │ │ +000160b0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;c │ │ │ +000160d0: 7265 6174 6545 5246 696c 7465 724e 4d31 reateERFilterNM1 │ │ │ +000160e0: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (String< │ │ │ +000161b0: 2f61 3e26 6e62 7370 3b66 696c 656e 616d /a> filenam │ │ │ +000161c0: 6529 3c2f 7370 616e 3e3c 2f64 6976 3e0a e)
      . │ │ │ +000161d0: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
      Reads an Extr │ │ │ +000161f0: 656d 616c 2052 6567 696f 6e20 4669 6c74 emal Region Filt │ │ │ +00016200: 6572 2066 6f72 2074 6865 2031 7374 2073 er for the 1st s │ │ │ +00016210: 7461 6765 2063 6c61 7373 6966 6965 7220 tage classifier │ │ │ +00016220: 6f66 204e 2661 6d70 3b4d 2061 6c67 6f72 of N&M algor │ │ │ +00016230: 6974 686d 0a20 2020 2020 6672 6f6d 2074 ithm. from t │ │ │ +00016240: 6865 2070 726f 7669 6465 6420 7061 7468 he provided path │ │ │ +00016250: 2065 2e67 2e20 2f70 6174 682f 746f 2f63 e.g. /path/to/c │ │ │ +00016260: 7070 2f74 7261 696e 6564 5f63 6c61 7373 pp/trained_class │ │ │ +00016270: 6966 6965 724e 4d31 2e78 6d6c 3c2f 6469 ifierNM1.xml.
      .
      Parame │ │ │ +000162a0: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
      .
      < │ │ │ +000162b0: 636f 6465 3e66 696c 656e 616d 653c 2f63 code>filename - automatic │ │ │ +000162d0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
      Returns: │ │ │ +000162f0: 3c2f 6474 3e0a 3c64 643e 6175 746f 6d61
      .
      automa │ │ │ +00016300: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +00016310: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
      .
      .
      .
    • ..
      .

      c │ │ │ +00016380: 7265 6174 6545 5246 696c 7465 724e 4d32 reateERFilterNM2 │ │ │ +00016390: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

      .
      publ │ │ │ +000163d0: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ +000163e0: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ +00016400: 3c61 2068 7265 663d 2245 5246 696c 7465 ERFilte │ │ │ +00016440: 723c 2f61 3e3c 2f73 7061 6e3e 266e 6273 r&nbs │ │ │ +00016450: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;cre │ │ │ +00016470: 6174 6545 5246 696c 7465 724e 4d32 3c2f ateERFilterNM2(String filename, │ │ │ +00016560: 0a20 666c 6f61 7426 6e62 7370 3b6d 696e . float min │ │ │ +00016570: 5072 6f62 6162 696c 6974 7929 3c2f 7370 Probability)
      .
      Rea │ │ │ +000165a0: 6473 2061 6e20 4578 7472 656d 616c 2052 ds an Extremal R │ │ │ +000165b0: 6567 696f 6e20 4669 6c74 6572 2066 6f72 egion Filter for │ │ │ +000165c0: 2074 6865 2032 6e64 2073 7461 6765 2063 the 2nd stage c │ │ │ +000165d0: 6c61 7373 6966 6965 7220 6f66 204e 2661 lassifier of N&a │ │ │ +000165e0: 6d70 3b4d 2061 6c67 6f72 6974 686d 0a20 mp;M algorithm. │ │ │ +000165f0: 2020 2020 6672 6f6d 2074 6865 2070 726f from the pro │ │ │ +00016600: 7669 6465 6420 7061 7468 2065 2e67 2e20 vided path e.g. │ │ │ +00016610: 2f70 6174 682f 746f 2f63 7070 2f74 7261 /path/to/cpp/tra │ │ │ +00016620: 696e 6564 5f63 6c61 7373 6966 6965 724e ined_classifierN │ │ │ +00016630: 4d32 2e78 6d6c 3c2f 6469 763e 0a3c 646c M2.xml
      .
      . │ │ │ +00016650: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
      Parameters:< │ │ │ +00016660: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e66 /dt>.
      f │ │ │ +00016670: 696c 656e 616d 653c 2f63 6f64 653e 202d ilename - │ │ │ +00016680: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ +00016690: 656e 6572 6174 6564 3c2f 6464 3e0a 3c64 enerated
      .minProba │ │ │ +000166b0: 6269 6c69 7479 3c2f 636f 6465 3e20 2d20 bility - │ │ │ +000166c0: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +000166d0: 6e65 7261 7465 643c 2f64 643e 0a3c 6474 nerated.
      Returns:
      .< │ │ │ +000166f0: 6464 3e61 7574 6f6d 6174 6963 616c 6c79 dd>automatically │ │ │ +00016700: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated. │ │ │ +00016710: 3c2f 646c 3e0a 3c2f 7365 6374 696f 6e3e
      .
      │ │ │ +00016720: 0a3c 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 ..
    • ..createERFilter │ │ │ +00016780: 4e4d 323c 2f68 333e 0a3c 6469 7620 636c NM2.
      p │ │ │ +000167c0: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static ERFi │ │ │ +00016830: 6c74 6572 3c2f 613e 3c2f 7370 616e 3e26 lter& │ │ │ +00016840: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ +00016860: 6372 6561 7465 4552 4669 6c74 6572 4e4d createERFilterNM │ │ │ +00016870: 323c 2f73 7061 6e3e 3c77 6272 3e3c 7370 2(String │ │ │ +00016940: 3c2f 613e 266e 6273 703b 6669 6c65 6e61  filena │ │ │ +00016950: 6d65 293c 2f73 7061 6e3e 3c2f 6469 763e me)
      │ │ │ +00016960: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
      Reads an Ext │ │ │ +00016980: 7265 6d61 6c20 5265 6769 6f6e 2046 696c remal Region Fil │ │ │ +00016990: 7465 7220 666f 7220 7468 6520 326e 6420 ter for the 2nd │ │ │ +000169a0: 7374 6167 6520 636c 6173 7369 6669 6572 stage classifier │ │ │ +000169b0: 206f 6620 4e26 616d 703b 4d20 616c 676f of N&M algo │ │ │ +000169c0: 7269 7468 6d0a 2020 2020 2066 726f 6d20 rithm. from │ │ │ +000169d0: 7468 6520 7072 6f76 6964 6564 2070 6174 the provided pat │ │ │ +000169e0: 6820 652e 672e 202f 7061 7468 2f74 6f2f h e.g. /path/to/ │ │ │ +000169f0: 6370 702f 7472 6169 6e65 645f 636c 6173 cpp/trained_clas │ │ │ +00016a00: 7369 6669 6572 4e4d 322e 786d 6c3c 2f64 sifierNM2.xml.
      .
      Param │ │ │ +00016a30: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
      .
      │ │ │ +00016a40: 3c63 6f64 653e 6669 6c65 6e61 6d65 3c2f filename - automati │ │ │ +00016a60: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +00016a70: 2f64 643e 0a3c 6474 3e52 6574 7572 6e73 /dd>.
      Returns │ │ │ +00016a80: 3a3c 2f64 743e 0a3c 6464 3e61 7574 6f6d :
      .
      autom │ │ │ +00016a90: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +00016aa0: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
      .
      ..
    • .< │ │ │ +00016ac0: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
      .

      loadCl │ │ │ +00016b10: 6173 7369 6669 6572 4e4d 313c 2f68 333e assifierNM1

      │ │ │ +00016b20: 0a3c 6469 7620 636c 6173 733d 226d 656d .
      < │ │ │ +00016b40: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ +00016b50: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ +00016b60: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ +00016b70: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;ERF │ │ │ +00016bd0: 696c 7465 725f 4361 6c6c 6261 636b 3c2f ilter_Callback < │ │ │ +00016bf0: 7370 616e 2063 6c61 7373 3d22 656c 656d span class="elem │ │ │ +00016c00: 656e 742d 6e61 6d65 223e 6c6f 6164 436c ent-name">loadCl │ │ │ +00016c10: 6173 7369 6669 6572 4e4d 313c 2f73 7061 assifierNM1 │ │ │ +00016c40: 283c 6120 6872 6566 3d22 6874 7470 733a (String&n │ │ │ +00016cf0: 6273 703b 6669 6c65 6e61 6d65 293c 2f73 bsp;filename)
      .
      Al │ │ │ +00016d20: 6c6f 7720 746f 2069 6d70 6c69 6369 746c low to implicitl │ │ │ +00016d30: 7920 6c6f 6164 2074 6865 2064 6566 6175 y load the defau │ │ │ +00016d40: 6c74 2063 6c61 7373 6966 6965 7220 7768 lt classifier wh │ │ │ +00016d50: 656e 2063 7265 6174 696e 6720 616e 2045 en creating an E │ │ │ +00016d60: 5246 696c 7465 7220 6f62 6a65 6374 2e3c RFilter object.< │ │ │ +00016d70: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
      .
      Par │ │ │ +00016d90: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
      .filename │ │ │ +00016db0: 3c2f 636f 6465 3e20 2d20 5468 6520 584d - The XM │ │ │ +00016dc0: 4c20 6f72 2059 414d 4c20 6669 6c65 2077 L or YAML file w │ │ │ +00016dd0: 6974 6820 7468 6520 636c 6173 7369 6669 ith the classifi │ │ │ +00016de0: 6572 206d 6f64 656c 2028 652e 672e 2074 er model (e.g. t │ │ │ +00016df0: 7261 696e 6564 5f63 6c61 7373 6966 6965 rained_classifie │ │ │ +00016e00: 724e 4d31 2e78 6d6c 290a 0a20 7265 7475 rNM1.xml).. retu │ │ │ +00016e10: 726e 7320 6120 706f 696e 7465 7220 746f rns a pointer to │ │ │ +00016e20: 2045 5246 696c 7465 723a 3a43 616c 6c62 ERFilter::Callb │ │ │ +00016e30: 6163 6b2e 3c2f 6464 3e0a 3c64 743e 5265 ack..
      Re │ │ │ +00016e40: 7475 726e 733a 3c2f 6474 3e0a 3c64 643e turns:
      .
      │ │ │ +00016e50: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +00016e60: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
      .
      .
      ..
    • ..

      l │ │ │ +00016ed0: 6f61 6443 6c61 7373 6966 6965 724e 4d32 oadClassifierNM2 │ │ │ +00016ee0: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

      .
      publ │ │ │ +00016f20: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ +00016f30: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ +00016f50: 3c61 2068 7265 663d 2245 5246 696c 7465 ERFilter_Callb │ │ │ +00016fa0: 6163 6b3c 2f61 3e3c 2f73 7061 6e3e 266e ack&n │ │ │ +00016fb0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;l │ │ │ +00016fd0: 6f61 6443 6c61 7373 6966 6965 724e 4d32 oadClassifierNM2 │ │ │ +00016fe0: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (String< │ │ │ +000170b0: 2f61 3e26 6e62 7370 3b66 696c 656e 616d /a> filenam │ │ │ +000170c0: 6529 3c2f 7370 616e 3e3c 2f64 6976 3e0a e)
      . │ │ │ +000170d0: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
      Allow to impl │ │ │ +000170f0: 6963 6974 6c79 206c 6f61 6420 7468 6520 icitly load the │ │ │ +00017100: 6465 6661 756c 7420 636c 6173 7369 6669 default classifi │ │ │ +00017110: 6572 2077 6865 6e20 6372 6561 7469 6e67 er when creating │ │ │ +00017120: 2061 6e20 4552 4669 6c74 6572 206f 626a an ERFilter obj │ │ │ +00017130: 6563 742e 3c2f 6469 763e 0a3c 646c 2063 ect.
      .
      .Parameters:.
      fil │ │ │ +00017170: 656e 616d 653c 2f63 6f64 653e 202d 2054 ename - T │ │ │ +00017180: 6865 2058 4d4c 206f 7220 5941 4d4c 2066 he XML or YAML f │ │ │ +00017190: 696c 6520 7769 7468 2074 6865 2063 6c61 ile with the cla │ │ │ +000171a0: 7373 6966 6965 7220 6d6f 6465 6c20 2865 ssifier model (e │ │ │ +000171b0: 2e67 2e20 7472 6169 6e65 645f 636c 6173 .g. trained_clas │ │ │ +000171c0: 7369 6669 6572 4e4d 322e 786d 6c29 0a0a sifierNM2.xml).. │ │ │ +000171d0: 2072 6574 7572 6e73 2061 2070 6f69 6e74 returns a point │ │ │ +000171e0: 6572 2074 6f20 4552 4669 6c74 6572 3a3a er to ERFilter:: │ │ │ +000171f0: 4361 6c6c 6261 636b 2e3c 2f64 643e 0a3c Callback.
      .< │ │ │ +00017200: 6474 3e52 6574 7572 6e73 3a3c 2f64 743e dt>Returns: │ │ │ +00017210: 0a3c 6464 3e61 7574 6f6d 6174 6963 616c .
      automatical │ │ │ +00017220: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
      .
      .
      .
    • .
    • ..

      comput │ │ │ +000172b0: 654e 4d43 6861 6e6e 656c 733c 2f68 333e eNMChannels

      │ │ │ +000172c0: 0a3c 6469 7620 636c 6173 733d 226d 656d .
      │ │ │ +00017500: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
      Compute the │ │ │ +00017520: 6469 6666 6572 656e 7420 6368 616e 6e65 different channe │ │ │ +00017530: 6c73 2074 6f20 6265 2070 726f 6365 7373 ls to be process │ │ │ +00017540: 6564 2069 6e64 6570 656e 6465 6e74 6c79 ed independently │ │ │ +00017550: 2069 6e20 7468 6520 4e26 616d 703b 4d20 in the N&M │ │ │ +00017560: 616c 676f 7269 7468 6d20 4349 5445 3a20 algorithm CITE: │ │ │ +00017570: 4e65 756d 616e 6e31 322e 3c2f 6469 763e Neumann12.
      │ │ │ +00017580: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
      .
      Paramete │ │ │ +000175a0: 7273 3a3c 2f64 743e 0a3c 6464 3e3c 636f rs:
      .
      _src - │ │ │ +000175c0: 2053 6f75 7263 6520 696d 6167 652e 204d Source image. M │ │ │ +000175d0: 7573 7420 6265 2052 4742 2043 565f 3855 ust be RGB CV_8U │ │ │ +000175e0: 4333 2e3c 2f64 643e 0a3c 6464 3e3c 636f C3.
      .
      _channels - Output vec │ │ │ +00017610: 746f 7226 6c74 3b4d 6174 2667 743b 2077 tor<Mat> w │ │ │ +00017620: 6865 7265 2063 6f6d 7075 7465 6420 6368 here computed ch │ │ │ +00017630: 616e 6e65 6c73 2061 7265 2073 746f 7265 annels are store │ │ │ +00017640: 642e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 d.
      .
      _mode - │ │ │ +00017660: 204d 6f64 6520 6f66 206f 7065 7261 7469 Mode of operati │ │ │ +00017670: 6f6e 2e20 4375 7272 656e 746c 7920 7468 on. Currently th │ │ │ +00017680: 6520 6f6e 6c79 2061 7661 696c 6162 6c65 e only available │ │ │ +00017690: 206f 7074 696f 6e73 2061 7265 3a0a 203c options are:. < │ │ │ +000176a0: 623e 4552 4649 4c54 4552 5f4e 4d5f 5247 b>ERFILTER_NM_RG │ │ │ +000176b0: 424c 4772 6164 3c2f 623e 2028 7573 6564 BLGrad (used │ │ │ +000176c0: 2062 7920 6465 6661 756c 7429 2061 6e64 by default) and │ │ │ +000176d0: 203c 623e 4552 4649 4c54 4552 5f4e 4d5f ERFILTER_NM_ │ │ │ +000176e0: 4948 5347 7261 643c 2f62 3e2e 0a0a 2049 IHSGrad... I │ │ │ +000176f0: 6e20 4e26 616d 703b 4d20 616c 676f 7269 n N&M algori │ │ │ +00017700: 7468 6d2c 2074 6865 2063 6f6d 6269 6e61 thm, the combina │ │ │ +00017710: 7469 6f6e 206f 6620 696e 7465 6e73 6974 tion of intensit │ │ │ +00017720: 7920 2849 292c 2068 7565 2028 4829 2c20 y (I), hue (H), │ │ │ +00017730: 7361 7475 7261 7469 6f6e 2028 5329 2c20 saturation (S), │ │ │ +00017740: 616e 6420 6772 6164 6965 6e74 206d 6167 and gradient mag │ │ │ +00017750: 6e69 7475 6465 0a20 6368 616e 6e65 6c73 nitude. channels │ │ │ +00017760: 2028 4772 6164 2920 6172 6520 7573 6564 (Grad) are used │ │ │ +00017770: 2069 6e20 6f72 6465 7220 746f 206f 6274 in order to obt │ │ │ +00017780: 6169 6e20 6869 6768 206c 6f63 616c 697a ain high localiz │ │ │ +00017790: 6174 696f 6e20 7265 6361 6c6c 2e20 5468 ation recall. Th │ │ │ +000177a0: 6973 2069 6d70 6c65 6d65 6e74 6174 696f is implementatio │ │ │ +000177b0: 6e20 616c 736f 0a20 7072 6f76 6964 6573 n also. provides │ │ │ +000177c0: 2061 6e20 616c 7465 726e 6174 6976 6520 an alternative │ │ │ +000177d0: 636f 6d62 696e 6174 696f 6e20 6f66 2072 combination of r │ │ │ +000177e0: 6564 2028 5229 2c20 6772 6565 6e20 2847 ed (R), green (G │ │ │ +000177f0: 292c 2062 6c75 6520 2842 292c 206c 6967 ), blue (B), lig │ │ │ +00017800: 6874 6e65 7373 2028 4c29 2c20 616e 6420 htness (L), and │ │ │ +00017810: 6772 6164 6965 6e74 0a20 6d61 676e 6974 gradient. magnit │ │ │ +00017820: 7564 6520 2847 7261 6429 2e3c 2f64 643e ude (Grad).
      │ │ │ +00017830: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
      ..
    • .
    • . │ │ │ +000178a0: 0a3c 6833 3e63 6f6d 7075 7465 4e4d 4368 .

      computeNMCh │ │ │ +000178b0: 616e 6e65 6c73 3c2f 6833 3e0a 3c64 6976 annels

      .
      public static< │ │ │ +00017900: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> void computeNMChann │ │ │ +00017960: 656c 733c 2f73 7061 6e3e 3c77 6272 3e3c els< │ │ │ +00017970: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ +00017980: 6d65 7465 7273 223e 283c 6120 6872 6566 meters">(Mat&nbs │ │ │ +000179d0: 703b 5f73 7263 2c0a 203c 6120 6872 6566 p;_src,. List<Mat>&nb │ │ │ +00017ad0: 7370 3b5f 6368 616e 6e65 6c73 293c 2f73 sp;_channels)
      .
      Co │ │ │ +00017b00: 6d70 7574 6520 7468 6520 6469 6666 6572 mpute the differ │ │ │ +00017b10: 656e 7420 6368 616e 6e65 6c73 2074 6f20 ent channels to │ │ │ +00017b20: 6265 2070 726f 6365 7373 6564 2069 6e64 be processed ind │ │ │ +00017b30: 6570 656e 6465 6e74 6c79 2069 6e20 7468 ependently in th │ │ │ +00017b40: 6520 4e26 616d 703b 4d20 616c 676f 7269 e N&M algori │ │ │ +00017b50: 7468 6d20 4349 5445 3a20 4e65 756d 616e thm CITE: Neuman │ │ │ +00017b60: 6e31 322e 3c2f 6469 763e 0a3c 646c 2063 n12.
      .
      .Parameters:.
      _sr │ │ │ +00017ba0: 633c 2f63 6f64 653e 202d 2053 6f75 7263 c - Sourc │ │ │ +00017bb0: 6520 696d 6167 652e 204d 7573 7420 6265 e image. Must be │ │ │ +00017bc0: 2052 4742 2043 565f 3855 4333 2e3c 2f64 RGB CV_8UC3..
      _ch │ │ │ +00017be0: 616e 6e65 6c73 3c2f 636f 6465 3e20 2d20 annels - │ │ │ +00017bf0: 4f75 7470 7574 2076 6563 746f 7226 6c74 Output vector< │ │ │ +00017c00: 3b4d 6174 2667 743b 2077 6865 7265 2063 ;Mat> where c │ │ │ +00017c10: 6f6d 7075 7465 6420 6368 616e 6e65 6c73 omputed channels │ │ │ +00017c20: 2061 7265 2073 746f 7265 642e 0a0a 203c are stored... < │ │ │ +00017c30: 623e 4552 4649 4c54 4552 5f4e 4d5f 5247 b>ERFILTER_NM_RG │ │ │ +00017c40: 424c 4772 6164 3c2f 623e 2028 7573 6564 BLGrad (used │ │ │ +00017c50: 2062 7920 6465 6661 756c 7429 2061 6e64 by default) and │ │ │ +00017c60: 203c 623e 4552 4649 4c54 4552 5f4e 4d5f ERFILTER_NM_ │ │ │ +00017c70: 4948 5347 7261 643c 2f62 3e2e 0a0a 2049 IHSGrad... I │ │ │ +00017c80: 6e20 4e26 616d 703b 4d20 616c 676f 7269 n N&M algori │ │ │ +00017c90: 7468 6d2c 2074 6865 2063 6f6d 6269 6e61 thm, the combina │ │ │ +00017ca0: 7469 6f6e 206f 6620 696e 7465 6e73 6974 tion of intensit │ │ │ +00017cb0: 7920 2849 292c 2068 7565 2028 4829 2c20 y (I), hue (H), │ │ │ +00017cc0: 7361 7475 7261 7469 6f6e 2028 5329 2c20 saturation (S), │ │ │ +00017cd0: 616e 6420 6772 6164 6965 6e74 206d 6167 and gradient mag │ │ │ +00017ce0: 6e69 7475 6465 0a20 6368 616e 6e65 6c73 nitude. channels │ │ │ +00017cf0: 2028 4772 6164 2920 6172 6520 7573 6564 (Grad) are used │ │ │ +00017d00: 2069 6e20 6f72 6465 7220 746f 206f 6274 in order to obt │ │ │ +00017d10: 6169 6e20 6869 6768 206c 6f63 616c 697a ain high localiz │ │ │ +00017d20: 6174 696f 6e20 7265 6361 6c6c 2e20 5468 ation recall. Th │ │ │ +00017d30: 6973 2069 6d70 6c65 6d65 6e74 6174 696f is implementatio │ │ │ +00017d40: 6e20 616c 736f 0a20 7072 6f76 6964 6573 n also. provides │ │ │ +00017d50: 2061 6e20 616c 7465 726e 6174 6976 6520 an alternative │ │ │ +00017d60: 636f 6d62 696e 6174 696f 6e20 6f66 2072 combination of r │ │ │ +00017d70: 6564 2028 5229 2c20 6772 6565 6e20 2847 ed (R), green (G │ │ │ +00017d80: 292c 2062 6c75 6520 2842 292c 206c 6967 ), blue (B), lig │ │ │ +00017d90: 6874 6e65 7373 2028 4c29 2c20 616e 6420 htness (L), and │ │ │ +00017da0: 6772 6164 6965 6e74 0a20 6d61 676e 6974 gradient. magnit │ │ │ +00017db0: 7564 6520 2847 7261 6429 2e3c 2f64 643e ude (Grad).
      │ │ │ +00017dc0: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
      ..
    • .
    • ..

      erGroupin │ │ │ +00017e80: 673c 2f68 333e 0a3c 6469 7620 636c 6173 g

      .
      pub │ │ │ +00017ec0: 6c69 6320 7374 6174 6963 3c2f 7370 616e lic static void&nbs │ │ │ +00017f00: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;erG │ │ │ +00017f20: 726f 7570 696e 673c 2f73 7061 6e3e 3c77 rouping(Mat │ │ │ +00017f90: 266e 6273 703b 696d 6167 652c 0a20 3c61  image,. Mat channel,. │ │ │ +00017ff0: 203c 6120 6872 6566 3d22 6874 7470 733a List<MatOfPoint& │ │ │ +000180f0: 6774 3b26 6e62 7370 3b72 6567 696f 6e73 gt; regions │ │ │ +00018100: 2c0a 203c 6120 6872 6566 3d22 2e2e 2f63 ,. MatOfRect groups_r │ │ │ +00018160: 6563 7473 2c0a 2069 6e74 266e 6273 703b ects,. int  │ │ │ +00018170: 6d65 7468 6f64 2c0a 203c 6120 6872 6566 method,. Stri │ │ │ +00018220: 6e67 3c2f 613e 266e 6273 703b 6669 6c65 ng file │ │ │ +00018230: 6e61 6d65 2c0a 2066 6c6f 6174 266e 6273 name,. float&nbs │ │ │ +00018240: 703b 6d69 6e50 726f 6261 626c 6974 7929 p;minProbablity) │ │ │ +00018250: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .Find groups of │ │ │ +00018280: 4578 7472 656d 616c 2052 6567 696f 6e73 Extremal Regions │ │ │ +00018290: 2074 6861 7420 6172 6520 6f72 6761 6e69 that are organi │ │ │ +000182a0: 7a65 6420 6173 2074 6578 7420 626c 6f63 zed as text bloc │ │ │ +000182b0: 6b73 2e3c 2f64 6976 3e0a 3c64 6c20 636c ks..
      .
      Parameters:
      .
      imag │ │ │ +000182f0: 653c 2f63 6f64 653e 202d 2061 7574 6f6d e - autom │ │ │ +00018300: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +00018310: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
      .
      channel │ │ │ +00018330: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ +00018340: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
      . │ │ │ +00018350: 3c64 643e 3c63 6f64 653e 7265 6769 6f6e
      region │ │ │ +00018360: 733c 2f63 6f64 653e 202d 2056 6563 746f s - Vecto │ │ │ +00018370: 7220 6f66 2045 5227 7320 7265 7472 6965 r of ER's retrie │ │ │ +00018380: 7665 6420 6672 6f6d 2074 6865 2045 5246 ved from the ERF │ │ │ +00018390: 696c 7465 7220 616c 676f 7269 7468 6d20 ilter algorithm │ │ │ +000183a0: 6672 6f6d 2065 6163 6820 6368 616e 6e65 from each channe │ │ │ +000183b0: 6c2e 0a0a 2070 726f 7669 6465 6420 7265 l... provided re │ │ │ +000183c0: 6769 6f6e 732e 3c2f 6464 3e0a 3c64 643e gions.
      .
      │ │ │ +000183d0: 3c63 6f64 653e 6772 6f75 7073 5f72 6563 groups_rec │ │ │ +000183e0: 7473 3c2f 636f 6465 3e20 2d20 5468 6520 ts - The │ │ │ +000183f0: 6f75 7470 7574 206f 6620 7468 6520 616c output of the al │ │ │ +00018400: 676f 7269 7468 6d20 6172 6520 7374 6f72 gorithm are stor │ │ │ +00018410: 6564 2069 6e20 7468 6973 2070 6172 616d ed in this param │ │ │ +00018420: 6574 6572 2061 7320 6c69 7374 206f 6620 eter as list of │ │ │ +00018430: 7265 6374 616e 676c 6573 2e3c 2f64 643e rectangles.
      │ │ │ +00018440: 0a3c 6464 3e3c 636f 6465 3e6d 6574 686f .
      metho │ │ │ +00018450: 643c 2f63 6f64 653e 202d 2047 726f 7570 d - Group │ │ │ +00018460: 696e 6720 6d65 7468 6f64 2028 7365 6520 ing method (see │ │ │ +00018470: 7465 7874 3a3a 6572 4772 6f75 7069 6e67 text::erGrouping │ │ │ +00018480: 5f4d 6f64 6573 292e 2043 616e 2062 6520 _Modes). Can be │ │ │ +00018490: 6f6e 6520 6f66 2045 5247 524f 5550 494e one of ERGROUPIN │ │ │ +000184a0: 475f 4f52 4945 4e54 4154 494f 4e5f 484f G_ORIENTATION_HO │ │ │ +000184b0: 5249 5a2c 0a20 4552 4752 4f55 5049 4e47 RIZ,. ERGROUPING │ │ │ +000184c0: 5f4f 5249 454e 5441 5449 4f4e 5f41 4e59 _ORIENTATION_ANY │ │ │ +000184d0: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
      .
      filename │ │ │ +000184f0: 202d 2054 6865 2058 4d4c 206f 7220 5941 - The XML or YA │ │ │ +00018500: 4d4c 2066 696c 6520 7769 7468 2074 6865 ML file with the │ │ │ +00018510: 2063 6c61 7373 6966 6965 7220 6d6f 6465 classifier mode │ │ │ +00018520: 6c20 2865 2e67 2e0a 2073 616d 706c 6573 l (e.g.. samples │ │ │ +00018530: 2f74 7261 696e 6564 5f63 6c61 7373 6966 /trained_classif │ │ │ +00018540: 6965 725f 6572 4772 6f75 7069 6e67 2e78 ier_erGrouping.x │ │ │ +00018550: 6d6c 292e 204f 6e6c 7920 746f 2075 7365 ml). Only to use │ │ │ +00018560: 2077 6865 6e20 6772 6f75 7069 6e67 206d when grouping m │ │ │ +00018570: 6574 686f 6420 6973 0a20 4552 4752 4f55 ethod is. ERGROU │ │ │ +00018580: 5049 4e47 5f4f 5249 454e 5441 5449 4f4e PING_ORIENTATION │ │ │ +00018590: 5f41 4e59 2e3c 2f64 643e 0a3c 6464 3e3c _ANY.
      .
      < │ │ │ +000185a0: 636f 6465 3e6d 696e 5072 6f62 6162 6c69 code>minProbabli │ │ │ +000185b0: 7479 3c2f 636f 6465 3e20 2d20 5468 6520 ty - The │ │ │ +000185c0: 6d69 6e69 6d75 6d20 7072 6f62 6162 696c minimum probabil │ │ │ +000185d0: 6974 7920 666f 7220 6163 6365 7074 696e ity for acceptin │ │ │ +000185e0: 6720 6120 6772 6f75 702e 204f 6e6c 7920 g a group. Only │ │ │ +000185f0: 746f 2075 7365 2077 6865 6e20 6772 6f75 to use when grou │ │ │ +00018600: 7069 6e67 0a20 6d65 7468 6f64 2069 7320 ping. method is │ │ │ +00018610: 4552 4752 4f55 5049 4e47 5f4f 5249 454e ERGROUPING_ORIEN │ │ │ +00018620: 5441 5449 4f4e 5f41 4e59 2e3c 2f64 643e TATION_ANY.
      │ │ │ +00018630: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
      ..
    • .
    • ..

      erGrouping

      │ │ │ +000186f0: 0a3c 6469 7620 636c 6173 733d 226d 656d .
      < │ │ │ +00018710: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ +00018720: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ +00018730: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ +00018740: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;void< │ │ │ +00018760: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> erGroupin │ │ │ +00018790: 673c 2f73 7061 6e3e 3c77 6272 3e3c 7370 g(Mat  │ │ │ +00018800: 696d 6167 652c 0a20 3c61 2068 7265 663d image,. Mat  │ │ │ +00018850: 3b63 6861 6e6e 656c 2c0a 203c 6120 6872 ;channel,. List │ │ │ +00018900: 3c2f 613e 266c 743b 3c61 2068 7265 663d <MatOf │ │ │ +00018950: 506f 696e 743c 2f61 3e26 6774 3b26 6e62 Point>&nb │ │ │ +00018960: 7370 3b72 6567 696f 6e73 2c0a 203c 6120 sp;regions,. M │ │ │ +000189b0: 6174 4f66 5265 6374 3c2f 613e 266e 6273 atOfRect&nbs │ │ │ +000189c0: 703b 6772 6f75 7073 5f72 6563 7473 2c0a p;groups_rects,. │ │ │ +000189d0: 2069 6e74 266e 6273 703b 6d65 7468 6f64 int method │ │ │ +000189e0: 2c0a 203c 6120 6872 6566 3d22 6874 7470 ,. String │ │ │ +00018a90: 266e 6273 703b 6669 6c65 6e61 6d65 293c  filename)< │ │ │ +00018aa0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      . │ │ │ +00018ac0: 4669 6e64 2067 726f 7570 7320 6f66 2045 Find groups of E │ │ │ +00018ad0: 7874 7265 6d61 6c20 5265 6769 6f6e 7320 xtremal Regions │ │ │ +00018ae0: 7468 6174 2061 7265 206f 7267 616e 697a that are organiz │ │ │ +00018af0: 6564 2061 7320 7465 7874 2062 6c6f 636b ed as text block │ │ │ +00018b00: 732e 3c2f 6469 763e 0a3c 646c 2063 6c61 s..
      .
      │ │ │ +00018b20: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
      │ │ │ +00018b30: 0a3c 6464 3e3c 636f 6465 3e69 6d61 6765 .
      image │ │ │ +00018b40: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ +00018b50: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +00018b60: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d
      .
      channel │ │ │ +00018b80: 2d20 6175 746f 6d61 7469 6361 6c6c 7920 - automatically │ │ │ +00018b90: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated
      .< │ │ │ +00018ba0: 6464 3e3c 636f 6465 3e72 6567 696f 6e73 dd>regions │ │ │ +00018bb0: 3c2f 636f 6465 3e20 2d20 5665 6374 6f72 - Vector │ │ │ +00018bc0: 206f 6620 4552 2773 2072 6574 7269 6576 of ER's retriev │ │ │ +00018bd0: 6564 2066 726f 6d20 7468 6520 4552 4669 ed from the ERFi │ │ │ +00018be0: 6c74 6572 2061 6c67 6f72 6974 686d 2066 lter algorithm f │ │ │ +00018bf0: 726f 6d20 6561 6368 2063 6861 6e6e 656c rom each channel │ │ │ +00018c00: 2e0a 0a20 7072 6f76 6964 6564 2072 6567 ... provided reg │ │ │ +00018c10: 696f 6e73 2e3c 2f64 643e 0a3c 6464 3e3c ions..
      < │ │ │ +00018c20: 636f 6465 3e67 726f 7570 735f 7265 6374 code>groups_rect │ │ │ +00018c30: 733c 2f63 6f64 653e 202d 2054 6865 206f s - The o │ │ │ +00018c40: 7574 7075 7420 6f66 2074 6865 2061 6c67 utput of the alg │ │ │ +00018c50: 6f72 6974 686d 2061 7265 2073 746f 7265 orithm are store │ │ │ +00018c60: 6420 696e 2074 6869 7320 7061 7261 6d65 d in this parame │ │ │ +00018c70: 7465 7220 6173 206c 6973 7420 6f66 2072 ter as list of r │ │ │ +00018c80: 6563 7461 6e67 6c65 732e 3c2f 6464 3e0a ectangles.
      . │ │ │ +00018c90: 3c64 643e 3c63 6f64 653e 6d65 7468 6f64
      method │ │ │ +00018ca0: 3c2f 636f 6465 3e20 2d20 4772 6f75 7069 - Groupi │ │ │ +00018cb0: 6e67 206d 6574 686f 6420 2873 6565 2074 ng method (see t │ │ │ +00018cc0: 6578 743a 3a65 7247 726f 7570 696e 675f ext::erGrouping_ │ │ │ +00018cd0: 4d6f 6465 7329 2e20 4361 6e20 6265 206f Modes). Can be o │ │ │ +00018ce0: 6e65 206f 6620 4552 4752 4f55 5049 4e47 ne of ERGROUPING │ │ │ +00018cf0: 5f4f 5249 454e 5441 5449 4f4e 5f48 4f52 _ORIENTATION_HOR │ │ │ +00018d00: 495a 2c0a 2045 5247 524f 5550 494e 475f IZ,. ERGROUPING_ │ │ │ +00018d10: 4f52 4945 4e54 4154 494f 4e5f 414e 592e ORIENTATION_ANY. │ │ │ +00018d20: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
      .
      │ │ │ +00018d30: 6669 6c65 6e61 6d65 3c2f 636f 6465 3e20 filename │ │ │ +00018d40: 2d20 5468 6520 584d 4c20 6f72 2059 414d - The XML or YAM │ │ │ +00018d50: 4c20 6669 6c65 2077 6974 6820 7468 6520 L file with the │ │ │ +00018d60: 636c 6173 7369 6669 6572 206d 6f64 656c classifier model │ │ │ +00018d70: 2028 652e 672e 0a20 7361 6d70 6c65 732f (e.g.. samples/ │ │ │ +00018d80: 7472 6169 6e65 645f 636c 6173 7369 6669 trained_classifi │ │ │ +00018d90: 6572 5f65 7247 726f 7570 696e 672e 786d er_erGrouping.xm │ │ │ +00018da0: 6c29 2e20 4f6e 6c79 2074 6f20 7573 6520 l). Only to use │ │ │ +00018db0: 7768 656e 2067 726f 7570 696e 6720 6d65 when grouping me │ │ │ +00018dc0: 7468 6f64 2069 730a 2045 5247 524f 5550 thod is. ERGROUP │ │ │ +00018dd0: 494e 475f 4f52 4945 4e54 4154 494f 4e5f ING_ORIENTATION_ │ │ │ +00018de0: 414e 592e 0a0a 206d 6574 686f 6420 6973 ANY... method is │ │ │ +00018df0: 2045 5247 524f 5550 494e 475f 4f52 4945 ERGROUPING_ORIE │ │ │ +00018e00: 4e54 4154 494f 4e5f 414e 592e 3c2f 6464 NTATION_ANY.
      .
      ..
    • .
    • ..

      erGrouping

      │ │ │ +00018ec0: 0a3c 6469 7620 636c 6173 733d 226d 656d .
      < │ │ │ +00018ee0: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ +00018ef0: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ +00018f00: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ +00018f10: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;void< │ │ │ +00018f30: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> erGroupin │ │ │ +00018f60: 673c 2f73 7061 6e3e 3c77 6272 3e3c 7370 g(Mat  │ │ │ +00018fd0: 696d 6167 652c 0a20 3c61 2068 7265 663d image,. Mat  │ │ │ +00019020: 3b63 6861 6e6e 656c 2c0a 203c 6120 6872 ;channel,. List │ │ │ +000190d0: 3c2f 613e 266c 743b 3c61 2068 7265 663d <MatOf │ │ │ +00019120: 506f 696e 743c 2f61 3e26 6774 3b26 6e62 Point>&nb │ │ │ +00019130: 7370 3b72 6567 696f 6e73 2c0a 203c 6120 sp;regions,. M │ │ │ +00019180: 6174 4f66 5265 6374 3c2f 613e 266e 6273 atOfRect&nbs │ │ │ +00019190: 703b 6772 6f75 7073 5f72 6563 7473 2c0a p;groups_rects,. │ │ │ +000191a0: 2069 6e74 266e 6273 703b 6d65 7468 6f64 int method │ │ │ +000191b0: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
      .< │ │ │ +000191c0: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ +000191d0: 223e 4669 6e64 2067 726f 7570 7320 6f66 ">Find groups of │ │ │ +000191e0: 2045 7874 7265 6d61 6c20 5265 6769 6f6e Extremal Region │ │ │ +000191f0: 7320 7468 6174 2061 7265 206f 7267 616e s that are organ │ │ │ +00019200: 697a 6564 2061 7320 7465 7874 2062 6c6f ized as text blo │ │ │ +00019210: 636b 732e 3c2f 6469 763e 0a3c 646c 2063 cks..
      .Parameters:.
      ima │ │ │ +00019250: 6765 3c2f 636f 6465 3e20 2d20 6175 746f ge - auto │ │ │ +00019260: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ +00019270: 7465 643c 2f64 643e 0a3c 6464 3e3c 636f ted
      .
      channel - automaticall │ │ │ +000192a0: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
      │ │ │ +000192b0: 0a3c 6464 3e3c 636f 6465 3e72 6567 696f .
      regio │ │ │ +000192c0: 6e73 3c2f 636f 6465 3e20 2d20 5665 6374 ns - Vect │ │ │ +000192d0: 6f72 206f 6620 4552 2773 2072 6574 7269 or of ER's retri │ │ │ +000192e0: 6576 6564 2066 726f 6d20 7468 6520 4552 eved from the ER │ │ │ +000192f0: 4669 6c74 6572 2061 6c67 6f72 6974 686d Filter algorithm │ │ │ +00019300: 2066 726f 6d20 6561 6368 2063 6861 6e6e from each chann │ │ │ +00019310: 656c 2e0a 0a20 7072 6f76 6964 6564 2072 el... provided r │ │ │ +00019320: 6567 696f 6e73 2e3c 2f64 643e 0a3c 6464 egions.
      .
      groups_re │ │ │ +00019340: 6374 733c 2f63 6f64 653e 202d 2054 6865 cts - The │ │ │ +00019350: 206f 7574 7075 7420 6f66 2074 6865 2061 output of the a │ │ │ +00019360: 6c67 6f72 6974 686d 2061 7265 2073 746f lgorithm are sto │ │ │ +00019370: 7265 6420 696e 2074 6869 7320 7061 7261 red in this para │ │ │ +00019380: 6d65 7465 7220 6173 206c 6973 7420 6f66 meter as list of │ │ │ +00019390: 2072 6563 7461 6e67 6c65 732e 3c2f 6464 rectangles.
      .
      meth │ │ │ +000193b0: 6f64 3c2f 636f 6465 3e20 2d20 4772 6f75 od - Grou │ │ │ +000193c0: 7069 6e67 206d 6574 686f 6420 2873 6565 ping method (see │ │ │ +000193d0: 2074 6578 743a 3a65 7247 726f 7570 696e text::erGroupin │ │ │ +000193e0: 675f 4d6f 6465 7329 2e20 4361 6e20 6265 g_Modes). Can be │ │ │ +000193f0: 206f 6e65 206f 6620 4552 4752 4f55 5049 one of ERGROUPI │ │ │ +00019400: 4e47 5f4f 5249 454e 5441 5449 4f4e 5f48 NG_ORIENTATION_H │ │ │ +00019410: 4f52 495a 2c0a 2045 5247 524f 5550 494e ORIZ,. ERGROUPIN │ │ │ +00019420: 475f 4f52 4945 4e54 4154 494f 4e5f 414e G_ORIENTATION_AN │ │ │ +00019430: 592e 0a0a 2073 616d 706c 6573 2f74 7261 Y... samples/tra │ │ │ +00019440: 696e 6564 5f63 6c61 7373 6966 6965 725f ined_classifier_ │ │ │ +00019450: 6572 4772 6f75 7069 6e67 2e78 6d6c 292e erGrouping.xml). │ │ │ +00019460: 204f 6e6c 7920 746f 2075 7365 2077 6865 Only to use whe │ │ │ +00019470: 6e20 6772 6f75 7069 6e67 206d 6574 686f n grouping metho │ │ │ +00019480: 6420 6973 0a20 4552 4752 4f55 5049 4e47 d is. ERGROUPING │ │ │ +00019490: 5f4f 5249 454e 5441 5449 4f4e 5f41 4e59 _ORIENTATION_ANY │ │ │ +000194a0: 2e0a 0a20 6d65 7468 6f64 2069 7320 4552 ... method is ER │ │ │ +000194b0: 4752 4f55 5049 4e47 5f4f 5249 454e 5441 GROUPING_ORIENTA │ │ │ +000194c0: 5449 4f4e 5f41 4e59 2e3c 2f64 643e 0a3c TION_ANY.
      .< │ │ │ +000194d0: 2f64 6c3e 0a3c 2f73 6563 7469 6f6e 3e0a /dl>.. │ │ │ +000194e0: 3c2f 6c69 3e0a 3c6c 693e 0a3c 7365 6374
    • .
    • ..

      erGrou │ │ │ +00019570: 7069 6e67 3c2f 6833 3e0a 3c64 6976 2063 ping

      .
      │ │ │ +000195b0: 7075 626c 6963 2073 7461 7469 633c 2f73 public static void& │ │ │ +000195f0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ +00019610: 6572 4772 6f75 7069 6e67 3c2f 7370 616e erGrouping( │ │ │ +00019640: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ +00019680: 2f61 3e26 6e62 7370 3b69 6d61 6765 2c0a /a> image,. │ │ │ +00019690: 203c 6120 6872 6566 3d22 2e2e 2f63 6f72 Mat │ │ │ +000196d0: 3c2f 613e 266e 6273 703b 6368 616e 6e65  channe │ │ │ +000196e0: 6c2c 0a20 3c61 2068 7265 663d 2268 7474 l,. List< │ │ │ +00019790: 3b3c 6120 6872 6566 3d22 2e2e 2f63 6f72 ;MatOfPoint> regi │ │ │ +000197f0: 6f6e 732c 0a20 3c61 2068 7265 663d 222e ons,. MatOfRec │ │ │ +00019840: 743c 2f61 3e26 6e62 7370 3b67 726f 7570 t group │ │ │ +00019850: 735f 7265 6374 7329 3c2f 7370 616e 3e3c s_rects)< │ │ │ +00019860: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      Find gr │ │ │ +00019880: 6f75 7073 206f 6620 4578 7472 656d 616c oups of Extremal │ │ │ +00019890: 2052 6567 696f 6e73 2074 6861 7420 6172 Regions that ar │ │ │ +000198a0: 6520 6f72 6761 6e69 7a65 6420 6173 2074 e organized as t │ │ │ +000198b0: 6578 7420 626c 6f63 6b73 2e3c 2f64 6976 ext blocks.
      .
      .
      Paramet │ │ │ +000198e0: 6572 733a 3c2f 6474 3e0a 3c64 643e 3c63 ers:
      .
      image │ │ │ +00019900: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ +00019910: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
      . │ │ │ +00019920: 3c64 643e 3c63 6f64 653e 6368 616e 6e65
      channe │ │ │ +00019930: 6c3c 2f63 6f64 653e 202d 2061 7574 6f6d l - autom │ │ │ +00019940: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +00019950: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
      .
      regions │ │ │ +00019970: 202d 2056 6563 746f 7220 6f66 2045 5227 - Vector of ER' │ │ │ +00019980: 7320 7265 7472 6965 7665 6420 6672 6f6d s retrieved from │ │ │ +00019990: 2074 6865 2045 5246 696c 7465 7220 616c the ERFilter al │ │ │ +000199a0: 676f 7269 7468 6d20 6672 6f6d 2065 6163 gorithm from eac │ │ │ +000199b0: 6820 6368 616e 6e65 6c2e 0a0a 2070 726f h channel... pro │ │ │ +000199c0: 7669 6465 6420 7265 6769 6f6e 732e 3c2f vided regions..
      gr │ │ │ +000199e0: 6f75 7073 5f72 6563 7473 3c2f 636f 6465 oups_rects - The output o │ │ │ +00019a00: 6620 7468 6520 616c 676f 7269 7468 6d20 f the algorithm │ │ │ +00019a10: 6172 6520 7374 6f72 6564 2069 6e20 7468 are stored in th │ │ │ +00019a20: 6973 2070 6172 616d 6574 6572 2061 7320 is parameter as │ │ │ +00019a30: 6c69 7374 206f 6620 7265 6374 616e 676c list of rectangl │ │ │ +00019a40: 6573 2e0a 0a20 4552 4752 4f55 5049 4e47 es... ERGROUPING │ │ │ +00019a50: 5f4f 5249 454e 5441 5449 4f4e 5f41 4e59 _ORIENTATION_ANY │ │ │ +00019a60: 2e0a 0a20 7361 6d70 6c65 732f 7472 6169 ... samples/trai │ │ │ +00019a70: 6e65 645f 636c 6173 7369 6669 6572 5f65 ned_classifier_e │ │ │ +00019a80: 7247 726f 7570 696e 672e 786d 6c29 2e20 rGrouping.xml). │ │ │ +00019a90: 4f6e 6c79 2074 6f20 7573 6520 7768 656e Only to use when │ │ │ +00019aa0: 2067 726f 7570 696e 6720 6d65 7468 6f64 grouping method │ │ │ +00019ab0: 2069 730a 2045 5247 524f 5550 494e 475f is. ERGROUPING_ │ │ │ +00019ac0: 4f52 4945 4e54 4154 494f 4e5f 414e 592e ORIENTATION_ANY. │ │ │ +00019ad0: 0a0a 206d 6574 686f 6420 6973 2045 5247 .. method is ERG │ │ │ +00019ae0: 524f 5550 494e 475f 4f52 4945 4e54 4154 ROUPING_ORIENTAT │ │ │ +00019af0: 494f 4e5f 414e 592e 3c2f 6464 3e0a 3c2f ION_ANY.
      ...< │ │ │ +00019b10: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
    • ..

      │ │ │ +00019ba0: 6465 7465 6374 5265 6769 6f6e 733c 2f68 detectRegions.
      public │ │ │ +00019bf0: 7374 6174 6963 3c2f 7370 616e 3e26 6e62 static&nb │ │ │ +00019c00: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;voi │ │ │ +00019c20: 643c 2f73 7061 6e3e 266e 6273 703b 3c73 d detectR │ │ │ +00019c50: 6567 696f 6e73 3c2f 7370 616e 3e3c 7762 egions(Mat& │ │ │ +00019cc0: 6e62 7370 3b69 6d61 6765 2c0a 203c 6120 nbsp;image,. ERFilter er_filte │ │ │ +00019d20: 7231 2c0a 203c 6120 6872 6566 3d22 4552 r1,. ER │ │ │ +00019d60: 4669 6c74 6572 3c2f 613e 266e 6273 703b Filter  │ │ │ +00019d70: 6572 5f66 696c 7465 7232 2c0a 203c 6120 er_filter2,. Li │ │ │ +00019e20: 7374 3c2f 613e 266c 743b 3c61 2068 7265 st<Mat │ │ │ +00019e70: 4f66 506f 696e 743c 2f61 3e26 6774 3b26 OfPoint>& │ │ │ +00019e80: 6e62 7370 3b72 6567 696f 6e73 293c 2f73 nbsp;regions)
      .
      Co │ │ │ +00019eb0: 6e76 6572 7473 204d 5345 5220 636f 6e74 nverts MSER cont │ │ │ +00019ec0: 6f75 7273 2028 7665 6374 6f72 266c 743b ours (vector< │ │ │ +00019ed0: 506f 696e 7426 6774 3b29 2074 6f20 4552 Point>) to ER │ │ │ +00019ee0: 5374 6174 2072 6567 696f 6e73 2e3c 2f64 Stat regions..
      .
      Param │ │ │ +00019f10: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
      .
      │ │ │ +00019f20: 3c63 6f64 653e 696d 6167 653c 2f63 6f64 image - Source imag │ │ │ +00019f40: 6520 4356 5f38 5543 3120 6672 6f6d 2077 e CV_8UC1 from w │ │ │ +00019f50: 6869 6368 2074 6865 204d 5345 5273 2077 hich the MSERs w │ │ │ +00019f60: 6865 7265 2065 7874 7261 6374 6564 2e3c here extracted.< │ │ │ +00019f70: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e65 /dd>.
      e │ │ │ +00019f80: 725f 6669 6c74 6572 313c 2f63 6f64 653e r_filter1 │ │ │ +00019f90: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ +00019fa0: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
      . │ │ │ +00019fb0: 3c64 643e 3c63 6f64 653e 6572 5f66 696c
      er_fil │ │ │ +00019fc0: 7465 7232 3c2f 636f 6465 3e20 2d20 6175 ter2 - au │ │ │ +00019fd0: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ +00019fe0: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated
      .
      < │ │ │ +00019ff0: 636f 6465 3e72 6567 696f 6e73 3c2f 636f code>regions - Output whe │ │ │ +0001a010: 7265 2074 6865 2045 5253 7461 7420 7265 re the ERStat re │ │ │ +0001a020: 6769 6f6e 7320 6172 6520 7374 6f72 6564 gions are stored │ │ │ +0001a030: 2e0a 0a20 4974 2074 616b 6573 2061 7320 ... It takes as │ │ │ +0001a040: 696e 7075 7420 7468 6520 636f 6e74 6f75 input the contou │ │ │ +0001a050: 7273 2070 726f 7669 6465 6420 6279 2074 rs provided by t │ │ │ +0001a060: 6865 204f 7065 6e43 5620 4d53 4552 2066 he OpenCV MSER f │ │ │ +0001a070: 6561 7475 7265 2064 6574 6563 746f 7220 eature detector │ │ │ +0001a080: 616e 6420 7265 7475 726e 7320 6173 206f and returns as o │ │ │ +0001a090: 7574 7075 740a 2074 776f 2076 6563 746f utput. two vecto │ │ │ +0001a0a0: 7273 206f 6620 4552 5374 6174 732e 2054 rs of ERStats. T │ │ │ +0001a0b0: 6869 7320 6973 2062 6563 6175 7365 204d his is because M │ │ │ +0001a0c0: 5345 5228 2920 6f75 7470 7574 2063 6f6e SER() output con │ │ │ +0001a0d0: 7461 696e 7320 626f 7468 204d 5345 522b tains both MSER+ │ │ │ +0001a0e0: 2061 6e64 204d 5345 522d 2072 6567 696f and MSER- regio │ │ │ +0001a0f0: 6e73 2069 6e20 610a 2073 696e 676c 6520 ns in a. single │ │ │ +0001a100: 7665 6374 6f72 266c 743b 506f 696e 7426 vector<Point& │ │ │ +0001a110: 6774 3b2c 2074 6865 2066 756e 6374 696f gt;, the functio │ │ │ +0001a120: 6e20 7365 7061 7261 7465 7320 7468 656d n separates them │ │ │ +0001a130: 2069 6e20 7477 6f20 6469 6666 6572 656e in two differen │ │ │ +0001a140: 7420 7665 6374 6f72 7320 2874 6869 7320 t vectors (this │ │ │ +0001a150: 6973 2061 7320 6966 2074 6865 0a20 4552 is as if the. ER │ │ │ +0001a160: 5374 6174 7320 7768 6572 6520 6578 7472 Stats where extr │ │ │ +0001a170: 6163 7465 6420 6672 6f6d 2074 776f 2064 acted from two d │ │ │ +0001a180: 6966 6665 7265 6e74 2063 6861 6e6e 656c ifferent channel │ │ │ +0001a190: 7329 2e0a 0a20 416e 2065 7861 6d70 6c65 s)... An example │ │ │ +0001a1a0: 206f 6620 4d53 4552 7354 6f45 5253 7461 of MSERsToERSta │ │ │ +0001a1b0: 7473 2069 6e20 7573 6520 6361 6e20 6265 ts in use can be │ │ │ +0001a1c0: 2066 6f75 6e64 2069 6e20 7468 6520 7465 found in the te │ │ │ +0001a1d0: 7874 2064 6574 6563 7469 6f6e 2077 6562 xt detection web │ │ │ +0001a1e0: 6361 6d5f 6465 6d6f 3a0a 2026 6c74 3b68 cam_demo:. <h │ │ │ +0001a1f0: 7474 7073 3a2f 2f67 6974 6875 622e 636f ttps://github.co │ │ │ +0001a200: 6d2f 6f70 656e 6376 2f6f 7065 6e63 765f m/opencv/opencv_ │ │ │ +0001a210: 636f 6e74 7269 622f 626c 6f62 2f6d 6173 contrib/blob/mas │ │ │ +0001a220: 7465 722f 6d6f 6475 6c65 732f 7465 7874 ter/modules/text │ │ │ +0001a230: 2f73 616d 706c 6573 2f77 6562 6361 6d5f /samples/webcam_ │ │ │ +0001a240: 6465 6d6f 2e63 7070 2667 743b 3c2f 6464 demo.cpp>
      .
      ..

    • .
    • ..

      detect │ │ │ +0001a320: 5265 6769 6f6e 733c 2f68 333e 0a3c 6469 Regions

      .public static │ │ │ +0001a370: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  void detectRegions │ │ │ +0001a3d0: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (Mat i │ │ │ +0001a440: 6d61 6765 2c0a 203c 6120 6872 6566 3d22 mage,. │ │ │ +0001a480: 4552 4669 6c74 6572 3c2f 613e 266e 6273 ERFilter&nbs │ │ │ +0001a490: 703b 6572 5f66 696c 7465 7231 2c0a 203c p;er_filter1,. < │ │ │ +0001a4a0: 6120 6872 6566 3d22 4552 4669 6c74 6572 a href="ERFilter │ │ │ +0001a4b0: 2e68 746d 6c22 2074 6974 6c65 3d22 636c .html" title="cl │ │ │ +0001a4c0: 6173 7320 696e 206f 7267 2e6f 7065 6e63 ass in org.openc │ │ │ +0001a4d0: 762e 7465 7874 223e 4552 4669 6c74 6572 v.text">ERFilter │ │ │ +0001a4e0: 3c2f 613e 266e 6273 703b 6572 5f66 696c  er_fil │ │ │ +0001a4f0: 7465 7232 2c0a 203c 6120 6872 6566 3d22 ter2,. MatOfRe │ │ │ +0001a540: 6374 3c2f 613e 266e 6273 703b 6772 6f75 ct grou │ │ │ +0001a550: 7073 5f72 6563 7473 2c0a 2069 6e74 266e ps_rects,. int&n │ │ │ +0001a560: 6273 703b 6d65 7468 6f64 2c0a 203c 6120 bsp;method,. │ │ │ +0001a610: 5374 7269 6e67 3c2f 613e 266e 6273 703b String  │ │ │ +0001a620: 6669 6c65 6e61 6d65 2c0a 2066 6c6f 6174 filename,. float │ │ │ +0001a630: 266e 6273 703b 6d69 6e50 726f 6261 6269  minProbabi │ │ │ +0001a640: 6c69 7479 293c 2f73 7061 6e3e 3c2f 6469 lity).
      Extracts t │ │ │ +0001a670: 6578 7420 7265 6769 6f6e 7320 6672 6f6d ext regions from │ │ │ +0001a680: 2069 6d61 6765 2e3c 2f64 6976 3e0a 3c64 image.
      . │ │ │ +0001a6a0: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
      Parameters: │ │ │ +0001a6b0: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
      .
      │ │ │ +0001a6c0: 696d 6167 653c 2f63 6f64 653e 202d 2053 image - S │ │ │ +0001a6d0: 6f75 7263 6520 696d 6167 6520 7768 6572 ource image wher │ │ │ +0001a6e0: 6520 7465 7874 2062 6c6f 636b 7320 6e65 e text blocks ne │ │ │ +0001a6f0: 6564 7320 746f 2062 6520 6578 7472 6163 eds to be extrac │ │ │ +0001a700: 7465 6420 6672 6f6d 2e20 2053 686f 756c ted from. Shoul │ │ │ +0001a710: 6420 6265 2043 565f 3855 4333 2028 636f d be CV_8UC3 (co │ │ │ +0001a720: 6c6f 7229 2e3c 2f64 643e 0a3c 6464 3e3c lor).
      .
      < │ │ │ +0001a730: 636f 6465 3e65 725f 6669 6c74 6572 313c code>er_filter1< │ │ │ +0001a740: 2f63 6f64 653e 202d 2045 7874 7265 6d61 /code> - Extrema │ │ │ +0001a750: 6c20 5265 6769 6f6e 2046 696c 7465 7220 l Region Filter │ │ │ +0001a760: 666f 7220 7468 6520 3173 7420 7374 6167 for the 1st stag │ │ │ +0001a770: 6520 636c 6173 7369 6669 6572 206f 6620 e classifier of │ │ │ +0001a780: 4e26 616d 703b 4d20 616c 676f 7269 7468 N&M algorith │ │ │ +0001a790: 6d20 4349 5445 3a20 4e65 756d 616e 6e31 m CITE: Neumann1 │ │ │ +0001a7a0: 323c 2f64 643e 0a3c 6464 3e3c 636f 6465 2
      .
      er_filter2 - Extremal Re │ │ │ +0001a7d0: 6769 6f6e 2046 696c 7465 7220 666f 7220 gion Filter for │ │ │ +0001a7e0: 7468 6520 326e 6420 7374 6167 6520 636c the 2nd stage cl │ │ │ +0001a7f0: 6173 7369 6669 6572 206f 6620 4e26 616d assifier of N&am │ │ │ +0001a800: 703b 4d20 616c 676f 7269 7468 6d20 4349 p;M algorithm CI │ │ │ +0001a810: 5445 3a20 4e65 756d 616e 6e31 323c 2f64 TE: Neumann12.
      gro │ │ │ +0001a830: 7570 735f 7265 6374 733c 2f63 6f64 653e ups_rects │ │ │ +0001a840: 202d 204f 7574 7075 7420 6c69 7374 206f - Output list o │ │ │ +0001a850: 6620 7265 6374 616e 676c 6520 626c 6f63 f rectangle bloc │ │ │ +0001a860: 6b73 2077 6974 6820 7465 7874 3c2f 6464 ks with text
      .
      meth │ │ │ +0001a880: 6f64 3c2f 636f 6465 3e20 2d20 4772 6f75 od - Grou │ │ │ +0001a890: 7069 6e67 206d 6574 686f 6420 2873 6565 ping method (see │ │ │ +0001a8a0: 2074 6578 743a 3a65 7247 726f 7570 696e text::erGroupin │ │ │ +0001a8b0: 675f 4d6f 6465 7329 2e20 4361 6e20 6265 g_Modes). Can be │ │ │ +0001a8c0: 206f 6e65 206f 6620 4552 4752 4f55 5049 one of ERGROUPI │ │ │ +0001a8d0: 4e47 5f4f 5249 454e 5441 5449 4f4e 5f48 NG_ORIENTATION_H │ │ │ +0001a8e0: 4f52 495a 2c20 4552 4752 4f55 5049 4e47 ORIZ, ERGROUPING │ │ │ +0001a8f0: 5f4f 5249 454e 5441 5449 4f4e 5f41 4e59 _ORIENTATION_ANY │ │ │ +0001a900: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
      .
      filename │ │ │ +0001a920: 202d 2054 6865 2058 4d4c 206f 7220 5941 - The XML or YA │ │ │ +0001a930: 4d4c 2066 696c 6520 7769 7468 2074 6865 ML file with the │ │ │ +0001a940: 2063 6c61 7373 6966 6965 7220 6d6f 6465 classifier mode │ │ │ +0001a950: 6c20 2865 2e67 2e20 7361 6d70 6c65 732f l (e.g. samples/ │ │ │ +0001a960: 7472 6169 6e65 645f 636c 6173 7369 6669 trained_classifi │ │ │ +0001a970: 6572 5f65 7247 726f 7570 696e 672e 786d er_erGrouping.xm │ │ │ +0001a980: 6c29 2e20 4f6e 6c79 2074 6f20 7573 6520 l). Only to use │ │ │ +0001a990: 7768 656e 2067 726f 7570 696e 6720 6d65 when grouping me │ │ │ +0001a9a0: 7468 6f64 2069 7320 4552 4752 4f55 5049 thod is ERGROUPI │ │ │ +0001a9b0: 4e47 5f4f 5249 454e 5441 5449 4f4e 5f41 NG_ORIENTATION_A │ │ │ +0001a9c0: 4e59 2e3c 2f64 643e 0a3c 6464 3e3c 636f NY.
      .
      minProbabilit │ │ │ +0001a9e0: 793c 2f63 6f64 653e 202d 2054 6865 206d y - The m │ │ │ +0001a9f0: 696e 696d 756d 2070 726f 6261 6269 6c69 inimum probabili │ │ │ +0001aa00: 7479 2066 6f72 2061 6363 6570 7469 6e67 ty for accepting │ │ │ +0001aa10: 2061 2067 726f 7570 2e20 4f6e 6c79 2074 a group. Only t │ │ │ +0001aa20: 6f20 7573 6520 7768 656e 2067 726f 7570 o use when group │ │ │ +0001aa30: 696e 6720 6d65 7468 6f64 2069 7320 4552 ing method is ER │ │ │ +0001aa40: 4752 4f55 5049 4e47 5f4f 5249 454e 5441 GROUPING_ORIENTA │ │ │ +0001aa50: 5449 4f4e 5f41 4e59 2e3c 2f64 643e 0a3c TION_ANY.
      .< │ │ │ +0001aa60: 2f64 6c3e 0a3c 2f73 6563 7469 6f6e 3e0a /dl>.. │ │ │ +0001aa70: 3c2f 6c69 3e0a 3c6c 693e 0a3c 7365 6374
    • .
    • ..

      detectRegions.
      public │ │ │ +0001ab70: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ +0001ab80: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;vo │ │ │ +0001aba0: 6964 3c2f 7370 616e 3e26 6e62 7370 3b3c id < │ │ │ +0001abb0: 7370 616e 2063 6c61 7373 3d22 656c 656d span class="elem │ │ │ +0001abc0: 656e 742d 6e61 6d65 223e 6465 7465 6374 ent-name">detect │ │ │ +0001abd0: 5265 6769 6f6e 733c 2f73 7061 6e3e 3c77 Regions(Mat │ │ │ +0001ac40: 266e 6273 703b 696d 6167 652c 0a20 3c61  image,. ERFilter< │ │ │ +0001ac90: 2f61 3e26 6e62 7370 3b65 725f 6669 6c74 /a> er_filt │ │ │ +0001aca0: 6572 312c 0a20 3c61 2068 7265 663d 2245 er1,. E │ │ │ +0001ace0: 5246 696c 7465 723c 2f61 3e26 6e62 7370 RFilter  │ │ │ +0001acf0: 3b65 725f 6669 6c74 6572 322c 0a20 3c61 ;er_filter2,. │ │ │ +0001ad40: 4d61 744f 6652 6563 743c 2f61 3e26 6e62 MatOfRect&nb │ │ │ +0001ad50: 7370 3b67 726f 7570 735f 7265 6374 732c sp;groups_rects, │ │ │ +0001ad60: 0a20 696e 7426 6e62 7370 3b6d 6574 686f . int metho │ │ │ +0001ad70: 642c 0a20 3c61 2068 7265 663d 2268 7474 d,. String filename) │ │ │ +0001ae30: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .Extracts text r │ │ │ +0001ae60: 6567 696f 6e73 2066 726f 6d20 696d 6167 egions from imag │ │ │ +0001ae70: 652e 3c2f 6469 763e 0a3c 646c 2063 6c61 e.

    • .
      .
      │ │ │ +0001ae90: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
      │ │ │ +0001aea0: 0a3c 6464 3e3c 636f 6465 3e69 6d61 6765 .
      image │ │ │ +0001aeb0: 3c2f 636f 6465 3e20 2d20 536f 7572 6365 - Source │ │ │ +0001aec0: 2069 6d61 6765 2077 6865 7265 2074 6578 image where tex │ │ │ +0001aed0: 7420 626c 6f63 6b73 206e 6565 6473 2074 t blocks needs t │ │ │ +0001aee0: 6f20 6265 2065 7874 7261 6374 6564 2066 o be extracted f │ │ │ +0001aef0: 726f 6d2e 2020 5368 6f75 6c64 2062 6520 rom. Should be │ │ │ +0001af00: 4356 5f38 5543 3320 2863 6f6c 6f72 292e CV_8UC3 (color). │ │ │ +0001af10: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
      .
      │ │ │ +0001af20: 6572 5f66 696c 7465 7231 3c2f 636f 6465 er_filter1 - Extremal Reg │ │ │ +0001af40: 696f 6e20 4669 6c74 6572 2066 6f72 2074 ion Filter for t │ │ │ +0001af50: 6865 2031 7374 2073 7461 6765 2063 6c61 he 1st stage cla │ │ │ +0001af60: 7373 6966 6965 7220 6f66 204e 2661 6d70 ssifier of N& │ │ │ +0001af70: 3b4d 2061 6c67 6f72 6974 686d 2043 4954 ;M algorithm CIT │ │ │ +0001af80: 453a 204e 6575 6d61 6e6e 3132 3c2f 6464 E: Neumann12
      .
      er_f │ │ │ +0001afa0: 696c 7465 7232 3c2f 636f 6465 3e20 2d20 ilter2 - │ │ │ +0001afb0: 4578 7472 656d 616c 2052 6567 696f 6e20 Extremal Region │ │ │ +0001afc0: 4669 6c74 6572 2066 6f72 2074 6865 2032 Filter for the 2 │ │ │ +0001afd0: 6e64 2073 7461 6765 2063 6c61 7373 6966 nd stage classif │ │ │ +0001afe0: 6965 7220 6f66 204e 2661 6d70 3b4d 2061 ier of N&M a │ │ │ +0001aff0: 6c67 6f72 6974 686d 2043 4954 453a 204e lgorithm CITE: N │ │ │ +0001b000: 6575 6d61 6e6e 3132 3c2f 6464 3e0a 3c64 eumann12
      .groups_r │ │ │ +0001b020: 6563 7473 3c2f 636f 6465 3e20 2d20 4f75 ects - Ou │ │ │ +0001b030: 7470 7574 206c 6973 7420 6f66 2072 6563 tput list of rec │ │ │ +0001b040: 7461 6e67 6c65 2062 6c6f 636b 7320 7769 tangle blocks wi │ │ │ +0001b050: 7468 2074 6578 743c 2f64 643e 0a3c 6464 th text.
      method - Grouping │ │ │ +0001b080: 6d65 7468 6f64 2028 7365 6520 7465 7874 method (see text │ │ │ +0001b090: 3a3a 6572 4772 6f75 7069 6e67 5f4d 6f64 ::erGrouping_Mod │ │ │ +0001b0a0: 6573 292e 2043 616e 2062 6520 6f6e 6520 es). Can be one │ │ │ +0001b0b0: 6f66 2045 5247 524f 5550 494e 475f 4f52 of ERGROUPING_OR │ │ │ +0001b0c0: 4945 4e54 4154 494f 4e5f 484f 5249 5a2c IENTATION_HORIZ, │ │ │ +0001b0d0: 2045 5247 524f 5550 494e 475f 4f52 4945 ERGROUPING_ORIE │ │ │ +0001b0e0: 4e54 4154 494f 4e5f 414e 592e 3c2f 6464 NTATION_ANY.
      .
      file │ │ │ +0001b100: 6e61 6d65 3c2f 636f 6465 3e20 2d20 5468 name - Th │ │ │ +0001b110: 6520 584d 4c20 6f72 2059 414d 4c20 6669 e XML or YAML fi │ │ │ +0001b120: 6c65 2077 6974 6820 7468 6520 636c 6173 le with the clas │ │ │ +0001b130: 7369 6669 6572 206d 6f64 656c 2028 652e sifier model (e. │ │ │ +0001b140: 672e 2073 616d 706c 6573 2f74 7261 696e g. samples/train │ │ │ +0001b150: 6564 5f63 6c61 7373 6966 6965 725f 6572 ed_classifier_er │ │ │ +0001b160: 4772 6f75 7069 6e67 2e78 6d6c 292e 204f Grouping.xml). O │ │ │ +0001b170: 6e6c 7920 746f 2075 7365 2077 6865 6e20 nly to use when │ │ │ +0001b180: 6772 6f75 7069 6e67 206d 6574 686f 6420 grouping method │ │ │ +0001b190: 6973 2045 5247 524f 5550 494e 475f 4f52 is ERGROUPING_OR │ │ │ +0001b1a0: 4945 4e54 4154 494f 4e5f 414e 592e 3c2f IENTATION_ANY..
      ..
    • .
    • . │ │ │ +0001b1d0: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
      │ │ │ +0001b260: 0a3c 6833 3e64 6574 6563 7452 6567 696f .

      detectRegio │ │ │ +0001b270: 6e73 3c2f 6833 3e0a 3c64 6976 2063 6c61 ns

      .
      pu │ │ │ +0001b2b0: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static void&nb │ │ │ +0001b2f0: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;de │ │ │ +0001b310: 7465 6374 5265 6769 6f6e 733c 2f73 7061 tectRegions │ │ │ +0001b340: 283c 6120 6872 6566 3d22 2e2e 2f63 6f72 (Mat │ │ │ +0001b380: 3c2f 613e 266e 6273 703b 696d 6167 652c  image, │ │ │ +0001b390: 0a20 3c61 2068 7265 663d 2245 5246 696c . ERFil │ │ │ +0001b3d0: 7465 723c 2f61 3e26 6e62 7370 3b65 725f ter er_ │ │ │ +0001b3e0: 6669 6c74 6572 312c 0a20 3c61 2068 7265 filter1,. ERFilter& │ │ │ +0001b430: 6e62 7370 3b65 725f 6669 6c74 6572 322c nbsp;er_filter2, │ │ │ +0001b440: 0a20 3c61 2068 7265 663d 222e 2e2f 636f . MatOfRect groups_re │ │ │ +0001b4a0: 6374 732c 0a20 696e 7426 6e62 7370 3b6d cts,. int m │ │ │ +0001b4b0: 6574 686f 6429 3c2f 7370 616e 3e3c 2f64 ethod).
      Extracts │ │ │ +0001b4e0: 7465 7874 2072 6567 696f 6e73 2066 726f text regions fro │ │ │ +0001b4f0: 6d20 696d 6167 652e 3c2f 6469 763e 0a3c m image.
      .< │ │ │ +0001b500: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ +0001b510: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
      Parameters │ │ │ +0001b520: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
      .
      image - │ │ │ +0001b540: 536f 7572 6365 2069 6d61 6765 2077 6865 Source image whe │ │ │ +0001b550: 7265 2074 6578 7420 626c 6f63 6b73 206e re text blocks n │ │ │ +0001b560: 6565 6473 2074 6f20 6265 2065 7874 7261 eeds to be extra │ │ │ +0001b570: 6374 6564 2066 726f 6d2e 2020 5368 6f75 cted from. Shou │ │ │ +0001b580: 6c64 2062 6520 4356 5f38 5543 3320 2863 ld be CV_8UC3 (c │ │ │ +0001b590: 6f6c 6f72 292e 3c2f 6464 3e0a 3c64 643e olor).
      .
      │ │ │ +0001b5a0: 3c63 6f64 653e 6572 5f66 696c 7465 7231 er_filter1 │ │ │ +0001b5b0: 3c2f 636f 6465 3e20 2d20 4578 7472 656d - Extrem │ │ │ +0001b5c0: 616c 2052 6567 696f 6e20 4669 6c74 6572 al Region Filter │ │ │ +0001b5d0: 2066 6f72 2074 6865 2031 7374 2073 7461 for the 1st sta │ │ │ +0001b5e0: 6765 2063 6c61 7373 6966 6965 7220 6f66 ge classifier of │ │ │ +0001b5f0: 204e 2661 6d70 3b4d 2061 6c67 6f72 6974 N&M algorit │ │ │ +0001b600: 686d 2043 4954 453a 204e 6575 6d61 6e6e hm CITE: Neumann │ │ │ +0001b610: 3132 3c2f 6464 3e0a 3c64 643e 3c63 6f64 12
      .
      er_filter2 - Extremal R │ │ │ +0001b640: 6567 696f 6e20 4669 6c74 6572 2066 6f72 egion Filter for │ │ │ +0001b650: 2074 6865 2032 6e64 2073 7461 6765 2063 the 2nd stage c │ │ │ +0001b660: 6c61 7373 6966 6965 7220 6f66 204e 2661 lassifier of N&a │ │ │ +0001b670: 6d70 3b4d 2061 6c67 6f72 6974 686d 2043 mp;M algorithm C │ │ │ +0001b680: 4954 453a 204e 6575 6d61 6e6e 3132 3c2f ITE: Neumann12.
      gr │ │ │ +0001b6a0: 6f75 7073 5f72 6563 7473 3c2f 636f 6465 oups_rects - Output list │ │ │ +0001b6c0: 6f66 2072 6563 7461 6e67 6c65 2062 6c6f of rectangle blo │ │ │ +0001b6d0: 636b 7320 7769 7468 2074 6578 743c 2f64 cks with text.
      met │ │ │ +0001b6f0: 686f 643c 2f63 6f64 653e 202d 2047 726f hod - Gro │ │ │ +0001b700: 7570 696e 6720 6d65 7468 6f64 2028 7365 uping method (se │ │ │ +0001b710: 6520 7465 7874 3a3a 6572 4772 6f75 7069 e text::erGroupi │ │ │ +0001b720: 6e67 5f4d 6f64 6573 292e 2043 616e 2062 ng_Modes). Can b │ │ │ +0001b730: 6520 6f6e 6520 6f66 2045 5247 524f 5550 e one of ERGROUP │ │ │ +0001b740: 494e 475f 4f52 4945 4e54 4154 494f 4e5f ING_ORIENTATION_ │ │ │ +0001b750: 484f 5249 5a2c 2045 5247 524f 5550 494e HORIZ, ERGROUPIN │ │ │ +0001b760: 475f 4f52 4945 4e54 4154 494f 4e5f 414e G_ORIENTATION_AN │ │ │ +0001b770: 592e 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f Y.
      ...
    • .< │ │ │ +0001b790: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
      │ │ │ +0001b820: 0a3c 6833 3e64 6574 6563 7452 6567 696f .

      detectRegio │ │ │ +0001b830: 6e73 3c2f 6833 3e0a 3c64 6976 2063 6c61 ns

      .
      pu │ │ │ +0001b870: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static void&nb │ │ │ +0001b8b0: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;de │ │ │ +0001b8d0: 7465 6374 5265 6769 6f6e 733c 2f73 7061 tectRegions │ │ │ +0001b900: 283c 6120 6872 6566 3d22 2e2e 2f63 6f72 (Mat │ │ │ +0001b940: 3c2f 613e 266e 6273 703b 696d 6167 652c  image, │ │ │ +0001b950: 0a20 3c61 2068 7265 663d 2245 5246 696c . ERFil │ │ │ +0001b990: 7465 723c 2f61 3e26 6e62 7370 3b65 725f ter er_ │ │ │ +0001b9a0: 6669 6c74 6572 312c 0a20 3c61 2068 7265 filter1,. ERFilter& │ │ │ +0001b9f0: 6e62 7370 3b65 725f 6669 6c74 6572 322c nbsp;er_filter2, │ │ │ +0001ba00: 0a20 3c61 2068 7265 663d 222e 2e2f 636f . MatOfRect groups_re │ │ │ +0001ba60: 6374 7329 3c2f 7370 616e 3e3c 2f64 6976 cts)
      .
      Extracts te │ │ │ +0001ba90: 7874 2072 6567 696f 6e73 2066 726f 6d20 xt regions from │ │ │ +0001baa0: 696d 6167 652e 3c2f 6469 763e 0a3c 646c image.
      .
      . │ │ │ +0001bac0: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
      Parameters:< │ │ │ +0001bad0: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e69 /dt>.
      i │ │ │ +0001bae0: 6d61 6765 3c2f 636f 6465 3e20 2d20 536f mage - So │ │ │ +0001baf0: 7572 6365 2069 6d61 6765 2077 6865 7265 urce image where │ │ │ +0001bb00: 2074 6578 7420 626c 6f63 6b73 206e 6565 text blocks nee │ │ │ +0001bb10: 6473 2074 6f20 6265 2065 7874 7261 6374 ds to be extract │ │ │ +0001bb20: 6564 2066 726f 6d2e 2020 5368 6f75 6c64 ed from. Should │ │ │ +0001bb30: 2062 6520 4356 5f38 5543 3320 2863 6f6c be CV_8UC3 (col │ │ │ +0001bb40: 6f72 292e 3c2f 6464 3e0a 3c64 643e 3c63 or).
      .
      er_filter1 - Extremal │ │ │ +0001bb70: 2052 6567 696f 6e20 4669 6c74 6572 2066 Region Filter f │ │ │ +0001bb80: 6f72 2074 6865 2031 7374 2073 7461 6765 or the 1st stage │ │ │ +0001bb90: 2063 6c61 7373 6966 6965 7220 6f66 204e classifier of N │ │ │ +0001bba0: 2661 6d70 3b4d 2061 6c67 6f72 6974 686d &M algorithm │ │ │ +0001bbb0: 2043 4954 453a 204e 6575 6d61 6e6e 3132 CITE: Neumann12 │ │ │ +0001bbc0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
      .
      │ │ │ +0001bbd0: 6572 5f66 696c 7465 7232 3c2f 636f 6465 er_filter2 - Extremal Reg │ │ │ +0001bbf0: 696f 6e20 4669 6c74 6572 2066 6f72 2074 ion Filter for t │ │ │ +0001bc00: 6865 2032 6e64 2073 7461 6765 2063 6c61 he 2nd stage cla │ │ │ +0001bc10: 7373 6966 6965 7220 6f66 204e 2661 6d70 ssifier of N& │ │ │ +0001bc20: 3b4d 2061 6c67 6f72 6974 686d 2043 4954 ;M algorithm CIT │ │ │ +0001bc30: 453a 204e 6575 6d61 6e6e 3132 3c2f 6464 E: Neumann12
      .
      grou │ │ │ +0001bc50: 7073 5f72 6563 7473 3c2f 636f 6465 3e20 ps_rects │ │ │ +0001bc60: 2d20 4f75 7470 7574 206c 6973 7420 6f66 - Output list of │ │ │ +0001bc70: 2072 6563 7461 6e67 6c65 2062 6c6f 636b rectangle block │ │ │ +0001bc80: 7320 7769 7468 2074 6578 743c 2f64 643e s with text
      │ │ │ +0001bc90: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
      .
      ..
    • ..

      dete │ │ │ +0001bd40: 6374 5465 7874 5357 543c 2f68 333e 0a3c ctTextSWT

      .< │ │ │ +0001bd50: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ +0001bd60: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ +0001bd90: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ +0001bda0: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ +0001bdb0: 726e 2d74 7970 6522 3e76 6f69 643c 2f73 rn-type">void
       detectTextS │ │ │ +0001bdf0: 5754 3c2f 7370 616e 3e3c 7762 723e 3c73 WT(Mat  │ │ │ +0001be60: 3b69 6e70 7574 2c0a 203c 6120 6872 6566 ;input,. MatOf │ │ │ +0001beb0: 5265 6374 3c2f 613e 266e 6273 703b 7265 Rect re │ │ │ +0001bec0: 7375 6c74 2c0a 2062 6f6f 6c65 616e 266e sult,. boolean&n │ │ │ +0001bed0: 6273 703b 6461 726b 5f6f 6e5f 6c69 6768 bsp;dark_on_ligh │ │ │ +0001bee0: 742c 0a20 3c61 2068 7265 663d 222e 2e2f t,. │ │ │ +0001bf20: 4d61 743c 2f61 3e26 6e62 7370 3b64 7261 Mat dra │ │ │ +0001bf30: 772c 0a20 3c61 2068 7265 663d 222e 2e2f w,. │ │ │ +0001bf70: 4d61 743c 2f61 3e26 6e62 7370 3b63 6861 Mat cha │ │ │ +0001bf80: 696e 4242 7329 3c2f 7370 616e 3e3c 2f64 inBBs).
      Applies t │ │ │ +0001bfb0: 6865 2053 7472 6f6b 6520 5769 6474 6820 he Stroke Width │ │ │ +0001bfc0: 5472 616e 7366 6f72 6d20 6f70 6572 6174 Transform operat │ │ │ +0001bfd0: 6f72 2066 6f6c 6c6f 7765 6420 6279 2066 or followed by f │ │ │ +0001bfe0: 696c 7465 7269 6e67 206f 6620 636f 6e6e iltering of conn │ │ │ +0001bff0: 6563 7465 6420 636f 6d70 6f6e 656e 7473 ected components │ │ │ +0001c000: 206f 6620 7369 6d69 6c61 7220 5374 726f of similar Stro │ │ │ +0001c010: 6b65 2057 6964 7468 7320 746f 2072 6574 ke Widths to ret │ │ │ +0001c020: 7572 6e20 6c65 7474 6572 2063 616e 6469 urn letter candi │ │ │ +0001c030: 6461 7465 732e 2049 7420 616c 736f 2063 dates. It also c │ │ │ +0001c040: 6861 696e 2074 6865 6d20 6279 2070 726f hain them by pro │ │ │ +0001c050: 7869 6d69 7479 2061 6e64 2073 697a 652c ximity and size, │ │ │ +0001c060: 2073 6176 696e 6720 7468 6520 7265 7375 saving the resu │ │ │ +0001c070: 6c74 2069 6e20 6368 6169 6e42 4273 2e3c lt in chainBBs.< │ │ │ +0001c080: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
      .
      Par │ │ │ +0001c0a0: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
      .input - the input │ │ │ +0001c0d0: 2069 6d61 6765 2077 6974 6820 3320 6368 image with 3 ch │ │ │ +0001c0e0: 616e 6e65 6c73 2e3c 2f64 643e 0a3c 6464 annels..
      result - a vector │ │ │ +0001c110: 6f66 2072 6573 756c 7469 6e67 2062 6f75 of resulting bou │ │ │ +0001c120: 6e64 696e 6720 626f 7865 7320 7768 6572 nding boxes wher │ │ │ +0001c130: 6520 7072 6f62 6162 696c 6974 7920 6f66 e probability of │ │ │ +0001c140: 2066 696e 6469 6e67 2074 6578 7420 6973 finding text is │ │ │ +0001c150: 2068 6967 683c 2f64 643e 0a3c 6464 3e3c high
      .
      < │ │ │ +0001c160: 636f 6465 3e64 6172 6b5f 6f6e 5f6c 6967 code>dark_on_lig │ │ │ +0001c170: 6874 3c2f 636f 6465 3e20 2d20 6120 626f ht - a bo │ │ │ +0001c180: 6f6c 6561 6e20 7661 6c75 6520 7369 676e olean value sign │ │ │ +0001c190: 6966 7969 6e67 2077 6865 7468 6572 2074 ifying whether t │ │ │ +0001c1a0: 6865 2074 6578 7420 6973 2064 6172 6b65 he text is darke │ │ │ +0001c1b0: 7220 6f72 206c 6967 6874 6572 2074 6861 r or lighter tha │ │ │ +0001c1c0: 6e20 7468 6520 6261 636b 6772 6f75 6e64 n the background │ │ │ +0001c1d0: 2c20 6974 2069 7320 6f62 7365 7276 6564 , it is observed │ │ │ +0001c1e0: 2074 6f20 7265 7665 7273 6520 7468 6520 to reverse the │ │ │ +0001c1f0: 6772 6164 6965 6e74 206f 6274 6169 6e65 gradient obtaine │ │ │ +0001c200: 6420 6672 6f6d 2053 6368 6172 7220 6f70 d from Scharr op │ │ │ +0001c210: 6572 6174 6f72 2c20 616e 6420 7369 676e erator, and sign │ │ │ +0001c220: 6966 6963 616e 746c 7920 6166 6665 6374 ificantly affect │ │ │ +0001c230: 2074 6865 2072 6573 756c 742e 3c2f 6464 the result.
      .
      draw │ │ │ +0001c250: 3c2f 636f 6465 3e20 2d20 616e 206f 7074 - an opt │ │ │ +0001c260: 696f 6e61 6c20 4d61 7420 6f66 2074 7970 ional Mat of typ │ │ │ +0001c270: 6520 4356 5f38 5543 3320 7768 6963 6820 e CV_8UC3 which │ │ │ +0001c280: 7669 7375 616c 6973 6573 2074 6865 2064 visualises the d │ │ │ +0001c290: 6574 6563 7465 6420 6c65 7474 6572 7320 etected letters │ │ │ +0001c2a0: 7573 696e 6720 626f 756e 6469 6e67 2062 using bounding b │ │ │ +0001c2b0: 6f78 6573 2e3c 2f64 643e 0a3c 6464 3e3c oxes.
      .
      < │ │ │ +0001c2c0: 636f 6465 3e63 6861 696e 4242 733c 2f63 code>chainBBs - an option │ │ │ +0001c2e0: 616c 2070 6172 616d 6574 6572 2077 6869 al parameter whi │ │ │ +0001c2f0: 6368 2063 6861 696e 7320 7468 6520 6c65 ch chains the le │ │ │ +0001c300: 7474 6572 2063 616e 6469 6461 7465 7320 tter candidates │ │ │ +0001c310: 6163 636f 7264 696e 6720 746f 2068 6575 according to heu │ │ │ +0001c320: 7269 7374 6963 7320 696e 2074 6865 2070 ristics in the p │ │ │ +0001c330: 6170 6572 2061 6e64 2072 6574 7572 6e73 aper and returns │ │ │ +0001c340: 2061 6c6c 2070 6f73 7369 626c 6520 7265 all possible re │ │ │ +0001c350: 6769 6f6e 7320 7768 6572 6520 7465 7874 gions where text │ │ │ +0001c360: 2069 7320 6c69 6b65 6c79 2074 6f20 6f63 is likely to oc │ │ │ +0001c370: 6375 722e 3c2f 6464 3e0a 3c2f 646c 3e0a cur.
      .
      . │ │ │ +0001c380: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e .
    • │ │ │ +0001c390: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
    • .
      .

      detectTextSWT.
      public │ │ │ +0001c460: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ +0001c470: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;vo │ │ │ +0001c490: 6964 3c2f 7370 616e 3e26 6e62 7370 3b3c id < │ │ │ +0001c4a0: 7370 616e 2063 6c61 7373 3d22 656c 656d span class="elem │ │ │ +0001c4b0: 656e 742d 6e61 6d65 223e 6465 7465 6374 ent-name">detect │ │ │ +0001c4c0: 5465 7874 5357 543c 2f73 7061 6e3e 3c77 TextSWT(Mat │ │ │ +0001c530: 266e 6273 703b 696e 7075 742c 0a20 3c61  input,. │ │ │ +0001c580: 4d61 744f 6652 6563 743c 2f61 3e26 6e62 MatOfRect&nb │ │ │ +0001c590: 7370 3b72 6573 756c 742c 0a20 626f 6f6c sp;result,. bool │ │ │ +0001c5a0: 6561 6e26 6e62 7370 3b64 6172 6b5f 6f6e ean dark_on │ │ │ +0001c5b0: 5f6c 6967 6874 2c0a 203c 6120 6872 6566 _light,. Mat&nbs │ │ │ +0001c600: 703b 6472 6177 293c 2f73 7061 6e3e 3c2f p;draw).
      Applies │ │ │ +0001c630: 7468 6520 5374 726f 6b65 2057 6964 7468 the Stroke Width │ │ │ +0001c640: 2054 7261 6e73 666f 726d 206f 7065 7261 Transform opera │ │ │ +0001c650: 746f 7220 666f 6c6c 6f77 6564 2062 7920 tor followed by │ │ │ +0001c660: 6669 6c74 6572 696e 6720 6f66 2063 6f6e filtering of con │ │ │ +0001c670: 6e65 6374 6564 2063 6f6d 706f 6e65 6e74 nected component │ │ │ +0001c680: 7320 6f66 2073 696d 696c 6172 2053 7472 s of similar Str │ │ │ +0001c690: 6f6b 6520 5769 6474 6873 2074 6f20 7265 oke Widths to re │ │ │ +0001c6a0: 7475 726e 206c 6574 7465 7220 6361 6e64 turn letter cand │ │ │ +0001c6b0: 6964 6174 6573 2e20 4974 2061 6c73 6f20 idates. It also │ │ │ +0001c6c0: 6368 6169 6e20 7468 656d 2062 7920 7072 chain them by pr │ │ │ +0001c6d0: 6f78 696d 6974 7920 616e 6420 7369 7a65 oximity and size │ │ │ +0001c6e0: 2c20 7361 7669 6e67 2074 6865 2072 6573 , saving the res │ │ │ +0001c6f0: 756c 7420 696e 2063 6861 696e 4242 732e ult in chainBBs. │ │ │ +0001c700: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
      .
      .
      Pa │ │ │ +0001c720: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
      .< │ │ │ +0001c730: 6464 3e3c 636f 6465 3e69 6e70 7574 3c2f dd>input - the inpu │ │ │ +0001c750: 7420 696d 6167 6520 7769 7468 2033 2063 t image with 3 c │ │ │ +0001c760: 6861 6e6e 656c 732e 3c2f 6464 3e0a 3c64 hannels..result - a vector │ │ │ +0001c790: 206f 6620 7265 7375 6c74 696e 6720 626f of resulting bo │ │ │ +0001c7a0: 756e 6469 6e67 2062 6f78 6573 2077 6865 unding boxes whe │ │ │ +0001c7b0: 7265 2070 726f 6261 6269 6c69 7479 206f re probability o │ │ │ +0001c7c0: 6620 6669 6e64 696e 6720 7465 7874 2069 f finding text i │ │ │ +0001c7d0: 7320 6869 6768 3c2f 6464 3e0a 3c64 643e s high.
      │ │ │ +0001c7e0: 3c63 6f64 653e 6461 726b 5f6f 6e5f 6c69 dark_on_li │ │ │ +0001c7f0: 6768 743c 2f63 6f64 653e 202d 2061 2062 ght - a b │ │ │ +0001c800: 6f6f 6c65 616e 2076 616c 7565 2073 6967 oolean value sig │ │ │ +0001c810: 6e69 6679 696e 6720 7768 6574 6865 7220 nifying whether │ │ │ +0001c820: 7468 6520 7465 7874 2069 7320 6461 726b the text is dark │ │ │ +0001c830: 6572 206f 7220 6c69 6768 7465 7220 7468 er or lighter th │ │ │ +0001c840: 616e 2074 6865 2062 6163 6b67 726f 756e an the backgroun │ │ │ +0001c850: 642c 2069 7420 6973 206f 6273 6572 7665 d, it is observe │ │ │ +0001c860: 6420 746f 2072 6576 6572 7365 2074 6865 d to reverse the │ │ │ +0001c870: 2067 7261 6469 656e 7420 6f62 7461 696e gradient obtain │ │ │ +0001c880: 6564 2066 726f 6d20 5363 6861 7272 206f ed from Scharr o │ │ │ +0001c890: 7065 7261 746f 722c 2061 6e64 2073 6967 perator, and sig │ │ │ +0001c8a0: 6e69 6669 6361 6e74 6c79 2061 6666 6563 nificantly affec │ │ │ +0001c8b0: 7420 7468 6520 7265 7375 6c74 2e3c 2f64 t the result..
      dra │ │ │ +0001c8d0: 773c 2f63 6f64 653e 202d 2061 6e20 6f70 w - an op │ │ │ +0001c8e0: 7469 6f6e 616c 204d 6174 206f 6620 7479 tional Mat of ty │ │ │ +0001c8f0: 7065 2043 565f 3855 4333 2077 6869 6368 pe CV_8UC3 which │ │ │ +0001c900: 2076 6973 7561 6c69 7365 7320 7468 6520 visualises the │ │ │ +0001c910: 6465 7465 6374 6564 206c 6574 7465 7273 detected letters │ │ │ +0001c920: 2075 7369 6e67 2062 6f75 6e64 696e 6720 using bounding │ │ │ +0001c930: 626f 7865 732e 3c2f 6464 3e0a 3c2f 646c boxes.
      .
      .

      ..
    • .
      .

      d │ │ │ +0001c9c0: 6574 6563 7454 6578 7453 5754 3c2f 6833 etectTextSWT

      .
      │ │ │ +0001c9f0: 3c73 7061 6e20 636c 6173 733d 226d 6f64 public s │ │ │ +0001ca10: 7461 7469 633c 2f73 7061 6e3e 266e 6273 tatic&nbs │ │ │ +0001ca20: 703b 3c73 7061 6e20 636c 6173 733d 2272 p;void │ │ │ +0001ca40: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  detectTe │ │ │ +0001ca70: 7874 5357 543c 2f73 7061 6e3e 3c77 6272 xtSWT(Mat&n │ │ │ +0001cae0: 6273 703b 696e 7075 742c 0a20 3c61 2068 bsp;input,. Ma │ │ │ +0001cb30: 744f 6652 6563 743c 2f61 3e26 6e62 7370 tOfRect  │ │ │ +0001cb40: 3b72 6573 756c 742c 0a20 626f 6f6c 6561 ;result,. boolea │ │ │ +0001cb50: 6e26 6e62 7370 3b64 6172 6b5f 6f6e 5f6c n dark_on_l │ │ │ +0001cb60: 6967 6874 293c 2f73 7061 6e3e 3c2f 6469 ight).
      Applies th │ │ │ +0001cb90: 6520 5374 726f 6b65 2057 6964 7468 2054 e Stroke Width T │ │ │ +0001cba0: 7261 6e73 666f 726d 206f 7065 7261 746f ransform operato │ │ │ +0001cbb0: 7220 666f 6c6c 6f77 6564 2062 7920 6669 r followed by fi │ │ │ +0001cbc0: 6c74 6572 696e 6720 6f66 2063 6f6e 6e65 ltering of conne │ │ │ +0001cbd0: 6374 6564 2063 6f6d 706f 6e65 6e74 7320 cted components │ │ │ +0001cbe0: 6f66 2073 696d 696c 6172 2053 7472 6f6b of similar Strok │ │ │ +0001cbf0: 6520 5769 6474 6873 2074 6f20 7265 7475 e Widths to retu │ │ │ +0001cc00: 726e 206c 6574 7465 7220 6361 6e64 6964 rn letter candid │ │ │ +0001cc10: 6174 6573 2e20 4974 2061 6c73 6f20 6368 ates. It also ch │ │ │ +0001cc20: 6169 6e20 7468 656d 2062 7920 7072 6f78 ain them by prox │ │ │ +0001cc30: 696d 6974 7920 616e 6420 7369 7a65 2c20 imity and size, │ │ │ +0001cc40: 7361 7669 6e67 2074 6865 2072 6573 756c saving the resul │ │ │ +0001cc50: 7420 696e 2063 6861 696e 4242 732e 3c2f t in chainBBs..
      .
      Para │ │ │ +0001cc80: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
      .
      input - the input │ │ │ +0001ccb0: 696d 6167 6520 7769 7468 2033 2063 6861 image with 3 cha │ │ │ +0001ccc0: 6e6e 656c 732e 3c2f 6464 3e0a 3c64 643e nnels.
      .
      │ │ │ +0001ccd0: 3c63 6f64 653e 7265 7375 6c74 3c2f 636f result - a vector o │ │ │ +0001ccf0: 6620 7265 7375 6c74 696e 6720 626f 756e f resulting boun │ │ │ +0001cd00: 6469 6e67 2062 6f78 6573 2077 6865 7265 ding boxes where │ │ │ +0001cd10: 2070 726f 6261 6269 6c69 7479 206f 6620 probability of │ │ │ +0001cd20: 6669 6e64 696e 6720 7465 7874 2069 7320 finding text is │ │ │ +0001cd30: 6869 6768 3c2f 6464 3e0a 3c64 643e 3c63 high
      .
      dark_on_ligh │ │ │ +0001cd50: 743c 2f63 6f64 653e 202d 2061 2062 6f6f t - a boo │ │ │ +0001cd60: 6c65 616e 2076 616c 7565 2073 6967 6e69 lean value signi │ │ │ +0001cd70: 6679 696e 6720 7768 6574 6865 7220 7468 fying whether th │ │ │ +0001cd80: 6520 7465 7874 2069 7320 6461 726b 6572 e text is darker │ │ │ +0001cd90: 206f 7220 6c69 6768 7465 7220 7468 616e or lighter than │ │ │ +0001cda0: 2074 6865 2062 6163 6b67 726f 756e 642c the background, │ │ │ +0001cdb0: 2069 7420 6973 206f 6273 6572 7665 6420 it is observed │ │ │ +0001cdc0: 746f 2072 6576 6572 7365 2074 6865 2067 to reverse the g │ │ │ +0001cdd0: 7261 6469 656e 7420 6f62 7461 696e 6564 radient obtained │ │ │ +0001cde0: 2066 726f 6d20 5363 6861 7272 206f 7065 from Scharr ope │ │ │ +0001cdf0: 7261 746f 722c 2061 6e64 2073 6967 6e69 rator, and signi │ │ │ +0001ce00: 6669 6361 6e74 6c79 2061 6666 6563 7420 ficantly affect │ │ │ +0001ce10: 7468 6520 7265 7375 6c74 2e3c 2f64 643e the result.
      │ │ │ +0001ce20: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
      .
      .
    • .
    • ..

      loadOCRH │ │ │ +0001ce90: 4d4d 436c 6173 7369 6669 6572 4e4d 3c2f MMClassifierNM.
      @Deprecated.public static< │ │ │ +0001cfc0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> OCRHMMDec │ │ │ +0001d040: 6f64 6572 5f43 6c61 7373 6966 6965 7243 oder_ClassifierC │ │ │ +0001d050: 616c 6c62 6163 6b3c 2f61 3e3c 2f73 7061 allback loadOCRHMMCla │ │ │ +0001d090: 7373 6966 6965 724e 4d3c 2f73 7061 6e3e ssifierNM │ │ │ +0001d0a0: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ +0001d0c0: 6120 6872 6566 3d22 6874 7470 733a 2f2f a href="https:// │ │ │ +0001d0d0: 646f 776e 6c6f 6164 2e6a 6176 612e 6e65 download.java.ne │ │ │ +0001d0e0: 742f 6a61 7661 2f65 6172 6c79 5f61 6363 t/java/early_acc │ │ │ +0001d0f0: 6573 732f 6a64 6b32 312f 646f 6373 2f61 ess/jdk21/docs/a │ │ │ +0001d100: 7069 2f6a 6176 612e 6261 7365 2f6a 6176 pi/java.base/jav │ │ │ +0001d110: 612f 6c61 6e67 2f53 7472 696e 672e 6874 a/lang/String.ht │ │ │ +0001d120: 6d6c 2220 7469 746c 653d 2263 6c61 7373 ml" title="class │ │ │ +0001d130: 206f 7220 696e 7465 7266 6163 6520 696e or interface in │ │ │ +0001d140: 206a 6176 612e 6c61 6e67 2220 636c 6173 java.lang" clas │ │ │ +0001d150: 733d 2265 7874 6572 6e61 6c2d 6c69 6e6b s="external-link │ │ │ +0001d160: 223e 5374 7269 6e67 3c2f 613e 266e 6273 ">String&nbs │ │ │ +0001d170: 703b 6669 6c65 6e61 6d65 293c 2f73 7061 p;filename)
      .
      Deprecate │ │ │ +0001d1d0: 642e 3c2f 7370 616e 3e0a 3c64 6976 2063 d..
      loadO │ │ │ +0001d200: 4352 484d 4d43 6c61 7373 6966 6965 7220 CRHMMClassifier │ │ │ +0001d210: 696e 7374 6561 643c 2f64 6976 3e0a 3c2f instead
      ..
      Allow to │ │ │ +0001d240: 2069 6d70 6c69 6369 746c 7920 6c6f 6164 implicitly load │ │ │ +0001d250: 2074 6865 2064 6566 6175 6c74 2063 6861 the default cha │ │ │ +0001d260: 7261 6374 6572 2063 6c61 7373 6966 6965 racter classifie │ │ │ +0001d270: 7220 7768 656e 2063 7265 6174 696e 6720 r when creating │ │ │ +0001d280: 616e 204f 4352 484d 4d44 6563 6f64 6572 an OCRHMMDecoder │ │ │ +0001d290: 206f 626a 6563 742e 3c2f 6469 763e 0a3c object.
      .< │ │ │ +0001d2a0: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ +0001d2b0: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
      Parameters │ │ │ +0001d2c0: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
      .
      filename │ │ │ +0001d2e0: 202d 2054 6865 2058 4d4c 206f 7220 5941 - The XML or YA │ │ │ +0001d2f0: 4d4c 2066 696c 6520 7769 7468 2074 6865 ML file with the │ │ │ +0001d300: 2063 6c61 7373 6966 6965 7220 6d6f 6465 classifier mode │ │ │ +0001d310: 6c20 2865 2e67 2e20 4f43 5248 4d4d 5f6b l (e.g. OCRHMM_k │ │ │ +0001d320: 6e6e 5f6d 6f64 656c 5f64 6174 612e 786d nn_model_data.xm │ │ │ +0001d330: 6c29 0a0a 2054 6865 204b 4e4e 2064 6566 l).. The KNN def │ │ │ +0001d340: 6175 6c74 2063 6c61 7373 6966 6965 7220 ault classifier │ │ │ +0001d350: 6973 2062 6173 6564 2069 6e20 7468 6520 is based in the │ │ │ +0001d360: 7363 656e 6520 7465 7874 2072 6563 6f67 scene text recog │ │ │ +0001d370: 6e69 7469 6f6e 206d 6574 686f 6420 7072 nition method pr │ │ │ +0001d380: 6f70 6f73 6564 2062 7920 4c75 6bc3 a173 oposed by Luk..s │ │ │ +0001d390: 204e 6575 6d61 6e6e 2026 616d 703b 0a20 Neumann &. │ │ │ +0001d3a0: 4a69 7269 204d 6174 6173 2069 6e20 5b4e Jiri Matas in [N │ │ │ +0001d3b0: 6575 6d61 6e6e 3131 625d 2e20 4261 7369 eumann11b]. Basi │ │ │ +0001d3c0: 6361 6c6c 792c 2074 6865 2072 6567 696f cally, the regio │ │ │ +0001d3d0: 6e20 2863 6f6e 746f 7572 2920 696e 2074 n (contour) in t │ │ │ +0001d3e0: 6865 2069 6e70 7574 2069 6d61 6765 2069 he input image i │ │ │ +0001d3f0: 7320 6e6f 726d 616c 697a 6564 2074 6f20 s normalized to │ │ │ +0001d400: 610a 2066 6978 6564 2073 697a 652c 2077 a. fixed size, w │ │ │ +0001d410: 6869 6c65 2072 6574 6169 6e69 6e67 2074 hile retaining t │ │ │ +0001d420: 6865 2063 656e 7472 6f69 6420 616e 6420 he centroid and │ │ │ +0001d430: 6173 7065 6374 2072 6174 696f 2c20 696e aspect ratio, in │ │ │ +0001d440: 206f 7264 6572 2074 6f20 6578 7472 6163 order to extrac │ │ │ +0001d450: 7420 6120 6665 6174 7572 6520 7665 6374 t a feature vect │ │ │ +0001d460: 6f72 0a20 6261 7365 6420 6f6e 2067 7261 or. based on gra │ │ │ +0001d470: 6469 656e 7420 6f72 6965 6e74 6174 696f dient orientatio │ │ │ +0001d480: 6e73 2061 6c6f 6e67 2074 6865 2063 6861 ns along the cha │ │ │ +0001d490: 696e 2d63 6f64 6520 6f66 2069 7473 2070 in-code of its p │ │ │ +0001d4a0: 6572 696d 6574 6572 2e20 5468 656e 2c20 erimeter. Then, │ │ │ +0001d4b0: 7468 6520 7265 6769 6f6e 2069 7320 636c the region is cl │ │ │ +0001d4c0: 6173 7369 6669 6564 0a20 7573 696e 6720 assified. using │ │ │ +0001d4d0: 6120 4b4e 4e20 6d6f 6465 6c20 7472 6169 a KNN model trai │ │ │ +0001d4e0: 6e65 6420 7769 7468 2073 796e 7468 6574 ned with synthet │ │ │ +0001d4f0: 6963 2064 6174 6120 6f66 2072 656e 6465 ic data of rende │ │ │ +0001d500: 7265 6420 6368 6172 6163 7465 7273 2077 red characters w │ │ │ +0001d510: 6974 6820 6469 6666 6572 656e 7420 7374 ith different st │ │ │ +0001d520: 616e 6461 7264 2066 6f6e 740a 2074 7970 andard font. typ │ │ │ +0001d530: 6573 2e3c 2f64 643e 0a3c 6474 3e52 6574 es.
      .
      Ret │ │ │ +0001d540: 7572 6e73 3a3c 2f64 743e 0a3c 6464 3e61 urns:
      .
      a │ │ │ +0001d550: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ +0001d560: 6572 6174 6564 3c2f 6464 3e0a 3c2f 646c erated
      ....
    • .
      . │ │ │ +0001d5d0: 3c68 333e 6c6f 6164 4f43 5248 4d4d 436c

      loadOCRHMMCl │ │ │ +0001d5e0: 6173 7369 6669 6572 434e 4e3c 2f68 333e assifierCNN

      │ │ │ +0001d5f0: 0a3c 6469 7620 636c 6173 733d 226d 656d .
      < │ │ │ +0001d610: 7370 616e 2063 6c61 7373 3d22 616e 6e6f span class="anno │ │ │ +0001d620: 7461 7469 6f6e 7322 3e3c 6120 6872 6566 tations"> │ │ │ +0001d6d0: 4044 6570 7265 6361 7465 643c 2f61 3e0a @Deprecated. │ │ │ +0001d6e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 p │ │ │ +0001d700: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static OCRHMMDecode │ │ │ +0001d790: 725f 436c 6173 7369 6669 6572 4361 6c6c r_ClassifierCall │ │ │ +0001d7a0: 6261 636b 3c2f 613e 3c2f 7370 616e 3e26 back& │ │ │ +0001d7b0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ +0001d7d0: 6c6f 6164 4f43 5248 4d4d 436c 6173 7369 loadOCRHMMClassi │ │ │ +0001d7e0: 6669 6572 434e 4e3c 2f73 7061 6e3e 3c77 fierCNN( │ │ │ +0001d8b0: 5374 7269 6e67 3c2f 613e 266e 6273 703b String  │ │ │ +0001d8c0: 6669 6c65 6e61 6d65 293c 2f73 7061 6e3e filename) │ │ │ +0001d8d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      Deprecated. │ │ │ +0001d920: 3c2f 7370 616e 3e0a 3c64 6976 2063 6c61 .
      use loa │ │ │ +0001d950: 644f 4352 484d 4d43 6c61 7373 6966 6965 dOCRHMMClassifie │ │ │ +0001d960: 7220 696e 7374 6561 643c 2f64 6976 3e0a r instead
      . │ │ │ +0001d970: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      Allow │ │ │ +0001d990: 746f 2069 6d70 6c69 6369 746c 7920 6c6f to implicitly lo │ │ │ +0001d9a0: 6164 2074 6865 2064 6566 6175 6c74 2063 ad the default c │ │ │ +0001d9b0: 6861 7261 6374 6572 2063 6c61 7373 6966 haracter classif │ │ │ +0001d9c0: 6965 7220 7768 656e 2063 7265 6174 696e ier when creatin │ │ │ +0001d9d0: 6720 616e 204f 4352 484d 4d44 6563 6f64 g an OCRHMMDecod │ │ │ +0001d9e0: 6572 206f 626a 6563 742e 3c2f 6469 763e er object.
      │ │ │ +0001d9f0: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
      .
      Paramete │ │ │ +0001da10: 7273 3a3c 2f64 743e 0a3c 6464 3e3c 636f rs:
      .
      filename - The XML or │ │ │ +0001da40: 5941 4d4c 2066 696c 6520 7769 7468 2074 YAML file with t │ │ │ +0001da50: 6865 2063 6c61 7373 6966 6965 7220 6d6f he classifier mo │ │ │ +0001da60: 6465 6c20 2865 2e67 2e20 4f43 5242 6561 del (e.g. OCRBea │ │ │ +0001da70: 6d53 6561 7263 685f 434e 4e5f 6d6f 6465 mSearch_CNN_mode │ │ │ +0001da80: 6c5f 6461 7461 2e78 6d6c 2e67 7a29 0a0a l_data.xml.gz).. │ │ │ +0001da90: 2054 6865 2043 4e4e 2064 6566 6175 6c74 The CNN default │ │ │ +0001daa0: 2063 6c61 7373 6966 6965 7220 6973 2062 classifier is b │ │ │ +0001dab0: 6173 6564 2069 6e20 7468 6520 7363 656e ased in the scen │ │ │ +0001dac0: 6520 7465 7874 2072 6563 6f67 6e69 7469 e text recogniti │ │ │ +0001dad0: 6f6e 206d 6574 686f 6420 7072 6f70 6f73 on method propos │ │ │ +0001dae0: 6564 2062 7920 4164 616d 2043 6f61 7465 ed by Adam Coate │ │ │ +0001daf0: 7320 2661 6d70 3b0a 2041 6e64 7265 7720 s &. Andrew │ │ │ +0001db00: 4e47 2069 6e20 5b43 6f61 7465 7331 3161 NG in [Coates11a │ │ │ +0001db10: 5d2e 2054 6865 2063 6861 7261 6374 6572 ]. The character │ │ │ +0001db20: 2063 6c61 7373 6966 6965 7220 636f 6e73 classifier cons │ │ │ +0001db30: 6973 7473 2069 6e20 6120 5369 6e67 6c65 ists in a Single │ │ │ +0001db40: 204c 6179 6572 2043 6f6e 766f 6c75 7469 Layer Convoluti │ │ │ +0001db50: 6f6e 616c 204e 6575 7261 6c20 4e65 7477 onal Neural Netw │ │ │ +0001db60: 6f72 6b20 616e 640a 2061 206c 696e 6561 ork and. a linea │ │ │ +0001db70: 7220 636c 6173 7369 6669 6572 2e20 4974 r classifier. It │ │ │ +0001db80: 2069 7320 6170 706c 6965 6420 746f 2074 is applied to t │ │ │ +0001db90: 6865 2069 6e70 7574 2069 6d61 6765 2069 he input image i │ │ │ +0001dba0: 6e20 6120 736c 6964 696e 6720 7769 6e64 n a sliding wind │ │ │ +0001dbb0: 6f77 2066 6173 6869 6f6e 2c20 7072 6f76 ow fashion, prov │ │ │ +0001dbc0: 6964 696e 6720 6120 7365 7420 6f66 2072 iding a set of r │ │ │ +0001dbd0: 6563 6f67 6e69 7469 6f6e 730a 2061 7420 ecognitions. at │ │ │ +0001dbe0: 6561 6368 2077 696e 646f 7720 6c6f 6361 each window loca │ │ │ +0001dbf0: 7469 6f6e 2e3c 2f64 643e 0a3c 6474 3e52 tion.
      .
      R │ │ │ +0001dc00: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
      .
      automatically g │ │ │ +0001dc20: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
      ..
      .< │ │ │ +0001dc40: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
    • ..

      loadOCRHM │ │ │ +0001dca0: 4d43 6c61 7373 6966 6965 723c 2f68 333e MClassifier

      │ │ │ +0001dcb0: 0a3c 6469 7620 636c 6173 733d 226d 656d .
      < │ │ │ +0001dcd0: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ +0001dce0: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ +0001dcf0: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ +0001dd00: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;OCRH │ │ │ +0001dd70: 4d4d 4465 636f 6465 725f 436c 6173 7369 MMDecoder_Classi │ │ │ +0001dd80: 6669 6572 4361 6c6c 6261 636b 3c2f 613e fierCallback │ │ │ +0001dd90: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  loadOCRH │ │ │ +0001ddc0: 4d4d 436c 6173 7369 6669 6572 3c2f 7370 MMClassifier(String& │ │ │ +0001dea0: 6e62 7370 3b66 696c 656e 616d 652c 0a20 nbsp;filename,. │ │ │ +0001deb0: 696e 7426 6e62 7370 3b63 6c61 7373 6966 int classif │ │ │ +0001dec0: 6965 7229 3c2f 7370 616e 3e3c 2f64 6976 ier)
      .
      Allow to im │ │ │ +0001def0: 706c 6963 6974 6c79 206c 6f61 6420 7468 plicitly load th │ │ │ +0001df00: 6520 6465 6661 756c 7420 6368 6172 6163 e default charac │ │ │ +0001df10: 7465 7220 636c 6173 7369 6669 6572 2077 ter classifier w │ │ │ +0001df20: 6865 6e20 6372 6561 7469 6e67 2061 6e20 hen creating an │ │ │ +0001df30: 4f43 5248 4d4d 4465 636f 6465 7220 6f62 OCRHMMDecoder ob │ │ │ +0001df40: 6a65 6374 2e3c 2f64 6976 3e0a 3c64 6c20 ject.
      .
      .< │ │ │ +0001df60: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
      fi │ │ │ +0001df80: 6c65 6e61 6d65 3c2f 636f 6465 3e20 2d20 lename - │ │ │ +0001df90: 5468 6520 584d 4c20 6f72 2059 414d 4c20 The XML or YAML │ │ │ +0001dfa0: 6669 6c65 2077 6974 6820 7468 6520 636c file with the cl │ │ │ +0001dfb0: 6173 7369 6669 6572 206d 6f64 656c 2028 assifier model ( │ │ │ +0001dfc0: 652e 672e 204f 4352 4265 616d 5365 6172 e.g. OCRBeamSear │ │ │ +0001dfd0: 6368 5f43 4e4e 5f6d 6f64 656c 5f64 6174 ch_CNN_model_dat │ │ │ +0001dfe0: 612e 786d 6c2e 677a 293c 2f64 643e 0a3c a.xml.gz)
      .< │ │ │ +0001dff0: 6464 3e3c 636f 6465 3e63 6c61 7373 6966 dd>classif │ │ │ +0001e000: 6965 723c 2f63 6f64 653e 202d 2043 616e ier - Can │ │ │ +0001e010: 2062 6520 6f6e 6520 6f66 2063 6c61 7373 be one of class │ │ │ +0001e020: 6966 6965 725f 7479 7065 2065 6e75 6d20 ifier_type enum │ │ │ +0001e030: 7661 6c75 6573 2e3c 2f64 643e 0a3c 6474 values..
      Returns:
      .< │ │ │ +0001e050: 6464 3e61 7574 6f6d 6174 6963 616c 6c79 dd>automatically │ │ │ +0001e060: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated. │ │ │ +0001e070: 3c2f 646c 3e0a 3c2f 7365 6374 696f 6e3e
      . │ │ │ +0001e080: 0a3c 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 .
    • .
    • ..

      crea │ │ │ +0001e0f0: 7465 4f43 5248 4d4d 5472 616e 7369 7469 teOCRHMMTransiti │ │ │ +0001e100: 6f6e 7354 6162 6c65 3c2f 6833 3e0a 3c64 onsTable

      .public stati │ │ │ +0001e150: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c Mat createOCRHMMT │ │ │ +0001e1f0: 7261 6e73 6974 696f 6e73 5461 626c 653c ransitionsTable< │ │ │ +0001e200: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(String vocabula │ │ │ +0001e2e0: 7279 2c0a 203c 6120 6872 6566 3d22 6874 ry,. List&l │ │ │ +0001e390: 743b 3c61 2068 7265 663d 2268 7474 7073 t;String& │ │ │ +0001e440: 6774 3b26 6e62 7370 3b6c 6578 6963 6f6e gt; lexicon │ │ │ +0001e450: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    • .< │ │ │ +0001e460: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ +0001e470: 223e 5574 696c 6974 7920 6675 6e63 7469 ">Utility functi │ │ │ +0001e480: 6f6e 2074 6f20 6372 6561 7465 2061 2074 on to create a t │ │ │ +0001e490: 6169 6c6f 7265 6420 6c61 6e67 7561 6765 ailored language │ │ │ +0001e4a0: 206d 6f64 656c 2074 7261 6e73 6974 696f model transitio │ │ │ +0001e4b0: 6e73 2074 6162 6c65 2066 726f 6d20 6120 ns table from a │ │ │ +0001e4c0: 6769 7665 6e20 6c69 7374 206f 6620 776f given list of wo │ │ │ +0001e4d0: 7264 7320 286c 6578 6963 6f6e 292e 3c2f rds (lexicon)..
      .
      Para │ │ │ +0001e500: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
      .
      vocabular │ │ │ +0001e520: 793c 2f63 6f64 653e 202d 2054 6865 206c y - The l │ │ │ +0001e530: 616e 6775 6167 6520 766f 6361 6275 6c61 anguage vocabula │ │ │ +0001e540: 7279 2028 6368 6172 7320 7768 656e 2041 ry (chars when A │ │ │ +0001e550: 5343 4949 2045 6e67 6c69 7368 2074 6578 SCII English tex │ │ │ +0001e560: 7429 2e3c 2f64 643e 0a3c 6464 3e3c 636f t).
      .
      lexicon - The list of │ │ │ +0001e590: 776f 7264 7320 7468 6174 2061 7265 2065 words that are e │ │ │ +0001e5a0: 7870 6563 7465 6420 746f 2062 6520 666f xpected to be fo │ │ │ +0001e5b0: 756e 6420 696e 2061 2070 6172 7469 6375 und in a particu │ │ │ +0001e5c0: 6c61 7220 696d 6167 652e 0a0a 0a20 5468 lar image.... Th │ │ │ +0001e5d0: 6520 6675 6e63 7469 6f6e 2063 616c 6375 e function calcu │ │ │ +0001e5e0: 6c61 7465 2066 7265 7175 656e 6379 2073 late frequency s │ │ │ +0001e5f0: 7461 7469 7374 6963 7320 6f66 2063 6861 tatistics of cha │ │ │ +0001e600: 7261 6374 6572 2070 6169 7273 2066 726f racter pairs fro │ │ │ +0001e610: 6d20 7468 6520 6769 7665 6e20 6c65 7869 m the given lexi │ │ │ +0001e620: 636f 6e20 616e 6420 6669 6c6c 7320 7468 con and fills th │ │ │ +0001e630: 6520 6f75 7470 7574 2074 7261 6e73 6974 e output transit │ │ │ +0001e640: 696f 6e5f 7072 6f62 6162 696c 6974 6965 ion_probabilitie │ │ │ +0001e650: 735f 7461 626c 6520 7769 7468 2074 6865 s_table with the │ │ │ +0001e660: 6d2e 2054 6865 2074 7261 6e73 6974 696f m. The transitio │ │ │ +0001e670: 6e5f 7072 6f62 6162 696c 6974 6965 735f n_probabilities_ │ │ │ +0001e680: 7461 626c 6520 6361 6e20 6265 2075 7365 table can be use │ │ │ +0001e690: 6420 6173 2069 6e70 7574 2069 6e20 7468 d as input in th │ │ │ +0001e6a0: 6520 4f43 5248 4d4d 4465 636f 6465 723a e OCRHMMDecoder: │ │ │ +0001e6b0: 3a63 7265 6174 6528 2920 616e 6420 4f43 :create() and OC │ │ │ +0001e6c0: 5242 6561 6d53 6561 7263 6844 6563 6f64 RBeamSearchDecod │ │ │ +0001e6d0: 6572 3a3a 6372 6561 7465 2829 206d 6574 er::create() met │ │ │ +0001e6e0: 686f 6473 2e0a 203c 623e 4e6f 7465 3a3c hods.. Note:< │ │ │ +0001e6f0: 2f62 3e0a 202d 2020 2028 432b 2b29 2041 /b>. - (C++) A │ │ │ +0001e700: 6e20 616c 7465 726e 6174 6976 6520 776f n alternative wo │ │ │ +0001e710: 756c 6420 6265 2074 6f20 6c6f 6164 2074 uld be to load t │ │ │ +0001e720: 6865 2064 6566 6175 6c74 2067 656e 6572 he default gener │ │ │ +0001e730: 6963 206c 616e 6775 6167 6520 7472 616e ic language tran │ │ │ +0001e740: 7369 7469 6f6e 2074 6162 6c65 2070 726f sition table pro │ │ │ +0001e750: 7669 6465 6420 696e 2074 6865 2074 6578 vided in the tex │ │ │ +0001e760: 7420 6d6f 6475 6c65 2073 616d 706c 6573 t module samples │ │ │ +0001e770: 2066 6f6c 6465 7220 2863 7265 6174 6564 folder (created │ │ │ +0001e780: 2066 726f 6d20 6973 7065 6c6c 2034 3238 from ispell 428 │ │ │ +0001e790: 3639 2065 6e67 6c69 7368 2077 6f72 6473 69 english words │ │ │ +0001e7a0: 206c 6973 7429 203a 0a20 266c 743b 6874 list) :. <ht │ │ │ +0001e7b0: 7470 733a 2f2f 6769 7468 7562 2e63 6f6d tps://github.com │ │ │ +0001e7c0: 2f6f 7065 6e63 762f 6f70 656e 6376 5f63 /opencv/opencv_c │ │ │ +0001e7d0: 6f6e 7472 6962 2f62 6c6f 622f 6d61 7374 ontrib/blob/mast │ │ │ +0001e7e0: 6572 2f6d 6f64 756c 6573 2f74 6578 742f er/modules/text/ │ │ │ +0001e7f0: 7361 6d70 6c65 732f 4f43 5248 4d4d 5f74 samples/OCRHMM_t │ │ │ +0001e800: 7261 6e73 6974 696f 6e73 5f74 6162 6c65 ransitions_table │ │ │ +0001e810: 2e78 6d6c 2667 743b 3c2f 6464 3e0a 3c64 .xml>
      .Returns:. │ │ │ +0001e830: 3c64 643e 6175 746f 6d61 7469 6361 6c6c
      automaticall │ │ │ +0001e840: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
      │ │ │ +0001e850: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
      ..

    • .
    • ..

      │ │ │ +0001e8c0: 6c6f 6164 4f43 5242 6561 6d53 6561 7263 loadOCRBeamSearc │ │ │ +0001e8d0: 6843 6c61 7373 6966 6965 7243 4e4e 3c2f hClassifierCNN.
      public │ │ │ +0001e920: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ +0001e930: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;OCRBeamSea │ │ │ +0001e9b0: 7263 6844 6563 6f64 6572 5f43 6c61 7373 rchDecoder_Class │ │ │ +0001e9c0: 6966 6965 7243 616c 6c62 6163 6b3c 2f61 ifierCallback loadOCR │ │ │ +0001ea00: 4265 616d 5365 6172 6368 436c 6173 7369 BeamSearchClassi │ │ │ +0001ea10: 6669 6572 434e 4e3c 2f73 7061 6e3e 3c77 fierCNN( │ │ │ +0001eae0: 5374 7269 6e67 3c2f 613e 266e 6273 703b String  │ │ │ +0001eaf0: 6669 6c65 6e61 6d65 293c 2f73 7061 6e3e filename) │ │ │ +0001eb00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      Allow │ │ │ +0001eb20: 746f 2069 6d70 6c69 6369 746c 7920 6c6f to implicitly lo │ │ │ +0001eb30: 6164 2074 6865 2064 6566 6175 6c74 2063 ad the default c │ │ │ +0001eb40: 6861 7261 6374 6572 2063 6c61 7373 6966 haracter classif │ │ │ +0001eb50: 6965 7220 7768 656e 2063 7265 6174 696e ier when creatin │ │ │ +0001eb60: 6720 616e 204f 4352 4265 616d 5365 6172 g an OCRBeamSear │ │ │ +0001eb70: 6368 4465 636f 6465 7220 6f62 6a65 6374 chDecoder object │ │ │ +0001eb80: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 .
      .
      .
      P │ │ │ +0001eba0: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
      . │ │ │ +0001ebb0: 3c64 643e 3c63 6f64 653e 6669 6c65 6e61
      filena │ │ │ +0001ebc0: 6d65 3c2f 636f 6465 3e20 2d20 5468 6520 me - The │ │ │ +0001ebd0: 584d 4c20 6f72 2059 414d 4c20 6669 6c65 XML or YAML file │ │ │ +0001ebe0: 2077 6974 6820 7468 6520 636c 6173 7369 with the classi │ │ │ +0001ebf0: 6669 6572 206d 6f64 656c 2028 652e 672e fier model (e.g. │ │ │ +0001ec00: 204f 4352 4265 616d 5365 6172 6368 5f43 OCRBeamSearch_C │ │ │ +0001ec10: 4e4e 5f6d 6f64 656c 5f64 6174 612e 786d NN_model_data.xm │ │ │ +0001ec20: 6c2e 677a 290a 0a20 5468 6520 434e 4e20 l.gz).. The CNN │ │ │ +0001ec30: 6465 6661 756c 7420 636c 6173 7369 6669 default classifi │ │ │ +0001ec40: 6572 2069 7320 6261 7365 6420 696e 2074 er is based in t │ │ │ +0001ec50: 6865 2073 6365 6e65 2074 6578 7420 7265 he scene text re │ │ │ +0001ec60: 636f 676e 6974 696f 6e20 6d65 7468 6f64 cognition method │ │ │ +0001ec70: 2070 726f 706f 7365 6420 6279 2041 6461 proposed by Ada │ │ │ +0001ec80: 6d20 436f 6174 6573 2026 616d 703b 0a20 m Coates &. │ │ │ +0001ec90: 416e 6472 6577 204e 4720 696e 205b 436f Andrew NG in [Co │ │ │ +0001eca0: 6174 6573 3131 615d 2e20 5468 6520 6368 ates11a]. The ch │ │ │ +0001ecb0: 6172 6163 7465 7220 636c 6173 7369 6669 aracter classifi │ │ │ +0001ecc0: 6572 2063 6f6e 7369 7374 7320 696e 2061 er consists in a │ │ │ +0001ecd0: 2053 696e 676c 6520 4c61 7965 7220 436f Single Layer Co │ │ │ +0001ece0: 6e76 6f6c 7574 696f 6e61 6c20 4e65 7572 nvolutional Neur │ │ │ +0001ecf0: 616c 204e 6574 776f 726b 2061 6e64 0a20 al Network and. │ │ │ +0001ed00: 6120 6c69 6e65 6172 2063 6c61 7373 6966 a linear classif │ │ │ +0001ed10: 6965 722e 2049 7420 6973 2061 7070 6c69 ier. It is appli │ │ │ +0001ed20: 6564 2074 6f20 7468 6520 696e 7075 7420 ed to the input │ │ │ +0001ed30: 696d 6167 6520 696e 2061 2073 6c69 6469 image in a slidi │ │ │ +0001ed40: 6e67 2077 696e 646f 7720 6661 7368 696f ng window fashio │ │ │ +0001ed50: 6e2c 2070 726f 7669 6469 6e67 2061 2073 n, providing a s │ │ │ +0001ed60: 6574 206f 6620 7265 636f 676e 6974 696f et of recognitio │ │ │ +0001ed70: 6e73 0a20 6174 2065 6163 6820 7769 6e64 ns. at each wind │ │ │ +0001ed80: 6f77 206c 6f63 6174 696f 6e2e 3c2f 6464 ow location.
      .
      Returns:.
      automati │ │ │ +0001edb0: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ 0001edc0: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.
      ..

    • .
    ..... │ │ │
  • │ │ │
    │ │ │

    Method Details

    │ │ │
      │ │ │
    • │ │ │ +
      │ │ │ +

      createBackgroundSubtractorMOG2

      │ │ │ +
      public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, │ │ │ + double varThreshold, │ │ │ + boolean detectShadows)
      │ │ │ +
      Creates MOG2 Background Subtractor
      │ │ │ +
      │ │ │ +
      Parameters:
      │ │ │ +
      history - Length of the history.
      │ │ │ +
      varThreshold - Threshold on the squared Mahalanobis distance between the pixel and the model │ │ │ + to decide whether a pixel is well described by the background model. This parameter does not │ │ │ + affect the background update.
      │ │ │ +
      detectShadows - If true, the algorithm will detect shadows and mark them. It decreases the │ │ │ + speed a bit, so if you do not need this feature, set the parameter to false.
      │ │ │ +
      Returns:
      │ │ │ +
      automatically generated
      │ │ │ +
      │ │ │ +
      │ │ │ +
    • │ │ │ +
    • │ │ │ +
      │ │ │ +

      createBackgroundSubtractorMOG2

      │ │ │ +
      public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, │ │ │ + double varThreshold)
      │ │ │ +
      Creates MOG2 Background Subtractor
      │ │ │ +
      │ │ │ +
      Parameters:
      │ │ │ +
      history - Length of the history.
      │ │ │ +
      varThreshold - Threshold on the squared Mahalanobis distance between the pixel and the model │ │ │ + to decide whether a pixel is well described by the background model. This parameter does not │ │ │ + affect the background update. │ │ │ + speed a bit, so if you do not need this feature, set the parameter to false.
      │ │ │ +
      Returns:
      │ │ │ +
      automatically generated
      │ │ │ +
      │ │ │ +
      │ │ │ +
    • │ │ │ +
    • │ │ │ +
      │ │ │ +

      createBackgroundSubtractorMOG2

      │ │ │ +
      public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history)
      │ │ │ +
      Creates MOG2 Background Subtractor
      │ │ │ +
      │ │ │ +
      Parameters:
      │ │ │ +
      history - Length of the history. │ │ │ + to decide whether a pixel is well described by the background model. This parameter does not │ │ │ + affect the background update. │ │ │ + speed a bit, so if you do not need this feature, set the parameter to false.
      │ │ │ +
      Returns:
      │ │ │ +
      automatically generated
      │ │ │ +
      │ │ │ +
      │ │ │ +
    • │ │ │ +
    • │ │ │ +
      │ │ │ +

      createBackgroundSubtractorMOG2

      │ │ │ +
      public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2()
      │ │ │ +
      Creates MOG2 Background Subtractor │ │ │ + │ │ │ + to decide whether a pixel is well described by the background model. This parameter does not │ │ │ + affect the background update. │ │ │ + speed a bit, so if you do not need this feature, set the parameter to false.
      │ │ │ +
      │ │ │ +
      Returns:
      │ │ │ +
      automatically generated
      │ │ │ +
      │ │ │ +
      │ │ │ +
    • │ │ │ +
    • │ │ │ +
      │ │ │ +

      createBackgroundSubtractorKNN

      │ │ │ +
      public static BackgroundSubtractorKNN createBackgroundSubtractorKNN(int history, │ │ │ + double dist2Threshold, │ │ │ + boolean detectShadows)
      │ │ │ +
      Creates KNN Background Subtractor
      │ │ │ +
      │ │ │ +
      Parameters:
      │ │ │ +
      history - Length of the history.
      │ │ │ +
      dist2Threshold - Threshold on the squared distance between the pixel and the sample to decide │ │ │ + whether a pixel is close to that sample. This parameter does not affect the background update.
      │ │ │ +
      detectShadows - If true, the algorithm will detect shadows and mark them. It decreases the │ │ │ + speed a bit, so if you do not need this feature, set the parameter to false.
      │ │ │ +
      Returns:
      │ │ │ +
      automatically generated
      │ │ │ +
      │ │ │ +
      │ │ │ +
    • │ │ │ +
    • │ │ │ +
      │ │ │ +

      createBackgroundSubtractorKNN

      │ │ │ +
      public static BackgroundSubtractorKNN createBackgroundSubtractorKNN(int history, │ │ │ + double dist2Threshold)
      │ │ │ +
      Creates KNN Background Subtractor
      │ │ │ +
      │ │ │ +
      Parameters:
      │ │ │ +
      history - Length of the history.
      │ │ │ +
      dist2Threshold - Threshold on the squared distance between the pixel and the sample to decide │ │ │ + whether a pixel is close to that sample. This parameter does not affect the background update. │ │ │ + speed a bit, so if you do not need this feature, set the parameter to false.
      │ │ │ +
      Returns:
      │ │ │ +
      automatically generated
      │ │ │ +
      │ │ │ +
      │ │ │ +
    • │ │ │ +
    • │ │ │ +
      │ │ │ +

      createBackgroundSubtractorKNN

      │ │ │ +
      public static BackgroundSubtractorKNN createBackgroundSubtractorKNN(int history)
      │ │ │ +
      Creates KNN Background Subtractor
      │ │ │ +
      │ │ │ +
      Parameters:
      │ │ │ +
      history - Length of the history. │ │ │ + whether a pixel is close to that sample. This parameter does not affect the background update. │ │ │ + speed a bit, so if you do not need this feature, set the parameter to false.
      │ │ │ +
      Returns:
      │ │ │ +
      automatically generated
      │ │ │ +
      │ │ │ +
      │ │ │ +
    • │ │ │ +
    • │ │ │ +
      │ │ │ +

      createBackgroundSubtractorKNN

      │ │ │ +
      public static BackgroundSubtractorKNN createBackgroundSubtractorKNN()
      │ │ │ +
      Creates KNN Background Subtractor │ │ │ + │ │ │ + whether a pixel is close to that sample. This parameter does not affect the background update. │ │ │ + speed a bit, so if you do not need this feature, set the parameter to false.
      │ │ │ +
      │ │ │ +
      Returns:
      │ │ │ +
      automatically generated
      │ │ │ +
      │ │ │ +
      │ │ │ +
    • │ │ │ +
    • │ │ │
      │ │ │

      CamShift

      │ │ │
      public static RotatedRect CamShift(Mat probImage, │ │ │ Rect window, │ │ │ TermCriteria criteria)
      │ │ │
      Finds an object center, size, and orientation.
      │ │ │
      │ │ │ @@ -1526,148 +1660,14 @@ │ │ │ The flow field must be a 2-channel, floating-point matrix (CV_32FC2). First channel corresponds │ │ │ to the flow in the horizontal direction (u), second - vertical (v). │ │ │
      Returns:
      │ │ │
      automatically generated
      │ │ │
      │ │ │
      │ │ │
    • │ │ │ -
    • │ │ │ -
      │ │ │ -

      createBackgroundSubtractorMOG2

      │ │ │ -
      public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, │ │ │ - double varThreshold, │ │ │ - boolean detectShadows)
      │ │ │ -
      Creates MOG2 Background Subtractor
      │ │ │ -
      │ │ │ -
      Parameters:
      │ │ │ -
      history - Length of the history.
      │ │ │ -
      varThreshold - Threshold on the squared Mahalanobis distance between the pixel and the model │ │ │ - to decide whether a pixel is well described by the background model. This parameter does not │ │ │ - affect the background update.
      │ │ │ -
      detectShadows - If true, the algorithm will detect shadows and mark them. It decreases the │ │ │ - speed a bit, so if you do not need this feature, set the parameter to false.
      │ │ │ -
      Returns:
      │ │ │ -
      automatically generated
      │ │ │ -
      │ │ │ -
      │ │ │ -
    • │ │ │ -
    • │ │ │ -
      │ │ │ -

      createBackgroundSubtractorMOG2

      │ │ │ -
      public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, │ │ │ - double varThreshold)
      │ │ │ -
      Creates MOG2 Background Subtractor
      │ │ │ -
      │ │ │ -
      Parameters:
      │ │ │ -
      history - Length of the history.
      │ │ │ -
      varThreshold - Threshold on the squared Mahalanobis distance between the pixel and the model │ │ │ - to decide whether a pixel is well described by the background model. This parameter does not │ │ │ - affect the background update. │ │ │ - speed a bit, so if you do not need this feature, set the parameter to false.
      │ │ │ -
      Returns:
      │ │ │ -
      automatically generated
      │ │ │ -
      │ │ │ -
      │ │ │ -
    • │ │ │ -
    • │ │ │ -
      │ │ │ -

      createBackgroundSubtractorMOG2

      │ │ │ -
      public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history)
      │ │ │ -
      Creates MOG2 Background Subtractor
      │ │ │ -
      │ │ │ -
      Parameters:
      │ │ │ -
      history - Length of the history. │ │ │ - to decide whether a pixel is well described by the background model. This parameter does not │ │ │ - affect the background update. │ │ │ - speed a bit, so if you do not need this feature, set the parameter to false.
      │ │ │ -
      Returns:
      │ │ │ -
      automatically generated
      │ │ │ -
      │ │ │ -
      │ │ │ -
    • │ │ │ -
    • │ │ │ -
      │ │ │ -

      createBackgroundSubtractorMOG2

      │ │ │ -
      public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2()
      │ │ │ -
      Creates MOG2 Background Subtractor │ │ │ - │ │ │ - to decide whether a pixel is well described by the background model. This parameter does not │ │ │ - affect the background update. │ │ │ - speed a bit, so if you do not need this feature, set the parameter to false.
      │ │ │ -
      │ │ │ -
      Returns:
      │ │ │ -
      automatically generated
      │ │ │ -
      │ │ │ -
      │ │ │ -
    • │ │ │ -
    • │ │ │ -
      │ │ │ -

      createBackgroundSubtractorKNN

      │ │ │ -
      public static BackgroundSubtractorKNN createBackgroundSubtractorKNN(int history, │ │ │ - double dist2Threshold, │ │ │ - boolean detectShadows)
      │ │ │ -
      Creates KNN Background Subtractor
      │ │ │ -
      │ │ │ -
      Parameters:
      │ │ │ -
      history - Length of the history.
      │ │ │ -
      dist2Threshold - Threshold on the squared distance between the pixel and the sample to decide │ │ │ - whether a pixel is close to that sample. This parameter does not affect the background update.
      │ │ │ -
      detectShadows - If true, the algorithm will detect shadows and mark them. It decreases the │ │ │ - speed a bit, so if you do not need this feature, set the parameter to false.
      │ │ │ -
      Returns:
      │ │ │ -
      automatically generated
      │ │ │ -
      │ │ │ -
      │ │ │ -
    • │ │ │ -
    • │ │ │ -
      │ │ │ -

      createBackgroundSubtractorKNN

      │ │ │ -
      public static BackgroundSubtractorKNN createBackgroundSubtractorKNN(int history, │ │ │ - double dist2Threshold)
      │ │ │ -
      Creates KNN Background Subtractor
      │ │ │ -
      │ │ │ -
      Parameters:
      │ │ │ -
      history - Length of the history.
      │ │ │ -
      dist2Threshold - Threshold on the squared distance between the pixel and the sample to decide │ │ │ - whether a pixel is close to that sample. This parameter does not affect the background update. │ │ │ - speed a bit, so if you do not need this feature, set the parameter to false.
      │ │ │ -
      Returns:
      │ │ │ -
      automatically generated
      │ │ │ -
      │ │ │ -
      │ │ │ -
    • │ │ │ -
    • │ │ │ -
      │ │ │ -

      createBackgroundSubtractorKNN

      │ │ │ -
      public static BackgroundSubtractorKNN createBackgroundSubtractorKNN(int history)
      │ │ │ -
      Creates KNN Background Subtractor
      │ │ │ -
      │ │ │ -
      Parameters:
      │ │ │ -
      history - Length of the history. │ │ │ - whether a pixel is close to that sample. This parameter does not affect the background update. │ │ │ - speed a bit, so if you do not need this feature, set the parameter to false.
      │ │ │ -
      Returns:
      │ │ │ -
      automatically generated
      │ │ │ -
      │ │ │ -
      │ │ │ -
    • │ │ │ -
    • │ │ │ -
      │ │ │ -

      createBackgroundSubtractorKNN

      │ │ │ -
      public static BackgroundSubtractorKNN createBackgroundSubtractorKNN()
      │ │ │ -
      Creates KNN Background Subtractor │ │ │ - │ │ │ - whether a pixel is close to that sample. This parameter does not affect the background update. │ │ │ - speed a bit, so if you do not need this feature, set the parameter to false.
      │ │ │ -
      │ │ │ -
      Returns:
      │ │ │ -
      automatically generated
      │ │ │ -
      │ │ │ -
      │ │ │ -
    • │ │ │
    │ │ │
    │ │ │
  • │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -265,14 +265,113 @@ │ │ │ │ public static final int TrackerSamplerCSC_MODE_DETECT │ │ │ │ See Also: │ │ │ │ # _C_o_n_s_t_a_n_t_ _F_i_e_l_d_ _V_a_l_u_e_s │ │ │ │ * ********** CCoonnssttrruuccttoorr DDeettaaiillss ********** │ │ │ │ o ******** VViiddeeoo ******** │ │ │ │ public Video() │ │ │ │ * ********** MMeetthhoodd DDeettaaiillss ********** │ │ │ │ + o ******** ccrreeaatteeBBaacckkggrroouunnddSSuubbttrraaccttoorrMMOOGG22 ******** │ │ │ │ + public │ │ │ │ + static _B_a_c_k_g_r_o_u_n_d_S_u_b_t_r_a_c_t_o_r_M_O_G_2 createBackgroundSubtractorMOG2 │ │ │ │ + (int history, double varThreshold, boolean detectShadows) │ │ │ │ + Creates MOG2 Background Subtractor │ │ │ │ + Parameters: │ │ │ │ + history - Length of the history. │ │ │ │ + varThreshold - Threshold on the squared Mahalanobis distance │ │ │ │ + between the pixel and the model to decide whether a pixel is │ │ │ │ + well described by the background model. This parameter does │ │ │ │ + not affect the background update. │ │ │ │ + detectShadows - If true, the algorithm will detect shadows │ │ │ │ + and mark them. It decreases the speed a bit, so if you do not │ │ │ │ + need this feature, set the parameter to false. │ │ │ │ + Returns: │ │ │ │ + automatically generated │ │ │ │ + o ******** ccrreeaatteeBBaacckkggrroouunnddSSuubbttrraaccttoorrMMOOGG22 ******** │ │ │ │ + public │ │ │ │ + static _B_a_c_k_g_r_o_u_n_d_S_u_b_t_r_a_c_t_o_r_M_O_G_2 createBackgroundSubtractorMOG2 │ │ │ │ + (int history, double varThreshold) │ │ │ │ + Creates MOG2 Background Subtractor │ │ │ │ + Parameters: │ │ │ │ + history - Length of the history. │ │ │ │ + varThreshold - Threshold on the squared Mahalanobis distance │ │ │ │ + between the pixel and the model to decide whether a pixel is │ │ │ │ + well described by the background model. This parameter does │ │ │ │ + not affect the background update. speed a bit, so if you do │ │ │ │ + not need this feature, set the parameter to false. │ │ │ │ + Returns: │ │ │ │ + automatically generated │ │ │ │ + o ******** ccrreeaatteeBBaacckkggrroouunnddSSuubbttrraaccttoorrMMOOGG22 ******** │ │ │ │ + public │ │ │ │ + static _B_a_c_k_g_r_o_u_n_d_S_u_b_t_r_a_c_t_o_r_M_O_G_2 createBackgroundSubtractorMOG2 │ │ │ │ + (int history) │ │ │ │ + Creates MOG2 Background Subtractor │ │ │ │ + Parameters: │ │ │ │ + history - Length of the history. to decide whether a pixel is │ │ │ │ + well described by the background model. This parameter does │ │ │ │ + not affect the background update. speed a bit, so if you do │ │ │ │ + not need this feature, set the parameter to false. │ │ │ │ + Returns: │ │ │ │ + automatically generated │ │ │ │ + o ******** ccrreeaatteeBBaacckkggrroouunnddSSuubbttrraaccttoorrMMOOGG22 ******** │ │ │ │ + public │ │ │ │ + static _B_a_c_k_g_r_o_u_n_d_S_u_b_t_r_a_c_t_o_r_M_O_G_2 createBackgroundSubtractorMOG2() │ │ │ │ + Creates MOG2 Background Subtractor to decide whether a pixel is │ │ │ │ + well described by the background model. This parameter does not │ │ │ │ + affect the background update. speed a bit, so if you do not need │ │ │ │ + this feature, set the parameter to false. │ │ │ │ + Returns: │ │ │ │ + automatically generated │ │ │ │ + o ******** ccrreeaatteeBBaacckkggrroouunnddSSuubbttrraaccttoorrKKNNNN ******** │ │ │ │ + public static _B_a_c_k_g_r_o_u_n_d_S_u_b_t_r_a_c_t_o_r_K_N_N createBackgroundSubtractorKNN │ │ │ │ + (int history, double dist2Threshold, boolean detectShadows) │ │ │ │ + Creates KNN Background Subtractor │ │ │ │ + Parameters: │ │ │ │ + history - Length of the history. │ │ │ │ + dist2Threshold - Threshold on the squared distance between │ │ │ │ + the pixel and the sample to decide whether a pixel is close │ │ │ │ + to that sample. This parameter does not affect the background │ │ │ │ + update. │ │ │ │ + detectShadows - If true, the algorithm will detect shadows │ │ │ │ + and mark them. It decreases the speed a bit, so if you do not │ │ │ │ + need this feature, set the parameter to false. │ │ │ │ + Returns: │ │ │ │ + automatically generated │ │ │ │ + o ******** ccrreeaatteeBBaacckkggrroouunnddSSuubbttrraaccttoorrKKNNNN ******** │ │ │ │ + public static _B_a_c_k_g_r_o_u_n_d_S_u_b_t_r_a_c_t_o_r_K_N_N createBackgroundSubtractorKNN │ │ │ │ + (int history, double dist2Threshold) │ │ │ │ + Creates KNN Background Subtractor │ │ │ │ + Parameters: │ │ │ │ + history - Length of the history. │ │ │ │ + dist2Threshold - Threshold on the squared distance between │ │ │ │ + the pixel and the sample to decide whether a pixel is close │ │ │ │ + to that sample. This parameter does not affect the background │ │ │ │ + update. speed a bit, so if you do not need this feature, set │ │ │ │ + the parameter to false. │ │ │ │ + Returns: │ │ │ │ + automatically generated │ │ │ │ + o ******** ccrreeaatteeBBaacckkggrroouunnddSSuubbttrraaccttoorrKKNNNN ******** │ │ │ │ + public static _B_a_c_k_g_r_o_u_n_d_S_u_b_t_r_a_c_t_o_r_K_N_N createBackgroundSubtractorKNN │ │ │ │ + (int history) │ │ │ │ + Creates KNN Background Subtractor │ │ │ │ + Parameters: │ │ │ │ + history - Length of the history. whether a pixel is close to │ │ │ │ + that sample. This parameter does not affect the background │ │ │ │ + update. speed a bit, so if you do not need this feature, set │ │ │ │ + the parameter to false. │ │ │ │ + Returns: │ │ │ │ + automatically generated │ │ │ │ + o ******** ccrreeaatteeBBaacckkggrroouunnddSSuubbttrraaccttoorrKKNNNN ******** │ │ │ │ + public static _B_a_c_k_g_r_o_u_n_d_S_u_b_t_r_a_c_t_o_r_K_N_N createBackgroundSubtractorKNN │ │ │ │ + () │ │ │ │ + Creates KNN Background Subtractor whether a pixel is close to that │ │ │ │ + sample. This parameter does not affect the background update. speed │ │ │ │ + a bit, so if you do not need this feature, set the parameter to │ │ │ │ + false. │ │ │ │ + Returns: │ │ │ │ + automatically generated │ │ │ │ o ******** CCaammSShhiifftt ******** │ │ │ │ public static _R_o_t_a_t_e_d_R_e_c_t CamShift(_M_a_t probImage, _R_e_c_t window, │ │ │ │ _T_e_r_m_C_r_i_t_e_r_i_a criteria) │ │ │ │ Finds an object center, size, and orientation. │ │ │ │ Parameters: │ │ │ │ probImage - Back projection of the object histogram. See │ │ │ │ calcBackProject. │ │ │ │ @@ -1001,107 +1100,8 @@ │ │ │ │ flow - Flow field to be stored The function stores a flow │ │ │ │ field in a file, returns true on success, false otherwise. │ │ │ │ The flow field must be a 2-channel, floating-point matrix │ │ │ │ (CV_32FC2). First channel corresponds to the flow in the │ │ │ │ horizontal direction (u), second - vertical (v). │ │ │ │ Returns: │ │ │ │ automatically generated │ │ │ │ - o ******** ccrreeaatteeBBaacckkggrroouunnddSSuubbttrraaccttoorrMMOOGG22 ******** │ │ │ │ - public │ │ │ │ - static _B_a_c_k_g_r_o_u_n_d_S_u_b_t_r_a_c_t_o_r_M_O_G_2 createBackgroundSubtractorMOG2 │ │ │ │ - (int history, double varThreshold, boolean detectShadows) │ │ │ │ - Creates MOG2 Background Subtractor │ │ │ │ - Parameters: │ │ │ │ - history - Length of the history. │ │ │ │ - varThreshold - Threshold on the squared Mahalanobis distance │ │ │ │ - between the pixel and the model to decide whether a pixel is │ │ │ │ - well described by the background model. This parameter does │ │ │ │ - not affect the background update. │ │ │ │ - detectShadows - If true, the algorithm will detect shadows │ │ │ │ - and mark them. It decreases the speed a bit, so if you do not │ │ │ │ - need this feature, set the parameter to false. │ │ │ │ - Returns: │ │ │ │ - automatically generated │ │ │ │ - o ******** ccrreeaatteeBBaacckkggrroouunnddSSuubbttrraaccttoorrMMOOGG22 ******** │ │ │ │ - public │ │ │ │ - static _B_a_c_k_g_r_o_u_n_d_S_u_b_t_r_a_c_t_o_r_M_O_G_2 createBackgroundSubtractorMOG2 │ │ │ │ - (int history, double varThreshold) │ │ │ │ - Creates MOG2 Background Subtractor │ │ │ │ - Parameters: │ │ │ │ - history - Length of the history. │ │ │ │ - varThreshold - Threshold on the squared Mahalanobis distance │ │ │ │ - between the pixel and the model to decide whether a pixel is │ │ │ │ - well described by the background model. This parameter does │ │ │ │ - not affect the background update. speed a bit, so if you do │ │ │ │ - not need this feature, set the parameter to false. │ │ │ │ - Returns: │ │ │ │ - automatically generated │ │ │ │ - o ******** ccrreeaatteeBBaacckkggrroouunnddSSuubbttrraaccttoorrMMOOGG22 ******** │ │ │ │ - public │ │ │ │ - static _B_a_c_k_g_r_o_u_n_d_S_u_b_t_r_a_c_t_o_r_M_O_G_2 createBackgroundSubtractorMOG2 │ │ │ │ - (int history) │ │ │ │ - Creates MOG2 Background Subtractor │ │ │ │ - Parameters: │ │ │ │ - history - Length of the history. to decide whether a pixel is │ │ │ │ - well described by the background model. This parameter does │ │ │ │ - not affect the background update. speed a bit, so if you do │ │ │ │ - not need this feature, set the parameter to false. │ │ │ │ - Returns: │ │ │ │ - automatically generated │ │ │ │ - o ******** ccrreeaatteeBBaacckkggrroouunnddSSuubbttrraaccttoorrMMOOGG22 ******** │ │ │ │ - public │ │ │ │ - static _B_a_c_k_g_r_o_u_n_d_S_u_b_t_r_a_c_t_o_r_M_O_G_2 createBackgroundSubtractorMOG2() │ │ │ │ - Creates MOG2 Background Subtractor to decide whether a pixel is │ │ │ │ - well described by the background model. This parameter does not │ │ │ │ - affect the background update. speed a bit, so if you do not need │ │ │ │ - this feature, set the parameter to false. │ │ │ │ - Returns: │ │ │ │ - automatically generated │ │ │ │ - o ******** ccrreeaatteeBBaacckkggrroouunnddSSuubbttrraaccttoorrKKNNNN ******** │ │ │ │ - public static _B_a_c_k_g_r_o_u_n_d_S_u_b_t_r_a_c_t_o_r_K_N_N createBackgroundSubtractorKNN │ │ │ │ - (int history, double dist2Threshold, boolean detectShadows) │ │ │ │ - Creates KNN Background Subtractor │ │ │ │ - Parameters: │ │ │ │ - history - Length of the history. │ │ │ │ - dist2Threshold - Threshold on the squared distance between │ │ │ │ - the pixel and the sample to decide whether a pixel is close │ │ │ │ - to that sample. This parameter does not affect the background │ │ │ │ - update. │ │ │ │ - detectShadows - If true, the algorithm will detect shadows │ │ │ │ - and mark them. It decreases the speed a bit, so if you do not │ │ │ │ - need this feature, set the parameter to false. │ │ │ │ - Returns: │ │ │ │ - automatically generated │ │ │ │ - o ******** ccrreeaatteeBBaacckkggrroouunnddSSuubbttrraaccttoorrKKNNNN ******** │ │ │ │ - public static _B_a_c_k_g_r_o_u_n_d_S_u_b_t_r_a_c_t_o_r_K_N_N createBackgroundSubtractorKNN │ │ │ │ - (int history, double dist2Threshold) │ │ │ │ - Creates KNN Background Subtractor │ │ │ │ - Parameters: │ │ │ │ - history - Length of the history. │ │ │ │ - dist2Threshold - Threshold on the squared distance between │ │ │ │ - the pixel and the sample to decide whether a pixel is close │ │ │ │ - to that sample. This parameter does not affect the background │ │ │ │ - update. speed a bit, so if you do not need this feature, set │ │ │ │ - the parameter to false. │ │ │ │ - Returns: │ │ │ │ - automatically generated │ │ │ │ - o ******** ccrreeaatteeBBaacckkggrroouunnddSSuubbttrraaccttoorrKKNNNN ******** │ │ │ │ - public static _B_a_c_k_g_r_o_u_n_d_S_u_b_t_r_a_c_t_o_r_K_N_N createBackgroundSubtractorKNN │ │ │ │ - (int history) │ │ │ │ - Creates KNN Background Subtractor │ │ │ │ - Parameters: │ │ │ │ - history - Length of the history. whether a pixel is close to │ │ │ │ - that sample. This parameter does not affect the background │ │ │ │ - update. speed a bit, so if you do not need this feature, set │ │ │ │ - the parameter to false. │ │ │ │ - Returns: │ │ │ │ - automatically generated │ │ │ │ - o ******** ccrreeaatteeBBaacckkggrroouunnddSSuubbttrraaccttoorrKKNNNN ******** │ │ │ │ - public static _B_a_c_k_g_r_o_u_n_d_S_u_b_t_r_a_c_t_o_r_K_N_N createBackgroundSubtractorKNN │ │ │ │ - () │ │ │ │ - Creates KNN Background Subtractor whether a pixel is close to that │ │ │ │ - sample. This parameter does not affect the background update. speed │ │ │ │ - a bit, so if you do not need this feature, set the parameter to │ │ │ │ - false. │ │ │ │ - Returns: │ │ │ │ - automatically generated │ │ │ │ =============================================================================== │ │ ├── ./usr/share/doc/opencv-doc/opencv4/html/javadoc/org/opencv/ximgproc/Ximgproc.html │ │ │ @@ -10883,12028 +10883,12028 @@ │ │ │ 0002a820: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e6e /dd>.
    n │ │ │ 0002a830: 6974 6572 733c 2f63 6f64 653e 202d 2054 iters - T │ │ │ 0002a840: 6865 206e 756d 6265 7220 6f66 2069 7465 he number of ite │ │ │ 0002a850: 7261 7469 6f6e 733c 2f64 643e 0a3c 2f64 rations
    ....
  • ..

    │ │ │ -0002a910: 7765 6967 6874 6564 4d65 6469 616e 4669 weightedMedianFi │ │ │ -0002a920: 6c74 6572 3c2f 6833 3e0a 3c64 6976 2063 lter

    .
    │ │ │ -0002a960: 7075 626c 6963 2073 7461 7469 633c 2f73 public static void& │ │ │ -0002a9a0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ -0002a9c0: 7765 6967 6874 6564 4d65 6469 616e 4669 weightedMedianFi │ │ │ -0002a9d0: 6c74 6572 3c2f 7370 616e 3e3c 7762 723e lter │ │ │ -0002a9e0: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Mat&nb │ │ │ -0002aa40: 7370 3b6a 6f69 6e74 2c0a 203c 6120 6872 sp;joint,. Mat&n │ │ │ -0002aa90: 6273 703b 7372 632c 0a20 3c61 2068 7265 bsp;src,. Mat&nb │ │ │ -0002aae0: 7370 3b64 7374 2c0a 2069 6e74 266e 6273 sp;dst,. int&nbs │ │ │ -0002aaf0: 703b 722c 0a20 646f 7562 6c65 266e 6273 p;r,. double&nbs │ │ │ -0002ab00: 703b 7369 676d 612c 0a20 696e 7426 6e62 p;sigma,. int&nb │ │ │ -0002ab10: 7370 3b77 6569 6768 7454 7970 652c 0a20 sp;weightType,. │ │ │ -0002ab20: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ -0002ab60: 2f61 3e26 6e62 7370 3b6d 6173 6b29 3c2f /a> mask)
    .
    A │ │ │ -0002ab90: 7070 6c69 6573 2077 6569 6768 7465 6420 pplies weighted │ │ │ -0002aba0: 6d65 6469 616e 2066 696c 7465 7220 746f median filter to │ │ │ -0002abb0: 2061 6e20 696d 6167 652e 0a0a 2046 6f72 an image... For │ │ │ -0002abc0: 206d 6f72 6520 6465 7461 696c 7320 6162 more details ab │ │ │ -0002abd0: 6f75 7420 7468 6973 2069 6d70 6c65 6d65 out this impleme │ │ │ -0002abe0: 6e74 6174 696f 6e2c 2070 6c65 6173 6520 ntation, please │ │ │ -0002abf0: 7365 6520 4349 5445 3a20 7a68 616e 6732 see CITE: zhang2 │ │ │ -0002ac00: 3031 3431 3030 2b0a 0a20 7468 6520 7069 014100+.. the pi │ │ │ -0002ac10: 7865 6c20 7769 6c6c 2062 6520 6967 6e6f xel will be igno │ │ │ -0002ac20: 7265 6420 7768 656e 206d 6169 6e74 6169 red when maintai │ │ │ -0002ac30: 6e69 6e67 2074 6865 206a 6f69 6e74 2d68 ning the joint-h │ │ │ -0002ac40: 6973 746f 6772 616d 2e20 5468 6973 2069 istogram. This i │ │ │ -0002ac50: 7320 7573 6566 756c 2066 6f72 2061 7070 s useful for app │ │ │ -0002ac60: 6c69 6361 7469 6f6e 7320 6c69 6b65 206f lications like o │ │ │ -0002ac70: 7074 6963 616c 2066 6c6f 7720 6f63 636c ptical flow occl │ │ │ -0002ac80: 7573 696f 6e20 6861 6e64 6c69 6e67 2e0a usion handling.. │ │ │ -0002ac90: 0a20 5345 453a 206d 6564 6961 6e42 6c75 . SEE: medianBlu │ │ │ -0002aca0: 722c 206a 6f69 6e74 4269 6c61 7465 7261 r, jointBilatera │ │ │ -0002acb0: 6c46 696c 7465 723c 2f64 6976 3e0a 3c64 lFilter
    . │ │ │ -0002acd0: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ -0002ace0: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -0002acf0: 6a6f 696e 743c 2f63 6f64 653e 202d 2061 joint - a │ │ │ -0002ad00: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ -0002ad10: 6572 6174 6564 3c2f 6464 3e0a 3c64 643e erated
    .
    │ │ │ -0002ad20: 3c63 6f64 653e 7372 633c 2f63 6f64 653e src │ │ │ -0002ad30: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ -0002ad40: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
    . │ │ │ -0002ad50: 3c64 643e 3c63 6f64 653e 6473 743c 2f63
    dst - automatic │ │ │ -0002ad70: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    r< │ │ │ -0002ad90: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ -0002ada0: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ -0002adb0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -0002adc0: 7369 676d 613c 2f63 6f64 653e 202d 2061 sigma - a │ │ │ -0002add0: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ -0002ade0: 6572 6174 6564 3c2f 6464 3e0a 3c64 643e erated
    .
    │ │ │ -0002adf0: 3c63 6f64 653e 7765 6967 6874 5479 7065 weightType │ │ │ -0002ae00: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ -0002ae10: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -0002ae20: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d
    .
    mask - a │ │ │ -0002ae40: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ -0002ae50: 6572 6174 6564 3c2f 6464 3e0a 3c2f 646c erated
    ....
  • .
    .

    weigh │ │ │ -0002af00: 7465 644d 6564 6961 6e46 696c 7465 723c tedMedianFilter< │ │ │ -0002af10: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ -0002af50: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ -0002af60: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;v │ │ │ -0002af80: 6f69 643c 2f73 7061 6e3e 266e 6273 703b oid  │ │ │ -0002af90: 3c73 7061 6e20 636c 6173 733d 2265 6c65 weigh │ │ │ -0002afb0: 7465 644d 6564 6961 6e46 696c 7465 723c tedMedianFilter< │ │ │ -0002afc0: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(Mat jo │ │ │ -0002b030: 696e 742c 0a20 3c61 2068 7265 663d 222e int,. Mat s │ │ │ -0002b080: 7263 2c0a 203c 6120 6872 6566 3d22 2e2e rc,. Mat ds │ │ │ -0002b0d0: 742c 0a20 696e 7426 6e62 7370 3b72 2c0a t,. int r,. │ │ │ -0002b0e0: 2064 6f75 626c 6526 6e62 7370 3b73 6967 double sig │ │ │ -0002b0f0: 6d61 2c0a 2069 6e74 266e 6273 703b 7765 ma,. int we │ │ │ -0002b100: 6967 6874 5479 7065 293c 2f73 7061 6e3e ightType) │ │ │ -0002b110: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    Applie │ │ │ -0002b130: 7320 7765 6967 6874 6564 206d 6564 6961 s weighted media │ │ │ -0002b140: 6e20 6669 6c74 6572 2074 6f20 616e 2069 n filter to an i │ │ │ -0002b150: 6d61 6765 2e0a 0a20 466f 7220 6d6f 7265 mage... For more │ │ │ -0002b160: 2064 6574 6169 6c73 2061 626f 7574 2074 details about t │ │ │ -0002b170: 6869 7320 696d 706c 656d 656e 7461 7469 his implementati │ │ │ -0002b180: 6f6e 2c20 706c 6561 7365 2073 6565 2043 on, please see C │ │ │ -0002b190: 4954 453a 207a 6861 6e67 3230 3134 3130 ITE: zhang201410 │ │ │ -0002b1a0: 302b 0a0a 2074 6865 2070 6978 656c 2077 0+.. the pixel w │ │ │ -0002b1b0: 696c 6c20 6265 2069 676e 6f72 6564 2077 ill be ignored w │ │ │ -0002b1c0: 6865 6e20 6d61 696e 7461 696e 696e 6720 hen maintaining │ │ │ -0002b1d0: 7468 6520 6a6f 696e 742d 6869 7374 6f67 the joint-histog │ │ │ -0002b1e0: 7261 6d2e 2054 6869 7320 6973 2075 7365 ram. This is use │ │ │ -0002b1f0: 6675 6c20 666f 7220 6170 706c 6963 6174 ful for applicat │ │ │ -0002b200: 696f 6e73 206c 696b 6520 6f70 7469 6361 ions like optica │ │ │ -0002b210: 6c20 666c 6f77 206f 6363 6c75 7369 6f6e l flow occlusion │ │ │ -0002b220: 2068 616e 646c 696e 672e 0a0a 2053 4545 handling... SEE │ │ │ -0002b230: 3a20 6d65 6469 616e 426c 7572 2c20 6a6f : medianBlur, jo │ │ │ -0002b240: 696e 7442 696c 6174 6572 616c 4669 6c74 intBilateralFilt │ │ │ -0002b250: 6572 3c2f 6469 763e 0a3c 646c 2063 6c61 er
    .
    .
    │ │ │ -0002b270: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
    │ │ │ -0002b280: 0a3c 6464 3e3c 636f 6465 3e6a 6f69 6e74 .
    joint │ │ │ -0002b290: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ -0002b2a0: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -0002b2b0: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d
    .
    src - au │ │ │ -0002b2d0: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -0002b2e0: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated
    .
    < │ │ │ -0002b2f0: 636f 6465 3e64 7374 3c2f 636f 6465 3e20 code>dst │ │ │ -0002b300: 2d20 6175 746f 6d61 7469 6361 6c6c 7920 - automatically │ │ │ -0002b310: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated
    .< │ │ │ -0002b320: 6464 3e3c 636f 6465 3e72 3c2f 636f 6465 dd>r - automaticall │ │ │ -0002b340: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated │ │ │ -0002b350: 0a3c 6464 3e3c 636f 6465 3e73 6967 6d61 .
    sigma │ │ │ -0002b360: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ -0002b370: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -0002b380: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d
    .
    weightType - automatical │ │ │ -0002b3b0: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
    .
    ..

  • .
  • ..

    wei │ │ │ -0002b460: 6768 7465 644d 6564 6961 6e46 696c 7465 ghtedMedianFilte │ │ │ -0002b470: 723c 2f68 333e 0a3c 6469 7620 636c 6173 r

    .
    pub │ │ │ -0002b4b0: 6c69 6320 7374 6174 6963 3c2f 7370 616e lic static void&nbs │ │ │ -0002b4f0: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;wei │ │ │ -0002b510: 6768 7465 644d 6564 6961 6e46 696c 7465 ghtedMedianFilte │ │ │ -0002b520: 723c 2f73 7061 6e3e 3c77 6272 3e3c 7370 r(Mat  │ │ │ -0002b590: 6a6f 696e 742c 0a20 3c61 2068 7265 663d joint,. Mat  │ │ │ -0002b5e0: 3b73 7263 2c0a 203c 6120 6872 6566 3d22 ;src,. Mat  │ │ │ -0002b630: 6473 742c 0a20 696e 7426 6e62 7370 3b72 dst,. int r │ │ │ -0002b640: 2c0a 2064 6f75 626c 6526 6e62 7370 3b73 ,. double s │ │ │ -0002b650: 6967 6d61 293c 2f73 7061 6e3e 3c2f 6469 igma).
    Applies we │ │ │ -0002b680: 6967 6874 6564 206d 6564 6961 6e20 6669 ighted median fi │ │ │ -0002b690: 6c74 6572 2074 6f20 616e 2069 6d61 6765 lter to an image │ │ │ -0002b6a0: 2e0a 0a20 466f 7220 6d6f 7265 2064 6574 ... For more det │ │ │ -0002b6b0: 6169 6c73 2061 626f 7574 2074 6869 7320 ails about this │ │ │ -0002b6c0: 696d 706c 656d 656e 7461 7469 6f6e 2c20 implementation, │ │ │ -0002b6d0: 706c 6561 7365 2073 6565 2043 4954 453a please see CITE: │ │ │ -0002b6e0: 207a 6861 6e67 3230 3134 3130 302b 0a0a zhang2014100+.. │ │ │ -0002b6f0: 2074 6865 2070 6978 656c 2077 696c 6c20 the pixel will │ │ │ -0002b700: 6265 2069 676e 6f72 6564 2077 6865 6e20 be ignored when │ │ │ -0002b710: 6d61 696e 7461 696e 696e 6720 7468 6520 maintaining the │ │ │ -0002b720: 6a6f 696e 742d 6869 7374 6f67 7261 6d2e joint-histogram. │ │ │ -0002b730: 2054 6869 7320 6973 2075 7365 6675 6c20 This is useful │ │ │ -0002b740: 666f 7220 6170 706c 6963 6174 696f 6e73 for applications │ │ │ -0002b750: 206c 696b 6520 6f70 7469 6361 6c20 666c like optical fl │ │ │ -0002b760: 6f77 206f 6363 6c75 7369 6f6e 2068 616e ow occlusion han │ │ │ -0002b770: 646c 696e 672e 0a0a 2053 4545 3a20 6d65 dling... SEE: me │ │ │ -0002b780: 6469 616e 426c 7572 2c20 6a6f 696e 7442 dianBlur, jointB │ │ │ -0002b790: 696c 6174 6572 616c 4669 6c74 6572 3c2f ilateralFilter.
    .
    Para │ │ │ -0002b7c0: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    joint - automatica │ │ │ -0002b7f0: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    src │ │ │ -0002b810: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ -0002b820: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -0002b830: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d
    .
    dst - au │ │ │ -0002b850: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -0002b860: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated
    .
    < │ │ │ -0002b870: 636f 6465 3e72 3c2f 636f 6465 3e20 2d20 code>r - │ │ │ -0002b880: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ -0002b890: 6e65 7261 7465 643c 2f64 643e 0a3c 6464 nerated
    .
    sigma - automatica │ │ │ -0002b8c0: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    ..
  • .
  • .< │ │ │ -0002b8f0: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ -0002b900: 6574 6169 6c22 2069 643d 2277 6569 6768 etail" id="weigh │ │ │ -0002b910: 7465 644d 6564 6961 6e46 696c 7465 7228 tedMedianFilter( │ │ │ -0002b920: 6f72 672e 6f70 656e 6376 2e63 6f72 652e org.opencv.core. │ │ │ -0002b930: 4d61 742c 6f72 672e 6f70 656e 6376 2e63 Mat,org.opencv.c │ │ │ -0002b940: 6f72 652e 4d61 742c 6f72 672e 6f70 656e ore.Mat,org.open │ │ │ -0002b950: 6376 2e63 6f72 652e 4d61 742c 696e 7429 cv.core.Mat,int) │ │ │ -0002b960: 223e 0a3c 6833 3e77 6569 6768 7465 644d ">.

    weightedM │ │ │ -0002b970: 6564 6961 6e46 696c 7465 723c 2f68 333e edianFilter

    │ │ │ -0002b980: 0a3c 6469 7620 636c 6173 733d 226d 656d .
    < │ │ │ -0002b9a0: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ -0002b9b0: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ -0002b9c0: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ -0002b9d0: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;void< │ │ │ -0002b9f0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> weightedM │ │ │ -0002ba20: 6564 6961 6e46 696c 7465 723c 2f73 7061 edianFilter │ │ │ -0002ba50: 283c 6120 6872 6566 3d22 2e2e 2f63 6f72 (Mat │ │ │ -0002ba90: 3c2f 613e 266e 6273 703b 6a6f 696e 742c  joint, │ │ │ -0002baa0: 0a20 3c61 2068 7265 663d 222e 2e2f 636f . Ma │ │ │ -0002bae0: 743c 2f61 3e26 6e62 7370 3b73 7263 2c0a t src,. │ │ │ -0002baf0: 203c 6120 6872 6566 3d22 2e2e 2f63 6f72 Mat │ │ │ -0002bb30: 3c2f 613e 266e 6273 703b 6473 742c 0a20  dst,. │ │ │ -0002bb40: 696e 7426 6e62 7370 3b72 293c 2f73 7061 int r)
    .
    Appl │ │ │ -0002bb70: 6965 7320 7765 6967 6874 6564 206d 6564 ies weighted med │ │ │ -0002bb80: 6961 6e20 6669 6c74 6572 2074 6f20 616e ian filter to an │ │ │ -0002bb90: 2069 6d61 6765 2e0a 0a20 466f 7220 6d6f image... For mo │ │ │ -0002bba0: 7265 2064 6574 6169 6c73 2061 626f 7574 re details about │ │ │ -0002bbb0: 2074 6869 7320 696d 706c 656d 656e 7461 this implementa │ │ │ -0002bbc0: 7469 6f6e 2c20 706c 6561 7365 2073 6565 tion, please see │ │ │ -0002bbd0: 2043 4954 453a 207a 6861 6e67 3230 3134 CITE: zhang2014 │ │ │ -0002bbe0: 3130 302b 0a0a 2074 6865 2070 6978 656c 100+.. the pixel │ │ │ -0002bbf0: 2077 696c 6c20 6265 2069 676e 6f72 6564 will be ignored │ │ │ -0002bc00: 2077 6865 6e20 6d61 696e 7461 696e 696e when maintainin │ │ │ -0002bc10: 6720 7468 6520 6a6f 696e 742d 6869 7374 g the joint-hist │ │ │ -0002bc20: 6f67 7261 6d2e 2054 6869 7320 6973 2075 ogram. This is u │ │ │ -0002bc30: 7365 6675 6c20 666f 7220 6170 706c 6963 seful for applic │ │ │ -0002bc40: 6174 696f 6e73 206c 696b 6520 6f70 7469 ations like opti │ │ │ -0002bc50: 6361 6c20 666c 6f77 206f 6363 6c75 7369 cal flow occlusi │ │ │ -0002bc60: 6f6e 2068 616e 646c 696e 672e 0a0a 2053 on handling... S │ │ │ -0002bc70: 4545 3a20 6d65 6469 616e 426c 7572 2c20 EE: medianBlur, │ │ │ -0002bc80: 6a6f 696e 7442 696c 6174 6572 616c 4669 jointBilateralFi │ │ │ -0002bc90: 6c74 6572 3c2f 6469 763e 0a3c 646c 2063 lter
    .
    .Parameters:.
    joi │ │ │ -0002bcd0: 6e74 3c2f 636f 6465 3e20 2d20 6175 746f nt - auto │ │ │ -0002bce0: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ -0002bcf0: 7465 643c 2f64 643e 0a3c 6464 3e3c 636f ted
    .
    src - │ │ │ -0002bd10: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ -0002bd20: 6e65 7261 7465 643c 2f64 643e 0a3c 6464 nerated
    .
    dst - automaticall │ │ │ -0002bd50: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ -0002bd60: 0a3c 6464 3e3c 636f 6465 3e72 3c2f 636f .
    r - automatica │ │ │ -0002bd80: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    ..
  • .
  • .< │ │ │ -0002bdb0: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ -0002bdc0: 6574 6169 6c22 2069 643d 2263 7265 6174 etail" id="creat │ │ │ -0002bdd0: 6552 4646 6561 7475 7265 4765 7474 6572 eRFFeatureGetter │ │ │ -0002bde0: 2829 223e 0a3c 6833 3e63 7265 6174 6552 ()">.

    createR │ │ │ -0002bdf0: 4646 6561 7475 7265 4765 7474 6572 3c2f FFeatureGetter.
    public │ │ │ -0002be40: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ -0002be50: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;RFFeatureGette │ │ │ -0002bec0: 723c 2f61 3e3c 2f73 7061 6e3e 266e 6273 r&nbs │ │ │ -0002bed0: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;cre │ │ │ -0002bef0: 6174 6552 4646 6561 7475 7265 4765 7474 ateRFFeatureGett │ │ │ -0002bf00: 6572 3c2f 7370 616e 3e28 293c 2f64 6976 er()
    ...
  • .
    .

    cr │ │ │ -0002bfa0: 6561 7465 5374 7275 6374 7572 6564 4564 eateStructuredEd │ │ │ -0002bfb0: 6765 4465 7465 6374 696f 6e3c 2f68 333e geDetection

    │ │ │ -0002bfc0: 0a3c 6469 7620 636c 6173 733d 226d 656d .
    < │ │ │ -0002bfe0: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ -0002bff0: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ -0002c000: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ -0002c010: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;Structure │ │ │ -0002c080: 6445 6467 6544 6574 6563 7469 6f6e 3c2f dEdgeDetection < │ │ │ -0002c0a0: 7370 616e 2063 6c61 7373 3d22 656c 656d span class="elem │ │ │ -0002c0b0: 656e 742d 6e61 6d65 223e 6372 6561 7465 ent-name">create │ │ │ -0002c0c0: 5374 7275 6374 7572 6564 4564 6765 4465 StructuredEdgeDe │ │ │ -0002c0d0: 7465 6374 696f 6e3c 2f73 7061 6e3e 3c77 tection( │ │ │ -0002c1a0: 5374 7269 6e67 3c2f 613e 266e 6273 703b String  │ │ │ -0002c1b0: 6d6f 6465 6c2c 0a20 3c61 2068 7265 663d model,. RFFe │ │ │ -0002c200: 6174 7572 6547 6574 7465 723c 2f61 3e26 atureGetter& │ │ │ -0002c210: 6e62 7370 3b68 6f77 546f 4765 7446 6561 nbsp;howToGetFea │ │ │ -0002c220: 7475 7265 7329 3c2f 7370 616e 3e3c 2f64 tures).
    .< │ │ │ -0002c240: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    crea │ │ │ -0002c2a0: 7465 5374 7275 6374 7572 6564 4564 6765 teStructuredEdge │ │ │ -0002c2b0: 4465 7465 6374 696f 6e3c 2f68 333e 0a3c Detection

    .< │ │ │ -0002c2c0: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ -0002c2d0: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ -0002c300: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ -0002c310: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ -0002c320: 726e 2d74 7970 6522 3e3c 6120 6872 6566 rn-type">StructuredE │ │ │ -0002c380: 6467 6544 6574 6563 7469 6f6e 3c2f 613e dgeDetection │ │ │ -0002c390: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  createSt │ │ │ -0002c3c0: 7275 6374 7572 6564 4564 6765 4465 7465 ructuredEdgeDete │ │ │ -0002c3d0: 6374 696f 6e3c 2f73 7061 6e3e 3c77 6272 ction(St │ │ │ -0002c4a0: 7269 6e67 3c2f 613e 266e 6273 703b 6d6f ring mo │ │ │ -0002c4b0: 6465 6c29 3c2f 7370 616e 3e3c 2f64 6976 del)...
  • .
    .

    createEd │ │ │ -0002c520: 6765 4177 6172 6549 6e74 6572 706f 6c61 geAwareInterpola │ │ │ -0002c530: 746f 723c 2f68 333e 0a3c 6469 7620 636c tor

    .
    p │ │ │ -0002c570: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static Edg │ │ │ -0002c5f0: 6541 7761 7265 496e 7465 7270 6f6c 6174 eAwareInterpolat │ │ │ -0002c600: 6f72 3c2f 613e 3c2f 7370 616e 3e26 6e62 or&nb │ │ │ -0002c610: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;cr │ │ │ -0002c630: 6561 7465 4564 6765 4177 6172 6549 6e74 eateEdgeAwareInt │ │ │ -0002c640: 6572 706f 6c61 746f 723c 2f73 7061 6e3e erpolator │ │ │ -0002c650: 2829 3c2f 6469 763e 0a3c 6469 7620 636c ()
    .
    Fact │ │ │ -0002c670: 6f72 7920 6d65 7468 6f64 2074 6861 7420 ory method that │ │ │ -0002c680: 6372 6561 7465 7320 616e 2069 6e73 7461 creates an insta │ │ │ -0002c690: 6e63 6520 6f66 2074 6865 0a20 4564 6765 nce of the. Edge │ │ │ -0002c6a0: 4177 6172 6549 6e74 6572 706f 6c61 746f AwareInterpolato │ │ │ -0002c6b0: 722e 3c2f 6469 763e 0a3c 646c 2063 6c61 r.
    .
    .
    │ │ │ -0002c6d0: 5265 7475 726e 733a 3c2f 6474 3e0a 3c64 Returns:
    .automatically │ │ │ -0002c6f0: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated.< │ │ │ -0002c700: 2f64 6c3e 0a3c 2f73 6563 7469 6f6e 3e0a /dl>.
    . │ │ │ -0002c710: 3c2f 6c69 3e0a 3c6c 693e 0a3c 7365 6374
  • .
  • . │ │ │ -0002c750: 0a3c 6833 3e63 7265 6174 6552 4943 496e .

    createRICIn │ │ │ -0002c760: 7465 7270 6f6c 6174 6f72 3c2f 6833 3e0a terpolator

    . │ │ │ -0002c770: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
    public sta │ │ │ -0002c7b0: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ -0002c7c0: 3c73 7061 6e20 636c 6173 733d 2272 6574 RI │ │ │ -0002c820: 4349 6e74 6572 706f 6c61 746f 723c 2f61 CInterpolator createR │ │ │ -0002c860: 4943 496e 7465 7270 6f6c 6174 6f72 3c2f ICInterpolator()
    .Factory method │ │ │ -0002c8a0: 7468 6174 2063 7265 6174 6573 2061 6e20 that creates an │ │ │ -0002c8b0: 696e 7374 616e 6365 206f 6620 7468 650a instance of the. │ │ │ -0002c8c0: 2052 4943 496e 7465 7270 6f6c 6174 6f72 RICInterpolator │ │ │ -0002c8d0: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 ..
    .
    R │ │ │ -0002c8f0: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
    .
    automatically g │ │ │ -0002c910: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ...< │ │ │ -0002c930: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • .. │ │ │ -0002c990: 3c68 333e 6372 6561 7465 5375 7065 7270

    createSuperp │ │ │ -0002c9a0: 6978 656c 534c 4943 3c2f 6833 3e0a 3c64 ixelSLIC

    .public stati │ │ │ -0002c9f0: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c Super │ │ │ -0002ca60: 7069 7865 6c53 4c49 433c 2f61 3e3c 2f73 pixelSLIC createSuper │ │ │ -0002caa0: 7069 7865 6c53 4c49 433c 2f73 7061 6e3e pixelSLIC │ │ │ -0002cab0: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ -0002cad0: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -0002cae0: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -0002caf0: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -0002cb00: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat image,. │ │ │ -0002cb20: 696e 7426 6e62 7370 3b61 6c67 6f72 6974 int algorit │ │ │ -0002cb30: 686d 2c0a 2069 6e74 266e 6273 703b 7265 hm,. int re │ │ │ -0002cb40: 6769 6f6e 5f73 697a 652c 0a20 666c 6f61 gion_size,. floa │ │ │ -0002cb50: 7426 6e62 7370 3b72 756c 6572 293c 2f73 t ruler)
    .
    In │ │ │ -0002cb80: 6974 6961 6c69 7a65 2061 2053 7570 6572 itialize a Super │ │ │ -0002cb90: 7069 7865 6c53 4c49 4320 6f62 6a65 6374 pixelSLIC object │ │ │ -0002cba0: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ -0002cbc0: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ -0002cbd0: 6464 3e3c 636f 6465 3e69 6d61 6765 3c2f dd>image - Image to │ │ │ -0002cbf0: 2073 6567 6d65 6e74 3c2f 6464 3e0a 3c64 segment.algorith │ │ │ -0002cc10: 6d3c 2f63 6f64 653e 202d 2043 686f 6f73 m - Choos │ │ │ -0002cc20: 6573 2074 6865 2061 6c67 6f72 6974 686d es the algorithm │ │ │ -0002cc30: 2076 6172 6961 6e74 2074 6f20 7573 653a variant to use: │ │ │ -0002cc40: 0a20 534c 4943 2073 6567 6d65 6e74 7320 . SLIC segments │ │ │ -0002cc50: 696d 6167 6520 7573 696e 6720 6120 6465 image using a de │ │ │ -0002cc60: 7369 7265 6420 7265 6769 6f6e 5f73 697a sired region_siz │ │ │ -0002cc70: 652c 2061 6e64 2069 6e20 6164 6469 7469 e, and in additi │ │ │ -0002cc80: 6f6e 2053 4c49 434f 2077 696c 6c20 6f70 on SLICO will op │ │ │ -0002cc90: 7469 6d69 7a65 2075 7369 6e67 2061 6461 timize using ada │ │ │ -0002cca0: 7074 6976 6520 636f 6d70 6163 746e 6573 ptive compactnes │ │ │ -0002ccb0: 7320 6661 6374 6f72 2c0a 2077 6869 6c65 s factor,. while │ │ │ -0002ccc0: 204d 534c 4943 2077 696c 6c20 6f70 7469 MSLIC will opti │ │ │ -0002ccd0: 6d69 7a65 2075 7369 6e67 206d 616e 6966 mize using manif │ │ │ -0002cce0: 6f6c 6420 6d65 7468 6f64 7320 7265 7375 old methods resu │ │ │ -0002ccf0: 6c74 696e 6720 696e 206d 6f72 6520 636f lting in more co │ │ │ -0002cd00: 6e74 656e 742d 7365 6e73 6974 6976 6520 ntent-sensitive │ │ │ -0002cd10: 7375 7065 7270 6978 656c 732e 3c2f 6464 superpixels..
    regi │ │ │ -0002cd30: 6f6e 5f73 697a 653c 2f63 6f64 653e 202d on_size - │ │ │ -0002cd40: 2043 686f 6f73 6573 2061 6e20 6176 6572 Chooses an aver │ │ │ -0002cd50: 6167 6520 7375 7065 7270 6978 656c 2073 age superpixel s │ │ │ -0002cd60: 697a 6520 6d65 6173 7572 6564 2069 6e20 ize measured in │ │ │ -0002cd70: 7069 7865 6c73 3c2f 6464 3e0a 3c64 643e pixels
    .
    │ │ │ -0002cd80: 3c63 6f64 653e 7275 6c65 723c 2f63 6f64 ruler - Chooses the │ │ │ -0002cda0: 2065 6e66 6f72 6365 6d65 6e74 206f 6620 enforcement of │ │ │ -0002cdb0: 7375 7065 7270 6978 656c 2073 6d6f 6f74 superpixel smoot │ │ │ -0002cdc0: 686e 6573 7320 6661 6374 6f72 206f 6620 hness factor of │ │ │ -0002cdd0: 7375 7065 7270 6978 656c 0a0a 2054 6865 superpixel.. The │ │ │ -0002cde0: 2066 756e 6374 696f 6e20 696e 6974 6961 function initia │ │ │ -0002cdf0: 6c69 7a65 7320 6120 5375 7065 7270 6978 lizes a Superpix │ │ │ -0002ce00: 656c 534c 4943 206f 626a 6563 7420 666f elSLIC object fo │ │ │ -0002ce10: 7220 7468 6520 696e 7075 7420 696d 6167 r the input imag │ │ │ -0002ce20: 652e 2049 7420 7365 7473 2074 6865 2070 e. It sets the p │ │ │ -0002ce30: 6172 616d 6574 6572 7320 6f66 2063 686f arameters of cho │ │ │ -0002ce40: 6f73 6564 0a20 7375 7065 7270 6978 656c osed. superpixel │ │ │ -0002ce50: 2061 6c67 6f72 6974 686d 2c20 7768 6963 algorithm, whic │ │ │ -0002ce60: 6820 6172 653a 2072 6567 696f 6e5f 7369 h are: region_si │ │ │ -0002ce70: 7a65 2061 6e64 2072 756c 6572 2e20 4974 ze and ruler. It │ │ │ -0002ce80: 2070 7265 616c 6c6f 6361 7465 2073 6f6d preallocate som │ │ │ -0002ce90: 6520 6275 6666 6572 7320 666f 7220 6675 e buffers for fu │ │ │ -0002cea0: 7475 7265 0a20 636f 6d70 7574 696e 6720 ture. computing │ │ │ -0002ceb0: 6974 6572 6174 696f 6e73 206f 7665 7220 iterations over │ │ │ -0002cec0: 7468 6520 6769 7665 6e20 696d 6167 652e the given image. │ │ │ -0002ced0: 2046 6f72 2065 6e61 6e63 6865 6420 7265 For enanched re │ │ │ -0002cee0: 7375 6c74 7320 6974 2069 7320 7265 636f sults it is reco │ │ │ -0002cef0: 6d6d 656e 6465 6420 666f 7220 636f 6c6f mmended for colo │ │ │ -0002cf00: 7220 696d 6167 6573 2074 6f0a 2070 7265 r images to. pre │ │ │ -0002cf10: 7072 6f63 6573 7320 696d 6167 6520 7769 process image wi │ │ │ -0002cf20: 7468 206c 6974 746c 6520 6761 7573 7369 th little gaussi │ │ │ -0002cf30: 616e 2062 6c75 7220 7573 696e 6720 6120 an blur using a │ │ │ -0002cf40: 736d 616c 6c20 3320 7820 3320 6b65 726e small 3 x 3 kern │ │ │ -0002cf50: 656c 2061 6e64 2061 6464 6974 696f 6e61 el and additiona │ │ │ -0002cf60: 6c20 636f 6e76 6572 7369 6f6e 2069 6e74 l conversion int │ │ │ -0002cf70: 6f0a 2043 6965 4c41 4220 636f 6c6f 7220 o. CieLAB color │ │ │ -0002cf80: 7370 6163 652e 2041 6e20 6578 616d 706c space. An exampl │ │ │ -0002cf90: 6520 6f66 2053 4c49 4320 7665 7273 7573 e of SLIC versus │ │ │ -0002cfa0: 2053 4c49 434f 2061 6e64 204d 534c 4943 SLICO and MSLIC │ │ │ -0002cfb0: 2069 7320 696c 7573 7472 6174 6564 2069 is ilustrated i │ │ │ -0002cfc0: 6e20 7468 6520 666f 6c6c 6f77 696e 6720 n the following │ │ │ -0002cfd0: 7069 6374 7572 652e 0a0a 2021 5b69 6d61 picture... ![ima │ │ │ -0002cfe0: 6765 5d28 7069 6373 2f73 7570 6572 7069 ge](pics/superpi │ │ │ -0002cff0: 7865 6c73 5f73 6c69 632e 706e 6729 3c2f xels_slic.png).
    Returns: │ │ │ -0002d010: 3c2f 6474 3e0a 3c64 643e 6175 746f 6d61
    .
    automa │ │ │ -0002d020: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -0002d030: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
    .
    .
    .
  • ..
    .

    createSup │ │ │ -0002d0b0: 6572 7069 7865 6c53 4c49 433c 2f68 333e erpixelSLIC

    │ │ │ -0002d0c0: 0a3c 6469 7620 636c 6173 733d 226d 656d .
    < │ │ │ -0002d0e0: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ -0002d0f0: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ -0002d100: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ -0002d110: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;Su │ │ │ -0002d170: 7065 7270 6978 656c 534c 4943 3c2f 613e perpixelSLIC │ │ │ -0002d180: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  createSu │ │ │ -0002d1b0: 7065 7270 6978 656c 534c 4943 3c2f 7370 perpixelSLIC(Ma │ │ │ -0002d220: 743c 2f61 3e26 6e62 7370 3b69 6d61 6765 t image │ │ │ -0002d230: 2c0a 2069 6e74 266e 6273 703b 616c 676f ,. int algo │ │ │ -0002d240: 7269 7468 6d2c 0a20 696e 7426 6e62 7370 rithm,. int  │ │ │ -0002d250: 3b72 6567 696f 6e5f 7369 7a65 293c 2f73 ;region_size)
    .
    In │ │ │ -0002d280: 6974 6961 6c69 7a65 2061 2053 7570 6572 itialize a Super │ │ │ -0002d290: 7069 7865 6c53 4c49 4320 6f62 6a65 6374 pixelSLIC object │ │ │ -0002d2a0: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ -0002d2c0: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ -0002d2d0: 6464 3e3c 636f 6465 3e69 6d61 6765 3c2f dd>image - Image to │ │ │ -0002d2f0: 2073 6567 6d65 6e74 3c2f 6464 3e0a 3c64 segment.algorith │ │ │ -0002d310: 6d3c 2f63 6f64 653e 202d 2043 686f 6f73 m - Choos │ │ │ -0002d320: 6573 2074 6865 2061 6c67 6f72 6974 686d es the algorithm │ │ │ -0002d330: 2076 6172 6961 6e74 2074 6f20 7573 653a variant to use: │ │ │ -0002d340: 0a20 534c 4943 2073 6567 6d65 6e74 7320 . SLIC segments │ │ │ -0002d350: 696d 6167 6520 7573 696e 6720 6120 6465 image using a de │ │ │ -0002d360: 7369 7265 6420 7265 6769 6f6e 5f73 697a sired region_siz │ │ │ -0002d370: 652c 2061 6e64 2069 6e20 6164 6469 7469 e, and in additi │ │ │ -0002d380: 6f6e 2053 4c49 434f 2077 696c 6c20 6f70 on SLICO will op │ │ │ -0002d390: 7469 6d69 7a65 2075 7369 6e67 2061 6461 timize using ada │ │ │ -0002d3a0: 7074 6976 6520 636f 6d70 6163 746e 6573 ptive compactnes │ │ │ -0002d3b0: 7320 6661 6374 6f72 2c0a 2077 6869 6c65 s factor,. while │ │ │ -0002d3c0: 204d 534c 4943 2077 696c 6c20 6f70 7469 MSLIC will opti │ │ │ -0002d3d0: 6d69 7a65 2075 7369 6e67 206d 616e 6966 mize using manif │ │ │ -0002d3e0: 6f6c 6420 6d65 7468 6f64 7320 7265 7375 old methods resu │ │ │ -0002d3f0: 6c74 696e 6720 696e 206d 6f72 6520 636f lting in more co │ │ │ -0002d400: 6e74 656e 742d 7365 6e73 6974 6976 6520 ntent-sensitive │ │ │ -0002d410: 7375 7065 7270 6978 656c 732e 3c2f 6464 superpixels..
    regi │ │ │ -0002d430: 6f6e 5f73 697a 653c 2f63 6f64 653e 202d on_size - │ │ │ -0002d440: 2043 686f 6f73 6573 2061 6e20 6176 6572 Chooses an aver │ │ │ -0002d450: 6167 6520 7375 7065 7270 6978 656c 2073 age superpixel s │ │ │ -0002d460: 697a 6520 6d65 6173 7572 6564 2069 6e20 ize measured in │ │ │ -0002d470: 7069 7865 6c73 0a0a 2054 6865 2066 756e pixels.. The fun │ │ │ -0002d480: 6374 696f 6e20 696e 6974 6961 6c69 7a65 ction initialize │ │ │ -0002d490: 7320 6120 5375 7065 7270 6978 656c 534c s a SuperpixelSL │ │ │ -0002d4a0: 4943 206f 626a 6563 7420 666f 7220 7468 IC object for th │ │ │ -0002d4b0: 6520 696e 7075 7420 696d 6167 652e 2049 e input image. I │ │ │ -0002d4c0: 7420 7365 7473 2074 6865 2070 6172 616d t sets the param │ │ │ -0002d4d0: 6574 6572 7320 6f66 2063 686f 6f73 6564 eters of choosed │ │ │ -0002d4e0: 0a20 7375 7065 7270 6978 656c 2061 6c67 . superpixel alg │ │ │ -0002d4f0: 6f72 6974 686d 2c20 7768 6963 6820 6172 orithm, which ar │ │ │ -0002d500: 653a 2072 6567 696f 6e5f 7369 7a65 2061 e: region_size a │ │ │ -0002d510: 6e64 2072 756c 6572 2e20 4974 2070 7265 nd ruler. It pre │ │ │ -0002d520: 616c 6c6f 6361 7465 2073 6f6d 6520 6275 allocate some bu │ │ │ -0002d530: 6666 6572 7320 666f 7220 6675 7475 7265 ffers for future │ │ │ -0002d540: 0a20 636f 6d70 7574 696e 6720 6974 6572 . computing iter │ │ │ -0002d550: 6174 696f 6e73 206f 7665 7220 7468 6520 ations over the │ │ │ -0002d560: 6769 7665 6e20 696d 6167 652e 2046 6f72 given image. For │ │ │ -0002d570: 2065 6e61 6e63 6865 6420 7265 7375 6c74 enanched result │ │ │ -0002d580: 7320 6974 2069 7320 7265 636f 6d6d 656e s it is recommen │ │ │ -0002d590: 6465 6420 666f 7220 636f 6c6f 7220 696d ded for color im │ │ │ -0002d5a0: 6167 6573 2074 6f0a 2070 7265 7072 6f63 ages to. preproc │ │ │ -0002d5b0: 6573 7320 696d 6167 6520 7769 7468 206c ess image with l │ │ │ -0002d5c0: 6974 746c 6520 6761 7573 7369 616e 2062 ittle gaussian b │ │ │ -0002d5d0: 6c75 7220 7573 696e 6720 6120 736d 616c lur using a smal │ │ │ -0002d5e0: 6c20 3320 7820 3320 6b65 726e 656c 2061 l 3 x 3 kernel a │ │ │ -0002d5f0: 6e64 2061 6464 6974 696f 6e61 6c20 636f nd additional co │ │ │ -0002d600: 6e76 6572 7369 6f6e 2069 6e74 6f0a 2043 nversion into. C │ │ │ -0002d610: 6965 4c41 4220 636f 6c6f 7220 7370 6163 ieLAB color spac │ │ │ -0002d620: 652e 2041 6e20 6578 616d 706c 6520 6f66 e. An example of │ │ │ -0002d630: 2053 4c49 4320 7665 7273 7573 2053 4c49 SLIC versus SLI │ │ │ -0002d640: 434f 2061 6e64 204d 534c 4943 2069 7320 CO and MSLIC is │ │ │ -0002d650: 696c 7573 7472 6174 6564 2069 6e20 7468 ilustrated in th │ │ │ -0002d660: 6520 666f 6c6c 6f77 696e 6720 7069 6374 e following pict │ │ │ -0002d670: 7572 652e 0a0a 2021 5b69 6d61 6765 5d28 ure... ![image]( │ │ │ -0002d680: 7069 6373 2f73 7570 6572 7069 7865 6c73 pics/superpixels │ │ │ -0002d690: 5f73 6c69 632e 706e 6729 3c2f 6464 3e0a _slic.png)
    . │ │ │ -0002d6a0: 3c64 743e 5265 7475 726e 733a 3c2f 6474
    Returns:
    .
    automatica │ │ │ -0002d6c0: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    ..
  • .
  • .< │ │ │ -0002d6f0: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ -0002d700: 6574 6169 6c22 2069 643d 2263 7265 6174 etail" id="creat │ │ │ -0002d710: 6553 7570 6572 7069 7865 6c53 4c49 4328 eSuperpixelSLIC( │ │ │ -0002d720: 6f72 672e 6f70 656e 6376 2e63 6f72 652e org.opencv.core. │ │ │ -0002d730: 4d61 742c 696e 7429 223e 0a3c 6833 3e63 Mat,int)">.

    c │ │ │ -0002d740: 7265 6174 6553 7570 6572 7069 7865 6c53 reateSuperpixelS │ │ │ -0002d750: 4c49 433c 2f68 333e 0a3c 6469 7620 636c LIC

    .
    p │ │ │ -0002d790: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static Superpixel │ │ │ -0002d810: 534c 4943 3c2f 613e 3c2f 7370 616e 3e26 SLIC& │ │ │ -0002d820: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ -0002d840: 6372 6561 7465 5375 7065 7270 6978 656c createSuperpixel │ │ │ -0002d850: 534c 4943 3c2f 7370 616e 3e3c 7762 723e SLIC │ │ │ -0002d860: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Mat&nb │ │ │ -0002d8c0: 7370 3b69 6d61 6765 2c0a 2069 6e74 266e sp;image,. int&n │ │ │ -0002d8d0: 6273 703b 616c 676f 7269 7468 6d29 3c2f bsp;algorithm)
    .
    I │ │ │ -0002d900: 6e69 7469 616c 697a 6520 6120 5375 7065 nitialize a Supe │ │ │ -0002d910: 7270 6978 656c 534c 4943 206f 626a 6563 rpixelSLIC objec │ │ │ -0002d920: 743c 2f64 6976 3e0a 3c64 6c20 636c 6173 t
    .
    .
    P │ │ │ -0002d940: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ -0002d950: 3c64 643e 3c63 6f64 653e 696d 6167 653c
    image< │ │ │ -0002d960: 2f63 6f64 653e 202d 2049 6d61 6765 2074 /code> - Image t │ │ │ -0002d970: 6f20 7365 676d 656e 743c 2f64 643e 0a3c o segment
    .< │ │ │ -0002d980: 6464 3e3c 636f 6465 3e61 6c67 6f72 6974 dd>algorit │ │ │ -0002d990: 686d 3c2f 636f 6465 3e20 2d20 4368 6f6f hm - Choo │ │ │ -0002d9a0: 7365 7320 7468 6520 616c 676f 7269 7468 ses the algorith │ │ │ -0002d9b0: 6d20 7661 7269 616e 7420 746f 2075 7365 m variant to use │ │ │ -0002d9c0: 3a0a 2053 4c49 4320 7365 676d 656e 7473 :. SLIC segments │ │ │ -0002d9d0: 2069 6d61 6765 2075 7369 6e67 2061 2064 image using a d │ │ │ -0002d9e0: 6573 6972 6564 2072 6567 696f 6e5f 7369 esired region_si │ │ │ -0002d9f0: 7a65 2c20 616e 6420 696e 2061 6464 6974 ze, and in addit │ │ │ -0002da00: 696f 6e20 534c 4943 4f20 7769 6c6c 206f ion SLICO will o │ │ │ -0002da10: 7074 696d 697a 6520 7573 696e 6720 6164 ptimize using ad │ │ │ -0002da20: 6170 7469 7665 2063 6f6d 7061 6374 6e65 aptive compactne │ │ │ -0002da30: 7373 2066 6163 746f 722c 0a20 7768 696c ss factor,. whil │ │ │ -0002da40: 6520 4d53 4c49 4320 7769 6c6c 206f 7074 e MSLIC will opt │ │ │ -0002da50: 696d 697a 6520 7573 696e 6720 6d61 6e69 imize using mani │ │ │ -0002da60: 666f 6c64 206d 6574 686f 6473 2072 6573 fold methods res │ │ │ -0002da70: 756c 7469 6e67 2069 6e20 6d6f 7265 2063 ulting in more c │ │ │ -0002da80: 6f6e 7465 6e74 2d73 656e 7369 7469 7665 ontent-sensitive │ │ │ -0002da90: 2073 7570 6572 7069 7865 6c73 2e0a 0a20 superpixels... │ │ │ -0002daa0: 5468 6520 6675 6e63 7469 6f6e 2069 6e69 The function ini │ │ │ -0002dab0: 7469 616c 697a 6573 2061 2053 7570 6572 tializes a Super │ │ │ -0002dac0: 7069 7865 6c53 4c49 4320 6f62 6a65 6374 pixelSLIC object │ │ │ -0002dad0: 2066 6f72 2074 6865 2069 6e70 7574 2069 for the input i │ │ │ -0002dae0: 6d61 6765 2e20 4974 2073 6574 7320 7468 mage. It sets th │ │ │ -0002daf0: 6520 7061 7261 6d65 7465 7273 206f 6620 e parameters of │ │ │ -0002db00: 6368 6f6f 7365 640a 2073 7570 6572 7069 choosed. superpi │ │ │ -0002db10: 7865 6c20 616c 676f 7269 7468 6d2c 2077 xel algorithm, w │ │ │ -0002db20: 6869 6368 2061 7265 3a20 7265 6769 6f6e hich are: region │ │ │ -0002db30: 5f73 697a 6520 616e 6420 7275 6c65 722e _size and ruler. │ │ │ -0002db40: 2049 7420 7072 6561 6c6c 6f63 6174 6520 It preallocate │ │ │ -0002db50: 736f 6d65 2062 7566 6665 7273 2066 6f72 some buffers for │ │ │ -0002db60: 2066 7574 7572 650a 2063 6f6d 7075 7469 future. computi │ │ │ -0002db70: 6e67 2069 7465 7261 7469 6f6e 7320 6f76 ng iterations ov │ │ │ -0002db80: 6572 2074 6865 2067 6976 656e 2069 6d61 er the given ima │ │ │ -0002db90: 6765 2e20 466f 7220 656e 616e 6368 6564 ge. For enanched │ │ │ -0002dba0: 2072 6573 756c 7473 2069 7420 6973 2072 results it is r │ │ │ -0002dbb0: 6563 6f6d 6d65 6e64 6564 2066 6f72 2063 ecommended for c │ │ │ -0002dbc0: 6f6c 6f72 2069 6d61 6765 7320 746f 0a20 olor images to. │ │ │ -0002dbd0: 7072 6570 726f 6365 7373 2069 6d61 6765 preprocess image │ │ │ -0002dbe0: 2077 6974 6820 6c69 7474 6c65 2067 6175 with little gau │ │ │ -0002dbf0: 7373 6961 6e20 626c 7572 2075 7369 6e67 ssian blur using │ │ │ -0002dc00: 2061 2073 6d61 6c6c 2033 2078 2033 206b a small 3 x 3 k │ │ │ -0002dc10: 6572 6e65 6c20 616e 6420 6164 6469 7469 ernel and additi │ │ │ -0002dc20: 6f6e 616c 2063 6f6e 7665 7273 696f 6e20 onal conversion │ │ │ -0002dc30: 696e 746f 0a20 4369 654c 4142 2063 6f6c into. CieLAB col │ │ │ -0002dc40: 6f72 2073 7061 6365 2e20 416e 2065 7861 or space. An exa │ │ │ -0002dc50: 6d70 6c65 206f 6620 534c 4943 2076 6572 mple of SLIC ver │ │ │ -0002dc60: 7375 7320 534c 4943 4f20 616e 6420 4d53 sus SLICO and MS │ │ │ -0002dc70: 4c49 4320 6973 2069 6c75 7374 7261 7465 LIC is ilustrate │ │ │ -0002dc80: 6420 696e 2074 6865 2066 6f6c 6c6f 7769 d in the followi │ │ │ -0002dc90: 6e67 2070 6963 7475 7265 2e0a 0a20 215b ng picture... ![ │ │ │ -0002dca0: 696d 6167 655d 2870 6963 732f 7375 7065 image](pics/supe │ │ │ -0002dcb0: 7270 6978 656c 735f 736c 6963 2e70 6e67 rpixels_slic.png │ │ │ -0002dcc0: 293c 2f64 643e 0a3c 6474 3e52 6574 7572 ).
    Retur │ │ │ -0002dcd0: 6e73 3a3c 2f64 743e 0a3c 6464 3e61 7574 ns:
    .
    aut │ │ │ -0002dce0: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ -0002dcf0: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
    .
    . │ │ │ -0002dd00: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e .
  • │ │ │ -0002dd10: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .createSuperpix │ │ │ -0002dd70: 656c 534c 4943 3c2f 6833 3e0a 3c64 6976 elSLIC
  • .
    public static< │ │ │ -0002ddc0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> Superpi │ │ │ -0002de30: 7865 6c53 4c49 433c 2f61 3e3c 2f73 7061 xelSLIC createSuperpi │ │ │ -0002de70: 7865 6c53 4c49 433c 2f73 7061 6e3e 3c77 xelSLIC(Mat │ │ │ -0002dee0: 266e 6273 703b 696d 6167 6529 3c2f 7370  image)
    .
    Ini │ │ │ -0002df10: 7469 616c 697a 6520 6120 5375 7065 7270 tialize a Superp │ │ │ -0002df20: 6978 656c 534c 4943 206f 626a 6563 743c ixelSLIC object< │ │ │ -0002df30: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ -0002df50: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .image - Image to │ │ │ -0002df80: 7365 676d 656e 740a 2053 4c49 4320 7365 segment. SLIC se │ │ │ -0002df90: 676d 656e 7473 2069 6d61 6765 2075 7369 gments image usi │ │ │ -0002dfa0: 6e67 2061 2064 6573 6972 6564 2072 6567 ng a desired reg │ │ │ -0002dfb0: 696f 6e5f 7369 7a65 2c20 616e 6420 696e ion_size, and in │ │ │ -0002dfc0: 2061 6464 6974 696f 6e20 534c 4943 4f20 addition SLICO │ │ │ -0002dfd0: 7769 6c6c 206f 7074 696d 697a 6520 7573 will optimize us │ │ │ -0002dfe0: 696e 6720 6164 6170 7469 7665 2063 6f6d ing adaptive com │ │ │ -0002dff0: 7061 6374 6e65 7373 2066 6163 746f 722c pactness factor, │ │ │ -0002e000: 0a20 7768 696c 6520 4d53 4c49 4320 7769 . while MSLIC wi │ │ │ -0002e010: 6c6c 206f 7074 696d 697a 6520 7573 696e ll optimize usin │ │ │ -0002e020: 6720 6d61 6e69 666f 6c64 206d 6574 686f g manifold metho │ │ │ -0002e030: 6473 2072 6573 756c 7469 6e67 2069 6e20 ds resulting in │ │ │ -0002e040: 6d6f 7265 2063 6f6e 7465 6e74 2d73 656e more content-sen │ │ │ -0002e050: 7369 7469 7665 2073 7570 6572 7069 7865 sitive superpixe │ │ │ -0002e060: 6c73 2e0a 0a20 5468 6520 6675 6e63 7469 ls... The functi │ │ │ -0002e070: 6f6e 2069 6e69 7469 616c 697a 6573 2061 on initializes a │ │ │ -0002e080: 2053 7570 6572 7069 7865 6c53 4c49 4320 SuperpixelSLIC │ │ │ -0002e090: 6f62 6a65 6374 2066 6f72 2074 6865 2069 object for the i │ │ │ -0002e0a0: 6e70 7574 2069 6d61 6765 2e20 4974 2073 nput image. It s │ │ │ -0002e0b0: 6574 7320 7468 6520 7061 7261 6d65 7465 ets the paramete │ │ │ -0002e0c0: 7273 206f 6620 6368 6f6f 7365 640a 2073 rs of choosed. s │ │ │ -0002e0d0: 7570 6572 7069 7865 6c20 616c 676f 7269 uperpixel algori │ │ │ -0002e0e0: 7468 6d2c 2077 6869 6368 2061 7265 3a20 thm, which are: │ │ │ -0002e0f0: 7265 6769 6f6e 5f73 697a 6520 616e 6420 region_size and │ │ │ -0002e100: 7275 6c65 722e 2049 7420 7072 6561 6c6c ruler. It preall │ │ │ -0002e110: 6f63 6174 6520 736f 6d65 2062 7566 6665 ocate some buffe │ │ │ -0002e120: 7273 2066 6f72 2066 7574 7572 650a 2063 rs for future. c │ │ │ -0002e130: 6f6d 7075 7469 6e67 2069 7465 7261 7469 omputing iterati │ │ │ -0002e140: 6f6e 7320 6f76 6572 2074 6865 2067 6976 ons over the giv │ │ │ -0002e150: 656e 2069 6d61 6765 2e20 466f 7220 656e en image. For en │ │ │ -0002e160: 616e 6368 6564 2072 6573 756c 7473 2069 anched results i │ │ │ -0002e170: 7420 6973 2072 6563 6f6d 6d65 6e64 6564 t is recommended │ │ │ -0002e180: 2066 6f72 2063 6f6c 6f72 2069 6d61 6765 for color image │ │ │ -0002e190: 7320 746f 0a20 7072 6570 726f 6365 7373 s to. preprocess │ │ │ -0002e1a0: 2069 6d61 6765 2077 6974 6820 6c69 7474 image with litt │ │ │ -0002e1b0: 6c65 2067 6175 7373 6961 6e20 626c 7572 le gaussian blur │ │ │ -0002e1c0: 2075 7369 6e67 2061 2073 6d61 6c6c 2033 using a small 3 │ │ │ -0002e1d0: 2078 2033 206b 6572 6e65 6c20 616e 6420 x 3 kernel and │ │ │ -0002e1e0: 6164 6469 7469 6f6e 616c 2063 6f6e 7665 additional conve │ │ │ -0002e1f0: 7273 696f 6e20 696e 746f 0a20 4369 654c rsion into. CieL │ │ │ -0002e200: 4142 2063 6f6c 6f72 2073 7061 6365 2e20 AB color space. │ │ │ -0002e210: 416e 2065 7861 6d70 6c65 206f 6620 534c An example of SL │ │ │ -0002e220: 4943 2076 6572 7375 7320 534c 4943 4f20 IC versus SLICO │ │ │ -0002e230: 616e 6420 4d53 4c49 4320 6973 2069 6c75 and MSLIC is ilu │ │ │ -0002e240: 7374 7261 7465 6420 696e 2074 6865 2066 strated in the f │ │ │ -0002e250: 6f6c 6c6f 7769 6e67 2070 6963 7475 7265 ollowing picture │ │ │ -0002e260: 2e0a 0a20 215b 696d 6167 655d 2870 6963 ... ![image](pic │ │ │ -0002e270: 732f 7375 7065 7270 6978 656c 735f 736c s/superpixels_sl │ │ │ -0002e280: 6963 2e70 6e67 293c 2f64 643e 0a3c 6474 ic.png).
    Returns:
    .< │ │ │ -0002e2a0: 6464 3e61 7574 6f6d 6174 6963 616c 6c79 dd>automatically │ │ │ -0002e2b0: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated. │ │ │ -0002e2c0: 3c2f 646c 3e0a 3c2f 7365 6374 696f 6e3e
    . │ │ │ -0002e2d0: 0a3c 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 .
  • .
  • ..

    createGr │ │ │ -0002e330: 6170 6853 6567 6d65 6e74 6174 696f 6e3c aphSegmentation< │ │ │ -0002e340: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ -0002e380: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ -0002e390: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;< │ │ │ -0002e3b0: 6120 6872 6566 3d22 4772 6170 6853 6567 a href="GraphSeg │ │ │ -0002e3c0: 6d65 6e74 6174 696f 6e2e 6874 6d6c 2220 mentation.html" │ │ │ -0002e3d0: 7469 746c 653d 2263 6c61 7373 2069 6e20 title="class in │ │ │ -0002e3e0: 6f72 672e 6f70 656e 6376 2e78 696d 6770 org.opencv.ximgp │ │ │ -0002e3f0: 726f 6322 3e47 7261 7068 5365 676d 656e roc">GraphSegmen │ │ │ -0002e400: 7461 7469 6f6e 3c2f 613e 3c2f 7370 616e tation createGraphSeg │ │ │ -0002e440: 6d65 6e74 6174 696f 6e3c 2f73 7061 6e3e mentation │ │ │ -0002e450: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (d │ │ │ -0002e470: 6f75 626c 6526 6e62 7370 3b73 6967 6d61 ouble sigma │ │ │ -0002e480: 2c0a 2066 6c6f 6174 266e 6273 703b 6b2c ,. float k, │ │ │ -0002e490: 0a20 696e 7426 6e62 7370 3b6d 696e 5f73 . int min_s │ │ │ -0002e4a0: 697a 6529 3c2f 7370 616e 3e3c 2f64 6976 ize)
    .
    Creates a g │ │ │ -0002e4d0: 7261 7068 2062 6173 6564 2073 6567 6d65 raph based segme │ │ │ -0002e4e0: 6e74 6f72 3c2f 6469 763e 0a3c 646c 2063 ntor
    .
    .Parameters:.
    sig │ │ │ -0002e520: 6d61 3c2f 636f 6465 3e20 2d20 5468 6520 ma - The │ │ │ -0002e530: 7369 676d 6120 7061 7261 6d65 7465 722c sigma parameter, │ │ │ -0002e540: 2075 7365 6420 746f 2073 6d6f 6f74 6820 used to smooth │ │ │ -0002e550: 696d 6167 653c 2f64 643e 0a3c 6464 3e3c image
    .
    < │ │ │ -0002e560: 636f 6465 3e6b 3c2f 636f 6465 3e20 2d20 code>k - │ │ │ -0002e570: 5468 6520 6b20 7061 7261 6d65 7465 7220 The k parameter │ │ │ -0002e580: 6f66 2074 6865 2061 6c67 6f72 7974 686d of the algorythm │ │ │ -0002e590: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -0002e5a0: 6d69 6e5f 7369 7a65 3c2f 636f 6465 3e20 min_size │ │ │ -0002e5b0: 2d20 5468 6520 6d69 6e69 6d75 6d20 7369 - The minimum si │ │ │ -0002e5c0: 7a65 206f 6620 7365 676d 656e 7473 3c2f ze of segments.
    Returns: │ │ │ -0002e5e0: 3c2f 6474 3e0a 3c64 643e 6175 746f 6d61
    .
    automa │ │ │ -0002e5f0: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -0002e600: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
    .
    .
    .

  • ..
    .

    creat │ │ │ -0002e670: 6547 7261 7068 5365 676d 656e 7461 7469 eGraphSegmentati │ │ │ -0002e680: 6f6e 3c2f 6833 3e0a 3c64 6976 2063 6c61 on

    .
    pu │ │ │ -0002e6c0: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static GraphSeg │ │ │ -0002e740: 6d65 6e74 6174 696f 6e3c 2f61 3e3c 2f73 mentation createGraph │ │ │ -0002e780: 5365 676d 656e 7461 7469 6f6e 3c2f 7370 Segmentation(double si │ │ │ -0002e7c0: 676d 612c 0a20 666c 6f61 7426 6e62 7370 gma,. float  │ │ │ -0002e7d0: 3b6b 293c 2f73 7061 6e3e 3c2f 6469 763e ;k)
    │ │ │ -0002e7e0: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
    Creates a gr │ │ │ -0002e800: 6170 6820 6261 7365 6420 7365 676d 656e aph based segmen │ │ │ -0002e810: 746f 723c 2f64 6976 3e0a 3c64 6c20 636c tor
    .
    .
    Parameters:
    .
    sigm │ │ │ -0002e850: 613c 2f63 6f64 653e 202d 2054 6865 2073 a - The s │ │ │ -0002e860: 6967 6d61 2070 6172 616d 6574 6572 2c20 igma parameter, │ │ │ -0002e870: 7573 6564 2074 6f20 736d 6f6f 7468 2069 used to smooth i │ │ │ -0002e880: 6d61 6765 3c2f 6464 3e0a 3c64 643e 3c63 mage
    .
    k - T │ │ │ -0002e8a0: 6865 206b 2070 6172 616d 6574 6572 206f he k parameter o │ │ │ -0002e8b0: 6620 7468 6520 616c 676f 7279 7468 6d3c f the algorythm< │ │ │ -0002e8c0: 2f64 643e 0a3c 6474 3e52 6574 7572 6e73 /dd>.
    Returns │ │ │ -0002e8d0: 3a3c 2f64 743e 0a3c 6464 3e61 7574 6f6d :
    .
    autom │ │ │ -0002e8e0: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -0002e8f0: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
    .
    ...< │ │ │ -0002e910: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    createGrap │ │ │ -0002e960: 6853 6567 6d65 6e74 6174 696f 6e3c 2f68 hSegmentation.
    public │ │ │ -0002e9b0: 7374 6174 6963 3c2f 7370 616e 3e26 6e62 static&nb │ │ │ -0002e9c0: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;GraphSegmenta │ │ │ -0002ea30: 7469 6f6e 3c2f 613e 3c2f 7370 616e 3e26 tion& │ │ │ -0002ea40: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ -0002ea60: 6372 6561 7465 4772 6170 6853 6567 6d65 createGraphSegme │ │ │ -0002ea70: 6e74 6174 696f 6e3c 2f73 7061 6e3e 3c77 ntation(dou │ │ │ -0002eaa0: 626c 6526 6e62 7370 3b73 6967 6d61 293c ble sigma)< │ │ │ -0002eab0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ -0002ead0: 4372 6561 7465 7320 6120 6772 6170 6820 Creates a graph │ │ │ -0002eae0: 6261 7365 6420 7365 676d 656e 746f 723c based segmentor< │ │ │ -0002eaf0: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ -0002eb10: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .sigma - The sigma │ │ │ -0002eb40: 2070 6172 616d 6574 6572 2c20 7573 6564 parameter, used │ │ │ -0002eb50: 2074 6f20 736d 6f6f 7468 2069 6d61 6765 to smooth image │ │ │ -0002eb60: 3c2f 6464 3e0a 3c64 743e 5265 7475 726e .
    Return │ │ │ -0002eb70: 733a 3c2f 6474 3e0a 3c64 643e 6175 746f s:
    .
    auto │ │ │ -0002eb80: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ -0002eb90: 7465 643c 2f64 643e 0a3c 2f64 6c3e 0a3c ted
    .
    .< │ │ │ -0002eba0: 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 3e0a /section>.. │ │ │ -0002ebb0: 3c6c 693e 0a3c 7365 6374 696f 6e20 636c
  • .
    .

    createGraphSegm │ │ │ -0002ec00: 656e 7461 7469 6f6e 3c2f 6833 3e0a 3c64 entation

    .public stati │ │ │ -0002ec50: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c Gr │ │ │ -0002ecc0: 6170 6853 6567 6d65 6e74 6174 696f 6e3c aphSegmentation< │ │ │ -0002ecd0: 2f61 3e3c 2f73 7061 6e3e 266e 6273 703b /a>  │ │ │ -0002ece0: 3c73 7061 6e20 636c 6173 733d 2265 6c65 creat │ │ │ -0002ed00: 6547 7261 7068 5365 676d 656e 7461 7469 eGraphSegmentati │ │ │ -0002ed10: 6f6e 3c2f 7370 616e 3e28 293c 2f64 6976 on().
    Creates a g │ │ │ -0002ed40: 7261 7068 2062 6173 6564 2073 6567 6d65 raph based segme │ │ │ -0002ed50: 6e74 6f72 3c2f 6469 763e 0a3c 646c 2063 ntor
    .
    .Returns:. │ │ │ -0002ed80: 3c64 643e 6175 746f 6d61 7469 6361 6c6c
    automaticall │ │ │ -0002ed90: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ -0002eda0: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
    .
    .
  • .
  • ..

    │ │ │ -0002ee10: 6372 6561 7465 5365 6c65 6374 6976 6553 createSelectiveS │ │ │ -0002ee20: 6561 7263 6853 6567 6d65 6e74 6174 696f earchSegmentatio │ │ │ -0002ee30: 6e53 7472 6174 6567 7943 6f6c 6f72 3c2f nStrategyColor.
    public │ │ │ -0002ee80: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ -0002ee90: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;Selec │ │ │ -0002ef10: 7469 7665 5365 6172 6368 5365 676d 656e tiveSearchSegmen │ │ │ -0002ef20: 7461 7469 6f6e 5374 7261 7465 6779 436f tationStrategyCo │ │ │ -0002ef30: 6c6f 723c 2f61 3e3c 2f73 7061 6e3e 266e lor&n │ │ │ -0002ef40: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;c │ │ │ -0002ef60: 7265 6174 6553 656c 6563 7469 7665 5365 reateSelectiveSe │ │ │ -0002ef70: 6172 6368 5365 676d 656e 7461 7469 6f6e archSegmentation │ │ │ -0002ef80: 5374 7261 7465 6779 436f 6c6f 723c 2f73 StrategyColor()
    . │ │ │ -0002efb0: 4372 6561 7465 2061 206e 6577 2063 6f6c Create a new col │ │ │ -0002efc0: 6f72 2d62 6173 6564 2073 7472 6174 6567 or-based strateg │ │ │ -0002efd0: 793c 2f64 6976 3e0a 3c64 6c20 636c 6173 y.
    .
    R │ │ │ -0002eff0: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
    .
    automatically g │ │ │ -0002f010: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ..

  • .< │ │ │ -0002f030: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    crea │ │ │ -0002f090: 7465 5365 6c65 6374 6976 6553 6561 7263 teSelectiveSearc │ │ │ -0002f0a0: 6853 6567 6d65 6e74 6174 696f 6e53 7472 hSegmentationStr │ │ │ -0002f0b0: 6174 6567 7953 697a 653c 2f68 333e 0a3c ategySize

    .< │ │ │ -0002f0c0: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ -0002f0d0: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ -0002f100: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ -0002f110: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ -0002f120: 726e 2d74 7970 6522 3e3c 6120 6872 6566 rn-type">SelectiveSe │ │ │ -0002f190: 6172 6368 5365 676d 656e 7461 7469 6f6e archSegmentation │ │ │ -0002f1a0: 5374 7261 7465 6779 5369 7a65 3c2f 613e StrategySize │ │ │ -0002f1b0: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  createSe │ │ │ -0002f1e0: 6c65 6374 6976 6553 6561 7263 6853 6567 lectiveSearchSeg │ │ │ -0002f1f0: 6d65 6e74 6174 696f 6e53 7472 6174 6567 mentationStrateg │ │ │ -0002f200: 7953 697a 653c 2f73 7061 6e3e 2829 3c2f ySize().
    Create a │ │ │ -0002f230: 206e 6577 2073 697a 652d 6261 7365 6420 new size-based │ │ │ -0002f240: 7374 7261 7465 6779 3c2f 6469 763e 0a3c strategy
    .< │ │ │ -0002f250: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ -0002f260: 3e0a 3c64 743e 5265 7475 726e 733a 3c2f >.
    Returns:.
    automati │ │ │ -0002f280: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -0002f290: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>...
  • .
  • │ │ │ -0002f2b0: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    .

    createSele │ │ │ -0002f310: 6374 6976 6553 6561 7263 6853 6567 6d65 ctiveSearchSegme │ │ │ -0002f320: 6e74 6174 696f 6e53 7472 6174 6567 7954 ntationStrategyT │ │ │ -0002f330: 6578 7475 7265 3c2f 6833 3e0a 3c64 6976 exture

    ..
    Cr │ │ │ -0002f4b0: 6561 7465 2061 206e 6577 2073 697a 652d eate a new size- │ │ │ -0002f4c0: 6261 7365 6420 7374 7261 7465 6779 3c2f based strategy.
    .
    Retu │ │ │ -0002f4f0: 726e 733a 3c2f 6474 3e0a 3c64 643e 6175 rns:
    .
    au │ │ │ -0002f500: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -0002f510: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
    .
    │ │ │ -0002f520: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .
    .
  • .
  • .
    .

    createS │ │ │ -0002f590: 656c 6563 7469 7665 5365 6172 6368 5365 electiveSearchSe │ │ │ -0002f5a0: 676d 656e 7461 7469 6f6e 5374 7261 7465 gmentationStrate │ │ │ -0002f5b0: 6779 4669 6c6c 3c2f 6833 3e0a 3c64 6976 gyFill

    .
    public static< │ │ │ -0002f600: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> SelectiveSearc │ │ │ -0002f690: 6853 6567 6d65 6e74 6174 696f 6e53 7472 hSegmentationStr │ │ │ -0002f6a0: 6174 6567 7946 696c 6c3c 2f61 3e3c 2f73 ategyFill createSelec │ │ │ -0002f6e0: 7469 7665 5365 6172 6368 5365 676d 656e tiveSearchSegmen │ │ │ -0002f6f0: 7461 7469 6f6e 5374 7261 7465 6779 4669 tationStrategyFi │ │ │ -0002f700: 6c6c 3c2f 7370 616e 3e28 293c 2f64 6976 ll()
    .
    Create a ne │ │ │ -0002f730: 7720 6669 6c6c 2d62 6173 6564 2073 7472 w fill-based str │ │ │ -0002f740: 6174 6567 793c 2f64 6976 3e0a 3c64 6c20 ategy
    .
    .< │ │ │ -0002f760: 6474 3e52 6574 7572 6e73 3a3c 2f64 743e dt>Returns: │ │ │ -0002f770: 0a3c 6464 3e61 7574 6f6d 6174 6963 616c .
    automatical │ │ │ -0002f780: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
    .
    ..
  • .
  • .. │ │ │ -0002f800: 3c68 333e 6372 6561 7465 5365 6c65 6374

    createSelect │ │ │ -0002f810: 6976 6553 6561 7263 6853 6567 6d65 6e74 iveSearchSegment │ │ │ -0002f820: 6174 696f 6e53 7472 6174 6567 794d 756c ationStrategyMul │ │ │ -0002f830: 7469 706c 653c 2f68 333e 0a3c 6469 7620 tiple

    .
    public static SelectiveSe │ │ │ -0002f910: 6172 6368 5365 676d 656e 7461 7469 6f6e archSegmentation │ │ │ -0002f920: 5374 7261 7465 6779 4d75 6c74 6970 6c65 StrategyMultiple │ │ │ -0002f930: 3c2f 613e 3c2f 7370 616e 3e26 6e62 7370   │ │ │ -0002f940: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;crea │ │ │ -0002f960: 7465 5365 6c65 6374 6976 6553 6561 7263 teSelectiveSearc │ │ │ -0002f970: 6853 6567 6d65 6e74 6174 696f 6e53 7472 hSegmentationStr │ │ │ -0002f980: 6174 6567 794d 756c 7469 706c 653c 2f73 ategyMultiple()
    . │ │ │ -0002f9b0: 4372 6561 7465 2061 206e 6577 206d 756c Create a new mul │ │ │ -0002f9c0: 7469 706c 6520 7374 7261 7465 6779 3c2f tiple strategy.
    .
    Retu │ │ │ -0002f9f0: 726e 733a 3c2f 6474 3e0a 3c64 643e 6175 rns:
    .
    au │ │ │ -0002fa00: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -0002fa10: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
    .
    │ │ │ -0002fa20: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .
  • ..
  • .
    . │ │ │ -0002fac0: 3c68 333e 6372 6561 7465 5365 6c65 6374

    createSelect │ │ │ -0002fad0: 6976 6553 6561 7263 6853 6567 6d65 6e74 iveSearchSegment │ │ │ -0002fae0: 6174 696f 6e53 7472 6174 6567 794d 756c ationStrategyMul │ │ │ -0002faf0: 7469 706c 653c 2f68 333e 0a3c 6469 7620 tiple

    .
    public static SelectiveSe │ │ │ -0002fbd0: 6172 6368 5365 676d 656e 7461 7469 6f6e archSegmentation │ │ │ -0002fbe0: 5374 7261 7465 6779 4d75 6c74 6970 6c65 StrategyMultiple │ │ │ -0002fbf0: 3c2f 613e 3c2f 7370 616e 3e26 6e62 7370   │ │ │ -0002fc00: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;crea │ │ │ -0002fc20: 7465 5365 6c65 6374 6976 6553 6561 7263 teSelectiveSearc │ │ │ -0002fc30: 6853 6567 6d65 6e74 6174 696f 6e53 7472 hSegmentationStr │ │ │ -0002fc40: 6174 6567 794d 756c 7469 706c 653c 2f73 ategyMultiple(Selec │ │ │ -0002fcd0: 7469 7665 5365 6172 6368 5365 676d 656e tiveSearchSegmen │ │ │ -0002fce0: 7461 7469 6f6e 5374 7261 7465 6779 3c2f tationStrategy s1)
    .
    Crea │ │ │ -0002fd20: 7465 2061 206e 6577 206d 756c 7469 706c te a new multipl │ │ │ -0002fd30: 6520 7374 7261 7465 6779 2061 6e64 2073 e strategy and s │ │ │ -0002fd40: 6574 206f 6e65 2073 7562 7472 6174 6567 et one subtrateg │ │ │ -0002fd50: 793c 2f64 6976 3e0a 3c64 6c20 636c 6173 y
    .
    .
    P │ │ │ -0002fd70: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ -0002fd80: 3c64 643e 3c63 6f64 653e 7331 3c2f 636f
    s1 - The first │ │ │ -0002fda0: 7374 7261 7465 6779 3c2f 6464 3e0a 3c64 strategy
    .Returns:. │ │ │ -0002fdc0: 3c64 643e 6175 746f 6d61 7469 6361 6c6c
    automaticall │ │ │ -0002fdd0: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ -0002fde0: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
    .
    .
  • .
  • ..createSelectiv │ │ │ -0002fed0: 6553 6561 7263 6853 6567 6d65 6e74 6174 eSearchSegmentat │ │ │ -0002fee0: 696f 6e53 7472 6174 6567 794d 756c 7469 ionStrategyMulti │ │ │ -0002fef0: 706c 653c 2f68 333e 0a3c 6469 7620 636c ple.
    p │ │ │ -0002ff30: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static SelectiveSear │ │ │ -0002ffd0: 6368 5365 676d 656e 7461 7469 6f6e 5374 chSegmentationSt │ │ │ -0002ffe0: 7261 7465 6779 4d75 6c74 6970 6c65 3c2f rategyMultiple < │ │ │ -00030000: 7370 616e 2063 6c61 7373 3d22 656c 656d span class="elem │ │ │ -00030010: 656e 742d 6e61 6d65 223e 6372 6561 7465 ent-name">create │ │ │ -00030020: 5365 6c65 6374 6976 6553 6561 7263 6853 SelectiveSearchS │ │ │ -00030030: 6567 6d65 6e74 6174 696f 6e53 7472 6174 egmentationStrat │ │ │ -00030040: 6567 794d 756c 7469 706c 653c 2f73 7061 egyMultiple │ │ │ -00030070: 283c 6120 6872 6566 3d22 5365 6c65 6374 (Selecti │ │ │ -000300d0: 7665 5365 6172 6368 5365 676d 656e 7461 veSearchSegmenta │ │ │ -000300e0: 7469 6f6e 5374 7261 7465 6779 3c2f 613e tionStrategy │ │ │ -000300f0: 266e 6273 703b 7331 2c0a 203c 6120 6872  s1,. SelectiveSear │ │ │ -00030160: 6368 5365 676d 656e 7461 7469 6f6e 5374 chSegmentationSt │ │ │ -00030170: 7261 7465 6779 3c2f 613e 266e 6273 703b rategy  │ │ │ -00030180: 7332 293c 2f73 7061 6e3e 3c2f 6469 763e s2)
    │ │ │ -00030190: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
    Create a new │ │ │ -000301b0: 206d 756c 7469 706c 6520 7374 7261 7465 multiple strate │ │ │ -000301c0: 6779 2061 6e64 2073 6574 2074 776f 2073 gy and set two s │ │ │ -000301d0: 7562 7472 6174 6567 6965 732c 2077 6974 ubtrategies, wit │ │ │ -000301e0: 6820 6571 7561 6c20 7765 6967 6874 733c h equal weights< │ │ │ -000301f0: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ -00030210: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .s1 - The first st │ │ │ -00030240: 7261 7465 6779 3c2f 6464 3e0a 3c64 643e rategy.
    │ │ │ -00030250: 3c63 6f64 653e 7332 3c2f 636f 6465 3e20 s2 │ │ │ -00030260: 2d20 5468 6520 7365 636f 6e64 2073 7472 - The second str │ │ │ -00030270: 6174 6567 793c 2f64 643e 0a3c 6474 3e52 ategy
    .
    R │ │ │ -00030280: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
    .
    automatically g │ │ │ -000302a0: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ...< │ │ │ -000302c0: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    createSel │ │ │ -000303d0: 6563 7469 7665 5365 6172 6368 5365 676d ectiveSearchSegm │ │ │ -000303e0: 656e 7461 7469 6f6e 5374 7261 7465 6779 entationStrategy │ │ │ -000303f0: 4d75 6c74 6970 6c65 3c2f 6833 3e0a 3c64 Multiple

    .public stati │ │ │ -00030440: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c Selectiv │ │ │ -000304d0: 6553 6561 7263 6853 6567 6d65 6e74 6174 eSearchSegmentat │ │ │ -000304e0: 696f 6e53 7472 6174 6567 794d 756c 7469 ionStrategyMulti │ │ │ -000304f0: 706c 653c 2f61 3e3c 2f73 7061 6e3e 266e ple&n │ │ │ -00030500: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;c │ │ │ -00030520: 7265 6174 6553 656c 6563 7469 7665 5365 reateSelectiveSe │ │ │ -00030530: 6172 6368 5365 676d 656e 7461 7469 6f6e archSegmentation │ │ │ -00030540: 5374 7261 7465 6779 4d75 6c74 6970 6c65 StrategyMultiple │ │ │ -00030550: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (Se │ │ │ -000305d0: 6c65 6374 6976 6553 6561 7263 6853 6567 lectiveSearchSeg │ │ │ -000305e0: 6d65 6e74 6174 696f 6e53 7472 6174 6567 mentationStrateg │ │ │ -000305f0: 793c 2f61 3e26 6e62 7370 3b73 312c 0a20 y s1,. │ │ │ -00030600: 3c61 2068 7265 663d 2253 656c 6563 7469 Selectiv │ │ │ -00030660: 6553 6561 7263 6853 6567 6d65 6e74 6174 eSearchSegmentat │ │ │ -00030670: 696f 6e53 7472 6174 6567 793c 2f61 3e26 ionStrategy& │ │ │ -00030680: 6e62 7370 3b73 322c 0a20 3c61 2068 7265 nbsp;s2,. SelectiveSearc │ │ │ -000306f0: 6853 6567 6d65 6e74 6174 696f 6e53 7472 hSegmentationStr │ │ │ -00030700: 6174 6567 793c 2f61 3e26 6e62 7370 3b73 ategy s │ │ │ -00030710: 3329 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3)
  • . │ │ │ -00030720: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
    Create a new │ │ │ -00030740: 6d75 6c74 6970 6c65 2073 7472 6174 6567 multiple strateg │ │ │ -00030750: 7920 616e 6420 7365 7420 7468 7265 6520 y and set three │ │ │ -00030760: 7375 6274 7261 7465 6769 6573 2c20 7769 subtrategies, wi │ │ │ -00030770: 7468 2065 7175 616c 2077 6569 6768 7473 th equal weights │ │ │ -00030780: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ -000307a0: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ -000307b0: 6464 3e3c 636f 6465 3e73 313c 2f63 6f64 dd>s1 - The first s │ │ │ -000307d0: 7472 6174 6567 793c 2f64 643e 0a3c 6464 trategy.
    s2 │ │ │ -000307f0: 202d 2054 6865 2073 6563 6f6e 6420 7374 - The second st │ │ │ -00030800: 7261 7465 6779 3c2f 6464 3e0a 3c64 643e rategy
    .
    │ │ │ -00030810: 3c63 6f64 653e 7333 3c2f 636f 6465 3e20 s3 │ │ │ -00030820: 2d20 5468 6520 7468 6972 6420 7374 7261 - The third stra │ │ │ -00030830: 7465 6779 3c2f 6464 3e0a 3c64 743e 5265 tegy
    .
    Re │ │ │ -00030840: 7475 726e 733a 3c2f 6474 3e0a 3c64 643e turns:
    .
    │ │ │ -00030850: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ -00030860: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
    ....
  • ..

    cr │ │ │ -000309c0: 6561 7465 5365 6c65 6374 6976 6553 6561 eateSelectiveSea │ │ │ -000309d0: 7263 6853 6567 6d65 6e74 6174 696f 6e53 rchSegmentationS │ │ │ -000309e0: 7472 6174 6567 794d 756c 7469 706c 653c trategyMultiple< │ │ │ -000309f0: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ -00030a30: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ -00030a40: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;< │ │ │ -00030a60: 6120 6872 6566 3d22 5365 6c65 6374 6976 a href="Selectiv │ │ │ -00030a70: 6553 6561 7263 6853 6567 6d65 6e74 6174 eSearchSegmentat │ │ │ -00030a80: 696f 6e53 7472 6174 6567 794d 756c 7469 ionStrategyMulti │ │ │ -00030a90: 706c 652e 6874 6d6c 2220 7469 746c 653d ple.html" title= │ │ │ -00030aa0: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -00030ab0: 656e 6376 2e78 696d 6770 726f 6322 3e53 encv.ximgproc">S │ │ │ -00030ac0: 656c 6563 7469 7665 5365 6172 6368 5365 electiveSearchSe │ │ │ -00030ad0: 676d 656e 7461 7469 6f6e 5374 7261 7465 gmentationStrate │ │ │ -00030ae0: 6779 4d75 6c74 6970 6c65 3c2f 613e 3c2f gyMultiple createSele │ │ │ -00030b20: 6374 6976 6553 6561 7263 6853 6567 6d65 ctiveSearchSegme │ │ │ -00030b30: 6e74 6174 696f 6e53 7472 6174 6567 794d ntationStrategyM │ │ │ -00030b40: 756c 7469 706c 653c 2f73 7061 6e3e 3c77 ultiple(SelectiveSe │ │ │ -00030bd0: 6172 6368 5365 676d 656e 7461 7469 6f6e archSegmentation │ │ │ -00030be0: 5374 7261 7465 6779 3c2f 613e 266e 6273 Strategy&nbs │ │ │ -00030bf0: 703b 7331 2c0a 203c 6120 6872 6566 3d22 p;s1,. S │ │ │ -00030c50: 656c 6563 7469 7665 5365 6172 6368 5365 electiveSearchSe │ │ │ -00030c60: 676d 656e 7461 7469 6f6e 5374 7261 7465 gmentationStrate │ │ │ -00030c70: 6779 3c2f 613e 266e 6273 703b 7332 2c0a gy s2,. │ │ │ -00030c80: 203c 6120 6872 6566 3d22 5365 6c65 6374 Selecti │ │ │ -00030ce0: 7665 5365 6172 6368 5365 676d 656e 7461 veSearchSegmenta │ │ │ -00030cf0: 7469 6f6e 5374 7261 7465 6779 3c2f 613e tionStrategy │ │ │ -00030d00: 266e 6273 703b 7333 2c0a 203c 6120 6872  s3,. SelectiveSear │ │ │ -00030d70: 6368 5365 676d 656e 7461 7469 6f6e 5374 chSegmentationSt │ │ │ -00030d80: 7261 7465 6779 3c2f 613e 266e 6273 703b rategy  │ │ │ -00030d90: 7334 293c 2f73 7061 6e3e 3c2f 6469 763e s4)
    │ │ │ -00030da0: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
    Create a new │ │ │ -00030dc0: 206d 756c 7469 706c 6520 7374 7261 7465 multiple strate │ │ │ -00030dd0: 6779 2061 6e64 2073 6574 2066 6f75 7220 gy and set four │ │ │ -00030de0: 7375 6274 7261 7465 6769 6573 2c20 7769 subtrategies, wi │ │ │ -00030df0: 7468 2065 7175 616c 2077 6569 6768 7473 th equal weights │ │ │ -00030e00: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ -00030e20: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ -00030e30: 6464 3e3c 636f 6465 3e73 313c 2f63 6f64 dd>s1 - The first s │ │ │ -00030e50: 7472 6174 6567 793c 2f64 643e 0a3c 6464 trategy.
    s2 │ │ │ -00030e70: 202d 2054 6865 2073 6563 6f6e 6420 7374 - The second st │ │ │ -00030e80: 7261 7465 6779 3c2f 6464 3e0a 3c64 643e rategy
    .
    │ │ │ -00030e90: 3c63 6f64 653e 7333 3c2f 636f 6465 3e20 s3 │ │ │ -00030ea0: 2d20 5468 6520 7468 6972 6420 7374 7261 - The third stra │ │ │ -00030eb0: 7465 6779 3c2f 6464 3e0a 3c64 643e 3c63 tegy
    .
    s4 - │ │ │ -00030ed0: 5468 6520 666f 7274 6820 7374 7261 7465 The forth strate │ │ │ -00030ee0: 6779 3c2f 6464 3e0a 3c64 743e 5265 7475 gy
    .
    Retu │ │ │ -00030ef0: 726e 733a 3c2f 6474 3e0a 3c64 643e 6175 rns:
    .
    au │ │ │ -00030f00: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -00030f10: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
    .
    │ │ │ -00030f20: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 ..

  • .
  • .
    .

    cre │ │ │ -00030f80: 6174 6553 656c 6563 7469 7665 5365 6172 ateSelectiveSear │ │ │ -00030f90: 6368 5365 676d 656e 7461 7469 6f6e 3c2f chSegmentation.
    public │ │ │ -00030fe0: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ -00030ff0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;Se │ │ │ -00031060: 6c65 6374 6976 6553 6561 7263 6853 6567 lectiveSearchSeg │ │ │ -00031070: 6d65 6e74 6174 696f 6e3c 2f61 3e3c 2f73 mentation createSelec │ │ │ -000310b0: 7469 7665 5365 6172 6368 5365 676d 656e tiveSearchSegmen │ │ │ -000310c0: 7461 7469 6f6e 3c2f 7370 616e 3e28 293c tation()< │ │ │ -000310d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Create │ │ │ -000310f0: 6120 6e65 7720 5365 6c65 6374 6976 6553 a new SelectiveS │ │ │ -00031100: 6561 7263 6853 6567 6d65 6e74 6174 696f earchSegmentatio │ │ │ -00031110: 6e20 636c 6173 732e 3c2f 6469 763e 0a3c n class.
    .< │ │ │ -00031120: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ -00031130: 3e0a 3c64 743e 5265 7475 726e 733a 3c2f >.
    Returns:.
    automati │ │ │ -00031150: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -00031160: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.

  • ..
  • .
  • │ │ │ -00031180: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    .

    cr │ │ │ -000311e0: 6561 7465 5375 7065 7270 6978 656c 5345 eateSuperpixelSE │ │ │ -000311f0: 4544 533c 2f68 333e 0a3c 6469 7620 636c EDS

    .
    p │ │ │ -00031230: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static Superpixe │ │ │ -000312b0: 6c53 4545 4453 3c2f 613e 3c2f 7370 616e lSEEDS createSuperpix │ │ │ -000312f0: 656c 5345 4544 533c 2f73 7061 6e3e 3c77 elSEEDS(int │ │ │ -00031320: 266e 6273 703b 696d 6167 655f 7769 6474  image_widt │ │ │ -00031330: 682c 0a20 696e 7426 6e62 7370 3b69 6d61 h,. int ima │ │ │ -00031340: 6765 5f68 6569 6768 742c 0a20 696e 7426 ge_height,. int& │ │ │ -00031350: 6e62 7370 3b69 6d61 6765 5f63 6861 6e6e nbsp;image_chann │ │ │ -00031360: 656c 732c 0a20 696e 7426 6e62 7370 3b6e els,. int n │ │ │ -00031370: 756d 5f73 7570 6572 7069 7865 6c73 2c0a um_superpixels,. │ │ │ -00031380: 2069 6e74 266e 6273 703b 6e75 6d5f 6c65 int num_le │ │ │ -00031390: 7665 6c73 2c0a 2069 6e74 266e 6273 703b vels,. int  │ │ │ -000313a0: 7072 696f 722c 0a20 696e 7426 6e62 7370 prior,. int  │ │ │ -000313b0: 3b68 6973 746f 6772 616d 5f62 696e 732c ;histogram_bins, │ │ │ -000313c0: 0a20 626f 6f6c 6561 6e26 6e62 7370 3b64 . boolean d │ │ │ -000313d0: 6f75 626c 655f 7374 6570 293c 2f73 7061 ouble_step)
    .
    Init │ │ │ -00031400: 6961 6c69 7a65 7320 6120 5375 7065 7270 ializes a Superp │ │ │ -00031410: 6978 656c 5345 4544 5320 6f62 6a65 6374 ixelSEEDS object │ │ │ -00031420: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 .
    .
    .
    P │ │ │ -00031440: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ -00031450: 3c64 643e 3c63 6f64 653e 696d 6167 655f
    image_ │ │ │ -00031460: 7769 6474 683c 2f63 6f64 653e 202d 2049 width - I │ │ │ -00031470: 6d61 6765 2077 6964 7468 2e3c 2f64 643e mage width.
    │ │ │ -00031480: 0a3c 6464 3e3c 636f 6465 3e69 6d61 6765 .
    image │ │ │ -00031490: 5f68 6569 6768 743c 2f63 6f64 653e 202d _height - │ │ │ -000314a0: 2049 6d61 6765 2068 6569 6768 742e 3c2f Image height..
    im │ │ │ -000314c0: 6167 655f 6368 616e 6e65 6c73 3c2f 636f age_channels - Number of │ │ │ -000314e0: 6368 616e 6e65 6c73 206f 6620 7468 6520 channels of the │ │ │ -000314f0: 696d 6167 652e 3c2f 6464 3e0a 3c64 643e image.
    .
    │ │ │ -00031500: 3c63 6f64 653e 6e75 6d5f 7375 7065 7270 num_superp │ │ │ -00031510: 6978 656c 733c 2f63 6f64 653e 202d 2044 ixels - D │ │ │ -00031520: 6573 6972 6564 206e 756d 6265 7220 6f66 esired number of │ │ │ -00031530: 2073 7570 6572 7069 7865 6c73 2e20 4e6f superpixels. No │ │ │ -00031540: 7465 2074 6861 7420 7468 6520 6163 7475 te that the actu │ │ │ -00031550: 616c 206e 756d 6265 7220 6d61 7920 6265 al number may be │ │ │ -00031560: 2073 6d61 6c6c 6572 0a20 6475 6520 746f smaller. due to │ │ │ -00031570: 2072 6573 7472 6963 7469 6f6e 7320 2864 restrictions (d │ │ │ -00031580: 6570 656e 6469 6e67 206f 6e20 7468 6520 epending on the │ │ │ -00031590: 696d 6167 6520 7369 7a65 2061 6e64 206e image size and n │ │ │ -000315a0: 756d 5f6c 6576 656c 7329 2e20 5573 6520 um_levels). Use │ │ │ -000315b0: 6765 744e 756d 6265 724f 6653 7570 6572 getNumberOfSuper │ │ │ -000315c0: 7069 7865 6c73 2829 2074 6f0a 2067 6574 pixels() to. get │ │ │ -000315d0: 2074 6865 2061 6374 7561 6c20 6e75 6d62 the actual numb │ │ │ -000315e0: 6572 2e3c 2f64 643e 0a3c 6464 3e3c 636f er.
    .
    num_levels - Number of │ │ │ -00031610: 2062 6c6f 636b 206c 6576 656c 732e 2054 block levels. T │ │ │ -00031620: 6865 206d 6f72 6520 6c65 7665 6c73 2c20 he more levels, │ │ │ -00031630: 7468 6520 6d6f 7265 2061 6363 7572 6174 the more accurat │ │ │ -00031640: 6520 6973 2074 6865 2073 6567 6d65 6e74 e is the segment │ │ │ -00031650: 6174 696f 6e2c 0a20 6275 7420 6e65 6564 ation,. but need │ │ │ -00031660: 7320 6d6f 7265 206d 656d 6f72 7920 616e s more memory an │ │ │ -00031670: 6420 4350 5520 7469 6d65 2e3c 2f64 643e d CPU time.
    │ │ │ -00031680: 0a3c 6464 3e3c 636f 6465 3e70 7269 6f72 .
    prior │ │ │ -00031690: 3c2f 636f 6465 3e20 2d20 656e 6162 6c65 - enable │ │ │ -000316a0: 2033 7833 2073 6861 7065 2073 6d6f 6f74 3x3 shape smoot │ │ │ -000316b0: 6869 6e67 2074 6572 6d20 6966 2026 6774 hing term if > │ │ │ -000316c0: 3b30 2e20 4120 6c61 7267 6572 2076 616c ;0. A larger val │ │ │ -000316d0: 7565 206c 6561 6473 2074 6f20 736d 6f6f ue leads to smoo │ │ │ -000316e0: 7468 6572 2073 6861 7065 732e 2070 7269 ther shapes. pri │ │ │ -000316f0: 6f72 0a20 6d75 7374 2062 6520 696e 2074 or. must be in t │ │ │ -00031700: 6865 2072 616e 6765 205b 302c 2035 5d2e he range [0, 5]. │ │ │ -00031710: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -00031720: 6869 7374 6f67 7261 6d5f 6269 6e73 3c2f histogram_bins - Number o │ │ │ -00031740: 6620 6869 7374 6f67 7261 6d20 6269 6e73 f histogram bins │ │ │ -00031750: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    double_step - If true, i │ │ │ -00031780: 7465 7261 7465 2065 6163 6820 626c 6f63 terate each bloc │ │ │ -00031790: 6b20 6c65 7665 6c20 7477 6963 6520 666f k level twice fo │ │ │ -000317a0: 7220 6869 6768 6572 2061 6363 7572 6163 r higher accurac │ │ │ -000317b0: 792e 0a0a 2054 6865 2066 756e 6374 696f y... The functio │ │ │ -000317c0: 6e20 696e 6974 6961 6c69 7a65 7320 6120 n initializes a │ │ │ -000317d0: 5375 7065 7270 6978 656c 5345 4544 5320 SuperpixelSEEDS │ │ │ -000317e0: 6f62 6a65 6374 2066 6f72 2074 6865 2069 object for the i │ │ │ -000317f0: 6e70 7574 2069 6d61 6765 2e20 4974 2073 nput image. It s │ │ │ -00031800: 746f 7265 7320 7468 6520 7061 7261 6d65 tores the parame │ │ │ -00031810: 7465 7273 206f 660a 2074 6865 2069 6d61 ters of. the ima │ │ │ -00031820: 6765 3a20 696d 6167 655f 7769 6474 682c ge: image_width, │ │ │ -00031830: 2069 6d61 6765 5f68 6569 6768 7420 616e image_height an │ │ │ -00031840: 6420 696d 6167 655f 6368 616e 6e65 6c73 d image_channels │ │ │ -00031850: 2e20 4974 2061 6c73 6f20 7365 7473 2074 . It also sets t │ │ │ -00031860: 6865 2070 6172 616d 6574 6572 7320 6f66 he parameters of │ │ │ -00031870: 2074 6865 2053 4545 4453 0a20 7375 7065 the SEEDS. supe │ │ │ -00031880: 7270 6978 656c 2061 6c67 6f72 6974 686d rpixel algorithm │ │ │ -00031890: 2c20 7768 6963 6820 6172 653a 206e 756d , which are: num │ │ │ -000318a0: 5f73 7570 6572 7069 7865 6c73 2c20 6e75 _superpixels, nu │ │ │ -000318b0: 6d5f 6c65 7665 6c73 2c20 7573 655f 7072 m_levels, use_pr │ │ │ -000318c0: 696f 722c 2068 6973 746f 6772 616d 5f62 ior, histogram_b │ │ │ -000318d0: 696e 7320 616e 640a 2064 6f75 626c 655f ins and. double_ │ │ │ -000318e0: 7374 6570 2e0a 0a20 5468 6520 6e75 6d62 step... The numb │ │ │ -000318f0: 6572 206f 6620 6c65 7665 6c73 2069 6e20 er of levels in │ │ │ -00031900: 6e75 6d5f 6c65 7665 6c73 2064 6566 696e num_levels defin │ │ │ -00031910: 6573 2074 6865 2061 6d6f 756e 7420 6f66 es the amount of │ │ │ -00031920: 2062 6c6f 636b 206c 6576 656c 7320 7468 block levels th │ │ │ -00031930: 6174 2074 6865 2061 6c67 6f72 6974 686d at the algorithm │ │ │ -00031940: 2075 7365 2069 6e20 7468 650a 206f 7074 use in the. opt │ │ │ -00031950: 696d 697a 6174 696f 6e2e 2054 6865 2069 imization. The i │ │ │ -00031960: 6e69 7469 616c 697a 6174 696f 6e20 6973 nitialization is │ │ │ -00031970: 2061 2067 7269 642c 2069 6e20 7768 6963 a grid, in whic │ │ │ -00031980: 6820 7468 6520 7375 7065 7270 6978 656c h the superpixel │ │ │ -00031990: 7320 6172 6520 6571 7561 6c6c 7920 6469 s are equally di │ │ │ -000319a0: 7374 7269 6275 7465 6420 7468 726f 7567 stributed throug │ │ │ -000319b0: 680a 2074 6865 2077 6964 7468 2061 6e64 h. the width and │ │ │ -000319c0: 2074 6865 2068 6569 6768 7420 6f66 2074 the height of t │ │ │ -000319d0: 6865 2069 6d61 6765 2e20 5468 6520 6c61 he image. The la │ │ │ -000319e0: 7267 6572 2062 6c6f 636b 7320 636f 7272 rger blocks corr │ │ │ -000319f0: 6573 706f 6e64 2074 6f20 7468 6520 7375 espond to the su │ │ │ -00031a00: 7065 7270 6978 656c 2073 697a 652c 2061 perpixel size, a │ │ │ -00031a10: 6e64 2074 6865 0a20 6c65 7665 6c73 2077 nd the. levels w │ │ │ -00031a20: 6974 6820 736d 616c 6c65 7220 626c 6f63 ith smaller bloc │ │ │ -00031a30: 6b73 2061 7265 2066 6f72 6d65 6420 6279 ks are formed by │ │ │ -00031a40: 2064 6976 6964 696e 6720 7468 6520 6c61 dividing the la │ │ │ -00031a50: 7267 6572 2062 6c6f 636b 7320 696e 746f rger blocks into │ │ │ -00031a60: 2032 2078 2032 2062 6c6f 636b 7320 6f66 2 x 2 blocks of │ │ │ -00031a70: 2070 6978 656c 732c 0a20 7265 6375 7273 pixels,. recurs │ │ │ -00031a80: 6976 656c 7920 756e 7469 6c20 7468 6520 ively until the │ │ │ -00031a90: 736d 616c 6c65 7220 626c 6f63 6b20 6c65 smaller block le │ │ │ -00031aa0: 7665 6c2e 2041 6e20 6578 616d 706c 6520 vel. An example │ │ │ -00031ab0: 6f66 2069 6e69 7469 616c 697a 6174 696f of initializatio │ │ │ -00031ac0: 6e20 6f66 2034 2062 6c6f 636b 206c 6576 n of 4 block lev │ │ │ -00031ad0: 656c 7320 6973 0a20 696c 6c75 7374 7261 els is. illustra │ │ │ -00031ae0: 7465 6420 696e 2074 6865 2066 6f6c 6c6f ted in the follo │ │ │ -00031af0: 7769 6e67 2066 6967 7572 652e 0a0a 2021 wing figure... ! │ │ │ -00031b00: 5b69 6d61 6765 5d28 7069 6373 2f73 7570 [image](pics/sup │ │ │ -00031b10: 6572 7069 7865 6c73 5f62 6c6f 636b 732e erpixels_blocks. │ │ │ -00031b20: 706e 6729 3c2f 6464 3e0a 3c64 743e 5265 png)
    .
    Re │ │ │ -00031b30: 7475 726e 733a 3c2f 6474 3e0a 3c64 643e turns:
    .
    │ │ │ -00031b40: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ -00031b50: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
    ..
    ..
  • ..

    cr │ │ │ -00031bd0: 6561 7465 5375 7065 7270 6978 656c 5345 eateSuperpixelSE │ │ │ -00031be0: 4544 533c 2f68 333e 0a3c 6469 7620 636c EDS

    .
    p │ │ │ -00031c20: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static Superpixe │ │ │ -00031ca0: 6c53 4545 4453 3c2f 613e 3c2f 7370 616e lSEEDS createSuperpix │ │ │ -00031ce0: 656c 5345 4544 533c 2f73 7061 6e3e 3c77 elSEEDS(int │ │ │ -00031d10: 266e 6273 703b 696d 6167 655f 7769 6474  image_widt │ │ │ -00031d20: 682c 0a20 696e 7426 6e62 7370 3b69 6d61 h,. int ima │ │ │ -00031d30: 6765 5f68 6569 6768 742c 0a20 696e 7426 ge_height,. int& │ │ │ -00031d40: 6e62 7370 3b69 6d61 6765 5f63 6861 6e6e nbsp;image_chann │ │ │ -00031d50: 656c 732c 0a20 696e 7426 6e62 7370 3b6e els,. int n │ │ │ -00031d60: 756d 5f73 7570 6572 7069 7865 6c73 2c0a um_superpixels,. │ │ │ -00031d70: 2069 6e74 266e 6273 703b 6e75 6d5f 6c65 int num_le │ │ │ -00031d80: 7665 6c73 2c0a 2069 6e74 266e 6273 703b vels,. int  │ │ │ -00031d90: 7072 696f 722c 0a20 696e 7426 6e62 7370 prior,. int  │ │ │ -00031da0: 3b68 6973 746f 6772 616d 5f62 696e 7329 ;histogram_bins) │ │ │ -00031db0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .Initializes a S │ │ │ -00031de0: 7570 6572 7069 7865 6c53 4545 4453 206f uperpixelSEEDS o │ │ │ -00031df0: 626a 6563 742e 3c2f 6469 763e 0a3c 646c bject..
    . │ │ │ -00031e10: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
    Parameters:< │ │ │ -00031e20: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e69 /dt>.
    i │ │ │ -00031e30: 6d61 6765 5f77 6964 7468 3c2f 636f 6465 mage_width - Image width. │ │ │ -00031e50: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -00031e60: 696d 6167 655f 6865 6967 6874 3c2f 636f image_height - Image heig │ │ │ -00031e80: 6874 2e3c 2f64 643e 0a3c 6464 3e3c 636f ht.
    .
    image_channel │ │ │ -00031ea0: 733c 2f63 6f64 653e 202d 204e 756d 6265 s - Numbe │ │ │ -00031eb0: 7220 6f66 2063 6861 6e6e 656c 7320 6f66 r of channels of │ │ │ -00031ec0: 2074 6865 2069 6d61 6765 2e3c 2f64 643e the image.
    │ │ │ -00031ed0: 0a3c 6464 3e3c 636f 6465 3e6e 756d 5f73 .
    num_s │ │ │ -00031ee0: 7570 6572 7069 7865 6c73 3c2f 636f 6465 uperpixels - Desired numb │ │ │ -00031f00: 6572 206f 6620 7375 7065 7270 6978 656c er of superpixel │ │ │ -00031f10: 732e 204e 6f74 6520 7468 6174 2074 6865 s. Note that the │ │ │ -00031f20: 2061 6374 7561 6c20 6e75 6d62 6572 206d actual number m │ │ │ -00031f30: 6179 2062 6520 736d 616c 6c65 720a 2064 ay be smaller. d │ │ │ -00031f40: 7565 2074 6f20 7265 7374 7269 6374 696f ue to restrictio │ │ │ -00031f50: 6e73 2028 6465 7065 6e64 696e 6720 6f6e ns (depending on │ │ │ -00031f60: 2074 6865 2069 6d61 6765 2073 697a 6520 the image size │ │ │ -00031f70: 616e 6420 6e75 6d5f 6c65 7665 6c73 292e and num_levels). │ │ │ -00031f80: 2055 7365 2067 6574 4e75 6d62 6572 4f66 Use getNumberOf │ │ │ -00031f90: 5375 7065 7270 6978 656c 7328 2920 746f Superpixels() to │ │ │ -00031fa0: 0a20 6765 7420 7468 6520 6163 7475 616c . get the actual │ │ │ -00031fb0: 206e 756d 6265 722e 3c2f 6464 3e0a 3c64 number.
    .num_leve │ │ │ -00031fd0: 6c73 3c2f 636f 6465 3e20 2d20 4e75 6d62 ls - Numb │ │ │ -00031fe0: 6572 206f 6620 626c 6f63 6b20 6c65 7665 er of block leve │ │ │ -00031ff0: 6c73 2e20 5468 6520 6d6f 7265 206c 6576 ls. The more lev │ │ │ -00032000: 656c 732c 2074 6865 206d 6f72 6520 6163 els, the more ac │ │ │ -00032010: 6375 7261 7465 2069 7320 7468 6520 7365 curate is the se │ │ │ -00032020: 676d 656e 7461 7469 6f6e 2c0a 2062 7574 gmentation,. but │ │ │ -00032030: 206e 6565 6473 206d 6f72 6520 6d65 6d6f needs more memo │ │ │ -00032040: 7279 2061 6e64 2043 5055 2074 696d 652e ry and CPU time. │ │ │ -00032050: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e .
    │ │ │ -00032060: 7072 696f 723c 2f63 6f64 653e 202d 2065 prior - e │ │ │ -00032070: 6e61 626c 6520 3378 3320 7368 6170 6520 nable 3x3 shape │ │ │ -00032080: 736d 6f6f 7468 696e 6720 7465 726d 2069 smoothing term i │ │ │ -00032090: 6620 2667 743b 302e 2041 206c 6172 6765 f >0. A large │ │ │ -000320a0: 7220 7661 6c75 6520 6c65 6164 7320 746f r value leads to │ │ │ -000320b0: 2073 6d6f 6f74 6865 7220 7368 6170 6573 smoother shapes │ │ │ -000320c0: 2e20 7072 696f 720a 206d 7573 7420 6265 . prior. must be │ │ │ -000320d0: 2069 6e20 7468 6520 7261 6e67 6520 5b30 in the range [0 │ │ │ -000320e0: 2c20 355d 2e3c 2f64 643e 0a3c 6464 3e3c , 5].
    .
    < │ │ │ -000320f0: 636f 6465 3e68 6973 746f 6772 616d 5f62 code>histogram_b │ │ │ -00032100: 696e 733c 2f63 6f64 653e 202d 204e 756d ins - Num │ │ │ -00032110: 6265 7220 6f66 2068 6973 746f 6772 616d ber of histogram │ │ │ -00032120: 2062 696e 732e 0a0a 2054 6865 2066 756e bins... The fun │ │ │ -00032130: 6374 696f 6e20 696e 6974 6961 6c69 7a65 ction initialize │ │ │ -00032140: 7320 6120 5375 7065 7270 6978 656c 5345 s a SuperpixelSE │ │ │ -00032150: 4544 5320 6f62 6a65 6374 2066 6f72 2074 EDS object for t │ │ │ -00032160: 6865 2069 6e70 7574 2069 6d61 6765 2e20 he input image. │ │ │ -00032170: 4974 2073 746f 7265 7320 7468 6520 7061 It stores the pa │ │ │ -00032180: 7261 6d65 7465 7273 206f 660a 2074 6865 rameters of. the │ │ │ -00032190: 2069 6d61 6765 3a20 696d 6167 655f 7769 image: image_wi │ │ │ -000321a0: 6474 682c 2069 6d61 6765 5f68 6569 6768 dth, image_heigh │ │ │ -000321b0: 7420 616e 6420 696d 6167 655f 6368 616e t and image_chan │ │ │ -000321c0: 6e65 6c73 2e20 4974 2061 6c73 6f20 7365 nels. It also se │ │ │ -000321d0: 7473 2074 6865 2070 6172 616d 6574 6572 ts the parameter │ │ │ -000321e0: 7320 6f66 2074 6865 2053 4545 4453 0a20 s of the SEEDS. │ │ │ -000321f0: 7375 7065 7270 6978 656c 2061 6c67 6f72 superpixel algor │ │ │ -00032200: 6974 686d 2c20 7768 6963 6820 6172 653a ithm, which are: │ │ │ -00032210: 206e 756d 5f73 7570 6572 7069 7865 6c73 num_superpixels │ │ │ -00032220: 2c20 6e75 6d5f 6c65 7665 6c73 2c20 7573 , num_levels, us │ │ │ -00032230: 655f 7072 696f 722c 2068 6973 746f 6772 e_prior, histogr │ │ │ -00032240: 616d 5f62 696e 7320 616e 640a 2064 6f75 am_bins and. dou │ │ │ -00032250: 626c 655f 7374 6570 2e0a 0a20 5468 6520 ble_step... The │ │ │ -00032260: 6e75 6d62 6572 206f 6620 6c65 7665 6c73 number of levels │ │ │ -00032270: 2069 6e20 6e75 6d5f 6c65 7665 6c73 2064 in num_levels d │ │ │ -00032280: 6566 696e 6573 2074 6865 2061 6d6f 756e efines the amoun │ │ │ -00032290: 7420 6f66 2062 6c6f 636b 206c 6576 656c t of block level │ │ │ -000322a0: 7320 7468 6174 2074 6865 2061 6c67 6f72 s that the algor │ │ │ -000322b0: 6974 686d 2075 7365 2069 6e20 7468 650a ithm use in the. │ │ │ -000322c0: 206f 7074 696d 697a 6174 696f 6e2e 2054 optimization. T │ │ │ -000322d0: 6865 2069 6e69 7469 616c 697a 6174 696f he initializatio │ │ │ -000322e0: 6e20 6973 2061 2067 7269 642c 2069 6e20 n is a grid, in │ │ │ -000322f0: 7768 6963 6820 7468 6520 7375 7065 7270 which the superp │ │ │ -00032300: 6978 656c 7320 6172 6520 6571 7561 6c6c ixels are equall │ │ │ -00032310: 7920 6469 7374 7269 6275 7465 6420 7468 y distributed th │ │ │ -00032320: 726f 7567 680a 2074 6865 2077 6964 7468 rough. the width │ │ │ -00032330: 2061 6e64 2074 6865 2068 6569 6768 7420 and the height │ │ │ -00032340: 6f66 2074 6865 2069 6d61 6765 2e20 5468 of the image. Th │ │ │ -00032350: 6520 6c61 7267 6572 2062 6c6f 636b 7320 e larger blocks │ │ │ -00032360: 636f 7272 6573 706f 6e64 2074 6f20 7468 correspond to th │ │ │ -00032370: 6520 7375 7065 7270 6978 656c 2073 697a e superpixel siz │ │ │ -00032380: 652c 2061 6e64 2074 6865 0a20 6c65 7665 e, and the. leve │ │ │ -00032390: 6c73 2077 6974 6820 736d 616c 6c65 7220 ls with smaller │ │ │ -000323a0: 626c 6f63 6b73 2061 7265 2066 6f72 6d65 blocks are forme │ │ │ -000323b0: 6420 6279 2064 6976 6964 696e 6720 7468 d by dividing th │ │ │ -000323c0: 6520 6c61 7267 6572 2062 6c6f 636b 7320 e larger blocks │ │ │ -000323d0: 696e 746f 2032 2078 2032 2062 6c6f 636b into 2 x 2 block │ │ │ -000323e0: 7320 6f66 2070 6978 656c 732c 0a20 7265 s of pixels,. re │ │ │ -000323f0: 6375 7273 6976 656c 7920 756e 7469 6c20 cursively until │ │ │ -00032400: 7468 6520 736d 616c 6c65 7220 626c 6f63 the smaller bloc │ │ │ -00032410: 6b20 6c65 7665 6c2e 2041 6e20 6578 616d k level. An exam │ │ │ -00032420: 706c 6520 6f66 2069 6e69 7469 616c 697a ple of initializ │ │ │ -00032430: 6174 696f 6e20 6f66 2034 2062 6c6f 636b ation of 4 block │ │ │ -00032440: 206c 6576 656c 7320 6973 0a20 696c 6c75 levels is. illu │ │ │ -00032450: 7374 7261 7465 6420 696e 2074 6865 2066 strated in the f │ │ │ -00032460: 6f6c 6c6f 7769 6e67 2066 6967 7572 652e ollowing figure. │ │ │ -00032470: 0a0a 2021 5b69 6d61 6765 5d28 7069 6373 .. ![image](pics │ │ │ -00032480: 2f73 7570 6572 7069 7865 6c73 5f62 6c6f /superpixels_blo │ │ │ -00032490: 636b 732e 706e 6729 3c2f 6464 3e0a 3c64 cks.png)
    .Returns:. │ │ │ -000324b0: 3c64 643e 6175 746f 6d61 7469 6361 6c6c
    automaticall │ │ │ -000324c0: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ -000324d0: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
    ..
  • .
  • ..

    cr │ │ │ -00032540: 6561 7465 5375 7065 7270 6978 656c 5345 eateSuperpixelSE │ │ │ -00032550: 4544 533c 2f68 333e 0a3c 6469 7620 636c EDS

    .
    p │ │ │ -00032590: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static Superpixe │ │ │ -00032610: 6c53 4545 4453 3c2f 613e 3c2f 7370 616e lSEEDS createSuperpix │ │ │ -00032650: 656c 5345 4544 533c 2f73 7061 6e3e 3c77 elSEEDS(int │ │ │ -00032680: 266e 6273 703b 696d 6167 655f 7769 6474  image_widt │ │ │ -00032690: 682c 0a20 696e 7426 6e62 7370 3b69 6d61 h,. int ima │ │ │ -000326a0: 6765 5f68 6569 6768 742c 0a20 696e 7426 ge_height,. int& │ │ │ -000326b0: 6e62 7370 3b69 6d61 6765 5f63 6861 6e6e nbsp;image_chann │ │ │ -000326c0: 656c 732c 0a20 696e 7426 6e62 7370 3b6e els,. int n │ │ │ -000326d0: 756d 5f73 7570 6572 7069 7865 6c73 2c0a um_superpixels,. │ │ │ -000326e0: 2069 6e74 266e 6273 703b 6e75 6d5f 6c65 int num_le │ │ │ -000326f0: 7665 6c73 2c0a 2069 6e74 266e 6273 703b vels,. int  │ │ │ -00032700: 7072 696f 7229 3c2f 7370 616e 3e3c 2f64 prior).
    Initializ │ │ │ -00032730: 6573 2061 2053 7570 6572 7069 7865 6c53 es a SuperpixelS │ │ │ -00032740: 4545 4453 206f 626a 6563 742e 3c2f 6469 EEDS object..
    .
    Parame │ │ │ -00032770: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
    .
    < │ │ │ -00032780: 636f 6465 3e69 6d61 6765 5f77 6964 7468 code>image_width │ │ │ -00032790: 3c2f 636f 6465 3e20 2d20 496d 6167 6520 - Image │ │ │ -000327a0: 7769 6474 682e 3c2f 6464 3e0a 3c64 643e width.
    .
    │ │ │ -000327b0: 3c63 6f64 653e 696d 6167 655f 6865 6967 image_heig │ │ │ -000327c0: 6874 3c2f 636f 6465 3e20 2d20 496d 6167 ht - Imag │ │ │ -000327d0: 6520 6865 6967 6874 2e3c 2f64 643e 0a3c e height.
    .< │ │ │ -000327e0: 6464 3e3c 636f 6465 3e69 6d61 6765 5f63 dd>image_c │ │ │ -000327f0: 6861 6e6e 656c 733c 2f63 6f64 653e 202d hannels - │ │ │ -00032800: 204e 756d 6265 7220 6f66 2063 6861 6e6e Number of chann │ │ │ -00032810: 656c 7320 6f66 2074 6865 2069 6d61 6765 els of the image │ │ │ -00032820: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 ..
    num_superpixels │ │ │ -00032840: 3c2f 636f 6465 3e20 2d20 4465 7369 7265 - Desire │ │ │ -00032850: 6420 6e75 6d62 6572 206f 6620 7375 7065 d number of supe │ │ │ -00032860: 7270 6978 656c 732e 204e 6f74 6520 7468 rpixels. Note th │ │ │ -00032870: 6174 2074 6865 2061 6374 7561 6c20 6e75 at the actual nu │ │ │ -00032880: 6d62 6572 206d 6179 2062 6520 736d 616c mber may be smal │ │ │ -00032890: 6c65 720a 2064 7565 2074 6f20 7265 7374 ler. due to rest │ │ │ -000328a0: 7269 6374 696f 6e73 2028 6465 7065 6e64 rictions (depend │ │ │ -000328b0: 696e 6720 6f6e 2074 6865 2069 6d61 6765 ing on the image │ │ │ -000328c0: 2073 697a 6520 616e 6420 6e75 6d5f 6c65 size and num_le │ │ │ -000328d0: 7665 6c73 292e 2055 7365 2067 6574 4e75 vels). Use getNu │ │ │ -000328e0: 6d62 6572 4f66 5375 7065 7270 6978 656c mberOfSuperpixel │ │ │ -000328f0: 7328 2920 746f 0a20 6765 7420 7468 6520 s() to. get the │ │ │ -00032900: 6163 7475 616c 206e 756d 6265 722e 3c2f actual number..
    nu │ │ │ -00032920: 6d5f 6c65 7665 6c73 3c2f 636f 6465 3e20 m_levels │ │ │ -00032930: 2d20 4e75 6d62 6572 206f 6620 626c 6f63 - Number of bloc │ │ │ -00032940: 6b20 6c65 7665 6c73 2e20 5468 6520 6d6f k levels. The mo │ │ │ -00032950: 7265 206c 6576 656c 732c 2074 6865 206d re levels, the m │ │ │ -00032960: 6f72 6520 6163 6375 7261 7465 2069 7320 ore accurate is │ │ │ -00032970: 7468 6520 7365 676d 656e 7461 7469 6f6e the segmentation │ │ │ -00032980: 2c0a 2062 7574 206e 6565 6473 206d 6f72 ,. but needs mor │ │ │ -00032990: 6520 6d65 6d6f 7279 2061 6e64 2043 5055 e memory and CPU │ │ │ -000329a0: 2074 696d 652e 3c2f 6464 3e0a 3c64 643e time.
    .
    │ │ │ -000329b0: 3c63 6f64 653e 7072 696f 723c 2f63 6f64 prior - enable 3x3 │ │ │ -000329d0: 7368 6170 6520 736d 6f6f 7468 696e 6720 shape smoothing │ │ │ -000329e0: 7465 726d 2069 6620 2667 743b 302e 2041 term if >0. A │ │ │ -000329f0: 206c 6172 6765 7220 7661 6c75 6520 6c65 larger value le │ │ │ -00032a00: 6164 7320 746f 2073 6d6f 6f74 6865 7220 ads to smoother │ │ │ -00032a10: 7368 6170 6573 2e20 7072 696f 720a 206d shapes. prior. m │ │ │ -00032a20: 7573 7420 6265 2069 6e20 7468 6520 7261 ust be in the ra │ │ │ -00032a30: 6e67 6520 5b30 2c20 355d 2e0a 0a20 5468 nge [0, 5]... Th │ │ │ -00032a40: 6520 6675 6e63 7469 6f6e 2069 6e69 7469 e function initi │ │ │ -00032a50: 616c 697a 6573 2061 2053 7570 6572 7069 alizes a Superpi │ │ │ -00032a60: 7865 6c53 4545 4453 206f 626a 6563 7420 xelSEEDS object │ │ │ -00032a70: 666f 7220 7468 6520 696e 7075 7420 696d for the input im │ │ │ -00032a80: 6167 652e 2049 7420 7374 6f72 6573 2074 age. It stores t │ │ │ -00032a90: 6865 2070 6172 616d 6574 6572 7320 6f66 he parameters of │ │ │ -00032aa0: 0a20 7468 6520 696d 6167 653a 2069 6d61 . the image: ima │ │ │ -00032ab0: 6765 5f77 6964 7468 2c20 696d 6167 655f ge_width, image_ │ │ │ -00032ac0: 6865 6967 6874 2061 6e64 2069 6d61 6765 height and image │ │ │ -00032ad0: 5f63 6861 6e6e 656c 732e 2049 7420 616c _channels. It al │ │ │ -00032ae0: 736f 2073 6574 7320 7468 6520 7061 7261 so sets the para │ │ │ -00032af0: 6d65 7465 7273 206f 6620 7468 6520 5345 meters of the SE │ │ │ -00032b00: 4544 530a 2073 7570 6572 7069 7865 6c20 EDS. superpixel │ │ │ -00032b10: 616c 676f 7269 7468 6d2c 2077 6869 6368 algorithm, which │ │ │ -00032b20: 2061 7265 3a20 6e75 6d5f 7375 7065 7270 are: num_superp │ │ │ -00032b30: 6978 656c 732c 206e 756d 5f6c 6576 656c ixels, num_level │ │ │ -00032b40: 732c 2075 7365 5f70 7269 6f72 2c20 6869 s, use_prior, hi │ │ │ -00032b50: 7374 6f67 7261 6d5f 6269 6e73 2061 6e64 stogram_bins and │ │ │ -00032b60: 0a20 646f 7562 6c65 5f73 7465 702e 0a0a . double_step... │ │ │ -00032b70: 2054 6865 206e 756d 6265 7220 6f66 206c The number of l │ │ │ -00032b80: 6576 656c 7320 696e 206e 756d 5f6c 6576 evels in num_lev │ │ │ -00032b90: 656c 7320 6465 6669 6e65 7320 7468 6520 els defines the │ │ │ -00032ba0: 616d 6f75 6e74 206f 6620 626c 6f63 6b20 amount of block │ │ │ -00032bb0: 6c65 7665 6c73 2074 6861 7420 7468 6520 levels that the │ │ │ -00032bc0: 616c 676f 7269 7468 6d20 7573 6520 696e algorithm use in │ │ │ -00032bd0: 2074 6865 0a20 6f70 7469 6d69 7a61 7469 the. optimizati │ │ │ -00032be0: 6f6e 2e20 5468 6520 696e 6974 6961 6c69 on. The initiali │ │ │ -00032bf0: 7a61 7469 6f6e 2069 7320 6120 6772 6964 zation is a grid │ │ │ -00032c00: 2c20 696e 2077 6869 6368 2074 6865 2073 , in which the s │ │ │ -00032c10: 7570 6572 7069 7865 6c73 2061 7265 2065 uperpixels are e │ │ │ -00032c20: 7175 616c 6c79 2064 6973 7472 6962 7574 qually distribut │ │ │ -00032c30: 6564 2074 6872 6f75 6768 0a20 7468 6520 ed through. the │ │ │ -00032c40: 7769 6474 6820 616e 6420 7468 6520 6865 width and the he │ │ │ -00032c50: 6967 6874 206f 6620 7468 6520 696d 6167 ight of the imag │ │ │ -00032c60: 652e 2054 6865 206c 6172 6765 7220 626c e. The larger bl │ │ │ -00032c70: 6f63 6b73 2063 6f72 7265 7370 6f6e 6420 ocks correspond │ │ │ -00032c80: 746f 2074 6865 2073 7570 6572 7069 7865 to the superpixe │ │ │ -00032c90: 6c20 7369 7a65 2c20 616e 6420 7468 650a l size, and the. │ │ │ -00032ca0: 206c 6576 656c 7320 7769 7468 2073 6d61 levels with sma │ │ │ -00032cb0: 6c6c 6572 2062 6c6f 636b 7320 6172 6520 ller blocks are │ │ │ -00032cc0: 666f 726d 6564 2062 7920 6469 7669 6469 formed by dividi │ │ │ -00032cd0: 6e67 2074 6865 206c 6172 6765 7220 626c ng the larger bl │ │ │ -00032ce0: 6f63 6b73 2069 6e74 6f20 3220 7820 3220 ocks into 2 x 2 │ │ │ -00032cf0: 626c 6f63 6b73 206f 6620 7069 7865 6c73 blocks of pixels │ │ │ -00032d00: 2c0a 2072 6563 7572 7369 7665 6c79 2075 ,. recursively u │ │ │ -00032d10: 6e74 696c 2074 6865 2073 6d61 6c6c 6572 ntil the smaller │ │ │ -00032d20: 2062 6c6f 636b 206c 6576 656c 2e20 416e block level. An │ │ │ -00032d30: 2065 7861 6d70 6c65 206f 6620 696e 6974 example of init │ │ │ -00032d40: 6961 6c69 7a61 7469 6f6e 206f 6620 3420 ialization of 4 │ │ │ -00032d50: 626c 6f63 6b20 6c65 7665 6c73 2069 730a block levels is. │ │ │ -00032d60: 2069 6c6c 7573 7472 6174 6564 2069 6e20 illustrated in │ │ │ -00032d70: 7468 6520 666f 6c6c 6f77 696e 6720 6669 the following fi │ │ │ -00032d80: 6775 7265 2e0a 0a20 215b 696d 6167 655d gure... ![image] │ │ │ -00032d90: 2870 6963 732f 7375 7065 7270 6978 656c (pics/superpixel │ │ │ -00032da0: 735f 626c 6f63 6b73 2e70 6e67 293c 2f64 s_blocks.png).
    Returns:< │ │ │ -00032dc0: 2f64 743e 0a3c 6464 3e61 7574 6f6d 6174 /dt>.
    automat │ │ │ -00032dd0: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ -00032de0: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365
    .
    ..
  • .
  • .
    .

    c │ │ │ -00032e50: 7265 6174 6553 7570 6572 7069 7865 6c53 reateSuperpixelS │ │ │ -00032e60: 4545 4453 3c2f 6833 3e0a 3c64 6976 2063 EEDS

    .
    │ │ │ -00032ea0: 7075 626c 6963 2073 7461 7469 633c 2f73 public static Superpix │ │ │ -00032f20: 656c 5345 4544 533c 2f61 3e3c 2f73 7061 elSEEDS createSuperpi │ │ │ -00032f60: 7865 6c53 4545 4453 3c2f 7370 616e 3e3c xelSEEDS< │ │ │ -00032f70: 7762 723e 3c73 7061 6e20 636c 6173 733d wbr>(in │ │ │ -00032f90: 7426 6e62 7370 3b69 6d61 6765 5f77 6964 t image_wid │ │ │ -00032fa0: 7468 2c0a 2069 6e74 266e 6273 703b 696d th,. int im │ │ │ -00032fb0: 6167 655f 6865 6967 6874 2c0a 2069 6e74 age_height,. int │ │ │ -00032fc0: 266e 6273 703b 696d 6167 655f 6368 616e  image_chan │ │ │ -00032fd0: 6e65 6c73 2c0a 2069 6e74 266e 6273 703b nels,. int  │ │ │ -00032fe0: 6e75 6d5f 7375 7065 7270 6978 656c 732c num_superpixels, │ │ │ -00032ff0: 0a20 696e 7426 6e62 7370 3b6e 756d 5f6c . int num_l │ │ │ -00033000: 6576 656c 7329 3c2f 7370 616e 3e3c 2f64 evels).
    Initializ │ │ │ -00033030: 6573 2061 2053 7570 6572 7069 7865 6c53 es a SuperpixelS │ │ │ -00033040: 4545 4453 206f 626a 6563 742e 3c2f 6469 EEDS object..
    .
    Parame │ │ │ -00033070: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
    .
    < │ │ │ -00033080: 636f 6465 3e69 6d61 6765 5f77 6964 7468 code>image_width │ │ │ -00033090: 3c2f 636f 6465 3e20 2d20 496d 6167 6520 - Image │ │ │ -000330a0: 7769 6474 682e 3c2f 6464 3e0a 3c64 643e width.
    .
    │ │ │ -000330b0: 3c63 6f64 653e 696d 6167 655f 6865 6967 image_heig │ │ │ -000330c0: 6874 3c2f 636f 6465 3e20 2d20 496d 6167 ht - Imag │ │ │ -000330d0: 6520 6865 6967 6874 2e3c 2f64 643e 0a3c e height.
    .< │ │ │ -000330e0: 6464 3e3c 636f 6465 3e69 6d61 6765 5f63 dd>image_c │ │ │ -000330f0: 6861 6e6e 656c 733c 2f63 6f64 653e 202d hannels - │ │ │ -00033100: 204e 756d 6265 7220 6f66 2063 6861 6e6e Number of chann │ │ │ -00033110: 656c 7320 6f66 2074 6865 2069 6d61 6765 els of the image │ │ │ -00033120: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 ..
    num_superpixels │ │ │ -00033140: 3c2f 636f 6465 3e20 2d20 4465 7369 7265 - Desire │ │ │ -00033150: 6420 6e75 6d62 6572 206f 6620 7375 7065 d number of supe │ │ │ -00033160: 7270 6978 656c 732e 204e 6f74 6520 7468 rpixels. Note th │ │ │ -00033170: 6174 2074 6865 2061 6374 7561 6c20 6e75 at the actual nu │ │ │ -00033180: 6d62 6572 206d 6179 2062 6520 736d 616c mber may be smal │ │ │ -00033190: 6c65 720a 2064 7565 2074 6f20 7265 7374 ler. due to rest │ │ │ -000331a0: 7269 6374 696f 6e73 2028 6465 7065 6e64 rictions (depend │ │ │ -000331b0: 696e 6720 6f6e 2074 6865 2069 6d61 6765 ing on the image │ │ │ -000331c0: 2073 697a 6520 616e 6420 6e75 6d5f 6c65 size and num_le │ │ │ -000331d0: 7665 6c73 292e 2055 7365 2067 6574 4e75 vels). Use getNu │ │ │ -000331e0: 6d62 6572 4f66 5375 7065 7270 6978 656c mberOfSuperpixel │ │ │ -000331f0: 7328 2920 746f 0a20 6765 7420 7468 6520 s() to. get the │ │ │ -00033200: 6163 7475 616c 206e 756d 6265 722e 3c2f actual number..
    nu │ │ │ -00033220: 6d5f 6c65 7665 6c73 3c2f 636f 6465 3e20 m_levels │ │ │ -00033230: 2d20 4e75 6d62 6572 206f 6620 626c 6f63 - Number of bloc │ │ │ -00033240: 6b20 6c65 7665 6c73 2e20 5468 6520 6d6f k levels. The mo │ │ │ -00033250: 7265 206c 6576 656c 732c 2074 6865 206d re levels, the m │ │ │ -00033260: 6f72 6520 6163 6375 7261 7465 2069 7320 ore accurate is │ │ │ -00033270: 7468 6520 7365 676d 656e 7461 7469 6f6e the segmentation │ │ │ -00033280: 2c0a 2062 7574 206e 6565 6473 206d 6f72 ,. but needs mor │ │ │ -00033290: 6520 6d65 6d6f 7279 2061 6e64 2043 5055 e memory and CPU │ │ │ -000332a0: 2074 696d 652e 0a20 6d75 7374 2062 6520 time.. must be │ │ │ -000332b0: 696e 2074 6865 2072 616e 6765 205b 302c in the range [0, │ │ │ -000332c0: 2035 5d2e 0a0a 2054 6865 2066 756e 6374 5]... The funct │ │ │ -000332d0: 696f 6e20 696e 6974 6961 6c69 7a65 7320 ion initializes │ │ │ -000332e0: 6120 5375 7065 7270 6978 656c 5345 4544 a SuperpixelSEED │ │ │ -000332f0: 5320 6f62 6a65 6374 2066 6f72 2074 6865 S object for the │ │ │ -00033300: 2069 6e70 7574 2069 6d61 6765 2e20 4974 input image. It │ │ │ -00033310: 2073 746f 7265 7320 7468 6520 7061 7261 stores the para │ │ │ -00033320: 6d65 7465 7273 206f 660a 2074 6865 2069 meters of. the i │ │ │ -00033330: 6d61 6765 3a20 696d 6167 655f 7769 6474 mage: image_widt │ │ │ -00033340: 682c 2069 6d61 6765 5f68 6569 6768 7420 h, image_height │ │ │ -00033350: 616e 6420 696d 6167 655f 6368 616e 6e65 and image_channe │ │ │ -00033360: 6c73 2e20 4974 2061 6c73 6f20 7365 7473 ls. It also sets │ │ │ -00033370: 2074 6865 2070 6172 616d 6574 6572 7320 the parameters │ │ │ -00033380: 6f66 2074 6865 2053 4545 4453 0a20 7375 of the SEEDS. su │ │ │ -00033390: 7065 7270 6978 656c 2061 6c67 6f72 6974 perpixel algorit │ │ │ -000333a0: 686d 2c20 7768 6963 6820 6172 653a 206e hm, which are: n │ │ │ -000333b0: 756d 5f73 7570 6572 7069 7865 6c73 2c20 um_superpixels, │ │ │ -000333c0: 6e75 6d5f 6c65 7665 6c73 2c20 7573 655f num_levels, use_ │ │ │ -000333d0: 7072 696f 722c 2068 6973 746f 6772 616d prior, histogram │ │ │ -000333e0: 5f62 696e 7320 616e 640a 2064 6f75 626c _bins and. doubl │ │ │ -000333f0: 655f 7374 6570 2e0a 0a20 5468 6520 6e75 e_step... The nu │ │ │ -00033400: 6d62 6572 206f 6620 6c65 7665 6c73 2069 mber of levels i │ │ │ -00033410: 6e20 6e75 6d5f 6c65 7665 6c73 2064 6566 n num_levels def │ │ │ -00033420: 696e 6573 2074 6865 2061 6d6f 756e 7420 ines the amount │ │ │ -00033430: 6f66 2062 6c6f 636b 206c 6576 656c 7320 of block levels │ │ │ -00033440: 7468 6174 2074 6865 2061 6c67 6f72 6974 that the algorit │ │ │ -00033450: 686d 2075 7365 2069 6e20 7468 650a 206f hm use in the. o │ │ │ -00033460: 7074 696d 697a 6174 696f 6e2e 2054 6865 ptimization. The │ │ │ -00033470: 2069 6e69 7469 616c 697a 6174 696f 6e20 initialization │ │ │ -00033480: 6973 2061 2067 7269 642c 2069 6e20 7768 is a grid, in wh │ │ │ -00033490: 6963 6820 7468 6520 7375 7065 7270 6978 ich the superpix │ │ │ -000334a0: 656c 7320 6172 6520 6571 7561 6c6c 7920 els are equally │ │ │ -000334b0: 6469 7374 7269 6275 7465 6420 7468 726f distributed thro │ │ │ -000334c0: 7567 680a 2074 6865 2077 6964 7468 2061 ugh. the width a │ │ │ -000334d0: 6e64 2074 6865 2068 6569 6768 7420 6f66 nd the height of │ │ │ -000334e0: 2074 6865 2069 6d61 6765 2e20 5468 6520 the image. The │ │ │ -000334f0: 6c61 7267 6572 2062 6c6f 636b 7320 636f larger blocks co │ │ │ -00033500: 7272 6573 706f 6e64 2074 6f20 7468 6520 rrespond to the │ │ │ -00033510: 7375 7065 7270 6978 656c 2073 697a 652c superpixel size, │ │ │ -00033520: 2061 6e64 2074 6865 0a20 6c65 7665 6c73 and the. levels │ │ │ -00033530: 2077 6974 6820 736d 616c 6c65 7220 626c with smaller bl │ │ │ -00033540: 6f63 6b73 2061 7265 2066 6f72 6d65 6420 ocks are formed │ │ │ -00033550: 6279 2064 6976 6964 696e 6720 7468 6520 by dividing the │ │ │ -00033560: 6c61 7267 6572 2062 6c6f 636b 7320 696e larger blocks in │ │ │ -00033570: 746f 2032 2078 2032 2062 6c6f 636b 7320 to 2 x 2 blocks │ │ │ -00033580: 6f66 2070 6978 656c 732c 0a20 7265 6375 of pixels,. recu │ │ │ -00033590: 7273 6976 656c 7920 756e 7469 6c20 7468 rsively until th │ │ │ -000335a0: 6520 736d 616c 6c65 7220 626c 6f63 6b20 e smaller block │ │ │ -000335b0: 6c65 7665 6c2e 2041 6e20 6578 616d 706c level. An exampl │ │ │ -000335c0: 6520 6f66 2069 6e69 7469 616c 697a 6174 e of initializat │ │ │ -000335d0: 696f 6e20 6f66 2034 2062 6c6f 636b 206c ion of 4 block l │ │ │ -000335e0: 6576 656c 7320 6973 0a20 696c 6c75 7374 evels is. illust │ │ │ -000335f0: 7261 7465 6420 696e 2074 6865 2066 6f6c rated in the fol │ │ │ -00033600: 6c6f 7769 6e67 2066 6967 7572 652e 0a0a lowing figure... │ │ │ -00033610: 2021 5b69 6d61 6765 5d28 7069 6373 2f73 ![image](pics/s │ │ │ -00033620: 7570 6572 7069 7865 6c73 5f62 6c6f 636b uperpixels_block │ │ │ -00033630: 732e 706e 6729 3c2f 6464 3e0a 3c64 743e s.png)
    .
    │ │ │ -00033640: 5265 7475 726e 733a 3c2f 6474 3e0a 3c64 Returns:
    .automatically │ │ │ -00033660: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated.< │ │ │ -00033670: 2f64 6c3e 0a3c 2f73 6563 7469 6f6e 3e0a /dl>.
    . │ │ │ -00033680: 3c2f 6c69 3e0a 3c6c 693e 0a3c 7365 6374
  • .
  • ..

    createSc │ │ │ -000336e0: 616e 5365 676d 656e 743c 2f68 333e 0a3c anSegment

    .< │ │ │ -000336f0: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ -00033700: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ -00033730: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ -00033740: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ -00033750: 726e 2d74 7970 6522 3e3c 6120 6872 6566 rn-type">ScanSeg │ │ │ -000337a0: 6d65 6e74 3c2f 613e 3c2f 7370 616e 3e26 ment& │ │ │ -000337b0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ -000337d0: 6372 6561 7465 5363 616e 5365 676d 656e createScanSegmen │ │ │ -000337e0: 743c 2f73 7061 6e3e 3c77 6272 3e3c 7370 t(int  │ │ │ -00033810: 696d 6167 655f 7769 6474 682c 0a20 696e image_width,. in │ │ │ -00033820: 7426 6e62 7370 3b69 6d61 6765 5f68 6569 t image_hei │ │ │ -00033830: 6768 742c 0a20 696e 7426 6e62 7370 3b6e ght,. int n │ │ │ -00033840: 756d 5f73 7570 6572 7069 7865 6c73 2c0a um_superpixels,. │ │ │ -00033850: 2069 6e74 266e 6273 703b 736c 6963 6573 int slices │ │ │ -00033860: 2c0a 2062 6f6f 6c65 616e 266e 6273 703b ,. boolean  │ │ │ -00033870: 6d65 7267 655f 736d 616c 6c29 3c2f 7370 merge_small).
    Ini │ │ │ -000338a0: 7469 616c 697a 6573 2061 2053 6361 6e53 tializes a ScanS │ │ │ -000338b0: 6567 6d65 6e74 206f 626a 6563 742e 0a0a egment object... │ │ │ -000338c0: 2054 6865 2066 756e 6374 696f 6e20 696e The function in │ │ │ -000338d0: 6974 6961 6c69 7a65 7320 6120 5363 616e itializes a Scan │ │ │ -000338e0: 5365 676d 656e 7420 6f62 6a65 6374 2066 Segment object f │ │ │ -000338f0: 6f72 2074 6865 2069 6e70 7574 2069 6d61 or the input ima │ │ │ -00033900: 6765 2e20 4974 2073 746f 7265 7320 7468 ge. It stores th │ │ │ -00033910: 6520 7061 7261 6d65 7465 7273 206f 660a e parameters of. │ │ │ -00033920: 2074 6865 2069 6d61 6765 3a20 696d 6167 the image: imag │ │ │ -00033930: 655f 7769 6474 6820 616e 6420 696d 6167 e_width and imag │ │ │ -00033940: 655f 6865 6967 6874 2e20 4974 2061 6c73 e_height. It als │ │ │ -00033950: 6f20 7365 7473 2074 6865 2070 6172 616d o sets the param │ │ │ -00033960: 6574 6572 7320 6f66 2074 6865 2046 2d44 eters of the F-D │ │ │ -00033970: 4253 4341 4e20 7375 7065 7270 6978 656c BSCAN superpixel │ │ │ -00033980: 0a20 616c 676f 7269 7468 6d2c 2077 6869 . algorithm, whi │ │ │ -00033990: 6368 2061 7265 3a20 6e75 6d5f 7375 7065 ch are: num_supe │ │ │ -000339a0: 7270 6978 656c 732c 2074 6872 6561 6473 rpixels, threads │ │ │ -000339b0: 2c20 616e 6420 6d65 7267 655f 736d 616c , and merge_smal │ │ │ -000339c0: 6c2e 3c2f 6469 763e 0a3c 646c 2063 6c61 l.
    .
    .
    │ │ │ -000339e0: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
    │ │ │ -000339f0: 0a3c 6464 3e3c 636f 6465 3e69 6d61 6765 .
    image │ │ │ -00033a00: 5f77 6964 7468 3c2f 636f 6465 3e20 2d20 _width - │ │ │ -00033a10: 496d 6167 6520 7769 6474 682e 3c2f 6464 Image width.
    .
    imag │ │ │ -00033a30: 655f 6865 6967 6874 3c2f 636f 6465 3e20 e_height │ │ │ -00033a40: 2d20 496d 6167 6520 6865 6967 6874 2e3c - Image height.< │ │ │ -00033a50: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e6e /dd>.
    n │ │ │ -00033a60: 756d 5f73 7570 6572 7069 7865 6c73 3c2f um_superpixels - Desired │ │ │ -00033a80: 6e75 6d62 6572 206f 6620 7375 7065 7270 number of superp │ │ │ -00033a90: 6978 656c 732e 204e 6f74 6520 7468 6174 ixels. Note that │ │ │ -00033aa0: 2074 6865 2061 6374 7561 6c20 6e75 6d62 the actual numb │ │ │ -00033ab0: 6572 206d 6179 2062 6520 736d 616c 6c65 er may be smalle │ │ │ -00033ac0: 720a 2064 7565 2074 6f20 7265 7374 7269 r. due to restri │ │ │ -00033ad0: 6374 696f 6e73 2028 6465 7065 6e64 696e ctions (dependin │ │ │ -00033ae0: 6720 6f6e 2074 6865 2069 6d61 6765 2073 g on the image s │ │ │ -00033af0: 697a 6529 2e20 5573 6520 6765 744e 756d ize). Use getNum │ │ │ -00033b00: 6265 724f 6653 7570 6572 7069 7865 6c73 berOfSuperpixels │ │ │ -00033b10: 2829 2074 6f0a 2067 6574 2074 6865 2061 () to. get the a │ │ │ -00033b20: 6374 7561 6c20 6e75 6d62 6572 2e3c 2f64 ctual number..
    sli │ │ │ -00033b40: 6365 733c 2f63 6f64 653e 202d 204e 756d ces - Num │ │ │ -00033b50: 6265 7220 6f66 2070 726f 6365 7373 696e ber of processin │ │ │ -00033b60: 6720 7468 7265 6164 7320 666f 7220 7061 g threads for pa │ │ │ -00033b70: 7261 6c6c 656c 6973 6174 696f 6e2e 2053 rallelisation. S │ │ │ -00033b80: 6574 7469 6e67 202d 3120 7573 6573 2074 etting -1 uses t │ │ │ -00033b90: 6865 206d 6178 696d 756d 206e 756d 6265 he maximum numbe │ │ │ -00033ba0: 720a 206f 6620 7468 7265 6164 732e 2049 r. of threads. I │ │ │ -00033bb0: 6e20 7072 6163 7469 6365 2c20 666f 7572 n practice, four │ │ │ -00033bc0: 2074 6872 6561 6473 2069 7320 656e 6f75 threads is enou │ │ │ -00033bd0: 6768 2066 6f72 2073 6d61 6c6c 6572 2069 gh for smaller i │ │ │ -00033be0: 6d61 6765 7320 616e 6420 6569 6768 7420 mages and eight │ │ │ -00033bf0: 7468 7265 6164 7320 666f 7220 6c61 7267 threads for larg │ │ │ -00033c00: 6572 206f 6e65 732e 3c2f 6464 3e0a 3c64 er ones.
    .merge_sm │ │ │ -00033c20: 616c 6c3c 2f63 6f64 653e 202d 206d 6572 all - mer │ │ │ -00033c30: 6765 2073 6d61 6c6c 2073 6567 6d65 6e74 ge small segment │ │ │ -00033c40: 7320 746f 2067 6976 6520 7468 6520 6465 s to give the de │ │ │ -00033c50: 7369 7265 6420 6e75 6d62 6572 206f 6620 sired number of │ │ │ -00033c60: 7375 7065 7270 6978 656c 732e 2050 726f superpixels. Pro │ │ │ -00033c70: 6365 7373 696e 6720 6973 0a20 6d75 6368 cessing is. much │ │ │ -00033c80: 2066 6173 7465 7220 7769 7468 6f75 7420 faster without │ │ │ -00033c90: 6d65 7267 696e 672c 2062 7574 206d 616e merging, but man │ │ │ -00033ca0: 7920 736d 616c 6c20 7365 676d 656e 7473 y small segments │ │ │ -00033cb0: 2077 696c 6c20 6265 206c 6566 7420 696e will be left in │ │ │ -00033cc0: 2074 6865 2069 6d61 6765 2e3c 2f64 643e the image. │ │ │ -00033cd0: 0a3c 6474 3e52 6574 7572 6e73 3a3c 2f64 .
    Returns:.
    automatic │ │ │ -00033cf0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    .
    .
  • .
  • . │ │ │ -00033d20: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    │ │ │ -00033d60: 0a3c 6833 3e63 7265 6174 6553 6361 6e53 .

    createScanS │ │ │ -00033d70: 6567 6d65 6e74 3c2f 6833 3e0a 3c64 6976 egment

    .
    public static< │ │ │ -00033dc0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> ScanSegmen │ │ │ -00033e30: 743c 2f61 3e3c 2f73 7061 6e3e 266e 6273 t&nbs │ │ │ -00033e40: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;cre │ │ │ -00033e60: 6174 6553 6361 6e53 6567 6d65 6e74 3c2f ateScanSegment(int ima │ │ │ -00033ea0: 6765 5f77 6964 7468 2c0a 2069 6e74 266e ge_width,. int&n │ │ │ -00033eb0: 6273 703b 696d 6167 655f 6865 6967 6874 bsp;image_height │ │ │ -00033ec0: 2c0a 2069 6e74 266e 6273 703b 6e75 6d5f ,. int num_ │ │ │ -00033ed0: 7375 7065 7270 6978 656c 732c 0a20 696e superpixels,. in │ │ │ -00033ee0: 7426 6e62 7370 3b73 6c69 6365 7329 3c2f t slices)
    .
    I │ │ │ -00033f10: 6e69 7469 616c 697a 6573 2061 2053 6361 nitializes a Sca │ │ │ -00033f20: 6e53 6567 6d65 6e74 206f 626a 6563 742e nSegment object. │ │ │ -00033f30: 0a0a 2054 6865 2066 756e 6374 696f 6e20 .. The function │ │ │ -00033f40: 696e 6974 6961 6c69 7a65 7320 6120 5363 initializes a Sc │ │ │ -00033f50: 616e 5365 676d 656e 7420 6f62 6a65 6374 anSegment object │ │ │ -00033f60: 2066 6f72 2074 6865 2069 6e70 7574 2069 for the input i │ │ │ -00033f70: 6d61 6765 2e20 4974 2073 746f 7265 7320 mage. It stores │ │ │ -00033f80: 7468 6520 7061 7261 6d65 7465 7273 206f the parameters o │ │ │ -00033f90: 660a 2074 6865 2069 6d61 6765 3a20 696d f. the image: im │ │ │ -00033fa0: 6167 655f 7769 6474 6820 616e 6420 696d age_width and im │ │ │ -00033fb0: 6167 655f 6865 6967 6874 2e20 4974 2061 age_height. It a │ │ │ -00033fc0: 6c73 6f20 7365 7473 2074 6865 2070 6172 lso sets the par │ │ │ -00033fd0: 616d 6574 6572 7320 6f66 2074 6865 2046 ameters of the F │ │ │ -00033fe0: 2d44 4253 4341 4e20 7375 7065 7270 6978 -DBSCAN superpix │ │ │ -00033ff0: 656c 0a20 616c 676f 7269 7468 6d2c 2077 el. algorithm, w │ │ │ -00034000: 6869 6368 2061 7265 3a20 6e75 6d5f 7375 hich are: num_su │ │ │ -00034010: 7065 7270 6978 656c 732c 2074 6872 6561 perpixels, threa │ │ │ -00034020: 6473 2c20 616e 6420 6d65 7267 655f 736d ds, and merge_sm │ │ │ -00034030: 616c 6c2e 3c2f 6469 763e 0a3c 646c 2063 all.
    .
    .Parameters:.
    ima │ │ │ -00034070: 6765 5f77 6964 7468 3c2f 636f 6465 3e20 ge_width │ │ │ -00034080: 2d20 496d 6167 6520 7769 6474 682e 3c2f - Image width..
    im │ │ │ -000340a0: 6167 655f 6865 6967 6874 3c2f 636f 6465 age_height - Image height │ │ │ -000340c0: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    num_superpixels │ │ │ -000340e0: 3c2f 636f 6465 3e20 2d20 4465 7369 7265 - Desire │ │ │ -000340f0: 6420 6e75 6d62 6572 206f 6620 7375 7065 d number of supe │ │ │ -00034100: 7270 6978 656c 732e 204e 6f74 6520 7468 rpixels. Note th │ │ │ -00034110: 6174 2074 6865 2061 6374 7561 6c20 6e75 at the actual nu │ │ │ -00034120: 6d62 6572 206d 6179 2062 6520 736d 616c mber may be smal │ │ │ -00034130: 6c65 720a 2064 7565 2074 6f20 7265 7374 ler. due to rest │ │ │ -00034140: 7269 6374 696f 6e73 2028 6465 7065 6e64 rictions (depend │ │ │ -00034150: 696e 6720 6f6e 2074 6865 2069 6d61 6765 ing on the image │ │ │ -00034160: 2073 697a 6529 2e20 5573 6520 6765 744e size). Use getN │ │ │ -00034170: 756d 6265 724f 6653 7570 6572 7069 7865 umberOfSuperpixe │ │ │ -00034180: 6c73 2829 2074 6f0a 2067 6574 2074 6865 ls() to. get the │ │ │ -00034190: 2061 6374 7561 6c20 6e75 6d62 6572 2e3c actual number.< │ │ │ -000341a0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e73 /dd>.
    s │ │ │ -000341b0: 6c69 6365 733c 2f63 6f64 653e 202d 204e lices - N │ │ │ -000341c0: 756d 6265 7220 6f66 2070 726f 6365 7373 umber of process │ │ │ -000341d0: 696e 6720 7468 7265 6164 7320 666f 7220 ing threads for │ │ │ -000341e0: 7061 7261 6c6c 656c 6973 6174 696f 6e2e parallelisation. │ │ │ -000341f0: 2053 6574 7469 6e67 202d 3120 7573 6573 Setting -1 uses │ │ │ -00034200: 2074 6865 206d 6178 696d 756d 206e 756d the maximum num │ │ │ -00034210: 6265 720a 206f 6620 7468 7265 6164 732e ber. of threads. │ │ │ -00034220: 2049 6e20 7072 6163 7469 6365 2c20 666f In practice, fo │ │ │ -00034230: 7572 2074 6872 6561 6473 2069 7320 656e ur threads is en │ │ │ -00034240: 6f75 6768 2066 6f72 2073 6d61 6c6c 6572 ough for smaller │ │ │ -00034250: 2069 6d61 6765 7320 616e 6420 6569 6768 images and eigh │ │ │ -00034260: 7420 7468 7265 6164 7320 666f 7220 6c61 t threads for la │ │ │ -00034270: 7267 6572 206f 6e65 732e 0a20 6d75 6368 rger ones.. much │ │ │ -00034280: 2066 6173 7465 7220 7769 7468 6f75 7420 faster without │ │ │ -00034290: 6d65 7267 696e 672c 2062 7574 206d 616e merging, but man │ │ │ -000342a0: 7920 736d 616c 6c20 7365 676d 656e 7473 y small segments │ │ │ -000342b0: 2077 696c 6c20 6265 206c 6566 7420 696e will be left in │ │ │ -000342c0: 2074 6865 2069 6d61 6765 2e3c 2f64 643e the image.
    │ │ │ -000342d0: 0a3c 6474 3e52 6574 7572 6e73 3a3c 2f64 .
    Returns:.
    automatic │ │ │ -000342f0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    ..
  • .
  • . │ │ │ -00034320: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    createScanSegme │ │ │ -00034370: 6e74 3c2f 6833 3e0a 3c64 6976 2063 6c61 nt

    .
    pu │ │ │ -000343b0: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static ScanSegment createS │ │ │ -00034460: 6361 6e53 6567 6d65 6e74 3c2f 7370 616e canSegment( │ │ │ -00034490: 696e 7426 6e62 7370 3b69 6d61 6765 5f77 int image_w │ │ │ -000344a0: 6964 7468 2c0a 2069 6e74 266e 6273 703b idth,. int  │ │ │ -000344b0: 696d 6167 655f 6865 6967 6874 2c0a 2069 image_height,. i │ │ │ -000344c0: 6e74 266e 6273 703b 6e75 6d5f 7375 7065 nt num_supe │ │ │ -000344d0: 7270 6978 656c 7329 3c2f 7370 616e 3e3c rpixels)< │ │ │ -000344e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Initial │ │ │ -00034500: 697a 6573 2061 2053 6361 6e53 6567 6d65 izes a ScanSegme │ │ │ -00034510: 6e74 206f 626a 6563 742e 0a0a 2054 6865 nt object... The │ │ │ -00034520: 2066 756e 6374 696f 6e20 696e 6974 6961 function initia │ │ │ -00034530: 6c69 7a65 7320 6120 5363 616e 5365 676d lizes a ScanSegm │ │ │ -00034540: 656e 7420 6f62 6a65 6374 2066 6f72 2074 ent object for t │ │ │ -00034550: 6865 2069 6e70 7574 2069 6d61 6765 2e20 he input image. │ │ │ -00034560: 4974 2073 746f 7265 7320 7468 6520 7061 It stores the pa │ │ │ -00034570: 7261 6d65 7465 7273 206f 660a 2074 6865 rameters of. the │ │ │ -00034580: 2069 6d61 6765 3a20 696d 6167 655f 7769 image: image_wi │ │ │ -00034590: 6474 6820 616e 6420 696d 6167 655f 6865 dth and image_he │ │ │ -000345a0: 6967 6874 2e20 4974 2061 6c73 6f20 7365 ight. It also se │ │ │ -000345b0: 7473 2074 6865 2070 6172 616d 6574 6572 ts the parameter │ │ │ -000345c0: 7320 6f66 2074 6865 2046 2d44 4253 4341 s of the F-DBSCA │ │ │ -000345d0: 4e20 7375 7065 7270 6978 656c 0a20 616c N superpixel. al │ │ │ -000345e0: 676f 7269 7468 6d2c 2077 6869 6368 2061 gorithm, which a │ │ │ -000345f0: 7265 3a20 6e75 6d5f 7375 7065 7270 6978 re: num_superpix │ │ │ -00034600: 656c 732c 2074 6872 6561 6473 2c20 616e els, threads, an │ │ │ -00034610: 6420 6d65 7267 655f 736d 616c 6c2e 3c2f d merge_small..
    .
    Para │ │ │ -00034640: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    image_wid │ │ │ -00034660: 7468 3c2f 636f 6465 3e20 2d20 496d 6167 th - Imag │ │ │ -00034670: 6520 7769 6474 682e 3c2f 6464 3e0a 3c64 e width.
    .image_he │ │ │ -00034690: 6967 6874 3c2f 636f 6465 3e20 2d20 496d ight - Im │ │ │ -000346a0: 6167 6520 6865 6967 6874 2e3c 2f64 643e age height. │ │ │ -000346b0: 0a3c 6464 3e3c 636f 6465 3e6e 756d 5f73 .
    num_s │ │ │ -000346c0: 7570 6572 7069 7865 6c73 3c2f 636f 6465 uperpixels - Desired numb │ │ │ -000346e0: 6572 206f 6620 7375 7065 7270 6978 656c er of superpixel │ │ │ -000346f0: 732e 204e 6f74 6520 7468 6174 2074 6865 s. Note that the │ │ │ -00034700: 2061 6374 7561 6c20 6e75 6d62 6572 206d actual number m │ │ │ -00034710: 6179 2062 6520 736d 616c 6c65 720a 2064 ay be smaller. d │ │ │ -00034720: 7565 2074 6f20 7265 7374 7269 6374 696f ue to restrictio │ │ │ -00034730: 6e73 2028 6465 7065 6e64 696e 6720 6f6e ns (depending on │ │ │ -00034740: 2074 6865 2069 6d61 6765 2073 697a 6529 the image size) │ │ │ -00034750: 2e20 5573 6520 6765 744e 756d 6265 724f . Use getNumberO │ │ │ -00034760: 6653 7570 6572 7069 7865 6c73 2829 2074 fSuperpixels() t │ │ │ -00034770: 6f0a 2067 6574 2074 6865 2061 6374 7561 o. get the actua │ │ │ -00034780: 6c20 6e75 6d62 6572 2e0a 206f 6620 7468 l number.. of th │ │ │ -00034790: 7265 6164 732e 2049 6e20 7072 6163 7469 reads. In practi │ │ │ -000347a0: 6365 2c20 666f 7572 2074 6872 6561 6473 ce, four threads │ │ │ -000347b0: 2069 7320 656e 6f75 6768 2066 6f72 2073 is enough for s │ │ │ -000347c0: 6d61 6c6c 6572 2069 6d61 6765 7320 616e maller images an │ │ │ -000347d0: 6420 6569 6768 7420 7468 7265 6164 7320 d eight threads │ │ │ -000347e0: 666f 7220 6c61 7267 6572 206f 6e65 732e for larger ones. │ │ │ -000347f0: 0a20 6d75 6368 2066 6173 7465 7220 7769 . much faster wi │ │ │ -00034800: 7468 6f75 7420 6d65 7267 696e 672c 2062 thout merging, b │ │ │ -00034810: 7574 206d 616e 7920 736d 616c 6c20 7365 ut many small se │ │ │ -00034820: 676d 656e 7473 2077 696c 6c20 6265 206c gments will be l │ │ │ -00034830: 6566 7420 696e 2074 6865 2069 6d61 6765 eft in the image │ │ │ -00034840: 2e3c 2f64 643e 0a3c 6474 3e52 6574 7572 .
    .
    Retur │ │ │ -00034850: 6e73 3a3c 2f64 743e 0a3c 6464 3e61 7574 ns:
    .
    aut │ │ │ -00034860: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ -00034870: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
    .
    . │ │ │ -00034880: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e
    .
  • │ │ │ -00034890: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    │ │ │ -00034910: 0a3c 6833 3e52 6164 6f6e 5472 616e 7366 .

    RadonTransf │ │ │ -00034920: 6f72 6d3c 2f68 333e 0a3c 6469 7620 636c orm

    .
    p │ │ │ -00034960: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static void&n │ │ │ -000349a0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;R │ │ │ -000349c0: 6164 6f6e 5472 616e 7366 6f72 6d3c 2f73 adonTransform(M │ │ │ -00034a30: 6174 3c2f 613e 266e 6273 703b 7372 632c at src, │ │ │ -00034a40: 0a20 3c61 2068 7265 663d 222e 2e2f 636f . Ma │ │ │ -00034a80: 743c 2f61 3e26 6e62 7370 3b64 7374 2c0a t dst,. │ │ │ -00034a90: 2064 6f75 626c 6526 6e62 7370 3b74 6865 double the │ │ │ -00034aa0: 7461 2c0a 2064 6f75 626c 6526 6e62 7370 ta,. double  │ │ │ -00034ab0: 3b73 7461 7274 5f61 6e67 6c65 2c0a 2064 ;start_angle,. d │ │ │ -00034ac0: 6f75 626c 6526 6e62 7370 3b65 6e64 5f61 ouble end_a │ │ │ -00034ad0: 6e67 6c65 2c0a 2062 6f6f 6c65 616e 266e ngle,. boolean&n │ │ │ -00034ae0: 6273 703b 6372 6f70 2c0a 2062 6f6f 6c65 bsp;crop,. boole │ │ │ -00034af0: 616e 266e 6273 703b 6e6f 726d 293c 2f73 an norm)
    .
    Ca │ │ │ -00034b20: 6c63 756c 6174 6520 5261 646f 6e20 5472 lculate Radon Tr │ │ │ -00034b30: 616e 7366 6f72 6d20 6f66 2061 6e20 696d ansform of an im │ │ │ -00034b40: 6167 652e 0a0a 2054 6869 7320 6675 6e63 age... This func │ │ │ -00034b50: 7469 6f6e 2063 616c 6375 6c61 7465 7320 tion calculates │ │ │ -00034b60: 7468 6520 5261 646f 6e20 5472 616e 7366 the Radon Transf │ │ │ -00034b70: 6f72 6d20 6f66 2061 2067 6976 656e 2069 orm of a given i │ │ │ -00034b80: 6d61 6765 2069 6e20 616e 7920 7261 6e67 mage in any rang │ │ │ -00034b90: 652e 0a20 5365 6520 6874 7470 733a 2f2f e.. See https:// │ │ │ -00034ba0: 656e 6769 6e65 6572 696e 672e 7075 7264 engineering.purd │ │ │ -00034bb0: 7565 2e65 6475 2f7e 6d61 6c63 6f6c 6d2f ue.edu/~malcolm/ │ │ │ -00034bc0: 7063 742f 4354 495f 4368 3033 2e70 6466 pct/CTI_Ch03.pdf │ │ │ -00034bd0: 2066 6f72 2064 6574 6169 6c2e 0a20 4966 for detail.. If │ │ │ -00034be0: 2074 6865 2069 6e70 7574 2074 7970 6520 the input type │ │ │ -00034bf0: 6973 2043 565f 3855 2c20 7468 6520 6f75 is CV_8U, the ou │ │ │ -00034c00: 7470 7574 2077 696c 6c20 6265 2043 565f tput will be CV_ │ │ │ -00034c10: 3332 532e 0a20 4966 2074 6865 2069 6e70 32S.. If the inp │ │ │ -00034c20: 7574 2074 7970 6520 6973 2043 565f 3332 ut type is CV_32 │ │ │ -00034c30: 4620 6f72 2043 565f 3634 462c 2074 6865 F or CV_64F, the │ │ │ -00034c40: 206f 7574 7075 7420 7769 6c6c 2062 6520 output will be │ │ │ -00034c50: 4356 5f36 3446 0a20 5468 6520 6f75 7470 CV_64F. The outp │ │ │ -00034c60: 7574 2073 697a 6520 7769 6c6c 2062 6520 ut size will be │ │ │ -00034c70: 6e75 6d5f 6f66 5f69 6e74 6567 7261 6c20 num_of_integral │ │ │ -00034c80: 7820 7372 635f 6469 6167 6f6e 616c 5f6c x src_diagonal_l │ │ │ -00034c90: 656e 6774 682e 0a20 4966 2063 726f 7020 ength.. If crop │ │ │ -00034ca0: 6973 2073 656c 6563 7465 642c 2074 6865 is selected, the │ │ │ -00034cb0: 2069 6e70 7574 2069 6d61 6765 2077 696c input image wil │ │ │ -00034cc0: 6c20 6265 2063 726f 7020 696e 746f 2073 l be crop into s │ │ │ -00034cd0: 7175 6172 6520 7468 656e 2063 6972 636c quare then circl │ │ │ -00034ce0: 652c 0a20 616e 6420 6f75 7470 7574 2073 e,. and output s │ │ │ -00034cf0: 697a 6520 7769 6c6c 2062 6520 6e75 6d5f ize will be num_ │ │ │ -00034d00: 6f66 5f69 6e74 6567 7261 6c20 7820 6d69 of_integral x mi │ │ │ -00034d10: 6e5f 6564 6765 2e3c 2f64 6976 3e0a 3c64 n_edge.
    . │ │ │ -00034d30: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ -00034d40: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -00034d50: 7372 633c 2f63 6f64 653e 202d 2061 7574 src - aut │ │ │ -00034d60: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ -00034d70: 6174 6564 3c2f 6464 3e0a 3c64 643e 3c63 ated
    .
    dst - │ │ │ -00034d90: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ -00034da0: 656e 6572 6174 6564 3c2f 6464 3e0a 3c64 enerated
    .theta - automatic │ │ │ -00034dd0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    st │ │ │ -00034df0: 6172 745f 616e 676c 653c 2f63 6f64 653e art_angle │ │ │ -00034e00: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ -00034e10: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
    . │ │ │ -00034e20: 3c64 643e 3c63 6f64 653e 656e 645f 616e
    end_an │ │ │ -00034e30: 676c 653c 2f63 6f64 653e 202d 2061 7574 gle - aut │ │ │ -00034e40: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ -00034e50: 6174 6564 3c2f 6464 3e0a 3c64 643e 3c63 ated
    .
    crop │ │ │ -00034e70: 2d20 6175 746f 6d61 7469 6361 6c6c 7920 - automatically │ │ │ -00034e80: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated
    .< │ │ │ -00034e90: 6464 3e3c 636f 6465 3e6e 6f72 6d3c 2f63 dd>norm - automatic │ │ │ -00034eb0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated...
  • .
  • . │ │ │ -00034ee0: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    RadonTran │ │ │ -00034f60: 7366 6f72 6d3c 2f68 333e 0a3c 6469 7620 sform

    .
    public static void │ │ │ -00034fe0: 266e 6273 703b 3c73 7061 6e20 636c 6173  RadonTransform< │ │ │ -00035010: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(Mat sr │ │ │ -00035080: 632c 0a20 3c61 2068 7265 663d 222e 2e2f c,. │ │ │ -000350c0: 4d61 743c 2f61 3e26 6e62 7370 3b64 7374 Mat dst │ │ │ -000350d0: 2c0a 2064 6f75 626c 6526 6e62 7370 3b74 ,. double t │ │ │ -000350e0: 6865 7461 2c0a 2064 6f75 626c 6526 6e62 heta,. double&nb │ │ │ -000350f0: 7370 3b73 7461 7274 5f61 6e67 6c65 2c0a sp;start_angle,. │ │ │ -00035100: 2064 6f75 626c 6526 6e62 7370 3b65 6e64 double end │ │ │ -00035110: 5f61 6e67 6c65 2c0a 2062 6f6f 6c65 616e _angle,. boolean │ │ │ -00035120: 266e 6273 703b 6372 6f70 293c 2f73 7061  crop)
    .
    Calc │ │ │ -00035150: 756c 6174 6520 5261 646f 6e20 5472 616e ulate Radon Tran │ │ │ -00035160: 7366 6f72 6d20 6f66 2061 6e20 696d 6167 sform of an imag │ │ │ -00035170: 652e 0a0a 2054 6869 7320 6675 6e63 7469 e... This functi │ │ │ -00035180: 6f6e 2063 616c 6375 6c61 7465 7320 7468 on calculates th │ │ │ -00035190: 6520 5261 646f 6e20 5472 616e 7366 6f72 e Radon Transfor │ │ │ -000351a0: 6d20 6f66 2061 2067 6976 656e 2069 6d61 m of a given ima │ │ │ -000351b0: 6765 2069 6e20 616e 7920 7261 6e67 652e ge in any range. │ │ │ -000351c0: 0a20 5365 6520 6874 7470 733a 2f2f 656e . See https://en │ │ │ -000351d0: 6769 6e65 6572 696e 672e 7075 7264 7565 gineering.purdue │ │ │ -000351e0: 2e65 6475 2f7e 6d61 6c63 6f6c 6d2f 7063 .edu/~malcolm/pc │ │ │ -000351f0: 742f 4354 495f 4368 3033 2e70 6466 2066 t/CTI_Ch03.pdf f │ │ │ -00035200: 6f72 2064 6574 6169 6c2e 0a20 4966 2074 or detail.. If t │ │ │ -00035210: 6865 2069 6e70 7574 2074 7970 6520 6973 he input type is │ │ │ -00035220: 2043 565f 3855 2c20 7468 6520 6f75 7470 CV_8U, the outp │ │ │ -00035230: 7574 2077 696c 6c20 6265 2043 565f 3332 ut will be CV_32 │ │ │ -00035240: 532e 0a20 4966 2074 6865 2069 6e70 7574 S.. If the input │ │ │ -00035250: 2074 7970 6520 6973 2043 565f 3332 4620 type is CV_32F │ │ │ -00035260: 6f72 2043 565f 3634 462c 2074 6865 206f or CV_64F, the o │ │ │ -00035270: 7574 7075 7420 7769 6c6c 2062 6520 4356 utput will be CV │ │ │ -00035280: 5f36 3446 0a20 5468 6520 6f75 7470 7574 _64F. The output │ │ │ -00035290: 2073 697a 6520 7769 6c6c 2062 6520 6e75 size will be nu │ │ │ -000352a0: 6d5f 6f66 5f69 6e74 6567 7261 6c20 7820 m_of_integral x │ │ │ -000352b0: 7372 635f 6469 6167 6f6e 616c 5f6c 656e src_diagonal_len │ │ │ -000352c0: 6774 682e 0a20 4966 2063 726f 7020 6973 gth.. If crop is │ │ │ -000352d0: 2073 656c 6563 7465 642c 2074 6865 2069 selected, the i │ │ │ -000352e0: 6e70 7574 2069 6d61 6765 2077 696c 6c20 nput image will │ │ │ -000352f0: 6265 2063 726f 7020 696e 746f 2073 7175 be crop into squ │ │ │ -00035300: 6172 6520 7468 656e 2063 6972 636c 652c are then circle, │ │ │ -00035310: 0a20 616e 6420 6f75 7470 7574 2073 697a . and output siz │ │ │ -00035320: 6520 7769 6c6c 2062 6520 6e75 6d5f 6f66 e will be num_of │ │ │ -00035330: 5f69 6e74 6567 7261 6c20 7820 6d69 6e5f _integral x min_ │ │ │ -00035340: 6564 6765 2e3c 2f64 6976 3e0a 3c64 6c20 edge.
    .
    .< │ │ │ -00035360: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
    sr │ │ │ -00035380: 633c 2f63 6f64 653e 202d 2061 7574 6f6d c - autom │ │ │ -00035390: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -000353a0: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
    .
    dst - a │ │ │ -000353c0: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ -000353d0: 6572 6174 6564 3c2f 6464 3e0a 3c64 643e erated
    .
    │ │ │ -000353e0: 3c63 6f64 653e 7468 6574 613c 2f63 6f64 theta - automatical │ │ │ -00035400: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
    .
    star │ │ │ -00035420: 745f 616e 676c 653c 2f63 6f64 653e 202d t_angle - │ │ │ -00035430: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ -00035440: 656e 6572 6174 6564 3c2f 6464 3e0a 3c64 enerated
    .end_angl │ │ │ -00035460: 653c 2f63 6f64 653e 202d 2061 7574 6f6d e - autom │ │ │ -00035470: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -00035480: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed.
    crop - │ │ │ -000354a0: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ -000354b0: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
    ..
    ..
  • ..

    RadonTra │ │ │ -00035550: 6e73 666f 726d 3c2f 6833 3e0a 3c64 6976 nsform

    .
    public static< │ │ │ -000355a0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> void RadonTransform │ │ │ -00035600: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (Mat s │ │ │ -00035670: 7263 2c0a 203c 6120 6872 6566 3d22 2e2e rc,. Mat ds │ │ │ -000356c0: 742c 0a20 646f 7562 6c65 266e 6273 703b t,. double  │ │ │ -000356d0: 7468 6574 612c 0a20 646f 7562 6c65 266e theta,. double&n │ │ │ -000356e0: 6273 703b 7374 6172 745f 616e 676c 652c bsp;start_angle, │ │ │ -000356f0: 0a20 646f 7562 6c65 266e 6273 703b 656e . double en │ │ │ -00035700: 645f 616e 676c 6529 3c2f 7370 616e 3e3c d_angle)< │ │ │ -00035710: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Calcula │ │ │ -00035730: 7465 2052 6164 6f6e 2054 7261 6e73 666f te Radon Transfo │ │ │ -00035740: 726d 206f 6620 616e 2069 6d61 6765 2e0a rm of an image.. │ │ │ -00035750: 0a20 5468 6973 2066 756e 6374 696f 6e20 . This function │ │ │ -00035760: 6361 6c63 756c 6174 6573 2074 6865 2052 calculates the R │ │ │ -00035770: 6164 6f6e 2054 7261 6e73 666f 726d 206f adon Transform o │ │ │ -00035780: 6620 6120 6769 7665 6e20 696d 6167 6520 f a given image │ │ │ -00035790: 696e 2061 6e79 2072 616e 6765 2e0a 2053 in any range.. S │ │ │ -000357a0: 6565 2068 7474 7073 3a2f 2f65 6e67 696e ee https://engin │ │ │ -000357b0: 6565 7269 6e67 2e70 7572 6475 652e 6564 eering.purdue.ed │ │ │ -000357c0: 752f 7e6d 616c 636f 6c6d 2f70 6374 2f43 u/~malcolm/pct/C │ │ │ -000357d0: 5449 5f43 6830 332e 7064 6620 666f 7220 TI_Ch03.pdf for │ │ │ -000357e0: 6465 7461 696c 2e0a 2049 6620 7468 6520 detail.. If the │ │ │ -000357f0: 696e 7075 7420 7479 7065 2069 7320 4356 input type is CV │ │ │ -00035800: 5f38 552c 2074 6865 206f 7574 7075 7420 _8U, the output │ │ │ -00035810: 7769 6c6c 2062 6520 4356 5f33 3253 2e0a will be CV_32S.. │ │ │ -00035820: 2049 6620 7468 6520 696e 7075 7420 7479 If the input ty │ │ │ -00035830: 7065 2069 7320 4356 5f33 3246 206f 7220 pe is CV_32F or │ │ │ -00035840: 4356 5f36 3446 2c20 7468 6520 6f75 7470 CV_64F, the outp │ │ │ -00035850: 7574 2077 696c 6c20 6265 2043 565f 3634 ut will be CV_64 │ │ │ -00035860: 460a 2054 6865 206f 7574 7075 7420 7369 F. The output si │ │ │ -00035870: 7a65 2077 696c 6c20 6265 206e 756d 5f6f ze will be num_o │ │ │ -00035880: 665f 696e 7465 6772 616c 2078 2073 7263 f_integral x src │ │ │ -00035890: 5f64 6961 676f 6e61 6c5f 6c65 6e67 7468 _diagonal_length │ │ │ -000358a0: 2e0a 2049 6620 6372 6f70 2069 7320 7365 .. If crop is se │ │ │ -000358b0: 6c65 6374 6564 2c20 7468 6520 696e 7075 lected, the inpu │ │ │ -000358c0: 7420 696d 6167 6520 7769 6c6c 2062 6520 t image will be │ │ │ -000358d0: 6372 6f70 2069 6e74 6f20 7371 7561 7265 crop into square │ │ │ -000358e0: 2074 6865 6e20 6369 7263 6c65 2c0a 2061 then circle,. a │ │ │ -000358f0: 6e64 206f 7574 7075 7420 7369 7a65 2077 nd output size w │ │ │ -00035900: 696c 6c20 6265 206e 756d 5f6f 665f 696e ill be num_of_in │ │ │ -00035910: 7465 6772 616c 2078 206d 696e 5f65 6467 tegral x min_edg │ │ │ -00035920: 652e 3c2f 6469 763e 0a3c 646c 2063 6c61 e.
    .
    .
    │ │ │ -00035940: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
    │ │ │ -00035950: 0a3c 6464 3e3c 636f 6465 3e73 7263 3c2f .
    src - automati │ │ │ -00035970: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -00035980: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e64 /dd>.
    d │ │ │ -00035990: 7374 3c2f 636f 6465 3e20 2d20 6175 746f st - auto │ │ │ -000359a0: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ -000359b0: 7465 643c 2f64 643e 0a3c 6464 3e3c 636f ted
    .
    theta │ │ │ -000359d0: 2d20 6175 746f 6d61 7469 6361 6c6c 7920 - automatically │ │ │ -000359e0: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated
    .< │ │ │ -000359f0: 6464 3e3c 636f 6465 3e73 7461 7274 5f61 dd>start_a │ │ │ -00035a00: 6e67 6c65 3c2f 636f 6465 3e20 2d20 6175 ngle - au │ │ │ -00035a10: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -00035a20: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated.
    < │ │ │ -00035a30: 636f 6465 3e65 6e64 5f61 6e67 6c65 3c2f code>end_angle - automati │ │ │ -00035a50: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -00035a60: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.
    ..
  • .
  • │ │ │ -00035a80: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    .

    RadonTr │ │ │ -00035af0: 616e 7366 6f72 6d3c 2f68 333e 0a3c 6469 ansform

    .public static │ │ │ -00035b40: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  void RadonTransfor │ │ │ -00035ba0: 6d3c 2f73 7061 6e3e 3c77 6272 3e3c 7370 m(Mat  │ │ │ -00035c10: 7372 632c 0a20 3c61 2068 7265 663d 222e src,. Mat d │ │ │ -00035c60: 7374 2c0a 2064 6f75 626c 6526 6e62 7370 st,. double  │ │ │ -00035c70: 3b74 6865 7461 2c0a 2064 6f75 626c 6526 ;theta,. double& │ │ │ -00035c80: 6e62 7370 3b73 7461 7274 5f61 6e67 6c65 nbsp;start_angle │ │ │ -00035c90: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ).< │ │ │ -00035ca0: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ -00035cb0: 223e 4361 6c63 756c 6174 6520 5261 646f ">Calculate Rado │ │ │ -00035cc0: 6e20 5472 616e 7366 6f72 6d20 6f66 2061 n Transform of a │ │ │ -00035cd0: 6e20 696d 6167 652e 0a0a 2054 6869 7320 n image... This │ │ │ -00035ce0: 6675 6e63 7469 6f6e 2063 616c 6375 6c61 function calcula │ │ │ -00035cf0: 7465 7320 7468 6520 5261 646f 6e20 5472 tes the Radon Tr │ │ │ -00035d00: 616e 7366 6f72 6d20 6f66 2061 2067 6976 ansform of a giv │ │ │ -00035d10: 656e 2069 6d61 6765 2069 6e20 616e 7920 en image in any │ │ │ -00035d20: 7261 6e67 652e 0a20 5365 6520 6874 7470 range.. See http │ │ │ -00035d30: 733a 2f2f 656e 6769 6e65 6572 696e 672e s://engineering. │ │ │ -00035d40: 7075 7264 7565 2e65 6475 2f7e 6d61 6c63 purdue.edu/~malc │ │ │ -00035d50: 6f6c 6d2f 7063 742f 4354 495f 4368 3033 olm/pct/CTI_Ch03 │ │ │ -00035d60: 2e70 6466 2066 6f72 2064 6574 6169 6c2e .pdf for detail. │ │ │ -00035d70: 0a20 4966 2074 6865 2069 6e70 7574 2074 . If the input t │ │ │ -00035d80: 7970 6520 6973 2043 565f 3855 2c20 7468 ype is CV_8U, th │ │ │ -00035d90: 6520 6f75 7470 7574 2077 696c 6c20 6265 e output will be │ │ │ -00035da0: 2043 565f 3332 532e 0a20 4966 2074 6865 CV_32S.. If the │ │ │ -00035db0: 2069 6e70 7574 2074 7970 6520 6973 2043 input type is C │ │ │ -00035dc0: 565f 3332 4620 6f72 2043 565f 3634 462c V_32F or CV_64F, │ │ │ -00035dd0: 2074 6865 206f 7574 7075 7420 7769 6c6c the output will │ │ │ -00035de0: 2062 6520 4356 5f36 3446 0a20 5468 6520 be CV_64F. The │ │ │ -00035df0: 6f75 7470 7574 2073 697a 6520 7769 6c6c output size will │ │ │ -00035e00: 2062 6520 6e75 6d5f 6f66 5f69 6e74 6567 be num_of_integ │ │ │ -00035e10: 7261 6c20 7820 7372 635f 6469 6167 6f6e ral x src_diagon │ │ │ -00035e20: 616c 5f6c 656e 6774 682e 0a20 4966 2063 al_length.. If c │ │ │ -00035e30: 726f 7020 6973 2073 656c 6563 7465 642c rop is selected, │ │ │ -00035e40: 2074 6865 2069 6e70 7574 2069 6d61 6765 the input image │ │ │ -00035e50: 2077 696c 6c20 6265 2063 726f 7020 696e will be crop in │ │ │ -00035e60: 746f 2073 7175 6172 6520 7468 656e 2063 to square then c │ │ │ -00035e70: 6972 636c 652c 0a20 616e 6420 6f75 7470 ircle,. and outp │ │ │ -00035e80: 7574 2073 697a 6520 7769 6c6c 2062 6520 ut size will be │ │ │ -00035e90: 6e75 6d5f 6f66 5f69 6e74 6567 7261 6c20 num_of_integral │ │ │ -00035ea0: 7820 6d69 6e5f 6564 6765 2e3c 2f64 6976 x min_edge..
    .
    Paramet │ │ │ -00035ed0: 6572 733a 3c2f 6474 3e0a 3c64 643e 3c63 ers:
    .
    src - │ │ │ -00035ef0: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ -00035f00: 656e 6572 6174 6564 3c2f 6464 3e0a 3c64 enerated
    .dst - automatical │ │ │ -00035f30: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated.
    thet │ │ │ -00035f50: 613c 2f63 6f64 653e 202d 2061 7574 6f6d a - autom │ │ │ -00035f60: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -00035f70: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
    .
    start_angle - automatic │ │ │ -00035fa0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    ..
  • .
  • . │ │ │ -00035fd0: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    RadonTransform< │ │ │ -00036040: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ -00036080: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ -00036090: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;v │ │ │ -000360b0: 6f69 643c 2f73 7061 6e3e 266e 6273 703b oid  │ │ │ -000360c0: 3c73 7061 6e20 636c 6173 733d 2265 6c65 Radon │ │ │ -000360e0: 5472 616e 7366 6f72 6d3c 2f73 7061 6e3e Transform │ │ │ -000360f0: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ -00036110: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -00036120: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -00036130: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -00036140: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat src,. Mat dst,. dou │ │ │ -000361b0: 626c 6526 6e62 7370 3b74 6865 7461 293c ble theta)< │ │ │ -000361c0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ -000361e0: 4361 6c63 756c 6174 6520 5261 646f 6e20 Calculate Radon │ │ │ -000361f0: 5472 616e 7366 6f72 6d20 6f66 2061 6e20 Transform of an │ │ │ -00036200: 696d 6167 652e 0a0a 2054 6869 7320 6675 image... This fu │ │ │ -00036210: 6e63 7469 6f6e 2063 616c 6375 6c61 7465 nction calculate │ │ │ -00036220: 7320 7468 6520 5261 646f 6e20 5472 616e s the Radon Tran │ │ │ -00036230: 7366 6f72 6d20 6f66 2061 2067 6976 656e sform of a given │ │ │ -00036240: 2069 6d61 6765 2069 6e20 616e 7920 7261 image in any ra │ │ │ -00036250: 6e67 652e 0a20 5365 6520 6874 7470 733a nge.. See https: │ │ │ -00036260: 2f2f 656e 6769 6e65 6572 696e 672e 7075 //engineering.pu │ │ │ -00036270: 7264 7565 2e65 6475 2f7e 6d61 6c63 6f6c rdue.edu/~malcol │ │ │ -00036280: 6d2f 7063 742f 4354 495f 4368 3033 2e70 m/pct/CTI_Ch03.p │ │ │ -00036290: 6466 2066 6f72 2064 6574 6169 6c2e 0a20 df for detail.. │ │ │ -000362a0: 4966 2074 6865 2069 6e70 7574 2074 7970 If the input typ │ │ │ -000362b0: 6520 6973 2043 565f 3855 2c20 7468 6520 e is CV_8U, the │ │ │ -000362c0: 6f75 7470 7574 2077 696c 6c20 6265 2043 output will be C │ │ │ -000362d0: 565f 3332 532e 0a20 4966 2074 6865 2069 V_32S.. If the i │ │ │ -000362e0: 6e70 7574 2074 7970 6520 6973 2043 565f nput type is CV_ │ │ │ -000362f0: 3332 4620 6f72 2043 565f 3634 462c 2074 32F or CV_64F, t │ │ │ -00036300: 6865 206f 7574 7075 7420 7769 6c6c 2062 he output will b │ │ │ -00036310: 6520 4356 5f36 3446 0a20 5468 6520 6f75 e CV_64F. The ou │ │ │ -00036320: 7470 7574 2073 697a 6520 7769 6c6c 2062 tput size will b │ │ │ -00036330: 6520 6e75 6d5f 6f66 5f69 6e74 6567 7261 e num_of_integra │ │ │ -00036340: 6c20 7820 7372 635f 6469 6167 6f6e 616c l x src_diagonal │ │ │ -00036350: 5f6c 656e 6774 682e 0a20 4966 2063 726f _length.. If cro │ │ │ -00036360: 7020 6973 2073 656c 6563 7465 642c 2074 p is selected, t │ │ │ -00036370: 6865 2069 6e70 7574 2069 6d61 6765 2077 he input image w │ │ │ -00036380: 696c 6c20 6265 2063 726f 7020 696e 746f ill be crop into │ │ │ -00036390: 2073 7175 6172 6520 7468 656e 2063 6972 square then cir │ │ │ -000363a0: 636c 652c 0a20 616e 6420 6f75 7470 7574 cle,. and output │ │ │ -000363b0: 2073 697a 6520 7769 6c6c 2062 6520 6e75 size will be nu │ │ │ -000363c0: 6d5f 6f66 5f69 6e74 6567 7261 6c20 7820 m_of_integral x │ │ │ -000363d0: 6d69 6e5f 6564 6765 2e3c 2f64 6976 3e0a min_edge.. │ │ │ -000363e0: 3c64 6c20 636c 6173 733d 226e 6f74 6573
    .
    Parameter │ │ │ -00036400: 733a 3c2f 6474 3e0a 3c64 643e 3c63 6f64 s:
    .
    src - a │ │ │ -00036420: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ -00036430: 6572 6174 6564 3c2f 6464 3e0a 3c64 643e erated
    .
    │ │ │ -00036440: 3c63 6f64 653e 6473 743c 2f63 6f64 653e dst │ │ │ -00036450: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ -00036460: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
    . │ │ │ -00036470: 3c64 643e 3c63 6f64 653e 7468 6574 613c
    theta< │ │ │ -00036480: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ -00036490: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ -000364a0: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365
    .
    ..

  • .
  • .
    .

    Rado │ │ │ -00036520: 6e54 7261 6e73 666f 726d 3c2f 6833 3e0a nTransform

    . │ │ │ -00036530: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
    public sta │ │ │ -00036570: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ -00036580: 3c73 7061 6e20 636c 6173 733d 2272 6574 void RadonTrans │ │ │ -000365d0: 666f 726d 3c2f 7370 616e 3e3c 7762 723e form │ │ │ -000365e0: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Mat&nb │ │ │ -00036640: 7370 3b73 7263 2c0a 203c 6120 6872 6566 sp;src,. Mat&nbs │ │ │ -00036690: 703b 6473 7429 3c2f 7370 616e 3e3c 2f64 p;dst).
    Calculate │ │ │ -000366c0: 2052 6164 6f6e 2054 7261 6e73 666f 726d Radon Transform │ │ │ -000366d0: 206f 6620 616e 2069 6d61 6765 2e0a 0a20 of an image... │ │ │ -000366e0: 5468 6973 2066 756e 6374 696f 6e20 6361 This function ca │ │ │ -000366f0: 6c63 756c 6174 6573 2074 6865 2052 6164 lculates the Rad │ │ │ -00036700: 6f6e 2054 7261 6e73 666f 726d 206f 6620 on Transform of │ │ │ -00036710: 6120 6769 7665 6e20 696d 6167 6520 696e a given image in │ │ │ -00036720: 2061 6e79 2072 616e 6765 2e0a 2053 6565 any range.. See │ │ │ -00036730: 2068 7474 7073 3a2f 2f65 6e67 696e 6565 https://enginee │ │ │ -00036740: 7269 6e67 2e70 7572 6475 652e 6564 752f ring.purdue.edu/ │ │ │ -00036750: 7e6d 616c 636f 6c6d 2f70 6374 2f43 5449 ~malcolm/pct/CTI │ │ │ -00036760: 5f43 6830 332e 7064 6620 666f 7220 6465 _Ch03.pdf for de │ │ │ -00036770: 7461 696c 2e0a 2049 6620 7468 6520 696e tail.. If the in │ │ │ -00036780: 7075 7420 7479 7065 2069 7320 4356 5f38 put type is CV_8 │ │ │ -00036790: 552c 2074 6865 206f 7574 7075 7420 7769 U, the output wi │ │ │ -000367a0: 6c6c 2062 6520 4356 5f33 3253 2e0a 2049 ll be CV_32S.. I │ │ │ -000367b0: 6620 7468 6520 696e 7075 7420 7479 7065 f the input type │ │ │ -000367c0: 2069 7320 4356 5f33 3246 206f 7220 4356 is CV_32F or CV │ │ │ -000367d0: 5f36 3446 2c20 7468 6520 6f75 7470 7574 _64F, the output │ │ │ -000367e0: 2077 696c 6c20 6265 2043 565f 3634 460a will be CV_64F. │ │ │ -000367f0: 2054 6865 206f 7574 7075 7420 7369 7a65 The output size │ │ │ -00036800: 2077 696c 6c20 6265 206e 756d 5f6f 665f will be num_of_ │ │ │ -00036810: 696e 7465 6772 616c 2078 2073 7263 5f64 integral x src_d │ │ │ -00036820: 6961 676f 6e61 6c5f 6c65 6e67 7468 2e0a iagonal_length.. │ │ │ -00036830: 2049 6620 6372 6f70 2069 7320 7365 6c65 If crop is sele │ │ │ -00036840: 6374 6564 2c20 7468 6520 696e 7075 7420 cted, the input │ │ │ -00036850: 696d 6167 6520 7769 6c6c 2062 6520 6372 image will be cr │ │ │ -00036860: 6f70 2069 6e74 6f20 7371 7561 7265 2074 op into square t │ │ │ -00036870: 6865 6e20 6369 7263 6c65 2c0a 2061 6e64 hen circle,. and │ │ │ -00036880: 206f 7574 7075 7420 7369 7a65 2077 696c output size wil │ │ │ -00036890: 6c20 6265 206e 756d 5f6f 665f 696e 7465 l be num_of_inte │ │ │ -000368a0: 6772 616c 2078 206d 696e 5f65 6467 652e gral x min_edge. │ │ │ -000368b0: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ -000368d0: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ -000368e0: 6464 3e3c 636f 6465 3e73 7263 3c2f 636f dd>src - automatica │ │ │ -00036900: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    dst │ │ │ -00036920: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ -00036930: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -00036940: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
    .
    .
    .
  • ..
    .PeiLinNormaliz │ │ │ -000369d0: 6174 696f 6e3c 2f68 333e 0a3c 6469 7620 ation.
    public static void │ │ │ -00036a50: 266e 6273 703b 3c73 7061 6e20 636c 6173  PeiLinNormaliza │ │ │ -00036a80: 7469 6f6e 3c2f 7370 616e 3e3c 7762 723e tion │ │ │ -00036a90: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Mat&nb │ │ │ -00036af0: 7370 3b49 2c0a 203c 6120 6872 6566 3d22 sp;I,. Mat  │ │ │ -00036b40: 5429 3c2f 7370 616e 3e3c 2f64 6976 3e0a T)
    . │ │ │ -00036b50: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e
    . │ │ │ -00036b60: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .

    creat │ │ │ -00036bc0: 6553 7570 6572 7069 7865 6c4c 5343 3c2f eSuperpixelLSC.
    public │ │ │ -00036c10: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ -00036c20: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp; │ │ │ -00036c80: 5375 7065 7270 6978 656c 4c53 433c 2f61 SuperpixelLSC createS │ │ │ -00036cc0: 7570 6572 7069 7865 6c4c 5343 3c2f 7370 uperpixelLSC(Ma │ │ │ -00036d30: 743c 2f61 3e26 6e62 7370 3b69 6d61 6765 t image │ │ │ -00036d40: 2c0a 2069 6e74 266e 6273 703b 7265 6769 ,. int regi │ │ │ -00036d50: 6f6e 5f73 697a 652c 0a20 666c 6f61 7426 on_size,. float& │ │ │ -00036d60: 6e62 7370 3b72 6174 696f 293c 2f73 7061 nbsp;ratio)
    .
    Clas │ │ │ -00036d90: 7320 696d 706c 656d 656e 7469 6e67 2074 s implementing t │ │ │ -00036da0: 6865 204c 5343 2028 4c69 6e65 6172 2053 he LSC (Linear S │ │ │ -00036db0: 7065 6374 7261 6c20 436c 7573 7465 7269 pectral Clusteri │ │ │ -00036dc0: 6e67 2920 7375 7065 7270 6978 656c 733c ng) superpixels< │ │ │ -00036dd0: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ -00036df0: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .image - Image to │ │ │ -00036e20: 7365 676d 656e 743c 2f64 643e 0a3c 6464 segment.
    region_si │ │ │ -00036e40: 7a65 3c2f 636f 6465 3e20 2d20 4368 6f6f ze - Choo │ │ │ -00036e50: 7365 7320 616e 2061 7665 7261 6765 2073 ses an average s │ │ │ -00036e60: 7570 6572 7069 7865 6c20 7369 7a65 206d uperpixel size m │ │ │ -00036e70: 6561 7375 7265 6420 696e 2070 6978 656c easured in pixel │ │ │ -00036e80: 733c 2f64 643e 0a3c 6464 3e3c 636f 6465 s
    .
    ratio - │ │ │ -00036ea0: 4368 6f6f 7365 7320 7468 6520 656e 666f Chooses the enfo │ │ │ -00036eb0: 7263 656d 656e 7420 6f66 2073 7570 6572 rcement of super │ │ │ -00036ec0: 7069 7865 6c20 636f 6d70 6163 746e 6573 pixel compactnes │ │ │ -00036ed0: 7320 6661 6374 6f72 206f 6620 7375 7065 s factor of supe │ │ │ -00036ee0: 7270 6978 656c 0a0a 2054 6865 2066 756e rpixel.. The fun │ │ │ -00036ef0: 6374 696f 6e20 696e 6974 6961 6c69 7a65 ction initialize │ │ │ -00036f00: 7320 6120 5375 7065 7270 6978 656c 4c53 s a SuperpixelLS │ │ │ -00036f10: 4320 6f62 6a65 6374 2066 6f72 2074 6865 C object for the │ │ │ -00036f20: 2069 6e70 7574 2069 6d61 6765 2e20 4974 input image. It │ │ │ -00036f30: 2073 6574 7320 7468 6520 7061 7261 6d65 sets the parame │ │ │ -00036f40: 7465 7273 206f 660a 2073 7570 6572 7069 ters of. superpi │ │ │ -00036f50: 7865 6c20 616c 676f 7269 7468 6d2c 2077 xel algorithm, w │ │ │ -00036f60: 6869 6368 2061 7265 3a20 7265 6769 6f6e hich are: region │ │ │ -00036f70: 5f73 697a 6520 616e 6420 7275 6c65 722e _size and ruler. │ │ │ -00036f80: 2049 7420 7072 6561 6c6c 6f63 6174 6520 It preallocate │ │ │ -00036f90: 736f 6d65 2062 7566 6665 7273 2066 6f72 some buffers for │ │ │ -00036fa0: 2066 7574 7572 650a 2063 6f6d 7075 7469 future. computi │ │ │ -00036fb0: 6e67 2069 7465 7261 7469 6f6e 7320 6f76 ng iterations ov │ │ │ -00036fc0: 6572 2074 6865 2067 6976 656e 2069 6d61 er the given ima │ │ │ -00036fd0: 6765 2e20 416e 2065 7861 6d70 6c65 206f ge. An example o │ │ │ -00036fe0: 6620 4c53 4320 6973 2069 6c75 7374 7261 f LSC is ilustra │ │ │ -00036ff0: 7465 6420 696e 2074 6865 2066 6f6c 6c6f ted in the follo │ │ │ -00037000: 7769 6e67 2070 6963 7475 7265 2e0a 2046 wing picture.. F │ │ │ -00037010: 6f72 2065 6e61 6e63 6865 6420 7265 7375 or enanched resu │ │ │ -00037020: 6c74 7320 6974 2069 7320 7265 636f 6d6d lts it is recomm │ │ │ -00037030: 656e 6465 6420 666f 7220 636f 6c6f 7220 ended for color │ │ │ -00037040: 696d 6167 6573 2074 6f20 7072 6570 726f images to prepro │ │ │ -00037050: 6365 7373 2069 6d61 6765 2077 6974 6820 cess image with │ │ │ -00037060: 6c69 7474 6c65 2067 6175 7373 6961 6e20 little gaussian │ │ │ -00037070: 626c 7572 0a20 7769 7468 2061 2073 6d61 blur. with a sma │ │ │ -00037080: 6c6c 2033 2078 2033 206b 6572 6e65 6c20 ll 3 x 3 kernel │ │ │ -00037090: 616e 6420 6164 6469 7469 6f6e 616c 2063 and additional c │ │ │ -000370a0: 6f6e 7665 7273 696f 6e20 696e 746f 2043 onversion into C │ │ │ -000370b0: 6965 4c41 4220 636f 6c6f 7220 7370 6163 ieLAB color spac │ │ │ -000370c0: 652e 0a0a 2021 5b69 6d61 6765 5d28 7069 e... ![image](pi │ │ │ -000370d0: 6373 2f73 7570 6572 7069 7865 6c73 5f6c cs/superpixels_l │ │ │ -000370e0: 7363 2e70 6e67 293c 2f64 643e 0a3c 6474 sc.png)
    .
    Returns:
    .< │ │ │ -00037100: 6464 3e61 7574 6f6d 6174 6963 616c 6c79 dd>automatically │ │ │ -00037110: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated. │ │ │ -00037120: 3c2f 646c 3e0a 3c2f 7365 6374 696f 6e3e
    .

    │ │ │ -00037130: 0a3c 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 .
  • .
  • ..

    creat │ │ │ -00037190: 6553 7570 6572 7069 7865 6c4c 5343 3c2f eSuperpixelLSC.
    public │ │ │ -000371e0: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ -000371f0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp; │ │ │ -00037250: 5375 7065 7270 6978 656c 4c53 433c 2f61 SuperpixelLSC createS │ │ │ -00037290: 7570 6572 7069 7865 6c4c 5343 3c2f 7370 uperpixelLSC(Ma │ │ │ -00037300: 743c 2f61 3e26 6e62 7370 3b69 6d61 6765 t image │ │ │ -00037310: 2c0a 2069 6e74 266e 6273 703b 7265 6769 ,. int regi │ │ │ -00037320: 6f6e 5f73 697a 6529 3c2f 7370 616e 3e3c on_size)< │ │ │ -00037330: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Class i │ │ │ -00037350: 6d70 6c65 6d65 6e74 696e 6720 7468 6520 mplementing the │ │ │ -00037360: 4c53 4320 284c 696e 6561 7220 5370 6563 LSC (Linear Spec │ │ │ -00037370: 7472 616c 2043 6c75 7374 6572 696e 6729 tral Clustering) │ │ │ -00037380: 2073 7570 6572 7069 7865 6c73 3c2f 6469 superpixels.
    .
    Parame │ │ │ -000373b0: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
    .
    < │ │ │ -000373c0: 636f 6465 3e69 6d61 6765 3c2f 636f 6465 code>image - Image to seg │ │ │ -000373e0: 6d65 6e74 3c2f 6464 3e0a 3c64 643e 3c63 ment
    .
    region_size< │ │ │ -00037400: 2f63 6f64 653e 202d 2043 686f 6f73 6573 /code> - Chooses │ │ │ -00037410: 2061 6e20 6176 6572 6167 6520 7375 7065 an average supe │ │ │ -00037420: 7270 6978 656c 2073 697a 6520 6d65 6173 rpixel size meas │ │ │ -00037430: 7572 6564 2069 6e20 7069 7865 6c73 0a0a ured in pixels.. │ │ │ -00037440: 2054 6865 2066 756e 6374 696f 6e20 696e The function in │ │ │ -00037450: 6974 6961 6c69 7a65 7320 6120 5375 7065 itializes a Supe │ │ │ -00037460: 7270 6978 656c 4c53 4320 6f62 6a65 6374 rpixelLSC object │ │ │ -00037470: 2066 6f72 2074 6865 2069 6e70 7574 2069 for the input i │ │ │ -00037480: 6d61 6765 2e20 4974 2073 6574 7320 7468 mage. It sets th │ │ │ -00037490: 6520 7061 7261 6d65 7465 7273 206f 660a e parameters of. │ │ │ -000374a0: 2073 7570 6572 7069 7865 6c20 616c 676f superpixel algo │ │ │ -000374b0: 7269 7468 6d2c 2077 6869 6368 2061 7265 rithm, which are │ │ │ -000374c0: 3a20 7265 6769 6f6e 5f73 697a 6520 616e : region_size an │ │ │ -000374d0: 6420 7275 6c65 722e 2049 7420 7072 6561 d ruler. It prea │ │ │ -000374e0: 6c6c 6f63 6174 6520 736f 6d65 2062 7566 llocate some buf │ │ │ -000374f0: 6665 7273 2066 6f72 2066 7574 7572 650a fers for future. │ │ │ -00037500: 2063 6f6d 7075 7469 6e67 2069 7465 7261 computing itera │ │ │ -00037510: 7469 6f6e 7320 6f76 6572 2074 6865 2067 tions over the g │ │ │ -00037520: 6976 656e 2069 6d61 6765 2e20 416e 2065 iven image. An e │ │ │ -00037530: 7861 6d70 6c65 206f 6620 4c53 4320 6973 xample of LSC is │ │ │ -00037540: 2069 6c75 7374 7261 7465 6420 696e 2074 ilustrated in t │ │ │ -00037550: 6865 2066 6f6c 6c6f 7769 6e67 2070 6963 he following pic │ │ │ -00037560: 7475 7265 2e0a 2046 6f72 2065 6e61 6e63 ture.. For enanc │ │ │ -00037570: 6865 6420 7265 7375 6c74 7320 6974 2069 hed results it i │ │ │ -00037580: 7320 7265 636f 6d6d 656e 6465 6420 666f s recommended fo │ │ │ -00037590: 7220 636f 6c6f 7220 696d 6167 6573 2074 r color images t │ │ │ -000375a0: 6f20 7072 6570 726f 6365 7373 2069 6d61 o preprocess ima │ │ │ -000375b0: 6765 2077 6974 6820 6c69 7474 6c65 2067 ge with little g │ │ │ -000375c0: 6175 7373 6961 6e20 626c 7572 0a20 7769 aussian blur. wi │ │ │ -000375d0: 7468 2061 2073 6d61 6c6c 2033 2078 2033 th a small 3 x 3 │ │ │ -000375e0: 206b 6572 6e65 6c20 616e 6420 6164 6469 kernel and addi │ │ │ -000375f0: 7469 6f6e 616c 2063 6f6e 7665 7273 696f tional conversio │ │ │ -00037600: 6e20 696e 746f 2043 6965 4c41 4220 636f n into CieLAB co │ │ │ -00037610: 6c6f 7220 7370 6163 652e 0a0a 2021 5b69 lor space... ![i │ │ │ -00037620: 6d61 6765 5d28 7069 6373 2f73 7570 6572 mage](pics/super │ │ │ -00037630: 7069 7865 6c73 5f6c 7363 2e70 6e67 293c pixels_lsc.png)< │ │ │ -00037640: 2f64 643e 0a3c 6474 3e52 6574 7572 6e73 /dd>.
    Returns │ │ │ -00037650: 3a3c 2f64 743e 0a3c 6464 3e61 7574 6f6d :
    .
    autom │ │ │ -00037660: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -00037670: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
    .
    ..

  • .< │ │ │ -00037690: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    c │ │ │ -000376e0: 7265 6174 6553 7570 6572 7069 7865 6c4c reateSuperpixelL │ │ │ -000376f0: 5343 3c2f 6833 3e0a 3c64 6976 2063 6c61 SC

    .
    pu │ │ │ -00037730: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static SuperpixelLS │ │ │ -000377b0: 433c 2f61 3e3c 2f73 7061 6e3e 266e 6273 C&nbs │ │ │ -000377c0: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;cre │ │ │ -000377e0: 6174 6553 7570 6572 7069 7865 6c4c 5343 ateSuperpixelLSC │ │ │ -000377f0: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (Mat i │ │ │ -00037860: 6d61 6765 293c 2f73 7061 6e3e 3c2f 6469 mage).
    Class impl │ │ │ -00037890: 656d 656e 7469 6e67 2074 6865 204c 5343 ementing the LSC │ │ │ -000378a0: 2028 4c69 6e65 6172 2053 7065 6374 7261 (Linear Spectra │ │ │ -000378b0: 6c20 436c 7573 7465 7269 6e67 2920 7375 l Clustering) su │ │ │ -000378c0: 7065 7270 6978 656c 733c 2f64 6976 3e0a perpixels
    . │ │ │ -000378d0: 3c64 6c20 636c 6173 733d 226e 6f74 6573
    .
    Parameter │ │ │ -000378f0: 733a 3c2f 6474 3e0a 3c64 643e 3c63 6f64 s:
    .
    image - │ │ │ -00037910: 2049 6d61 6765 2074 6f20 7365 676d 656e Image to segmen │ │ │ -00037920: 740a 0a20 5468 6520 6675 6e63 7469 6f6e t.. The function │ │ │ -00037930: 2069 6e69 7469 616c 697a 6573 2061 2053 initializes a S │ │ │ -00037940: 7570 6572 7069 7865 6c4c 5343 206f 626a uperpixelLSC obj │ │ │ -00037950: 6563 7420 666f 7220 7468 6520 696e 7075 ect for the inpu │ │ │ -00037960: 7420 696d 6167 652e 2049 7420 7365 7473 t image. It sets │ │ │ -00037970: 2074 6865 2070 6172 616d 6574 6572 7320 the parameters │ │ │ -00037980: 6f66 0a20 7375 7065 7270 6978 656c 2061 of. superpixel a │ │ │ -00037990: 6c67 6f72 6974 686d 2c20 7768 6963 6820 lgorithm, which │ │ │ -000379a0: 6172 653a 2072 6567 696f 6e5f 7369 7a65 are: region_size │ │ │ -000379b0: 2061 6e64 2072 756c 6572 2e20 4974 2070 and ruler. It p │ │ │ -000379c0: 7265 616c 6c6f 6361 7465 2073 6f6d 6520 reallocate some │ │ │ -000379d0: 6275 6666 6572 7320 666f 7220 6675 7475 buffers for futu │ │ │ -000379e0: 7265 0a20 636f 6d70 7574 696e 6720 6974 re. computing it │ │ │ -000379f0: 6572 6174 696f 6e73 206f 7665 7220 7468 erations over th │ │ │ -00037a00: 6520 6769 7665 6e20 696d 6167 652e 2041 e given image. A │ │ │ -00037a10: 6e20 6578 616d 706c 6520 6f66 204c 5343 n example of LSC │ │ │ -00037a20: 2069 7320 696c 7573 7472 6174 6564 2069 is ilustrated i │ │ │ -00037a30: 6e20 7468 6520 666f 6c6c 6f77 696e 6720 n the following │ │ │ -00037a40: 7069 6374 7572 652e 0a20 466f 7220 656e picture.. For en │ │ │ -00037a50: 616e 6368 6564 2072 6573 756c 7473 2069 anched results i │ │ │ -00037a60: 7420 6973 2072 6563 6f6d 6d65 6e64 6564 t is recommended │ │ │ -00037a70: 2066 6f72 2063 6f6c 6f72 2069 6d61 6765 for color image │ │ │ -00037a80: 7320 746f 2070 7265 7072 6f63 6573 7320 s to preprocess │ │ │ -00037a90: 696d 6167 6520 7769 7468 206c 6974 746c image with littl │ │ │ -00037aa0: 6520 6761 7573 7369 616e 2062 6c75 720a e gaussian blur. │ │ │ -00037ab0: 2077 6974 6820 6120 736d 616c 6c20 3320 with a small 3 │ │ │ -00037ac0: 7820 3320 6b65 726e 656c 2061 6e64 2061 x 3 kernel and a │ │ │ -00037ad0: 6464 6974 696f 6e61 6c20 636f 6e76 6572 dditional conver │ │ │ -00037ae0: 7369 6f6e 2069 6e74 6f20 4369 654c 4142 sion into CieLAB │ │ │ -00037af0: 2063 6f6c 6f72 2073 7061 6365 2e0a 0a20 color space... │ │ │ -00037b00: 215b 696d 6167 655d 2870 6963 732f 7375 ![image](pics/su │ │ │ -00037b10: 7065 7270 6978 656c 735f 6c73 632e 706e perpixels_lsc.pn │ │ │ -00037b20: 6729 3c2f 6464 3e0a 3c64 743e 5265 7475 g)
    .
    Retu │ │ │ -00037b30: 726e 733a 3c2f 6474 3e0a 3c64 643e 6175 rns:
    .
    au │ │ │ -00037b40: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -00037b50: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
    .
    │ │ │ -00037b60: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .
    ..
  • .
    .

    four │ │ │ -00037be0: 6965 7244 6573 6372 6970 746f 723c 2f68 ierDescriptor..
    Fo │ │ │ -00037da0: 7572 6965 7220 6465 7363 7269 7074 6f72 urier descriptor │ │ │ -00037db0: 7320 666f 7220 706c 616e 6564 2063 6c6f s for planed clo │ │ │ -00037dc0: 7365 6420 6375 7276 6573 0a0a 2046 6f72 sed curves.. For │ │ │ -00037dd0: 206d 6f72 6520 6465 7461 696c 7320 6162 more details ab │ │ │ -00037de0: 6f75 7420 7468 6973 2069 6d70 6c65 6d65 out this impleme │ │ │ -00037df0: 6e74 6174 696f 6e2c 2070 6c65 6173 6520 ntation, please │ │ │ -00037e00: 7365 6520 4349 5445 3a20 5065 7273 6f6f see CITE: Persoo │ │ │ -00037e10: 6e46 7531 3937 373c 2f64 6976 3e0a 3c64 nFu1977
    . │ │ │ -00037e30: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ -00037e40: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -00037e50: 7372 633c 2f63 6f64 653e 202d 2061 7574 src - aut │ │ │ -00037e60: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ -00037e70: 6174 6564 3c2f 6464 3e0a 3c64 643e 3c63 ated
    .
    dst - │ │ │ -00037e90: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ -00037ea0: 656e 6572 6174 6564 3c2f 6464 3e0a 3c64 enerated
    .nbElt - automatic │ │ │ -00037ed0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    nb │ │ │ -00037ef0: 4644 3c2f 636f 6465 3e20 2d20 6175 746f FD - auto │ │ │ -00037f00: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ -00037f10: 7465 643c 2f64 643e 0a3c 2f64 6c3e 0a3c ted
    ..< │ │ │ -00037f20: 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 3e0a /section>.

  • . │ │ │ -00037f30: 3c6c 693e 0a3c 7365 6374 696f 6e20 636c
  • .
    .

    fourierDes │ │ │ -00037fa0: 6372 6970 746f 723c 2f68 333e 0a3c 6469 criptor

    .public static │ │ │ -00037ff0: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  void fourierDescri │ │ │ -00038050: 7074 6f72 3c2f 7370 616e 3e3c 7762 723e ptor │ │ │ -00038060: 3c73 7061 6e20 636c 6173 733d 2270 6172 (
    Mat&nb │ │ │ -000380c0: 7370 3b73 7263 2c0a 203c 6120 6872 6566 sp;src,. Mat&nbs │ │ │ -00038110: 703b 6473 742c 0a20 696e 7426 6e62 7370 p;dst,. int  │ │ │ -00038120: 3b6e 6245 6c74 293c 2f73 7061 6e3e 3c2f ;nbElt).
    Fourier │ │ │ -00038150: 6465 7363 7269 7074 6f72 7320 666f 7220 descriptors for │ │ │ -00038160: 706c 616e 6564 2063 6c6f 7365 6420 6375 planed closed cu │ │ │ -00038170: 7276 6573 0a0a 2046 6f72 206d 6f72 6520 rves.. For more │ │ │ -00038180: 6465 7461 696c 7320 6162 6f75 7420 7468 details about th │ │ │ -00038190: 6973 2069 6d70 6c65 6d65 6e74 6174 696f is implementatio │ │ │ -000381a0: 6e2c 2070 6c65 6173 6520 7365 6520 4349 n, please see CI │ │ │ -000381b0: 5445 3a20 5065 7273 6f6f 6e46 7531 3937 TE: PersoonFu197 │ │ │ -000381c0: 373c 2f64 6976 3e0a 3c64 6c20 636c 6173 7
    .
    .
    P │ │ │ -000381e0: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ -000381f0: 3c64 643e 3c63 6f64 653e 7372 633c 2f63
    src - automatic │ │ │ -00038210: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    ds │ │ │ -00038230: 743c 2f63 6f64 653e 202d 2061 7574 6f6d t - autom │ │ │ -00038240: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -00038250: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
    .
    nbElt - │ │ │ -00038270: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ -00038280: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ..
    .< │ │ │ -000382a0: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    fourierDe │ │ │ -00038310: 7363 7269 7074 6f72 3c2f 6833 3e0a 3c64 scriptor

    .public stati │ │ │ -00038360: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c void fourierDescr │ │ │ -000383c0: 6970 746f 723c 2f73 7061 6e3e 3c77 6272 iptor(Mat&n │ │ │ -00038430: 6273 703b 7372 632c 0a20 3c61 2068 7265 bsp;src,. Mat&nb │ │ │ -00038480: 7370 3b64 7374 293c 2f73 7061 6e3e 3c2f sp;dst).
    Fourier │ │ │ -000384b0: 6465 7363 7269 7074 6f72 7320 666f 7220 descriptors for │ │ │ -000384c0: 706c 616e 6564 2063 6c6f 7365 6420 6375 planed closed cu │ │ │ -000384d0: 7276 6573 0a0a 2046 6f72 206d 6f72 6520 rves.. For more │ │ │ -000384e0: 6465 7461 696c 7320 6162 6f75 7420 7468 details about th │ │ │ -000384f0: 6973 2069 6d70 6c65 6d65 6e74 6174 696f is implementatio │ │ │ -00038500: 6e2c 2070 6c65 6173 6520 7365 6520 4349 n, please see CI │ │ │ -00038510: 5445 3a20 5065 7273 6f6f 6e46 7531 3937 TE: PersoonFu197 │ │ │ -00038520: 373c 2f64 6976 3e0a 3c64 6c20 636c 6173 7
    .
    .
    P │ │ │ -00038540: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ -00038550: 3c64 643e 3c63 6f64 653e 7372 633c 2f63
    src - automatic │ │ │ -00038570: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    ds │ │ │ -00038590: 743c 2f63 6f64 653e 202d 2061 7574 6f6d t - autom │ │ │ -000385a0: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -000385b0: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
    .
    ..
  • .< │ │ │ -000385d0: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    transform │ │ │ -00038650: 4644 3c2f 6833 3e0a 3c64 6976 2063 6c61 FD

    .
    pu │ │ │ -00038690: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static void&nb │ │ │ -000386d0: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;tr │ │ │ -000386f0: 616e 7366 6f72 6d46 443c 2f73 7061 6e3e ansformFD │ │ │ -00038700: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ -00038720: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -00038730: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -00038740: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -00038750: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat src,. Mat t,. Mat&n │ │ │ -00038800: 6273 703b 6473 742c 0a20 626f 6f6c 6561 bsp;dst,. boolea │ │ │ -00038810: 6e26 6e62 7370 3b66 6443 6f6e 746f 7572 n fdContour │ │ │ -00038820: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    .< │ │ │ -00038830: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ -00038840: 223e 7472 616e 7366 6f72 6d20 6120 636f ">transform a co │ │ │ -00038850: 6e74 6f75 723c 2f64 6976 3e0a 3c64 6c20 ntour.
    .< │ │ │ -00038870: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
    sr │ │ │ -00038890: 633c 2f63 6f64 653e 202d 2061 7574 6f6d c - autom │ │ │ -000388a0: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -000388b0: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
    .
    t - aut │ │ │ -000388d0: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ -000388e0: 6174 6564 3c2f 6464 3e0a 3c64 643e 3c63 ated
    .
    dst - │ │ │ -00038900: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ -00038910: 656e 6572 6174 6564 3c2f 6464 3e0a 3c64 enerated
    .fdContou │ │ │ -00038930: 723c 2f63 6f64 653e 202d 2061 7574 6f6d r - autom │ │ │ -00038940: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -00038950: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed.
    ...< │ │ │ -00038970: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    t │ │ │ -000389e0: 7261 6e73 666f 726d 4644 3c2f 6833 3e0a ransformFD

    . │ │ │ -000389f0: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
    public sta │ │ │ -00038a30: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ -00038a40: 3c73 7061 6e20 636c 6173 733d 2272 6574 void transformF │ │ │ -00038a90: 443c 2f73 7061 6e3e 3c77 6272 3e3c 7370 D(Mat  │ │ │ -00038b00: 7372 632c 0a20 3c61 2068 7265 663d 222e src,. Mat t │ │ │ -00038b50: 2c0a 203c 6120 6872 6566 3d22 2e2e 2f63 ,. M │ │ │ -00038b90: 6174 3c2f 613e 266e 6273 703b 6473 7429 at dst) │ │ │ -00038ba0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .transform a con │ │ │ -00038bd0: 746f 7572 3c2f 6469 763e 0a3c 646c 2063 tour.
    .Parameters:.
    src │ │ │ -00038c10: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ -00038c20: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -00038c30: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d
    .
    t - auto │ │ │ -00038c50: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ -00038c60: 7465 643c 2f64 643e 0a3c 6464 3e3c 636f ted
    .
    dst - │ │ │ -00038c80: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ -00038c90: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
    ..
    ..
  • ..

    contourS │ │ │ -00038d20: 616d 706c 696e 673c 2f68 333e 0a3c 6469 ampling

    .public static │ │ │ -00038d70: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  void contourSampli │ │ │ -00038dd0: 6e67 3c2f 7370 616e 3e3c 7762 723e 3c73 ng(Mat  │ │ │ -00038e40: 3b73 7263 2c0a 203c 6120 6872 6566 3d22 ;src,. Mat  │ │ │ -00038e90: 6f75 742c 0a20 696e 7426 6e62 7370 3b6e out,. int n │ │ │ -00038ea0: 6245 6c74 293c 2f73 7061 6e3e 3c2f 6469 bElt).
    Contour sa │ │ │ -00038ed0: 6d70 6c69 6e67 202e 3c2f 6469 763e 0a3c mpling .
    .< │ │ │ -00038ee0: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ -00038ef0: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
    Parameters │ │ │ -00038f00: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
    .
    src - au │ │ │ -00038f20: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -00038f30: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated
    .
    < │ │ │ -00038f40: 636f 6465 3e6f 7574 3c2f 636f 6465 3e20 code>out │ │ │ -00038f50: 2d20 6175 746f 6d61 7469 6361 6c6c 7920 - automatically │ │ │ -00038f60: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated
    .< │ │ │ -00038f70: 6464 3e3c 636f 6465 3e6e 6245 6c74 3c2f dd>nbElt - automati │ │ │ -00038f90: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -00038fa0: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>...
  • .
  • │ │ │ -00038fc0: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    .

    createContourFi │ │ │ -00039010: 7474 696e 673c 2f68 333e 0a3c 6469 7620 tting

    .
    public static ContourF │ │ │ -000390d0: 6974 7469 6e67 3c2f 613e 3c2f 7370 616e itting createContourF │ │ │ -00039110: 6974 7469 6e67 3c2f 7370 616e 3e3c 7762 itting(int& │ │ │ -00039140: 6e62 7370 3b63 7472 2c0a 2069 6e74 266e nbsp;ctr,. int&n │ │ │ -00039150: 6273 703b 6664 293c 2f73 7061 6e3e 3c2f bsp;fd).
    create C │ │ │ -00039180: 6f6e 746f 7572 4669 7474 696e 6720 616c ontourFitting al │ │ │ -00039190: 676f 7269 7468 6d20 6f62 6a65 6374 3c2f gorithm object.
    .
    Para │ │ │ -000391c0: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    ctr - number of Fo │ │ │ -000391f0: 7572 6965 7220 6465 7363 7269 7074 6f72 urier descriptor │ │ │ -00039200: 7320 6571 7561 6c20 746f 206e 756d 6265 s equal to numbe │ │ │ -00039210: 7220 6f66 2063 6f6e 746f 7572 2070 6f69 r of contour poi │ │ │ -00039220: 6e74 7320 6166 7465 7220 7265 7361 6d70 nts after resamp │ │ │ -00039230: 6c69 6e67 2e3c 2f64 643e 0a3c 6464 3e3c ling.
    .
    < │ │ │ -00039240: 636f 6465 3e66 643c 2f63 6f64 653e 202d code>fd - │ │ │ -00039250: 2043 6f6e 746f 7572 2064 6566 696e 696e Contour definin │ │ │ -00039260: 6720 7365 636f 6e64 2073 6861 7065 2028 g second shape ( │ │ │ -00039270: 5461 7267 6574 292e 3c2f 6464 3e0a 3c64 Target).
    .Returns:. │ │ │ -00039290: 3c64 643e 6175 746f 6d61 7469 6361 6c6c
    automaticall │ │ │ -000392a0: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ -000392b0: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
    .
    .
  • .
  • ..

    createC │ │ │ -00039310: 6f6e 746f 7572 4669 7474 696e 673c 2f68 ontourFitting..< │ │ │ -00039460: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ -00039470: 223e 6372 6561 7465 2043 6f6e 746f 7572 ">create Contour │ │ │ -00039480: 4669 7474 696e 6720 616c 676f 7269 7468 Fitting algorith │ │ │ -00039490: 6d20 6f62 6a65 6374 3c2f 6469 763e 0a3c m object.< │ │ │ -000394a0: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ -000394b0: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
    Parameters │ │ │ -000394c0: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
    .
    ctr - nu │ │ │ -000394e0: 6d62 6572 206f 6620 466f 7572 6965 7220 mber of Fourier │ │ │ -000394f0: 6465 7363 7269 7074 6f72 7320 6571 7561 descriptors equa │ │ │ -00039500: 6c20 746f 206e 756d 6265 7220 6f66 2063 l to number of c │ │ │ -00039510: 6f6e 746f 7572 2070 6f69 6e74 7320 6166 ontour points af │ │ │ -00039520: 7465 7220 7265 7361 6d70 6c69 6e67 2e3c ter resampling.< │ │ │ -00039530: 2f64 643e 0a3c 6474 3e52 6574 7572 6e73 /dd>.
    Returns │ │ │ -00039540: 3a3c 2f64 743e 0a3c 6464 3e61 7574 6f6d :
    .
    autom │ │ │ -00039550: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -00039560: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
    ...

  • .< │ │ │ -00039580: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    cre │ │ │ -000395c0: 6174 6543 6f6e 746f 7572 4669 7474 696e ateContourFittin │ │ │ -000395d0: 673c 2f68 333e 0a3c 6469 7620 636c 6173 g

    .
    pub │ │ │ -00039610: 6c69 6320 7374 6174 6963 3c2f 7370 616e lic static ContourFitti │ │ │ -00039690: 6e67 3c2f 613e 3c2f 7370 616e 3e26 6e62 ng&nb │ │ │ -000396a0: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;cr │ │ │ -000396c0: 6561 7465 436f 6e74 6f75 7246 6974 7469 eateContourFitti │ │ │ -000396d0: 6e67 3c2f 7370 616e 3e28 293c 2f64 6976 ng()
    .
    create Cont │ │ │ -00039700: 6f75 7246 6974 7469 6e67 2061 6c67 6f72 ourFitting algor │ │ │ -00039710: 6974 686d 206f 626a 6563 743c 2f64 6976 ithm object
    .
    .
    Returns │ │ │ -00039740: 3a3c 2f64 743e 0a3c 6464 3e61 7574 6f6d :
    .
    autom │ │ │ -00039750: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -00039760: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
    .
    ...< │ │ │ -00039780: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    fi │ │ │ -000397f0: 6e64 456c 6c69 7073 6573 3c2f 6833 3e0a ndEllipses

    . │ │ │ -00039800: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
    public sta │ │ │ -00039840: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ -00039850: 3c73 7061 6e20 636c 6173 733d 2272 6574 void findEllips │ │ │ -000398a0: 6573 3c2f 7370 616e 3e3c 7762 723e 3c73 es(Mat  │ │ │ -00039910: 3b69 6d61 6765 2c0a 203c 6120 6872 6566 ;image,. Mat&nbs │ │ │ -00039960: 703b 656c 6c69 7073 6573 2c0a 2066 6c6f p;ellipses,. flo │ │ │ -00039970: 6174 266e 6273 703b 7363 6f72 6554 6872 at scoreThr │ │ │ -00039980: 6573 686f 6c64 2c0a 2066 6c6f 6174 266e eshold,. float&n │ │ │ -00039990: 6273 703b 7265 6c69 6162 696c 6974 7954 bsp;reliabilityT │ │ │ -000399a0: 6872 6573 686f 6c64 2c0a 2066 6c6f 6174 hreshold,. float │ │ │ -000399b0: 266e 6273 703b 6365 6e74 6572 4469 7374  centerDist │ │ │ -000399c0: 616e 6365 5468 7265 7368 6f6c 6429 3c2f anceThreshold)
    .
    F │ │ │ -000399f0: 696e 6473 2065 6c6c 6970 7365 7320 6661 inds ellipses fa │ │ │ -00039a00: 7374 6c79 2069 6e20 616e 2069 6d61 6765 stly in an image │ │ │ -00039a10: 2075 7369 6e67 2070 726f 6a65 6374 6976 using projectiv │ │ │ -00039a20: 6520 696e 7661 7269 616e 7420 7072 756e e invariant prun │ │ │ -00039a30: 696e 672e 0a0a 2054 6865 2066 756e 6374 ing... The funct │ │ │ -00039a40: 696f 6e20 6465 7465 6374 7320 656c 6c69 ion detects elli │ │ │ -00039a50: 7073 6573 2069 6e20 696d 6167 6573 2075 pses in images u │ │ │ -00039a60: 7369 6e67 2070 726f 6a65 6374 6976 6520 sing projective │ │ │ -00039a70: 696e 7661 7269 616e 7420 7072 756e 696e invariant prunin │ │ │ -00039a80: 672e 0a20 466f 7220 6d6f 7265 2064 6574 g.. For more det │ │ │ -00039a90: 6169 6c73 2061 626f 7574 2074 6869 7320 ails about this │ │ │ -00039aa0: 696d 706c 656d 656e 7461 7469 6f6e 2c20 implementation, │ │ │ -00039ab0: 706c 6561 7365 2073 6565 2043 4954 453a please see CITE: │ │ │ -00039ac0: 206a 6961 3230 3137 6661 7374 0a20 4a69 jia2017fast. Ji │ │ │ -00039ad0: 612c 2051 6920 6574 2061 6c2c 2028 3230 a, Qi et al, (20 │ │ │ -00039ae0: 3137 292e 0a20 4120 4661 7374 2045 6c6c 17).. A Fast Ell │ │ │ -00039af0: 6970 7365 2044 6574 6563 746f 7220 7573 ipse Detector us │ │ │ -00039b00: 696e 6720 5072 6f6a 6563 7469 7665 2049 ing Projective I │ │ │ -00039b10: 6e76 6172 6961 6e74 2050 7275 6e69 6e67 nvariant Pruning │ │ │ -00039b20: 2e20 4945 4545 2054 7261 6e73 6163 7469 . IEEE Transacti │ │ │ -00039b30: 6f6e 7320 6f6e 2049 6d61 6765 2050 726f ons on Image Pro │ │ │ -00039b40: 6365 7373 696e 672e 3c2f 6469 763e 0a3c cessing.
    .< │ │ │ -00039b50: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ -00039b60: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
    Parameters │ │ │ -00039b70: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
    .
    image - │ │ │ -00039b90: 696e 7075 7420 696d 6167 652c 2063 6f75 input image, cou │ │ │ -00039ba0: 6c64 2062 6520 6772 6179 206f 7220 636f ld be gray or co │ │ │ -00039bb0: 6c6f 722e 3c2f 6464 3e0a 3c64 643e 3c63 lor.
    .
    ellipses - output vec │ │ │ -00039be0: 746f 7220 6f66 2066 6f75 6e64 2065 6c6c tor of found ell │ │ │ -00039bf0: 6970 7365 732e 2065 6163 6820 7665 6374 ipses. each vect │ │ │ -00039c00: 6f72 2069 7320 656e 636f 6465 6420 6173 or is encoded as │ │ │ -00039c10: 2066 6976 6520 666c 6f61 7420 2478 2c20 five float $x, │ │ │ -00039c20: 792c 2061 2c20 622c 2072 6164 6975 732c y, a, b, radius, │ │ │ -00039c30: 2073 636f 7265 242e 3c2f 6464 3e0a 3c64 score$.
    .scoreThr │ │ │ -00039c50: 6573 686f 6c64 3c2f 636f 6465 3e20 2d20 eshold - │ │ │ -00039c60: 666c 6f61 742c 2074 6865 2074 6872 6573 float, the thres │ │ │ -00039c70: 686f 6c64 206f 6620 656c 6c69 7073 6520 hold of ellipse │ │ │ -00039c80: 7363 6f72 652e 3c2f 6464 3e0a 3c64 643e score..
    │ │ │ -00039c90: 3c63 6f64 653e 7265 6c69 6162 696c 6974 reliabilit │ │ │ -00039ca0: 7954 6872 6573 686f 6c64 3c2f 636f 6465 yThreshold - float, the t │ │ │ -00039cc0: 6872 6573 686f 6c64 206f 6620 7265 6c69 hreshold of reli │ │ │ -00039cd0: 6162 696c 6974 792e 3c2f 6464 3e0a 3c64 ability.
    .centerDi │ │ │ -00039cf0: 7374 616e 6365 5468 7265 7368 6f6c 643c stanceThreshold< │ │ │ -00039d00: 2f63 6f64 653e 202d 2066 6c6f 6174 2c20 /code> - float, │ │ │ -00039d10: 7468 6520 7468 7265 7368 6f6c 6420 6f66 the threshold of │ │ │ -00039d20: 2063 656e 7465 7220 6469 7374 616e 6365 center distance │ │ │ -00039d30: 2e3c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 ...
    ...
    .

    findEllip │ │ │ -00039dc0: 7365 733c 2f68 333e 0a3c 6469 7620 636c ses

    .
    p │ │ │ -00039e00: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static void&n │ │ │ -00039e40: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;f │ │ │ -00039e60: 696e 6445 6c6c 6970 7365 733c 2f73 7061 indEllipses │ │ │ -00039e90: 283c 6120 6872 6566 3d22 2e2e 2f63 6f72 (Mat │ │ │ -00039ed0: 3c2f 613e 266e 6273 703b 696d 6167 652c  image, │ │ │ -00039ee0: 0a20 3c61 2068 7265 663d 222e 2e2f 636f . Ma │ │ │ -00039f20: 743c 2f61 3e26 6e62 7370 3b65 6c6c 6970 t ellip │ │ │ -00039f30: 7365 732c 0a20 666c 6f61 7426 6e62 7370 ses,. float  │ │ │ -00039f40: 3b73 636f 7265 5468 7265 7368 6f6c 642c ;scoreThreshold, │ │ │ -00039f50: 0a20 666c 6f61 7426 6e62 7370 3b72 656c . float rel │ │ │ -00039f60: 6961 6269 6c69 7479 5468 7265 7368 6f6c iabilityThreshol │ │ │ -00039f70: 6429 3c2f 7370 616e 3e3c 2f64 6976 3e0a d)
    . │ │ │ -00039f80: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
    Finds ellipse │ │ │ -00039fa0: 7320 6661 7374 6c79 2069 6e20 616e 2069 s fastly in an i │ │ │ -00039fb0: 6d61 6765 2075 7369 6e67 2070 726f 6a65 mage using proje │ │ │ -00039fc0: 6374 6976 6520 696e 7661 7269 616e 7420 ctive invariant │ │ │ -00039fd0: 7072 756e 696e 672e 0a0a 2054 6865 2066 pruning... The f │ │ │ -00039fe0: 756e 6374 696f 6e20 6465 7465 6374 7320 unction detects │ │ │ -00039ff0: 656c 6c69 7073 6573 2069 6e20 696d 6167 ellipses in imag │ │ │ -0003a000: 6573 2075 7369 6e67 2070 726f 6a65 6374 es using project │ │ │ -0003a010: 6976 6520 696e 7661 7269 616e 7420 7072 ive invariant pr │ │ │ -0003a020: 756e 696e 672e 0a20 466f 7220 6d6f 7265 uning.. For more │ │ │ -0003a030: 2064 6574 6169 6c73 2061 626f 7574 2074 details about t │ │ │ -0003a040: 6869 7320 696d 706c 656d 656e 7461 7469 his implementati │ │ │ -0003a050: 6f6e 2c20 706c 6561 7365 2073 6565 2043 on, please see C │ │ │ -0003a060: 4954 453a 206a 6961 3230 3137 6661 7374 ITE: jia2017fast │ │ │ -0003a070: 0a20 4a69 612c 2051 6920 6574 2061 6c2c . Jia, Qi et al, │ │ │ -0003a080: 2028 3230 3137 292e 0a20 4120 4661 7374 (2017).. A Fast │ │ │ -0003a090: 2045 6c6c 6970 7365 2044 6574 6563 746f Ellipse Detecto │ │ │ -0003a0a0: 7220 7573 696e 6720 5072 6f6a 6563 7469 r using Projecti │ │ │ -0003a0b0: 7665 2049 6e76 6172 6961 6e74 2050 7275 ve Invariant Pru │ │ │ -0003a0c0: 6e69 6e67 2e20 4945 4545 2054 7261 6e73 ning. IEEE Trans │ │ │ -0003a0d0: 6163 7469 6f6e 7320 6f6e 2049 6d61 6765 actions on Image │ │ │ -0003a0e0: 2050 726f 6365 7373 696e 672e 3c2f 6469 Processing..
    .
    Parame │ │ │ -0003a110: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
    .
    < │ │ │ -0003a120: 636f 6465 3e69 6d61 6765 3c2f 636f 6465 code>image - input image, │ │ │ -0003a140: 2063 6f75 6c64 2062 6520 6772 6179 206f could be gray o │ │ │ -0003a150: 7220 636f 6c6f 722e 3c2f 6464 3e0a 3c64 r color.
    .ellipses │ │ │ -0003a170: 3c2f 636f 6465 3e20 2d20 6f75 7470 7574 - output │ │ │ -0003a180: 2076 6563 746f 7220 6f66 2066 6f75 6e64 vector of found │ │ │ -0003a190: 2065 6c6c 6970 7365 732e 2065 6163 6820 ellipses. each │ │ │ -0003a1a0: 7665 6374 6f72 2069 7320 656e 636f 6465 vector is encode │ │ │ -0003a1b0: 6420 6173 2066 6976 6520 666c 6f61 7420 d as five float │ │ │ -0003a1c0: 2478 2c20 792c 2061 2c20 622c 2072 6164 $x, y, a, b, rad │ │ │ -0003a1d0: 6975 732c 2073 636f 7265 242e 3c2f 6464 ius, score$..
    scor │ │ │ -0003a1f0: 6554 6872 6573 686f 6c64 3c2f 636f 6465 eThreshold - float, the t │ │ │ -0003a210: 6872 6573 686f 6c64 206f 6620 656c 6c69 hreshold of elli │ │ │ -0003a220: 7073 6520 7363 6f72 652e 3c2f 6464 3e0a pse score.
    . │ │ │ -0003a230: 3c64 643e 3c63 6f64 653e 7265 6c69 6162
    reliab │ │ │ -0003a240: 696c 6974 7954 6872 6573 686f 6c64 3c2f ilityThreshold - float, t │ │ │ -0003a260: 6865 2074 6872 6573 686f 6c64 206f 6620 he threshold of │ │ │ -0003a270: 7265 6c69 6162 696c 6974 792e 3c2f 6464 reliability.
    .
    ...
  • ..

    find │ │ │ -0003a300: 456c 6c69 7073 6573 3c2f 6833 3e0a 3c64 Ellipses

    .public stati │ │ │ -0003a350: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c void findEllipses │ │ │ -0003a3b0: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (Mat i │ │ │ -0003a420: 6d61 6765 2c0a 203c 6120 6872 6566 3d22 mage,. Mat  │ │ │ -0003a470: 656c 6c69 7073 6573 2c0a 2066 6c6f 6174 ellipses,. float │ │ │ -0003a480: 266e 6273 703b 7363 6f72 6554 6872 6573  scoreThres │ │ │ -0003a490: 686f 6c64 293c 2f73 7061 6e3e 3c2f 6469 hold).
    Finds elli │ │ │ -0003a4c0: 7073 6573 2066 6173 746c 7920 696e 2061 pses fastly in a │ │ │ -0003a4d0: 6e20 696d 6167 6520 7573 696e 6720 7072 n image using pr │ │ │ -0003a4e0: 6f6a 6563 7469 7665 2069 6e76 6172 6961 ojective invaria │ │ │ -0003a4f0: 6e74 2070 7275 6e69 6e67 2e0a 0a20 5468 nt pruning... Th │ │ │ -0003a500: 6520 6675 6e63 7469 6f6e 2064 6574 6563 e function detec │ │ │ -0003a510: 7473 2065 6c6c 6970 7365 7320 696e 2069 ts ellipses in i │ │ │ -0003a520: 6d61 6765 7320 7573 696e 6720 7072 6f6a mages using proj │ │ │ -0003a530: 6563 7469 7665 2069 6e76 6172 6961 6e74 ective invariant │ │ │ -0003a540: 2070 7275 6e69 6e67 2e0a 2046 6f72 206d pruning.. For m │ │ │ -0003a550: 6f72 6520 6465 7461 696c 7320 6162 6f75 ore details abou │ │ │ -0003a560: 7420 7468 6973 2069 6d70 6c65 6d65 6e74 t this implement │ │ │ -0003a570: 6174 696f 6e2c 2070 6c65 6173 6520 7365 ation, please se │ │ │ -0003a580: 6520 4349 5445 3a20 6a69 6132 3031 3766 e CITE: jia2017f │ │ │ -0003a590: 6173 740a 204a 6961 2c20 5169 2065 7420 ast. Jia, Qi et │ │ │ -0003a5a0: 616c 2c20 2832 3031 3729 2e0a 2041 2046 al, (2017).. A F │ │ │ -0003a5b0: 6173 7420 456c 6c69 7073 6520 4465 7465 ast Ellipse Dete │ │ │ -0003a5c0: 6374 6f72 2075 7369 6e67 2050 726f 6a65 ctor using Proje │ │ │ -0003a5d0: 6374 6976 6520 496e 7661 7269 616e 7420 ctive Invariant │ │ │ -0003a5e0: 5072 756e 696e 672e 2049 4545 4520 5472 Pruning. IEEE Tr │ │ │ -0003a5f0: 616e 7361 6374 696f 6e73 206f 6e20 496d ansactions on Im │ │ │ -0003a600: 6167 6520 5072 6f63 6573 7369 6e67 2e3c age Processing.< │ │ │ -0003a610: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ -0003a630: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .image - input ima │ │ │ -0003a660: 6765 2c20 636f 756c 6420 6265 2067 7261 ge, could be gra │ │ │ -0003a670: 7920 6f72 2063 6f6c 6f72 2e3c 2f64 643e y or color. │ │ │ -0003a680: 0a3c 6464 3e3c 636f 6465 3e65 6c6c 6970 .
    ellip │ │ │ -0003a690: 7365 733c 2f63 6f64 653e 202d 206f 7574 ses - out │ │ │ -0003a6a0: 7075 7420 7665 6374 6f72 206f 6620 666f put vector of fo │ │ │ -0003a6b0: 756e 6420 656c 6c69 7073 6573 2e20 6561 und ellipses. ea │ │ │ -0003a6c0: 6368 2076 6563 746f 7220 6973 2065 6e63 ch vector is enc │ │ │ -0003a6d0: 6f64 6564 2061 7320 6669 7665 2066 6c6f oded as five flo │ │ │ -0003a6e0: 6174 2024 782c 2079 2c20 612c 2062 2c20 at $x, y, a, b, │ │ │ -0003a6f0: 7261 6469 7573 2c20 7363 6f72 6524 2e3c radius, score$.< │ │ │ -0003a700: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e73 /dd>.
    s │ │ │ -0003a710: 636f 7265 5468 7265 7368 6f6c 643c 2f63 coreThreshold - float, th │ │ │ -0003a730: 6520 7468 7265 7368 6f6c 6420 6f66 2065 e threshold of e │ │ │ -0003a740: 6c6c 6970 7365 2073 636f 7265 2e3c 2f64 llipse score..
    ..
  • .
  • .< │ │ │ -0003a770: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ -0003a780: 6574 6169 6c22 2069 643d 2266 696e 6445 etail" id="findE │ │ │ -0003a790: 6c6c 6970 7365 7328 6f72 672e 6f70 656e llipses(org.open │ │ │ -0003a7a0: 6376 2e63 6f72 652e 4d61 742c 6f72 672e cv.core.Mat,org. │ │ │ -0003a7b0: 6f70 656e 6376 2e63 6f72 652e 4d61 7429 opencv.core.Mat) │ │ │ -0003a7c0: 223e 0a3c 6833 3e66 696e 6445 6c6c 6970 ">.

    findEllip │ │ │ -0003a7d0: 7365 733c 2f68 333e 0a3c 6469 7620 636c ses

    .
    p │ │ │ -0003a810: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static void&n │ │ │ -0003a850: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;f │ │ │ -0003a870: 696e 6445 6c6c 6970 7365 733c 2f73 7061 indEllipses │ │ │ -0003a8a0: 283c 6120 6872 6566 3d22 2e2e 2f63 6f72 (Mat │ │ │ -0003a8e0: 3c2f 613e 266e 6273 703b 696d 6167 652c  image, │ │ │ -0003a8f0: 0a20 3c61 2068 7265 663d 222e 2e2f 636f . Ma │ │ │ -0003a930: 743c 2f61 3e26 6e62 7370 3b65 6c6c 6970 t ellip │ │ │ -0003a940: 7365 7329 3c2f 7370 616e 3e3c 2f64 6976 ses)
    .
    Finds ellip │ │ │ -0003a970: 7365 7320 6661 7374 6c79 2069 6e20 616e ses fastly in an │ │ │ -0003a980: 2069 6d61 6765 2075 7369 6e67 2070 726f image using pro │ │ │ -0003a990: 6a65 6374 6976 6520 696e 7661 7269 616e jective invarian │ │ │ -0003a9a0: 7420 7072 756e 696e 672e 0a0a 2054 6865 t pruning... The │ │ │ -0003a9b0: 2066 756e 6374 696f 6e20 6465 7465 6374 function detect │ │ │ -0003a9c0: 7320 656c 6c69 7073 6573 2069 6e20 696d s ellipses in im │ │ │ -0003a9d0: 6167 6573 2075 7369 6e67 2070 726f 6a65 ages using proje │ │ │ -0003a9e0: 6374 6976 6520 696e 7661 7269 616e 7420 ctive invariant │ │ │ -0003a9f0: 7072 756e 696e 672e 0a20 466f 7220 6d6f pruning.. For mo │ │ │ -0003aa00: 7265 2064 6574 6169 6c73 2061 626f 7574 re details about │ │ │ -0003aa10: 2074 6869 7320 696d 706c 656d 656e 7461 this implementa │ │ │ -0003aa20: 7469 6f6e 2c20 706c 6561 7365 2073 6565 tion, please see │ │ │ -0003aa30: 2043 4954 453a 206a 6961 3230 3137 6661 CITE: jia2017fa │ │ │ -0003aa40: 7374 0a20 4a69 612c 2051 6920 6574 2061 st. Jia, Qi et a │ │ │ -0003aa50: 6c2c 2028 3230 3137 292e 0a20 4120 4661 l, (2017).. A Fa │ │ │ -0003aa60: 7374 2045 6c6c 6970 7365 2044 6574 6563 st Ellipse Detec │ │ │ -0003aa70: 746f 7220 7573 696e 6720 5072 6f6a 6563 tor using Projec │ │ │ -0003aa80: 7469 7665 2049 6e76 6172 6961 6e74 2050 tive Invariant P │ │ │ -0003aa90: 7275 6e69 6e67 2e20 4945 4545 2054 7261 runing. IEEE Tra │ │ │ -0003aaa0: 6e73 6163 7469 6f6e 7320 6f6e 2049 6d61 nsactions on Ima │ │ │ -0003aab0: 6765 2050 726f 6365 7373 696e 672e 3c2f ge Processing..
    .
    Para │ │ │ -0003aae0: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    image - input imag │ │ │ -0003ab10: 652c 2063 6f75 6c64 2062 6520 6772 6179 e, could be gray │ │ │ -0003ab20: 206f 7220 636f 6c6f 722e 3c2f 6464 3e0a or color.
    . │ │ │ -0003ab30: 3c64 643e 3c63 6f64 653e 656c 6c69 7073
    ellips │ │ │ -0003ab40: 6573 3c2f 636f 6465 3e20 2d20 6f75 7470 es - outp │ │ │ -0003ab50: 7574 2076 6563 746f 7220 6f66 2066 6f75 ut vector of fou │ │ │ -0003ab60: 6e64 2065 6c6c 6970 7365 732e 2065 6163 nd ellipses. eac │ │ │ -0003ab70: 6820 7665 6374 6f72 2069 7320 656e 636f h vector is enco │ │ │ -0003ab80: 6465 6420 6173 2066 6976 6520 666c 6f61 ded as five floa │ │ │ -0003ab90: 7420 2478 2c20 792c 2061 2c20 622c 2072 t $x, y, a, b, r │ │ │ -0003aba0: 6164 6975 732c 2073 636f 7265 242e 3c2f adius, score$..
    ..
  • .
  • . │ │ │ -0003abd0: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    cr │ │ │ -0003ac30: 6561 7465 4661 7374 4c69 6e65 4465 7465 eateFastLineDete │ │ │ -0003ac40: 6374 6f72 3c2f 6833 3e0a 3c64 6976 2063 ctor

    .
    │ │ │ -0003ac80: 7075 626c 6963 2073 7461 7469 633c 2f73 public static FastLin │ │ │ -0003ad00: 6544 6574 6563 746f 723c 2f61 3e3c 2f73 eDetector createFastL │ │ │ -0003ad40: 696e 6544 6574 6563 746f 723c 2f73 7061 ineDetector │ │ │ -0003ad70: 2869 6e74 266e 6273 703b 6c65 6e67 7468 (int length │ │ │ -0003ad80: 5f74 6872 6573 686f 6c64 2c0a 2066 6c6f _threshold,. flo │ │ │ -0003ad90: 6174 266e 6273 703b 6469 7374 616e 6365 at distance │ │ │ -0003ada0: 5f74 6872 6573 686f 6c64 2c0a 2064 6f75 _threshold,. dou │ │ │ -0003adb0: 626c 6526 6e62 7370 3b63 616e 6e79 5f74 ble canny_t │ │ │ -0003adc0: 6831 2c0a 2064 6f75 626c 6526 6e62 7370 h1,. double  │ │ │ -0003add0: 3b63 616e 6e79 5f74 6832 2c0a 2069 6e74 ;canny_th2,. int │ │ │ -0003ade0: 266e 6273 703b 6361 6e6e 795f 6170 6572  canny_aper │ │ │ -0003adf0: 7475 7265 5f73 697a 652c 0a20 626f 6f6c ture_size,. bool │ │ │ -0003ae00: 6561 6e26 6e62 7370 3b64 6f5f 6d65 7267 ean do_merg │ │ │ -0003ae10: 6529 3c2f 7370 616e 3e3c 2f64 6976 3e0a e)
    . │ │ │ -0003ae20: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
    Creates a sma │ │ │ -0003ae40: 7274 2070 6f69 6e74 6572 2074 6f20 6120 rt pointer to a │ │ │ -0003ae50: 4661 7374 4c69 6e65 4465 7465 6374 6f72 FastLineDetector │ │ │ -0003ae60: 206f 626a 6563 7420 616e 6420 696e 6974 object and init │ │ │ -0003ae70: 6961 6c69 7a65 7320 6974 3c2f 6469 763e ializes it
    │ │ │ -0003ae80: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
    .
    Paramete │ │ │ -0003aea0: 7273 3a3c 2f64 743e 0a3c 6464 3e3c 636f rs:
    .
    length_thresh │ │ │ -0003aec0: 6f6c 643c 2f63 6f64 653e 202d 2053 6567 old - Seg │ │ │ -0003aed0: 6d65 6e74 2073 686f 7274 6572 2074 6861 ment shorter tha │ │ │ -0003aee0: 6e20 7468 6973 2077 696c 6c20 6265 2064 n this will be d │ │ │ -0003aef0: 6973 6361 7264 6564 3c2f 6464 3e0a 3c64 iscarded
    .distance │ │ │ -0003af10: 5f74 6872 6573 686f 6c64 3c2f 636f 6465 _threshold - A point plac │ │ │ -0003af30: 6564 2066 726f 6d20 6120 6879 706f 7468 ed from a hypoth │ │ │ -0003af40: 6573 6973 206c 696e 650a 2020 2020 2020 esis line. │ │ │ -0003af50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0003af60: 2020 2020 2020 7365 676d 656e 7420 6661 segment fa │ │ │ -0003af70: 7274 6865 7220 7468 616e 2074 6869 7320 rther than this │ │ │ -0003af80: 7769 6c6c 2062 6520 7265 6761 7264 6564 will be regarded │ │ │ -0003af90: 2061 7320 616e 206f 7574 6c69 6572 3c2f as an outlier.
    ca │ │ │ -0003afb0: 6e6e 795f 7468 313c 2f63 6f64 653e 202d nny_th1 - │ │ │ -0003afc0: 2046 6972 7374 2074 6872 6573 686f 6c64 First threshold │ │ │ -0003afd0: 2066 6f72 2068 7973 7465 7265 7369 7320 for hysteresis │ │ │ -0003afe0: 7072 6f63 6564 7572 6520 696e 2043 616e procedure in Can │ │ │ -0003aff0: 6e79 2829 3c2f 6464 3e0a 3c64 643e 3c63 ny()
    .
    canny_th2 - Second th │ │ │ -0003b020: 7265 7368 6f6c 6420 666f 7220 6879 7374 reshold for hyst │ │ │ -0003b030: 6572 6573 6973 2070 726f 6365 6475 7265 eresis procedure │ │ │ -0003b040: 2069 6e20 4361 6e6e 7928 293c 2f64 643e in Canny()
    │ │ │ -0003b050: 0a3c 6464 3e3c 636f 6465 3e63 616e 6e79 .
    canny │ │ │ -0003b060: 5f61 7065 7274 7572 655f 7369 7a65 3c2f _aperture_size - Aperture │ │ │ -0003b080: 7369 7a65 2066 6f72 2074 6865 2073 6f62 size for the sob │ │ │ -0003b090: 656c 206f 7065 7261 746f 7220 696e 2043 el operator in C │ │ │ -0003b0a0: 616e 6e79 2829 2e0a 2020 2020 2020 2020 anny().. │ │ │ -0003b0b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0003b0c0: 2020 2020 4966 207a 6572 6f2c 2043 616e If zero, Can │ │ │ -0003b0d0: 6e79 2829 2069 7320 6e6f 7420 6170 706c ny() is not appl │ │ │ -0003b0e0: 6965 6420 616e 6420 7468 6520 696e 7075 ied and the inpu │ │ │ -0003b0f0: 7420 696d 6167 6520 6973 2074 616b 656e t image is taken │ │ │ -0003b100: 2061 7320 616e 2065 6467 6520 696d 6167 as an edge imag │ │ │ -0003b110: 652e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 e.
    .
    do_merge - If true, inc │ │ │ -0003b140: 7265 6d65 6e74 616c 206d 6572 6769 6e67 remental merging │ │ │ -0003b150: 206f 6620 7365 676d 656e 7473 2077 696c of segments wil │ │ │ -0003b160: 6c20 6265 2070 6572 666f 726d 6564 3c2f l be performed.
    Returns: │ │ │ -0003b180: 3c2f 6474 3e0a 3c64 643e 6175 746f 6d61
    .
    automa │ │ │ -0003b190: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -0003b1a0: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
    .
    .
    .
  • ..
    .

    createF │ │ │ -0003b220: 6173 744c 696e 6544 6574 6563 746f 723c astLineDetector< │ │ │ -0003b230: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ -0003b270: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ -0003b280: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;< │ │ │ -0003b2a0: 6120 6872 6566 3d22 4661 7374 4c69 6e65 a href="FastLine │ │ │ -0003b2b0: 4465 7465 6374 6f72 2e68 746d 6c22 2074 Detector.html" t │ │ │ -0003b2c0: 6974 6c65 3d22 636c 6173 7320 696e 206f itle="class in o │ │ │ -0003b2d0: 7267 2e6f 7065 6e63 762e 7869 6d67 7072 rg.opencv.ximgpr │ │ │ -0003b2e0: 6f63 223e 4661 7374 4c69 6e65 4465 7465 oc">FastLineDete │ │ │ -0003b2f0: 6374 6f72 3c2f 613e 3c2f 7370 616e 3e26 ctor& │ │ │ -0003b300: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ -0003b320: 6372 6561 7465 4661 7374 4c69 6e65 4465 createFastLineDe │ │ │ -0003b330: 7465 6374 6f72 3c2f 7370 616e 3e3c 7762 tector(int& │ │ │ -0003b360: 6e62 7370 3b6c 656e 6774 685f 7468 7265 nbsp;length_thre │ │ │ -0003b370: 7368 6f6c 642c 0a20 666c 6f61 7426 6e62 shold,. float&nb │ │ │ -0003b380: 7370 3b64 6973 7461 6e63 655f 7468 7265 sp;distance_thre │ │ │ -0003b390: 7368 6f6c 642c 0a20 646f 7562 6c65 266e shold,. double&n │ │ │ -0003b3a0: 6273 703b 6361 6e6e 795f 7468 312c 0a20 bsp;canny_th1,. │ │ │ -0003b3b0: 646f 7562 6c65 266e 6273 703b 6361 6e6e double cann │ │ │ -0003b3c0: 795f 7468 322c 0a20 696e 7426 6e62 7370 y_th2,. int  │ │ │ -0003b3d0: 3b63 616e 6e79 5f61 7065 7274 7572 655f ;canny_aperture_ │ │ │ -0003b3e0: 7369 7a65 293c 2f73 7061 6e3e 3c2f 6469 size).
    Creates a │ │ │ -0003b410: 736d 6172 7420 706f 696e 7465 7220 746f smart pointer to │ │ │ -0003b420: 2061 2046 6173 744c 696e 6544 6574 6563 a FastLineDetec │ │ │ -0003b430: 746f 7220 6f62 6a65 6374 2061 6e64 2069 tor object and i │ │ │ -0003b440: 6e69 7469 616c 697a 6573 2069 743c 2f64 nitializes it.
    .
    Param │ │ │ -0003b470: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ -0003b480: 3c63 6f64 653e 6c65 6e67 7468 5f74 6872 length_thr │ │ │ -0003b490: 6573 686f 6c64 3c2f 636f 6465 3e20 2d20 eshold - │ │ │ -0003b4a0: 5365 676d 656e 7420 7368 6f72 7465 7220 Segment shorter │ │ │ -0003b4b0: 7468 616e 2074 6869 7320 7769 6c6c 2062 than this will b │ │ │ -0003b4c0: 6520 6469 7363 6172 6465 643c 2f64 643e e discarded
    │ │ │ -0003b4d0: 0a3c 6464 3e3c 636f 6465 3e64 6973 7461 .
    dista │ │ │ -0003b4e0: 6e63 655f 7468 7265 7368 6f6c 643c 2f63 nce_threshold - A point p │ │ │ -0003b500: 6c61 6365 6420 6672 6f6d 2061 2068 7970 laced from a hyp │ │ │ -0003b510: 6f74 6865 7369 7320 6c69 6e65 0a20 2020 othesis line. │ │ │ -0003b520: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0003b530: 2020 2020 2020 2020 2073 6567 6d65 6e74 segment │ │ │ -0003b540: 2066 6172 7468 6572 2074 6861 6e20 7468 farther than th │ │ │ -0003b550: 6973 2077 696c 6c20 6265 2072 6567 6172 is will be regar │ │ │ -0003b560: 6465 6420 6173 2061 6e20 6f75 746c 6965 ded as an outlie │ │ │ -0003b570: 723c 2f64 643e 0a3c 6464 3e3c 636f 6465 r
    .
    canny_th1 - First thresh │ │ │ -0003b5a0: 6f6c 6420 666f 7220 6879 7374 6572 6573 old for hysteres │ │ │ -0003b5b0: 6973 2070 726f 6365 6475 7265 2069 6e20 is procedure in │ │ │ -0003b5c0: 4361 6e6e 7928 293c 2f64 643e 0a3c 6464 Canny()
    .
    canny_th2 │ │ │ -0003b5e0: 3c2f 636f 6465 3e20 2d20 5365 636f 6e64 - Second │ │ │ -0003b5f0: 2074 6872 6573 686f 6c64 2066 6f72 2068 threshold for h │ │ │ -0003b600: 7973 7465 7265 7369 7320 7072 6f63 6564 ysteresis proced │ │ │ -0003b610: 7572 6520 696e 2043 616e 6e79 2829 3c2f ure in Canny().
    ca │ │ │ -0003b630: 6e6e 795f 6170 6572 7475 7265 5f73 697a nny_aperture_siz │ │ │ -0003b640: 653c 2f63 6f64 653e 202d 2041 7065 7274 e - Apert │ │ │ -0003b650: 7572 6573 697a 6520 666f 7220 7468 6520 uresize for the │ │ │ -0003b660: 736f 6265 6c20 6f70 6572 6174 6f72 2069 sobel operator i │ │ │ -0003b670: 6e20 4361 6e6e 7928 292e 0a20 2020 2020 n Canny().. │ │ │ -0003b680: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0003b690: 2020 2020 2020 2049 6620 7a65 726f 2c20 If zero, │ │ │ -0003b6a0: 4361 6e6e 7928 2920 6973 206e 6f74 2061 Canny() is not a │ │ │ -0003b6b0: 7070 6c69 6564 2061 6e64 2074 6865 2069 pplied and the i │ │ │ -0003b6c0: 6e70 7574 2069 6d61 6765 2069 7320 7461 nput image is ta │ │ │ -0003b6d0: 6b65 6e20 6173 2061 6e20 6564 6765 2069 ken as an edge i │ │ │ -0003b6e0: 6d61 6765 2e3c 2f64 643e 0a3c 6474 3e52 mage.
    .
    R │ │ │ -0003b6f0: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
    .
    automatically g │ │ │ -0003b710: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ..

    .< │ │ │ -0003b730: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    crea │ │ │ -0003b790: 7465 4661 7374 4c69 6e65 4465 7465 6374 teFastLineDetect │ │ │ -0003b7a0: 6f72 3c2f 6833 3e0a 3c64 6976 2063 6c61 or

    .
    pu │ │ │ -0003b7e0: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static FastLineD │ │ │ -0003b860: 6574 6563 746f 723c 2f61 3e3c 2f73 7061 etector createFastLin │ │ │ -0003b8a0: 6544 6574 6563 746f 723c 2f73 7061 6e3e eDetector │ │ │ -0003b8b0: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (i │ │ │ -0003b8d0: 6e74 266e 6273 703b 6c65 6e67 7468 5f74 nt length_t │ │ │ -0003b8e0: 6872 6573 686f 6c64 2c0a 2066 6c6f 6174 hreshold,. float │ │ │ -0003b8f0: 266e 6273 703b 6469 7374 616e 6365 5f74  distance_t │ │ │ -0003b900: 6872 6573 686f 6c64 2c0a 2064 6f75 626c hreshold,. doubl │ │ │ -0003b910: 6526 6e62 7370 3b63 616e 6e79 5f74 6831 e canny_th1 │ │ │ -0003b920: 2c0a 2064 6f75 626c 6526 6e62 7370 3b63 ,. double c │ │ │ -0003b930: 616e 6e79 5f74 6832 293c 2f73 7061 6e3e anny_th2) │ │ │ -0003b940: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    Create │ │ │ -0003b960: 7320 6120 736d 6172 7420 706f 696e 7465 s a smart pointe │ │ │ -0003b970: 7220 746f 2061 2046 6173 744c 696e 6544 r to a FastLineD │ │ │ -0003b980: 6574 6563 746f 7220 6f62 6a65 6374 2061 etector object a │ │ │ -0003b990: 6e64 2069 6e69 7469 616c 697a 6573 2069 nd initializes i │ │ │ -0003b9a0: 743c 2f64 6976 3e0a 3c64 6c20 636c 6173 t
    .
    .
    P │ │ │ -0003b9c0: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ -0003b9d0: 3c64 643e 3c63 6f64 653e 6c65 6e67 7468
    length │ │ │ -0003b9e0: 5f74 6872 6573 686f 6c64 3c2f 636f 6465 _threshold - Segment shor │ │ │ -0003ba00: 7465 7220 7468 616e 2074 6869 7320 7769 ter than this wi │ │ │ -0003ba10: 6c6c 2062 6520 6469 7363 6172 6465 643c ll be discarded< │ │ │ -0003ba20: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e64 /dd>.
    d │ │ │ -0003ba30: 6973 7461 6e63 655f 7468 7265 7368 6f6c istance_threshol │ │ │ -0003ba40: 643c 2f63 6f64 653e 202d 2041 2070 6f69 d - A poi │ │ │ -0003ba50: 6e74 2070 6c61 6365 6420 6672 6f6d 2061 nt placed from a │ │ │ -0003ba60: 2068 7970 6f74 6865 7369 7320 6c69 6e65 hypothesis line │ │ │ -0003ba70: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ -0003ba80: 2020 2020 2020 2020 2020 2020 2073 6567 seg │ │ │ -0003ba90: 6d65 6e74 2066 6172 7468 6572 2074 6861 ment farther tha │ │ │ -0003baa0: 6e20 7468 6973 2077 696c 6c20 6265 2072 n this will be r │ │ │ -0003bab0: 6567 6172 6465 6420 6173 2061 6e20 6f75 egarded as an ou │ │ │ -0003bac0: 746c 6965 723c 2f64 643e 0a3c 6464 3e3c tlier
    .
    < │ │ │ -0003bad0: 636f 6465 3e63 616e 6e79 5f74 6831 3c2f code>canny_th1 - First th │ │ │ -0003baf0: 7265 7368 6f6c 6420 666f 7220 6879 7374 reshold for hyst │ │ │ -0003bb00: 6572 6573 6973 2070 726f 6365 6475 7265 eresis procedure │ │ │ -0003bb10: 2069 6e20 4361 6e6e 7928 293c 2f64 643e in Canny()
    │ │ │ -0003bb20: 0a3c 6464 3e3c 636f 6465 3e63 616e 6e79 .
    canny │ │ │ -0003bb30: 5f74 6832 3c2f 636f 6465 3e20 2d20 5365 _th2 - Se │ │ │ -0003bb40: 636f 6e64 2074 6872 6573 686f 6c64 2066 cond threshold f │ │ │ -0003bb50: 6f72 2068 7973 7465 7265 7369 7320 7072 or hysteresis pr │ │ │ -0003bb60: 6f63 6564 7572 6520 696e 2043 616e 6e79 ocedure in Canny │ │ │ -0003bb70: 2829 0a20 2020 2020 2020 2020 2020 2020 (). │ │ │ -0003bb80: 2020 2020 2020 2020 2020 2020 2020 2049 I │ │ │ -0003bb90: 6620 7a65 726f 2c20 4361 6e6e 7928 2920 f zero, Canny() │ │ │ -0003bba0: 6973 206e 6f74 2061 7070 6c69 6564 2061 is not applied a │ │ │ -0003bbb0: 6e64 2074 6865 2069 6e70 7574 2069 6d61 nd the input ima │ │ │ -0003bbc0: 6765 2069 7320 7461 6b65 6e20 6173 2061 ge is taken as a │ │ │ -0003bbd0: 6e20 6564 6765 2069 6d61 6765 2e3c 2f64 n edge image..
    Returns:< │ │ │ -0003bbf0: 2f64 743e 0a3c 6464 3e61 7574 6f6d 6174 /dt>.
    automat │ │ │ -0003bc00: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ -0003bc10: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365
    .
    ..
  • .
  • .
    .

    cre │ │ │ -0003bc80: 6174 6546 6173 744c 696e 6544 6574 6563 ateFastLineDetec │ │ │ -0003bc90: 746f 723c 2f68 333e 0a3c 6469 7620 636c tor

    .
    p │ │ │ -0003bcd0: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static FastLine │ │ │ -0003bd50: 4465 7465 6374 6f72 3c2f 613e 3c2f 7370 Detector createFastLi │ │ │ -0003bd90: 6e65 4465 7465 6374 6f72 3c2f 7370 616e neDetector( │ │ │ -0003bdc0: 696e 7426 6e62 7370 3b6c 656e 6774 685f int length_ │ │ │ -0003bdd0: 7468 7265 7368 6f6c 642c 0a20 666c 6f61 threshold,. floa │ │ │ -0003bde0: 7426 6e62 7370 3b64 6973 7461 6e63 655f t distance_ │ │ │ -0003bdf0: 7468 7265 7368 6f6c 642c 0a20 646f 7562 threshold,. doub │ │ │ -0003be00: 6c65 266e 6273 703b 6361 6e6e 795f 7468 le canny_th │ │ │ -0003be10: 3129 3c2f 7370 616e 3e3c 2f64 6976 3e0a 1)
    . │ │ │ -0003be20: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
    Creates a sma │ │ │ -0003be40: 7274 2070 6f69 6e74 6572 2074 6f20 6120 rt pointer to a │ │ │ -0003be50: 4661 7374 4c69 6e65 4465 7465 6374 6f72 FastLineDetector │ │ │ -0003be60: 206f 626a 6563 7420 616e 6420 696e 6974 object and init │ │ │ -0003be70: 6961 6c69 7a65 7320 6974 3c2f 6469 763e ializes it
    │ │ │ -0003be80: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
    .
    Paramete │ │ │ -0003bea0: 7273 3a3c 2f64 743e 0a3c 6464 3e3c 636f rs:
    .
    length_thresh │ │ │ -0003bec0: 6f6c 643c 2f63 6f64 653e 202d 2053 6567 old - Seg │ │ │ -0003bed0: 6d65 6e74 2073 686f 7274 6572 2074 6861 ment shorter tha │ │ │ -0003bee0: 6e20 7468 6973 2077 696c 6c20 6265 2064 n this will be d │ │ │ -0003bef0: 6973 6361 7264 6564 3c2f 6464 3e0a 3c64 iscarded
    .distance │ │ │ -0003bf10: 5f74 6872 6573 686f 6c64 3c2f 636f 6465 _threshold - A point plac │ │ │ -0003bf30: 6564 2066 726f 6d20 6120 6879 706f 7468 ed from a hypoth │ │ │ -0003bf40: 6573 6973 206c 696e 650a 2020 2020 2020 esis line. │ │ │ -0003bf50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0003bf60: 2020 2020 2020 7365 676d 656e 7420 6661 segment fa │ │ │ -0003bf70: 7274 6865 7220 7468 616e 2074 6869 7320 rther than this │ │ │ -0003bf80: 7769 6c6c 2062 6520 7265 6761 7264 6564 will be regarded │ │ │ -0003bf90: 2061 7320 616e 206f 7574 6c69 6572 3c2f as an outlier.
    ca │ │ │ -0003bfb0: 6e6e 795f 7468 313c 2f63 6f64 653e 202d nny_th1 - │ │ │ -0003bfc0: 2046 6972 7374 2074 6872 6573 686f 6c64 First threshold │ │ │ -0003bfd0: 2066 6f72 2068 7973 7465 7265 7369 7320 for hysteresis │ │ │ -0003bfe0: 7072 6f63 6564 7572 6520 696e 2043 616e procedure in Can │ │ │ -0003bff0: 6e79 2829 0a20 2020 2020 2020 2020 2020 ny(). │ │ │ -0003c000: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0003c010: 2049 6620 7a65 726f 2c20 4361 6e6e 7928 If zero, Canny( │ │ │ -0003c020: 2920 6973 206e 6f74 2061 7070 6c69 6564 ) is not applied │ │ │ -0003c030: 2061 6e64 2074 6865 2069 6e70 7574 2069 and the input i │ │ │ -0003c040: 6d61 6765 2069 7320 7461 6b65 6e20 6173 mage is taken as │ │ │ -0003c050: 2061 6e20 6564 6765 2069 6d61 6765 2e3c an edge image.< │ │ │ -0003c060: 2f64 643e 0a3c 6474 3e52 6574 7572 6e73 /dd>.
    Returns │ │ │ -0003c070: 3a3c 2f64 743e 0a3c 6464 3e61 7574 6f6d :
    .
    autom │ │ │ -0003c080: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -0003c090: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
    .
    ..
  • .< │ │ │ -0003c0b0: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    createFa │ │ │ -0003c100: 7374 4c69 6e65 4465 7465 6374 6f72 3c2f stLineDetector.
    public │ │ │ -0003c150: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ -0003c160: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;FastLineDetec │ │ │ -0003c1d0: 746f 723c 2f61 3e3c 2f73 7061 6e3e 266e tor&n │ │ │ -0003c1e0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;c │ │ │ -0003c200: 7265 6174 6546 6173 744c 696e 6544 6574 reateFastLineDet │ │ │ -0003c210: 6563 746f 723c 2f73 7061 6e3e 3c77 6272 ector(int&n │ │ │ -0003c240: 6273 703b 6c65 6e67 7468 5f74 6872 6573 bsp;length_thres │ │ │ -0003c250: 686f 6c64 2c0a 2066 6c6f 6174 266e 6273 hold,. float&nbs │ │ │ -0003c260: 703b 6469 7374 616e 6365 5f74 6872 6573 p;distance_thres │ │ │ -0003c270: 686f 6c64 293c 2f73 7061 6e3e 3c2f 6469 hold).
    Creates a │ │ │ -0003c2a0: 736d 6172 7420 706f 696e 7465 7220 746f smart pointer to │ │ │ -0003c2b0: 2061 2046 6173 744c 696e 6544 6574 6563 a FastLineDetec │ │ │ -0003c2c0: 746f 7220 6f62 6a65 6374 2061 6e64 2069 tor object and i │ │ │ -0003c2d0: 6e69 7469 616c 697a 6573 2069 743c 2f64 nitializes it.
    .
    Param │ │ │ -0003c300: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ -0003c310: 3c63 6f64 653e 6c65 6e67 7468 5f74 6872 length_thr │ │ │ -0003c320: 6573 686f 6c64 3c2f 636f 6465 3e20 2d20 eshold - │ │ │ -0003c330: 5365 676d 656e 7420 7368 6f72 7465 7220 Segment shorter │ │ │ -0003c340: 7468 616e 2074 6869 7320 7769 6c6c 2062 than this will b │ │ │ -0003c350: 6520 6469 7363 6172 6465 643c 2f64 643e e discarded
    │ │ │ -0003c360: 0a3c 6464 3e3c 636f 6465 3e64 6973 7461 .
    dista │ │ │ -0003c370: 6e63 655f 7468 7265 7368 6f6c 643c 2f63 nce_threshold - A point p │ │ │ -0003c390: 6c61 6365 6420 6672 6f6d 2061 2068 7970 laced from a hyp │ │ │ -0003c3a0: 6f74 6865 7369 7320 6c69 6e65 0a20 2020 othesis line. │ │ │ -0003c3b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0003c3c0: 2020 2020 2020 2020 2073 6567 6d65 6e74 segment │ │ │ -0003c3d0: 2066 6172 7468 6572 2074 6861 6e20 7468 farther than th │ │ │ -0003c3e0: 6973 2077 696c 6c20 6265 2072 6567 6172 is will be regar │ │ │ -0003c3f0: 6465 6420 6173 2061 6e20 6f75 746c 6965 ded as an outlie │ │ │ -0003c400: 720a 2020 2020 2020 2020 2020 2020 2020 r. │ │ │ -0003c410: 2020 2020 2020 2020 2020 2020 2020 4966 If │ │ │ -0003c420: 207a 6572 6f2c 2043 616e 6e79 2829 2069 zero, Canny() i │ │ │ -0003c430: 7320 6e6f 7420 6170 706c 6965 6420 616e s not applied an │ │ │ -0003c440: 6420 7468 6520 696e 7075 7420 696d 6167 d the input imag │ │ │ -0003c450: 6520 6973 2074 616b 656e 2061 7320 616e e is taken as an │ │ │ -0003c460: 2065 6467 6520 696d 6167 652e 3c2f 6464 edge image.
    .
    Returns:.
    automati │ │ │ -0003c490: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -0003c4a0: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.
    ...
  • │ │ │ -0003c4c0: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    .

    c │ │ │ -0003c500: 7265 6174 6546 6173 744c 696e 6544 6574 reateFastLineDet │ │ │ -0003c510: 6563 746f 723c 2f68 333e 0a3c 6469 7620 ector

    .
    public static FastLi │ │ │ -0003c5d0: 6e65 4465 7465 6374 6f72 3c2f 613e 3c2f neDetector createFast │ │ │ -0003c610: 4c69 6e65 4465 7465 6374 6f72 3c2f 7370 LineDetector(int lengt │ │ │ -0003c650: 685f 7468 7265 7368 6f6c 6429 3c2f 7370 h_threshold)
    .
    Cre │ │ │ -0003c680: 6174 6573 2061 2073 6d61 7274 2070 6f69 ates a smart poi │ │ │ -0003c690: 6e74 6572 2074 6f20 6120 4661 7374 4c69 nter to a FastLi │ │ │ -0003c6a0: 6e65 4465 7465 6374 6f72 206f 626a 6563 neDetector objec │ │ │ -0003c6b0: 7420 616e 6420 696e 6974 6961 6c69 7a65 t and initialize │ │ │ -0003c6c0: 7320 6974 3c2f 6469 763e 0a3c 646c 2063 s it
    .
    .Parameters:.
    len │ │ │ -0003c700: 6774 685f 7468 7265 7368 6f6c 643c 2f63 gth_threshold - Segment s │ │ │ -0003c720: 686f 7274 6572 2074 6861 6e20 7468 6973 horter than this │ │ │ -0003c730: 2077 696c 6c20 6265 2064 6973 6361 7264 will be discard │ │ │ -0003c740: 6564 0a20 2020 2020 2020 2020 2020 2020 ed. │ │ │ -0003c750: 2020 2020 2020 2020 2020 2020 2020 2073 s │ │ │ -0003c760: 6567 6d65 6e74 2066 6172 7468 6572 2074 egment farther t │ │ │ -0003c770: 6861 6e20 7468 6973 2077 696c 6c20 6265 han this will be │ │ │ -0003c780: 2072 6567 6172 6465 6420 6173 2061 6e20 regarded as an │ │ │ -0003c790: 6f75 746c 6965 720a 2020 2020 2020 2020 outlier. │ │ │ -0003c7a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0003c7b0: 2020 2020 4966 207a 6572 6f2c 2043 616e If zero, Can │ │ │ -0003c7c0: 6e79 2829 2069 7320 6e6f 7420 6170 706c ny() is not appl │ │ │ -0003c7d0: 6965 6420 616e 6420 7468 6520 696e 7075 ied and the inpu │ │ │ -0003c7e0: 7420 696d 6167 6520 6973 2074 616b 656e t image is taken │ │ │ -0003c7f0: 2061 7320 616e 2065 6467 6520 696d 6167 as an edge imag │ │ │ -0003c800: 652e 3c2f 6464 3e0a 3c64 743e 5265 7475 e.
    .
    Retu │ │ │ -0003c810: 726e 733a 3c2f 6474 3e0a 3c64 643e 6175 rns:
    .
    au │ │ │ -0003c820: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -0003c830: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
    .
    │ │ │ -0003c840: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .
    .
  • .
  • .
    .createFastLine │ │ │ -0003c8a0: 4465 7465 6374 6f72 3c2f 6833 3e0a 3c64 Detector
  • .public stati │ │ │ -0003c8f0: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c Fas │ │ │ -0003c960: 744c 696e 6544 6574 6563 746f 723c 2f61 tLineDetector createF │ │ │ -0003c9a0: 6173 744c 696e 6544 6574 6563 746f 723c astLineDetector< │ │ │ -0003c9b0: 2f73 7061 6e3e 2829 3c2f 6469 763e 0a3c /span>()
    .< │ │ │ -0003c9c0: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ -0003c9d0: 223e 4372 6561 7465 7320 6120 736d 6172 ">Creates a smar │ │ │ -0003c9e0: 7420 706f 696e 7465 7220 746f 2061 2046 t pointer to a F │ │ │ -0003c9f0: 6173 744c 696e 6544 6574 6563 746f 7220 astLineDetector │ │ │ -0003ca00: 6f62 6a65 6374 2061 6e64 2069 6e69 7469 object and initi │ │ │ -0003ca10: 616c 697a 6573 2069 740a 0a20 2020 2020 alizes it.. │ │ │ -0003ca20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0003ca30: 2020 2020 2020 2073 6567 6d65 6e74 2066 segment f │ │ │ -0003ca40: 6172 7468 6572 2074 6861 6e20 7468 6973 arther than this │ │ │ -0003ca50: 2077 696c 6c20 6265 2072 6567 6172 6465 will be regarde │ │ │ -0003ca60: 6420 6173 2061 6e20 6f75 746c 6965 720a d as an outlier. │ │ │ -0003ca70: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0003ca80: 2020 2020 2020 2020 2020 2020 4966 207a If z │ │ │ -0003ca90: 6572 6f2c 2043 616e 6e79 2829 2069 7320 ero, Canny() is │ │ │ -0003caa0: 6e6f 7420 6170 706c 6965 6420 616e 6420 not applied and │ │ │ -0003cab0: 7468 6520 696e 7075 7420 696d 6167 6520 the input image │ │ │ -0003cac0: 6973 2074 616b 656e 2061 7320 616e 2065 is taken as an e │ │ │ -0003cad0: 6467 6520 696d 6167 652e 3c2f 6469 763e dge image. │ │ │ -0003cae0: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
    .
    Returns: │ │ │ -0003cb00: 3c2f 6474 3e0a 3c64 643e 6175 746f 6d61
    .
    automa │ │ │ -0003cb10: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -0003cb20: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
    .
    .
    ...
    .

    FastHoughTransf │ │ │ -0003cbc0: 6f72 6d3c 2f68 333e 0a3c 6469 7620 636c orm

    .
    p │ │ │ -0003cc00: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static void&n │ │ │ -0003cc40: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;F │ │ │ -0003cc60: 6173 7448 6f75 6768 5472 616e 7366 6f72 astHoughTransfor │ │ │ -0003cc70: 6d3c 2f73 7061 6e3e 3c77 6272 3e3c 7370 m(Mat  │ │ │ -0003cce0: 7372 632c 0a20 3c61 2068 7265 663d 222e src,. Mat d │ │ │ -0003cd30: 7374 2c0a 2069 6e74 266e 6273 703b 6473 st,. int ds │ │ │ -0003cd40: 744d 6174 4465 7074 682c 0a20 696e 7426 tMatDepth,. int& │ │ │ -0003cd50: 6e62 7370 3b61 6e67 6c65 5261 6e67 652c nbsp;angleRange, │ │ │ -0003cd60: 0a20 696e 7426 6e62 7370 3b6f 702c 0a20 . int op,. │ │ │ -0003cd70: 696e 7426 6e62 7370 3b6d 616b 6553 6b65 int makeSke │ │ │ -0003cd80: 7729 3c2f 7370 616e 3e3c 2f64 6976 3e0a w)
    . │ │ │ -0003cd90: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
    Calculates 2D │ │ │ -0003cdb0: 2046 6173 7420 486f 7567 6820 7472 616e Fast Hough tran │ │ │ -0003cdc0: 7366 6f72 6d20 6f66 2061 6e20 696d 6167 sform of an imag │ │ │ -0003cdd0: 652e 0a0a 2054 6865 2066 756e 6374 696f e... The functio │ │ │ -0003cde0: 6e20 6361 6c63 756c 6174 6573 2074 6865 n calculates the │ │ │ -0003cdf0: 2066 6173 7420 486f 7567 6820 7472 616e fast Hough tran │ │ │ -0003ce00: 7366 6f72 6d20 666f 7220 6675 6c6c 2c20 sform for full, │ │ │ -0003ce10: 6861 6c66 206f 7220 7175 6172 7465 720a half or quarter. │ │ │ -0003ce20: 2072 616e 6765 206f 6620 616e 676c 6573 range of angles │ │ │ -0003ce30: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 .
    .
    .
    P │ │ │ -0003ce50: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ -0003ce60: 3c64 643e 3c63 6f64 653e 7372 633c 2f63
    src - automatic │ │ │ -0003ce80: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    ds │ │ │ -0003cea0: 743c 2f63 6f64 653e 202d 2061 7574 6f6d t - autom │ │ │ -0003ceb0: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -0003cec0: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
    .
    dstMatDepth - automatic │ │ │ -0003cef0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    an │ │ │ -0003cf10: 676c 6552 616e 6765 3c2f 636f 6465 3e20 gleRange │ │ │ -0003cf20: 2d20 6175 746f 6d61 7469 6361 6c6c 7920 - automatically │ │ │ -0003cf30: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated
    .< │ │ │ -0003cf40: 6464 3e3c 636f 6465 3e6f 703c 2f63 6f64 dd>op - automatical │ │ │ -0003cf60: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated.
    make │ │ │ -0003cf80: 536b 6577 3c2f 636f 6465 3e20 2d20 6175 Skew - au │ │ │ -0003cf90: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -0003cfa0: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
    .
    │ │ │ -0003cfb0: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .
    ..
  • .
    .

    FastHoughTransf │ │ │ -0003d040: 6f72 6d3c 2f68 333e 0a3c 6469 7620 636c orm

    .
    p │ │ │ -0003d080: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static void&n │ │ │ -0003d0c0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;F │ │ │ -0003d0e0: 6173 7448 6f75 6768 5472 616e 7366 6f72 astHoughTransfor │ │ │ -0003d0f0: 6d3c 2f73 7061 6e3e 3c77 6272 3e3c 7370 m(Mat  │ │ │ -0003d160: 7372 632c 0a20 3c61 2068 7265 663d 222e src,. Mat d │ │ │ -0003d1b0: 7374 2c0a 2069 6e74 266e 6273 703b 6473 st,. int ds │ │ │ -0003d1c0: 744d 6174 4465 7074 682c 0a20 696e 7426 tMatDepth,. int& │ │ │ -0003d1d0: 6e62 7370 3b61 6e67 6c65 5261 6e67 652c nbsp;angleRange, │ │ │ -0003d1e0: 0a20 696e 7426 6e62 7370 3b6f 7029 3c2f . int op)
    .
    C │ │ │ -0003d210: 616c 6375 6c61 7465 7320 3244 2046 6173 alculates 2D Fas │ │ │ -0003d220: 7420 486f 7567 6820 7472 616e 7366 6f72 t Hough transfor │ │ │ -0003d230: 6d20 6f66 2061 6e20 696d 6167 652e 0a0a m of an image... │ │ │ -0003d240: 2054 6865 2066 756e 6374 696f 6e20 6361 The function ca │ │ │ -0003d250: 6c63 756c 6174 6573 2074 6865 2066 6173 lculates the fas │ │ │ -0003d260: 7420 486f 7567 6820 7472 616e 7366 6f72 t Hough transfor │ │ │ -0003d270: 6d20 666f 7220 6675 6c6c 2c20 6861 6c66 m for full, half │ │ │ -0003d280: 206f 7220 7175 6172 7465 720a 2072 616e or quarter. ran │ │ │ -0003d290: 6765 206f 6620 616e 676c 6573 2e3c 2f64 ge of angles..
    .
    Param │ │ │ -0003d2c0: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ -0003d2d0: 3c63 6f64 653e 7372 633c 2f63 6f64 653e src │ │ │ -0003d2e0: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ -0003d2f0: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
    . │ │ │ -0003d300: 3c64 643e 3c63 6f64 653e 6473 743c 2f63
    dst - automatic │ │ │ -0003d320: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    ds │ │ │ -0003d340: 744d 6174 4465 7074 683c 2f63 6f64 653e tMatDepth │ │ │ -0003d350: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ -0003d360: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
    . │ │ │ -0003d370: 3c64 643e 3c63 6f64 653e 616e 676c 6552
    angleR │ │ │ -0003d380: 616e 6765 3c2f 636f 6465 3e20 2d20 6175 ange - au │ │ │ -0003d390: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -0003d3a0: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated
    .
    < │ │ │ -0003d3b0: 636f 6465 3e6f 703c 2f63 6f64 653e 202d code>op - │ │ │ -0003d3c0: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ -0003d3d0: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ..
    .< │ │ │ -0003d3f0: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    │ │ │ -0003d460: 4661 7374 486f 7567 6854 7261 6e73 666f FastHoughTransfo │ │ │ -0003d470: 726d 3c2f 6833 3e0a 3c64 6976 2063 6c61 rm

    .
    pu │ │ │ -0003d4b0: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static void&nb │ │ │ -0003d4f0: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;Fa │ │ │ -0003d510: 7374 486f 7567 6854 7261 6e73 666f 726d stHoughTransform │ │ │ -0003d520: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (Mat s │ │ │ -0003d590: 7263 2c0a 203c 6120 6872 6566 3d22 2e2e rc,. Mat ds │ │ │ -0003d5e0: 742c 0a20 696e 7426 6e62 7370 3b64 7374 t,. int dst │ │ │ -0003d5f0: 4d61 7444 6570 7468 2c0a 2069 6e74 266e MatDepth,. int&n │ │ │ -0003d600: 6273 703b 616e 676c 6552 616e 6765 293c bsp;angleRange)< │ │ │ -0003d610: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ -0003d630: 4361 6c63 756c 6174 6573 2032 4420 4661 Calculates 2D Fa │ │ │ -0003d640: 7374 2048 6f75 6768 2074 7261 6e73 666f st Hough transfo │ │ │ -0003d650: 726d 206f 6620 616e 2069 6d61 6765 2e0a rm of an image.. │ │ │ -0003d660: 0a20 5468 6520 6675 6e63 7469 6f6e 2063 . The function c │ │ │ -0003d670: 616c 6375 6c61 7465 7320 7468 6520 6661 alculates the fa │ │ │ -0003d680: 7374 2048 6f75 6768 2074 7261 6e73 666f st Hough transfo │ │ │ -0003d690: 726d 2066 6f72 2066 756c 6c2c 2068 616c rm for full, hal │ │ │ -0003d6a0: 6620 6f72 2071 7561 7274 6572 0a20 7261 f or quarter. ra │ │ │ -0003d6b0: 6e67 6520 6f66 2061 6e67 6c65 732e 3c2f nge of angles..
    .
    Para │ │ │ -0003d6e0: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    src - automaticall │ │ │ -0003d710: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ -0003d720: 0a3c 6464 3e3c 636f 6465 3e64 7374 3c2f .
    dst - automati │ │ │ -0003d740: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -0003d750: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e64 /dd>.
    d │ │ │ -0003d760: 7374 4d61 7444 6570 7468 3c2f 636f 6465 stMatDepth - automaticall │ │ │ -0003d780: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ -0003d790: 0a3c 6464 3e3c 636f 6465 3e61 6e67 6c65 .
    angle │ │ │ -0003d7a0: 5261 6e67 653c 2f63 6f64 653e 202d 2061 Range - a │ │ │ -0003d7b0: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ -0003d7c0: 6572 6174 6564 3c2f 6464 3e0a 3c2f 646c erated
    .
    .
  • ..
  • .
    .

    FastHo │ │ │ -0003d850: 7567 6854 7261 6e73 666f 726d 3c2f 6833 ughTransform

    .
    │ │ │ -0003d880: 3c73 7061 6e20 636c 6173 733d 226d 6f64 public s │ │ │ -0003d8a0: 7461 7469 633c 2f73 7061 6e3e 266e 6273 tatic&nbs │ │ │ -0003d8b0: 703b 3c73 7061 6e20 636c 6173 733d 2272 p;void │ │ │ -0003d8d0: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  FastHoug │ │ │ -0003d900: 6854 7261 6e73 666f 726d 3c2f 7370 616e hTransform( │ │ │ -0003d930: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ -0003d970: 2f61 3e26 6e62 7370 3b73 7263 2c0a 203c /a> src,. < │ │ │ -0003d980: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -0003d990: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -0003d9a0: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -0003d9b0: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat dst,. in │ │ │ -0003d9d0: 7426 6e62 7370 3b64 7374 4d61 7444 6570 t dstMatDep │ │ │ -0003d9e0: 7468 293c 2f73 7061 6e3e 3c2f 6469 763e th)
    │ │ │ -0003d9f0: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
    Calculates 2 │ │ │ -0003da10: 4420 4661 7374 2048 6f75 6768 2074 7261 D Fast Hough tra │ │ │ -0003da20: 6e73 666f 726d 206f 6620 616e 2069 6d61 nsform of an ima │ │ │ -0003da30: 6765 2e0a 0a20 5468 6520 6675 6e63 7469 ge... The functi │ │ │ -0003da40: 6f6e 2063 616c 6375 6c61 7465 7320 7468 on calculates th │ │ │ -0003da50: 6520 6661 7374 2048 6f75 6768 2074 7261 e fast Hough tra │ │ │ -0003da60: 6e73 666f 726d 2066 6f72 2066 756c 6c2c nsform for full, │ │ │ -0003da70: 2068 616c 6620 6f72 2071 7561 7274 6572 half or quarter │ │ │ -0003da80: 0a20 7261 6e67 6520 6f66 2061 6e67 6c65 . range of angle │ │ │ -0003da90: 732e 3c2f 6469 763e 0a3c 646c 2063 6c61 s.
    .
    .
    │ │ │ -0003dab0: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
    │ │ │ -0003dac0: 0a3c 6464 3e3c 636f 6465 3e73 7263 3c2f .
    src - automati │ │ │ -0003dae0: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -0003daf0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e64 /dd>.
    d │ │ │ -0003db00: 7374 3c2f 636f 6465 3e20 2d20 6175 746f st - auto │ │ │ -0003db10: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ -0003db20: 7465 643c 2f64 643e 0a3c 6464 3e3c 636f ted
    .
    dstMatDepth - automati │ │ │ -0003db50: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -0003db60: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.
    ..
  • .
  • │ │ │ -0003db80: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    .

    covaria │ │ │ -0003dbf0: 6e63 6545 7374 696d 6174 696f 6e3c 2f68 nceEstimation.
    public │ │ │ -0003dc40: 7374 6174 6963 3c2f 7370 616e 3e26 6e62 static&nb │ │ │ -0003dc50: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;voi │ │ │ -0003dc70: 643c 2f73 7061 6e3e 266e 6273 703b 3c73 d covaria │ │ │ -0003dca0: 6e63 6545 7374 696d 6174 696f 6e3c 2f73 nceEstimation(M │ │ │ -0003dd10: 6174 3c2f 613e 266e 6273 703b 7372 632c at src, │ │ │ -0003dd20: 0a20 3c61 2068 7265 663d 222e 2e2f 636f . Ma │ │ │ -0003dd60: 743c 2f61 3e26 6e62 7370 3b64 7374 2c0a t dst,. │ │ │ -0003dd70: 2069 6e74 266e 6273 703b 7769 6e64 6f77 int window │ │ │ -0003dd80: 526f 7773 2c0a 2069 6e74 266e 6273 703b Rows,. int  │ │ │ -0003dd90: 7769 6e64 6f77 436f 6c73 293c 2f73 7061 windowCols)
    .
    Comp │ │ │ -0003ddc0: 7574 6573 2074 6865 2065 7374 696d 6174 utes the estimat │ │ │ -0003ddd0: 6564 2063 6f76 6172 6961 6e63 6520 6d61 ed covariance ma │ │ │ -0003dde0: 7472 6978 206f 6620 616e 2069 6d61 6765 trix of an image │ │ │ -0003ddf0: 2075 7369 6e67 2074 6865 2073 6c69 6469 using the slidi │ │ │ -0003de00: 6e67 0a20 7769 6e64 6f77 2066 6f72 756d ng. window forum │ │ │ -0003de10: 6c61 7469 6f6e 2e3c 2f64 6976 3e0a 3c64 lation.
    . │ │ │ -0003de30: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ -0003de40: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -0003de50: 7372 633c 2f63 6f64 653e 202d 2054 6865 src - The │ │ │ -0003de60: 2073 6f75 7263 6520 696d 6167 652e 2049 source image. I │ │ │ -0003de70: 6e70 7574 2069 6d61 6765 206d 7573 7420 nput image must │ │ │ -0003de80: 6265 206f 6620 6120 636f 6d70 6c65 7820 be of a complex │ │ │ -0003de90: 7479 7065 2e3c 2f64 643e 0a3c 6464 3e3c type.
    .
    < │ │ │ -0003dea0: 636f 6465 3e64 7374 3c2f 636f 6465 3e20 code>dst │ │ │ -0003deb0: 2d20 5468 6520 6465 7374 696e 6174 696f - The destinatio │ │ │ -0003dec0: 6e20 6573 7469 6d61 7465 6420 636f 7661 n estimated cova │ │ │ -0003ded0: 7269 616e 6365 206d 6174 7269 782e 204f riance matrix. O │ │ │ -0003dee0: 7574 7075 7420 6d61 7472 6978 2077 696c utput matrix wil │ │ │ -0003def0: 6c20 6265 2073 697a 6520 2877 696e 646f l be size (windo │ │ │ -0003df00: 7752 6f77 732a 7769 6e64 6f77 436f 6c73 wRows*windowCols │ │ │ -0003df10: 2c20 7769 6e64 6f77 526f 7773 2a77 696e , windowRows*win │ │ │ -0003df20: 646f 7743 6f6c 7329 2e3c 2f64 643e 0a3c dowCols).
    .< │ │ │ -0003df30: 6464 3e3c 636f 6465 3e77 696e 646f 7752 dd>windowR │ │ │ -0003df40: 6f77 733c 2f63 6f64 653e 202d 2054 6865 ows - The │ │ │ -0003df50: 206e 756d 6265 7220 6f66 2072 6f77 7320 number of rows │ │ │ -0003df60: 696e 2074 6865 2077 696e 646f 772e 3c2f in the window..
    wi │ │ │ -0003df80: 6e64 6f77 436f 6c73 3c2f 636f 6465 3e20 ndowCols │ │ │ -0003df90: 2d20 5468 6520 6e75 6d62 6572 206f 6620 - The number of │ │ │ -0003dfa0: 636f 6c73 2069 6e20 7468 6520 7769 6e64 cols in the wind │ │ │ -0003dfb0: 6f77 2e0a 2054 6865 2077 696e 646f 7720 ow.. The window │ │ │ -0003dfc0: 7369 7a65 2070 6172 616d 6574 6572 7320 size parameters │ │ │ -0003dfd0: 636f 6e74 726f 6c20 7468 6520 6163 6375 control the accu │ │ │ -0003dfe0: 7261 6379 206f 6620 7468 6520 6573 7469 racy of the esti │ │ │ -0003dff0: 6d61 7469 6f6e 2e0a 2054 6865 2073 6c69 mation.. The sli │ │ │ -0003e000: 6469 6e67 2077 696e 646f 7720 6d6f 7665 ding window move │ │ │ -0003e010: 7320 6f76 6572 2074 6865 2065 6e74 6972 s over the entir │ │ │ -0003e020: 6520 696d 6167 6520 6672 6f6d 2074 6865 e image from the │ │ │ -0003e030: 2074 6f70 2d6c 6566 7420 636f 726e 6572 top-left corner │ │ │ -0003e040: 0a20 746f 2074 6865 2062 6f74 746f 6d20 . to the bottom │ │ │ -0003e050: 7269 6768 7420 636f 726e 6572 2e20 4561 right corner. Ea │ │ │ -0003e060: 6368 206c 6f63 6174 696f 6e20 6f66 2074 ch location of t │ │ │ -0003e070: 6865 2077 696e 646f 7720 7265 7072 6573 he window repres │ │ │ -0003e080: 656e 7473 2061 2073 616d 706c 652e 0a20 ents a sample.. │ │ │ -0003e090: 4966 2074 6865 2077 696e 646f 7720 6973 If the window is │ │ │ -0003e0a0: 2074 6865 2073 697a 6520 6f66 2074 6865 the size of the │ │ │ -0003e0b0: 2069 6d61 6765 2c20 7468 656e 2074 6869 image, then thi │ │ │ -0003e0c0: 7320 6769 7665 7320 7468 6520 6578 6163 s gives the exac │ │ │ -0003e0d0: 7420 636f 7661 7269 616e 6365 206d 6174 t covariance mat │ │ │ -0003e0e0: 7269 782e 0a20 466f 7220 616c 6c20 6f74 rix.. For all ot │ │ │ -0003e0f0: 6865 7220 6361 7365 732c 2074 6865 2073 her cases, the s │ │ │ -0003e100: 697a 6573 206f 6620 7468 6520 7769 6e64 izes of the wind │ │ │ -0003e110: 6f77 2077 696c 6c20 696d 7061 6374 2074 ow will impact t │ │ │ -0003e120: 6865 206e 756d 6265 7220 6f66 2073 616d he number of sam │ │ │ -0003e130: 706c 6573 0a20 616e 6420 7468 6520 6e75 ples. and the nu │ │ │ -0003e140: 6d62 6572 206f 6620 656c 656d 656e 7473 mber of elements │ │ │ -0003e150: 2069 6e20 7468 6520 6573 7469 6d61 7465 in the estimate │ │ │ -0003e160: 6420 636f 7661 7269 616e 6365 206d 6174 d covariance mat │ │ │ -0003e170: 7269 782e 3c2f 6464 3e0a 3c2f 646c 3e0a rix.
    .. │ │ │ -0003e180: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e

    .
  • │ │ │ -0003e190: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .

    edgePreservingF │ │ │ -0003e210: 696c 7465 723c 2f68 333e 0a3c 6469 7620 ilter

    .
    public static void │ │ │ -0003e290: 266e 6273 703b 3c73 7061 6e20 636c 6173  edgePreservingF │ │ │ -0003e2c0: 696c 7465 723c 2f73 7061 6e3e 3c77 6272 ilter(Mat&n │ │ │ -0003e330: 6273 703b 7372 632c 0a20 3c61 2068 7265 bsp;src,. Mat&nb │ │ │ -0003e380: 7370 3b64 7374 2c0a 2069 6e74 266e 6273 sp;dst,. int&nbs │ │ │ -0003e390: 703b 642c 0a20 646f 7562 6c65 266e 6273 p;d,. double&nbs │ │ │ -0003e3a0: 703b 7468 7265 7368 6f6c 6429 3c2f 7370 p;threshold)
    .
    Smo │ │ │ -0003e3d0: 6f74 6865 7320 616e 2069 6d61 6765 2075 othes an image u │ │ │ -0003e3e0: 7369 6e67 2074 6865 2045 6467 652d 5072 sing the Edge-Pr │ │ │ -0003e3f0: 6573 6572 7669 6e67 2066 696c 7465 722e eserving filter. │ │ │ -0003e400: 0a0a 2054 6865 2066 756e 6374 696f 6e20 .. The function │ │ │ -0003e410: 736d 6f6f 7468 6573 2047 6175 7373 6961 smoothes Gaussia │ │ │ -0003e420: 6e20 6e6f 6973 6520 6173 2077 656c 6c20 n noise as well │ │ │ -0003e430: 6173 2073 616c 7420 2661 6d70 3b20 7065 as salt & pe │ │ │ -0003e440: 7070 6572 206e 6f69 7365 2e0a 2046 6f72 pper noise.. For │ │ │ -0003e450: 206d 6f72 6520 6465 7461 696c 7320 6162 more details ab │ │ │ -0003e460: 6f75 7420 7468 6973 2069 6d70 6c65 6d65 out this impleme │ │ │ -0003e470: 6e74 6174 696f 6e2c 2070 6c65 6173 6520 ntation, please │ │ │ -0003e480: 7365 650a 205b 5265 6957 6f65 3138 5d20 see. [ReiWoe18] │ │ │ -0003e490: 2052 6569 6368 2c20 532e 2061 6e64 2057 Reich, S. and W │ │ │ -0003e4a0: c3b6 7267 c3b6 7474 6572 2c20 462e 2061 ..rg..tter, F. a │ │ │ -0003e4b0: 6e64 2044 656c 6c65 6e2c 2042 2e20 2832 nd Dellen, B. (2 │ │ │ -0003e4c0: 3031 3829 2e20 4120 5265 616c 2d54 696d 018). A Real-Tim │ │ │ -0003e4d0: 6520 4564 6765 2d50 7265 7365 7276 696e e Edge-Preservin │ │ │ -0003e4e0: 6720 4465 6e6f 6973 696e 6720 4669 6c74 g Denoising Filt │ │ │ -0003e4f0: 6572 2e20 5072 6f63 6565 6469 6e67 7320 er. Proceedings │ │ │ -0003e500: 6f66 2074 6865 2031 3374 6820 496e 7465 of the 13th Inte │ │ │ -0003e510: 726e 6174 696f 6e61 6c20 4a6f 696e 7420 rnational Joint │ │ │ -0003e520: 436f 6e66 6572 656e 6365 206f 6e20 436f Conference on Co │ │ │ -0003e530: 6d70 7574 6572 2056 6973 696f 6e2c 2049 mputer Vision, I │ │ │ -0003e540: 6d61 6769 6e67 2061 6e64 2043 6f6d 7075 maging and Compu │ │ │ -0003e550: 7465 7220 4772 6170 6869 6373 2054 6865 ter Graphics The │ │ │ -0003e560: 6f72 7920 616e 6420 4170 706c 6963 6174 ory and Applicat │ │ │ -0003e570: 696f 6e73 2028 5649 5349 4752 4150 5029 ions (VISIGRAPP) │ │ │ -0003e580: 3a20 5669 7361 7070 2c20 3835 2d39 342c : Visapp, 85-94, │ │ │ -0003e590: 2034 2e20 444f 493a 2031 302e 3532 3230 4. DOI: 10.5220 │ │ │ -0003e5a0: 2f30 3030 3635 3039 3030 3038 3530 3039 /000650900085009 │ │ │ -0003e5b0: 342e 3c2f 6469 763e 0a3c 646c 2063 6c61 4.
    .
    .
    │ │ │ -0003e5d0: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
    │ │ │ -0003e5e0: 0a3c 6464 3e3c 636f 6465 3e73 7263 3c2f .
    src - Source 8 │ │ │ -0003e600: 2d62 6974 2033 2d63 6861 6e6e 656c 2069 -bit 3-channel i │ │ │ -0003e610: 6d61 6765 2e3c 2f64 643e 0a3c 6464 3e3c mage.
    .
    < │ │ │ -0003e620: 636f 6465 3e64 7374 3c2f 636f 6465 3e20 code>dst │ │ │ -0003e630: 2d20 4465 7374 696e 6174 696f 6e20 696d - Destination im │ │ │ -0003e640: 6167 6520 6f66 2074 6865 2073 616d 6520 age of the same │ │ │ -0003e650: 7369 7a65 2061 6e64 2074 7970 6520 6173 size and type as │ │ │ -0003e660: 2073 7263 2e3c 2f64 643e 0a3c 6464 3e3c src.
    .
    < │ │ │ -0003e670: 636f 6465 3e64 3c2f 636f 6465 3e20 2d20 code>d - │ │ │ -0003e680: 4469 616d 6574 6572 206f 6620 6561 6368 Diameter of each │ │ │ -0003e690: 2070 6978 656c 206e 6569 6768 626f 7268 pixel neighborh │ │ │ -0003e6a0: 6f6f 6420 7468 6174 2069 7320 7573 6564 ood that is used │ │ │ -0003e6b0: 2064 7572 696e 6720 6669 6c74 6572 696e during filterin │ │ │ -0003e6c0: 672e 204d 7573 7420 6265 2067 7265 6174 g. Must be great │ │ │ -0003e6d0: 6572 206f 7220 6571 7561 6c20 332e 3c2f er or equal 3..
    th │ │ │ -0003e6f0: 7265 7368 6f6c 643c 2f63 6f64 653e 202d reshold - │ │ │ -0003e700: 2054 6872 6573 686f 6c64 2c20 7768 6963 Threshold, whic │ │ │ -0003e710: 6820 6469 7374 696e 6775 6973 6865 7320 h distinguishes │ │ │ -0003e720: 6265 7477 6565 6e20 6e6f 6973 652c 206f between noise, o │ │ │ -0003e730: 7574 6c69 6572 732c 2061 6e64 2064 6174 utliers, and dat │ │ │ -0003e740: 612e 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f a.
    .
    ..
  • .< │ │ │ -0003e760: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    cre │ │ │ -0003e7e0: 6174 6545 6467 6542 6f78 6573 3c2f 6833 ateEdgeBoxes

    .
    │ │ │ -0003e810: 3c73 7061 6e20 636c 6173 733d 226d 6f64 public s │ │ │ -0003e830: 7461 7469 633c 2f73 7061 6e3e 266e 6273 tatic&nbs │ │ │ -0003e840: 703b 3c73 7061 6e20 636c 6173 733d 2272 p;EdgeBo │ │ │ -0003e8a0: 7865 733c 2f61 3e3c 2f73 7061 6e3e 266e xes&n │ │ │ -0003e8b0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;c │ │ │ -0003e8d0: 7265 6174 6545 6467 6542 6f78 6573 3c2f reateEdgeBoxes(float a │ │ │ -0003e910: 6c70 6861 2c0a 2066 6c6f 6174 266e 6273 lpha,. float&nbs │ │ │ -0003e920: 703b 6265 7461 2c0a 2066 6c6f 6174 266e p;beta,. float&n │ │ │ -0003e930: 6273 703b 6574 612c 0a20 666c 6f61 7426 bsp;eta,. float& │ │ │ -0003e940: 6e62 7370 3b6d 696e 5363 6f72 652c 0a20 nbsp;minScore,. │ │ │ -0003e950: 696e 7426 6e62 7370 3b6d 6178 426f 7865 int maxBoxe │ │ │ -0003e960: 732c 0a20 666c 6f61 7426 6e62 7370 3b65 s,. float e │ │ │ -0003e970: 6467 654d 696e 4d61 672c 0a20 666c 6f61 dgeMinMag,. floa │ │ │ -0003e980: 7426 6e62 7370 3b65 6467 654d 6572 6765 t edgeMerge │ │ │ -0003e990: 5468 722c 0a20 666c 6f61 7426 6e62 7370 Thr,. float  │ │ │ -0003e9a0: 3b63 6c75 7374 6572 4d69 6e4d 6167 2c0a ;clusterMinMag,. │ │ │ -0003e9b0: 2066 6c6f 6174 266e 6273 703b 6d61 7841 float maxA │ │ │ -0003e9c0: 7370 6563 7452 6174 696f 2c0a 2066 6c6f spectRatio,. flo │ │ │ -0003e9d0: 6174 266e 6273 703b 6d69 6e42 6f78 4172 at minBoxAr │ │ │ -0003e9e0: 6561 2c0a 2066 6c6f 6174 266e 6273 703b ea,. float  │ │ │ -0003e9f0: 6761 6d6d 612c 0a20 666c 6f61 7426 6e62 gamma,. float&nb │ │ │ -0003ea00: 7370 3b6b 6170 7061 293c 2f73 7061 6e3e sp;kappa) │ │ │ -0003ea10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    Create │ │ │ -0003ea30: 7320 6120 4564 6765 626f 7865 733c 2f64 s a Edgeboxes.
    .
    Param │ │ │ -0003ea60: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ -0003ea70: 3c63 6f64 653e 616c 7068 613c 2f63 6f64 alpha - step size o │ │ │ -0003ea90: 6620 736c 6964 696e 6720 7769 6e64 6f77 f sliding window │ │ │ -0003eaa0: 2073 6561 7263 682e 3c2f 6464 3e0a 3c64 search.
    .beta - nms thresh │ │ │ -0003ead0: 6f6c 6420 666f 7220 6f62 6a65 6374 2070 old for object p │ │ │ -0003eae0: 726f 706f 7361 6c73 2e3c 2f64 643e 0a3c roposals..< │ │ │ -0003eaf0: 6464 3e3c 636f 6465 3e65 7461 3c2f 636f dd>eta - adaptation │ │ │ -0003eb10: 2072 6174 6520 666f 7220 6e6d 7320 7468 rate for nms th │ │ │ -0003eb20: 7265 7368 6f6c 642e 3c2f 6464 3e0a 3c64 reshold..minScore │ │ │ -0003eb40: 3c2f 636f 6465 3e20 2d20 6d69 6e20 7363 - min sc │ │ │ -0003eb50: 6f72 6520 6f66 2062 6f78 6573 2074 6f20 ore of boxes to │ │ │ -0003eb60: 6465 7465 6374 2e3c 2f64 643e 0a3c 6464 detect..
    maxBoxes< │ │ │ -0003eb80: 2f63 6f64 653e 202d 206d 6178 206e 756d /code> - max num │ │ │ -0003eb90: 6265 7220 6f66 2062 6f78 6573 2074 6f20 ber of boxes to │ │ │ -0003eba0: 6465 7465 6374 2e3c 2f64 643e 0a3c 6464 detect.
    .
    edgeMinMa │ │ │ -0003ebc0: 673c 2f63 6f64 653e 202d 2065 6467 6520 g - edge │ │ │ -0003ebd0: 6d69 6e20 6d61 676e 6974 7564 652e 2049 min magnitude. I │ │ │ -0003ebe0: 6e63 7265 6173 6520 746f 2074 7261 6465 ncrease to trade │ │ │ -0003ebf0: 206f 6666 2061 6363 7572 6163 7920 666f off accuracy fo │ │ │ -0003ec00: 7220 7370 6565 642e 3c2f 6464 3e0a 3c64 r speed.
    .edgeMerg │ │ │ -0003ec20: 6554 6872 3c2f 636f 6465 3e20 2d20 6564 eThr - ed │ │ │ -0003ec30: 6765 206d 6572 6765 2074 6872 6573 686f ge merge thresho │ │ │ -0003ec40: 6c64 2e20 496e 6372 6561 7365 2074 6f20 ld. Increase to │ │ │ -0003ec50: 7472 6164 6520 6f66 6620 6163 6375 7261 trade off accura │ │ │ -0003ec60: 6379 2066 6f72 2073 7065 6564 2e3c 2f64 cy for speed..
    clu │ │ │ -0003ec80: 7374 6572 4d69 6e4d 6167 3c2f 636f 6465 sterMinMag - cluster min │ │ │ -0003eca0: 6d61 676e 6974 7564 652e 2049 6e63 7265 magnitude. Incre │ │ │ -0003ecb0: 6173 6520 746f 2074 7261 6465 206f 6666 ase to trade off │ │ │ -0003ecc0: 2061 6363 7572 6163 7920 666f 7220 7370 accuracy for sp │ │ │ -0003ecd0: 6565 642e 3c2f 6464 3e0a 3c64 643e 3c63 eed.
    .
    maxAspectRat │ │ │ -0003ecf0: 696f 3c2f 636f 6465 3e20 2d20 6d61 7820 io - max │ │ │ -0003ed00: 6173 7065 6374 2072 6174 696f 206f 6620 aspect ratio of │ │ │ -0003ed10: 626f 7865 732e 3c2f 6464 3e0a 3c64 643e boxes.
    .
    │ │ │ -0003ed20: 3c63 6f64 653e 6d69 6e42 6f78 4172 6561 minBoxArea │ │ │ -0003ed30: 3c2f 636f 6465 3e20 2d20 6d69 6e69 6d75 - minimu │ │ │ -0003ed40: 6d20 6172 6561 206f 6620 626f 7865 732e m area of boxes. │ │ │ -0003ed50: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -0003ed60: 6761 6d6d 613c 2f63 6f64 653e 202d 2061 gamma - a │ │ │ -0003ed70: 6666 696e 6974 7920 7365 6e73 6974 6976 ffinity sensitiv │ │ │ -0003ed80: 6974 792e 3c2f 6464 3e0a 3c64 643e 3c63 ity.
    .
    kappa │ │ │ -0003eda0: 202d 2073 6361 6c65 2073 656e 7369 7469 - scale sensiti │ │ │ -0003edb0: 7669 7479 2e3c 2f64 643e 0a3c 6474 3e52 vity.
    .
    R │ │ │ -0003edc0: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
    .
    automatically g │ │ │ -0003ede0: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ..
    .< │ │ │ -0003ee00: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    cre │ │ │ -0003ee80: 6174 6545 6467 6542 6f78 6573 3c2f 6833 ateEdgeBoxes

    .
    │ │ │ -0003eeb0: 3c73 7061 6e20 636c 6173 733d 226d 6f64 public s │ │ │ -0003eed0: 7461 7469 633c 2f73 7061 6e3e 266e 6273 tatic&nbs │ │ │ -0003eee0: 703b 3c73 7061 6e20 636c 6173 733d 2272 p;EdgeBo │ │ │ -0003ef40: 7865 733c 2f61 3e3c 2f73 7061 6e3e 266e xes&n │ │ │ -0003ef50: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;c │ │ │ -0003ef70: 7265 6174 6545 6467 6542 6f78 6573 3c2f reateEdgeBoxes(float a │ │ │ -0003efb0: 6c70 6861 2c0a 2066 6c6f 6174 266e 6273 lpha,. float&nbs │ │ │ -0003efc0: 703b 6265 7461 2c0a 2066 6c6f 6174 266e p;beta,. float&n │ │ │ -0003efd0: 6273 703b 6574 612c 0a20 666c 6f61 7426 bsp;eta,. float& │ │ │ -0003efe0: 6e62 7370 3b6d 696e 5363 6f72 652c 0a20 nbsp;minScore,. │ │ │ -0003eff0: 696e 7426 6e62 7370 3b6d 6178 426f 7865 int maxBoxe │ │ │ -0003f000: 732c 0a20 666c 6f61 7426 6e62 7370 3b65 s,. float e │ │ │ -0003f010: 6467 654d 696e 4d61 672c 0a20 666c 6f61 dgeMinMag,. floa │ │ │ -0003f020: 7426 6e62 7370 3b65 6467 654d 6572 6765 t edgeMerge │ │ │ -0003f030: 5468 722c 0a20 666c 6f61 7426 6e62 7370 Thr,. float  │ │ │ -0003f040: 3b63 6c75 7374 6572 4d69 6e4d 6167 2c0a ;clusterMinMag,. │ │ │ -0003f050: 2066 6c6f 6174 266e 6273 703b 6d61 7841 float maxA │ │ │ -0003f060: 7370 6563 7452 6174 696f 2c0a 2066 6c6f spectRatio,. flo │ │ │ -0003f070: 6174 266e 6273 703b 6d69 6e42 6f78 4172 at minBoxAr │ │ │ -0003f080: 6561 2c0a 2066 6c6f 6174 266e 6273 703b ea,. float  │ │ │ -0003f090: 6761 6d6d 6129 3c2f 7370 616e 3e3c 2f64 gamma).
    Creates a │ │ │ -0003f0c0: 2045 6467 6562 6f78 6573 3c2f 6469 763e Edgeboxes
    │ │ │ -0003f0d0: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
    .
    Paramete │ │ │ -0003f0f0: 7273 3a3c 2f64 743e 0a3c 6464 3e3c 636f rs:
    .
    alpha │ │ │ -0003f110: 2d20 7374 6570 2073 697a 6520 6f66 2073 - step size of s │ │ │ -0003f120: 6c69 6469 6e67 2077 696e 646f 7720 7365 liding window se │ │ │ -0003f130: 6172 6368 2e3c 2f64 643e 0a3c 6464 3e3c arch.
    .
    < │ │ │ -0003f140: 636f 6465 3e62 6574 613c 2f63 6f64 653e code>beta │ │ │ -0003f150: 202d 206e 6d73 2074 6872 6573 686f 6c64 - nms threshold │ │ │ -0003f160: 2066 6f72 206f 626a 6563 7420 7072 6f70 for object prop │ │ │ -0003f170: 6f73 616c 732e 3c2f 6464 3e0a 3c64 643e osals.
    .
    │ │ │ -0003f180: 3c63 6f64 653e 6574 613c 2f63 6f64 653e eta │ │ │ -0003f190: 202d 2061 6461 7074 6174 696f 6e20 7261 - adaptation ra │ │ │ -0003f1a0: 7465 2066 6f72 206e 6d73 2074 6872 6573 te for nms thres │ │ │ -0003f1b0: 686f 6c64 2e3c 2f64 643e 0a3c 6464 3e3c hold.
    .
    < │ │ │ -0003f1c0: 636f 6465 3e6d 696e 5363 6f72 653c 2f63 code>minScore - min score │ │ │ -0003f1e0: 206f 6620 626f 7865 7320 746f 2064 6574 of boxes to det │ │ │ -0003f1f0: 6563 742e 3c2f 6464 3e0a 3c64 643e 3c63 ect.
    .
    maxBoxes - max number │ │ │ -0003f220: 206f 6620 626f 7865 7320 746f 2064 6574 of boxes to det │ │ │ -0003f230: 6563 742e 3c2f 6464 3e0a 3c64 643e 3c63 ect.
    .
    edgeMinMag - edge min │ │ │ -0003f260: 206d 6167 6e69 7475 6465 2e20 496e 6372 magnitude. Incr │ │ │ -0003f270: 6561 7365 2074 6f20 7472 6164 6520 6f66 ease to trade of │ │ │ -0003f280: 6620 6163 6375 7261 6379 2066 6f72 2073 f accuracy for s │ │ │ -0003f290: 7065 6564 2e3c 2f64 643e 0a3c 6464 3e3c peed.
    .
    < │ │ │ -0003f2a0: 636f 6465 3e65 6467 654d 6572 6765 5468 code>edgeMergeTh │ │ │ -0003f2b0: 723c 2f63 6f64 653e 202d 2065 6467 6520 r - edge │ │ │ -0003f2c0: 6d65 7267 6520 7468 7265 7368 6f6c 642e merge threshold. │ │ │ -0003f2d0: 2049 6e63 7265 6173 6520 746f 2074 7261 Increase to tra │ │ │ -0003f2e0: 6465 206f 6666 2061 6363 7572 6163 7920 de off accuracy │ │ │ -0003f2f0: 666f 7220 7370 6565 642e 3c2f 6464 3e0a for speed.
    . │ │ │ -0003f300: 3c64 643e 3c63 6f64 653e 636c 7573 7465
    cluste │ │ │ -0003f310: 724d 696e 4d61 673c 2f63 6f64 653e 202d rMinMag - │ │ │ -0003f320: 2063 6c75 7374 6572 206d 696e 206d 6167 cluster min mag │ │ │ -0003f330: 6e69 7475 6465 2e20 496e 6372 6561 7365 nitude. Increase │ │ │ -0003f340: 2074 6f20 7472 6164 6520 6f66 6620 6163 to trade off ac │ │ │ -0003f350: 6375 7261 6379 2066 6f72 2073 7065 6564 curacy for speed │ │ │ -0003f360: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    maxAspectRatio< │ │ │ -0003f380: 2f63 6f64 653e 202d 206d 6178 2061 7370 /code> - max asp │ │ │ -0003f390: 6563 7420 7261 7469 6f20 6f66 2062 6f78 ect ratio of box │ │ │ -0003f3a0: 6573 2e3c 2f64 643e 0a3c 6464 3e3c 636f es.
    .
    minBoxArea - minimum a │ │ │ -0003f3d0: 7265 6120 6f66 2062 6f78 6573 2e3c 2f64 rea of boxes..
    gam │ │ │ -0003f3f0: 6d61 3c2f 636f 6465 3e20 2d20 6166 6669 ma - affi │ │ │ -0003f400: 6e69 7479 2073 656e 7369 7469 7669 7479 nity sensitivity │ │ │ -0003f410: 2e3c 2f64 643e 0a3c 6474 3e52 6574 7572 .
    .
    Retur │ │ │ -0003f420: 6e73 3a3c 2f64 743e 0a3c 6464 3e61 7574 ns:
    .
    aut │ │ │ -0003f430: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ -0003f440: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
    .
    . │ │ │ -0003f450: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e
  • . │ │ │ -0003f460: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .< │ │ │ -0003f4d0: 6833 3e63 7265 6174 6545 6467 6542 6f78 h3>createEdgeBox │ │ │ -0003f4e0: 6573 3c2f 6833 3e0a 3c64 6976 2063 6c61 es.
    pu │ │ │ -0003f520: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static  │ │ │ -0003f590: 4564 6765 426f 7865 733c 2f61 3e3c 2f73 EdgeBoxes createEdgeB │ │ │ -0003f5d0: 6f78 6573 3c2f 7370 616e 3e3c 7762 723e oxes │ │ │ -0003f5e0: 3c73 7061 6e20 636c 6173 733d 2270 6172 (float& │ │ │ -0003f600: 6e62 7370 3b61 6c70 6861 2c0a 2066 6c6f nbsp;alpha,. flo │ │ │ -0003f610: 6174 266e 6273 703b 6265 7461 2c0a 2066 at beta,. f │ │ │ -0003f620: 6c6f 6174 266e 6273 703b 6574 612c 0a20 loat eta,. │ │ │ -0003f630: 666c 6f61 7426 6e62 7370 3b6d 696e 5363 float minSc │ │ │ -0003f640: 6f72 652c 0a20 696e 7426 6e62 7370 3b6d ore,. int m │ │ │ -0003f650: 6178 426f 7865 732c 0a20 666c 6f61 7426 axBoxes,. float& │ │ │ -0003f660: 6e62 7370 3b65 6467 654d 696e 4d61 672c nbsp;edgeMinMag, │ │ │ -0003f670: 0a20 666c 6f61 7426 6e62 7370 3b65 6467 . float edg │ │ │ -0003f680: 654d 6572 6765 5468 722c 0a20 666c 6f61 eMergeThr,. floa │ │ │ -0003f690: 7426 6e62 7370 3b63 6c75 7374 6572 4d69 t clusterMi │ │ │ -0003f6a0: 6e4d 6167 2c0a 2066 6c6f 6174 266e 6273 nMag,. float&nbs │ │ │ -0003f6b0: 703b 6d61 7841 7370 6563 7452 6174 696f p;maxAspectRatio │ │ │ -0003f6c0: 2c0a 2066 6c6f 6174 266e 6273 703b 6d69 ,. float mi │ │ │ -0003f6d0: 6e42 6f78 4172 6561 293c 2f73 7061 6e3e nBoxArea) │ │ │ -0003f6e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    Create │ │ │ -0003f700: 7320 6120 4564 6765 626f 7865 733c 2f64 s a Edgeboxes.
    .
    Param │ │ │ -0003f730: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ -0003f740: 3c63 6f64 653e 616c 7068 613c 2f63 6f64 alpha - step size o │ │ │ -0003f760: 6620 736c 6964 696e 6720 7769 6e64 6f77 f sliding window │ │ │ -0003f770: 2073 6561 7263 682e 3c2f 6464 3e0a 3c64 search.
    .beta - nms thresh │ │ │ -0003f7a0: 6f6c 6420 666f 7220 6f62 6a65 6374 2070 old for object p │ │ │ -0003f7b0: 726f 706f 7361 6c73 2e3c 2f64 643e 0a3c roposals..< │ │ │ -0003f7c0: 6464 3e3c 636f 6465 3e65 7461 3c2f 636f dd>eta - adaptation │ │ │ -0003f7e0: 2072 6174 6520 666f 7220 6e6d 7320 7468 rate for nms th │ │ │ -0003f7f0: 7265 7368 6f6c 642e 3c2f 6464 3e0a 3c64 reshold..minScore │ │ │ -0003f810: 3c2f 636f 6465 3e20 2d20 6d69 6e20 7363 - min sc │ │ │ -0003f820: 6f72 6520 6f66 2062 6f78 6573 2074 6f20 ore of boxes to │ │ │ -0003f830: 6465 7465 6374 2e3c 2f64 643e 0a3c 6464 detect..
    maxBoxes< │ │ │ -0003f850: 2f63 6f64 653e 202d 206d 6178 206e 756d /code> - max num │ │ │ -0003f860: 6265 7220 6f66 2062 6f78 6573 2074 6f20 ber of boxes to │ │ │ -0003f870: 6465 7465 6374 2e3c 2f64 643e 0a3c 6464 detect.
    .
    edgeMinMa │ │ │ -0003f890: 673c 2f63 6f64 653e 202d 2065 6467 6520 g - edge │ │ │ -0003f8a0: 6d69 6e20 6d61 676e 6974 7564 652e 2049 min magnitude. I │ │ │ -0003f8b0: 6e63 7265 6173 6520 746f 2074 7261 6465 ncrease to trade │ │ │ -0003f8c0: 206f 6666 2061 6363 7572 6163 7920 666f off accuracy fo │ │ │ -0003f8d0: 7220 7370 6565 642e 3c2f 6464 3e0a 3c64 r speed.
    .edgeMerg │ │ │ -0003f8f0: 6554 6872 3c2f 636f 6465 3e20 2d20 6564 eThr - ed │ │ │ -0003f900: 6765 206d 6572 6765 2074 6872 6573 686f ge merge thresho │ │ │ -0003f910: 6c64 2e20 496e 6372 6561 7365 2074 6f20 ld. Increase to │ │ │ -0003f920: 7472 6164 6520 6f66 6620 6163 6375 7261 trade off accura │ │ │ -0003f930: 6379 2066 6f72 2073 7065 6564 2e3c 2f64 cy for speed..
    clu │ │ │ -0003f950: 7374 6572 4d69 6e4d 6167 3c2f 636f 6465 sterMinMag - cluster min │ │ │ -0003f970: 6d61 676e 6974 7564 652e 2049 6e63 7265 magnitude. Incre │ │ │ -0003f980: 6173 6520 746f 2074 7261 6465 206f 6666 ase to trade off │ │ │ -0003f990: 2061 6363 7572 6163 7920 666f 7220 7370 accuracy for sp │ │ │ -0003f9a0: 6565 642e 3c2f 6464 3e0a 3c64 643e 3c63 eed.
    .
    maxAspectRat │ │ │ -0003f9c0: 696f 3c2f 636f 6465 3e20 2d20 6d61 7820 io - max │ │ │ -0003f9d0: 6173 7065 6374 2072 6174 696f 206f 6620 aspect ratio of │ │ │ -0003f9e0: 626f 7865 732e 3c2f 6464 3e0a 3c64 643e boxes.
    .
    │ │ │ -0003f9f0: 3c63 6f64 653e 6d69 6e42 6f78 4172 6561 minBoxArea │ │ │ -0003fa00: 3c2f 636f 6465 3e20 2d20 6d69 6e69 6d75 - minimu │ │ │ -0003fa10: 6d20 6172 6561 206f 6620 626f 7865 732e m area of boxes. │ │ │ -0003fa20: 3c2f 6464 3e0a 3c64 743e 5265 7475 726e
    .
    Return │ │ │ -0003fa30: 733a 3c2f 6474 3e0a 3c64 643e 6175 746f s:
    .
    auto │ │ │ -0003fa40: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ -0003fa50: 7465 643c 2f64 643e 0a3c 2f64 6c3e 0a3c ted
    .
    .< │ │ │ -0003fa60: 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 3e0a /section>.
  • . │ │ │ -0003fa70: 3c6c 693e 0a3c 7365 6374 696f 6e20 636c
  • .
    .

    crea │ │ │ -0003fae0: 7465 4564 6765 426f 7865 733c 2f68 333e teEdgeBoxes

    │ │ │ -0003faf0: 0a3c 6469 7620 636c 6173 733d 226d 656d .
    < │ │ │ -0003fb10: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ -0003fb20: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ -0003fb30: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ -0003fb40: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;EdgeBox │ │ │ -0003fba0: 6573 3c2f 613e 3c2f 7370 616e 3e26 6e62 es&nb │ │ │ -0003fbb0: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;cr │ │ │ -0003fbd0: 6561 7465 4564 6765 426f 7865 733c 2f73 eateEdgeBoxes(float al │ │ │ -0003fc10: 7068 612c 0a20 666c 6f61 7426 6e62 7370 pha,. float  │ │ │ -0003fc20: 3b62 6574 612c 0a20 666c 6f61 7426 6e62 ;beta,. float&nb │ │ │ -0003fc30: 7370 3b65 7461 2c0a 2066 6c6f 6174 266e sp;eta,. float&n │ │ │ -0003fc40: 6273 703b 6d69 6e53 636f 7265 2c0a 2069 bsp;minScore,. i │ │ │ -0003fc50: 6e74 266e 6273 703b 6d61 7842 6f78 6573 nt maxBoxes │ │ │ -0003fc60: 2c0a 2066 6c6f 6174 266e 6273 703b 6564 ,. float ed │ │ │ -0003fc70: 6765 4d69 6e4d 6167 2c0a 2066 6c6f 6174 geMinMag,. float │ │ │ -0003fc80: 266e 6273 703b 6564 6765 4d65 7267 6554  edgeMergeT │ │ │ -0003fc90: 6872 2c0a 2066 6c6f 6174 266e 6273 703b hr,. float  │ │ │ -0003fca0: 636c 7573 7465 724d 696e 4d61 672c 0a20 clusterMinMag,. │ │ │ -0003fcb0: 666c 6f61 7426 6e62 7370 3b6d 6178 4173 float maxAs │ │ │ -0003fcc0: 7065 6374 5261 7469 6f29 3c2f 7370 616e pectRatio)
    .
    Creat │ │ │ -0003fcf0: 6573 2061 2045 6467 6562 6f78 6573 3c2f es a Edgeboxes.
    .
    Para │ │ │ -0003fd20: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    alpha - step size │ │ │ -0003fd50: 6f66 2073 6c69 6469 6e67 2077 696e 646f of sliding windo │ │ │ -0003fd60: 7720 7365 6172 6368 2e3c 2f64 643e 0a3c w search.
    .< │ │ │ -0003fd70: 6464 3e3c 636f 6465 3e62 6574 613c 2f63 dd>beta - nms thres │ │ │ -0003fd90: 686f 6c64 2066 6f72 206f 626a 6563 7420 hold for object │ │ │ -0003fda0: 7072 6f70 6f73 616c 732e 3c2f 6464 3e0a proposals.. │ │ │ -0003fdb0: 3c64 643e 3c63 6f64 653e 6574 613c 2f63
    eta - adaptatio │ │ │ -0003fdd0: 6e20 7261 7465 2066 6f72 206e 6d73 2074 n rate for nms t │ │ │ -0003fde0: 6872 6573 686f 6c64 2e3c 2f64 643e 0a3c hreshold.
    .< │ │ │ -0003fdf0: 6464 3e3c 636f 6465 3e6d 696e 5363 6f72 dd>minScor │ │ │ -0003fe00: 653c 2f63 6f64 653e 202d 206d 696e 2073 e - min s │ │ │ -0003fe10: 636f 7265 206f 6620 626f 7865 7320 746f core of boxes to │ │ │ -0003fe20: 2064 6574 6563 742e 3c2f 6464 3e0a 3c64 detect..maxBoxes │ │ │ -0003fe40: 3c2f 636f 6465 3e20 2d20 6d61 7820 6e75 - max nu │ │ │ -0003fe50: 6d62 6572 206f 6620 626f 7865 7320 746f mber of boxes to │ │ │ -0003fe60: 2064 6574 6563 742e 3c2f 6464 3e0a 3c64 detect..edgeMinM │ │ │ -0003fe80: 6167 3c2f 636f 6465 3e20 2d20 6564 6765 ag - edge │ │ │ -0003fe90: 206d 696e 206d 6167 6e69 7475 6465 2e20 min magnitude. │ │ │ -0003fea0: 496e 6372 6561 7365 2074 6f20 7472 6164 Increase to trad │ │ │ -0003feb0: 6520 6f66 6620 6163 6375 7261 6379 2066 e off accuracy f │ │ │ -0003fec0: 6f72 2073 7065 6564 2e3c 2f64 643e 0a3c or speed..< │ │ │ -0003fed0: 6464 3e3c 636f 6465 3e65 6467 654d 6572 dd>edgeMer │ │ │ -0003fee0: 6765 5468 723c 2f63 6f64 653e 202d 2065 geThr - e │ │ │ -0003fef0: 6467 6520 6d65 7267 6520 7468 7265 7368 dge merge thresh │ │ │ -0003ff00: 6f6c 642e 2049 6e63 7265 6173 6520 746f old. Increase to │ │ │ -0003ff10: 2074 7261 6465 206f 6666 2061 6363 7572 trade off accur │ │ │ -0003ff20: 6163 7920 666f 7220 7370 6565 642e 3c2f acy for speed..
    cl │ │ │ -0003ff40: 7573 7465 724d 696e 4d61 673c 2f63 6f64 usterMinMag - cluster min │ │ │ -0003ff60: 206d 6167 6e69 7475 6465 2e20 496e 6372 magnitude. Incr │ │ │ -0003ff70: 6561 7365 2074 6f20 7472 6164 6520 6f66 ease to trade of │ │ │ -0003ff80: 6620 6163 6375 7261 6379 2066 6f72 2073 f accuracy for s │ │ │ -0003ff90: 7065 6564 2e3c 2f64 643e 0a3c 6464 3e3c peed.
    .
    < │ │ │ -0003ffa0: 636f 6465 3e6d 6178 4173 7065 6374 5261 code>maxAspectRa │ │ │ -0003ffb0: 7469 6f3c 2f63 6f64 653e 202d 206d 6178 tio - max │ │ │ -0003ffc0: 2061 7370 6563 7420 7261 7469 6f20 6f66 aspect ratio of │ │ │ -0003ffd0: 2062 6f78 6573 2e3c 2f64 643e 0a3c 6474 boxes.
    .
    Returns:
    .< │ │ │ -0003fff0: 6464 3e61 7574 6f6d 6174 6963 616c 6c79 dd>automatically │ │ │ -00040000: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated. │ │ │ -00040010: 3c2f 646c 3e0a 3c2f 7365 6374 696f 6e3e
    .
    │ │ │ -00040020: 0a3c 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 .
  • .
  • ..

    cre │ │ │ -00040090: 6174 6545 6467 6542 6f78 6573 3c2f 6833 ateEdgeBoxes

    .
    │ │ │ -000400c0: 3c73 7061 6e20 636c 6173 733d 226d 6f64 public s │ │ │ -000400e0: 7461 7469 633c 2f73 7061 6e3e 266e 6273 tatic&nbs │ │ │ -000400f0: 703b 3c73 7061 6e20 636c 6173 733d 2272 p;EdgeBo │ │ │ -00040150: 7865 733c 2f61 3e3c 2f73 7061 6e3e 266e xes&n │ │ │ -00040160: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;c │ │ │ -00040180: 7265 6174 6545 6467 6542 6f78 6573 3c2f reateEdgeBoxes(float a │ │ │ -000401c0: 6c70 6861 2c0a 2066 6c6f 6174 266e 6273 lpha,. float&nbs │ │ │ -000401d0: 703b 6265 7461 2c0a 2066 6c6f 6174 266e p;beta,. float&n │ │ │ -000401e0: 6273 703b 6574 612c 0a20 666c 6f61 7426 bsp;eta,. float& │ │ │ -000401f0: 6e62 7370 3b6d 696e 5363 6f72 652c 0a20 nbsp;minScore,. │ │ │ -00040200: 696e 7426 6e62 7370 3b6d 6178 426f 7865 int maxBoxe │ │ │ -00040210: 732c 0a20 666c 6f61 7426 6e62 7370 3b65 s,. float e │ │ │ -00040220: 6467 654d 696e 4d61 672c 0a20 666c 6f61 dgeMinMag,. floa │ │ │ -00040230: 7426 6e62 7370 3b65 6467 654d 6572 6765 t edgeMerge │ │ │ -00040240: 5468 722c 0a20 666c 6f61 7426 6e62 7370 Thr,. float  │ │ │ -00040250: 3b63 6c75 7374 6572 4d69 6e4d 6167 293c ;clusterMinMag)< │ │ │ -00040260: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ -00040280: 4372 6561 7465 7320 6120 4564 6765 626f Creates a Edgebo │ │ │ -00040290: 7865 733c 2f64 6976 3e0a 3c64 6c20 636c xes.
    .
    Parameters:
    .
    alph │ │ │ -000402d0: 613c 2f63 6f64 653e 202d 2073 7465 7020 a - step │ │ │ -000402e0: 7369 7a65 206f 6620 736c 6964 696e 6720 size of sliding │ │ │ -000402f0: 7769 6e64 6f77 2073 6561 7263 682e 3c2f window search..
    be │ │ │ -00040310: 7461 3c2f 636f 6465 3e20 2d20 6e6d 7320 ta - nms │ │ │ -00040320: 7468 7265 7368 6f6c 6420 666f 7220 6f62 threshold for ob │ │ │ -00040330: 6a65 6374 2070 726f 706f 7361 6c73 2e3c ject proposals.< │ │ │ -00040340: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e65 /dd>.
    e │ │ │ -00040350: 7461 3c2f 636f 6465 3e20 2d20 6164 6170 ta - adap │ │ │ -00040360: 7461 7469 6f6e 2072 6174 6520 666f 7220 tation rate for │ │ │ -00040370: 6e6d 7320 7468 7265 7368 6f6c 642e 3c2f nms threshold..
    mi │ │ │ -00040390: 6e53 636f 7265 3c2f 636f 6465 3e20 2d20 nScore - │ │ │ -000403a0: 6d69 6e20 7363 6f72 6520 6f66 2062 6f78 min score of box │ │ │ -000403b0: 6573 2074 6f20 6465 7465 6374 2e3c 2f64 es to detect..
    max │ │ │ -000403d0: 426f 7865 733c 2f63 6f64 653e 202d 206d Boxes - m │ │ │ -000403e0: 6178 206e 756d 6265 7220 6f66 2062 6f78 ax number of box │ │ │ -000403f0: 6573 2074 6f20 6465 7465 6374 2e3c 2f64 es to detect..
    edg │ │ │ -00040410: 654d 696e 4d61 673c 2f63 6f64 653e 202d eMinMag - │ │ │ -00040420: 2065 6467 6520 6d69 6e20 6d61 676e 6974 edge min magnit │ │ │ -00040430: 7564 652e 2049 6e63 7265 6173 6520 746f ude. Increase to │ │ │ -00040440: 2074 7261 6465 206f 6666 2061 6363 7572 trade off accur │ │ │ -00040450: 6163 7920 666f 7220 7370 6565 642e 3c2f acy for speed..
    ed │ │ │ -00040470: 6765 4d65 7267 6554 6872 3c2f 636f 6465 geMergeThr - edge merge t │ │ │ -00040490: 6872 6573 686f 6c64 2e20 496e 6372 6561 hreshold. Increa │ │ │ -000404a0: 7365 2074 6f20 7472 6164 6520 6f66 6620 se to trade off │ │ │ -000404b0: 6163 6375 7261 6379 2066 6f72 2073 7065 accuracy for spe │ │ │ -000404c0: 6564 2e3c 2f64 643e 0a3c 6464 3e3c 636f ed.
    .
    clusterMinMag │ │ │ -000404e0: 3c2f 636f 6465 3e20 2d20 636c 7573 7465 - cluste │ │ │ -000404f0: 7220 6d69 6e20 6d61 676e 6974 7564 652e r min magnitude. │ │ │ -00040500: 2049 6e63 7265 6173 6520 746f 2074 7261 Increase to tra │ │ │ -00040510: 6465 206f 6666 2061 6363 7572 6163 7920 de off accuracy │ │ │ -00040520: 666f 7220 7370 6565 642e 3c2f 6464 3e0a for speed.
    . │ │ │ -00040530: 3c64 743e 5265 7475 726e 733a 3c2f 6474
    Returns:
    .
    automatica │ │ │ -00040550: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    ..
  • .
  • .< │ │ │ -00040580: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ -00040590: 6574 6169 6c22 2069 643d 2263 7265 6174 etail" id="creat │ │ │ -000405a0: 6545 6467 6542 6f78 6573 2866 6c6f 6174 eEdgeBoxes(float │ │ │ -000405b0: 2c66 6c6f 6174 2c66 6c6f 6174 2c66 6c6f ,float,float,flo │ │ │ -000405c0: 6174 2c69 6e74 2c66 6c6f 6174 2c66 6c6f at,int,float,flo │ │ │ -000405d0: 6174 2922 3e0a 3c68 333e 6372 6561 7465 at)">.

    create │ │ │ -000405e0: 4564 6765 426f 7865 733c 2f68 333e 0a3c EdgeBoxes

    .< │ │ │ -000405f0: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ -00040600: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ -00040630: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ -00040640: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ -00040650: 726e 2d74 7970 6522 3e3c 6120 6872 6566 rn-type">EdgeBoxes │ │ │ -000406a0: 3c2f 613e 3c2f 7370 616e 3e26 6e62 7370   │ │ │ -000406b0: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;crea │ │ │ -000406d0: 7465 4564 6765 426f 7865 733c 2f73 7061 teEdgeBoxes │ │ │ -00040700: 2866 6c6f 6174 266e 6273 703b 616c 7068 (float alph │ │ │ -00040710: 612c 0a20 666c 6f61 7426 6e62 7370 3b62 a,. float b │ │ │ -00040720: 6574 612c 0a20 666c 6f61 7426 6e62 7370 eta,. float  │ │ │ -00040730: 3b65 7461 2c0a 2066 6c6f 6174 266e 6273 ;eta,. float&nbs │ │ │ -00040740: 703b 6d69 6e53 636f 7265 2c0a 2069 6e74 p;minScore,. int │ │ │ -00040750: 266e 6273 703b 6d61 7842 6f78 6573 2c0a  maxBoxes,. │ │ │ -00040760: 2066 6c6f 6174 266e 6273 703b 6564 6765 float edge │ │ │ -00040770: 4d69 6e4d 6167 2c0a 2066 6c6f 6174 266e MinMag,. float&n │ │ │ -00040780: 6273 703b 6564 6765 4d65 7267 6554 6872 bsp;edgeMergeThr │ │ │ -00040790: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ).< │ │ │ -000407a0: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ -000407b0: 223e 4372 6561 7465 7320 6120 4564 6765 ">Creates a Edge │ │ │ -000407c0: 626f 7865 733c 2f64 6976 3e0a 3c64 6c20 boxes.
    .< │ │ │ -000407e0: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
    al │ │ │ -00040800: 7068 613c 2f63 6f64 653e 202d 2073 7465 pha - ste │ │ │ -00040810: 7020 7369 7a65 206f 6620 736c 6964 696e p size of slidin │ │ │ -00040820: 6720 7769 6e64 6f77 2073 6561 7263 682e g window search. │ │ │ -00040830: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -00040840: 6265 7461 3c2f 636f 6465 3e20 2d20 6e6d beta - nm │ │ │ -00040850: 7320 7468 7265 7368 6f6c 6420 666f 7220 s threshold for │ │ │ -00040860: 6f62 6a65 6374 2070 726f 706f 7361 6c73 object proposals │ │ │ -00040870: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    eta - ad │ │ │ -00040890: 6170 7461 7469 6f6e 2072 6174 6520 666f aptation rate fo │ │ │ -000408a0: 7220 6e6d 7320 7468 7265 7368 6f6c 642e r nms threshold. │ │ │ -000408b0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -000408c0: 6d69 6e53 636f 7265 3c2f 636f 6465 3e20 minScore │ │ │ -000408d0: 2d20 6d69 6e20 7363 6f72 6520 6f66 2062 - min score of b │ │ │ -000408e0: 6f78 6573 2074 6f20 6465 7465 6374 2e3c oxes to detect.< │ │ │ -000408f0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e6d /dd>.
    m │ │ │ -00040900: 6178 426f 7865 733c 2f63 6f64 653e 202d axBoxes - │ │ │ -00040910: 206d 6178 206e 756d 6265 7220 6f66 2062 max number of b │ │ │ -00040920: 6f78 6573 2074 6f20 6465 7465 6374 2e3c oxes to detect.< │ │ │ -00040930: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e65 /dd>.
    e │ │ │ -00040940: 6467 654d 696e 4d61 673c 2f63 6f64 653e dgeMinMag │ │ │ -00040950: 202d 2065 6467 6520 6d69 6e20 6d61 676e - edge min magn │ │ │ -00040960: 6974 7564 652e 2049 6e63 7265 6173 6520 itude. Increase │ │ │ -00040970: 746f 2074 7261 6465 206f 6666 2061 6363 to trade off acc │ │ │ -00040980: 7572 6163 7920 666f 7220 7370 6565 642e uracy for speed. │ │ │ -00040990: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -000409a0: 6564 6765 4d65 7267 6554 6872 3c2f 636f edgeMergeThr - edge merge │ │ │ -000409c0: 2074 6872 6573 686f 6c64 2e20 496e 6372 threshold. Incr │ │ │ -000409d0: 6561 7365 2074 6f20 7472 6164 6520 6f66 ease to trade of │ │ │ -000409e0: 6620 6163 6375 7261 6379 2066 6f72 2073 f accuracy for s │ │ │ -000409f0: 7065 6564 2e3c 2f64 643e 0a3c 6474 3e52 peed.
    .
    R │ │ │ -00040a00: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
    .
    automatically g │ │ │ -00040a20: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ..
  • .< │ │ │ -00040a40: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    c │ │ │ -00040aa0: 7265 6174 6545 6467 6542 6f78 6573 3c2f reateEdgeBoxes.
    public │ │ │ -00040af0: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ -00040b00: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;Edge │ │ │ -00040b60: 426f 7865 733c 2f61 3e3c 2f73 7061 6e3e Boxes │ │ │ -00040b70: 266e 6273 703b 3c73 7061 6e20 636c 6173  createEdgeBoxes │ │ │ -00040ba0: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (float  │ │ │ -00040bd0: 3b61 6c70 6861 2c0a 2066 6c6f 6174 266e ;alpha,. float&n │ │ │ -00040be0: 6273 703b 6265 7461 2c0a 2066 6c6f 6174 bsp;beta,. float │ │ │ -00040bf0: 266e 6273 703b 6574 612c 0a20 666c 6f61  eta,. floa │ │ │ -00040c00: 7426 6e62 7370 3b6d 696e 5363 6f72 652c t minScore, │ │ │ -00040c10: 0a20 696e 7426 6e62 7370 3b6d 6178 426f . int maxBo │ │ │ -00040c20: 7865 732c 0a20 666c 6f61 7426 6e62 7370 xes,. float  │ │ │ -00040c30: 3b65 6467 654d 696e 4d61 6729 3c2f 7370 ;edgeMinMag)
    .
    Cre │ │ │ -00040c60: 6174 6573 2061 2045 6467 6562 6f78 6573 ates a Edgeboxes │ │ │ -00040c70: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ -00040c90: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ -00040ca0: 6464 3e3c 636f 6465 3e61 6c70 6861 3c2f dd>alpha - step siz │ │ │ -00040cc0: 6520 6f66 2073 6c69 6469 6e67 2077 696e e of sliding win │ │ │ -00040cd0: 646f 7720 7365 6172 6368 2e3c 2f64 643e dow search. │ │ │ -00040ce0: 0a3c 6464 3e3c 636f 6465 3e62 6574 613c .
    beta< │ │ │ -00040cf0: 2f63 6f64 653e 202d 206e 6d73 2074 6872 /code> - nms thr │ │ │ -00040d00: 6573 686f 6c64 2066 6f72 206f 626a 6563 eshold for objec │ │ │ -00040d10: 7420 7072 6f70 6f73 616c 732e 3c2f 6464 t proposals.
    .
    eta< │ │ │ -00040d30: 2f63 6f64 653e 202d 2061 6461 7074 6174 /code> - adaptat │ │ │ -00040d40: 696f 6e20 7261 7465 2066 6f72 206e 6d73 ion rate for nms │ │ │ -00040d50: 2074 6872 6573 686f 6c64 2e3c 2f64 643e threshold.
    │ │ │ -00040d60: 0a3c 6464 3e3c 636f 6465 3e6d 696e 5363 .
    minSc │ │ │ -00040d70: 6f72 653c 2f63 6f64 653e 202d 206d 696e ore - min │ │ │ -00040d80: 2073 636f 7265 206f 6620 626f 7865 7320 score of boxes │ │ │ -00040d90: 746f 2064 6574 6563 742e 3c2f 6464 3e0a to detect.
    . │ │ │ -00040da0: 3c64 643e 3c63 6f64 653e 6d61 7842 6f78
    maxBox │ │ │ -00040db0: 6573 3c2f 636f 6465 3e20 2d20 6d61 7820 es - max │ │ │ -00040dc0: 6e75 6d62 6572 206f 6620 626f 7865 7320 number of boxes │ │ │ -00040dd0: 746f 2064 6574 6563 742e 3c2f 6464 3e0a to detect.
    . │ │ │ -00040de0: 3c64 643e 3c63 6f64 653e 6564 6765 4d69
    edgeMi │ │ │ -00040df0: 6e4d 6167 3c2f 636f 6465 3e20 2d20 6564 nMag - ed │ │ │ -00040e00: 6765 206d 696e 206d 6167 6e69 7475 6465 ge min magnitude │ │ │ -00040e10: 2e20 496e 6372 6561 7365 2074 6f20 7472 . Increase to tr │ │ │ -00040e20: 6164 6520 6f66 6620 6163 6375 7261 6379 ade off accuracy │ │ │ -00040e30: 2066 6f72 2073 7065 6564 2e3c 2f64 643e for speed.
    │ │ │ -00040e40: 0a3c 6474 3e52 6574 7572 6e73 3a3c 2f64 .
    Returns:.
    automatic │ │ │ -00040e60: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    ..

  • .
  • . │ │ │ -00040e90: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    c │ │ │ -00040ee0: 7265 6174 6545 6467 6542 6f78 6573 3c2f reateEdgeBoxes.
    public │ │ │ -00040f30: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ -00040f40: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;Edge │ │ │ -00040fa0: 426f 7865 733c 2f61 3e3c 2f73 7061 6e3e Boxes │ │ │ -00040fb0: 266e 6273 703b 3c73 7061 6e20 636c 6173  createEdgeBoxes │ │ │ -00040fe0: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (float  │ │ │ -00041010: 3b61 6c70 6861 2c0a 2066 6c6f 6174 266e ;alpha,. float&n │ │ │ -00041020: 6273 703b 6265 7461 2c0a 2066 6c6f 6174 bsp;beta,. float │ │ │ -00041030: 266e 6273 703b 6574 612c 0a20 666c 6f61  eta,. floa │ │ │ -00041040: 7426 6e62 7370 3b6d 696e 5363 6f72 652c t minScore, │ │ │ -00041050: 0a20 696e 7426 6e62 7370 3b6d 6178 426f . int maxBo │ │ │ -00041060: 7865 7329 3c2f 7370 616e 3e3c 2f64 6976 xes)
    .
    Creates a E │ │ │ -00041090: 6467 6562 6f78 6573 3c2f 6469 763e 0a3c dgeboxes
    .< │ │ │ -000410a0: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ -000410b0: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
    Parameters │ │ │ -000410c0: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
    .
    alpha - │ │ │ -000410e0: 7374 6570 2073 697a 6520 6f66 2073 6c69 step size of sli │ │ │ -000410f0: 6469 6e67 2077 696e 646f 7720 7365 6172 ding window sear │ │ │ -00041100: 6368 2e3c 2f64 643e 0a3c 6464 3e3c 636f ch.
    .
    beta - │ │ │ -00041120: 206e 6d73 2074 6872 6573 686f 6c64 2066 nms threshold f │ │ │ -00041130: 6f72 206f 626a 6563 7420 7072 6f70 6f73 or object propos │ │ │ -00041140: 616c 732e 3c2f 6464 3e0a 3c64 643e 3c63 als.
    .
    eta - │ │ │ -00041160: 2061 6461 7074 6174 696f 6e20 7261 7465 adaptation rate │ │ │ -00041170: 2066 6f72 206e 6d73 2074 6872 6573 686f for nms thresho │ │ │ -00041180: 6c64 2e3c 2f64 643e 0a3c 6464 3e3c 636f ld.
    .
    minScore - min score o │ │ │ -000411b0: 6620 626f 7865 7320 746f 2064 6574 6563 f boxes to detec │ │ │ -000411c0: 742e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 t.
    .
    maxBoxes - max number o │ │ │ -000411f0: 6620 626f 7865 7320 746f 2064 6574 6563 f boxes to detec │ │ │ -00041200: 742e 3c2f 6464 3e0a 3c64 743e 5265 7475 t.
    .
    Retu │ │ │ -00041210: 726e 733a 3c2f 6474 3e0a 3c64 643e 6175 rns:
    .
    au │ │ │ -00041220: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -00041230: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
    . │ │ │ -00041240: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .

    .
  • .
  • .
    .createEdgeBoxe │ │ │ -000412b0: 733c 2f68 333e 0a3c 6469 7620 636c 6173 s.
    pub │ │ │ -000412f0: 6c69 6320 7374 6174 6963 3c2f 7370 616e lic static E │ │ │ -00041360: 6467 6542 6f78 6573 3c2f 613e 3c2f 7370 dgeBoxes createEdgeBo │ │ │ -000413a0: 7865 733c 2f73 7061 6e3e 3c77 6272 3e3c xes< │ │ │ -000413b0: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ -000413c0: 6d65 7465 7273 223e 2866 6c6f 6174 266e meters">(float&n │ │ │ -000413d0: 6273 703b 616c 7068 612c 0a20 666c 6f61 bsp;alpha,. floa │ │ │ -000413e0: 7426 6e62 7370 3b62 6574 612c 0a20 666c t beta,. fl │ │ │ -000413f0: 6f61 7426 6e62 7370 3b65 7461 2c0a 2066 oat eta,. f │ │ │ -00041400: 6c6f 6174 266e 6273 703b 6d69 6e53 636f loat minSco │ │ │ -00041410: 7265 293c 2f73 7061 6e3e 3c2f 6469 763e re)
    │ │ │ -00041420: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
    Creates a Ed │ │ │ -00041440: 6765 626f 7865 733c 2f64 6976 3e0a 3c64 geboxes
    . │ │ │ -00041460: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ -00041470: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -00041480: 616c 7068 613c 2f63 6f64 653e 202d 2073 alpha - s │ │ │ -00041490: 7465 7020 7369 7a65 206f 6620 736c 6964 tep size of slid │ │ │ -000414a0: 696e 6720 7769 6e64 6f77 2073 6561 7263 ing window searc │ │ │ -000414b0: 682e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 h.
    .
    beta - │ │ │ -000414d0: 6e6d 7320 7468 7265 7368 6f6c 6420 666f nms threshold fo │ │ │ -000414e0: 7220 6f62 6a65 6374 2070 726f 706f 7361 r object proposa │ │ │ -000414f0: 6c73 2e3c 2f64 643e 0a3c 6464 3e3c 636f ls.
    .
    eta - │ │ │ -00041510: 6164 6170 7461 7469 6f6e 2072 6174 6520 adaptation rate │ │ │ -00041520: 666f 7220 6e6d 7320 7468 7265 7368 6f6c for nms threshol │ │ │ -00041530: 642e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 d.
    .
    minScore - min score of │ │ │ -00041560: 2062 6f78 6573 2074 6f20 6465 7465 6374 boxes to detect │ │ │ -00041570: 2e3c 2f64 643e 0a3c 6474 3e52 6574 7572 .
    .
    Retur │ │ │ -00041580: 6e73 3a3c 2f64 743e 0a3c 6464 3e61 7574 ns:
    .
    aut │ │ │ -00041590: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ -000415a0: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
    .. │ │ │ -000415b0: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e
    .
  • │ │ │ -000415c0: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .

    creat │ │ │ -00041610: 6545 6467 6542 6f78 6573 3c2f 6833 3e0a eEdgeBoxes

    . │ │ │ -00041620: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
    public sta │ │ │ -00041660: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ -00041670: 3c73 7061 6e20 636c 6173 733d 2272 6574 EdgeBoxe │ │ │ -000416d0: 733c 2f61 3e3c 2f73 7061 6e3e 266e 6273 s&nbs │ │ │ -000416e0: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;cre │ │ │ -00041700: 6174 6545 6467 6542 6f78 6573 3c2f 7370 ateEdgeBoxes(float alp │ │ │ -00041740: 6861 2c0a 2066 6c6f 6174 266e 6273 703b ha,. float  │ │ │ -00041750: 6265 7461 2c0a 2066 6c6f 6174 266e 6273 beta,. float&nbs │ │ │ -00041760: 703b 6574 6129 3c2f 7370 616e 3e3c 2f64 p;eta).
    Creates a │ │ │ -00041790: 2045 6467 6562 6f78 6573 3c2f 6469 763e Edgeboxes
    │ │ │ -000417a0: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
    .
    Paramete │ │ │ -000417c0: 7273 3a3c 2f64 743e 0a3c 6464 3e3c 636f rs:
    .
    alpha │ │ │ -000417e0: 2d20 7374 6570 2073 697a 6520 6f66 2073 - step size of s │ │ │ -000417f0: 6c69 6469 6e67 2077 696e 646f 7720 7365 liding window se │ │ │ -00041800: 6172 6368 2e3c 2f64 643e 0a3c 6464 3e3c arch.
    .
    < │ │ │ -00041810: 636f 6465 3e62 6574 613c 2f63 6f64 653e code>beta │ │ │ -00041820: 202d 206e 6d73 2074 6872 6573 686f 6c64 - nms threshold │ │ │ -00041830: 2066 6f72 206f 626a 6563 7420 7072 6f70 for object prop │ │ │ -00041840: 6f73 616c 732e 3c2f 6464 3e0a 3c64 643e osals.
    .
    │ │ │ -00041850: 3c63 6f64 653e 6574 613c 2f63 6f64 653e eta │ │ │ -00041860: 202d 2061 6461 7074 6174 696f 6e20 7261 - adaptation ra │ │ │ -00041870: 7465 2066 6f72 206e 6d73 2074 6872 6573 te for nms thres │ │ │ -00041880: 686f 6c64 2e3c 2f64 643e 0a3c 6474 3e52 hold.
    .
    R │ │ │ -00041890: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
    .
    automatically g │ │ │ -000418b0: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ..
    .< │ │ │ -000418d0: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    createE │ │ │ -00041920: 6467 6542 6f78 6573 3c2f 6833 3e0a 3c64 dgeBoxes

    .public stati │ │ │ -00041970: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c EdgeBoxes< │ │ │ -000419e0: 2f61 3e3c 2f73 7061 6e3e 266e 6273 703b /a>  │ │ │ -000419f0: 3c73 7061 6e20 636c 6173 733d 2265 6c65 creat │ │ │ -00041a10: 6545 6467 6542 6f78 6573 3c2f 7370 616e eEdgeBoxes( │ │ │ -00041a40: 666c 6f61 7426 6e62 7370 3b61 6c70 6861 float alpha │ │ │ -00041a50: 2c0a 2066 6c6f 6174 266e 6273 703b 6265 ,. float be │ │ │ -00041a60: 7461 293c 2f73 7061 6e3e 3c2f 6469 763e ta) │ │ │ -00041a70: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
    Creates a Ed │ │ │ -00041a90: 6765 626f 7865 733c 2f64 6976 3e0a 3c64 geboxes
    . │ │ │ -00041ab0: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ -00041ac0: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -00041ad0: 616c 7068 613c 2f63 6f64 653e 202d 2073 alpha - s │ │ │ -00041ae0: 7465 7020 7369 7a65 206f 6620 736c 6964 tep size of slid │ │ │ -00041af0: 696e 6720 7769 6e64 6f77 2073 6561 7263 ing window searc │ │ │ -00041b00: 682e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 h.
    .
    beta - │ │ │ -00041b20: 6e6d 7320 7468 7265 7368 6f6c 6420 666f nms threshold fo │ │ │ -00041b30: 7220 6f62 6a65 6374 2070 726f 706f 7361 r object proposa │ │ │ -00041b40: 6c73 2e3c 2f64 643e 0a3c 6474 3e52 6574 ls.
    .
    Ret │ │ │ -00041b50: 7572 6e73 3a3c 2f64 743e 0a3c 6464 3e61 urns:
    .
    a │ │ │ -00041b60: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ -00041b70: 6572 6174 6564 3c2f 6464 3e0a 3c2f 646c erated
    ..
  • ..
  • .
    .

    createEdgeBoxes │ │ │ -00041be0: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ -00041c20: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ -00041c30: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ -00041c50: 3c61 2068 7265 663d 2245 6467 6542 6f78 Ed │ │ │ -00041c90: 6765 426f 7865 733c 2f61 3e3c 2f73 7061 geBoxes createEdgeBox │ │ │ -00041cd0: 6573 3c2f 7370 616e 3e3c 7762 723e 3c73 es(float&nb │ │ │ -00041d00: 7370 3b61 6c70 6861 293c 2f73 7061 6e3e sp;alpha) │ │ │ -00041d10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    Create │ │ │ -00041d30: 7320 6120 4564 6765 626f 7865 733c 2f64 s a Edgeboxes.
    .
    Param │ │ │ -00041d60: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ -00041d70: 3c63 6f64 653e 616c 7068 613c 2f63 6f64 alpha - step size o │ │ │ -00041d90: 6620 736c 6964 696e 6720 7769 6e64 6f77 f sliding window │ │ │ -00041da0: 2073 6561 7263 682e 3c2f 6464 3e0a 3c64 search.
    .Returns:. │ │ │ -00041dc0: 3c64 643e 6175 746f 6d61 7469 6361 6c6c
    automaticall │ │ │ -00041dd0: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ -00041de0: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
    .
    .
  • .
  • ..

    createEdgeBoxes │ │ │ -00041e40: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ -00041e80: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ -00041e90: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ -00041eb0: 3c61 2068 7265 663d 2245 6467 6542 6f78 Ed │ │ │ -00041ef0: 6765 426f 7865 733c 2f61 3e3c 2f73 7061 geBoxes createEdgeBox │ │ │ -00041f30: 6573 3c2f 7370 616e 3e28 293c 2f64 6976 es()
    .
    Creates a E │ │ │ -00041f60: 6467 6562 6f78 6573 3c2f 6469 763e 0a3c dgeboxes
    .< │ │ │ -00041f70: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ -00041f80: 3e0a 3c64 743e 5265 7475 726e 733a 3c2f >.
    Returns:.
    automati │ │ │ -00041fa0: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -00041fb0: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>...
  • .
  • │ │ │ -00041fd0: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    .

    cre │ │ │ -00042030: 6174 6544 5446 696c 7465 723c 2f68 333e ateDTFilter

    │ │ │ -00042040: 0a3c 6469 7620 636c 6173 733d 226d 656d .
    < │ │ │ -00042060: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ -00042070: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ -00042080: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ -00042090: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;DTFilter │ │ │ -000420f0: 3c2f 613e 3c2f 7370 616e 3e26 6e62 7370   │ │ │ -00042100: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;crea │ │ │ -00042120: 7465 4454 4669 6c74 6572 3c2f 7370 616e teDTFilter( │ │ │ -00042150: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ -00042190: 2f61 3e26 6e62 7370 3b67 7569 6465 2c0a /a> guide,. │ │ │ -000421a0: 2064 6f75 626c 6526 6e62 7370 3b73 6967 double sig │ │ │ -000421b0: 6d61 5370 6174 6961 6c2c 0a20 646f 7562 maSpatial,. doub │ │ │ -000421c0: 6c65 266e 6273 703b 7369 676d 6143 6f6c le sigmaCol │ │ │ -000421d0: 6f72 2c0a 2069 6e74 266e 6273 703b 6d6f or,. int mo │ │ │ -000421e0: 6465 2c0a 2069 6e74 266e 6273 703b 6e75 de,. int nu │ │ │ -000421f0: 6d49 7465 7273 293c 2f73 7061 6e3e 3c2f mIters).
    Factory │ │ │ -00042220: 6d65 7468 6f64 2c20 6372 6561 7465 2069 method, create i │ │ │ -00042230: 6e73 7461 6e63 6520 6f66 2044 5446 696c nstance of DTFil │ │ │ -00042240: 7465 7220 616e 6420 7072 6f64 7563 6520 ter and produce │ │ │ -00042250: 696e 6974 6961 6c69 7a61 7469 6f6e 2072 initialization r │ │ │ -00042260: 6f75 7469 6e65 732e 3c2f 6469 763e 0a3c outines.
    .< │ │ │ -00042270: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ -00042280: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
    Parameters │ │ │ -00042290: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
    .
    guide - │ │ │ -000422b0: 6775 6964 6564 2069 6d61 6765 2028 7573 guided image (us │ │ │ -000422c0: 6564 2074 6f20 6275 696c 6420 7472 616e ed to build tran │ │ │ -000422d0: 7366 6f72 6d65 6420 6469 7374 616e 6365 sformed distance │ │ │ -000422e0: 2c20 7768 6963 6820 6465 7363 7269 6265 , which describe │ │ │ -000422f0: 7320 6564 6765 2073 7472 7563 7475 7265 s edge structure │ │ │ -00042300: 206f 660a 2067 7569 6465 6420 696d 6167 of. guided imag │ │ │ -00042310: 6529 2e3c 2f64 643e 0a3c 6464 3e3c 636f e).
    .
    sigmaSpatial< │ │ │ -00042330: 2f63 6f64 653e 202d 205c 287b 5c73 6967 /code> - \({\sig │ │ │ -00042340: 6d61 7d5f 485c 2920 7061 7261 6d65 7465 ma}_H\) paramete │ │ │ -00042350: 7220 696e 2074 6865 206f 7269 6769 6e61 r in the origina │ │ │ -00042360: 6c20 6172 7469 636c 652c 2069 7427 7320 l article, it's │ │ │ -00042370: 7369 6d69 6c61 7220 746f 2074 6865 2073 similar to the s │ │ │ -00042380: 6967 6d61 2069 6e20 7468 650a 2063 6f6f igma in the. coo │ │ │ -00042390: 7264 696e 6174 6520 7370 6163 6520 696e rdinate space in │ │ │ -000423a0: 746f 2062 696c 6174 6572 616c 4669 6c74 to bilateralFilt │ │ │ -000423b0: 6572 2e3c 2f64 643e 0a3c 6464 3e3c 636f er.
    .
    sigmaColor - \({\sigma │ │ │ -000423e0: 7d5f 725c 2920 7061 7261 6d65 7465 7220 }_r\) parameter │ │ │ -000423f0: 696e 2074 6865 206f 7269 6769 6e61 6c20 in the original │ │ │ -00042400: 6172 7469 636c 652c 2069 7427 7320 7369 article, it's si │ │ │ -00042410: 6d69 6c61 7220 746f 2074 6865 2073 6967 milar to the sig │ │ │ -00042420: 6d61 2069 6e20 7468 650a 2063 6f6c 6f72 ma in the. color │ │ │ -00042430: 2073 7061 6365 2069 6e74 6f20 6269 6c61 space into bila │ │ │ -00042440: 7465 7261 6c46 696c 7465 722e 3c2f 6464 teralFilter.
    .
    mode │ │ │ -00042460: 3c2f 636f 6465 3e20 2d20 6f6e 6520 666f - one fo │ │ │ -00042470: 726d 2074 6872 6565 206d 6f64 6573 2044 rm three modes D │ │ │ -00042480: 5446 5f4e 432c 2044 5446 5f52 4620 616e TF_NC, DTF_RF an │ │ │ -00042490: 6420 4454 465f 4943 2077 6869 6368 2063 d DTF_IC which c │ │ │ -000424a0: 6f72 7265 7370 6f6e 6473 2074 6f20 7468 orresponds to th │ │ │ -000424b0: 7265 6520 6d6f 6465 7320 666f 720a 2066 ree modes for. f │ │ │ -000424c0: 696c 7465 7269 6e67 2032 4420 7369 676e iltering 2D sign │ │ │ -000424d0: 616c 7320 696e 2074 6865 2061 7274 6963 als in the artic │ │ │ -000424e0: 6c65 2e3c 2f64 643e 0a3c 6464 3e3c 636f le.
    .
    numIters - optional nu │ │ │ -00042510: 6d62 6572 206f 6620 6974 6572 6174 696f mber of iteratio │ │ │ -00042520: 6e73 2075 7365 6420 666f 7220 6669 6c74 ns used for filt │ │ │ -00042530: 6572 696e 672c 2033 2069 7320 7175 6974 ering, 3 is quit │ │ │ -00042540: 6520 656e 6f75 6768 2e0a 0a20 466f 7220 e enough... For │ │ │ -00042550: 6d6f 7265 2064 6574 6169 6c73 2061 626f more details abo │ │ │ -00042560: 7574 2044 6f6d 6169 6e20 5472 616e 7366 ut Domain Transf │ │ │ -00042570: 6f72 6d20 6669 6c74 6572 2070 6172 616d orm filter param │ │ │ -00042580: 6574 6572 732c 2073 6565 2074 6865 206f eters, see the o │ │ │ -00042590: 7269 6769 6e61 6c20 6172 7469 636c 6520 riginal article │ │ │ -000425a0: 4349 5445 3a20 4761 7374 616c 3131 2061 CITE: Gastal11 a │ │ │ -000425b0: 6e64 0a20 5b44 6f6d 6169 6e20 5472 616e nd. [Domain Tran │ │ │ -000425c0: 7366 6f72 6d20 6669 6c74 6572 2068 6f6d sform filter hom │ │ │ -000425d0: 6570 6167 655d 2868 7474 703a 2f2f 7777 epage](http://ww │ │ │ -000425e0: 772e 696e 662e 7566 7267 732e 6272 2f7e w.inf.ufrgs.br/~ │ │ │ -000425f0: 6573 6c67 6173 7461 6c2f 446f 6d61 696e eslgastal/Domain │ │ │ -00042600: 5472 616e 7366 6f72 6d2f 292e 3c2f 6464 Transform/).
    .
    Returns:.
    automati │ │ │ -00042630: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -00042640: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>...
  • .
  • │ │ │ -00042660: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    .

    createD │ │ │ -000426c0: 5446 696c 7465 723c 2f68 333e 0a3c 6469 TFilter

    .public static │ │ │ -00042710: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  
    DTFilter │ │ │ +0002a8d0: 742c 696e 742c 696e 7429 223e 0a3c 6833 t,int,int)">.

    covarianceEstim │ │ │ +0002a8f0: 6174 696f 6e3c 2f68 333e 0a3c 6469 7620 ation

    .
    public static void │ │ │ +0002a970: 266e 6273 703b 3c73 7061 6e20 636c 6173  covarianceEstim │ │ │ +0002a9a0: 6174 696f 6e3c 2f73 7061 6e3e 3c77 6272 ation(Mat&n │ │ │ +0002aa10: 6273 703b 7372 632c 0a20 3c61 2068 7265 bsp;src,. Mat&nb │ │ │ +0002aa60: 7370 3b64 7374 2c0a 2069 6e74 266e 6273 sp;dst,. int&nbs │ │ │ +0002aa70: 703b 7769 6e64 6f77 526f 7773 2c0a 2069 p;windowRows,. i │ │ │ +0002aa80: 6e74 266e 6273 703b 7769 6e64 6f77 436f nt windowCo │ │ │ +0002aa90: 6c73 293c 2f73 7061 6e3e 3c2f 6469 763e ls)
    │ │ │ +0002aaa0: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
    Computes the │ │ │ +0002aac0: 2065 7374 696d 6174 6564 2063 6f76 6172 estimated covar │ │ │ +0002aad0: 6961 6e63 6520 6d61 7472 6978 206f 6620 iance matrix of │ │ │ +0002aae0: 616e 2069 6d61 6765 2075 7369 6e67 2074 an image using t │ │ │ +0002aaf0: 6865 2073 6c69 6469 6e67 0a20 7769 6e64 he sliding. wind │ │ │ +0002ab00: 6f77 2066 6f72 756d 6c61 7469 6f6e 2e3c ow forumlation.< │ │ │ +0002ab10: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ +0002ab30: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .src - The source │ │ │ +0002ab60: 696d 6167 652e 2049 6e70 7574 2069 6d61 image. Input ima │ │ │ +0002ab70: 6765 206d 7573 7420 6265 206f 6620 6120 ge must be of a │ │ │ +0002ab80: 636f 6d70 6c65 7820 7479 7065 2e3c 2f64 complex type..
    dst │ │ │ +0002aba0: 3c2f 636f 6465 3e20 2d20 5468 6520 6465 - The de │ │ │ +0002abb0: 7374 696e 6174 696f 6e20 6573 7469 6d61 stination estima │ │ │ +0002abc0: 7465 6420 636f 7661 7269 616e 6365 206d ted covariance m │ │ │ +0002abd0: 6174 7269 782e 204f 7574 7075 7420 6d61 atrix. Output ma │ │ │ +0002abe0: 7472 6978 2077 696c 6c20 6265 2073 697a trix will be siz │ │ │ +0002abf0: 6520 2877 696e 646f 7752 6f77 732a 7769 e (windowRows*wi │ │ │ +0002ac00: 6e64 6f77 436f 6c73 2c20 7769 6e64 6f77 ndowCols, window │ │ │ +0002ac10: 526f 7773 2a77 696e 646f 7743 6f6c 7329 Rows*windowCols) │ │ │ +0002ac20: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    windowRows - The number │ │ │ +0002ac50: 6f66 2072 6f77 7320 696e 2074 6865 2077 of rows in the w │ │ │ +0002ac60: 696e 646f 772e 3c2f 6464 3e0a 3c64 643e indow.
    .
    │ │ │ +0002ac70: 3c63 6f64 653e 7769 6e64 6f77 436f 6c73 windowCols │ │ │ +0002ac80: 3c2f 636f 6465 3e20 2d20 5468 6520 6e75 - The nu │ │ │ +0002ac90: 6d62 6572 206f 6620 636f 6c73 2069 6e20 mber of cols in │ │ │ +0002aca0: 7468 6520 7769 6e64 6f77 2e0a 2054 6865 the window.. The │ │ │ +0002acb0: 2077 696e 646f 7720 7369 7a65 2070 6172 window size par │ │ │ +0002acc0: 616d 6574 6572 7320 636f 6e74 726f 6c20 ameters control │ │ │ +0002acd0: 7468 6520 6163 6375 7261 6379 206f 6620 the accuracy of │ │ │ +0002ace0: 7468 6520 6573 7469 6d61 7469 6f6e 2e0a the estimation.. │ │ │ +0002acf0: 2054 6865 2073 6c69 6469 6e67 2077 696e The sliding win │ │ │ +0002ad00: 646f 7720 6d6f 7665 7320 6f76 6572 2074 dow moves over t │ │ │ +0002ad10: 6865 2065 6e74 6972 6520 696d 6167 6520 he entire image │ │ │ +0002ad20: 6672 6f6d 2074 6865 2074 6f70 2d6c 6566 from the top-lef │ │ │ +0002ad30: 7420 636f 726e 6572 0a20 746f 2074 6865 t corner. to the │ │ │ +0002ad40: 2062 6f74 746f 6d20 7269 6768 7420 636f bottom right co │ │ │ +0002ad50: 726e 6572 2e20 4561 6368 206c 6f63 6174 rner. Each locat │ │ │ +0002ad60: 696f 6e20 6f66 2074 6865 2077 696e 646f ion of the windo │ │ │ +0002ad70: 7720 7265 7072 6573 656e 7473 2061 2073 w represents a s │ │ │ +0002ad80: 616d 706c 652e 0a20 4966 2074 6865 2077 ample.. If the w │ │ │ +0002ad90: 696e 646f 7720 6973 2074 6865 2073 697a indow is the siz │ │ │ +0002ada0: 6520 6f66 2074 6865 2069 6d61 6765 2c20 e of the image, │ │ │ +0002adb0: 7468 656e 2074 6869 7320 6769 7665 7320 then this gives │ │ │ +0002adc0: 7468 6520 6578 6163 7420 636f 7661 7269 the exact covari │ │ │ +0002add0: 616e 6365 206d 6174 7269 782e 0a20 466f ance matrix.. Fo │ │ │ +0002ade0: 7220 616c 6c20 6f74 6865 7220 6361 7365 r all other case │ │ │ +0002adf0: 732c 2074 6865 2073 697a 6573 206f 6620 s, the sizes of │ │ │ +0002ae00: 7468 6520 7769 6e64 6f77 2077 696c 6c20 the window will │ │ │ +0002ae10: 696d 7061 6374 2074 6865 206e 756d 6265 impact the numbe │ │ │ +0002ae20: 7220 6f66 2073 616d 706c 6573 0a20 616e r of samples. an │ │ │ +0002ae30: 6420 7468 6520 6e75 6d62 6572 206f 6620 d the number of │ │ │ +0002ae40: 656c 656d 656e 7473 2069 6e20 7468 6520 elements in the │ │ │ +0002ae50: 6573 7469 6d61 7465 6420 636f 7661 7269 estimated covari │ │ │ +0002ae60: 616e 6365 206d 6174 7269 782e 3c2f 6464 ance matrix.
    .
    ..
  • .
  • ..

    Gradient │ │ │ +0002af00: 4465 7269 6368 6559 3c2f 6833 3e0a 3c64 DericheY

    .public stati │ │ │ +0002af50: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c void GradientDeri │ │ │ +0002afb0: 6368 6559 3c2f 7370 616e 3e3c 7762 723e cheY │ │ │ +0002afc0: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Mat&nb │ │ │ +0002b020: 7370 3b6f 702c 0a20 3c61 2068 7265 663d sp;op,. Mat  │ │ │ +0002b070: 3b64 7374 2c0a 2064 6f75 626c 6526 6e62 ;dst,. double&nb │ │ │ +0002b080: 7370 3b61 6c70 6861 2c0a 2064 6f75 626c sp;alpha,. doubl │ │ │ +0002b090: 6526 6e62 7370 3b6f 6d65 6761 293c 2f73 e omega).
    Ap │ │ │ +0002b0c0: 706c 6965 7320 5920 4465 7269 6368 6520 plies Y Deriche │ │ │ +0002b0d0: 6669 6c74 6572 2074 6f20 616e 2069 6d61 filter to an ima │ │ │ +0002b0e0: 6765 2e0a 0a20 466f 7220 6d6f 7265 2064 ge... For more d │ │ │ +0002b0f0: 6574 6169 6c73 2061 626f 7574 2074 6869 etails about thi │ │ │ +0002b100: 7320 696d 706c 656d 656e 7461 7469 6f6e s implementation │ │ │ +0002b110: 2c20 706c 6561 7365 2073 6565 2068 7474 , please see htt │ │ │ +0002b120: 703a 2f2f 6369 7465 7365 6572 782e 6973 p://citeseerx.is │ │ │ +0002b130: 742e 7073 752e 6564 752f 7669 6577 646f t.psu.edu/viewdo │ │ │ +0002b140: 632f 646f 776e 6c6f 6164 3f64 6f69 3d31 c/download?doi=1 │ │ │ +0002b150: 302e 312e 312e 3437 362e 3537 3336 2661 0.1.1.476.5736&a │ │ │ +0002b160: 6d70 3b72 6570 3d72 6570 3126 616d 703b mp;rep=rep1& │ │ │ +0002b170: 7479 7065 3d70 6466 3c2f 6469 763e 0a3c type=pdf
    .< │ │ │ +0002b180: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ +0002b190: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
    Parameters │ │ │ +0002b1a0: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
    .
    op - aut │ │ │ +0002b1c0: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ +0002b1d0: 6174 6564 3c2f 6464 3e0a 3c64 643e 3c63 ated
    .
    dst - │ │ │ +0002b1f0: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ +0002b200: 656e 6572 6174 6564 3c2f 6464 3e0a 3c64 enerated
    .alpha - automatic │ │ │ +0002b230: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    om │ │ │ +0002b250: 6567 613c 2f63 6f64 653e 202d 2061 7574 ega - aut │ │ │ +0002b260: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ +0002b270: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
    .. │ │ │ +0002b280: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e .
  • │ │ │ +0002b290: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .

    │ │ │ +0002b300: 4772 6164 6965 6e74 4465 7269 6368 6558 GradientDericheX │ │ │ +0002b310: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ +0002b350: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ +0002b360: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ +0002b380: 766f 6964 3c2f 7370 616e 3e26 6e62 7370 void  │ │ │ +0002b390: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;Grad │ │ │ +0002b3b0: 6965 6e74 4465 7269 6368 6558 3c2f 7370 ientDericheX(Ma │ │ │ +0002b420: 743c 2f61 3e26 6e62 7370 3b6f 702c 0a20 t op,. │ │ │ +0002b430: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ +0002b470: 2f61 3e26 6e62 7370 3b64 7374 2c0a 2064 /a> dst,. d │ │ │ +0002b480: 6f75 626c 6526 6e62 7370 3b61 6c70 6861 ouble alpha │ │ │ +0002b490: 2c0a 2064 6f75 626c 6526 6e62 7370 3b6f ,. double o │ │ │ +0002b4a0: 6d65 6761 293c 2f73 7061 6e3e 3c2f 6469 mega).
    Applies X │ │ │ +0002b4d0: 4465 7269 6368 6520 6669 6c74 6572 2074 Deriche filter t │ │ │ +0002b4e0: 6f20 616e 2069 6d61 6765 2e0a 0a20 466f o an image... Fo │ │ │ +0002b4f0: 7220 6d6f 7265 2064 6574 6169 6c73 2061 r more details a │ │ │ +0002b500: 626f 7574 2074 6869 7320 696d 706c 656d bout this implem │ │ │ +0002b510: 656e 7461 7469 6f6e 2c20 706c 6561 7365 entation, please │ │ │ +0002b520: 2073 6565 2068 7474 703a 2f2f 6369 7465 see http://cite │ │ │ +0002b530: 7365 6572 782e 6973 742e 7073 752e 6564 seerx.ist.psu.ed │ │ │ +0002b540: 752f 7669 6577 646f 632f 646f 776e 6c6f u/viewdoc/downlo │ │ │ +0002b550: 6164 3f64 6f69 3d31 302e 312e 312e 3437 ad?doi=10.1.1.47 │ │ │ +0002b560: 362e 3537 3336 2661 6d70 3b72 6570 3d72 6.5736&rep=r │ │ │ +0002b570: 6570 3126 616d 703b 7479 7065 3d70 6466 ep1&type=pdf │ │ │ +0002b580: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ +0002b5a0: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ +0002b5b0: 6464 3e3c 636f 6465 3e6f 703c 2f63 6f64 dd>op - automatical │ │ │ +0002b5d0: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated.
    dst< │ │ │ +0002b5f0: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ +0002b600: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ +0002b610: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0002b620: 616c 7068 613c 2f63 6f64 653e 202d 2061 alpha - a │ │ │ +0002b630: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ +0002b640: 6572 6174 6564 3c2f 6464 3e0a 3c64 643e erated
    .
    │ │ │ +0002b650: 3c63 6f64 653e 6f6d 6567 613c 2f63 6f64 omega - automatical │ │ │ +0002b670: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
    .
    ..
  • .
  • ..

    createRF │ │ │ +0002b6e0: 4665 6174 7572 6547 6574 7465 723c 2f68 FeatureGetter.
    public │ │ │ +0002b730: 7374 6174 6963 3c2f 7370 616e 3e26 6e62 static&nb │ │ │ +0002b740: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;RFFeatureGetter │ │ │ +0002b7b0: 3c2f 613e 3c2f 7370 616e 3e26 6e62 7370   │ │ │ +0002b7c0: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;crea │ │ │ +0002b7e0: 7465 5246 4665 6174 7572 6547 6574 7465 teRFFeatureGette │ │ │ +0002b7f0: 723c 2f73 7061 6e3e 2829 3c2f 6469 763e r()
    │ │ │ +0002b800: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 ..

  • .
  • .
    .

    cre │ │ │ +0002b890: 6174 6553 7472 7563 7475 7265 6445 6467 ateStructuredEdg │ │ │ +0002b8a0: 6544 6574 6563 7469 6f6e 3c2f 6833 3e0a eDetection

    . │ │ │ +0002b8b0: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
    public sta │ │ │ +0002b8f0: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ +0002b900: 3c73 7061 6e20 636c 6173 733d 2272 6574 Structured │ │ │ +0002b970: 4564 6765 4465 7465 6374 696f 6e3c 2f61 EdgeDetection createS │ │ │ +0002b9b0: 7472 7563 7475 7265 6445 6467 6544 6574 tructuredEdgeDet │ │ │ +0002b9c0: 6563 7469 6f6e 3c2f 7370 616e 3e3c 7762 ection(S │ │ │ +0002ba90: 7472 696e 673c 2f61 3e26 6e62 7370 3b6d tring m │ │ │ +0002baa0: 6f64 656c 2c0a 203c 6120 6872 6566 3d22 odel,. RFFea │ │ │ +0002baf0: 7475 7265 4765 7474 6572 3c2f 613e 266e tureGetter&n │ │ │ +0002bb00: 6273 703b 686f 7754 6f47 6574 4665 6174 bsp;howToGetFeat │ │ │ +0002bb10: 7572 6573 293c 2f73 7061 6e3e 3c2f 6469 ures).
    ..
  • ..

    creat │ │ │ +0002bb90: 6553 7472 7563 7475 7265 6445 6467 6544 eStructuredEdgeD │ │ │ +0002bba0: 6574 6563 7469 6f6e 3c2f 6833 3e0a 3c64 etection

    .public stati │ │ │ +0002bbf0: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c StructuredEd │ │ │ +0002bc70: 6765 4465 7465 6374 696f 6e3c 2f61 3e3c geDetection< │ │ │ +0002bc80: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> createStr │ │ │ +0002bcb0: 7563 7475 7265 6445 6467 6544 6574 6563 ucturedEdgeDetec │ │ │ +0002bcc0: 7469 6f6e 3c2f 7370 616e 3e3c 7762 723e tion │ │ │ +0002bcd0: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Str │ │ │ +0002bd90: 696e 673c 2f61 3e26 6e62 7370 3b6d 6f64 ing mod │ │ │ +0002bda0: 656c 293c 2f73 7061 6e3e 3c2f 6469 763e el) │ │ │ +0002bdb0: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 ..
  • .
  • .
    .< │ │ │ +0002be20: 6833 3e63 7265 6174 6544 5446 696c 7465 h3>createDTFilte │ │ │ +0002be30: 723c 2f68 333e 0a3c 6469 7620 636c 6173 r.
    pub │ │ │ +0002be70: 6c69 6320 7374 6174 6963 3c2f 7370 616e lic static DT │ │ │ +0002bee0: 4669 6c74 6572 3c2f 613e 3c2f 7370 616e Filter createDTFilter │ │ │ +0002bf20: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (Mat g │ │ │ +0002bf90: 7569 6465 2c0a 2064 6f75 626c 6526 6e62 uide,. double&nb │ │ │ +0002bfa0: 7370 3b73 6967 6d61 5370 6174 6961 6c2c sp;sigmaSpatial, │ │ │ +0002bfb0: 0a20 646f 7562 6c65 266e 6273 703b 7369 . double si │ │ │ +0002bfc0: 676d 6143 6f6c 6f72 2c0a 2069 6e74 266e gmaColor,. int&n │ │ │ +0002bfd0: 6273 703b 6d6f 6465 2c0a 2069 6e74 266e bsp;mode,. int&n │ │ │ +0002bfe0: 6273 703b 6e75 6d49 7465 7273 293c 2f73 bsp;numIters)
    .
    Fa │ │ │ +0002c010: 6374 6f72 7920 6d65 7468 6f64 2c20 6372 ctory method, cr │ │ │ +0002c020: 6561 7465 2069 6e73 7461 6e63 6520 6f66 eate instance of │ │ │ +0002c030: 2044 5446 696c 7465 7220 616e 6420 7072 DTFilter and pr │ │ │ +0002c040: 6f64 7563 6520 696e 6974 6961 6c69 7a61 oduce initializa │ │ │ +0002c050: 7469 6f6e 2072 6f75 7469 6e65 732e 3c2f tion routines..
    .
    Para │ │ │ +0002c080: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    guide - guided ima │ │ │ +0002c0b0: 6765 2028 7573 6564 2074 6f20 6275 696c ge (used to buil │ │ │ +0002c0c0: 6420 7472 616e 7366 6f72 6d65 6420 6469 d transformed di │ │ │ +0002c0d0: 7374 616e 6365 2c20 7768 6963 6820 6465 stance, which de │ │ │ +0002c0e0: 7363 7269 6265 7320 6564 6765 2073 7472 scribes edge str │ │ │ +0002c0f0: 7563 7475 7265 206f 660a 2067 7569 6465 ucture of. guide │ │ │ +0002c100: 6420 696d 6167 6529 2e3c 2f64 643e 0a3c d image).
    .< │ │ │ +0002c110: 6464 3e3c 636f 6465 3e73 6967 6d61 5370 dd>sigmaSp │ │ │ +0002c120: 6174 6961 6c3c 2f63 6f64 653e 202d 205c atial - \ │ │ │ +0002c130: 287b 5c73 6967 6d61 7d5f 485c 2920 7061 ({\sigma}_H\) pa │ │ │ +0002c140: 7261 6d65 7465 7220 696e 2074 6865 206f rameter in the o │ │ │ +0002c150: 7269 6769 6e61 6c20 6172 7469 636c 652c riginal article, │ │ │ +0002c160: 2069 7427 7320 7369 6d69 6c61 7220 746f it's similar to │ │ │ +0002c170: 2074 6865 2073 6967 6d61 2069 6e20 7468 the sigma in th │ │ │ +0002c180: 650a 2063 6f6f 7264 696e 6174 6520 7370 e. coordinate sp │ │ │ +0002c190: 6163 6520 696e 746f 2062 696c 6174 6572 ace into bilater │ │ │ +0002c1a0: 616c 4669 6c74 6572 2e3c 2f64 643e 0a3c alFilter..< │ │ │ +0002c1b0: 6464 3e3c 636f 6465 3e73 6967 6d61 436f dd>sigmaCo │ │ │ +0002c1c0: 6c6f 723c 2f63 6f64 653e 202d 205c 287b lor - \({ │ │ │ +0002c1d0: 5c73 6967 6d61 7d5f 725c 2920 7061 7261 \sigma}_r\) para │ │ │ +0002c1e0: 6d65 7465 7220 696e 2074 6865 206f 7269 meter in the ori │ │ │ +0002c1f0: 6769 6e61 6c20 6172 7469 636c 652c 2069 ginal article, i │ │ │ +0002c200: 7427 7320 7369 6d69 6c61 7220 746f 2074 t's similar to t │ │ │ +0002c210: 6865 2073 6967 6d61 2069 6e20 7468 650a he sigma in the. │ │ │ +0002c220: 2063 6f6c 6f72 2073 7061 6365 2069 6e74 color space int │ │ │ +0002c230: 6f20 6269 6c61 7465 7261 6c46 696c 7465 o bilateralFilte │ │ │ +0002c240: 722e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 r..
    mode - │ │ │ +0002c260: 6f6e 6520 666f 726d 2074 6872 6565 206d one form three m │ │ │ +0002c270: 6f64 6573 2044 5446 5f4e 432c 2044 5446 odes DTF_NC, DTF │ │ │ +0002c280: 5f52 4620 616e 6420 4454 465f 4943 2077 _RF and DTF_IC w │ │ │ +0002c290: 6869 6368 2063 6f72 7265 7370 6f6e 6473 hich corresponds │ │ │ +0002c2a0: 2074 6f20 7468 7265 6520 6d6f 6465 7320 to three modes │ │ │ +0002c2b0: 666f 720a 2066 696c 7465 7269 6e67 2032 for. filtering 2 │ │ │ +0002c2c0: 4420 7369 676e 616c 7320 696e 2074 6865 D signals in the │ │ │ +0002c2d0: 2061 7274 6963 6c65 2e3c 2f64 643e 0a3c article.
    .< │ │ │ +0002c2e0: 6464 3e3c 636f 6465 3e6e 756d 4974 6572 dd>numIter │ │ │ +0002c2f0: 733c 2f63 6f64 653e 202d 206f 7074 696f s - optio │ │ │ +0002c300: 6e61 6c20 6e75 6d62 6572 206f 6620 6974 nal number of it │ │ │ +0002c310: 6572 6174 696f 6e73 2075 7365 6420 666f erations used fo │ │ │ +0002c320: 7220 6669 6c74 6572 696e 672c 2033 2069 r filtering, 3 i │ │ │ +0002c330: 7320 7175 6974 6520 656e 6f75 6768 2e0a s quite enough.. │ │ │ +0002c340: 0a20 466f 7220 6d6f 7265 2064 6574 6169 . For more detai │ │ │ +0002c350: 6c73 2061 626f 7574 2044 6f6d 6169 6e20 ls about Domain │ │ │ +0002c360: 5472 616e 7366 6f72 6d20 6669 6c74 6572 Transform filter │ │ │ +0002c370: 2070 6172 616d 6574 6572 732c 2073 6565 parameters, see │ │ │ +0002c380: 2074 6865 206f 7269 6769 6e61 6c20 6172 the original ar │ │ │ +0002c390: 7469 636c 6520 4349 5445 3a20 4761 7374 ticle CITE: Gast │ │ │ +0002c3a0: 616c 3131 2061 6e64 0a20 5b44 6f6d 6169 al11 and. [Domai │ │ │ +0002c3b0: 6e20 5472 616e 7366 6f72 6d20 6669 6c74 n Transform filt │ │ │ +0002c3c0: 6572 2068 6f6d 6570 6167 655d 2868 7474 er homepage](htt │ │ │ +0002c3d0: 703a 2f2f 7777 772e 696e 662e 7566 7267 p://www.inf.ufrg │ │ │ +0002c3e0: 732e 6272 2f7e 6573 6c67 6173 7461 6c2f s.br/~eslgastal/ │ │ │ +0002c3f0: 446f 6d61 696e 5472 616e 7366 6f72 6d2f DomainTransform/ │ │ │ +0002c400: 292e 3c2f 6464 3e0a 3c64 743e 5265 7475 )..
    Retu │ │ │ +0002c410: 726e 733a 3c2f 6474 3e0a 3c64 643e 6175 rns:
    .
    au │ │ │ +0002c420: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ +0002c430: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
    .
    │ │ │ +0002c440: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .
    .
  • .
  • .
    .

    c │ │ │ +0002c4b0: 7265 6174 6544 5446 696c 7465 723c 2f68 reateDTFilter.
    public │ │ │ +0002c500: 7374 6174 6963 3c2f 7370 616e 3e26 6e62 static&nb │ │ │ +0002c510: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;DTFilt │ │ │ +0002c570: 6572 3c2f 613e 3c2f 7370 616e 3e26 6e62 er&nb │ │ │ +0002c580: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;cr │ │ │ +0002c5a0: 6561 7465 4454 4669 6c74 6572 3c2f 7370 eateDTFilter(Ma │ │ │ +0002c610: 743c 2f61 3e26 6e62 7370 3b67 7569 6465 t guide │ │ │ +0002c620: 2c0a 2064 6f75 626c 6526 6e62 7370 3b73 ,. double s │ │ │ +0002c630: 6967 6d61 5370 6174 6961 6c2c 0a20 646f igmaSpatial,. do │ │ │ +0002c640: 7562 6c65 266e 6273 703b 7369 676d 6143 uble sigmaC │ │ │ +0002c650: 6f6c 6f72 2c0a 2069 6e74 266e 6273 703b olor,. int  │ │ │ +0002c660: 6d6f 6465 293c 2f73 7061 6e3e 3c2f 6469 mode).
    Factory me │ │ │ +0002c690: 7468 6f64 2c20 6372 6561 7465 2069 6e73 thod, create ins │ │ │ +0002c6a0: 7461 6e63 6520 6f66 2044 5446 696c 7465 tance of DTFilte │ │ │ +0002c6b0: 7220 616e 6420 7072 6f64 7563 6520 696e r and produce in │ │ │ +0002c6c0: 6974 6961 6c69 7a61 7469 6f6e 2072 6f75 itialization rou │ │ │ +0002c6d0: 7469 6e65 732e 3c2f 6469 763e 0a3c 646c tines.
    .
    . │ │ │ +0002c6f0: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
    Parameters:< │ │ │ +0002c700: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e67 /dt>.
    g │ │ │ +0002c710: 7569 6465 3c2f 636f 6465 3e20 2d20 6775 uide - gu │ │ │ +0002c720: 6964 6564 2069 6d61 6765 2028 7573 6564 ided image (used │ │ │ +0002c730: 2074 6f20 6275 696c 6420 7472 616e 7366 to build transf │ │ │ +0002c740: 6f72 6d65 6420 6469 7374 616e 6365 2c20 ormed distance, │ │ │ +0002c750: 7768 6963 6820 6465 7363 7269 6265 7320 which describes │ │ │ +0002c760: 6564 6765 2073 7472 7563 7475 7265 206f edge structure o │ │ │ +0002c770: 660a 2067 7569 6465 6420 696d 6167 6529 f. guided image) │ │ │ +0002c780: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    sigmaSpatial - \({\sigma │ │ │ +0002c7b0: 7d5f 485c 2920 7061 7261 6d65 7465 7220 }_H\) parameter │ │ │ +0002c7c0: 696e 2074 6865 206f 7269 6769 6e61 6c20 in the original │ │ │ +0002c7d0: 6172 7469 636c 652c 2069 7427 7320 7369 article, it's si │ │ │ +0002c7e0: 6d69 6c61 7220 746f 2074 6865 2073 6967 milar to the sig │ │ │ +0002c7f0: 6d61 2069 6e20 7468 650a 2063 6f6f 7264 ma in the. coord │ │ │ +0002c800: 696e 6174 6520 7370 6163 6520 696e 746f inate space into │ │ │ +0002c810: 2062 696c 6174 6572 616c 4669 6c74 6572 bilateralFilter │ │ │ +0002c820: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    sigmaColor - \({\sigma}_ │ │ │ +0002c850: 725c 2920 7061 7261 6d65 7465 7220 696e r\) parameter in │ │ │ +0002c860: 2074 6865 206f 7269 6769 6e61 6c20 6172 the original ar │ │ │ +0002c870: 7469 636c 652c 2069 7427 7320 7369 6d69 ticle, it's simi │ │ │ +0002c880: 6c61 7220 746f 2074 6865 2073 6967 6d61 lar to the sigma │ │ │ +0002c890: 2069 6e20 7468 650a 2063 6f6c 6f72 2073 in the. color s │ │ │ +0002c8a0: 7061 6365 2069 6e74 6f20 6269 6c61 7465 pace into bilate │ │ │ +0002c8b0: 7261 6c46 696c 7465 722e 3c2f 6464 3e0a ralFilter.
    . │ │ │ +0002c8c0: 3c64 643e 3c63 6f64 653e 6d6f 6465 3c2f
    mode - one form │ │ │ +0002c8e0: 2074 6872 6565 206d 6f64 6573 2044 5446 three modes DTF │ │ │ +0002c8f0: 5f4e 432c 2044 5446 5f52 4620 616e 6420 _NC, DTF_RF and │ │ │ +0002c900: 4454 465f 4943 2077 6869 6368 2063 6f72 DTF_IC which cor │ │ │ +0002c910: 7265 7370 6f6e 6473 2074 6f20 7468 7265 responds to thre │ │ │ +0002c920: 6520 6d6f 6465 7320 666f 720a 2066 696c e modes for. fil │ │ │ +0002c930: 7465 7269 6e67 2032 4420 7369 676e 616c tering 2D signal │ │ │ +0002c940: 7320 696e 2074 6865 2061 7274 6963 6c65 s in the article │ │ │ +0002c950: 2e0a 0a0a 2046 6f72 206d 6f72 6520 6465 .... For more de │ │ │ +0002c960: 7461 696c 7320 6162 6f75 7420 446f 6d61 tails about Doma │ │ │ +0002c970: 696e 2054 7261 6e73 666f 726d 2066 696c in Transform fil │ │ │ +0002c980: 7465 7220 7061 7261 6d65 7465 7273 2c20 ter parameters, │ │ │ +0002c990: 7365 6520 7468 6520 6f72 6967 696e 616c see the original │ │ │ +0002c9a0: 2061 7274 6963 6c65 2043 4954 453a 2047 article CITE: G │ │ │ +0002c9b0: 6173 7461 6c31 3120 616e 640a 205b 446f astal11 and. [Do │ │ │ +0002c9c0: 6d61 696e 2054 7261 6e73 666f 726d 2066 main Transform f │ │ │ +0002c9d0: 696c 7465 7220 686f 6d65 7061 6765 5d28 ilter homepage]( │ │ │ +0002c9e0: 6874 7470 3a2f 2f77 7777 2e69 6e66 2e75 http://www.inf.u │ │ │ +0002c9f0: 6672 6773 2e62 722f 7e65 736c 6761 7374 frgs.br/~eslgast │ │ │ +0002ca00: 616c 2f44 6f6d 6169 6e54 7261 6e73 666f al/DomainTransfo │ │ │ +0002ca10: 726d 2f29 2e3c 2f64 643e 0a3c 6474 3e52 rm/).
    .
    R │ │ │ +0002ca20: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
    .
    automatically g │ │ │ +0002ca40: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ..

    .< │ │ │ +0002ca60: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    cr │ │ │ +0002cac0: 6561 7465 4454 4669 6c74 6572 3c2f 6833 eateDTFilter

    .
    │ │ │ +0002caf0: 3c73 7061 6e20 636c 6173 733d 226d 6f64 public s │ │ │ +0002cb10: 7461 7469 633c 2f73 7061 6e3e 266e 6273 tatic&nbs │ │ │ +0002cb20: 703b 3c73 7061 6e20 636c 6173 733d 2272 p;DTFilte │ │ │ +0002cb80: 723c 2f61 3e3c 2f73 7061 6e3e 266e 6273 r&nbs │ │ │ +0002cb90: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;cre │ │ │ +0002cbb0: 6174 6544 5446 696c 7465 723c 2f73 7061 ateDTFilter │ │ │ +0002cbe0: 283c 6120 6872 6566 3d22 2e2e 2f63 6f72 (Mat │ │ │ +0002cc20: 3c2f 613e 266e 6273 703b 6775 6964 652c  guide, │ │ │ +0002cc30: 0a20 646f 7562 6c65 266e 6273 703b 7369 . double si │ │ │ +0002cc40: 676d 6153 7061 7469 616c 2c0a 2064 6f75 gmaSpatial,. dou │ │ │ +0002cc50: 626c 6526 6e62 7370 3b73 6967 6d61 436f ble sigmaCo │ │ │ +0002cc60: 6c6f 7229 3c2f 7370 616e 3e3c 2f64 6976 lor)
    .
    Factory met │ │ │ +0002cc90: 686f 642c 2063 7265 6174 6520 696e 7374 hod, create inst │ │ │ +0002cca0: 616e 6365 206f 6620 4454 4669 6c74 6572 ance of DTFilter │ │ │ +0002ccb0: 2061 6e64 2070 726f 6475 6365 2069 6e69 and produce ini │ │ │ +0002ccc0: 7469 616c 697a 6174 696f 6e20 726f 7574 tialization rout │ │ │ +0002ccd0: 696e 6573 2e3c 2f64 6976 3e0a 3c64 6c20 ines.
    .
    .< │ │ │ +0002ccf0: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
    gu │ │ │ +0002cd10: 6964 653c 2f63 6f64 653e 202d 2067 7569 ide - gui │ │ │ +0002cd20: 6465 6420 696d 6167 6520 2875 7365 6420 ded image (used │ │ │ +0002cd30: 746f 2062 7569 6c64 2074 7261 6e73 666f to build transfo │ │ │ +0002cd40: 726d 6564 2064 6973 7461 6e63 652c 2077 rmed distance, w │ │ │ +0002cd50: 6869 6368 2064 6573 6372 6962 6573 2065 hich describes e │ │ │ +0002cd60: 6467 6520 7374 7275 6374 7572 6520 6f66 dge structure of │ │ │ +0002cd70: 0a20 6775 6964 6564 2069 6d61 6765 292e . guided image). │ │ │ +0002cd80: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0002cd90: 7369 676d 6153 7061 7469 616c 3c2f 636f sigmaSpatial - \({\sigma} │ │ │ +0002cdb0: 5f48 5c29 2070 6172 616d 6574 6572 2069 _H\) parameter i │ │ │ +0002cdc0: 6e20 7468 6520 6f72 6967 696e 616c 2061 n the original a │ │ │ +0002cdd0: 7274 6963 6c65 2c20 6974 2773 2073 696d rticle, it's sim │ │ │ +0002cde0: 696c 6172 2074 6f20 7468 6520 7369 676d ilar to the sigm │ │ │ +0002cdf0: 6120 696e 2074 6865 0a20 636f 6f72 6469 a in the. coordi │ │ │ +0002ce00: 6e61 7465 2073 7061 6365 2069 6e74 6f20 nate space into │ │ │ +0002ce10: 6269 6c61 7465 7261 6c46 696c 7465 722e bilateralFilter. │ │ │ +0002ce20: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0002ce30: 7369 676d 6143 6f6c 6f72 3c2f 636f 6465 sigmaColor - \({\sigma}_r │ │ │ +0002ce50: 5c29 2070 6172 616d 6574 6572 2069 6e20 \) parameter in │ │ │ +0002ce60: 7468 6520 6f72 6967 696e 616c 2061 7274 the original art │ │ │ +0002ce70: 6963 6c65 2c20 6974 2773 2073 696d 696c icle, it's simil │ │ │ +0002ce80: 6172 2074 6f20 7468 6520 7369 676d 6120 ar to the sigma │ │ │ +0002ce90: 696e 2074 6865 0a20 636f 6c6f 7220 7370 in the. color sp │ │ │ +0002cea0: 6163 6520 696e 746f 2062 696c 6174 6572 ace into bilater │ │ │ +0002ceb0: 616c 4669 6c74 6572 2e0a 0a20 6669 6c74 alFilter... filt │ │ │ +0002cec0: 6572 696e 6720 3244 2073 6967 6e61 6c73 ering 2D signals │ │ │ +0002ced0: 2069 6e20 7468 6520 6172 7469 636c 652e in the article. │ │ │ +0002cee0: 0a0a 0a20 466f 7220 6d6f 7265 2064 6574 ... For more det │ │ │ +0002cef0: 6169 6c73 2061 626f 7574 2044 6f6d 6169 ails about Domai │ │ │ +0002cf00: 6e20 5472 616e 7366 6f72 6d20 6669 6c74 n Transform filt │ │ │ +0002cf10: 6572 2070 6172 616d 6574 6572 732c 2073 er parameters, s │ │ │ +0002cf20: 6565 2074 6865 206f 7269 6769 6e61 6c20 ee the original │ │ │ +0002cf30: 6172 7469 636c 6520 4349 5445 3a20 4761 article CITE: Ga │ │ │ +0002cf40: 7374 616c 3131 2061 6e64 0a20 5b44 6f6d stal11 and. [Dom │ │ │ +0002cf50: 6169 6e20 5472 616e 7366 6f72 6d20 6669 ain Transform fi │ │ │ +0002cf60: 6c74 6572 2068 6f6d 6570 6167 655d 2868 lter homepage](h │ │ │ +0002cf70: 7474 703a 2f2f 7777 772e 696e 662e 7566 ttp://www.inf.uf │ │ │ +0002cf80: 7267 732e 6272 2f7e 6573 6c67 6173 7461 rgs.br/~eslgasta │ │ │ +0002cf90: 6c2f 446f 6d61 696e 5472 616e 7366 6f72 l/DomainTransfor │ │ │ +0002cfa0: 6d2f 292e 3c2f 6464 3e0a 3c64 743e 5265 m/).
    .
    Re │ │ │ +0002cfb0: 7475 726e 733a 3c2f 6474 3e0a 3c64 643e turns:
    .
    │ │ │ +0002cfc0: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +0002cfd0: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
    ....
  • ..

    dtFilter< │ │ │ +0002d080: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ +0002d0c0: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ +0002d0d0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;v │ │ │ +0002d0f0: 6f69 643c 2f73 7061 6e3e 266e 6273 703b oid  │ │ │ +0002d100: 3c73 7061 6e20 636c 6173 733d 2265 6c65 dtFil │ │ │ +0002d120: 7465 723c 2f73 7061 6e3e 3c77 6272 3e3c ter< │ │ │ +0002d130: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ +0002d140: 6d65 7465 7273 223e 283c 6120 6872 6566 meters">(Mat&nbs │ │ │ +0002d190: 703b 6775 6964 652c 0a20 3c61 2068 7265 p;guide,. Mat&nb │ │ │ +0002d1e0: 7370 3b73 7263 2c0a 203c 6120 6872 6566 sp;src,. Mat&nbs │ │ │ +0002d230: 703b 6473 742c 0a20 646f 7562 6c65 266e p;dst,. double&n │ │ │ +0002d240: 6273 703b 7369 676d 6153 7061 7469 616c bsp;sigmaSpatial │ │ │ +0002d250: 2c0a 2064 6f75 626c 6526 6e62 7370 3b73 ,. double s │ │ │ +0002d260: 6967 6d61 436f 6c6f 722c 0a20 696e 7426 igmaColor,. int& │ │ │ +0002d270: 6e62 7370 3b6d 6f64 652c 0a20 696e 7426 nbsp;mode,. int& │ │ │ +0002d280: 6e62 7370 3b6e 756d 4974 6572 7329 3c2f nbsp;numIters)
    .
    S │ │ │ +0002d2b0: 696d 706c 6520 6f6e 652d 6c69 6e65 2044 imple one-line D │ │ │ +0002d2c0: 6f6d 6169 6e20 5472 616e 7366 6f72 6d20 omain Transform │ │ │ +0002d2d0: 6669 6c74 6572 2063 616c 6c2e 2049 6620 filter call. If │ │ │ +0002d2e0: 796f 7520 6861 7665 206d 756c 7469 706c you have multipl │ │ │ +0002d2f0: 6520 696d 6167 6573 2074 6f20 6669 6c74 e images to filt │ │ │ +0002d300: 6572 2077 6974 6820 7468 6520 7361 6d65 er with the same │ │ │ +0002d310: 0a20 6775 6964 6564 2069 6d61 6765 2074 . guided image t │ │ │ +0002d320: 6865 6e20 7573 6520 4454 4669 6c74 6572 hen use DTFilter │ │ │ +0002d330: 2069 6e74 6572 6661 6365 2074 6f20 6176 interface to av │ │ │ +0002d340: 6f69 6420 6578 7472 6120 636f 6d70 7574 oid extra comput │ │ │ +0002d350: 6174 696f 6e73 206f 6e20 696e 6974 6961 ations on initia │ │ │ +0002d360: 6c69 7a61 7469 6f6e 2073 7461 6765 2e3c lization stage.< │ │ │ +0002d370: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ +0002d390: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .guide - guided im │ │ │ +0002d3c0: 6167 6520 2861 6c73 6f20 6361 6c6c 6564 age (also called │ │ │ +0002d3d0: 2061 7320 6a6f 696e 7420 696d 6167 6529 as joint image) │ │ │ +0002d3e0: 2077 6974 6820 756e 7369 676e 6564 2038 with unsigned 8 │ │ │ +0002d3f0: 2d62 6974 206f 7220 666c 6f61 7469 6e67 -bit or floating │ │ │ +0002d400: 2d70 6f69 6e74 2033 322d 6269 740a 2064 -point 32-bit. d │ │ │ +0002d410: 6570 7468 2061 6e64 2075 7020 746f 2034 epth and up to 4 │ │ │ +0002d420: 2063 6861 6e6e 656c 732e 3c2f 6464 3e0a channels.. │ │ │ +0002d430: 3c64 643e 3c63 6f64 653e 7372 633c 2f63
    src - filtering │ │ │ +0002d450: 2069 6d61 6765 2077 6974 6820 756e 7369 image with unsi │ │ │ +0002d460: 676e 6564 2038 2d62 6974 206f 7220 666c gned 8-bit or fl │ │ │ +0002d470: 6f61 7469 6e67 2d70 6f69 6e74 2033 322d oating-point 32- │ │ │ +0002d480: 6269 7420 6465 7074 6820 616e 6420 7570 bit depth and up │ │ │ +0002d490: 2074 6f20 3420 6368 616e 6e65 6c73 2e3c to 4 channels.< │ │ │ +0002d4a0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e64 /dd>.
    d │ │ │ +0002d4b0: 7374 3c2f 636f 6465 3e20 2d20 6465 7374 st - dest │ │ │ +0002d4c0: 696e 6174 696f 6e20 696d 6167 653c 2f64 ination image.
    sig │ │ │ +0002d4e0: 6d61 5370 6174 6961 6c3c 2f63 6f64 653e maSpatial │ │ │ +0002d4f0: 202d 205c 287b 5c73 6967 6d61 7d5f 485c - \({\sigma}_H\ │ │ │ +0002d500: 2920 7061 7261 6d65 7465 7220 696e 2074 ) parameter in t │ │ │ +0002d510: 6865 206f 7269 6769 6e61 6c20 6172 7469 he original arti │ │ │ +0002d520: 636c 652c 2069 7427 7320 7369 6d69 6c61 cle, it's simila │ │ │ +0002d530: 7220 746f 2074 6865 2073 6967 6d61 2069 r to the sigma i │ │ │ +0002d540: 6e20 7468 650a 2063 6f6f 7264 696e 6174 n the. coordinat │ │ │ +0002d550: 6520 7370 6163 6520 696e 746f 2062 696c e space into bil │ │ │ +0002d560: 6174 6572 616c 4669 6c74 6572 2e3c 2f64 ateralFilter..
    sig │ │ │ +0002d580: 6d61 436f 6c6f 723c 2f63 6f64 653e 202d maColor - │ │ │ +0002d590: 205c 287b 5c73 6967 6d61 7d5f 725c 2920 \({\sigma}_r\) │ │ │ +0002d5a0: 7061 7261 6d65 7465 7220 696e 2074 6865 parameter in the │ │ │ +0002d5b0: 206f 7269 6769 6e61 6c20 6172 7469 636c original articl │ │ │ +0002d5c0: 652c 2069 7427 7320 7369 6d69 6c61 7220 e, it's similar │ │ │ +0002d5d0: 746f 2074 6865 2073 6967 6d61 2069 6e20 to the sigma in │ │ │ +0002d5e0: 7468 650a 2063 6f6c 6f72 2073 7061 6365 the. color space │ │ │ +0002d5f0: 2069 6e74 6f20 6269 6c61 7465 7261 6c46 into bilateralF │ │ │ +0002d600: 696c 7465 722e 3c2f 6464 3e0a 3c64 643e ilter.
    .
    │ │ │ +0002d610: 3c63 6f64 653e 6d6f 6465 3c2f 636f 6465 mode - one form thr │ │ │ +0002d630: 6565 206d 6f64 6573 2044 5446 5f4e 432c ee modes DTF_NC, │ │ │ +0002d640: 2044 5446 5f52 4620 616e 6420 4454 465f DTF_RF and DTF_ │ │ │ +0002d650: 4943 2077 6869 6368 2063 6f72 7265 7370 IC which corresp │ │ │ +0002d660: 6f6e 6473 2074 6f20 7468 7265 6520 6d6f onds to three mo │ │ │ +0002d670: 6465 7320 666f 720a 2066 696c 7465 7269 des for. filteri │ │ │ +0002d680: 6e67 2032 4420 7369 676e 616c 7320 696e ng 2D signals in │ │ │ +0002d690: 2074 6865 2061 7274 6963 6c65 2e3c 2f64 the article..
    num │ │ │ +0002d6b0: 4974 6572 733c 2f63 6f64 653e 202d 206f Iters - o │ │ │ +0002d6c0: 7074 696f 6e61 6c20 6e75 6d62 6572 206f ptional number o │ │ │ +0002d6d0: 6620 6974 6572 6174 696f 6e73 2075 7365 f iterations use │ │ │ +0002d6e0: 6420 666f 7220 6669 6c74 6572 696e 672c d for filtering, │ │ │ +0002d6f0: 2033 2069 7320 7175 6974 6520 656e 6f75 3 is quite enou │ │ │ +0002d700: 6768 2e0a 2053 4545 3a20 6269 6c61 7465 gh.. SEE: bilate │ │ │ +0002d710: 7261 6c46 696c 7465 722c 2067 7569 6465 ralFilter, guide │ │ │ +0002d720: 6446 696c 7465 722c 2061 6d46 696c 7465 dFilter, amFilte │ │ │ +0002d730: 723c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 r
    .
    .
    .

  • ..
    .

    dtF │ │ │ +0002d7d0: 696c 7465 723c 2f68 333e 0a3c 6469 7620 ilter

    .
    public static void │ │ │ +0002d850: 266e 6273 703b 3c73 7061 6e20 636c 6173  dtFilter │ │ │ +0002d880: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ +0002d8a0: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ +0002d8b0: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ +0002d8c0: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +0002d8d0: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat guide,. │ │ │ +0002d8f0: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ +0002d930: 2f61 3e26 6e62 7370 3b73 7263 2c0a 203c /a> src,. < │ │ │ +0002d940: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ +0002d950: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ +0002d960: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +0002d970: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat dst,. do │ │ │ +0002d990: 7562 6c65 266e 6273 703b 7369 676d 6153 uble sigmaS │ │ │ +0002d9a0: 7061 7469 616c 2c0a 2064 6f75 626c 6526 patial,. double& │ │ │ +0002d9b0: 6e62 7370 3b73 6967 6d61 436f 6c6f 722c nbsp;sigmaColor, │ │ │ +0002d9c0: 0a20 696e 7426 6e62 7370 3b6d 6f64 6529 . int mode) │ │ │ +0002d9d0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .Simple one-line │ │ │ +0002da00: 2044 6f6d 6169 6e20 5472 616e 7366 6f72 Domain Transfor │ │ │ +0002da10: 6d20 6669 6c74 6572 2063 616c 6c2e 2049 m filter call. I │ │ │ +0002da20: 6620 796f 7520 6861 7665 206d 756c 7469 f you have multi │ │ │ +0002da30: 706c 6520 696d 6167 6573 2074 6f20 6669 ple images to fi │ │ │ +0002da40: 6c74 6572 2077 6974 6820 7468 6520 7361 lter with the sa │ │ │ +0002da50: 6d65 0a20 6775 6964 6564 2069 6d61 6765 me. guided image │ │ │ +0002da60: 2074 6865 6e20 7573 6520 4454 4669 6c74 then use DTFilt │ │ │ +0002da70: 6572 2069 6e74 6572 6661 6365 2074 6f20 er interface to │ │ │ +0002da80: 6176 6f69 6420 6578 7472 6120 636f 6d70 avoid extra comp │ │ │ +0002da90: 7574 6174 696f 6e73 206f 6e20 696e 6974 utations on init │ │ │ +0002daa0: 6961 6c69 7a61 7469 6f6e 2073 7461 6765 ialization stage │ │ │ +0002dab0: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 ..
    .
    P │ │ │ +0002dad0: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ +0002dae0: 3c64 643e 3c63 6f64 653e 6775 6964 653c
    guide< │ │ │ +0002daf0: 2f63 6f64 653e 202d 2067 7569 6465 6420 /code> - guided │ │ │ +0002db00: 696d 6167 6520 2861 6c73 6f20 6361 6c6c image (also call │ │ │ +0002db10: 6564 2061 7320 6a6f 696e 7420 696d 6167 ed as joint imag │ │ │ +0002db20: 6529 2077 6974 6820 756e 7369 676e 6564 e) with unsigned │ │ │ +0002db30: 2038 2d62 6974 206f 7220 666c 6f61 7469 8-bit or floati │ │ │ +0002db40: 6e67 2d70 6f69 6e74 2033 322d 6269 740a ng-point 32-bit. │ │ │ +0002db50: 2064 6570 7468 2061 6e64 2075 7020 746f depth and up to │ │ │ +0002db60: 2034 2063 6861 6e6e 656c 732e 3c2f 6464 4 channels.
    .
    src< │ │ │ +0002db80: 2f63 6f64 653e 202d 2066 696c 7465 7269 /code> - filteri │ │ │ +0002db90: 6e67 2069 6d61 6765 2077 6974 6820 756e ng image with un │ │ │ +0002dba0: 7369 676e 6564 2038 2d62 6974 206f 7220 signed 8-bit or │ │ │ +0002dbb0: 666c 6f61 7469 6e67 2d70 6f69 6e74 2033 floating-point 3 │ │ │ +0002dbc0: 322d 6269 7420 6465 7074 6820 616e 6420 2-bit depth and │ │ │ +0002dbd0: 7570 2074 6f20 3420 6368 616e 6e65 6c73 up to 4 channels │ │ │ +0002dbe0: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    dst - de │ │ │ +0002dc00: 7374 696e 6174 696f 6e20 696d 6167 653c stination image< │ │ │ +0002dc10: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e73 /dd>.
    s │ │ │ +0002dc20: 6967 6d61 5370 6174 6961 6c3c 2f63 6f64 igmaSpatial - \({\sigma}_ │ │ │ +0002dc40: 485c 2920 7061 7261 6d65 7465 7220 696e H\) parameter in │ │ │ +0002dc50: 2074 6865 206f 7269 6769 6e61 6c20 6172 the original ar │ │ │ +0002dc60: 7469 636c 652c 2069 7427 7320 7369 6d69 ticle, it's simi │ │ │ +0002dc70: 6c61 7220 746f 2074 6865 2073 6967 6d61 lar to the sigma │ │ │ +0002dc80: 2069 6e20 7468 650a 2063 6f6f 7264 696e in the. coordin │ │ │ +0002dc90: 6174 6520 7370 6163 6520 696e 746f 2062 ate space into b │ │ │ +0002dca0: 696c 6174 6572 616c 4669 6c74 6572 2e3c ilateralFilter.< │ │ │ +0002dcb0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e73 /dd>.
    s │ │ │ +0002dcc0: 6967 6d61 436f 6c6f 723c 2f63 6f64 653e igmaColor │ │ │ +0002dcd0: 202d 205c 287b 5c73 6967 6d61 7d5f 725c - \({\sigma}_r\ │ │ │ +0002dce0: 2920 7061 7261 6d65 7465 7220 696e 2074 ) parameter in t │ │ │ +0002dcf0: 6865 206f 7269 6769 6e61 6c20 6172 7469 he original arti │ │ │ +0002dd00: 636c 652c 2069 7427 7320 7369 6d69 6c61 cle, it's simila │ │ │ +0002dd10: 7220 746f 2074 6865 2073 6967 6d61 2069 r to the sigma i │ │ │ +0002dd20: 6e20 7468 650a 2063 6f6c 6f72 2073 7061 n the. color spa │ │ │ +0002dd30: 6365 2069 6e74 6f20 6269 6c61 7465 7261 ce into bilatera │ │ │ +0002dd40: 6c46 696c 7465 722e 3c2f 6464 3e0a 3c64 lFilter.
    .mode - one form t │ │ │ +0002dd70: 6872 6565 206d 6f64 6573 2044 5446 5f4e hree modes DTF_N │ │ │ +0002dd80: 432c 2044 5446 5f52 4620 616e 6420 4454 C, DTF_RF and DT │ │ │ +0002dd90: 465f 4943 2077 6869 6368 2063 6f72 7265 F_IC which corre │ │ │ +0002dda0: 7370 6f6e 6473 2074 6f20 7468 7265 6520 sponds to three │ │ │ +0002ddb0: 6d6f 6465 7320 666f 720a 2066 696c 7465 modes for. filte │ │ │ +0002ddc0: 7269 6e67 2032 4420 7369 676e 616c 7320 ring 2D signals │ │ │ +0002ddd0: 696e 2074 6865 2061 7274 6963 6c65 2e0a in the article.. │ │ │ +0002dde0: 2053 4545 3a20 6269 6c61 7465 7261 6c46 SEE: bilateralF │ │ │ +0002ddf0: 696c 7465 722c 2067 7569 6465 6446 696c ilter, guidedFil │ │ │ +0002de00: 7465 722c 2061 6d46 696c 7465 723c 2f64 ter, amFilter.
    ..
  • .
  • .< │ │ │ +0002de30: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ +0002de40: 6574 6169 6c22 2069 643d 2264 7446 696c etail" id="dtFil │ │ │ +0002de50: 7465 7228 6f72 672e 6f70 656e 6376 2e63 ter(org.opencv.c │ │ │ +0002de60: 6f72 652e 4d61 742c 6f72 672e 6f70 656e ore.Mat,org.open │ │ │ +0002de70: 6376 2e63 6f72 652e 4d61 742c 6f72 672e cv.core.Mat,org. │ │ │ +0002de80: 6f70 656e 6376 2e63 6f72 652e 4d61 742c opencv.core.Mat, │ │ │ +0002de90: 646f 7562 6c65 2c64 6f75 626c 6529 223e double,double)"> │ │ │ +0002dea0: 0a3c 6833 3e64 7446 696c 7465 723c 2f68 .

    dtFilter.
    public │ │ │ +0002def0: 7374 6174 6963 3c2f 7370 616e 3e26 6e62 static&nb │ │ │ +0002df00: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;voi │ │ │ +0002df20: 643c 2f73 7061 6e3e 266e 6273 703b 3c73 d dtFilte │ │ │ +0002df50: 723c 2f73 7061 6e3e 3c77 6272 3e3c 7370 r(Mat  │ │ │ +0002dfc0: 6775 6964 652c 0a20 3c61 2068 7265 663d guide,. Mat  │ │ │ +0002e010: 3b73 7263 2c0a 203c 6120 6872 6566 3d22 ;src,. Mat  │ │ │ +0002e060: 6473 742c 0a20 646f 7562 6c65 266e 6273 dst,. double&nbs │ │ │ +0002e070: 703b 7369 676d 6153 7061 7469 616c 2c0a p;sigmaSpatial,. │ │ │ +0002e080: 2064 6f75 626c 6526 6e62 7370 3b73 6967 double sig │ │ │ +0002e090: 6d61 436f 6c6f 7229 3c2f 7370 616e 3e3c maColor)< │ │ │ +0002e0a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Simple │ │ │ +0002e0c0: 6f6e 652d 6c69 6e65 2044 6f6d 6169 6e20 one-line Domain │ │ │ +0002e0d0: 5472 616e 7366 6f72 6d20 6669 6c74 6572 Transform filter │ │ │ +0002e0e0: 2063 616c 6c2e 2049 6620 796f 7520 6861 call. If you ha │ │ │ +0002e0f0: 7665 206d 756c 7469 706c 6520 696d 6167 ve multiple imag │ │ │ +0002e100: 6573 2074 6f20 6669 6c74 6572 2077 6974 es to filter wit │ │ │ +0002e110: 6820 7468 6520 7361 6d65 0a20 6775 6964 h the same. guid │ │ │ +0002e120: 6564 2069 6d61 6765 2074 6865 6e20 7573 ed image then us │ │ │ +0002e130: 6520 4454 4669 6c74 6572 2069 6e74 6572 e DTFilter inter │ │ │ +0002e140: 6661 6365 2074 6f20 6176 6f69 6420 6578 face to avoid ex │ │ │ +0002e150: 7472 6120 636f 6d70 7574 6174 696f 6e73 tra computations │ │ │ +0002e160: 206f 6e20 696e 6974 6961 6c69 7a61 7469 on initializati │ │ │ +0002e170: 6f6e 2073 7461 6765 2e3c 2f64 6976 3e0a on stage.
    . │ │ │ +0002e180: 3c64 6c20 636c 6173 733d 226e 6f74 6573
    .
    Parameter │ │ │ +0002e1a0: 733a 3c2f 6474 3e0a 3c64 643e 3c63 6f64 s:
    .
    guide - │ │ │ +0002e1c0: 2067 7569 6465 6420 696d 6167 6520 2861 guided image (a │ │ │ +0002e1d0: 6c73 6f20 6361 6c6c 6564 2061 7320 6a6f lso called as jo │ │ │ +0002e1e0: 696e 7420 696d 6167 6529 2077 6974 6820 int image) with │ │ │ +0002e1f0: 756e 7369 676e 6564 2038 2d62 6974 206f unsigned 8-bit o │ │ │ +0002e200: 7220 666c 6f61 7469 6e67 2d70 6f69 6e74 r floating-point │ │ │ +0002e210: 2033 322d 6269 740a 2064 6570 7468 2061 32-bit. depth a │ │ │ +0002e220: 6e64 2075 7020 746f 2034 2063 6861 6e6e nd up to 4 chann │ │ │ +0002e230: 656c 732e 3c2f 6464 3e0a 3c64 643e 3c63 els.
    .
    src - │ │ │ +0002e250: 2066 696c 7465 7269 6e67 2069 6d61 6765 filtering image │ │ │ +0002e260: 2077 6974 6820 756e 7369 676e 6564 2038 with unsigned 8 │ │ │ +0002e270: 2d62 6974 206f 7220 666c 6f61 7469 6e67 -bit or floating │ │ │ +0002e280: 2d70 6f69 6e74 2033 322d 6269 7420 6465 -point 32-bit de │ │ │ +0002e290: 7074 6820 616e 6420 7570 2074 6f20 3420 pth and up to 4 │ │ │ +0002e2a0: 6368 616e 6e65 6c73 2e3c 2f64 643e 0a3c channels.
    .< │ │ │ +0002e2b0: 6464 3e3c 636f 6465 3e64 7374 3c2f 636f dd>dst - destinatio │ │ │ +0002e2d0: 6e20 696d 6167 653c 2f64 643e 0a3c 6464 n image.
    sigmaSpat │ │ │ +0002e2f0: 6961 6c3c 2f63 6f64 653e 202d 205c 287b ial - \({ │ │ │ +0002e300: 5c73 6967 6d61 7d5f 485c 2920 7061 7261 \sigma}_H\) para │ │ │ +0002e310: 6d65 7465 7220 696e 2074 6865 206f 7269 meter in the ori │ │ │ +0002e320: 6769 6e61 6c20 6172 7469 636c 652c 2069 ginal article, i │ │ │ +0002e330: 7427 7320 7369 6d69 6c61 7220 746f 2074 t's similar to t │ │ │ +0002e340: 6865 2073 6967 6d61 2069 6e20 7468 650a he sigma in the. │ │ │ +0002e350: 2063 6f6f 7264 696e 6174 6520 7370 6163 coordinate spac │ │ │ +0002e360: 6520 696e 746f 2062 696c 6174 6572 616c e into bilateral │ │ │ +0002e370: 4669 6c74 6572 2e3c 2f64 643e 0a3c 6464 Filter.
    .
    sigmaColo │ │ │ +0002e390: 723c 2f63 6f64 653e 202d 205c 287b 5c73 r - \({\s │ │ │ +0002e3a0: 6967 6d61 7d5f 725c 2920 7061 7261 6d65 igma}_r\) parame │ │ │ +0002e3b0: 7465 7220 696e 2074 6865 206f 7269 6769 ter in the origi │ │ │ +0002e3c0: 6e61 6c20 6172 7469 636c 652c 2069 7427 nal article, it' │ │ │ +0002e3d0: 7320 7369 6d69 6c61 7220 746f 2074 6865 s similar to the │ │ │ +0002e3e0: 2073 6967 6d61 2069 6e20 7468 650a 2063 sigma in the. c │ │ │ +0002e3f0: 6f6c 6f72 2073 7061 6365 2069 6e74 6f20 olor space into │ │ │ +0002e400: 6269 6c61 7465 7261 6c46 696c 7465 722e bilateralFilter. │ │ │ +0002e410: 0a20 6669 6c74 6572 696e 6720 3244 2073 . filtering 2D s │ │ │ +0002e420: 6967 6e61 6c73 2069 6e20 7468 6520 6172 ignals in the ar │ │ │ +0002e430: 7469 636c 652e 0a20 5345 453a 2062 696c ticle.. SEE: bil │ │ │ +0002e440: 6174 6572 616c 4669 6c74 6572 2c20 6775 ateralFilter, gu │ │ │ +0002e450: 6964 6564 4669 6c74 6572 2c20 616d 4669 idedFilter, amFi │ │ │ +0002e460: 6c74 6572 3c2f 6464 3e0a 3c2f 646c 3e0a lter
    .
    . │ │ │ +0002e470: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e .

  • │ │ │ +0002e480: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .createGuidedFi │ │ │ +0002e4f0: 6c74 6572 3c2f 6833 3e0a 3c64 6976 2063 lter.
    │ │ │ +0002e530: 7075 626c 6963 2073 7461 7469 633c 2f73 public static GuidedFilte │ │ │ +0002e5b0: 723c 2f61 3e3c 2f73 7061 6e3e 266e 6273 r&nbs │ │ │ +0002e5c0: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;cre │ │ │ +0002e5e0: 6174 6547 7569 6465 6446 696c 7465 723c ateGuidedFilter< │ │ │ +0002e5f0: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(Mat gu │ │ │ +0002e660: 6964 652c 0a20 696e 7426 6e62 7370 3b72 ide,. int r │ │ │ +0002e670: 6164 6975 732c 0a20 646f 7562 6c65 266e adius,. double&n │ │ │ +0002e680: 6273 703b 6570 732c 0a20 646f 7562 6c65 bsp;eps,. double │ │ │ +0002e690: 266e 6273 703b 7363 616c 6529 3c2f 7370  scale)
    .
    Fac │ │ │ +0002e6c0: 746f 7279 206d 6574 686f 642c 2063 7265 tory method, cre │ │ │ +0002e6d0: 6174 6520 696e 7374 616e 6365 206f 6620 ate instance of │ │ │ +0002e6e0: 4775 6964 6564 4669 6c74 6572 2061 6e64 GuidedFilter and │ │ │ +0002e6f0: 2070 726f 6475 6365 2069 6e69 7469 616c produce initial │ │ │ +0002e700: 697a 6174 696f 6e20 726f 7574 696e 6573 ization routines │ │ │ +0002e710: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 .
    .
    .
    P │ │ │ +0002e730: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ +0002e740: 3c64 643e 3c63 6f64 653e 6775 6964 653c
    guide< │ │ │ +0002e750: 2f63 6f64 653e 202d 2067 7569 6465 6420 /code> - guided │ │ │ +0002e760: 696d 6167 6520 286f 7220 6172 7261 7920 image (or array │ │ │ +0002e770: 6f66 2069 6d61 6765 7329 2077 6974 6820 of images) with │ │ │ +0002e780: 7570 2074 6f20 3320 6368 616e 6e65 6c73 up to 3 channels │ │ │ +0002e790: 2c20 6966 2069 7420 6861 7665 206d 6f72 , if it have mor │ │ │ +0002e7a0: 6520 7468 656e 2033 0a20 6368 616e 6e65 e then 3. channe │ │ │ +0002e7b0: 6c73 2074 6865 6e20 6f6e 6c79 2066 6972 ls then only fir │ │ │ +0002e7c0: 7374 2033 2063 6861 6e6e 656c 7320 7769 st 3 channels wi │ │ │ +0002e7d0: 6c6c 2062 6520 7573 6564 2e3c 2f64 643e ll be used.
    │ │ │ +0002e7e0: 0a3c 6464 3e3c 636f 6465 3e72 6164 6975 .
    radiu │ │ │ +0002e7f0: 733c 2f63 6f64 653e 202d 2072 6164 6975 s - radiu │ │ │ +0002e800: 7320 6f66 2047 7569 6465 6420 4669 6c74 s of Guided Filt │ │ │ +0002e810: 6572 2e3c 2f64 643e 0a3c 6464 3e3c 636f er.
    .
    eps - │ │ │ +0002e830: 7265 6775 6c61 7269 7a61 7469 6f6e 2074 regularization t │ │ │ +0002e840: 6572 6d20 6f66 2047 7569 6465 6420 4669 erm of Guided Fi │ │ │ +0002e850: 6c74 6572 2e20 5c28 7b65 7073 7d5e 325c lter. \({eps}^2\ │ │ │ +0002e860: 2920 6973 2073 696d 696c 6172 2074 6f20 ) is similar to │ │ │ +0002e870: 7468 6520 7369 676d 6120 696e 2074 6865 the sigma in the │ │ │ +0002e880: 2063 6f6c 6f72 0a20 7370 6163 6520 696e color. space in │ │ │ +0002e890: 746f 2062 696c 6174 6572 616c 4669 6c74 to bilateralFilt │ │ │ +0002e8a0: 6572 2e3c 2f64 643e 0a3c 6464 3e3c 636f er.
    .
    scale │ │ │ +0002e8c0: 2d20 7375 6273 616d 706c 6520 6661 6374 - subsample fact │ │ │ +0002e8d0: 6f72 206f 6620 4661 7374 2047 7569 6465 or of Fast Guide │ │ │ +0002e8e0: 6420 4669 6c74 6572 2c20 7573 6520 6120 d Filter, use a │ │ │ +0002e8f0: 7363 616c 6520 6c65 7373 2074 6861 6e20 scale less than │ │ │ +0002e900: 3120 746f 2073 7065 6564 7320 7570 2063 1 to speeds up c │ │ │ +0002e910: 6f6d 7075 7461 7469 6f6e 0a20 7769 7468 omputation. with │ │ │ +0002e920: 2061 6c6d 6f73 7420 6e6f 2076 6973 6962 almost no visib │ │ │ +0002e930: 6c65 2064 6567 7261 6461 7469 6f6e 2e20 le degradation. │ │ │ +0002e940: 2865 2e67 2e20 7363 616c 653d 3d30 2e35 (e.g. scale==0.5 │ │ │ +0002e950: 2073 6872 696e 6b73 2074 6865 2069 6d61 shrinks the ima │ │ │ +0002e960: 6765 2062 7920 3278 2069 6e73 6964 6520 ge by 2x inside │ │ │ +0002e970: 7468 6520 6669 6c74 6572 290a 0a20 466f the filter).. Fo │ │ │ +0002e980: 7220 6d6f 7265 2064 6574 6169 6c73 2061 r more details a │ │ │ +0002e990: 626f 7574 2028 4661 7374 2920 4775 6964 bout (Fast) Guid │ │ │ +0002e9a0: 6564 2046 696c 7465 7220 7061 7261 6d65 ed Filter parame │ │ │ +0002e9b0: 7465 7273 2c20 7365 6520 7468 6520 6f72 ters, see the or │ │ │ +0002e9c0: 6967 696e 616c 2061 7274 6963 6c65 7320 iginal articles │ │ │ +0002e9d0: 4349 5445 3a20 4b61 696d 696e 6731 3020 CITE: Kaiming10 │ │ │ +0002e9e0: 4349 5445 3a20 4b61 696d 696e 6731 3520 CITE: Kaiming15 │ │ │ +0002e9f0: 2e3c 2f64 643e 0a3c 6474 3e52 6574 7572 .
    .
    Retur │ │ │ +0002ea00: 6e73 3a3c 2f64 743e 0a3c 6464 3e61 7574 ns:
    .
    aut │ │ │ +0002ea10: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ +0002ea20: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
    .
    . │ │ │ +0002ea30: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e
    .
  • │ │ │ +0002ea40: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .

    creat │ │ │ +0002eaa0: 6547 7569 6465 6446 696c 7465 723c 2f68 eGuidedFilter.
    public │ │ │ +0002eaf0: 7374 6174 6963 3c2f 7370 616e 3e26 6e62 static&nb │ │ │ +0002eb00: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;Gu │ │ │ +0002eb60: 6964 6564 4669 6c74 6572 3c2f 613e 3c2f idedFilter createGuid │ │ │ +0002eba0: 6564 4669 6c74 6572 3c2f 7370 616e 3e3c edFilter< │ │ │ +0002ebb0: 7762 723e 3c73 7061 6e20 636c 6173 733d wbr>(Mat guide,. i │ │ │ +0002ec20: 6e74 266e 6273 703b 7261 6469 7573 2c0a nt radius,. │ │ │ +0002ec30: 2064 6f75 626c 6526 6e62 7370 3b65 7073 double eps │ │ │ +0002ec40: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    .< │ │ │ +0002ec50: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ +0002ec60: 223e 4661 6374 6f72 7920 6d65 7468 6f64 ">Factory method │ │ │ +0002ec70: 2c20 6372 6561 7465 2069 6e73 7461 6e63 , create instanc │ │ │ +0002ec80: 6520 6f66 2047 7569 6465 6446 696c 7465 e of GuidedFilte │ │ │ +0002ec90: 7220 616e 6420 7072 6f64 7563 6520 696e r and produce in │ │ │ +0002eca0: 6974 6961 6c69 7a61 7469 6f6e 2072 6f75 itialization rou │ │ │ +0002ecb0: 7469 6e65 732e 3c2f 6469 763e 0a3c 646c tines..
    . │ │ │ +0002ecd0: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
    Parameters:< │ │ │ +0002ece0: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e67 /dt>.
    g │ │ │ +0002ecf0: 7569 6465 3c2f 636f 6465 3e20 2d20 6775 uide - gu │ │ │ +0002ed00: 6964 6564 2069 6d61 6765 2028 6f72 2061 ided image (or a │ │ │ +0002ed10: 7272 6179 206f 6620 696d 6167 6573 2920 rray of images) │ │ │ +0002ed20: 7769 7468 2075 7020 746f 2033 2063 6861 with up to 3 cha │ │ │ +0002ed30: 6e6e 656c 732c 2069 6620 6974 2068 6176 nnels, if it hav │ │ │ +0002ed40: 6520 6d6f 7265 2074 6865 6e20 330a 2063 e more then 3. c │ │ │ +0002ed50: 6861 6e6e 656c 7320 7468 656e 206f 6e6c hannels then onl │ │ │ +0002ed60: 7920 6669 7273 7420 3320 6368 616e 6e65 y first 3 channe │ │ │ +0002ed70: 6c73 2077 696c 6c20 6265 2075 7365 642e ls will be used. │ │ │ +0002ed80: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0002ed90: 7261 6469 7573 3c2f 636f 6465 3e20 2d20 radius - │ │ │ +0002eda0: 7261 6469 7573 206f 6620 4775 6964 6564 radius of Guided │ │ │ +0002edb0: 2046 696c 7465 722e 3c2f 6464 3e0a 3c64 Filter.
    .eps - regularizat │ │ │ +0002ede0: 696f 6e20 7465 726d 206f 6620 4775 6964 ion term of Guid │ │ │ +0002edf0: 6564 2046 696c 7465 722e 205c 287b 6570 ed Filter. \({ep │ │ │ +0002ee00: 737d 5e32 5c29 2069 7320 7369 6d69 6c61 s}^2\) is simila │ │ │ +0002ee10: 7220 746f 2074 6865 2073 6967 6d61 2069 r to the sigma i │ │ │ +0002ee20: 6e20 7468 6520 636f 6c6f 720a 2073 7061 n the color. spa │ │ │ +0002ee30: 6365 2069 6e74 6f20 6269 6c61 7465 7261 ce into bilatera │ │ │ +0002ee40: 6c46 696c 7465 722e 0a0a 2077 6974 6820 lFilter... with │ │ │ +0002ee50: 616c 6d6f 7374 206e 6f20 7669 7369 626c almost no visibl │ │ │ +0002ee60: 6520 6465 6772 6164 6174 696f 6e2e 2028 e degradation. ( │ │ │ +0002ee70: 652e 672e 2073 6361 6c65 3d3d 302e 3520 e.g. scale==0.5 │ │ │ +0002ee80: 7368 7269 6e6b 7320 7468 6520 696d 6167 shrinks the imag │ │ │ +0002ee90: 6520 6279 2032 7820 696e 7369 6465 2074 e by 2x inside t │ │ │ +0002eea0: 6865 2066 696c 7465 7229 0a0a 2046 6f72 he filter).. For │ │ │ +0002eeb0: 206d 6f72 6520 6465 7461 696c 7320 6162 more details ab │ │ │ +0002eec0: 6f75 7420 2846 6173 7429 2047 7569 6465 out (Fast) Guide │ │ │ +0002eed0: 6420 4669 6c74 6572 2070 6172 616d 6574 d Filter paramet │ │ │ +0002eee0: 6572 732c 2073 6565 2074 6865 206f 7269 ers, see the ori │ │ │ +0002eef0: 6769 6e61 6c20 6172 7469 636c 6573 2043 ginal articles C │ │ │ +0002ef00: 4954 453a 204b 6169 6d69 6e67 3130 2043 ITE: Kaiming10 C │ │ │ +0002ef10: 4954 453a 204b 6169 6d69 6e67 3135 202e ITE: Kaiming15 . │ │ │ +0002ef20: 3c2f 6464 3e0a 3c64 743e 5265 7475 726e .
    Return │ │ │ +0002ef30: 733a 3c2f 6474 3e0a 3c64 643e 6175 746f s:
    .
    auto │ │ │ +0002ef40: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ +0002ef50: 7465 643c 2f64 643e 0a3c 2f64 6c3e 0a3c ted
    .
    .< │ │ │ +0002ef60: 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 3e0a /section>.

  • . │ │ │ +0002ef70: 3c6c 693e 0a3c 7365 6374 696f 6e20 636c
  • .
    .

    guidedFil │ │ │ +0002f000: 7465 723c 2f68 333e 0a3c 6469 7620 636c ter

    .
    p │ │ │ +0002f040: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static void&n │ │ │ +0002f080: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;g │ │ │ +0002f0a0: 7569 6465 6446 696c 7465 723c 2f73 7061 uidedFilter │ │ │ +0002f0d0: 283c 6120 6872 6566 3d22 2e2e 2f63 6f72 (Mat │ │ │ +0002f110: 3c2f 613e 266e 6273 703b 6775 6964 652c  guide, │ │ │ +0002f120: 0a20 3c61 2068 7265 663d 222e 2e2f 636f . Ma │ │ │ +0002f160: 743c 2f61 3e26 6e62 7370 3b73 7263 2c0a t src,. │ │ │ +0002f170: 203c 6120 6872 6566 3d22 2e2e 2f63 6f72 Mat │ │ │ +0002f1b0: 3c2f 613e 266e 6273 703b 6473 742c 0a20  dst,. │ │ │ +0002f1c0: 696e 7426 6e62 7370 3b72 6164 6975 732c int radius, │ │ │ +0002f1d0: 0a20 646f 7562 6c65 266e 6273 703b 6570 . double ep │ │ │ +0002f1e0: 732c 0a20 696e 7426 6e62 7370 3b64 4465 s,. int dDe │ │ │ +0002f1f0: 7074 682c 0a20 646f 7562 6c65 266e 6273 pth,. double&nbs │ │ │ +0002f200: 703b 7363 616c 6529 3c2f 7370 616e 3e3c p;scale)< │ │ │ +0002f210: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Simple │ │ │ +0002f230: 6f6e 652d 6c69 6e65 2028 4661 7374 2920 one-line (Fast) │ │ │ +0002f240: 4775 6964 6564 2046 696c 7465 7220 6361 Guided Filter ca │ │ │ +0002f250: 6c6c 2e0a 0a20 4966 2079 6f75 2068 6176 ll... If you hav │ │ │ +0002f260: 6520 6d75 6c74 6970 6c65 2069 6d61 6765 e multiple image │ │ │ +0002f270: 7320 746f 2066 696c 7465 7220 7769 7468 s to filter with │ │ │ +0002f280: 2074 6865 2073 616d 6520 6775 6964 6564 the same guided │ │ │ +0002f290: 2069 6d61 6765 2074 6865 6e20 7573 6520 image then use │ │ │ +0002f2a0: 4775 6964 6564 4669 6c74 6572 2069 6e74 GuidedFilter int │ │ │ +0002f2b0: 6572 6661 6365 2074 6f0a 2061 766f 6964 erface to. avoid │ │ │ +0002f2c0: 2065 7874 7261 2063 6f6d 7075 7461 7469 extra computati │ │ │ +0002f2d0: 6f6e 7320 6f6e 2069 6e69 7469 616c 697a ons on initializ │ │ │ +0002f2e0: 6174 696f 6e20 7374 6167 652e 3c2f 6469 ation stage..
    .
    Parame │ │ │ +0002f310: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
    .
    < │ │ │ +0002f320: 636f 6465 3e67 7569 6465 3c2f 636f 6465 code>guide - guided image │ │ │ +0002f340: 2028 6f72 2061 7272 6179 206f 6620 696d (or array of im │ │ │ +0002f350: 6167 6573 2920 7769 7468 2075 7020 746f ages) with up to │ │ │ +0002f360: 2033 2063 6861 6e6e 656c 732c 2069 6620 3 channels, if │ │ │ +0002f370: 6974 2068 6176 6520 6d6f 7265 2074 6865 it have more the │ │ │ +0002f380: 6e20 330a 2063 6861 6e6e 656c 7320 7468 n 3. channels th │ │ │ +0002f390: 656e 206f 6e6c 7920 6669 7273 7420 3320 en only first 3 │ │ │ +0002f3a0: 6368 616e 6e65 6c73 2077 696c 6c20 6265 channels will be │ │ │ +0002f3b0: 2075 7365 642e 3c2f 6464 3e0a 3c64 643e used.
    .
    │ │ │ +0002f3c0: 3c63 6f64 653e 7372 633c 2f63 6f64 653e src │ │ │ +0002f3d0: 202d 2066 696c 7465 7269 6e67 2069 6d61 - filtering ima │ │ │ +0002f3e0: 6765 2077 6974 6820 616e 7920 6e75 6d62 ge with any numb │ │ │ +0002f3f0: 6572 7320 6f66 2063 6861 6e6e 656c 732e ers of channels. │ │ │ +0002f400: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0002f410: 6473 743c 2f63 6f64 653e 202d 206f 7574 dst - out │ │ │ +0002f420: 7075 7420 696d 6167 652e 3c2f 6464 3e0a put image.
    . │ │ │ +0002f430: 3c64 643e 3c63 6f64 653e 7261 6469 7573
    radius │ │ │ +0002f440: 3c2f 636f 6465 3e20 2d20 7261 6469 7573 - radius │ │ │ +0002f450: 206f 6620 4775 6964 6564 2046 696c 7465 of Guided Filte │ │ │ +0002f460: 722e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 r.
    .
    eps - r │ │ │ +0002f480: 6567 756c 6172 697a 6174 696f 6e20 7465 egularization te │ │ │ +0002f490: 726d 206f 6620 4775 6964 6564 2046 696c rm of Guided Fil │ │ │ +0002f4a0: 7465 722e 205c 287b 6570 737d 5e32 5c29 ter. \({eps}^2\) │ │ │ +0002f4b0: 2069 7320 7369 6d69 6c61 7220 746f 2074 is similar to t │ │ │ +0002f4c0: 6865 2073 6967 6d61 2069 6e20 7468 6520 he sigma in the │ │ │ +0002f4d0: 636f 6c6f 720a 2073 7061 6365 2069 6e74 color. space int │ │ │ +0002f4e0: 6f20 6269 6c61 7465 7261 6c46 696c 7465 o bilateralFilte │ │ │ +0002f4f0: 722e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 r.
    .
    dDepth │ │ │ +0002f510: 2d20 6f70 7469 6f6e 616c 2064 6570 7468 - optional depth │ │ │ +0002f520: 206f 6620 7468 6520 6f75 7470 7574 2069 of the output i │ │ │ +0002f530: 6d61 6765 2e3c 2f64 643e 0a3c 6464 3e3c mage.
    .
    < │ │ │ +0002f540: 636f 6465 3e73 6361 6c65 3c2f 636f 6465 code>scale - subsample fa │ │ │ +0002f560: 6374 6f72 206f 6620 4661 7374 2047 7569 ctor of Fast Gui │ │ │ +0002f570: 6465 6420 4669 6c74 6572 2c20 7573 6520 ded Filter, use │ │ │ +0002f580: 6120 7363 616c 6520 6c65 7373 2074 6861 a scale less tha │ │ │ +0002f590: 6e20 3120 746f 2073 7065 6564 7320 7570 n 1 to speeds up │ │ │ +0002f5a0: 2063 6f6d 7075 7461 7469 6f6e 0a20 7769 computation. wi │ │ │ +0002f5b0: 7468 2061 6c6d 6f73 7420 6e6f 2076 6973 th almost no vis │ │ │ +0002f5c0: 6962 6c65 2064 6567 7261 6461 7469 6f6e ible degradation │ │ │ +0002f5d0: 2e20 2865 2e67 2e20 7363 616c 653d 3d30 . (e.g. scale==0 │ │ │ +0002f5e0: 2e35 2073 6872 696e 6b73 2074 6865 2069 .5 shrinks the i │ │ │ +0002f5f0: 6d61 6765 2062 7920 3278 2069 6e73 6964 mage by 2x insid │ │ │ +0002f600: 6520 7468 6520 6669 6c74 6572 290a 0a20 e the filter).. │ │ │ +0002f610: 5345 453a 2062 696c 6174 6572 616c 4669 SEE: bilateralFi │ │ │ +0002f620: 6c74 6572 2c20 6474 4669 6c74 6572 2c20 lter, dtFilter, │ │ │ +0002f630: 616d 4669 6c74 6572 3c2f 6464 3e0a 3c2f amFilter
    ..
    .< │ │ │ +0002f650: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • . │ │ │ +0002f6d0: 0a3c 6833 3e67 7569 6465 6446 696c 7465 .

    guidedFilte │ │ │ +0002f6e0: 723c 2f68 333e 0a3c 6469 7620 636c 6173 r

    .
    pub │ │ │ +0002f720: 6c69 6320 7374 6174 6963 3c2f 7370 616e lic static void&nbs │ │ │ +0002f760: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;gui │ │ │ +0002f780: 6465 6446 696c 7465 723c 2f73 7061 6e3e dedFilter │ │ │ +0002f790: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ +0002f7b0: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ +0002f7c0: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ +0002f7d0: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +0002f7e0: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat guide,. │ │ │ +0002f800: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ +0002f840: 2f61 3e26 6e62 7370 3b73 7263 2c0a 203c /a> src,. < │ │ │ +0002f850: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ +0002f860: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ +0002f870: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +0002f880: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat dst,. in │ │ │ +0002f8a0: 7426 6e62 7370 3b72 6164 6975 732c 0a20 t radius,. │ │ │ +0002f8b0: 646f 7562 6c65 266e 6273 703b 6570 732c double eps, │ │ │ +0002f8c0: 0a20 696e 7426 6e62 7370 3b64 4465 7074 . int dDept │ │ │ +0002f8d0: 6829 3c2f 7370 616e 3e3c 2f64 6976 3e0a h)
    . │ │ │ +0002f8e0: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
    Simple one-li │ │ │ +0002f900: 6e65 2028 4661 7374 2920 4775 6964 6564 ne (Fast) Guided │ │ │ +0002f910: 2046 696c 7465 7220 6361 6c6c 2e0a 0a20 Filter call... │ │ │ +0002f920: 4966 2079 6f75 2068 6176 6520 6d75 6c74 If you have mult │ │ │ +0002f930: 6970 6c65 2069 6d61 6765 7320 746f 2066 iple images to f │ │ │ +0002f940: 696c 7465 7220 7769 7468 2074 6865 2073 ilter with the s │ │ │ +0002f950: 616d 6520 6775 6964 6564 2069 6d61 6765 ame guided image │ │ │ +0002f960: 2074 6865 6e20 7573 6520 4775 6964 6564 then use Guided │ │ │ +0002f970: 4669 6c74 6572 2069 6e74 6572 6661 6365 Filter interface │ │ │ +0002f980: 2074 6f0a 2061 766f 6964 2065 7874 7261 to. avoid extra │ │ │ +0002f990: 2063 6f6d 7075 7461 7469 6f6e 7320 6f6e computations on │ │ │ +0002f9a0: 2069 6e69 7469 616c 697a 6174 696f 6e20 initialization │ │ │ +0002f9b0: 7374 6167 652e 3c2f 6469 763e 0a3c 646c stage.
    .
    . │ │ │ +0002f9d0: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
    Parameters:< │ │ │ +0002f9e0: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e67 /dt>.
    g │ │ │ +0002f9f0: 7569 6465 3c2f 636f 6465 3e20 2d20 6775 uide - gu │ │ │ +0002fa00: 6964 6564 2069 6d61 6765 2028 6f72 2061 ided image (or a │ │ │ +0002fa10: 7272 6179 206f 6620 696d 6167 6573 2920 rray of images) │ │ │ +0002fa20: 7769 7468 2075 7020 746f 2033 2063 6861 with up to 3 cha │ │ │ +0002fa30: 6e6e 656c 732c 2069 6620 6974 2068 6176 nnels, if it hav │ │ │ +0002fa40: 6520 6d6f 7265 2074 6865 6e20 330a 2063 e more then 3. c │ │ │ +0002fa50: 6861 6e6e 656c 7320 7468 656e 206f 6e6c hannels then onl │ │ │ +0002fa60: 7920 6669 7273 7420 3320 6368 616e 6e65 y first 3 channe │ │ │ +0002fa70: 6c73 2077 696c 6c20 6265 2075 7365 642e ls will be used. │ │ │ +0002fa80: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0002fa90: 7372 633c 2f63 6f64 653e 202d 2066 696c src - fil │ │ │ +0002faa0: 7465 7269 6e67 2069 6d61 6765 2077 6974 tering image wit │ │ │ +0002fab0: 6820 616e 7920 6e75 6d62 6572 7320 6f66 h any numbers of │ │ │ +0002fac0: 2063 6861 6e6e 656c 732e 3c2f 6464 3e0a channels.
    . │ │ │ +0002fad0: 3c64 643e 3c63 6f64 653e 6473 743c 2f63
    dst - output im │ │ │ +0002faf0: 6167 652e 3c2f 6464 3e0a 3c64 643e 3c63 age.
    .
    radius - radius of Gu │ │ │ +0002fb20: 6964 6564 2046 696c 7465 722e 3c2f 6464 ided Filter.
    .
    eps< │ │ │ +0002fb40: 2f63 6f64 653e 202d 2072 6567 756c 6172 /code> - regular │ │ │ +0002fb50: 697a 6174 696f 6e20 7465 726d 206f 6620 ization term of │ │ │ +0002fb60: 4775 6964 6564 2046 696c 7465 722e 205c Guided Filter. \ │ │ │ +0002fb70: 287b 6570 737d 5e32 5c29 2069 7320 7369 ({eps}^2\) is si │ │ │ +0002fb80: 6d69 6c61 7220 746f 2074 6865 2073 6967 milar to the sig │ │ │ +0002fb90: 6d61 2069 6e20 7468 6520 636f 6c6f 720a ma in the color. │ │ │ +0002fba0: 2073 7061 6365 2069 6e74 6f20 6269 6c61 space into bila │ │ │ +0002fbb0: 7465 7261 6c46 696c 7465 722e 3c2f 6464 teralFilter.
    .
    dDep │ │ │ +0002fbd0: 7468 3c2f 636f 6465 3e20 2d20 6f70 7469 th - opti │ │ │ +0002fbe0: 6f6e 616c 2064 6570 7468 206f 6620 7468 onal depth of th │ │ │ +0002fbf0: 6520 6f75 7470 7574 2069 6d61 6765 2e0a e output image.. │ │ │ +0002fc00: 0a20 7769 7468 2061 6c6d 6f73 7420 6e6f . with almost no │ │ │ +0002fc10: 2076 6973 6962 6c65 2064 6567 7261 6461 visible degrada │ │ │ +0002fc20: 7469 6f6e 2e20 2865 2e67 2e20 7363 616c tion. (e.g. scal │ │ │ +0002fc30: 653d 3d30 2e35 2073 6872 696e 6b73 2074 e==0.5 shrinks t │ │ │ +0002fc40: 6865 2069 6d61 6765 2062 7920 3278 2069 he image by 2x i │ │ │ +0002fc50: 6e73 6964 6520 7468 6520 6669 6c74 6572 nside the filter │ │ │ +0002fc60: 290a 0a20 5345 453a 2062 696c 6174 6572 ).. SEE: bilater │ │ │ +0002fc70: 616c 4669 6c74 6572 2c20 6474 4669 6c74 alFilter, dtFilt │ │ │ +0002fc80: 6572 2c20 616d 4669 6c74 6572 3c2f 6464 er, amFilter
    .
    ..
  • .
  • . │ │ │ +0002fd20: 0a3c 6833 3e67 7569 6465 6446 696c 7465 .

    guidedFilte │ │ │ +0002fd30: 723c 2f68 333e 0a3c 6469 7620 636c 6173 r

    .
    pub │ │ │ +0002fd70: 6c69 6320 7374 6174 6963 3c2f 7370 616e lic static void&nbs │ │ │ +0002fdb0: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;gui │ │ │ +0002fdd0: 6465 6446 696c 7465 723c 2f73 7061 6e3e dedFilter │ │ │ +0002fde0: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ +0002fe00: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ +0002fe10: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ +0002fe20: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +0002fe30: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat guide,. │ │ │ +0002fe50: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ +0002fe90: 2f61 3e26 6e62 7370 3b73 7263 2c0a 203c /a> src,. < │ │ │ +0002fea0: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ +0002feb0: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ +0002fec0: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +0002fed0: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat dst,. in │ │ │ +0002fef0: 7426 6e62 7370 3b72 6164 6975 732c 0a20 t radius,. │ │ │ +0002ff00: 646f 7562 6c65 266e 6273 703b 6570 7329 double eps) │ │ │ +0002ff10: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .Simple one-line │ │ │ +0002ff40: 2028 4661 7374 2920 4775 6964 6564 2046 (Fast) Guided F │ │ │ +0002ff50: 696c 7465 7220 6361 6c6c 2e0a 0a20 4966 ilter call... If │ │ │ +0002ff60: 2079 6f75 2068 6176 6520 6d75 6c74 6970 you have multip │ │ │ +0002ff70: 6c65 2069 6d61 6765 7320 746f 2066 696c le images to fil │ │ │ +0002ff80: 7465 7220 7769 7468 2074 6865 2073 616d ter with the sam │ │ │ +0002ff90: 6520 6775 6964 6564 2069 6d61 6765 2074 e guided image t │ │ │ +0002ffa0: 6865 6e20 7573 6520 4775 6964 6564 4669 hen use GuidedFi │ │ │ +0002ffb0: 6c74 6572 2069 6e74 6572 6661 6365 2074 lter interface t │ │ │ +0002ffc0: 6f0a 2061 766f 6964 2065 7874 7261 2063 o. avoid extra c │ │ │ +0002ffd0: 6f6d 7075 7461 7469 6f6e 7320 6f6e 2069 omputations on i │ │ │ +0002ffe0: 6e69 7469 616c 697a 6174 696f 6e20 7374 nitialization st │ │ │ +0002fff0: 6167 652e 3c2f 6469 763e 0a3c 646c 2063 age..
    .Parameters:.
    gui │ │ │ +00030030: 6465 3c2f 636f 6465 3e20 2d20 6775 6964 de - guid │ │ │ +00030040: 6564 2069 6d61 6765 2028 6f72 2061 7272 ed image (or arr │ │ │ +00030050: 6179 206f 6620 696d 6167 6573 2920 7769 ay of images) wi │ │ │ +00030060: 7468 2075 7020 746f 2033 2063 6861 6e6e th up to 3 chann │ │ │ +00030070: 656c 732c 2069 6620 6974 2068 6176 6520 els, if it have │ │ │ +00030080: 6d6f 7265 2074 6865 6e20 330a 2063 6861 more then 3. cha │ │ │ +00030090: 6e6e 656c 7320 7468 656e 206f 6e6c 7920 nnels then only │ │ │ +000300a0: 6669 7273 7420 3320 6368 616e 6e65 6c73 first 3 channels │ │ │ +000300b0: 2077 696c 6c20 6265 2075 7365 642e 3c2f will be used..
    sr │ │ │ +000300d0: 633c 2f63 6f64 653e 202d 2066 696c 7465 c - filte │ │ │ +000300e0: 7269 6e67 2069 6d61 6765 2077 6974 6820 ring image with │ │ │ +000300f0: 616e 7920 6e75 6d62 6572 7320 6f66 2063 any numbers of c │ │ │ +00030100: 6861 6e6e 656c 732e 3c2f 6464 3e0a 3c64 hannels.
    .dst - output imag │ │ │ +00030130: 652e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 e..
    radius │ │ │ +00030150: 2d20 7261 6469 7573 206f 6620 4775 6964 - radius of Guid │ │ │ +00030160: 6564 2046 696c 7465 722e 3c2f 6464 3e0a ed Filter.
    . │ │ │ +00030170: 3c64 643e 3c63 6f64 653e 6570 733c 2f63
    eps - regulariz │ │ │ +00030190: 6174 696f 6e20 7465 726d 206f 6620 4775 ation term of Gu │ │ │ +000301a0: 6964 6564 2046 696c 7465 722e 205c 287b ided Filter. \({ │ │ │ +000301b0: 6570 737d 5e32 5c29 2069 7320 7369 6d69 eps}^2\) is simi │ │ │ +000301c0: 6c61 7220 746f 2074 6865 2073 6967 6d61 lar to the sigma │ │ │ +000301d0: 2069 6e20 7468 6520 636f 6c6f 720a 2073 in the color. s │ │ │ +000301e0: 7061 6365 2069 6e74 6f20 6269 6c61 7465 pace into bilate │ │ │ +000301f0: 7261 6c46 696c 7465 722e 0a0a 0a20 7769 ralFilter.... wi │ │ │ +00030200: 7468 2061 6c6d 6f73 7420 6e6f 2076 6973 th almost no vis │ │ │ +00030210: 6962 6c65 2064 6567 7261 6461 7469 6f6e ible degradation │ │ │ +00030220: 2e20 2865 2e67 2e20 7363 616c 653d 3d30 . (e.g. scale==0 │ │ │ +00030230: 2e35 2073 6872 696e 6b73 2074 6865 2069 .5 shrinks the i │ │ │ +00030240: 6d61 6765 2062 7920 3278 2069 6e73 6964 mage by 2x insid │ │ │ +00030250: 6520 7468 6520 6669 6c74 6572 290a 0a20 e the filter).. │ │ │ +00030260: 5345 453a 2062 696c 6174 6572 616c 4669 SEE: bilateralFi │ │ │ +00030270: 6c74 6572 2c20 6474 4669 6c74 6572 2c20 lter, dtFilter, │ │ │ +00030280: 616d 4669 6c74 6572 3c2f 6464 3e0a 3c2f amFilter
    ...< │ │ │ +000302a0: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..createAMFilter │ │ │ +00030300: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373 .
    publ │ │ │ +00030340: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ +00030350: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ +00030370: 3c61 2068 7265 663d 2241 6461 7074 6976 Adapt │ │ │ +000303c0: 6976 654d 616e 6966 6f6c 6446 696c 7465 iveManifoldFilte │ │ │ +000303d0: 723c 2f61 3e3c 2f73 7061 6e3e 266e 6273 r&nbs │ │ │ +000303e0: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;cre │ │ │ +00030400: 6174 6541 4d46 696c 7465 723c 2f73 7061 ateAMFilter │ │ │ +00030430: 2864 6f75 626c 6526 6e62 7370 3b73 6967 (double sig │ │ │ +00030440: 6d61 5f73 2c0a 2064 6f75 626c 6526 6e62 ma_s,. double&nb │ │ │ +00030450: 7370 3b73 6967 6d61 5f72 2c0a 2062 6f6f sp;sigma_r,. boo │ │ │ +00030460: 6c65 616e 266e 6273 703b 6164 6a75 7374 lean adjust │ │ │ +00030470: 5f6f 7574 6c69 6572 7329 3c2f 7370 616e _outliers)
    .
    Facto │ │ │ +000304a0: 7279 206d 6574 686f 642c 2063 7265 6174 ry method, creat │ │ │ +000304b0: 6520 696e 7374 616e 6365 206f 6620 4164 e instance of Ad │ │ │ +000304c0: 6170 7469 7665 4d61 6e69 666f 6c64 4669 aptiveManifoldFi │ │ │ +000304d0: 6c74 6572 2061 6e64 2070 726f 6475 6365 lter and produce │ │ │ +000304e0: 2073 6f6d 6520 696e 6974 6961 6c69 7a61 some initializa │ │ │ +000304f0: 7469 6f6e 2072 6f75 7469 6e65 732e 3c2f tion routines..
    .
    Para │ │ │ +00030520: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    sigma_s - spatial │ │ │ +00030550: 7374 616e 6461 7264 2064 6576 6961 7469 standard deviati │ │ │ +00030560: 6f6e 2e3c 2f64 643e 0a3c 6464 3e3c 636f on.
    .
    sigma_r - color space │ │ │ +00030590: 7374 616e 6461 7264 2064 6576 6961 7469 standard deviati │ │ │ +000305a0: 6f6e 2c20 6974 2069 7320 7369 6d69 6c61 on, it is simila │ │ │ +000305b0: 7220 746f 2074 6865 2073 6967 6d61 2069 r to the sigma i │ │ │ +000305c0: 6e20 7468 6520 636f 6c6f 7220 7370 6163 n the color spac │ │ │ +000305d0: 6520 696e 746f 0a20 6269 6c61 7465 7261 e into. bilatera │ │ │ +000305e0: 6c46 696c 7465 722e 3c2f 6464 3e0a 3c64 lFilter.
    .adjust_o │ │ │ +00030600: 7574 6c69 6572 733c 2f63 6f64 653e 202d utliers - │ │ │ +00030610: 206f 7074 696f 6e61 6c2c 2073 7065 6369 optional, speci │ │ │ +00030620: 6679 2070 6572 666f 726d 206f 7574 6c69 fy perform outli │ │ │ +00030630: 6572 7320 6164 6a75 7374 206f 7065 7261 ers adjust opera │ │ │ +00030640: 7469 6f6e 206f 7220 6e6f 742c 2028 4571 tion or not, (Eq │ │ │ +00030650: 2e20 3929 2069 6e20 7468 650a 206f 7269 . 9) in the. ori │ │ │ +00030660: 6769 6e61 6c20 7061 7065 722e 0a0a 2046 ginal paper... F │ │ │ +00030670: 6f72 206d 6f72 6520 6465 7461 696c 7320 or more details │ │ │ +00030680: 6162 6f75 7420 4164 6170 7469 7665 204d about Adaptive M │ │ │ +00030690: 616e 6966 6f6c 6420 4669 6c74 6572 2070 anifold Filter p │ │ │ +000306a0: 6172 616d 6574 6572 732c 2073 6565 2074 arameters, see t │ │ │ +000306b0: 6865 206f 7269 6769 6e61 6c20 6172 7469 he original arti │ │ │ +000306c0: 636c 6520 4349 5445 3a20 4761 7374 616c cle CITE: Gastal │ │ │ +000306d0: 3132 202e 0a0a 203c 623e 4e6f 7465 3a3c 12 ... Note:< │ │ │ +000306e0: 2f62 3e20 4a6f 696e 7420 696d 6167 6573 /b> Joint images │ │ │ +000306f0: 2077 6974 6820 4356 5f38 5520 616e 6420 with CV_8U and │ │ │ +00030700: 4356 5f31 3655 2064 6570 7468 2063 6f6e CV_16U depth con │ │ │ +00030710: 7665 7274 6564 2074 6f20 696d 6167 6573 verted to images │ │ │ +00030720: 2077 6974 6820 4356 5f33 3246 2064 6570 with CV_32F dep │ │ │ +00030730: 7468 2061 6e64 205b 303b 2031 5d0a 2063 th and [0; 1]. c │ │ │ +00030740: 6f6c 6f72 2072 616e 6765 2062 6566 6f72 olor range befor │ │ │ +00030750: 6520 7072 6f63 6573 7369 6e67 2e20 4865 e processing. He │ │ │ +00030760: 6e63 6520 636f 6c6f 7220 7370 6163 6520 nce color space │ │ │ +00030770: 7369 676d 6120 7369 676d 615f 7220 6d75 sigma sigma_r mu │ │ │ +00030780: 7374 2062 6520 696e 205b 303b 2031 5d20 st be in [0; 1] │ │ │ +00030790: 7261 6e67 652c 2075 6e6c 696b 6520 7361 range, unlike sa │ │ │ +000307a0: 6d65 0a20 7369 676d 6173 2069 6e20 6269 me. sigmas in bi │ │ │ +000307b0: 6c61 7465 7261 6c46 696c 7465 7220 616e lateralFilter an │ │ │ +000307c0: 6420 6474 4669 6c74 6572 2066 756e 6374 d dtFilter funct │ │ │ +000307d0: 696f 6e73 2e3c 2f64 643e 0a3c 6474 3e52 ions..
    R │ │ │ +000307e0: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
    .
    automatically g │ │ │ +00030800: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ...< │ │ │ +00030820: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    create │ │ │ +00030870: 414d 4669 6c74 6572 3c2f 6833 3e0a 3c64 AMFilter

    .public stati │ │ │ +000308c0: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c AdaptiveManif │ │ │ +00030940: 6f6c 6446 696c 7465 723c 2f61 3e3c 2f73 oldFilter createAMFil │ │ │ +00030980: 7465 723c 2f73 7061 6e3e 3c77 6272 3e3c ter< │ │ │ +00030990: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ +000309a0: 6d65 7465 7273 223e 2864 6f75 626c 6526 meters">(double& │ │ │ +000309b0: 6e62 7370 3b73 6967 6d61 5f73 2c0a 2064 nbsp;sigma_s,. d │ │ │ +000309c0: 6f75 626c 6526 6e62 7370 3b73 6967 6d61 ouble sigma │ │ │ +000309d0: 5f72 293c 2f73 7061 6e3e 3c2f 6469 763e _r)
  • │ │ │ +000309e0: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
    Factory meth │ │ │ +00030a00: 6f64 2c20 6372 6561 7465 2069 6e73 7461 od, create insta │ │ │ +00030a10: 6e63 6520 6f66 2041 6461 7074 6976 654d nce of AdaptiveM │ │ │ +00030a20: 616e 6966 6f6c 6446 696c 7465 7220 616e anifoldFilter an │ │ │ +00030a30: 6420 7072 6f64 7563 6520 736f 6d65 2069 d produce some i │ │ │ +00030a40: 6e69 7469 616c 697a 6174 696f 6e20 726f nitialization ro │ │ │ +00030a50: 7574 696e 6573 2e3c 2f64 6976 3e0a 3c64 utines.
    . │ │ │ +00030a70: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ +00030a80: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +00030a90: 7369 676d 615f 733c 2f63 6f64 653e 202d sigma_s - │ │ │ +00030aa0: 2073 7061 7469 616c 2073 7461 6e64 6172 spatial standar │ │ │ +00030ab0: 6420 6465 7669 6174 696f 6e2e 3c2f 6464 d deviation.
    .
    sigm │ │ │ +00030ad0: 615f 723c 2f63 6f64 653e 202d 2063 6f6c a_r - col │ │ │ +00030ae0: 6f72 2073 7061 6365 2073 7461 6e64 6172 or space standar │ │ │ +00030af0: 6420 6465 7669 6174 696f 6e2c 2069 7420 d deviation, it │ │ │ +00030b00: 6973 2073 696d 696c 6172 2074 6f20 7468 is similar to th │ │ │ +00030b10: 6520 7369 676d 6120 696e 2074 6865 2063 e sigma in the c │ │ │ +00030b20: 6f6c 6f72 2073 7061 6365 2069 6e74 6f0a olor space into. │ │ │ +00030b30: 2062 696c 6174 6572 616c 4669 6c74 6572 bilateralFilter │ │ │ +00030b40: 2e0a 0a20 6f72 6967 696e 616c 2070 6170 ... original pap │ │ │ +00030b50: 6572 2e0a 0a20 466f 7220 6d6f 7265 2064 er... For more d │ │ │ +00030b60: 6574 6169 6c73 2061 626f 7574 2041 6461 etails about Ada │ │ │ +00030b70: 7074 6976 6520 4d61 6e69 666f 6c64 2046 ptive Manifold F │ │ │ +00030b80: 696c 7465 7220 7061 7261 6d65 7465 7273 ilter parameters │ │ │ +00030b90: 2c20 7365 6520 7468 6520 6f72 6967 696e , see the origin │ │ │ +00030ba0: 616c 2061 7274 6963 6c65 2043 4954 453a al article CITE: │ │ │ +00030bb0: 2047 6173 7461 6c31 3220 2e0a 0a20 3c62 Gastal12 ... Note: Joint │ │ │ +00030bd0: 2069 6d61 6765 7320 7769 7468 2043 565f images with CV_ │ │ │ +00030be0: 3855 2061 6e64 2043 565f 3136 5520 6465 8U and CV_16U de │ │ │ +00030bf0: 7074 6820 636f 6e76 6572 7465 6420 746f pth converted to │ │ │ +00030c00: 2069 6d61 6765 7320 7769 7468 2043 565f images with CV_ │ │ │ +00030c10: 3332 4620 6465 7074 6820 616e 6420 5b30 32F depth and [0 │ │ │ +00030c20: 3b20 315d 0a20 636f 6c6f 7220 7261 6e67 ; 1]. color rang │ │ │ +00030c30: 6520 6265 666f 7265 2070 726f 6365 7373 e before process │ │ │ +00030c40: 696e 672e 2048 656e 6365 2063 6f6c 6f72 ing. Hence color │ │ │ +00030c50: 2073 7061 6365 2073 6967 6d61 2073 6967 space sigma sig │ │ │ +00030c60: 6d61 5f72 206d 7573 7420 6265 2069 6e20 ma_r must be in │ │ │ +00030c70: 5b30 3b20 315d 2072 616e 6765 2c20 756e [0; 1] range, un │ │ │ +00030c80: 6c69 6b65 2073 616d 650a 2073 6967 6d61 like same. sigma │ │ │ +00030c90: 7320 696e 2062 696c 6174 6572 616c 4669 s in bilateralFi │ │ │ +00030ca0: 6c74 6572 2061 6e64 2064 7446 696c 7465 lter and dtFilte │ │ │ +00030cb0: 7220 6675 6e63 7469 6f6e 732e 3c2f 6464 r functions.
    .
    Returns:.
    automati │ │ │ +00030ce0: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +00030cf0: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.
  • ..
  • .
  • │ │ │ +00030d10: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    .

    a │ │ │ +00030d90: 6d46 696c 7465 723c 2f68 333e 0a3c 6469 mFilter

    .public static │ │ │ +00030de0: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  void amFilter │ │ │ +00030e60: 283c 6120 6872 6566 3d22 2e2e 2f63 6f72 (Mat │ │ │ +00030ea0: 3c2f 613e 266e 6273 703b 6a6f 696e 742c  joint, │ │ │ +00030eb0: 0a20 3c61 2068 7265 663d 222e 2e2f 636f . Ma │ │ │ +00030ef0: 743c 2f61 3e26 6e62 7370 3b73 7263 2c0a t src,. │ │ │ +00030f00: 203c 6120 6872 6566 3d22 2e2e 2f63 6f72 Mat │ │ │ +00030f40: 3c2f 613e 266e 6273 703b 6473 742c 0a20  dst,. │ │ │ +00030f50: 646f 7562 6c65 266e 6273 703b 7369 676d double sigm │ │ │ +00030f60: 615f 732c 0a20 646f 7562 6c65 266e 6273 a_s,. double&nbs │ │ │ +00030f70: 703b 7369 676d 615f 722c 0a20 626f 6f6c p;sigma_r,. bool │ │ │ +00030f80: 6561 6e26 6e62 7370 3b61 646a 7573 745f ean adjust_ │ │ │ +00030f90: 6f75 746c 6965 7273 293c 2f73 7061 6e3e outliers) │ │ │ +00030fa0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173 .
    Simple │ │ │ +00030fc0: 206f 6e65 2d6c 696e 6520 4164 6170 7469 one-line Adapti │ │ │ +00030fd0: 7665 204d 616e 6966 6f6c 6420 4669 6c74 ve Manifold Filt │ │ │ +00030fe0: 6572 2063 616c 6c2e 3c2f 6469 763e 0a3c er call.
    .< │ │ │ +00030ff0: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ +00031000: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
    Parameters │ │ │ +00031010: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
    .
    joint - │ │ │ +00031030: 6a6f 696e 7420 2861 6c73 6f20 6361 6c6c joint (also call │ │ │ +00031040: 6564 2061 7320 6775 6964 6564 2920 696d ed as guided) im │ │ │ +00031050: 6167 6520 6f72 2061 7272 6179 206f 6620 age or array of │ │ │ +00031060: 696d 6167 6573 2077 6974 6820 616e 7920 images with any │ │ │ +00031070: 6e75 6d62 6572 7320 6f66 2063 6861 6e6e numbers of chann │ │ │ +00031080: 656c 732e 3c2f 6464 3e0a 3c64 643e 3c63 els.
    .
    src - │ │ │ +000310a0: 2066 696c 7465 7269 6e67 2069 6d61 6765 filtering image │ │ │ +000310b0: 2077 6974 6820 616e 7920 6e75 6d62 6572 with any number │ │ │ +000310c0: 7320 6f66 2063 6861 6e6e 656c 732e 3c2f s of channels..
    ds │ │ │ +000310e0: 743c 2f63 6f64 653e 202d 206f 7574 7075 t - outpu │ │ │ +000310f0: 7420 696d 6167 652e 3c2f 6464 3e0a 3c64 t image.
    .sigma_s< │ │ │ +00031110: 2f63 6f64 653e 202d 2073 7061 7469 616c /code> - spatial │ │ │ +00031120: 2073 7461 6e64 6172 6420 6465 7669 6174 standard deviat │ │ │ +00031130: 696f 6e2e 3c2f 6464 3e0a 3c64 643e 3c63 ion..
    sigma_r - color space │ │ │ +00031160: 2073 7461 6e64 6172 6420 6465 7669 6174 standard deviat │ │ │ +00031170: 696f 6e2c 2069 7420 6973 2073 696d 696c ion, it is simil │ │ │ +00031180: 6172 2074 6f20 7468 6520 7369 676d 6120 ar to the sigma │ │ │ +00031190: 696e 2074 6865 2063 6f6c 6f72 2073 7061 in the color spa │ │ │ +000311a0: 6365 2069 6e74 6f0a 2062 696c 6174 6572 ce into. bilater │ │ │ +000311b0: 616c 4669 6c74 6572 2e3c 2f64 643e 0a3c alFilter.
    .< │ │ │ +000311c0: 6464 3e3c 636f 6465 3e61 646a 7573 745f dd>adjust_ │ │ │ +000311d0: 6f75 746c 6965 7273 3c2f 636f 6465 3e20 outliers │ │ │ +000311e0: 2d20 6f70 7469 6f6e 616c 2c20 7370 6563 - optional, spec │ │ │ +000311f0: 6966 7920 7065 7266 6f72 6d20 6f75 746c ify perform outl │ │ │ +00031200: 6965 7273 2061 646a 7573 7420 6f70 6572 iers adjust oper │ │ │ +00031210: 6174 696f 6e20 6f72 206e 6f74 2c20 2845 ation or not, (E │ │ │ +00031220: 712e 2039 2920 696e 2074 6865 0a20 6f72 q. 9) in the. or │ │ │ +00031230: 6967 696e 616c 2070 6170 6572 2e0a 0a20 iginal paper... │ │ │ +00031240: 3c62 3e4e 6f74 653a 3c2f 623e 204a 6f69 Note: Joi │ │ │ +00031250: 6e74 2069 6d61 6765 7320 7769 7468 2043 nt images with C │ │ │ +00031260: 565f 3855 2061 6e64 2043 565f 3136 5520 V_8U and CV_16U │ │ │ +00031270: 6465 7074 6820 636f 6e76 6572 7465 6420 depth converted │ │ │ +00031280: 746f 2069 6d61 6765 7320 7769 7468 2043 to images with C │ │ │ +00031290: 565f 3332 4620 6465 7074 6820 616e 6420 V_32F depth and │ │ │ +000312a0: 5b30 3b20 315d 0a20 636f 6c6f 7220 7261 [0; 1]. color ra │ │ │ +000312b0: 6e67 6520 6265 666f 7265 2070 726f 6365 nge before proce │ │ │ +000312c0: 7373 696e 672e 2048 656e 6365 2063 6f6c ssing. Hence col │ │ │ +000312d0: 6f72 2073 7061 6365 2073 6967 6d61 2073 or space sigma s │ │ │ +000312e0: 6967 6d61 5f72 206d 7573 7420 6265 2069 igma_r must be i │ │ │ +000312f0: 6e20 5b30 3b20 315d 2072 616e 6765 2c20 n [0; 1] range, │ │ │ +00031300: 756e 6c69 6b65 2073 616d 650a 2073 6967 unlike same. sig │ │ │ +00031310: 6d61 7320 696e 2062 696c 6174 6572 616c mas in bilateral │ │ │ +00031320: 4669 6c74 6572 2061 6e64 2064 7446 696c Filter and dtFil │ │ │ +00031330: 7465 7220 6675 6e63 7469 6f6e 732e 2053 ter functions. S │ │ │ +00031340: 4545 3a20 6269 6c61 7465 7261 6c46 696c EE: bilateralFil │ │ │ +00031350: 7465 722c 2064 7446 696c 7465 722c 2067 ter, dtFilter, g │ │ │ +00031360: 7569 6465 6446 696c 7465 723c 2f64 643e uidedFilter │ │ │ +00031370: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e ..
    .
  • .
  • ..< │ │ │ +00031400: 6833 3e61 6d46 696c 7465 723c 2f68 333e h3>amFilter │ │ │ +00031410: 0a3c 6469 7620 636c 6173 733d 226d 656d .
    < │ │ │ +00031430: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ +00031440: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ +00031450: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ +00031460: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;void< │ │ │ +00031480: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> amFilter< │ │ │ +000314b0: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(Mat jo │ │ │ +00031520: 696e 742c 0a20 3c61 2068 7265 663d 222e int,. Mat s │ │ │ +00031570: 7263 2c0a 203c 6120 6872 6566 3d22 2e2e rc,. Mat ds │ │ │ +000315c0: 742c 0a20 646f 7562 6c65 266e 6273 703b t,. double  │ │ │ +000315d0: 7369 676d 615f 732c 0a20 646f 7562 6c65 sigma_s,. double │ │ │ +000315e0: 266e 6273 703b 7369 676d 615f 7229 3c2f  sigma_r)
    .
    S │ │ │ +00031610: 696d 706c 6520 6f6e 652d 6c69 6e65 2041 imple one-line A │ │ │ +00031620: 6461 7074 6976 6520 4d61 6e69 666f 6c64 daptive Manifold │ │ │ +00031630: 2046 696c 7465 7220 6361 6c6c 2e3c 2f64 Filter call..
    .
    Param │ │ │ +00031660: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ +00031670: 3c63 6f64 653e 6a6f 696e 743c 2f63 6f64 joint - joint (also │ │ │ +00031690: 2063 616c 6c65 6420 6173 2067 7569 6465 called as guide │ │ │ +000316a0: 6429 2069 6d61 6765 206f 7220 6172 7261 d) image or arra │ │ │ +000316b0: 7920 6f66 2069 6d61 6765 7320 7769 7468 y of images with │ │ │ +000316c0: 2061 6e79 206e 756d 6265 7273 206f 6620 any numbers of │ │ │ +000316d0: 6368 616e 6e65 6c73 2e3c 2f64 643e 0a3c channels.
    .< │ │ │ +000316e0: 6464 3e3c 636f 6465 3e73 7263 3c2f 636f dd>src - filtering │ │ │ +00031700: 696d 6167 6520 7769 7468 2061 6e79 206e image with any n │ │ │ +00031710: 756d 6265 7273 206f 6620 6368 616e 6e65 umbers of channe │ │ │ +00031720: 6c73 2e3c 2f64 643e 0a3c 6464 3e3c 636f ls..
    dst - │ │ │ +00031740: 6f75 7470 7574 2069 6d61 6765 2e3c 2f64 output image..
    sig │ │ │ +00031760: 6d61 5f73 3c2f 636f 6465 3e20 2d20 7370 ma_s - sp │ │ │ +00031770: 6174 6961 6c20 7374 616e 6461 7264 2064 atial standard d │ │ │ +00031780: 6576 6961 7469 6f6e 2e3c 2f64 643e 0a3c eviation.
    .< │ │ │ +00031790: 6464 3e3c 636f 6465 3e73 6967 6d61 5f72 dd>sigma_r │ │ │ +000317a0: 3c2f 636f 6465 3e20 2d20 636f 6c6f 7220 - color │ │ │ +000317b0: 7370 6163 6520 7374 616e 6461 7264 2064 space standard d │ │ │ +000317c0: 6576 6961 7469 6f6e 2c20 6974 2069 7320 eviation, it is │ │ │ +000317d0: 7369 6d69 6c61 7220 746f 2074 6865 2073 similar to the s │ │ │ +000317e0: 6967 6d61 2069 6e20 7468 6520 636f 6c6f igma in the colo │ │ │ +000317f0: 7220 7370 6163 6520 696e 746f 0a20 6269 r space into. bi │ │ │ +00031800: 6c61 7465 7261 6c46 696c 7465 722e 0a0a lateralFilter... │ │ │ +00031810: 206f 7269 6769 6e61 6c20 7061 7065 722e original paper. │ │ │ +00031820: 0a0a 203c 623e 4e6f 7465 3a3c 2f62 3e20 .. Note: │ │ │ +00031830: 4a6f 696e 7420 696d 6167 6573 2077 6974 Joint images wit │ │ │ +00031840: 6820 4356 5f38 5520 616e 6420 4356 5f31 h CV_8U and CV_1 │ │ │ +00031850: 3655 2064 6570 7468 2063 6f6e 7665 7274 6U depth convert │ │ │ +00031860: 6564 2074 6f20 696d 6167 6573 2077 6974 ed to images wit │ │ │ +00031870: 6820 4356 5f33 3246 2064 6570 7468 2061 h CV_32F depth a │ │ │ +00031880: 6e64 205b 303b 2031 5d0a 2063 6f6c 6f72 nd [0; 1]. color │ │ │ +00031890: 2072 616e 6765 2062 6566 6f72 6520 7072 range before pr │ │ │ +000318a0: 6f63 6573 7369 6e67 2e20 4865 6e63 6520 ocessing. Hence │ │ │ +000318b0: 636f 6c6f 7220 7370 6163 6520 7369 676d color space sigm │ │ │ +000318c0: 6120 7369 676d 615f 7220 6d75 7374 2062 a sigma_r must b │ │ │ +000318d0: 6520 696e 205b 303b 2031 5d20 7261 6e67 e in [0; 1] rang │ │ │ +000318e0: 652c 2075 6e6c 696b 6520 7361 6d65 0a20 e, unlike same. │ │ │ +000318f0: 7369 676d 6173 2069 6e20 6269 6c61 7465 sigmas in bilate │ │ │ +00031900: 7261 6c46 696c 7465 7220 616e 6420 6474 ralFilter and dt │ │ │ +00031910: 4669 6c74 6572 2066 756e 6374 696f 6e73 Filter functions │ │ │ +00031920: 2e20 5345 453a 2062 696c 6174 6572 616c . SEE: bilateral │ │ │ +00031930: 4669 6c74 6572 2c20 6474 4669 6c74 6572 Filter, dtFilter │ │ │ +00031940: 2c20 6775 6964 6564 4669 6c74 6572 3c2f , guidedFilter.
    ..
  • .
  • . │ │ │ +00031970: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    jointB │ │ │ +00031a00: 696c 6174 6572 616c 4669 6c74 6572 3c2f ilateralFilter.
    public │ │ │ +00031a50: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ +00031a60: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;vo │ │ │ +00031a80: 6964 3c2f 7370 616e 3e26 6e62 7370 3b3c id < │ │ │ +00031a90: 7370 616e 2063 6c61 7373 3d22 656c 656d span class="elem │ │ │ +00031aa0: 656e 742d 6e61 6d65 223e 6a6f 696e 7442 ent-name">jointB │ │ │ +00031ab0: 696c 6174 6572 616c 4669 6c74 6572 3c2f ilateralFilter( │ │ │ +00031b20: 4d61 743c 2f61 3e26 6e62 7370 3b6a 6f69 Mat joi │ │ │ +00031b30: 6e74 2c0a 203c 6120 6872 6566 3d22 2e2e nt,. Mat sr │ │ │ +00031b80: 632c 0a20 3c61 2068 7265 663d 222e 2e2f c,. │ │ │ +00031bc0: 4d61 743c 2f61 3e26 6e62 7370 3b64 7374 Mat dst │ │ │ +00031bd0: 2c0a 2069 6e74 266e 6273 703b 642c 0a20 ,. int d,. │ │ │ +00031be0: 646f 7562 6c65 266e 6273 703b 7369 676d double sigm │ │ │ +00031bf0: 6143 6f6c 6f72 2c0a 2064 6f75 626c 6526 aColor,. double& │ │ │ +00031c00: 6e62 7370 3b73 6967 6d61 5370 6163 652c nbsp;sigmaSpace, │ │ │ +00031c10: 0a20 696e 7426 6e62 7370 3b62 6f72 6465 . int borde │ │ │ +00031c20: 7254 7970 6529 3c2f 7370 616e 3e3c 2f64 rType).
    Applies t │ │ │ +00031c50: 6865 206a 6f69 6e74 2062 696c 6174 6572 he joint bilater │ │ │ +00031c60: 616c 2066 696c 7465 7220 746f 2061 6e20 al filter to an │ │ │ +00031c70: 696d 6167 652e 3c2f 6469 763e 0a3c 646c image.
    .
    . │ │ │ +00031c90: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
    Parameters:< │ │ │ +00031ca0: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e6a /dt>.
    j │ │ │ +00031cb0: 6f69 6e74 3c2f 636f 6465 3e20 2d20 4a6f oint - Jo │ │ │ +00031cc0: 696e 7420 382d 6269 7420 6f72 2066 6c6f int 8-bit or flo │ │ │ +00031cd0: 6174 696e 672d 706f 696e 742c 2031 2d63 ating-point, 1-c │ │ │ +00031ce0: 6861 6e6e 656c 206f 7220 332d 6368 616e hannel or 3-chan │ │ │ +00031cf0: 6e65 6c20 696d 6167 652e 3c2f 6464 3e0a nel image.
    . │ │ │ +00031d00: 3c64 643e 3c63 6f64 653e 7372 633c 2f63
    src - Source 8- │ │ │ +00031d20: 6269 7420 6f72 2066 6c6f 6174 696e 672d bit or floating- │ │ │ +00031d30: 706f 696e 742c 2031 2d63 6861 6e6e 656c point, 1-channel │ │ │ +00031d40: 206f 7220 332d 6368 616e 6e65 6c20 696d or 3-channel im │ │ │ +00031d50: 6167 6520 7769 7468 2074 6865 2073 616d age with the sam │ │ │ +00031d60: 6520 6465 7074 6820 6173 206a 6f69 6e74 e depth as joint │ │ │ +00031d70: 0a20 696d 6167 652e 3c2f 6464 3e0a 3c64 . image.
    .dst - Destination │ │ │ +00031da0: 2069 6d61 6765 206f 6620 7468 6520 7361 image of the sa │ │ │ +00031db0: 6d65 2073 697a 6520 616e 6420 7479 7065 me size and type │ │ │ +00031dc0: 2061 7320 7372 6320 2e3c 2f64 643e 0a3c as src ..< │ │ │ +00031dd0: 6464 3e3c 636f 6465 3e64 3c2f 636f 6465 dd>d - Diameter of │ │ │ +00031df0: 6561 6368 2070 6978 656c 206e 6569 6768 each pixel neigh │ │ │ +00031e00: 626f 7268 6f6f 6420 7468 6174 2069 7320 borhood that is │ │ │ +00031e10: 7573 6564 2064 7572 696e 6720 6669 6c74 used during filt │ │ │ +00031e20: 6572 696e 672e 2049 6620 6974 2069 7320 ering. If it is │ │ │ +00031e30: 6e6f 6e2d 706f 7369 7469 7665 2c0a 2069 non-positive,. i │ │ │ +00031e40: 7420 6973 2063 6f6d 7075 7465 6420 6672 t is computed fr │ │ │ +00031e50: 6f6d 2073 6967 6d61 5370 6163 6520 2e3c om sigmaSpace .< │ │ │ +00031e60: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e73 /dd>.
    s │ │ │ +00031e70: 6967 6d61 436f 6c6f 723c 2f63 6f64 653e igmaColor │ │ │ +00031e80: 202d 2046 696c 7465 7220 7369 676d 6120 - Filter sigma │ │ │ +00031e90: 696e 2074 6865 2063 6f6c 6f72 2073 7061 in the color spa │ │ │ +00031ea0: 6365 2e20 4120 6c61 7267 6572 2076 616c ce. A larger val │ │ │ +00031eb0: 7565 206f 6620 7468 6520 7061 7261 6d65 ue of the parame │ │ │ +00031ec0: 7465 7220 6d65 616e 7320 7468 6174 0a20 ter means that. │ │ │ +00031ed0: 6661 7274 6865 7220 636f 6c6f 7273 2077 farther colors w │ │ │ +00031ee0: 6974 6869 6e20 7468 6520 7069 7865 6c20 ithin the pixel │ │ │ +00031ef0: 6e65 6967 6862 6f72 686f 6f64 2028 7365 neighborhood (se │ │ │ +00031f00: 6520 7369 676d 6153 7061 6365 2029 2077 e sigmaSpace ) w │ │ │ +00031f10: 696c 6c20 6265 206d 6978 6564 2074 6f67 ill be mixed tog │ │ │ +00031f20: 6574 6865 722c 2072 6573 756c 7469 6e67 ether, resulting │ │ │ +00031f30: 2069 6e0a 206c 6172 6765 7220 6172 6561 in. larger area │ │ │ +00031f40: 7320 6f66 2073 656d 692d 6571 7561 6c20 s of semi-equal │ │ │ +00031f50: 636f 6c6f 722e 3c2f 6464 3e0a 3c64 643e color.
    .
    │ │ │ +00031f60: 3c63 6f64 653e 7369 676d 6153 7061 6365 sigmaSpace │ │ │ +00031f70: 3c2f 636f 6465 3e20 2d20 4669 6c74 6572 - Filter │ │ │ +00031f80: 2073 6967 6d61 2069 6e20 7468 6520 636f sigma in the co │ │ │ +00031f90: 6f72 6469 6e61 7465 2073 7061 6365 2e20 ordinate space. │ │ │ +00031fa0: 4120 6c61 7267 6572 2076 616c 7565 206f A larger value o │ │ │ +00031fb0: 6620 7468 6520 7061 7261 6d65 7465 7220 f the parameter │ │ │ +00031fc0: 6d65 616e 7320 7468 6174 0a20 6661 7274 means that. fart │ │ │ +00031fd0: 6865 7220 7069 7865 6c73 2077 696c 6c20 her pixels will │ │ │ +00031fe0: 696e 666c 7565 6e63 6520 6561 6368 206f influence each o │ │ │ +00031ff0: 7468 6572 2061 7320 6c6f 6e67 2061 7320 ther as long as │ │ │ +00032000: 7468 6569 7220 636f 6c6f 7273 2061 7265 their colors are │ │ │ +00032010: 2063 6c6f 7365 2065 6e6f 7567 6820 2873 close enough (s │ │ │ +00032020: 6565 2073 6967 6d61 436f 6c6f 7220 292e ee sigmaColor ). │ │ │ +00032030: 0a20 5768 656e 2064 2667 743b 3020 2c20 . When d>0 , │ │ │ +00032040: 6974 2073 7065 6369 6669 6573 2074 6865 it specifies the │ │ │ +00032050: 206e 6569 6768 626f 7268 6f6f 6420 7369 neighborhood si │ │ │ +00032060: 7a65 2072 6567 6172 646c 6573 7320 6f66 ze regardless of │ │ │ +00032070: 2073 6967 6d61 5370 6163 6520 2e20 4f74 sigmaSpace . Ot │ │ │ +00032080: 6865 7277 6973 652c 2064 2069 730a 2070 herwise, d is. p │ │ │ +00032090: 726f 706f 7274 696f 6e61 6c20 746f 2073 roportional to s │ │ │ +000320a0: 6967 6d61 5370 6163 6520 2e3c 2f64 643e igmaSpace .
    │ │ │ +000320b0: 0a3c 6464 3e3c 636f 6465 3e62 6f72 6465 .
    borde │ │ │ +000320c0: 7254 7970 653c 2f63 6f64 653e 202d 203c rType - < │ │ │ +000320d0: 623e 4e6f 7465 3a3c 2f62 3e20 6269 6c61 b>Note: bila │ │ │ +000320e0: 7465 7261 6c46 696c 7465 7220 616e 6420 teralFilter and │ │ │ +000320f0: 6a6f 696e 7442 696c 6174 6572 616c 4669 jointBilateralFi │ │ │ +00032100: 6c74 6572 2075 7365 204c 3120 6e6f 726d lter use L1 norm │ │ │ +00032110: 2074 6f20 636f 6d70 7574 6520 6469 6666 to compute diff │ │ │ +00032120: 6572 656e 6365 2062 6574 7765 656e 2063 erence between c │ │ │ +00032130: 6f6c 6f72 732e 0a0a 2053 4545 3a20 6269 olors... SEE: bi │ │ │ +00032140: 6c61 7465 7261 6c46 696c 7465 722c 2061 lateralFilter, a │ │ │ +00032150: 6d46 696c 7465 723c 2f64 643e 0a3c 2f64 mFilter
    ..

    ..
  • ..

    j │ │ │ +00032200: 6f69 6e74 4269 6c61 7465 7261 6c46 696c ointBilateralFil │ │ │ +00032210: 7465 723c 2f68 333e 0a3c 6469 7620 636c ter

    .
    p │ │ │ +00032250: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static void&n │ │ │ +00032290: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;j │ │ │ +000322b0: 6f69 6e74 4269 6c61 7465 7261 6c46 696c ointBilateralFil │ │ │ +000322c0: 7465 723c 2f73 7061 6e3e 3c77 6272 3e3c ter< │ │ │ +000322d0: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ +000322e0: 6d65 7465 7273 223e 283c 6120 6872 6566 meters">(Mat&nbs │ │ │ +00032330: 703b 6a6f 696e 742c 0a20 3c61 2068 7265 p;joint,. Mat&nb │ │ │ +00032380: 7370 3b73 7263 2c0a 203c 6120 6872 6566 sp;src,. Mat&nbs │ │ │ +000323d0: 703b 6473 742c 0a20 696e 7426 6e62 7370 p;dst,. int  │ │ │ +000323e0: 3b64 2c0a 2064 6f75 626c 6526 6e62 7370 ;d,. double  │ │ │ +000323f0: 3b73 6967 6d61 436f 6c6f 722c 0a20 646f ;sigmaColor,. do │ │ │ +00032400: 7562 6c65 266e 6273 703b 7369 676d 6153 uble sigmaS │ │ │ +00032410: 7061 6365 293c 2f73 7061 6e3e 3c2f 6469 pace).
    Applies th │ │ │ +00032440: 6520 6a6f 696e 7420 6269 6c61 7465 7261 e joint bilatera │ │ │ +00032450: 6c20 6669 6c74 6572 2074 6f20 616e 2069 l filter to an i │ │ │ +00032460: 6d61 6765 2e3c 2f64 6976 3e0a 3c64 6c20 mage.
    .
    .< │ │ │ +00032480: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
    jo │ │ │ +000324a0: 696e 743c 2f63 6f64 653e 202d 204a 6f69 int - Joi │ │ │ +000324b0: 6e74 2038 2d62 6974 206f 7220 666c 6f61 nt 8-bit or floa │ │ │ +000324c0: 7469 6e67 2d70 6f69 6e74 2c20 312d 6368 ting-point, 1-ch │ │ │ +000324d0: 616e 6e65 6c20 6f72 2033 2d63 6861 6e6e annel or 3-chann │ │ │ +000324e0: 656c 2069 6d61 6765 2e3c 2f64 643e 0a3c el image.
    .< │ │ │ +000324f0: 6464 3e3c 636f 6465 3e73 7263 3c2f 636f dd>src - Source 8-b │ │ │ +00032510: 6974 206f 7220 666c 6f61 7469 6e67 2d70 it or floating-p │ │ │ +00032520: 6f69 6e74 2c20 312d 6368 616e 6e65 6c20 oint, 1-channel │ │ │ +00032530: 6f72 2033 2d63 6861 6e6e 656c 2069 6d61 or 3-channel ima │ │ │ +00032540: 6765 2077 6974 6820 7468 6520 7361 6d65 ge with the same │ │ │ +00032550: 2064 6570 7468 2061 7320 6a6f 696e 740a depth as joint. │ │ │ +00032560: 2069 6d61 6765 2e3c 2f64 643e 0a3c 6464 image..
    dst - Destination │ │ │ +00032590: 696d 6167 6520 6f66 2074 6865 2073 616d image of the sam │ │ │ +000325a0: 6520 7369 7a65 2061 6e64 2074 7970 6520 e size and type │ │ │ +000325b0: 6173 2073 7263 202e 3c2f 6464 3e0a 3c64 as src .
    .d │ │ │ +000325d0: 202d 2044 6961 6d65 7465 7220 6f66 2065 - Diameter of e │ │ │ +000325e0: 6163 6820 7069 7865 6c20 6e65 6967 6862 ach pixel neighb │ │ │ +000325f0: 6f72 686f 6f64 2074 6861 7420 6973 2075 orhood that is u │ │ │ +00032600: 7365 6420 6475 7269 6e67 2066 696c 7465 sed during filte │ │ │ +00032610: 7269 6e67 2e20 4966 2069 7420 6973 206e ring. If it is n │ │ │ +00032620: 6f6e 2d70 6f73 6974 6976 652c 0a20 6974 on-positive,. it │ │ │ +00032630: 2069 7320 636f 6d70 7574 6564 2066 726f is computed fro │ │ │ +00032640: 6d20 7369 676d 6153 7061 6365 202e 3c2f m sigmaSpace ..
    si │ │ │ +00032660: 676d 6143 6f6c 6f72 3c2f 636f 6465 3e20 gmaColor │ │ │ +00032670: 2d20 4669 6c74 6572 2073 6967 6d61 2069 - Filter sigma i │ │ │ +00032680: 6e20 7468 6520 636f 6c6f 7220 7370 6163 n the color spac │ │ │ +00032690: 652e 2041 206c 6172 6765 7220 7661 6c75 e. A larger valu │ │ │ +000326a0: 6520 6f66 2074 6865 2070 6172 616d 6574 e of the paramet │ │ │ +000326b0: 6572 206d 6561 6e73 2074 6861 740a 2066 er means that. f │ │ │ +000326c0: 6172 7468 6572 2063 6f6c 6f72 7320 7769 arther colors wi │ │ │ +000326d0: 7468 696e 2074 6865 2070 6978 656c 206e thin the pixel n │ │ │ +000326e0: 6569 6768 626f 7268 6f6f 6420 2873 6565 eighborhood (see │ │ │ +000326f0: 2073 6967 6d61 5370 6163 6520 2920 7769 sigmaSpace ) wi │ │ │ +00032700: 6c6c 2062 6520 6d69 7865 6420 746f 6765 ll be mixed toge │ │ │ +00032710: 7468 6572 2c20 7265 7375 6c74 696e 6720 ther, resulting │ │ │ +00032720: 696e 0a20 6c61 7267 6572 2061 7265 6173 in. larger areas │ │ │ +00032730: 206f 6620 7365 6d69 2d65 7175 616c 2063 of semi-equal c │ │ │ +00032740: 6f6c 6f72 2e3c 2f64 643e 0a3c 6464 3e3c olor.
    .
    < │ │ │ +00032750: 636f 6465 3e73 6967 6d61 5370 6163 653c code>sigmaSpace< │ │ │ +00032760: 2f63 6f64 653e 202d 2046 696c 7465 7220 /code> - Filter │ │ │ +00032770: 7369 676d 6120 696e 2074 6865 2063 6f6f sigma in the coo │ │ │ +00032780: 7264 696e 6174 6520 7370 6163 652e 2041 rdinate space. A │ │ │ +00032790: 206c 6172 6765 7220 7661 6c75 6520 6f66 larger value of │ │ │ +000327a0: 2074 6865 2070 6172 616d 6574 6572 206d the parameter m │ │ │ +000327b0: 6561 6e73 2074 6861 740a 2066 6172 7468 eans that. farth │ │ │ +000327c0: 6572 2070 6978 656c 7320 7769 6c6c 2069 er pixels will i │ │ │ +000327d0: 6e66 6c75 656e 6365 2065 6163 6820 6f74 nfluence each ot │ │ │ +000327e0: 6865 7220 6173 206c 6f6e 6720 6173 2074 her as long as t │ │ │ +000327f0: 6865 6972 2063 6f6c 6f72 7320 6172 6520 heir colors are │ │ │ +00032800: 636c 6f73 6520 656e 6f75 6768 2028 7365 close enough (se │ │ │ +00032810: 6520 7369 676d 6143 6f6c 6f72 2029 2e0a e sigmaColor ).. │ │ │ +00032820: 2057 6865 6e20 6426 6774 3b30 202c 2069 When d>0 , i │ │ │ +00032830: 7420 7370 6563 6966 6965 7320 7468 6520 t specifies the │ │ │ +00032840: 6e65 6967 6862 6f72 686f 6f64 2073 697a neighborhood siz │ │ │ +00032850: 6520 7265 6761 7264 6c65 7373 206f 6620 e regardless of │ │ │ +00032860: 7369 676d 6153 7061 6365 202e 204f 7468 sigmaSpace . Oth │ │ │ +00032870: 6572 7769 7365 2c20 6420 6973 0a20 7072 erwise, d is. pr │ │ │ +00032880: 6f70 6f72 7469 6f6e 616c 2074 6f20 7369 oportional to si │ │ │ +00032890: 676d 6153 7061 6365 202e 0a0a 0a20 3c62 gmaSpace .... Note: bilat │ │ │ +000328b0: 6572 616c 4669 6c74 6572 2061 6e64 206a eralFilter and j │ │ │ +000328c0: 6f69 6e74 4269 6c61 7465 7261 6c46 696c ointBilateralFil │ │ │ +000328d0: 7465 7220 7573 6520 4c31 206e 6f72 6d20 ter use L1 norm │ │ │ +000328e0: 746f 2063 6f6d 7075 7465 2064 6966 6665 to compute diffe │ │ │ +000328f0: 7265 6e63 6520 6265 7477 6565 6e20 636f rence between co │ │ │ +00032900: 6c6f 7273 2e0a 0a20 5345 453a 2062 696c lors... SEE: bil │ │ │ +00032910: 6174 6572 616c 4669 6c74 6572 2c20 616d ateralFilter, am │ │ │ +00032920: 4669 6c74 6572 3c2f 6464 3e0a 3c2f 646c Filter
    .
    ...
  • .
    .

    │ │ │ +000329c0: 6269 6c61 7465 7261 6c54 6578 7475 7265 bilateralTexture │ │ │ +000329d0: 4669 6c74 6572 3c2f 6833 3e0a 3c64 6976 Filter

    .
    public static< │ │ │ +00032a20: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> void bilateralTextu │ │ │ +00032a80: 7265 4669 6c74 6572 3c2f 7370 616e 3e3c reFilter< │ │ │ +00032a90: 7762 723e 3c73 7061 6e20 636c 6173 733d wbr>(Mat src,. Mat │ │ │ +00032b40: 266e 6273 703b 6473 742c 0a20 696e 7426  dst,. int& │ │ │ +00032b50: 6e62 7370 3b66 722c 0a20 696e 7426 6e62 nbsp;fr,. int&nb │ │ │ +00032b60: 7370 3b6e 756d 4974 6572 2c0a 2064 6f75 sp;numIter,. dou │ │ │ +00032b70: 626c 6526 6e62 7370 3b73 6967 6d61 416c ble sigmaAl │ │ │ +00032b80: 7068 612c 0a20 646f 7562 6c65 266e 6273 pha,. double&nbs │ │ │ +00032b90: 703b 7369 676d 6141 7667 293c 2f73 7061 p;sigmaAvg)
    .
    Appl │ │ │ +00032bc0: 6965 7320 7468 6520 6269 6c61 7465 7261 ies the bilatera │ │ │ +00032bd0: 6c20 7465 7874 7572 6520 6669 6c74 6572 l texture filter │ │ │ +00032be0: 2074 6f20 616e 2069 6d61 6765 2e20 4974 to an image. It │ │ │ +00032bf0: 2070 6572 666f 726d 7320 7374 7275 6374 performs struct │ │ │ +00032c00: 7572 652d 7072 6573 6572 7669 6e67 2074 ure-preserving t │ │ │ +00032c10: 6578 7475 7265 2066 696c 7465 722e 0a20 exture filter.. │ │ │ +00032c20: 466f 7220 6d6f 7265 2064 6574 6169 6c73 For more details │ │ │ +00032c30: 2061 626f 7574 2074 6869 7320 6669 6c74 about this filt │ │ │ +00032c40: 6572 2073 6565 2043 4954 453a 2043 686f er see CITE: Cho │ │ │ +00032c50: 3230 3134 2e3c 2f64 6976 3e0a 3c64 6c20 2014.
    .
    .< │ │ │ +00032c70: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
    sr │ │ │ +00032c90: 633c 2f63 6f64 653e 202d 2053 6f75 7263 c - Sourc │ │ │ +00032ca0: 6520 696d 6167 6520 7768 6f73 6520 6465 e image whose de │ │ │ +00032cb0: 7074 6820 6973 2038 2d62 6974 2055 494e pth is 8-bit UIN │ │ │ +00032cc0: 5420 6f72 2033 322d 6269 7420 464c 4f41 T or 32-bit FLOA │ │ │ +00032cd0: 543c 2f64 643e 0a3c 6464 3e3c 636f 6465 T
    .
    dst - De │ │ │ +00032cf0: 7374 696e 6174 696f 6e20 696d 6167 6520 stination image │ │ │ +00032d00: 6f66 2074 6865 2073 616d 6520 7369 7a65 of the same size │ │ │ +00032d10: 2061 6e64 2074 7970 6520 6173 2073 7263 and type as src │ │ │ +00032d20: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    fr - Rad │ │ │ +00032d40: 6975 7320 6f66 206b 6572 6e65 6c20 746f ius of kernel to │ │ │ +00032d50: 2062 6520 7573 6564 2066 6f72 2066 696c be used for fil │ │ │ +00032d60: 7465 7269 6e67 2e20 4974 2073 686f 756c tering. It shoul │ │ │ +00032d70: 6420 6265 2070 6f73 6974 6976 6520 696e d be positive in │ │ │ +00032d80: 7465 6765 723c 2f64 643e 0a3c 6464 3e3c teger
    .
    < │ │ │ +00032d90: 636f 6465 3e6e 756d 4974 6572 3c2f 636f code>numIter - Number of │ │ │ +00032db0: 6974 6572 6174 696f 6e73 206f 6620 616c iterations of al │ │ │ +00032dc0: 676f 7269 7468 6d2c 2049 7420 7368 6f75 gorithm, It shou │ │ │ +00032dd0: 6c64 2062 6520 706f 7369 7469 7665 2069 ld be positive i │ │ │ +00032de0: 6e74 6567 6572 3c2f 6464 3e0a 3c64 643e nteger
    .
    │ │ │ +00032df0: 3c63 6f64 653e 7369 676d 6141 6c70 6861 sigmaAlpha │ │ │ +00032e00: 3c2f 636f 6465 3e20 2d20 436f 6e74 726f - Contro │ │ │ +00032e10: 6c73 2074 6865 2073 6861 7270 6e65 7373 ls the sharpness │ │ │ +00032e20: 206f 6620 7468 6520 7765 6967 6874 2074 of the weight t │ │ │ +00032e30: 7261 6e73 6974 696f 6e20 6672 6f6d 2065 ransition from e │ │ │ +00032e40: 6467 6573 2074 6f20 736d 6f6f 7468 2f74 dges to smooth/t │ │ │ +00032e50: 6578 7475 7265 2072 6567 696f 6e73 2c20 exture regions, │ │ │ +00032e60: 7768 6572 650a 2061 2062 6967 6765 7220 where. a bigger │ │ │ +00032e70: 7661 6c75 6520 6d65 616e 7320 7368 6172 value means shar │ │ │ +00032e80: 7065 7220 7472 616e 7369 7469 6f6e 2e20 per transition. │ │ │ +00032e90: 5768 656e 2074 6865 2076 616c 7565 2069 When the value i │ │ │ +00032ea0: 7320 6e65 6761 7469 7665 2c20 6974 2069 s negative, it i │ │ │ +00032eb0: 7320 6175 746f 6d61 7469 6361 6c6c 7920 s automatically │ │ │ +00032ec0: 6361 6c63 756c 6174 6564 2e3c 2f64 643e calculated.
    │ │ │ +00032ed0: 0a3c 6464 3e3c 636f 6465 3e73 6967 6d61 .
    sigma │ │ │ +00032ee0: 4176 673c 2f63 6f64 653e 202d 2052 616e Avg - Ran │ │ │ +00032ef0: 6765 2062 6c75 7220 7061 7261 6d65 7465 ge blur paramete │ │ │ +00032f00: 7220 666f 7220 7465 7874 7572 6520 626c r for texture bl │ │ │ +00032f10: 7572 7269 6e67 2e20 4c61 7267 6572 2076 urring. Larger v │ │ │ +00032f20: 616c 7565 206d 616b 6573 2072 6573 756c alue makes resul │ │ │ +00032f30: 7420 746f 2062 6520 6d6f 7265 2062 6c75 t to be more blu │ │ │ +00032f40: 7272 6564 2e20 5768 656e 2074 6865 0a20 rred. When the. │ │ │ +00032f50: 7661 6c75 6520 6973 206e 6567 6174 6976 value is negativ │ │ │ +00032f60: 652c 2069 7420 6973 2061 7574 6f6d 6174 e, it is automat │ │ │ +00032f70: 6963 616c 6c79 2063 616c 6375 6c61 7465 ically calculate │ │ │ +00032f80: 6420 6173 2064 6573 6372 6962 6564 2069 d as described i │ │ │ +00032f90: 6e20 7468 6520 7061 7065 722e 0a0a 2053 n the paper... S │ │ │ +00032fa0: 4545 3a20 726f 6c6c 696e 6747 7569 6461 EE: rollingGuida │ │ │ +00032fb0: 6e63 6546 696c 7465 722c 2062 696c 6174 nceFilter, bilat │ │ │ +00032fc0: 6572 616c 4669 6c74 6572 3c2f 6464 3e0a eralFilter
    . │ │ │ +00032fd0: 3c2f 646c 3e0a 3c2f 7365 6374 696f 6e3e
    .
    │ │ │ +00032fe0: 0a3c 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 .
  • .
  • ..

    bil │ │ │ +00033060: 6174 6572 616c 5465 7874 7572 6546 696c ateralTextureFil │ │ │ +00033070: 7465 723c 2f68 333e 0a3c 6469 7620 636c ter

    .
    p │ │ │ +000330b0: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static void&n │ │ │ +000330f0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;b │ │ │ +00033110: 696c 6174 6572 616c 5465 7874 7572 6546 ilateralTextureF │ │ │ +00033120: 696c 7465 723c 2f73 7061 6e3e 3c77 6272 ilter(Mat&n │ │ │ +00033190: 6273 703b 7372 632c 0a20 3c61 2068 7265 bsp;src,. Mat&nb │ │ │ +000331e0: 7370 3b64 7374 2c0a 2069 6e74 266e 6273 sp;dst,. int&nbs │ │ │ +000331f0: 703b 6672 2c0a 2069 6e74 266e 6273 703b p;fr,. int  │ │ │ +00033200: 6e75 6d49 7465 722c 0a20 646f 7562 6c65 numIter,. double │ │ │ +00033210: 266e 6273 703b 7369 676d 6141 6c70 6861  sigmaAlpha │ │ │ +00033220: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    .< │ │ │ +00033230: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ +00033240: 223e 4170 706c 6965 7320 7468 6520 6269 ">Applies the bi │ │ │ +00033250: 6c61 7465 7261 6c20 7465 7874 7572 6520 lateral texture │ │ │ +00033260: 6669 6c74 6572 2074 6f20 616e 2069 6d61 filter to an ima │ │ │ +00033270: 6765 2e20 4974 2070 6572 666f 726d 7320 ge. It performs │ │ │ +00033280: 7374 7275 6374 7572 652d 7072 6573 6572 structure-preser │ │ │ +00033290: 7669 6e67 2074 6578 7475 7265 2066 696c ving texture fil │ │ │ +000332a0: 7465 722e 0a20 466f 7220 6d6f 7265 2064 ter.. For more d │ │ │ +000332b0: 6574 6169 6c73 2061 626f 7574 2074 6869 etails about thi │ │ │ +000332c0: 7320 6669 6c74 6572 2073 6565 2043 4954 s filter see CIT │ │ │ +000332d0: 453a 2043 686f 3230 3134 2e3c 2f64 6976 E: Cho2014..
    .
    Paramet │ │ │ +00033300: 6572 733a 3c2f 6474 3e0a 3c64 643e 3c63 ers:
    .
    src - │ │ │ +00033320: 2053 6f75 7263 6520 696d 6167 6520 7768 Source image wh │ │ │ +00033330: 6f73 6520 6465 7074 6820 6973 2038 2d62 ose depth is 8-b │ │ │ +00033340: 6974 2055 494e 5420 6f72 2033 322d 6269 it UINT or 32-bi │ │ │ +00033350: 7420 464c 4f41 543c 2f64 643e 0a3c 6464 t FLOAT
    .
    dst - Destination │ │ │ +00033380: 696d 6167 6520 6f66 2074 6865 2073 616d image of the sam │ │ │ +00033390: 6520 7369 7a65 2061 6e64 2074 7970 6520 e size and type │ │ │ +000333a0: 6173 2073 7263 2e3c 2f64 643e 0a3c 6464 as src.
    .
    fr │ │ │ +000333c0: 202d 2052 6164 6975 7320 6f66 206b 6572 - Radius of ker │ │ │ +000333d0: 6e65 6c20 746f 2062 6520 7573 6564 2066 nel to be used f │ │ │ +000333e0: 6f72 2066 696c 7465 7269 6e67 2e20 4974 or filtering. It │ │ │ +000333f0: 2073 686f 756c 6420 6265 2070 6f73 6974 should be posit │ │ │ +00033400: 6976 6520 696e 7465 6765 723c 2f64 643e ive integer
    │ │ │ +00033410: 0a3c 6464 3e3c 636f 6465 3e6e 756d 4974 .
    numIt │ │ │ +00033420: 6572 3c2f 636f 6465 3e20 2d20 4e75 6d62 er - Numb │ │ │ +00033430: 6572 206f 6620 6974 6572 6174 696f 6e73 er of iterations │ │ │ +00033440: 206f 6620 616c 676f 7269 7468 6d2c 2049 of algorithm, I │ │ │ +00033450: 7420 7368 6f75 6c64 2062 6520 706f 7369 t should be posi │ │ │ +00033460: 7469 7665 2069 6e74 6567 6572 3c2f 6464 tive integer
    .
    sigm │ │ │ +00033480: 6141 6c70 6861 3c2f 636f 6465 3e20 2d20 aAlpha - │ │ │ +00033490: 436f 6e74 726f 6c73 2074 6865 2073 6861 Controls the sha │ │ │ +000334a0: 7270 6e65 7373 206f 6620 7468 6520 7765 rpness of the we │ │ │ +000334b0: 6967 6874 2074 7261 6e73 6974 696f 6e20 ight transition │ │ │ +000334c0: 6672 6f6d 2065 6467 6573 2074 6f20 736d from edges to sm │ │ │ +000334d0: 6f6f 7468 2f74 6578 7475 7265 2072 6567 ooth/texture reg │ │ │ +000334e0: 696f 6e73 2c20 7768 6572 650a 2061 2062 ions, where. a b │ │ │ +000334f0: 6967 6765 7220 7661 6c75 6520 6d65 616e igger value mean │ │ │ +00033500: 7320 7368 6172 7065 7220 7472 616e 7369 s sharper transi │ │ │ +00033510: 7469 6f6e 2e20 5768 656e 2074 6865 2076 tion. When the v │ │ │ +00033520: 616c 7565 2069 7320 6e65 6761 7469 7665 alue is negative │ │ │ +00033530: 2c20 6974 2069 7320 6175 746f 6d61 7469 , it is automati │ │ │ +00033540: 6361 6c6c 7920 6361 6c63 756c 6174 6564 cally calculated │ │ │ +00033550: 2e0a 0a20 7661 6c75 6520 6973 206e 6567 ... value is neg │ │ │ +00033560: 6174 6976 652c 2069 7420 6973 2061 7574 ative, it is aut │ │ │ +00033570: 6f6d 6174 6963 616c 6c79 2063 616c 6375 omatically calcu │ │ │ +00033580: 6c61 7465 6420 6173 2064 6573 6372 6962 lated as describ │ │ │ +00033590: 6564 2069 6e20 7468 6520 7061 7065 722e ed in the paper. │ │ │ +000335a0: 0a0a 2053 4545 3a20 726f 6c6c 696e 6747 .. SEE: rollingG │ │ │ +000335b0: 7569 6461 6e63 6546 696c 7465 722c 2062 uidanceFilter, b │ │ │ +000335c0: 696c 6174 6572 616c 4669 6c74 6572 3c2f ilateralFilter.
    ..
  • .
  • . │ │ │ +000335f0: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    bilate │ │ │ +00033660: 7261 6c54 6578 7475 7265 4669 6c74 6572 ralTextureFilter │ │ │ +00033670: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ +000336b0: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ +000336c0: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ +000336e0: 766f 6964 3c2f 7370 616e 3e26 6e62 7370 void  │ │ │ +000336f0: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;bila │ │ │ +00033710: 7465 7261 6c54 6578 7475 7265 4669 6c74 teralTextureFilt │ │ │ +00033720: 6572 3c2f 7370 616e 3e3c 7762 723e 3c73 er(Mat  │ │ │ +00033790: 3b73 7263 2c0a 203c 6120 6872 6566 3d22 ;src,. Mat  │ │ │ +000337e0: 6473 742c 0a20 696e 7426 6e62 7370 3b66 dst,. int f │ │ │ +000337f0: 722c 0a20 696e 7426 6e62 7370 3b6e 756d r,. int num │ │ │ +00033800: 4974 6572 293c 2f73 7061 6e3e 3c2f 6469 Iter).
    Applies th │ │ │ +00033830: 6520 6269 6c61 7465 7261 6c20 7465 7874 e bilateral text │ │ │ +00033840: 7572 6520 6669 6c74 6572 2074 6f20 616e ure filter to an │ │ │ +00033850: 2069 6d61 6765 2e20 4974 2070 6572 666f image. It perfo │ │ │ +00033860: 726d 7320 7374 7275 6374 7572 652d 7072 rms structure-pr │ │ │ +00033870: 6573 6572 7669 6e67 2074 6578 7475 7265 eserving texture │ │ │ +00033880: 2066 696c 7465 722e 0a20 466f 7220 6d6f filter.. For mo │ │ │ +00033890: 7265 2064 6574 6169 6c73 2061 626f 7574 re details about │ │ │ +000338a0: 2074 6869 7320 6669 6c74 6572 2073 6565 this filter see │ │ │ +000338b0: 2043 4954 453a 2043 686f 3230 3134 2e3c CITE: Cho2014.< │ │ │ +000338c0: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ +000338e0: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .src - Source imag │ │ │ +00033910: 6520 7768 6f73 6520 6465 7074 6820 6973 e whose depth is │ │ │ +00033920: 2038 2d62 6974 2055 494e 5420 6f72 2033 8-bit UINT or 3 │ │ │ +00033930: 322d 6269 7420 464c 4f41 543c 2f64 643e 2-bit FLOAT │ │ │ +00033940: 0a3c 6464 3e3c 636f 6465 3e64 7374 3c2f .
    dst - Destinat │ │ │ +00033960: 696f 6e20 696d 6167 6520 6f66 2074 6865 ion image of the │ │ │ +00033970: 2073 616d 6520 7369 7a65 2061 6e64 2074 same size and t │ │ │ +00033980: 7970 6520 6173 2073 7263 2e3c 2f64 643e ype as src.
    │ │ │ +00033990: 0a3c 6464 3e3c 636f 6465 3e66 723c 2f63 .
    fr - Radius of │ │ │ +000339b0: 206b 6572 6e65 6c20 746f 2062 6520 7573 kernel to be us │ │ │ +000339c0: 6564 2066 6f72 2066 696c 7465 7269 6e67 ed for filtering │ │ │ +000339d0: 2e20 4974 2073 686f 756c 6420 6265 2070 . It should be p │ │ │ +000339e0: 6f73 6974 6976 6520 696e 7465 6765 723c ositive integer< │ │ │ +000339f0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e6e /dd>.
    n │ │ │ +00033a00: 756d 4974 6572 3c2f 636f 6465 3e20 2d20 umIter - │ │ │ +00033a10: 4e75 6d62 6572 206f 6620 6974 6572 6174 Number of iterat │ │ │ +00033a20: 696f 6e73 206f 6620 616c 676f 7269 7468 ions of algorith │ │ │ +00033a30: 6d2c 2049 7420 7368 6f75 6c64 2062 6520 m, It should be │ │ │ +00033a40: 706f 7369 7469 7665 2069 6e74 6567 6572 positive integer │ │ │ +00033a50: 0a0a 2061 2062 6967 6765 7220 7661 6c75 .. a bigger valu │ │ │ +00033a60: 6520 6d65 616e 7320 7368 6172 7065 7220 e means sharper │ │ │ +00033a70: 7472 616e 7369 7469 6f6e 2e20 5768 656e transition. When │ │ │ +00033a80: 2074 6865 2076 616c 7565 2069 7320 6e65 the value is ne │ │ │ +00033a90: 6761 7469 7665 2c20 6974 2069 7320 6175 gative, it is au │ │ │ +00033aa0: 746f 6d61 7469 6361 6c6c 7920 6361 6c63 tomatically calc │ │ │ +00033ab0: 756c 6174 6564 2e0a 0a20 7661 6c75 6520 ulated... value │ │ │ +00033ac0: 6973 206e 6567 6174 6976 652c 2069 7420 is negative, it │ │ │ +00033ad0: 6973 2061 7574 6f6d 6174 6963 616c 6c79 is automatically │ │ │ +00033ae0: 2063 616c 6375 6c61 7465 6420 6173 2064 calculated as d │ │ │ +00033af0: 6573 6372 6962 6564 2069 6e20 7468 6520 escribed in the │ │ │ +00033b00: 7061 7065 722e 0a0a 2053 4545 3a20 726f paper... SEE: ro │ │ │ +00033b10: 6c6c 696e 6747 7569 6461 6e63 6546 696c llingGuidanceFil │ │ │ +00033b20: 7465 722c 2062 696c 6174 6572 616c 4669 ter, bilateralFi │ │ │ +00033b30: 6c74 6572 3c2f 6464 3e0a 3c2f 646c 3e0a lter
    .
    . │ │ │ +00033b40: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e
    .
  • │ │ │ +00033b50: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .

    bila │ │ │ +00033bc0: 7465 7261 6c54 6578 7475 7265 4669 6c74 teralTextureFilt │ │ │ +00033bd0: 6572 3c2f 6833 3e0a 3c64 6976 2063 6c61 er

    .
    pu │ │ │ +00033c10: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static void&nb │ │ │ +00033c50: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;bi │ │ │ +00033c70: 6c61 7465 7261 6c54 6578 7475 7265 4669 lateralTextureFi │ │ │ +00033c80: 6c74 6572 3c2f 7370 616e 3e3c 7762 723e lter │ │ │ +00033c90: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Mat&nb │ │ │ +00033cf0: 7370 3b73 7263 2c0a 203c 6120 6872 6566 sp;src,. Mat&nbs │ │ │ +00033d40: 703b 6473 742c 0a20 696e 7426 6e62 7370 p;dst,. int  │ │ │ +00033d50: 3b66 7229 3c2f 7370 616e 3e3c 2f64 6976 ;fr)
    .
    Applies the │ │ │ +00033d80: 2062 696c 6174 6572 616c 2074 6578 7475 bilateral textu │ │ │ +00033d90: 7265 2066 696c 7465 7220 746f 2061 6e20 re filter to an │ │ │ +00033da0: 696d 6167 652e 2049 7420 7065 7266 6f72 image. It perfor │ │ │ +00033db0: 6d73 2073 7472 7563 7475 7265 2d70 7265 ms structure-pre │ │ │ +00033dc0: 7365 7276 696e 6720 7465 7874 7572 6520 serving texture │ │ │ +00033dd0: 6669 6c74 6572 2e0a 2046 6f72 206d 6f72 filter.. For mor │ │ │ +00033de0: 6520 6465 7461 696c 7320 6162 6f75 7420 e details about │ │ │ +00033df0: 7468 6973 2066 696c 7465 7220 7365 6520 this filter see │ │ │ +00033e00: 4349 5445 3a20 4368 6f32 3031 342e 3c2f CITE: Cho2014..
    .
    Para │ │ │ +00033e30: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    src - Source image │ │ │ +00033e60: 2077 686f 7365 2064 6570 7468 2069 7320 whose depth is │ │ │ +00033e70: 382d 6269 7420 5549 4e54 206f 7220 3332 8-bit UINT or 32 │ │ │ +00033e80: 2d62 6974 2046 4c4f 4154 3c2f 6464 3e0a -bit FLOAT
    . │ │ │ +00033e90: 3c64 643e 3c63 6f64 653e 6473 743c 2f63
    dst - Destinati │ │ │ +00033eb0: 6f6e 2069 6d61 6765 206f 6620 7468 6520 on image of the │ │ │ +00033ec0: 7361 6d65 2073 697a 6520 616e 6420 7479 same size and ty │ │ │ +00033ed0: 7065 2061 7320 7372 632e 3c2f 6464 3e0a pe as src.
    . │ │ │ +00033ee0: 3c64 643e 3c63 6f64 653e 6672 3c2f 636f
    fr - Radius of │ │ │ +00033f00: 6b65 726e 656c 2074 6f20 6265 2075 7365 kernel to be use │ │ │ +00033f10: 6420 666f 7220 6669 6c74 6572 696e 672e d for filtering. │ │ │ +00033f20: 2049 7420 7368 6f75 6c64 2062 6520 706f It should be po │ │ │ +00033f30: 7369 7469 7665 2069 6e74 6567 6572 0a0a sitive integer.. │ │ │ +00033f40: 0a20 6120 6269 6767 6572 2076 616c 7565 . a bigger value │ │ │ +00033f50: 206d 6561 6e73 2073 6861 7270 6572 2074 means sharper t │ │ │ +00033f60: 7261 6e73 6974 696f 6e2e 2057 6865 6e20 ransition. When │ │ │ +00033f70: 7468 6520 7661 6c75 6520 6973 206e 6567 the value is neg │ │ │ +00033f80: 6174 6976 652c 2069 7420 6973 2061 7574 ative, it is aut │ │ │ +00033f90: 6f6d 6174 6963 616c 6c79 2063 616c 6375 omatically calcu │ │ │ +00033fa0: 6c61 7465 642e 0a0a 2076 616c 7565 2069 lated... value i │ │ │ +00033fb0: 7320 6e65 6761 7469 7665 2c20 6974 2069 s negative, it i │ │ │ +00033fc0: 7320 6175 746f 6d61 7469 6361 6c6c 7920 s automatically │ │ │ +00033fd0: 6361 6c63 756c 6174 6564 2061 7320 6465 calculated as de │ │ │ +00033fe0: 7363 7269 6265 6420 696e 2074 6865 2070 scribed in the p │ │ │ +00033ff0: 6170 6572 2e0a 0a20 5345 453a 2072 6f6c aper... SEE: rol │ │ │ +00034000: 6c69 6e67 4775 6964 616e 6365 4669 6c74 lingGuidanceFilt │ │ │ +00034010: 6572 2c20 6269 6c61 7465 7261 6c46 696c er, bilateralFil │ │ │ +00034020: 7465 723c 2f64 643e 0a3c 2f64 6c3e 0a3c ter
    .
    .< │ │ │ +00034030: 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 3e0a /section>.
  • . │ │ │ +00034040: 3c6c 693e 0a3c 7365 6374 696f 6e20 636c
  • .
    .

    bilateral │ │ │ +000340b0: 5465 7874 7572 6546 696c 7465 723c 2f68 TextureFilter.
    public │ │ │ +00034100: 7374 6174 6963 3c2f 7370 616e 3e26 6e62 static&nb │ │ │ +00034110: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;voi │ │ │ +00034130: 643c 2f73 7061 6e3e 266e 6273 703b 3c73 d bilater │ │ │ +00034160: 616c 5465 7874 7572 6546 696c 7465 723c alTextureFilter< │ │ │ +00034170: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(Mat sr │ │ │ +000341e0: 632c 0a20 3c61 2068 7265 663d 222e 2e2f c,. │ │ │ +00034220: 4d61 743c 2f61 3e26 6e62 7370 3b64 7374 Mat dst │ │ │ +00034230: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    .< │ │ │ +00034240: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ +00034250: 223e 4170 706c 6965 7320 7468 6520 6269 ">Applies the bi │ │ │ +00034260: 6c61 7465 7261 6c20 7465 7874 7572 6520 lateral texture │ │ │ +00034270: 6669 6c74 6572 2074 6f20 616e 2069 6d61 filter to an ima │ │ │ +00034280: 6765 2e20 4974 2070 6572 666f 726d 7320 ge. It performs │ │ │ +00034290: 7374 7275 6374 7572 652d 7072 6573 6572 structure-preser │ │ │ +000342a0: 7669 6e67 2074 6578 7475 7265 2066 696c ving texture fil │ │ │ +000342b0: 7465 722e 0a20 466f 7220 6d6f 7265 2064 ter.. For more d │ │ │ +000342c0: 6574 6169 6c73 2061 626f 7574 2074 6869 etails about thi │ │ │ +000342d0: 7320 6669 6c74 6572 2073 6565 2043 4954 s filter see CIT │ │ │ +000342e0: 453a 2043 686f 3230 3134 2e3c 2f64 6976 E: Cho2014..
    .
    Paramet │ │ │ +00034310: 6572 733a 3c2f 6474 3e0a 3c64 643e 3c63 ers:
    .
    src - │ │ │ +00034330: 2053 6f75 7263 6520 696d 6167 6520 7768 Source image wh │ │ │ +00034340: 6f73 6520 6465 7074 6820 6973 2038 2d62 ose depth is 8-b │ │ │ +00034350: 6974 2055 494e 5420 6f72 2033 322d 6269 it UINT or 32-bi │ │ │ +00034360: 7420 464c 4f41 543c 2f64 643e 0a3c 6464 t FLOAT
    .
    dst - Destination │ │ │ +00034390: 696d 6167 6520 6f66 2074 6865 2073 616d image of the sam │ │ │ +000343a0: 6520 7369 7a65 2061 6e64 2074 7970 6520 e size and type │ │ │ +000343b0: 6173 2073 7263 2e0a 0a0a 0a20 6120 6269 as src..... a bi │ │ │ +000343c0: 6767 6572 2076 616c 7565 206d 6561 6e73 gger value means │ │ │ +000343d0: 2073 6861 7270 6572 2074 7261 6e73 6974 sharper transit │ │ │ +000343e0: 696f 6e2e 2057 6865 6e20 7468 6520 7661 ion. When the va │ │ │ +000343f0: 6c75 6520 6973 206e 6567 6174 6976 652c lue is negative, │ │ │ +00034400: 2069 7420 6973 2061 7574 6f6d 6174 6963 it is automatic │ │ │ +00034410: 616c 6c79 2063 616c 6375 6c61 7465 642e ally calculated. │ │ │ +00034420: 0a0a 2076 616c 7565 2069 7320 6e65 6761 .. value is nega │ │ │ +00034430: 7469 7665 2c20 6974 2069 7320 6175 746f tive, it is auto │ │ │ +00034440: 6d61 7469 6361 6c6c 7920 6361 6c63 756c matically calcul │ │ │ +00034450: 6174 6564 2061 7320 6465 7363 7269 6265 ated as describe │ │ │ +00034460: 6420 696e 2074 6865 2070 6170 6572 2e0a d in the paper.. │ │ │ +00034470: 0a20 5345 453a 2072 6f6c 6c69 6e67 4775 . SEE: rollingGu │ │ │ +00034480: 6964 616e 6365 4669 6c74 6572 2c20 6269 idanceFilter, bi │ │ │ +00034490: 6c61 7465 7261 6c46 696c 7465 723c 2f64 lateralFilter.
    ..

  • .
  • .< │ │ │ +000344c0: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ +000344d0: 6574 6169 6c22 2069 643d 2272 6f6c 6c69 etail" id="rolli │ │ │ +000344e0: 6e67 4775 6964 616e 6365 4669 6c74 6572 ngGuidanceFilter │ │ │ +000344f0: 286f 7267 2e6f 7065 6e63 762e 636f 7265 (org.opencv.core │ │ │ +00034500: 2e4d 6174 2c6f 7267 2e6f 7065 6e63 762e .Mat,org.opencv. │ │ │ +00034510: 636f 7265 2e4d 6174 2c69 6e74 2c64 6f75 core.Mat,int,dou │ │ │ +00034520: 626c 652c 646f 7562 6c65 2c69 6e74 2c69 ble,double,int,i │ │ │ +00034530: 6e74 2922 3e0a 3c68 333e 726f 6c6c 696e nt)">.

    rollin │ │ │ +00034540: 6747 7569 6461 6e63 6546 696c 7465 723c gGuidanceFilter< │ │ │ +00034550: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ +00034590: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ +000345a0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;v │ │ │ +000345c0: 6f69 643c 2f73 7061 6e3e 266e 6273 703b oid  │ │ │ +000345d0: 3c73 7061 6e20 636c 6173 733d 2265 6c65 rolli │ │ │ +000345f0: 6e67 4775 6964 616e 6365 4669 6c74 6572 ngGuidanceFilter │ │ │ +00034600: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (Mat s │ │ │ +00034670: 7263 2c0a 203c 6120 6872 6566 3d22 2e2e rc,. Mat ds │ │ │ +000346c0: 742c 0a20 696e 7426 6e62 7370 3b64 2c0a t,. int d,. │ │ │ +000346d0: 2064 6f75 626c 6526 6e62 7370 3b73 6967 double sig │ │ │ +000346e0: 6d61 436f 6c6f 722c 0a20 646f 7562 6c65 maColor,. double │ │ │ +000346f0: 266e 6273 703b 7369 676d 6153 7061 6365  sigmaSpace │ │ │ +00034700: 2c0a 2069 6e74 266e 6273 703b 6e75 6d4f ,. int numO │ │ │ +00034710: 6649 7465 722c 0a20 696e 7426 6e62 7370 fIter,. int  │ │ │ +00034720: 3b62 6f72 6465 7254 7970 6529 3c2f 7370 ;borderType)
    .
    App │ │ │ +00034750: 6c69 6573 2074 6865 2072 6f6c 6c69 6e67 lies the rolling │ │ │ +00034760: 2067 7569 6461 6e63 6520 6669 6c74 6572 guidance filter │ │ │ +00034770: 2074 6f20 616e 2069 6d61 6765 2e0a 0a20 to an image... │ │ │ +00034780: 466f 7220 6d6f 7265 2064 6574 6169 6c73 For more details │ │ │ +00034790: 2c20 706c 6561 7365 2073 6565 2043 4954 , please see CIT │ │ │ +000347a0: 453a 207a 6861 6e67 3230 3134 726f 6c6c E: zhang2014roll │ │ │ +000347b0: 696e 673c 2f64 6976 3e0a 3c64 6c20 636c ing
    .
    .
    Parameters:
    .
    src< │ │ │ +000347f0: 2f63 6f64 653e 202d 2053 6f75 7263 6520 /code> - Source │ │ │ +00034800: 382d 6269 7420 6f72 2066 6c6f 6174 696e 8-bit or floatin │ │ │ +00034810: 672d 706f 696e 742c 2031 2d63 6861 6e6e g-point, 1-chann │ │ │ +00034820: 656c 206f 7220 332d 6368 616e 6e65 6c20 el or 3-channel │ │ │ +00034830: 696d 6167 652e 3c2f 6464 3e0a 3c64 643e image.
    .
    │ │ │ +00034840: 3c63 6f64 653e 6473 743c 2f63 6f64 653e dst │ │ │ +00034850: 202d 2044 6573 7469 6e61 7469 6f6e 2069 - Destination i │ │ │ +00034860: 6d61 6765 206f 6620 7468 6520 7361 6d65 mage of the same │ │ │ +00034870: 2073 697a 6520 616e 6420 7479 7065 2061 size and type a │ │ │ +00034880: 7320 7372 632e 3c2f 6464 3e0a 3c64 643e s src.
    .
    │ │ │ +00034890: 3c63 6f64 653e 643c 2f63 6f64 653e 202d d - │ │ │ +000348a0: 2044 6961 6d65 7465 7220 6f66 2065 6163 Diameter of eac │ │ │ +000348b0: 6820 7069 7865 6c20 6e65 6967 6862 6f72 h pixel neighbor │ │ │ +000348c0: 686f 6f64 2074 6861 7420 6973 2075 7365 hood that is use │ │ │ +000348d0: 6420 6475 7269 6e67 2066 696c 7465 7269 d during filteri │ │ │ +000348e0: 6e67 2e20 4966 2069 7420 6973 206e 6f6e ng. If it is non │ │ │ +000348f0: 2d70 6f73 6974 6976 652c 0a20 6974 2069 -positive,. it i │ │ │ +00034900: 7320 636f 6d70 7574 6564 2066 726f 6d20 s computed from │ │ │ +00034910: 7369 676d 6153 7061 6365 202e 3c2f 6464 sigmaSpace .
    .
    sigm │ │ │ +00034930: 6143 6f6c 6f72 3c2f 636f 6465 3e20 2d20 aColor - │ │ │ +00034940: 4669 6c74 6572 2073 6967 6d61 2069 6e20 Filter sigma in │ │ │ +00034950: 7468 6520 636f 6c6f 7220 7370 6163 652e the color space. │ │ │ +00034960: 2041 206c 6172 6765 7220 7661 6c75 6520 A larger value │ │ │ +00034970: 6f66 2074 6865 2070 6172 616d 6574 6572 of the parameter │ │ │ +00034980: 206d 6561 6e73 2074 6861 740a 2066 6172 means that. far │ │ │ +00034990: 7468 6572 2063 6f6c 6f72 7320 7769 7468 ther colors with │ │ │ +000349a0: 696e 2074 6865 2070 6978 656c 206e 6569 in the pixel nei │ │ │ +000349b0: 6768 626f 7268 6f6f 6420 2873 6565 2073 ghborhood (see s │ │ │ +000349c0: 6967 6d61 5370 6163 6520 2920 7769 6c6c igmaSpace ) will │ │ │ +000349d0: 2062 6520 6d69 7865 6420 746f 6765 7468 be mixed togeth │ │ │ +000349e0: 6572 2c20 7265 7375 6c74 696e 6720 696e er, resulting in │ │ │ +000349f0: 0a20 6c61 7267 6572 2061 7265 6173 206f . larger areas o │ │ │ +00034a00: 6620 7365 6d69 2d65 7175 616c 2063 6f6c f semi-equal col │ │ │ +00034a10: 6f72 2e3c 2f64 643e 0a3c 6464 3e3c 636f or.
    .
    sigmaSpace - Filter si │ │ │ +00034a40: 676d 6120 696e 2074 6865 2063 6f6f 7264 gma in the coord │ │ │ +00034a50: 696e 6174 6520 7370 6163 652e 2041 206c inate space. A l │ │ │ +00034a60: 6172 6765 7220 7661 6c75 6520 6f66 2074 arger value of t │ │ │ +00034a70: 6865 2070 6172 616d 6574 6572 206d 6561 he parameter mea │ │ │ +00034a80: 6e73 2074 6861 740a 2066 6172 7468 6572 ns that. farther │ │ │ +00034a90: 2070 6978 656c 7320 7769 6c6c 2069 6e66 pixels will inf │ │ │ +00034aa0: 6c75 656e 6365 2065 6163 6820 6f74 6865 luence each othe │ │ │ +00034ab0: 7220 6173 206c 6f6e 6720 6173 2074 6865 r as long as the │ │ │ +00034ac0: 6972 2063 6f6c 6f72 7320 6172 6520 636c ir colors are cl │ │ │ +00034ad0: 6f73 6520 656e 6f75 6768 2028 7365 6520 ose enough (see │ │ │ +00034ae0: 7369 676d 6143 6f6c 6f72 2029 2e0a 2057 sigmaColor ).. W │ │ │ +00034af0: 6865 6e20 6426 6774 3b30 202c 2069 7420 hen d>0 , it │ │ │ +00034b00: 7370 6563 6966 6965 7320 7468 6520 6e65 specifies the ne │ │ │ +00034b10: 6967 6862 6f72 686f 6f64 2073 697a 6520 ighborhood size │ │ │ +00034b20: 7265 6761 7264 6c65 7373 206f 6620 7369 regardless of si │ │ │ +00034b30: 676d 6153 7061 6365 202e 204f 7468 6572 gmaSpace . Other │ │ │ +00034b40: 7769 7365 2c20 6420 6973 0a20 7072 6f70 wise, d is. prop │ │ │ +00034b50: 6f72 7469 6f6e 616c 2074 6f20 7369 676d ortional to sigm │ │ │ +00034b60: 6153 7061 6365 202e 3c2f 6464 3e0a 3c64 aSpace .
    .numOfIte │ │ │ +00034b80: 723c 2f63 6f64 653e 202d 204e 756d 6265 r - Numbe │ │ │ +00034b90: 7220 6f66 2069 7465 7261 7469 6f6e 7320 r of iterations │ │ │ +00034ba0: 6f66 206a 6f69 6e74 2065 6467 652d 7072 of joint edge-pr │ │ │ +00034bb0: 6573 6572 7669 6e67 2066 696c 7465 7269 eserving filteri │ │ │ +00034bc0: 6e67 2061 7070 6c69 6564 206f 6e20 7468 ng applied on th │ │ │ +00034bd0: 6520 736f 7572 6365 2069 6d61 6765 2e3c e source image.< │ │ │ +00034be0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e62 /dd>.
    b │ │ │ +00034bf0: 6f72 6465 7254 7970 653c 2f63 6f64 653e orderType │ │ │ +00034c00: 202d 203c 623e 4e6f 7465 3a3c 2f62 3e20 - Note: │ │ │ +00034c10: 2072 6f6c 6c69 6e67 4775 6964 616e 6365 rollingGuidance │ │ │ +00034c20: 4669 6c74 6572 2075 7365 7320 6a6f 696e Filter uses join │ │ │ +00034c30: 7442 696c 6174 6572 616c 4669 6c74 6572 tBilateralFilter │ │ │ +00034c40: 2061 7320 7468 6520 6564 6765 2d70 7265 as the edge-pre │ │ │ +00034c50: 7365 7276 696e 6720 6669 6c74 6572 2e0a serving filter.. │ │ │ +00034c60: 0a20 5345 453a 206a 6f69 6e74 4269 6c61 . SEE: jointBila │ │ │ +00034c70: 7465 7261 6c46 696c 7465 722c 2062 696c teralFilter, bil │ │ │ +00034c80: 6174 6572 616c 4669 6c74 6572 2c20 616d ateralFilter, am │ │ │ +00034c90: 4669 6c74 6572 3c2f 6464 3e0a 3c2f 646c Filter
    .
    ...
  • .
    .

    r │ │ │ +00034d30: 6f6c 6c69 6e67 4775 6964 616e 6365 4669 ollingGuidanceFi │ │ │ +00034d40: 6c74 6572 3c2f 6833 3e0a 3c64 6976 2063 lter

    .
    │ │ │ +00034d80: 7075 626c 6963 2073 7461 7469 633c 2f73 public static void& │ │ │ +00034dc0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ +00034de0: 726f 6c6c 696e 6747 7569 6461 6e63 6546 rollingGuidanceF │ │ │ +00034df0: 696c 7465 723c 2f73 7061 6e3e 3c77 6272 ilter(Mat&n │ │ │ +00034e60: 6273 703b 7372 632c 0a20 3c61 2068 7265 bsp;src,. Mat&nb │ │ │ +00034eb0: 7370 3b64 7374 2c0a 2069 6e74 266e 6273 sp;dst,. int&nbs │ │ │ +00034ec0: 703b 642c 0a20 646f 7562 6c65 266e 6273 p;d,. double&nbs │ │ │ +00034ed0: 703b 7369 676d 6143 6f6c 6f72 2c0a 2064 p;sigmaColor,. d │ │ │ +00034ee0: 6f75 626c 6526 6e62 7370 3b73 6967 6d61 ouble sigma │ │ │ +00034ef0: 5370 6163 652c 0a20 696e 7426 6e62 7370 Space,. int  │ │ │ +00034f00: 3b6e 756d 4f66 4974 6572 293c 2f73 7061 ;numOfIter)
    .
    Appl │ │ │ +00034f30: 6965 7320 7468 6520 726f 6c6c 696e 6720 ies the rolling │ │ │ +00034f40: 6775 6964 616e 6365 2066 696c 7465 7220 guidance filter │ │ │ +00034f50: 746f 2061 6e20 696d 6167 652e 0a0a 2046 to an image... F │ │ │ +00034f60: 6f72 206d 6f72 6520 6465 7461 696c 732c or more details, │ │ │ +00034f70: 2070 6c65 6173 6520 7365 6520 4349 5445 please see CITE │ │ │ +00034f80: 3a20 7a68 616e 6732 3031 3472 6f6c 6c69 : zhang2014rolli │ │ │ +00034f90: 6e67 3c2f 6469 763e 0a3c 646c 2063 6c61 ng
    .
    .
    │ │ │ +00034fb0: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
    │ │ │ +00034fc0: 0a3c 6464 3e3c 636f 6465 3e73 7263 3c2f .
    src - Source 8 │ │ │ +00034fe0: 2d62 6974 206f 7220 666c 6f61 7469 6e67 -bit or floating │ │ │ +00034ff0: 2d70 6f69 6e74 2c20 312d 6368 616e 6e65 -point, 1-channe │ │ │ +00035000: 6c20 6f72 2033 2d63 6861 6e6e 656c 2069 l or 3-channel i │ │ │ +00035010: 6d61 6765 2e3c 2f64 643e 0a3c 6464 3e3c mage.
    .
    < │ │ │ +00035020: 636f 6465 3e64 7374 3c2f 636f 6465 3e20 code>dst │ │ │ +00035030: 2d20 4465 7374 696e 6174 696f 6e20 696d - Destination im │ │ │ +00035040: 6167 6520 6f66 2074 6865 2073 616d 6520 age of the same │ │ │ +00035050: 7369 7a65 2061 6e64 2074 7970 6520 6173 size and type as │ │ │ +00035060: 2073 7263 2e3c 2f64 643e 0a3c 6464 3e3c src.
    .
    < │ │ │ +00035070: 636f 6465 3e64 3c2f 636f 6465 3e20 2d20 code>d - │ │ │ +00035080: 4469 616d 6574 6572 206f 6620 6561 6368 Diameter of each │ │ │ +00035090: 2070 6978 656c 206e 6569 6768 626f 7268 pixel neighborh │ │ │ +000350a0: 6f6f 6420 7468 6174 2069 7320 7573 6564 ood that is used │ │ │ +000350b0: 2064 7572 696e 6720 6669 6c74 6572 696e during filterin │ │ │ +000350c0: 672e 2049 6620 6974 2069 7320 6e6f 6e2d g. If it is non- │ │ │ +000350d0: 706f 7369 7469 7665 2c0a 2069 7420 6973 positive,. it is │ │ │ +000350e0: 2063 6f6d 7075 7465 6420 6672 6f6d 2073 computed from s │ │ │ +000350f0: 6967 6d61 5370 6163 6520 2e3c 2f64 643e igmaSpace .
    │ │ │ +00035100: 0a3c 6464 3e3c 636f 6465 3e73 6967 6d61 .
    sigma │ │ │ +00035110: 436f 6c6f 723c 2f63 6f64 653e 202d 2046 Color - F │ │ │ +00035120: 696c 7465 7220 7369 676d 6120 696e 2074 ilter sigma in t │ │ │ +00035130: 6865 2063 6f6c 6f72 2073 7061 6365 2e20 he color space. │ │ │ +00035140: 4120 6c61 7267 6572 2076 616c 7565 206f A larger value o │ │ │ +00035150: 6620 7468 6520 7061 7261 6d65 7465 7220 f the parameter │ │ │ +00035160: 6d65 616e 7320 7468 6174 0a20 6661 7274 means that. fart │ │ │ +00035170: 6865 7220 636f 6c6f 7273 2077 6974 6869 her colors withi │ │ │ +00035180: 6e20 7468 6520 7069 7865 6c20 6e65 6967 n the pixel neig │ │ │ +00035190: 6862 6f72 686f 6f64 2028 7365 6520 7369 hborhood (see si │ │ │ +000351a0: 676d 6153 7061 6365 2029 2077 696c 6c20 gmaSpace ) will │ │ │ +000351b0: 6265 206d 6978 6564 2074 6f67 6574 6865 be mixed togethe │ │ │ +000351c0: 722c 2072 6573 756c 7469 6e67 2069 6e0a r, resulting in. │ │ │ +000351d0: 206c 6172 6765 7220 6172 6561 7320 6f66 larger areas of │ │ │ +000351e0: 2073 656d 692d 6571 7561 6c20 636f 6c6f semi-equal colo │ │ │ +000351f0: 722e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 r.
    .
    sigmaSpace - Filter sig │ │ │ +00035220: 6d61 2069 6e20 7468 6520 636f 6f72 6469 ma in the coordi │ │ │ +00035230: 6e61 7465 2073 7061 6365 2e20 4120 6c61 nate space. A la │ │ │ +00035240: 7267 6572 2076 616c 7565 206f 6620 7468 rger value of th │ │ │ +00035250: 6520 7061 7261 6d65 7465 7220 6d65 616e e parameter mean │ │ │ +00035260: 7320 7468 6174 0a20 6661 7274 6865 7220 s that. farther │ │ │ +00035270: 7069 7865 6c73 2077 696c 6c20 696e 666c pixels will infl │ │ │ +00035280: 7565 6e63 6520 6561 6368 206f 7468 6572 uence each other │ │ │ +00035290: 2061 7320 6c6f 6e67 2061 7320 7468 6569 as long as thei │ │ │ +000352a0: 7220 636f 6c6f 7273 2061 7265 2063 6c6f r colors are clo │ │ │ +000352b0: 7365 2065 6e6f 7567 6820 2873 6565 2073 se enough (see s │ │ │ +000352c0: 6967 6d61 436f 6c6f 7220 292e 0a20 5768 igmaColor ).. Wh │ │ │ +000352d0: 656e 2064 2667 743b 3020 2c20 6974 2073 en d>0 , it s │ │ │ +000352e0: 7065 6369 6669 6573 2074 6865 206e 6569 pecifies the nei │ │ │ +000352f0: 6768 626f 7268 6f6f 6420 7369 7a65 2072 ghborhood size r │ │ │ +00035300: 6567 6172 646c 6573 7320 6f66 2073 6967 egardless of sig │ │ │ +00035310: 6d61 5370 6163 6520 2e20 4f74 6865 7277 maSpace . Otherw │ │ │ +00035320: 6973 652c 2064 2069 730a 2070 726f 706f ise, d is. propo │ │ │ +00035330: 7274 696f 6e61 6c20 746f 2073 6967 6d61 rtional to sigma │ │ │ +00035340: 5370 6163 6520 2e3c 2f64 643e 0a3c 6464 Space .
    .
    numOfIter │ │ │ +00035360: 3c2f 636f 6465 3e20 2d20 4e75 6d62 6572 - Number │ │ │ +00035370: 206f 6620 6974 6572 6174 696f 6e73 206f of iterations o │ │ │ +00035380: 6620 6a6f 696e 7420 6564 6765 2d70 7265 f joint edge-pre │ │ │ +00035390: 7365 7276 696e 6720 6669 6c74 6572 696e serving filterin │ │ │ +000353a0: 6720 6170 706c 6965 6420 6f6e 2074 6865 g applied on the │ │ │ +000353b0: 2073 6f75 7263 6520 696d 6167 652e 0a0a source image... │ │ │ +000353c0: 0a20 3c62 3e4e 6f74 653a 3c2f 623e 2020 . Note: │ │ │ +000353d0: 726f 6c6c 696e 6747 7569 6461 6e63 6546 rollingGuidanceF │ │ │ +000353e0: 696c 7465 7220 7573 6573 206a 6f69 6e74 ilter uses joint │ │ │ +000353f0: 4269 6c61 7465 7261 6c46 696c 7465 7220 BilateralFilter │ │ │ +00035400: 6173 2074 6865 2065 6467 652d 7072 6573 as the edge-pres │ │ │ +00035410: 6572 7669 6e67 2066 696c 7465 722e 0a0a erving filter... │ │ │ +00035420: 2053 4545 3a20 6a6f 696e 7442 696c 6174 SEE: jointBilat │ │ │ +00035430: 6572 616c 4669 6c74 6572 2c20 6269 6c61 eralFilter, bila │ │ │ +00035440: 7465 7261 6c46 696c 7465 722c 2061 6d46 teralFilter, amF │ │ │ +00035450: 696c 7465 723c 2f64 643e 0a3c 2f64 6c3e ilter
    .
    │ │ │ +00035460: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .
    .
  • .
  • .
    .

    rollin │ │ │ +000354f0: 6747 7569 6461 6e63 6546 696c 7465 723c gGuidanceFilter< │ │ │ +00035500: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ +00035540: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ +00035550: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;v │ │ │ +00035570: 6f69 643c 2f73 7061 6e3e 266e 6273 703b oid  │ │ │ +00035580: 3c73 7061 6e20 636c 6173 733d 2265 6c65 rolli │ │ │ +000355a0: 6e67 4775 6964 616e 6365 4669 6c74 6572 ngGuidanceFilter │ │ │ +000355b0: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (Mat s │ │ │ +00035620: 7263 2c0a 203c 6120 6872 6566 3d22 2e2e rc,. Mat ds │ │ │ +00035670: 742c 0a20 696e 7426 6e62 7370 3b64 2c0a t,. int d,. │ │ │ +00035680: 2064 6f75 626c 6526 6e62 7370 3b73 6967 double sig │ │ │ +00035690: 6d61 436f 6c6f 722c 0a20 646f 7562 6c65 maColor,. double │ │ │ +000356a0: 266e 6273 703b 7369 676d 6153 7061 6365  sigmaSpace │ │ │ +000356b0: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    .< │ │ │ +000356c0: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ +000356d0: 223e 4170 706c 6965 7320 7468 6520 726f ">Applies the ro │ │ │ +000356e0: 6c6c 696e 6720 6775 6964 616e 6365 2066 lling guidance f │ │ │ +000356f0: 696c 7465 7220 746f 2061 6e20 696d 6167 ilter to an imag │ │ │ +00035700: 652e 0a0a 2046 6f72 206d 6f72 6520 6465 e... For more de │ │ │ +00035710: 7461 696c 732c 2070 6c65 6173 6520 7365 tails, please se │ │ │ +00035720: 6520 4349 5445 3a20 7a68 616e 6732 3031 e CITE: zhang201 │ │ │ +00035730: 3472 6f6c 6c69 6e67 3c2f 6469 763e 0a3c 4rolling.< │ │ │ +00035740: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ +00035750: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
    Parameters │ │ │ +00035760: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
    .
    src - So │ │ │ +00035780: 7572 6365 2038 2d62 6974 206f 7220 666c urce 8-bit or fl │ │ │ +00035790: 6f61 7469 6e67 2d70 6f69 6e74 2c20 312d oating-point, 1- │ │ │ +000357a0: 6368 616e 6e65 6c20 6f72 2033 2d63 6861 channel or 3-cha │ │ │ +000357b0: 6e6e 656c 2069 6d61 6765 2e3c 2f64 643e nnel image.
    │ │ │ +000357c0: 0a3c 6464 3e3c 636f 6465 3e64 7374 3c2f .
    dst - Destinat │ │ │ +000357e0: 696f 6e20 696d 6167 6520 6f66 2074 6865 ion image of the │ │ │ +000357f0: 2073 616d 6520 7369 7a65 2061 6e64 2074 same size and t │ │ │ +00035800: 7970 6520 6173 2073 7263 2e3c 2f64 643e ype as src.
    │ │ │ +00035810: 0a3c 6464 3e3c 636f 6465 3e64 3c2f 636f .
    d - Diameter o │ │ │ +00035830: 6620 6561 6368 2070 6978 656c 206e 6569 f each pixel nei │ │ │ +00035840: 6768 626f 7268 6f6f 6420 7468 6174 2069 ghborhood that i │ │ │ +00035850: 7320 7573 6564 2064 7572 696e 6720 6669 s used during fi │ │ │ +00035860: 6c74 6572 696e 672e 2049 6620 6974 2069 ltering. If it i │ │ │ +00035870: 7320 6e6f 6e2d 706f 7369 7469 7665 2c0a s non-positive,. │ │ │ +00035880: 2069 7420 6973 2063 6f6d 7075 7465 6420 it is computed │ │ │ +00035890: 6672 6f6d 2073 6967 6d61 5370 6163 6520 from sigmaSpace │ │ │ +000358a0: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    sigmaColor - Filter sigm │ │ │ +000358d0: 6120 696e 2074 6865 2063 6f6c 6f72 2073 a in the color s │ │ │ +000358e0: 7061 6365 2e20 4120 6c61 7267 6572 2076 pace. A larger v │ │ │ +000358f0: 616c 7565 206f 6620 7468 6520 7061 7261 alue of the para │ │ │ +00035900: 6d65 7465 7220 6d65 616e 7320 7468 6174 meter means that │ │ │ +00035910: 0a20 6661 7274 6865 7220 636f 6c6f 7273 . farther colors │ │ │ +00035920: 2077 6974 6869 6e20 7468 6520 7069 7865 within the pixe │ │ │ +00035930: 6c20 6e65 6967 6862 6f72 686f 6f64 2028 l neighborhood ( │ │ │ +00035940: 7365 6520 7369 676d 6153 7061 6365 2029 see sigmaSpace ) │ │ │ +00035950: 2077 696c 6c20 6265 206d 6978 6564 2074 will be mixed t │ │ │ +00035960: 6f67 6574 6865 722c 2072 6573 756c 7469 ogether, resulti │ │ │ +00035970: 6e67 2069 6e0a 206c 6172 6765 7220 6172 ng in. larger ar │ │ │ +00035980: 6561 7320 6f66 2073 656d 692d 6571 7561 eas of semi-equa │ │ │ +00035990: 6c20 636f 6c6f 722e 3c2f 6464 3e0a 3c64 l color.
    .sigmaSpa │ │ │ +000359b0: 6365 3c2f 636f 6465 3e20 2d20 4669 6c74 ce - Filt │ │ │ +000359c0: 6572 2073 6967 6d61 2069 6e20 7468 6520 er sigma in the │ │ │ +000359d0: 636f 6f72 6469 6e61 7465 2073 7061 6365 coordinate space │ │ │ +000359e0: 2e20 4120 6c61 7267 6572 2076 616c 7565 . A larger value │ │ │ +000359f0: 206f 6620 7468 6520 7061 7261 6d65 7465 of the paramete │ │ │ +00035a00: 7220 6d65 616e 7320 7468 6174 0a20 6661 r means that. fa │ │ │ +00035a10: 7274 6865 7220 7069 7865 6c73 2077 696c rther pixels wil │ │ │ +00035a20: 6c20 696e 666c 7565 6e63 6520 6561 6368 l influence each │ │ │ +00035a30: 206f 7468 6572 2061 7320 6c6f 6e67 2061 other as long a │ │ │ +00035a40: 7320 7468 6569 7220 636f 6c6f 7273 2061 s their colors a │ │ │ +00035a50: 7265 2063 6c6f 7365 2065 6e6f 7567 6820 re close enough │ │ │ +00035a60: 2873 6565 2073 6967 6d61 436f 6c6f 7220 (see sigmaColor │ │ │ +00035a70: 292e 0a20 5768 656e 2064 2667 743b 3020 ).. When d>0 │ │ │ +00035a80: 2c20 6974 2073 7065 6369 6669 6573 2074 , it specifies t │ │ │ +00035a90: 6865 206e 6569 6768 626f 7268 6f6f 6420 he neighborhood │ │ │ +00035aa0: 7369 7a65 2072 6567 6172 646c 6573 7320 size regardless │ │ │ +00035ab0: 6f66 2073 6967 6d61 5370 6163 6520 2e20 of sigmaSpace . │ │ │ +00035ac0: 4f74 6865 7277 6973 652c 2064 2069 730a Otherwise, d is. │ │ │ +00035ad0: 2070 726f 706f 7274 696f 6e61 6c20 746f proportional to │ │ │ +00035ae0: 2073 6967 6d61 5370 6163 6520 2e0a 0a0a sigmaSpace .... │ │ │ +00035af0: 0a20 3c62 3e4e 6f74 653a 3c2f 623e 2020 . Note: │ │ │ +00035b00: 726f 6c6c 696e 6747 7569 6461 6e63 6546 rollingGuidanceF │ │ │ +00035b10: 696c 7465 7220 7573 6573 206a 6f69 6e74 ilter uses joint │ │ │ +00035b20: 4269 6c61 7465 7261 6c46 696c 7465 7220 BilateralFilter │ │ │ +00035b30: 6173 2074 6865 2065 6467 652d 7072 6573 as the edge-pres │ │ │ +00035b40: 6572 7669 6e67 2066 696c 7465 722e 0a0a erving filter... │ │ │ +00035b50: 2053 4545 3a20 6a6f 696e 7442 696c 6174 SEE: jointBilat │ │ │ +00035b60: 6572 616c 4669 6c74 6572 2c20 6269 6c61 eralFilter, bila │ │ │ +00035b70: 7465 7261 6c46 696c 7465 722c 2061 6d46 teralFilter, amF │ │ │ +00035b80: 696c 7465 723c 2f64 643e 0a3c 2f64 6c3e ilter. │ │ │ +00035b90: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .

    .
  • .
  • .
    .< │ │ │ +00035c10: 6833 3e72 6f6c 6c69 6e67 4775 6964 616e h3>rollingGuidan │ │ │ +00035c20: 6365 4669 6c74 6572 3c2f 6833 3e0a 3c64 ceFilter
  • .public stati │ │ │ +00035c70: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c void rollingGuida │ │ │ +00035cd0: 6e63 6546 696c 7465 723c 2f73 7061 6e3e nceFilter │ │ │ +00035ce0: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ +00035d00: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ +00035d10: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ +00035d20: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +00035d30: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat src,. Mat dst,. int │ │ │ +00035da0: 266e 6273 703b 642c 0a20 646f 7562 6c65  d,. double │ │ │ +00035db0: 266e 6273 703b 7369 676d 6143 6f6c 6f72  sigmaColor │ │ │ +00035dc0: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ).< │ │ │ +00035dd0: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ +00035de0: 223e 4170 706c 6965 7320 7468 6520 726f ">Applies the ro │ │ │ +00035df0: 6c6c 696e 6720 6775 6964 616e 6365 2066 lling guidance f │ │ │ +00035e00: 696c 7465 7220 746f 2061 6e20 696d 6167 ilter to an imag │ │ │ +00035e10: 652e 0a0a 2046 6f72 206d 6f72 6520 6465 e... For more de │ │ │ +00035e20: 7461 696c 732c 2070 6c65 6173 6520 7365 tails, please se │ │ │ +00035e30: 6520 4349 5445 3a20 7a68 616e 6732 3031 e CITE: zhang201 │ │ │ +00035e40: 3472 6f6c 6c69 6e67 3c2f 6469 763e 0a3c 4rolling.< │ │ │ +00035e50: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ +00035e60: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
    Parameters │ │ │ +00035e70: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
    .
    src - So │ │ │ +00035e90: 7572 6365 2038 2d62 6974 206f 7220 666c urce 8-bit or fl │ │ │ +00035ea0: 6f61 7469 6e67 2d70 6f69 6e74 2c20 312d oating-point, 1- │ │ │ +00035eb0: 6368 616e 6e65 6c20 6f72 2033 2d63 6861 channel or 3-cha │ │ │ +00035ec0: 6e6e 656c 2069 6d61 6765 2e3c 2f64 643e nnel image.
    │ │ │ +00035ed0: 0a3c 6464 3e3c 636f 6465 3e64 7374 3c2f .
    dst - Destinat │ │ │ +00035ef0: 696f 6e20 696d 6167 6520 6f66 2074 6865 ion image of the │ │ │ +00035f00: 2073 616d 6520 7369 7a65 2061 6e64 2074 same size and t │ │ │ +00035f10: 7970 6520 6173 2073 7263 2e3c 2f64 643e ype as src.
    │ │ │ +00035f20: 0a3c 6464 3e3c 636f 6465 3e64 3c2f 636f .
    d - Diameter o │ │ │ +00035f40: 6620 6561 6368 2070 6978 656c 206e 6569 f each pixel nei │ │ │ +00035f50: 6768 626f 7268 6f6f 6420 7468 6174 2069 ghborhood that i │ │ │ +00035f60: 7320 7573 6564 2064 7572 696e 6720 6669 s used during fi │ │ │ +00035f70: 6c74 6572 696e 672e 2049 6620 6974 2069 ltering. If it i │ │ │ +00035f80: 7320 6e6f 6e2d 706f 7369 7469 7665 2c0a s non-positive,. │ │ │ +00035f90: 2069 7420 6973 2063 6f6d 7075 7465 6420 it is computed │ │ │ +00035fa0: 6672 6f6d 2073 6967 6d61 5370 6163 6520 from sigmaSpace │ │ │ +00035fb0: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    sigmaColor - Filter sigm │ │ │ +00035fe0: 6120 696e 2074 6865 2063 6f6c 6f72 2073 a in the color s │ │ │ +00035ff0: 7061 6365 2e20 4120 6c61 7267 6572 2076 pace. A larger v │ │ │ +00036000: 616c 7565 206f 6620 7468 6520 7061 7261 alue of the para │ │ │ +00036010: 6d65 7465 7220 6d65 616e 7320 7468 6174 meter means that │ │ │ +00036020: 0a20 6661 7274 6865 7220 636f 6c6f 7273 . farther colors │ │ │ +00036030: 2077 6974 6869 6e20 7468 6520 7069 7865 within the pixe │ │ │ +00036040: 6c20 6e65 6967 6862 6f72 686f 6f64 2028 l neighborhood ( │ │ │ +00036050: 7365 6520 7369 676d 6153 7061 6365 2029 see sigmaSpace ) │ │ │ +00036060: 2077 696c 6c20 6265 206d 6978 6564 2074 will be mixed t │ │ │ +00036070: 6f67 6574 6865 722c 2072 6573 756c 7469 ogether, resulti │ │ │ +00036080: 6e67 2069 6e0a 206c 6172 6765 7220 6172 ng in. larger ar │ │ │ +00036090: 6561 7320 6f66 2073 656d 692d 6571 7561 eas of semi-equa │ │ │ +000360a0: 6c20 636f 6c6f 722e 0a0a 2066 6172 7468 l color... farth │ │ │ +000360b0: 6572 2070 6978 656c 7320 7769 6c6c 2069 er pixels will i │ │ │ +000360c0: 6e66 6c75 656e 6365 2065 6163 6820 6f74 nfluence each ot │ │ │ +000360d0: 6865 7220 6173 206c 6f6e 6720 6173 2074 her as long as t │ │ │ +000360e0: 6865 6972 2063 6f6c 6f72 7320 6172 6520 heir colors are │ │ │ +000360f0: 636c 6f73 6520 656e 6f75 6768 2028 7365 close enough (se │ │ │ +00036100: 6520 7369 676d 6143 6f6c 6f72 2029 2e0a e sigmaColor ).. │ │ │ +00036110: 2057 6865 6e20 6426 6774 3b30 202c 2069 When d>0 , i │ │ │ +00036120: 7420 7370 6563 6966 6965 7320 7468 6520 t specifies the │ │ │ +00036130: 6e65 6967 6862 6f72 686f 6f64 2073 697a neighborhood siz │ │ │ +00036140: 6520 7265 6761 7264 6c65 7373 206f 6620 e regardless of │ │ │ +00036150: 7369 676d 6153 7061 6365 202e 204f 7468 sigmaSpace . Oth │ │ │ +00036160: 6572 7769 7365 2c20 6420 6973 0a20 7072 erwise, d is. pr │ │ │ +00036170: 6f70 6f72 7469 6f6e 616c 2074 6f20 7369 oportional to si │ │ │ +00036180: 676d 6153 7061 6365 202e 0a0a 0a0a 203c gmaSpace ..... < │ │ │ +00036190: 623e 4e6f 7465 3a3c 2f62 3e20 2072 6f6c b>Note: rol │ │ │ +000361a0: 6c69 6e67 4775 6964 616e 6365 4669 6c74 lingGuidanceFilt │ │ │ +000361b0: 6572 2075 7365 7320 6a6f 696e 7442 696c er uses jointBil │ │ │ +000361c0: 6174 6572 616c 4669 6c74 6572 2061 7320 ateralFilter as │ │ │ +000361d0: 7468 6520 6564 6765 2d70 7265 7365 7276 the edge-preserv │ │ │ +000361e0: 696e 6720 6669 6c74 6572 2e0a 0a20 5345 ing filter... SE │ │ │ +000361f0: 453a 206a 6f69 6e74 4269 6c61 7465 7261 E: jointBilatera │ │ │ +00036200: 6c46 696c 7465 722c 2062 696c 6174 6572 lFilter, bilater │ │ │ +00036210: 616c 4669 6c74 6572 2c20 616d 4669 6c74 alFilter, amFilt │ │ │ +00036220: 6572 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f er
    ...
  • .< │ │ │ +00036240: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    rolling │ │ │ +000362b0: 4775 6964 616e 6365 4669 6c74 6572 3c2f GuidanceFilter.
    public │ │ │ +00036300: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ +00036310: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;vo │ │ │ +00036330: 6964 3c2f 7370 616e 3e26 6e62 7370 3b3c id < │ │ │ +00036340: 7370 616e 2063 6c61 7373 3d22 656c 656d span class="elem │ │ │ +00036350: 656e 742d 6e61 6d65 223e 726f 6c6c 696e ent-name">rollin │ │ │ +00036360: 6747 7569 6461 6e63 6546 696c 7465 723c gGuidanceFilter< │ │ │ +00036370: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(Mat sr │ │ │ +000363e0: 632c 0a20 3c61 2068 7265 663d 222e 2e2f c,. │ │ │ +00036420: 4d61 743c 2f61 3e26 6e62 7370 3b64 7374 Mat dst │ │ │ +00036430: 2c0a 2069 6e74 266e 6273 703b 6429 3c2f ,. int d)
    .
    A │ │ │ +00036460: 7070 6c69 6573 2074 6865 2072 6f6c 6c69 pplies the rolli │ │ │ +00036470: 6e67 2067 7569 6461 6e63 6520 6669 6c74 ng guidance filt │ │ │ +00036480: 6572 2074 6f20 616e 2069 6d61 6765 2e0a er to an image.. │ │ │ +00036490: 0a20 466f 7220 6d6f 7265 2064 6574 6169 . For more detai │ │ │ +000364a0: 6c73 2c20 706c 6561 7365 2073 6565 2043 ls, please see C │ │ │ +000364b0: 4954 453a 207a 6861 6e67 3230 3134 726f ITE: zhang2014ro │ │ │ +000364c0: 6c6c 696e 673c 2f64 6976 3e0a 3c64 6c20 lling
    .
    .< │ │ │ +000364e0: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
    sr │ │ │ +00036500: 633c 2f63 6f64 653e 202d 2053 6f75 7263 c - Sourc │ │ │ +00036510: 6520 382d 6269 7420 6f72 2066 6c6f 6174 e 8-bit or float │ │ │ +00036520: 696e 672d 706f 696e 742c 2031 2d63 6861 ing-point, 1-cha │ │ │ +00036530: 6e6e 656c 206f 7220 332d 6368 616e 6e65 nnel or 3-channe │ │ │ +00036540: 6c20 696d 6167 652e 3c2f 6464 3e0a 3c64 l image.
    .dst - Destination │ │ │ +00036570: 2069 6d61 6765 206f 6620 7468 6520 7361 image of the sa │ │ │ +00036580: 6d65 2073 697a 6520 616e 6420 7479 7065 me size and type │ │ │ +00036590: 2061 7320 7372 632e 3c2f 6464 3e0a 3c64 as src..d │ │ │ +000365b0: 202d 2044 6961 6d65 7465 7220 6f66 2065 - Diameter of e │ │ │ +000365c0: 6163 6820 7069 7865 6c20 6e65 6967 6862 ach pixel neighb │ │ │ +000365d0: 6f72 686f 6f64 2074 6861 7420 6973 2075 orhood that is u │ │ │ +000365e0: 7365 6420 6475 7269 6e67 2066 696c 7465 sed during filte │ │ │ +000365f0: 7269 6e67 2e20 4966 2069 7420 6973 206e ring. If it is n │ │ │ +00036600: 6f6e 2d70 6f73 6974 6976 652c 0a20 6974 on-positive,. it │ │ │ +00036610: 2069 7320 636f 6d70 7574 6564 2066 726f is computed fro │ │ │ +00036620: 6d20 7369 676d 6153 7061 6365 202e 0a0a m sigmaSpace ... │ │ │ +00036630: 2066 6172 7468 6572 2063 6f6c 6f72 7320 farther colors │ │ │ +00036640: 7769 7468 696e 2074 6865 2070 6978 656c within the pixel │ │ │ +00036650: 206e 6569 6768 626f 7268 6f6f 6420 2873 neighborhood (s │ │ │ +00036660: 6565 2073 6967 6d61 5370 6163 6520 2920 ee sigmaSpace ) │ │ │ +00036670: 7769 6c6c 2062 6520 6d69 7865 6420 746f will be mixed to │ │ │ +00036680: 6765 7468 6572 2c20 7265 7375 6c74 696e gether, resultin │ │ │ +00036690: 6720 696e 0a20 6c61 7267 6572 2061 7265 g in. larger are │ │ │ +000366a0: 6173 206f 6620 7365 6d69 2d65 7175 616c as of semi-equal │ │ │ +000366b0: 2063 6f6c 6f72 2e0a 0a20 6661 7274 6865 color... farthe │ │ │ +000366c0: 7220 7069 7865 6c73 2077 696c 6c20 696e r pixels will in │ │ │ +000366d0: 666c 7565 6e63 6520 6561 6368 206f 7468 fluence each oth │ │ │ +000366e0: 6572 2061 7320 6c6f 6e67 2061 7320 7468 er as long as th │ │ │ +000366f0: 6569 7220 636f 6c6f 7273 2061 7265 2063 eir colors are c │ │ │ +00036700: 6c6f 7365 2065 6e6f 7567 6820 2873 6565 lose enough (see │ │ │ +00036710: 2073 6967 6d61 436f 6c6f 7220 292e 0a20 sigmaColor ).. │ │ │ +00036720: 5768 656e 2064 2667 743b 3020 2c20 6974 When d>0 , it │ │ │ +00036730: 2073 7065 6369 6669 6573 2074 6865 206e specifies the n │ │ │ +00036740: 6569 6768 626f 7268 6f6f 6420 7369 7a65 eighborhood size │ │ │ +00036750: 2072 6567 6172 646c 6573 7320 6f66 2073 regardless of s │ │ │ +00036760: 6967 6d61 5370 6163 6520 2e20 4f74 6865 igmaSpace . Othe │ │ │ +00036770: 7277 6973 652c 2064 2069 730a 2070 726f rwise, d is. pro │ │ │ +00036780: 706f 7274 696f 6e61 6c20 746f 2073 6967 portional to sig │ │ │ +00036790: 6d61 5370 6163 6520 2e0a 0a0a 0a20 3c62 maSpace ..... Note: roll │ │ │ +000367b0: 696e 6747 7569 6461 6e63 6546 696c 7465 ingGuidanceFilte │ │ │ +000367c0: 7220 7573 6573 206a 6f69 6e74 4269 6c61 r uses jointBila │ │ │ +000367d0: 7465 7261 6c46 696c 7465 7220 6173 2074 teralFilter as t │ │ │ +000367e0: 6865 2065 6467 652d 7072 6573 6572 7669 he edge-preservi │ │ │ +000367f0: 6e67 2066 696c 7465 722e 0a0a 2053 4545 ng filter... SEE │ │ │ +00036800: 3a20 6a6f 696e 7442 696c 6174 6572 616c : jointBilateral │ │ │ +00036810: 4669 6c74 6572 2c20 6269 6c61 7465 7261 Filter, bilatera │ │ │ +00036820: 6c46 696c 7465 722c 2061 6d46 696c 7465 lFilter, amFilte │ │ │ +00036830: 723c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 r.
    .
    ...
    . │ │ │ +000368b0: 3c68 333e 726f 6c6c 696e 6747 7569 6461

    rollingGuida │ │ │ +000368c0: 6e63 6546 696c 7465 723c 2f68 333e 0a3c nceFilter

    .< │ │ │ +000368d0: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ +000368e0: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ +00036910: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ +00036920: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ +00036930: 726e 2d74 7970 6522 3e76 6f69 643c 2f73 rn-type">void
     rollingGuid │ │ │ +00036970: 616e 6365 4669 6c74 6572 3c2f 7370 616e anceFilter( │ │ │ +000369a0: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ +000369e0: 2f61 3e26 6e62 7370 3b73 7263 2c0a 203c /a> src,. < │ │ │ +000369f0: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ +00036a00: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ +00036a10: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +00036a20: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat dst).
    App │ │ │ +00036a60: 6c69 6573 2074 6865 2072 6f6c 6c69 6e67 lies the rolling │ │ │ +00036a70: 2067 7569 6461 6e63 6520 6669 6c74 6572 guidance filter │ │ │ +00036a80: 2074 6f20 616e 2069 6d61 6765 2e0a 0a20 to an image... │ │ │ +00036a90: 466f 7220 6d6f 7265 2064 6574 6169 6c73 For more details │ │ │ +00036aa0: 2c20 706c 6561 7365 2073 6565 2043 4954 , please see CIT │ │ │ +00036ab0: 453a 207a 6861 6e67 3230 3134 726f 6c6c E: zhang2014roll │ │ │ +00036ac0: 696e 673c 2f64 6976 3e0a 3c64 6c20 636c ing
    .
    .
    Parameters:
    .
    src< │ │ │ +00036b00: 2f63 6f64 653e 202d 2053 6f75 7263 6520 /code> - Source │ │ │ +00036b10: 382d 6269 7420 6f72 2066 6c6f 6174 696e 8-bit or floatin │ │ │ +00036b20: 672d 706f 696e 742c 2031 2d63 6861 6e6e g-point, 1-chann │ │ │ +00036b30: 656c 206f 7220 332d 6368 616e 6e65 6c20 el or 3-channel │ │ │ +00036b40: 696d 6167 652e 3c2f 6464 3e0a 3c64 643e image.
    .
    │ │ │ +00036b50: 3c63 6f64 653e 6473 743c 2f63 6f64 653e dst │ │ │ +00036b60: 202d 2044 6573 7469 6e61 7469 6f6e 2069 - Destination i │ │ │ +00036b70: 6d61 6765 206f 6620 7468 6520 7361 6d65 mage of the same │ │ │ +00036b80: 2073 697a 6520 616e 6420 7479 7065 2061 size and type a │ │ │ +00036b90: 7320 7372 632e 0a0a 2069 7420 6973 2063 s src... it is c │ │ │ +00036ba0: 6f6d 7075 7465 6420 6672 6f6d 2073 6967 omputed from sig │ │ │ +00036bb0: 6d61 5370 6163 6520 2e0a 0a20 6661 7274 maSpace ... fart │ │ │ +00036bc0: 6865 7220 636f 6c6f 7273 2077 6974 6869 her colors withi │ │ │ +00036bd0: 6e20 7468 6520 7069 7865 6c20 6e65 6967 n the pixel neig │ │ │ +00036be0: 6862 6f72 686f 6f64 2028 7365 6520 7369 hborhood (see si │ │ │ +00036bf0: 676d 6153 7061 6365 2029 2077 696c 6c20 gmaSpace ) will │ │ │ +00036c00: 6265 206d 6978 6564 2074 6f67 6574 6865 be mixed togethe │ │ │ +00036c10: 722c 2072 6573 756c 7469 6e67 2069 6e0a r, resulting in. │ │ │ +00036c20: 206c 6172 6765 7220 6172 6561 7320 6f66 larger areas of │ │ │ +00036c30: 2073 656d 692d 6571 7561 6c20 636f 6c6f semi-equal colo │ │ │ +00036c40: 722e 0a0a 2066 6172 7468 6572 2070 6978 r... farther pix │ │ │ +00036c50: 656c 7320 7769 6c6c 2069 6e66 6c75 656e els will influen │ │ │ +00036c60: 6365 2065 6163 6820 6f74 6865 7220 6173 ce each other as │ │ │ +00036c70: 206c 6f6e 6720 6173 2074 6865 6972 2063 long as their c │ │ │ +00036c80: 6f6c 6f72 7320 6172 6520 636c 6f73 6520 olors are close │ │ │ +00036c90: 656e 6f75 6768 2028 7365 6520 7369 676d enough (see sigm │ │ │ +00036ca0: 6143 6f6c 6f72 2029 2e0a 2057 6865 6e20 aColor ).. When │ │ │ +00036cb0: 6426 6774 3b30 202c 2069 7420 7370 6563 d>0 , it spec │ │ │ +00036cc0: 6966 6965 7320 7468 6520 6e65 6967 6862 ifies the neighb │ │ │ +00036cd0: 6f72 686f 6f64 2073 697a 6520 7265 6761 orhood size rega │ │ │ +00036ce0: 7264 6c65 7373 206f 6620 7369 676d 6153 rdless of sigmaS │ │ │ +00036cf0: 7061 6365 202e 204f 7468 6572 7769 7365 pace . Otherwise │ │ │ +00036d00: 2c20 6420 6973 0a20 7072 6f70 6f72 7469 , d is. proporti │ │ │ +00036d10: 6f6e 616c 2074 6f20 7369 676d 6153 7061 onal to sigmaSpa │ │ │ +00036d20: 6365 202e 0a0a 0a0a 203c 623e 4e6f 7465 ce ..... Note │ │ │ +00036d30: 3a3c 2f62 3e20 2072 6f6c 6c69 6e67 4775 : rollingGu │ │ │ +00036d40: 6964 616e 6365 4669 6c74 6572 2075 7365 idanceFilter use │ │ │ +00036d50: 7320 6a6f 696e 7442 696c 6174 6572 616c s jointBilateral │ │ │ +00036d60: 4669 6c74 6572 2061 7320 7468 6520 6564 Filter as the ed │ │ │ +00036d70: 6765 2d70 7265 7365 7276 696e 6720 6669 ge-preserving fi │ │ │ +00036d80: 6c74 6572 2e0a 0a20 5345 453a 206a 6f69 lter... SEE: joi │ │ │ +00036d90: 6e74 4269 6c61 7465 7261 6c46 696c 7465 ntBilateralFilte │ │ │ +00036da0: 722c 2062 696c 6174 6572 616c 4669 6c74 r, bilateralFilt │ │ │ +00036db0: 6572 2c20 616d 4669 6c74 6572 3c2f 6464 er, amFilter
    .
    ...
  • ..

    crea │ │ │ +00036e60: 7465 4661 7374 4269 6c61 7465 7261 6c53 teFastBilateralS │ │ │ +00036e70: 6f6c 7665 7246 696c 7465 723c 2f68 333e olverFilter

    │ │ │ +00036e80: 0a3c 6469 7620 636c 6173 733d 226d 656d .
    < │ │ │ +00036ea0: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ +00036eb0: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ +00036ec0: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ +00036ed0: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;FastBil │ │ │ +00036f40: 6174 6572 616c 536f 6c76 6572 4669 6c74 ateralSolverFilt │ │ │ +00036f50: 6572 3c2f 613e 3c2f 7370 616e 3e26 6e62 er&nb │ │ │ +00036f60: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;cr │ │ │ +00036f80: 6561 7465 4661 7374 4269 6c61 7465 7261 eateFastBilatera │ │ │ +00036f90: 6c53 6f6c 7665 7246 696c 7465 723c 2f73 lSolverFilter(M │ │ │ +00037000: 6174 3c2f 613e 266e 6273 703b 6775 6964 at guid │ │ │ +00037010: 652c 0a20 646f 7562 6c65 266e 6273 703b e,. double  │ │ │ +00037020: 7369 676d 615f 7370 6174 6961 6c2c 0a20 sigma_spatial,. │ │ │ +00037030: 646f 7562 6c65 266e 6273 703b 7369 676d double sigm │ │ │ +00037040: 615f 6c75 6d61 2c0a 2064 6f75 626c 6526 a_luma,. double& │ │ │ +00037050: 6e62 7370 3b73 6967 6d61 5f63 6872 6f6d nbsp;sigma_chrom │ │ │ +00037060: 612c 0a20 646f 7562 6c65 266e 6273 703b a,. double  │ │ │ +00037070: 6c61 6d62 6461 2c0a 2069 6e74 266e 6273 lambda,. int&nbs │ │ │ +00037080: 703b 6e75 6d5f 6974 6572 2c0a 2064 6f75 p;num_iter,. dou │ │ │ +00037090: 626c 6526 6e62 7370 3b6d 6178 5f74 6f6c ble max_tol │ │ │ +000370a0: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    .< │ │ │ +000370b0: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ +000370c0: 223e 4661 6374 6f72 7920 6d65 7468 6f64 ">Factory method │ │ │ +000370d0: 2c20 6372 6561 7465 2069 6e73 7461 6e63 , create instanc │ │ │ +000370e0: 6520 6f66 2046 6173 7442 696c 6174 6572 e of FastBilater │ │ │ +000370f0: 616c 536f 6c76 6572 4669 6c74 6572 2061 alSolverFilter a │ │ │ +00037100: 6e64 2065 7865 6375 7465 2074 6865 2069 nd execute the i │ │ │ +00037110: 6e69 7469 616c 697a 6174 696f 6e20 726f nitialization ro │ │ │ +00037120: 7574 696e 6573 2e3c 2f64 6976 3e0a 3c64 utines.. │ │ │ +00037140: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ +00037150: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +00037160: 6775 6964 653c 2f63 6f64 653e 202d 2069 guide - i │ │ │ +00037170: 6d61 6765 2073 6572 7669 6e67 2061 7320 mage serving as │ │ │ +00037180: 6775 6964 6520 666f 7220 6669 6c74 6572 guide for filter │ │ │ +00037190: 696e 672e 2049 7420 7368 6f75 6c64 2068 ing. It should h │ │ │ +000371a0: 6176 6520 382d 6269 7420 6465 7074 6820 ave 8-bit depth │ │ │ +000371b0: 616e 6420 6569 7468 6572 2031 206f 7220 and either 1 or │ │ │ +000371c0: 3320 6368 616e 6e65 6c73 2e3c 2f64 643e 3 channels.
    │ │ │ +000371d0: 0a3c 6464 3e3c 636f 6465 3e73 6967 6d61 .
    sigma │ │ │ +000371e0: 5f73 7061 7469 616c 3c2f 636f 6465 3e20 _spatial │ │ │ +000371f0: 2d20 7061 7261 6d65 7465 722c 2074 6861 - parameter, tha │ │ │ +00037200: 7420 6973 2073 696d 696c 6172 2074 6f20 t is similar to │ │ │ +00037210: 7370 6174 6961 6c20 7370 6163 6520 7369 spatial space si │ │ │ +00037220: 676d 6120 2862 616e 6477 6964 7468 2920 gma (bandwidth) │ │ │ +00037230: 696e 2062 696c 6174 6572 616c 4669 6c74 in bilateralFilt │ │ │ +00037240: 6572 2e3c 2f64 643e 0a3c 6464 3e3c 636f er.
    .
    sigma_luma - parameter │ │ │ +00037270: 2c20 7468 6174 2069 7320 7369 6d69 6c61 , that is simila │ │ │ +00037280: 7220 746f 206c 756d 6120 7370 6163 6520 r to luma space │ │ │ +00037290: 7369 676d 6120 2862 616e 6477 6964 7468 sigma (bandwidth │ │ │ +000372a0: 2920 696e 2062 696c 6174 6572 616c 4669 ) in bilateralFi │ │ │ +000372b0: 6c74 6572 2e3c 2f64 643e 0a3c 6464 3e3c lter.
    .
    < │ │ │ +000372c0: 636f 6465 3e73 6967 6d61 5f63 6872 6f6d code>sigma_chrom │ │ │ +000372d0: 613c 2f63 6f64 653e 202d 2070 6172 616d a - param │ │ │ +000372e0: 6574 6572 2c20 7468 6174 2069 7320 7369 eter, that is si │ │ │ +000372f0: 6d69 6c61 7220 746f 2063 6872 6f6d 6120 milar to chroma │ │ │ +00037300: 7370 6163 6520 7369 676d 6120 2862 616e space sigma (ban │ │ │ +00037310: 6477 6964 7468 2920 696e 2062 696c 6174 dwidth) in bilat │ │ │ +00037320: 6572 616c 4669 6c74 6572 2e3c 2f64 643e eralFilter.
    │ │ │ +00037330: 0a3c 6464 3e3c 636f 6465 3e6c 616d 6264 .
    lambd │ │ │ +00037340: 613c 2f63 6f64 653e 202d 2073 6d6f 6f74 a - smoot │ │ │ +00037350: 686e 6573 7320 7374 7265 6e67 7468 2070 hness strength p │ │ │ +00037360: 6172 616d 6574 6572 2066 6f72 2073 6f6c arameter for sol │ │ │ +00037370: 7665 722e 3c2f 6464 3e0a 3c64 643e 3c63 ver.
    .
    num_iter - number of │ │ │ +000373a0: 6974 6572 6174 696f 6e73 2075 7365 6420 iterations used │ │ │ +000373b0: 666f 7220 736f 6c76 6572 2c20 3235 2069 for solver, 25 i │ │ │ +000373c0: 7320 7573 7561 6c6c 7920 656e 6f75 6768 s usually enough │ │ │ +000373d0: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    max_tol │ │ │ +000373f0: 2d20 636f 6e76 6572 6765 6e63 6520 746f - convergence to │ │ │ +00037400: 6c65 7261 6e63 6520 7573 6564 2066 6f72 lerance used for │ │ │ +00037410: 2073 6f6c 7665 722e 0a0a 2046 6f72 206d solver... For m │ │ │ +00037420: 6f72 6520 6465 7461 696c 7320 6162 6f75 ore details abou │ │ │ +00037430: 7420 7468 6520 4661 7374 2042 696c 6174 t the Fast Bilat │ │ │ +00037440: 6572 616c 2053 6f6c 7665 7220 7061 7261 eral Solver para │ │ │ +00037450: 6d65 7465 7273 2c20 7365 6520 7468 6520 meters, see the │ │ │ +00037460: 6f72 6967 696e 616c 2070 6170 6572 2043 original paper C │ │ │ +00037470: 4954 453a 2042 6172 726f 6e50 6f6f 6c65 ITE: BarronPoole │ │ │ +00037480: 3230 3136 2e3c 2f64 643e 0a3c 6474 3e52 2016.
    .
    R │ │ │ +00037490: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
    .
    automatically g │ │ │ +000374b0: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ..
  • .< │ │ │ +000374d0: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    createFastBilat │ │ │ +00037560: 6572 616c 536f 6c76 6572 4669 6c74 6572 eralSolverFilter │ │ │ +00037570: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ +000375b0: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ +000375c0: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ +000375e0: 3c61 2068 7265 663d 2246 6173 7442 696c Fa │ │ │ +00037630: 7374 4269 6c61 7465 7261 6c53 6f6c 7665 stBilateralSolve │ │ │ +00037640: 7246 696c 7465 723c 2f61 3e3c 2f73 7061 rFilter createFastBil │ │ │ +00037680: 6174 6572 616c 536f 6c76 6572 4669 6c74 ateralSolverFilt │ │ │ +00037690: 6572 3c2f 7370 616e 3e3c 7762 723e 3c73 er(Mat  │ │ │ +00037700: 3b67 7569 6465 2c0a 2064 6f75 626c 6526 ;guide,. double& │ │ │ +00037710: 6e62 7370 3b73 6967 6d61 5f73 7061 7469 nbsp;sigma_spati │ │ │ +00037720: 616c 2c0a 2064 6f75 626c 6526 6e62 7370 al,. double  │ │ │ +00037730: 3b73 6967 6d61 5f6c 756d 612c 0a20 646f ;sigma_luma,. do │ │ │ +00037740: 7562 6c65 266e 6273 703b 7369 676d 615f uble sigma_ │ │ │ +00037750: 6368 726f 6d61 2c0a 2064 6f75 626c 6526 chroma,. double& │ │ │ +00037760: 6e62 7370 3b6c 616d 6264 612c 0a20 696e nbsp;lambda,. in │ │ │ +00037770: 7426 6e62 7370 3b6e 756d 5f69 7465 7229 t num_iter) │ │ │ +00037780: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .Factory method, │ │ │ +000377b0: 2063 7265 6174 6520 696e 7374 616e 6365 create instance │ │ │ +000377c0: 206f 6620 4661 7374 4269 6c61 7465 7261 of FastBilatera │ │ │ +000377d0: 6c53 6f6c 7665 7246 696c 7465 7220 616e lSolverFilter an │ │ │ +000377e0: 6420 6578 6563 7574 6520 7468 6520 696e d execute the in │ │ │ +000377f0: 6974 6961 6c69 7a61 7469 6f6e 2072 6f75 itialization rou │ │ │ +00037800: 7469 6e65 732e 3c2f 6469 763e 0a3c 646c tines..
    . │ │ │ +00037820: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
    Parameters:< │ │ │ +00037830: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e67 /dt>.
    g │ │ │ +00037840: 7569 6465 3c2f 636f 6465 3e20 2d20 696d uide - im │ │ │ +00037850: 6167 6520 7365 7276 696e 6720 6173 2067 age serving as g │ │ │ +00037860: 7569 6465 2066 6f72 2066 696c 7465 7269 uide for filteri │ │ │ +00037870: 6e67 2e20 4974 2073 686f 756c 6420 6861 ng. It should ha │ │ │ +00037880: 7665 2038 2d62 6974 2064 6570 7468 2061 ve 8-bit depth a │ │ │ +00037890: 6e64 2065 6974 6865 7220 3120 6f72 2033 nd either 1 or 3 │ │ │ +000378a0: 2063 6861 6e6e 656c 732e 3c2f 6464 3e0a channels.
    . │ │ │ +000378b0: 3c64 643e 3c63 6f64 653e 7369 676d 615f
    sigma_ │ │ │ +000378c0: 7370 6174 6961 6c3c 2f63 6f64 653e 202d spatial - │ │ │ +000378d0: 2070 6172 616d 6574 6572 2c20 7468 6174 parameter, that │ │ │ +000378e0: 2069 7320 7369 6d69 6c61 7220 746f 2073 is similar to s │ │ │ +000378f0: 7061 7469 616c 2073 7061 6365 2073 6967 patial space sig │ │ │ +00037900: 6d61 2028 6261 6e64 7769 6474 6829 2069 ma (bandwidth) i │ │ │ +00037910: 6e20 6269 6c61 7465 7261 6c46 696c 7465 n bilateralFilte │ │ │ +00037920: 722e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 r.
    .
    sigma_luma - parameter, │ │ │ +00037950: 2074 6861 7420 6973 2073 696d 696c 6172 that is similar │ │ │ +00037960: 2074 6f20 6c75 6d61 2073 7061 6365 2073 to luma space s │ │ │ +00037970: 6967 6d61 2028 6261 6e64 7769 6474 6829 igma (bandwidth) │ │ │ +00037980: 2069 6e20 6269 6c61 7465 7261 6c46 696c in bilateralFil │ │ │ +00037990: 7465 722e 3c2f 6464 3e0a 3c64 643e 3c63 ter.
    .
    sigma_chroma │ │ │ +000379b0: 3c2f 636f 6465 3e20 2d20 7061 7261 6d65 - parame │ │ │ +000379c0: 7465 722c 2074 6861 7420 6973 2073 696d ter, that is sim │ │ │ +000379d0: 696c 6172 2074 6f20 6368 726f 6d61 2073 ilar to chroma s │ │ │ +000379e0: 7061 6365 2073 6967 6d61 2028 6261 6e64 pace sigma (band │ │ │ +000379f0: 7769 6474 6829 2069 6e20 6269 6c61 7465 width) in bilate │ │ │ +00037a00: 7261 6c46 696c 7465 722e 3c2f 6464 3e0a ralFilter.
    . │ │ │ +00037a10: 3c64 643e 3c63 6f64 653e 6c61 6d62 6461
    lambda │ │ │ +00037a20: 3c2f 636f 6465 3e20 2d20 736d 6f6f 7468 - smooth │ │ │ +00037a30: 6e65 7373 2073 7472 656e 6774 6820 7061 ness strength pa │ │ │ +00037a40: 7261 6d65 7465 7220 666f 7220 736f 6c76 rameter for solv │ │ │ +00037a50: 6572 2e3c 2f64 643e 0a3c 6464 3e3c 636f er.
    .
    num_iter - number of i │ │ │ +00037a80: 7465 7261 7469 6f6e 7320 7573 6564 2066 terations used f │ │ │ +00037a90: 6f72 2073 6f6c 7665 722c 2032 3520 6973 or solver, 25 is │ │ │ +00037aa0: 2075 7375 616c 6c79 2065 6e6f 7567 682e usually enough. │ │ │ +00037ab0: 0a0a 0a20 466f 7220 6d6f 7265 2064 6574 ... For more det │ │ │ +00037ac0: 6169 6c73 2061 626f 7574 2074 6865 2046 ails about the F │ │ │ +00037ad0: 6173 7420 4269 6c61 7465 7261 6c20 536f ast Bilateral So │ │ │ +00037ae0: 6c76 6572 2070 6172 616d 6574 6572 732c lver parameters, │ │ │ +00037af0: 2073 6565 2074 6865 206f 7269 6769 6e61 see the origina │ │ │ +00037b00: 6c20 7061 7065 7220 4349 5445 3a20 4261 l paper CITE: Ba │ │ │ +00037b10: 7272 6f6e 506f 6f6c 6532 3031 362e 3c2f rronPoole2016..
    Returns: │ │ │ +00037b30: 3c2f 6474 3e0a 3c64 643e 6175 746f 6d61
    .
    automa │ │ │ +00037b40: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +00037b50: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
    .
    .
    .
  • ..
    .

    createFast │ │ │ +00037bf0: 4269 6c61 7465 7261 6c53 6f6c 7665 7246 BilateralSolverF │ │ │ +00037c00: 696c 7465 723c 2f68 333e 0a3c 6469 7620 ilter

    .
    public static FastBilateral │ │ │ +00037cd0: 536f 6c76 6572 4669 6c74 6572 3c2f 613e SolverFilter │ │ │ +00037ce0: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  createFa │ │ │ +00037d10: 7374 4269 6c61 7465 7261 6c53 6f6c 7665 stBilateralSolve │ │ │ +00037d20: 7246 696c 7465 723c 2f73 7061 6e3e 3c77 rFilter(Mat │ │ │ +00037d90: 266e 6273 703b 6775 6964 652c 0a20 646f  guide,. do │ │ │ +00037da0: 7562 6c65 266e 6273 703b 7369 676d 615f uble sigma_ │ │ │ +00037db0: 7370 6174 6961 6c2c 0a20 646f 7562 6c65 spatial,. double │ │ │ +00037dc0: 266e 6273 703b 7369 676d 615f 6c75 6d61  sigma_luma │ │ │ +00037dd0: 2c0a 2064 6f75 626c 6526 6e62 7370 3b73 ,. double s │ │ │ +00037de0: 6967 6d61 5f63 6872 6f6d 612c 0a20 646f igma_chroma,. do │ │ │ +00037df0: 7562 6c65 266e 6273 703b 6c61 6d62 6461 uble lambda │ │ │ +00037e00: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    .< │ │ │ +00037e10: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ +00037e20: 223e 4661 6374 6f72 7920 6d65 7468 6f64 ">Factory method │ │ │ +00037e30: 2c20 6372 6561 7465 2069 6e73 7461 6e63 , create instanc │ │ │ +00037e40: 6520 6f66 2046 6173 7442 696c 6174 6572 e of FastBilater │ │ │ +00037e50: 616c 536f 6c76 6572 4669 6c74 6572 2061 alSolverFilter a │ │ │ +00037e60: 6e64 2065 7865 6375 7465 2074 6865 2069 nd execute the i │ │ │ +00037e70: 6e69 7469 616c 697a 6174 696f 6e20 726f nitialization ro │ │ │ +00037e80: 7574 696e 6573 2e3c 2f64 6976 3e0a 3c64 utines.. │ │ │ +00037ea0: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ +00037eb0: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +00037ec0: 6775 6964 653c 2f63 6f64 653e 202d 2069 guide - i │ │ │ +00037ed0: 6d61 6765 2073 6572 7669 6e67 2061 7320 mage serving as │ │ │ +00037ee0: 6775 6964 6520 666f 7220 6669 6c74 6572 guide for filter │ │ │ +00037ef0: 696e 672e 2049 7420 7368 6f75 6c64 2068 ing. It should h │ │ │ +00037f00: 6176 6520 382d 6269 7420 6465 7074 6820 ave 8-bit depth │ │ │ +00037f10: 616e 6420 6569 7468 6572 2031 206f 7220 and either 1 or │ │ │ +00037f20: 3320 6368 616e 6e65 6c73 2e3c 2f64 643e 3 channels.
    │ │ │ +00037f30: 0a3c 6464 3e3c 636f 6465 3e73 6967 6d61 .
    sigma │ │ │ +00037f40: 5f73 7061 7469 616c 3c2f 636f 6465 3e20 _spatial │ │ │ +00037f50: 2d20 7061 7261 6d65 7465 722c 2074 6861 - parameter, tha │ │ │ +00037f60: 7420 6973 2073 696d 696c 6172 2074 6f20 t is similar to │ │ │ +00037f70: 7370 6174 6961 6c20 7370 6163 6520 7369 spatial space si │ │ │ +00037f80: 676d 6120 2862 616e 6477 6964 7468 2920 gma (bandwidth) │ │ │ +00037f90: 696e 2062 696c 6174 6572 616c 4669 6c74 in bilateralFilt │ │ │ +00037fa0: 6572 2e3c 2f64 643e 0a3c 6464 3e3c 636f er.
    .
    sigma_luma - parameter │ │ │ +00037fd0: 2c20 7468 6174 2069 7320 7369 6d69 6c61 , that is simila │ │ │ +00037fe0: 7220 746f 206c 756d 6120 7370 6163 6520 r to luma space │ │ │ +00037ff0: 7369 676d 6120 2862 616e 6477 6964 7468 sigma (bandwidth │ │ │ +00038000: 2920 696e 2062 696c 6174 6572 616c 4669 ) in bilateralFi │ │ │ +00038010: 6c74 6572 2e3c 2f64 643e 0a3c 6464 3e3c lter.
    .
    < │ │ │ +00038020: 636f 6465 3e73 6967 6d61 5f63 6872 6f6d code>sigma_chrom │ │ │ +00038030: 613c 2f63 6f64 653e 202d 2070 6172 616d a - param │ │ │ +00038040: 6574 6572 2c20 7468 6174 2069 7320 7369 eter, that is si │ │ │ +00038050: 6d69 6c61 7220 746f 2063 6872 6f6d 6120 milar to chroma │ │ │ +00038060: 7370 6163 6520 7369 676d 6120 2862 616e space sigma (ban │ │ │ +00038070: 6477 6964 7468 2920 696e 2062 696c 6174 dwidth) in bilat │ │ │ +00038080: 6572 616c 4669 6c74 6572 2e3c 2f64 643e eralFilter.
    │ │ │ +00038090: 0a3c 6464 3e3c 636f 6465 3e6c 616d 6264 .
    lambd │ │ │ +000380a0: 613c 2f63 6f64 653e 202d 2073 6d6f 6f74 a - smoot │ │ │ +000380b0: 686e 6573 7320 7374 7265 6e67 7468 2070 hness strength p │ │ │ +000380c0: 6172 616d 6574 6572 2066 6f72 2073 6f6c arameter for sol │ │ │ +000380d0: 7665 722e 0a0a 0a0a 2046 6f72 206d 6f72 ver..... For mor │ │ │ +000380e0: 6520 6465 7461 696c 7320 6162 6f75 7420 e details about │ │ │ +000380f0: 7468 6520 4661 7374 2042 696c 6174 6572 the Fast Bilater │ │ │ +00038100: 616c 2053 6f6c 7665 7220 7061 7261 6d65 al Solver parame │ │ │ +00038110: 7465 7273 2c20 7365 6520 7468 6520 6f72 ters, see the or │ │ │ +00038120: 6967 696e 616c 2070 6170 6572 2043 4954 iginal paper CIT │ │ │ +00038130: 453a 2042 6172 726f 6e50 6f6f 6c65 3230 E: BarronPoole20 │ │ │ +00038140: 3136 2e3c 2f64 643e 0a3c 6474 3e52 6574 16.
    .
    Ret │ │ │ +00038150: 7572 6e73 3a3c 2f64 743e 0a3c 6464 3e61 urns:
    .
    a │ │ │ +00038160: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ +00038170: 6572 6174 6564 3c2f 6464 3e0a 3c2f 646c erated
    ..
    ..
  • .
    . │ │ │ +00038200: 3c68 333e 6372 6561 7465 4661 7374 4269

    createFastBi │ │ │ +00038210: 6c61 7465 7261 6c53 6f6c 7665 7246 696c lateralSolverFil │ │ │ +00038220: 7465 723c 2f68 333e 0a3c 6469 7620 636c ter

    .
    p │ │ │ +00038260: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static FastBilateralSo │ │ │ +000382f0: 6c76 6572 4669 6c74 6572 3c2f 613e 3c2f lverFilter createFast │ │ │ +00038330: 4269 6c61 7465 7261 6c53 6f6c 7665 7246 BilateralSolverF │ │ │ +00038340: 696c 7465 723c 2f73 7061 6e3e 3c77 6272 ilter(Mat&n │ │ │ +000383b0: 6273 703b 6775 6964 652c 0a20 646f 7562 bsp;guide,. doub │ │ │ +000383c0: 6c65 266e 6273 703b 7369 676d 615f 7370 le sigma_sp │ │ │ +000383d0: 6174 6961 6c2c 0a20 646f 7562 6c65 266e atial,. double&n │ │ │ +000383e0: 6273 703b 7369 676d 615f 6c75 6d61 2c0a bsp;sigma_luma,. │ │ │ +000383f0: 2064 6f75 626c 6526 6e62 7370 3b73 6967 double sig │ │ │ +00038400: 6d61 5f63 6872 6f6d 6129 3c2f 7370 616e ma_chroma)
    .
    Facto │ │ │ +00038430: 7279 206d 6574 686f 642c 2063 7265 6174 ry method, creat │ │ │ +00038440: 6520 696e 7374 616e 6365 206f 6620 4661 e instance of Fa │ │ │ +00038450: 7374 4269 6c61 7465 7261 6c53 6f6c 7665 stBilateralSolve │ │ │ +00038460: 7246 696c 7465 7220 616e 6420 6578 6563 rFilter and exec │ │ │ +00038470: 7574 6520 7468 6520 696e 6974 6961 6c69 ute the initiali │ │ │ +00038480: 7a61 7469 6f6e 2072 6f75 7469 6e65 732e zation routines. │ │ │ +00038490: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ +000384b0: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ +000384c0: 6464 3e3c 636f 6465 3e67 7569 6465 3c2f dd>guide - image se │ │ │ +000384e0: 7276 696e 6720 6173 2067 7569 6465 2066 rving as guide f │ │ │ +000384f0: 6f72 2066 696c 7465 7269 6e67 2e20 4974 or filtering. It │ │ │ +00038500: 2073 686f 756c 6420 6861 7665 2038 2d62 should have 8-b │ │ │ +00038510: 6974 2064 6570 7468 2061 6e64 2065 6974 it depth and eit │ │ │ +00038520: 6865 7220 3120 6f72 2033 2063 6861 6e6e her 1 or 3 chann │ │ │ +00038530: 656c 732e 3c2f 6464 3e0a 3c64 643e 3c63 els..
    sigma_spatia │ │ │ +00038550: 6c3c 2f63 6f64 653e 202d 2070 6172 616d l - param │ │ │ +00038560: 6574 6572 2c20 7468 6174 2069 7320 7369 eter, that is si │ │ │ +00038570: 6d69 6c61 7220 746f 2073 7061 7469 616c milar to spatial │ │ │ +00038580: 2073 7061 6365 2073 6967 6d61 2028 6261 space sigma (ba │ │ │ +00038590: 6e64 7769 6474 6829 2069 6e20 6269 6c61 ndwidth) in bila │ │ │ +000385a0: 7465 7261 6c46 696c 7465 722e 3c2f 6464 teralFilter.
    .
    sigm │ │ │ +000385c0: 615f 6c75 6d61 3c2f 636f 6465 3e20 2d20 a_luma - │ │ │ +000385d0: 7061 7261 6d65 7465 722c 2074 6861 7420 parameter, that │ │ │ +000385e0: 6973 2073 696d 696c 6172 2074 6f20 6c75 is similar to lu │ │ │ +000385f0: 6d61 2073 7061 6365 2073 6967 6d61 2028 ma space sigma ( │ │ │ +00038600: 6261 6e64 7769 6474 6829 2069 6e20 6269 bandwidth) in bi │ │ │ +00038610: 6c61 7465 7261 6c46 696c 7465 722e 3c2f lateralFilter..
    si │ │ │ +00038630: 676d 615f 6368 726f 6d61 3c2f 636f 6465 gma_chroma - parameter, t │ │ │ +00038650: 6861 7420 6973 2073 696d 696c 6172 2074 hat is similar t │ │ │ +00038660: 6f20 6368 726f 6d61 2073 7061 6365 2073 o chroma space s │ │ │ +00038670: 6967 6d61 2028 6261 6e64 7769 6474 6829 igma (bandwidth) │ │ │ +00038680: 2069 6e20 6269 6c61 7465 7261 6c46 696c in bilateralFil │ │ │ +00038690: 7465 722e 0a0a 0a0a 0a20 466f 7220 6d6f ter...... For mo │ │ │ +000386a0: 7265 2064 6574 6169 6c73 2061 626f 7574 re details about │ │ │ +000386b0: 2074 6865 2046 6173 7420 4269 6c61 7465 the Fast Bilate │ │ │ +000386c0: 7261 6c20 536f 6c76 6572 2070 6172 616d ral Solver param │ │ │ +000386d0: 6574 6572 732c 2073 6565 2074 6865 206f eters, see the o │ │ │ +000386e0: 7269 6769 6e61 6c20 7061 7065 7220 4349 riginal paper CI │ │ │ +000386f0: 5445 3a20 4261 7272 6f6e 506f 6f6c 6532 TE: BarronPoole2 │ │ │ +00038700: 3031 362e 3c2f 6464 3e0a 3c64 743e 5265 016.
    .
    Re │ │ │ +00038710: 7475 726e 733a 3c2f 6474 3e0a 3c64 643e turns:
    .
    │ │ │ +00038720: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +00038730: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
    ..
    ..
  • ..

    fas │ │ │ +00038810: 7442 696c 6174 6572 616c 536f 6c76 6572 tBilateralSolver │ │ │ +00038820: 4669 6c74 6572 3c2f 6833 3e0a 3c64 6976 Filter

    .
    public static< │ │ │ +00038870: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> void fastBilateralS │ │ │ +000388d0: 6f6c 7665 7246 696c 7465 723c 2f73 7061 olverFilter │ │ │ +00038900: 283c 6120 6872 6566 3d22 2e2e 2f63 6f72 (Mat │ │ │ +00038940: 3c2f 613e 266e 6273 703b 6775 6964 652c  guide, │ │ │ +00038950: 0a20 3c61 2068 7265 663d 222e 2e2f 636f . Ma │ │ │ +00038990: 743c 2f61 3e26 6e62 7370 3b73 7263 2c0a t src,. │ │ │ +000389a0: 203c 6120 6872 6566 3d22 2e2e 2f63 6f72 Mat │ │ │ +000389e0: 3c2f 613e 266e 6273 703b 636f 6e66 6964  confid │ │ │ +000389f0: 656e 6365 2c0a 203c 6120 6872 6566 3d22 ence,. Mat  │ │ │ +00038a40: 6473 742c 0a20 646f 7562 6c65 266e 6273 dst,. double&nbs │ │ │ +00038a50: 703b 7369 676d 615f 7370 6174 6961 6c2c p;sigma_spatial, │ │ │ +00038a60: 0a20 646f 7562 6c65 266e 6273 703b 7369 . double si │ │ │ +00038a70: 676d 615f 6c75 6d61 2c0a 2064 6f75 626c gma_luma,. doubl │ │ │ +00038a80: 6526 6e62 7370 3b73 6967 6d61 5f63 6872 e sigma_chr │ │ │ +00038a90: 6f6d 612c 0a20 646f 7562 6c65 266e 6273 oma,. double&nbs │ │ │ +00038aa0: 703b 6c61 6d62 6461 2c0a 2069 6e74 266e p;lambda,. int&n │ │ │ +00038ab0: 6273 703b 6e75 6d5f 6974 6572 2c0a 2064 bsp;num_iter,. d │ │ │ +00038ac0: 6f75 626c 6526 6e62 7370 3b6d 6178 5f74 ouble max_t │ │ │ +00038ad0: 6f6c 293c 2f73 7061 6e3e 3c2f 6469 763e ol)
    │ │ │ +00038ae0: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
    Simple one-l │ │ │ +00038b00: 696e 6520 4661 7374 2042 696c 6174 6572 ine Fast Bilater │ │ │ +00038b10: 616c 2053 6f6c 7665 7220 6669 6c74 6572 al Solver filter │ │ │ +00038b20: 2063 616c 6c2e 2049 6620 796f 7520 6861 call. If you ha │ │ │ +00038b30: 7665 206d 756c 7469 706c 6520 696d 6167 ve multiple imag │ │ │ +00038b40: 6573 2074 6f20 6669 6c74 6572 2077 6974 es to filter wit │ │ │ +00038b50: 6820 7468 6520 7361 6d65 0a20 6775 6964 h the same. guid │ │ │ +00038b60: 6520 7468 656e 2075 7365 2046 6173 7442 e then use FastB │ │ │ +00038b70: 696c 6174 6572 616c 536f 6c76 6572 4669 ilateralSolverFi │ │ │ +00038b80: 6c74 6572 2069 6e74 6572 6661 6365 2074 lter interface t │ │ │ +00038b90: 6f20 6176 6f69 6420 6578 7472 6120 636f o avoid extra co │ │ │ +00038ba0: 6d70 7574 6174 696f 6e73 2e3c 2f64 6976 mputations.
    .
    .
    Paramet │ │ │ +00038bd0: 6572 733a 3c2f 6474 3e0a 3c64 643e 3c63 ers:
    .
    guide │ │ │ +00038bf0: 202d 2069 6d61 6765 2073 6572 7669 6e67 - image serving │ │ │ +00038c00: 2061 7320 6775 6964 6520 666f 7220 6669 as guide for fi │ │ │ +00038c10: 6c74 6572 696e 672e 2049 7420 7368 6f75 ltering. It shou │ │ │ +00038c20: 6c64 2068 6176 6520 382d 6269 7420 6465 ld have 8-bit de │ │ │ +00038c30: 7074 6820 616e 6420 6569 7468 6572 2031 pth and either 1 │ │ │ +00038c40: 206f 7220 3320 6368 616e 6e65 6c73 2e3c or 3 channels.< │ │ │ +00038c50: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e73 /dd>.
    s │ │ │ +00038c60: 7263 3c2f 636f 6465 3e20 2d20 736f 7572 rc - sour │ │ │ +00038c70: 6365 2069 6d61 6765 2066 6f72 2066 696c ce image for fil │ │ │ +00038c80: 7465 7269 6e67 2077 6974 6820 756e 7369 tering with unsi │ │ │ +00038c90: 676e 6564 2038 2d62 6974 206f 7220 7369 gned 8-bit or si │ │ │ +00038ca0: 676e 6564 2031 362d 6269 7420 6f72 2066 gned 16-bit or f │ │ │ +00038cb0: 6c6f 6174 696e 672d 706f 696e 7420 3332 loating-point 32 │ │ │ +00038cc0: 2d62 6974 2064 6570 7468 2061 6e64 2075 -bit depth and u │ │ │ +00038cd0: 7020 746f 2034 2063 6861 6e6e 656c 732e p to 4 channels. │ │ │ +00038ce0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +00038cf0: 636f 6e66 6964 656e 6365 3c2f 636f 6465 confidence - confidence i │ │ │ +00038d10: 6d61 6765 2077 6974 6820 756e 7369 676e mage with unsign │ │ │ +00038d20: 6564 2038 2d62 6974 206f 7220 666c 6f61 ed 8-bit or floa │ │ │ +00038d30: 7469 6e67 2d70 6f69 6e74 2033 322d 6269 ting-point 32-bi │ │ │ +00038d40: 7420 636f 6e66 6964 656e 6365 2061 6e64 t confidence and │ │ │ +00038d50: 2031 2063 6861 6e6e 656c 2e3c 2f64 643e 1 channel.
    │ │ │ +00038d60: 0a3c 6464 3e3c 636f 6465 3e64 7374 3c2f .
    dst - destinat │ │ │ +00038d80: 696f 6e20 696d 6167 652e 3c2f 6464 3e0a ion image.
    . │ │ │ +00038d90: 3c64 643e 3c63 6f64 653e 7369 676d 615f
    sigma_ │ │ │ +00038da0: 7370 6174 6961 6c3c 2f63 6f64 653e 202d spatial - │ │ │ +00038db0: 2070 6172 616d 6574 6572 2c20 7468 6174 parameter, that │ │ │ +00038dc0: 2069 7320 7369 6d69 6c61 7220 746f 2073 is similar to s │ │ │ +00038dd0: 7061 7469 616c 2073 7061 6365 2073 6967 patial space sig │ │ │ +00038de0: 6d61 2028 6261 6e64 7769 6474 6829 2069 ma (bandwidth) i │ │ │ +00038df0: 6e20 6269 6c61 7465 7261 6c46 696c 7465 n bilateralFilte │ │ │ +00038e00: 722e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 r.
    .
    sigma_luma - parameter, │ │ │ +00038e30: 2074 6861 7420 6973 2073 696d 696c 6172 that is similar │ │ │ +00038e40: 2074 6f20 6c75 6d61 2073 7061 6365 2073 to luma space s │ │ │ +00038e50: 6967 6d61 2028 6261 6e64 7769 6474 6829 igma (bandwidth) │ │ │ +00038e60: 2069 6e20 6269 6c61 7465 7261 6c46 696c in bilateralFil │ │ │ +00038e70: 7465 722e 3c2f 6464 3e0a 3c64 643e 3c63 ter.
    .
    sigma_chroma │ │ │ +00038e90: 3c2f 636f 6465 3e20 2d20 7061 7261 6d65 - parame │ │ │ +00038ea0: 7465 722c 2074 6861 7420 6973 2073 696d ter, that is sim │ │ │ +00038eb0: 696c 6172 2074 6f20 6368 726f 6d61 2073 ilar to chroma s │ │ │ +00038ec0: 7061 6365 2073 6967 6d61 2028 6261 6e64 pace sigma (band │ │ │ +00038ed0: 7769 6474 6829 2069 6e20 6269 6c61 7465 width) in bilate │ │ │ +00038ee0: 7261 6c46 696c 7465 722e 3c2f 6464 3e0a ralFilter.
    . │ │ │ +00038ef0: 3c64 643e 3c63 6f64 653e 6c61 6d62 6461
    lambda │ │ │ +00038f00: 3c2f 636f 6465 3e20 2d20 736d 6f6f 7468 - smooth │ │ │ +00038f10: 6e65 7373 2073 7472 656e 6774 6820 7061 ness strength pa │ │ │ +00038f20: 7261 6d65 7465 7220 666f 7220 736f 6c76 rameter for solv │ │ │ +00038f30: 6572 2e3c 2f64 643e 0a3c 6464 3e3c 636f er.
    .
    num_iter - number of i │ │ │ +00038f60: 7465 7261 7469 6f6e 7320 7573 6564 2066 terations used f │ │ │ +00038f70: 6f72 2073 6f6c 7665 722c 2032 3520 6973 or solver, 25 is │ │ │ +00038f80: 2075 7375 616c 6c79 2065 6e6f 7567 682e usually enough. │ │ │ +00038f90: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +00038fa0: 6d61 785f 746f 6c3c 2f63 6f64 653e 202d max_tol - │ │ │ +00038fb0: 2063 6f6e 7665 7267 656e 6365 2074 6f6c convergence tol │ │ │ +00038fc0: 6572 616e 6365 2075 7365 6420 666f 7220 erance used for │ │ │ +00038fd0: 736f 6c76 6572 2e0a 0a20 466f 7220 6d6f solver... For mo │ │ │ +00038fe0: 7265 2064 6574 6169 6c73 2061 626f 7574 re details about │ │ │ +00038ff0: 2074 6865 2046 6173 7420 4269 6c61 7465 the Fast Bilate │ │ │ +00039000: 7261 6c20 536f 6c76 6572 2070 6172 616d ral Solver param │ │ │ +00039010: 6574 6572 732c 2073 6565 2074 6865 206f eters, see the o │ │ │ +00039020: 7269 6769 6e61 6c20 7061 7065 7220 4349 riginal paper CI │ │ │ +00039030: 5445 3a20 4261 7272 6f6e 506f 6f6c 6532 TE: BarronPoole2 │ │ │ +00039040: 3031 362e 0a0a 203c 623e 4e6f 7465 3a3c 016... Note:< │ │ │ +00039050: 2f62 3e20 436f 6e66 6964 656e 6365 2069 /b> Confidence i │ │ │ +00039060: 6d61 6765 7320 7769 7468 2043 565f 3855 mages with CV_8U │ │ │ +00039070: 2064 6570 7468 2061 7265 2065 7870 6563 depth are expec │ │ │ +00039080: 7465 6420 746f 2069 6e20 5b30 2c20 3235 ted to in [0, 25 │ │ │ +00039090: 355d 2061 6e64 2043 565f 3332 4620 696e 5] and CV_32F in │ │ │ +000390a0: 205b 302c 2031 5d20 7261 6e67 652e 3c2f [0, 1] range..
    ..
  • .
  • . │ │ │ +000390d0: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    fas │ │ │ +00039180: 7442 696c 6174 6572 616c 536f 6c76 6572 tBilateralSolver │ │ │ +00039190: 4669 6c74 6572 3c2f 6833 3e0a 3c64 6976 Filter

    .
    public static< │ │ │ +000391e0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> void fastBilateralS │ │ │ +00039240: 6f6c 7665 7246 696c 7465 723c 2f73 7061 olverFilter │ │ │ +00039270: 283c 6120 6872 6566 3d22 2e2e 2f63 6f72 (Mat │ │ │ +000392b0: 3c2f 613e 266e 6273 703b 6775 6964 652c  guide, │ │ │ +000392c0: 0a20 3c61 2068 7265 663d 222e 2e2f 636f . Ma │ │ │ +00039300: 743c 2f61 3e26 6e62 7370 3b73 7263 2c0a t src,. │ │ │ +00039310: 203c 6120 6872 6566 3d22 2e2e 2f63 6f72 Mat │ │ │ +00039350: 3c2f 613e 266e 6273 703b 636f 6e66 6964  confid │ │ │ +00039360: 656e 6365 2c0a 203c 6120 6872 6566 3d22 ence,. Mat  │ │ │ +000393b0: 6473 742c 0a20 646f 7562 6c65 266e 6273 dst,. double&nbs │ │ │ +000393c0: 703b 7369 676d 615f 7370 6174 6961 6c2c p;sigma_spatial, │ │ │ +000393d0: 0a20 646f 7562 6c65 266e 6273 703b 7369 . double si │ │ │ +000393e0: 676d 615f 6c75 6d61 2c0a 2064 6f75 626c gma_luma,. doubl │ │ │ +000393f0: 6526 6e62 7370 3b73 6967 6d61 5f63 6872 e sigma_chr │ │ │ +00039400: 6f6d 612c 0a20 646f 7562 6c65 266e 6273 oma,. double&nbs │ │ │ +00039410: 703b 6c61 6d62 6461 2c0a 2069 6e74 266e p;lambda,. int&n │ │ │ +00039420: 6273 703b 6e75 6d5f 6974 6572 293c 2f73 bsp;num_iter)
    .
    Si │ │ │ +00039450: 6d70 6c65 206f 6e65 2d6c 696e 6520 4661 mple one-line Fa │ │ │ +00039460: 7374 2042 696c 6174 6572 616c 2053 6f6c st Bilateral Sol │ │ │ +00039470: 7665 7220 6669 6c74 6572 2063 616c 6c2e ver filter call. │ │ │ +00039480: 2049 6620 796f 7520 6861 7665 206d 756c If you have mul │ │ │ +00039490: 7469 706c 6520 696d 6167 6573 2074 6f20 tiple images to │ │ │ +000394a0: 6669 6c74 6572 2077 6974 6820 7468 6520 filter with the │ │ │ +000394b0: 7361 6d65 0a20 6775 6964 6520 7468 656e same. guide then │ │ │ +000394c0: 2075 7365 2046 6173 7442 696c 6174 6572 use FastBilater │ │ │ +000394d0: 616c 536f 6c76 6572 4669 6c74 6572 2069 alSolverFilter i │ │ │ +000394e0: 6e74 6572 6661 6365 2074 6f20 6176 6f69 nterface to avoi │ │ │ +000394f0: 6420 6578 7472 6120 636f 6d70 7574 6174 d extra computat │ │ │ +00039500: 696f 6e73 2e3c 2f64 6976 3e0a 3c64 6c20 ions.
    .
    .< │ │ │ +00039520: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
    gu │ │ │ +00039540: 6964 653c 2f63 6f64 653e 202d 2069 6d61 ide - ima │ │ │ +00039550: 6765 2073 6572 7669 6e67 2061 7320 6775 ge serving as gu │ │ │ +00039560: 6964 6520 666f 7220 6669 6c74 6572 696e ide for filterin │ │ │ +00039570: 672e 2049 7420 7368 6f75 6c64 2068 6176 g. It should hav │ │ │ +00039580: 6520 382d 6269 7420 6465 7074 6820 616e e 8-bit depth an │ │ │ +00039590: 6420 6569 7468 6572 2031 206f 7220 3320 d either 1 or 3 │ │ │ +000395a0: 6368 616e 6e65 6c73 2e3c 2f64 643e 0a3c channels.
    .< │ │ │ +000395b0: 6464 3e3c 636f 6465 3e73 7263 3c2f 636f dd>src - source ima │ │ │ +000395d0: 6765 2066 6f72 2066 696c 7465 7269 6e67 ge for filtering │ │ │ +000395e0: 2077 6974 6820 756e 7369 676e 6564 2038 with unsigned 8 │ │ │ +000395f0: 2d62 6974 206f 7220 7369 676e 6564 2031 -bit or signed 1 │ │ │ +00039600: 362d 6269 7420 6f72 2066 6c6f 6174 696e 6-bit or floatin │ │ │ +00039610: 672d 706f 696e 7420 3332 2d62 6974 2064 g-point 32-bit d │ │ │ +00039620: 6570 7468 2061 6e64 2075 7020 746f 2034 epth and up to 4 │ │ │ +00039630: 2063 6861 6e6e 656c 732e 3c2f 6464 3e0a channels.. │ │ │ +00039640: 3c64 643e 3c63 6f64 653e 636f 6e66 6964
    confid │ │ │ +00039650: 656e 6365 3c2f 636f 6465 3e20 2d20 636f ence - co │ │ │ +00039660: 6e66 6964 656e 6365 2069 6d61 6765 2077 nfidence image w │ │ │ +00039670: 6974 6820 756e 7369 676e 6564 2038 2d62 ith unsigned 8-b │ │ │ +00039680: 6974 206f 7220 666c 6f61 7469 6e67 2d70 it or floating-p │ │ │ +00039690: 6f69 6e74 2033 322d 6269 7420 636f 6e66 oint 32-bit conf │ │ │ +000396a0: 6964 656e 6365 2061 6e64 2031 2063 6861 idence and 1 cha │ │ │ +000396b0: 6e6e 656c 2e3c 2f64 643e 0a3c 6464 3e3c nnel.
    .
    < │ │ │ +000396c0: 636f 6465 3e64 7374 3c2f 636f 6465 3e20 code>dst │ │ │ +000396d0: 2d20 6465 7374 696e 6174 696f 6e20 696d - destination im │ │ │ +000396e0: 6167 652e 3c2f 6464 3e0a 3c64 643e 3c63 age.
    .
    sigma_spatia │ │ │ +00039700: 6c3c 2f63 6f64 653e 202d 2070 6172 616d l - param │ │ │ +00039710: 6574 6572 2c20 7468 6174 2069 7320 7369 eter, that is si │ │ │ +00039720: 6d69 6c61 7220 746f 2073 7061 7469 616c milar to spatial │ │ │ +00039730: 2073 7061 6365 2073 6967 6d61 2028 6261 space sigma (ba │ │ │ +00039740: 6e64 7769 6474 6829 2069 6e20 6269 6c61 ndwidth) in bila │ │ │ +00039750: 7465 7261 6c46 696c 7465 722e 3c2f 6464 teralFilter.
    .
    sigm │ │ │ +00039770: 615f 6c75 6d61 3c2f 636f 6465 3e20 2d20 a_luma - │ │ │ +00039780: 7061 7261 6d65 7465 722c 2074 6861 7420 parameter, that │ │ │ +00039790: 6973 2073 696d 696c 6172 2074 6f20 6c75 is similar to lu │ │ │ +000397a0: 6d61 2073 7061 6365 2073 6967 6d61 2028 ma space sigma ( │ │ │ +000397b0: 6261 6e64 7769 6474 6829 2069 6e20 6269 bandwidth) in bi │ │ │ +000397c0: 6c61 7465 7261 6c46 696c 7465 722e 3c2f lateralFilter..
    si │ │ │ +000397e0: 676d 615f 6368 726f 6d61 3c2f 636f 6465 gma_chroma - parameter, t │ │ │ +00039800: 6861 7420 6973 2073 696d 696c 6172 2074 hat is similar t │ │ │ +00039810: 6f20 6368 726f 6d61 2073 7061 6365 2073 o chroma space s │ │ │ +00039820: 6967 6d61 2028 6261 6e64 7769 6474 6829 igma (bandwidth) │ │ │ +00039830: 2069 6e20 6269 6c61 7465 7261 6c46 696c in bilateralFil │ │ │ +00039840: 7465 722e 3c2f 6464 3e0a 3c64 643e 3c63 ter.
    .
    lambda - smoothness s │ │ │ +00039870: 7472 656e 6774 6820 7061 7261 6d65 7465 trength paramete │ │ │ +00039880: 7220 666f 7220 736f 6c76 6572 2e3c 2f64 r for solver..
    num │ │ │ +000398a0: 5f69 7465 723c 2f63 6f64 653e 202d 206e _iter - n │ │ │ +000398b0: 756d 6265 7220 6f66 2069 7465 7261 7469 umber of iterati │ │ │ +000398c0: 6f6e 7320 7573 6564 2066 6f72 2073 6f6c ons used for sol │ │ │ +000398d0: 7665 722c 2032 3520 6973 2075 7375 616c ver, 25 is usual │ │ │ +000398e0: 6c79 2065 6e6f 7567 682e 0a0a 0a20 466f ly enough.... Fo │ │ │ +000398f0: 7220 6d6f 7265 2064 6574 6169 6c73 2061 r more details a │ │ │ +00039900: 626f 7574 2074 6865 2046 6173 7420 4269 bout the Fast Bi │ │ │ +00039910: 6c61 7465 7261 6c20 536f 6c76 6572 2070 lateral Solver p │ │ │ +00039920: 6172 616d 6574 6572 732c 2073 6565 2074 arameters, see t │ │ │ +00039930: 6865 206f 7269 6769 6e61 6c20 7061 7065 he original pape │ │ │ +00039940: 7220 4349 5445 3a20 4261 7272 6f6e 506f r CITE: BarronPo │ │ │ +00039950: 6f6c 6532 3031 362e 0a0a 203c 623e 4e6f ole2016... No │ │ │ +00039960: 7465 3a3c 2f62 3e20 436f 6e66 6964 656e te: Confiden │ │ │ +00039970: 6365 2069 6d61 6765 7320 7769 7468 2043 ce images with C │ │ │ +00039980: 565f 3855 2064 6570 7468 2061 7265 2065 V_8U depth are e │ │ │ +00039990: 7870 6563 7465 6420 746f 2069 6e20 5b30 xpected to in [0 │ │ │ +000399a0: 2c20 3235 355d 2061 6e64 2043 565f 3332 , 255] and CV_32 │ │ │ +000399b0: 4620 696e 205b 302c 2031 5d20 7261 6e67 F in [0, 1] rang │ │ │ +000399c0: 652e 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f e.
    .
    ..
  • .< │ │ │ +000399e0: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    fas │ │ │ +00039a90: 7442 696c 6174 6572 616c 536f 6c76 6572 tBilateralSolver │ │ │ +00039aa0: 4669 6c74 6572 3c2f 6833 3e0a 3c64 6976 Filter

    .
    public static< │ │ │ +00039af0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> void fastBilateralS │ │ │ +00039b50: 6f6c 7665 7246 696c 7465 723c 2f73 7061 olverFilter │ │ │ +00039b80: 283c 6120 6872 6566 3d22 2e2e 2f63 6f72 (Mat │ │ │ +00039bc0: 3c2f 613e 266e 6273 703b 6775 6964 652c  guide, │ │ │ +00039bd0: 0a20 3c61 2068 7265 663d 222e 2e2f 636f . Ma │ │ │ +00039c10: 743c 2f61 3e26 6e62 7370 3b73 7263 2c0a t src,. │ │ │ +00039c20: 203c 6120 6872 6566 3d22 2e2e 2f63 6f72 Mat │ │ │ +00039c60: 3c2f 613e 266e 6273 703b 636f 6e66 6964  confid │ │ │ +00039c70: 656e 6365 2c0a 203c 6120 6872 6566 3d22 ence,. Mat  │ │ │ +00039cc0: 6473 742c 0a20 646f 7562 6c65 266e 6273 dst,. double&nbs │ │ │ +00039cd0: 703b 7369 676d 615f 7370 6174 6961 6c2c p;sigma_spatial, │ │ │ +00039ce0: 0a20 646f 7562 6c65 266e 6273 703b 7369 . double si │ │ │ +00039cf0: 676d 615f 6c75 6d61 2c0a 2064 6f75 626c gma_luma,. doubl │ │ │ +00039d00: 6526 6e62 7370 3b73 6967 6d61 5f63 6872 e sigma_chr │ │ │ +00039d10: 6f6d 612c 0a20 646f 7562 6c65 266e 6273 oma,. double&nbs │ │ │ +00039d20: 703b 6c61 6d62 6461 293c 2f73 7061 6e3e p;lambda) │ │ │ +00039d30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    Simple │ │ │ +00039d50: 206f 6e65 2d6c 696e 6520 4661 7374 2042 one-line Fast B │ │ │ +00039d60: 696c 6174 6572 616c 2053 6f6c 7665 7220 ilateral Solver │ │ │ +00039d70: 6669 6c74 6572 2063 616c 6c2e 2049 6620 filter call. If │ │ │ +00039d80: 796f 7520 6861 7665 206d 756c 7469 706c you have multipl │ │ │ +00039d90: 6520 696d 6167 6573 2074 6f20 6669 6c74 e images to filt │ │ │ +00039da0: 6572 2077 6974 6820 7468 6520 7361 6d65 er with the same │ │ │ +00039db0: 0a20 6775 6964 6520 7468 656e 2075 7365 . guide then use │ │ │ +00039dc0: 2046 6173 7442 696c 6174 6572 616c 536f FastBilateralSo │ │ │ +00039dd0: 6c76 6572 4669 6c74 6572 2069 6e74 6572 lverFilter inter │ │ │ +00039de0: 6661 6365 2074 6f20 6176 6f69 6420 6578 face to avoid ex │ │ │ +00039df0: 7472 6120 636f 6d70 7574 6174 696f 6e73 tra computations │ │ │ +00039e00: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 .
    .
    .
    P │ │ │ +00039e20: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ +00039e30: 3c64 643e 3c63 6f64 653e 6775 6964 653c
    guide< │ │ │ +00039e40: 2f63 6f64 653e 202d 2069 6d61 6765 2073 /code> - image s │ │ │ +00039e50: 6572 7669 6e67 2061 7320 6775 6964 6520 erving as guide │ │ │ +00039e60: 666f 7220 6669 6c74 6572 696e 672e 2049 for filtering. I │ │ │ +00039e70: 7420 7368 6f75 6c64 2068 6176 6520 382d t should have 8- │ │ │ +00039e80: 6269 7420 6465 7074 6820 616e 6420 6569 bit depth and ei │ │ │ +00039e90: 7468 6572 2031 206f 7220 3320 6368 616e ther 1 or 3 chan │ │ │ +00039ea0: 6e65 6c73 2e3c 2f64 643e 0a3c 6464 3e3c nels.
    .
    < │ │ │ +00039eb0: 636f 6465 3e73 7263 3c2f 636f 6465 3e20 code>src │ │ │ +00039ec0: 2d20 736f 7572 6365 2069 6d61 6765 2066 - source image f │ │ │ +00039ed0: 6f72 2066 696c 7465 7269 6e67 2077 6974 or filtering wit │ │ │ +00039ee0: 6820 756e 7369 676e 6564 2038 2d62 6974 h unsigned 8-bit │ │ │ +00039ef0: 206f 7220 7369 676e 6564 2031 362d 6269 or signed 16-bi │ │ │ +00039f00: 7420 6f72 2066 6c6f 6174 696e 672d 706f t or floating-po │ │ │ +00039f10: 696e 7420 3332 2d62 6974 2064 6570 7468 int 32-bit depth │ │ │ +00039f20: 2061 6e64 2075 7020 746f 2034 2063 6861 and up to 4 cha │ │ │ +00039f30: 6e6e 656c 732e 3c2f 6464 3e0a 3c64 643e nnels.
    .
    │ │ │ +00039f40: 3c63 6f64 653e 636f 6e66 6964 656e 6365 confidence │ │ │ +00039f50: 3c2f 636f 6465 3e20 2d20 636f 6e66 6964 - confid │ │ │ +00039f60: 656e 6365 2069 6d61 6765 2077 6974 6820 ence image with │ │ │ +00039f70: 756e 7369 676e 6564 2038 2d62 6974 206f unsigned 8-bit o │ │ │ +00039f80: 7220 666c 6f61 7469 6e67 2d70 6f69 6e74 r floating-point │ │ │ +00039f90: 2033 322d 6269 7420 636f 6e66 6964 656e 32-bit confiden │ │ │ +00039fa0: 6365 2061 6e64 2031 2063 6861 6e6e 656c ce and 1 channel │ │ │ +00039fb0: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    dst - de │ │ │ +00039fd0: 7374 696e 6174 696f 6e20 696d 6167 652e stination image. │ │ │ +00039fe0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +00039ff0: 7369 676d 615f 7370 6174 6961 6c3c 2f63 sigma_spatial - parameter │ │ │ +0003a010: 2c20 7468 6174 2069 7320 7369 6d69 6c61 , that is simila │ │ │ +0003a020: 7220 746f 2073 7061 7469 616c 2073 7061 r to spatial spa │ │ │ +0003a030: 6365 2073 6967 6d61 2028 6261 6e64 7769 ce sigma (bandwi │ │ │ +0003a040: 6474 6829 2069 6e20 6269 6c61 7465 7261 dth) in bilatera │ │ │ +0003a050: 6c46 696c 7465 722e 3c2f 6464 3e0a 3c64 lFilter.
    .sigma_lu │ │ │ +0003a070: 6d61 3c2f 636f 6465 3e20 2d20 7061 7261 ma - para │ │ │ +0003a080: 6d65 7465 722c 2074 6861 7420 6973 2073 meter, that is s │ │ │ +0003a090: 696d 696c 6172 2074 6f20 6c75 6d61 2073 imilar to luma s │ │ │ +0003a0a0: 7061 6365 2073 6967 6d61 2028 6261 6e64 pace sigma (band │ │ │ +0003a0b0: 7769 6474 6829 2069 6e20 6269 6c61 7465 width) in bilate │ │ │ +0003a0c0: 7261 6c46 696c 7465 722e 3c2f 6464 3e0a ralFilter.. │ │ │ +0003a0d0: 3c64 643e 3c63 6f64 653e 7369 676d 615f
    sigma_ │ │ │ +0003a0e0: 6368 726f 6d61 3c2f 636f 6465 3e20 2d20 chroma - │ │ │ +0003a0f0: 7061 7261 6d65 7465 722c 2074 6861 7420 parameter, that │ │ │ +0003a100: 6973 2073 696d 696c 6172 2074 6f20 6368 is similar to ch │ │ │ +0003a110: 726f 6d61 2073 7061 6365 2073 6967 6d61 roma space sigma │ │ │ +0003a120: 2028 6261 6e64 7769 6474 6829 2069 6e20 (bandwidth) in │ │ │ +0003a130: 6269 6c61 7465 7261 6c46 696c 7465 722e bilateralFilter. │ │ │ +0003a140: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0003a150: 6c61 6d62 6461 3c2f 636f 6465 3e20 2d20 lambda - │ │ │ +0003a160: 736d 6f6f 7468 6e65 7373 2073 7472 656e smoothness stren │ │ │ +0003a170: 6774 6820 7061 7261 6d65 7465 7220 666f gth parameter fo │ │ │ +0003a180: 7220 736f 6c76 6572 2e0a 0a0a 0a20 466f r solver..... Fo │ │ │ +0003a190: 7220 6d6f 7265 2064 6574 6169 6c73 2061 r more details a │ │ │ +0003a1a0: 626f 7574 2074 6865 2046 6173 7420 4269 bout the Fast Bi │ │ │ +0003a1b0: 6c61 7465 7261 6c20 536f 6c76 6572 2070 lateral Solver p │ │ │ +0003a1c0: 6172 616d 6574 6572 732c 2073 6565 2074 arameters, see t │ │ │ +0003a1d0: 6865 206f 7269 6769 6e61 6c20 7061 7065 he original pape │ │ │ +0003a1e0: 7220 4349 5445 3a20 4261 7272 6f6e 506f r CITE: BarronPo │ │ │ +0003a1f0: 6f6c 6532 3031 362e 0a0a 203c 623e 4e6f ole2016... No │ │ │ +0003a200: 7465 3a3c 2f62 3e20 436f 6e66 6964 656e te: Confiden │ │ │ +0003a210: 6365 2069 6d61 6765 7320 7769 7468 2043 ce images with C │ │ │ +0003a220: 565f 3855 2064 6570 7468 2061 7265 2065 V_8U depth are e │ │ │ +0003a230: 7870 6563 7465 6420 746f 2069 6e20 5b30 xpected to in [0 │ │ │ +0003a240: 2c20 3235 355d 2061 6e64 2043 565f 3332 , 255] and CV_32 │ │ │ +0003a250: 4620 696e 205b 302c 2031 5d20 7261 6e67 F in [0, 1] rang │ │ │ +0003a260: 652e 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f e.
    .
    ...< │ │ │ +0003a280: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    fastBilate │ │ │ +0003a330: 7261 6c53 6f6c 7665 7246 696c 7465 723c ralSolverFilter< │ │ │ +0003a340: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ +0003a380: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ +0003a390: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;v │ │ │ +0003a3b0: 6f69 643c 2f73 7061 6e3e 266e 6273 703b oid  │ │ │ +0003a3c0: 3c73 7061 6e20 636c 6173 733d 2265 6c65 fastB │ │ │ +0003a3e0: 696c 6174 6572 616c 536f 6c76 6572 4669 ilateralSolverFi │ │ │ +0003a3f0: 6c74 6572 3c2f 7370 616e 3e3c 7762 723e lter │ │ │ +0003a400: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Mat&nb │ │ │ +0003a460: 7370 3b67 7569 6465 2c0a 203c 6120 6872 sp;guide,. Mat&n │ │ │ +0003a4b0: 6273 703b 7372 632c 0a20 3c61 2068 7265 bsp;src,. Mat&nb │ │ │ +0003a500: 7370 3b63 6f6e 6669 6465 6e63 652c 0a20 sp;confidence,. │ │ │ +0003a510: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ +0003a550: 2f61 3e26 6e62 7370 3b64 7374 2c0a 2064 /a> dst,. d │ │ │ +0003a560: 6f75 626c 6526 6e62 7370 3b73 6967 6d61 ouble sigma │ │ │ +0003a570: 5f73 7061 7469 616c 2c0a 2064 6f75 626c _spatial,. doubl │ │ │ +0003a580: 6526 6e62 7370 3b73 6967 6d61 5f6c 756d e sigma_lum │ │ │ +0003a590: 612c 0a20 646f 7562 6c65 266e 6273 703b a,. double  │ │ │ +0003a5a0: 7369 676d 615f 6368 726f 6d61 293c 2f73 sigma_chroma)
    .
    Si │ │ │ +0003a5d0: 6d70 6c65 206f 6e65 2d6c 696e 6520 4661 mple one-line Fa │ │ │ +0003a5e0: 7374 2042 696c 6174 6572 616c 2053 6f6c st Bilateral Sol │ │ │ +0003a5f0: 7665 7220 6669 6c74 6572 2063 616c 6c2e ver filter call. │ │ │ +0003a600: 2049 6620 796f 7520 6861 7665 206d 756c If you have mul │ │ │ +0003a610: 7469 706c 6520 696d 6167 6573 2074 6f20 tiple images to │ │ │ +0003a620: 6669 6c74 6572 2077 6974 6820 7468 6520 filter with the │ │ │ +0003a630: 7361 6d65 0a20 6775 6964 6520 7468 656e same. guide then │ │ │ +0003a640: 2075 7365 2046 6173 7442 696c 6174 6572 use FastBilater │ │ │ +0003a650: 616c 536f 6c76 6572 4669 6c74 6572 2069 alSolverFilter i │ │ │ +0003a660: 6e74 6572 6661 6365 2074 6f20 6176 6f69 nterface to avoi │ │ │ +0003a670: 6420 6578 7472 6120 636f 6d70 7574 6174 d extra computat │ │ │ +0003a680: 696f 6e73 2e3c 2f64 6976 3e0a 3c64 6c20 ions.
    .
    .< │ │ │ +0003a6a0: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
    gu │ │ │ +0003a6c0: 6964 653c 2f63 6f64 653e 202d 2069 6d61 ide - ima │ │ │ +0003a6d0: 6765 2073 6572 7669 6e67 2061 7320 6775 ge serving as gu │ │ │ +0003a6e0: 6964 6520 666f 7220 6669 6c74 6572 696e ide for filterin │ │ │ +0003a6f0: 672e 2049 7420 7368 6f75 6c64 2068 6176 g. It should hav │ │ │ +0003a700: 6520 382d 6269 7420 6465 7074 6820 616e e 8-bit depth an │ │ │ +0003a710: 6420 6569 7468 6572 2031 206f 7220 3320 d either 1 or 3 │ │ │ +0003a720: 6368 616e 6e65 6c73 2e3c 2f64 643e 0a3c channels.
    .< │ │ │ +0003a730: 6464 3e3c 636f 6465 3e73 7263 3c2f 636f dd>src - source ima │ │ │ +0003a750: 6765 2066 6f72 2066 696c 7465 7269 6e67 ge for filtering │ │ │ +0003a760: 2077 6974 6820 756e 7369 676e 6564 2038 with unsigned 8 │ │ │ +0003a770: 2d62 6974 206f 7220 7369 676e 6564 2031 -bit or signed 1 │ │ │ +0003a780: 362d 6269 7420 6f72 2066 6c6f 6174 696e 6-bit or floatin │ │ │ +0003a790: 672d 706f 696e 7420 3332 2d62 6974 2064 g-point 32-bit d │ │ │ +0003a7a0: 6570 7468 2061 6e64 2075 7020 746f 2034 epth and up to 4 │ │ │ +0003a7b0: 2063 6861 6e6e 656c 732e 3c2f 6464 3e0a channels.. │ │ │ +0003a7c0: 3c64 643e 3c63 6f64 653e 636f 6e66 6964
    confid │ │ │ +0003a7d0: 656e 6365 3c2f 636f 6465 3e20 2d20 636f ence - co │ │ │ +0003a7e0: 6e66 6964 656e 6365 2069 6d61 6765 2077 nfidence image w │ │ │ +0003a7f0: 6974 6820 756e 7369 676e 6564 2038 2d62 ith unsigned 8-b │ │ │ +0003a800: 6974 206f 7220 666c 6f61 7469 6e67 2d70 it or floating-p │ │ │ +0003a810: 6f69 6e74 2033 322d 6269 7420 636f 6e66 oint 32-bit conf │ │ │ +0003a820: 6964 656e 6365 2061 6e64 2031 2063 6861 idence and 1 cha │ │ │ +0003a830: 6e6e 656c 2e3c 2f64 643e 0a3c 6464 3e3c nnel.
    .
    < │ │ │ +0003a840: 636f 6465 3e64 7374 3c2f 636f 6465 3e20 code>dst │ │ │ +0003a850: 2d20 6465 7374 696e 6174 696f 6e20 696d - destination im │ │ │ +0003a860: 6167 652e 3c2f 6464 3e0a 3c64 643e 3c63 age.
    .
    sigma_spatia │ │ │ +0003a880: 6c3c 2f63 6f64 653e 202d 2070 6172 616d l - param │ │ │ +0003a890: 6574 6572 2c20 7468 6174 2069 7320 7369 eter, that is si │ │ │ +0003a8a0: 6d69 6c61 7220 746f 2073 7061 7469 616c milar to spatial │ │ │ +0003a8b0: 2073 7061 6365 2073 6967 6d61 2028 6261 space sigma (ba │ │ │ +0003a8c0: 6e64 7769 6474 6829 2069 6e20 6269 6c61 ndwidth) in bila │ │ │ +0003a8d0: 7465 7261 6c46 696c 7465 722e 3c2f 6464 teralFilter.
    .
    sigm │ │ │ +0003a8f0: 615f 6c75 6d61 3c2f 636f 6465 3e20 2d20 a_luma - │ │ │ +0003a900: 7061 7261 6d65 7465 722c 2074 6861 7420 parameter, that │ │ │ +0003a910: 6973 2073 696d 696c 6172 2074 6f20 6c75 is similar to lu │ │ │ +0003a920: 6d61 2073 7061 6365 2073 6967 6d61 2028 ma space sigma ( │ │ │ +0003a930: 6261 6e64 7769 6474 6829 2069 6e20 6269 bandwidth) in bi │ │ │ +0003a940: 6c61 7465 7261 6c46 696c 7465 722e 3c2f lateralFilter..
    si │ │ │ +0003a960: 676d 615f 6368 726f 6d61 3c2f 636f 6465 gma_chroma - parameter, t │ │ │ +0003a980: 6861 7420 6973 2073 696d 696c 6172 2074 hat is similar t │ │ │ +0003a990: 6f20 6368 726f 6d61 2073 7061 6365 2073 o chroma space s │ │ │ +0003a9a0: 6967 6d61 2028 6261 6e64 7769 6474 6829 igma (bandwidth) │ │ │ +0003a9b0: 2069 6e20 6269 6c61 7465 7261 6c46 696c in bilateralFil │ │ │ +0003a9c0: 7465 722e 0a0a 0a0a 0a20 466f 7220 6d6f ter...... For mo │ │ │ +0003a9d0: 7265 2064 6574 6169 6c73 2061 626f 7574 re details about │ │ │ +0003a9e0: 2074 6865 2046 6173 7420 4269 6c61 7465 the Fast Bilate │ │ │ +0003a9f0: 7261 6c20 536f 6c76 6572 2070 6172 616d ral Solver param │ │ │ +0003aa00: 6574 6572 732c 2073 6565 2074 6865 206f eters, see the o │ │ │ +0003aa10: 7269 6769 6e61 6c20 7061 7065 7220 4349 riginal paper CI │ │ │ +0003aa20: 5445 3a20 4261 7272 6f6e 506f 6f6c 6532 TE: BarronPoole2 │ │ │ +0003aa30: 3031 362e 0a0a 203c 623e 4e6f 7465 3a3c 016... Note:< │ │ │ +0003aa40: 2f62 3e20 436f 6e66 6964 656e 6365 2069 /b> Confidence i │ │ │ +0003aa50: 6d61 6765 7320 7769 7468 2043 565f 3855 mages with CV_8U │ │ │ +0003aa60: 2064 6570 7468 2061 7265 2065 7870 6563 depth are expec │ │ │ +0003aa70: 7465 6420 746f 2069 6e20 5b30 2c20 3235 ted to in [0, 25 │ │ │ +0003aa80: 355d 2061 6e64 2043 565f 3332 4620 696e 5] and CV_32F in │ │ │ +0003aa90: 205b 302c 2031 5d20 7261 6e67 652e 3c2f [0, 1] range..
    ...
  • . │ │ │ +0003aac0: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    fastB │ │ │ +0003ab60: 696c 6174 6572 616c 536f 6c76 6572 4669 ilateralSolverFi │ │ │ +0003ab70: 6c74 6572 3c2f 6833 3e0a 3c64 6976 2063 lter

    .
    │ │ │ +0003abb0: 7075 626c 6963 2073 7461 7469 633c 2f73 public static void& │ │ │ +0003abf0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ +0003ac10: 6661 7374 4269 6c61 7465 7261 6c53 6f6c fastBilateralSol │ │ │ +0003ac20: 7665 7246 696c 7465 723c 2f73 7061 6e3e verFilter │ │ │ +0003ac30: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ +0003ac50: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ +0003ac60: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ +0003ac70: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +0003ac80: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat guide,. │ │ │ +0003aca0: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ +0003ace0: 2f61 3e26 6e62 7370 3b73 7263 2c0a 203c /a> src,. < │ │ │ +0003acf0: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ +0003ad00: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ +0003ad10: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +0003ad20: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat confiden │ │ │ +0003ad40: 6365 2c0a 203c 6120 6872 6566 3d22 2e2e ce,. Mat ds │ │ │ +0003ad90: 742c 0a20 646f 7562 6c65 266e 6273 703b t,. double  │ │ │ +0003ada0: 7369 676d 615f 7370 6174 6961 6c2c 0a20 sigma_spatial,. │ │ │ +0003adb0: 646f 7562 6c65 266e 6273 703b 7369 676d double sigm │ │ │ +0003adc0: 615f 6c75 6d61 293c 2f73 7061 6e3e 3c2f a_luma).
    Simple o │ │ │ +0003adf0: 6e65 2d6c 696e 6520 4661 7374 2042 696c ne-line Fast Bil │ │ │ +0003ae00: 6174 6572 616c 2053 6f6c 7665 7220 6669 ateral Solver fi │ │ │ +0003ae10: 6c74 6572 2063 616c 6c2e 2049 6620 796f lter call. If yo │ │ │ +0003ae20: 7520 6861 7665 206d 756c 7469 706c 6520 u have multiple │ │ │ +0003ae30: 696d 6167 6573 2074 6f20 6669 6c74 6572 images to filter │ │ │ +0003ae40: 2077 6974 6820 7468 6520 7361 6d65 0a20 with the same. │ │ │ +0003ae50: 6775 6964 6520 7468 656e 2075 7365 2046 guide then use F │ │ │ +0003ae60: 6173 7442 696c 6174 6572 616c 536f 6c76 astBilateralSolv │ │ │ +0003ae70: 6572 4669 6c74 6572 2069 6e74 6572 6661 erFilter interfa │ │ │ +0003ae80: 6365 2074 6f20 6176 6f69 6420 6578 7472 ce to avoid extr │ │ │ +0003ae90: 6120 636f 6d70 7574 6174 696f 6e73 2e3c a computations.< │ │ │ +0003aea0: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ +0003aec0: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .guide - image ser │ │ │ +0003aef0: 7669 6e67 2061 7320 6775 6964 6520 666f ving as guide fo │ │ │ +0003af00: 7220 6669 6c74 6572 696e 672e 2049 7420 r filtering. It │ │ │ +0003af10: 7368 6f75 6c64 2068 6176 6520 382d 6269 should have 8-bi │ │ │ +0003af20: 7420 6465 7074 6820 616e 6420 6569 7468 t depth and eith │ │ │ +0003af30: 6572 2031 206f 7220 3320 6368 616e 6e65 er 1 or 3 channe │ │ │ +0003af40: 6c73 2e3c 2f64 643e 0a3c 6464 3e3c 636f ls..
    src - │ │ │ +0003af60: 736f 7572 6365 2069 6d61 6765 2066 6f72 source image for │ │ │ +0003af70: 2066 696c 7465 7269 6e67 2077 6974 6820 filtering with │ │ │ +0003af80: 756e 7369 676e 6564 2038 2d62 6974 206f unsigned 8-bit o │ │ │ +0003af90: 7220 7369 676e 6564 2031 362d 6269 7420 r signed 16-bit │ │ │ +0003afa0: 6f72 2066 6c6f 6174 696e 672d 706f 696e or floating-poin │ │ │ +0003afb0: 7420 3332 2d62 6974 2064 6570 7468 2061 t 32-bit depth a │ │ │ +0003afc0: 6e64 2075 7020 746f 2034 2063 6861 6e6e nd up to 4 chann │ │ │ +0003afd0: 656c 732e 3c2f 6464 3e0a 3c64 643e 3c63 els.
    .
    confidence - confiden │ │ │ +0003b000: 6365 2069 6d61 6765 2077 6974 6820 756e ce image with un │ │ │ +0003b010: 7369 676e 6564 2038 2d62 6974 206f 7220 signed 8-bit or │ │ │ +0003b020: 666c 6f61 7469 6e67 2d70 6f69 6e74 2033 floating-point 3 │ │ │ +0003b030: 322d 6269 7420 636f 6e66 6964 656e 6365 2-bit confidence │ │ │ +0003b040: 2061 6e64 2031 2063 6861 6e6e 656c 2e3c and 1 channel.< │ │ │ +0003b050: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e64 /dd>.
    d │ │ │ +0003b060: 7374 3c2f 636f 6465 3e20 2d20 6465 7374 st - dest │ │ │ +0003b070: 696e 6174 696f 6e20 696d 6167 652e 3c2f ination image..
    si │ │ │ +0003b090: 676d 615f 7370 6174 6961 6c3c 2f63 6f64 gma_spatial - parameter, │ │ │ +0003b0b0: 7468 6174 2069 7320 7369 6d69 6c61 7220 that is similar │ │ │ +0003b0c0: 746f 2073 7061 7469 616c 2073 7061 6365 to spatial space │ │ │ +0003b0d0: 2073 6967 6d61 2028 6261 6e64 7769 6474 sigma (bandwidt │ │ │ +0003b0e0: 6829 2069 6e20 6269 6c61 7465 7261 6c46 h) in bilateralF │ │ │ +0003b0f0: 696c 7465 722e 3c2f 6464 3e0a 3c64 643e ilter.
    .
    │ │ │ +0003b100: 3c63 6f64 653e 7369 676d 615f 6c75 6d61 sigma_luma │ │ │ +0003b110: 3c2f 636f 6465 3e20 2d20 7061 7261 6d65 - parame │ │ │ +0003b120: 7465 722c 2074 6861 7420 6973 2073 696d ter, that is sim │ │ │ +0003b130: 696c 6172 2074 6f20 6c75 6d61 2073 7061 ilar to luma spa │ │ │ +0003b140: 6365 2073 6967 6d61 2028 6261 6e64 7769 ce sigma (bandwi │ │ │ +0003b150: 6474 6829 2069 6e20 6269 6c61 7465 7261 dth) in bilatera │ │ │ +0003b160: 6c46 696c 7465 722e 0a0a 0a0a 0a0a 2046 lFilter....... F │ │ │ +0003b170: 6f72 206d 6f72 6520 6465 7461 696c 7320 or more details │ │ │ +0003b180: 6162 6f75 7420 7468 6520 4661 7374 2042 about the Fast B │ │ │ +0003b190: 696c 6174 6572 616c 2053 6f6c 7665 7220 ilateral Solver │ │ │ +0003b1a0: 7061 7261 6d65 7465 7273 2c20 7365 6520 parameters, see │ │ │ +0003b1b0: 7468 6520 6f72 6967 696e 616c 2070 6170 the original pap │ │ │ +0003b1c0: 6572 2043 4954 453a 2042 6172 726f 6e50 er CITE: BarronP │ │ │ +0003b1d0: 6f6f 6c65 3230 3136 2e0a 0a20 3c62 3e4e oole2016... N │ │ │ +0003b1e0: 6f74 653a 3c2f 623e 2043 6f6e 6669 6465 ote: Confide │ │ │ +0003b1f0: 6e63 6520 696d 6167 6573 2077 6974 6820 nce images with │ │ │ +0003b200: 4356 5f38 5520 6465 7074 6820 6172 6520 CV_8U depth are │ │ │ +0003b210: 6578 7065 6374 6564 2074 6f20 696e 205b expected to in [ │ │ │ +0003b220: 302c 2032 3535 5d20 616e 6420 4356 5f33 0, 255] and CV_3 │ │ │ +0003b230: 3246 2069 6e20 5b30 2c20 315d 2072 616e 2F in [0, 1] ran │ │ │ +0003b240: 6765 2e3c 2f64 643e 0a3c 2f64 6c3e 0a3c ge.
    .
    .< │ │ │ +0003b250: 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 3e0a /section>.
  • . │ │ │ +0003b260: 3c6c 693e 0a3c 7365 6374 696f 6e20 636c
  • .
    .

    fastBil │ │ │ +0003b300: 6174 6572 616c 536f 6c76 6572 4669 6c74 ateralSolverFilt │ │ │ +0003b310: 6572 3c2f 6833 3e0a 3c64 6976 2063 6c61 er

    .
    pu │ │ │ +0003b350: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static void&nb │ │ │ +0003b390: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;fa │ │ │ +0003b3b0: 7374 4269 6c61 7465 7261 6c53 6f6c 7665 stBilateralSolve │ │ │ +0003b3c0: 7246 696c 7465 723c 2f73 7061 6e3e 3c77 rFilter(Mat │ │ │ +0003b430: 266e 6273 703b 6775 6964 652c 0a20 3c61  guide,. Mat src,. Mat │ │ │ +0003b4d0: 266e 6273 703b 636f 6e66 6964 656e 6365  confidence │ │ │ +0003b4e0: 2c0a 203c 6120 6872 6566 3d22 2e2e 2f63 ,. M │ │ │ +0003b520: 6174 3c2f 613e 266e 6273 703b 6473 742c at dst, │ │ │ +0003b530: 0a20 646f 7562 6c65 266e 6273 703b 7369 . double si │ │ │ +0003b540: 676d 615f 7370 6174 6961 6c29 3c2f 7370 gma_spatial)
    .
    Sim │ │ │ +0003b570: 706c 6520 6f6e 652d 6c69 6e65 2046 6173 ple one-line Fas │ │ │ +0003b580: 7420 4269 6c61 7465 7261 6c20 536f 6c76 t Bilateral Solv │ │ │ +0003b590: 6572 2066 696c 7465 7220 6361 6c6c 2e20 er filter call. │ │ │ +0003b5a0: 4966 2079 6f75 2068 6176 6520 6d75 6c74 If you have mult │ │ │ +0003b5b0: 6970 6c65 2069 6d61 6765 7320 746f 2066 iple images to f │ │ │ +0003b5c0: 696c 7465 7220 7769 7468 2074 6865 2073 ilter with the s │ │ │ +0003b5d0: 616d 650a 2067 7569 6465 2074 6865 6e20 ame. guide then │ │ │ +0003b5e0: 7573 6520 4661 7374 4269 6c61 7465 7261 use FastBilatera │ │ │ +0003b5f0: 6c53 6f6c 7665 7246 696c 7465 7220 696e lSolverFilter in │ │ │ +0003b600: 7465 7266 6163 6520 746f 2061 766f 6964 terface to avoid │ │ │ +0003b610: 2065 7874 7261 2063 6f6d 7075 7461 7469 extra computati │ │ │ +0003b620: 6f6e 732e 3c2f 6469 763e 0a3c 646c 2063 ons.
    .
    .Parameters:.
    gui │ │ │ +0003b660: 6465 3c2f 636f 6465 3e20 2d20 696d 6167 de - imag │ │ │ +0003b670: 6520 7365 7276 696e 6720 6173 2067 7569 e serving as gui │ │ │ +0003b680: 6465 2066 6f72 2066 696c 7465 7269 6e67 de for filtering │ │ │ +0003b690: 2e20 4974 2073 686f 756c 6420 6861 7665 . It should have │ │ │ +0003b6a0: 2038 2d62 6974 2064 6570 7468 2061 6e64 8-bit depth and │ │ │ +0003b6b0: 2065 6974 6865 7220 3120 6f72 2033 2063 either 1 or 3 c │ │ │ +0003b6c0: 6861 6e6e 656c 732e 3c2f 6464 3e0a 3c64 hannels.
    .src - source imag │ │ │ +0003b6f0: 6520 666f 7220 6669 6c74 6572 696e 6720 e for filtering │ │ │ +0003b700: 7769 7468 2075 6e73 6967 6e65 6420 382d with unsigned 8- │ │ │ +0003b710: 6269 7420 6f72 2073 6967 6e65 6420 3136 bit or signed 16 │ │ │ +0003b720: 2d62 6974 206f 7220 666c 6f61 7469 6e67 -bit or floating │ │ │ +0003b730: 2d70 6f69 6e74 2033 322d 6269 7420 6465 -point 32-bit de │ │ │ +0003b740: 7074 6820 616e 6420 7570 2074 6f20 3420 pth and up to 4 │ │ │ +0003b750: 6368 616e 6e65 6c73 2e3c 2f64 643e 0a3c channels..< │ │ │ +0003b760: 6464 3e3c 636f 6465 3e63 6f6e 6669 6465 dd>confide │ │ │ +0003b770: 6e63 653c 2f63 6f64 653e 202d 2063 6f6e nce - con │ │ │ +0003b780: 6669 6465 6e63 6520 696d 6167 6520 7769 fidence image wi │ │ │ +0003b790: 7468 2075 6e73 6967 6e65 6420 382d 6269 th unsigned 8-bi │ │ │ +0003b7a0: 7420 6f72 2066 6c6f 6174 696e 672d 706f t or floating-po │ │ │ +0003b7b0: 696e 7420 3332 2d62 6974 2063 6f6e 6669 int 32-bit confi │ │ │ +0003b7c0: 6465 6e63 6520 616e 6420 3120 6368 616e dence and 1 chan │ │ │ +0003b7d0: 6e65 6c2e 3c2f 6464 3e0a 3c64 643e 3c63 nel..
    dst - │ │ │ +0003b7f0: 2064 6573 7469 6e61 7469 6f6e 2069 6d61 destination ima │ │ │ +0003b800: 6765 2e3c 2f64 643e 0a3c 6464 3e3c 636f ge.
    .
    sigma_spatial │ │ │ +0003b820: 3c2f 636f 6465 3e20 2d20 7061 7261 6d65 - parame │ │ │ +0003b830: 7465 722c 2074 6861 7420 6973 2073 696d ter, that is sim │ │ │ +0003b840: 696c 6172 2074 6f20 7370 6174 6961 6c20 ilar to spatial │ │ │ +0003b850: 7370 6163 6520 7369 676d 6120 2862 616e space sigma (ban │ │ │ +0003b860: 6477 6964 7468 2920 696e 2062 696c 6174 dwidth) in bilat │ │ │ +0003b870: 6572 616c 4669 6c74 6572 2e0a 0a0a 0a0a eralFilter...... │ │ │ +0003b880: 0a0a 2046 6f72 206d 6f72 6520 6465 7461 .. For more deta │ │ │ +0003b890: 696c 7320 6162 6f75 7420 7468 6520 4661 ils about the Fa │ │ │ +0003b8a0: 7374 2042 696c 6174 6572 616c 2053 6f6c st Bilateral Sol │ │ │ +0003b8b0: 7665 7220 7061 7261 6d65 7465 7273 2c20 ver parameters, │ │ │ +0003b8c0: 7365 6520 7468 6520 6f72 6967 696e 616c see the original │ │ │ +0003b8d0: 2070 6170 6572 2043 4954 453a 2042 6172 paper CITE: Bar │ │ │ +0003b8e0: 726f 6e50 6f6f 6c65 3230 3136 2e0a 0a20 ronPoole2016... │ │ │ +0003b8f0: 3c62 3e4e 6f74 653a 3c2f 623e 2043 6f6e Note: Con │ │ │ +0003b900: 6669 6465 6e63 6520 696d 6167 6573 2077 fidence images w │ │ │ +0003b910: 6974 6820 4356 5f38 5520 6465 7074 6820 ith CV_8U depth │ │ │ +0003b920: 6172 6520 6578 7065 6374 6564 2074 6f20 are expected to │ │ │ +0003b930: 696e 205b 302c 2032 3535 5d20 616e 6420 in [0, 255] and │ │ │ +0003b940: 4356 5f33 3246 2069 6e20 5b30 2c20 315d CV_32F in [0, 1] │ │ │ +0003b950: 2072 616e 6765 2e3c 2f64 643e 0a3c 2f64 range.
    ..
    ..
  • ..

    fastBilate │ │ │ +0003ba10: 7261 6c53 6f6c 7665 7246 696c 7465 723c ralSolverFilter< │ │ │ +0003ba20: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ +0003ba60: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ +0003ba70: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;v │ │ │ +0003ba90: 6f69 643c 2f73 7061 6e3e 266e 6273 703b oid  │ │ │ +0003baa0: 3c73 7061 6e20 636c 6173 733d 2265 6c65 fastB │ │ │ +0003bac0: 696c 6174 6572 616c 536f 6c76 6572 4669 ilateralSolverFi │ │ │ +0003bad0: 6c74 6572 3c2f 7370 616e 3e3c 7762 723e lter │ │ │ +0003bae0: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Mat&nb │ │ │ +0003bb40: 7370 3b67 7569 6465 2c0a 203c 6120 6872 sp;guide,. Mat&n │ │ │ +0003bb90: 6273 703b 7372 632c 0a20 3c61 2068 7265 bsp;src,. Mat&nb │ │ │ +0003bbe0: 7370 3b63 6f6e 6669 6465 6e63 652c 0a20 sp;confidence,. │ │ │ +0003bbf0: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ +0003bc30: 2f61 3e26 6e62 7370 3b64 7374 293c 2f73 /a> dst)
    .
    Si │ │ │ +0003bc60: 6d70 6c65 206f 6e65 2d6c 696e 6520 4661 mple one-line Fa │ │ │ +0003bc70: 7374 2042 696c 6174 6572 616c 2053 6f6c st Bilateral Sol │ │ │ +0003bc80: 7665 7220 6669 6c74 6572 2063 616c 6c2e ver filter call. │ │ │ +0003bc90: 2049 6620 796f 7520 6861 7665 206d 756c If you have mul │ │ │ +0003bca0: 7469 706c 6520 696d 6167 6573 2074 6f20 tiple images to │ │ │ +0003bcb0: 6669 6c74 6572 2077 6974 6820 7468 6520 filter with the │ │ │ +0003bcc0: 7361 6d65 0a20 6775 6964 6520 7468 656e same. guide then │ │ │ +0003bcd0: 2075 7365 2046 6173 7442 696c 6174 6572 use FastBilater │ │ │ +0003bce0: 616c 536f 6c76 6572 4669 6c74 6572 2069 alSolverFilter i │ │ │ +0003bcf0: 6e74 6572 6661 6365 2074 6f20 6176 6f69 nterface to avoi │ │ │ +0003bd00: 6420 6578 7472 6120 636f 6d70 7574 6174 d extra computat │ │ │ +0003bd10: 696f 6e73 2e3c 2f64 6976 3e0a 3c64 6c20 ions.
    .
    .< │ │ │ +0003bd30: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
    gu │ │ │ +0003bd50: 6964 653c 2f63 6f64 653e 202d 2069 6d61 ide - ima │ │ │ +0003bd60: 6765 2073 6572 7669 6e67 2061 7320 6775 ge serving as gu │ │ │ +0003bd70: 6964 6520 666f 7220 6669 6c74 6572 696e ide for filterin │ │ │ +0003bd80: 672e 2049 7420 7368 6f75 6c64 2068 6176 g. It should hav │ │ │ +0003bd90: 6520 382d 6269 7420 6465 7074 6820 616e e 8-bit depth an │ │ │ +0003bda0: 6420 6569 7468 6572 2031 206f 7220 3320 d either 1 or 3 │ │ │ +0003bdb0: 6368 616e 6e65 6c73 2e3c 2f64 643e 0a3c channels.
    .< │ │ │ +0003bdc0: 6464 3e3c 636f 6465 3e73 7263 3c2f 636f dd>src - source ima │ │ │ +0003bde0: 6765 2066 6f72 2066 696c 7465 7269 6e67 ge for filtering │ │ │ +0003bdf0: 2077 6974 6820 756e 7369 676e 6564 2038 with unsigned 8 │ │ │ +0003be00: 2d62 6974 206f 7220 7369 676e 6564 2031 -bit or signed 1 │ │ │ +0003be10: 362d 6269 7420 6f72 2066 6c6f 6174 696e 6-bit or floatin │ │ │ +0003be20: 672d 706f 696e 7420 3332 2d62 6974 2064 g-point 32-bit d │ │ │ +0003be30: 6570 7468 2061 6e64 2075 7020 746f 2034 epth and up to 4 │ │ │ +0003be40: 2063 6861 6e6e 656c 732e 3c2f 6464 3e0a channels.. │ │ │ +0003be50: 3c64 643e 3c63 6f64 653e 636f 6e66 6964
    confid │ │ │ +0003be60: 656e 6365 3c2f 636f 6465 3e20 2d20 636f ence - co │ │ │ +0003be70: 6e66 6964 656e 6365 2069 6d61 6765 2077 nfidence image w │ │ │ +0003be80: 6974 6820 756e 7369 676e 6564 2038 2d62 ith unsigned 8-b │ │ │ +0003be90: 6974 206f 7220 666c 6f61 7469 6e67 2d70 it or floating-p │ │ │ +0003bea0: 6f69 6e74 2033 322d 6269 7420 636f 6e66 oint 32-bit conf │ │ │ +0003beb0: 6964 656e 6365 2061 6e64 2031 2063 6861 idence and 1 cha │ │ │ +0003bec0: 6e6e 656c 2e3c 2f64 643e 0a3c 6464 3e3c nnel.
    .
    < │ │ │ +0003bed0: 636f 6465 3e64 7374 3c2f 636f 6465 3e20 code>dst │ │ │ +0003bee0: 2d20 6465 7374 696e 6174 696f 6e20 696d - destination im │ │ │ +0003bef0: 6167 652e 0a0a 0a0a 0a0a 0a0a 2046 6f72 age......... For │ │ │ +0003bf00: 206d 6f72 6520 6465 7461 696c 7320 6162 more details ab │ │ │ +0003bf10: 6f75 7420 7468 6520 4661 7374 2042 696c out the Fast Bil │ │ │ +0003bf20: 6174 6572 616c 2053 6f6c 7665 7220 7061 ateral Solver pa │ │ │ +0003bf30: 7261 6d65 7465 7273 2c20 7365 6520 7468 rameters, see th │ │ │ +0003bf40: 6520 6f72 6967 696e 616c 2070 6170 6572 e original paper │ │ │ +0003bf50: 2043 4954 453a 2042 6172 726f 6e50 6f6f CITE: BarronPoo │ │ │ +0003bf60: 6c65 3230 3136 2e0a 0a20 3c62 3e4e 6f74 le2016... Not │ │ │ +0003bf70: 653a 3c2f 623e 2043 6f6e 6669 6465 6e63 e: Confidenc │ │ │ +0003bf80: 6520 696d 6167 6573 2077 6974 6820 4356 e images with CV │ │ │ +0003bf90: 5f38 5520 6465 7074 6820 6172 6520 6578 _8U depth are ex │ │ │ +0003bfa0: 7065 6374 6564 2074 6f20 696e 205b 302c pected to in [0, │ │ │ +0003bfb0: 2032 3535 5d20 616e 6420 4356 5f33 3246 255] and CV_32F │ │ │ +0003bfc0: 2069 6e20 5b30 2c20 315d 2072 616e 6765 in [0, 1] range │ │ │ +0003bfd0: 2e3c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 .
    .
    .
    .

  • ..
    .createFastGlob │ │ │ +0003c070: 616c 536d 6f6f 7468 6572 4669 6c74 6572 alSmootherFilter │ │ │ +0003c080: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ +0003c0c0: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ +0003c0d0: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ +0003c0f0: 3c61 2068 7265 663d 2246 6173 7447 6c6f Fas │ │ │ +0003c140: 7447 6c6f 6261 6c53 6d6f 6f74 6865 7246 tGlobalSmootherF │ │ │ +0003c150: 696c 7465 723c 2f61 3e3c 2f73 7061 6e3e ilter │ │ │ +0003c160: 266e 6273 703b 3c73 7061 6e20 636c 6173  createFastGloba │ │ │ +0003c190: 6c53 6d6f 6f74 6865 7246 696c 7465 723c lSmootherFilter< │ │ │ +0003c1a0: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(Mat gu │ │ │ +0003c210: 6964 652c 0a20 646f 7562 6c65 266e 6273 ide,. double&nbs │ │ │ +0003c220: 703b 6c61 6d62 6461 2c0a 2064 6f75 626c p;lambda,. doubl │ │ │ +0003c230: 6526 6e62 7370 3b73 6967 6d61 5f63 6f6c e sigma_col │ │ │ +0003c240: 6f72 2c0a 2064 6f75 626c 6526 6e62 7370 or,. double  │ │ │ +0003c250: 3b6c 616d 6264 615f 6174 7465 6e75 6174 ;lambda_attenuat │ │ │ +0003c260: 696f 6e2c 0a20 696e 7426 6e62 7370 3b6e ion,. int n │ │ │ +0003c270: 756d 5f69 7465 7229 3c2f 7370 616e 3e3c um_iter)< │ │ │ +0003c280: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Factory │ │ │ +0003c2a0: 206d 6574 686f 642c 2063 7265 6174 6520 method, create │ │ │ +0003c2b0: 696e 7374 616e 6365 206f 6620 4661 7374 instance of Fast │ │ │ +0003c2c0: 476c 6f62 616c 536d 6f6f 7468 6572 4669 GlobalSmootherFi │ │ │ +0003c2d0: 6c74 6572 2061 6e64 2065 7865 6375 7465 lter and execute │ │ │ +0003c2e0: 2074 6865 2069 6e69 7469 616c 697a 6174 the initializat │ │ │ +0003c2f0: 696f 6e20 726f 7574 696e 6573 2e3c 2f64 ion routines..
    .
    Param │ │ │ +0003c320: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ +0003c330: 3c63 6f64 653e 6775 6964 653c 2f63 6f64 guide - image servi │ │ │ +0003c350: 6e67 2061 7320 6775 6964 6520 666f 7220 ng as guide for │ │ │ +0003c360: 6669 6c74 6572 696e 672e 2049 7420 7368 filtering. It sh │ │ │ +0003c370: 6f75 6c64 2068 6176 6520 382d 6269 7420 ould have 8-bit │ │ │ +0003c380: 6465 7074 6820 616e 6420 6569 7468 6572 depth and either │ │ │ +0003c390: 2031 206f 7220 3320 6368 616e 6e65 6c73 1 or 3 channels │ │ │ +0003c3a0: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    lambda - │ │ │ +0003c3c0: 2070 6172 616d 6574 6572 2064 6566 696e parameter defin │ │ │ +0003c3d0: 696e 6720 7468 6520 616d 6f75 6e74 206f ing the amount o │ │ │ +0003c3e0: 6620 7265 6775 6c61 7269 7a61 7469 6f6e f regularization │ │ │ +0003c3f0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0003c400: 7369 676d 615f 636f 6c6f 723c 2f63 6f64 sigma_color - parameter, │ │ │ +0003c420: 7468 6174 2069 7320 7369 6d69 6c61 7220 that is similar │ │ │ +0003c430: 746f 2063 6f6c 6f72 2073 7061 6365 2073 to color space s │ │ │ +0003c440: 6967 6d61 2069 6e20 6269 6c61 7465 7261 igma in bilatera │ │ │ +0003c450: 6c46 696c 7465 722e 3c2f 6464 3e0a 3c64 lFilter.
    .lambda_a │ │ │ +0003c470: 7474 656e 7561 7469 6f6e 3c2f 636f 6465 ttenuation - internal par │ │ │ +0003c490: 616d 6574 6572 2c20 6465 6669 6e69 6e67 ameter, defining │ │ │ +0003c4a0: 2068 6f77 206d 7563 6820 6c61 6d62 6461 how much lambda │ │ │ +0003c4b0: 2064 6563 7265 6173 6573 2061 6674 6572 decreases after │ │ │ +0003c4c0: 2065 6163 6820 6974 6572 6174 696f 6e2e each iteration. │ │ │ +0003c4d0: 204e 6f72 6d61 6c6c 792c 0a20 6974 2073 Normally,. it s │ │ │ +0003c4e0: 686f 756c 6420 6265 2030 2e32 352e 2053 hould be 0.25. S │ │ │ +0003c4f0: 6574 7469 6e67 2069 7420 746f 2031 2e30 etting it to 1.0 │ │ │ +0003c500: 206d 6179 206c 6561 6420 746f 2073 7472 may lead to str │ │ │ +0003c510: 6561 6b69 6e67 2061 7274 6966 6163 7473 eaking artifacts │ │ │ +0003c520: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 ..
    num_iter │ │ │ +0003c540: 202d 206e 756d 6265 7220 6f66 2069 7465 - number of ite │ │ │ +0003c550: 7261 7469 6f6e 7320 7573 6564 2066 6f72 rations used for │ │ │ +0003c560: 2066 696c 7465 7269 6e67 2c20 3320 6973 filtering, 3 is │ │ │ +0003c570: 2075 7375 616c 6c79 2065 6e6f 7567 682e usually enough. │ │ │ +0003c580: 0a0a 2046 6f72 206d 6f72 6520 6465 7461 .. For more deta │ │ │ +0003c590: 696c 7320 6162 6f75 7420 4661 7374 2047 ils about Fast G │ │ │ +0003c5a0: 6c6f 6261 6c20 536d 6f6f 7468 6572 2070 lobal Smoother p │ │ │ +0003c5b0: 6172 616d 6574 6572 732c 2073 6565 2074 arameters, see t │ │ │ +0003c5c0: 6865 206f 7269 6769 6e61 6c20 7061 7065 he original pape │ │ │ +0003c5d0: 7220 4349 5445 3a20 4d69 6e32 3031 342e r CITE: Min2014. │ │ │ +0003c5e0: 2048 6f77 6576 6572 2c20 706c 6561 7365 However, please │ │ │ +0003c5f0: 206e 6f74 6520 7468 6174 0a20 7468 6572 note that. ther │ │ │ +0003c600: 6520 6172 6520 7365 7665 7261 6c20 6469 e are several di │ │ │ +0003c610: 6666 6572 656e 6365 732e 204c 616d 6264 fferences. Lambd │ │ │ +0003c620: 6120 6174 7465 6e75 6174 696f 6e20 6465 a attenuation de │ │ │ +0003c630: 7363 7269 6265 6420 696e 2074 6865 2070 scribed in the p │ │ │ +0003c640: 6170 6572 2069 7320 696d 706c 656d 656e aper is implemen │ │ │ +0003c650: 7465 6420 6120 6269 7420 6469 6666 6572 ted a bit differ │ │ │ +0003c660: 656e 746c 7920 736f 2064 6f20 6e6f 740a ently so do not. │ │ │ +0003c670: 2065 7870 6563 7420 7468 6520 7265 7375 expect the resu │ │ │ +0003c680: 6c74 7320 746f 2062 6520 6964 656e 7469 lts to be identi │ │ │ +0003c690: 6361 6c20 746f 2074 686f 7365 2066 726f cal to those fro │ │ │ +0003c6a0: 6d20 7468 6520 7061 7065 723b 2073 6967 m the paper; sig │ │ │ +0003c6b0: 6d61 5f63 6f6c 6f72 2076 616c 7565 7320 ma_color values │ │ │ +0003c6c0: 6672 6f6d 2074 6865 2070 6170 6572 2073 from the paper s │ │ │ +0003c6d0: 686f 756c 6420 6265 206d 756c 7469 706c hould be multipl │ │ │ +0003c6e0: 6965 6420 6279 2032 3535 2e30 2074 6f0a ied by 255.0 to. │ │ │ +0003c6f0: 2061 6368 6965 7665 2074 6865 2073 616d achieve the sam │ │ │ +0003c700: 6520 6566 6665 6374 2e20 416c 736f 2c20 e effect. Also, │ │ │ +0003c710: 696e 2063 6173 6520 6f66 2069 6d61 6765 in case of image │ │ │ +0003c720: 2066 696c 7465 7269 6e67 2077 6865 7265 filtering where │ │ │ +0003c730: 2073 6f75 7263 6520 616e 6420 6775 6964 source and guid │ │ │ +0003c740: 6520 696d 6167 6520 6172 6520 7468 6520 e image are the │ │ │ +0003c750: 7361 6d65 2c20 6175 7468 6f72 730a 2070 same, authors. p │ │ │ +0003c760: 726f 706f 7365 2074 6f20 6479 6e61 6d69 ropose to dynami │ │ │ +0003c770: 6361 6c6c 7920 7570 6461 7465 2074 6865 cally update the │ │ │ +0003c780: 2067 7569 6465 2069 6d61 6765 2061 6674 guide image aft │ │ │ +0003c790: 6572 2065 6163 6820 6974 6572 6174 696f er each iteratio │ │ │ +0003c7a0: 6e2e 2054 6f20 6d61 7869 6d69 7a65 2074 n. To maximize t │ │ │ +0003c7b0: 6865 2070 6572 666f 726d 616e 6365 2074 he performance t │ │ │ +0003c7c0: 6869 7320 6665 6174 7572 650a 2077 6173 his feature. was │ │ │ +0003c7d0: 206e 6f74 2069 6d70 6c65 6d65 6e74 6564 not implemented │ │ │ +0003c7e0: 2068 6572 652e 3c2f 6464 3e0a 3c64 743e here.
    .
    │ │ │ +0003c7f0: 5265 7475 726e 733a 3c2f 6474 3e0a 3c64 Returns:
    .automatically │ │ │ +0003c810: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated.< │ │ │ +0003c820: 2f64 6c3e 0a3c 2f73 6563 7469 6f6e 3e0a /dl>.
    . │ │ │ +0003c830: 3c2f 6c69 3e0a 3c6c 693e 0a3c 7365 6374 .
  • ..

    createFast │ │ │ +0003c8b0: 476c 6f62 616c 536d 6f6f 7468 6572 4669 GlobalSmootherFi │ │ │ +0003c8c0: 6c74 6572 3c2f 6833 3e0a 3c64 6976 2063 lter

    .
    │ │ │ +0003c900: 7075 626c 6963 2073 7461 7469 633c 2f73 public static FastGlobalSmoot │ │ │ +0003c990: 6865 7246 696c 7465 723c 2f61 3e3c 2f73 herFilter createFastG │ │ │ +0003c9d0: 6c6f 6261 6c53 6d6f 6f74 6865 7246 696c lobalSmootherFil │ │ │ +0003c9e0: 7465 723c 2f73 7061 6e3e 3c77 6272 3e3c ter< │ │ │ +0003c9f0: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ +0003ca00: 6d65 7465 7273 223e 283c 6120 6872 6566 meters">(Mat&nbs │ │ │ +0003ca50: 703b 6775 6964 652c 0a20 646f 7562 6c65 p;guide,. double │ │ │ +0003ca60: 266e 6273 703b 6c61 6d62 6461 2c0a 2064  lambda,. d │ │ │ +0003ca70: 6f75 626c 6526 6e62 7370 3b73 6967 6d61 ouble sigma │ │ │ +0003ca80: 5f63 6f6c 6f72 2c0a 2064 6f75 626c 6526 _color,. double& │ │ │ +0003ca90: 6e62 7370 3b6c 616d 6264 615f 6174 7465 nbsp;lambda_atte │ │ │ +0003caa0: 6e75 6174 696f 6e29 3c2f 7370 616e 3e3c nuation)< │ │ │ +0003cab0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Factory │ │ │ +0003cad0: 206d 6574 686f 642c 2063 7265 6174 6520 method, create │ │ │ +0003cae0: 696e 7374 616e 6365 206f 6620 4661 7374 instance of Fast │ │ │ +0003caf0: 476c 6f62 616c 536d 6f6f 7468 6572 4669 GlobalSmootherFi │ │ │ +0003cb00: 6c74 6572 2061 6e64 2065 7865 6375 7465 lter and execute │ │ │ +0003cb10: 2074 6865 2069 6e69 7469 616c 697a 6174 the initializat │ │ │ +0003cb20: 696f 6e20 726f 7574 696e 6573 2e3c 2f64 ion routines..
    .
    Param │ │ │ +0003cb50: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ +0003cb60: 3c63 6f64 653e 6775 6964 653c 2f63 6f64 guide - image servi │ │ │ +0003cb80: 6e67 2061 7320 6775 6964 6520 666f 7220 ng as guide for │ │ │ +0003cb90: 6669 6c74 6572 696e 672e 2049 7420 7368 filtering. It sh │ │ │ +0003cba0: 6f75 6c64 2068 6176 6520 382d 6269 7420 ould have 8-bit │ │ │ +0003cbb0: 6465 7074 6820 616e 6420 6569 7468 6572 depth and either │ │ │ +0003cbc0: 2031 206f 7220 3320 6368 616e 6e65 6c73 1 or 3 channels │ │ │ +0003cbd0: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    lambda - │ │ │ +0003cbf0: 2070 6172 616d 6574 6572 2064 6566 696e parameter defin │ │ │ +0003cc00: 696e 6720 7468 6520 616d 6f75 6e74 206f ing the amount o │ │ │ +0003cc10: 6620 7265 6775 6c61 7269 7a61 7469 6f6e f regularization │ │ │ +0003cc20: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0003cc30: 7369 676d 615f 636f 6c6f 723c 2f63 6f64 sigma_color - parameter, │ │ │ +0003cc50: 7468 6174 2069 7320 7369 6d69 6c61 7220 that is similar │ │ │ +0003cc60: 746f 2063 6f6c 6f72 2073 7061 6365 2073 to color space s │ │ │ +0003cc70: 6967 6d61 2069 6e20 6269 6c61 7465 7261 igma in bilatera │ │ │ +0003cc80: 6c46 696c 7465 722e 3c2f 6464 3e0a 3c64 lFilter.
    .lambda_a │ │ │ +0003cca0: 7474 656e 7561 7469 6f6e 3c2f 636f 6465 ttenuation - internal par │ │ │ +0003ccc0: 616d 6574 6572 2c20 6465 6669 6e69 6e67 ameter, defining │ │ │ +0003ccd0: 2068 6f77 206d 7563 6820 6c61 6d62 6461 how much lambda │ │ │ +0003cce0: 2064 6563 7265 6173 6573 2061 6674 6572 decreases after │ │ │ +0003ccf0: 2065 6163 6820 6974 6572 6174 696f 6e2e each iteration. │ │ │ +0003cd00: 204e 6f72 6d61 6c6c 792c 0a20 6974 2073 Normally,. it s │ │ │ +0003cd10: 686f 756c 6420 6265 2030 2e32 352e 2053 hould be 0.25. S │ │ │ +0003cd20: 6574 7469 6e67 2069 7420 746f 2031 2e30 etting it to 1.0 │ │ │ +0003cd30: 206d 6179 206c 6561 6420 746f 2073 7472 may lead to str │ │ │ +0003cd40: 6561 6b69 6e67 2061 7274 6966 6163 7473 eaking artifacts │ │ │ +0003cd50: 2e0a 0a0a 2046 6f72 206d 6f72 6520 6465 .... For more de │ │ │ +0003cd60: 7461 696c 7320 6162 6f75 7420 4661 7374 tails about Fast │ │ │ +0003cd70: 2047 6c6f 6261 6c20 536d 6f6f 7468 6572 Global Smoother │ │ │ +0003cd80: 2070 6172 616d 6574 6572 732c 2073 6565 parameters, see │ │ │ +0003cd90: 2074 6865 206f 7269 6769 6e61 6c20 7061 the original pa │ │ │ +0003cda0: 7065 7220 4349 5445 3a20 4d69 6e32 3031 per CITE: Min201 │ │ │ +0003cdb0: 342e 2048 6f77 6576 6572 2c20 706c 6561 4. However, plea │ │ │ +0003cdc0: 7365 206e 6f74 6520 7468 6174 0a20 7468 se note that. th │ │ │ +0003cdd0: 6572 6520 6172 6520 7365 7665 7261 6c20 ere are several │ │ │ +0003cde0: 6469 6666 6572 656e 6365 732e 204c 616d differences. Lam │ │ │ +0003cdf0: 6264 6120 6174 7465 6e75 6174 696f 6e20 bda attenuation │ │ │ +0003ce00: 6465 7363 7269 6265 6420 696e 2074 6865 described in the │ │ │ +0003ce10: 2070 6170 6572 2069 7320 696d 706c 656d paper is implem │ │ │ +0003ce20: 656e 7465 6420 6120 6269 7420 6469 6666 ented a bit diff │ │ │ +0003ce30: 6572 656e 746c 7920 736f 2064 6f20 6e6f erently so do no │ │ │ +0003ce40: 740a 2065 7870 6563 7420 7468 6520 7265 t. expect the re │ │ │ +0003ce50: 7375 6c74 7320 746f 2062 6520 6964 656e sults to be iden │ │ │ +0003ce60: 7469 6361 6c20 746f 2074 686f 7365 2066 tical to those f │ │ │ +0003ce70: 726f 6d20 7468 6520 7061 7065 723b 2073 rom the paper; s │ │ │ +0003ce80: 6967 6d61 5f63 6f6c 6f72 2076 616c 7565 igma_color value │ │ │ +0003ce90: 7320 6672 6f6d 2074 6865 2070 6170 6572 s from the paper │ │ │ +0003cea0: 2073 686f 756c 6420 6265 206d 756c 7469 should be multi │ │ │ +0003ceb0: 706c 6965 6420 6279 2032 3535 2e30 2074 plied by 255.0 t │ │ │ +0003cec0: 6f0a 2061 6368 6965 7665 2074 6865 2073 o. achieve the s │ │ │ +0003ced0: 616d 6520 6566 6665 6374 2e20 416c 736f ame effect. Also │ │ │ +0003cee0: 2c20 696e 2063 6173 6520 6f66 2069 6d61 , in case of ima │ │ │ +0003cef0: 6765 2066 696c 7465 7269 6e67 2077 6865 ge filtering whe │ │ │ +0003cf00: 7265 2073 6f75 7263 6520 616e 6420 6775 re source and gu │ │ │ +0003cf10: 6964 6520 696d 6167 6520 6172 6520 7468 ide image are th │ │ │ +0003cf20: 6520 7361 6d65 2c20 6175 7468 6f72 730a e same, authors. │ │ │ +0003cf30: 2070 726f 706f 7365 2074 6f20 6479 6e61 propose to dyna │ │ │ +0003cf40: 6d69 6361 6c6c 7920 7570 6461 7465 2074 mically update t │ │ │ +0003cf50: 6865 2067 7569 6465 2069 6d61 6765 2061 he guide image a │ │ │ +0003cf60: 6674 6572 2065 6163 6820 6974 6572 6174 fter each iterat │ │ │ +0003cf70: 696f 6e2e 2054 6f20 6d61 7869 6d69 7a65 ion. To maximize │ │ │ +0003cf80: 2074 6865 2070 6572 666f 726d 616e 6365 the performance │ │ │ +0003cf90: 2074 6869 7320 6665 6174 7572 650a 2077 this feature. w │ │ │ +0003cfa0: 6173 206e 6f74 2069 6d70 6c65 6d65 6e74 as not implement │ │ │ +0003cfb0: 6564 2068 6572 652e 3c2f 6464 3e0a 3c64 ed here..Returns:. │ │ │ +0003cfd0: 3c64 643e 6175 746f 6d61 7469 6361 6c6c
    automaticall │ │ │ +0003cfe0: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ +0003cff0: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
    .
  • ..
  • ..

    createFastGloba │ │ │ +0003d080: 6c53 6d6f 6f74 6865 7246 696c 7465 723c lSmootherFilter< │ │ │ +0003d090: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ +0003d0d0: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ +0003d0e0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;< │ │ │ +0003d100: 6120 6872 6566 3d22 4661 7374 476c 6f62 a href="FastGlob │ │ │ +0003d110: 616c 536d 6f6f 7468 6572 4669 6c74 6572 alSmootherFilter │ │ │ +0003d120: 2e68 746d 6c22 2074 6974 6c65 3d22 636c .html" title="cl │ │ │ +0003d130: 6173 7320 696e 206f 7267 2e6f 7065 6e63 ass in org.openc │ │ │ +0003d140: 762e 7869 6d67 7072 6f63 223e 4661 7374 v.ximgproc">Fast │ │ │ +0003d150: 476c 6f62 616c 536d 6f6f 7468 6572 4669 GlobalSmootherFi │ │ │ +0003d160: 6c74 6572 3c2f 613e 3c2f 7370 616e 3e26 lter& │ │ │ +0003d170: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ +0003d190: 6372 6561 7465 4661 7374 476c 6f62 616c createFastGlobal │ │ │ +0003d1a0: 536d 6f6f 7468 6572 4669 6c74 6572 3c2f SmootherFilter( │ │ │ +0003d210: 4d61 743c 2f61 3e26 6e62 7370 3b67 7569 Mat gui │ │ │ +0003d220: 6465 2c0a 2064 6f75 626c 6526 6e62 7370 de,. double  │ │ │ +0003d230: 3b6c 616d 6264 612c 0a20 646f 7562 6c65 ;lambda,. double │ │ │ +0003d240: 266e 6273 703b 7369 676d 615f 636f 6c6f  sigma_colo │ │ │ +0003d250: 7229 3c2f 7370 616e 3e3c 2f64 6976 3e0a r)
    . │ │ │ +0003d260: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
    Factory metho │ │ │ +0003d280: 642c 2063 7265 6174 6520 696e 7374 616e d, create instan │ │ │ +0003d290: 6365 206f 6620 4661 7374 476c 6f62 616c ce of FastGlobal │ │ │ +0003d2a0: 536d 6f6f 7468 6572 4669 6c74 6572 2061 SmootherFilter a │ │ │ +0003d2b0: 6e64 2065 7865 6375 7465 2074 6865 2069 nd execute the i │ │ │ +0003d2c0: 6e69 7469 616c 697a 6174 696f 6e20 726f nitialization ro │ │ │ +0003d2d0: 7574 696e 6573 2e3c 2f64 6976 3e0a 3c64 utines.
    . │ │ │ +0003d2f0: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ +0003d300: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0003d310: 6775 6964 653c 2f63 6f64 653e 202d 2069 guide - i │ │ │ +0003d320: 6d61 6765 2073 6572 7669 6e67 2061 7320 mage serving as │ │ │ +0003d330: 6775 6964 6520 666f 7220 6669 6c74 6572 guide for filter │ │ │ +0003d340: 696e 672e 2049 7420 7368 6f75 6c64 2068 ing. It should h │ │ │ +0003d350: 6176 6520 382d 6269 7420 6465 7074 6820 ave 8-bit depth │ │ │ +0003d360: 616e 6420 6569 7468 6572 2031 206f 7220 and either 1 or │ │ │ +0003d370: 3320 6368 616e 6e65 6c73 2e3c 2f64 643e 3 channels.
    │ │ │ +0003d380: 0a3c 6464 3e3c 636f 6465 3e6c 616d 6264 .
    lambd │ │ │ +0003d390: 613c 2f63 6f64 653e 202d 2070 6172 616d a - param │ │ │ +0003d3a0: 6574 6572 2064 6566 696e 696e 6720 7468 eter defining th │ │ │ +0003d3b0: 6520 616d 6f75 6e74 206f 6620 7265 6775 e amount of regu │ │ │ +0003d3c0: 6c61 7269 7a61 7469 6f6e 3c2f 6464 3e0a larization
    . │ │ │ +0003d3d0: 3c64 643e 3c63 6f64 653e 7369 676d 615f
    sigma_ │ │ │ +0003d3e0: 636f 6c6f 723c 2f63 6f64 653e 202d 2070 color - p │ │ │ +0003d3f0: 6172 616d 6574 6572 2c20 7468 6174 2069 arameter, that i │ │ │ +0003d400: 7320 7369 6d69 6c61 7220 746f 2063 6f6c s similar to col │ │ │ +0003d410: 6f72 2073 7061 6365 2073 6967 6d61 2069 or space sigma i │ │ │ +0003d420: 6e20 6269 6c61 7465 7261 6c46 696c 7465 n bilateralFilte │ │ │ +0003d430: 722e 0a0a 2069 7420 7368 6f75 6c64 2062 r... it should b │ │ │ +0003d440: 6520 302e 3235 2e20 5365 7474 696e 6720 e 0.25. Setting │ │ │ +0003d450: 6974 2074 6f20 312e 3020 6d61 7920 6c65 it to 1.0 may le │ │ │ +0003d460: 6164 2074 6f20 7374 7265 616b 696e 6720 ad to streaking │ │ │ +0003d470: 6172 7469 6661 6374 732e 0a0a 0a20 466f artifacts.... Fo │ │ │ +0003d480: 7220 6d6f 7265 2064 6574 6169 6c73 2061 r more details a │ │ │ +0003d490: 626f 7574 2046 6173 7420 476c 6f62 616c bout Fast Global │ │ │ +0003d4a0: 2053 6d6f 6f74 6865 7220 7061 7261 6d65 Smoother parame │ │ │ +0003d4b0: 7465 7273 2c20 7365 6520 7468 6520 6f72 ters, see the or │ │ │ +0003d4c0: 6967 696e 616c 2070 6170 6572 2043 4954 iginal paper CIT │ │ │ +0003d4d0: 453a 204d 696e 3230 3134 2e20 486f 7765 E: Min2014. Howe │ │ │ +0003d4e0: 7665 722c 2070 6c65 6173 6520 6e6f 7465 ver, please note │ │ │ +0003d4f0: 2074 6861 740a 2074 6865 7265 2061 7265 that. there are │ │ │ +0003d500: 2073 6576 6572 616c 2064 6966 6665 7265 several differe │ │ │ +0003d510: 6e63 6573 2e20 4c61 6d62 6461 2061 7474 nces. Lambda att │ │ │ +0003d520: 656e 7561 7469 6f6e 2064 6573 6372 6962 enuation describ │ │ │ +0003d530: 6564 2069 6e20 7468 6520 7061 7065 7220 ed in the paper │ │ │ +0003d540: 6973 2069 6d70 6c65 6d65 6e74 6564 2061 is implemented a │ │ │ +0003d550: 2062 6974 2064 6966 6665 7265 6e74 6c79 bit differently │ │ │ +0003d560: 2073 6f20 646f 206e 6f74 0a20 6578 7065 so do not. expe │ │ │ +0003d570: 6374 2074 6865 2072 6573 756c 7473 2074 ct the results t │ │ │ +0003d580: 6f20 6265 2069 6465 6e74 6963 616c 2074 o be identical t │ │ │ +0003d590: 6f20 7468 6f73 6520 6672 6f6d 2074 6865 o those from the │ │ │ +0003d5a0: 2070 6170 6572 3b20 7369 676d 615f 636f paper; sigma_co │ │ │ +0003d5b0: 6c6f 7220 7661 6c75 6573 2066 726f 6d20 lor values from │ │ │ +0003d5c0: 7468 6520 7061 7065 7220 7368 6f75 6c64 the paper should │ │ │ +0003d5d0: 2062 6520 6d75 6c74 6970 6c69 6564 2062 be multiplied b │ │ │ +0003d5e0: 7920 3235 352e 3020 746f 0a20 6163 6869 y 255.0 to. achi │ │ │ +0003d5f0: 6576 6520 7468 6520 7361 6d65 2065 6666 eve the same eff │ │ │ +0003d600: 6563 742e 2041 6c73 6f2c 2069 6e20 6361 ect. Also, in ca │ │ │ +0003d610: 7365 206f 6620 696d 6167 6520 6669 6c74 se of image filt │ │ │ +0003d620: 6572 696e 6720 7768 6572 6520 736f 7572 ering where sour │ │ │ +0003d630: 6365 2061 6e64 2067 7569 6465 2069 6d61 ce and guide ima │ │ │ +0003d640: 6765 2061 7265 2074 6865 2073 616d 652c ge are the same, │ │ │ +0003d650: 2061 7574 686f 7273 0a20 7072 6f70 6f73 authors. propos │ │ │ +0003d660: 6520 746f 2064 796e 616d 6963 616c 6c79 e to dynamically │ │ │ +0003d670: 2075 7064 6174 6520 7468 6520 6775 6964 update the guid │ │ │ +0003d680: 6520 696d 6167 6520 6166 7465 7220 6561 e image after ea │ │ │ +0003d690: 6368 2069 7465 7261 7469 6f6e 2e20 546f ch iteration. To │ │ │ +0003d6a0: 206d 6178 696d 697a 6520 7468 6520 7065 maximize the pe │ │ │ +0003d6b0: 7266 6f72 6d61 6e63 6520 7468 6973 2066 rformance this f │ │ │ +0003d6c0: 6561 7475 7265 0a20 7761 7320 6e6f 7420 eature. was not │ │ │ +0003d6d0: 696d 706c 656d 656e 7465 6420 6865 7265 implemented here │ │ │ +0003d6e0: 2e3c 2f64 643e 0a3c 6474 3e52 6574 7572 .
    .
    Retur │ │ │ +0003d6f0: 6e73 3a3c 2f64 743e 0a3c 6464 3e61 7574 ns:
    .
    aut │ │ │ +0003d700: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ +0003d710: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
    .. │ │ │ +0003d720: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e

  • . │ │ │ +0003d730: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .

    fastGloba │ │ │ +0003d7d0: 6c53 6d6f 6f74 6865 7246 696c 7465 723c lSmootherFilter< │ │ │ +0003d7e0: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ +0003d820: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ +0003d830: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;v │ │ │ +0003d850: 6f69 643c 2f73 7061 6e3e 266e 6273 703b oid  │ │ │ +0003d860: 3c73 7061 6e20 636c 6173 733d 2265 6c65 fastG │ │ │ +0003d880: 6c6f 6261 6c53 6d6f 6f74 6865 7246 696c lobalSmootherFil │ │ │ +0003d890: 7465 723c 2f73 7061 6e3e 3c77 6272 3e3c ter< │ │ │ +0003d8a0: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ +0003d8b0: 6d65 7465 7273 223e 283c 6120 6872 6566 meters">(Mat&nbs │ │ │ +0003d900: 703b 6775 6964 652c 0a20 3c61 2068 7265 p;guide,. Mat&nb │ │ │ +0003d950: 7370 3b73 7263 2c0a 203c 6120 6872 6566 sp;src,. Mat&nbs │ │ │ +0003d9a0: 703b 6473 742c 0a20 646f 7562 6c65 266e p;dst,. double&n │ │ │ +0003d9b0: 6273 703b 6c61 6d62 6461 2c0a 2064 6f75 bsp;lambda,. dou │ │ │ +0003d9c0: 626c 6526 6e62 7370 3b73 6967 6d61 5f63 ble sigma_c │ │ │ +0003d9d0: 6f6c 6f72 2c0a 2064 6f75 626c 6526 6e62 olor,. double&nb │ │ │ +0003d9e0: 7370 3b6c 616d 6264 615f 6174 7465 6e75 sp;lambda_attenu │ │ │ +0003d9f0: 6174 696f 6e2c 0a20 696e 7426 6e62 7370 ation,. int  │ │ │ +0003da00: 3b6e 756d 5f69 7465 7229 3c2f 7370 616e ;num_iter)
    .
    Simpl │ │ │ +0003da30: 6520 6f6e 652d 6c69 6e65 2046 6173 7420 e one-line Fast │ │ │ +0003da40: 476c 6f62 616c 2053 6d6f 6f74 6865 7220 Global Smoother │ │ │ +0003da50: 6669 6c74 6572 2063 616c 6c2e 2049 6620 filter call. If │ │ │ +0003da60: 796f 7520 6861 7665 206d 756c 7469 706c you have multipl │ │ │ +0003da70: 6520 696d 6167 6573 2074 6f20 6669 6c74 e images to filt │ │ │ +0003da80: 6572 2077 6974 6820 7468 6520 7361 6d65 er with the same │ │ │ +0003da90: 0a20 6775 6964 6520 7468 656e 2075 7365 . guide then use │ │ │ +0003daa0: 2046 6173 7447 6c6f 6261 6c53 6d6f 6f74 FastGlobalSmoot │ │ │ +0003dab0: 6865 7246 696c 7465 7220 696e 7465 7266 herFilter interf │ │ │ +0003dac0: 6163 6520 746f 2061 766f 6964 2065 7874 ace to avoid ext │ │ │ +0003dad0: 7261 2063 6f6d 7075 7461 7469 6f6e 732e ra computations. │ │ │ +0003dae0: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ +0003db00: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ +0003db10: 6464 3e3c 636f 6465 3e67 7569 6465 3c2f dd>guide - image se │ │ │ +0003db30: 7276 696e 6720 6173 2067 7569 6465 2066 rving as guide f │ │ │ +0003db40: 6f72 2066 696c 7465 7269 6e67 2e20 4974 or filtering. It │ │ │ +0003db50: 2073 686f 756c 6420 6861 7665 2038 2d62 should have 8-b │ │ │ +0003db60: 6974 2064 6570 7468 2061 6e64 2065 6974 it depth and eit │ │ │ +0003db70: 6865 7220 3120 6f72 2033 2063 6861 6e6e her 1 or 3 chann │ │ │ +0003db80: 656c 732e 3c2f 6464 3e0a 3c64 643e 3c63 els..
    src - │ │ │ +0003dba0: 2073 6f75 7263 6520 696d 6167 6520 666f source image fo │ │ │ +0003dbb0: 7220 6669 6c74 6572 696e 6720 7769 7468 r filtering with │ │ │ +0003dbc0: 2075 6e73 6967 6e65 6420 382d 6269 7420 unsigned 8-bit │ │ │ +0003dbd0: 6f72 2073 6967 6e65 6420 3136 2d62 6974 or signed 16-bit │ │ │ +0003dbe0: 206f 7220 666c 6f61 7469 6e67 2d70 6f69 or floating-poi │ │ │ +0003dbf0: 6e74 2033 322d 6269 7420 6465 7074 6820 nt 32-bit depth │ │ │ +0003dc00: 616e 6420 7570 2074 6f20 3420 6368 616e and up to 4 chan │ │ │ +0003dc10: 6e65 6c73 2e3c 2f64 643e 0a3c 6464 3e3c nels.
    .
    < │ │ │ +0003dc20: 636f 6465 3e64 7374 3c2f 636f 6465 3e20 code>dst │ │ │ +0003dc30: 2d20 6465 7374 696e 6174 696f 6e20 696d - destination im │ │ │ +0003dc40: 6167 652e 3c2f 6464 3e0a 3c64 643e 3c63 age.
    .
    lambda - parameter de │ │ │ +0003dc70: 6669 6e69 6e67 2074 6865 2061 6d6f 756e fining the amoun │ │ │ +0003dc80: 7420 6f66 2072 6567 756c 6172 697a 6174 t of regularizat │ │ │ +0003dc90: 696f 6e3c 2f64 643e 0a3c 6464 3e3c 636f ion
    .
    sigma_color - paramete │ │ │ +0003dcc0: 722c 2074 6861 7420 6973 2073 696d 696c r, that is simil │ │ │ +0003dcd0: 6172 2074 6f20 636f 6c6f 7220 7370 6163 ar to color spac │ │ │ +0003dce0: 6520 7369 676d 6120 696e 2062 696c 6174 e sigma in bilat │ │ │ +0003dcf0: 6572 616c 4669 6c74 6572 2e3c 2f64 643e eralFilter.
    │ │ │ +0003dd00: 0a3c 6464 3e3c 636f 6465 3e6c 616d 6264 .
    lambd │ │ │ +0003dd10: 615f 6174 7465 6e75 6174 696f 6e3c 2f63 a_attenuation - internal │ │ │ +0003dd30: 7061 7261 6d65 7465 722c 2064 6566 696e parameter, defin │ │ │ +0003dd40: 696e 6720 686f 7720 6d75 6368 206c 616d ing how much lam │ │ │ +0003dd50: 6264 6120 6465 6372 6561 7365 7320 6166 bda decreases af │ │ │ +0003dd60: 7465 7220 6561 6368 2069 7465 7261 7469 ter each iterati │ │ │ +0003dd70: 6f6e 2e20 4e6f 726d 616c 6c79 2c0a 2069 on. Normally,. i │ │ │ +0003dd80: 7420 7368 6f75 6c64 2062 6520 302e 3235 t should be 0.25 │ │ │ +0003dd90: 2e20 5365 7474 696e 6720 6974 2074 6f20 . Setting it to │ │ │ +0003dda0: 312e 3020 6d61 7920 6c65 6164 2074 6f20 1.0 may lead to │ │ │ +0003ddb0: 7374 7265 616b 696e 6720 6172 7469 6661 streaking artifa │ │ │ +0003ddc0: 6374 732e 3c2f 6464 3e0a 3c64 643e 3c63 cts.
    .
    num_iter - number of │ │ │ +0003ddf0: 6974 6572 6174 696f 6e73 2075 7365 6420 iterations used │ │ │ +0003de00: 666f 7220 6669 6c74 6572 696e 672c 2033 for filtering, 3 │ │ │ +0003de10: 2069 7320 7573 7561 6c6c 7920 656e 6f75 is usually enou │ │ │ +0003de20: 6768 2e3c 2f64 643e 0a3c 2f64 6c3e 0a3c gh.
    .
    .< │ │ │ +0003de30: 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 3e0a /section>.

  • . │ │ │ +0003de40: 3c6c 693e 0a3c 7365 6374 696f 6e20 636c
  • .
    .fastGlobalSmoo │ │ │ +0003dee0: 7468 6572 4669 6c74 6572 3c2f 6833 3e0a therFilter. │ │ │ +0003def0: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
    public sta │ │ │ +0003df30: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ +0003df40: 3c73 7061 6e20 636c 6173 733d 2272 6574 void fastGlobal │ │ │ +0003df90: 536d 6f6f 7468 6572 4669 6c74 6572 3c2f SmootherFilter( │ │ │ +0003e000: 4d61 743c 2f61 3e26 6e62 7370 3b67 7569 Mat gui │ │ │ +0003e010: 6465 2c0a 203c 6120 6872 6566 3d22 2e2e de,. Mat sr │ │ │ +0003e060: 632c 0a20 3c61 2068 7265 663d 222e 2e2f c,. │ │ │ +0003e0a0: 4d61 743c 2f61 3e26 6e62 7370 3b64 7374 Mat dst │ │ │ +0003e0b0: 2c0a 2064 6f75 626c 6526 6e62 7370 3b6c ,. double l │ │ │ +0003e0c0: 616d 6264 612c 0a20 646f 7562 6c65 266e ambda,. double&n │ │ │ +0003e0d0: 6273 703b 7369 676d 615f 636f 6c6f 722c bsp;sigma_color, │ │ │ +0003e0e0: 0a20 646f 7562 6c65 266e 6273 703b 6c61 . double la │ │ │ +0003e0f0: 6d62 6461 5f61 7474 656e 7561 7469 6f6e mbda_attenuation │ │ │ +0003e100: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    .< │ │ │ +0003e110: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ +0003e120: 223e 5369 6d70 6c65 206f 6e65 2d6c 696e ">Simple one-lin │ │ │ +0003e130: 6520 4661 7374 2047 6c6f 6261 6c20 536d e Fast Global Sm │ │ │ +0003e140: 6f6f 7468 6572 2066 696c 7465 7220 6361 oother filter ca │ │ │ +0003e150: 6c6c 2e20 4966 2079 6f75 2068 6176 6520 ll. If you have │ │ │ +0003e160: 6d75 6c74 6970 6c65 2069 6d61 6765 7320 multiple images │ │ │ +0003e170: 746f 2066 696c 7465 7220 7769 7468 2074 to filter with t │ │ │ +0003e180: 6865 2073 616d 650a 2067 7569 6465 2074 he same. guide t │ │ │ +0003e190: 6865 6e20 7573 6520 4661 7374 476c 6f62 hen use FastGlob │ │ │ +0003e1a0: 616c 536d 6f6f 7468 6572 4669 6c74 6572 alSmootherFilter │ │ │ +0003e1b0: 2069 6e74 6572 6661 6365 2074 6f20 6176 interface to av │ │ │ +0003e1c0: 6f69 6420 6578 7472 6120 636f 6d70 7574 oid extra comput │ │ │ +0003e1d0: 6174 696f 6e73 2e3c 2f64 6976 3e0a 3c64 ations.. │ │ │ +0003e1f0: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ +0003e200: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0003e210: 6775 6964 653c 2f63 6f64 653e 202d 2069 guide - i │ │ │ +0003e220: 6d61 6765 2073 6572 7669 6e67 2061 7320 mage serving as │ │ │ +0003e230: 6775 6964 6520 666f 7220 6669 6c74 6572 guide for filter │ │ │ +0003e240: 696e 672e 2049 7420 7368 6f75 6c64 2068 ing. It should h │ │ │ +0003e250: 6176 6520 382d 6269 7420 6465 7074 6820 ave 8-bit depth │ │ │ +0003e260: 616e 6420 6569 7468 6572 2031 206f 7220 and either 1 or │ │ │ +0003e270: 3320 6368 616e 6e65 6c73 2e3c 2f64 643e 3 channels.
    │ │ │ +0003e280: 0a3c 6464 3e3c 636f 6465 3e73 7263 3c2f .
    src - source i │ │ │ +0003e2a0: 6d61 6765 2066 6f72 2066 696c 7465 7269 mage for filteri │ │ │ +0003e2b0: 6e67 2077 6974 6820 756e 7369 676e 6564 ng with unsigned │ │ │ +0003e2c0: 2038 2d62 6974 206f 7220 7369 676e 6564 8-bit or signed │ │ │ +0003e2d0: 2031 362d 6269 7420 6f72 2066 6c6f 6174 16-bit or float │ │ │ +0003e2e0: 696e 672d 706f 696e 7420 3332 2d62 6974 ing-point 32-bit │ │ │ +0003e2f0: 2064 6570 7468 2061 6e64 2075 7020 746f depth and up to │ │ │ +0003e300: 2034 2063 6861 6e6e 656c 732e 3c2f 6464 4 channels.
    .
    dst< │ │ │ +0003e320: 2f63 6f64 653e 202d 2064 6573 7469 6e61 /code> - destina │ │ │ +0003e330: 7469 6f6e 2069 6d61 6765 2e3c 2f64 643e tion image.
    │ │ │ +0003e340: 0a3c 6464 3e3c 636f 6465 3e6c 616d 6264 .
    lambd │ │ │ +0003e350: 613c 2f63 6f64 653e 202d 2070 6172 616d a - param │ │ │ +0003e360: 6574 6572 2064 6566 696e 696e 6720 7468 eter defining th │ │ │ +0003e370: 6520 616d 6f75 6e74 206f 6620 7265 6775 e amount of regu │ │ │ +0003e380: 6c61 7269 7a61 7469 6f6e 3c2f 6464 3e0a larization
    . │ │ │ +0003e390: 3c64 643e 3c63 6f64 653e 7369 676d 615f
    sigma_ │ │ │ +0003e3a0: 636f 6c6f 723c 2f63 6f64 653e 202d 2070 color - p │ │ │ +0003e3b0: 6172 616d 6574 6572 2c20 7468 6174 2069 arameter, that i │ │ │ +0003e3c0: 7320 7369 6d69 6c61 7220 746f 2063 6f6c s similar to col │ │ │ +0003e3d0: 6f72 2073 7061 6365 2073 6967 6d61 2069 or space sigma i │ │ │ +0003e3e0: 6e20 6269 6c61 7465 7261 6c46 696c 7465 n bilateralFilte │ │ │ +0003e3f0: 722e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 r.
    .
    lambda_attenua │ │ │ +0003e410: 7469 6f6e 3c2f 636f 6465 3e20 2d20 696e tion - in │ │ │ +0003e420: 7465 726e 616c 2070 6172 616d 6574 6572 ternal parameter │ │ │ +0003e430: 2c20 6465 6669 6e69 6e67 2068 6f77 206d , defining how m │ │ │ +0003e440: 7563 6820 6c61 6d62 6461 2064 6563 7265 uch lambda decre │ │ │ +0003e450: 6173 6573 2061 6674 6572 2065 6163 6820 ases after each │ │ │ +0003e460: 6974 6572 6174 696f 6e2e 204e 6f72 6d61 iteration. Norma │ │ │ +0003e470: 6c6c 792c 0a20 6974 2073 686f 756c 6420 lly,. it should │ │ │ +0003e480: 6265 2030 2e32 352e 2053 6574 7469 6e67 be 0.25. Setting │ │ │ +0003e490: 2069 7420 746f 2031 2e30 206d 6179 206c it to 1.0 may l │ │ │ +0003e4a0: 6561 6420 746f 2073 7472 6561 6b69 6e67 ead to streaking │ │ │ +0003e4b0: 2061 7274 6966 6163 7473 2e3c 2f64 643e artifacts.
    │ │ │ +0003e4c0: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e ..
    .
  • .
  • ..< │ │ │ +0003e560: 6833 3e66 6173 7447 6c6f 6261 6c53 6d6f h3>fastGlobalSmo │ │ │ +0003e570: 6f74 6865 7246 696c 7465 723c 2f68 333e otherFilter │ │ │ +0003e580: 0a3c 6469 7620 636c 6173 733d 226d 656d .
    < │ │ │ +0003e5a0: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ +0003e5b0: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ +0003e5c0: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ +0003e5d0: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;void< │ │ │ +0003e5f0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> fastGloba │ │ │ +0003e620: 6c53 6d6f 6f74 6865 7246 696c 7465 723c lSmootherFilter< │ │ │ +0003e630: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(Mat gu │ │ │ +0003e6a0: 6964 652c 0a20 3c61 2068 7265 663d 222e ide,. Mat s │ │ │ +0003e6f0: 7263 2c0a 203c 6120 6872 6566 3d22 2e2e rc,. Mat ds │ │ │ +0003e740: 742c 0a20 646f 7562 6c65 266e 6273 703b t,. double  │ │ │ +0003e750: 6c61 6d62 6461 2c0a 2064 6f75 626c 6526 lambda,. double& │ │ │ +0003e760: 6e62 7370 3b73 6967 6d61 5f63 6f6c 6f72 nbsp;sigma_color │ │ │ +0003e770: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    .< │ │ │ +0003e780: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ +0003e790: 223e 5369 6d70 6c65 206f 6e65 2d6c 696e ">Simple one-lin │ │ │ +0003e7a0: 6520 4661 7374 2047 6c6f 6261 6c20 536d e Fast Global Sm │ │ │ +0003e7b0: 6f6f 7468 6572 2066 696c 7465 7220 6361 oother filter ca │ │ │ +0003e7c0: 6c6c 2e20 4966 2079 6f75 2068 6176 6520 ll. If you have │ │ │ +0003e7d0: 6d75 6c74 6970 6c65 2069 6d61 6765 7320 multiple images │ │ │ +0003e7e0: 746f 2066 696c 7465 7220 7769 7468 2074 to filter with t │ │ │ +0003e7f0: 6865 2073 616d 650a 2067 7569 6465 2074 he same. guide t │ │ │ +0003e800: 6865 6e20 7573 6520 4661 7374 476c 6f62 hen use FastGlob │ │ │ +0003e810: 616c 536d 6f6f 7468 6572 4669 6c74 6572 alSmootherFilter │ │ │ +0003e820: 2069 6e74 6572 6661 6365 2074 6f20 6176 interface to av │ │ │ +0003e830: 6f69 6420 6578 7472 6120 636f 6d70 7574 oid extra comput │ │ │ +0003e840: 6174 696f 6e73 2e3c 2f64 6976 3e0a 3c64 ations.. │ │ │ +0003e860: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ +0003e870: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0003e880: 6775 6964 653c 2f63 6f64 653e 202d 2069 guide - i │ │ │ +0003e890: 6d61 6765 2073 6572 7669 6e67 2061 7320 mage serving as │ │ │ +0003e8a0: 6775 6964 6520 666f 7220 6669 6c74 6572 guide for filter │ │ │ +0003e8b0: 696e 672e 2049 7420 7368 6f75 6c64 2068 ing. It should h │ │ │ +0003e8c0: 6176 6520 382d 6269 7420 6465 7074 6820 ave 8-bit depth │ │ │ +0003e8d0: 616e 6420 6569 7468 6572 2031 206f 7220 and either 1 or │ │ │ +0003e8e0: 3320 6368 616e 6e65 6c73 2e3c 2f64 643e 3 channels.
    │ │ │ +0003e8f0: 0a3c 6464 3e3c 636f 6465 3e73 7263 3c2f .
    src - source i │ │ │ +0003e910: 6d61 6765 2066 6f72 2066 696c 7465 7269 mage for filteri │ │ │ +0003e920: 6e67 2077 6974 6820 756e 7369 676e 6564 ng with unsigned │ │ │ +0003e930: 2038 2d62 6974 206f 7220 7369 676e 6564 8-bit or signed │ │ │ +0003e940: 2031 362d 6269 7420 6f72 2066 6c6f 6174 16-bit or float │ │ │ +0003e950: 696e 672d 706f 696e 7420 3332 2d62 6974 ing-point 32-bit │ │ │ +0003e960: 2064 6570 7468 2061 6e64 2075 7020 746f depth and up to │ │ │ +0003e970: 2034 2063 6861 6e6e 656c 732e 3c2f 6464 4 channels.
    .
    dst< │ │ │ +0003e990: 2f63 6f64 653e 202d 2064 6573 7469 6e61 /code> - destina │ │ │ +0003e9a0: 7469 6f6e 2069 6d61 6765 2e3c 2f64 643e tion image.
    │ │ │ +0003e9b0: 0a3c 6464 3e3c 636f 6465 3e6c 616d 6264 .
    lambd │ │ │ +0003e9c0: 613c 2f63 6f64 653e 202d 2070 6172 616d a - param │ │ │ +0003e9d0: 6574 6572 2064 6566 696e 696e 6720 7468 eter defining th │ │ │ +0003e9e0: 6520 616d 6f75 6e74 206f 6620 7265 6775 e amount of regu │ │ │ +0003e9f0: 6c61 7269 7a61 7469 6f6e 3c2f 6464 3e0a larization
    . │ │ │ +0003ea00: 3c64 643e 3c63 6f64 653e 7369 676d 615f
    sigma_ │ │ │ +0003ea10: 636f 6c6f 723c 2f63 6f64 653e 202d 2070 color - p │ │ │ +0003ea20: 6172 616d 6574 6572 2c20 7468 6174 2069 arameter, that i │ │ │ +0003ea30: 7320 7369 6d69 6c61 7220 746f 2063 6f6c s similar to col │ │ │ +0003ea40: 6f72 2073 7061 6365 2073 6967 6d61 2069 or space sigma i │ │ │ +0003ea50: 6e20 6269 6c61 7465 7261 6c46 696c 7465 n bilateralFilte │ │ │ +0003ea60: 722e 0a0a 2069 7420 7368 6f75 6c64 2062 r... it should b │ │ │ +0003ea70: 6520 302e 3235 2e20 5365 7474 696e 6720 e 0.25. Setting │ │ │ +0003ea80: 6974 2074 6f20 312e 3020 6d61 7920 6c65 it to 1.0 may le │ │ │ +0003ea90: 6164 2074 6f20 7374 7265 616b 696e 6720 ad to streaking │ │ │ +0003eaa0: 6172 7469 6661 6374 732e 3c2f 6464 3e0a artifacts.
    . │ │ │ +0003eab0: 3c2f 646c 3e0a 3c2f 7365 6374 696f 6e3e . │ │ │ +0003eac0: 0a3c 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 .
  • .
  • ..

    l0 │ │ │ +0003eb30: 536d 6f6f 7468 3c2f 6833 3e0a 3c64 6976 Smooth

    .
    public static< │ │ │ +0003eb80: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> void l0Smooth( │ │ │ +0003ec00: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ +0003ec40: 2f61 3e26 6e62 7370 3b73 7263 2c0a 203c /a> src,. < │ │ │ +0003ec50: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ +0003ec60: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ +0003ec70: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +0003ec80: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat dst,. do │ │ │ +0003eca0: 7562 6c65 266e 6273 703b 6c61 6d62 6461 uble lambda │ │ │ +0003ecb0: 2c0a 2064 6f75 626c 6526 6e62 7370 3b6b ,. double k │ │ │ +0003ecc0: 6170 7061 293c 2f73 7061 6e3e 3c2f 6469 appa).
    Global ima │ │ │ +0003ecf0: 6765 2073 6d6f 6f74 6869 6e67 2076 6961 ge smoothing via │ │ │ +0003ed00: 204c 3020 6772 6164 6965 6e74 206d 696e L0 gradient min │ │ │ +0003ed10: 696d 697a 6174 696f 6e2e 3c2f 6469 763e imization.
    │ │ │ +0003ed20: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
    .
    Paramete │ │ │ +0003ed40: 7273 3a3c 2f64 743e 0a3c 6464 3e3c 636f rs:
    .
    src - │ │ │ +0003ed60: 736f 7572 6365 2069 6d61 6765 2066 6f72 source image for │ │ │ +0003ed70: 2066 696c 7465 7269 6e67 2077 6974 6820 filtering with │ │ │ +0003ed80: 756e 7369 676e 6564 2038 2d62 6974 206f unsigned 8-bit o │ │ │ +0003ed90: 7220 7369 676e 6564 2031 362d 6269 7420 r signed 16-bit │ │ │ +0003eda0: 6f72 2066 6c6f 6174 696e 672d 706f 696e or floating-poin │ │ │ +0003edb0: 7420 6465 7074 682e 3c2f 6464 3e0a 3c64 t depth.
    .dst - destination │ │ │ +0003ede0: 2069 6d61 6765 2e3c 2f64 643e 0a3c 6464 image..
    lambda - parameter │ │ │ +0003ee10: 2064 6566 696e 696e 6720 7468 6520 736d defining the sm │ │ │ +0003ee20: 6f6f 7468 2074 6572 6d20 7765 6967 6874 ooth term weight │ │ │ +0003ee30: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    kappa - │ │ │ +0003ee50: 7061 7261 6d65 7465 7220 6465 6669 6e69 parameter defini │ │ │ +0003ee60: 6e67 2074 6865 2069 6e63 7265 6173 696e ng the increasin │ │ │ +0003ee70: 6720 6661 6374 6f72 206f 6620 7468 6520 g factor of the │ │ │ +0003ee80: 7765 6967 6874 206f 6620 7468 6520 6772 weight of the gr │ │ │ +0003ee90: 6164 6965 6e74 2064 6174 6120 7465 726d adient data term │ │ │ +0003eea0: 2e0a 0a20 466f 7220 6d6f 7265 2064 6574 ... For more det │ │ │ +0003eeb0: 6169 6c73 2061 626f 7574 204c 3020 536d ails about L0 Sm │ │ │ +0003eec0: 6f6f 7468 6572 2c20 7365 6520 7468 6520 oother, see the │ │ │ +0003eed0: 6f72 6967 696e 616c 2070 6170 6572 2043 original paper C │ │ │ +0003eee0: 4954 453a 2078 7532 3031 3169 6d61 6765 ITE: xu2011image │ │ │ +0003eef0: 2e3c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 .
    .
    .
    .
  • ..
    .

    l0 │ │ │ +0003ef70: 536d 6f6f 7468 3c2f 6833 3e0a 3c64 6976 Smooth

    .
    .< │ │ │ +0003f100: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ +0003f110: 223e 476c 6f62 616c 2069 6d61 6765 2073 ">Global image s │ │ │ +0003f120: 6d6f 6f74 6869 6e67 2076 6961 204c 3020 moothing via L0 │ │ │ +0003f130: 6772 6164 6965 6e74 206d 696e 696d 697a gradient minimiz │ │ │ +0003f140: 6174 696f 6e2e 3c2f 6469 763e 0a3c 646c ation..
    . │ │ │ +0003f160: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
    Parameters:< │ │ │ +0003f170: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e73 /dt>.
    s │ │ │ +0003f180: 7263 3c2f 636f 6465 3e20 2d20 736f 7572 rc - sour │ │ │ +0003f190: 6365 2069 6d61 6765 2066 6f72 2066 696c ce image for fil │ │ │ +0003f1a0: 7465 7269 6e67 2077 6974 6820 756e 7369 tering with unsi │ │ │ +0003f1b0: 676e 6564 2038 2d62 6974 206f 7220 7369 gned 8-bit or si │ │ │ +0003f1c0: 676e 6564 2031 362d 6269 7420 6f72 2066 gned 16-bit or f │ │ │ +0003f1d0: 6c6f 6174 696e 672d 706f 696e 7420 6465 loating-point de │ │ │ +0003f1e0: 7074 682e 3c2f 6464 3e0a 3c64 643e 3c63 pth.
    .
    dst - │ │ │ +0003f200: 2064 6573 7469 6e61 7469 6f6e 2069 6d61 destination ima │ │ │ +0003f210: 6765 2e3c 2f64 643e 0a3c 6464 3e3c 636f ge.
    .
    lambda │ │ │ +0003f230: 202d 2070 6172 616d 6574 6572 2064 6566 - parameter def │ │ │ +0003f240: 696e 696e 6720 7468 6520 736d 6f6f 7468 ining the smooth │ │ │ +0003f250: 2074 6572 6d20 7765 6967 6874 2e0a 0a0a term weight.... │ │ │ +0003f260: 2046 6f72 206d 6f72 6520 6465 7461 696c For more detail │ │ │ +0003f270: 7320 6162 6f75 7420 4c30 2053 6d6f 6f74 s about L0 Smoot │ │ │ +0003f280: 6865 722c 2073 6565 2074 6865 206f 7269 her, see the ori │ │ │ +0003f290: 6769 6e61 6c20 7061 7065 7220 4349 5445 ginal paper CITE │ │ │ +0003f2a0: 3a20 7875 3230 3131 696d 6167 652e 3c2f : xu2011image..
    ...
  • . │ │ │ +0003f2d0: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    . │ │ │ +0003f320: 3c68 333e 6c30 536d 6f6f 7468 3c2f 6833

    l0Smooth

    .
    . │ │ │ +0003f4a0: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
    Global image │ │ │ +0003f4c0: 736d 6f6f 7468 696e 6720 7669 6120 4c30 smoothing via L0 │ │ │ +0003f4d0: 2067 7261 6469 656e 7420 6d69 6e69 6d69 gradient minimi │ │ │ +0003f4e0: 7a61 7469 6f6e 2e3c 2f64 6976 3e0a 3c64 zation.
    . │ │ │ +0003f500: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ +0003f510: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0003f520: 7372 633c 2f63 6f64 653e 202d 2073 6f75 src - sou │ │ │ +0003f530: 7263 6520 696d 6167 6520 666f 7220 6669 rce image for fi │ │ │ +0003f540: 6c74 6572 696e 6720 7769 7468 2075 6e73 ltering with uns │ │ │ +0003f550: 6967 6e65 6420 382d 6269 7420 6f72 2073 igned 8-bit or s │ │ │ +0003f560: 6967 6e65 6420 3136 2d62 6974 206f 7220 igned 16-bit or │ │ │ +0003f570: 666c 6f61 7469 6e67 2d70 6f69 6e74 2064 floating-point d │ │ │ +0003f580: 6570 7468 2e3c 2f64 643e 0a3c 6464 3e3c epth.
    .
    < │ │ │ +0003f590: 636f 6465 3e64 7374 3c2f 636f 6465 3e20 code>dst │ │ │ +0003f5a0: 2d20 6465 7374 696e 6174 696f 6e20 696d - destination im │ │ │ +0003f5b0: 6167 652e 0a0a 0a0a 2046 6f72 206d 6f72 age..... For mor │ │ │ +0003f5c0: 6520 6465 7461 696c 7320 6162 6f75 7420 e details about │ │ │ +0003f5d0: 4c30 2053 6d6f 6f74 6865 722c 2073 6565 L0 Smoother, see │ │ │ +0003f5e0: 2074 6865 206f 7269 6769 6e61 6c20 7061 the original pa │ │ │ +0003f5f0: 7065 7220 4349 5445 3a20 7875 3230 3131 per CITE: xu2011 │ │ │ +0003f600: 696d 6167 652e 3c2f 6464 3e0a 3c2f 646c image.
    ..
    ..
  • .
    .

    createEd │ │ │ +0003f670: 6765 4177 6172 6549 6e74 6572 706f 6c61 geAwareInterpola │ │ │ +0003f680: 746f 723c 2f68 333e 0a3c 6469 7620 636c tor

    .
    p │ │ │ +0003f6c0: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static Edg │ │ │ +0003f740: 6541 7761 7265 496e 7465 7270 6f6c 6174 eAwareInterpolat │ │ │ +0003f750: 6f72 3c2f 613e 3c2f 7370 616e 3e26 6e62 or&nb │ │ │ +0003f760: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;cr │ │ │ +0003f780: 6561 7465 4564 6765 4177 6172 6549 6e74 eateEdgeAwareInt │ │ │ +0003f790: 6572 706f 6c61 746f 723c 2f73 7061 6e3e erpolator │ │ │ +0003f7a0: 2829 3c2f 6469 763e 0a3c 6469 7620 636c ()
    .
    Fact │ │ │ +0003f7c0: 6f72 7920 6d65 7468 6f64 2074 6861 7420 ory method that │ │ │ +0003f7d0: 6372 6561 7465 7320 616e 2069 6e73 7461 creates an insta │ │ │ +0003f7e0: 6e63 6520 6f66 2074 6865 0a20 4564 6765 nce of the. Edge │ │ │ +0003f7f0: 4177 6172 6549 6e74 6572 706f 6c61 746f AwareInterpolato │ │ │ +0003f800: 722e 3c2f 6469 763e 0a3c 646c 2063 6c61 r.
    .
    .
    │ │ │ +0003f820: 5265 7475 726e 733a 3c2f 6474 3e0a 3c64 Returns:
    .automatically │ │ │ +0003f840: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated.< │ │ │ +0003f850: 2f64 6c3e 0a3c 2f73 6563 7469 6f6e 3e0a /dl>.
    . │ │ │ +0003f860: 3c2f 6c69 3e0a 3c6c 693e 0a3c 7365 6374
  • .
  • . │ │ │ +0003f8a0: 0a3c 6833 3e63 7265 6174 6552 4943 496e .

    createRICIn │ │ │ +0003f8b0: 7465 7270 6f6c 6174 6f72 3c2f 6833 3e0a terpolator

    . │ │ │ +0003f8c0: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
    public sta │ │ │ +0003f900: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ +0003f910: 3c73 7061 6e20 636c 6173 733d 2272 6574 RI │ │ │ +0003f970: 4349 6e74 6572 706f 6c61 746f 723c 2f61 CInterpolator createR │ │ │ +0003f9b0: 4943 496e 7465 7270 6f6c 6174 6f72 3c2f ICInterpolator()
    .Factory method │ │ │ +0003f9f0: 7468 6174 2063 7265 6174 6573 2061 6e20 that creates an │ │ │ +0003fa00: 696e 7374 616e 6365 206f 6620 7468 650a instance of the. │ │ │ +0003fa10: 2052 4943 496e 7465 7270 6f6c 6174 6f72 RICInterpolator │ │ │ +0003fa20: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 ..
    .
    R │ │ │ +0003fa40: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
    .
    automatically g │ │ │ +0003fa60: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ..
  • .< │ │ │ +0003fa80: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    FastHoug │ │ │ +0003fb00: 6854 7261 6e73 666f 726d 3c2f 6833 3e0a hTransform

    . │ │ │ +0003fb10: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
    public sta │ │ │ +0003fb50: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ +0003fb60: 3c73 7061 6e20 636c 6173 733d 2272 6574 void FastHoughT │ │ │ +0003fbb0: 7261 6e73 666f 726d 3c2f 7370 616e 3e3c ransform< │ │ │ +0003fbc0: 7762 723e 3c73 7061 6e20 636c 6173 733d wbr>(Mat src,. Mat │ │ │ +0003fc70: 266e 6273 703b 6473 742c 0a20 696e 7426  dst,. int& │ │ │ +0003fc80: 6e62 7370 3b64 7374 4d61 7444 6570 7468 nbsp;dstMatDepth │ │ │ +0003fc90: 2c0a 2069 6e74 266e 6273 703b 616e 676c ,. int angl │ │ │ +0003fca0: 6552 616e 6765 2c0a 2069 6e74 266e 6273 eRange,. int&nbs │ │ │ +0003fcb0: 703b 6f70 2c0a 2069 6e74 266e 6273 703b p;op,. int  │ │ │ +0003fcc0: 6d61 6b65 536b 6577 293c 2f73 7061 6e3e makeSkew) │ │ │ +0003fcd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    Calcul │ │ │ +0003fcf0: 6174 6573 2032 4420 4661 7374 2048 6f75 ates 2D Fast Hou │ │ │ +0003fd00: 6768 2074 7261 6e73 666f 726d 206f 6620 gh transform of │ │ │ +0003fd10: 616e 2069 6d61 6765 2e0a 0a20 5468 6520 an image... The │ │ │ +0003fd20: 6675 6e63 7469 6f6e 2063 616c 6375 6c61 function calcula │ │ │ +0003fd30: 7465 7320 7468 6520 6661 7374 2048 6f75 tes the fast Hou │ │ │ +0003fd40: 6768 2074 7261 6e73 666f 726d 2066 6f72 gh transform for │ │ │ +0003fd50: 2066 756c 6c2c 2068 616c 6620 6f72 2071 full, half or q │ │ │ +0003fd60: 7561 7274 6572 0a20 7261 6e67 6520 6f66 uarter. range of │ │ │ +0003fd70: 2061 6e67 6c65 732e 3c2f 6469 763e 0a3c angles.
    .< │ │ │ +0003fd80: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ +0003fd90: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
    Parameters │ │ │ +0003fda0: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
    .
    src - au │ │ │ +0003fdc0: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ +0003fdd0: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated
    .
    < │ │ │ +0003fde0: 636f 6465 3e64 7374 3c2f 636f 6465 3e20 code>dst │ │ │ +0003fdf0: 2d20 6175 746f 6d61 7469 6361 6c6c 7920 - automatically │ │ │ +0003fe00: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated
    .< │ │ │ +0003fe10: 6464 3e3c 636f 6465 3e64 7374 4d61 7444 dd>dstMatD │ │ │ +0003fe20: 6570 7468 3c2f 636f 6465 3e20 2d20 6175 epth - au │ │ │ +0003fe30: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ +0003fe40: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated.
    < │ │ │ +0003fe50: 636f 6465 3e61 6e67 6c65 5261 6e67 653c code>angleRange< │ │ │ +0003fe60: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ +0003fe70: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ +0003fe80: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0003fe90: 6f70 3c2f 636f 6465 3e20 2d20 6175 746f op - auto │ │ │ +0003fea0: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ +0003feb0: 7465 643c 2f64 643e 0a3c 6464 3e3c 636f ted
    .
    makeSkew - automatical │ │ │ +0003fee0: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
    ...
  • .
  • ..

    FastHoug │ │ │ +0003ff80: 6854 7261 6e73 666f 726d 3c2f 6833 3e0a hTransform

    . │ │ │ +0003ff90: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
    public sta │ │ │ +0003ffd0: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ +0003ffe0: 3c73 7061 6e20 636c 6173 733d 2272 6574 void FastHoughT │ │ │ +00040030: 7261 6e73 666f 726d 3c2f 7370 616e 3e3c ransform< │ │ │ +00040040: 7762 723e 3c73 7061 6e20 636c 6173 733d wbr>(Mat src,. Mat │ │ │ +000400f0: 266e 6273 703b 6473 742c 0a20 696e 7426  dst,. int& │ │ │ +00040100: 6e62 7370 3b64 7374 4d61 7444 6570 7468 nbsp;dstMatDepth │ │ │ +00040110: 2c0a 2069 6e74 266e 6273 703b 616e 676c ,. int angl │ │ │ +00040120: 6552 616e 6765 2c0a 2069 6e74 266e 6273 eRange,. int&nbs │ │ │ +00040130: 703b 6f70 293c 2f73 7061 6e3e 3c2f 6469 p;op).
    Calculates │ │ │ +00040160: 2032 4420 4661 7374 2048 6f75 6768 2074 2D Fast Hough t │ │ │ +00040170: 7261 6e73 666f 726d 206f 6620 616e 2069 ransform of an i │ │ │ +00040180: 6d61 6765 2e0a 0a20 5468 6520 6675 6e63 mage... The func │ │ │ +00040190: 7469 6f6e 2063 616c 6375 6c61 7465 7320 tion calculates │ │ │ +000401a0: 7468 6520 6661 7374 2048 6f75 6768 2074 the fast Hough t │ │ │ +000401b0: 7261 6e73 666f 726d 2066 6f72 2066 756c ransform for ful │ │ │ +000401c0: 6c2c 2068 616c 6620 6f72 2071 7561 7274 l, half or quart │ │ │ +000401d0: 6572 0a20 7261 6e67 6520 6f66 2061 6e67 er. range of ang │ │ │ +000401e0: 6c65 732e 3c2f 6469 763e 0a3c 646c 2063 les.
    .
    .Parameters:.
    src │ │ │ +00040220: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ +00040230: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +00040240: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d
    .
    dst - au │ │ │ +00040260: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ +00040270: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated
    .
    < │ │ │ +00040280: 636f 6465 3e64 7374 4d61 7444 6570 7468 code>dstMatDepth │ │ │ +00040290: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ +000402a0: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +000402b0: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d
    .
    angleRange - automatical │ │ │ +000402e0: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
    .
    op - automati │ │ │ +00040310: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +00040320: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.
    ..
  • .
  • │ │ │ +00040340: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    .

    FastHough │ │ │ +000403b0: 5472 616e 7366 6f72 6d3c 2f68 333e 0a3c Transform

    .< │ │ │ +000403c0: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ +000403d0: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ +00040400: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ +00040410: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ +00040420: 726e 2d74 7970 6522 3e76 6f69 643c 2f73 rn-type">void
     FastHoughTr │ │ │ +00040460: 616e 7366 6f72 6d3c 2f73 7061 6e3e 3c77 ansform(Mat │ │ │ +000404d0: 266e 6273 703b 7372 632c 0a20 3c61 2068  src,. Mat& │ │ │ +00040520: 6e62 7370 3b64 7374 2c0a 2069 6e74 266e nbsp;dst,. int&n │ │ │ +00040530: 6273 703b 6473 744d 6174 4465 7074 682c bsp;dstMatDepth, │ │ │ +00040540: 0a20 696e 7426 6e62 7370 3b61 6e67 6c65 . int angle │ │ │ +00040550: 5261 6e67 6529 3c2f 7370 616e 3e3c 2f64 Range).
    Calculate │ │ │ +00040580: 7320 3244 2046 6173 7420 486f 7567 6820 s 2D Fast Hough │ │ │ +00040590: 7472 616e 7366 6f72 6d20 6f66 2061 6e20 transform of an │ │ │ +000405a0: 696d 6167 652e 0a0a 2054 6865 2066 756e image... The fun │ │ │ +000405b0: 6374 696f 6e20 6361 6c63 756c 6174 6573 ction calculates │ │ │ +000405c0: 2074 6865 2066 6173 7420 486f 7567 6820 the fast Hough │ │ │ +000405d0: 7472 616e 7366 6f72 6d20 666f 7220 6675 transform for fu │ │ │ +000405e0: 6c6c 2c20 6861 6c66 206f 7220 7175 6172 ll, half or quar │ │ │ +000405f0: 7465 720a 2072 616e 6765 206f 6620 616e ter. range of an │ │ │ +00040600: 676c 6573 2e3c 2f64 6976 3e0a 3c64 6c20 gles.
    .
    .< │ │ │ +00040620: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
    sr │ │ │ +00040640: 633c 2f63 6f64 653e 202d 2061 7574 6f6d c - autom │ │ │ +00040650: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +00040660: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
    .
    dst - a │ │ │ +00040680: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ +00040690: 6572 6174 6564 3c2f 6464 3e0a 3c64 643e erated
    .
    │ │ │ +000406a0: 3c63 6f64 653e 6473 744d 6174 4465 7074 dstMatDept │ │ │ +000406b0: 683c 2f63 6f64 653e 202d 2061 7574 6f6d h - autom │ │ │ +000406c0: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +000406d0: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
    .
    angleRange - automatica │ │ │ +00040700: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    ..
  • .
  • .< │ │ │ +00040730: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ +00040740: 6574 6169 6c22 2069 643d 2246 6173 7448 etail" id="FastH │ │ │ +00040750: 6f75 6768 5472 616e 7366 6f72 6d28 6f72 oughTransform(or │ │ │ +00040760: 672e 6f70 656e 6376 2e63 6f72 652e 4d61 g.opencv.core.Ma │ │ │ +00040770: 742c 6f72 672e 6f70 656e 6376 2e63 6f72 t,org.opencv.cor │ │ │ +00040780: 652e 4d61 742c 696e 7429 223e 0a3c 6833 e.Mat,int)">.

    FastHoughTransf │ │ │ +000407a0: 6f72 6d3c 2f68 333e 0a3c 6469 7620 636c orm

    .
    p │ │ │ +000407e0: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static void&n │ │ │ +00040820: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;F │ │ │ +00040840: 6173 7448 6f75 6768 5472 616e 7366 6f72 astHoughTransfor │ │ │ +00040850: 6d3c 2f73 7061 6e3e 3c77 6272 3e3c 7370 m(Mat  │ │ │ +000408c0: 7372 632c 0a20 3c61 2068 7265 663d 222e src,. Mat d │ │ │ +00040910: 7374 2c0a 2069 6e74 266e 6273 703b 6473 st,. int ds │ │ │ +00040920: 744d 6174 4465 7074 6829 3c2f 7370 616e tMatDepth)
    .
    Calcu │ │ │ +00040950: 6c61 7465 7320 3244 2046 6173 7420 486f lates 2D Fast Ho │ │ │ +00040960: 7567 6820 7472 616e 7366 6f72 6d20 6f66 ugh transform of │ │ │ +00040970: 2061 6e20 696d 6167 652e 0a0a 2054 6865 an image... The │ │ │ +00040980: 2066 756e 6374 696f 6e20 6361 6c63 756c function calcul │ │ │ +00040990: 6174 6573 2074 6865 2066 6173 7420 486f ates the fast Ho │ │ │ +000409a0: 7567 6820 7472 616e 7366 6f72 6d20 666f ugh transform fo │ │ │ +000409b0: 7220 6675 6c6c 2c20 6861 6c66 206f 7220 r full, half or │ │ │ +000409c0: 7175 6172 7465 720a 2072 616e 6765 206f quarter. range o │ │ │ +000409d0: 6620 616e 676c 6573 2e3c 2f64 6976 3e0a f angles.
    . │ │ │ +000409e0: 3c64 6c20 636c 6173 733d 226e 6f74 6573
    .
    Parameter │ │ │ +00040a00: 733a 3c2f 6474 3e0a 3c64 643e 3c63 6f64 s:
    .
    src - a │ │ │ +00040a20: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ +00040a30: 6572 6174 6564 3c2f 6464 3e0a 3c64 643e erated
    .
    │ │ │ +00040a40: 3c63 6f64 653e 6473 743c 2f63 6f64 653e dst │ │ │ +00040a50: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ +00040a60: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
    . │ │ │ +00040a70: 3c64 643e 3c63 6f64 653e 6473 744d 6174
    dstMat │ │ │ +00040a80: 4465 7074 683c 2f63 6f64 653e 202d 2061 Depth - a │ │ │ +00040a90: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ +00040aa0: 6572 6174 6564 3c2f 6464 3e0a 3c2f 646c erated
    .
    ...
  • .
    │ │ │ +00040b20: 0a3c 6833 3e63 7265 6174 6544 6973 7061 .

    createDispa │ │ │ +00040b30: 7269 7479 574c 5346 696c 7465 723c 2f68 rityWLSFilter.
    public │ │ │ +00040b80: 7374 6174 6963 3c2f 7370 616e 3e26 6e62 static&nb │ │ │ +00040b90: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;DisparityWLS │ │ │ +00040c00: 4669 6c74 6572 3c2f 613e 3c2f 7370 616e Filter createDisparit │ │ │ +00040c40: 7957 4c53 4669 6c74 6572 3c2f 7370 616e yWLSFilter( │ │ │ +00040c70: 3c61 2068 7265 663d 222e 2e2f 6361 6c69 Ster │ │ │ +00040cc0: 656f 4d61 7463 6865 723c 2f61 3e26 6e62 eoMatcher&nb │ │ │ +00040cd0: 7370 3b6d 6174 6368 6572 5f6c 6566 7429 sp;matcher_left) │ │ │ +00040ce0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .Convenience fac │ │ │ +00040d10: 746f 7279 206d 6574 686f 6420 7468 6174 tory method that │ │ │ +00040d20: 2063 7265 6174 6573 2061 6e20 696e 7374 creates an inst │ │ │ +00040d30: 616e 6365 206f 6620 4469 7370 6172 6974 ance of Disparit │ │ │ +00040d40: 7957 4c53 4669 6c74 6572 2061 6e64 2073 yWLSFilter and s │ │ │ +00040d50: 6574 7320 7570 2061 6c6c 2074 6865 2072 ets up all the r │ │ │ +00040d60: 656c 6576 616e 740a 2066 696c 7465 7220 elevant. filter │ │ │ +00040d70: 7061 7261 6d65 7465 7273 2061 7574 6f6d parameters autom │ │ │ +00040d80: 6174 6963 616c 6c79 2062 6173 6564 206f atically based o │ │ │ +00040d90: 6e20 7468 6520 6d61 7463 6865 7220 696e n the matcher in │ │ │ +00040da0: 7374 616e 6365 2e20 4375 7272 656e 746c stance. Currentl │ │ │ +00040db0: 7920 7375 7070 6f72 7473 206f 6e6c 7920 y supports only │ │ │ +00040dc0: 5374 6572 656f 424d 2061 6e64 2053 7465 StereoBM and Ste │ │ │ +00040dd0: 7265 6f53 4742 4d2e 3c2f 6469 763e 0a3c reoSGBM..< │ │ │ +00040de0: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ +00040df0: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
    Parameters │ │ │ +00040e00: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
    .
    matcher_left - stereo ma │ │ │ +00040e30: 7463 6865 7220 696e 7374 616e 6365 2074 tcher instance t │ │ │ +00040e40: 6861 7420 7769 6c6c 2062 6520 7573 6564 hat will be used │ │ │ +00040e50: 2077 6974 6820 7468 6520 6669 6c74 6572 with the filter │ │ │ +00040e60: 3c2f 6464 3e0a 3c64 743e 5265 7475 726e
    .
    Return │ │ │ +00040e70: 733a 3c2f 6474 3e0a 3c64 643e 6175 746f s:
    .
    auto │ │ │ +00040e80: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ +00040e90: 7465 643c 2f64 643e 0a3c 2f64 6c3e 0a3c ted
    ..< │ │ │ +00040ea0: 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 3e0a /section>.

  • . │ │ │ +00040eb0: 3c6c 693e 0a3c 7365 6374 696f 6e20 636c
  • .
    .

    crea │ │ │ +00040f10: 7465 5269 6768 744d 6174 6368 6572 3c2f teRightMatcher.
    public │ │ │ +00040f60: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ +00040f70: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;Stereo │ │ │ +00040fe0: 4d61 7463 6865 723c 2f61 3e3c 2f73 7061 Matcher createRightMa │ │ │ +00041020: 7463 6865 723c 2f73 7061 6e3e 3c77 6272 tcher(StereoMat │ │ │ +000410a0: 6368 6572 3c2f 613e 266e 6273 703b 6d61 cher ma │ │ │ +000410b0: 7463 6865 725f 6c65 6674 293c 2f73 7061 tcher_left)
    .
    Conv │ │ │ +000410e0: 656e 6965 6e63 6520 6d65 7468 6f64 2074 enience method t │ │ │ +000410f0: 6f20 7365 7420 7570 2074 6865 206d 6174 o set up the mat │ │ │ +00041100: 6368 6572 2066 6f72 2063 6f6d 7075 7469 cher for computi │ │ │ +00041110: 6e67 2074 6865 2072 6967 6874 2d76 6965 ng the right-vie │ │ │ +00041120: 7720 6469 7370 6172 6974 7920 6d61 700a w disparity map. │ │ │ +00041130: 2074 6861 7420 6973 2072 6571 7569 7265 that is require │ │ │ +00041140: 6420 696e 2063 6173 6520 6f66 2066 696c d in case of fil │ │ │ +00041150: 7465 7269 6e67 2077 6974 6820 636f 6e66 tering with conf │ │ │ +00041160: 6964 656e 6365 2e3c 2f64 6976 3e0a 3c64 idence.
    . │ │ │ +00041180: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ +00041190: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +000411a0: 6d61 7463 6865 725f 6c65 6674 3c2f 636f matcher_left - main stere │ │ │ +000411c0: 6f20 6d61 7463 6865 7220 696e 7374 616e o matcher instan │ │ │ +000411d0: 6365 2074 6861 7420 7769 6c6c 2062 6520 ce that will be │ │ │ +000411e0: 7573 6564 2077 6974 6820 7468 6520 6669 used with the fi │ │ │ +000411f0: 6c74 6572 3c2f 6464 3e0a 3c64 743e 5265 lter
    .
    Re │ │ │ +00041200: 7475 726e 733a 3c2f 6474 3e0a 3c64 643e turns:
    .
    │ │ │ +00041210: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +00041220: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
    .
    .

    ..
  • .. │ │ │ +00041290: 3c68 333e 6372 6561 7465 4469 7370 6172

    createDispar │ │ │ +000412a0: 6974 7957 4c53 4669 6c74 6572 4765 6e65 ityWLSFilterGene │ │ │ +000412b0: 7269 633c 2f68 333e 0a3c 6469 7620 636c ric

    .
    p │ │ │ +000412f0: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static Dispar │ │ │ +00041370: 6974 7957 4c53 4669 6c74 6572 3c2f 613e ityWLSFilter │ │ │ +00041380: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  createDi │ │ │ +000413b0: 7370 6172 6974 7957 4c53 4669 6c74 6572 sparityWLSFilter │ │ │ +000413c0: 4765 6e65 7269 633c 2f73 7061 6e3e 3c77 Generic(boo │ │ │ +000413f0: 6c65 616e 266e 6273 703b 7573 655f 636f lean use_co │ │ │ +00041400: 6e66 6964 656e 6365 293c 2f73 7061 6e3e nfidence) │ │ │ +00041410: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    More g │ │ │ +00041430: 656e 6572 6963 2066 6163 746f 7279 206d eneric factory m │ │ │ +00041440: 6574 686f 642c 2063 7265 6174 6520 696e ethod, create in │ │ │ +00041450: 7374 616e 6365 206f 6620 4469 7370 6172 stance of Dispar │ │ │ +00041460: 6974 7957 4c53 4669 6c74 6572 2061 6e64 ityWLSFilter and │ │ │ +00041470: 2065 7865 6375 7465 2062 6173 6963 0a20 execute basic. │ │ │ +00041480: 696e 6974 6961 6c69 7a61 7469 6f6e 2072 initialization r │ │ │ +00041490: 6f75 7469 6e65 732e 2057 6865 6e20 7573 outines. When us │ │ │ +000414a0: 696e 6720 7468 6973 206d 6574 686f 6420 ing this method │ │ │ +000414b0: 796f 7520 7769 6c6c 206e 6565 6420 746f you will need to │ │ │ +000414c0: 2073 6574 2d75 7020 7468 6520 524f 492c set-up the ROI, │ │ │ +000414d0: 206d 6174 6368 6572 7320 616e 640a 206f matchers and. o │ │ │ +000414e0: 7468 6572 2070 6172 616d 6574 6572 7320 ther parameters │ │ │ +000414f0: 6279 2079 6f75 7273 656c 662e 3c2f 6469 by yourself..
    .
    Parame │ │ │ +00041520: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
    .
    < │ │ │ +00041530: 636f 6465 3e75 7365 5f63 6f6e 6669 6465 code>use_confide │ │ │ +00041540: 6e63 653c 2f63 6f64 653e 202d 2066 696c nce - fil │ │ │ +00041550: 7465 7269 6e67 2077 6974 6820 636f 6e66 tering with conf │ │ │ +00041560: 6964 656e 6365 2072 6571 7569 7265 7320 idence requires │ │ │ +00041570: 7477 6f20 6469 7370 6172 6974 7920 6d61 two disparity ma │ │ │ +00041580: 7073 2028 666f 7220 7468 6520 6c65 6674 ps (for the left │ │ │ +00041590: 2061 6e64 2072 6967 6874 2076 6965 7773 and right views │ │ │ +000415a0: 2920 616e 6420 6973 0a20 6170 7072 6f78 ) and is. approx │ │ │ +000415b0: 696d 6174 656c 7920 7477 6f20 7469 6d65 imately two time │ │ │ +000415c0: 7320 736c 6f77 6572 2e20 486f 7765 7665 s slower. Howeve │ │ │ +000415d0: 722c 2071 7561 6c69 7479 2069 7320 7479 r, quality is ty │ │ │ +000415e0: 7069 6361 6c6c 7920 7369 676e 6966 6963 pically signific │ │ │ +000415f0: 616e 746c 7920 6265 7474 6572 2e3c 2f64 antly better..
    Returns:< │ │ │ +00041610: 2f64 743e 0a3c 6464 3e61 7574 6f6d 6174 /dt>.
    automat │ │ │ +00041620: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ +00041630: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365
    .
    ..
  • .
  • .
    .

    readGT

    .public static │ │ │ +000416f0: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  int readGT< │ │ │ +00041750: 7762 723e 3c73 7061 6e20 636c 6173 733d wbr>(String  │ │ │ +00041820: 3b73 7263 5f70 6174 682c 0a20 3c61 2068 ;src_path,. Mat& │ │ │ +00041870: 6e62 7370 3b64 7374 293c 2f73 7061 6e3e nbsp;dst) │ │ │ +00041880: 3c2f 6469 763e 0a3c 6469 7620 636c 6173 .
    Functi │ │ │ +000418a0: 6f6e 2066 6f72 2072 6561 6469 6e67 2067 on for reading g │ │ │ +000418b0: 726f 756e 6420 7472 7574 6820 6469 7370 round truth disp │ │ │ +000418c0: 6172 6974 7920 6d61 7073 2e20 5375 7070 arity maps. Supp │ │ │ +000418d0: 6f72 7473 2062 6173 6963 204d 6964 646c orts basic Middl │ │ │ +000418e0: 6562 7572 790a 2061 6e64 204d 5049 2d53 ebury. and MPI-S │ │ │ +000418f0: 696e 7465 6c20 666f 726d 6174 732e 204e intel formats. N │ │ │ +00041900: 6f74 6520 7468 6174 2074 6865 2072 6573 ote that the res │ │ │ +00041910: 756c 7469 6e67 2064 6973 7061 7269 7479 ulting disparity │ │ │ +00041920: 206d 6170 2069 7320 7363 616c 6564 2062 map is scaled b │ │ │ +00041930: 7920 3136 2e3c 2f64 6976 3e0a 3c64 6c20 y 16.
    .
    .< │ │ │ +00041950: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
    sr │ │ │ +00041970: 635f 7061 7468 3c2f 636f 6465 3e20 2d20 c_path - │ │ │ +00041980: 7061 7468 2074 6f20 7468 6520 696d 6167 path to the imag │ │ │ +00041990: 652c 2063 6f6e 7461 696e 696e 6720 6772 e, containing gr │ │ │ +000419a0: 6f75 6e64 2d74 7275 7468 2064 6973 7061 ound-truth dispa │ │ │ +000419b0: 7269 7479 206d 6170 3c2f 6464 3e0a 3c64 rity map
    .dst - output disp │ │ │ +000419e0: 6172 6974 7920 6d61 702c 2043 565f 3136 arity map, CV_16 │ │ │ +000419f0: 5320 6465 7074 683c 2f64 643e 0a3c 6474 S depth.
    Returns:
    .< │ │ │ +00041a10: 6464 3e72 6574 7572 6e73 207a 6572 6f20 dd>returns zero │ │ │ +00041a20: 6966 2073 7563 6365 7373 6675 6c6c 7920 if successfully │ │ │ +00041a30: 7265 6164 2074 6865 2067 726f 756e 6420 read the ground │ │ │ +00041a40: 7472 7574 683c 2f64 643e 0a3c 2f64 6c3e truth.
    │ │ │ +00041a50: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .
    .
  • .
  • .
    .computeMSE.
    │ │ │ +00041b00: 3c73 7061 6e20 636c 6173 733d 226d 6f64 public s │ │ │ +00041b20: 7461 7469 633c 2f73 7061 6e3e 266e 6273 tatic&nbs │ │ │ +00041b30: 703b 3c73 7061 6e20 636c 6173 733d 2272 p;doub │ │ │ +00041b50: 6c65 3c2f 7370 616e 3e26 6e62 7370 3b3c le < │ │ │ +00041b60: 7370 616e 2063 6c61 7373 3d22 656c 656d span class="elem │ │ │ +00041b70: 656e 742d 6e61 6d65 223e 636f 6d70 7574 ent-name">comput │ │ │ +00041b80: 654d 5345 3c2f 7370 616e 3e3c 7762 723e eMSE │ │ │ +00041b90: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Mat&nb │ │ │ +00041bf0: 7370 3b47 542c 0a20 3c61 2068 7265 663d sp;GT,. Mat  │ │ │ +00041c40: 3b73 7263 2c0a 203c 6120 6872 6566 3d22 ;src,. Rect&nbs │ │ │ +00041c90: 703b 524f 4929 3c2f 7370 616e 3e3c 2f64 p;ROI).
    Function │ │ │ +00041cc0: 666f 7220 636f 6d70 7574 696e 6720 6d65 for computing me │ │ │ +00041cd0: 616e 2073 7175 6172 6520 6572 726f 7220 an square error │ │ │ +00041ce0: 666f 7220 6469 7370 6172 6974 7920 6d61 for disparity ma │ │ │ +00041cf0: 7073 3c2f 6469 763e 0a3c 646c 2063 6c61 ps
    .
    .
    │ │ │ +00041d10: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
    │ │ │ +00041d20: 0a3c 6464 3e3c 636f 6465 3e47 543c 2f63 .
    GT - ground tr │ │ │ +00041d40: 7574 6820 6469 7370 6172 6974 7920 6d61 uth disparity ma │ │ │ +00041d50: 703c 2f64 643e 0a3c 6464 3e3c 636f 6465 p
    .
    src - di │ │ │ +00041d70: 7370 6172 6974 7920 6d61 7020 746f 2065 sparity map to e │ │ │ +00041d80: 7661 6c75 6174 653c 2f64 643e 0a3c 6464 valuate
    .
    ROI - region of in │ │ │ +00041db0: 7465 7265 7374 3c2f 6464 3e0a 3c64 743e terest
    .
    │ │ │ +00041dc0: 5265 7475 726e 733a 3c2f 6474 3e0a 3c64 Returns:
    .returns mean s │ │ │ +00041de0: 7175 6172 6520 6572 726f 7220 6265 7477 quare error betw │ │ │ +00041df0: 6565 6e20 4754 2061 6e64 2073 7263 3c2f een GT and src.
    ..
  • .
  • . │ │ │ +00041e20: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    compu │ │ │ +00041ea0: 7465 4261 6450 6978 656c 5065 7263 656e teBadPixelPercen │ │ │ +00041eb0: 743c 2f68 333e 0a3c 6469 7620 636c 6173 t

    .
    pub │ │ │ +00041ef0: 6c69 6320 7374 6174 6963 3c2f 7370 616e lic static double&n │ │ │ +00041f30: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;c │ │ │ +00041f50: 6f6d 7075 7465 4261 6450 6978 656c 5065 omputeBadPixelPe │ │ │ +00041f60: 7263 656e 743c 2f73 7061 6e3e 3c77 6272 rcent(Mat&n │ │ │ +00041fd0: 6273 703b 4754 2c0a 203c 6120 6872 6566 bsp;GT,. Mat&nbs │ │ │ +00042020: 703b 7372 632c 0a20 3c61 2068 7265 663d p;src,. Rect&nb │ │ │ +00042070: 7370 3b52 4f49 2c0a 2069 6e74 266e 6273 sp;ROI,. int&nbs │ │ │ +00042080: 703b 7468 7265 7368 293c 2f73 7061 6e3e p;thresh) │ │ │ +00042090: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    Functi │ │ │ +000420b0: 6f6e 2066 6f72 2063 6f6d 7075 7469 6e67 on for computing │ │ │ +000420c0: 2074 6865 2070 6572 6365 6e74 206f 6620 the percent of │ │ │ +000420d0: 2262 6164 2220 7069 7865 6c73 2069 6e20 "bad" pixels in │ │ │ +000420e0: 7468 6520 6469 7370 6172 6974 7920 6d61 the disparity ma │ │ │ +000420f0: 700a 2028 7069 7865 6c73 2077 6865 7265 p. (pixels where │ │ │ +00042100: 2065 7272 6f72 2069 7320 6869 6768 6572 error is higher │ │ │ +00042110: 2074 6861 6e20 6120 7370 6563 6966 6965 than a specifie │ │ │ +00042120: 6420 7468 7265 7368 6f6c 6429 3c2f 6469 d threshold).
    .
    Parame │ │ │ +00042150: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
    .
    < │ │ │ +00042160: 636f 6465 3e47 543c 2f63 6f64 653e 202d code>GT - │ │ │ +00042170: 2067 726f 756e 6420 7472 7574 6820 6469 ground truth di │ │ │ +00042180: 7370 6172 6974 7920 6d61 703c 2f64 643e sparity map
    │ │ │ +00042190: 0a3c 6464 3e3c 636f 6465 3e73 7263 3c2f .
    src - disparit │ │ │ +000421b0: 7920 6d61 7020 746f 2065 7661 6c75 6174 y map to evaluat │ │ │ +000421c0: 653c 2f64 643e 0a3c 6464 3e3c 636f 6465 e
    .
    ROI - re │ │ │ +000421e0: 6769 6f6e 206f 6620 696e 7465 7265 7374 gion of interest │ │ │ +000421f0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +00042200: 7468 7265 7368 3c2f 636f 6465 3e20 2d20 thresh - │ │ │ +00042210: 7468 7265 7368 6f6c 6420 7573 6564 2074 threshold used t │ │ │ +00042220: 6f20 6465 7465 726d 696e 6520 2262 6164 o determine "bad │ │ │ +00042230: 2220 7069 7865 6c73 3c2f 6464 3e0a 3c64 " pixels
    .Returns:. │ │ │ +00042250: 3c64 643e 7265 7475 726e 7320 6d65 616e
    returns mean │ │ │ +00042260: 2073 7175 6172 6520 6572 726f 7220 6265 square error be │ │ │ +00042270: 7477 6565 6e20 4754 2061 6e64 2073 7263 tween GT and src │ │ │ +00042280: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365
    .
    ..
  • .
  • .
    .

    compute │ │ │ +00042320: 4261 6450 6978 656c 5065 7263 656e 743c BadPixelPercent< │ │ │ +00042330: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ +00042370: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ +00042380: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;d │ │ │ +000423a0: 6f75 626c 653c 2f73 7061 6e3e 266e 6273 ouble&nbs │ │ │ +000423b0: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;com │ │ │ +000423d0: 7075 7465 4261 6450 6978 656c 5065 7263 puteBadPixelPerc │ │ │ +000423e0: 656e 743c 2f73 7061 6e3e 3c77 6272 3e3c ent< │ │ │ +000423f0: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ +00042400: 6d65 7465 7273 223e 283c 6120 6872 6566 meters">(Mat&nbs │ │ │ +00042450: 703b 4754 2c0a 203c 6120 6872 6566 3d22 p;GT,. Mat  │ │ │ +000424a0: 7372 632c 0a20 3c61 2068 7265 663d 222e src,. Rect  │ │ │ +000424f0: 3b52 4f49 293c 2f73 7061 6e3e 3c2f 6469 ;ROI).
    Function f │ │ │ +00042520: 6f72 2063 6f6d 7075 7469 6e67 2074 6865 or computing the │ │ │ +00042530: 2070 6572 6365 6e74 206f 6620 2262 6164 percent of "bad │ │ │ +00042540: 2220 7069 7865 6c73 2069 6e20 7468 6520 " pixels in the │ │ │ +00042550: 6469 7370 6172 6974 7920 6d61 700a 2028 disparity map. ( │ │ │ +00042560: 7069 7865 6c73 2077 6865 7265 2065 7272 pixels where err │ │ │ +00042570: 6f72 2069 7320 6869 6768 6572 2074 6861 or is higher tha │ │ │ +00042580: 6e20 6120 7370 6563 6966 6965 6420 7468 n a specified th │ │ │ +00042590: 7265 7368 6f6c 6429 3c2f 6469 763e 0a3c reshold)
    .< │ │ │ +000425a0: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ +000425b0: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
    Parameters │ │ │ +000425c0: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
    .
    GT - gro │ │ │ +000425e0: 756e 6420 7472 7574 6820 6469 7370 6172 und truth dispar │ │ │ +000425f0: 6974 7920 6d61 703c 2f64 643e 0a3c 6464 ity map
    .
    src - disparity ma │ │ │ +00042620: 7020 746f 2065 7661 6c75 6174 653c 2f64 p to evaluate.
    ROI │ │ │ +00042640: 3c2f 636f 6465 3e20 2d20 7265 6769 6f6e - region │ │ │ +00042650: 206f 6620 696e 7465 7265 7374 3c2f 6464 of interest
    .
    Returns:.
    returns │ │ │ +00042680: 6d65 616e 2073 7175 6172 6520 6572 726f mean square erro │ │ │ +00042690: 7220 6265 7477 6565 6e20 4754 2061 6e64 r between GT and │ │ │ +000426a0: 2073 7263 3c2f 6464 3e0a 3c2f 646c 3e0a src
    .. │ │ │ +000426b0: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e

    .
  • │ │ │ +000426c0: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .

    getDispa │ │ │ +00042730: 7269 7479 5669 733c 2f68 333e 0a3c 6469 rityVis

    .public static │ │ │ 00042780: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  createDT │ │ │ -000427b0: 4669 6c74 6572 3c2f 7370 616e 3e3c 7762 Filter(Mat& │ │ │ -00042820: 6e62 7370 3b67 7569 6465 2c0a 2064 6f75 nbsp;guide,. dou │ │ │ -00042830: 626c 6526 6e62 7370 3b73 6967 6d61 5370 ble sigmaSp │ │ │ -00042840: 6174 6961 6c2c 0a20 646f 7562 6c65 266e atial,. double&n │ │ │ -00042850: 6273 703b 7369 676d 6143 6f6c 6f72 2c0a bsp;sigmaColor,. │ │ │ -00042860: 2069 6e74 266e 6273 703b 6d6f 6465 293c int mode)< │ │ │ -00042870: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>. │ │ │ -00042890: 4661 6374 6f72 7920 6d65 7468 6f64 2c20 Factory method, │ │ │ -000428a0: 6372 6561 7465 2069 6e73 7461 6e63 6520 create instance │ │ │ -000428b0: 6f66 2044 5446 696c 7465 7220 616e 6420 of DTFilter and │ │ │ -000428c0: 7072 6f64 7563 6520 696e 6974 6961 6c69 produce initiali │ │ │ -000428d0: 7a61 7469 6f6e 2072 6f75 7469 6e65 732e zation routines. │ │ │ -000428e0: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373 .
    .
    Pa │ │ │ -00042900: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ -00042910: 6464 3e3c 636f 6465 3e67 7569 6465 3c2f dd>guide - guided i │ │ │ -00042930: 6d61 6765 2028 7573 6564 2074 6f20 6275 mage (used to bu │ │ │ -00042940: 696c 6420 7472 616e 7366 6f72 6d65 6420 ild transformed │ │ │ -00042950: 6469 7374 616e 6365 2c20 7768 6963 6820 distance, which │ │ │ -00042960: 6465 7363 7269 6265 7320 6564 6765 2073 describes edge s │ │ │ -00042970: 7472 7563 7475 7265 206f 660a 2067 7569 tructure of. gui │ │ │ -00042980: 6465 6420 696d 6167 6529 2e3c 2f64 643e ded image). │ │ │ -00042990: 0a3c 6464 3e3c 636f 6465 3e73 6967 6d61 .
    sigma │ │ │ -000429a0: 5370 6174 6961 6c3c 2f63 6f64 653e 202d Spatial - │ │ │ -000429b0: 205c 287b 5c73 6967 6d61 7d5f 485c 2920 \({\sigma}_H\) │ │ │ -000429c0: 7061 7261 6d65 7465 7220 696e 2074 6865 parameter in the │ │ │ -000429d0: 206f 7269 6769 6e61 6c20 6172 7469 636c original articl │ │ │ -000429e0: 652c 2069 7427 7320 7369 6d69 6c61 7220 e, it's similar │ │ │ -000429f0: 746f 2074 6865 2073 6967 6d61 2069 6e20 to the sigma in │ │ │ -00042a00: 7468 650a 2063 6f6f 7264 696e 6174 6520 the. coordinate │ │ │ -00042a10: 7370 6163 6520 696e 746f 2062 696c 6174 space into bilat │ │ │ -00042a20: 6572 616c 4669 6c74 6572 2e3c 2f64 643e eralFilter.
    │ │ │ -00042a30: 0a3c 6464 3e3c 636f 6465 3e73 6967 6d61 .
    sigma │ │ │ -00042a40: 436f 6c6f 723c 2f63 6f64 653e 202d 205c Color - \ │ │ │ -00042a50: 287b 5c73 6967 6d61 7d5f 725c 2920 7061 ({\sigma}_r\) pa │ │ │ -00042a60: 7261 6d65 7465 7220 696e 2074 6865 206f rameter in the o │ │ │ -00042a70: 7269 6769 6e61 6c20 6172 7469 636c 652c riginal article, │ │ │ -00042a80: 2069 7427 7320 7369 6d69 6c61 7220 746f it's similar to │ │ │ -00042a90: 2074 6865 2073 6967 6d61 2069 6e20 7468 the sigma in th │ │ │ -00042aa0: 650a 2063 6f6c 6f72 2073 7061 6365 2069 e. color space i │ │ │ -00042ab0: 6e74 6f20 6269 6c61 7465 7261 6c46 696c nto bilateralFil │ │ │ -00042ac0: 7465 722e 3c2f 6464 3e0a 3c64 643e 3c63 ter.
    .
    mode │ │ │ -00042ae0: 2d20 6f6e 6520 666f 726d 2074 6872 6565 - one form three │ │ │ -00042af0: 206d 6f64 6573 2044 5446 5f4e 432c 2044 modes DTF_NC, D │ │ │ -00042b00: 5446 5f52 4620 616e 6420 4454 465f 4943 TF_RF and DTF_IC │ │ │ -00042b10: 2077 6869 6368 2063 6f72 7265 7370 6f6e which correspon │ │ │ -00042b20: 6473 2074 6f20 7468 7265 6520 6d6f 6465 ds to three mode │ │ │ -00042b30: 7320 666f 720a 2066 696c 7465 7269 6e67 s for. filtering │ │ │ -00042b40: 2032 4420 7369 676e 616c 7320 696e 2074 2D signals in t │ │ │ -00042b50: 6865 2061 7274 6963 6c65 2e0a 0a0a 2046 he article.... F │ │ │ -00042b60: 6f72 206d 6f72 6520 6465 7461 696c 7320 or more details │ │ │ -00042b70: 6162 6f75 7420 446f 6d61 696e 2054 7261 about Domain Tra │ │ │ -00042b80: 6e73 666f 726d 2066 696c 7465 7220 7061 nsform filter pa │ │ │ -00042b90: 7261 6d65 7465 7273 2c20 7365 6520 7468 rameters, see th │ │ │ -00042ba0: 6520 6f72 6967 696e 616c 2061 7274 6963 e original artic │ │ │ -00042bb0: 6c65 2043 4954 453a 2047 6173 7461 6c31 le CITE: Gastal1 │ │ │ -00042bc0: 3120 616e 640a 205b 446f 6d61 696e 2054 1 and. [Domain T │ │ │ -00042bd0: 7261 6e73 666f 726d 2066 696c 7465 7220 ransform filter │ │ │ -00042be0: 686f 6d65 7061 6765 5d28 6874 7470 3a2f homepage](http:/ │ │ │ -00042bf0: 2f77 7777 2e69 6e66 2e75 6672 6773 2e62 /www.inf.ufrgs.b │ │ │ -00042c00: 722f 7e65 736c 6761 7374 616c 2f44 6f6d r/~eslgastal/Dom │ │ │ -00042c10: 6169 6e54 7261 6e73 666f 726d 2f29 2e3c ainTransform/).< │ │ │ -00042c20: 2f64 643e 0a3c 6474 3e52 6574 7572 6e73 /dd>.
    Returns │ │ │ -00042c30: 3a3c 2f64 743e 0a3c 6464 3e61 7574 6f6d :
    .
    autom │ │ │ -00042c40: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -00042c50: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
    .
    ..
  • .< │ │ │ -00042c70: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    createDT │ │ │ -00042cd0: 4669 6c74 6572 3c2f 6833 3e0a 3c64 6976 Filter

    .
    public static< │ │ │ -00042d20: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> DTFilter< │ │ │ -00042d90: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> createDTF │ │ │ -00042dc0: 696c 7465 723c 2f73 7061 6e3e 3c77 6272 ilter(Mat&n │ │ │ -00042e30: 6273 703b 6775 6964 652c 0a20 646f 7562 bsp;guide,. doub │ │ │ -00042e40: 6c65 266e 6273 703b 7369 676d 6153 7061 le sigmaSpa │ │ │ -00042e50: 7469 616c 2c0a 2064 6f75 626c 6526 6e62 tial,. double&nb │ │ │ -00042e60: 7370 3b73 6967 6d61 436f 6c6f 7229 3c2f sp;sigmaColor)
    .
    F │ │ │ -00042e90: 6163 746f 7279 206d 6574 686f 642c 2063 actory method, c │ │ │ -00042ea0: 7265 6174 6520 696e 7374 616e 6365 206f reate instance o │ │ │ -00042eb0: 6620 4454 4669 6c74 6572 2061 6e64 2070 f DTFilter and p │ │ │ -00042ec0: 726f 6475 6365 2069 6e69 7469 616c 697a roduce initializ │ │ │ -00042ed0: 6174 696f 6e20 726f 7574 696e 6573 2e3c ation routines.< │ │ │ -00042ee0: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ -00042f00: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .guide - guided im │ │ │ -00042f30: 6167 6520 2875 7365 6420 746f 2062 7569 age (used to bui │ │ │ -00042f40: 6c64 2074 7261 6e73 666f 726d 6564 2064 ld transformed d │ │ │ -00042f50: 6973 7461 6e63 652c 2077 6869 6368 2064 istance, which d │ │ │ -00042f60: 6573 6372 6962 6573 2065 6467 6520 7374 escribes edge st │ │ │ -00042f70: 7275 6374 7572 6520 6f66 0a20 6775 6964 ructure of. guid │ │ │ -00042f80: 6564 2069 6d61 6765 292e 3c2f 6464 3e0a ed image).. │ │ │ -00042f90: 3c64 643e 3c63 6f64 653e 7369 676d 6153
    sigmaS │ │ │ -00042fa0: 7061 7469 616c 3c2f 636f 6465 3e20 2d20 patial - │ │ │ -00042fb0: 5c28 7b5c 7369 676d 617d 5f48 5c29 2070 \({\sigma}_H\) p │ │ │ -00042fc0: 6172 616d 6574 6572 2069 6e20 7468 6520 arameter in the │ │ │ -00042fd0: 6f72 6967 696e 616c 2061 7274 6963 6c65 original article │ │ │ -00042fe0: 2c20 6974 2773 2073 696d 696c 6172 2074 , it's similar t │ │ │ -00042ff0: 6f20 7468 6520 7369 676d 6120 696e 2074 o the sigma in t │ │ │ -00043000: 6865 0a20 636f 6f72 6469 6e61 7465 2073 he. coordinate s │ │ │ -00043010: 7061 6365 2069 6e74 6f20 6269 6c61 7465 pace into bilate │ │ │ -00043020: 7261 6c46 696c 7465 722e 3c2f 6464 3e0a ralFilter.
    . │ │ │ -00043030: 3c64 643e 3c63 6f64 653e 7369 676d 6143
    sigmaC │ │ │ -00043040: 6f6c 6f72 3c2f 636f 6465 3e20 2d20 5c28 olor - \( │ │ │ -00043050: 7b5c 7369 676d 617d 5f72 5c29 2070 6172 {\sigma}_r\) par │ │ │ -00043060: 616d 6574 6572 2069 6e20 7468 6520 6f72 ameter in the or │ │ │ -00043070: 6967 696e 616c 2061 7274 6963 6c65 2c20 iginal article, │ │ │ -00043080: 6974 2773 2073 696d 696c 6172 2074 6f20 it's similar to │ │ │ -00043090: 7468 6520 7369 676d 6120 696e 2074 6865 the sigma in the │ │ │ -000430a0: 0a20 636f 6c6f 7220 7370 6163 6520 696e . color space in │ │ │ -000430b0: 746f 2062 696c 6174 6572 616c 4669 6c74 to bilateralFilt │ │ │ -000430c0: 6572 2e0a 0a20 6669 6c74 6572 696e 6720 er... filtering │ │ │ -000430d0: 3244 2073 6967 6e61 6c73 2069 6e20 7468 2D signals in th │ │ │ -000430e0: 6520 6172 7469 636c 652e 0a0a 0a20 466f e article.... Fo │ │ │ -000430f0: 7220 6d6f 7265 2064 6574 6169 6c73 2061 r more details a │ │ │ -00043100: 626f 7574 2044 6f6d 6169 6e20 5472 616e bout Domain Tran │ │ │ -00043110: 7366 6f72 6d20 6669 6c74 6572 2070 6172 sform filter par │ │ │ -00043120: 616d 6574 6572 732c 2073 6565 2074 6865 ameters, see the │ │ │ -00043130: 206f 7269 6769 6e61 6c20 6172 7469 636c original articl │ │ │ -00043140: 6520 4349 5445 3a20 4761 7374 616c 3131 e CITE: Gastal11 │ │ │ -00043150: 2061 6e64 0a20 5b44 6f6d 6169 6e20 5472 and. [Domain Tr │ │ │ -00043160: 616e 7366 6f72 6d20 6669 6c74 6572 2068 ansform filter h │ │ │ -00043170: 6f6d 6570 6167 655d 2868 7474 703a 2f2f omepage](http:// │ │ │ -00043180: 7777 772e 696e 662e 7566 7267 732e 6272 www.inf.ufrgs.br │ │ │ -00043190: 2f7e 6573 6c67 6173 7461 6c2f 446f 6d61 /~eslgastal/Doma │ │ │ -000431a0: 696e 5472 616e 7366 6f72 6d2f 292e 3c2f inTransform/)..
    Returns: │ │ │ -000431c0: 3c2f 6474 3e0a 3c64 643e 6175 746f 6d61
    .
    automa │ │ │ -000431d0: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -000431e0: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
    .
    .
    ...
    .

    dtFilter

    .< │ │ │ -00043290: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ -000432a0: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ -000432d0: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ -000432e0: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ -000432f0: 726e 2d74 7970 6522 3e76 6f69 643c 2f73 rn-type">void
     dtFilter
    (M │ │ │ -00043390: 6174 3c2f 613e 266e 6273 703b 6775 6964 at guid │ │ │ -000433a0: 652c 0a20 3c61 2068 7265 663d 222e 2e2f e,. │ │ │ -000433e0: 4d61 743c 2f61 3e26 6e62 7370 3b73 7263 Mat src │ │ │ -000433f0: 2c0a 203c 6120 6872 6566 3d22 2e2e 2f63 ,. M │ │ │ -00043430: 6174 3c2f 613e 266e 6273 703b 6473 742c at dst, │ │ │ -00043440: 0a20 646f 7562 6c65 266e 6273 703b 7369 . double si │ │ │ -00043450: 676d 6153 7061 7469 616c 2c0a 2064 6f75 gmaSpatial,. dou │ │ │ -00043460: 626c 6526 6e62 7370 3b73 6967 6d61 436f ble sigmaCo │ │ │ -00043470: 6c6f 722c 0a20 696e 7426 6e62 7370 3b6d lor,. int m │ │ │ -00043480: 6f64 652c 0a20 696e 7426 6e62 7370 3b6e ode,. int n │ │ │ -00043490: 756d 4974 6572 7329 3c2f 7370 616e 3e3c umIters)< │ │ │ -000434a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Simple │ │ │ -000434c0: 6f6e 652d 6c69 6e65 2044 6f6d 6169 6e20 one-line Domain │ │ │ -000434d0: 5472 616e 7366 6f72 6d20 6669 6c74 6572 Transform filter │ │ │ -000434e0: 2063 616c 6c2e 2049 6620 796f 7520 6861 call. If you ha │ │ │ -000434f0: 7665 206d 756c 7469 706c 6520 696d 6167 ve multiple imag │ │ │ -00043500: 6573 2074 6f20 6669 6c74 6572 2077 6974 es to filter wit │ │ │ -00043510: 6820 7468 6520 7361 6d65 0a20 6775 6964 h the same. guid │ │ │ -00043520: 6564 2069 6d61 6765 2074 6865 6e20 7573 ed image then us │ │ │ -00043530: 6520 4454 4669 6c74 6572 2069 6e74 6572 e DTFilter inter │ │ │ -00043540: 6661 6365 2074 6f20 6176 6f69 6420 6578 face to avoid ex │ │ │ -00043550: 7472 6120 636f 6d70 7574 6174 696f 6e73 tra computations │ │ │ -00043560: 206f 6e20 696e 6974 6961 6c69 7a61 7469 on initializati │ │ │ -00043570: 6f6e 2073 7461 6765 2e3c 2f64 6976 3e0a on stage.
    . │ │ │ -00043580: 3c64 6c20 636c 6173 733d 226e 6f74 6573
    .
    Parameter │ │ │ -000435a0: 733a 3c2f 6474 3e0a 3c64 643e 3c63 6f64 s:
    .
    guide - │ │ │ -000435c0: 2067 7569 6465 6420 696d 6167 6520 2861 guided image (a │ │ │ -000435d0: 6c73 6f20 6361 6c6c 6564 2061 7320 6a6f lso called as jo │ │ │ -000435e0: 696e 7420 696d 6167 6529 2077 6974 6820 int image) with │ │ │ -000435f0: 756e 7369 676e 6564 2038 2d62 6974 206f unsigned 8-bit o │ │ │ -00043600: 7220 666c 6f61 7469 6e67 2d70 6f69 6e74 r floating-point │ │ │ -00043610: 2033 322d 6269 740a 2064 6570 7468 2061 32-bit. depth a │ │ │ -00043620: 6e64 2075 7020 746f 2034 2063 6861 6e6e nd up to 4 chann │ │ │ -00043630: 656c 732e 3c2f 6464 3e0a 3c64 643e 3c63 els.
    .
    src - │ │ │ -00043650: 2066 696c 7465 7269 6e67 2069 6d61 6765 filtering image │ │ │ -00043660: 2077 6974 6820 756e 7369 676e 6564 2038 with unsigned 8 │ │ │ -00043670: 2d62 6974 206f 7220 666c 6f61 7469 6e67 -bit or floating │ │ │ -00043680: 2d70 6f69 6e74 2033 322d 6269 7420 6465 -point 32-bit de │ │ │ -00043690: 7074 6820 616e 6420 7570 2074 6f20 3420 pth and up to 4 │ │ │ -000436a0: 6368 616e 6e65 6c73 2e3c 2f64 643e 0a3c channels.
    .< │ │ │ -000436b0: 6464 3e3c 636f 6465 3e64 7374 3c2f 636f dd>dst - destinatio │ │ │ -000436d0: 6e20 696d 6167 653c 2f64 643e 0a3c 6464 n image.
    sigmaSpat │ │ │ -000436f0: 6961 6c3c 2f63 6f64 653e 202d 205c 287b ial - \({ │ │ │ -00043700: 5c73 6967 6d61 7d5f 485c 2920 7061 7261 \sigma}_H\) para │ │ │ -00043710: 6d65 7465 7220 696e 2074 6865 206f 7269 meter in the ori │ │ │ -00043720: 6769 6e61 6c20 6172 7469 636c 652c 2069 ginal article, i │ │ │ -00043730: 7427 7320 7369 6d69 6c61 7220 746f 2074 t's similar to t │ │ │ -00043740: 6865 2073 6967 6d61 2069 6e20 7468 650a he sigma in the. │ │ │ -00043750: 2063 6f6f 7264 696e 6174 6520 7370 6163 coordinate spac │ │ │ -00043760: 6520 696e 746f 2062 696c 6174 6572 616c e into bilateral │ │ │ -00043770: 4669 6c74 6572 2e3c 2f64 643e 0a3c 6464 Filter.
    .
    sigmaColo │ │ │ -00043790: 723c 2f63 6f64 653e 202d 205c 287b 5c73 r - \({\s │ │ │ -000437a0: 6967 6d61 7d5f 725c 2920 7061 7261 6d65 igma}_r\) parame │ │ │ -000437b0: 7465 7220 696e 2074 6865 206f 7269 6769 ter in the origi │ │ │ -000437c0: 6e61 6c20 6172 7469 636c 652c 2069 7427 nal article, it' │ │ │ -000437d0: 7320 7369 6d69 6c61 7220 746f 2074 6865 s similar to the │ │ │ -000437e0: 2073 6967 6d61 2069 6e20 7468 650a 2063 sigma in the. c │ │ │ -000437f0: 6f6c 6f72 2073 7061 6365 2069 6e74 6f20 olor space into │ │ │ -00043800: 6269 6c61 7465 7261 6c46 696c 7465 722e bilateralFilter. │ │ │ -00043810: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -00043820: 6d6f 6465 3c2f 636f 6465 3e20 2d20 6f6e mode - on │ │ │ -00043830: 6520 666f 726d 2074 6872 6565 206d 6f64 e form three mod │ │ │ -00043840: 6573 2044 5446 5f4e 432c 2044 5446 5f52 es DTF_NC, DTF_R │ │ │ -00043850: 4620 616e 6420 4454 465f 4943 2077 6869 F and DTF_IC whi │ │ │ -00043860: 6368 2063 6f72 7265 7370 6f6e 6473 2074 ch corresponds t │ │ │ -00043870: 6f20 7468 7265 6520 6d6f 6465 7320 666f o three modes fo │ │ │ -00043880: 720a 2066 696c 7465 7269 6e67 2032 4420 r. filtering 2D │ │ │ -00043890: 7369 676e 616c 7320 696e 2074 6865 2061 signals in the a │ │ │ -000438a0: 7274 6963 6c65 2e3c 2f64 643e 0a3c 6464 rticle.
    .
    numIters< │ │ │ -000438c0: 2f63 6f64 653e 202d 206f 7074 696f 6e61 /code> - optiona │ │ │ -000438d0: 6c20 6e75 6d62 6572 206f 6620 6974 6572 l number of iter │ │ │ -000438e0: 6174 696f 6e73 2075 7365 6420 666f 7220 ations used for │ │ │ -000438f0: 6669 6c74 6572 696e 672c 2033 2069 7320 filtering, 3 is │ │ │ -00043900: 7175 6974 6520 656e 6f75 6768 2e0a 2053 quite enough.. S │ │ │ -00043910: 4545 3a20 6269 6c61 7465 7261 6c46 696c EE: bilateralFil │ │ │ -00043920: 7465 722c 2067 7569 6465 6446 696c 7465 ter, guidedFilte │ │ │ -00043930: 722c 2061 6d46 696c 7465 723c 2f64 643e r, amFilter
    │ │ │ -00043940: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
    .
    ..
  • ..

    dtFilter< │ │ │ -000439e0: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ -00043a20: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ -00043a30: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;v │ │ │ -00043a50: 6f69 643c 2f73 7061 6e3e 266e 6273 703b oid  │ │ │ -00043a60: 3c73 7061 6e20 636c 6173 733d 2265 6c65 dtFil │ │ │ -00043a80: 7465 723c 2f73 7061 6e3e 3c77 6272 3e3c ter< │ │ │ -00043a90: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ -00043aa0: 6d65 7465 7273 223e 283c 6120 6872 6566 meters">(Mat&nbs │ │ │ -00043af0: 703b 6775 6964 652c 0a20 3c61 2068 7265 p;guide,. Mat&nb │ │ │ -00043b40: 7370 3b73 7263 2c0a 203c 6120 6872 6566 sp;src,. Mat&nbs │ │ │ -00043b90: 703b 6473 742c 0a20 646f 7562 6c65 266e p;dst,. double&n │ │ │ -00043ba0: 6273 703b 7369 676d 6153 7061 7469 616c bsp;sigmaSpatial │ │ │ -00043bb0: 2c0a 2064 6f75 626c 6526 6e62 7370 3b73 ,. double s │ │ │ -00043bc0: 6967 6d61 436f 6c6f 722c 0a20 696e 7426 igmaColor,. int& │ │ │ -00043bd0: 6e62 7370 3b6d 6f64 6529 3c2f 7370 616e nbsp;mode)
    .
    Simpl │ │ │ -00043c00: 6520 6f6e 652d 6c69 6e65 2044 6f6d 6169 e one-line Domai │ │ │ -00043c10: 6e20 5472 616e 7366 6f72 6d20 6669 6c74 n Transform filt │ │ │ -00043c20: 6572 2063 616c 6c2e 2049 6620 796f 7520 er call. If you │ │ │ -00043c30: 6861 7665 206d 756c 7469 706c 6520 696d have multiple im │ │ │ -00043c40: 6167 6573 2074 6f20 6669 6c74 6572 2077 ages to filter w │ │ │ -00043c50: 6974 6820 7468 6520 7361 6d65 0a20 6775 ith the same. gu │ │ │ -00043c60: 6964 6564 2069 6d61 6765 2074 6865 6e20 ided image then │ │ │ -00043c70: 7573 6520 4454 4669 6c74 6572 2069 6e74 use DTFilter int │ │ │ -00043c80: 6572 6661 6365 2074 6f20 6176 6f69 6420 erface to avoid │ │ │ -00043c90: 6578 7472 6120 636f 6d70 7574 6174 696f extra computatio │ │ │ -00043ca0: 6e73 206f 6e20 696e 6974 6961 6c69 7a61 ns on initializa │ │ │ -00043cb0: 7469 6f6e 2073 7461 6765 2e3c 2f64 6976 tion stage.
    .
    .
    Paramet │ │ │ -00043ce0: 6572 733a 3c2f 6474 3e0a 3c64 643e 3c63 ers:
    .
    guide │ │ │ -00043d00: 202d 2067 7569 6465 6420 696d 6167 6520 - guided image │ │ │ -00043d10: 2861 6c73 6f20 6361 6c6c 6564 2061 7320 (also called as │ │ │ -00043d20: 6a6f 696e 7420 696d 6167 6529 2077 6974 joint image) wit │ │ │ -00043d30: 6820 756e 7369 676e 6564 2038 2d62 6974 h unsigned 8-bit │ │ │ -00043d40: 206f 7220 666c 6f61 7469 6e67 2d70 6f69 or floating-poi │ │ │ -00043d50: 6e74 2033 322d 6269 740a 2064 6570 7468 nt 32-bit. depth │ │ │ -00043d60: 2061 6e64 2075 7020 746f 2034 2063 6861 and up to 4 cha │ │ │ -00043d70: 6e6e 656c 732e 3c2f 6464 3e0a 3c64 643e nnels.
    .
    │ │ │ -00043d80: 3c63 6f64 653e 7372 633c 2f63 6f64 653e src │ │ │ -00043d90: 202d 2066 696c 7465 7269 6e67 2069 6d61 - filtering ima │ │ │ -00043da0: 6765 2077 6974 6820 756e 7369 676e 6564 ge with unsigned │ │ │ -00043db0: 2038 2d62 6974 206f 7220 666c 6f61 7469 8-bit or floati │ │ │ -00043dc0: 6e67 2d70 6f69 6e74 2033 322d 6269 7420 ng-point 32-bit │ │ │ -00043dd0: 6465 7074 6820 616e 6420 7570 2074 6f20 depth and up to │ │ │ -00043de0: 3420 6368 616e 6e65 6c73 2e3c 2f64 643e 4 channels.
    │ │ │ -00043df0: 0a3c 6464 3e3c 636f 6465 3e64 7374 3c2f .
    dst - destinat │ │ │ -00043e10: 696f 6e20 696d 6167 653c 2f64 643e 0a3c ion image
    .< │ │ │ -00043e20: 6464 3e3c 636f 6465 3e73 6967 6d61 5370 dd>sigmaSp │ │ │ -00043e30: 6174 6961 6c3c 2f63 6f64 653e 202d 205c atial - \ │ │ │ -00043e40: 287b 5c73 6967 6d61 7d5f 485c 2920 7061 ({\sigma}_H\) pa │ │ │ -00043e50: 7261 6d65 7465 7220 696e 2074 6865 206f rameter in the o │ │ │ -00043e60: 7269 6769 6e61 6c20 6172 7469 636c 652c riginal article, │ │ │ -00043e70: 2069 7427 7320 7369 6d69 6c61 7220 746f it's similar to │ │ │ -00043e80: 2074 6865 2073 6967 6d61 2069 6e20 7468 the sigma in th │ │ │ -00043e90: 650a 2063 6f6f 7264 696e 6174 6520 7370 e. coordinate sp │ │ │ -00043ea0: 6163 6520 696e 746f 2062 696c 6174 6572 ace into bilater │ │ │ -00043eb0: 616c 4669 6c74 6572 2e3c 2f64 643e 0a3c alFilter..< │ │ │ -00043ec0: 6464 3e3c 636f 6465 3e73 6967 6d61 436f dd>sigmaCo │ │ │ -00043ed0: 6c6f 723c 2f63 6f64 653e 202d 205c 287b lor - \({ │ │ │ -00043ee0: 5c73 6967 6d61 7d5f 725c 2920 7061 7261 \sigma}_r\) para │ │ │ -00043ef0: 6d65 7465 7220 696e 2074 6865 206f 7269 meter in the ori │ │ │ -00043f00: 6769 6e61 6c20 6172 7469 636c 652c 2069 ginal article, i │ │ │ -00043f10: 7427 7320 7369 6d69 6c61 7220 746f 2074 t's similar to t │ │ │ -00043f20: 6865 2073 6967 6d61 2069 6e20 7468 650a he sigma in the. │ │ │ -00043f30: 2063 6f6c 6f72 2073 7061 6365 2069 6e74 color space int │ │ │ -00043f40: 6f20 6269 6c61 7465 7261 6c46 696c 7465 o bilateralFilte │ │ │ -00043f50: 722e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 r..
    mode - │ │ │ -00043f70: 6f6e 6520 666f 726d 2074 6872 6565 206d one form three m │ │ │ -00043f80: 6f64 6573 2044 5446 5f4e 432c 2044 5446 odes DTF_NC, DTF │ │ │ -00043f90: 5f52 4620 616e 6420 4454 465f 4943 2077 _RF and DTF_IC w │ │ │ -00043fa0: 6869 6368 2063 6f72 7265 7370 6f6e 6473 hich corresponds │ │ │ -00043fb0: 2074 6f20 7468 7265 6520 6d6f 6465 7320 to three modes │ │ │ -00043fc0: 666f 720a 2066 696c 7465 7269 6e67 2032 for. filtering 2 │ │ │ -00043fd0: 4420 7369 676e 616c 7320 696e 2074 6865 D signals in the │ │ │ -00043fe0: 2061 7274 6963 6c65 2e0a 2053 4545 3a20 article.. SEE: │ │ │ -00043ff0: 6269 6c61 7465 7261 6c46 696c 7465 722c bilateralFilter, │ │ │ -00044000: 2067 7569 6465 6446 696c 7465 722c 2061 guidedFilter, a │ │ │ -00044010: 6d46 696c 7465 723c 2f64 643e 0a3c 2f64 mFilter
    ..

  • ..
  • ..

    d │ │ │ -000440b0: 7446 696c 7465 723c 2f68 333e 0a3c 6469 tFilter

    .public static │ │ │ -00044100: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  void dtFilter │ │ │ -00044180: 283c 6120 6872 6566 3d22 2e2e 2f63 6f72 (Mat │ │ │ -000441c0: 3c2f 613e 266e 6273 703b 6775 6964 652c  guide, │ │ │ -000441d0: 0a20 3c61 2068 7265 663d 222e 2e2f 636f . Ma │ │ │ -00044210: 743c 2f61 3e26 6e62 7370 3b73 7263 2c0a t src,. │ │ │ -00044220: 203c 6120 6872 6566 3d22 2e2e 2f63 6f72 Mat │ │ │ -00044260: 3c2f 613e 266e 6273 703b 6473 742c 0a20  dst,. │ │ │ -00044270: 646f 7562 6c65 266e 6273 703b 7369 676d double sigm │ │ │ -00044280: 6153 7061 7469 616c 2c0a 2064 6f75 626c aSpatial,. doubl │ │ │ -00044290: 6526 6e62 7370 3b73 6967 6d61 436f 6c6f e sigmaColo │ │ │ -000442a0: 7229 3c2f 7370 616e 3e3c 2f64 6976 3e0a r). │ │ │ -000442b0: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
    Simple one-li │ │ │ -000442d0: 6e65 2044 6f6d 6169 6e20 5472 616e 7366 ne Domain Transf │ │ │ -000442e0: 6f72 6d20 6669 6c74 6572 2063 616c 6c2e orm filter call. │ │ │ -000442f0: 2049 6620 796f 7520 6861 7665 206d 756c If you have mul │ │ │ -00044300: 7469 706c 6520 696d 6167 6573 2074 6f20 tiple images to │ │ │ -00044310: 6669 6c74 6572 2077 6974 6820 7468 6520 filter with the │ │ │ -00044320: 7361 6d65 0a20 6775 6964 6564 2069 6d61 same. guided ima │ │ │ -00044330: 6765 2074 6865 6e20 7573 6520 4454 4669 ge then use DTFi │ │ │ -00044340: 6c74 6572 2069 6e74 6572 6661 6365 2074 lter interface t │ │ │ -00044350: 6f20 6176 6f69 6420 6578 7472 6120 636f o avoid extra co │ │ │ -00044360: 6d70 7574 6174 696f 6e73 206f 6e20 696e mputations on in │ │ │ -00044370: 6974 6961 6c69 7a61 7469 6f6e 2073 7461 itialization sta │ │ │ -00044380: 6765 2e3c 2f64 6976 3e0a 3c64 6c20 636c ge.
    .
    .
    Parameters:
    .
    guid │ │ │ -000443c0: 653c 2f63 6f64 653e 202d 2067 7569 6465 e - guide │ │ │ -000443d0: 6420 696d 6167 6520 2861 6c73 6f20 6361 d image (also ca │ │ │ -000443e0: 6c6c 6564 2061 7320 6a6f 696e 7420 696d lled as joint im │ │ │ -000443f0: 6167 6529 2077 6974 6820 756e 7369 676e age) with unsign │ │ │ -00044400: 6564 2038 2d62 6974 206f 7220 666c 6f61 ed 8-bit or floa │ │ │ -00044410: 7469 6e67 2d70 6f69 6e74 2033 322d 6269 ting-point 32-bi │ │ │ -00044420: 740a 2064 6570 7468 2061 6e64 2075 7020 t. depth and up │ │ │ -00044430: 746f 2034 2063 6861 6e6e 656c 732e 3c2f to 4 channels..
    sr │ │ │ -00044450: 633c 2f63 6f64 653e 202d 2066 696c 7465 c - filte │ │ │ -00044460: 7269 6e67 2069 6d61 6765 2077 6974 6820 ring image with │ │ │ -00044470: 756e 7369 676e 6564 2038 2d62 6974 206f unsigned 8-bit o │ │ │ -00044480: 7220 666c 6f61 7469 6e67 2d70 6f69 6e74 r floating-point │ │ │ -00044490: 2033 322d 6269 7420 6465 7074 6820 616e 32-bit depth an │ │ │ -000444a0: 6420 7570 2074 6f20 3420 6368 616e 6e65 d up to 4 channe │ │ │ -000444b0: 6c73 2e3c 2f64 643e 0a3c 6464 3e3c 636f ls.
    .
    dst - │ │ │ -000444d0: 6465 7374 696e 6174 696f 6e20 696d 6167 destination imag │ │ │ -000444e0: 653c 2f64 643e 0a3c 6464 3e3c 636f 6465 e
    .
    sigmaSpatial - \({\sigma │ │ │ -00044510: 7d5f 485c 2920 7061 7261 6d65 7465 7220 }_H\) parameter │ │ │ -00044520: 696e 2074 6865 206f 7269 6769 6e61 6c20 in the original │ │ │ -00044530: 6172 7469 636c 652c 2069 7427 7320 7369 article, it's si │ │ │ -00044540: 6d69 6c61 7220 746f 2074 6865 2073 6967 milar to the sig │ │ │ -00044550: 6d61 2069 6e20 7468 650a 2063 6f6f 7264 ma in the. coord │ │ │ -00044560: 696e 6174 6520 7370 6163 6520 696e 746f inate space into │ │ │ -00044570: 2062 696c 6174 6572 616c 4669 6c74 6572 bilateralFilter │ │ │ -00044580: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    sigmaColor - \({\sigma}_ │ │ │ -000445b0: 725c 2920 7061 7261 6d65 7465 7220 696e r\) parameter in │ │ │ -000445c0: 2074 6865 206f 7269 6769 6e61 6c20 6172 the original ar │ │ │ -000445d0: 7469 636c 652c 2069 7427 7320 7369 6d69 ticle, it's simi │ │ │ -000445e0: 6c61 7220 746f 2074 6865 2073 6967 6d61 lar to the sigma │ │ │ -000445f0: 2069 6e20 7468 650a 2063 6f6c 6f72 2073 in the. color s │ │ │ -00044600: 7061 6365 2069 6e74 6f20 6269 6c61 7465 pace into bilate │ │ │ -00044610: 7261 6c46 696c 7465 722e 0a20 6669 6c74 ralFilter.. filt │ │ │ -00044620: 6572 696e 6720 3244 2073 6967 6e61 6c73 ering 2D signals │ │ │ -00044630: 2069 6e20 7468 6520 6172 7469 636c 652e in the article. │ │ │ -00044640: 0a20 5345 453a 2062 696c 6174 6572 616c . SEE: bilateral │ │ │ -00044650: 4669 6c74 6572 2c20 6775 6964 6564 4669 Filter, guidedFi │ │ │ -00044660: 6c74 6572 2c20 616d 4669 6c74 6572 3c2f lter, amFilter.
    ..
  • .
  • . │ │ │ -00044690: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    crea │ │ │ -000446f0: 7465 4775 6964 6564 4669 6c74 6572 3c2f teGuidedFilter.
    public │ │ │ -00044740: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ -00044750: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;G │ │ │ -000447b0: 7569 6465 6446 696c 7465 723c 2f61 3e3c uidedFilter< │ │ │ -000447c0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> createGui │ │ │ -000447f0: 6465 6446 696c 7465 723c 2f73 7061 6e3e dedFilter │ │ │ -00044800: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ -00044820: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -00044830: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -00044840: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -00044850: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat guide,. │ │ │ -00044870: 696e 7426 6e62 7370 3b72 6164 6975 732c int radius, │ │ │ -00044880: 0a20 646f 7562 6c65 266e 6273 703b 6570 . double ep │ │ │ -00044890: 732c 0a20 646f 7562 6c65 266e 6273 703b s,. double  │ │ │ -000448a0: 7363 616c 6529 3c2f 7370 616e 3e3c 2f64 scale).
    Factory m │ │ │ -000448d0: 6574 686f 642c 2063 7265 6174 6520 696e ethod, create in │ │ │ -000448e0: 7374 616e 6365 206f 6620 4775 6964 6564 stance of Guided │ │ │ -000448f0: 4669 6c74 6572 2061 6e64 2070 726f 6475 Filter and produ │ │ │ -00044900: 6365 2069 6e69 7469 616c 697a 6174 696f ce initializatio │ │ │ -00044910: 6e20 726f 7574 696e 6573 2e3c 2f64 6976 n routines.
    .
    .
    Paramet │ │ │ -00044940: 6572 733a 3c2f 6474 3e0a 3c64 643e 3c63 ers:
    .
    guide │ │ │ -00044960: 202d 2067 7569 6465 6420 696d 6167 6520 - guided image │ │ │ -00044970: 286f 7220 6172 7261 7920 6f66 2069 6d61 (or array of ima │ │ │ -00044980: 6765 7329 2077 6974 6820 7570 2074 6f20 ges) with up to │ │ │ -00044990: 3320 6368 616e 6e65 6c73 2c20 6966 2069 3 channels, if i │ │ │ -000449a0: 7420 6861 7665 206d 6f72 6520 7468 656e t have more then │ │ │ -000449b0: 2033 0a20 6368 616e 6e65 6c73 2074 6865 3. channels the │ │ │ -000449c0: 6e20 6f6e 6c79 2066 6972 7374 2033 2063 n only first 3 c │ │ │ -000449d0: 6861 6e6e 656c 7320 7769 6c6c 2062 6520 hannels will be │ │ │ -000449e0: 7573 6564 2e3c 2f64 643e 0a3c 6464 3e3c used.
    .
    < │ │ │ -000449f0: 636f 6465 3e72 6164 6975 733c 2f63 6f64 code>radius - radius of G │ │ │ -00044a10: 7569 6465 6420 4669 6c74 6572 2e3c 2f64 uided Filter..
    eps │ │ │ -00044a30: 3c2f 636f 6465 3e20 2d20 7265 6775 6c61 - regula │ │ │ -00044a40: 7269 7a61 7469 6f6e 2074 6572 6d20 6f66 rization term of │ │ │ -00044a50: 2047 7569 6465 6420 4669 6c74 6572 2e20 Guided Filter. │ │ │ -00044a60: 5c28 7b65 7073 7d5e 325c 2920 6973 2073 \({eps}^2\) is s │ │ │ -00044a70: 696d 696c 6172 2074 6f20 7468 6520 7369 imilar to the si │ │ │ -00044a80: 676d 6120 696e 2074 6865 2063 6f6c 6f72 gma in the color │ │ │ -00044a90: 0a20 7370 6163 6520 696e 746f 2062 696c . space into bil │ │ │ -00044aa0: 6174 6572 616c 4669 6c74 6572 2e3c 2f64 ateralFilter..
    sca │ │ │ -00044ac0: 6c65 3c2f 636f 6465 3e20 2d20 7375 6273 le - subs │ │ │ -00044ad0: 616d 706c 6520 6661 6374 6f72 206f 6620 ample factor of │ │ │ -00044ae0: 4661 7374 2047 7569 6465 6420 4669 6c74 Fast Guided Filt │ │ │ -00044af0: 6572 2c20 7573 6520 6120 7363 616c 6520 er, use a scale │ │ │ -00044b00: 6c65 7373 2074 6861 6e20 3120 746f 2073 less than 1 to s │ │ │ -00044b10: 7065 6564 7320 7570 2063 6f6d 7075 7461 peeds up computa │ │ │ -00044b20: 7469 6f6e 0a20 7769 7468 2061 6c6d 6f73 tion. with almos │ │ │ -00044b30: 7420 6e6f 2076 6973 6962 6c65 2064 6567 t no visible deg │ │ │ -00044b40: 7261 6461 7469 6f6e 2e20 2865 2e67 2e20 radation. (e.g. │ │ │ -00044b50: 7363 616c 653d 3d30 2e35 2073 6872 696e scale==0.5 shrin │ │ │ -00044b60: 6b73 2074 6865 2069 6d61 6765 2062 7920 ks the image by │ │ │ -00044b70: 3278 2069 6e73 6964 6520 7468 6520 6669 2x inside the fi │ │ │ -00044b80: 6c74 6572 290a 0a20 466f 7220 6d6f 7265 lter).. For more │ │ │ -00044b90: 2064 6574 6169 6c73 2061 626f 7574 2028 details about ( │ │ │ -00044ba0: 4661 7374 2920 4775 6964 6564 2046 696c Fast) Guided Fil │ │ │ -00044bb0: 7465 7220 7061 7261 6d65 7465 7273 2c20 ter parameters, │ │ │ -00044bc0: 7365 6520 7468 6520 6f72 6967 696e 616c see the original │ │ │ -00044bd0: 2061 7274 6963 6c65 7320 4349 5445 3a20 articles CITE: │ │ │ -00044be0: 4b61 696d 696e 6731 3020 4349 5445 3a20 Kaiming10 CITE: │ │ │ -00044bf0: 4b61 696d 696e 6731 3520 2e3c 2f64 643e Kaiming15 .
    │ │ │ -00044c00: 0a3c 6474 3e52 6574 7572 6e73 3a3c 2f64 .
    Returns:.
    automatic │ │ │ -00044c20: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    ..

  • .
  • . │ │ │ -00044c50: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    │ │ │ -00044ca0: 0a3c 6833 3e63 7265 6174 6547 7569 6465 .

    createGuide │ │ │ -00044cb0: 6446 696c 7465 723c 2f68 333e 0a3c 6469 dFilter

    .public static │ │ │ -00044d00: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  GuidedFi │ │ │ -00044d70: 6c74 6572 3c2f 613e 3c2f 7370 616e 3e26 lter& │ │ │ -00044d80: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ -00044da0: 6372 6561 7465 4775 6964 6564 4669 6c74 createGuidedFilt │ │ │ -00044db0: 6572 3c2f 7370 616e 3e3c 7762 723e 3c73 er(Mat  │ │ │ -00044e20: 3b67 7569 6465 2c0a 2069 6e74 266e 6273 ;guide,. int&nbs │ │ │ -00044e30: 703b 7261 6469 7573 2c0a 2064 6f75 626c p;radius,. doubl │ │ │ -00044e40: 6526 6e62 7370 3b65 7073 293c 2f73 7061 e eps).
    Fact │ │ │ -00044e70: 6f72 7920 6d65 7468 6f64 2c20 6372 6561 ory method, crea │ │ │ -00044e80: 7465 2069 6e73 7461 6e63 6520 6f66 2047 te instance of G │ │ │ -00044e90: 7569 6465 6446 696c 7465 7220 616e 6420 uidedFilter and │ │ │ -00044ea0: 7072 6f64 7563 6520 696e 6974 6961 6c69 produce initiali │ │ │ -00044eb0: 7a61 7469 6f6e 2072 6f75 7469 6e65 732e zation routines. │ │ │ -00044ec0: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ -00044ee0: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ -00044ef0: 6464 3e3c 636f 6465 3e67 7569 6465 3c2f dd>guide - guided i │ │ │ -00044f10: 6d61 6765 2028 6f72 2061 7272 6179 206f mage (or array o │ │ │ -00044f20: 6620 696d 6167 6573 2920 7769 7468 2075 f images) with u │ │ │ -00044f30: 7020 746f 2033 2063 6861 6e6e 656c 732c p to 3 channels, │ │ │ -00044f40: 2069 6620 6974 2068 6176 6520 6d6f 7265 if it have more │ │ │ -00044f50: 2074 6865 6e20 330a 2063 6861 6e6e 656c then 3. channel │ │ │ -00044f60: 7320 7468 656e 206f 6e6c 7920 6669 7273 s then only firs │ │ │ -00044f70: 7420 3320 6368 616e 6e65 6c73 2077 696c t 3 channels wil │ │ │ -00044f80: 6c20 6265 2075 7365 642e 3c2f 6464 3e0a l be used.. │ │ │ -00044f90: 3c64 643e 3c63 6f64 653e 7261 6469 7573
    radius │ │ │ -00044fa0: 3c2f 636f 6465 3e20 2d20 7261 6469 7573 - radius │ │ │ -00044fb0: 206f 6620 4775 6964 6564 2046 696c 7465 of Guided Filte │ │ │ -00044fc0: 722e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 r.
    .
    eps - r │ │ │ -00044fe0: 6567 756c 6172 697a 6174 696f 6e20 7465 egularization te │ │ │ -00044ff0: 726d 206f 6620 4775 6964 6564 2046 696c rm of Guided Fil │ │ │ -00045000: 7465 722e 205c 287b 6570 737d 5e32 5c29 ter. \({eps}^2\) │ │ │ -00045010: 2069 7320 7369 6d69 6c61 7220 746f 2074 is similar to t │ │ │ -00045020: 6865 2073 6967 6d61 2069 6e20 7468 6520 he sigma in the │ │ │ -00045030: 636f 6c6f 720a 2073 7061 6365 2069 6e74 color. space int │ │ │ -00045040: 6f20 6269 6c61 7465 7261 6c46 696c 7465 o bilateralFilte │ │ │ -00045050: 722e 0a0a 2077 6974 6820 616c 6d6f 7374 r... with almost │ │ │ -00045060: 206e 6f20 7669 7369 626c 6520 6465 6772 no visible degr │ │ │ -00045070: 6164 6174 696f 6e2e 2028 652e 672e 2073 adation. (e.g. s │ │ │ -00045080: 6361 6c65 3d3d 302e 3520 7368 7269 6e6b cale==0.5 shrink │ │ │ -00045090: 7320 7468 6520 696d 6167 6520 6279 2032 s the image by 2 │ │ │ -000450a0: 7820 696e 7369 6465 2074 6865 2066 696c x inside the fil │ │ │ -000450b0: 7465 7229 0a0a 2046 6f72 206d 6f72 6520 ter).. For more │ │ │ -000450c0: 6465 7461 696c 7320 6162 6f75 7420 2846 details about (F │ │ │ -000450d0: 6173 7429 2047 7569 6465 6420 4669 6c74 ast) Guided Filt │ │ │ -000450e0: 6572 2070 6172 616d 6574 6572 732c 2073 er parameters, s │ │ │ -000450f0: 6565 2074 6865 206f 7269 6769 6e61 6c20 ee the original │ │ │ -00045100: 6172 7469 636c 6573 2043 4954 453a 204b articles CITE: K │ │ │ -00045110: 6169 6d69 6e67 3130 2043 4954 453a 204b aiming10 CITE: K │ │ │ -00045120: 6169 6d69 6e67 3135 202e 3c2f 6464 3e0a aiming15 .
    . │ │ │ -00045130: 3c64 743e 5265 7475 726e 733a 3c2f 6474
    Returns:
    .
    automatica │ │ │ -00045150: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    ..
  • .
  • .< │ │ │ -00045180: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ -00045190: 6574 6169 6c22 2069 643d 2267 7569 6465 etail" id="guide │ │ │ -000451a0: 6446 696c 7465 7228 6f72 672e 6f70 656e dFilter(org.open │ │ │ -000451b0: 6376 2e63 6f72 652e 4d61 742c 6f72 672e cv.core.Mat,org. │ │ │ -000451c0: 6f70 656e 6376 2e63 6f72 652e 4d61 742c opencv.core.Mat, │ │ │ -000451d0: 6f72 672e 6f70 656e 6376 2e63 6f72 652e org.opencv.core. │ │ │ -000451e0: 4d61 742c 696e 742c 646f 7562 6c65 2c69 Mat,int,double,i │ │ │ -000451f0: 6e74 2c64 6f75 626c 6529 223e 0a3c 6833 nt,double)">.

    guidedFilter.
    public │ │ │ -00045250: 7374 6174 6963 3c2f 7370 616e 3e26 6e62 static&nb │ │ │ -00045260: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;voi │ │ │ -00045280: 643c 2f73 7061 6e3e 266e 6273 703b 3c73 d guidedF │ │ │ -000452b0: 696c 7465 723c 2f73 7061 6e3e 3c77 6272 ilter(Mat&n │ │ │ -00045320: 6273 703b 6775 6964 652c 0a20 3c61 2068 bsp;guide,. Mat& │ │ │ -00045370: 6e62 7370 3b73 7263 2c0a 203c 6120 6872 nbsp;src,. Mat&n │ │ │ -000453c0: 6273 703b 6473 742c 0a20 696e 7426 6e62 bsp;dst,. int&nb │ │ │ -000453d0: 7370 3b72 6164 6975 732c 0a20 646f 7562 sp;radius,. doub │ │ │ -000453e0: 6c65 266e 6273 703b 6570 732c 0a20 696e le eps,. in │ │ │ -000453f0: 7426 6e62 7370 3b64 4465 7074 682c 0a20 t dDepth,. │ │ │ -00045400: 646f 7562 6c65 266e 6273 703b 7363 616c double scal │ │ │ -00045410: 6529 3c2f 7370 616e 3e3c 2f64 6976 3e0a e)
    . │ │ │ -00045420: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
    Simple one-li │ │ │ -00045440: 6e65 2028 4661 7374 2920 4775 6964 6564 ne (Fast) Guided │ │ │ -00045450: 2046 696c 7465 7220 6361 6c6c 2e0a 0a20 Filter call... │ │ │ -00045460: 4966 2079 6f75 2068 6176 6520 6d75 6c74 If you have mult │ │ │ -00045470: 6970 6c65 2069 6d61 6765 7320 746f 2066 iple images to f │ │ │ -00045480: 696c 7465 7220 7769 7468 2074 6865 2073 ilter with the s │ │ │ -00045490: 616d 6520 6775 6964 6564 2069 6d61 6765 ame guided image │ │ │ -000454a0: 2074 6865 6e20 7573 6520 4775 6964 6564 then use Guided │ │ │ -000454b0: 4669 6c74 6572 2069 6e74 6572 6661 6365 Filter interface │ │ │ -000454c0: 2074 6f0a 2061 766f 6964 2065 7874 7261 to. avoid extra │ │ │ -000454d0: 2063 6f6d 7075 7461 7469 6f6e 7320 6f6e computations on │ │ │ -000454e0: 2069 6e69 7469 616c 697a 6174 696f 6e20 initialization │ │ │ -000454f0: 7374 6167 652e 3c2f 6469 763e 0a3c 646c stage.
    .
    . │ │ │ -00045510: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
    Parameters:< │ │ │ -00045520: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e67 /dt>.
    g │ │ │ -00045530: 7569 6465 3c2f 636f 6465 3e20 2d20 6775 uide - gu │ │ │ -00045540: 6964 6564 2069 6d61 6765 2028 6f72 2061 ided image (or a │ │ │ -00045550: 7272 6179 206f 6620 696d 6167 6573 2920 rray of images) │ │ │ -00045560: 7769 7468 2075 7020 746f 2033 2063 6861 with up to 3 cha │ │ │ -00045570: 6e6e 656c 732c 2069 6620 6974 2068 6176 nnels, if it hav │ │ │ -00045580: 6520 6d6f 7265 2074 6865 6e20 330a 2063 e more then 3. c │ │ │ -00045590: 6861 6e6e 656c 7320 7468 656e 206f 6e6c hannels then onl │ │ │ -000455a0: 7920 6669 7273 7420 3320 6368 616e 6e65 y first 3 channe │ │ │ -000455b0: 6c73 2077 696c 6c20 6265 2075 7365 642e ls will be used. │ │ │ -000455c0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -000455d0: 7372 633c 2f63 6f64 653e 202d 2066 696c src - fil │ │ │ -000455e0: 7465 7269 6e67 2069 6d61 6765 2077 6974 tering image wit │ │ │ -000455f0: 6820 616e 7920 6e75 6d62 6572 7320 6f66 h any numbers of │ │ │ -00045600: 2063 6861 6e6e 656c 732e 3c2f 6464 3e0a channels.
    . │ │ │ -00045610: 3c64 643e 3c63 6f64 653e 6473 743c 2f63
    dst - output im │ │ │ -00045630: 6167 652e 3c2f 6464 3e0a 3c64 643e 3c63 age.
    .
    radius - radius of Gu │ │ │ -00045660: 6964 6564 2046 696c 7465 722e 3c2f 6464 ided Filter.
    .
    eps< │ │ │ -00045680: 2f63 6f64 653e 202d 2072 6567 756c 6172 /code> - regular │ │ │ -00045690: 697a 6174 696f 6e20 7465 726d 206f 6620 ization term of │ │ │ -000456a0: 4775 6964 6564 2046 696c 7465 722e 205c Guided Filter. \ │ │ │ -000456b0: 287b 6570 737d 5e32 5c29 2069 7320 7369 ({eps}^2\) is si │ │ │ -000456c0: 6d69 6c61 7220 746f 2074 6865 2073 6967 milar to the sig │ │ │ -000456d0: 6d61 2069 6e20 7468 6520 636f 6c6f 720a ma in the color. │ │ │ -000456e0: 2073 7061 6365 2069 6e74 6f20 6269 6c61 space into bila │ │ │ -000456f0: 7465 7261 6c46 696c 7465 722e 3c2f 6464 teralFilter.
    .
    dDep │ │ │ -00045710: 7468 3c2f 636f 6465 3e20 2d20 6f70 7469 th - opti │ │ │ -00045720: 6f6e 616c 2064 6570 7468 206f 6620 7468 onal depth of th │ │ │ -00045730: 6520 6f75 7470 7574 2069 6d61 6765 2e3c e output image.< │ │ │ -00045740: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e73 /dd>.
    s │ │ │ -00045750: 6361 6c65 3c2f 636f 6465 3e20 2d20 7375 cale - su │ │ │ -00045760: 6273 616d 706c 6520 6661 6374 6f72 206f bsample factor o │ │ │ -00045770: 6620 4661 7374 2047 7569 6465 6420 4669 f Fast Guided Fi │ │ │ -00045780: 6c74 6572 2c20 7573 6520 6120 7363 616c lter, use a scal │ │ │ -00045790: 6520 6c65 7373 2074 6861 6e20 3120 746f e less than 1 to │ │ │ -000457a0: 2073 7065 6564 7320 7570 2063 6f6d 7075 speeds up compu │ │ │ -000457b0: 7461 7469 6f6e 0a20 7769 7468 2061 6c6d tation. with alm │ │ │ -000457c0: 6f73 7420 6e6f 2076 6973 6962 6c65 2064 ost no visible d │ │ │ -000457d0: 6567 7261 6461 7469 6f6e 2e20 2865 2e67 egradation. (e.g │ │ │ -000457e0: 2e20 7363 616c 653d 3d30 2e35 2073 6872 . scale==0.5 shr │ │ │ -000457f0: 696e 6b73 2074 6865 2069 6d61 6765 2062 inks the image b │ │ │ -00045800: 7920 3278 2069 6e73 6964 6520 7468 6520 y 2x inside the │ │ │ -00045810: 6669 6c74 6572 290a 0a20 5345 453a 2062 filter).. SEE: b │ │ │ -00045820: 696c 6174 6572 616c 4669 6c74 6572 2c20 ilateralFilter, │ │ │ -00045830: 6474 4669 6c74 6572 2c20 616d 4669 6c74 dtFilter, amFilt │ │ │ -00045840: 6572 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f er
    .
    ..

  • .< │ │ │ -00045860: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    g │ │ │ -000458e0: 7569 6465 6446 696c 7465 723c 2f68 333e uidedFilter

    │ │ │ -000458f0: 0a3c 6469 7620 636c 6173 733d 226d 656d .
    < │ │ │ -00045910: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ -00045920: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ -00045930: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ -00045940: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;void< │ │ │ -00045960: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> guidedFil │ │ │ -00045990: 7465 723c 2f73 7061 6e3e 3c77 6272 3e3c ter< │ │ │ -000459a0: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ -000459b0: 6d65 7465 7273 223e 283c 6120 6872 6566 meters">(Mat&nbs │ │ │ -00045a00: 703b 6775 6964 652c 0a20 3c61 2068 7265 p;guide,. Mat&nb │ │ │ -00045a50: 7370 3b73 7263 2c0a 203c 6120 6872 6566 sp;src,. Mat&nbs │ │ │ -00045aa0: 703b 6473 742c 0a20 696e 7426 6e62 7370 p;dst,. int  │ │ │ -00045ab0: 3b72 6164 6975 732c 0a20 646f 7562 6c65 ;radius,. double │ │ │ -00045ac0: 266e 6273 703b 6570 732c 0a20 696e 7426  eps,. int& │ │ │ -00045ad0: 6e62 7370 3b64 4465 7074 6829 3c2f 7370 nbsp;dDepth)
    .
    Sim │ │ │ -00045b00: 706c 6520 6f6e 652d 6c69 6e65 2028 4661 ple one-line (Fa │ │ │ -00045b10: 7374 2920 4775 6964 6564 2046 696c 7465 st) Guided Filte │ │ │ -00045b20: 7220 6361 6c6c 2e0a 0a20 4966 2079 6f75 r call... If you │ │ │ -00045b30: 2068 6176 6520 6d75 6c74 6970 6c65 2069 have multiple i │ │ │ -00045b40: 6d61 6765 7320 746f 2066 696c 7465 7220 mages to filter │ │ │ -00045b50: 7769 7468 2074 6865 2073 616d 6520 6775 with the same gu │ │ │ -00045b60: 6964 6564 2069 6d61 6765 2074 6865 6e20 ided image then │ │ │ -00045b70: 7573 6520 4775 6964 6564 4669 6c74 6572 use GuidedFilter │ │ │ -00045b80: 2069 6e74 6572 6661 6365 2074 6f0a 2061 interface to. a │ │ │ -00045b90: 766f 6964 2065 7874 7261 2063 6f6d 7075 void extra compu │ │ │ -00045ba0: 7461 7469 6f6e 7320 6f6e 2069 6e69 7469 tations on initi │ │ │ -00045bb0: 616c 697a 6174 696f 6e20 7374 6167 652e alization stage. │ │ │ -00045bc0: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ -00045be0: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ -00045bf0: 6464 3e3c 636f 6465 3e67 7569 6465 3c2f dd>guide - guided i │ │ │ -00045c10: 6d61 6765 2028 6f72 2061 7272 6179 206f mage (or array o │ │ │ -00045c20: 6620 696d 6167 6573 2920 7769 7468 2075 f images) with u │ │ │ -00045c30: 7020 746f 2033 2063 6861 6e6e 656c 732c p to 3 channels, │ │ │ -00045c40: 2069 6620 6974 2068 6176 6520 6d6f 7265 if it have more │ │ │ -00045c50: 2074 6865 6e20 330a 2063 6861 6e6e 656c then 3. channel │ │ │ -00045c60: 7320 7468 656e 206f 6e6c 7920 6669 7273 s then only firs │ │ │ -00045c70: 7420 3320 6368 616e 6e65 6c73 2077 696c t 3 channels wil │ │ │ -00045c80: 6c20 6265 2075 7365 642e 3c2f 6464 3e0a l be used.. │ │ │ -00045c90: 3c64 643e 3c63 6f64 653e 7372 633c 2f63
    src - filtering │ │ │ -00045cb0: 2069 6d61 6765 2077 6974 6820 616e 7920 image with any │ │ │ -00045cc0: 6e75 6d62 6572 7320 6f66 2063 6861 6e6e numbers of chann │ │ │ -00045cd0: 656c 732e 3c2f 6464 3e0a 3c64 643e 3c63 els.
    .
    dst - │ │ │ -00045cf0: 206f 7574 7075 7420 696d 6167 652e 3c2f output image..
    ra │ │ │ -00045d10: 6469 7573 3c2f 636f 6465 3e20 2d20 7261 dius - ra │ │ │ -00045d20: 6469 7573 206f 6620 4775 6964 6564 2046 dius of Guided F │ │ │ -00045d30: 696c 7465 722e 3c2f 6464 3e0a 3c64 643e ilter.
    .
    │ │ │ -00045d40: 3c63 6f64 653e 6570 733c 2f63 6f64 653e eps │ │ │ -00045d50: 202d 2072 6567 756c 6172 697a 6174 696f - regularizatio │ │ │ -00045d60: 6e20 7465 726d 206f 6620 4775 6964 6564 n term of Guided │ │ │ -00045d70: 2046 696c 7465 722e 205c 287b 6570 737d Filter. \({eps} │ │ │ -00045d80: 5e32 5c29 2069 7320 7369 6d69 6c61 7220 ^2\) is similar │ │ │ -00045d90: 746f 2074 6865 2073 6967 6d61 2069 6e20 to the sigma in │ │ │ -00045da0: 7468 6520 636f 6c6f 720a 2073 7061 6365 the color. space │ │ │ -00045db0: 2069 6e74 6f20 6269 6c61 7465 7261 6c46 into bilateralF │ │ │ -00045dc0: 696c 7465 722e 3c2f 6464 3e0a 3c64 643e ilter.
    .
    │ │ │ -00045dd0: 3c63 6f64 653e 6444 6570 7468 3c2f 636f dDepth - optional d │ │ │ -00045df0: 6570 7468 206f 6620 7468 6520 6f75 7470 epth of the outp │ │ │ -00045e00: 7574 2069 6d61 6765 2e0a 0a20 7769 7468 ut image... with │ │ │ -00045e10: 2061 6c6d 6f73 7420 6e6f 2076 6973 6962 almost no visib │ │ │ -00045e20: 6c65 2064 6567 7261 6461 7469 6f6e 2e20 le degradation. │ │ │ -00045e30: 2865 2e67 2e20 7363 616c 653d 3d30 2e35 (e.g. scale==0.5 │ │ │ -00045e40: 2073 6872 696e 6b73 2074 6865 2069 6d61 shrinks the ima │ │ │ -00045e50: 6765 2062 7920 3278 2069 6e73 6964 6520 ge by 2x inside │ │ │ -00045e60: 7468 6520 6669 6c74 6572 290a 0a20 5345 the filter).. SE │ │ │ -00045e70: 453a 2062 696c 6174 6572 616c 4669 6c74 E: bilateralFilt │ │ │ -00045e80: 6572 2c20 6474 4669 6c74 6572 2c20 616d er, dtFilter, am │ │ │ -00045e90: 4669 6c74 6572 3c2f 6464 3e0a 3c2f 646c Filter
    .
    .
    ..
  • .
    .

    g │ │ │ -00045f30: 7569 6465 6446 696c 7465 723c 2f68 333e uidedFilter

    │ │ │ -00045f40: 0a3c 6469 7620 636c 6173 733d 226d 656d .
    < │ │ │ -00045f60: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ -00045f70: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ -00045f80: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ -00045f90: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ;void< │ │ │ -00045fb0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> guidedFil │ │ │ -00045fe0: 7465 723c 2f73 7061 6e3e 3c77 6272 3e3c ter< │ │ │ -00045ff0: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ -00046000: 6d65 7465 7273 223e 283c 6120 6872 6566 meters">(Mat&nbs │ │ │ -00046050: 703b 6775 6964 652c 0a20 3c61 2068 7265 p;guide,. Mat&nb │ │ │ -000460a0: 7370 3b73 7263 2c0a 203c 6120 6872 6566 sp;src,. Mat&nbs │ │ │ -000460f0: 703b 6473 742c 0a20 696e 7426 6e62 7370 p;dst,. int  │ │ │ -00046100: 3b72 6164 6975 732c 0a20 646f 7562 6c65 ;radius,. double │ │ │ -00046110: 266e 6273 703b 6570 7329 3c2f 7370 616e  eps)
    .
    Simpl │ │ │ -00046140: 6520 6f6e 652d 6c69 6e65 2028 4661 7374 e one-line (Fast │ │ │ -00046150: 2920 4775 6964 6564 2046 696c 7465 7220 ) Guided Filter │ │ │ -00046160: 6361 6c6c 2e0a 0a20 4966 2079 6f75 2068 call... If you h │ │ │ -00046170: 6176 6520 6d75 6c74 6970 6c65 2069 6d61 ave multiple ima │ │ │ -00046180: 6765 7320 746f 2066 696c 7465 7220 7769 ges to filter wi │ │ │ -00046190: 7468 2074 6865 2073 616d 6520 6775 6964 th the same guid │ │ │ -000461a0: 6564 2069 6d61 6765 2074 6865 6e20 7573 ed image then us │ │ │ -000461b0: 6520 4775 6964 6564 4669 6c74 6572 2069 e GuidedFilter i │ │ │ -000461c0: 6e74 6572 6661 6365 2074 6f0a 2061 766f nterface to. avo │ │ │ -000461d0: 6964 2065 7874 7261 2063 6f6d 7075 7461 id extra computa │ │ │ -000461e0: 7469 6f6e 7320 6f6e 2069 6e69 7469 616c tions on initial │ │ │ -000461f0: 697a 6174 696f 6e20 7374 6167 652e 3c2f ization stage..
    .
    Para │ │ │ -00046220: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    guide - guided ima │ │ │ -00046250: 6765 2028 6f72 2061 7272 6179 206f 6620 ge (or array of │ │ │ -00046260: 696d 6167 6573 2920 7769 7468 2075 7020 images) with up │ │ │ -00046270: 746f 2033 2063 6861 6e6e 656c 732c 2069 to 3 channels, i │ │ │ -00046280: 6620 6974 2068 6176 6520 6d6f 7265 2074 f it have more t │ │ │ -00046290: 6865 6e20 330a 2063 6861 6e6e 656c 7320 hen 3. channels │ │ │ -000462a0: 7468 656e 206f 6e6c 7920 6669 7273 7420 then only first │ │ │ -000462b0: 3320 6368 616e 6e65 6c73 2077 696c 6c20 3 channels will │ │ │ -000462c0: 6265 2075 7365 642e 3c2f 6464 3e0a 3c64 be used.
    .src - filtering i │ │ │ -000462f0: 6d61 6765 2077 6974 6820 616e 7920 6e75 mage with any nu │ │ │ -00046300: 6d62 6572 7320 6f66 2063 6861 6e6e 656c mbers of channel │ │ │ -00046310: 732e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 s..
    dst - o │ │ │ -00046330: 7574 7075 7420 696d 6167 652e 3c2f 6464 utput image.
    .
    radi │ │ │ -00046350: 7573 3c2f 636f 6465 3e20 2d20 7261 6469 us - radi │ │ │ -00046360: 7573 206f 6620 4775 6964 6564 2046 696c us of Guided Fil │ │ │ -00046370: 7465 722e 3c2f 6464 3e0a 3c64 643e 3c63 ter.
    .
    eps - │ │ │ -00046390: 2072 6567 756c 6172 697a 6174 696f 6e20 regularization │ │ │ -000463a0: 7465 726d 206f 6620 4775 6964 6564 2046 term of Guided F │ │ │ -000463b0: 696c 7465 722e 205c 287b 6570 737d 5e32 ilter. \({eps}^2 │ │ │ -000463c0: 5c29 2069 7320 7369 6d69 6c61 7220 746f \) is similar to │ │ │ -000463d0: 2074 6865 2073 6967 6d61 2069 6e20 7468 the sigma in th │ │ │ -000463e0: 6520 636f 6c6f 720a 2073 7061 6365 2069 e color. space i │ │ │ -000463f0: 6e74 6f20 6269 6c61 7465 7261 6c46 696c nto bilateralFil │ │ │ -00046400: 7465 722e 0a0a 0a20 7769 7468 2061 6c6d ter.... with alm │ │ │ -00046410: 6f73 7420 6e6f 2076 6973 6962 6c65 2064 ost no visible d │ │ │ -00046420: 6567 7261 6461 7469 6f6e 2e20 2865 2e67 egradation. (e.g │ │ │ -00046430: 2e20 7363 616c 653d 3d30 2e35 2073 6872 . scale==0.5 shr │ │ │ -00046440: 696e 6b73 2074 6865 2069 6d61 6765 2062 inks the image b │ │ │ -00046450: 7920 3278 2069 6e73 6964 6520 7468 6520 y 2x inside the │ │ │ -00046460: 6669 6c74 6572 290a 0a20 5345 453a 2062 filter).. SEE: b │ │ │ -00046470: 696c 6174 6572 616c 4669 6c74 6572 2c20 ilateralFilter, │ │ │ -00046480: 6474 4669 6c74 6572 2c20 616d 4669 6c74 dtFilter, amFilt │ │ │ -00046490: 6572 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f er
    .
    ..
  • .< │ │ │ -000464b0: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    crea │ │ │ -00046500: 7465 414d 4669 6c74 6572 3c2f 6833 3e0a teAMFilter

    . │ │ │ -00046510: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
    public sta │ │ │ -00046550: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ -00046560: 3c73 7061 6e20 636c 6173 733d 2272 6574 AdaptiveMan │ │ │ -000465d0: 6966 6f6c 6446 696c 7465 723c 2f61 3e3c ifoldFilter< │ │ │ -000465e0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> createAMF │ │ │ -00046610: 696c 7465 723c 2f73 7061 6e3e 3c77 6272 ilter(doubl │ │ │ -00046640: 6526 6e62 7370 3b73 6967 6d61 5f73 2c0a e sigma_s,. │ │ │ -00046650: 2064 6f75 626c 6526 6e62 7370 3b73 6967 double sig │ │ │ -00046660: 6d61 5f72 2c0a 2062 6f6f 6c65 616e 266e ma_r,. boolean&n │ │ │ -00046670: 6273 703b 6164 6a75 7374 5f6f 7574 6c69 bsp;adjust_outli │ │ │ -00046680: 6572 7329 3c2f 7370 616e 3e3c 2f64 6976 ers)
    .
    Factory met │ │ │ -000466b0: 686f 642c 2063 7265 6174 6520 696e 7374 hod, create inst │ │ │ -000466c0: 616e 6365 206f 6620 4164 6170 7469 7665 ance of Adaptive │ │ │ -000466d0: 4d61 6e69 666f 6c64 4669 6c74 6572 2061 ManifoldFilter a │ │ │ -000466e0: 6e64 2070 726f 6475 6365 2073 6f6d 6520 nd produce some │ │ │ -000466f0: 696e 6974 6961 6c69 7a61 7469 6f6e 2072 initialization r │ │ │ -00046700: 6f75 7469 6e65 732e 3c2f 6469 763e 0a3c outines.
    .< │ │ │ -00046710: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ -00046720: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
    Parameters │ │ │ -00046730: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
    .
    sigma_s │ │ │ -00046750: 2d20 7370 6174 6961 6c20 7374 616e 6461 - spatial standa │ │ │ -00046760: 7264 2064 6576 6961 7469 6f6e 2e3c 2f64 rd deviation..
    sig │ │ │ -00046780: 6d61 5f72 3c2f 636f 6465 3e20 2d20 636f ma_r - co │ │ │ -00046790: 6c6f 7220 7370 6163 6520 7374 616e 6461 lor space standa │ │ │ -000467a0: 7264 2064 6576 6961 7469 6f6e 2c20 6974 rd deviation, it │ │ │ -000467b0: 2069 7320 7369 6d69 6c61 7220 746f 2074 is similar to t │ │ │ -000467c0: 6865 2073 6967 6d61 2069 6e20 7468 6520 he sigma in the │ │ │ -000467d0: 636f 6c6f 7220 7370 6163 6520 696e 746f color space into │ │ │ -000467e0: 0a20 6269 6c61 7465 7261 6c46 696c 7465 . bilateralFilte │ │ │ -000467f0: 722e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 r.
    .
    adjust_outlier │ │ │ -00046810: 733c 2f63 6f64 653e 202d 206f 7074 696f s - optio │ │ │ -00046820: 6e61 6c2c 2073 7065 6369 6679 2070 6572 nal, specify per │ │ │ -00046830: 666f 726d 206f 7574 6c69 6572 7320 6164 form outliers ad │ │ │ -00046840: 6a75 7374 206f 7065 7261 7469 6f6e 206f just operation o │ │ │ -00046850: 7220 6e6f 742c 2028 4571 2e20 3929 2069 r not, (Eq. 9) i │ │ │ -00046860: 6e20 7468 650a 206f 7269 6769 6e61 6c20 n the. original │ │ │ -00046870: 7061 7065 722e 0a0a 2046 6f72 206d 6f72 paper... For mor │ │ │ -00046880: 6520 6465 7461 696c 7320 6162 6f75 7420 e details about │ │ │ -00046890: 4164 6170 7469 7665 204d 616e 6966 6f6c Adaptive Manifol │ │ │ -000468a0: 6420 4669 6c74 6572 2070 6172 616d 6574 d Filter paramet │ │ │ -000468b0: 6572 732c 2073 6565 2074 6865 206f 7269 ers, see the ori │ │ │ -000468c0: 6769 6e61 6c20 6172 7469 636c 6520 4349 ginal article CI │ │ │ -000468d0: 5445 3a20 4761 7374 616c 3132 202e 0a0a TE: Gastal12 ... │ │ │ -000468e0: 203c 623e 4e6f 7465 3a3c 2f62 3e20 4a6f Note: Jo │ │ │ -000468f0: 696e 7420 696d 6167 6573 2077 6974 6820 int images with │ │ │ -00046900: 4356 5f38 5520 616e 6420 4356 5f31 3655 CV_8U and CV_16U │ │ │ -00046910: 2064 6570 7468 2063 6f6e 7665 7274 6564 depth converted │ │ │ -00046920: 2074 6f20 696d 6167 6573 2077 6974 6820 to images with │ │ │ -00046930: 4356 5f33 3246 2064 6570 7468 2061 6e64 CV_32F depth and │ │ │ -00046940: 205b 303b 2031 5d0a 2063 6f6c 6f72 2072 [0; 1]. color r │ │ │ -00046950: 616e 6765 2062 6566 6f72 6520 7072 6f63 ange before proc │ │ │ -00046960: 6573 7369 6e67 2e20 4865 6e63 6520 636f essing. Hence co │ │ │ -00046970: 6c6f 7220 7370 6163 6520 7369 676d 6120 lor space sigma │ │ │ -00046980: 7369 676d 615f 7220 6d75 7374 2062 6520 sigma_r must be │ │ │ -00046990: 696e 205b 303b 2031 5d20 7261 6e67 652c in [0; 1] range, │ │ │ -000469a0: 2075 6e6c 696b 6520 7361 6d65 0a20 7369 unlike same. si │ │ │ -000469b0: 676d 6173 2069 6e20 6269 6c61 7465 7261 gmas in bilatera │ │ │ -000469c0: 6c46 696c 7465 7220 616e 6420 6474 4669 lFilter and dtFi │ │ │ -000469d0: 6c74 6572 2066 756e 6374 696f 6e73 2e3c lter functions.< │ │ │ -000469e0: 2f64 643e 0a3c 6474 3e52 6574 7572 6e73 /dd>.
    Returns │ │ │ -000469f0: 3a3c 2f64 743e 0a3c 6464 3e61 7574 6f6d :
    .
    autom │ │ │ -00046a00: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -00046a10: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
    ....< │ │ │ -00046a30: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    . │ │ │ -00046a70: 3c68 333e 6372 6561 7465 414d 4669 6c74

    createAMFilt │ │ │ -00046a80: 6572 3c2f 6833 3e0a 3c64 6976 2063 6c61 er

    .
    pu │ │ │ -00046ac0: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static Ada │ │ │ -00046b40: 7074 6976 654d 616e 6966 6f6c 6446 696c ptiveManifoldFil │ │ │ -00046b50: 7465 723c 2f61 3e3c 2f73 7061 6e3e 266e ter&n │ │ │ -00046b60: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;c │ │ │ -00046b80: 7265 6174 6541 4d46 696c 7465 723c 2f73 reateAMFilter(double s │ │ │ -00046bc0: 6967 6d61 5f73 2c0a 2064 6f75 626c 6526 igma_s,. double& │ │ │ -00046bd0: 6e62 7370 3b73 6967 6d61 5f72 293c 2f73 nbsp;sigma_r)
    .
    Fa │ │ │ -00046c00: 6374 6f72 7920 6d65 7468 6f64 2c20 6372 ctory method, cr │ │ │ -00046c10: 6561 7465 2069 6e73 7461 6e63 6520 6f66 eate instance of │ │ │ -00046c20: 2041 6461 7074 6976 654d 616e 6966 6f6c AdaptiveManifol │ │ │ -00046c30: 6446 696c 7465 7220 616e 6420 7072 6f64 dFilter and prod │ │ │ -00046c40: 7563 6520 736f 6d65 2069 6e69 7469 616c uce some initial │ │ │ -00046c50: 697a 6174 696f 6e20 726f 7574 696e 6573 ization routines │ │ │ -00046c60: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 .
    .
    .
    P │ │ │ -00046c80: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ -00046c90: 3c64 643e 3c63 6f64 653e 7369 676d 615f
    sigma_ │ │ │ -00046ca0: 733c 2f63 6f64 653e 202d 2073 7061 7469 s - spati │ │ │ -00046cb0: 616c 2073 7461 6e64 6172 6420 6465 7669 al standard devi │ │ │ -00046cc0: 6174 696f 6e2e 3c2f 6464 3e0a 3c64 643e ation.
    .
    │ │ │ -00046cd0: 3c63 6f64 653e 7369 676d 615f 723c 2f63 sigma_r - color spa │ │ │ -00046cf0: 6365 2073 7461 6e64 6172 6420 6465 7669 ce standard devi │ │ │ -00046d00: 6174 696f 6e2c 2069 7420 6973 2073 696d ation, it is sim │ │ │ -00046d10: 696c 6172 2074 6f20 7468 6520 7369 676d ilar to the sigm │ │ │ -00046d20: 6120 696e 2074 6865 2063 6f6c 6f72 2073 a in the color s │ │ │ -00046d30: 7061 6365 2069 6e74 6f0a 2062 696c 6174 pace into. bilat │ │ │ -00046d40: 6572 616c 4669 6c74 6572 2e0a 0a20 6f72 eralFilter... or │ │ │ -00046d50: 6967 696e 616c 2070 6170 6572 2e0a 0a20 iginal paper... │ │ │ -00046d60: 466f 7220 6d6f 7265 2064 6574 6169 6c73 For more details │ │ │ -00046d70: 2061 626f 7574 2041 6461 7074 6976 6520 about Adaptive │ │ │ -00046d80: 4d61 6e69 666f 6c64 2046 696c 7465 7220 Manifold Filter │ │ │ -00046d90: 7061 7261 6d65 7465 7273 2c20 7365 6520 parameters, see │ │ │ -00046da0: 7468 6520 6f72 6967 696e 616c 2061 7274 the original art │ │ │ -00046db0: 6963 6c65 2043 4954 453a 2047 6173 7461 icle CITE: Gasta │ │ │ -00046dc0: 6c31 3220 2e0a 0a20 3c62 3e4e 6f74 653a l12 ... Note: │ │ │ -00046dd0: 3c2f 623e 204a 6f69 6e74 2069 6d61 6765 Joint image │ │ │ -00046de0: 7320 7769 7468 2043 565f 3855 2061 6e64 s with CV_8U and │ │ │ -00046df0: 2043 565f 3136 5520 6465 7074 6820 636f CV_16U depth co │ │ │ -00046e00: 6e76 6572 7465 6420 746f 2069 6d61 6765 nverted to image │ │ │ -00046e10: 7320 7769 7468 2043 565f 3332 4620 6465 s with CV_32F de │ │ │ -00046e20: 7074 6820 616e 6420 5b30 3b20 315d 0a20 pth and [0; 1]. │ │ │ -00046e30: 636f 6c6f 7220 7261 6e67 6520 6265 666f color range befo │ │ │ -00046e40: 7265 2070 726f 6365 7373 696e 672e 2048 re processing. H │ │ │ -00046e50: 656e 6365 2063 6f6c 6f72 2073 7061 6365 ence color space │ │ │ -00046e60: 2073 6967 6d61 2073 6967 6d61 5f72 206d sigma sigma_r m │ │ │ -00046e70: 7573 7420 6265 2069 6e20 5b30 3b20 315d ust be in [0; 1] │ │ │ -00046e80: 2072 616e 6765 2c20 756e 6c69 6b65 2073 range, unlike s │ │ │ -00046e90: 616d 650a 2073 6967 6d61 7320 696e 2062 ame. sigmas in b │ │ │ -00046ea0: 696c 6174 6572 616c 4669 6c74 6572 2061 ilateralFilter a │ │ │ -00046eb0: 6e64 2064 7446 696c 7465 7220 6675 6e63 nd dtFilter func │ │ │ -00046ec0: 7469 6f6e 732e 3c2f 6464 3e0a 3c64 743e tions.
    .
    │ │ │ -00046ed0: 5265 7475 726e 733a 3c2f 6474 3e0a 3c64 Returns:
    .automatically │ │ │ -00046ef0: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated.< │ │ │ -00046f00: 2f64 6c3e 0a3c 2f73 6563 7469 6f6e 3e0a /dl>.
    . │ │ │ -00046f10: 3c2f 6c69 3e0a 3c6c 693e 0a3c 7365 6374 .
  • ..

    amFilte │ │ │ -00046fa0: 723c 2f68 333e 0a3c 6469 7620 636c 6173 r

    .
    pub │ │ │ -00046fe0: 6c69 6320 7374 6174 6963 3c2f 7370 616e lic static void&nbs │ │ │ -00047020: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;amF │ │ │ -00047040: 696c 7465 723c 2f73 7061 6e3e 3c77 6272 ilter(Mat&n │ │ │ -000470b0: 6273 703b 6a6f 696e 742c 0a20 3c61 2068 bsp;joint,. Mat& │ │ │ -00047100: 6e62 7370 3b73 7263 2c0a 203c 6120 6872 nbsp;src,. Mat&n │ │ │ -00047150: 6273 703b 6473 742c 0a20 646f 7562 6c65 bsp;dst,. double │ │ │ -00047160: 266e 6273 703b 7369 676d 615f 732c 0a20  sigma_s,. │ │ │ -00047170: 646f 7562 6c65 266e 6273 703b 7369 676d double sigm │ │ │ -00047180: 615f 722c 0a20 626f 6f6c 6561 6e26 6e62 a_r,. boolean&nb │ │ │ -00047190: 7370 3b61 646a 7573 745f 6f75 746c 6965 sp;adjust_outlie │ │ │ -000471a0: 7273 293c 2f73 7061 6e3e 3c2f 6469 763e rs)
    │ │ │ -000471b0: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
    Simple one-l │ │ │ -000471d0: 696e 6520 4164 6170 7469 7665 204d 616e ine Adaptive Man │ │ │ -000471e0: 6966 6f6c 6420 4669 6c74 6572 2063 616c ifold Filter cal │ │ │ -000471f0: 6c2e 3c2f 6469 763e 0a3c 646c 2063 6c61 l.
    .
    .
    │ │ │ -00047210: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
    │ │ │ -00047220: 0a3c 6464 3e3c 636f 6465 3e6a 6f69 6e74 .
    joint │ │ │ -00047230: 3c2f 636f 6465 3e20 2d20 6a6f 696e 7420 - joint │ │ │ -00047240: 2861 6c73 6f20 6361 6c6c 6564 2061 7320 (also called as │ │ │ -00047250: 6775 6964 6564 2920 696d 6167 6520 6f72 guided) image or │ │ │ -00047260: 2061 7272 6179 206f 6620 696d 6167 6573 array of images │ │ │ -00047270: 2077 6974 6820 616e 7920 6e75 6d62 6572 with any number │ │ │ -00047280: 7320 6f66 2063 6861 6e6e 656c 732e 3c2f s of channels..
    sr │ │ │ -000472a0: 633c 2f63 6f64 653e 202d 2066 696c 7465 c - filte │ │ │ -000472b0: 7269 6e67 2069 6d61 6765 2077 6974 6820 ring image with │ │ │ -000472c0: 616e 7920 6e75 6d62 6572 7320 6f66 2063 any numbers of c │ │ │ -000472d0: 6861 6e6e 656c 732e 3c2f 6464 3e0a 3c64 hannels.
    .dst - output imag │ │ │ -00047300: 652e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 e..
    sigma_s │ │ │ -00047320: 202d 2073 7061 7469 616c 2073 7461 6e64 - spatial stand │ │ │ -00047330: 6172 6420 6465 7669 6174 696f 6e2e 3c2f ard deviation..
    si │ │ │ -00047350: 676d 615f 723c 2f63 6f64 653e 202d 2063 gma_r - c │ │ │ -00047360: 6f6c 6f72 2073 7061 6365 2073 7461 6e64 olor space stand │ │ │ -00047370: 6172 6420 6465 7669 6174 696f 6e2c 2069 ard deviation, i │ │ │ -00047380: 7420 6973 2073 696d 696c 6172 2074 6f20 t is similar to │ │ │ -00047390: 7468 6520 7369 676d 6120 696e 2074 6865 the sigma in the │ │ │ -000473a0: 2063 6f6c 6f72 2073 7061 6365 2069 6e74 color space int │ │ │ -000473b0: 6f0a 2062 696c 6174 6572 616c 4669 6c74 o. bilateralFilt │ │ │ -000473c0: 6572 2e3c 2f64 643e 0a3c 6464 3e3c 636f er.
    .
    adjust_outlie │ │ │ -000473e0: 7273 3c2f 636f 6465 3e20 2d20 6f70 7469 rs - opti │ │ │ -000473f0: 6f6e 616c 2c20 7370 6563 6966 7920 7065 onal, specify pe │ │ │ -00047400: 7266 6f72 6d20 6f75 746c 6965 7273 2061 rform outliers a │ │ │ -00047410: 646a 7573 7420 6f70 6572 6174 696f 6e20 djust operation │ │ │ -00047420: 6f72 206e 6f74 2c20 2845 712e 2039 2920 or not, (Eq. 9) │ │ │ -00047430: 696e 2074 6865 0a20 6f72 6967 696e 616c in the. original │ │ │ -00047440: 2070 6170 6572 2e0a 0a20 3c62 3e4e 6f74 paper... Not │ │ │ -00047450: 653a 3c2f 623e 204a 6f69 6e74 2069 6d61 e: Joint ima │ │ │ -00047460: 6765 7320 7769 7468 2043 565f 3855 2061 ges with CV_8U a │ │ │ -00047470: 6e64 2043 565f 3136 5520 6465 7074 6820 nd CV_16U depth │ │ │ -00047480: 636f 6e76 6572 7465 6420 746f 2069 6d61 converted to ima │ │ │ -00047490: 6765 7320 7769 7468 2043 565f 3332 4620 ges with CV_32F │ │ │ -000474a0: 6465 7074 6820 616e 6420 5b30 3b20 315d depth and [0; 1] │ │ │ -000474b0: 0a20 636f 6c6f 7220 7261 6e67 6520 6265 . color range be │ │ │ -000474c0: 666f 7265 2070 726f 6365 7373 696e 672e fore processing. │ │ │ -000474d0: 2048 656e 6365 2063 6f6c 6f72 2073 7061 Hence color spa │ │ │ -000474e0: 6365 2073 6967 6d61 2073 6967 6d61 5f72 ce sigma sigma_r │ │ │ -000474f0: 206d 7573 7420 6265 2069 6e20 5b30 3b20 must be in [0; │ │ │ -00047500: 315d 2072 616e 6765 2c20 756e 6c69 6b65 1] range, unlike │ │ │ -00047510: 2073 616d 650a 2073 6967 6d61 7320 696e same. sigmas in │ │ │ -00047520: 2062 696c 6174 6572 616c 4669 6c74 6572 bilateralFilter │ │ │ -00047530: 2061 6e64 2064 7446 696c 7465 7220 6675 and dtFilter fu │ │ │ -00047540: 6e63 7469 6f6e 732e 2053 4545 3a20 6269 nctions. SEE: bi │ │ │ -00047550: 6c61 7465 7261 6c46 696c 7465 722c 2064 lateralFilter, d │ │ │ -00047560: 7446 696c 7465 722c 2067 7569 6465 6446 tFilter, guidedF │ │ │ -00047570: 696c 7465 723c 2f64 643e 0a3c 2f64 6c3e ilter
    .
    │ │ │ -00047580: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .
  • ..
  • .
    .

    amF │ │ │ -00047610: 696c 7465 723c 2f68 333e 0a3c 6469 7620 ilter

    .
    public static void │ │ │ -00047690: 266e 6273 703b 3c73 7061 6e20 636c 6173  amFilter │ │ │ -000476c0: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ -000476e0: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -000476f0: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -00047700: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -00047710: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat joint,. │ │ │ -00047730: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ -00047770: 2f61 3e26 6e62 7370 3b73 7263 2c0a 203c /a> src,. < │ │ │ -00047780: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -00047790: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -000477a0: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -000477b0: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat dst,. do │ │ │ -000477d0: 7562 6c65 266e 6273 703b 7369 676d 615f uble sigma_ │ │ │ -000477e0: 732c 0a20 646f 7562 6c65 266e 6273 703b s,. double  │ │ │ -000477f0: 7369 676d 615f 7229 3c2f 7370 616e 3e3c sigma_r)< │ │ │ -00047800: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Simple │ │ │ -00047820: 6f6e 652d 6c69 6e65 2041 6461 7074 6976 one-line Adaptiv │ │ │ -00047830: 6520 4d61 6e69 666f 6c64 2046 696c 7465 e Manifold Filte │ │ │ -00047840: 7220 6361 6c6c 2e3c 2f64 6976 3e0a 3c64 r call.
    . │ │ │ -00047860: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ -00047870: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -00047880: 6a6f 696e 743c 2f63 6f64 653e 202d 206a joint - j │ │ │ -00047890: 6f69 6e74 2028 616c 736f 2063 616c 6c65 oint (also calle │ │ │ -000478a0: 6420 6173 2067 7569 6465 6429 2069 6d61 d as guided) ima │ │ │ -000478b0: 6765 206f 7220 6172 7261 7920 6f66 2069 ge or array of i │ │ │ -000478c0: 6d61 6765 7320 7769 7468 2061 6e79 206e mages with any n │ │ │ -000478d0: 756d 6265 7273 206f 6620 6368 616e 6e65 umbers of channe │ │ │ -000478e0: 6c73 2e3c 2f64 643e 0a3c 6464 3e3c 636f ls.
    .
    src - │ │ │ -00047900: 6669 6c74 6572 696e 6720 696d 6167 6520 filtering image │ │ │ -00047910: 7769 7468 2061 6e79 206e 756d 6265 7273 with any numbers │ │ │ -00047920: 206f 6620 6368 616e 6e65 6c73 2e3c 2f64 of channels..
    dst │ │ │ -00047940: 3c2f 636f 6465 3e20 2d20 6f75 7470 7574 - output │ │ │ -00047950: 2069 6d61 6765 2e3c 2f64 643e 0a3c 6464 image.
    .
    sigma_s - spatial │ │ │ -00047980: 7374 616e 6461 7264 2064 6576 6961 7469 standard deviati │ │ │ -00047990: 6f6e 2e3c 2f64 643e 0a3c 6464 3e3c 636f on.
    .
    sigma_r - color space │ │ │ -000479c0: 7374 616e 6461 7264 2064 6576 6961 7469 standard deviati │ │ │ -000479d0: 6f6e 2c20 6974 2069 7320 7369 6d69 6c61 on, it is simila │ │ │ -000479e0: 7220 746f 2074 6865 2073 6967 6d61 2069 r to the sigma i │ │ │ -000479f0: 6e20 7468 6520 636f 6c6f 7220 7370 6163 n the color spac │ │ │ -00047a00: 6520 696e 746f 0a20 6269 6c61 7465 7261 e into. bilatera │ │ │ -00047a10: 6c46 696c 7465 722e 0a0a 206f 7269 6769 lFilter... origi │ │ │ -00047a20: 6e61 6c20 7061 7065 722e 0a0a 203c 623e nal paper... │ │ │ -00047a30: 4e6f 7465 3a3c 2f62 3e20 4a6f 696e 7420 Note: Joint │ │ │ -00047a40: 696d 6167 6573 2077 6974 6820 4356 5f38 images with CV_8 │ │ │ -00047a50: 5520 616e 6420 4356 5f31 3655 2064 6570 U and CV_16U dep │ │ │ -00047a60: 7468 2063 6f6e 7665 7274 6564 2074 6f20 th converted to │ │ │ -00047a70: 696d 6167 6573 2077 6974 6820 4356 5f33 images with CV_3 │ │ │ -00047a80: 3246 2064 6570 7468 2061 6e64 205b 303b 2F depth and [0; │ │ │ -00047a90: 2031 5d0a 2063 6f6c 6f72 2072 616e 6765 1]. color range │ │ │ -00047aa0: 2062 6566 6f72 6520 7072 6f63 6573 7369 before processi │ │ │ -00047ab0: 6e67 2e20 4865 6e63 6520 636f 6c6f 7220 ng. Hence color │ │ │ -00047ac0: 7370 6163 6520 7369 676d 6120 7369 676d space sigma sigm │ │ │ -00047ad0: 615f 7220 6d75 7374 2062 6520 696e 205b a_r must be in [ │ │ │ -00047ae0: 303b 2031 5d20 7261 6e67 652c 2075 6e6c 0; 1] range, unl │ │ │ -00047af0: 696b 6520 7361 6d65 0a20 7369 676d 6173 ike same. sigmas │ │ │ -00047b00: 2069 6e20 6269 6c61 7465 7261 6c46 696c in bilateralFil │ │ │ -00047b10: 7465 7220 616e 6420 6474 4669 6c74 6572 ter and dtFilter │ │ │ -00047b20: 2066 756e 6374 696f 6e73 2e20 5345 453a functions. SEE: │ │ │ -00047b30: 2062 696c 6174 6572 616c 4669 6c74 6572 bilateralFilter │ │ │ -00047b40: 2c20 6474 4669 6c74 6572 2c20 6775 6964 , dtFilter, guid │ │ │ -00047b50: 6564 4669 6c74 6572 3c2f 6464 3e0a 3c2f edFilter
    ..
    .< │ │ │ -00047b70: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • .. │ │ │ -00047c00: 3c68 333e 6a6f 696e 7442 696c 6174 6572

    jointBilater │ │ │ -00047c10: 616c 4669 6c74 6572 3c2f 6833 3e0a 3c64 alFilter

    .public stati │ │ │ -00047c60: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c void jointBilater │ │ │ -00047cc0: 616c 4669 6c74 6572 3c2f 7370 616e 3e3c alFilter< │ │ │ -00047cd0: 7762 723e 3c73 7061 6e20 636c 6173 733d wbr>(
    Mat joint,. < │ │ │ -00047d40: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -00047d50: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -00047d60: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -00047d70: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat src,. Mat dst,. int │ │ │ -00047de0: 266e 6273 703b 642c 0a20 646f 7562 6c65  d,. double │ │ │ -00047df0: 266e 6273 703b 7369 676d 6143 6f6c 6f72  sigmaColor │ │ │ -00047e00: 2c0a 2064 6f75 626c 6526 6e62 7370 3b73 ,. double s │ │ │ -00047e10: 6967 6d61 5370 6163 652c 0a20 696e 7426 igmaSpace,. int& │ │ │ -00047e20: 6e62 7370 3b62 6f72 6465 7254 7970 6529 nbsp;borderType) │ │ │ -00047e30: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64 .Applies the joi │ │ │ -00047e60: 6e74 2062 696c 6174 6572 616c 2066 696c nt bilateral fil │ │ │ -00047e70: 7465 7220 746f 2061 6e20 696d 6167 652e ter to an image. │ │ │ -00047e80: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373 .
    .
    Pa │ │ │ -00047ea0: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ -00047eb0: 6464 3e3c 636f 6465 3e6a 6f69 6e74 3c2f dd>joint - Joint 8- │ │ │ -00047ed0: 6269 7420 6f72 2066 6c6f 6174 696e 672d bit or floating- │ │ │ -00047ee0: 706f 696e 742c 2031 2d63 6861 6e6e 656c point, 1-channel │ │ │ -00047ef0: 206f 7220 332d 6368 616e 6e65 6c20 696d or 3-channel im │ │ │ -00047f00: 6167 652e 3c2f 6464 3e0a 3c64 643e 3c63 age..
    src - │ │ │ -00047f20: 2053 6f75 7263 6520 382d 6269 7420 6f72 Source 8-bit or │ │ │ -00047f30: 2066 6c6f 6174 696e 672d 706f 696e 742c floating-point, │ │ │ -00047f40: 2031 2d63 6861 6e6e 656c 206f 7220 332d 1-channel or 3- │ │ │ -00047f50: 6368 616e 6e65 6c20 696d 6167 6520 7769 channel image wi │ │ │ -00047f60: 7468 2074 6865 2073 616d 6520 6465 7074 th the same dept │ │ │ -00047f70: 6820 6173 206a 6f69 6e74 0a20 696d 6167 h as joint. imag │ │ │ -00047f80: 652e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 e.
    .
    dst - D │ │ │ -00047fa0: 6573 7469 6e61 7469 6f6e 2069 6d61 6765 estination image │ │ │ -00047fb0: 206f 6620 7468 6520 7361 6d65 2073 697a of the same siz │ │ │ -00047fc0: 6520 616e 6420 7479 7065 2061 7320 7372 e and type as sr │ │ │ -00047fd0: 6320 2e3c 2f64 643e 0a3c 6464 3e3c 636f c .
    .
    d - Di │ │ │ -00047ff0: 616d 6574 6572 206f 6620 6561 6368 2070 ameter of each p │ │ │ -00048000: 6978 656c 206e 6569 6768 626f 7268 6f6f ixel neighborhoo │ │ │ -00048010: 6420 7468 6174 2069 7320 7573 6564 2064 d that is used d │ │ │ -00048020: 7572 696e 6720 6669 6c74 6572 696e 672e uring filtering. │ │ │ -00048030: 2049 6620 6974 2069 7320 6e6f 6e2d 706f If it is non-po │ │ │ -00048040: 7369 7469 7665 2c0a 2069 7420 6973 2063 sitive,. it is c │ │ │ -00048050: 6f6d 7075 7465 6420 6672 6f6d 2073 6967 omputed from sig │ │ │ -00048060: 6d61 5370 6163 6520 2e3c 2f64 643e 0a3c maSpace .
    .< │ │ │ -00048070: 6464 3e3c 636f 6465 3e73 6967 6d61 436f dd>sigmaCo │ │ │ -00048080: 6c6f 723c 2f63 6f64 653e 202d 2046 696c lor - Fil │ │ │ -00048090: 7465 7220 7369 676d 6120 696e 2074 6865 ter sigma in the │ │ │ -000480a0: 2063 6f6c 6f72 2073 7061 6365 2e20 4120 color space. A │ │ │ -000480b0: 6c61 7267 6572 2076 616c 7565 206f 6620 larger value of │ │ │ -000480c0: 7468 6520 7061 7261 6d65 7465 7220 6d65 the parameter me │ │ │ -000480d0: 616e 7320 7468 6174 0a20 6661 7274 6865 ans that. farthe │ │ │ -000480e0: 7220 636f 6c6f 7273 2077 6974 6869 6e20 r colors within │ │ │ -000480f0: 7468 6520 7069 7865 6c20 6e65 6967 6862 the pixel neighb │ │ │ -00048100: 6f72 686f 6f64 2028 7365 6520 7369 676d orhood (see sigm │ │ │ -00048110: 6153 7061 6365 2029 2077 696c 6c20 6265 aSpace ) will be │ │ │ -00048120: 206d 6978 6564 2074 6f67 6574 6865 722c mixed together, │ │ │ -00048130: 2072 6573 756c 7469 6e67 2069 6e0a 206c resulting in. l │ │ │ -00048140: 6172 6765 7220 6172 6561 7320 6f66 2073 arger areas of s │ │ │ -00048150: 656d 692d 6571 7561 6c20 636f 6c6f 722e emi-equal color. │ │ │ -00048160: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e .
    │ │ │ -00048170: 7369 676d 6153 7061 6365 3c2f 636f 6465 sigmaSpace - Filter sigma │ │ │ -00048190: 2069 6e20 7468 6520 636f 6f72 6469 6e61 in the coordina │ │ │ -000481a0: 7465 2073 7061 6365 2e20 4120 6c61 7267 te space. A larg │ │ │ -000481b0: 6572 2076 616c 7565 206f 6620 7468 6520 er value of the │ │ │ -000481c0: 7061 7261 6d65 7465 7220 6d65 616e 7320 parameter means │ │ │ -000481d0: 7468 6174 0a20 6661 7274 6865 7220 7069 that. farther pi │ │ │ -000481e0: 7865 6c73 2077 696c 6c20 696e 666c 7565 xels will influe │ │ │ -000481f0: 6e63 6520 6561 6368 206f 7468 6572 2061 nce each other a │ │ │ -00048200: 7320 6c6f 6e67 2061 7320 7468 6569 7220 s long as their │ │ │ -00048210: 636f 6c6f 7273 2061 7265 2063 6c6f 7365 colors are close │ │ │ -00048220: 2065 6e6f 7567 6820 2873 6565 2073 6967 enough (see sig │ │ │ -00048230: 6d61 436f 6c6f 7220 292e 0a20 5768 656e maColor ).. When │ │ │ -00048240: 2064 2667 743b 3020 2c20 6974 2073 7065 d>0 , it spe │ │ │ -00048250: 6369 6669 6573 2074 6865 206e 6569 6768 cifies the neigh │ │ │ -00048260: 626f 7268 6f6f 6420 7369 7a65 2072 6567 borhood size reg │ │ │ -00048270: 6172 646c 6573 7320 6f66 2073 6967 6d61 ardless of sigma │ │ │ -00048280: 5370 6163 6520 2e20 4f74 6865 7277 6973 Space . Otherwis │ │ │ -00048290: 652c 2064 2069 730a 2070 726f 706f 7274 e, d is. proport │ │ │ -000482a0: 696f 6e61 6c20 746f 2073 6967 6d61 5370 ional to sigmaSp │ │ │ -000482b0: 6163 6520 2e3c 2f64 643e 0a3c 6464 3e3c ace .
    .
    < │ │ │ -000482c0: 636f 6465 3e62 6f72 6465 7254 7970 653c code>borderType< │ │ │ -000482d0: 2f63 6f64 653e 202d 203c 623e 4e6f 7465 /code> - Note │ │ │ -000482e0: 3a3c 2f62 3e20 6269 6c61 7465 7261 6c46 : bilateralF │ │ │ -000482f0: 696c 7465 7220 616e 6420 6a6f 696e 7442 ilter and jointB │ │ │ -00048300: 696c 6174 6572 616c 4669 6c74 6572 2075 ilateralFilter u │ │ │ -00048310: 7365 204c 3120 6e6f 726d 2074 6f20 636f se L1 norm to co │ │ │ -00048320: 6d70 7574 6520 6469 6666 6572 656e 6365 mpute difference │ │ │ -00048330: 2062 6574 7765 656e 2063 6f6c 6f72 732e between colors. │ │ │ -00048340: 0a0a 2053 4545 3a20 6269 6c61 7465 7261 .. SEE: bilatera │ │ │ -00048350: 6c46 696c 7465 722c 2061 6d46 696c 7465 lFilter, amFilte │ │ │ -00048360: 723c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 r
    .
    .
    .
  • ..
    .

    jointBi │ │ │ -00048410: 6c61 7465 7261 6c46 696c 7465 723c 2f68 lateralFilter.
    public │ │ │ -00048460: 7374 6174 6963 3c2f 7370 616e 3e26 6e62 static&nb │ │ │ -00048470: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;voi │ │ │ -00048490: 643c 2f73 7061 6e3e 266e 6273 703b 3c73 d jointBi │ │ │ -000484c0: 6c61 7465 7261 6c46 696c 7465 723c 2f73 lateralFilter(M │ │ │ -00048530: 6174 3c2f 613e 266e 6273 703b 6a6f 696e at join │ │ │ -00048540: 742c 0a20 3c61 2068 7265 663d 222e 2e2f t,. │ │ │ -00048580: 4d61 743c 2f61 3e26 6e62 7370 3b73 7263 Mat src │ │ │ -00048590: 2c0a 203c 6120 6872 6566 3d22 2e2e 2f63 ,. M │ │ │ -000485d0: 6174 3c2f 613e 266e 6273 703b 6473 742c at dst, │ │ │ -000485e0: 0a20 696e 7426 6e62 7370 3b64 2c0a 2064 . int d,. d │ │ │ -000485f0: 6f75 626c 6526 6e62 7370 3b73 6967 6d61 ouble sigma │ │ │ -00048600: 436f 6c6f 722c 0a20 646f 7562 6c65 266e Color,. double&n │ │ │ -00048610: 6273 703b 7369 676d 6153 7061 6365 293c bsp;sigmaSpace)< │ │ │ -00048620: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ -00048640: 4170 706c 6965 7320 7468 6520 6a6f 696e Applies the join │ │ │ -00048650: 7420 6269 6c61 7465 7261 6c20 6669 6c74 t bilateral filt │ │ │ -00048660: 6572 2074 6f20 616e 2069 6d61 6765 2e3c er to an image.< │ │ │ -00048670: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ -00048690: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .joint - Joint 8-b │ │ │ -000486c0: 6974 206f 7220 666c 6f61 7469 6e67 2d70 it or floating-p │ │ │ -000486d0: 6f69 6e74 2c20 312d 6368 616e 6e65 6c20 oint, 1-channel │ │ │ -000486e0: 6f72 2033 2d63 6861 6e6e 656c 2069 6d61 or 3-channel ima │ │ │ -000486f0: 6765 2e3c 2f64 643e 0a3c 6464 3e3c 636f ge..
    src - │ │ │ -00048710: 536f 7572 6365 2038 2d62 6974 206f 7220 Source 8-bit or │ │ │ -00048720: 666c 6f61 7469 6e67 2d70 6f69 6e74 2c20 floating-point, │ │ │ -00048730: 312d 6368 616e 6e65 6c20 6f72 2033 2d63 1-channel or 3-c │ │ │ -00048740: 6861 6e6e 656c 2069 6d61 6765 2077 6974 hannel image wit │ │ │ -00048750: 6820 7468 6520 7361 6d65 2064 6570 7468 h the same depth │ │ │ -00048760: 2061 7320 6a6f 696e 740a 2069 6d61 6765 as joint. image │ │ │ -00048770: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    dst - De │ │ │ -00048790: 7374 696e 6174 696f 6e20 696d 6167 6520 stination image │ │ │ -000487a0: 6f66 2074 6865 2073 616d 6520 7369 7a65 of the same size │ │ │ -000487b0: 2061 6e64 2074 7970 6520 6173 2073 7263 and type as src │ │ │ -000487c0: 202e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 .
    .
    d - Dia │ │ │ -000487e0: 6d65 7465 7220 6f66 2065 6163 6820 7069 meter of each pi │ │ │ -000487f0: 7865 6c20 6e65 6967 6862 6f72 686f 6f64 xel neighborhood │ │ │ -00048800: 2074 6861 7420 6973 2075 7365 6420 6475 that is used du │ │ │ -00048810: 7269 6e67 2066 696c 7465 7269 6e67 2e20 ring filtering. │ │ │ -00048820: 4966 2069 7420 6973 206e 6f6e 2d70 6f73 If it is non-pos │ │ │ -00048830: 6974 6976 652c 0a20 6974 2069 7320 636f itive,. it is co │ │ │ -00048840: 6d70 7574 6564 2066 726f 6d20 7369 676d mputed from sigm │ │ │ -00048850: 6153 7061 6365 202e 3c2f 6464 3e0a 3c64 aSpace .
    .sigmaCol │ │ │ -00048870: 6f72 3c2f 636f 6465 3e20 2d20 4669 6c74 or - Filt │ │ │ -00048880: 6572 2073 6967 6d61 2069 6e20 7468 6520 er sigma in the │ │ │ -00048890: 636f 6c6f 7220 7370 6163 652e 2041 206c color space. A l │ │ │ -000488a0: 6172 6765 7220 7661 6c75 6520 6f66 2074 arger value of t │ │ │ -000488b0: 6865 2070 6172 616d 6574 6572 206d 6561 he parameter mea │ │ │ -000488c0: 6e73 2074 6861 740a 2066 6172 7468 6572 ns that. farther │ │ │ -000488d0: 2063 6f6c 6f72 7320 7769 7468 696e 2074 colors within t │ │ │ -000488e0: 6865 2070 6978 656c 206e 6569 6768 626f he pixel neighbo │ │ │ -000488f0: 7268 6f6f 6420 2873 6565 2073 6967 6d61 rhood (see sigma │ │ │ -00048900: 5370 6163 6520 2920 7769 6c6c 2062 6520 Space ) will be │ │ │ -00048910: 6d69 7865 6420 746f 6765 7468 6572 2c20 mixed together, │ │ │ -00048920: 7265 7375 6c74 696e 6720 696e 0a20 6c61 resulting in. la │ │ │ -00048930: 7267 6572 2061 7265 6173 206f 6620 7365 rger areas of se │ │ │ -00048940: 6d69 2d65 7175 616c 2063 6f6c 6f72 2e3c mi-equal color.< │ │ │ -00048950: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e73 /dd>.
    s │ │ │ -00048960: 6967 6d61 5370 6163 653c 2f63 6f64 653e igmaSpace │ │ │ -00048970: 202d 2046 696c 7465 7220 7369 676d 6120 - Filter sigma │ │ │ -00048980: 696e 2074 6865 2063 6f6f 7264 696e 6174 in the coordinat │ │ │ -00048990: 6520 7370 6163 652e 2041 206c 6172 6765 e space. A large │ │ │ -000489a0: 7220 7661 6c75 6520 6f66 2074 6865 2070 r value of the p │ │ │ -000489b0: 6172 616d 6574 6572 206d 6561 6e73 2074 arameter means t │ │ │ -000489c0: 6861 740a 2066 6172 7468 6572 2070 6978 hat. farther pix │ │ │ -000489d0: 656c 7320 7769 6c6c 2069 6e66 6c75 656e els will influen │ │ │ -000489e0: 6365 2065 6163 6820 6f74 6865 7220 6173 ce each other as │ │ │ -000489f0: 206c 6f6e 6720 6173 2074 6865 6972 2063 long as their c │ │ │ -00048a00: 6f6c 6f72 7320 6172 6520 636c 6f73 6520 olors are close │ │ │ -00048a10: 656e 6f75 6768 2028 7365 6520 7369 676d enough (see sigm │ │ │ -00048a20: 6143 6f6c 6f72 2029 2e0a 2057 6865 6e20 aColor ).. When │ │ │ -00048a30: 6426 6774 3b30 202c 2069 7420 7370 6563 d>0 , it spec │ │ │ -00048a40: 6966 6965 7320 7468 6520 6e65 6967 6862 ifies the neighb │ │ │ -00048a50: 6f72 686f 6f64 2073 697a 6520 7265 6761 orhood size rega │ │ │ -00048a60: 7264 6c65 7373 206f 6620 7369 676d 6153 rdless of sigmaS │ │ │ -00048a70: 7061 6365 202e 204f 7468 6572 7769 7365 pace . Otherwise │ │ │ -00048a80: 2c20 6420 6973 0a20 7072 6f70 6f72 7469 , d is. proporti │ │ │ -00048a90: 6f6e 616c 2074 6f20 7369 676d 6153 7061 onal to sigmaSpa │ │ │ -00048aa0: 6365 202e 0a0a 0a20 3c62 3e4e 6f74 653a ce .... Note: │ │ │ -00048ab0: 3c2f 623e 2062 696c 6174 6572 616c 4669 bilateralFi │ │ │ -00048ac0: 6c74 6572 2061 6e64 206a 6f69 6e74 4269 lter and jointBi │ │ │ -00048ad0: 6c61 7465 7261 6c46 696c 7465 7220 7573 lateralFilter us │ │ │ -00048ae0: 6520 4c31 206e 6f72 6d20 746f 2063 6f6d e L1 norm to com │ │ │ -00048af0: 7075 7465 2064 6966 6665 7265 6e63 6520 pute difference │ │ │ -00048b00: 6265 7477 6565 6e20 636f 6c6f 7273 2e0a between colors.. │ │ │ -00048b10: 0a20 5345 453a 2062 696c 6174 6572 616c . SEE: bilateral │ │ │ -00048b20: 4669 6c74 6572 2c20 616d 4669 6c74 6572 Filter, amFilter │ │ │ -00048b30: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365
    .
    ...
  • .
    .

    bilate │ │ │ -00048bd0: 7261 6c54 6578 7475 7265 4669 6c74 6572 ralTextureFilter │ │ │ -00048be0: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ -00048c20: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ -00048c30: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ -00048c50: 766f 6964 3c2f 7370 616e 3e26 6e62 7370 void  │ │ │ -00048c60: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;bila │ │ │ -00048c80: 7465 7261 6c54 6578 7475 7265 4669 6c74 teralTextureFilt │ │ │ -00048c90: 6572 3c2f 7370 616e 3e3c 7762 723e 3c73 er(Mat  │ │ │ -00048d00: 3b73 7263 2c0a 203c 6120 6872 6566 3d22 ;src,. Mat  │ │ │ -00048d50: 6473 742c 0a20 696e 7426 6e62 7370 3b66 dst,. int f │ │ │ -00048d60: 722c 0a20 696e 7426 6e62 7370 3b6e 756d r,. int num │ │ │ -00048d70: 4974 6572 2c0a 2064 6f75 626c 6526 6e62 Iter,. double&nb │ │ │ -00048d80: 7370 3b73 6967 6d61 416c 7068 612c 0a20 sp;sigmaAlpha,. │ │ │ -00048d90: 646f 7562 6c65 266e 6273 703b 7369 676d double sigm │ │ │ -00048da0: 6141 7667 293c 2f73 7061 6e3e 3c2f 6469 aAvg).
    Applies th │ │ │ -00048dd0: 6520 6269 6c61 7465 7261 6c20 7465 7874 e bilateral text │ │ │ -00048de0: 7572 6520 6669 6c74 6572 2074 6f20 616e ure filter to an │ │ │ -00048df0: 2069 6d61 6765 2e20 4974 2070 6572 666f image. It perfo │ │ │ -00048e00: 726d 7320 7374 7275 6374 7572 652d 7072 rms structure-pr │ │ │ -00048e10: 6573 6572 7669 6e67 2074 6578 7475 7265 eserving texture │ │ │ -00048e20: 2066 696c 7465 722e 0a20 466f 7220 6d6f filter.. For mo │ │ │ -00048e30: 7265 2064 6574 6169 6c73 2061 626f 7574 re details about │ │ │ -00048e40: 2074 6869 7320 6669 6c74 6572 2073 6565 this filter see │ │ │ -00048e50: 2043 4954 453a 2043 686f 3230 3134 2e3c CITE: Cho2014.< │ │ │ -00048e60: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ -00048e80: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .src - Source imag │ │ │ -00048eb0: 6520 7768 6f73 6520 6465 7074 6820 6973 e whose depth is │ │ │ -00048ec0: 2038 2d62 6974 2055 494e 5420 6f72 2033 8-bit UINT or 3 │ │ │ -00048ed0: 322d 6269 7420 464c 4f41 543c 2f64 643e 2-bit FLOAT │ │ │ -00048ee0: 0a3c 6464 3e3c 636f 6465 3e64 7374 3c2f .
    dst - Destinat │ │ │ -00048f00: 696f 6e20 696d 6167 6520 6f66 2074 6865 ion image of the │ │ │ -00048f10: 2073 616d 6520 7369 7a65 2061 6e64 2074 same size and t │ │ │ -00048f20: 7970 6520 6173 2073 7263 2e3c 2f64 643e ype as src.
    │ │ │ -00048f30: 0a3c 6464 3e3c 636f 6465 3e66 723c 2f63 .
    fr - Radius of │ │ │ -00048f50: 206b 6572 6e65 6c20 746f 2062 6520 7573 kernel to be us │ │ │ -00048f60: 6564 2066 6f72 2066 696c 7465 7269 6e67 ed for filtering │ │ │ -00048f70: 2e20 4974 2073 686f 756c 6420 6265 2070 . It should be p │ │ │ -00048f80: 6f73 6974 6976 6520 696e 7465 6765 723c ositive integer< │ │ │ -00048f90: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e6e /dd>.
    n │ │ │ -00048fa0: 756d 4974 6572 3c2f 636f 6465 3e20 2d20 umIter - │ │ │ -00048fb0: 4e75 6d62 6572 206f 6620 6974 6572 6174 Number of iterat │ │ │ -00048fc0: 696f 6e73 206f 6620 616c 676f 7269 7468 ions of algorith │ │ │ -00048fd0: 6d2c 2049 7420 7368 6f75 6c64 2062 6520 m, It should be │ │ │ -00048fe0: 706f 7369 7469 7665 2069 6e74 6567 6572 positive integer │ │ │ -00048ff0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -00049000: 7369 676d 6141 6c70 6861 3c2f 636f 6465 sigmaAlpha - Controls the │ │ │ -00049020: 2073 6861 7270 6e65 7373 206f 6620 7468 sharpness of th │ │ │ -00049030: 6520 7765 6967 6874 2074 7261 6e73 6974 e weight transit │ │ │ -00049040: 696f 6e20 6672 6f6d 2065 6467 6573 2074 ion from edges t │ │ │ -00049050: 6f20 736d 6f6f 7468 2f74 6578 7475 7265 o smooth/texture │ │ │ -00049060: 2072 6567 696f 6e73 2c20 7768 6572 650a regions, where. │ │ │ -00049070: 2061 2062 6967 6765 7220 7661 6c75 6520 a bigger value │ │ │ -00049080: 6d65 616e 7320 7368 6172 7065 7220 7472 means sharper tr │ │ │ -00049090: 616e 7369 7469 6f6e 2e20 5768 656e 2074 ansition. When t │ │ │ -000490a0: 6865 2076 616c 7565 2069 7320 6e65 6761 he value is nega │ │ │ -000490b0: 7469 7665 2c20 6974 2069 7320 6175 746f tive, it is auto │ │ │ -000490c0: 6d61 7469 6361 6c6c 7920 6361 6c63 756c matically calcul │ │ │ -000490d0: 6174 6564 2e3c 2f64 643e 0a3c 6464 3e3c ated.
    .
    < │ │ │ -000490e0: 636f 6465 3e73 6967 6d61 4176 673c 2f63 code>sigmaAvg - Range blu │ │ │ -00049100: 7220 7061 7261 6d65 7465 7220 666f 7220 r parameter for │ │ │ -00049110: 7465 7874 7572 6520 626c 7572 7269 6e67 texture blurring │ │ │ -00049120: 2e20 4c61 7267 6572 2076 616c 7565 206d . Larger value m │ │ │ -00049130: 616b 6573 2072 6573 756c 7420 746f 2062 akes result to b │ │ │ -00049140: 6520 6d6f 7265 2062 6c75 7272 6564 2e20 e more blurred. │ │ │ -00049150: 5768 656e 2074 6865 0a20 7661 6c75 6520 When the. value │ │ │ -00049160: 6973 206e 6567 6174 6976 652c 2069 7420 is negative, it │ │ │ -00049170: 6973 2061 7574 6f6d 6174 6963 616c 6c79 is automatically │ │ │ -00049180: 2063 616c 6375 6c61 7465 6420 6173 2064 calculated as d │ │ │ -00049190: 6573 6372 6962 6564 2069 6e20 7468 6520 escribed in the │ │ │ -000491a0: 7061 7065 722e 0a0a 2053 4545 3a20 726f paper... SEE: ro │ │ │ -000491b0: 6c6c 696e 6747 7569 6461 6e63 6546 696c llingGuidanceFil │ │ │ -000491c0: 7465 722c 2062 696c 6174 6572 616c 4669 ter, bilateralFi │ │ │ -000491d0: 6c74 6572 3c2f 6464 3e0a 3c2f 646c 3e0a lter
    .
    . │ │ │ -000491e0: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e
    .
  • │ │ │ -000491f0: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .

    bilateral │ │ │ -00049270: 5465 7874 7572 6546 696c 7465 723c 2f68 TextureFilter.
    public │ │ │ -000492c0: 7374 6174 6963 3c2f 7370 616e 3e26 6e62 static&nb │ │ │ -000492d0: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;voi │ │ │ -000492f0: 643c 2f73 7061 6e3e 266e 6273 703b 3c73 d bilater │ │ │ -00049320: 616c 5465 7874 7572 6546 696c 7465 723c alTextureFilter< │ │ │ -00049330: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(Mat sr │ │ │ -000493a0: 632c 0a20 3c61 2068 7265 663d 222e 2e2f c,. │ │ │ -000493e0: 4d61 743c 2f61 3e26 6e62 7370 3b64 7374 Mat dst │ │ │ -000493f0: 2c0a 2069 6e74 266e 6273 703b 6672 2c0a ,. int fr,. │ │ │ -00049400: 2069 6e74 266e 6273 703b 6e75 6d49 7465 int numIte │ │ │ -00049410: 722c 0a20 646f 7562 6c65 266e 6273 703b r,. double  │ │ │ -00049420: 7369 676d 6141 6c70 6861 293c 2f73 7061 sigmaAlpha)
    .
    Appl │ │ │ -00049450: 6965 7320 7468 6520 6269 6c61 7465 7261 ies the bilatera │ │ │ -00049460: 6c20 7465 7874 7572 6520 6669 6c74 6572 l texture filter │ │ │ -00049470: 2074 6f20 616e 2069 6d61 6765 2e20 4974 to an image. It │ │ │ -00049480: 2070 6572 666f 726d 7320 7374 7275 6374 performs struct │ │ │ -00049490: 7572 652d 7072 6573 6572 7669 6e67 2074 ure-preserving t │ │ │ -000494a0: 6578 7475 7265 2066 696c 7465 722e 0a20 exture filter.. │ │ │ -000494b0: 466f 7220 6d6f 7265 2064 6574 6169 6c73 For more details │ │ │ -000494c0: 2061 626f 7574 2074 6869 7320 6669 6c74 about this filt │ │ │ -000494d0: 6572 2073 6565 2043 4954 453a 2043 686f er see CITE: Cho │ │ │ -000494e0: 3230 3134 2e3c 2f64 6976 3e0a 3c64 6c20 2014.
    .
    .< │ │ │ -00049500: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
    sr │ │ │ -00049520: 633c 2f63 6f64 653e 202d 2053 6f75 7263 c - Sourc │ │ │ -00049530: 6520 696d 6167 6520 7768 6f73 6520 6465 e image whose de │ │ │ -00049540: 7074 6820 6973 2038 2d62 6974 2055 494e pth is 8-bit UIN │ │ │ -00049550: 5420 6f72 2033 322d 6269 7420 464c 4f41 T or 32-bit FLOA │ │ │ -00049560: 543c 2f64 643e 0a3c 6464 3e3c 636f 6465 T
    .
    dst - De │ │ │ -00049580: 7374 696e 6174 696f 6e20 696d 6167 6520 stination image │ │ │ -00049590: 6f66 2074 6865 2073 616d 6520 7369 7a65 of the same size │ │ │ -000495a0: 2061 6e64 2074 7970 6520 6173 2073 7263 and type as src │ │ │ -000495b0: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    fr - Rad │ │ │ -000495d0: 6975 7320 6f66 206b 6572 6e65 6c20 746f ius of kernel to │ │ │ -000495e0: 2062 6520 7573 6564 2066 6f72 2066 696c be used for fil │ │ │ -000495f0: 7465 7269 6e67 2e20 4974 2073 686f 756c tering. It shoul │ │ │ -00049600: 6420 6265 2070 6f73 6974 6976 6520 696e d be positive in │ │ │ -00049610: 7465 6765 723c 2f64 643e 0a3c 6464 3e3c teger
    .
    < │ │ │ -00049620: 636f 6465 3e6e 756d 4974 6572 3c2f 636f code>numIter - Number of │ │ │ -00049640: 6974 6572 6174 696f 6e73 206f 6620 616c iterations of al │ │ │ -00049650: 676f 7269 7468 6d2c 2049 7420 7368 6f75 gorithm, It shou │ │ │ -00049660: 6c64 2062 6520 706f 7369 7469 7665 2069 ld be positive i │ │ │ -00049670: 6e74 6567 6572 3c2f 6464 3e0a 3c64 643e nteger
    .
    │ │ │ -00049680: 3c63 6f64 653e 7369 676d 6141 6c70 6861 sigmaAlpha │ │ │ -00049690: 3c2f 636f 6465 3e20 2d20 436f 6e74 726f - Contro │ │ │ -000496a0: 6c73 2074 6865 2073 6861 7270 6e65 7373 ls the sharpness │ │ │ -000496b0: 206f 6620 7468 6520 7765 6967 6874 2074 of the weight t │ │ │ -000496c0: 7261 6e73 6974 696f 6e20 6672 6f6d 2065 ransition from e │ │ │ -000496d0: 6467 6573 2074 6f20 736d 6f6f 7468 2f74 dges to smooth/t │ │ │ -000496e0: 6578 7475 7265 2072 6567 696f 6e73 2c20 exture regions, │ │ │ -000496f0: 7768 6572 650a 2061 2062 6967 6765 7220 where. a bigger │ │ │ -00049700: 7661 6c75 6520 6d65 616e 7320 7368 6172 value means shar │ │ │ -00049710: 7065 7220 7472 616e 7369 7469 6f6e 2e20 per transition. │ │ │ -00049720: 5768 656e 2074 6865 2076 616c 7565 2069 When the value i │ │ │ -00049730: 7320 6e65 6761 7469 7665 2c20 6974 2069 s negative, it i │ │ │ -00049740: 7320 6175 746f 6d61 7469 6361 6c6c 7920 s automatically │ │ │ -00049750: 6361 6c63 756c 6174 6564 2e0a 0a20 7661 calculated... va │ │ │ -00049760: 6c75 6520 6973 206e 6567 6174 6976 652c lue is negative, │ │ │ -00049770: 2069 7420 6973 2061 7574 6f6d 6174 6963 it is automatic │ │ │ -00049780: 616c 6c79 2063 616c 6375 6c61 7465 6420 ally calculated │ │ │ -00049790: 6173 2064 6573 6372 6962 6564 2069 6e20 as described in │ │ │ -000497a0: 7468 6520 7061 7065 722e 0a0a 2053 4545 the paper... SEE │ │ │ -000497b0: 3a20 726f 6c6c 696e 6747 7569 6461 6e63 : rollingGuidanc │ │ │ -000497c0: 6546 696c 7465 722c 2062 696c 6174 6572 eFilter, bilater │ │ │ -000497d0: 616c 4669 6c74 6572 3c2f 6464 3e0a 3c2f alFilter
    ..

    .< │ │ │ -000497f0: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • .. │ │ │ -00049860: 3c68 333e 6269 6c61 7465 7261 6c54 6578

    bilateralTex │ │ │ -00049870: 7475 7265 4669 6c74 6572 3c2f 6833 3e0a tureFilter

    . │ │ │ -00049880: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
    public sta │ │ │ -000498c0: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ -000498d0: 3c73 7061 6e20 636c 6173 733d 2272 6574 void bilateralT │ │ │ -00049920: 6578 7475 7265 4669 6c74 6572 3c2f 7370 extureFilter(Ma │ │ │ -00049990: 743c 2f61 3e26 6e62 7370 3b73 7263 2c0a t src,. │ │ │ -000499a0: 203c 6120 6872 6566 3d22 2e2e 2f63 6f72 Mat │ │ │ -000499e0: 3c2f 613e 266e 6273 703b 6473 742c 0a20  dst,. │ │ │ -000499f0: 696e 7426 6e62 7370 3b66 722c 0a20 696e int fr,. in │ │ │ -00049a00: 7426 6e62 7370 3b6e 756d 4974 6572 293c t numIter)< │ │ │ -00049a10: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ -00049a30: 4170 706c 6965 7320 7468 6520 6269 6c61 Applies the bila │ │ │ -00049a40: 7465 7261 6c20 7465 7874 7572 6520 6669 teral texture fi │ │ │ -00049a50: 6c74 6572 2074 6f20 616e 2069 6d61 6765 lter to an image │ │ │ -00049a60: 2e20 4974 2070 6572 666f 726d 7320 7374 . It performs st │ │ │ -00049a70: 7275 6374 7572 652d 7072 6573 6572 7669 ructure-preservi │ │ │ -00049a80: 6e67 2074 6578 7475 7265 2066 696c 7465 ng texture filte │ │ │ -00049a90: 722e 0a20 466f 7220 6d6f 7265 2064 6574 r.. For more det │ │ │ -00049aa0: 6169 6c73 2061 626f 7574 2074 6869 7320 ails about this │ │ │ -00049ab0: 6669 6c74 6572 2073 6565 2043 4954 453a filter see CITE: │ │ │ -00049ac0: 2043 686f 3230 3134 2e3c 2f64 6976 3e0a Cho2014.. │ │ │ -00049ad0: 3c64 6c20 636c 6173 733d 226e 6f74 6573
    .
    Parameter │ │ │ -00049af0: 733a 3c2f 6474 3e0a 3c64 643e 3c63 6f64 s:
    .
    src - S │ │ │ -00049b10: 6f75 7263 6520 696d 6167 6520 7768 6f73 ource image whos │ │ │ -00049b20: 6520 6465 7074 6820 6973 2038 2d62 6974 e depth is 8-bit │ │ │ -00049b30: 2055 494e 5420 6f72 2033 322d 6269 7420 UINT or 32-bit │ │ │ -00049b40: 464c 4f41 543c 2f64 643e 0a3c 6464 3e3c FLOAT
    .
    < │ │ │ -00049b50: 636f 6465 3e64 7374 3c2f 636f 6465 3e20 code>dst │ │ │ -00049b60: 2d20 4465 7374 696e 6174 696f 6e20 696d - Destination im │ │ │ -00049b70: 6167 6520 6f66 2074 6865 2073 616d 6520 age of the same │ │ │ -00049b80: 7369 7a65 2061 6e64 2074 7970 6520 6173 size and type as │ │ │ -00049b90: 2073 7263 2e3c 2f64 643e 0a3c 6464 3e3c src.
    .
    < │ │ │ -00049ba0: 636f 6465 3e66 723c 2f63 6f64 653e 202d code>fr - │ │ │ -00049bb0: 2052 6164 6975 7320 6f66 206b 6572 6e65 Radius of kerne │ │ │ -00049bc0: 6c20 746f 2062 6520 7573 6564 2066 6f72 l to be used for │ │ │ -00049bd0: 2066 696c 7465 7269 6e67 2e20 4974 2073 filtering. It s │ │ │ -00049be0: 686f 756c 6420 6265 2070 6f73 6974 6976 hould be positiv │ │ │ -00049bf0: 6520 696e 7465 6765 723c 2f64 643e 0a3c e integer
    .< │ │ │ -00049c00: 6464 3e3c 636f 6465 3e6e 756d 4974 6572 dd>numIter │ │ │ -00049c10: 3c2f 636f 6465 3e20 2d20 4e75 6d62 6572 - Number │ │ │ -00049c20: 206f 6620 6974 6572 6174 696f 6e73 206f of iterations o │ │ │ -00049c30: 6620 616c 676f 7269 7468 6d2c 2049 7420 f algorithm, It │ │ │ -00049c40: 7368 6f75 6c64 2062 6520 706f 7369 7469 should be positi │ │ │ -00049c50: 7665 2069 6e74 6567 6572 0a0a 2061 2062 ve integer.. a b │ │ │ -00049c60: 6967 6765 7220 7661 6c75 6520 6d65 616e igger value mean │ │ │ -00049c70: 7320 7368 6172 7065 7220 7472 616e 7369 s sharper transi │ │ │ -00049c80: 7469 6f6e 2e20 5768 656e 2074 6865 2076 tion. When the v │ │ │ -00049c90: 616c 7565 2069 7320 6e65 6761 7469 7665 alue is negative │ │ │ -00049ca0: 2c20 6974 2069 7320 6175 746f 6d61 7469 , it is automati │ │ │ -00049cb0: 6361 6c6c 7920 6361 6c63 756c 6174 6564 cally calculated │ │ │ -00049cc0: 2e0a 0a20 7661 6c75 6520 6973 206e 6567 ... value is neg │ │ │ -00049cd0: 6174 6976 652c 2069 7420 6973 2061 7574 ative, it is aut │ │ │ -00049ce0: 6f6d 6174 6963 616c 6c79 2063 616c 6375 omatically calcu │ │ │ -00049cf0: 6c61 7465 6420 6173 2064 6573 6372 6962 lated as describ │ │ │ -00049d00: 6564 2069 6e20 7468 6520 7061 7065 722e ed in the paper. │ │ │ -00049d10: 0a0a 2053 4545 3a20 726f 6c6c 696e 6747 .. SEE: rollingG │ │ │ -00049d20: 7569 6461 6e63 6546 696c 7465 722c 2062 uidanceFilter, b │ │ │ -00049d30: 696c 6174 6572 616c 4669 6c74 6572 3c2f ilateralFilter.
    ..
  • .
  • . │ │ │ -00049d60: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    bilateralT │ │ │ -00049dd0: 6578 7475 7265 4669 6c74 6572 3c2f 6833 extureFilter

    .
    │ │ │ -00049e00: 3c73 7061 6e20 636c 6173 733d 226d 6f64 public s │ │ │ -00049e20: 7461 7469 633c 2f73 7061 6e3e 266e 6273 tatic&nbs │ │ │ -00049e30: 703b 3c73 7061 6e20 636c 6173 733d 2272 p;void │ │ │ -00049e50: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  bilatera │ │ │ -00049e80: 6c54 6578 7475 7265 4669 6c74 6572 3c2f lTextureFilter( │ │ │ -00049ef0: 4d61 743c 2f61 3e26 6e62 7370 3b73 7263 Mat src │ │ │ -00049f00: 2c0a 203c 6120 6872 6566 3d22 2e2e 2f63 ,. M │ │ │ -00049f40: 6174 3c2f 613e 266e 6273 703b 6473 742c at dst, │ │ │ -00049f50: 0a20 696e 7426 6e62 7370 3b66 7229 3c2f . int fr)
    .
    A │ │ │ -00049f80: 7070 6c69 6573 2074 6865 2062 696c 6174 pplies the bilat │ │ │ -00049f90: 6572 616c 2074 6578 7475 7265 2066 696c eral texture fil │ │ │ -00049fa0: 7465 7220 746f 2061 6e20 696d 6167 652e ter to an image. │ │ │ -00049fb0: 2049 7420 7065 7266 6f72 6d73 2073 7472 It performs str │ │ │ -00049fc0: 7563 7475 7265 2d70 7265 7365 7276 696e ucture-preservin │ │ │ -00049fd0: 6720 7465 7874 7572 6520 6669 6c74 6572 g texture filter │ │ │ -00049fe0: 2e0a 2046 6f72 206d 6f72 6520 6465 7461 .. For more deta │ │ │ -00049ff0: 696c 7320 6162 6f75 7420 7468 6973 2066 ils about this f │ │ │ -0004a000: 696c 7465 7220 7365 6520 4349 5445 3a20 ilter see CITE: │ │ │ -0004a010: 4368 6f32 3031 342e 3c2f 6469 763e 0a3c Cho2014.
    .< │ │ │ -0004a020: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ -0004a030: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
    Parameters │ │ │ -0004a040: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
    .
    src - So │ │ │ -0004a060: 7572 6365 2069 6d61 6765 2077 686f 7365 urce image whose │ │ │ -0004a070: 2064 6570 7468 2069 7320 382d 6269 7420 depth is 8-bit │ │ │ -0004a080: 5549 4e54 206f 7220 3332 2d62 6974 2046 UINT or 32-bit F │ │ │ -0004a090: 4c4f 4154 3c2f 6464 3e0a 3c64 643e 3c63 LOAT
    .
    dst - │ │ │ -0004a0b0: 2044 6573 7469 6e61 7469 6f6e 2069 6d61 Destination ima │ │ │ -0004a0c0: 6765 206f 6620 7468 6520 7361 6d65 2073 ge of the same s │ │ │ -0004a0d0: 697a 6520 616e 6420 7479 7065 2061 7320 ize and type as │ │ │ -0004a0e0: 7372 632e 3c2f 6464 3e0a 3c64 643e 3c63 src.
    .
    fr - │ │ │ -0004a100: 5261 6469 7573 206f 6620 6b65 726e 656c Radius of kernel │ │ │ -0004a110: 2074 6f20 6265 2075 7365 6420 666f 7220 to be used for │ │ │ -0004a120: 6669 6c74 6572 696e 672e 2049 7420 7368 filtering. It sh │ │ │ -0004a130: 6f75 6c64 2062 6520 706f 7369 7469 7665 ould be positive │ │ │ -0004a140: 2069 6e74 6567 6572 0a0a 0a20 6120 6269 integer... a bi │ │ │ -0004a150: 6767 6572 2076 616c 7565 206d 6561 6e73 gger value means │ │ │ -0004a160: 2073 6861 7270 6572 2074 7261 6e73 6974 sharper transit │ │ │ -0004a170: 696f 6e2e 2057 6865 6e20 7468 6520 7661 ion. When the va │ │ │ -0004a180: 6c75 6520 6973 206e 6567 6174 6976 652c lue is negative, │ │ │ -0004a190: 2069 7420 6973 2061 7574 6f6d 6174 6963 it is automatic │ │ │ -0004a1a0: 616c 6c79 2063 616c 6375 6c61 7465 642e ally calculated. │ │ │ -0004a1b0: 0a0a 2076 616c 7565 2069 7320 6e65 6761 .. value is nega │ │ │ -0004a1c0: 7469 7665 2c20 6974 2069 7320 6175 746f tive, it is auto │ │ │ -0004a1d0: 6d61 7469 6361 6c6c 7920 6361 6c63 756c matically calcul │ │ │ -0004a1e0: 6174 6564 2061 7320 6465 7363 7269 6265 ated as describe │ │ │ -0004a1f0: 6420 696e 2074 6865 2070 6170 6572 2e0a d in the paper.. │ │ │ -0004a200: 0a20 5345 453a 2072 6f6c 6c69 6e67 4775 . SEE: rollingGu │ │ │ -0004a210: 6964 616e 6365 4669 6c74 6572 2c20 6269 idanceFilter, bi │ │ │ -0004a220: 6c61 7465 7261 6c46 696c 7465 723c 2f64 lateralFilter...
  • .
  • .< │ │ │ -0004a250: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ -0004a260: 6574 6169 6c22 2069 643d 2262 696c 6174 etail" id="bilat │ │ │ -0004a270: 6572 616c 5465 7874 7572 6546 696c 7465 eralTextureFilte │ │ │ -0004a280: 7228 6f72 672e 6f70 656e 6376 2e63 6f72 r(org.opencv.cor │ │ │ -0004a290: 652e 4d61 742c 6f72 672e 6f70 656e 6376 e.Mat,org.opencv │ │ │ -0004a2a0: 2e63 6f72 652e 4d61 7429 223e 0a3c 6833 .core.Mat)">.

    bilateralTextur │ │ │ -0004a2c0: 6546 696c 7465 723c 2f68 333e 0a3c 6469 eFilter

    .public static │ │ │ -0004a310: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  void bilateralText │ │ │ -0004a370: 7572 6546 696c 7465 723c 2f73 7061 6e3e ureFilter │ │ │ -0004a380: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ -0004a3a0: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -0004a3b0: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -0004a3c0: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -0004a3d0: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat src,. Mat dst).
    Appl │ │ │ -0004a460: 6965 7320 7468 6520 6269 6c61 7465 7261 ies the bilatera │ │ │ -0004a470: 6c20 7465 7874 7572 6520 6669 6c74 6572 l texture filter │ │ │ -0004a480: 2074 6f20 616e 2069 6d61 6765 2e20 4974 to an image. It │ │ │ -0004a490: 2070 6572 666f 726d 7320 7374 7275 6374 performs struct │ │ │ -0004a4a0: 7572 652d 7072 6573 6572 7669 6e67 2074 ure-preserving t │ │ │ -0004a4b0: 6578 7475 7265 2066 696c 7465 722e 0a20 exture filter.. │ │ │ -0004a4c0: 466f 7220 6d6f 7265 2064 6574 6169 6c73 For more details │ │ │ -0004a4d0: 2061 626f 7574 2074 6869 7320 6669 6c74 about this filt │ │ │ -0004a4e0: 6572 2073 6565 2043 4954 453a 2043 686f er see CITE: Cho │ │ │ -0004a4f0: 3230 3134 2e3c 2f64 6976 3e0a 3c64 6c20 2014.
    .
    .< │ │ │ -0004a510: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
    sr │ │ │ -0004a530: 633c 2f63 6f64 653e 202d 2053 6f75 7263 c - Sourc │ │ │ -0004a540: 6520 696d 6167 6520 7768 6f73 6520 6465 e image whose de │ │ │ -0004a550: 7074 6820 6973 2038 2d62 6974 2055 494e pth is 8-bit UIN │ │ │ -0004a560: 5420 6f72 2033 322d 6269 7420 464c 4f41 T or 32-bit FLOA │ │ │ -0004a570: 543c 2f64 643e 0a3c 6464 3e3c 636f 6465 T
    .
    dst - De │ │ │ -0004a590: 7374 696e 6174 696f 6e20 696d 6167 6520 stination image │ │ │ -0004a5a0: 6f66 2074 6865 2073 616d 6520 7369 7a65 of the same size │ │ │ -0004a5b0: 2061 6e64 2074 7970 6520 6173 2073 7263 and type as src │ │ │ -0004a5c0: 2e0a 0a0a 0a20 6120 6269 6767 6572 2076 ..... a bigger v │ │ │ -0004a5d0: 616c 7565 206d 6561 6e73 2073 6861 7270 alue means sharp │ │ │ -0004a5e0: 6572 2074 7261 6e73 6974 696f 6e2e 2057 er transition. W │ │ │ -0004a5f0: 6865 6e20 7468 6520 7661 6c75 6520 6973 hen the value is │ │ │ -0004a600: 206e 6567 6174 6976 652c 2069 7420 6973 negative, it is │ │ │ -0004a610: 2061 7574 6f6d 6174 6963 616c 6c79 2063 automatically c │ │ │ -0004a620: 616c 6375 6c61 7465 642e 0a0a 2076 616c alculated... val │ │ │ -0004a630: 7565 2069 7320 6e65 6761 7469 7665 2c20 ue is negative, │ │ │ -0004a640: 6974 2069 7320 6175 746f 6d61 7469 6361 it is automatica │ │ │ -0004a650: 6c6c 7920 6361 6c63 756c 6174 6564 2061 lly calculated a │ │ │ -0004a660: 7320 6465 7363 7269 6265 6420 696e 2074 s described in t │ │ │ -0004a670: 6865 2070 6170 6572 2e0a 0a20 5345 453a he paper... SEE: │ │ │ -0004a680: 2072 6f6c 6c69 6e67 4775 6964 616e 6365 rollingGuidance │ │ │ -0004a690: 4669 6c74 6572 2c20 6269 6c61 7465 7261 Filter, bilatera │ │ │ -0004a6a0: 6c46 696c 7465 723c 2f64 643e 0a3c 2f64 lFilter
    ..
  • ..
  • .. │ │ │ -0004a740: 3c68 333e 726f 6c6c 696e 6747 7569 6461

    rollingGuida │ │ │ -0004a750: 6e63 6546 696c 7465 723c 2f68 333e 0a3c nceFilter

    .< │ │ │ -0004a760: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ -0004a770: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ -0004a7a0: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ -0004a7b0: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ -0004a7c0: 726e 2d74 7970 6522 3e76 6f69 643c 2f73 rn-type">void
     rollingGuid │ │ │ -0004a800: 616e 6365 4669 6c74 6572 3c2f 7370 616e anceFilter( │ │ │ -0004a830: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ -0004a870: 2f61 3e26 6e62 7370 3b73 7263 2c0a 203c /a> src,. < │ │ │ -0004a880: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -0004a890: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -0004a8a0: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -0004a8b0: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat dst,. in │ │ │ -0004a8d0: 7426 6e62 7370 3b64 2c0a 2064 6f75 626c t d,. doubl │ │ │ -0004a8e0: 6526 6e62 7370 3b73 6967 6d61 436f 6c6f e sigmaColo │ │ │ -0004a8f0: 722c 0a20 646f 7562 6c65 266e 6273 703b r,. double  │ │ │ -0004a900: 7369 676d 6153 7061 6365 2c0a 2069 6e74 sigmaSpace,. int │ │ │ -0004a910: 266e 6273 703b 6e75 6d4f 6649 7465 722c  numOfIter, │ │ │ -0004a920: 0a20 696e 7426 6e62 7370 3b62 6f72 6465 . int borde │ │ │ -0004a930: 7254 7970 6529 3c2f 7370 616e 3e3c 2f64 rType).
    Applies t │ │ │ -0004a960: 6865 2072 6f6c 6c69 6e67 2067 7569 6461 he rolling guida │ │ │ -0004a970: 6e63 6520 6669 6c74 6572 2074 6f20 616e nce filter to an │ │ │ -0004a980: 2069 6d61 6765 2e0a 0a20 466f 7220 6d6f image... For mo │ │ │ -0004a990: 7265 2064 6574 6169 6c73 2c20 706c 6561 re details, plea │ │ │ -0004a9a0: 7365 2073 6565 2043 4954 453a 207a 6861 se see CITE: zha │ │ │ -0004a9b0: 6e67 3230 3134 726f 6c6c 696e 673c 2f64 ng2014rolling.
    .
    Param │ │ │ -0004a9e0: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ -0004a9f0: 3c63 6f64 653e 7372 633c 2f63 6f64 653e src │ │ │ -0004aa00: 202d 2053 6f75 7263 6520 382d 6269 7420 - Source 8-bit │ │ │ -0004aa10: 6f72 2066 6c6f 6174 696e 672d 706f 696e or floating-poin │ │ │ -0004aa20: 742c 2031 2d63 6861 6e6e 656c 206f 7220 t, 1-channel or │ │ │ -0004aa30: 332d 6368 616e 6e65 6c20 696d 6167 652e 3-channel image. │ │ │ -0004aa40: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -0004aa50: 6473 743c 2f63 6f64 653e 202d 2044 6573 dst - Des │ │ │ -0004aa60: 7469 6e61 7469 6f6e 2069 6d61 6765 206f tination image o │ │ │ -0004aa70: 6620 7468 6520 7361 6d65 2073 697a 6520 f the same size │ │ │ -0004aa80: 616e 6420 7479 7065 2061 7320 7372 632e and type as src. │ │ │ -0004aa90: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -0004aaa0: 643c 2f63 6f64 653e 202d 2044 6961 6d65 d - Diame │ │ │ -0004aab0: 7465 7220 6f66 2065 6163 6820 7069 7865 ter of each pixe │ │ │ -0004aac0: 6c20 6e65 6967 6862 6f72 686f 6f64 2074 l neighborhood t │ │ │ -0004aad0: 6861 7420 6973 2075 7365 6420 6475 7269 hat is used duri │ │ │ -0004aae0: 6e67 2066 696c 7465 7269 6e67 2e20 4966 ng filtering. If │ │ │ -0004aaf0: 2069 7420 6973 206e 6f6e 2d70 6f73 6974 it is non-posit │ │ │ -0004ab00: 6976 652c 0a20 6974 2069 7320 636f 6d70 ive,. it is comp │ │ │ -0004ab10: 7574 6564 2066 726f 6d20 7369 676d 6153 uted from sigmaS │ │ │ -0004ab20: 7061 6365 202e 3c2f 6464 3e0a 3c64 643e pace .
    .
    │ │ │ -0004ab30: 3c63 6f64 653e 7369 676d 6143 6f6c 6f72 sigmaColor │ │ │ -0004ab40: 3c2f 636f 6465 3e20 2d20 4669 6c74 6572 - Filter │ │ │ -0004ab50: 2073 6967 6d61 2069 6e20 7468 6520 636f sigma in the co │ │ │ -0004ab60: 6c6f 7220 7370 6163 652e 2041 206c 6172 lor space. A lar │ │ │ -0004ab70: 6765 7220 7661 6c75 6520 6f66 2074 6865 ger value of the │ │ │ -0004ab80: 2070 6172 616d 6574 6572 206d 6561 6e73 parameter means │ │ │ -0004ab90: 2074 6861 740a 2066 6172 7468 6572 2063 that. farther c │ │ │ -0004aba0: 6f6c 6f72 7320 7769 7468 696e 2074 6865 olors within the │ │ │ -0004abb0: 2070 6978 656c 206e 6569 6768 626f 7268 pixel neighborh │ │ │ -0004abc0: 6f6f 6420 2873 6565 2073 6967 6d61 5370 ood (see sigmaSp │ │ │ -0004abd0: 6163 6520 2920 7769 6c6c 2062 6520 6d69 ace ) will be mi │ │ │ -0004abe0: 7865 6420 746f 6765 7468 6572 2c20 7265 xed together, re │ │ │ -0004abf0: 7375 6c74 696e 6720 696e 0a20 6c61 7267 sulting in. larg │ │ │ -0004ac00: 6572 2061 7265 6173 206f 6620 7365 6d69 er areas of semi │ │ │ -0004ac10: 2d65 7175 616c 2063 6f6c 6f72 2e3c 2f64 -equal color..
    sig │ │ │ -0004ac30: 6d61 5370 6163 653c 2f63 6f64 653e 202d maSpace - │ │ │ -0004ac40: 2046 696c 7465 7220 7369 676d 6120 696e Filter sigma in │ │ │ -0004ac50: 2074 6865 2063 6f6f 7264 696e 6174 6520 the coordinate │ │ │ -0004ac60: 7370 6163 652e 2041 206c 6172 6765 7220 space. A larger │ │ │ -0004ac70: 7661 6c75 6520 6f66 2074 6865 2070 6172 value of the par │ │ │ -0004ac80: 616d 6574 6572 206d 6561 6e73 2074 6861 ameter means tha │ │ │ -0004ac90: 740a 2066 6172 7468 6572 2070 6978 656c t. farther pixel │ │ │ -0004aca0: 7320 7769 6c6c 2069 6e66 6c75 656e 6365 s will influence │ │ │ -0004acb0: 2065 6163 6820 6f74 6865 7220 6173 206c each other as l │ │ │ -0004acc0: 6f6e 6720 6173 2074 6865 6972 2063 6f6c ong as their col │ │ │ -0004acd0: 6f72 7320 6172 6520 636c 6f73 6520 656e ors are close en │ │ │ -0004ace0: 6f75 6768 2028 7365 6520 7369 676d 6143 ough (see sigmaC │ │ │ -0004acf0: 6f6c 6f72 2029 2e0a 2057 6865 6e20 6426 olor ).. When d& │ │ │ -0004ad00: 6774 3b30 202c 2069 7420 7370 6563 6966 gt;0 , it specif │ │ │ -0004ad10: 6965 7320 7468 6520 6e65 6967 6862 6f72 ies the neighbor │ │ │ -0004ad20: 686f 6f64 2073 697a 6520 7265 6761 7264 hood size regard │ │ │ -0004ad30: 6c65 7373 206f 6620 7369 676d 6153 7061 less of sigmaSpa │ │ │ -0004ad40: 6365 202e 204f 7468 6572 7769 7365 2c20 ce . Otherwise, │ │ │ -0004ad50: 6420 6973 0a20 7072 6f70 6f72 7469 6f6e d is. proportion │ │ │ -0004ad60: 616c 2074 6f20 7369 676d 6153 7061 6365 al to sigmaSpace │ │ │ -0004ad70: 202e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 .
    .
    numOfIter - Number of i │ │ │ -0004ada0: 7465 7261 7469 6f6e 7320 6f66 206a 6f69 terations of joi │ │ │ -0004adb0: 6e74 2065 6467 652d 7072 6573 6572 7669 nt edge-preservi │ │ │ -0004adc0: 6e67 2066 696c 7465 7269 6e67 2061 7070 ng filtering app │ │ │ -0004add0: 6c69 6564 206f 6e20 7468 6520 736f 7572 lied on the sour │ │ │ -0004ade0: 6365 2069 6d61 6765 2e3c 2f64 643e 0a3c ce image.
    .< │ │ │ -0004adf0: 6464 3e3c 636f 6465 3e62 6f72 6465 7254 dd>borderT │ │ │ -0004ae00: 7970 653c 2f63 6f64 653e 202d 203c 623e ype - │ │ │ -0004ae10: 4e6f 7465 3a3c 2f62 3e20 2072 6f6c 6c69 Note: rolli │ │ │ -0004ae20: 6e67 4775 6964 616e 6365 4669 6c74 6572 ngGuidanceFilter │ │ │ -0004ae30: 2075 7365 7320 6a6f 696e 7442 696c 6174 uses jointBilat │ │ │ -0004ae40: 6572 616c 4669 6c74 6572 2061 7320 7468 eralFilter as th │ │ │ -0004ae50: 6520 6564 6765 2d70 7265 7365 7276 696e e edge-preservin │ │ │ -0004ae60: 6720 6669 6c74 6572 2e0a 0a20 5345 453a g filter... SEE: │ │ │ -0004ae70: 206a 6f69 6e74 4269 6c61 7465 7261 6c46 jointBilateralF │ │ │ -0004ae80: 696c 7465 722c 2062 696c 6174 6572 616c ilter, bilateral │ │ │ -0004ae90: 4669 6c74 6572 2c20 616d 4669 6c74 6572 Filter, amFilter │ │ │ -0004aea0: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365 .
    ..
  • .
  • .
    .

    rolling │ │ │ -0004af40: 4775 6964 616e 6365 4669 6c74 6572 3c2f GuidanceFilter.
    public │ │ │ -0004af90: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ -0004afa0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;vo │ │ │ -0004afc0: 6964 3c2f 7370 616e 3e26 6e62 7370 3b3c id < │ │ │ -0004afd0: 7370 616e 2063 6c61 7373 3d22 656c 656d span class="elem │ │ │ -0004afe0: 656e 742d 6e61 6d65 223e 726f 6c6c 696e ent-name">rollin │ │ │ -0004aff0: 6747 7569 6461 6e63 6546 696c 7465 723c gGuidanceFilter< │ │ │ -0004b000: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(Mat sr │ │ │ -0004b070: 632c 0a20 3c61 2068 7265 663d 222e 2e2f c,. │ │ │ -0004b0b0: 4d61 743c 2f61 3e26 6e62 7370 3b64 7374 Mat dst │ │ │ -0004b0c0: 2c0a 2069 6e74 266e 6273 703b 642c 0a20 ,. int d,. │ │ │ -0004b0d0: 646f 7562 6c65 266e 6273 703b 7369 676d double sigm │ │ │ -0004b0e0: 6143 6f6c 6f72 2c0a 2064 6f75 626c 6526 aColor,. double& │ │ │ -0004b0f0: 6e62 7370 3b73 6967 6d61 5370 6163 652c nbsp;sigmaSpace, │ │ │ -0004b100: 0a20 696e 7426 6e62 7370 3b6e 756d 4f66 . int numOf │ │ │ -0004b110: 4974 6572 293c 2f73 7061 6e3e 3c2f 6469 Iter).
    Applies th │ │ │ -0004b140: 6520 726f 6c6c 696e 6720 6775 6964 616e e rolling guidan │ │ │ -0004b150: 6365 2066 696c 7465 7220 746f 2061 6e20 ce filter to an │ │ │ -0004b160: 696d 6167 652e 0a0a 2046 6f72 206d 6f72 image... For mor │ │ │ -0004b170: 6520 6465 7461 696c 732c 2070 6c65 6173 e details, pleas │ │ │ -0004b180: 6520 7365 6520 4349 5445 3a20 7a68 616e e see CITE: zhan │ │ │ -0004b190: 6732 3031 3472 6f6c 6c69 6e67 3c2f 6469 g2014rolling.
    .
    Parame │ │ │ -0004b1c0: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
    .
    < │ │ │ -0004b1d0: 636f 6465 3e73 7263 3c2f 636f 6465 3e20 code>src │ │ │ -0004b1e0: 2d20 536f 7572 6365 2038 2d62 6974 206f - Source 8-bit o │ │ │ -0004b1f0: 7220 666c 6f61 7469 6e67 2d70 6f69 6e74 r floating-point │ │ │ -0004b200: 2c20 312d 6368 616e 6e65 6c20 6f72 2033 , 1-channel or 3 │ │ │ -0004b210: 2d63 6861 6e6e 656c 2069 6d61 6765 2e3c -channel image.< │ │ │ -0004b220: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e64 /dd>.
    d │ │ │ -0004b230: 7374 3c2f 636f 6465 3e20 2d20 4465 7374 st - Dest │ │ │ -0004b240: 696e 6174 696f 6e20 696d 6167 6520 6f66 ination image of │ │ │ -0004b250: 2074 6865 2073 616d 6520 7369 7a65 2061 the same size a │ │ │ -0004b260: 6e64 2074 7970 6520 6173 2073 7263 2e3c nd type as src.< │ │ │ -0004b270: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e64 /dd>.
    d │ │ │ -0004b280: 3c2f 636f 6465 3e20 2d20 4469 616d 6574 - Diamet │ │ │ -0004b290: 6572 206f 6620 6561 6368 2070 6978 656c er of each pixel │ │ │ -0004b2a0: 206e 6569 6768 626f 7268 6f6f 6420 7468 neighborhood th │ │ │ -0004b2b0: 6174 2069 7320 7573 6564 2064 7572 696e at is used durin │ │ │ -0004b2c0: 6720 6669 6c74 6572 696e 672e 2049 6620 g filtering. If │ │ │ -0004b2d0: 6974 2069 7320 6e6f 6e2d 706f 7369 7469 it is non-positi │ │ │ -0004b2e0: 7665 2c0a 2069 7420 6973 2063 6f6d 7075 ve,. it is compu │ │ │ -0004b2f0: 7465 6420 6672 6f6d 2073 6967 6d61 5370 ted from sigmaSp │ │ │ -0004b300: 6163 6520 2e3c 2f64 643e 0a3c 6464 3e3c ace .
    .
    < │ │ │ -0004b310: 636f 6465 3e73 6967 6d61 436f 6c6f 723c code>sigmaColor< │ │ │ -0004b320: 2f63 6f64 653e 202d 2046 696c 7465 7220 /code> - Filter │ │ │ -0004b330: 7369 676d 6120 696e 2074 6865 2063 6f6c sigma in the col │ │ │ -0004b340: 6f72 2073 7061 6365 2e20 4120 6c61 7267 or space. A larg │ │ │ -0004b350: 6572 2076 616c 7565 206f 6620 7468 6520 er value of the │ │ │ -0004b360: 7061 7261 6d65 7465 7220 6d65 616e 7320 parameter means │ │ │ -0004b370: 7468 6174 0a20 6661 7274 6865 7220 636f that. farther co │ │ │ -0004b380: 6c6f 7273 2077 6974 6869 6e20 7468 6520 lors within the │ │ │ -0004b390: 7069 7865 6c20 6e65 6967 6862 6f72 686f pixel neighborho │ │ │ -0004b3a0: 6f64 2028 7365 6520 7369 676d 6153 7061 od (see sigmaSpa │ │ │ -0004b3b0: 6365 2029 2077 696c 6c20 6265 206d 6978 ce ) will be mix │ │ │ -0004b3c0: 6564 2074 6f67 6574 6865 722c 2072 6573 ed together, res │ │ │ -0004b3d0: 756c 7469 6e67 2069 6e0a 206c 6172 6765 ulting in. large │ │ │ -0004b3e0: 7220 6172 6561 7320 6f66 2073 656d 692d r areas of semi- │ │ │ -0004b3f0: 6571 7561 6c20 636f 6c6f 722e 3c2f 6464 equal color.
    .
    sigm │ │ │ -0004b410: 6153 7061 6365 3c2f 636f 6465 3e20 2d20 aSpace - │ │ │ -0004b420: 4669 6c74 6572 2073 6967 6d61 2069 6e20 Filter sigma in │ │ │ -0004b430: 7468 6520 636f 6f72 6469 6e61 7465 2073 the coordinate s │ │ │ -0004b440: 7061 6365 2e20 4120 6c61 7267 6572 2076 pace. A larger v │ │ │ -0004b450: 616c 7565 206f 6620 7468 6520 7061 7261 alue of the para │ │ │ -0004b460: 6d65 7465 7220 6d65 616e 7320 7468 6174 meter means that │ │ │ -0004b470: 0a20 6661 7274 6865 7220 7069 7865 6c73 . farther pixels │ │ │ -0004b480: 2077 696c 6c20 696e 666c 7565 6e63 6520 will influence │ │ │ -0004b490: 6561 6368 206f 7468 6572 2061 7320 6c6f each other as lo │ │ │ -0004b4a0: 6e67 2061 7320 7468 6569 7220 636f 6c6f ng as their colo │ │ │ -0004b4b0: 7273 2061 7265 2063 6c6f 7365 2065 6e6f rs are close eno │ │ │ -0004b4c0: 7567 6820 2873 6565 2073 6967 6d61 436f ugh (see sigmaCo │ │ │ -0004b4d0: 6c6f 7220 292e 0a20 5768 656e 2064 2667 lor ).. When d&g │ │ │ -0004b4e0: 743b 3020 2c20 6974 2073 7065 6369 6669 t;0 , it specifi │ │ │ -0004b4f0: 6573 2074 6865 206e 6569 6768 626f 7268 es the neighborh │ │ │ -0004b500: 6f6f 6420 7369 7a65 2072 6567 6172 646c ood size regardl │ │ │ -0004b510: 6573 7320 6f66 2073 6967 6d61 5370 6163 ess of sigmaSpac │ │ │ -0004b520: 6520 2e20 4f74 6865 7277 6973 652c 2064 e . Otherwise, d │ │ │ -0004b530: 2069 730a 2070 726f 706f 7274 696f 6e61 is. proportiona │ │ │ -0004b540: 6c20 746f 2073 6967 6d61 5370 6163 6520 l to sigmaSpace │ │ │ -0004b550: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    numOfIter - Number of it │ │ │ -0004b580: 6572 6174 696f 6e73 206f 6620 6a6f 696e erations of join │ │ │ -0004b590: 7420 6564 6765 2d70 7265 7365 7276 696e t edge-preservin │ │ │ -0004b5a0: 6720 6669 6c74 6572 696e 6720 6170 706c g filtering appl │ │ │ -0004b5b0: 6965 6420 6f6e 2074 6865 2073 6f75 7263 ied on the sourc │ │ │ -0004b5c0: 6520 696d 6167 652e 0a0a 0a20 3c62 3e4e e image.... N │ │ │ -0004b5d0: 6f74 653a 3c2f 623e 2020 726f 6c6c 696e ote: rollin │ │ │ -0004b5e0: 6747 7569 6461 6e63 6546 696c 7465 7220 gGuidanceFilter │ │ │ -0004b5f0: 7573 6573 206a 6f69 6e74 4269 6c61 7465 uses jointBilate │ │ │ -0004b600: 7261 6c46 696c 7465 7220 6173 2074 6865 ralFilter as the │ │ │ -0004b610: 2065 6467 652d 7072 6573 6572 7669 6e67 edge-preserving │ │ │ -0004b620: 2066 696c 7465 722e 0a0a 2053 4545 3a20 filter... SEE: │ │ │ -0004b630: 6a6f 696e 7442 696c 6174 6572 616c 4669 jointBilateralFi │ │ │ -0004b640: 6c74 6572 2c20 6269 6c61 7465 7261 6c46 lter, bilateralF │ │ │ -0004b650: 696c 7465 722c 2061 6d46 696c 7465 723c ilter, amFilter< │ │ │ -0004b660: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.
    ..

  • .
  • │ │ │ -0004b680: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    . │ │ │ -0004b6f0: 3c68 333e 726f 6c6c 696e 6747 7569 6461

    rollingGuida │ │ │ -0004b700: 6e63 6546 696c 7465 723c 2f68 333e 0a3c nceFilter

    .< │ │ │ -0004b710: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ -0004b720: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ -0004b750: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ -0004b760: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ -0004b770: 726e 2d74 7970 6522 3e76 6f69 643c 2f73 rn-type">void
     rollingGuid │ │ │ -0004b7b0: 616e 6365 4669 6c74 6572 3c2f 7370 616e anceFilter( │ │ │ -0004b7e0: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ -0004b820: 2f61 3e26 6e62 7370 3b73 7263 2c0a 203c /a> src,. < │ │ │ -0004b830: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -0004b840: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -0004b850: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -0004b860: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat dst,. in │ │ │ -0004b880: 7426 6e62 7370 3b64 2c0a 2064 6f75 626c t d,. doubl │ │ │ -0004b890: 6526 6e62 7370 3b73 6967 6d61 436f 6c6f e sigmaColo │ │ │ -0004b8a0: 722c 0a20 646f 7562 6c65 266e 6273 703b r,. double  │ │ │ -0004b8b0: 7369 676d 6153 7061 6365 293c 2f73 7061 sigmaSpace).
    Appl │ │ │ -0004b8e0: 6965 7320 7468 6520 726f 6c6c 696e 6720 ies the rolling │ │ │ -0004b8f0: 6775 6964 616e 6365 2066 696c 7465 7220 guidance filter │ │ │ -0004b900: 746f 2061 6e20 696d 6167 652e 0a0a 2046 to an image... F │ │ │ -0004b910: 6f72 206d 6f72 6520 6465 7461 696c 732c or more details, │ │ │ -0004b920: 2070 6c65 6173 6520 7365 6520 4349 5445 please see CITE │ │ │ -0004b930: 3a20 7a68 616e 6732 3031 3472 6f6c 6c69 : zhang2014rolli │ │ │ -0004b940: 6e67 3c2f 6469 763e 0a3c 646c 2063 6c61 ng
    .
    .
    │ │ │ -0004b960: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
    │ │ │ -0004b970: 0a3c 6464 3e3c 636f 6465 3e73 7263 3c2f .
    src - Source 8 │ │ │ -0004b990: 2d62 6974 206f 7220 666c 6f61 7469 6e67 -bit or floating │ │ │ -0004b9a0: 2d70 6f69 6e74 2c20 312d 6368 616e 6e65 -point, 1-channe │ │ │ -0004b9b0: 6c20 6f72 2033 2d63 6861 6e6e 656c 2069 l or 3-channel i │ │ │ -0004b9c0: 6d61 6765 2e3c 2f64 643e 0a3c 6464 3e3c mage.
    .
    < │ │ │ -0004b9d0: 636f 6465 3e64 7374 3c2f 636f 6465 3e20 code>dst │ │ │ -0004b9e0: 2d20 4465 7374 696e 6174 696f 6e20 696d - Destination im │ │ │ -0004b9f0: 6167 6520 6f66 2074 6865 2073 616d 6520 age of the same │ │ │ -0004ba00: 7369 7a65 2061 6e64 2074 7970 6520 6173 size and type as │ │ │ -0004ba10: 2073 7263 2e3c 2f64 643e 0a3c 6464 3e3c src.
    .
    < │ │ │ -0004ba20: 636f 6465 3e64 3c2f 636f 6465 3e20 2d20 code>d - │ │ │ -0004ba30: 4469 616d 6574 6572 206f 6620 6561 6368 Diameter of each │ │ │ -0004ba40: 2070 6978 656c 206e 6569 6768 626f 7268 pixel neighborh │ │ │ -0004ba50: 6f6f 6420 7468 6174 2069 7320 7573 6564 ood that is used │ │ │ -0004ba60: 2064 7572 696e 6720 6669 6c74 6572 696e during filterin │ │ │ -0004ba70: 672e 2049 6620 6974 2069 7320 6e6f 6e2d g. If it is non- │ │ │ -0004ba80: 706f 7369 7469 7665 2c0a 2069 7420 6973 positive,. it is │ │ │ -0004ba90: 2063 6f6d 7075 7465 6420 6672 6f6d 2073 computed from s │ │ │ -0004baa0: 6967 6d61 5370 6163 6520 2e3c 2f64 643e igmaSpace .
    │ │ │ -0004bab0: 0a3c 6464 3e3c 636f 6465 3e73 6967 6d61 .
    sigma │ │ │ -0004bac0: 436f 6c6f 723c 2f63 6f64 653e 202d 2046 Color - F │ │ │ -0004bad0: 696c 7465 7220 7369 676d 6120 696e 2074 ilter sigma in t │ │ │ -0004bae0: 6865 2063 6f6c 6f72 2073 7061 6365 2e20 he color space. │ │ │ -0004baf0: 4120 6c61 7267 6572 2076 616c 7565 206f A larger value o │ │ │ -0004bb00: 6620 7468 6520 7061 7261 6d65 7465 7220 f the parameter │ │ │ -0004bb10: 6d65 616e 7320 7468 6174 0a20 6661 7274 means that. fart │ │ │ -0004bb20: 6865 7220 636f 6c6f 7273 2077 6974 6869 her colors withi │ │ │ -0004bb30: 6e20 7468 6520 7069 7865 6c20 6e65 6967 n the pixel neig │ │ │ -0004bb40: 6862 6f72 686f 6f64 2028 7365 6520 7369 hborhood (see si │ │ │ -0004bb50: 676d 6153 7061 6365 2029 2077 696c 6c20 gmaSpace ) will │ │ │ -0004bb60: 6265 206d 6978 6564 2074 6f67 6574 6865 be mixed togethe │ │ │ -0004bb70: 722c 2072 6573 756c 7469 6e67 2069 6e0a r, resulting in. │ │ │ -0004bb80: 206c 6172 6765 7220 6172 6561 7320 6f66 larger areas of │ │ │ -0004bb90: 2073 656d 692d 6571 7561 6c20 636f 6c6f semi-equal colo │ │ │ -0004bba0: 722e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 r.
    .
    sigmaSpace - Filter sig │ │ │ -0004bbd0: 6d61 2069 6e20 7468 6520 636f 6f72 6469 ma in the coordi │ │ │ -0004bbe0: 6e61 7465 2073 7061 6365 2e20 4120 6c61 nate space. A la │ │ │ -0004bbf0: 7267 6572 2076 616c 7565 206f 6620 7468 rger value of th │ │ │ -0004bc00: 6520 7061 7261 6d65 7465 7220 6d65 616e e parameter mean │ │ │ -0004bc10: 7320 7468 6174 0a20 6661 7274 6865 7220 s that. farther │ │ │ -0004bc20: 7069 7865 6c73 2077 696c 6c20 696e 666c pixels will infl │ │ │ -0004bc30: 7565 6e63 6520 6561 6368 206f 7468 6572 uence each other │ │ │ -0004bc40: 2061 7320 6c6f 6e67 2061 7320 7468 6569 as long as thei │ │ │ -0004bc50: 7220 636f 6c6f 7273 2061 7265 2063 6c6f r colors are clo │ │ │ -0004bc60: 7365 2065 6e6f 7567 6820 2873 6565 2073 se enough (see s │ │ │ -0004bc70: 6967 6d61 436f 6c6f 7220 292e 0a20 5768 igmaColor ).. Wh │ │ │ -0004bc80: 656e 2064 2667 743b 3020 2c20 6974 2073 en d>0 , it s │ │ │ -0004bc90: 7065 6369 6669 6573 2074 6865 206e 6569 pecifies the nei │ │ │ -0004bca0: 6768 626f 7268 6f6f 6420 7369 7a65 2072 ghborhood size r │ │ │ -0004bcb0: 6567 6172 646c 6573 7320 6f66 2073 6967 egardless of sig │ │ │ -0004bcc0: 6d61 5370 6163 6520 2e20 4f74 6865 7277 maSpace . Otherw │ │ │ -0004bcd0: 6973 652c 2064 2069 730a 2070 726f 706f ise, d is. propo │ │ │ -0004bce0: 7274 696f 6e61 6c20 746f 2073 6967 6d61 rtional to sigma │ │ │ -0004bcf0: 5370 6163 6520 2e0a 0a0a 0a20 3c62 3e4e Space ..... N │ │ │ -0004bd00: 6f74 653a 3c2f 623e 2020 726f 6c6c 696e ote: rollin │ │ │ -0004bd10: 6747 7569 6461 6e63 6546 696c 7465 7220 gGuidanceFilter │ │ │ -0004bd20: 7573 6573 206a 6f69 6e74 4269 6c61 7465 uses jointBilate │ │ │ -0004bd30: 7261 6c46 696c 7465 7220 6173 2074 6865 ralFilter as the │ │ │ -0004bd40: 2065 6467 652d 7072 6573 6572 7669 6e67 edge-preserving │ │ │ -0004bd50: 2066 696c 7465 722e 0a0a 2053 4545 3a20 filter... SEE: │ │ │ -0004bd60: 6a6f 696e 7442 696c 6174 6572 616c 4669 jointBilateralFi │ │ │ -0004bd70: 6c74 6572 2c20 6269 6c61 7465 7261 6c46 lter, bilateralF │ │ │ -0004bd80: 696c 7465 722c 2061 6d46 696c 7465 723c ilter, amFilter< │ │ │ -0004bd90: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.
    ..
  • .
  • │ │ │ -0004bdb0: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    .

    rol │ │ │ -0004be20: 6c69 6e67 4775 6964 616e 6365 4669 6c74 lingGuidanceFilt │ │ │ -0004be30: 6572 3c2f 6833 3e0a 3c64 6976 2063 6c61 er

    .
    .
    Appl │ │ │ -0004bff0: 6965 7320 7468 6520 726f 6c6c 696e 6720 ies the rolling │ │ │ -0004c000: 6775 6964 616e 6365 2066 696c 7465 7220 guidance filter │ │ │ -0004c010: 746f 2061 6e20 696d 6167 652e 0a0a 2046 to an image... F │ │ │ -0004c020: 6f72 206d 6f72 6520 6465 7461 696c 732c or more details, │ │ │ -0004c030: 2070 6c65 6173 6520 7365 6520 4349 5445 please see CITE │ │ │ -0004c040: 3a20 7a68 616e 6732 3031 3472 6f6c 6c69 : zhang2014rolli │ │ │ -0004c050: 6e67 3c2f 6469 763e 0a3c 646c 2063 6c61 ng
    .
    .
    │ │ │ -0004c070: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
    │ │ │ -0004c080: 0a3c 6464 3e3c 636f 6465 3e73 7263 3c2f .
    src - Source 8 │ │ │ -0004c0a0: 2d62 6974 206f 7220 666c 6f61 7469 6e67 -bit or floating │ │ │ -0004c0b0: 2d70 6f69 6e74 2c20 312d 6368 616e 6e65 -point, 1-channe │ │ │ -0004c0c0: 6c20 6f72 2033 2d63 6861 6e6e 656c 2069 l or 3-channel i │ │ │ -0004c0d0: 6d61 6765 2e3c 2f64 643e 0a3c 6464 3e3c mage.
    .
    < │ │ │ -0004c0e0: 636f 6465 3e64 7374 3c2f 636f 6465 3e20 code>dst │ │ │ -0004c0f0: 2d20 4465 7374 696e 6174 696f 6e20 696d - Destination im │ │ │ -0004c100: 6167 6520 6f66 2074 6865 2073 616d 6520 age of the same │ │ │ -0004c110: 7369 7a65 2061 6e64 2074 7970 6520 6173 size and type as │ │ │ -0004c120: 2073 7263 2e3c 2f64 643e 0a3c 6464 3e3c src.
    .
    < │ │ │ -0004c130: 636f 6465 3e64 3c2f 636f 6465 3e20 2d20 code>d - │ │ │ -0004c140: 4469 616d 6574 6572 206f 6620 6561 6368 Diameter of each │ │ │ -0004c150: 2070 6978 656c 206e 6569 6768 626f 7268 pixel neighborh │ │ │ -0004c160: 6f6f 6420 7468 6174 2069 7320 7573 6564 ood that is used │ │ │ -0004c170: 2064 7572 696e 6720 6669 6c74 6572 696e during filterin │ │ │ -0004c180: 672e 2049 6620 6974 2069 7320 6e6f 6e2d g. If it is non- │ │ │ -0004c190: 706f 7369 7469 7665 2c0a 2069 7420 6973 positive,. it is │ │ │ -0004c1a0: 2063 6f6d 7075 7465 6420 6672 6f6d 2073 computed from s │ │ │ -0004c1b0: 6967 6d61 5370 6163 6520 2e3c 2f64 643e igmaSpace .
    │ │ │ -0004c1c0: 0a3c 6464 3e3c 636f 6465 3e73 6967 6d61 .
    sigma │ │ │ -0004c1d0: 436f 6c6f 723c 2f63 6f64 653e 202d 2046 Color - F │ │ │ -0004c1e0: 696c 7465 7220 7369 676d 6120 696e 2074 ilter sigma in t │ │ │ -0004c1f0: 6865 2063 6f6c 6f72 2073 7061 6365 2e20 he color space. │ │ │ -0004c200: 4120 6c61 7267 6572 2076 616c 7565 206f A larger value o │ │ │ -0004c210: 6620 7468 6520 7061 7261 6d65 7465 7220 f the parameter │ │ │ -0004c220: 6d65 616e 7320 7468 6174 0a20 6661 7274 means that. fart │ │ │ -0004c230: 6865 7220 636f 6c6f 7273 2077 6974 6869 her colors withi │ │ │ -0004c240: 6e20 7468 6520 7069 7865 6c20 6e65 6967 n the pixel neig │ │ │ -0004c250: 6862 6f72 686f 6f64 2028 7365 6520 7369 hborhood (see si │ │ │ -0004c260: 676d 6153 7061 6365 2029 2077 696c 6c20 gmaSpace ) will │ │ │ -0004c270: 6265 206d 6978 6564 2074 6f67 6574 6865 be mixed togethe │ │ │ -0004c280: 722c 2072 6573 756c 7469 6e67 2069 6e0a r, resulting in. │ │ │ -0004c290: 206c 6172 6765 7220 6172 6561 7320 6f66 larger areas of │ │ │ -0004c2a0: 2073 656d 692d 6571 7561 6c20 636f 6c6f semi-equal colo │ │ │ -0004c2b0: 722e 0a0a 2066 6172 7468 6572 2070 6978 r... farther pix │ │ │ -0004c2c0: 656c 7320 7769 6c6c 2069 6e66 6c75 656e els will influen │ │ │ -0004c2d0: 6365 2065 6163 6820 6f74 6865 7220 6173 ce each other as │ │ │ -0004c2e0: 206c 6f6e 6720 6173 2074 6865 6972 2063 long as their c │ │ │ -0004c2f0: 6f6c 6f72 7320 6172 6520 636c 6f73 6520 olors are close │ │ │ -0004c300: 656e 6f75 6768 2028 7365 6520 7369 676d enough (see sigm │ │ │ -0004c310: 6143 6f6c 6f72 2029 2e0a 2057 6865 6e20 aColor ).. When │ │ │ -0004c320: 6426 6774 3b30 202c 2069 7420 7370 6563 d>0 , it spec │ │ │ -0004c330: 6966 6965 7320 7468 6520 6e65 6967 6862 ifies the neighb │ │ │ -0004c340: 6f72 686f 6f64 2073 697a 6520 7265 6761 orhood size rega │ │ │ -0004c350: 7264 6c65 7373 206f 6620 7369 676d 6153 rdless of sigmaS │ │ │ -0004c360: 7061 6365 202e 204f 7468 6572 7769 7365 pace . Otherwise │ │ │ -0004c370: 2c20 6420 6973 0a20 7072 6f70 6f72 7469 , d is. proporti │ │ │ -0004c380: 6f6e 616c 2074 6f20 7369 676d 6153 7061 onal to sigmaSpa │ │ │ -0004c390: 6365 202e 0a0a 0a0a 203c 623e 4e6f 7465 ce ..... Note │ │ │ -0004c3a0: 3a3c 2f62 3e20 2072 6f6c 6c69 6e67 4775 : rollingGu │ │ │ -0004c3b0: 6964 616e 6365 4669 6c74 6572 2075 7365 idanceFilter use │ │ │ -0004c3c0: 7320 6a6f 696e 7442 696c 6174 6572 616c s jointBilateral │ │ │ -0004c3d0: 4669 6c74 6572 2061 7320 7468 6520 6564 Filter as the ed │ │ │ -0004c3e0: 6765 2d70 7265 7365 7276 696e 6720 6669 ge-preserving fi │ │ │ -0004c3f0: 6c74 6572 2e0a 0a20 5345 453a 206a 6f69 lter... SEE: joi │ │ │ -0004c400: 6e74 4269 6c61 7465 7261 6c46 696c 7465 ntBilateralFilte │ │ │ -0004c410: 722c 2062 696c 6174 6572 616c 4669 6c74 r, bilateralFilt │ │ │ -0004c420: 6572 2c20 616d 4669 6c74 6572 3c2f 6464 er, amFilter
    .
    ..
  • .
  • ..< │ │ │ -0004c4b0: 6833 3e72 6f6c 6c69 6e67 4775 6964 616e h3>rollingGuidan │ │ │ -0004c4c0: 6365 4669 6c74 6572 3c2f 6833 3e0a 3c64 ceFilter.public stati │ │ │ -0004c510: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c void rollingGuida │ │ │ -0004c570: 6e63 6546 696c 7465 723c 2f73 7061 6e3e nceFilter │ │ │ -0004c580: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ -0004c5a0: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -0004c5b0: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -0004c5c0: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -0004c5d0: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat src,. Mat dst,. int │ │ │ -0004c640: 266e 6273 703b 6429 3c2f 7370 616e 3e3c  d)< │ │ │ -0004c650: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Applies │ │ │ -0004c670: 2074 6865 2072 6f6c 6c69 6e67 2067 7569 the rolling gui │ │ │ -0004c680: 6461 6e63 6520 6669 6c74 6572 2074 6f20 dance filter to │ │ │ -0004c690: 616e 2069 6d61 6765 2e0a 0a20 466f 7220 an image... For │ │ │ -0004c6a0: 6d6f 7265 2064 6574 6169 6c73 2c20 706c more details, pl │ │ │ -0004c6b0: 6561 7365 2073 6565 2043 4954 453a 207a ease see CITE: z │ │ │ -0004c6c0: 6861 6e67 3230 3134 726f 6c6c 696e 673c hang2014rolling< │ │ │ -0004c6d0: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ -0004c6f0: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .src - Source 8-bi │ │ │ -0004c720: 7420 6f72 2066 6c6f 6174 696e 672d 706f t or floating-po │ │ │ -0004c730: 696e 742c 2031 2d63 6861 6e6e 656c 206f int, 1-channel o │ │ │ -0004c740: 7220 332d 6368 616e 6e65 6c20 696d 6167 r 3-channel imag │ │ │ -0004c750: 652e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 e..
    dst - D │ │ │ -0004c770: 6573 7469 6e61 7469 6f6e 2069 6d61 6765 estination image │ │ │ -0004c780: 206f 6620 7468 6520 7361 6d65 2073 697a of the same siz │ │ │ -0004c790: 6520 616e 6420 7479 7065 2061 7320 7372 e and type as sr │ │ │ -0004c7a0: 632e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 c.
    .
    d - Dia │ │ │ -0004c7c0: 6d65 7465 7220 6f66 2065 6163 6820 7069 meter of each pi │ │ │ -0004c7d0: 7865 6c20 6e65 6967 6862 6f72 686f 6f64 xel neighborhood │ │ │ -0004c7e0: 2074 6861 7420 6973 2075 7365 6420 6475 that is used du │ │ │ -0004c7f0: 7269 6e67 2066 696c 7465 7269 6e67 2e20 ring filtering. │ │ │ -0004c800: 4966 2069 7420 6973 206e 6f6e 2d70 6f73 If it is non-pos │ │ │ -0004c810: 6974 6976 652c 0a20 6974 2069 7320 636f itive,. it is co │ │ │ -0004c820: 6d70 7574 6564 2066 726f 6d20 7369 676d mputed from sigm │ │ │ -0004c830: 6153 7061 6365 202e 0a0a 2066 6172 7468 aSpace ... farth │ │ │ -0004c840: 6572 2063 6f6c 6f72 7320 7769 7468 696e er colors within │ │ │ -0004c850: 2074 6865 2070 6978 656c 206e 6569 6768 the pixel neigh │ │ │ -0004c860: 626f 7268 6f6f 6420 2873 6565 2073 6967 borhood (see sig │ │ │ -0004c870: 6d61 5370 6163 6520 2920 7769 6c6c 2062 maSpace ) will b │ │ │ -0004c880: 6520 6d69 7865 6420 746f 6765 7468 6572 e mixed together │ │ │ -0004c890: 2c20 7265 7375 6c74 696e 6720 696e 0a20 , resulting in. │ │ │ -0004c8a0: 6c61 7267 6572 2061 7265 6173 206f 6620 larger areas of │ │ │ -0004c8b0: 7365 6d69 2d65 7175 616c 2063 6f6c 6f72 semi-equal color │ │ │ -0004c8c0: 2e0a 0a20 6661 7274 6865 7220 7069 7865 ... farther pixe │ │ │ -0004c8d0: 6c73 2077 696c 6c20 696e 666c 7565 6e63 ls will influenc │ │ │ -0004c8e0: 6520 6561 6368 206f 7468 6572 2061 7320 e each other as │ │ │ -0004c8f0: 6c6f 6e67 2061 7320 7468 6569 7220 636f long as their co │ │ │ -0004c900: 6c6f 7273 2061 7265 2063 6c6f 7365 2065 lors are close e │ │ │ -0004c910: 6e6f 7567 6820 2873 6565 2073 6967 6d61 nough (see sigma │ │ │ -0004c920: 436f 6c6f 7220 292e 0a20 5768 656e 2064 Color ).. When d │ │ │ -0004c930: 2667 743b 3020 2c20 6974 2073 7065 6369 >0 , it speci │ │ │ -0004c940: 6669 6573 2074 6865 206e 6569 6768 626f fies the neighbo │ │ │ -0004c950: 7268 6f6f 6420 7369 7a65 2072 6567 6172 rhood size regar │ │ │ -0004c960: 646c 6573 7320 6f66 2073 6967 6d61 5370 dless of sigmaSp │ │ │ -0004c970: 6163 6520 2e20 4f74 6865 7277 6973 652c ace . Otherwise, │ │ │ -0004c980: 2064 2069 730a 2070 726f 706f 7274 696f d is. proportio │ │ │ -0004c990: 6e61 6c20 746f 2073 6967 6d61 5370 6163 nal to sigmaSpac │ │ │ -0004c9a0: 6520 2e0a 0a0a 0a20 3c62 3e4e 6f74 653a e ..... Note: │ │ │ -0004c9b0: 3c2f 623e 2020 726f 6c6c 696e 6747 7569 rollingGui │ │ │ -0004c9c0: 6461 6e63 6546 696c 7465 7220 7573 6573 danceFilter uses │ │ │ -0004c9d0: 206a 6f69 6e74 4269 6c61 7465 7261 6c46 jointBilateralF │ │ │ -0004c9e0: 696c 7465 7220 6173 2074 6865 2065 6467 ilter as the edg │ │ │ -0004c9f0: 652d 7072 6573 6572 7669 6e67 2066 696c e-preserving fil │ │ │ -0004ca00: 7465 722e 0a0a 2053 4545 3a20 6a6f 696e ter... SEE: join │ │ │ -0004ca10: 7442 696c 6174 6572 616c 4669 6c74 6572 tBilateralFilter │ │ │ -0004ca20: 2c20 6269 6c61 7465 7261 6c46 696c 7465 , bilateralFilte │ │ │ -0004ca30: 722c 2061 6d46 696c 7465 723c 2f64 643e r, amFilter
    │ │ │ -0004ca40: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
    ..
  • .
  • ..

    ro │ │ │ -0004cac0: 6c6c 696e 6747 7569 6461 6e63 6546 696c llingGuidanceFil │ │ │ -0004cad0: 7465 723c 2f68 333e 0a3c 6469 7620 636c ter

    .
    p │ │ │ -0004cb10: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static void&n │ │ │ -0004cb50: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;r │ │ │ -0004cb70: 6f6c 6c69 6e67 4775 6964 616e 6365 4669 ollingGuidanceFi │ │ │ -0004cb80: 6c74 6572 3c2f 7370 616e 3e3c 7762 723e lter │ │ │ -0004cb90: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Mat&nb │ │ │ -0004cbf0: 7370 3b73 7263 2c0a 203c 6120 6872 6566 sp;src,. Mat&nbs │ │ │ -0004cc40: 703b 6473 7429 3c2f 7370 616e 3e3c 2f64 p;dst).
    Applies t │ │ │ -0004cc70: 6865 2072 6f6c 6c69 6e67 2067 7569 6461 he rolling guida │ │ │ -0004cc80: 6e63 6520 6669 6c74 6572 2074 6f20 616e nce filter to an │ │ │ -0004cc90: 2069 6d61 6765 2e0a 0a20 466f 7220 6d6f image... For mo │ │ │ -0004cca0: 7265 2064 6574 6169 6c73 2c20 706c 6561 re details, plea │ │ │ -0004ccb0: 7365 2073 6565 2043 4954 453a 207a 6861 se see CITE: zha │ │ │ -0004ccc0: 6e67 3230 3134 726f 6c6c 696e 673c 2f64 ng2014rolling.
    .
    Param │ │ │ -0004ccf0: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ -0004cd00: 3c63 6f64 653e 7372 633c 2f63 6f64 653e src │ │ │ -0004cd10: 202d 2053 6f75 7263 6520 382d 6269 7420 - Source 8-bit │ │ │ -0004cd20: 6f72 2066 6c6f 6174 696e 672d 706f 696e or floating-poin │ │ │ -0004cd30: 742c 2031 2d63 6861 6e6e 656c 206f 7220 t, 1-channel or │ │ │ -0004cd40: 332d 6368 616e 6e65 6c20 696d 6167 652e 3-channel image. │ │ │ -0004cd50: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -0004cd60: 6473 743c 2f63 6f64 653e 202d 2044 6573 dst - Des │ │ │ -0004cd70: 7469 6e61 7469 6f6e 2069 6d61 6765 206f tination image o │ │ │ -0004cd80: 6620 7468 6520 7361 6d65 2073 697a 6520 f the same size │ │ │ -0004cd90: 616e 6420 7479 7065 2061 7320 7372 632e and type as src. │ │ │ -0004cda0: 0a0a 2069 7420 6973 2063 6f6d 7075 7465 .. it is compute │ │ │ -0004cdb0: 6420 6672 6f6d 2073 6967 6d61 5370 6163 d from sigmaSpac │ │ │ -0004cdc0: 6520 2e0a 0a20 6661 7274 6865 7220 636f e ... farther co │ │ │ -0004cdd0: 6c6f 7273 2077 6974 6869 6e20 7468 6520 lors within the │ │ │ -0004cde0: 7069 7865 6c20 6e65 6967 6862 6f72 686f pixel neighborho │ │ │ -0004cdf0: 6f64 2028 7365 6520 7369 676d 6153 7061 od (see sigmaSpa │ │ │ -0004ce00: 6365 2029 2077 696c 6c20 6265 206d 6978 ce ) will be mix │ │ │ -0004ce10: 6564 2074 6f67 6574 6865 722c 2072 6573 ed together, res │ │ │ -0004ce20: 756c 7469 6e67 2069 6e0a 206c 6172 6765 ulting in. large │ │ │ -0004ce30: 7220 6172 6561 7320 6f66 2073 656d 692d r areas of semi- │ │ │ -0004ce40: 6571 7561 6c20 636f 6c6f 722e 0a0a 2066 equal color... f │ │ │ -0004ce50: 6172 7468 6572 2070 6978 656c 7320 7769 arther pixels wi │ │ │ -0004ce60: 6c6c 2069 6e66 6c75 656e 6365 2065 6163 ll influence eac │ │ │ -0004ce70: 6820 6f74 6865 7220 6173 206c 6f6e 6720 h other as long │ │ │ -0004ce80: 6173 2074 6865 6972 2063 6f6c 6f72 7320 as their colors │ │ │ -0004ce90: 6172 6520 636c 6f73 6520 656e 6f75 6768 are close enough │ │ │ -0004cea0: 2028 7365 6520 7369 676d 6143 6f6c 6f72 (see sigmaColor │ │ │ -0004ceb0: 2029 2e0a 2057 6865 6e20 6426 6774 3b30 ).. When d>0 │ │ │ -0004cec0: 202c 2069 7420 7370 6563 6966 6965 7320 , it specifies │ │ │ -0004ced0: 7468 6520 6e65 6967 6862 6f72 686f 6f64 the neighborhood │ │ │ -0004cee0: 2073 697a 6520 7265 6761 7264 6c65 7373 size regardless │ │ │ -0004cef0: 206f 6620 7369 676d 6153 7061 6365 202e of sigmaSpace . │ │ │ -0004cf00: 204f 7468 6572 7769 7365 2c20 6420 6973 Otherwise, d is │ │ │ -0004cf10: 0a20 7072 6f70 6f72 7469 6f6e 616c 2074 . proportional t │ │ │ -0004cf20: 6f20 7369 676d 6153 7061 6365 202e 0a0a o sigmaSpace ... │ │ │ -0004cf30: 0a0a 203c 623e 4e6f 7465 3a3c 2f62 3e20 .. Note: │ │ │ -0004cf40: 2072 6f6c 6c69 6e67 4775 6964 616e 6365 rollingGuidance │ │ │ -0004cf50: 4669 6c74 6572 2075 7365 7320 6a6f 696e Filter uses join │ │ │ -0004cf60: 7442 696c 6174 6572 616c 4669 6c74 6572 tBilateralFilter │ │ │ -0004cf70: 2061 7320 7468 6520 6564 6765 2d70 7265 as the edge-pre │ │ │ -0004cf80: 7365 7276 696e 6720 6669 6c74 6572 2e0a serving filter.. │ │ │ -0004cf90: 0a20 5345 453a 206a 6f69 6e74 4269 6c61 . SEE: jointBila │ │ │ -0004cfa0: 7465 7261 6c46 696c 7465 722c 2062 696c teralFilter, bil │ │ │ -0004cfb0: 6174 6572 616c 4669 6c74 6572 2c20 616d ateralFilter, am │ │ │ -0004cfc0: 4669 6c74 6572 3c2f 6464 3e0a 3c2f 646c Filter
    .
    ...
  • .
    .

    createFast │ │ │ -0004d070: 4269 6c61 7465 7261 6c53 6f6c 7665 7246 BilateralSolverF │ │ │ -0004d080: 696c 7465 723c 2f68 333e 0a3c 6469 7620 ilter

    .
    public static FastBilateral │ │ │ -0004d150: 536f 6c76 6572 4669 6c74 6572 3c2f 613e SolverFilter │ │ │ -0004d160: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  createFa │ │ │ -0004d190: 7374 4269 6c61 7465 7261 6c53 6f6c 7665 stBilateralSolve │ │ │ -0004d1a0: 7246 696c 7465 723c 2f73 7061 6e3e 3c77 rFilter(Mat │ │ │ -0004d210: 266e 6273 703b 6775 6964 652c 0a20 646f  guide,. do │ │ │ -0004d220: 7562 6c65 266e 6273 703b 7369 676d 615f uble sigma_ │ │ │ -0004d230: 7370 6174 6961 6c2c 0a20 646f 7562 6c65 spatial,. double │ │ │ -0004d240: 266e 6273 703b 7369 676d 615f 6c75 6d61  sigma_luma │ │ │ -0004d250: 2c0a 2064 6f75 626c 6526 6e62 7370 3b73 ,. double s │ │ │ -0004d260: 6967 6d61 5f63 6872 6f6d 612c 0a20 646f igma_chroma,. do │ │ │ -0004d270: 7562 6c65 266e 6273 703b 6c61 6d62 6461 uble lambda │ │ │ -0004d280: 2c0a 2069 6e74 266e 6273 703b 6e75 6d5f ,. int num_ │ │ │ -0004d290: 6974 6572 2c0a 2064 6f75 626c 6526 6e62 iter,. double&nb │ │ │ -0004d2a0: 7370 3b6d 6178 5f74 6f6c 293c 2f73 7061 sp;max_tol)
    .
    Fact │ │ │ -0004d2d0: 6f72 7920 6d65 7468 6f64 2c20 6372 6561 ory method, crea │ │ │ -0004d2e0: 7465 2069 6e73 7461 6e63 6520 6f66 2046 te instance of F │ │ │ -0004d2f0: 6173 7442 696c 6174 6572 616c 536f 6c76 astBilateralSolv │ │ │ -0004d300: 6572 4669 6c74 6572 2061 6e64 2065 7865 erFilter and exe │ │ │ -0004d310: 6375 7465 2074 6865 2069 6e69 7469 616c cute the initial │ │ │ -0004d320: 697a 6174 696f 6e20 726f 7574 696e 6573 ization routines │ │ │ -0004d330: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 .
    .
    .
    P │ │ │ -0004d350: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ -0004d360: 3c64 643e 3c63 6f64 653e 6775 6964 653c
    guide< │ │ │ -0004d370: 2f63 6f64 653e 202d 2069 6d61 6765 2073 /code> - image s │ │ │ -0004d380: 6572 7669 6e67 2061 7320 6775 6964 6520 erving as guide │ │ │ -0004d390: 666f 7220 6669 6c74 6572 696e 672e 2049 for filtering. I │ │ │ -0004d3a0: 7420 7368 6f75 6c64 2068 6176 6520 382d t should have 8- │ │ │ -0004d3b0: 6269 7420 6465 7074 6820 616e 6420 6569 bit depth and ei │ │ │ -0004d3c0: 7468 6572 2031 206f 7220 3320 6368 616e ther 1 or 3 chan │ │ │ -0004d3d0: 6e65 6c73 2e3c 2f64 643e 0a3c 6464 3e3c nels.
    .
    < │ │ │ -0004d3e0: 636f 6465 3e73 6967 6d61 5f73 7061 7469 code>sigma_spati │ │ │ -0004d3f0: 616c 3c2f 636f 6465 3e20 2d20 7061 7261 al - para │ │ │ -0004d400: 6d65 7465 722c 2074 6861 7420 6973 2073 meter, that is s │ │ │ -0004d410: 696d 696c 6172 2074 6f20 7370 6174 6961 imilar to spatia │ │ │ -0004d420: 6c20 7370 6163 6520 7369 676d 6120 2862 l space sigma (b │ │ │ -0004d430: 616e 6477 6964 7468 2920 696e 2062 696c andwidth) in bil │ │ │ -0004d440: 6174 6572 616c 4669 6c74 6572 2e3c 2f64 ateralFilter..
    sig │ │ │ -0004d460: 6d61 5f6c 756d 613c 2f63 6f64 653e 202d ma_luma - │ │ │ -0004d470: 2070 6172 616d 6574 6572 2c20 7468 6174 parameter, that │ │ │ -0004d480: 2069 7320 7369 6d69 6c61 7220 746f 206c is similar to l │ │ │ -0004d490: 756d 6120 7370 6163 6520 7369 676d 6120 uma space sigma │ │ │ -0004d4a0: 2862 616e 6477 6964 7468 2920 696e 2062 (bandwidth) in b │ │ │ -0004d4b0: 696c 6174 6572 616c 4669 6c74 6572 2e3c ilateralFilter.< │ │ │ -0004d4c0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e73 /dd>.
    s │ │ │ -0004d4d0: 6967 6d61 5f63 6872 6f6d 613c 2f63 6f64 igma_chroma - parameter, │ │ │ -0004d4f0: 7468 6174 2069 7320 7369 6d69 6c61 7220 that is similar │ │ │ -0004d500: 746f 2063 6872 6f6d 6120 7370 6163 6520 to chroma space │ │ │ -0004d510: 7369 676d 6120 2862 616e 6477 6964 7468 sigma (bandwidth │ │ │ -0004d520: 2920 696e 2062 696c 6174 6572 616c 4669 ) in bilateralFi │ │ │ -0004d530: 6c74 6572 2e3c 2f64 643e 0a3c 6464 3e3c lter.
    .
    < │ │ │ -0004d540: 636f 6465 3e6c 616d 6264 613c 2f63 6f64 code>lambda - smoothness │ │ │ -0004d560: 7374 7265 6e67 7468 2070 6172 616d 6574 strength paramet │ │ │ -0004d570: 6572 2066 6f72 2073 6f6c 7665 722e 3c2f er for solver..
    nu │ │ │ -0004d590: 6d5f 6974 6572 3c2f 636f 6465 3e20 2d20 m_iter - │ │ │ -0004d5a0: 6e75 6d62 6572 206f 6620 6974 6572 6174 number of iterat │ │ │ -0004d5b0: 696f 6e73 2075 7365 6420 666f 7220 736f ions used for so │ │ │ -0004d5c0: 6c76 6572 2c20 3235 2069 7320 7573 7561 lver, 25 is usua │ │ │ -0004d5d0: 6c6c 7920 656e 6f75 6768 2e3c 2f64 643e lly enough.
    │ │ │ -0004d5e0: 0a3c 6464 3e3c 636f 6465 3e6d 6178 5f74 .
    max_t │ │ │ -0004d5f0: 6f6c 3c2f 636f 6465 3e20 2d20 636f 6e76 ol - conv │ │ │ -0004d600: 6572 6765 6e63 6520 746f 6c65 7261 6e63 ergence toleranc │ │ │ -0004d610: 6520 7573 6564 2066 6f72 2073 6f6c 7665 e used for solve │ │ │ -0004d620: 722e 0a0a 2046 6f72 206d 6f72 6520 6465 r... For more de │ │ │ -0004d630: 7461 696c 7320 6162 6f75 7420 7468 6520 tails about the │ │ │ -0004d640: 4661 7374 2042 696c 6174 6572 616c 2053 Fast Bilateral S │ │ │ -0004d650: 6f6c 7665 7220 7061 7261 6d65 7465 7273 olver parameters │ │ │ -0004d660: 2c20 7365 6520 7468 6520 6f72 6967 696e , see the origin │ │ │ -0004d670: 616c 2070 6170 6572 2043 4954 453a 2042 al paper CITE: B │ │ │ -0004d680: 6172 726f 6e50 6f6f 6c65 3230 3136 2e3c arronPoole2016.< │ │ │ -0004d690: 2f64 643e 0a3c 6474 3e52 6574 7572 6e73 /dd>.
    Returns │ │ │ -0004d6a0: 3a3c 2f64 743e 0a3c 6464 3e61 7574 6f6d :
    .
    autom │ │ │ -0004d6b0: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -0004d6c0: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
    .
    ..
  • .< │ │ │ -0004d6e0: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    creat │ │ │ -0004d760: 6546 6173 7442 696c 6174 6572 616c 536f eFastBilateralSo │ │ │ -0004d770: 6c76 6572 4669 6c74 6572 3c2f 6833 3e0a lverFilter

    . │ │ │ -0004d780: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
    public sta │ │ │ -0004d7c0: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ -0004d7d0: 3c73 7061 6e20 636c 6173 733d 2272 6574 FastBila │ │ │ -0004d840: 7465 7261 6c53 6f6c 7665 7246 696c 7465 teralSolverFilte │ │ │ -0004d850: 723c 2f61 3e3c 2f73 7061 6e3e 266e 6273 r&nbs │ │ │ -0004d860: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;cre │ │ │ -0004d880: 6174 6546 6173 7442 696c 6174 6572 616c ateFastBilateral │ │ │ -0004d890: 536f 6c76 6572 4669 6c74 6572 3c2f 7370 SolverFilter(Ma │ │ │ -0004d900: 743c 2f61 3e26 6e62 7370 3b67 7569 6465 t guide │ │ │ -0004d910: 2c0a 2064 6f75 626c 6526 6e62 7370 3b73 ,. double s │ │ │ -0004d920: 6967 6d61 5f73 7061 7469 616c 2c0a 2064 igma_spatial,. d │ │ │ -0004d930: 6f75 626c 6526 6e62 7370 3b73 6967 6d61 ouble sigma │ │ │ -0004d940: 5f6c 756d 612c 0a20 646f 7562 6c65 266e _luma,. double&n │ │ │ -0004d950: 6273 703b 7369 676d 615f 6368 726f 6d61 bsp;sigma_chroma │ │ │ -0004d960: 2c0a 2064 6f75 626c 6526 6e62 7370 3b6c ,. double l │ │ │ -0004d970: 616d 6264 612c 0a20 696e 7426 6e62 7370 ambda,. int  │ │ │ -0004d980: 3b6e 756d 5f69 7465 7229 3c2f 7370 616e ;num_iter)
    .
    Facto │ │ │ -0004d9b0: 7279 206d 6574 686f 642c 2063 7265 6174 ry method, creat │ │ │ -0004d9c0: 6520 696e 7374 616e 6365 206f 6620 4661 e instance of Fa │ │ │ -0004d9d0: 7374 4269 6c61 7465 7261 6c53 6f6c 7665 stBilateralSolve │ │ │ -0004d9e0: 7246 696c 7465 7220 616e 6420 6578 6563 rFilter and exec │ │ │ -0004d9f0: 7574 6520 7468 6520 696e 6974 6961 6c69 ute the initiali │ │ │ -0004da00: 7a61 7469 6f6e 2072 6f75 7469 6e65 732e zation routines. │ │ │ -0004da10: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ -0004da30: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ -0004da40: 6464 3e3c 636f 6465 3e67 7569 6465 3c2f dd>guide - image se │ │ │ -0004da60: 7276 696e 6720 6173 2067 7569 6465 2066 rving as guide f │ │ │ -0004da70: 6f72 2066 696c 7465 7269 6e67 2e20 4974 or filtering. It │ │ │ -0004da80: 2073 686f 756c 6420 6861 7665 2038 2d62 should have 8-b │ │ │ -0004da90: 6974 2064 6570 7468 2061 6e64 2065 6974 it depth and eit │ │ │ -0004daa0: 6865 7220 3120 6f72 2033 2063 6861 6e6e her 1 or 3 chann │ │ │ -0004dab0: 656c 732e 3c2f 6464 3e0a 3c64 643e 3c63 els..
    sigma_spatia │ │ │ -0004dad0: 6c3c 2f63 6f64 653e 202d 2070 6172 616d l - param │ │ │ -0004dae0: 6574 6572 2c20 7468 6174 2069 7320 7369 eter, that is si │ │ │ -0004daf0: 6d69 6c61 7220 746f 2073 7061 7469 616c milar to spatial │ │ │ -0004db00: 2073 7061 6365 2073 6967 6d61 2028 6261 space sigma (ba │ │ │ -0004db10: 6e64 7769 6474 6829 2069 6e20 6269 6c61 ndwidth) in bila │ │ │ -0004db20: 7465 7261 6c46 696c 7465 722e 3c2f 6464 teralFilter.
    .
    sigm │ │ │ -0004db40: 615f 6c75 6d61 3c2f 636f 6465 3e20 2d20 a_luma - │ │ │ -0004db50: 7061 7261 6d65 7465 722c 2074 6861 7420 parameter, that │ │ │ -0004db60: 6973 2073 696d 696c 6172 2074 6f20 6c75 is similar to lu │ │ │ -0004db70: 6d61 2073 7061 6365 2073 6967 6d61 2028 ma space sigma ( │ │ │ -0004db80: 6261 6e64 7769 6474 6829 2069 6e20 6269 bandwidth) in bi │ │ │ -0004db90: 6c61 7465 7261 6c46 696c 7465 722e 3c2f lateralFilter..
    si │ │ │ -0004dbb0: 676d 615f 6368 726f 6d61 3c2f 636f 6465 gma_chroma - parameter, t │ │ │ -0004dbd0: 6861 7420 6973 2073 696d 696c 6172 2074 hat is similar t │ │ │ -0004dbe0: 6f20 6368 726f 6d61 2073 7061 6365 2073 o chroma space s │ │ │ -0004dbf0: 6967 6d61 2028 6261 6e64 7769 6474 6829 igma (bandwidth) │ │ │ -0004dc00: 2069 6e20 6269 6c61 7465 7261 6c46 696c in bilateralFil │ │ │ -0004dc10: 7465 722e 3c2f 6464 3e0a 3c64 643e 3c63 ter.
    .
    lambda - smoothness s │ │ │ -0004dc40: 7472 656e 6774 6820 7061 7261 6d65 7465 trength paramete │ │ │ -0004dc50: 7220 666f 7220 736f 6c76 6572 2e3c 2f64 r for solver..
    num │ │ │ -0004dc70: 5f69 7465 723c 2f63 6f64 653e 202d 206e _iter - n │ │ │ -0004dc80: 756d 6265 7220 6f66 2069 7465 7261 7469 umber of iterati │ │ │ -0004dc90: 6f6e 7320 7573 6564 2066 6f72 2073 6f6c ons used for sol │ │ │ -0004dca0: 7665 722c 2032 3520 6973 2075 7375 616c ver, 25 is usual │ │ │ -0004dcb0: 6c79 2065 6e6f 7567 682e 0a0a 0a20 466f ly enough.... Fo │ │ │ -0004dcc0: 7220 6d6f 7265 2064 6574 6169 6c73 2061 r more details a │ │ │ -0004dcd0: 626f 7574 2074 6865 2046 6173 7420 4269 bout the Fast Bi │ │ │ -0004dce0: 6c61 7465 7261 6c20 536f 6c76 6572 2070 lateral Solver p │ │ │ -0004dcf0: 6172 616d 6574 6572 732c 2073 6565 2074 arameters, see t │ │ │ -0004dd00: 6865 206f 7269 6769 6e61 6c20 7061 7065 he original pape │ │ │ -0004dd10: 7220 4349 5445 3a20 4261 7272 6f6e 506f r CITE: BarronPo │ │ │ -0004dd20: 6f6c 6532 3031 362e 3c2f 6464 3e0a 3c64 ole2016.
    .Returns:. │ │ │ -0004dd40: 3c64 643e 6175 746f 6d61 7469 6361 6c6c
    automaticall │ │ │ -0004dd50: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ -0004dd60: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
    .
    ..
  • ..

    │ │ │ -0004ddf0: 6372 6561 7465 4661 7374 4269 6c61 7465 createFastBilate │ │ │ -0004de00: 7261 6c53 6f6c 7665 7246 696c 7465 723c ralSolverFilter< │ │ │ -0004de10: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ -0004de50: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ -0004de60: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;< │ │ │ -0004de80: 6120 6872 6566 3d22 4661 7374 4269 6c61 a href="FastBila │ │ │ -0004de90: 7465 7261 6c53 6f6c 7665 7246 696c 7465 teralSolverFilte │ │ │ -0004dea0: 722e 6874 6d6c 2220 7469 746c 653d 2263 r.html" title="c │ │ │ -0004deb0: 6c61 7373 2069 6e20 6f72 672e 6f70 656e lass in org.open │ │ │ -0004dec0: 6376 2e78 696d 6770 726f 6322 3e46 6173 cv.ximgproc">Fas │ │ │ -0004ded0: 7442 696c 6174 6572 616c 536f 6c76 6572 tBilateralSolver │ │ │ -0004dee0: 4669 6c74 6572 3c2f 613e 3c2f 7370 616e Filter createFastBila │ │ │ -0004df20: 7465 7261 6c53 6f6c 7665 7246 696c 7465 teralSolverFilte │ │ │ -0004df30: 723c 2f73 7061 6e3e 3c77 6272 3e3c 7370 r(Mat  │ │ │ -0004dfa0: 6775 6964 652c 0a20 646f 7562 6c65 266e guide,. double&n │ │ │ -0004dfb0: 6273 703b 7369 676d 615f 7370 6174 6961 bsp;sigma_spatia │ │ │ -0004dfc0: 6c2c 0a20 646f 7562 6c65 266e 6273 703b l,. double  │ │ │ -0004dfd0: 7369 676d 615f 6c75 6d61 2c0a 2064 6f75 sigma_luma,. dou │ │ │ -0004dfe0: 626c 6526 6e62 7370 3b73 6967 6d61 5f63 ble sigma_c │ │ │ -0004dff0: 6872 6f6d 612c 0a20 646f 7562 6c65 266e hroma,. double&n │ │ │ -0004e000: 6273 703b 6c61 6d62 6461 293c 2f73 7061 bsp;lambda)
    .
    Fact │ │ │ -0004e030: 6f72 7920 6d65 7468 6f64 2c20 6372 6561 ory method, crea │ │ │ -0004e040: 7465 2069 6e73 7461 6e63 6520 6f66 2046 te instance of F │ │ │ -0004e050: 6173 7442 696c 6174 6572 616c 536f 6c76 astBilateralSolv │ │ │ -0004e060: 6572 4669 6c74 6572 2061 6e64 2065 7865 erFilter and exe │ │ │ -0004e070: 6375 7465 2074 6865 2069 6e69 7469 616c cute the initial │ │ │ -0004e080: 697a 6174 696f 6e20 726f 7574 696e 6573 ization routines │ │ │ -0004e090: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 .
    .
    .
    P │ │ │ -0004e0b0: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ -0004e0c0: 3c64 643e 3c63 6f64 653e 6775 6964 653c
    guide< │ │ │ -0004e0d0: 2f63 6f64 653e 202d 2069 6d61 6765 2073 /code> - image s │ │ │ -0004e0e0: 6572 7669 6e67 2061 7320 6775 6964 6520 erving as guide │ │ │ -0004e0f0: 666f 7220 6669 6c74 6572 696e 672e 2049 for filtering. I │ │ │ -0004e100: 7420 7368 6f75 6c64 2068 6176 6520 382d t should have 8- │ │ │ -0004e110: 6269 7420 6465 7074 6820 616e 6420 6569 bit depth and ei │ │ │ -0004e120: 7468 6572 2031 206f 7220 3320 6368 616e ther 1 or 3 chan │ │ │ -0004e130: 6e65 6c73 2e3c 2f64 643e 0a3c 6464 3e3c nels.
    .
    < │ │ │ -0004e140: 636f 6465 3e73 6967 6d61 5f73 7061 7469 code>sigma_spati │ │ │ -0004e150: 616c 3c2f 636f 6465 3e20 2d20 7061 7261 al - para │ │ │ -0004e160: 6d65 7465 722c 2074 6861 7420 6973 2073 meter, that is s │ │ │ -0004e170: 696d 696c 6172 2074 6f20 7370 6174 6961 imilar to spatia │ │ │ -0004e180: 6c20 7370 6163 6520 7369 676d 6120 2862 l space sigma (b │ │ │ -0004e190: 616e 6477 6964 7468 2920 696e 2062 696c andwidth) in bil │ │ │ -0004e1a0: 6174 6572 616c 4669 6c74 6572 2e3c 2f64 ateralFilter..
    sig │ │ │ -0004e1c0: 6d61 5f6c 756d 613c 2f63 6f64 653e 202d ma_luma - │ │ │ -0004e1d0: 2070 6172 616d 6574 6572 2c20 7468 6174 parameter, that │ │ │ -0004e1e0: 2069 7320 7369 6d69 6c61 7220 746f 206c is similar to l │ │ │ -0004e1f0: 756d 6120 7370 6163 6520 7369 676d 6120 uma space sigma │ │ │ -0004e200: 2862 616e 6477 6964 7468 2920 696e 2062 (bandwidth) in b │ │ │ -0004e210: 696c 6174 6572 616c 4669 6c74 6572 2e3c ilateralFilter.< │ │ │ -0004e220: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e73 /dd>.
    s │ │ │ -0004e230: 6967 6d61 5f63 6872 6f6d 613c 2f63 6f64 igma_chroma - parameter, │ │ │ -0004e250: 7468 6174 2069 7320 7369 6d69 6c61 7220 that is similar │ │ │ -0004e260: 746f 2063 6872 6f6d 6120 7370 6163 6520 to chroma space │ │ │ -0004e270: 7369 676d 6120 2862 616e 6477 6964 7468 sigma (bandwidth │ │ │ -0004e280: 2920 696e 2062 696c 6174 6572 616c 4669 ) in bilateralFi │ │ │ -0004e290: 6c74 6572 2e3c 2f64 643e 0a3c 6464 3e3c lter.
    .
    < │ │ │ -0004e2a0: 636f 6465 3e6c 616d 6264 613c 2f63 6f64 code>lambda - smoothness │ │ │ -0004e2c0: 7374 7265 6e67 7468 2070 6172 616d 6574 strength paramet │ │ │ -0004e2d0: 6572 2066 6f72 2073 6f6c 7665 722e 0a0a er for solver... │ │ │ -0004e2e0: 0a0a 2046 6f72 206d 6f72 6520 6465 7461 .. For more deta │ │ │ -0004e2f0: 696c 7320 6162 6f75 7420 7468 6520 4661 ils about the Fa │ │ │ -0004e300: 7374 2042 696c 6174 6572 616c 2053 6f6c st Bilateral Sol │ │ │ -0004e310: 7665 7220 7061 7261 6d65 7465 7273 2c20 ver parameters, │ │ │ -0004e320: 7365 6520 7468 6520 6f72 6967 696e 616c see the original │ │ │ -0004e330: 2070 6170 6572 2043 4954 453a 2042 6172 paper CITE: Bar │ │ │ -0004e340: 726f 6e50 6f6f 6c65 3230 3136 2e3c 2f64 ronPoole2016..
    Returns:< │ │ │ -0004e360: 2f64 743e 0a3c 6464 3e61 7574 6f6d 6174 /dt>.
    automat │ │ │ -0004e370: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ -0004e380: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365
    .
    ..

  • .
  • .
    .

    cr │ │ │ -0004e410: 6561 7465 4661 7374 4269 6c61 7465 7261 eateFastBilatera │ │ │ -0004e420: 6c53 6f6c 7665 7246 696c 7465 723c 2f68 lSolverFilter.
    public │ │ │ -0004e470: 7374 6174 6963 3c2f 7370 616e 3e26 6e62 static&nb │ │ │ -0004e480: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;FastB │ │ │ -0004e4f0: 696c 6174 6572 616c 536f 6c76 6572 4669 ilateralSolverFi │ │ │ -0004e500: 6c74 6572 3c2f 613e 3c2f 7370 616e 3e26 lter& │ │ │ -0004e510: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ -0004e530: 6372 6561 7465 4661 7374 4269 6c61 7465 createFastBilate │ │ │ -0004e540: 7261 6c53 6f6c 7665 7246 696c 7465 723c ralSolverFilter< │ │ │ -0004e550: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(Mat gu │ │ │ -0004e5c0: 6964 652c 0a20 646f 7562 6c65 266e 6273 ide,. double&nbs │ │ │ -0004e5d0: 703b 7369 676d 615f 7370 6174 6961 6c2c p;sigma_spatial, │ │ │ -0004e5e0: 0a20 646f 7562 6c65 266e 6273 703b 7369 . double si │ │ │ -0004e5f0: 676d 615f 6c75 6d61 2c0a 2064 6f75 626c gma_luma,. doubl │ │ │ -0004e600: 6526 6e62 7370 3b73 6967 6d61 5f63 6872 e sigma_chr │ │ │ -0004e610: 6f6d 6129 3c2f 7370 616e 3e3c 2f64 6976 oma)
    .
    Factory met │ │ │ -0004e640: 686f 642c 2063 7265 6174 6520 696e 7374 hod, create inst │ │ │ -0004e650: 616e 6365 206f 6620 4661 7374 4269 6c61 ance of FastBila │ │ │ -0004e660: 7465 7261 6c53 6f6c 7665 7246 696c 7465 teralSolverFilte │ │ │ -0004e670: 7220 616e 6420 6578 6563 7574 6520 7468 r and execute th │ │ │ -0004e680: 6520 696e 6974 6961 6c69 7a61 7469 6f6e e initialization │ │ │ -0004e690: 2072 6f75 7469 6e65 732e 3c2f 6469 763e routines.
    │ │ │ -0004e6a0: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
    .
    Paramete │ │ │ -0004e6c0: 7273 3a3c 2f64 743e 0a3c 6464 3e3c 636f rs:
    .
    guide │ │ │ -0004e6e0: 2d20 696d 6167 6520 7365 7276 696e 6720 - image serving │ │ │ -0004e6f0: 6173 2067 7569 6465 2066 6f72 2066 696c as guide for fil │ │ │ -0004e700: 7465 7269 6e67 2e20 4974 2073 686f 756c tering. It shoul │ │ │ -0004e710: 6420 6861 7665 2038 2d62 6974 2064 6570 d have 8-bit dep │ │ │ -0004e720: 7468 2061 6e64 2065 6974 6865 7220 3120 th and either 1 │ │ │ -0004e730: 6f72 2033 2063 6861 6e6e 656c 732e 3c2f or 3 channels..
    si │ │ │ -0004e750: 676d 615f 7370 6174 6961 6c3c 2f63 6f64 gma_spatial - parameter, │ │ │ -0004e770: 7468 6174 2069 7320 7369 6d69 6c61 7220 that is similar │ │ │ -0004e780: 746f 2073 7061 7469 616c 2073 7061 6365 to spatial space │ │ │ -0004e790: 2073 6967 6d61 2028 6261 6e64 7769 6474 sigma (bandwidt │ │ │ -0004e7a0: 6829 2069 6e20 6269 6c61 7465 7261 6c46 h) in bilateralF │ │ │ -0004e7b0: 696c 7465 722e 3c2f 6464 3e0a 3c64 643e ilter.
    .
    │ │ │ -0004e7c0: 3c63 6f64 653e 7369 676d 615f 6c75 6d61 sigma_luma │ │ │ -0004e7d0: 3c2f 636f 6465 3e20 2d20 7061 7261 6d65 - parame │ │ │ -0004e7e0: 7465 722c 2074 6861 7420 6973 2073 696d ter, that is sim │ │ │ -0004e7f0: 696c 6172 2074 6f20 6c75 6d61 2073 7061 ilar to luma spa │ │ │ -0004e800: 6365 2073 6967 6d61 2028 6261 6e64 7769 ce sigma (bandwi │ │ │ -0004e810: 6474 6829 2069 6e20 6269 6c61 7465 7261 dth) in bilatera │ │ │ -0004e820: 6c46 696c 7465 722e 3c2f 6464 3e0a 3c64 lFilter.
    .sigma_ch │ │ │ -0004e840: 726f 6d61 3c2f 636f 6465 3e20 2d20 7061 roma - pa │ │ │ -0004e850: 7261 6d65 7465 722c 2074 6861 7420 6973 rameter, that is │ │ │ -0004e860: 2073 696d 696c 6172 2074 6f20 6368 726f similar to chro │ │ │ -0004e870: 6d61 2073 7061 6365 2073 6967 6d61 2028 ma space sigma ( │ │ │ -0004e880: 6261 6e64 7769 6474 6829 2069 6e20 6269 bandwidth) in bi │ │ │ -0004e890: 6c61 7465 7261 6c46 696c 7465 722e 0a0a lateralFilter... │ │ │ -0004e8a0: 0a0a 0a20 466f 7220 6d6f 7265 2064 6574 ... For more det │ │ │ -0004e8b0: 6169 6c73 2061 626f 7574 2074 6865 2046 ails about the F │ │ │ -0004e8c0: 6173 7420 4269 6c61 7465 7261 6c20 536f ast Bilateral So │ │ │ -0004e8d0: 6c76 6572 2070 6172 616d 6574 6572 732c lver parameters, │ │ │ -0004e8e0: 2073 6565 2074 6865 206f 7269 6769 6e61 see the origina │ │ │ -0004e8f0: 6c20 7061 7065 7220 4349 5445 3a20 4261 l paper CITE: Ba │ │ │ -0004e900: 7272 6f6e 506f 6f6c 6532 3031 362e 3c2f rronPoole2016..
    Returns: │ │ │ -0004e920: 3c2f 6474 3e0a 3c64 643e 6175 746f 6d61
    .
    automa │ │ │ -0004e930: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -0004e940: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
    .
    .
    .

  • ..
    .

    fastBilat │ │ │ -0004ea20: 6572 616c 536f 6c76 6572 4669 6c74 6572 eralSolverFilter │ │ │ -0004ea30: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ -0004ea70: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ -0004ea80: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ -0004eaa0: 766f 6964 3c2f 7370 616e 3e26 6e62 7370 void  │ │ │ -0004eab0: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;fast │ │ │ -0004ead0: 4269 6c61 7465 7261 6c53 6f6c 7665 7246 BilateralSolverF │ │ │ -0004eae0: 696c 7465 723c 2f73 7061 6e3e 3c77 6272 ilter(Mat&n │ │ │ -0004eb50: 6273 703b 6775 6964 652c 0a20 3c61 2068 bsp;guide,. Mat& │ │ │ -0004eba0: 6e62 7370 3b73 7263 2c0a 203c 6120 6872 nbsp;src,. Mat&n │ │ │ -0004ebf0: 6273 703b 636f 6e66 6964 656e 6365 2c0a bsp;confidence,. │ │ │ -0004ec00: 203c 6120 6872 6566 3d22 2e2e 2f63 6f72 Mat │ │ │ -0004ec40: 3c2f 613e 266e 6273 703b 6473 742c 0a20  dst,. │ │ │ -0004ec50: 646f 7562 6c65 266e 6273 703b 7369 676d double sigm │ │ │ -0004ec60: 615f 7370 6174 6961 6c2c 0a20 646f 7562 a_spatial,. doub │ │ │ -0004ec70: 6c65 266e 6273 703b 7369 676d 615f 6c75 le sigma_lu │ │ │ -0004ec80: 6d61 2c0a 2064 6f75 626c 6526 6e62 7370 ma,. double  │ │ │ -0004ec90: 3b73 6967 6d61 5f63 6872 6f6d 612c 0a20 ;sigma_chroma,. │ │ │ -0004eca0: 646f 7562 6c65 266e 6273 703b 6c61 6d62 double lamb │ │ │ -0004ecb0: 6461 2c0a 2069 6e74 266e 6273 703b 6e75 da,. int nu │ │ │ -0004ecc0: 6d5f 6974 6572 2c0a 2064 6f75 626c 6526 m_iter,. double& │ │ │ -0004ecd0: 6e62 7370 3b6d 6178 5f74 6f6c 293c 2f73 nbsp;max_tol)
    .
    Si │ │ │ -0004ed00: 6d70 6c65 206f 6e65 2d6c 696e 6520 4661 mple one-line Fa │ │ │ -0004ed10: 7374 2042 696c 6174 6572 616c 2053 6f6c st Bilateral Sol │ │ │ -0004ed20: 7665 7220 6669 6c74 6572 2063 616c 6c2e ver filter call. │ │ │ -0004ed30: 2049 6620 796f 7520 6861 7665 206d 756c If you have mul │ │ │ -0004ed40: 7469 706c 6520 696d 6167 6573 2074 6f20 tiple images to │ │ │ -0004ed50: 6669 6c74 6572 2077 6974 6820 7468 6520 filter with the │ │ │ -0004ed60: 7361 6d65 0a20 6775 6964 6520 7468 656e same. guide then │ │ │ -0004ed70: 2075 7365 2046 6173 7442 696c 6174 6572 use FastBilater │ │ │ -0004ed80: 616c 536f 6c76 6572 4669 6c74 6572 2069 alSolverFilter i │ │ │ -0004ed90: 6e74 6572 6661 6365 2074 6f20 6176 6f69 nterface to avoi │ │ │ -0004eda0: 6420 6578 7472 6120 636f 6d70 7574 6174 d extra computat │ │ │ -0004edb0: 696f 6e73 2e3c 2f64 6976 3e0a 3c64 6c20 ions.
    .
    .< │ │ │ -0004edd0: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
    gu │ │ │ -0004edf0: 6964 653c 2f63 6f64 653e 202d 2069 6d61 ide - ima │ │ │ -0004ee00: 6765 2073 6572 7669 6e67 2061 7320 6775 ge serving as gu │ │ │ -0004ee10: 6964 6520 666f 7220 6669 6c74 6572 696e ide for filterin │ │ │ -0004ee20: 672e 2049 7420 7368 6f75 6c64 2068 6176 g. It should hav │ │ │ -0004ee30: 6520 382d 6269 7420 6465 7074 6820 616e e 8-bit depth an │ │ │ -0004ee40: 6420 6569 7468 6572 2031 206f 7220 3320 d either 1 or 3 │ │ │ -0004ee50: 6368 616e 6e65 6c73 2e3c 2f64 643e 0a3c channels.
    .< │ │ │ -0004ee60: 6464 3e3c 636f 6465 3e73 7263 3c2f 636f dd>src - source ima │ │ │ -0004ee80: 6765 2066 6f72 2066 696c 7465 7269 6e67 ge for filtering │ │ │ -0004ee90: 2077 6974 6820 756e 7369 676e 6564 2038 with unsigned 8 │ │ │ -0004eea0: 2d62 6974 206f 7220 7369 676e 6564 2031 -bit or signed 1 │ │ │ -0004eeb0: 362d 6269 7420 6f72 2066 6c6f 6174 696e 6-bit or floatin │ │ │ -0004eec0: 672d 706f 696e 7420 3332 2d62 6974 2064 g-point 32-bit d │ │ │ -0004eed0: 6570 7468 2061 6e64 2075 7020 746f 2034 epth and up to 4 │ │ │ -0004eee0: 2063 6861 6e6e 656c 732e 3c2f 6464 3e0a channels.. │ │ │ -0004eef0: 3c64 643e 3c63 6f64 653e 636f 6e66 6964
    confid │ │ │ -0004ef00: 656e 6365 3c2f 636f 6465 3e20 2d20 636f ence - co │ │ │ -0004ef10: 6e66 6964 656e 6365 2069 6d61 6765 2077 nfidence image w │ │ │ -0004ef20: 6974 6820 756e 7369 676e 6564 2038 2d62 ith unsigned 8-b │ │ │ -0004ef30: 6974 206f 7220 666c 6f61 7469 6e67 2d70 it or floating-p │ │ │ -0004ef40: 6f69 6e74 2033 322d 6269 7420 636f 6e66 oint 32-bit conf │ │ │ -0004ef50: 6964 656e 6365 2061 6e64 2031 2063 6861 idence and 1 cha │ │ │ -0004ef60: 6e6e 656c 2e3c 2f64 643e 0a3c 6464 3e3c nnel.
    .
    < │ │ │ -0004ef70: 636f 6465 3e64 7374 3c2f 636f 6465 3e20 code>dst │ │ │ -0004ef80: 2d20 6465 7374 696e 6174 696f 6e20 696d - destination im │ │ │ -0004ef90: 6167 652e 3c2f 6464 3e0a 3c64 643e 3c63 age.
    .
    sigma_spatia │ │ │ -0004efb0: 6c3c 2f63 6f64 653e 202d 2070 6172 616d l - param │ │ │ -0004efc0: 6574 6572 2c20 7468 6174 2069 7320 7369 eter, that is si │ │ │ -0004efd0: 6d69 6c61 7220 746f 2073 7061 7469 616c milar to spatial │ │ │ -0004efe0: 2073 7061 6365 2073 6967 6d61 2028 6261 space sigma (ba │ │ │ -0004eff0: 6e64 7769 6474 6829 2069 6e20 6269 6c61 ndwidth) in bila │ │ │ -0004f000: 7465 7261 6c46 696c 7465 722e 3c2f 6464 teralFilter.
    .
    sigm │ │ │ -0004f020: 615f 6c75 6d61 3c2f 636f 6465 3e20 2d20 a_luma - │ │ │ -0004f030: 7061 7261 6d65 7465 722c 2074 6861 7420 parameter, that │ │ │ -0004f040: 6973 2073 696d 696c 6172 2074 6f20 6c75 is similar to lu │ │ │ -0004f050: 6d61 2073 7061 6365 2073 6967 6d61 2028 ma space sigma ( │ │ │ -0004f060: 6261 6e64 7769 6474 6829 2069 6e20 6269 bandwidth) in bi │ │ │ -0004f070: 6c61 7465 7261 6c46 696c 7465 722e 3c2f lateralFilter..
    si │ │ │ -0004f090: 676d 615f 6368 726f 6d61 3c2f 636f 6465 gma_chroma - parameter, t │ │ │ -0004f0b0: 6861 7420 6973 2073 696d 696c 6172 2074 hat is similar t │ │ │ -0004f0c0: 6f20 6368 726f 6d61 2073 7061 6365 2073 o chroma space s │ │ │ -0004f0d0: 6967 6d61 2028 6261 6e64 7769 6474 6829 igma (bandwidth) │ │ │ -0004f0e0: 2069 6e20 6269 6c61 7465 7261 6c46 696c in bilateralFil │ │ │ -0004f0f0: 7465 722e 3c2f 6464 3e0a 3c64 643e 3c63 ter.
    .
    lambda - smoothness s │ │ │ -0004f120: 7472 656e 6774 6820 7061 7261 6d65 7465 trength paramete │ │ │ -0004f130: 7220 666f 7220 736f 6c76 6572 2e3c 2f64 r for solver..
    num │ │ │ -0004f150: 5f69 7465 723c 2f63 6f64 653e 202d 206e _iter - n │ │ │ -0004f160: 756d 6265 7220 6f66 2069 7465 7261 7469 umber of iterati │ │ │ -0004f170: 6f6e 7320 7573 6564 2066 6f72 2073 6f6c ons used for sol │ │ │ -0004f180: 7665 722c 2032 3520 6973 2075 7375 616c ver, 25 is usual │ │ │ -0004f190: 6c79 2065 6e6f 7567 682e 3c2f 6464 3e0a ly enough.
    . │ │ │ -0004f1a0: 3c64 643e 3c63 6f64 653e 6d61 785f 746f
    max_to │ │ │ -0004f1b0: 6c3c 2f63 6f64 653e 202d 2063 6f6e 7665 l - conve │ │ │ -0004f1c0: 7267 656e 6365 2074 6f6c 6572 616e 6365 rgence tolerance │ │ │ -0004f1d0: 2075 7365 6420 666f 7220 736f 6c76 6572 used for solver │ │ │ -0004f1e0: 2e0a 0a20 466f 7220 6d6f 7265 2064 6574 ... For more det │ │ │ -0004f1f0: 6169 6c73 2061 626f 7574 2074 6865 2046 ails about the F │ │ │ -0004f200: 6173 7420 4269 6c61 7465 7261 6c20 536f ast Bilateral So │ │ │ -0004f210: 6c76 6572 2070 6172 616d 6574 6572 732c lver parameters, │ │ │ -0004f220: 2073 6565 2074 6865 206f 7269 6769 6e61 see the origina │ │ │ -0004f230: 6c20 7061 7065 7220 4349 5445 3a20 4261 l paper CITE: Ba │ │ │ -0004f240: 7272 6f6e 506f 6f6c 6532 3031 362e 0a0a rronPoole2016... │ │ │ -0004f250: 203c 623e 4e6f 7465 3a3c 2f62 3e20 436f Note: Co │ │ │ -0004f260: 6e66 6964 656e 6365 2069 6d61 6765 7320 nfidence images │ │ │ -0004f270: 7769 7468 2043 565f 3855 2064 6570 7468 with CV_8U depth │ │ │ -0004f280: 2061 7265 2065 7870 6563 7465 6420 746f are expected to │ │ │ -0004f290: 2069 6e20 5b30 2c20 3235 355d 2061 6e64 in [0, 255] and │ │ │ -0004f2a0: 2043 565f 3332 4620 696e 205b 302c 2031 CV_32F in [0, 1 │ │ │ -0004f2b0: 5d20 7261 6e67 652e 3c2f 6464 3e0a 3c2f ] range.
    ..
    .< │ │ │ -0004f2d0: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    fastBilat │ │ │ -0004f390: 6572 616c 536f 6c76 6572 4669 6c74 6572 eralSolverFilter │ │ │ -0004f3a0: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ -0004f3e0: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ -0004f3f0: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ -0004f410: 766f 6964 3c2f 7370 616e 3e26 6e62 7370 void  │ │ │ -0004f420: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;fast │ │ │ -0004f440: 4269 6c61 7465 7261 6c53 6f6c 7665 7246 BilateralSolverF │ │ │ -0004f450: 696c 7465 723c 2f73 7061 6e3e 3c77 6272 ilter(Mat&n │ │ │ -0004f4c0: 6273 703b 6775 6964 652c 0a20 3c61 2068 bsp;guide,. Mat& │ │ │ -0004f510: 6e62 7370 3b73 7263 2c0a 203c 6120 6872 nbsp;src,. Mat&n │ │ │ -0004f560: 6273 703b 636f 6e66 6964 656e 6365 2c0a bsp;confidence,. │ │ │ -0004f570: 203c 6120 6872 6566 3d22 2e2e 2f63 6f72 Mat │ │ │ -0004f5b0: 3c2f 613e 266e 6273 703b 6473 742c 0a20  dst,. │ │ │ -0004f5c0: 646f 7562 6c65 266e 6273 703b 7369 676d double sigm │ │ │ -0004f5d0: 615f 7370 6174 6961 6c2c 0a20 646f 7562 a_spatial,. doub │ │ │ -0004f5e0: 6c65 266e 6273 703b 7369 676d 615f 6c75 le sigma_lu │ │ │ -0004f5f0: 6d61 2c0a 2064 6f75 626c 6526 6e62 7370 ma,. double  │ │ │ -0004f600: 3b73 6967 6d61 5f63 6872 6f6d 612c 0a20 ;sigma_chroma,. │ │ │ -0004f610: 646f 7562 6c65 266e 6273 703b 6c61 6d62 double lamb │ │ │ -0004f620: 6461 2c0a 2069 6e74 266e 6273 703b 6e75 da,. int nu │ │ │ -0004f630: 6d5f 6974 6572 293c 2f73 7061 6e3e 3c2f m_iter).
    Simple o │ │ │ -0004f660: 6e65 2d6c 696e 6520 4661 7374 2042 696c ne-line Fast Bil │ │ │ -0004f670: 6174 6572 616c 2053 6f6c 7665 7220 6669 ateral Solver fi │ │ │ -0004f680: 6c74 6572 2063 616c 6c2e 2049 6620 796f lter call. If yo │ │ │ -0004f690: 7520 6861 7665 206d 756c 7469 706c 6520 u have multiple │ │ │ -0004f6a0: 696d 6167 6573 2074 6f20 6669 6c74 6572 images to filter │ │ │ -0004f6b0: 2077 6974 6820 7468 6520 7361 6d65 0a20 with the same. │ │ │ -0004f6c0: 6775 6964 6520 7468 656e 2075 7365 2046 guide then use F │ │ │ -0004f6d0: 6173 7442 696c 6174 6572 616c 536f 6c76 astBilateralSolv │ │ │ -0004f6e0: 6572 4669 6c74 6572 2069 6e74 6572 6661 erFilter interfa │ │ │ -0004f6f0: 6365 2074 6f20 6176 6f69 6420 6578 7472 ce to avoid extr │ │ │ -0004f700: 6120 636f 6d70 7574 6174 696f 6e73 2e3c a computations.< │ │ │ -0004f710: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ -0004f730: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .guide - image ser │ │ │ -0004f760: 7669 6e67 2061 7320 6775 6964 6520 666f ving as guide fo │ │ │ -0004f770: 7220 6669 6c74 6572 696e 672e 2049 7420 r filtering. It │ │ │ -0004f780: 7368 6f75 6c64 2068 6176 6520 382d 6269 should have 8-bi │ │ │ -0004f790: 7420 6465 7074 6820 616e 6420 6569 7468 t depth and eith │ │ │ -0004f7a0: 6572 2031 206f 7220 3320 6368 616e 6e65 er 1 or 3 channe │ │ │ -0004f7b0: 6c73 2e3c 2f64 643e 0a3c 6464 3e3c 636f ls..
    src - │ │ │ -0004f7d0: 736f 7572 6365 2069 6d61 6765 2066 6f72 source image for │ │ │ -0004f7e0: 2066 696c 7465 7269 6e67 2077 6974 6820 filtering with │ │ │ -0004f7f0: 756e 7369 676e 6564 2038 2d62 6974 206f unsigned 8-bit o │ │ │ -0004f800: 7220 7369 676e 6564 2031 362d 6269 7420 r signed 16-bit │ │ │ -0004f810: 6f72 2066 6c6f 6174 696e 672d 706f 696e or floating-poin │ │ │ -0004f820: 7420 3332 2d62 6974 2064 6570 7468 2061 t 32-bit depth a │ │ │ -0004f830: 6e64 2075 7020 746f 2034 2063 6861 6e6e nd up to 4 chann │ │ │ -0004f840: 656c 732e 3c2f 6464 3e0a 3c64 643e 3c63 els.
    .
    confidence - confiden │ │ │ -0004f870: 6365 2069 6d61 6765 2077 6974 6820 756e ce image with un │ │ │ -0004f880: 7369 676e 6564 2038 2d62 6974 206f 7220 signed 8-bit or │ │ │ -0004f890: 666c 6f61 7469 6e67 2d70 6f69 6e74 2033 floating-point 3 │ │ │ -0004f8a0: 322d 6269 7420 636f 6e66 6964 656e 6365 2-bit confidence │ │ │ -0004f8b0: 2061 6e64 2031 2063 6861 6e6e 656c 2e3c and 1 channel.< │ │ │ -0004f8c0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e64 /dd>.
    d │ │ │ -0004f8d0: 7374 3c2f 636f 6465 3e20 2d20 6465 7374 st - dest │ │ │ -0004f8e0: 696e 6174 696f 6e20 696d 6167 652e 3c2f ination image..
    si │ │ │ -0004f900: 676d 615f 7370 6174 6961 6c3c 2f63 6f64 gma_spatial - parameter, │ │ │ -0004f920: 7468 6174 2069 7320 7369 6d69 6c61 7220 that is similar │ │ │ -0004f930: 746f 2073 7061 7469 616c 2073 7061 6365 to spatial space │ │ │ -0004f940: 2073 6967 6d61 2028 6261 6e64 7769 6474 sigma (bandwidt │ │ │ -0004f950: 6829 2069 6e20 6269 6c61 7465 7261 6c46 h) in bilateralF │ │ │ -0004f960: 696c 7465 722e 3c2f 6464 3e0a 3c64 643e ilter.
    .
    │ │ │ -0004f970: 3c63 6f64 653e 7369 676d 615f 6c75 6d61 sigma_luma │ │ │ -0004f980: 3c2f 636f 6465 3e20 2d20 7061 7261 6d65 - parame │ │ │ -0004f990: 7465 722c 2074 6861 7420 6973 2073 696d ter, that is sim │ │ │ -0004f9a0: 696c 6172 2074 6f20 6c75 6d61 2073 7061 ilar to luma spa │ │ │ -0004f9b0: 6365 2073 6967 6d61 2028 6261 6e64 7769 ce sigma (bandwi │ │ │ -0004f9c0: 6474 6829 2069 6e20 6269 6c61 7465 7261 dth) in bilatera │ │ │ -0004f9d0: 6c46 696c 7465 722e 3c2f 6464 3e0a 3c64 lFilter.
    .sigma_ch │ │ │ -0004f9f0: 726f 6d61 3c2f 636f 6465 3e20 2d20 7061 roma - pa │ │ │ -0004fa00: 7261 6d65 7465 722c 2074 6861 7420 6973 rameter, that is │ │ │ -0004fa10: 2073 696d 696c 6172 2074 6f20 6368 726f similar to chro │ │ │ -0004fa20: 6d61 2073 7061 6365 2073 6967 6d61 2028 ma space sigma ( │ │ │ -0004fa30: 6261 6e64 7769 6474 6829 2069 6e20 6269 bandwidth) in bi │ │ │ -0004fa40: 6c61 7465 7261 6c46 696c 7465 722e 3c2f lateralFilter..
    la │ │ │ -0004fa60: 6d62 6461 3c2f 636f 6465 3e20 2d20 736d mbda - sm │ │ │ -0004fa70: 6f6f 7468 6e65 7373 2073 7472 656e 6774 oothness strengt │ │ │ -0004fa80: 6820 7061 7261 6d65 7465 7220 666f 7220 h parameter for │ │ │ -0004fa90: 736f 6c76 6572 2e3c 2f64 643e 0a3c 6464 solver.
    .
    num_iter< │ │ │ -0004fab0: 2f63 6f64 653e 202d 206e 756d 6265 7220 /code> - number │ │ │ -0004fac0: 6f66 2069 7465 7261 7469 6f6e 7320 7573 of iterations us │ │ │ -0004fad0: 6564 2066 6f72 2073 6f6c 7665 722c 2032 ed for solver, 2 │ │ │ -0004fae0: 3520 6973 2075 7375 616c 6c79 2065 6e6f 5 is usually eno │ │ │ -0004faf0: 7567 682e 0a0a 0a20 466f 7220 6d6f 7265 ugh.... For more │ │ │ -0004fb00: 2064 6574 6169 6c73 2061 626f 7574 2074 details about t │ │ │ -0004fb10: 6865 2046 6173 7420 4269 6c61 7465 7261 he Fast Bilatera │ │ │ -0004fb20: 6c20 536f 6c76 6572 2070 6172 616d 6574 l Solver paramet │ │ │ -0004fb30: 6572 732c 2073 6565 2074 6865 206f 7269 ers, see the ori │ │ │ -0004fb40: 6769 6e61 6c20 7061 7065 7220 4349 5445 ginal paper CITE │ │ │ -0004fb50: 3a20 4261 7272 6f6e 506f 6f6c 6532 3031 : BarronPoole201 │ │ │ -0004fb60: 362e 0a0a 203c 623e 4e6f 7465 3a3c 2f62 6... Note: Confidence ima │ │ │ -0004fb80: 6765 7320 7769 7468 2043 565f 3855 2064 ges with CV_8U d │ │ │ -0004fb90: 6570 7468 2061 7265 2065 7870 6563 7465 epth are expecte │ │ │ -0004fba0: 6420 746f 2069 6e20 5b30 2c20 3235 355d d to in [0, 255] │ │ │ -0004fbb0: 2061 6e64 2043 565f 3332 4620 696e 205b and CV_32F in [ │ │ │ -0004fbc0: 302c 2031 5d20 7261 6e67 652e 3c2f 6464 0, 1] range.
    .
    ..
  • .
  • ..

    fastBilat │ │ │ -0004fca0: 6572 616c 536f 6c76 6572 4669 6c74 6572 eralSolverFilter │ │ │ -0004fcb0: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ -0004fcf0: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ -0004fd00: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ -0004fd20: 766f 6964 3c2f 7370 616e 3e26 6e62 7370 void  │ │ │ -0004fd30: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;fast │ │ │ -0004fd50: 4269 6c61 7465 7261 6c53 6f6c 7665 7246 BilateralSolverF │ │ │ -0004fd60: 696c 7465 723c 2f73 7061 6e3e 3c77 6272 ilter(Mat&n │ │ │ -0004fdd0: 6273 703b 6775 6964 652c 0a20 3c61 2068 bsp;guide,. Mat& │ │ │ -0004fe20: 6e62 7370 3b73 7263 2c0a 203c 6120 6872 nbsp;src,. Mat&n │ │ │ -0004fe70: 6273 703b 636f 6e66 6964 656e 6365 2c0a bsp;confidence,. │ │ │ -0004fe80: 203c 6120 6872 6566 3d22 2e2e 2f63 6f72 Mat │ │ │ -0004fec0: 3c2f 613e 266e 6273 703b 6473 742c 0a20  dst,. │ │ │ -0004fed0: 646f 7562 6c65 266e 6273 703b 7369 676d double sigm │ │ │ -0004fee0: 615f 7370 6174 6961 6c2c 0a20 646f 7562 a_spatial,. doub │ │ │ -0004fef0: 6c65 266e 6273 703b 7369 676d 615f 6c75 le sigma_lu │ │ │ -0004ff00: 6d61 2c0a 2064 6f75 626c 6526 6e62 7370 ma,. double  │ │ │ -0004ff10: 3b73 6967 6d61 5f63 6872 6f6d 612c 0a20 ;sigma_chroma,. │ │ │ -0004ff20: 646f 7562 6c65 266e 6273 703b 6c61 6d62 double lamb │ │ │ -0004ff30: 6461 293c 2f73 7061 6e3e 3c2f 6469 763e da)
    │ │ │ -0004ff40: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
    Simple one-l │ │ │ -0004ff60: 696e 6520 4661 7374 2042 696c 6174 6572 ine Fast Bilater │ │ │ -0004ff70: 616c 2053 6f6c 7665 7220 6669 6c74 6572 al Solver filter │ │ │ -0004ff80: 2063 616c 6c2e 2049 6620 796f 7520 6861 call. If you ha │ │ │ -0004ff90: 7665 206d 756c 7469 706c 6520 696d 6167 ve multiple imag │ │ │ -0004ffa0: 6573 2074 6f20 6669 6c74 6572 2077 6974 es to filter wit │ │ │ -0004ffb0: 6820 7468 6520 7361 6d65 0a20 6775 6964 h the same. guid │ │ │ -0004ffc0: 6520 7468 656e 2075 7365 2046 6173 7442 e then use FastB │ │ │ -0004ffd0: 696c 6174 6572 616c 536f 6c76 6572 4669 ilateralSolverFi │ │ │ -0004ffe0: 6c74 6572 2069 6e74 6572 6661 6365 2074 lter interface t │ │ │ -0004fff0: 6f20 6176 6f69 6420 6578 7472 6120 636f o avoid extra co │ │ │ -00050000: 6d70 7574 6174 696f 6e73 2e3c 2f64 6976 mputations.
    .
    .
    Paramet │ │ │ -00050030: 6572 733a 3c2f 6474 3e0a 3c64 643e 3c63 ers:
    .
    guide │ │ │ -00050050: 202d 2069 6d61 6765 2073 6572 7669 6e67 - image serving │ │ │ -00050060: 2061 7320 6775 6964 6520 666f 7220 6669 as guide for fi │ │ │ -00050070: 6c74 6572 696e 672e 2049 7420 7368 6f75 ltering. It shou │ │ │ -00050080: 6c64 2068 6176 6520 382d 6269 7420 6465 ld have 8-bit de │ │ │ -00050090: 7074 6820 616e 6420 6569 7468 6572 2031 pth and either 1 │ │ │ -000500a0: 206f 7220 3320 6368 616e 6e65 6c73 2e3c or 3 channels.< │ │ │ -000500b0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e73 /dd>.
    s │ │ │ -000500c0: 7263 3c2f 636f 6465 3e20 2d20 736f 7572 rc - sour │ │ │ -000500d0: 6365 2069 6d61 6765 2066 6f72 2066 696c ce image for fil │ │ │ -000500e0: 7465 7269 6e67 2077 6974 6820 756e 7369 tering with unsi │ │ │ -000500f0: 676e 6564 2038 2d62 6974 206f 7220 7369 gned 8-bit or si │ │ │ -00050100: 676e 6564 2031 362d 6269 7420 6f72 2066 gned 16-bit or f │ │ │ -00050110: 6c6f 6174 696e 672d 706f 696e 7420 3332 loating-point 32 │ │ │ -00050120: 2d62 6974 2064 6570 7468 2061 6e64 2075 -bit depth and u │ │ │ -00050130: 7020 746f 2034 2063 6861 6e6e 656c 732e p to 4 channels. │ │ │ -00050140: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -00050150: 636f 6e66 6964 656e 6365 3c2f 636f 6465 confidence - confidence i │ │ │ -00050170: 6d61 6765 2077 6974 6820 756e 7369 676e mage with unsign │ │ │ -00050180: 6564 2038 2d62 6974 206f 7220 666c 6f61 ed 8-bit or floa │ │ │ -00050190: 7469 6e67 2d70 6f69 6e74 2033 322d 6269 ting-point 32-bi │ │ │ -000501a0: 7420 636f 6e66 6964 656e 6365 2061 6e64 t confidence and │ │ │ -000501b0: 2031 2063 6861 6e6e 656c 2e3c 2f64 643e 1 channel.
    │ │ │ -000501c0: 0a3c 6464 3e3c 636f 6465 3e64 7374 3c2f .
    dst - destinat │ │ │ -000501e0: 696f 6e20 696d 6167 652e 3c2f 6464 3e0a ion image.
    . │ │ │ -000501f0: 3c64 643e 3c63 6f64 653e 7369 676d 615f
    sigma_ │ │ │ -00050200: 7370 6174 6961 6c3c 2f63 6f64 653e 202d spatial - │ │ │ -00050210: 2070 6172 616d 6574 6572 2c20 7468 6174 parameter, that │ │ │ -00050220: 2069 7320 7369 6d69 6c61 7220 746f 2073 is similar to s │ │ │ -00050230: 7061 7469 616c 2073 7061 6365 2073 6967 patial space sig │ │ │ -00050240: 6d61 2028 6261 6e64 7769 6474 6829 2069 ma (bandwidth) i │ │ │ -00050250: 6e20 6269 6c61 7465 7261 6c46 696c 7465 n bilateralFilte │ │ │ -00050260: 722e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 r.
    .
    sigma_luma - parameter, │ │ │ -00050290: 2074 6861 7420 6973 2073 696d 696c 6172 that is similar │ │ │ -000502a0: 2074 6f20 6c75 6d61 2073 7061 6365 2073 to luma space s │ │ │ -000502b0: 6967 6d61 2028 6261 6e64 7769 6474 6829 igma (bandwidth) │ │ │ -000502c0: 2069 6e20 6269 6c61 7465 7261 6c46 696c in bilateralFil │ │ │ -000502d0: 7465 722e 3c2f 6464 3e0a 3c64 643e 3c63 ter.
    .
    sigma_chroma │ │ │ -000502f0: 3c2f 636f 6465 3e20 2d20 7061 7261 6d65 - parame │ │ │ -00050300: 7465 722c 2074 6861 7420 6973 2073 696d ter, that is sim │ │ │ -00050310: 696c 6172 2074 6f20 6368 726f 6d61 2073 ilar to chroma s │ │ │ -00050320: 7061 6365 2073 6967 6d61 2028 6261 6e64 pace sigma (band │ │ │ -00050330: 7769 6474 6829 2069 6e20 6269 6c61 7465 width) in bilate │ │ │ -00050340: 7261 6c46 696c 7465 722e 3c2f 6464 3e0a ralFilter.
    . │ │ │ -00050350: 3c64 643e 3c63 6f64 653e 6c61 6d62 6461
    lambda │ │ │ -00050360: 3c2f 636f 6465 3e20 2d20 736d 6f6f 7468 - smooth │ │ │ -00050370: 6e65 7373 2073 7472 656e 6774 6820 7061 ness strength pa │ │ │ -00050380: 7261 6d65 7465 7220 666f 7220 736f 6c76 rameter for solv │ │ │ -00050390: 6572 2e0a 0a0a 0a20 466f 7220 6d6f 7265 er..... For more │ │ │ -000503a0: 2064 6574 6169 6c73 2061 626f 7574 2074 details about t │ │ │ -000503b0: 6865 2046 6173 7420 4269 6c61 7465 7261 he Fast Bilatera │ │ │ -000503c0: 6c20 536f 6c76 6572 2070 6172 616d 6574 l Solver paramet │ │ │ -000503d0: 6572 732c 2073 6565 2074 6865 206f 7269 ers, see the ori │ │ │ -000503e0: 6769 6e61 6c20 7061 7065 7220 4349 5445 ginal paper CITE │ │ │ -000503f0: 3a20 4261 7272 6f6e 506f 6f6c 6532 3031 : BarronPoole201 │ │ │ -00050400: 362e 0a0a 203c 623e 4e6f 7465 3a3c 2f62 6... Note: Confidence ima │ │ │ -00050420: 6765 7320 7769 7468 2043 565f 3855 2064 ges with CV_8U d │ │ │ -00050430: 6570 7468 2061 7265 2065 7870 6563 7465 epth are expecte │ │ │ -00050440: 6420 746f 2069 6e20 5b30 2c20 3235 355d d to in [0, 255] │ │ │ -00050450: 2061 6e64 2043 565f 3332 4620 696e 205b and CV_32F in [ │ │ │ -00050460: 302c 2031 5d20 7261 6e67 652e 3c2f 6464 0, 1] range.
    .
    ..
  • .
  • ..

    │ │ │ -00050530: 6661 7374 4269 6c61 7465 7261 6c53 6f6c fastBilateralSol │ │ │ -00050540: 7665 7246 696c 7465 723c 2f68 333e 0a3c verFilter

    .< │ │ │ -00050550: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ -00050560: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ -00050590: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ -000505a0: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ -000505b0: 726e 2d74 7970 6522 3e76 6f69 643c 2f73 rn-type">void
     fastBilater │ │ │ -000505f0: 616c 536f 6c76 6572 4669 6c74 6572 3c2f alSolverFilter( │ │ │ -00050660: 4d61 743c 2f61 3e26 6e62 7370 3b67 7569 Mat gui │ │ │ -00050670: 6465 2c0a 203c 6120 6872 6566 3d22 2e2e de,. Mat sr │ │ │ -000506c0: 632c 0a20 3c61 2068 7265 663d 222e 2e2f c,. │ │ │ -00050700: 4d61 743c 2f61 3e26 6e62 7370 3b63 6f6e Mat con │ │ │ -00050710: 6669 6465 6e63 652c 0a20 3c61 2068 7265 fidence,. Mat&nb │ │ │ -00050760: 7370 3b64 7374 2c0a 2064 6f75 626c 6526 sp;dst,. double& │ │ │ -00050770: 6e62 7370 3b73 6967 6d61 5f73 7061 7469 nbsp;sigma_spati │ │ │ -00050780: 616c 2c0a 2064 6f75 626c 6526 6e62 7370 al,. double  │ │ │ -00050790: 3b73 6967 6d61 5f6c 756d 612c 0a20 646f ;sigma_luma,. do │ │ │ -000507a0: 7562 6c65 266e 6273 703b 7369 676d 615f uble sigma_ │ │ │ -000507b0: 6368 726f 6d61 293c 2f73 7061 6e3e 3c2f chroma).
    Simple o │ │ │ -000507e0: 6e65 2d6c 696e 6520 4661 7374 2042 696c ne-line Fast Bil │ │ │ -000507f0: 6174 6572 616c 2053 6f6c 7665 7220 6669 ateral Solver fi │ │ │ -00050800: 6c74 6572 2063 616c 6c2e 2049 6620 796f lter call. If yo │ │ │ -00050810: 7520 6861 7665 206d 756c 7469 706c 6520 u have multiple │ │ │ -00050820: 696d 6167 6573 2074 6f20 6669 6c74 6572 images to filter │ │ │ -00050830: 2077 6974 6820 7468 6520 7361 6d65 0a20 with the same. │ │ │ -00050840: 6775 6964 6520 7468 656e 2075 7365 2046 guide then use F │ │ │ -00050850: 6173 7442 696c 6174 6572 616c 536f 6c76 astBilateralSolv │ │ │ -00050860: 6572 4669 6c74 6572 2069 6e74 6572 6661 erFilter interfa │ │ │ -00050870: 6365 2074 6f20 6176 6f69 6420 6578 7472 ce to avoid extr │ │ │ -00050880: 6120 636f 6d70 7574 6174 696f 6e73 2e3c a computations.< │ │ │ -00050890: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ -000508b0: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .guide - image ser │ │ │ -000508e0: 7669 6e67 2061 7320 6775 6964 6520 666f ving as guide fo │ │ │ -000508f0: 7220 6669 6c74 6572 696e 672e 2049 7420 r filtering. It │ │ │ -00050900: 7368 6f75 6c64 2068 6176 6520 382d 6269 should have 8-bi │ │ │ -00050910: 7420 6465 7074 6820 616e 6420 6569 7468 t depth and eith │ │ │ -00050920: 6572 2031 206f 7220 3320 6368 616e 6e65 er 1 or 3 channe │ │ │ -00050930: 6c73 2e3c 2f64 643e 0a3c 6464 3e3c 636f ls..
    src - │ │ │ -00050950: 736f 7572 6365 2069 6d61 6765 2066 6f72 source image for │ │ │ -00050960: 2066 696c 7465 7269 6e67 2077 6974 6820 filtering with │ │ │ -00050970: 756e 7369 676e 6564 2038 2d62 6974 206f unsigned 8-bit o │ │ │ -00050980: 7220 7369 676e 6564 2031 362d 6269 7420 r signed 16-bit │ │ │ -00050990: 6f72 2066 6c6f 6174 696e 672d 706f 696e or floating-poin │ │ │ -000509a0: 7420 3332 2d62 6974 2064 6570 7468 2061 t 32-bit depth a │ │ │ -000509b0: 6e64 2075 7020 746f 2034 2063 6861 6e6e nd up to 4 chann │ │ │ -000509c0: 656c 732e 3c2f 6464 3e0a 3c64 643e 3c63 els.
    .
    confidence - confiden │ │ │ -000509f0: 6365 2069 6d61 6765 2077 6974 6820 756e ce image with un │ │ │ -00050a00: 7369 676e 6564 2038 2d62 6974 206f 7220 signed 8-bit or │ │ │ -00050a10: 666c 6f61 7469 6e67 2d70 6f69 6e74 2033 floating-point 3 │ │ │ -00050a20: 322d 6269 7420 636f 6e66 6964 656e 6365 2-bit confidence │ │ │ -00050a30: 2061 6e64 2031 2063 6861 6e6e 656c 2e3c and 1 channel.< │ │ │ -00050a40: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e64 /dd>.
    d │ │ │ -00050a50: 7374 3c2f 636f 6465 3e20 2d20 6465 7374 st - dest │ │ │ -00050a60: 696e 6174 696f 6e20 696d 6167 652e 3c2f ination image..
    si │ │ │ -00050a80: 676d 615f 7370 6174 6961 6c3c 2f63 6f64 gma_spatial - parameter, │ │ │ -00050aa0: 7468 6174 2069 7320 7369 6d69 6c61 7220 that is similar │ │ │ -00050ab0: 746f 2073 7061 7469 616c 2073 7061 6365 to spatial space │ │ │ -00050ac0: 2073 6967 6d61 2028 6261 6e64 7769 6474 sigma (bandwidt │ │ │ -00050ad0: 6829 2069 6e20 6269 6c61 7465 7261 6c46 h) in bilateralF │ │ │ -00050ae0: 696c 7465 722e 3c2f 6464 3e0a 3c64 643e ilter.
    .
    │ │ │ -00050af0: 3c63 6f64 653e 7369 676d 615f 6c75 6d61 sigma_luma │ │ │ -00050b00: 3c2f 636f 6465 3e20 2d20 7061 7261 6d65 - parame │ │ │ -00050b10: 7465 722c 2074 6861 7420 6973 2073 696d ter, that is sim │ │ │ -00050b20: 696c 6172 2074 6f20 6c75 6d61 2073 7061 ilar to luma spa │ │ │ -00050b30: 6365 2073 6967 6d61 2028 6261 6e64 7769 ce sigma (bandwi │ │ │ -00050b40: 6474 6829 2069 6e20 6269 6c61 7465 7261 dth) in bilatera │ │ │ -00050b50: 6c46 696c 7465 722e 3c2f 6464 3e0a 3c64 lFilter.
    .sigma_ch │ │ │ -00050b70: 726f 6d61 3c2f 636f 6465 3e20 2d20 7061 roma - pa │ │ │ -00050b80: 7261 6d65 7465 722c 2074 6861 7420 6973 rameter, that is │ │ │ -00050b90: 2073 696d 696c 6172 2074 6f20 6368 726f similar to chro │ │ │ -00050ba0: 6d61 2073 7061 6365 2073 6967 6d61 2028 ma space sigma ( │ │ │ -00050bb0: 6261 6e64 7769 6474 6829 2069 6e20 6269 bandwidth) in bi │ │ │ -00050bc0: 6c61 7465 7261 6c46 696c 7465 722e 0a0a lateralFilter... │ │ │ -00050bd0: 0a0a 0a20 466f 7220 6d6f 7265 2064 6574 ... For more det │ │ │ -00050be0: 6169 6c73 2061 626f 7574 2074 6865 2046 ails about the F │ │ │ -00050bf0: 6173 7420 4269 6c61 7465 7261 6c20 536f ast Bilateral So │ │ │ -00050c00: 6c76 6572 2070 6172 616d 6574 6572 732c lver parameters, │ │ │ -00050c10: 2073 6565 2074 6865 206f 7269 6769 6e61 see the origina │ │ │ -00050c20: 6c20 7061 7065 7220 4349 5445 3a20 4261 l paper CITE: Ba │ │ │ -00050c30: 7272 6f6e 506f 6f6c 6532 3031 362e 0a0a rronPoole2016... │ │ │ -00050c40: 203c 623e 4e6f 7465 3a3c 2f62 3e20 436f Note: Co │ │ │ -00050c50: 6e66 6964 656e 6365 2069 6d61 6765 7320 nfidence images │ │ │ -00050c60: 7769 7468 2043 565f 3855 2064 6570 7468 with CV_8U depth │ │ │ -00050c70: 2061 7265 2065 7870 6563 7465 6420 746f are expected to │ │ │ -00050c80: 2069 6e20 5b30 2c20 3235 355d 2061 6e64 in [0, 255] and │ │ │ -00050c90: 2043 565f 3332 4620 696e 205b 302c 2031 CV_32F in [0, 1 │ │ │ -00050ca0: 5d20 7261 6e67 652e 3c2f 6464 3e0a 3c2f ] range....< │ │ │ -00050cc0: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • . │ │ │ -00050d60: 0a3c 6833 3e66 6173 7442 696c 6174 6572 .

    fastBilater │ │ │ -00050d70: 616c 536f 6c76 6572 4669 6c74 6572 3c2f alSolverFilter.
    public │ │ │ -00050dc0: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ -00050dd0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;vo │ │ │ -00050df0: 6964 3c2f 7370 616e 3e26 6e62 7370 3b3c id < │ │ │ -00050e00: 7370 616e 2063 6c61 7373 3d22 656c 656d span class="elem │ │ │ -00050e10: 656e 742d 6e61 6d65 223e 6661 7374 4269 ent-name">fastBi │ │ │ -00050e20: 6c61 7465 7261 6c53 6f6c 7665 7246 696c lateralSolverFil │ │ │ -00050e30: 7465 723c 2f73 7061 6e3e 3c77 6272 3e3c ter< │ │ │ -00050e40: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ -00050e50: 6d65 7465 7273 223e 283c 6120 6872 6566 meters">(Mat&nbs │ │ │ -00050ea0: 703b 6775 6964 652c 0a20 3c61 2068 7265 p;guide,. Mat&nb │ │ │ -00050ef0: 7370 3b73 7263 2c0a 203c 6120 6872 6566 sp;src,. Mat&nbs │ │ │ -00050f40: 703b 636f 6e66 6964 656e 6365 2c0a 203c p;confidence,. < │ │ │ -00050f50: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -00050f60: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -00050f70: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -00050f80: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat dst,. do │ │ │ -00050fa0: 7562 6c65 266e 6273 703b 7369 676d 615f uble sigma_ │ │ │ -00050fb0: 7370 6174 6961 6c2c 0a20 646f 7562 6c65 spatial,. double │ │ │ -00050fc0: 266e 6273 703b 7369 676d 615f 6c75 6d61  sigma_luma │ │ │ -00050fd0: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    .< │ │ │ -00050fe0: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ -00050ff0: 223e 5369 6d70 6c65 206f 6e65 2d6c 696e ">Simple one-lin │ │ │ -00051000: 6520 4661 7374 2042 696c 6174 6572 616c e Fast Bilateral │ │ │ -00051010: 2053 6f6c 7665 7220 6669 6c74 6572 2063 Solver filter c │ │ │ -00051020: 616c 6c2e 2049 6620 796f 7520 6861 7665 all. If you have │ │ │ -00051030: 206d 756c 7469 706c 6520 696d 6167 6573 multiple images │ │ │ -00051040: 2074 6f20 6669 6c74 6572 2077 6974 6820 to filter with │ │ │ -00051050: 7468 6520 7361 6d65 0a20 6775 6964 6520 the same. guide │ │ │ -00051060: 7468 656e 2075 7365 2046 6173 7442 696c then use FastBil │ │ │ -00051070: 6174 6572 616c 536f 6c76 6572 4669 6c74 ateralSolverFilt │ │ │ -00051080: 6572 2069 6e74 6572 6661 6365 2074 6f20 er interface to │ │ │ -00051090: 6176 6f69 6420 6578 7472 6120 636f 6d70 avoid extra comp │ │ │ -000510a0: 7574 6174 696f 6e73 2e3c 2f64 6976 3e0a utations.

  • . │ │ │ -000510b0: 3c64 6c20 636c 6173 733d 226e 6f74 6573
    .
    Parameter │ │ │ -000510d0: 733a 3c2f 6474 3e0a 3c64 643e 3c63 6f64 s:
    .
    guide - │ │ │ -000510f0: 2069 6d61 6765 2073 6572 7669 6e67 2061 image serving a │ │ │ -00051100: 7320 6775 6964 6520 666f 7220 6669 6c74 s guide for filt │ │ │ -00051110: 6572 696e 672e 2049 7420 7368 6f75 6c64 ering. It should │ │ │ -00051120: 2068 6176 6520 382d 6269 7420 6465 7074 have 8-bit dept │ │ │ -00051130: 6820 616e 6420 6569 7468 6572 2031 206f h and either 1 o │ │ │ -00051140: 7220 3320 6368 616e 6e65 6c73 2e3c 2f64 r 3 channels..
    src │ │ │ -00051160: 3c2f 636f 6465 3e20 2d20 736f 7572 6365 - source │ │ │ -00051170: 2069 6d61 6765 2066 6f72 2066 696c 7465 image for filte │ │ │ -00051180: 7269 6e67 2077 6974 6820 756e 7369 676e ring with unsign │ │ │ -00051190: 6564 2038 2d62 6974 206f 7220 7369 676e ed 8-bit or sign │ │ │ -000511a0: 6564 2031 362d 6269 7420 6f72 2066 6c6f ed 16-bit or flo │ │ │ -000511b0: 6174 696e 672d 706f 696e 7420 3332 2d62 ating-point 32-b │ │ │ -000511c0: 6974 2064 6570 7468 2061 6e64 2075 7020 it depth and up │ │ │ -000511d0: 746f 2034 2063 6861 6e6e 656c 732e 3c2f to 4 channels..
    co │ │ │ -000511f0: 6e66 6964 656e 6365 3c2f 636f 6465 3e20 nfidence │ │ │ -00051200: 2d20 636f 6e66 6964 656e 6365 2069 6d61 - confidence ima │ │ │ -00051210: 6765 2077 6974 6820 756e 7369 676e 6564 ge with unsigned │ │ │ -00051220: 2038 2d62 6974 206f 7220 666c 6f61 7469 8-bit or floati │ │ │ -00051230: 6e67 2d70 6f69 6e74 2033 322d 6269 7420 ng-point 32-bit │ │ │ -00051240: 636f 6e66 6964 656e 6365 2061 6e64 2031 confidence and 1 │ │ │ -00051250: 2063 6861 6e6e 656c 2e3c 2f64 643e 0a3c channel.
    .< │ │ │ -00051260: 6464 3e3c 636f 6465 3e64 7374 3c2f 636f dd>dst - destinatio │ │ │ -00051280: 6e20 696d 6167 652e 3c2f 6464 3e0a 3c64 n image..sigma_sp │ │ │ -000512a0: 6174 6961 6c3c 2f63 6f64 653e 202d 2070 atial - p │ │ │ -000512b0: 6172 616d 6574 6572 2c20 7468 6174 2069 arameter, that i │ │ │ -000512c0: 7320 7369 6d69 6c61 7220 746f 2073 7061 s similar to spa │ │ │ -000512d0: 7469 616c 2073 7061 6365 2073 6967 6d61 tial space sigma │ │ │ -000512e0: 2028 6261 6e64 7769 6474 6829 2069 6e20 (bandwidth) in │ │ │ -000512f0: 6269 6c61 7465 7261 6c46 696c 7465 722e bilateralFilter. │ │ │ -00051300: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e .
    │ │ │ -00051310: 7369 676d 615f 6c75 6d61 3c2f 636f 6465 sigma_luma - parameter, t │ │ │ -00051330: 6861 7420 6973 2073 696d 696c 6172 2074 hat is similar t │ │ │ -00051340: 6f20 6c75 6d61 2073 7061 6365 2073 6967 o luma space sig │ │ │ -00051350: 6d61 2028 6261 6e64 7769 6474 6829 2069 ma (bandwidth) i │ │ │ -00051360: 6e20 6269 6c61 7465 7261 6c46 696c 7465 n bilateralFilte │ │ │ -00051370: 722e 0a0a 0a0a 0a0a 2046 6f72 206d 6f72 r....... For mor │ │ │ -00051380: 6520 6465 7461 696c 7320 6162 6f75 7420 e details about │ │ │ -00051390: 7468 6520 4661 7374 2042 696c 6174 6572 the Fast Bilater │ │ │ -000513a0: 616c 2053 6f6c 7665 7220 7061 7261 6d65 al Solver parame │ │ │ -000513b0: 7465 7273 2c20 7365 6520 7468 6520 6f72 ters, see the or │ │ │ -000513c0: 6967 696e 616c 2070 6170 6572 2043 4954 iginal paper CIT │ │ │ -000513d0: 453a 2042 6172 726f 6e50 6f6f 6c65 3230 E: BarronPoole20 │ │ │ -000513e0: 3136 2e0a 0a20 3c62 3e4e 6f74 653a 3c2f 16... Note: Confidence im │ │ │ -00051400: 6167 6573 2077 6974 6820 4356 5f38 5520 ages with CV_8U │ │ │ -00051410: 6465 7074 6820 6172 6520 6578 7065 6374 depth are expect │ │ │ -00051420: 6564 2074 6f20 696e 205b 302c 2032 3535 ed to in [0, 255 │ │ │ -00051430: 5d20 616e 6420 4356 5f33 3246 2069 6e20 ] and CV_32F in │ │ │ -00051440: 5b30 2c20 315d 2072 616e 6765 2e3c 2f64 [0, 1] range..
    ..
  • .
  • .< │ │ │ -00051470: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ -00051480: 6574 6169 6c22 2069 643d 2266 6173 7442 etail" id="fastB │ │ │ -00051490: 696c 6174 6572 616c 536f 6c76 6572 4669 ilateralSolverFi │ │ │ -000514a0: 6c74 6572 286f 7267 2e6f 7065 6e63 762e lter(org.opencv. │ │ │ -000514b0: 636f 7265 2e4d 6174 2c6f 7267 2e6f 7065 core.Mat,org.ope │ │ │ -000514c0: 6e63 762e 636f 7265 2e4d 6174 2c6f 7267 ncv.core.Mat,org │ │ │ -000514d0: 2e6f 7065 6e63 762e 636f 7265 2e4d 6174 .opencv.core.Mat │ │ │ -000514e0: 2c6f 7267 2e6f 7065 6e63 762e 636f 7265 ,org.opencv.core │ │ │ -000514f0: 2e4d 6174 2c64 6f75 626c 6529 223e 0a3c .Mat,double)">.< │ │ │ -00051500: 6833 3e66 6173 7442 696c 6174 6572 616c h3>fastBilateral │ │ │ -00051510: 536f 6c76 6572 4669 6c74 6572 3c2f 6833 SolverFilter.
    │ │ │ -00051540: 3c73 7061 6e20 636c 6173 733d 226d 6f64 public s │ │ │ -00051560: 7461 7469 633c 2f73 7061 6e3e 266e 6273 tatic&nbs │ │ │ -00051570: 703b 3c73 7061 6e20 636c 6173 733d 2272 p;void │ │ │ -00051590: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  fastBila │ │ │ -000515c0: 7465 7261 6c53 6f6c 7665 7246 696c 7465 teralSolverFilte │ │ │ -000515d0: 723c 2f73 7061 6e3e 3c77 6272 3e3c 7370 r(Mat  │ │ │ -00051640: 6775 6964 652c 0a20 3c61 2068 7265 663d guide,. Mat  │ │ │ -00051690: 3b73 7263 2c0a 203c 6120 6872 6566 3d22 ;src,. Mat  │ │ │ -000516e0: 636f 6e66 6964 656e 6365 2c0a 203c 6120 confidence,. Mat │ │ │ -00051730: 266e 6273 703b 6473 742c 0a20 646f 7562  dst,. doub │ │ │ -00051740: 6c65 266e 6273 703b 7369 676d 615f 7370 le sigma_sp │ │ │ -00051750: 6174 6961 6c29 3c2f 7370 616e 3e3c 2f64 atial).
    Simple on │ │ │ -00051780: 652d 6c69 6e65 2046 6173 7420 4269 6c61 e-line Fast Bila │ │ │ -00051790: 7465 7261 6c20 536f 6c76 6572 2066 696c teral Solver fil │ │ │ -000517a0: 7465 7220 6361 6c6c 2e20 4966 2079 6f75 ter call. If you │ │ │ -000517b0: 2068 6176 6520 6d75 6c74 6970 6c65 2069 have multiple i │ │ │ -000517c0: 6d61 6765 7320 746f 2066 696c 7465 7220 mages to filter │ │ │ -000517d0: 7769 7468 2074 6865 2073 616d 650a 2067 with the same. g │ │ │ -000517e0: 7569 6465 2074 6865 6e20 7573 6520 4661 uide then use Fa │ │ │ -000517f0: 7374 4269 6c61 7465 7261 6c53 6f6c 7665 stBilateralSolve │ │ │ -00051800: 7246 696c 7465 7220 696e 7465 7266 6163 rFilter interfac │ │ │ -00051810: 6520 746f 2061 766f 6964 2065 7874 7261 e to avoid extra │ │ │ -00051820: 2063 6f6d 7075 7461 7469 6f6e 732e 3c2f computations..
    .
    Para │ │ │ -00051850: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    guide - image serv │ │ │ -00051880: 696e 6720 6173 2067 7569 6465 2066 6f72 ing as guide for │ │ │ -00051890: 2066 696c 7465 7269 6e67 2e20 4974 2073 filtering. It s │ │ │ -000518a0: 686f 756c 6420 6861 7665 2038 2d62 6974 hould have 8-bit │ │ │ -000518b0: 2064 6570 7468 2061 6e64 2065 6974 6865 depth and eithe │ │ │ -000518c0: 7220 3120 6f72 2033 2063 6861 6e6e 656c r 1 or 3 channel │ │ │ -000518d0: 732e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 s.
    .
    src - s │ │ │ -000518f0: 6f75 7263 6520 696d 6167 6520 666f 7220 ource image for │ │ │ -00051900: 6669 6c74 6572 696e 6720 7769 7468 2075 filtering with u │ │ │ -00051910: 6e73 6967 6e65 6420 382d 6269 7420 6f72 nsigned 8-bit or │ │ │ -00051920: 2073 6967 6e65 6420 3136 2d62 6974 206f signed 16-bit o │ │ │ -00051930: 7220 666c 6f61 7469 6e67 2d70 6f69 6e74 r floating-point │ │ │ -00051940: 2033 322d 6269 7420 6465 7074 6820 616e 32-bit depth an │ │ │ -00051950: 6420 7570 2074 6f20 3420 6368 616e 6e65 d up to 4 channe │ │ │ -00051960: 6c73 2e3c 2f64 643e 0a3c 6464 3e3c 636f ls.
    .
    confidence - confidenc │ │ │ -00051990: 6520 696d 6167 6520 7769 7468 2075 6e73 e image with uns │ │ │ -000519a0: 6967 6e65 6420 382d 6269 7420 6f72 2066 igned 8-bit or f │ │ │ -000519b0: 6c6f 6174 696e 672d 706f 696e 7420 3332 loating-point 32 │ │ │ -000519c0: 2d62 6974 2063 6f6e 6669 6465 6e63 6520 -bit confidence │ │ │ -000519d0: 616e 6420 3120 6368 616e 6e65 6c2e 3c2f and 1 channel..
    ds │ │ │ -000519f0: 743c 2f63 6f64 653e 202d 2064 6573 7469 t - desti │ │ │ -00051a00: 6e61 7469 6f6e 2069 6d61 6765 2e3c 2f64 nation image..
    sig │ │ │ -00051a20: 6d61 5f73 7061 7469 616c 3c2f 636f 6465 ma_spatial - parameter, t │ │ │ -00051a40: 6861 7420 6973 2073 696d 696c 6172 2074 hat is similar t │ │ │ -00051a50: 6f20 7370 6174 6961 6c20 7370 6163 6520 o spatial space │ │ │ -00051a60: 7369 676d 6120 2862 616e 6477 6964 7468 sigma (bandwidth │ │ │ -00051a70: 2920 696e 2062 696c 6174 6572 616c 4669 ) in bilateralFi │ │ │ -00051a80: 6c74 6572 2e0a 0a0a 0a0a 0a0a 2046 6f72 lter........ For │ │ │ -00051a90: 206d 6f72 6520 6465 7461 696c 7320 6162 more details ab │ │ │ -00051aa0: 6f75 7420 7468 6520 4661 7374 2042 696c out the Fast Bil │ │ │ -00051ab0: 6174 6572 616c 2053 6f6c 7665 7220 7061 ateral Solver pa │ │ │ -00051ac0: 7261 6d65 7465 7273 2c20 7365 6520 7468 rameters, see th │ │ │ -00051ad0: 6520 6f72 6967 696e 616c 2070 6170 6572 e original paper │ │ │ -00051ae0: 2043 4954 453a 2042 6172 726f 6e50 6f6f CITE: BarronPoo │ │ │ -00051af0: 6c65 3230 3136 2e0a 0a20 3c62 3e4e 6f74 le2016... Not │ │ │ -00051b00: 653a 3c2f 623e 2043 6f6e 6669 6465 6e63 e: Confidenc │ │ │ -00051b10: 6520 696d 6167 6573 2077 6974 6820 4356 e images with CV │ │ │ -00051b20: 5f38 5520 6465 7074 6820 6172 6520 6578 _8U depth are ex │ │ │ -00051b30: 7065 6374 6564 2074 6f20 696e 205b 302c pected to in [0, │ │ │ -00051b40: 2032 3535 5d20 616e 6420 4356 5f33 3246 255] and CV_32F │ │ │ -00051b50: 2069 6e20 5b30 2c20 315d 2072 616e 6765 in [0, 1] range │ │ │ -00051b60: 2e3c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 .
    .
    .
    .
  • ..
  • ..

    crea │ │ │ -00052270: 7465 4661 7374 476c 6f62 616c 536d 6f6f teFastGlobalSmoo │ │ │ -00052280: 7468 6572 4669 6c74 6572 3c2f 6833 3e0a therFilter

    . │ │ │ -00052290: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62 . │ │ │ -00052490: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
    Factory metho │ │ │ -000524b0: 642c 2063 7265 6174 6520 696e 7374 616e d, create instan │ │ │ -000524c0: 6365 206f 6620 4661 7374 476c 6f62 616c ce of FastGlobal │ │ │ -000524d0: 536d 6f6f 7468 6572 4669 6c74 6572 2061 SmootherFilter a │ │ │ -000524e0: 6e64 2065 7865 6375 7465 2074 6865 2069 nd execute the i │ │ │ -000524f0: 6e69 7469 616c 697a 6174 696f 6e20 726f nitialization ro │ │ │ -00052500: 7574 696e 6573 2e3c 2f64 6976 3e0a 3c64 utines.
    . │ │ │ -00052520: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ -00052530: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -00052540: 6775 6964 653c 2f63 6f64 653e 202d 2069 guide - i │ │ │ -00052550: 6d61 6765 2073 6572 7669 6e67 2061 7320 mage serving as │ │ │ -00052560: 6775 6964 6520 666f 7220 6669 6c74 6572 guide for filter │ │ │ -00052570: 696e 672e 2049 7420 7368 6f75 6c64 2068 ing. It should h │ │ │ -00052580: 6176 6520 382d 6269 7420 6465 7074 6820 ave 8-bit depth │ │ │ -00052590: 616e 6420 6569 7468 6572 2031 206f 7220 and either 1 or │ │ │ -000525a0: 3320 6368 616e 6e65 6c73 2e3c 2f64 643e 3 channels.
    │ │ │ -000525b0: 0a3c 6464 3e3c 636f 6465 3e6c 616d 6264 .
    lambd │ │ │ -000525c0: 613c 2f63 6f64 653e 202d 2070 6172 616d a - param │ │ │ -000525d0: 6574 6572 2064 6566 696e 696e 6720 7468 eter defining th │ │ │ -000525e0: 6520 616d 6f75 6e74 206f 6620 7265 6775 e amount of regu │ │ │ -000525f0: 6c61 7269 7a61 7469 6f6e 3c2f 6464 3e0a larization
    . │ │ │ -00052600: 3c64 643e 3c63 6f64 653e 7369 676d 615f
    sigma_ │ │ │ -00052610: 636f 6c6f 723c 2f63 6f64 653e 202d 2070 color - p │ │ │ -00052620: 6172 616d 6574 6572 2c20 7468 6174 2069 arameter, that i │ │ │ -00052630: 7320 7369 6d69 6c61 7220 746f 2063 6f6c s similar to col │ │ │ -00052640: 6f72 2073 7061 6365 2073 6967 6d61 2069 or space sigma i │ │ │ -00052650: 6e20 6269 6c61 7465 7261 6c46 696c 7465 n bilateralFilte │ │ │ -00052660: 722e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 r.
    .
    lambda_attenua │ │ │ -00052680: 7469 6f6e 3c2f 636f 6465 3e20 2d20 696e tion - in │ │ │ -00052690: 7465 726e 616c 2070 6172 616d 6574 6572 ternal parameter │ │ │ -000526a0: 2c20 6465 6669 6e69 6e67 2068 6f77 206d , defining how m │ │ │ -000526b0: 7563 6820 6c61 6d62 6461 2064 6563 7265 uch lambda decre │ │ │ -000526c0: 6173 6573 2061 6674 6572 2065 6163 6820 ases after each │ │ │ -000526d0: 6974 6572 6174 696f 6e2e 204e 6f72 6d61 iteration. Norma │ │ │ -000526e0: 6c6c 792c 0a20 6974 2073 686f 756c 6420 lly,. it should │ │ │ -000526f0: 6265 2030 2e32 352e 2053 6574 7469 6e67 be 0.25. Setting │ │ │ -00052700: 2069 7420 746f 2031 2e30 206d 6179 206c it to 1.0 may l │ │ │ -00052710: 6561 6420 746f 2073 7472 6561 6b69 6e67 ead to streaking │ │ │ -00052720: 2061 7274 6966 6163 7473 2e3c 2f64 643e artifacts.
    │ │ │ -00052730: 0a3c 6464 3e3c 636f 6465 3e6e 756d 5f69 .
    num_i │ │ │ -00052740: 7465 723c 2f63 6f64 653e 202d 206e 756d ter - num │ │ │ -00052750: 6265 7220 6f66 2069 7465 7261 7469 6f6e ber of iteration │ │ │ -00052760: 7320 7573 6564 2066 6f72 2066 696c 7465 s used for filte │ │ │ -00052770: 7269 6e67 2c20 3320 6973 2075 7375 616c ring, 3 is usual │ │ │ -00052780: 6c79 2065 6e6f 7567 682e 0a0a 2046 6f72 ly enough... For │ │ │ -00052790: 206d 6f72 6520 6465 7461 696c 7320 6162 more details ab │ │ │ -000527a0: 6f75 7420 4661 7374 2047 6c6f 6261 6c20 out Fast Global │ │ │ -000527b0: 536d 6f6f 7468 6572 2070 6172 616d 6574 Smoother paramet │ │ │ -000527c0: 6572 732c 2073 6565 2074 6865 206f 7269 ers, see the ori │ │ │ -000527d0: 6769 6e61 6c20 7061 7065 7220 4349 5445 ginal paper CITE │ │ │ -000527e0: 3a20 4d69 6e32 3031 342e 2048 6f77 6576 : Min2014. Howev │ │ │ -000527f0: 6572 2c20 706c 6561 7365 206e 6f74 6520 er, please note │ │ │ -00052800: 7468 6174 0a20 7468 6572 6520 6172 6520 that. there are │ │ │ -00052810: 7365 7665 7261 6c20 6469 6666 6572 656e several differen │ │ │ -00052820: 6365 732e 204c 616d 6264 6120 6174 7465 ces. Lambda atte │ │ │ -00052830: 6e75 6174 696f 6e20 6465 7363 7269 6265 nuation describe │ │ │ -00052840: 6420 696e 2074 6865 2070 6170 6572 2069 d in the paper i │ │ │ -00052850: 7320 696d 706c 656d 656e 7465 6420 6120 s implemented a │ │ │ -00052860: 6269 7420 6469 6666 6572 656e 746c 7920 bit differently │ │ │ -00052870: 736f 2064 6f20 6e6f 740a 2065 7870 6563 so do not. expec │ │ │ -00052880: 7420 7468 6520 7265 7375 6c74 7320 746f t the results to │ │ │ -00052890: 2062 6520 6964 656e 7469 6361 6c20 746f be identical to │ │ │ -000528a0: 2074 686f 7365 2066 726f 6d20 7468 6520 those from the │ │ │ -000528b0: 7061 7065 723b 2073 6967 6d61 5f63 6f6c paper; sigma_col │ │ │ -000528c0: 6f72 2076 616c 7565 7320 6672 6f6d 2074 or values from t │ │ │ -000528d0: 6865 2070 6170 6572 2073 686f 756c 6420 he paper should │ │ │ -000528e0: 6265 206d 756c 7469 706c 6965 6420 6279 be multiplied by │ │ │ -000528f0: 2032 3535 2e30 2074 6f0a 2061 6368 6965 255.0 to. achie │ │ │ -00052900: 7665 2074 6865 2073 616d 6520 6566 6665 ve the same effe │ │ │ -00052910: 6374 2e20 416c 736f 2c20 696e 2063 6173 ct. Also, in cas │ │ │ -00052920: 6520 6f66 2069 6d61 6765 2066 696c 7465 e of image filte │ │ │ -00052930: 7269 6e67 2077 6865 7265 2073 6f75 7263 ring where sourc │ │ │ -00052940: 6520 616e 6420 6775 6964 6520 696d 6167 e and guide imag │ │ │ -00052950: 6520 6172 6520 7468 6520 7361 6d65 2c20 e are the same, │ │ │ -00052960: 6175 7468 6f72 730a 2070 726f 706f 7365 authors. propose │ │ │ -00052970: 2074 6f20 6479 6e61 6d69 6361 6c6c 7920 to dynamically │ │ │ -00052980: 7570 6461 7465 2074 6865 2067 7569 6465 update the guide │ │ │ -00052990: 2069 6d61 6765 2061 6674 6572 2065 6163 image after eac │ │ │ -000529a0: 6820 6974 6572 6174 696f 6e2e 2054 6f20 h iteration. To │ │ │ -000529b0: 6d61 7869 6d69 7a65 2074 6865 2070 6572 maximize the per │ │ │ -000529c0: 666f 726d 616e 6365 2074 6869 7320 6665 formance this fe │ │ │ -000529d0: 6174 7572 650a 2077 6173 206e 6f74 2069 ature. was not i │ │ │ -000529e0: 6d70 6c65 6d65 6e74 6564 2068 6572 652e mplemented here. │ │ │ -000529f0: 3c2f 6464 3e0a 3c64 743e 5265 7475 726e
    .
    Return │ │ │ -00052a00: 733a 3c2f 6474 3e0a 3c64 643e 6175 746f s:
    .
    auto │ │ │ -00052a10: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ -00052a20: 7465 643c 2f64 643e 0a3c 2f64 6c3e 0a3c ted
    ..< │ │ │ -00052a30: 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 3e0a /section>.
  • . │ │ │ -00052a40: 3c6c 693e 0a3c 7365 6374 696f 6e20 636c
  • .
    .

    │ │ │ -00052ab0: 6372 6561 7465 4661 7374 476c 6f62 616c createFastGlobal │ │ │ -00052ac0: 536d 6f6f 7468 6572 4669 6c74 6572 3c2f SmootherFilter.
    public │ │ │ -00052b10: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ -00052b20: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;FastG │ │ │ -00052b90: 6c6f 6261 6c53 6d6f 6f74 6865 7246 696c lobalSmootherFil │ │ │ -00052ba0: 7465 723c 2f61 3e3c 2f73 7061 6e3e 266e ter&n │ │ │ -00052bb0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;c │ │ │ -00052bd0: 7265 6174 6546 6173 7447 6c6f 6261 6c53 reateFastGlobalS │ │ │ -00052be0: 6d6f 6f74 6865 7246 696c 7465 723c 2f73 mootherFilter(M │ │ │ -00052c50: 6174 3c2f 613e 266e 6273 703b 6775 6964 at guid │ │ │ -00052c60: 652c 0a20 646f 7562 6c65 266e 6273 703b e,. double  │ │ │ -00052c70: 6c61 6d62 6461 2c0a 2064 6f75 626c 6526 lambda,. double& │ │ │ -00052c80: 6e62 7370 3b73 6967 6d61 5f63 6f6c 6f72 nbsp;sigma_color │ │ │ -00052c90: 2c0a 2064 6f75 626c 6526 6e62 7370 3b6c ,. double l │ │ │ -00052ca0: 616d 6264 615f 6174 7465 6e75 6174 696f ambda_attenuatio │ │ │ -00052cb0: 6e29 3c2f 7370 616e 3e3c 2f64 6976 3e0a n)
    . │ │ │ -00052cc0: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
    Factory metho │ │ │ -00052ce0: 642c 2063 7265 6174 6520 696e 7374 616e d, create instan │ │ │ -00052cf0: 6365 206f 6620 4661 7374 476c 6f62 616c ce of FastGlobal │ │ │ -00052d00: 536d 6f6f 7468 6572 4669 6c74 6572 2061 SmootherFilter a │ │ │ -00052d10: 6e64 2065 7865 6375 7465 2074 6865 2069 nd execute the i │ │ │ -00052d20: 6e69 7469 616c 697a 6174 696f 6e20 726f nitialization ro │ │ │ -00052d30: 7574 696e 6573 2e3c 2f64 6976 3e0a 3c64 utines.
    . │ │ │ -00052d50: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ -00052d60: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -00052d70: 6775 6964 653c 2f63 6f64 653e 202d 2069 guide - i │ │ │ -00052d80: 6d61 6765 2073 6572 7669 6e67 2061 7320 mage serving as │ │ │ -00052d90: 6775 6964 6520 666f 7220 6669 6c74 6572 guide for filter │ │ │ -00052da0: 696e 672e 2049 7420 7368 6f75 6c64 2068 ing. It should h │ │ │ -00052db0: 6176 6520 382d 6269 7420 6465 7074 6820 ave 8-bit depth │ │ │ -00052dc0: 616e 6420 6569 7468 6572 2031 206f 7220 and either 1 or │ │ │ -00052dd0: 3320 6368 616e 6e65 6c73 2e3c 2f64 643e 3 channels.
    │ │ │ -00052de0: 0a3c 6464 3e3c 636f 6465 3e6c 616d 6264 .
    lambd │ │ │ -00052df0: 613c 2f63 6f64 653e 202d 2070 6172 616d a - param │ │ │ -00052e00: 6574 6572 2064 6566 696e 696e 6720 7468 eter defining th │ │ │ -00052e10: 6520 616d 6f75 6e74 206f 6620 7265 6775 e amount of regu │ │ │ -00052e20: 6c61 7269 7a61 7469 6f6e 3c2f 6464 3e0a larization
    . │ │ │ -00052e30: 3c64 643e 3c63 6f64 653e 7369 676d 615f
    sigma_ │ │ │ -00052e40: 636f 6c6f 723c 2f63 6f64 653e 202d 2070 color - p │ │ │ -00052e50: 6172 616d 6574 6572 2c20 7468 6174 2069 arameter, that i │ │ │ -00052e60: 7320 7369 6d69 6c61 7220 746f 2063 6f6c s similar to col │ │ │ -00052e70: 6f72 2073 7061 6365 2073 6967 6d61 2069 or space sigma i │ │ │ -00052e80: 6e20 6269 6c61 7465 7261 6c46 696c 7465 n bilateralFilte │ │ │ -00052e90: 722e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 r.
    .
    lambda_attenua │ │ │ -00052eb0: 7469 6f6e 3c2f 636f 6465 3e20 2d20 696e tion - in │ │ │ -00052ec0: 7465 726e 616c 2070 6172 616d 6574 6572 ternal parameter │ │ │ -00052ed0: 2c20 6465 6669 6e69 6e67 2068 6f77 206d , defining how m │ │ │ -00052ee0: 7563 6820 6c61 6d62 6461 2064 6563 7265 uch lambda decre │ │ │ -00052ef0: 6173 6573 2061 6674 6572 2065 6163 6820 ases after each │ │ │ -00052f00: 6974 6572 6174 696f 6e2e 204e 6f72 6d61 iteration. Norma │ │ │ -00052f10: 6c6c 792c 0a20 6974 2073 686f 756c 6420 lly,. it should │ │ │ -00052f20: 6265 2030 2e32 352e 2053 6574 7469 6e67 be 0.25. Setting │ │ │ -00052f30: 2069 7420 746f 2031 2e30 206d 6179 206c it to 1.0 may l │ │ │ -00052f40: 6561 6420 746f 2073 7472 6561 6b69 6e67 ead to streaking │ │ │ -00052f50: 2061 7274 6966 6163 7473 2e0a 0a0a 2046 artifacts.... F │ │ │ -00052f60: 6f72 206d 6f72 6520 6465 7461 696c 7320 or more details │ │ │ -00052f70: 6162 6f75 7420 4661 7374 2047 6c6f 6261 about Fast Globa │ │ │ -00052f80: 6c20 536d 6f6f 7468 6572 2070 6172 616d l Smoother param │ │ │ -00052f90: 6574 6572 732c 2073 6565 2074 6865 206f eters, see the o │ │ │ -00052fa0: 7269 6769 6e61 6c20 7061 7065 7220 4349 riginal paper CI │ │ │ -00052fb0: 5445 3a20 4d69 6e32 3031 342e 2048 6f77 TE: Min2014. How │ │ │ -00052fc0: 6576 6572 2c20 706c 6561 7365 206e 6f74 ever, please not │ │ │ -00052fd0: 6520 7468 6174 0a20 7468 6572 6520 6172 e that. there ar │ │ │ -00052fe0: 6520 7365 7665 7261 6c20 6469 6666 6572 e several differ │ │ │ -00052ff0: 656e 6365 732e 204c 616d 6264 6120 6174 ences. Lambda at │ │ │ -00053000: 7465 6e75 6174 696f 6e20 6465 7363 7269 tenuation descri │ │ │ -00053010: 6265 6420 696e 2074 6865 2070 6170 6572 bed in the paper │ │ │ -00053020: 2069 7320 696d 706c 656d 656e 7465 6420 is implemented │ │ │ -00053030: 6120 6269 7420 6469 6666 6572 656e 746c a bit differentl │ │ │ -00053040: 7920 736f 2064 6f20 6e6f 740a 2065 7870 y so do not. exp │ │ │ -00053050: 6563 7420 7468 6520 7265 7375 6c74 7320 ect the results │ │ │ -00053060: 746f 2062 6520 6964 656e 7469 6361 6c20 to be identical │ │ │ -00053070: 746f 2074 686f 7365 2066 726f 6d20 7468 to those from th │ │ │ -00053080: 6520 7061 7065 723b 2073 6967 6d61 5f63 e paper; sigma_c │ │ │ -00053090: 6f6c 6f72 2076 616c 7565 7320 6672 6f6d olor values from │ │ │ -000530a0: 2074 6865 2070 6170 6572 2073 686f 756c the paper shoul │ │ │ -000530b0: 6420 6265 206d 756c 7469 706c 6965 6420 d be multiplied │ │ │ -000530c0: 6279 2032 3535 2e30 2074 6f0a 2061 6368 by 255.0 to. ach │ │ │ -000530d0: 6965 7665 2074 6865 2073 616d 6520 6566 ieve the same ef │ │ │ -000530e0: 6665 6374 2e20 416c 736f 2c20 696e 2063 fect. Also, in c │ │ │ -000530f0: 6173 6520 6f66 2069 6d61 6765 2066 696c ase of image fil │ │ │ -00053100: 7465 7269 6e67 2077 6865 7265 2073 6f75 tering where sou │ │ │ -00053110: 7263 6520 616e 6420 6775 6964 6520 696d rce and guide im │ │ │ -00053120: 6167 6520 6172 6520 7468 6520 7361 6d65 age are the same │ │ │ -00053130: 2c20 6175 7468 6f72 730a 2070 726f 706f , authors. propo │ │ │ -00053140: 7365 2074 6f20 6479 6e61 6d69 6361 6c6c se to dynamicall │ │ │ -00053150: 7920 7570 6461 7465 2074 6865 2067 7569 y update the gui │ │ │ -00053160: 6465 2069 6d61 6765 2061 6674 6572 2065 de image after e │ │ │ -00053170: 6163 6820 6974 6572 6174 696f 6e2e 2054 ach iteration. T │ │ │ -00053180: 6f20 6d61 7869 6d69 7a65 2074 6865 2070 o maximize the p │ │ │ -00053190: 6572 666f 726d 616e 6365 2074 6869 7320 erformance this │ │ │ -000531a0: 6665 6174 7572 650a 2077 6173 206e 6f74 feature. was not │ │ │ -000531b0: 2069 6d70 6c65 6d65 6e74 6564 2068 6572 implemented her │ │ │ -000531c0: 652e 3c2f 6464 3e0a 3c64 743e 5265 7475 e.
    .
    Retu │ │ │ -000531d0: 726e 733a 3c2f 6474 3e0a 3c64 643e 6175 rns:
    .
    au │ │ │ -000531e0: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -000531f0: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
    . │ │ │ -00053200: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .

    .
  • .
  • .
    .

    creat │ │ │ -00053280: 6546 6173 7447 6c6f 6261 6c53 6d6f 6f74 eFastGlobalSmoot │ │ │ -00053290: 6865 7246 696c 7465 723c 2f68 333e 0a3c herFilter

    .< │ │ │ -000532a0: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ -000532b0: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ -000532e0: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ -000532f0: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ -00053300: 726e 2d74 7970 6522 3e3c 6120 6872 6566 rn-type">FastGlobal │ │ │ -00053360: 536d 6f6f 7468 6572 4669 6c74 6572 3c2f SmootherFilter < │ │ │ -00053380: 7370 616e 2063 6c61 7373 3d22 656c 656d span class="elem │ │ │ -00053390: 656e 742d 6e61 6d65 223e 6372 6561 7465 ent-name">create │ │ │ -000533a0: 4661 7374 476c 6f62 616c 536d 6f6f 7468 FastGlobalSmooth │ │ │ -000533b0: 6572 4669 6c74 6572 3c2f 7370 616e 3e3c erFilter< │ │ │ -000533c0: 7762 723e 3c73 7061 6e20 636c 6173 733d wbr>(Mat guide,. d │ │ │ -00053430: 6f75 626c 6526 6e62 7370 3b6c 616d 6264 ouble lambd │ │ │ -00053440: 612c 0a20 646f 7562 6c65 266e 6273 703b a,. double  │ │ │ -00053450: 7369 676d 615f 636f 6c6f 7229 3c2f 7370 sigma_color).
    Fac │ │ │ -00053480: 746f 7279 206d 6574 686f 642c 2063 7265 tory method, cre │ │ │ -00053490: 6174 6520 696e 7374 616e 6365 206f 6620 ate instance of │ │ │ -000534a0: 4661 7374 476c 6f62 616c 536d 6f6f 7468 FastGlobalSmooth │ │ │ -000534b0: 6572 4669 6c74 6572 2061 6e64 2065 7865 erFilter and exe │ │ │ -000534c0: 6375 7465 2074 6865 2069 6e69 7469 616c cute the initial │ │ │ -000534d0: 697a 6174 696f 6e20 726f 7574 696e 6573 ization routines │ │ │ -000534e0: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 .
    .
    .
    P │ │ │ -00053500: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ -00053510: 3c64 643e 3c63 6f64 653e 6775 6964 653c
    guide< │ │ │ -00053520: 2f63 6f64 653e 202d 2069 6d61 6765 2073 /code> - image s │ │ │ -00053530: 6572 7669 6e67 2061 7320 6775 6964 6520 erving as guide │ │ │ -00053540: 666f 7220 6669 6c74 6572 696e 672e 2049 for filtering. I │ │ │ -00053550: 7420 7368 6f75 6c64 2068 6176 6520 382d t should have 8- │ │ │ -00053560: 6269 7420 6465 7074 6820 616e 6420 6569 bit depth and ei │ │ │ -00053570: 7468 6572 2031 206f 7220 3320 6368 616e ther 1 or 3 chan │ │ │ -00053580: 6e65 6c73 2e3c 2f64 643e 0a3c 6464 3e3c nels.
    .
    < │ │ │ -00053590: 636f 6465 3e6c 616d 6264 613c 2f63 6f64 code>lambda - parameter d │ │ │ -000535b0: 6566 696e 696e 6720 7468 6520 616d 6f75 efining the amou │ │ │ -000535c0: 6e74 206f 6620 7265 6775 6c61 7269 7a61 nt of regulariza │ │ │ -000535d0: 7469 6f6e 3c2f 6464 3e0a 3c64 643e 3c63 tion
    .
    sigma_color< │ │ │ -000535f0: 2f63 6f64 653e 202d 2070 6172 616d 6574 /code> - paramet │ │ │ -00053600: 6572 2c20 7468 6174 2069 7320 7369 6d69 er, that is simi │ │ │ -00053610: 6c61 7220 746f 2063 6f6c 6f72 2073 7061 lar to color spa │ │ │ -00053620: 6365 2073 6967 6d61 2069 6e20 6269 6c61 ce sigma in bila │ │ │ -00053630: 7465 7261 6c46 696c 7465 722e 0a0a 2069 teralFilter... i │ │ │ -00053640: 7420 7368 6f75 6c64 2062 6520 302e 3235 t should be 0.25 │ │ │ -00053650: 2e20 5365 7474 696e 6720 6974 2074 6f20 . Setting it to │ │ │ -00053660: 312e 3020 6d61 7920 6c65 6164 2074 6f20 1.0 may lead to │ │ │ -00053670: 7374 7265 616b 696e 6720 6172 7469 6661 streaking artifa │ │ │ -00053680: 6374 732e 0a0a 0a20 466f 7220 6d6f 7265 cts.... For more │ │ │ -00053690: 2064 6574 6169 6c73 2061 626f 7574 2046 details about F │ │ │ -000536a0: 6173 7420 476c 6f62 616c 2053 6d6f 6f74 ast Global Smoot │ │ │ -000536b0: 6865 7220 7061 7261 6d65 7465 7273 2c20 her parameters, │ │ │ -000536c0: 7365 6520 7468 6520 6f72 6967 696e 616c see the original │ │ │ -000536d0: 2070 6170 6572 2043 4954 453a 204d 696e paper CITE: Min │ │ │ -000536e0: 3230 3134 2e20 486f 7765 7665 722c 2070 2014. However, p │ │ │ -000536f0: 6c65 6173 6520 6e6f 7465 2074 6861 740a lease note that. │ │ │ -00053700: 2074 6865 7265 2061 7265 2073 6576 6572 there are sever │ │ │ -00053710: 616c 2064 6966 6665 7265 6e63 6573 2e20 al differences. │ │ │ -00053720: 4c61 6d62 6461 2061 7474 656e 7561 7469 Lambda attenuati │ │ │ -00053730: 6f6e 2064 6573 6372 6962 6564 2069 6e20 on described in │ │ │ -00053740: 7468 6520 7061 7065 7220 6973 2069 6d70 the paper is imp │ │ │ -00053750: 6c65 6d65 6e74 6564 2061 2062 6974 2064 lemented a bit d │ │ │ -00053760: 6966 6665 7265 6e74 6c79 2073 6f20 646f ifferently so do │ │ │ -00053770: 206e 6f74 0a20 6578 7065 6374 2074 6865 not. expect the │ │ │ -00053780: 2072 6573 756c 7473 2074 6f20 6265 2069 results to be i │ │ │ -00053790: 6465 6e74 6963 616c 2074 6f20 7468 6f73 dentical to thos │ │ │ -000537a0: 6520 6672 6f6d 2074 6865 2070 6170 6572 e from the paper │ │ │ -000537b0: 3b20 7369 676d 615f 636f 6c6f 7220 7661 ; sigma_color va │ │ │ -000537c0: 6c75 6573 2066 726f 6d20 7468 6520 7061 lues from the pa │ │ │ -000537d0: 7065 7220 7368 6f75 6c64 2062 6520 6d75 per should be mu │ │ │ -000537e0: 6c74 6970 6c69 6564 2062 7920 3235 352e ltiplied by 255. │ │ │ -000537f0: 3020 746f 0a20 6163 6869 6576 6520 7468 0 to. achieve th │ │ │ -00053800: 6520 7361 6d65 2065 6666 6563 742e 2041 e same effect. A │ │ │ -00053810: 6c73 6f2c 2069 6e20 6361 7365 206f 6620 lso, in case of │ │ │ -00053820: 696d 6167 6520 6669 6c74 6572 696e 6720 image filtering │ │ │ -00053830: 7768 6572 6520 736f 7572 6365 2061 6e64 where source and │ │ │ -00053840: 2067 7569 6465 2069 6d61 6765 2061 7265 guide image are │ │ │ -00053850: 2074 6865 2073 616d 652c 2061 7574 686f the same, autho │ │ │ -00053860: 7273 0a20 7072 6f70 6f73 6520 746f 2064 rs. propose to d │ │ │ -00053870: 796e 616d 6963 616c 6c79 2075 7064 6174 ynamically updat │ │ │ -00053880: 6520 7468 6520 6775 6964 6520 696d 6167 e the guide imag │ │ │ -00053890: 6520 6166 7465 7220 6561 6368 2069 7465 e after each ite │ │ │ -000538a0: 7261 7469 6f6e 2e20 546f 206d 6178 696d ration. To maxim │ │ │ -000538b0: 697a 6520 7468 6520 7065 7266 6f72 6d61 ize the performa │ │ │ -000538c0: 6e63 6520 7468 6973 2066 6561 7475 7265 nce this feature │ │ │ -000538d0: 0a20 7761 7320 6e6f 7420 696d 706c 656d . was not implem │ │ │ -000538e0: 656e 7465 6420 6865 7265 2e3c 2f64 643e ented here.
    │ │ │ -000538f0: 0a3c 6474 3e52 6574 7572 6e73 3a3c 2f64 .
    Returns:.
    automatic │ │ │ -00053910: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    ..
  • .
    .

    │ │ │ -00051c10: 6661 7374 4269 6c61 7465 7261 6c53 6f6c fastBilateralSol │ │ │ -00051c20: 7665 7246 696c 7465 723c 2f68 333e 0a3c verFilter

    .< │ │ │ -00051c30: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ -00051c40: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ -00051c70: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ -00051c80: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ -00051c90: 726e 2d74 7970 6522 3e76 6f69 643c 2f73 rn-type">void
     fastBilater │ │ │ -00051cd0: 616c 536f 6c76 6572 4669 6c74 6572 3c2f alSolverFilter( │ │ │ -00051d40: 4d61 743c 2f61 3e26 6e62 7370 3b67 7569 Mat gui │ │ │ -00051d50: 6465 2c0a 203c 6120 6872 6566 3d22 2e2e de,. Mat sr │ │ │ -00051da0: 632c 0a20 3c61 2068 7265 663d 222e 2e2f c,. │ │ │ -00051de0: 4d61 743c 2f61 3e26 6e62 7370 3b63 6f6e Mat con │ │ │ -00051df0: 6669 6465 6e63 652c 0a20 3c61 2068 7265 fidence,. Mat&nb │ │ │ -00051e40: 7370 3b64 7374 293c 2f73 7061 6e3e 3c2f sp;dst).
    Simple o │ │ │ -00051e70: 6e65 2d6c 696e 6520 4661 7374 2042 696c ne-line Fast Bil │ │ │ -00051e80: 6174 6572 616c 2053 6f6c 7665 7220 6669 ateral Solver fi │ │ │ -00051e90: 6c74 6572 2063 616c 6c2e 2049 6620 796f lter call. If yo │ │ │ -00051ea0: 7520 6861 7665 206d 756c 7469 706c 6520 u have multiple │ │ │ -00051eb0: 696d 6167 6573 2074 6f20 6669 6c74 6572 images to filter │ │ │ -00051ec0: 2077 6974 6820 7468 6520 7361 6d65 0a20 with the same. │ │ │ -00051ed0: 6775 6964 6520 7468 656e 2075 7365 2046 guide then use F │ │ │ -00051ee0: 6173 7442 696c 6174 6572 616c 536f 6c76 astBilateralSolv │ │ │ -00051ef0: 6572 4669 6c74 6572 2069 6e74 6572 6661 erFilter interfa │ │ │ -00051f00: 6365 2074 6f20 6176 6f69 6420 6578 7472 ce to avoid extr │ │ │ -00051f10: 6120 636f 6d70 7574 6174 696f 6e73 2e3c a computations.< │ │ │ -00051f20: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ -00051f40: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .guide - image ser │ │ │ -00051f70: 7669 6e67 2061 7320 6775 6964 6520 666f ving as guide fo │ │ │ -00051f80: 7220 6669 6c74 6572 696e 672e 2049 7420 r filtering. It │ │ │ -00051f90: 7368 6f75 6c64 2068 6176 6520 382d 6269 should have 8-bi │ │ │ -00051fa0: 7420 6465 7074 6820 616e 6420 6569 7468 t depth and eith │ │ │ -00051fb0: 6572 2031 206f 7220 3320 6368 616e 6e65 er 1 or 3 channe │ │ │ -00051fc0: 6c73 2e3c 2f64 643e 0a3c 6464 3e3c 636f ls..
    src - │ │ │ -00051fe0: 736f 7572 6365 2069 6d61 6765 2066 6f72 source image for │ │ │ -00051ff0: 2066 696c 7465 7269 6e67 2077 6974 6820 filtering with │ │ │ -00052000: 756e 7369 676e 6564 2038 2d62 6974 206f unsigned 8-bit o │ │ │ -00052010: 7220 7369 676e 6564 2031 362d 6269 7420 r signed 16-bit │ │ │ -00052020: 6f72 2066 6c6f 6174 696e 672d 706f 696e or floating-poin │ │ │ -00052030: 7420 3332 2d62 6974 2064 6570 7468 2061 t 32-bit depth a │ │ │ -00052040: 6e64 2075 7020 746f 2034 2063 6861 6e6e nd up to 4 chann │ │ │ -00052050: 656c 732e 3c2f 6464 3e0a 3c64 643e 3c63 els.
    .
    confidence - confiden │ │ │ -00052080: 6365 2069 6d61 6765 2077 6974 6820 756e ce image with un │ │ │ -00052090: 7369 676e 6564 2038 2d62 6974 206f 7220 signed 8-bit or │ │ │ -000520a0: 666c 6f61 7469 6e67 2d70 6f69 6e74 2033 floating-point 3 │ │ │ -000520b0: 322d 6269 7420 636f 6e66 6964 656e 6365 2-bit confidence │ │ │ -000520c0: 2061 6e64 2031 2063 6861 6e6e 656c 2e3c and 1 channel.< │ │ │ -000520d0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e64 /dd>.
    d │ │ │ -000520e0: 7374 3c2f 636f 6465 3e20 2d20 6465 7374 st - dest │ │ │ -000520f0: 696e 6174 696f 6e20 696d 6167 652e 0a0a ination image... │ │ │ -00052100: 0a0a 0a0a 0a0a 2046 6f72 206d 6f72 6520 ...... For more │ │ │ -00052110: 6465 7461 696c 7320 6162 6f75 7420 7468 details about th │ │ │ -00052120: 6520 4661 7374 2042 696c 6174 6572 616c e Fast Bilateral │ │ │ -00052130: 2053 6f6c 7665 7220 7061 7261 6d65 7465 Solver paramete │ │ │ -00052140: 7273 2c20 7365 6520 7468 6520 6f72 6967 rs, see the orig │ │ │ -00052150: 696e 616c 2070 6170 6572 2043 4954 453a inal paper CITE: │ │ │ -00052160: 2042 6172 726f 6e50 6f6f 6c65 3230 3136 BarronPoole2016 │ │ │ -00052170: 2e0a 0a20 3c62 3e4e 6f74 653a 3c2f 623e ... Note: │ │ │ -00052180: 2043 6f6e 6669 6465 6e63 6520 696d 6167 Confidence imag │ │ │ -00052190: 6573 2077 6974 6820 4356 5f38 5520 6465 es with CV_8U de │ │ │ -000521a0: 7074 6820 6172 6520 6578 7065 6374 6564 pth are expected │ │ │ -000521b0: 2074 6f20 696e 205b 302c 2032 3535 5d20 to in [0, 255] │ │ │ -000521c0: 616e 6420 4356 5f33 3246 2069 6e20 5b30 and CV_32F in [0 │ │ │ -000521d0: 2c20 315d 2072 616e 6765 2e3c 2f64 643e , 1] range.
    │ │ │ -000521e0: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
    .
    ..
  • . │ │ │ -00053940: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    fastGlobalSmoot │ │ │ -000539e0: 6865 7246 696c 7465 723c 2f68 333e 0a3c herFilter

    .< │ │ │ -000539f0: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ -00053a00: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ -00053a30: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ -00053a40: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ -00053a50: 726e 2d74 7970 6522 3e76 6f69 643c 2f73 rn-type">void
     fastGlobalS │ │ │ -00053a90: 6d6f 6f74 6865 7246 696c 7465 723c 2f73 mootherFilter
    (M │ │ │ -00053b00: 6174 3c2f 613e 266e 6273 703b 6775 6964 at guid │ │ │ -00053b10: 652c 0a20 3c61 2068 7265 663d 222e 2e2f e,. │ │ │ -00053b50: 4d61 743c 2f61 3e26 6e62 7370 3b73 7263 Mat src │ │ │ -00053b60: 2c0a 203c 6120 6872 6566 3d22 2e2e 2f63 ,. M │ │ │ -00053ba0: 6174 3c2f 613e 266e 6273 703b 6473 742c at dst, │ │ │ -00053bb0: 0a20 646f 7562 6c65 266e 6273 703b 6c61 . double la │ │ │ -00053bc0: 6d62 6461 2c0a 2064 6f75 626c 6526 6e62 mbda,. double&nb │ │ │ -00053bd0: 7370 3b73 6967 6d61 5f63 6f6c 6f72 2c0a sp;sigma_color,. │ │ │ -00053be0: 2064 6f75 626c 6526 6e62 7370 3b6c 616d double lam │ │ │ -00053bf0: 6264 615f 6174 7465 6e75 6174 696f 6e2c bda_attenuation, │ │ │ -00053c00: 0a20 696e 7426 6e62 7370 3b6e 756d 5f69 . int num_i │ │ │ -00053c10: 7465 7229 3c2f 7370 616e 3e3c 2f64 6976 ter).
    Simple one- │ │ │ -00053c40: 6c69 6e65 2046 6173 7420 476c 6f62 616c line Fast Global │ │ │ -00053c50: 2053 6d6f 6f74 6865 7220 6669 6c74 6572 Smoother filter │ │ │ -00053c60: 2063 616c 6c2e 2049 6620 796f 7520 6861 call. If you ha │ │ │ -00053c70: 7665 206d 756c 7469 706c 6520 696d 6167 ve multiple imag │ │ │ -00053c80: 6573 2074 6f20 6669 6c74 6572 2077 6974 es to filter wit │ │ │ -00053c90: 6820 7468 6520 7361 6d65 0a20 6775 6964 h the same. guid │ │ │ -00053ca0: 6520 7468 656e 2075 7365 2046 6173 7447 e then use FastG │ │ │ -00053cb0: 6c6f 6261 6c53 6d6f 6f74 6865 7246 696c lobalSmootherFil │ │ │ -00053cc0: 7465 7220 696e 7465 7266 6163 6520 746f ter interface to │ │ │ -00053cd0: 2061 766f 6964 2065 7874 7261 2063 6f6d avoid extra com │ │ │ -00053ce0: 7075 7461 7469 6f6e 732e 3c2f 6469 763e putations.
    │ │ │ -00053cf0: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
    .
    Paramete │ │ │ -00053d10: 7273 3a3c 2f64 743e 0a3c 6464 3e3c 636f rs:
    .
    guide │ │ │ -00053d30: 2d20 696d 6167 6520 7365 7276 696e 6720 - image serving │ │ │ -00053d40: 6173 2067 7569 6465 2066 6f72 2066 696c as guide for fil │ │ │ -00053d50: 7465 7269 6e67 2e20 4974 2073 686f 756c tering. It shoul │ │ │ -00053d60: 6420 6861 7665 2038 2d62 6974 2064 6570 d have 8-bit dep │ │ │ -00053d70: 7468 2061 6e64 2065 6974 6865 7220 3120 th and either 1 │ │ │ -00053d80: 6f72 2033 2063 6861 6e6e 656c 732e 3c2f or 3 channels..
    sr │ │ │ -00053da0: 633c 2f63 6f64 653e 202d 2073 6f75 7263 c - sourc │ │ │ -00053db0: 6520 696d 6167 6520 666f 7220 6669 6c74 e image for filt │ │ │ -00053dc0: 6572 696e 6720 7769 7468 2075 6e73 6967 ering with unsig │ │ │ -00053dd0: 6e65 6420 382d 6269 7420 6f72 2073 6967 ned 8-bit or sig │ │ │ -00053de0: 6e65 6420 3136 2d62 6974 206f 7220 666c ned 16-bit or fl │ │ │ -00053df0: 6f61 7469 6e67 2d70 6f69 6e74 2033 322d oating-point 32- │ │ │ -00053e00: 6269 7420 6465 7074 6820 616e 6420 7570 bit depth and up │ │ │ -00053e10: 2074 6f20 3420 6368 616e 6e65 6c73 2e3c to 4 channels.< │ │ │ -00053e20: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e64 /dd>.
    d │ │ │ -00053e30: 7374 3c2f 636f 6465 3e20 2d20 6465 7374 st - dest │ │ │ -00053e40: 696e 6174 696f 6e20 696d 6167 652e 3c2f ination image..
    la │ │ │ -00053e60: 6d62 6461 3c2f 636f 6465 3e20 2d20 7061 mbda - pa │ │ │ -00053e70: 7261 6d65 7465 7220 6465 6669 6e69 6e67 rameter defining │ │ │ -00053e80: 2074 6865 2061 6d6f 756e 7420 6f66 2072 the amount of r │ │ │ -00053e90: 6567 756c 6172 697a 6174 696f 6e3c 2f64 egularization.
    sig │ │ │ -00053eb0: 6d61 5f63 6f6c 6f72 3c2f 636f 6465 3e20 ma_color │ │ │ -00053ec0: 2d20 7061 7261 6d65 7465 722c 2074 6861 - parameter, tha │ │ │ -00053ed0: 7420 6973 2073 696d 696c 6172 2074 6f20 t is similar to │ │ │ -00053ee0: 636f 6c6f 7220 7370 6163 6520 7369 676d color space sigm │ │ │ -00053ef0: 6120 696e 2062 696c 6174 6572 616c 4669 a in bilateralFi │ │ │ -00053f00: 6c74 6572 2e3c 2f64 643e 0a3c 6464 3e3c lter.
    .
    < │ │ │ -00053f10: 636f 6465 3e6c 616d 6264 615f 6174 7465 code>lambda_atte │ │ │ -00053f20: 6e75 6174 696f 6e3c 2f63 6f64 653e 202d nuation - │ │ │ -00053f30: 2069 6e74 6572 6e61 6c20 7061 7261 6d65 internal parame │ │ │ -00053f40: 7465 722c 2064 6566 696e 696e 6720 686f ter, defining ho │ │ │ -00053f50: 7720 6d75 6368 206c 616d 6264 6120 6465 w much lambda de │ │ │ -00053f60: 6372 6561 7365 7320 6166 7465 7220 6561 creases after ea │ │ │ -00053f70: 6368 2069 7465 7261 7469 6f6e 2e20 4e6f ch iteration. No │ │ │ -00053f80: 726d 616c 6c79 2c0a 2069 7420 7368 6f75 rmally,. it shou │ │ │ -00053f90: 6c64 2062 6520 302e 3235 2e20 5365 7474 ld be 0.25. Sett │ │ │ -00053fa0: 696e 6720 6974 2074 6f20 312e 3020 6d61 ing it to 1.0 ma │ │ │ -00053fb0: 7920 6c65 6164 2074 6f20 7374 7265 616b y lead to streak │ │ │ -00053fc0: 696e 6720 6172 7469 6661 6374 732e 3c2f ing artifacts..
    nu │ │ │ -00053fe0: 6d5f 6974 6572 3c2f 636f 6465 3e20 2d20 m_iter - │ │ │ -00053ff0: 6e75 6d62 6572 206f 6620 6974 6572 6174 number of iterat │ │ │ -00054000: 696f 6e73 2075 7365 6420 666f 7220 6669 ions used for fi │ │ │ -00054010: 6c74 6572 696e 672c 2033 2069 7320 7573 ltering, 3 is us │ │ │ -00054020: 7561 6c6c 7920 656e 6f75 6768 2e3c 2f64 ually enough..
    ..
  • .
  • .< │ │ │ -00054050: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ -00054060: 6574 6169 6c22 2069 643d 2266 6173 7447 etail" id="fastG │ │ │ -00054070: 6c6f 6261 6c53 6d6f 6f74 6865 7246 696c lobalSmootherFil │ │ │ -00054080: 7465 7228 6f72 672e 6f70 656e 6376 2e63 ter(org.opencv.c │ │ │ -00054090: 6f72 652e 4d61 742c 6f72 672e 6f70 656e ore.Mat,org.open │ │ │ -000540a0: 6376 2e63 6f72 652e 4d61 742c 6f72 672e cv.core.Mat,org. │ │ │ -000540b0: 6f70 656e 6376 2e63 6f72 652e 4d61 742c opencv.core.Mat, │ │ │ -000540c0: 646f 7562 6c65 2c64 6f75 626c 652c 646f double,double,do │ │ │ -000540d0: 7562 6c65 2922 3e0a 3c68 333e 6661 7374 uble)">.

    fast │ │ │ -000540e0: 476c 6f62 616c 536d 6f6f 7468 6572 4669 GlobalSmootherFi │ │ │ -000540f0: 6c74 6572 3c2f 6833 3e0a 3c64 6976 2063 lter

    .
    │ │ │ -00054130: 7075 626c 6963 2073 7461 7469 633c 2f73 public static void& │ │ │ -00054170: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ -00054190: 6661 7374 476c 6f62 616c 536d 6f6f 7468 fastGlobalSmooth │ │ │ -000541a0: 6572 4669 6c74 6572 3c2f 7370 616e 3e3c erFilter< │ │ │ -000541b0: 7762 723e 3c73 7061 6e20 636c 6173 733d wbr>(Mat guide,. < │ │ │ -00054220: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -00054230: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -00054240: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -00054250: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat src,. Mat dst,. dou │ │ │ -000542c0: 626c 6526 6e62 7370 3b6c 616d 6264 612c ble lambda, │ │ │ -000542d0: 0a20 646f 7562 6c65 266e 6273 703b 7369 . double si │ │ │ -000542e0: 676d 615f 636f 6c6f 722c 0a20 646f 7562 gma_color,. doub │ │ │ -000542f0: 6c65 266e 6273 703b 6c61 6d62 6461 5f61 le lambda_a │ │ │ -00054300: 7474 656e 7561 7469 6f6e 293c 2f73 7061 ttenuation)
    .
    Simp │ │ │ -00054330: 6c65 206f 6e65 2d6c 696e 6520 4661 7374 le one-line Fast │ │ │ -00054340: 2047 6c6f 6261 6c20 536d 6f6f 7468 6572 Global Smoother │ │ │ -00054350: 2066 696c 7465 7220 6361 6c6c 2e20 4966 filter call. If │ │ │ -00054360: 2079 6f75 2068 6176 6520 6d75 6c74 6970 you have multip │ │ │ -00054370: 6c65 2069 6d61 6765 7320 746f 2066 696c le images to fil │ │ │ -00054380: 7465 7220 7769 7468 2074 6865 2073 616d ter with the sam │ │ │ -00054390: 650a 2067 7569 6465 2074 6865 6e20 7573 e. guide then us │ │ │ -000543a0: 6520 4661 7374 476c 6f62 616c 536d 6f6f e FastGlobalSmoo │ │ │ -000543b0: 7468 6572 4669 6c74 6572 2069 6e74 6572 therFilter inter │ │ │ -000543c0: 6661 6365 2074 6f20 6176 6f69 6420 6578 face to avoid ex │ │ │ -000543d0: 7472 6120 636f 6d70 7574 6174 696f 6e73 tra computations │ │ │ -000543e0: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 .
    .
    .
    P │ │ │ -00054400: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ -00054410: 3c64 643e 3c63 6f64 653e 6775 6964 653c
    guide< │ │ │ -00054420: 2f63 6f64 653e 202d 2069 6d61 6765 2073 /code> - image s │ │ │ -00054430: 6572 7669 6e67 2061 7320 6775 6964 6520 erving as guide │ │ │ -00054440: 666f 7220 6669 6c74 6572 696e 672e 2049 for filtering. I │ │ │ -00054450: 7420 7368 6f75 6c64 2068 6176 6520 382d t should have 8- │ │ │ -00054460: 6269 7420 6465 7074 6820 616e 6420 6569 bit depth and ei │ │ │ -00054470: 7468 6572 2031 206f 7220 3320 6368 616e ther 1 or 3 chan │ │ │ -00054480: 6e65 6c73 2e3c 2f64 643e 0a3c 6464 3e3c nels.
    .
    < │ │ │ -00054490: 636f 6465 3e73 7263 3c2f 636f 6465 3e20 code>src │ │ │ -000544a0: 2d20 736f 7572 6365 2069 6d61 6765 2066 - source image f │ │ │ -000544b0: 6f72 2066 696c 7465 7269 6e67 2077 6974 or filtering wit │ │ │ -000544c0: 6820 756e 7369 676e 6564 2038 2d62 6974 h unsigned 8-bit │ │ │ -000544d0: 206f 7220 7369 676e 6564 2031 362d 6269 or signed 16-bi │ │ │ -000544e0: 7420 6f72 2066 6c6f 6174 696e 672d 706f t or floating-po │ │ │ -000544f0: 696e 7420 3332 2d62 6974 2064 6570 7468 int 32-bit depth │ │ │ -00054500: 2061 6e64 2075 7020 746f 2034 2063 6861 and up to 4 cha │ │ │ -00054510: 6e6e 656c 732e 3c2f 6464 3e0a 3c64 643e nnels.
    .
    │ │ │ -00054520: 3c63 6f64 653e 6473 743c 2f63 6f64 653e dst │ │ │ -00054530: 202d 2064 6573 7469 6e61 7469 6f6e 2069 - destination i │ │ │ -00054540: 6d61 6765 2e3c 2f64 643e 0a3c 6464 3e3c mage.
    .
    < │ │ │ -00054550: 636f 6465 3e6c 616d 6264 613c 2f63 6f64 code>lambda - parameter d │ │ │ -00054570: 6566 696e 696e 6720 7468 6520 616d 6f75 efining the amou │ │ │ -00054580: 6e74 206f 6620 7265 6775 6c61 7269 7a61 nt of regulariza │ │ │ -00054590: 7469 6f6e 3c2f 6464 3e0a 3c64 643e 3c63 tion
    .
    sigma_color< │ │ │ -000545b0: 2f63 6f64 653e 202d 2070 6172 616d 6574 /code> - paramet │ │ │ -000545c0: 6572 2c20 7468 6174 2069 7320 7369 6d69 er, that is simi │ │ │ -000545d0: 6c61 7220 746f 2063 6f6c 6f72 2073 7061 lar to color spa │ │ │ -000545e0: 6365 2073 6967 6d61 2069 6e20 6269 6c61 ce sigma in bila │ │ │ -000545f0: 7465 7261 6c46 696c 7465 722e 3c2f 6464 teralFilter.
    .
    lamb │ │ │ -00054610: 6461 5f61 7474 656e 7561 7469 6f6e 3c2f da_attenuation - internal │ │ │ -00054630: 2070 6172 616d 6574 6572 2c20 6465 6669 parameter, defi │ │ │ -00054640: 6e69 6e67 2068 6f77 206d 7563 6820 6c61 ning how much la │ │ │ -00054650: 6d62 6461 2064 6563 7265 6173 6573 2061 mbda decreases a │ │ │ -00054660: 6674 6572 2065 6163 6820 6974 6572 6174 fter each iterat │ │ │ -00054670: 696f 6e2e 204e 6f72 6d61 6c6c 792c 0a20 ion. Normally,. │ │ │ -00054680: 6974 2073 686f 756c 6420 6265 2030 2e32 it should be 0.2 │ │ │ -00054690: 352e 2053 6574 7469 6e67 2069 7420 746f 5. Setting it to │ │ │ -000546a0: 2031 2e30 206d 6179 206c 6561 6420 746f 1.0 may lead to │ │ │ -000546b0: 2073 7472 6561 6b69 6e67 2061 7274 6966 streaking artif │ │ │ -000546c0: 6163 7473 2e3c 2f64 643e 0a3c 2f64 6c3e acts.
    .
    │ │ │ -000546d0: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 ..
  • .
  • .
    .

    fas │ │ │ -00054770: 7447 6c6f 6261 6c53 6d6f 6f74 6865 7246 tGlobalSmootherF │ │ │ -00054780: 696c 7465 723c 2f68 333e 0a3c 6469 7620 ilter

    .
    public static void │ │ │ -00054800: 266e 6273 703b 3c73 7061 6e20 636c 6173  fastGlobalSmoot │ │ │ -00054830: 6865 7246 696c 7465 723c 2f73 7061 6e3e herFilter │ │ │ -00054840: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ -00054860: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -00054870: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -00054880: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -00054890: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat guide,. │ │ │ -000548b0: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ -000548f0: 2f61 3e26 6e62 7370 3b73 7263 2c0a 203c /a> src,. < │ │ │ -00054900: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -00054910: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -00054920: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -00054930: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat dst,. do │ │ │ -00054950: 7562 6c65 266e 6273 703b 6c61 6d62 6461 uble lambda │ │ │ -00054960: 2c0a 2064 6f75 626c 6526 6e62 7370 3b73 ,. double s │ │ │ -00054970: 6967 6d61 5f63 6f6c 6f72 293c 2f73 7061 igma_color)
    .
    Simp │ │ │ -000549a0: 6c65 206f 6e65 2d6c 696e 6520 4661 7374 le one-line Fast │ │ │ -000549b0: 2047 6c6f 6261 6c20 536d 6f6f 7468 6572 Global Smoother │ │ │ -000549c0: 2066 696c 7465 7220 6361 6c6c 2e20 4966 filter call. If │ │ │ -000549d0: 2079 6f75 2068 6176 6520 6d75 6c74 6970 you have multip │ │ │ -000549e0: 6c65 2069 6d61 6765 7320 746f 2066 696c le images to fil │ │ │ -000549f0: 7465 7220 7769 7468 2074 6865 2073 616d ter with the sam │ │ │ -00054a00: 650a 2067 7569 6465 2074 6865 6e20 7573 e. guide then us │ │ │ -00054a10: 6520 4661 7374 476c 6f62 616c 536d 6f6f e FastGlobalSmoo │ │ │ -00054a20: 7468 6572 4669 6c74 6572 2069 6e74 6572 therFilter inter │ │ │ -00054a30: 6661 6365 2074 6f20 6176 6f69 6420 6578 face to avoid ex │ │ │ -00054a40: 7472 6120 636f 6d70 7574 6174 696f 6e73 tra computations │ │ │ -00054a50: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 .
    .
    .
    P │ │ │ -00054a70: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ -00054a80: 3c64 643e 3c63 6f64 653e 6775 6964 653c
    guide< │ │ │ -00054a90: 2f63 6f64 653e 202d 2069 6d61 6765 2073 /code> - image s │ │ │ -00054aa0: 6572 7669 6e67 2061 7320 6775 6964 6520 erving as guide │ │ │ -00054ab0: 666f 7220 6669 6c74 6572 696e 672e 2049 for filtering. I │ │ │ -00054ac0: 7420 7368 6f75 6c64 2068 6176 6520 382d t should have 8- │ │ │ -00054ad0: 6269 7420 6465 7074 6820 616e 6420 6569 bit depth and ei │ │ │ -00054ae0: 7468 6572 2031 206f 7220 3320 6368 616e ther 1 or 3 chan │ │ │ -00054af0: 6e65 6c73 2e3c 2f64 643e 0a3c 6464 3e3c nels.
    .
    < │ │ │ -00054b00: 636f 6465 3e73 7263 3c2f 636f 6465 3e20 code>src │ │ │ -00054b10: 2d20 736f 7572 6365 2069 6d61 6765 2066 - source image f │ │ │ -00054b20: 6f72 2066 696c 7465 7269 6e67 2077 6974 or filtering wit │ │ │ -00054b30: 6820 756e 7369 676e 6564 2038 2d62 6974 h unsigned 8-bit │ │ │ -00054b40: 206f 7220 7369 676e 6564 2031 362d 6269 or signed 16-bi │ │ │ -00054b50: 7420 6f72 2066 6c6f 6174 696e 672d 706f t or floating-po │ │ │ -00054b60: 696e 7420 3332 2d62 6974 2064 6570 7468 int 32-bit depth │ │ │ -00054b70: 2061 6e64 2075 7020 746f 2034 2063 6861 and up to 4 cha │ │ │ -00054b80: 6e6e 656c 732e 3c2f 6464 3e0a 3c64 643e nnels.
    .
    │ │ │ -00054b90: 3c63 6f64 653e 6473 743c 2f63 6f64 653e dst │ │ │ -00054ba0: 202d 2064 6573 7469 6e61 7469 6f6e 2069 - destination i │ │ │ -00054bb0: 6d61 6765 2e3c 2f64 643e 0a3c 6464 3e3c mage.
    .
    < │ │ │ -00054bc0: 636f 6465 3e6c 616d 6264 613c 2f63 6f64 code>lambda - parameter d │ │ │ -00054be0: 6566 696e 696e 6720 7468 6520 616d 6f75 efining the amou │ │ │ -00054bf0: 6e74 206f 6620 7265 6775 6c61 7269 7a61 nt of regulariza │ │ │ -00054c00: 7469 6f6e 3c2f 6464 3e0a 3c64 643e 3c63 tion
    .
    sigma_color< │ │ │ -00054c20: 2f63 6f64 653e 202d 2070 6172 616d 6574 /code> - paramet │ │ │ -00054c30: 6572 2c20 7468 6174 2069 7320 7369 6d69 er, that is simi │ │ │ -00054c40: 6c61 7220 746f 2063 6f6c 6f72 2073 7061 lar to color spa │ │ │ -00054c50: 6365 2073 6967 6d61 2069 6e20 6269 6c61 ce sigma in bila │ │ │ -00054c60: 7465 7261 6c46 696c 7465 722e 0a0a 2069 teralFilter... i │ │ │ -00054c70: 7420 7368 6f75 6c64 2062 6520 302e 3235 t should be 0.25 │ │ │ -00054c80: 2e20 5365 7474 696e 6720 6974 2074 6f20 . Setting it to │ │ │ -00054c90: 312e 3020 6d61 7920 6c65 6164 2074 6f20 1.0 may lead to │ │ │ -00054ca0: 7374 7265 616b 696e 6720 6172 7469 6661 streaking artifa │ │ │ -00054cb0: 6374 732e 3c2f 6464 3e0a 3c2f 646c 3e0a cts.
    .
    . │ │ │ -00054cc0: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e
    .
  • │ │ │ -00054cd0: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .

    l0Smooth │ │ │ -00054d40: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ -00054d80: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ -00054d90: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ -00054db0: 766f 6964 3c2f 7370 616e 3e26 6e62 7370 void  │ │ │ -00054dc0: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;l0Sm │ │ │ -00054de0: 6f6f 7468 3c2f 7370 616e 3e3c 7762 723e ooth │ │ │ -00054df0: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Mat&nb │ │ │ -00054e50: 7370 3b73 7263 2c0a 203c 6120 6872 6566 sp;src,. Mat&nbs │ │ │ -00054ea0: 703b 6473 742c 0a20 646f 7562 6c65 266e p;dst,. double&n │ │ │ -00054eb0: 6273 703b 6c61 6d62 6461 2c0a 2064 6f75 bsp;lambda,. dou │ │ │ -00054ec0: 626c 6526 6e62 7370 3b6b 6170 7061 293c ble kappa)< │ │ │ -00054ed0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ -00054ef0: 476c 6f62 616c 2069 6d61 6765 2073 6d6f Global image smo │ │ │ -00054f00: 6f74 6869 6e67 2076 6961 204c 3020 6772 othing via L0 gr │ │ │ -00054f10: 6164 6965 6e74 206d 696e 696d 697a 6174 adient minimizat │ │ │ -00054f20: 696f 6e2e 3c2f 6469 763e 0a3c 646c 2063 ion..
    .Parameters:.
    src │ │ │ -00054f60: 3c2f 636f 6465 3e20 2d20 736f 7572 6365 - source │ │ │ -00054f70: 2069 6d61 6765 2066 6f72 2066 696c 7465 image for filte │ │ │ -00054f80: 7269 6e67 2077 6974 6820 756e 7369 676e ring with unsign │ │ │ -00054f90: 6564 2038 2d62 6974 206f 7220 7369 676e ed 8-bit or sign │ │ │ -00054fa0: 6564 2031 362d 6269 7420 6f72 2066 6c6f ed 16-bit or flo │ │ │ -00054fb0: 6174 696e 672d 706f 696e 7420 6465 7074 ating-point dept │ │ │ -00054fc0: 682e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 h.
    .
    dst - d │ │ │ -00054fe0: 6573 7469 6e61 7469 6f6e 2069 6d61 6765 estination image │ │ │ -00054ff0: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    lambda - │ │ │ -00055010: 2070 6172 616d 6574 6572 2064 6566 696e parameter defin │ │ │ -00055020: 696e 6720 7468 6520 736d 6f6f 7468 2074 ing the smooth t │ │ │ -00055030: 6572 6d20 7765 6967 6874 2e3c 2f64 643e erm weight.
    │ │ │ -00055040: 0a3c 6464 3e3c 636f 6465 3e6b 6170 7061 .
    kappa │ │ │ -00055050: 3c2f 636f 6465 3e20 2d20 7061 7261 6d65 - parame │ │ │ -00055060: 7465 7220 6465 6669 6e69 6e67 2074 6865 ter defining the │ │ │ -00055070: 2069 6e63 7265 6173 696e 6720 6661 6374 increasing fact │ │ │ -00055080: 6f72 206f 6620 7468 6520 7765 6967 6874 or of the weight │ │ │ -00055090: 206f 6620 7468 6520 6772 6164 6965 6e74 of the gradient │ │ │ -000550a0: 2064 6174 6120 7465 726d 2e0a 0a20 466f data term... Fo │ │ │ -000550b0: 7220 6d6f 7265 2064 6574 6169 6c73 2061 r more details a │ │ │ -000550c0: 626f 7574 204c 3020 536d 6f6f 7468 6572 bout L0 Smoother │ │ │ -000550d0: 2c20 7365 6520 7468 6520 6f72 6967 696e , see the origin │ │ │ -000550e0: 616c 2070 6170 6572 2043 4954 453a 2078 al paper CITE: x │ │ │ -000550f0: 7532 3031 3169 6d61 6765 2e3c 2f64 643e u2011image.
    │ │ │ -00055100: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
    .
    .
  • .
  • ..

    l0Smooth │ │ │ -00055180: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ -000551c0: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ -000551d0: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ -000551f0: 766f 6964 3c2f 7370 616e 3e26 6e62 7370 void  │ │ │ -00055200: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;l0Sm │ │ │ -00055220: 6f6f 7468 3c2f 7370 616e 3e3c 7762 723e ooth │ │ │ -00055230: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Mat&nb │ │ │ -00055290: 7370 3b73 7263 2c0a 203c 6120 6872 6566 sp;src,. Mat&nbs │ │ │ -000552e0: 703b 6473 742c 0a20 646f 7562 6c65 266e p;dst,. double&n │ │ │ -000552f0: 6273 703b 6c61 6d62 6461 293c 2f73 7061 bsp;lambda)
    .
    Glob │ │ │ -00055320: 616c 2069 6d61 6765 2073 6d6f 6f74 6869 al image smoothi │ │ │ -00055330: 6e67 2076 6961 204c 3020 6772 6164 6965 ng via L0 gradie │ │ │ -00055340: 6e74 206d 696e 696d 697a 6174 696f 6e2e nt minimization. │ │ │ -00055350: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ -00055370: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ -00055380: 6464 3e3c 636f 6465 3e73 7263 3c2f 636f dd>src - source ima │ │ │ -000553a0: 6765 2066 6f72 2066 696c 7465 7269 6e67 ge for filtering │ │ │ -000553b0: 2077 6974 6820 756e 7369 676e 6564 2038 with unsigned 8 │ │ │ -000553c0: 2d62 6974 206f 7220 7369 676e 6564 2031 -bit or signed 1 │ │ │ -000553d0: 362d 6269 7420 6f72 2066 6c6f 6174 696e 6-bit or floatin │ │ │ -000553e0: 672d 706f 696e 7420 6465 7074 682e 3c2f g-point depth..
    ds │ │ │ -00055400: 743c 2f63 6f64 653e 202d 2064 6573 7469 t - desti │ │ │ -00055410: 6e61 7469 6f6e 2069 6d61 6765 2e3c 2f64 nation image..
    lam │ │ │ -00055430: 6264 613c 2f63 6f64 653e 202d 2070 6172 bda - par │ │ │ -00055440: 616d 6574 6572 2064 6566 696e 696e 6720 ameter defining │ │ │ -00055450: 7468 6520 736d 6f6f 7468 2074 6572 6d20 the smooth term │ │ │ -00055460: 7765 6967 6874 2e0a 0a0a 2046 6f72 206d weight.... For m │ │ │ -00055470: 6f72 6520 6465 7461 696c 7320 6162 6f75 ore details abou │ │ │ -00055480: 7420 4c30 2053 6d6f 6f74 6865 722c 2073 t L0 Smoother, s │ │ │ -00055490: 6565 2074 6865 206f 7269 6769 6e61 6c20 ee the original │ │ │ -000554a0: 7061 7065 7220 4349 5445 3a20 7875 3230 paper CITE: xu20 │ │ │ -000554b0: 3131 696d 6167 652e 3c2f 6464 3e0a 3c2f 11image.
    ...< │ │ │ -000554d0: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    l0 │ │ │ -00055530: 536d 6f6f 7468 3c2f 6833 3e0a 3c64 6976 Smooth

    ..
    Glo │ │ │ -000556c0: 6261 6c20 696d 6167 6520 736d 6f6f 7468 bal image smooth │ │ │ -000556d0: 696e 6720 7669 6120 4c30 2067 7261 6469 ing via L0 gradi │ │ │ -000556e0: 656e 7420 6d69 6e69 6d69 7a61 7469 6f6e ent minimization │ │ │ -000556f0: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 .
    .
    .
    P │ │ │ -00055710: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ -00055720: 3c64 643e 3c63 6f64 653e 7372 633c 2f63
    src - source im │ │ │ -00055740: 6167 6520 666f 7220 6669 6c74 6572 696e age for filterin │ │ │ -00055750: 6720 7769 7468 2075 6e73 6967 6e65 6420 g with unsigned │ │ │ -00055760: 382d 6269 7420 6f72 2073 6967 6e65 6420 8-bit or signed │ │ │ -00055770: 3136 2d62 6974 206f 7220 666c 6f61 7469 16-bit or floati │ │ │ -00055780: 6e67 2d70 6f69 6e74 2064 6570 7468 2e3c ng-point depth.< │ │ │ -00055790: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e64 /dd>.
    d │ │ │ -000557a0: 7374 3c2f 636f 6465 3e20 2d20 6465 7374 st - dest │ │ │ -000557b0: 696e 6174 696f 6e20 696d 6167 652e 0a0a ination image... │ │ │ -000557c0: 0a0a 2046 6f72 206d 6f72 6520 6465 7461 .. For more deta │ │ │ -000557d0: 696c 7320 6162 6f75 7420 4c30 2053 6d6f ils about L0 Smo │ │ │ -000557e0: 6f74 6865 722c 2073 6565 2074 6865 206f other, see the o │ │ │ -000557f0: 7269 6769 6e61 6c20 7061 7065 7220 4349 riginal paper CI │ │ │ -00055800: 5445 3a20 7875 3230 3131 696d 6167 652e TE: xu2011image. │ │ │ -00055810: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365
    .
    ..
  • .
  • .
    .

    createEd │ │ │ -00055870: 6765 4472 6177 696e 673c 2f68 333e 0a3c geDrawing

    .< │ │ │ -00055880: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ -00055890: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ -000558c0: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ -000558d0: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ -000558e0: 726e 2d74 7970 6522 3e3c 6120 6872 6566 rn-type">
    EdgeDra │ │ │ -00055930: 7769 6e67 3c2f 613e 3c2f 7370 616e 3e26 wing& │ │ │ -00055940: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ -00055960: 6372 6561 7465 4564 6765 4472 6177 696e createEdgeDrawin │ │ │ -00055970: 673c 2f73 7061 6e3e 2829 3c2f 6469 763e g() │ │ │ -00055980: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
    Creates a sm │ │ │ -000559a0: 6172 7420 706f 696e 7465 7220 746f 2061 art pointer to a │ │ │ -000559b0: 2045 6467 6544 7261 7769 6e67 206f 626a EdgeDrawing obj │ │ │ -000559c0: 6563 7420 616e 6420 696e 6974 6961 6c69 ect and initiali │ │ │ -000559d0: 7a65 7320 6974 3c2f 6469 763e 0a3c 646c zes it
    .
    . │ │ │ -000559f0: 3c64 743e 5265 7475 726e 733a 3c2f 6474
    Returns:
    .
    automatica │ │ │ -00055a10: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    ..
  • .
  • .< │ │ │ -00055a40: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ -00055a50: 6574 6169 6c22 2069 643d 2263 7265 6174 etail" id="creat │ │ │ -00055a60: 6544 6973 7061 7269 7479 574c 5346 696c eDisparityWLSFil │ │ │ -00055a70: 7465 7228 6f72 672e 6f70 656e 6376 2e63 ter(org.opencv.c │ │ │ -00055a80: 616c 6962 3364 2e53 7465 7265 6f4d 6174 alib3d.StereoMat │ │ │ -00055a90: 6368 6572 2922 3e0a 3c68 333e 6372 6561 cher)">.

    crea │ │ │ -00055aa0: 7465 4469 7370 6172 6974 7957 4c53 4669 teDisparityWLSFi │ │ │ -00055ab0: 6c74 6572 3c2f 6833 3e0a 3c64 6976 2063 lter

    .
    │ │ │ -00055af0: 7075 626c 6963 2073 7461 7469 633c 2f73 public static Dispa │ │ │ -00055b70: 7269 7479 574c 5346 696c 7465 723c 2f61 rityWLSFilter createD │ │ │ -00055bb0: 6973 7061 7269 7479 574c 5346 696c 7465 isparityWLSFilte │ │ │ -00055bc0: 723c 2f73 7061 6e3e 3c77 6272 3e3c 7370 r(StereoMatcher │ │ │ -00055c40: 3c2f 613e 266e 6273 703b 6d61 7463 6865  matche │ │ │ -00055c50: 725f 6c65 6674 293c 2f73 7061 6e3e 3c2f r_left).
    Convenie │ │ │ -00055c80: 6e63 6520 6661 6374 6f72 7920 6d65 7468 nce factory meth │ │ │ -00055c90: 6f64 2074 6861 7420 6372 6561 7465 7320 od that creates │ │ │ -00055ca0: 616e 2069 6e73 7461 6e63 6520 6f66 2044 an instance of D │ │ │ -00055cb0: 6973 7061 7269 7479 574c 5346 696c 7465 isparityWLSFilte │ │ │ -00055cc0: 7220 616e 6420 7365 7473 2075 7020 616c r and sets up al │ │ │ -00055cd0: 6c20 7468 6520 7265 6c65 7661 6e74 0a20 l the relevant. │ │ │ -00055ce0: 6669 6c74 6572 2070 6172 616d 6574 6572 filter parameter │ │ │ -00055cf0: 7320 6175 746f 6d61 7469 6361 6c6c 7920 s automatically │ │ │ -00055d00: 6261 7365 6420 6f6e 2074 6865 206d 6174 based on the mat │ │ │ -00055d10: 6368 6572 2069 6e73 7461 6e63 652e 2043 cher instance. C │ │ │ -00055d20: 7572 7265 6e74 6c79 2073 7570 706f 7274 urrently support │ │ │ -00055d30: 7320 6f6e 6c79 2053 7465 7265 6f42 4d20 s only StereoBM │ │ │ -00055d40: 616e 6420 5374 6572 656f 5347 424d 2e3c and StereoSGBM.< │ │ │ -00055d50: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ -00055d70: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .matcher_ │ │ │ -00055d90: 6c65 6674 3c2f 636f 6465 3e20 2d20 7374 left - st │ │ │ -00055da0: 6572 656f 206d 6174 6368 6572 2069 6e73 ereo matcher ins │ │ │ -00055db0: 7461 6e63 6520 7468 6174 2077 696c 6c20 tance that will │ │ │ -00055dc0: 6265 2075 7365 6420 7769 7468 2074 6865 be used with the │ │ │ -00055dd0: 2066 696c 7465 723c 2f64 643e 0a3c 6474 filter.
    Returns:
    .< │ │ │ -00055df0: 6464 3e61 7574 6f6d 6174 6963 616c 6c79 dd>automatically │ │ │ -00055e00: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated. │ │ │ -00055e10: 3c2f 646c 3e0a 3c2f 7365 6374 696f 6e3e
    . │ │ │ -00055e20: 0a3c 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 .
  • .
  • ..< │ │ │ -00055e80: 6833 3e63 7265 6174 6552 6967 6874 4d61 h3>createRightMa │ │ │ -00055e90: 7463 6865 723c 2f68 333e 0a3c 6469 7620 tcher.. │ │ │ -00056040: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
    Convenience m │ │ │ -00056060: 6574 686f 6420 746f 2073 6574 2075 7020 ethod to set up │ │ │ -00056070: 7468 6520 6d61 7463 6865 7220 666f 7220 the matcher for │ │ │ -00056080: 636f 6d70 7574 696e 6720 7468 6520 7269 computing the ri │ │ │ -00056090: 6768 742d 7669 6577 2064 6973 7061 7269 ght-view dispari │ │ │ -000560a0: 7479 206d 6170 0a20 7468 6174 2069 7320 ty map. that is │ │ │ -000560b0: 7265 7175 6972 6564 2069 6e20 6361 7365 required in case │ │ │ -000560c0: 206f 6620 6669 6c74 6572 696e 6720 7769 of filtering wi │ │ │ -000560d0: 7468 2063 6f6e 6669 6465 6e63 652e 3c2f th confidence..
    .
    Para │ │ │ -00056100: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    matcher_l │ │ │ -00056120: 6566 743c 2f63 6f64 653e 202d 206d 6169 eft - mai │ │ │ -00056130: 6e20 7374 6572 656f 206d 6174 6368 6572 n stereo matcher │ │ │ -00056140: 2069 6e73 7461 6e63 6520 7468 6174 2077 instance that w │ │ │ -00056150: 696c 6c20 6265 2075 7365 6420 7769 7468 ill be used with │ │ │ -00056160: 2074 6865 2066 696c 7465 723c 2f64 643e the filter
    │ │ │ -00056170: 0a3c 6474 3e52 6574 7572 6e73 3a3c 2f64 .
    Returns:.
    automatic │ │ │ -00056190: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    ..
  • .
  • . │ │ │ -000561c0: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    creat │ │ │ -00056210: 6544 6973 7061 7269 7479 574c 5346 696c eDisparityWLSFil │ │ │ -00056220: 7465 7247 656e 6572 6963 3c2f 6833 3e0a terGeneric

    . │ │ │ -00056230: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
    public sta │ │ │ -00056270: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ -00056280: 3c73 7061 6e20 636c 6173 733d 2272 6574 DisparityWLSFil │ │ │ -000562f0: 7465 723c 2f61 3e3c 2f73 7061 6e3e 266e ter&n │ │ │ -00056300: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;c │ │ │ -00056320: 7265 6174 6544 6973 7061 7269 7479 574c reateDisparityWL │ │ │ -00056330: 5346 696c 7465 7247 656e 6572 6963 3c2f SFilterGeneric(boolean  │ │ │ -00056370: 3b75 7365 5f63 6f6e 6669 6465 6e63 6529 ;use_confidence) │ │ │ -00056380: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .More generic fa │ │ │ -000563b0: 6374 6f72 7920 6d65 7468 6f64 2c20 6372 ctory method, cr │ │ │ -000563c0: 6561 7465 2069 6e73 7461 6e63 6520 6f66 eate instance of │ │ │ -000563d0: 2044 6973 7061 7269 7479 574c 5346 696c DisparityWLSFil │ │ │ -000563e0: 7465 7220 616e 6420 6578 6563 7574 6520 ter and execute │ │ │ -000563f0: 6261 7369 630a 2069 6e69 7469 616c 697a basic. initializ │ │ │ -00056400: 6174 696f 6e20 726f 7574 696e 6573 2e20 ation routines. │ │ │ -00056410: 5768 656e 2075 7369 6e67 2074 6869 7320 When using this │ │ │ -00056420: 6d65 7468 6f64 2079 6f75 2077 696c 6c20 method you will │ │ │ -00056430: 6e65 6564 2074 6f20 7365 742d 7570 2074 need to set-up t │ │ │ -00056440: 6865 2052 4f49 2c20 6d61 7463 6865 7273 he ROI, matchers │ │ │ -00056450: 2061 6e64 0a20 6f74 6865 7220 7061 7261 and. other para │ │ │ -00056460: 6d65 7465 7273 2062 7920 796f 7572 7365 meters by yourse │ │ │ -00056470: 6c66 2e3c 2f64 6976 3e0a 3c64 6c20 636c lf..
    .
    Parameters:
    .
    use_ │ │ │ -000564b0: 636f 6e66 6964 656e 6365 3c2f 636f 6465 confidence - filtering wi │ │ │ -000564d0: 7468 2063 6f6e 6669 6465 6e63 6520 7265 th confidence re │ │ │ -000564e0: 7175 6972 6573 2074 776f 2064 6973 7061 quires two dispa │ │ │ -000564f0: 7269 7479 206d 6170 7320 2866 6f72 2074 rity maps (for t │ │ │ -00056500: 6865 206c 6566 7420 616e 6420 7269 6768 he left and righ │ │ │ -00056510: 7420 7669 6577 7329 2061 6e64 2069 730a t views) and is. │ │ │ -00056520: 2061 7070 726f 7869 6d61 7465 6c79 2074 approximately t │ │ │ -00056530: 776f 2074 696d 6573 2073 6c6f 7765 722e wo times slower. │ │ │ -00056540: 2048 6f77 6576 6572 2c20 7175 616c 6974 However, qualit │ │ │ -00056550: 7920 6973 2074 7970 6963 616c 6c79 2073 y is typically s │ │ │ -00056560: 6967 6e69 6669 6361 6e74 6c79 2062 6574 ignificantly bet │ │ │ -00056570: 7465 722e 3c2f 6464 3e0a 3c64 743e 5265 ter.
    .
    Re │ │ │ -00056580: 7475 726e 733a 3c2f 6474 3e0a 3c64 643e turns:
    .
    │ │ │ -00056590: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ -000565a0: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
    ..
    ..
  • ..

    readGT.
    public │ │ │ -00056660: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ -00056670: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;in │ │ │ -00056690: 743c 2f73 7061 6e3e 266e 6273 703b 3c73 t readGT< │ │ │ -000566c0: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(String src_path │ │ │ -000567a0: 2c0a 203c 6120 6872 6566 3d22 2e2e 2f63 ,. M │ │ │ -000567e0: 6174 3c2f 613e 266e 6273 703b 6473 7429 at dst) │ │ │ -000567f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .Function for re │ │ │ -00056820: 6164 696e 6720 6772 6f75 6e64 2074 7275 ading ground tru │ │ │ -00056830: 7468 2064 6973 7061 7269 7479 206d 6170 th disparity map │ │ │ -00056840: 732e 2053 7570 706f 7274 7320 6261 7369 s. Supports basi │ │ │ -00056850: 6320 4d69 6464 6c65 6275 7279 0a20 616e c Middlebury. an │ │ │ -00056860: 6420 4d50 492d 5369 6e74 656c 2066 6f72 d MPI-Sintel for │ │ │ -00056870: 6d61 7473 2e20 4e6f 7465 2074 6861 7420 mats. Note that │ │ │ -00056880: 7468 6520 7265 7375 6c74 696e 6720 6469 the resulting di │ │ │ -00056890: 7370 6172 6974 7920 6d61 7020 6973 2073 sparity map is s │ │ │ -000568a0: 6361 6c65 6420 6279 2031 362e 3c2f 6469 caled by 16..
    .
    Parame │ │ │ -000568d0: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
    .
    < │ │ │ -000568e0: 636f 6465 3e73 7263 5f70 6174 683c 2f63 code>src_path - path to t │ │ │ -00056900: 6865 2069 6d61 6765 2c20 636f 6e74 6169 he image, contai │ │ │ -00056910: 6e69 6e67 2067 726f 756e 642d 7472 7574 ning ground-trut │ │ │ -00056920: 6820 6469 7370 6172 6974 7920 6d61 703c h disparity map< │ │ │ -00056930: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e64 /dd>.
    d │ │ │ -00056940: 7374 3c2f 636f 6465 3e20 2d20 6f75 7470 st - outp │ │ │ -00056950: 7574 2064 6973 7061 7269 7479 206d 6170 ut disparity map │ │ │ -00056960: 2c20 4356 5f31 3653 2064 6570 7468 3c2f , CV_16S depth.
    Returns: │ │ │ -00056980: 3c2f 6474 3e0a 3c64 643e 7265 7475 726e
    .
    return │ │ │ -00056990: 7320 7a65 726f 2069 6620 7375 6363 6573 s zero if succes │ │ │ -000569a0: 7366 756c 6c79 2072 6561 6420 7468 6520 sfully read the │ │ │ -000569b0: 6772 6f75 6e64 2074 7275 7468 3c2f 6464 ground truth
    .
    ..

  • .
  • ..

    compute │ │ │ -00056a50: 4d53 453c 2f68 333e 0a3c 6469 7620 636c MSE

    .
    p │ │ │ -00056a90: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static double │ │ │ -00056ad0: 266e 6273 703b 3c73 7061 6e20 636c 6173  computeMSE │ │ │ -00056b20: 283c 6120 6872 6566 3d22 2e2e 2f63 6f72 (Mat │ │ │ -00056b60: 3c2f 613e 266e 6273 703b 4754 2c0a 203c  GT,. < │ │ │ -00056b70: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -00056b80: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ -00056b90: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ -00056ba0: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat src,. Rect< │ │ │ -00056c00: 2f61 3e26 6e62 7370 3b52 4f49 293c 2f73 /a> ROI)
    .
    Fu │ │ │ -00056c30: 6e63 7469 6f6e 2066 6f72 2063 6f6d 7075 nction for compu │ │ │ -00056c40: 7469 6e67 206d 6561 6e20 7371 7561 7265 ting mean square │ │ │ -00056c50: 2065 7272 6f72 2066 6f72 2064 6973 7061 error for dispa │ │ │ -00056c60: 7269 7479 206d 6170 733c 2f64 6976 3e0a rity maps
    . │ │ │ -00056c70: 3c64 6c20 636c 6173 733d 226e 6f74 6573
    .
    Parameter │ │ │ -00056c90: 733a 3c2f 6474 3e0a 3c64 643e 3c63 6f64 s:
    .
    GT - gr │ │ │ -00056cb0: 6f75 6e64 2074 7275 7468 2064 6973 7061 ound truth dispa │ │ │ -00056cc0: 7269 7479 206d 6170 3c2f 6464 3e0a 3c64 rity map
    .src - disparity m │ │ │ -00056cf0: 6170 2074 6f20 6576 616c 7561 7465 3c2f ap to evaluate.
    RO │ │ │ -00056d10: 493c 2f63 6f64 653e 202d 2072 6567 696f I - regio │ │ │ -00056d20: 6e20 6f66 2069 6e74 6572 6573 743c 2f64 n of interest.
    Returns:< │ │ │ -00056d40: 2f64 743e 0a3c 6464 3e72 6574 7572 6e73 /dt>.
    returns │ │ │ -00056d50: 206d 6561 6e20 7371 7561 7265 2065 7272 mean square err │ │ │ -00056d60: 6f72 2062 6574 7765 656e 2047 5420 616e or between GT an │ │ │ -00056d70: 6420 7372 633c 2f64 643e 0a3c 2f64 6c3e d src
    .
    │ │ │ -00056d80: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 ..
  • .
  • .
    .computeBadPixe │ │ │ -00056e20: 6c50 6572 6365 6e74 3c2f 6833 3e0a 3c64 lPercent.public stati │ │ │ -00056e70: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c double computeBad │ │ │ -00056ed0: 5069 7865 6c50 6572 6365 6e74 3c2f 7370 PixelPercent(Ma │ │ │ -00056f40: 743c 2f61 3e26 6e62 7370 3b47 542c 0a20 t GT,. │ │ │ -00056f50: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ -00056f90: 2f61 3e26 6e62 7370 3b73 7263 2c0a 203c /a> src,. < │ │ │ -00056fa0: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ -00056fb0: 5265 6374 2e68 746d 6c22 2074 6974 6c65 Rect.html" title │ │ │ -00056fc0: 3d22 636c 6173 7320 696e 206f 7267 2e6f ="class in org.o │ │ │ -00056fd0: 7065 6e63 762e 636f 7265 223e 5265 6374 pencv.core">Rect │ │ │ -00056fe0: 3c2f 613e 266e 6273 703b 524f 492c 0a20  ROI,. │ │ │ -00056ff0: 696e 7426 6e62 7370 3b74 6872 6573 6829 int thresh) │ │ │ -00057000: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64 .Function for co │ │ │ -00057030: 6d70 7574 696e 6720 7468 6520 7065 7263 mputing the perc │ │ │ -00057040: 656e 7420 6f66 2022 6261 6422 2070 6978 ent of "bad" pix │ │ │ -00057050: 656c 7320 696e 2074 6865 2064 6973 7061 els in the dispa │ │ │ -00057060: 7269 7479 206d 6170 0a20 2870 6978 656c rity map. (pixel │ │ │ -00057070: 7320 7768 6572 6520 6572 726f 7220 6973 s where error is │ │ │ -00057080: 2068 6967 6865 7220 7468 616e 2061 2073 higher than a s │ │ │ -00057090: 7065 6369 6669 6564 2074 6872 6573 686f pecified thresho │ │ │ -000570a0: 6c64 293c 2f64 6976 3e0a 3c64 6c20 636c ld).
    .
    Parameters:
    .
    GT - ground t │ │ │ -000570f0: 7275 7468 2064 6973 7061 7269 7479 206d ruth disparity m │ │ │ -00057100: 6170 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ap
    .
    src - d │ │ │ -00057120: 6973 7061 7269 7479 206d 6170 2074 6f20 isparity map to │ │ │ -00057130: 6576 616c 7561 7465 3c2f 6464 3e0a 3c64 evaluate
    .ROI - region of i │ │ │ -00057160: 6e74 6572 6573 743c 2f64 643e 0a3c 6464 nterest.
    thresh - threshold │ │ │ -00057190: 2075 7365 6420 746f 2064 6574 6572 6d69 used to determi │ │ │ -000571a0: 6e65 2022 6261 6422 2070 6978 656c 733c ne "bad" pixels< │ │ │ -000571b0: 2f64 643e 0a3c 6474 3e52 6574 7572 6e73 /dd>.
    Returns │ │ │ -000571c0: 3a3c 2f64 743e 0a3c 6464 3e72 6574 7572 :
    .
    retur │ │ │ -000571d0: 6e73 206d 6561 6e20 7371 7561 7265 2065 ns mean square e │ │ │ -000571e0: 7272 6f72 2062 6574 7765 656e 2047 5420 rror between GT │ │ │ -000571f0: 616e 6420 7372 633c 2f64 643e 0a3c 2f64 and src
    .
    .
    ..
  • ..

    │ │ │ -00057290: 636f 6d70 7574 6542 6164 5069 7865 6c50 computeBadPixelP │ │ │ -000572a0: 6572 6365 6e74 3c2f 6833 3e0a 3c64 6976 ercent

    .
    public static< │ │ │ -000572f0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> double computeBadPi │ │ │ -00057350: 7865 6c50 6572 6365 6e74 3c2f 7370 616e xelPercent( │ │ │ -00057380: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ -000573c0: 2f61 3e26 6e62 7370 3b47 542c 0a20 3c61 /a> GT,. Mat src,. Rect ROI)
    .
    Fun │ │ │ -00057490: 6374 696f 6e20 666f 7220 636f 6d70 7574 ction for comput │ │ │ -000574a0: 696e 6720 7468 6520 7065 7263 656e 7420 ing the percent │ │ │ -000574b0: 6f66 2022 6261 6422 2070 6978 656c 7320 of "bad" pixels │ │ │ -000574c0: 696e 2074 6865 2064 6973 7061 7269 7479 in the disparity │ │ │ -000574d0: 206d 6170 0a20 2870 6978 656c 7320 7768 map. (pixels wh │ │ │ -000574e0: 6572 6520 6572 726f 7220 6973 2068 6967 ere error is hig │ │ │ -000574f0: 6865 7220 7468 616e 2061 2073 7065 6369 her than a speci │ │ │ -00057500: 6669 6564 2074 6872 6573 686f 6c64 293c fied threshold)< │ │ │ -00057510: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Par │ │ │ -00057530: 616d 6574 6572 733a 3c2f 6474 3e0a 3c64 ameters:
    .GT - ground truth │ │ │ -00057560: 2064 6973 7061 7269 7479 206d 6170 3c2f disparity map.
    sr │ │ │ -00057580: 633c 2f63 6f64 653e 202d 2064 6973 7061 c - dispa │ │ │ -00057590: 7269 7479 206d 6170 2074 6f20 6576 616c rity map to eval │ │ │ -000575a0: 7561 7465 3c2f 6464 3e0a 3c64 643e 3c63 uate
    .
    ROI - │ │ │ -000575c0: 2072 6567 696f 6e20 6f66 2069 6e74 6572 region of inter │ │ │ -000575d0: 6573 743c 2f64 643e 0a3c 6474 3e52 6574 est
    .
    Ret │ │ │ -000575e0: 7572 6e73 3a3c 2f64 743e 0a3c 6464 3e72 urns:
    .
    r │ │ │ -000575f0: 6574 7572 6e73 206d 6561 6e20 7371 7561 eturns mean squa │ │ │ -00057600: 7265 2065 7272 6f72 2062 6574 7765 656e re error between │ │ │ -00057610: 2047 5420 616e 6420 7372 633c 2f64 643e GT and src
    │ │ │ -00057620: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
    ..
  • .
  • ..

    g │ │ │ -000576a0: 6574 4469 7370 6172 6974 7956 6973 3c2f etDisparityVis.. │ │ │ -00057850: 4675 6e63 7469 6f6e 2066 6f72 2063 7265 Function for cre │ │ │ -00057860: 6174 696e 6720 6120 6469 7370 6172 6974 ating a disparit │ │ │ -00057870: 7920 6d61 7020 7669 7375 616c 697a 6174 y map visualizat │ │ │ -00057880: 696f 6e20 2863 6c61 6d70 6564 2043 565f ion (clamped CV_ │ │ │ -00057890: 3855 2069 6d61 6765 293c 2f64 6976 3e0a 8U image). │ │ │ -000578a0: 3c64 6c20 636c 6173 733d 226e 6f74 6573
    .
    Parameter │ │ │ -000578c0: 733a 3c2f 6474 3e0a 3c64 643e 3c63 6f64 s:
    .
    src - i │ │ │ -000578e0: 6e70 7574 2064 6973 7061 7269 7479 206d nput disparity m │ │ │ -000578f0: 6170 2028 4356 5f31 3653 2064 6570 7468 ap (CV_16S depth │ │ │ -00057900: 293c 2f64 643e 0a3c 6464 3e3c 636f 6465 )
    .
    dst - ou │ │ │ -00057920: 7470 7574 2076 6973 7561 6c69 7a61 7469 tput visualizati │ │ │ -00057930: 6f6e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 on
    .
    scale - │ │ │ -00057950: 2064 6973 7061 7269 7479 206d 6170 2077 disparity map w │ │ │ -00057960: 696c 6c20 6265 206d 756c 7469 706c 6965 ill be multiplie │ │ │ -00057970: 6420 6279 2074 6869 7320 7661 6c75 6520 d by this value │ │ │ -00057980: 666f 7220 7669 7375 616c 697a 6174 696f for visualizatio │ │ │ -00057990: 6e3c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 n
    .
    .
    .

  • ..
    .

    ge │ │ │ -00057a10: 7444 6973 7061 7269 7479 5669 733c 2f68 tDisparityVis.
    public │ │ │ -00057a60: 7374 6174 6963 3c2f 7370 616e 3e26 6e62 static&nb │ │ │ -00057a70: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;voi │ │ │ -00057a90: 643c 2f73 7061 6e3e 266e 6273 703b 3c73 d getDisp │ │ │ -00057ac0: 6172 6974 7956 6973 3c2f 7370 616e 3e3c arityVis< │ │ │ -00057ad0: 7762 723e 3c73 7061 6e20 636c 6173 733d wbr>(Mat src,. Mat │ │ │ -00057b80: 266e 6273 703b 6473 7429 3c2f 7370 616e  dst)
    .
    Funct │ │ │ -00057bb0: 696f 6e20 666f 7220 6372 6561 7469 6e67 ion for creating │ │ │ -00057bc0: 2061 2064 6973 7061 7269 7479 206d 6170 a disparity map │ │ │ -00057bd0: 2076 6973 7561 6c69 7a61 7469 6f6e 2028 visualization ( │ │ │ -00057be0: 636c 616d 7065 6420 4356 5f38 5520 696d clamped CV_8U im │ │ │ -00057bf0: 6167 6529 3c2f 6469 763e 0a3c 646c 2063 age)
    .
    .Parameters:.
    src │ │ │ -00057c30: 3c2f 636f 6465 3e20 2d20 696e 7075 7420 - input │ │ │ -00057c40: 6469 7370 6172 6974 7920 6d61 7020 2843 disparity map (C │ │ │ -00057c50: 565f 3136 5320 6465 7074 6829 3c2f 6464 V_16S depth)
    .
    dst< │ │ │ -00057c70: 2f63 6f64 653e 202d 206f 7574 7075 7420 /code> - output │ │ │ -00057c80: 7669 7375 616c 697a 6174 696f 6e3c 2f64 visualization.
    ..

  • .
  • .< │ │ │ -00057cb0: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ -00057cc0: 6574 6169 6c22 2069 643d 2247 7261 6469 etail" id="Gradi │ │ │ -00057cd0: 656e 7444 6572 6963 6865 5928 6f72 672e entDericheY(org. │ │ │ -00057ce0: 6f70 656e 6376 2e63 6f72 652e 4d61 742c opencv.core.Mat, │ │ │ -00057cf0: 6f72 672e 6f70 656e 6376 2e63 6f72 652e org.opencv.core. │ │ │ -00057d00: 4d61 742c 646f 7562 6c65 2c64 6f75 626c Mat,double,doubl │ │ │ -00057d10: 6529 223e 0a3c 6833 3e47 7261 6469 656e e)">.

    Gradien │ │ │ -00057d20: 7444 6572 6963 6865 593c 2f68 333e 0a3c tDericheY

    .< │ │ │ -00057d30: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ -00057d40: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ -00057d70: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ -00057d80: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ -00057d90: 726e 2d74 7970 6522 3e76 6f69 643c 2f73 rn-type">void
     GradientDer │ │ │ -00057dd0: 6963 6865 593c 2f73 7061 6e3e 3c77 6272 icheY(Mat&n │ │ │ -00057e40: 6273 703b 6f70 2c0a 203c 6120 6872 6566 bsp;op,. Mat&nbs │ │ │ -00057e90: 703b 6473 742c 0a20 646f 7562 6c65 266e p;dst,. double&n │ │ │ -00057ea0: 6273 703b 616c 7068 612c 0a20 646f 7562 bsp;alpha,. doub │ │ │ -00057eb0: 6c65 266e 6273 703b 6f6d 6567 6129 3c2f le omega).
    A │ │ │ -00057ee0: 7070 6c69 6573 2059 2044 6572 6963 6865 pplies Y Deriche │ │ │ -00057ef0: 2066 696c 7465 7220 746f 2061 6e20 696d filter to an im │ │ │ -00057f00: 6167 652e 0a0a 2046 6f72 206d 6f72 6520 age... For more │ │ │ -00057f10: 6465 7461 696c 7320 6162 6f75 7420 7468 details about th │ │ │ -00057f20: 6973 2069 6d70 6c65 6d65 6e74 6174 696f is implementatio │ │ │ -00057f30: 6e2c 2070 6c65 6173 6520 7365 6520 6874 n, please see ht │ │ │ -00057f40: 7470 3a2f 2f63 6974 6573 6565 7278 2e69 tp://citeseerx.i │ │ │ -00057f50: 7374 2e70 7375 2e65 6475 2f76 6965 7764 st.psu.edu/viewd │ │ │ -00057f60: 6f63 2f64 6f77 6e6c 6f61 643f 646f 693d oc/download?doi= │ │ │ -00057f70: 3130 2e31 2e31 2e34 3736 2e35 3733 3626 10.1.1.476.5736& │ │ │ -00057f80: 616d 703b 7265 703d 7265 7031 2661 6d70 amp;rep=rep1& │ │ │ -00057f90: 3b74 7970 653d 7064 663c 2f64 6976 3e0a ;type=pdf
    . │ │ │ -00057fa0: 3c64 6c20 636c 6173 733d 226e 6f74 6573
    .
    Parameter │ │ │ -00057fc0: 733a 3c2f 6474 3e0a 3c64 643e 3c63 6f64 s:
    .
    op - au │ │ │ -00057fe0: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -00057ff0: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated
    .
    < │ │ │ -00058000: 636f 6465 3e64 7374 3c2f 636f 6465 3e20 code>dst │ │ │ -00058010: 2d20 6175 746f 6d61 7469 6361 6c6c 7920 - automatically │ │ │ -00058020: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated
    .< │ │ │ -00058030: 6464 3e3c 636f 6465 3e61 6c70 6861 3c2f dd>alpha - automati │ │ │ -00058050: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -00058060: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e6f /dd>.
    o │ │ │ -00058070: 6d65 6761 3c2f 636f 6465 3e20 2d20 6175 mega - au │ │ │ -00058080: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -00058090: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
    .
    │ │ │ -000580a0: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 ..
  • .
  • .
    .

    GradientDeriche │ │ │ -00058130: 583c 2f68 333e 0a3c 6469 7620 636c 6173 X

    .
    pub │ │ │ -00058170: 6c69 6320 7374 6174 6963 3c2f 7370 616e lic static void&nbs │ │ │ -000581b0: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;Gra │ │ │ -000581d0: 6469 656e 7444 6572 6963 6865 583c 2f73 dientDericheX(M │ │ │ -00058240: 6174 3c2f 613e 266e 6273 703b 6f70 2c0a at op,. │ │ │ -00058250: 203c 6120 6872 6566 3d22 2e2e 2f63 6f72 Mat │ │ │ -00058290: 3c2f 613e 266e 6273 703b 6473 742c 0a20  dst,. │ │ │ -000582a0: 646f 7562 6c65 266e 6273 703b 616c 7068 double alph │ │ │ -000582b0: 612c 0a20 646f 7562 6c65 266e 6273 703b a,. double  │ │ │ -000582c0: 6f6d 6567 6129 3c2f 7370 616e 3e3c 2f64 omega).
    Applies X │ │ │ -000582f0: 2044 6572 6963 6865 2066 696c 7465 7220 Deriche filter │ │ │ -00058300: 746f 2061 6e20 696d 6167 652e 0a0a 2046 to an image... F │ │ │ -00058310: 6f72 206d 6f72 6520 6465 7461 696c 7320 or more details │ │ │ -00058320: 6162 6f75 7420 7468 6973 2069 6d70 6c65 about this imple │ │ │ -00058330: 6d65 6e74 6174 696f 6e2c 2070 6c65 6173 mentation, pleas │ │ │ -00058340: 6520 7365 6520 6874 7470 3a2f 2f63 6974 e see http://cit │ │ │ -00058350: 6573 6565 7278 2e69 7374 2e70 7375 2e65 eseerx.ist.psu.e │ │ │ -00058360: 6475 2f76 6965 7764 6f63 2f64 6f77 6e6c du/viewdoc/downl │ │ │ -00058370: 6f61 643f 646f 693d 3130 2e31 2e31 2e34 oad?doi=10.1.1.4 │ │ │ -00058380: 3736 2e35 3733 3626 616d 703b 7265 703d 76.5736&rep= │ │ │ -00058390: 7265 7031 2661 6d70 3b74 7970 653d 7064 rep1&type=pd │ │ │ -000583a0: 663c 2f64 6976 3e0a 3c64 6c20 636c 6173 f
    .
    .
    P │ │ │ -000583c0: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ -000583d0: 3c64 643e 3c63 6f64 653e 6f70 3c2f 636f
    op - automatica │ │ │ -000583f0: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    dst │ │ │ -00058410: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ -00058420: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -00058430: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d
    .
    alpha - │ │ │ -00058450: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ -00058460: 6e65 7261 7465 643c 2f64 643e 0a3c 6464 nerated
    .
    omega - automatica │ │ │ -00058490: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    ..
  • .
  • .< │ │ │ -000584c0: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ -000584d0: 6574 6169 6c22 2069 643d 2263 7265 6174 etail" id="creat │ │ │ -000584e0: 6551 7561 7465 726e 696f 6e49 6d61 6765 eQuaternionImage │ │ │ -000584f0: 286f 7267 2e6f 7065 6e63 762e 636f 7265 (org.opencv.core │ │ │ -00058500: 2e4d 6174 2c6f 7267 2e6f 7065 6e63 762e .Mat,org.opencv. │ │ │ -00058510: 636f 7265 2e4d 6174 2922 3e0a 3c68 333e core.Mat)">.

    │ │ │ -00058520: 6372 6561 7465 5175 6174 6572 6e69 6f6e createQuaternion │ │ │ -00058530: 496d 6167 653c 2f68 333e 0a3c 6469 7620 Image

    .
    public static void │ │ │ -000585b0: 266e 6273 703b 3c73 7061 6e20 636c 6173  createQuaternio │ │ │ -000585e0: 6e49 6d61 6765 3c2f 7370 616e 3e3c 7762 nImage(Mat& │ │ │ -00058650: 6e62 7370 3b69 6d67 2c0a 203c 6120 6872 nbsp;img,. Mat&n │ │ │ -000586a0: 6273 703b 7169 6d67 293c 2f73 7061 6e3e bsp;qimg) │ │ │ -000586b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    create │ │ │ -000586d0: 7320 6120 7175 6174 6572 6e69 6f6e 2069 s a quaternion i │ │ │ -000586e0: 6d61 6765 2e3c 2f64 6976 3e0a 3c64 6c20 mage.
    .
    .< │ │ │ -00058700: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
    im │ │ │ -00058720: 673c 2f63 6f64 653e 202d 2061 7574 6f6d g - autom │ │ │ -00058730: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -00058740: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
    .
    qimg - │ │ │ -00058760: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ -00058770: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
    ....
  • ..

    qconj< │ │ │ -000587f0: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ -00058830: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ -00058840: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;v │ │ │ -00058860: 6f69 643c 2f73 7061 6e3e 266e 6273 703b oid  │ │ │ -00058870: 3c73 7061 6e20 636c 6173 733d 2265 6c65 qconj │ │ │ -00058890: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (Mat q │ │ │ -00058900: 696d 672c 0a20 3c61 2068 7265 663d 222e img,. Mat q │ │ │ -00058950: 6369 6d67 293c 2f73 7061 6e3e 3c2f 6469 cimg).
    calculates │ │ │ -00058980: 2063 6f6e 6a75 6761 7465 206f 6620 6120 conjugate of a │ │ │ -00058990: 7175 6174 6572 6e69 6f6e 2069 6d61 6765 quaternion image │ │ │ -000589a0: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 .
    .
    .
    P │ │ │ -000589c0: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ -000589d0: 3c64 643e 3c63 6f64 653e 7169 6d67 3c2f
    qimg - automati │ │ │ -000589f0: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -00058a00: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e71 /dd>.
    q │ │ │ -00058a10: 6369 6d67 3c2f 636f 6465 3e20 2d20 6175 cimg - au │ │ │ -00058a20: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -00058a30: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
    .
    │ │ │ -00058a40: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 ..

  • .
  • .
    .

    qunit │ │ │ -00058ab0: 6172 793c 2f68 333e 0a3c 6469 7620 636c ary

    .
    p │ │ │ -00058af0: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static void&n │ │ │ -00058b30: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;q │ │ │ -00058b50: 756e 6974 6172 793c 2f73 7061 6e3e 3c77 unitary(Mat │ │ │ -00058bc0: 266e 6273 703b 7169 6d67 2c0a 203c 6120  qimg,. Mat │ │ │ -00058c10: 266e 6273 703b 716e 696d 6729 3c2f 7370  qnimg)
    .
    div │ │ │ -00058c40: 6964 6573 2065 6163 6820 656c 656d 656e ides each elemen │ │ │ -00058c50: 7420 6279 2069 7473 206d 6f64 756c 7573 t by its modulus │ │ │ -00058c60: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 .
    .
    .
    P │ │ │ -00058c80: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ -00058c90: 3c64 643e 3c63 6f64 653e 7169 6d67 3c2f
    qimg - automati │ │ │ -00058cb0: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ -00058cc0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e71 /dd>.
    q │ │ │ -00058cd0: 6e69 6d67 3c2f 636f 6465 3e20 2d20 6175 nimg - au │ │ │ -00058ce0: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ -00058cf0: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
    .
    │ │ │ -00058d00: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .
    .
  • .
  • .
    .

    │ │ │ -00058d80: 716d 756c 7469 706c 793c 2f68 333e 0a3c qmultiply

    .< │ │ │ -00058d90: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ -00058da0: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ -00058dd0: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ -00058de0: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ -00058df0: 726e 2d74 7970 6522 3e76 6f69 643c 2f73 rn-type">void
     qmultiply( │ │ │ -00058e90: 4d61 743c 2f61 3e26 6e62 7370 3b73 7263 Mat src │ │ │ -00058ea0: 312c 0a20 3c61 2068 7265 663d 222e 2e2f 1,. │ │ │ -00058ee0: 4d61 743c 2f61 3e26 6e62 7370 3b73 7263 Mat src │ │ │ -00058ef0: 322c 0a20 3c61 2068 7265 663d 222e 2e2f 2,. │ │ │ -00058f30: 4d61 743c 2f61 3e26 6e62 7370 3b64 7374 Mat dst │ │ │ -00058f40: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ).< │ │ │ -00058f50: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ -00058f60: 223e 4361 6c63 756c 6174 6573 2074 6865 ">Calculates the │ │ │ -00058f70: 2070 6572 2d65 6c65 6d65 6e74 2071 7561 per-element qua │ │ │ -00058f80: 7465 726e 696f 6e20 7072 6f64 7563 7420 ternion product │ │ │ -00058f90: 6f66 2074 776f 2061 7272 6179 733c 2f64 of two arrays.
    .
    Param │ │ │ -00058fc0: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ -00058fd0: 3c63 6f64 653e 7372 6331 3c2f 636f 6465 src1 - automaticall │ │ │ -00058ff0: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ -00059000: 0a3c 6464 3e3c 636f 6465 3e73 7263 323c .
    src2< │ │ │ -00059010: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ -00059020: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ -00059030: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -00059040: 6473 743c 2f63 6f64 653e 202d 2061 7574 dst - aut │ │ │ -00059050: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ -00059060: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
    .
    . │ │ │ -00059070: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e
    .
  • │ │ │ -00059080: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .qdft.
    public static< │ │ │ -00059130: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> void qdft(Mat& │ │ │ -000591f0: 6e62 7370 3b69 6d67 2c0a 203c 6120 6872 nbsp;img,. Mat&n │ │ │ -00059240: 6273 703b 7169 6d67 2c0a 2069 6e74 266e bsp;qimg,. int&n │ │ │ -00059250: 6273 703b 666c 6167 732c 0a20 626f 6f6c bsp;flags,. bool │ │ │ -00059260: 6561 6e26 6e62 7370 3b73 6964 654c 6566 ean sideLef │ │ │ -00059270: 7429 3c2f 7370 616e 3e3c 2f64 6976 3e0a t)
    . │ │ │ -00059280: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
    Performs a fo │ │ │ -000592a0: 7277 6172 6420 6f72 2069 6e76 6572 7365 rward or inverse │ │ │ -000592b0: 2044 6973 6372 6574 6520 7175 6174 6572 Discrete quater │ │ │ -000592c0: 6e69 6f6e 2046 6f75 7269 6572 2074 7261 nion Fourier tra │ │ │ -000592d0: 6e73 666f 726d 206f 6620 6120 3244 2071 nsform of a 2D q │ │ │ -000592e0: 7561 7465 726e 696f 6e20 6172 7261 792e uaternion array. │ │ │ -000592f0: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ -00059310: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ -00059320: 6464 3e3c 636f 6465 3e69 6d67 3c2f 636f dd>img - automatica │ │ │ -00059340: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    qim │ │ │ -00059360: 673c 2f63 6f64 653e 202d 2061 7574 6f6d g - autom │ │ │ -00059370: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ -00059380: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
    .
    flags - │ │ │ -000593a0: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ -000593b0: 656e 6572 6174 6564 3c2f 6464 3e0a 3c64 enerated
    .sideLeft │ │ │ -000593d0: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ -000593e0: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ -000593f0: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d.
    .
    .
  • ..
    │ │ │ -00059480: 0a3c 6833 3e63 6f6c 6f72 4d61 7463 6854 .

    colorMatchT │ │ │ -00059490: 656d 706c 6174 653c 2f68 333e 0a3c 6469 emplate

    .public static │ │ │ -000594e0: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  void colorMatchTem │ │ │ -00059540: 706c 6174 653c 2f73 7061 6e3e 3c77 6272 plate(Mat&n │ │ │ -000595b0: 6273 703b 696d 672c 0a20 3c61 2068 7265 bsp;img,. Mat&nb │ │ │ -00059600: 7370 3b74 656d 706c 2c0a 203c 6120 6872 sp;templ,. Mat&n │ │ │ -00059650: 6273 703b 7265 7375 6c74 293c 2f73 7061 bsp;result).
    Comp │ │ │ -00059680: 6172 6573 2061 2063 6f6c 6f72 2074 656d ares a color tem │ │ │ -00059690: 706c 6174 6520 6167 6169 6e73 7420 6f76 plate against ov │ │ │ -000596a0: 6572 6c61 7070 6564 2063 6f6c 6f72 2069 erlapped color i │ │ │ -000596b0: 6d61 6765 2072 6567 696f 6e73 2e3c 2f64 mage regions..
    .
    Param │ │ │ -000596e0: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ -000596f0: 3c63 6f64 653e 696d 673c 2f63 6f64 653e img │ │ │ -00059700: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ -00059710: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
    . │ │ │ -00059720: 3c64 643e 3c63 6f64 653e 7465 6d70 6c3c
    templ< │ │ │ -00059730: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ -00059740: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ -00059750: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ -00059760: 7265 7375 6c74 3c2f 636f 6465 3e20 2d20 result - │ │ │ +00042790: 616e 2063 6c61 7373 3d22 7265 7475 726e an class="return │ │ │ +000427a0: 2d74 7970 6522 3e76 6f69 643c 2f73 7061 -type">void getDisparityV │ │ │ +000427e0: 6973 3c2f 7370 616e 3e3c 7762 723e 3c73 is(Mat  │ │ │ +00042850: 3b73 7263 2c0a 203c 6120 6872 6566 3d22 ;src,. Mat  │ │ │ +000428a0: 6473 742c 0a20 646f 7562 6c65 266e 6273 dst,. double&nbs │ │ │ +000428b0: 703b 7363 616c 6529 3c2f 7370 616e 3e3c p;scale)< │ │ │ +000428c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Functio │ │ │ +000428e0: 6e20 666f 7220 6372 6561 7469 6e67 2061 n for creating a │ │ │ +000428f0: 2064 6973 7061 7269 7479 206d 6170 2076 disparity map v │ │ │ +00042900: 6973 7561 6c69 7a61 7469 6f6e 2028 636c isualization (cl │ │ │ +00042910: 616d 7065 6420 4356 5f38 5520 696d 6167 amped CV_8U imag │ │ │ +00042920: 6529 3c2f 6469 763e 0a3c 646c 2063 6c61 e)
    .
    .
    │ │ │ +00042940: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
    │ │ │ +00042950: 0a3c 6464 3e3c 636f 6465 3e73 7263 3c2f .
    src - input di │ │ │ +00042970: 7370 6172 6974 7920 6d61 7020 2843 565f sparity map (CV_ │ │ │ +00042980: 3136 5320 6465 7074 6829 3c2f 6464 3e0a 16S depth)
    . │ │ │ +00042990: 3c64 643e 3c63 6f64 653e 6473 743c 2f63
    dst - output vi │ │ │ +000429b0: 7375 616c 697a 6174 696f 6e3c 2f64 643e sualization
    │ │ │ +000429c0: 0a3c 6464 3e3c 636f 6465 3e73 6361 6c65 .
    scale │ │ │ +000429d0: 3c2f 636f 6465 3e20 2d20 6469 7370 6172 - dispar │ │ │ +000429e0: 6974 7920 6d61 7020 7769 6c6c 2062 6520 ity map will be │ │ │ +000429f0: 6d75 6c74 6970 6c69 6564 2062 7920 7468 multiplied by th │ │ │ +00042a00: 6973 2076 616c 7565 2066 6f72 2076 6973 is value for vis │ │ │ +00042a10: 7561 6c69 7a61 7469 6f6e 3c2f 6464 3e0a ualization
    . │ │ │ +00042a20: 3c2f 646c 3e0a 3c2f 7365 6374 696f 6e3e
    .
    │ │ │ +00042a30: 0a3c 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 .
  • .
  • ..

    getDispar │ │ │ +00042aa0: 6974 7956 6973 3c2f 6833 3e0a 3c64 6976 ityVis

    .
    public static< │ │ │ +00042af0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> void getDisparityVi │ │ │ +00042b50: 733c 2f73 7061 6e3e 3c77 6272 3e3c 7370 s(Mat  │ │ │ +00042bc0: 7372 632c 0a20 3c61 2068 7265 663d 222e src,. Mat d │ │ │ +00042c10: 7374 293c 2f73 7061 6e3e 3c2f 6469 763e st)
    │ │ │ +00042c20: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
    Function for │ │ │ +00042c40: 2063 7265 6174 696e 6720 6120 6469 7370 creating a disp │ │ │ +00042c50: 6172 6974 7920 6d61 7020 7669 7375 616c arity map visual │ │ │ +00042c60: 697a 6174 696f 6e20 2863 6c61 6d70 6564 ization (clamped │ │ │ +00042c70: 2043 565f 3855 2069 6d61 6765 293c 2f64 CV_8U image).
    .
    Param │ │ │ +00042ca0: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ +00042cb0: 3c63 6f64 653e 7372 633c 2f63 6f64 653e src │ │ │ +00042cc0: 202d 2069 6e70 7574 2064 6973 7061 7269 - input dispari │ │ │ +00042cd0: 7479 206d 6170 2028 4356 5f31 3653 2064 ty map (CV_16S d │ │ │ +00042ce0: 6570 7468 293c 2f64 643e 0a3c 6464 3e3c epth)
    .
    < │ │ │ +00042cf0: 636f 6465 3e64 7374 3c2f 636f 6465 3e20 code>dst │ │ │ +00042d00: 2d20 6f75 7470 7574 2076 6973 7561 6c69 - output visuali │ │ │ +00042d10: 7a61 7469 6f6e 3c2f 6464 3e0a 3c2f 646c zation
    .
    ...
  • .
    .

    createEdgeBoxes │ │ │ +00042dc0: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ +00042e00: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ +00042e10: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ +00042e30: 3c61 2068 7265 663d 2245 6467 6542 6f78 Ed │ │ │ +00042e70: 6765 426f 7865 733c 2f61 3e3c 2f73 7061 geBoxes createEdgeBox │ │ │ +00042eb0: 6573 3c2f 7370 616e 3e3c 7762 723e 3c73 es(float&nb │ │ │ +00042ee0: 7370 3b61 6c70 6861 2c0a 2066 6c6f 6174 sp;alpha,. float │ │ │ +00042ef0: 266e 6273 703b 6265 7461 2c0a 2066 6c6f  beta,. flo │ │ │ +00042f00: 6174 266e 6273 703b 6574 612c 0a20 666c at eta,. fl │ │ │ +00042f10: 6f61 7426 6e62 7370 3b6d 696e 5363 6f72 oat minScor │ │ │ +00042f20: 652c 0a20 696e 7426 6e62 7370 3b6d 6178 e,. int max │ │ │ +00042f30: 426f 7865 732c 0a20 666c 6f61 7426 6e62 Boxes,. float&nb │ │ │ +00042f40: 7370 3b65 6467 654d 696e 4d61 672c 0a20 sp;edgeMinMag,. │ │ │ +00042f50: 666c 6f61 7426 6e62 7370 3b65 6467 654d float edgeM │ │ │ +00042f60: 6572 6765 5468 722c 0a20 666c 6f61 7426 ergeThr,. float& │ │ │ +00042f70: 6e62 7370 3b63 6c75 7374 6572 4d69 6e4d nbsp;clusterMinM │ │ │ +00042f80: 6167 2c0a 2066 6c6f 6174 266e 6273 703b ag,. float  │ │ │ +00042f90: 6d61 7841 7370 6563 7452 6174 696f 2c0a maxAspectRatio,. │ │ │ +00042fa0: 2066 6c6f 6174 266e 6273 703b 6d69 6e42 float minB │ │ │ +00042fb0: 6f78 4172 6561 2c0a 2066 6c6f 6174 266e oxArea,. float&n │ │ │ +00042fc0: 6273 703b 6761 6d6d 612c 0a20 666c 6f61 bsp;gamma,. floa │ │ │ +00042fd0: 7426 6e62 7370 3b6b 6170 7061 293c 2f73 t kappa)
    .
    Cr │ │ │ +00043000: 6561 7465 7320 6120 4564 6765 626f 7865 eates a Edgeboxe │ │ │ +00043010: 733c 2f64 6976 3e0a 3c64 6c20 636c 6173 s
    .
    .
    P │ │ │ +00043030: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ +00043040: 3c64 643e 3c63 6f64 653e 616c 7068 613c
    alpha< │ │ │ +00043050: 2f63 6f64 653e 202d 2073 7465 7020 7369 /code> - step si │ │ │ +00043060: 7a65 206f 6620 736c 6964 696e 6720 7769 ze of sliding wi │ │ │ +00043070: 6e64 6f77 2073 6561 7263 682e 3c2f 6464 ndow search.
    .
    beta │ │ │ +00043090: 3c2f 636f 6465 3e20 2d20 6e6d 7320 7468 - nms th │ │ │ +000430a0: 7265 7368 6f6c 6420 666f 7220 6f62 6a65 reshold for obje │ │ │ +000430b0: 6374 2070 726f 706f 7361 6c73 2e3c 2f64 ct proposals..
    eta │ │ │ +000430d0: 3c2f 636f 6465 3e20 2d20 6164 6170 7461 - adapta │ │ │ +000430e0: 7469 6f6e 2072 6174 6520 666f 7220 6e6d tion rate for nm │ │ │ +000430f0: 7320 7468 7265 7368 6f6c 642e 3c2f 6464 s threshold.
    .
    minS │ │ │ +00043110: 636f 7265 3c2f 636f 6465 3e20 2d20 6d69 core - mi │ │ │ +00043120: 6e20 7363 6f72 6520 6f66 2062 6f78 6573 n score of boxes │ │ │ +00043130: 2074 6f20 6465 7465 6374 2e3c 2f64 643e to detect.
    │ │ │ +00043140: 0a3c 6464 3e3c 636f 6465 3e6d 6178 426f .
    maxBo │ │ │ +00043150: 7865 733c 2f63 6f64 653e 202d 206d 6178 xes - max │ │ │ +00043160: 206e 756d 6265 7220 6f66 2062 6f78 6573 number of boxes │ │ │ +00043170: 2074 6f20 6465 7465 6374 2e3c 2f64 643e to detect.
    │ │ │ +00043180: 0a3c 6464 3e3c 636f 6465 3e65 6467 654d .
    edgeM │ │ │ +00043190: 696e 4d61 673c 2f63 6f64 653e 202d 2065 inMag - e │ │ │ +000431a0: 6467 6520 6d69 6e20 6d61 676e 6974 7564 dge min magnitud │ │ │ +000431b0: 652e 2049 6e63 7265 6173 6520 746f 2074 e. Increase to t │ │ │ +000431c0: 7261 6465 206f 6666 2061 6363 7572 6163 rade off accurac │ │ │ +000431d0: 7920 666f 7220 7370 6565 642e 3c2f 6464 y for speed.
    .
    edge │ │ │ +000431f0: 4d65 7267 6554 6872 3c2f 636f 6465 3e20 MergeThr │ │ │ +00043200: 2d20 6564 6765 206d 6572 6765 2074 6872 - edge merge thr │ │ │ +00043210: 6573 686f 6c64 2e20 496e 6372 6561 7365 eshold. Increase │ │ │ +00043220: 2074 6f20 7472 6164 6520 6f66 6620 6163 to trade off ac │ │ │ +00043230: 6375 7261 6379 2066 6f72 2073 7065 6564 curacy for speed │ │ │ +00043240: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    clusterMinMag - cluster │ │ │ +00043270: 6d69 6e20 6d61 676e 6974 7564 652e 2049 min magnitude. I │ │ │ +00043280: 6e63 7265 6173 6520 746f 2074 7261 6465 ncrease to trade │ │ │ +00043290: 206f 6666 2061 6363 7572 6163 7920 666f off accuracy fo │ │ │ +000432a0: 7220 7370 6565 642e 3c2f 6464 3e0a 3c64 r speed.
    .maxAspec │ │ │ +000432c0: 7452 6174 696f 3c2f 636f 6465 3e20 2d20 tRatio - │ │ │ +000432d0: 6d61 7820 6173 7065 6374 2072 6174 696f max aspect ratio │ │ │ +000432e0: 206f 6620 626f 7865 732e 3c2f 6464 3e0a of boxes.. │ │ │ +000432f0: 3c64 643e 3c63 6f64 653e 6d69 6e42 6f78
    minBox │ │ │ +00043300: 4172 6561 3c2f 636f 6465 3e20 2d20 6d69 Area - mi │ │ │ +00043310: 6e69 6d75 6d20 6172 6561 206f 6620 626f nimum area of bo │ │ │ +00043320: 7865 732e 3c2f 6464 3e0a 3c64 643e 3c63 xes.
    .
    gamma │ │ │ +00043340: 202d 2061 6666 696e 6974 7920 7365 6e73 - affinity sens │ │ │ +00043350: 6974 6976 6974 792e 3c2f 6464 3e0a 3c64 itivity.
    .kappa - scale sen │ │ │ +00043380: 7369 7469 7669 7479 2e3c 2f64 643e 0a3c sitivity..< │ │ │ +00043390: 6474 3e52 6574 7572 6e73 3a3c 2f64 743e dt>Returns: │ │ │ +000433a0: 0a3c 6464 3e61 7574 6f6d 6174 6963 616c .
    automatical │ │ │ +000433b0: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
    .
    ..
  • .
  • ..

    createEdgeBoxes │ │ │ +00043460: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ +000434a0: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ +000434b0: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ +000434d0: 3c61 2068 7265 663d 2245 6467 6542 6f78 Ed │ │ │ +00043510: 6765 426f 7865 733c 2f61 3e3c 2f73 7061 geBoxes createEdgeBox │ │ │ +00043550: 6573 3c2f 7370 616e 3e3c 7762 723e 3c73 es(float&nb │ │ │ +00043580: 7370 3b61 6c70 6861 2c0a 2066 6c6f 6174 sp;alpha,. float │ │ │ +00043590: 266e 6273 703b 6265 7461 2c0a 2066 6c6f  beta,. flo │ │ │ +000435a0: 6174 266e 6273 703b 6574 612c 0a20 666c at eta,. fl │ │ │ +000435b0: 6f61 7426 6e62 7370 3b6d 696e 5363 6f72 oat minScor │ │ │ +000435c0: 652c 0a20 696e 7426 6e62 7370 3b6d 6178 e,. int max │ │ │ +000435d0: 426f 7865 732c 0a20 666c 6f61 7426 6e62 Boxes,. float&nb │ │ │ +000435e0: 7370 3b65 6467 654d 696e 4d61 672c 0a20 sp;edgeMinMag,. │ │ │ +000435f0: 666c 6f61 7426 6e62 7370 3b65 6467 654d float edgeM │ │ │ +00043600: 6572 6765 5468 722c 0a20 666c 6f61 7426 ergeThr,. float& │ │ │ +00043610: 6e62 7370 3b63 6c75 7374 6572 4d69 6e4d nbsp;clusterMinM │ │ │ +00043620: 6167 2c0a 2066 6c6f 6174 266e 6273 703b ag,. float  │ │ │ +00043630: 6d61 7841 7370 6563 7452 6174 696f 2c0a maxAspectRatio,. │ │ │ +00043640: 2066 6c6f 6174 266e 6273 703b 6d69 6e42 float minB │ │ │ +00043650: 6f78 4172 6561 2c0a 2066 6c6f 6174 266e oxArea,. float&n │ │ │ +00043660: 6273 703b 6761 6d6d 6129 3c2f 7370 616e bsp;gamma)
    .
    Creat │ │ │ +00043690: 6573 2061 2045 6467 6562 6f78 6573 3c2f es a Edgeboxes.
    .
    Para │ │ │ +000436c0: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    alpha - step size │ │ │ +000436f0: 6f66 2073 6c69 6469 6e67 2077 696e 646f of sliding windo │ │ │ +00043700: 7720 7365 6172 6368 2e3c 2f64 643e 0a3c w search.
    .< │ │ │ +00043710: 6464 3e3c 636f 6465 3e62 6574 613c 2f63 dd>beta - nms thres │ │ │ +00043730: 686f 6c64 2066 6f72 206f 626a 6563 7420 hold for object │ │ │ +00043740: 7072 6f70 6f73 616c 732e 3c2f 6464 3e0a proposals.. │ │ │ +00043750: 3c64 643e 3c63 6f64 653e 6574 613c 2f63
    eta - adaptatio │ │ │ +00043770: 6e20 7261 7465 2066 6f72 206e 6d73 2074 n rate for nms t │ │ │ +00043780: 6872 6573 686f 6c64 2e3c 2f64 643e 0a3c hreshold.
    .< │ │ │ +00043790: 6464 3e3c 636f 6465 3e6d 696e 5363 6f72 dd>minScor │ │ │ +000437a0: 653c 2f63 6f64 653e 202d 206d 696e 2073 e - min s │ │ │ +000437b0: 636f 7265 206f 6620 626f 7865 7320 746f core of boxes to │ │ │ +000437c0: 2064 6574 6563 742e 3c2f 6464 3e0a 3c64 detect..maxBoxes │ │ │ +000437e0: 3c2f 636f 6465 3e20 2d20 6d61 7820 6e75 - max nu │ │ │ +000437f0: 6d62 6572 206f 6620 626f 7865 7320 746f mber of boxes to │ │ │ +00043800: 2064 6574 6563 742e 3c2f 6464 3e0a 3c64 detect..edgeMinM │ │ │ +00043820: 6167 3c2f 636f 6465 3e20 2d20 6564 6765 ag - edge │ │ │ +00043830: 206d 696e 206d 6167 6e69 7475 6465 2e20 min magnitude. │ │ │ +00043840: 496e 6372 6561 7365 2074 6f20 7472 6164 Increase to trad │ │ │ +00043850: 6520 6f66 6620 6163 6375 7261 6379 2066 e off accuracy f │ │ │ +00043860: 6f72 2073 7065 6564 2e3c 2f64 643e 0a3c or speed..< │ │ │ +00043870: 6464 3e3c 636f 6465 3e65 6467 654d 6572 dd>edgeMer │ │ │ +00043880: 6765 5468 723c 2f63 6f64 653e 202d 2065 geThr - e │ │ │ +00043890: 6467 6520 6d65 7267 6520 7468 7265 7368 dge merge thresh │ │ │ +000438a0: 6f6c 642e 2049 6e63 7265 6173 6520 746f old. Increase to │ │ │ +000438b0: 2074 7261 6465 206f 6666 2061 6363 7572 trade off accur │ │ │ +000438c0: 6163 7920 666f 7220 7370 6565 642e 3c2f acy for speed..
    cl │ │ │ +000438e0: 7573 7465 724d 696e 4d61 673c 2f63 6f64 usterMinMag - cluster min │ │ │ +00043900: 206d 6167 6e69 7475 6465 2e20 496e 6372 magnitude. Incr │ │ │ +00043910: 6561 7365 2074 6f20 7472 6164 6520 6f66 ease to trade of │ │ │ +00043920: 6620 6163 6375 7261 6379 2066 6f72 2073 f accuracy for s │ │ │ +00043930: 7065 6564 2e3c 2f64 643e 0a3c 6464 3e3c peed.
    .
    < │ │ │ +00043940: 636f 6465 3e6d 6178 4173 7065 6374 5261 code>maxAspectRa │ │ │ +00043950: 7469 6f3c 2f63 6f64 653e 202d 206d 6178 tio - max │ │ │ +00043960: 2061 7370 6563 7420 7261 7469 6f20 6f66 aspect ratio of │ │ │ +00043970: 2062 6f78 6573 2e3c 2f64 643e 0a3c 6464 boxes.
    .
    minBoxAre │ │ │ +00043990: 613c 2f63 6f64 653e 202d 206d 696e 696d a - minim │ │ │ +000439a0: 756d 2061 7265 6120 6f66 2062 6f78 6573 um area of boxes │ │ │ +000439b0: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    gamma - │ │ │ +000439d0: 6166 6669 6e69 7479 2073 656e 7369 7469 affinity sensiti │ │ │ +000439e0: 7669 7479 2e3c 2f64 643e 0a3c 6474 3e52 vity.
    .
    R │ │ │ +000439f0: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
    .
    automatically g │ │ │ +00043a10: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ...< │ │ │ +00043a30: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    createEdg │ │ │ +00043ab0: 6542 6f78 6573 3c2f 6833 3e0a 3c64 6976 eBoxes

    .
    public static< │ │ │ +00043b00: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> EdgeBoxes createE │ │ │ +00043ba0: 6467 6542 6f78 6573 3c2f 7370 616e 3e3c dgeBoxes< │ │ │ +00043bb0: 7762 723e 3c73 7061 6e20 636c 6173 733d wbr>(fl │ │ │ +00043bd0: 6f61 7426 6e62 7370 3b61 6c70 6861 2c0a oat alpha,. │ │ │ +00043be0: 2066 6c6f 6174 266e 6273 703b 6265 7461 float beta │ │ │ +00043bf0: 2c0a 2066 6c6f 6174 266e 6273 703b 6574 ,. float et │ │ │ +00043c00: 612c 0a20 666c 6f61 7426 6e62 7370 3b6d a,. float m │ │ │ +00043c10: 696e 5363 6f72 652c 0a20 696e 7426 6e62 inScore,. int&nb │ │ │ +00043c20: 7370 3b6d 6178 426f 7865 732c 0a20 666c sp;maxBoxes,. fl │ │ │ +00043c30: 6f61 7426 6e62 7370 3b65 6467 654d 696e oat edgeMin │ │ │ +00043c40: 4d61 672c 0a20 666c 6f61 7426 6e62 7370 Mag,. float  │ │ │ +00043c50: 3b65 6467 654d 6572 6765 5468 722c 0a20 ;edgeMergeThr,. │ │ │ +00043c60: 666c 6f61 7426 6e62 7370 3b63 6c75 7374 float clust │ │ │ +00043c70: 6572 4d69 6e4d 6167 2c0a 2066 6c6f 6174 erMinMag,. float │ │ │ +00043c80: 266e 6273 703b 6d61 7841 7370 6563 7452  maxAspectR │ │ │ +00043c90: 6174 696f 2c0a 2066 6c6f 6174 266e 6273 atio,. float&nbs │ │ │ +00043ca0: 703b 6d69 6e42 6f78 4172 6561 293c 2f73 p;minBoxArea)
    .
    Cr │ │ │ +00043cd0: 6561 7465 7320 6120 4564 6765 626f 7865 eates a Edgeboxe │ │ │ +00043ce0: 733c 2f64 6976 3e0a 3c64 6c20 636c 6173 s
    .
    .
    P │ │ │ +00043d00: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ +00043d10: 3c64 643e 3c63 6f64 653e 616c 7068 613c
    alpha< │ │ │ +00043d20: 2f63 6f64 653e 202d 2073 7465 7020 7369 /code> - step si │ │ │ +00043d30: 7a65 206f 6620 736c 6964 696e 6720 7769 ze of sliding wi │ │ │ +00043d40: 6e64 6f77 2073 6561 7263 682e 3c2f 6464 ndow search.
    .
    beta │ │ │ +00043d60: 3c2f 636f 6465 3e20 2d20 6e6d 7320 7468 - nms th │ │ │ +00043d70: 7265 7368 6f6c 6420 666f 7220 6f62 6a65 reshold for obje │ │ │ +00043d80: 6374 2070 726f 706f 7361 6c73 2e3c 2f64 ct proposals..
    eta │ │ │ +00043da0: 3c2f 636f 6465 3e20 2d20 6164 6170 7461 - adapta │ │ │ +00043db0: 7469 6f6e 2072 6174 6520 666f 7220 6e6d tion rate for nm │ │ │ +00043dc0: 7320 7468 7265 7368 6f6c 642e 3c2f 6464 s threshold.
    .
    minS │ │ │ +00043de0: 636f 7265 3c2f 636f 6465 3e20 2d20 6d69 core - mi │ │ │ +00043df0: 6e20 7363 6f72 6520 6f66 2062 6f78 6573 n score of boxes │ │ │ +00043e00: 2074 6f20 6465 7465 6374 2e3c 2f64 643e to detect.
    │ │ │ +00043e10: 0a3c 6464 3e3c 636f 6465 3e6d 6178 426f .
    maxBo │ │ │ +00043e20: 7865 733c 2f63 6f64 653e 202d 206d 6178 xes - max │ │ │ +00043e30: 206e 756d 6265 7220 6f66 2062 6f78 6573 number of boxes │ │ │ +00043e40: 2074 6f20 6465 7465 6374 2e3c 2f64 643e to detect.
    │ │ │ +00043e50: 0a3c 6464 3e3c 636f 6465 3e65 6467 654d .
    edgeM │ │ │ +00043e60: 696e 4d61 673c 2f63 6f64 653e 202d 2065 inMag - e │ │ │ +00043e70: 6467 6520 6d69 6e20 6d61 676e 6974 7564 dge min magnitud │ │ │ +00043e80: 652e 2049 6e63 7265 6173 6520 746f 2074 e. Increase to t │ │ │ +00043e90: 7261 6465 206f 6666 2061 6363 7572 6163 rade off accurac │ │ │ +00043ea0: 7920 666f 7220 7370 6565 642e 3c2f 6464 y for speed.
    .
    edge │ │ │ +00043ec0: 4d65 7267 6554 6872 3c2f 636f 6465 3e20 MergeThr │ │ │ +00043ed0: 2d20 6564 6765 206d 6572 6765 2074 6872 - edge merge thr │ │ │ +00043ee0: 6573 686f 6c64 2e20 496e 6372 6561 7365 eshold. Increase │ │ │ +00043ef0: 2074 6f20 7472 6164 6520 6f66 6620 6163 to trade off ac │ │ │ +00043f00: 6375 7261 6379 2066 6f72 2073 7065 6564 curacy for speed │ │ │ +00043f10: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    clusterMinMag - cluster │ │ │ +00043f40: 6d69 6e20 6d61 676e 6974 7564 652e 2049 min magnitude. I │ │ │ +00043f50: 6e63 7265 6173 6520 746f 2074 7261 6465 ncrease to trade │ │ │ +00043f60: 206f 6666 2061 6363 7572 6163 7920 666f off accuracy fo │ │ │ +00043f70: 7220 7370 6565 642e 3c2f 6464 3e0a 3c64 r speed.
    .maxAspec │ │ │ +00043f90: 7452 6174 696f 3c2f 636f 6465 3e20 2d20 tRatio - │ │ │ +00043fa0: 6d61 7820 6173 7065 6374 2072 6174 696f max aspect ratio │ │ │ +00043fb0: 206f 6620 626f 7865 732e 3c2f 6464 3e0a of boxes.. │ │ │ +00043fc0: 3c64 643e 3c63 6f64 653e 6d69 6e42 6f78
    minBox │ │ │ +00043fd0: 4172 6561 3c2f 636f 6465 3e20 2d20 6d69 Area - mi │ │ │ +00043fe0: 6e69 6d75 6d20 6172 6561 206f 6620 626f nimum area of bo │ │ │ +00043ff0: 7865 732e 3c2f 6464 3e0a 3c64 743e 5265 xes.
    .
    Re │ │ │ +00044000: 7475 726e 733a 3c2f 6474 3e0a 3c64 643e turns:
    .
    │ │ │ +00044010: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +00044020: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
    .
    ...
  • ..

    │ │ │ +000440b0: 6372 6561 7465 4564 6765 426f 7865 733c createEdgeBoxes< │ │ │ +000440c0: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ +00044100: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ +00044110: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;< │ │ │ +00044130: 6120 6872 6566 3d22 4564 6765 426f 7865 a href="EdgeBoxe │ │ │ +00044140: 732e 6874 6d6c 2220 7469 746c 653d 2263 s.html" title="c │ │ │ +00044150: 6c61 7373 2069 6e20 6f72 672e 6f70 656e lass in org.open │ │ │ +00044160: 6376 2e78 696d 6770 726f 6322 3e45 6467 cv.ximgproc">Edg │ │ │ +00044170: 6542 6f78 6573 3c2f 613e 3c2f 7370 616e eBoxes createEdgeBoxe │ │ │ +000441b0: 733c 2f73 7061 6e3e 3c77 6272 3e3c 7370 s(float&nbs │ │ │ +000441e0: 703b 616c 7068 612c 0a20 666c 6f61 7426 p;alpha,. float& │ │ │ +000441f0: 6e62 7370 3b62 6574 612c 0a20 666c 6f61 nbsp;beta,. floa │ │ │ +00044200: 7426 6e62 7370 3b65 7461 2c0a 2066 6c6f t eta,. flo │ │ │ +00044210: 6174 266e 6273 703b 6d69 6e53 636f 7265 at minScore │ │ │ +00044220: 2c0a 2069 6e74 266e 6273 703b 6d61 7842 ,. int maxB │ │ │ +00044230: 6f78 6573 2c0a 2066 6c6f 6174 266e 6273 oxes,. float&nbs │ │ │ +00044240: 703b 6564 6765 4d69 6e4d 6167 2c0a 2066 p;edgeMinMag,. f │ │ │ +00044250: 6c6f 6174 266e 6273 703b 6564 6765 4d65 loat edgeMe │ │ │ +00044260: 7267 6554 6872 2c0a 2066 6c6f 6174 266e rgeThr,. float&n │ │ │ +00044270: 6273 703b 636c 7573 7465 724d 696e 4d61 bsp;clusterMinMa │ │ │ +00044280: 672c 0a20 666c 6f61 7426 6e62 7370 3b6d g,. float m │ │ │ +00044290: 6178 4173 7065 6374 5261 7469 6f29 3c2f axAspectRatio)
    .
    C │ │ │ +000442c0: 7265 6174 6573 2061 2045 6467 6562 6f78 reates a Edgebox │ │ │ +000442d0: 6573 3c2f 6469 763e 0a3c 646c 2063 6c61 es
    .
    .
    │ │ │ +000442f0: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
    │ │ │ +00044300: 0a3c 6464 3e3c 636f 6465 3e61 6c70 6861 .
    alpha │ │ │ +00044310: 3c2f 636f 6465 3e20 2d20 7374 6570 2073 - step s │ │ │ +00044320: 697a 6520 6f66 2073 6c69 6469 6e67 2077 ize of sliding w │ │ │ +00044330: 696e 646f 7720 7365 6172 6368 2e3c 2f64 indow search..
    bet │ │ │ +00044350: 613c 2f63 6f64 653e 202d 206e 6d73 2074 a - nms t │ │ │ +00044360: 6872 6573 686f 6c64 2066 6f72 206f 626a hreshold for obj │ │ │ +00044370: 6563 7420 7072 6f70 6f73 616c 732e 3c2f ect proposals..
    et │ │ │ +00044390: 613c 2f63 6f64 653e 202d 2061 6461 7074 a - adapt │ │ │ +000443a0: 6174 696f 6e20 7261 7465 2066 6f72 206e ation rate for n │ │ │ +000443b0: 6d73 2074 6872 6573 686f 6c64 2e3c 2f64 ms threshold..
    min │ │ │ +000443d0: 5363 6f72 653c 2f63 6f64 653e 202d 206d Score - m │ │ │ +000443e0: 696e 2073 636f 7265 206f 6620 626f 7865 in score of boxe │ │ │ +000443f0: 7320 746f 2064 6574 6563 742e 3c2f 6464 s to detect.
    .
    maxB │ │ │ +00044410: 6f78 6573 3c2f 636f 6465 3e20 2d20 6d61 oxes - ma │ │ │ +00044420: 7820 6e75 6d62 6572 206f 6620 626f 7865 x number of boxe │ │ │ +00044430: 7320 746f 2064 6574 6563 742e 3c2f 6464 s to detect.
    .
    edge │ │ │ +00044450: 4d69 6e4d 6167 3c2f 636f 6465 3e20 2d20 MinMag - │ │ │ +00044460: 6564 6765 206d 696e 206d 6167 6e69 7475 edge min magnitu │ │ │ +00044470: 6465 2e20 496e 6372 6561 7365 2074 6f20 de. Increase to │ │ │ +00044480: 7472 6164 6520 6f66 6620 6163 6375 7261 trade off accura │ │ │ +00044490: 6379 2066 6f72 2073 7065 6564 2e3c 2f64 cy for speed..
    edg │ │ │ +000444b0: 654d 6572 6765 5468 723c 2f63 6f64 653e eMergeThr │ │ │ +000444c0: 202d 2065 6467 6520 6d65 7267 6520 7468 - edge merge th │ │ │ +000444d0: 7265 7368 6f6c 642e 2049 6e63 7265 6173 reshold. Increas │ │ │ +000444e0: 6520 746f 2074 7261 6465 206f 6666 2061 e to trade off a │ │ │ +000444f0: 6363 7572 6163 7920 666f 7220 7370 6565 ccuracy for spee │ │ │ +00044500: 642e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 d.
    .
    clusterMinMag< │ │ │ +00044520: 2f63 6f64 653e 202d 2063 6c75 7374 6572 /code> - cluster │ │ │ +00044530: 206d 696e 206d 6167 6e69 7475 6465 2e20 min magnitude. │ │ │ +00044540: 496e 6372 6561 7365 2074 6f20 7472 6164 Increase to trad │ │ │ +00044550: 6520 6f66 6620 6163 6375 7261 6379 2066 e off accuracy f │ │ │ +00044560: 6f72 2073 7065 6564 2e3c 2f64 643e 0a3c or speed.
    .< │ │ │ +00044570: 6464 3e3c 636f 6465 3e6d 6178 4173 7065 dd>maxAspe │ │ │ +00044580: 6374 5261 7469 6f3c 2f63 6f64 653e 202d ctRatio - │ │ │ +00044590: 206d 6178 2061 7370 6563 7420 7261 7469 max aspect rati │ │ │ +000445a0: 6f20 6f66 2062 6f78 6573 2e3c 2f64 643e o of boxes. │ │ │ +000445b0: 0a3c 6474 3e52 6574 7572 6e73 3a3c 2f64 .
    Returns:.
    automatic │ │ │ +000445d0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    ..

  • .
  • . │ │ │ +00044600: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    createEdgeBoxes │ │ │ +00044670: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ +000446b0: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ +000446c0: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ +000446e0: 3c61 2068 7265 663d 2245 6467 6542 6f78 Ed │ │ │ +00044720: 6765 426f 7865 733c 2f61 3e3c 2f73 7061 geBoxes createEdgeBox │ │ │ +00044760: 6573 3c2f 7370 616e 3e3c 7762 723e 3c73 es(float&nb │ │ │ +00044790: 7370 3b61 6c70 6861 2c0a 2066 6c6f 6174 sp;alpha,. float │ │ │ +000447a0: 266e 6273 703b 6265 7461 2c0a 2066 6c6f  beta,. flo │ │ │ +000447b0: 6174 266e 6273 703b 6574 612c 0a20 666c at eta,. fl │ │ │ +000447c0: 6f61 7426 6e62 7370 3b6d 696e 5363 6f72 oat minScor │ │ │ +000447d0: 652c 0a20 696e 7426 6e62 7370 3b6d 6178 e,. int max │ │ │ +000447e0: 426f 7865 732c 0a20 666c 6f61 7426 6e62 Boxes,. float&nb │ │ │ +000447f0: 7370 3b65 6467 654d 696e 4d61 672c 0a20 sp;edgeMinMag,. │ │ │ +00044800: 666c 6f61 7426 6e62 7370 3b65 6467 654d float edgeM │ │ │ +00044810: 6572 6765 5468 722c 0a20 666c 6f61 7426 ergeThr,. float& │ │ │ +00044820: 6e62 7370 3b63 6c75 7374 6572 4d69 6e4d nbsp;clusterMinM │ │ │ +00044830: 6167 293c 2f73 7061 6e3e 3c2f 6469 763e ag)
    │ │ │ +00044840: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
    Creates a Ed │ │ │ +00044860: 6765 626f 7865 733c 2f64 6976 3e0a 3c64 geboxes
    . │ │ │ +00044880: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ +00044890: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +000448a0: 616c 7068 613c 2f63 6f64 653e 202d 2073 alpha - s │ │ │ +000448b0: 7465 7020 7369 7a65 206f 6620 736c 6964 tep size of slid │ │ │ +000448c0: 696e 6720 7769 6e64 6f77 2073 6561 7263 ing window searc │ │ │ +000448d0: 682e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 h.
    .
    beta - │ │ │ +000448f0: 6e6d 7320 7468 7265 7368 6f6c 6420 666f nms threshold fo │ │ │ +00044900: 7220 6f62 6a65 6374 2070 726f 706f 7361 r object proposa │ │ │ +00044910: 6c73 2e3c 2f64 643e 0a3c 6464 3e3c 636f ls.
    .
    eta - │ │ │ +00044930: 6164 6170 7461 7469 6f6e 2072 6174 6520 adaptation rate │ │ │ +00044940: 666f 7220 6e6d 7320 7468 7265 7368 6f6c for nms threshol │ │ │ +00044950: 642e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 d.
    .
    minScore - min score of │ │ │ +00044980: 2062 6f78 6573 2074 6f20 6465 7465 6374 boxes to detect │ │ │ +00044990: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    maxBoxes │ │ │ +000449b0: 202d 206d 6178 206e 756d 6265 7220 6f66 - max number of │ │ │ +000449c0: 2062 6f78 6573 2074 6f20 6465 7465 6374 boxes to detect │ │ │ +000449d0: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    edgeMinMag - edge min ma │ │ │ +00044a00: 676e 6974 7564 652e 2049 6e63 7265 6173 gnitude. Increas │ │ │ +00044a10: 6520 746f 2074 7261 6465 206f 6666 2061 e to trade off a │ │ │ +00044a20: 6363 7572 6163 7920 666f 7220 7370 6565 ccuracy for spee │ │ │ +00044a30: 642e 3c2f 6464 3e0a 3c64 643e 3c63 6f64 d.
    .
    edgeMergeThr - edge mer │ │ │ +00044a60: 6765 2074 6872 6573 686f 6c64 2e20 496e ge threshold. In │ │ │ +00044a70: 6372 6561 7365 2074 6f20 7472 6164 6520 crease to trade │ │ │ +00044a80: 6f66 6620 6163 6375 7261 6379 2066 6f72 off accuracy for │ │ │ +00044a90: 2073 7065 6564 2e3c 2f64 643e 0a3c 6464 speed.
    .
    clusterMi │ │ │ +00044ab0: 6e4d 6167 3c2f 636f 6465 3e20 2d20 636c nMag - cl │ │ │ +00044ac0: 7573 7465 7220 6d69 6e20 6d61 676e 6974 uster min magnit │ │ │ +00044ad0: 7564 652e 2049 6e63 7265 6173 6520 746f ude. Increase to │ │ │ +00044ae0: 2074 7261 6465 206f 6666 2061 6363 7572 trade off accur │ │ │ +00044af0: 6163 7920 666f 7220 7370 6565 642e 3c2f acy for speed..
    Returns: │ │ │ +00044b10: 3c2f 6474 3e0a 3c64 643e 6175 746f 6d61
    .
    automa │ │ │ +00044b20: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +00044b30: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
    .
  • ..
  • ..
    .

    cr │ │ │ +00044bb0: 6561 7465 4564 6765 426f 7865 733c 2f68 eateEdgeBoxes.
    public │ │ │ +00044c00: 7374 6174 6963 3c2f 7370 616e 3e26 6e62 static&nb │ │ │ +00044c10: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;EdgeB │ │ │ +00044c70: 6f78 6573 3c2f 613e 3c2f 7370 616e 3e26 oxes& │ │ │ +00044c80: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ +00044ca0: 6372 6561 7465 4564 6765 426f 7865 733c createEdgeBoxes< │ │ │ +00044cb0: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(float  │ │ │ +00044ce0: 616c 7068 612c 0a20 666c 6f61 7426 6e62 alpha,. float&nb │ │ │ +00044cf0: 7370 3b62 6574 612c 0a20 666c 6f61 7426 sp;beta,. float& │ │ │ +00044d00: 6e62 7370 3b65 7461 2c0a 2066 6c6f 6174 nbsp;eta,. float │ │ │ +00044d10: 266e 6273 703b 6d69 6e53 636f 7265 2c0a  minScore,. │ │ │ +00044d20: 2069 6e74 266e 6273 703b 6d61 7842 6f78 int maxBox │ │ │ +00044d30: 6573 2c0a 2066 6c6f 6174 266e 6273 703b es,. float  │ │ │ +00044d40: 6564 6765 4d69 6e4d 6167 2c0a 2066 6c6f edgeMinMag,. flo │ │ │ +00044d50: 6174 266e 6273 703b 6564 6765 4d65 7267 at edgeMerg │ │ │ +00044d60: 6554 6872 293c 2f73 7061 6e3e 3c2f 6469 eThr).
    Creates a │ │ │ +00044d90: 4564 6765 626f 7865 733c 2f64 6976 3e0a Edgeboxes
    . │ │ │ +00044da0: 3c64 6c20 636c 6173 733d 226e 6f74 6573
    .
    Parameter │ │ │ +00044dc0: 733a 3c2f 6474 3e0a 3c64 643e 3c63 6f64 s:
    .
    alpha - │ │ │ +00044de0: 2073 7465 7020 7369 7a65 206f 6620 736c step size of sl │ │ │ +00044df0: 6964 696e 6720 7769 6e64 6f77 2073 6561 iding window sea │ │ │ +00044e00: 7263 682e 3c2f 6464 3e0a 3c64 643e 3c63 rch.
    .
    beta │ │ │ +00044e20: 2d20 6e6d 7320 7468 7265 7368 6f6c 6420 - nms threshold │ │ │ +00044e30: 666f 7220 6f62 6a65 6374 2070 726f 706f for object propo │ │ │ +00044e40: 7361 6c73 2e3c 2f64 643e 0a3c 6464 3e3c sals.
    .
    < │ │ │ +00044e50: 636f 6465 3e65 7461 3c2f 636f 6465 3e20 code>eta │ │ │ +00044e60: 2d20 6164 6170 7461 7469 6f6e 2072 6174 - adaptation rat │ │ │ +00044e70: 6520 666f 7220 6e6d 7320 7468 7265 7368 e for nms thresh │ │ │ +00044e80: 6f6c 642e 3c2f 6464 3e0a 3c64 643e 3c63 old.
    .
    minScore - min score │ │ │ +00044eb0: 6f66 2062 6f78 6573 2074 6f20 6465 7465 of boxes to dete │ │ │ +00044ec0: 6374 2e3c 2f64 643e 0a3c 6464 3e3c 636f ct.
    .
    maxBoxes - max number │ │ │ +00044ef0: 6f66 2062 6f78 6573 2074 6f20 6465 7465 of boxes to dete │ │ │ +00044f00: 6374 2e3c 2f64 643e 0a3c 6464 3e3c 636f ct.
    .
    edgeMinMag - edge min │ │ │ +00044f30: 6d61 676e 6974 7564 652e 2049 6e63 7265 magnitude. Incre │ │ │ +00044f40: 6173 6520 746f 2074 7261 6465 206f 6666 ase to trade off │ │ │ +00044f50: 2061 6363 7572 6163 7920 666f 7220 7370 accuracy for sp │ │ │ +00044f60: 6565 642e 3c2f 6464 3e0a 3c64 643e 3c63 eed.
    .
    edgeMergeThr │ │ │ +00044f80: 3c2f 636f 6465 3e20 2d20 6564 6765 206d - edge m │ │ │ +00044f90: 6572 6765 2074 6872 6573 686f 6c64 2e20 erge threshold. │ │ │ +00044fa0: 496e 6372 6561 7365 2074 6f20 7472 6164 Increase to trad │ │ │ +00044fb0: 6520 6f66 6620 6163 6375 7261 6379 2066 e off accuracy f │ │ │ +00044fc0: 6f72 2073 7065 6564 2e3c 2f64 643e 0a3c or speed.
    .< │ │ │ +00044fd0: 6474 3e52 6574 7572 6e73 3a3c 2f64 743e dt>Returns: │ │ │ +00044fe0: 0a3c 6464 3e61 7574 6f6d 6174 6963 616c .
    automatical │ │ │ +00044ff0: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
    .
    ..

  • .
  • ..< │ │ │ +00045070: 6833 3e63 7265 6174 6545 6467 6542 6f78 h3>createEdgeBox │ │ │ +00045080: 6573 3c2f 6833 3e0a 3c64 6976 2063 6c61 es.
    pu │ │ │ +000450c0: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static  │ │ │ +00045130: 4564 6765 426f 7865 733c 2f61 3e3c 2f73 EdgeBoxes createEdgeB │ │ │ +00045170: 6f78 6573 3c2f 7370 616e 3e3c 7762 723e oxes │ │ │ +00045180: 3c73 7061 6e20 636c 6173 733d 2270 6172 (float& │ │ │ +000451a0: 6e62 7370 3b61 6c70 6861 2c0a 2066 6c6f nbsp;alpha,. flo │ │ │ +000451b0: 6174 266e 6273 703b 6265 7461 2c0a 2066 at beta,. f │ │ │ +000451c0: 6c6f 6174 266e 6273 703b 6574 612c 0a20 loat eta,. │ │ │ +000451d0: 666c 6f61 7426 6e62 7370 3b6d 696e 5363 float minSc │ │ │ +000451e0: 6f72 652c 0a20 696e 7426 6e62 7370 3b6d ore,. int m │ │ │ +000451f0: 6178 426f 7865 732c 0a20 666c 6f61 7426 axBoxes,. float& │ │ │ +00045200: 6e62 7370 3b65 6467 654d 696e 4d61 6729 nbsp;edgeMinMag) │ │ │ +00045210: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .Creates a Edgeb │ │ │ +00045240: 6f78 6573 3c2f 6469 763e 0a3c 646c 2063 oxes.
    .Parameters:.
    alp │ │ │ +00045280: 6861 3c2f 636f 6465 3e20 2d20 7374 6570 ha - step │ │ │ +00045290: 2073 697a 6520 6f66 2073 6c69 6469 6e67 size of sliding │ │ │ +000452a0: 2077 696e 646f 7720 7365 6172 6368 2e3c window search.< │ │ │ +000452b0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e62 /dd>.
    b │ │ │ +000452c0: 6574 613c 2f63 6f64 653e 202d 206e 6d73 eta - nms │ │ │ +000452d0: 2074 6872 6573 686f 6c64 2066 6f72 206f threshold for o │ │ │ +000452e0: 626a 6563 7420 7072 6f70 6f73 616c 732e bject proposals. │ │ │ +000452f0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +00045300: 6574 613c 2f63 6f64 653e 202d 2061 6461 eta - ada │ │ │ +00045310: 7074 6174 696f 6e20 7261 7465 2066 6f72 ptation rate for │ │ │ +00045320: 206e 6d73 2074 6872 6573 686f 6c64 2e3c nms threshold.< │ │ │ +00045330: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e6d /dd>.
    m │ │ │ +00045340: 696e 5363 6f72 653c 2f63 6f64 653e 202d inScore - │ │ │ +00045350: 206d 696e 2073 636f 7265 206f 6620 626f min score of bo │ │ │ +00045360: 7865 7320 746f 2064 6574 6563 742e 3c2f xes to detect..
    ma │ │ │ +00045380: 7842 6f78 6573 3c2f 636f 6465 3e20 2d20 xBoxes - │ │ │ +00045390: 6d61 7820 6e75 6d62 6572 206f 6620 626f max number of bo │ │ │ +000453a0: 7865 7320 746f 2064 6574 6563 742e 3c2f xes to detect..
    ed │ │ │ +000453c0: 6765 4d69 6e4d 6167 3c2f 636f 6465 3e20 geMinMag │ │ │ +000453d0: 2d20 6564 6765 206d 696e 206d 6167 6e69 - edge min magni │ │ │ +000453e0: 7475 6465 2e20 496e 6372 6561 7365 2074 tude. Increase t │ │ │ +000453f0: 6f20 7472 6164 6520 6f66 6620 6163 6375 o trade off accu │ │ │ +00045400: 7261 6379 2066 6f72 2073 7065 6564 2e3c racy for speed.< │ │ │ +00045410: 2f64 643e 0a3c 6474 3e52 6574 7572 6e73 /dd>.
    Returns │ │ │ +00045420: 3a3c 2f64 743e 0a3c 6464 3e61 7574 6f6d :
    .
    autom │ │ │ +00045430: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +00045440: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
    .
    ..
  • .< │ │ │ +00045460: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .< │ │ │ +000454b0: 6833 3e63 7265 6174 6545 6467 6542 6f78 h3>createEdgeBox │ │ │ +000454c0: 6573 3c2f 6833 3e0a 3c64 6976 2063 6c61 es.
    pu │ │ │ +00045500: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static  │ │ │ +00045570: 4564 6765 426f 7865 733c 2f61 3e3c 2f73 EdgeBoxes createEdgeB │ │ │ +000455b0: 6f78 6573 3c2f 7370 616e 3e3c 7762 723e oxes │ │ │ +000455c0: 3c73 7061 6e20 636c 6173 733d 2270 6172 (float& │ │ │ +000455e0: 6e62 7370 3b61 6c70 6861 2c0a 2066 6c6f nbsp;alpha,. flo │ │ │ +000455f0: 6174 266e 6273 703b 6265 7461 2c0a 2066 at beta,. f │ │ │ +00045600: 6c6f 6174 266e 6273 703b 6574 612c 0a20 loat eta,. │ │ │ +00045610: 666c 6f61 7426 6e62 7370 3b6d 696e 5363 float minSc │ │ │ +00045620: 6f72 652c 0a20 696e 7426 6e62 7370 3b6d ore,. int m │ │ │ +00045630: 6178 426f 7865 7329 3c2f 7370 616e 3e3c axBoxes)< │ │ │ +00045640: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Creates │ │ │ +00045660: 2061 2045 6467 6562 6f78 6573 3c2f 6469 a Edgeboxes.
    .
    Parame │ │ │ +00045690: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
    .
    < │ │ │ +000456a0: 636f 6465 3e61 6c70 6861 3c2f 636f 6465 code>alpha - step size of │ │ │ +000456c0: 2073 6c69 6469 6e67 2077 696e 646f 7720 sliding window │ │ │ +000456d0: 7365 6172 6368 2e3c 2f64 643e 0a3c 6464 search.
    .
    beta - nms thresho │ │ │ +00045700: 6c64 2066 6f72 206f 626a 6563 7420 7072 ld for object pr │ │ │ +00045710: 6f70 6f73 616c 732e 3c2f 6464 3e0a 3c64 oposals.
    .eta - adaptation │ │ │ +00045740: 7261 7465 2066 6f72 206e 6d73 2074 6872 rate for nms thr │ │ │ +00045750: 6573 686f 6c64 2e3c 2f64 643e 0a3c 6464 eshold..
    minScore< │ │ │ +00045770: 2f63 6f64 653e 202d 206d 696e 2073 636f /code> - min sco │ │ │ +00045780: 7265 206f 6620 626f 7865 7320 746f 2064 re of boxes to d │ │ │ +00045790: 6574 6563 742e 3c2f 6464 3e0a 3c64 643e etect.
    .
    │ │ │ +000457a0: 3c63 6f64 653e 6d61 7842 6f78 6573 3c2f maxBoxes - max numb │ │ │ +000457c0: 6572 206f 6620 626f 7865 7320 746f 2064 er of boxes to d │ │ │ +000457d0: 6574 6563 742e 3c2f 6464 3e0a 3c64 743e etect.
    .
    │ │ │ +000457e0: 5265 7475 726e 733a 3c2f 6474 3e0a 3c64 Returns:
    .automatically │ │ │ +00045800: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated.< │ │ │ +00045810: 2f64 6c3e 0a3c 2f73 6563 7469 6f6e 3e0a /dl>.
    . │ │ │ +00045820: 3c2f 6c69 3e0a 3c6c 693e 0a3c 7365 6374 .
  • ..

    createEdge │ │ │ +00045880: 426f 7865 733c 2f68 333e 0a3c 6469 7620 Boxes

    .
    public static EdgeBoxes │ │ │ +00045940: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  createEd │ │ │ +00045970: 6765 426f 7865 733c 2f73 7061 6e3e 3c77 geBoxes(flo │ │ │ +000459a0: 6174 266e 6273 703b 616c 7068 612c 0a20 at alpha,. │ │ │ +000459b0: 666c 6f61 7426 6e62 7370 3b62 6574 612c float beta, │ │ │ +000459c0: 0a20 666c 6f61 7426 6e62 7370 3b65 7461 . float eta │ │ │ +000459d0: 2c0a 2066 6c6f 6174 266e 6273 703b 6d69 ,. float mi │ │ │ +000459e0: 6e53 636f 7265 293c 2f73 7061 6e3e 3c2f nScore).
    Creates │ │ │ +00045a10: 6120 4564 6765 626f 7865 733c 2f64 6976 a Edgeboxes
    .
    .
    Paramet │ │ │ +00045a40: 6572 733a 3c2f 6474 3e0a 3c64 643e 3c63 ers:
    .
    alpha │ │ │ +00045a60: 202d 2073 7465 7020 7369 7a65 206f 6620 - step size of │ │ │ +00045a70: 736c 6964 696e 6720 7769 6e64 6f77 2073 sliding window s │ │ │ +00045a80: 6561 7263 682e 3c2f 6464 3e0a 3c64 643e earch.
    .
    │ │ │ +00045a90: 3c63 6f64 653e 6265 7461 3c2f 636f 6465 beta - nms threshol │ │ │ +00045ab0: 6420 666f 7220 6f62 6a65 6374 2070 726f d for object pro │ │ │ +00045ac0: 706f 7361 6c73 2e3c 2f64 643e 0a3c 6464 posals.
    .
    eta - adaptation r │ │ │ +00045af0: 6174 6520 666f 7220 6e6d 7320 7468 7265 ate for nms thre │ │ │ +00045b00: 7368 6f6c 642e 3c2f 6464 3e0a 3c64 643e shold.
    .
    │ │ │ +00045b10: 3c63 6f64 653e 6d69 6e53 636f 7265 3c2f minScore - min scor │ │ │ +00045b30: 6520 6f66 2062 6f78 6573 2074 6f20 6465 e of boxes to de │ │ │ +00045b40: 7465 6374 2e3c 2f64 643e 0a3c 6474 3e52 tect.
    .
    R │ │ │ +00045b50: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
    .
    automatically g │ │ │ +00045b70: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ...< │ │ │ +00045b90: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    c │ │ │ +00045be0: 7265 6174 6545 6467 6542 6f78 6573 3c2f reateEdgeBoxes.
    public │ │ │ +00045c30: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ +00045c40: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;Edge │ │ │ +00045ca0: 426f 7865 733c 2f61 3e3c 2f73 7061 6e3e Boxes │ │ │ +00045cb0: 266e 6273 703b 3c73 7061 6e20 636c 6173  createEdgeBoxes │ │ │ +00045ce0: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (float  │ │ │ +00045d10: 3b61 6c70 6861 2c0a 2066 6c6f 6174 266e ;alpha,. float&n │ │ │ +00045d20: 6273 703b 6265 7461 2c0a 2066 6c6f 6174 bsp;beta,. float │ │ │ +00045d30: 266e 6273 703b 6574 6129 3c2f 7370 616e  eta)
    .
    Creat │ │ │ +00045d60: 6573 2061 2045 6467 6562 6f78 6573 3c2f es a Edgeboxes.
    .
    Para │ │ │ +00045d90: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    alpha - step size │ │ │ +00045dc0: 6f66 2073 6c69 6469 6e67 2077 696e 646f of sliding windo │ │ │ +00045dd0: 7720 7365 6172 6368 2e3c 2f64 643e 0a3c w search.
    .< │ │ │ +00045de0: 6464 3e3c 636f 6465 3e62 6574 613c 2f63 dd>beta - nms thres │ │ │ +00045e00: 686f 6c64 2066 6f72 206f 626a 6563 7420 hold for object │ │ │ +00045e10: 7072 6f70 6f73 616c 732e 3c2f 6464 3e0a proposals.. │ │ │ +00045e20: 3c64 643e 3c63 6f64 653e 6574 613c 2f63
    eta - adaptatio │ │ │ +00045e40: 6e20 7261 7465 2066 6f72 206e 6d73 2074 n rate for nms t │ │ │ +00045e50: 6872 6573 686f 6c64 2e3c 2f64 643e 0a3c hreshold.
    .< │ │ │ +00045e60: 6474 3e52 6574 7572 6e73 3a3c 2f64 743e dt>Returns: │ │ │ +00045e70: 0a3c 6464 3e61 7574 6f6d 6174 6963 616c .
    automatical │ │ │ +00045e80: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
    .
    ..

  • .
  • ..

    cre │ │ │ +00045ef0: 6174 6545 6467 6542 6f78 6573 3c2f 6833 ateEdgeBoxes

    .
    │ │ │ +00045f20: 3c73 7061 6e20 636c 6173 733d 226d 6f64 public s │ │ │ +00045f40: 7461 7469 633c 2f73 7061 6e3e 266e 6273 tatic&nbs │ │ │ +00045f50: 703b 3c73 7061 6e20 636c 6173 733d 2272 p;EdgeBo │ │ │ +00045fb0: 7865 733c 2f61 3e3c 2f73 7061 6e3e 266e xes&n │ │ │ +00045fc0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;c │ │ │ +00045fe0: 7265 6174 6545 6467 6542 6f78 6573 3c2f reateEdgeBoxes(float a │ │ │ +00046020: 6c70 6861 2c0a 2066 6c6f 6174 266e 6273 lpha,. float&nbs │ │ │ +00046030: 703b 6265 7461 293c 2f73 7061 6e3e 3c2f p;beta).
    Creates │ │ │ +00046060: 6120 4564 6765 626f 7865 733c 2f64 6976 a Edgeboxes
    .
    .
    Paramet │ │ │ +00046090: 6572 733a 3c2f 6474 3e0a 3c64 643e 3c63 ers:
    .
    alpha │ │ │ +000460b0: 202d 2073 7465 7020 7369 7a65 206f 6620 - step size of │ │ │ +000460c0: 736c 6964 696e 6720 7769 6e64 6f77 2073 sliding window s │ │ │ +000460d0: 6561 7263 682e 3c2f 6464 3e0a 3c64 643e earch.
    .
    │ │ │ +000460e0: 3c63 6f64 653e 6265 7461 3c2f 636f 6465 beta - nms threshol │ │ │ +00046100: 6420 666f 7220 6f62 6a65 6374 2070 726f d for object pro │ │ │ +00046110: 706f 7361 6c73 2e3c 2f64 643e 0a3c 6474 posals.
    .
    Returns:
    .< │ │ │ +00046130: 6464 3e61 7574 6f6d 6174 6963 616c 6c79 dd>automatically │ │ │ +00046140: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated. │ │ │ +00046150: 3c2f 646c 3e0a 3c2f 7365 6374 696f 6e3e
    . │ │ │ +00046160: 0a3c 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 .
  • .
  • . │ │ │ +000461a0: 0a3c 6833 3e63 7265 6174 6545 6467 6542 .

    createEdgeB │ │ │ +000461b0: 6f78 6573 3c2f 6833 3e0a 3c64 6976 2063 oxes

    .
    │ │ │ +000461f0: 7075 626c 6963 2073 7461 7469 633c 2f73 public static EdgeBoxes< │ │ │ +00046270: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> createEdg │ │ │ +000462a0: 6542 6f78 6573 3c2f 7370 616e 3e3c 7762 eBoxes(floa │ │ │ +000462d0: 7426 6e62 7370 3b61 6c70 6861 293c 2f73 t alpha)
    .
    Cr │ │ │ +00046300: 6561 7465 7320 6120 4564 6765 626f 7865 eates a Edgeboxe │ │ │ +00046310: 733c 2f64 6976 3e0a 3c64 6c20 636c 6173 s
    .
    .
    P │ │ │ +00046330: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ +00046340: 3c64 643e 3c63 6f64 653e 616c 7068 613c
    alpha< │ │ │ +00046350: 2f63 6f64 653e 202d 2073 7465 7020 7369 /code> - step si │ │ │ +00046360: 7a65 206f 6620 736c 6964 696e 6720 7769 ze of sliding wi │ │ │ +00046370: 6e64 6f77 2073 6561 7263 682e 3c2f 6464 ndow search.
    .
    Returns:.
    automati │ │ │ +000463a0: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +000463b0: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.
    ..
  • .
  • │ │ │ +000463d0: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    │ │ │ +00046400: 0a3c 6833 3e63 7265 6174 6545 6467 6542 .

    createEdgeB │ │ │ +00046410: 6f78 6573 3c2f 6833 3e0a 3c64 6976 2063 oxes

    .
    │ │ │ +00046450: 7075 626c 6963 2073 7461 7469 633c 2f73 public static EdgeBoxes< │ │ │ +000464d0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> createEdg │ │ │ +00046500: 6542 6f78 6573 3c2f 7370 616e 3e28 293c eBoxes()< │ │ │ +00046510: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Creates │ │ │ +00046530: 2061 2045 6467 6562 6f78 6573 3c2f 6469 a Edgeboxes.
    .
    Return │ │ │ +00046560: 733a 3c2f 6474 3e0a 3c64 643e 6175 746f s:
    .
    auto │ │ │ +00046570: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ +00046580: 7465 643c 2f64 643e 0a3c 2f64 6c3e 0a3c ted
    .
    .< │ │ │ +00046590: 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 3e0a /section>.
  • . │ │ │ +000465a0: 3c6c 693e 0a3c 7365 6374 696f 6e20 636c
  • .
    .

    c │ │ │ +00046600: 7265 6174 6553 7570 6572 7069 7865 6c53 reateSuperpixelS │ │ │ +00046610: 4c49 433c 2f68 333e 0a3c 6469 7620 636c LIC

    .
    p │ │ │ +00046650: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static Superpixel │ │ │ +000466d0: 534c 4943 3c2f 613e 3c2f 7370 616e 3e26 SLIC& │ │ │ +000466e0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ +00046700: 6372 6561 7465 5375 7065 7270 6978 656c createSuperpixel │ │ │ +00046710: 534c 4943 3c2f 7370 616e 3e3c 7762 723e SLIC │ │ │ +00046720: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Mat&nb │ │ │ +00046780: 7370 3b69 6d61 6765 2c0a 2069 6e74 266e sp;image,. int&n │ │ │ +00046790: 6273 703b 616c 676f 7269 7468 6d2c 0a20 bsp;algorithm,. │ │ │ +000467a0: 696e 7426 6e62 7370 3b72 6567 696f 6e5f int region_ │ │ │ +000467b0: 7369 7a65 2c0a 2066 6c6f 6174 266e 6273 size,. float&nbs │ │ │ +000467c0: 703b 7275 6c65 7229 3c2f 7370 616e 3e3c p;ruler)< │ │ │ +000467d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Initial │ │ │ +000467f0: 697a 6520 6120 5375 7065 7270 6978 656c ize a Superpixel │ │ │ +00046800: 534c 4943 206f 626a 6563 743c 2f64 6976 SLIC object
    .
    .
    Paramet │ │ │ +00046830: 6572 733a 3c2f 6474 3e0a 3c64 643e 3c63 ers:
    .
    image │ │ │ +00046850: 202d 2049 6d61 6765 2074 6f20 7365 676d - Image to segm │ │ │ +00046860: 656e 743c 2f64 643e 0a3c 6464 3e3c 636f ent
    .
    algorithm - Chooses th │ │ │ +00046890: 6520 616c 676f 7269 7468 6d20 7661 7269 e algorithm vari │ │ │ +000468a0: 616e 7420 746f 2075 7365 3a0a 2053 4c49 ant to use:. SLI │ │ │ +000468b0: 4320 7365 676d 656e 7473 2069 6d61 6765 C segments image │ │ │ +000468c0: 2075 7369 6e67 2061 2064 6573 6972 6564 using a desired │ │ │ +000468d0: 2072 6567 696f 6e5f 7369 7a65 2c20 616e region_size, an │ │ │ +000468e0: 6420 696e 2061 6464 6974 696f 6e20 534c d in addition SL │ │ │ +000468f0: 4943 4f20 7769 6c6c 206f 7074 696d 697a ICO will optimiz │ │ │ +00046900: 6520 7573 696e 6720 6164 6170 7469 7665 e using adaptive │ │ │ +00046910: 2063 6f6d 7061 6374 6e65 7373 2066 6163 compactness fac │ │ │ +00046920: 746f 722c 0a20 7768 696c 6520 4d53 4c49 tor,. while MSLI │ │ │ +00046930: 4320 7769 6c6c 206f 7074 696d 697a 6520 C will optimize │ │ │ +00046940: 7573 696e 6720 6d61 6e69 666f 6c64 206d using manifold m │ │ │ +00046950: 6574 686f 6473 2072 6573 756c 7469 6e67 ethods resulting │ │ │ +00046960: 2069 6e20 6d6f 7265 2063 6f6e 7465 6e74 in more content │ │ │ +00046970: 2d73 656e 7369 7469 7665 2073 7570 6572 -sensitive super │ │ │ +00046980: 7069 7865 6c73 2e3c 2f64 643e 0a3c 6464 pixels.
    .
    region_si │ │ │ +000469a0: 7a65 3c2f 636f 6465 3e20 2d20 4368 6f6f ze - Choo │ │ │ +000469b0: 7365 7320 616e 2061 7665 7261 6765 2073 ses an average s │ │ │ +000469c0: 7570 6572 7069 7865 6c20 7369 7a65 206d uperpixel size m │ │ │ +000469d0: 6561 7375 7265 6420 696e 2070 6978 656c easured in pixel │ │ │ +000469e0: 733c 2f64 643e 0a3c 6464 3e3c 636f 6465 s
    .
    ruler - │ │ │ +00046a00: 4368 6f6f 7365 7320 7468 6520 656e 666f Chooses the enfo │ │ │ +00046a10: 7263 656d 656e 7420 6f66 2073 7570 6572 rcement of super │ │ │ +00046a20: 7069 7865 6c20 736d 6f6f 7468 6e65 7373 pixel smoothness │ │ │ +00046a30: 2066 6163 746f 7220 6f66 2073 7570 6572 factor of super │ │ │ +00046a40: 7069 7865 6c0a 0a20 5468 6520 6675 6e63 pixel.. The func │ │ │ +00046a50: 7469 6f6e 2069 6e69 7469 616c 697a 6573 tion initializes │ │ │ +00046a60: 2061 2053 7570 6572 7069 7865 6c53 4c49 a SuperpixelSLI │ │ │ +00046a70: 4320 6f62 6a65 6374 2066 6f72 2074 6865 C object for the │ │ │ +00046a80: 2069 6e70 7574 2069 6d61 6765 2e20 4974 input image. It │ │ │ +00046a90: 2073 6574 7320 7468 6520 7061 7261 6d65 sets the parame │ │ │ +00046aa0: 7465 7273 206f 6620 6368 6f6f 7365 640a ters of choosed. │ │ │ +00046ab0: 2073 7570 6572 7069 7865 6c20 616c 676f superpixel algo │ │ │ +00046ac0: 7269 7468 6d2c 2077 6869 6368 2061 7265 rithm, which are │ │ │ +00046ad0: 3a20 7265 6769 6f6e 5f73 697a 6520 616e : region_size an │ │ │ +00046ae0: 6420 7275 6c65 722e 2049 7420 7072 6561 d ruler. It prea │ │ │ +00046af0: 6c6c 6f63 6174 6520 736f 6d65 2062 7566 llocate some buf │ │ │ +00046b00: 6665 7273 2066 6f72 2066 7574 7572 650a fers for future. │ │ │ +00046b10: 2063 6f6d 7075 7469 6e67 2069 7465 7261 computing itera │ │ │ +00046b20: 7469 6f6e 7320 6f76 6572 2074 6865 2067 tions over the g │ │ │ +00046b30: 6976 656e 2069 6d61 6765 2e20 466f 7220 iven image. For │ │ │ +00046b40: 656e 616e 6368 6564 2072 6573 756c 7473 enanched results │ │ │ +00046b50: 2069 7420 6973 2072 6563 6f6d 6d65 6e64 it is recommend │ │ │ +00046b60: 6564 2066 6f72 2063 6f6c 6f72 2069 6d61 ed for color ima │ │ │ +00046b70: 6765 7320 746f 0a20 7072 6570 726f 6365 ges to. preproce │ │ │ +00046b80: 7373 2069 6d61 6765 2077 6974 6820 6c69 ss image with li │ │ │ +00046b90: 7474 6c65 2067 6175 7373 6961 6e20 626c ttle gaussian bl │ │ │ +00046ba0: 7572 2075 7369 6e67 2061 2073 6d61 6c6c ur using a small │ │ │ +00046bb0: 2033 2078 2033 206b 6572 6e65 6c20 616e 3 x 3 kernel an │ │ │ +00046bc0: 6420 6164 6469 7469 6f6e 616c 2063 6f6e d additional con │ │ │ +00046bd0: 7665 7273 696f 6e20 696e 746f 0a20 4369 version into. Ci │ │ │ +00046be0: 654c 4142 2063 6f6c 6f72 2073 7061 6365 eLAB color space │ │ │ +00046bf0: 2e20 416e 2065 7861 6d70 6c65 206f 6620 . An example of │ │ │ +00046c00: 534c 4943 2076 6572 7375 7320 534c 4943 SLIC versus SLIC │ │ │ +00046c10: 4f20 616e 6420 4d53 4c49 4320 6973 2069 O and MSLIC is i │ │ │ +00046c20: 6c75 7374 7261 7465 6420 696e 2074 6865 lustrated in the │ │ │ +00046c30: 2066 6f6c 6c6f 7769 6e67 2070 6963 7475 following pictu │ │ │ +00046c40: 7265 2e0a 0a20 215b 696d 6167 655d 2870 re... ![image](p │ │ │ +00046c50: 6963 732f 7375 7065 7270 6978 656c 735f ics/superpixels_ │ │ │ +00046c60: 736c 6963 2e70 6e67 293c 2f64 643e 0a3c slic.png)
    .< │ │ │ +00046c70: 6474 3e52 6574 7572 6e73 3a3c 2f64 743e dt>Returns: │ │ │ +00046c80: 0a3c 6464 3e61 7574 6f6d 6174 6963 616c .
    automatical │ │ │ +00046c90: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
    .
    ..
  • .
  • ..createSuperpix │ │ │ +00046d20: 656c 534c 4943 3c2f 6833 3e0a 3c64 6976 elSLIC.
    public static< │ │ │ +00046d70: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> Superpi │ │ │ +00046de0: 7865 6c53 4c49 433c 2f61 3e3c 2f73 7061 xelSLIC createSuperpi │ │ │ +00046e20: 7865 6c53 4c49 433c 2f73 7061 6e3e 3c77 xelSLIC(Mat │ │ │ +00046e90: 266e 6273 703b 696d 6167 652c 0a20 696e  image,. in │ │ │ +00046ea0: 7426 6e62 7370 3b61 6c67 6f72 6974 686d t algorithm │ │ │ +00046eb0: 2c0a 2069 6e74 266e 6273 703b 7265 6769 ,. int regi │ │ │ +00046ec0: 6f6e 5f73 697a 6529 3c2f 7370 616e 3e3c on_size)< │ │ │ +00046ed0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Initial │ │ │ +00046ef0: 697a 6520 6120 5375 7065 7270 6978 656c ize a Superpixel │ │ │ +00046f00: 534c 4943 206f 626a 6563 743c 2f64 6976 SLIC object
    .
    .
    Paramet │ │ │ +00046f30: 6572 733a 3c2f 6474 3e0a 3c64 643e 3c63 ers:
    .
    image │ │ │ +00046f50: 202d 2049 6d61 6765 2074 6f20 7365 676d - Image to segm │ │ │ +00046f60: 656e 743c 2f64 643e 0a3c 6464 3e3c 636f ent
    .
    algorithm - Chooses th │ │ │ +00046f90: 6520 616c 676f 7269 7468 6d20 7661 7269 e algorithm vari │ │ │ +00046fa0: 616e 7420 746f 2075 7365 3a0a 2053 4c49 ant to use:. SLI │ │ │ +00046fb0: 4320 7365 676d 656e 7473 2069 6d61 6765 C segments image │ │ │ +00046fc0: 2075 7369 6e67 2061 2064 6573 6972 6564 using a desired │ │ │ +00046fd0: 2072 6567 696f 6e5f 7369 7a65 2c20 616e region_size, an │ │ │ +00046fe0: 6420 696e 2061 6464 6974 696f 6e20 534c d in addition SL │ │ │ +00046ff0: 4943 4f20 7769 6c6c 206f 7074 696d 697a ICO will optimiz │ │ │ +00047000: 6520 7573 696e 6720 6164 6170 7469 7665 e using adaptive │ │ │ +00047010: 2063 6f6d 7061 6374 6e65 7373 2066 6163 compactness fac │ │ │ +00047020: 746f 722c 0a20 7768 696c 6520 4d53 4c49 tor,. while MSLI │ │ │ +00047030: 4320 7769 6c6c 206f 7074 696d 697a 6520 C will optimize │ │ │ +00047040: 7573 696e 6720 6d61 6e69 666f 6c64 206d using manifold m │ │ │ +00047050: 6574 686f 6473 2072 6573 756c 7469 6e67 ethods resulting │ │ │ +00047060: 2069 6e20 6d6f 7265 2063 6f6e 7465 6e74 in more content │ │ │ +00047070: 2d73 656e 7369 7469 7665 2073 7570 6572 -sensitive super │ │ │ +00047080: 7069 7865 6c73 2e3c 2f64 643e 0a3c 6464 pixels.
    .
    region_si │ │ │ +000470a0: 7a65 3c2f 636f 6465 3e20 2d20 4368 6f6f ze - Choo │ │ │ +000470b0: 7365 7320 616e 2061 7665 7261 6765 2073 ses an average s │ │ │ +000470c0: 7570 6572 7069 7865 6c20 7369 7a65 206d uperpixel size m │ │ │ +000470d0: 6561 7375 7265 6420 696e 2070 6978 656c easured in pixel │ │ │ +000470e0: 730a 0a20 5468 6520 6675 6e63 7469 6f6e s.. The function │ │ │ +000470f0: 2069 6e69 7469 616c 697a 6573 2061 2053 initializes a S │ │ │ +00047100: 7570 6572 7069 7865 6c53 4c49 4320 6f62 uperpixelSLIC ob │ │ │ +00047110: 6a65 6374 2066 6f72 2074 6865 2069 6e70 ject for the inp │ │ │ +00047120: 7574 2069 6d61 6765 2e20 4974 2073 6574 ut image. It set │ │ │ +00047130: 7320 7468 6520 7061 7261 6d65 7465 7273 s the parameters │ │ │ +00047140: 206f 6620 6368 6f6f 7365 640a 2073 7570 of choosed. sup │ │ │ +00047150: 6572 7069 7865 6c20 616c 676f 7269 7468 erpixel algorith │ │ │ +00047160: 6d2c 2077 6869 6368 2061 7265 3a20 7265 m, which are: re │ │ │ +00047170: 6769 6f6e 5f73 697a 6520 616e 6420 7275 gion_size and ru │ │ │ +00047180: 6c65 722e 2049 7420 7072 6561 6c6c 6f63 ler. It prealloc │ │ │ +00047190: 6174 6520 736f 6d65 2062 7566 6665 7273 ate some buffers │ │ │ +000471a0: 2066 6f72 2066 7574 7572 650a 2063 6f6d for future. com │ │ │ +000471b0: 7075 7469 6e67 2069 7465 7261 7469 6f6e puting iteration │ │ │ +000471c0: 7320 6f76 6572 2074 6865 2067 6976 656e s over the given │ │ │ +000471d0: 2069 6d61 6765 2e20 466f 7220 656e 616e image. For enan │ │ │ +000471e0: 6368 6564 2072 6573 756c 7473 2069 7420 ched results it │ │ │ +000471f0: 6973 2072 6563 6f6d 6d65 6e64 6564 2066 is recommended f │ │ │ +00047200: 6f72 2063 6f6c 6f72 2069 6d61 6765 7320 or color images │ │ │ +00047210: 746f 0a20 7072 6570 726f 6365 7373 2069 to. preprocess i │ │ │ +00047220: 6d61 6765 2077 6974 6820 6c69 7474 6c65 mage with little │ │ │ +00047230: 2067 6175 7373 6961 6e20 626c 7572 2075 gaussian blur u │ │ │ +00047240: 7369 6e67 2061 2073 6d61 6c6c 2033 2078 sing a small 3 x │ │ │ +00047250: 2033 206b 6572 6e65 6c20 616e 6420 6164 3 kernel and ad │ │ │ +00047260: 6469 7469 6f6e 616c 2063 6f6e 7665 7273 ditional convers │ │ │ +00047270: 696f 6e20 696e 746f 0a20 4369 654c 4142 ion into. CieLAB │ │ │ +00047280: 2063 6f6c 6f72 2073 7061 6365 2e20 416e color space. An │ │ │ +00047290: 2065 7861 6d70 6c65 206f 6620 534c 4943 example of SLIC │ │ │ +000472a0: 2076 6572 7375 7320 534c 4943 4f20 616e versus SLICO an │ │ │ +000472b0: 6420 4d53 4c49 4320 6973 2069 6c75 7374 d MSLIC is ilust │ │ │ +000472c0: 7261 7465 6420 696e 2074 6865 2066 6f6c rated in the fol │ │ │ +000472d0: 6c6f 7769 6e67 2070 6963 7475 7265 2e0a lowing picture.. │ │ │ +000472e0: 0a20 215b 696d 6167 655d 2870 6963 732f . ![image](pics/ │ │ │ +000472f0: 7375 7065 7270 6978 656c 735f 736c 6963 superpixels_slic │ │ │ +00047300: 2e70 6e67 293c 2f64 643e 0a3c 6474 3e52 .png)
    .
    R │ │ │ +00047310: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
    .
    automatically g │ │ │ +00047330: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ...< │ │ │ +00047350: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    create │ │ │ +000473b0: 5375 7065 7270 6978 656c 534c 4943 3c2f SuperpixelSLIC.
    public │ │ │ +00047400: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ +00047410: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;SuperpixelSLIC< │ │ │ +00047480: 2f61 3e3c 2f73 7061 6e3e 266e 6273 703b /a>  │ │ │ +00047490: 3c73 7061 6e20 636c 6173 733d 2265 6c65 creat │ │ │ +000474b0: 6553 7570 6572 7069 7865 6c53 4c49 433c eSuperpixelSLIC< │ │ │ +000474c0: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(Mat im │ │ │ +00047530: 6167 652c 0a20 696e 7426 6e62 7370 3b61 age,. int a │ │ │ +00047540: 6c67 6f72 6974 686d 293c 2f73 7061 6e3e lgorithm) │ │ │ +00047550: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    Initia │ │ │ +00047570: 6c69 7a65 2061 2053 7570 6572 7069 7865 lize a Superpixe │ │ │ +00047580: 6c53 4c49 4320 6f62 6a65 6374 3c2f 6469 lSLIC object.
    .
    Parame │ │ │ +000475b0: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
    .
    < │ │ │ +000475c0: 636f 6465 3e69 6d61 6765 3c2f 636f 6465 code>image - Image to seg │ │ │ +000475e0: 6d65 6e74 3c2f 6464 3e0a 3c64 643e 3c63 ment
    .
    algorithm - Chooses t │ │ │ +00047610: 6865 2061 6c67 6f72 6974 686d 2076 6172 he algorithm var │ │ │ +00047620: 6961 6e74 2074 6f20 7573 653a 0a20 534c iant to use:. SL │ │ │ +00047630: 4943 2073 6567 6d65 6e74 7320 696d 6167 IC segments imag │ │ │ +00047640: 6520 7573 696e 6720 6120 6465 7369 7265 e using a desire │ │ │ +00047650: 6420 7265 6769 6f6e 5f73 697a 652c 2061 d region_size, a │ │ │ +00047660: 6e64 2069 6e20 6164 6469 7469 6f6e 2053 nd in addition S │ │ │ +00047670: 4c49 434f 2077 696c 6c20 6f70 7469 6d69 LICO will optimi │ │ │ +00047680: 7a65 2075 7369 6e67 2061 6461 7074 6976 ze using adaptiv │ │ │ +00047690: 6520 636f 6d70 6163 746e 6573 7320 6661 e compactness fa │ │ │ +000476a0: 6374 6f72 2c0a 2077 6869 6c65 204d 534c ctor,. while MSL │ │ │ +000476b0: 4943 2077 696c 6c20 6f70 7469 6d69 7a65 IC will optimize │ │ │ +000476c0: 2075 7369 6e67 206d 616e 6966 6f6c 6420 using manifold │ │ │ +000476d0: 6d65 7468 6f64 7320 7265 7375 6c74 696e methods resultin │ │ │ +000476e0: 6720 696e 206d 6f72 6520 636f 6e74 656e g in more conten │ │ │ +000476f0: 742d 7365 6e73 6974 6976 6520 7375 7065 t-sensitive supe │ │ │ +00047700: 7270 6978 656c 732e 0a0a 2054 6865 2066 rpixels... The f │ │ │ +00047710: 756e 6374 696f 6e20 696e 6974 6961 6c69 unction initiali │ │ │ +00047720: 7a65 7320 6120 5375 7065 7270 6978 656c zes a Superpixel │ │ │ +00047730: 534c 4943 206f 626a 6563 7420 666f 7220 SLIC object for │ │ │ +00047740: 7468 6520 696e 7075 7420 696d 6167 652e the input image. │ │ │ +00047750: 2049 7420 7365 7473 2074 6865 2070 6172 It sets the par │ │ │ +00047760: 616d 6574 6572 7320 6f66 2063 686f 6f73 ameters of choos │ │ │ +00047770: 6564 0a20 7375 7065 7270 6978 656c 2061 ed. superpixel a │ │ │ +00047780: 6c67 6f72 6974 686d 2c20 7768 6963 6820 lgorithm, which │ │ │ +00047790: 6172 653a 2072 6567 696f 6e5f 7369 7a65 are: region_size │ │ │ +000477a0: 2061 6e64 2072 756c 6572 2e20 4974 2070 and ruler. It p │ │ │ +000477b0: 7265 616c 6c6f 6361 7465 2073 6f6d 6520 reallocate some │ │ │ +000477c0: 6275 6666 6572 7320 666f 7220 6675 7475 buffers for futu │ │ │ +000477d0: 7265 0a20 636f 6d70 7574 696e 6720 6974 re. computing it │ │ │ +000477e0: 6572 6174 696f 6e73 206f 7665 7220 7468 erations over th │ │ │ +000477f0: 6520 6769 7665 6e20 696d 6167 652e 2046 e given image. F │ │ │ +00047800: 6f72 2065 6e61 6e63 6865 6420 7265 7375 or enanched resu │ │ │ +00047810: 6c74 7320 6974 2069 7320 7265 636f 6d6d lts it is recomm │ │ │ +00047820: 656e 6465 6420 666f 7220 636f 6c6f 7220 ended for color │ │ │ +00047830: 696d 6167 6573 2074 6f0a 2070 7265 7072 images to. prepr │ │ │ +00047840: 6f63 6573 7320 696d 6167 6520 7769 7468 ocess image with │ │ │ +00047850: 206c 6974 746c 6520 6761 7573 7369 616e little gaussian │ │ │ +00047860: 2062 6c75 7220 7573 696e 6720 6120 736d blur using a sm │ │ │ +00047870: 616c 6c20 3320 7820 3320 6b65 726e 656c all 3 x 3 kernel │ │ │ +00047880: 2061 6e64 2061 6464 6974 696f 6e61 6c20 and additional │ │ │ +00047890: 636f 6e76 6572 7369 6f6e 2069 6e74 6f0a conversion into. │ │ │ +000478a0: 2043 6965 4c41 4220 636f 6c6f 7220 7370 CieLAB color sp │ │ │ +000478b0: 6163 652e 2041 6e20 6578 616d 706c 6520 ace. An example │ │ │ +000478c0: 6f66 2053 4c49 4320 7665 7273 7573 2053 of SLIC versus S │ │ │ +000478d0: 4c49 434f 2061 6e64 204d 534c 4943 2069 LICO and MSLIC i │ │ │ +000478e0: 7320 696c 7573 7472 6174 6564 2069 6e20 s ilustrated in │ │ │ +000478f0: 7468 6520 666f 6c6c 6f77 696e 6720 7069 the following pi │ │ │ +00047900: 6374 7572 652e 0a0a 2021 5b69 6d61 6765 cture... ![image │ │ │ +00047910: 5d28 7069 6373 2f73 7570 6572 7069 7865 ](pics/superpixe │ │ │ +00047920: 6c73 5f73 6c69 632e 706e 6729 3c2f 6464 ls_slic.png)
    .
    Returns:.
    automati │ │ │ +00047950: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +00047960: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.
    ..

  • .
  • │ │ │ +00047980: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    .

    cre │ │ │ +000479d0: 6174 6553 7570 6572 7069 7865 6c53 4c49 ateSuperpixelSLI │ │ │ +000479e0: 433c 2f68 333e 0a3c 6469 7620 636c 6173 C

    .
    pub │ │ │ +00047a20: 6c69 6320 7374 6174 6963 3c2f 7370 616e lic static SuperpixelSL │ │ │ +00047aa0: 4943 3c2f 613e 3c2f 7370 616e 3e26 6e62 IC&nb │ │ │ +00047ab0: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;cr │ │ │ +00047ad0: 6561 7465 5375 7065 7270 6978 656c 534c eateSuperpixelSL │ │ │ +00047ae0: 4943 3c2f 7370 616e 3e3c 7762 723e 3c73 IC(Mat  │ │ │ +00047b50: 3b69 6d61 6765 293c 2f73 7061 6e3e 3c2f ;image).
    Initiali │ │ │ +00047b80: 7a65 2061 2053 7570 6572 7069 7865 6c53 ze a SuperpixelS │ │ │ +00047b90: 4c49 4320 6f62 6a65 6374 3c2f 6469 763e LIC object
    │ │ │ +00047ba0: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
    .
    Paramete │ │ │ +00047bc0: 7273 3a3c 2f64 743e 0a3c 6464 3e3c 636f rs:
    .
    image │ │ │ +00047be0: 2d20 496d 6167 6520 746f 2073 6567 6d65 - Image to segme │ │ │ +00047bf0: 6e74 0a20 534c 4943 2073 6567 6d65 6e74 nt. SLIC segment │ │ │ +00047c00: 7320 696d 6167 6520 7573 696e 6720 6120 s image using a │ │ │ +00047c10: 6465 7369 7265 6420 7265 6769 6f6e 5f73 desired region_s │ │ │ +00047c20: 697a 652c 2061 6e64 2069 6e20 6164 6469 ize, and in addi │ │ │ +00047c30: 7469 6f6e 2053 4c49 434f 2077 696c 6c20 tion SLICO will │ │ │ +00047c40: 6f70 7469 6d69 7a65 2075 7369 6e67 2061 optimize using a │ │ │ +00047c50: 6461 7074 6976 6520 636f 6d70 6163 746e daptive compactn │ │ │ +00047c60: 6573 7320 6661 6374 6f72 2c0a 2077 6869 ess factor,. whi │ │ │ +00047c70: 6c65 204d 534c 4943 2077 696c 6c20 6f70 le MSLIC will op │ │ │ +00047c80: 7469 6d69 7a65 2075 7369 6e67 206d 616e timize using man │ │ │ +00047c90: 6966 6f6c 6420 6d65 7468 6f64 7320 7265 ifold methods re │ │ │ +00047ca0: 7375 6c74 696e 6720 696e 206d 6f72 6520 sulting in more │ │ │ +00047cb0: 636f 6e74 656e 742d 7365 6e73 6974 6976 content-sensitiv │ │ │ +00047cc0: 6520 7375 7065 7270 6978 656c 732e 0a0a e superpixels... │ │ │ +00047cd0: 2054 6865 2066 756e 6374 696f 6e20 696e The function in │ │ │ +00047ce0: 6974 6961 6c69 7a65 7320 6120 5375 7065 itializes a Supe │ │ │ +00047cf0: 7270 6978 656c 534c 4943 206f 626a 6563 rpixelSLIC objec │ │ │ +00047d00: 7420 666f 7220 7468 6520 696e 7075 7420 t for the input │ │ │ +00047d10: 696d 6167 652e 2049 7420 7365 7473 2074 image. It sets t │ │ │ +00047d20: 6865 2070 6172 616d 6574 6572 7320 6f66 he parameters of │ │ │ +00047d30: 2063 686f 6f73 6564 0a20 7375 7065 7270 choosed. superp │ │ │ +00047d40: 6978 656c 2061 6c67 6f72 6974 686d 2c20 ixel algorithm, │ │ │ +00047d50: 7768 6963 6820 6172 653a 2072 6567 696f which are: regio │ │ │ +00047d60: 6e5f 7369 7a65 2061 6e64 2072 756c 6572 n_size and ruler │ │ │ +00047d70: 2e20 4974 2070 7265 616c 6c6f 6361 7465 . It preallocate │ │ │ +00047d80: 2073 6f6d 6520 6275 6666 6572 7320 666f some buffers fo │ │ │ +00047d90: 7220 6675 7475 7265 0a20 636f 6d70 7574 r future. comput │ │ │ +00047da0: 696e 6720 6974 6572 6174 696f 6e73 206f ing iterations o │ │ │ +00047db0: 7665 7220 7468 6520 6769 7665 6e20 696d ver the given im │ │ │ +00047dc0: 6167 652e 2046 6f72 2065 6e61 6e63 6865 age. For enanche │ │ │ +00047dd0: 6420 7265 7375 6c74 7320 6974 2069 7320 d results it is │ │ │ +00047de0: 7265 636f 6d6d 656e 6465 6420 666f 7220 recommended for │ │ │ +00047df0: 636f 6c6f 7220 696d 6167 6573 2074 6f0a color images to. │ │ │ +00047e00: 2070 7265 7072 6f63 6573 7320 696d 6167 preprocess imag │ │ │ +00047e10: 6520 7769 7468 206c 6974 746c 6520 6761 e with little ga │ │ │ +00047e20: 7573 7369 616e 2062 6c75 7220 7573 696e ussian blur usin │ │ │ +00047e30: 6720 6120 736d 616c 6c20 3320 7820 3320 g a small 3 x 3 │ │ │ +00047e40: 6b65 726e 656c 2061 6e64 2061 6464 6974 kernel and addit │ │ │ +00047e50: 696f 6e61 6c20 636f 6e76 6572 7369 6f6e ional conversion │ │ │ +00047e60: 2069 6e74 6f0a 2043 6965 4c41 4220 636f into. CieLAB co │ │ │ +00047e70: 6c6f 7220 7370 6163 652e 2041 6e20 6578 lor space. An ex │ │ │ +00047e80: 616d 706c 6520 6f66 2053 4c49 4320 7665 ample of SLIC ve │ │ │ +00047e90: 7273 7573 2053 4c49 434f 2061 6e64 204d rsus SLICO and M │ │ │ +00047ea0: 534c 4943 2069 7320 696c 7573 7472 6174 SLIC is ilustrat │ │ │ +00047eb0: 6564 2069 6e20 7468 6520 666f 6c6c 6f77 ed in the follow │ │ │ +00047ec0: 696e 6720 7069 6374 7572 652e 0a0a 2021 ing picture... ! │ │ │ +00047ed0: 5b69 6d61 6765 5d28 7069 6373 2f73 7570 [image](pics/sup │ │ │ +00047ee0: 6572 7069 7865 6c73 5f73 6c69 632e 706e erpixels_slic.pn │ │ │ +00047ef0: 6729 3c2f 6464 3e0a 3c64 743e 5265 7475 g)
    .
    Retu │ │ │ +00047f00: 726e 733a 3c2f 6474 3e0a 3c64 643e 6175 rns:
    .
    au │ │ │ +00047f10: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ +00047f20: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
    .
    │ │ │ +00047f30: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .
    .
  • .
  • .
    .edgePreserving │ │ │ +00047fc0: 4669 6c74 6572 3c2f 6833 3e0a 3c64 6976 Filter.
    public static< │ │ │ +00048010: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> void edgePreserving │ │ │ +00048070: 4669 6c74 6572 3c2f 7370 616e 3e3c 7762 Filter(Mat& │ │ │ +000480e0: 6e62 7370 3b73 7263 2c0a 203c 6120 6872 nbsp;src,. Mat&n │ │ │ +00048130: 6273 703b 6473 742c 0a20 696e 7426 6e62 bsp;dst,. int&nb │ │ │ +00048140: 7370 3b64 2c0a 2064 6f75 626c 6526 6e62 sp;d,. double&nb │ │ │ +00048150: 7370 3b74 6872 6573 686f 6c64 293c 2f73 sp;threshold)
    .
    Sm │ │ │ +00048180: 6f6f 7468 6573 2061 6e20 696d 6167 6520 oothes an image │ │ │ +00048190: 7573 696e 6720 7468 6520 4564 6765 2d50 using the Edge-P │ │ │ +000481a0: 7265 7365 7276 696e 6720 6669 6c74 6572 reserving filter │ │ │ +000481b0: 2e0a 0a20 5468 6520 6675 6e63 7469 6f6e ... The function │ │ │ +000481c0: 2073 6d6f 6f74 6865 7320 4761 7573 7369 smoothes Gaussi │ │ │ +000481d0: 616e 206e 6f69 7365 2061 7320 7765 6c6c an noise as well │ │ │ +000481e0: 2061 7320 7361 6c74 2026 616d 703b 2070 as salt & p │ │ │ +000481f0: 6570 7065 7220 6e6f 6973 652e 0a20 466f epper noise.. Fo │ │ │ +00048200: 7220 6d6f 7265 2064 6574 6169 6c73 2061 r more details a │ │ │ +00048210: 626f 7574 2074 6869 7320 696d 706c 656d bout this implem │ │ │ +00048220: 656e 7461 7469 6f6e 2c20 706c 6561 7365 entation, please │ │ │ +00048230: 2073 6565 0a20 5b52 6569 576f 6531 385d see. [ReiWoe18] │ │ │ +00048240: 2020 5265 6963 682c 2053 2e20 616e 6420 Reich, S. and │ │ │ +00048250: 57c3 b672 67c3 b674 7465 722c 2046 2e20 W..rg..tter, F. │ │ │ +00048260: 616e 6420 4465 6c6c 656e 2c20 422e 2028 and Dellen, B. ( │ │ │ +00048270: 3230 3138 292e 2041 2052 6561 6c2d 5469 2018). A Real-Ti │ │ │ +00048280: 6d65 2045 6467 652d 5072 6573 6572 7669 me Edge-Preservi │ │ │ +00048290: 6e67 2044 656e 6f69 7369 6e67 2046 696c ng Denoising Fil │ │ │ +000482a0: 7465 722e 2050 726f 6365 6564 696e 6773 ter. Proceedings │ │ │ +000482b0: 206f 6620 7468 6520 3133 7468 2049 6e74 of the 13th Int │ │ │ +000482c0: 6572 6e61 7469 6f6e 616c 204a 6f69 6e74 ernational Joint │ │ │ +000482d0: 2043 6f6e 6665 7265 6e63 6520 6f6e 2043 Conference on C │ │ │ +000482e0: 6f6d 7075 7465 7220 5669 7369 6f6e 2c20 omputer Vision, │ │ │ +000482f0: 496d 6167 696e 6720 616e 6420 436f 6d70 Imaging and Comp │ │ │ +00048300: 7574 6572 2047 7261 7068 6963 7320 5468 uter Graphics Th │ │ │ +00048310: 656f 7279 2061 6e64 2041 7070 6c69 6361 eory and Applica │ │ │ +00048320: 7469 6f6e 7320 2856 4953 4947 5241 5050 tions (VISIGRAPP │ │ │ +00048330: 293a 2056 6973 6170 702c 2038 352d 3934 ): Visapp, 85-94 │ │ │ +00048340: 2c20 342e 2044 4f49 3a20 3130 2e35 3232 , 4. DOI: 10.522 │ │ │ +00048350: 302f 3030 3036 3530 3930 3030 3835 3030 0/00065090008500 │ │ │ +00048360: 3934 2e3c 2f64 6976 3e0a 3c64 6c20 636c 94.
    .
    .
    Parameters:
    .
    src< │ │ │ +000483a0: 2f63 6f64 653e 202d 2053 6f75 7263 6520 /code> - Source │ │ │ +000483b0: 382d 6269 7420 332d 6368 616e 6e65 6c20 8-bit 3-channel │ │ │ +000483c0: 696d 6167 652e 3c2f 6464 3e0a 3c64 643e image.
    .
    │ │ │ +000483d0: 3c63 6f64 653e 6473 743c 2f63 6f64 653e dst │ │ │ +000483e0: 202d 2044 6573 7469 6e61 7469 6f6e 2069 - Destination i │ │ │ +000483f0: 6d61 6765 206f 6620 7468 6520 7361 6d65 mage of the same │ │ │ +00048400: 2073 697a 6520 616e 6420 7479 7065 2061 size and type a │ │ │ +00048410: 7320 7372 632e 3c2f 6464 3e0a 3c64 643e s src.
    .
    │ │ │ +00048420: 3c63 6f64 653e 643c 2f63 6f64 653e 202d d - │ │ │ +00048430: 2044 6961 6d65 7465 7220 6f66 2065 6163 Diameter of eac │ │ │ +00048440: 6820 7069 7865 6c20 6e65 6967 6862 6f72 h pixel neighbor │ │ │ +00048450: 686f 6f64 2074 6861 7420 6973 2075 7365 hood that is use │ │ │ +00048460: 6420 6475 7269 6e67 2066 696c 7465 7269 d during filteri │ │ │ +00048470: 6e67 2e20 4d75 7374 2062 6520 6772 6561 ng. Must be grea │ │ │ +00048480: 7465 7220 6f72 2065 7175 616c 2033 2e3c ter or equal 3.< │ │ │ +00048490: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e74 /dd>.
    t │ │ │ +000484a0: 6872 6573 686f 6c64 3c2f 636f 6465 3e20 hreshold │ │ │ +000484b0: 2d20 5468 7265 7368 6f6c 642c 2077 6869 - Threshold, whi │ │ │ +000484c0: 6368 2064 6973 7469 6e67 7569 7368 6573 ch distinguishes │ │ │ +000484d0: 2062 6574 7765 656e 206e 6f69 7365 2c20 between noise, │ │ │ +000484e0: 6f75 746c 6965 7273 2c20 616e 6420 6461 outliers, and da │ │ │ +000484f0: 7461 2e3c 2f64 643e 0a3c 2f64 6c3e 0a3c ta.
    .
    .< │ │ │ +00048500: 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 3e0a /section>.
  • . │ │ │ +00048510: 3c6c 693e 0a3c 7365 6374 696f 6e20 636c
  • .
    . │ │ │ +00048570: 3c68 333e 5065 694c 696e 4e6f 726d 616c

    PeiLinNormal │ │ │ +00048580: 697a 6174 696f 6e3c 2f68 333e 0a3c 6469 ization

    .public static │ │ │ +000485d0: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  void PeiLinNormali │ │ │ +00048630: 7a61 7469 6f6e 3c2f 7370 616e 3e3c 7762 zation(Mat& │ │ │ +000486a0: 6e62 7370 3b49 2c0a 203c 6120 6872 6566 nbsp;I,. Mat&nbs │ │ │ +000486f0: 703b 5429 3c2f 7370 616e 3e3c 2f64 6976 p;T)
  • ...
  • .
    .

    cre │ │ │ +00048770: 6174 6553 7570 6572 7069 7865 6c4c 5343 ateSuperpixelLSC │ │ │ +00048780: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ +000487c0: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ +000487d0: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ +000487f0: 3c61 2068 7265 663d 2253 7570 6572 7069 SuperpixelLSC< │ │ │ +00048840: 2f61 3e3c 2f73 7061 6e3e 266e 6273 703b /a>  │ │ │ +00048850: 3c73 7061 6e20 636c 6173 733d 2265 6c65 creat │ │ │ +00048870: 6553 7570 6572 7069 7865 6c4c 5343 3c2f eSuperpixelLSC( │ │ │ +000488e0: 4d61 743c 2f61 3e26 6e62 7370 3b69 6d61 Mat ima │ │ │ +000488f0: 6765 2c0a 2069 6e74 266e 6273 703b 7265 ge,. int re │ │ │ +00048900: 6769 6f6e 5f73 697a 652c 0a20 666c 6f61 gion_size,. floa │ │ │ +00048910: 7426 6e62 7370 3b72 6174 696f 293c 2f73 t ratio)
    .
    Cl │ │ │ +00048940: 6173 7320 696d 706c 656d 656e 7469 6e67 ass implementing │ │ │ +00048950: 2074 6865 204c 5343 2028 4c69 6e65 6172 the LSC (Linear │ │ │ +00048960: 2053 7065 6374 7261 6c20 436c 7573 7465 Spectral Cluste │ │ │ +00048970: 7269 6e67 2920 7375 7065 7270 6978 656c ring) superpixel │ │ │ +00048980: 733c 2f64 6976 3e0a 3c64 6c20 636c 6173 s
    .
    .
    P │ │ │ +000489a0: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ +000489b0: 3c64 643e 3c63 6f64 653e 696d 6167 653c
    image< │ │ │ +000489c0: 2f63 6f64 653e 202d 2049 6d61 6765 2074 /code> - Image t │ │ │ +000489d0: 6f20 7365 676d 656e 743c 2f64 643e 0a3c o segment
    .< │ │ │ +000489e0: 6464 3e3c 636f 6465 3e72 6567 696f 6e5f dd>region_ │ │ │ +000489f0: 7369 7a65 3c2f 636f 6465 3e20 2d20 4368 size - Ch │ │ │ +00048a00: 6f6f 7365 7320 616e 2061 7665 7261 6765 ooses an average │ │ │ +00048a10: 2073 7570 6572 7069 7865 6c20 7369 7a65 superpixel size │ │ │ +00048a20: 206d 6561 7375 7265 6420 696e 2070 6978 measured in pix │ │ │ +00048a30: 656c 733c 2f64 643e 0a3c 6464 3e3c 636f els.
    ratio │ │ │ +00048a50: 2d20 4368 6f6f 7365 7320 7468 6520 656e - Chooses the en │ │ │ +00048a60: 666f 7263 656d 656e 7420 6f66 2073 7570 forcement of sup │ │ │ +00048a70: 6572 7069 7865 6c20 636f 6d70 6163 746e erpixel compactn │ │ │ +00048a80: 6573 7320 6661 6374 6f72 206f 6620 7375 ess factor of su │ │ │ +00048a90: 7065 7270 6978 656c 0a0a 2054 6865 2066 perpixel.. The f │ │ │ +00048aa0: 756e 6374 696f 6e20 696e 6974 6961 6c69 unction initiali │ │ │ +00048ab0: 7a65 7320 6120 5375 7065 7270 6978 656c zes a Superpixel │ │ │ +00048ac0: 4c53 4320 6f62 6a65 6374 2066 6f72 2074 LSC object for t │ │ │ +00048ad0: 6865 2069 6e70 7574 2069 6d61 6765 2e20 he input image. │ │ │ +00048ae0: 4974 2073 6574 7320 7468 6520 7061 7261 It sets the para │ │ │ +00048af0: 6d65 7465 7273 206f 660a 2073 7570 6572 meters of. super │ │ │ +00048b00: 7069 7865 6c20 616c 676f 7269 7468 6d2c pixel algorithm, │ │ │ +00048b10: 2077 6869 6368 2061 7265 3a20 7265 6769 which are: regi │ │ │ +00048b20: 6f6e 5f73 697a 6520 616e 6420 7275 6c65 on_size and rule │ │ │ +00048b30: 722e 2049 7420 7072 6561 6c6c 6f63 6174 r. It preallocat │ │ │ +00048b40: 6520 736f 6d65 2062 7566 6665 7273 2066 e some buffers f │ │ │ +00048b50: 6f72 2066 7574 7572 650a 2063 6f6d 7075 or future. compu │ │ │ +00048b60: 7469 6e67 2069 7465 7261 7469 6f6e 7320 ting iterations │ │ │ +00048b70: 6f76 6572 2074 6865 2067 6976 656e 2069 over the given i │ │ │ +00048b80: 6d61 6765 2e20 416e 2065 7861 6d70 6c65 mage. An example │ │ │ +00048b90: 206f 6620 4c53 4320 6973 2069 6c75 7374 of LSC is ilust │ │ │ +00048ba0: 7261 7465 6420 696e 2074 6865 2066 6f6c rated in the fol │ │ │ +00048bb0: 6c6f 7769 6e67 2070 6963 7475 7265 2e0a lowing picture.. │ │ │ +00048bc0: 2046 6f72 2065 6e61 6e63 6865 6420 7265 For enanched re │ │ │ +00048bd0: 7375 6c74 7320 6974 2069 7320 7265 636f sults it is reco │ │ │ +00048be0: 6d6d 656e 6465 6420 666f 7220 636f 6c6f mmended for colo │ │ │ +00048bf0: 7220 696d 6167 6573 2074 6f20 7072 6570 r images to prep │ │ │ +00048c00: 726f 6365 7373 2069 6d61 6765 2077 6974 rocess image wit │ │ │ +00048c10: 6820 6c69 7474 6c65 2067 6175 7373 6961 h little gaussia │ │ │ +00048c20: 6e20 626c 7572 0a20 7769 7468 2061 2073 n blur. with a s │ │ │ +00048c30: 6d61 6c6c 2033 2078 2033 206b 6572 6e65 mall 3 x 3 kerne │ │ │ +00048c40: 6c20 616e 6420 6164 6469 7469 6f6e 616c l and additional │ │ │ +00048c50: 2063 6f6e 7665 7273 696f 6e20 696e 746f conversion into │ │ │ +00048c60: 2043 6965 4c41 4220 636f 6c6f 7220 7370 CieLAB color sp │ │ │ +00048c70: 6163 652e 0a0a 2021 5b69 6d61 6765 5d28 ace... ![image]( │ │ │ +00048c80: 7069 6373 2f73 7570 6572 7069 7865 6c73 pics/superpixels │ │ │ +00048c90: 5f6c 7363 2e70 6e67 293c 2f64 643e 0a3c _lsc.png)
    .< │ │ │ +00048ca0: 6474 3e52 6574 7572 6e73 3a3c 2f64 743e dt>Returns: │ │ │ +00048cb0: 0a3c 6464 3e61 7574 6f6d 6174 6963 616c .
    automatical │ │ │ +00048cc0: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
    .
    ..
  • .
  • ..

    cre │ │ │ +00048d40: 6174 6553 7570 6572 7069 7865 6c4c 5343 ateSuperpixelLSC │ │ │ +00048d50: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ +00048d90: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ +00048da0: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ +00048dc0: 3c61 2068 7265 663d 2253 7570 6572 7069 SuperpixelLSC< │ │ │ +00048e10: 2f61 3e3c 2f73 7061 6e3e 266e 6273 703b /a>  │ │ │ +00048e20: 3c73 7061 6e20 636c 6173 733d 2265 6c65 creat │ │ │ +00048e40: 6553 7570 6572 7069 7865 6c4c 5343 3c2f eSuperpixelLSC( │ │ │ +00048eb0: 4d61 743c 2f61 3e26 6e62 7370 3b69 6d61 Mat ima │ │ │ +00048ec0: 6765 2c0a 2069 6e74 266e 6273 703b 7265 ge,. int re │ │ │ +00048ed0: 6769 6f6e 5f73 697a 6529 3c2f 7370 616e gion_size)
    .
    Class │ │ │ +00048f00: 2069 6d70 6c65 6d65 6e74 696e 6720 7468 implementing th │ │ │ +00048f10: 6520 4c53 4320 284c 696e 6561 7220 5370 e LSC (Linear Sp │ │ │ +00048f20: 6563 7472 616c 2043 6c75 7374 6572 696e ectral Clusterin │ │ │ +00048f30: 6729 2073 7570 6572 7069 7865 6c73 3c2f g) superpixels.
    .
    Para │ │ │ +00048f60: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    image - Image to s │ │ │ +00048f90: 6567 6d65 6e74 3c2f 6464 3e0a 3c64 643e egment
    .
    │ │ │ +00048fa0: 3c63 6f64 653e 7265 6769 6f6e 5f73 697a region_siz │ │ │ +00048fb0: 653c 2f63 6f64 653e 202d 2043 686f 6f73 e - Choos │ │ │ +00048fc0: 6573 2061 6e20 6176 6572 6167 6520 7375 es an average su │ │ │ +00048fd0: 7065 7270 6978 656c 2073 697a 6520 6d65 perpixel size me │ │ │ +00048fe0: 6173 7572 6564 2069 6e20 7069 7865 6c73 asured in pixels │ │ │ +00048ff0: 0a0a 2054 6865 2066 756e 6374 696f 6e20 .. The function │ │ │ +00049000: 696e 6974 6961 6c69 7a65 7320 6120 5375 initializes a Su │ │ │ +00049010: 7065 7270 6978 656c 4c53 4320 6f62 6a65 perpixelLSC obje │ │ │ +00049020: 6374 2066 6f72 2074 6865 2069 6e70 7574 ct for the input │ │ │ +00049030: 2069 6d61 6765 2e20 4974 2073 6574 7320 image. It sets │ │ │ +00049040: 7468 6520 7061 7261 6d65 7465 7273 206f the parameters o │ │ │ +00049050: 660a 2073 7570 6572 7069 7865 6c20 616c f. superpixel al │ │ │ +00049060: 676f 7269 7468 6d2c 2077 6869 6368 2061 gorithm, which a │ │ │ +00049070: 7265 3a20 7265 6769 6f6e 5f73 697a 6520 re: region_size │ │ │ +00049080: 616e 6420 7275 6c65 722e 2049 7420 7072 and ruler. It pr │ │ │ +00049090: 6561 6c6c 6f63 6174 6520 736f 6d65 2062 eallocate some b │ │ │ +000490a0: 7566 6665 7273 2066 6f72 2066 7574 7572 uffers for futur │ │ │ +000490b0: 650a 2063 6f6d 7075 7469 6e67 2069 7465 e. computing ite │ │ │ +000490c0: 7261 7469 6f6e 7320 6f76 6572 2074 6865 rations over the │ │ │ +000490d0: 2067 6976 656e 2069 6d61 6765 2e20 416e given image. An │ │ │ +000490e0: 2065 7861 6d70 6c65 206f 6620 4c53 4320 example of LSC │ │ │ +000490f0: 6973 2069 6c75 7374 7261 7465 6420 696e is ilustrated in │ │ │ +00049100: 2074 6865 2066 6f6c 6c6f 7769 6e67 2070 the following p │ │ │ +00049110: 6963 7475 7265 2e0a 2046 6f72 2065 6e61 icture.. For ena │ │ │ +00049120: 6e63 6865 6420 7265 7375 6c74 7320 6974 nched results it │ │ │ +00049130: 2069 7320 7265 636f 6d6d 656e 6465 6420 is recommended │ │ │ +00049140: 666f 7220 636f 6c6f 7220 696d 6167 6573 for color images │ │ │ +00049150: 2074 6f20 7072 6570 726f 6365 7373 2069 to preprocess i │ │ │ +00049160: 6d61 6765 2077 6974 6820 6c69 7474 6c65 mage with little │ │ │ +00049170: 2067 6175 7373 6961 6e20 626c 7572 0a20 gaussian blur. │ │ │ +00049180: 7769 7468 2061 2073 6d61 6c6c 2033 2078 with a small 3 x │ │ │ +00049190: 2033 206b 6572 6e65 6c20 616e 6420 6164 3 kernel and ad │ │ │ +000491a0: 6469 7469 6f6e 616c 2063 6f6e 7665 7273 ditional convers │ │ │ +000491b0: 696f 6e20 696e 746f 2043 6965 4c41 4220 ion into CieLAB │ │ │ +000491c0: 636f 6c6f 7220 7370 6163 652e 0a0a 2021 color space... ! │ │ │ +000491d0: 5b69 6d61 6765 5d28 7069 6373 2f73 7570 [image](pics/sup │ │ │ +000491e0: 6572 7069 7865 6c73 5f6c 7363 2e70 6e67 erpixels_lsc.png │ │ │ +000491f0: 293c 2f64 643e 0a3c 6474 3e52 6574 7572 )
    .
    Retur │ │ │ +00049200: 6e73 3a3c 2f64 743e 0a3c 6464 3e61 7574 ns:
    .
    aut │ │ │ +00049210: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ +00049220: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
    .
    . │ │ │ +00049230: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e .
  • │ │ │ +00049240: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .

    createSuperpixe │ │ │ +000492a0: 6c4c 5343 3c2f 6833 3e0a 3c64 6976 2063 lLSC

    .
    │ │ │ +000492e0: 7075 626c 6963 2073 7461 7469 633c 2f73 public static Superpixel │ │ │ +00049360: 4c53 433c 2f61 3e3c 2f73 7061 6e3e 266e LSC&n │ │ │ +00049370: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;c │ │ │ +00049390: 7265 6174 6553 7570 6572 7069 7865 6c4c reateSuperpixelL │ │ │ +000493a0: 5343 3c2f 7370 616e 3e3c 7762 723e 3c73 SC(Mat  │ │ │ +00049410: 3b69 6d61 6765 293c 2f73 7061 6e3e 3c2f ;image).
    Class im │ │ │ +00049440: 706c 656d 656e 7469 6e67 2074 6865 204c plementing the L │ │ │ +00049450: 5343 2028 4c69 6e65 6172 2053 7065 6374 SC (Linear Spect │ │ │ +00049460: 7261 6c20 436c 7573 7465 7269 6e67 2920 ral Clustering) │ │ │ +00049470: 7375 7065 7270 6978 656c 733c 2f64 6976 superpixels
    .
    .
    Paramet │ │ │ +000494a0: 6572 733a 3c2f 6474 3e0a 3c64 643e 3c63 ers:
    .
    image │ │ │ +000494c0: 202d 2049 6d61 6765 2074 6f20 7365 676d - Image to segm │ │ │ +000494d0: 656e 740a 0a20 5468 6520 6675 6e63 7469 ent.. The functi │ │ │ +000494e0: 6f6e 2069 6e69 7469 616c 697a 6573 2061 on initializes a │ │ │ +000494f0: 2053 7570 6572 7069 7865 6c4c 5343 206f SuperpixelLSC o │ │ │ +00049500: 626a 6563 7420 666f 7220 7468 6520 696e bject for the in │ │ │ +00049510: 7075 7420 696d 6167 652e 2049 7420 7365 put image. It se │ │ │ +00049520: 7473 2074 6865 2070 6172 616d 6574 6572 ts the parameter │ │ │ +00049530: 7320 6f66 0a20 7375 7065 7270 6978 656c s of. superpixel │ │ │ +00049540: 2061 6c67 6f72 6974 686d 2c20 7768 6963 algorithm, whic │ │ │ +00049550: 6820 6172 653a 2072 6567 696f 6e5f 7369 h are: region_si │ │ │ +00049560: 7a65 2061 6e64 2072 756c 6572 2e20 4974 ze and ruler. It │ │ │ +00049570: 2070 7265 616c 6c6f 6361 7465 2073 6f6d preallocate som │ │ │ +00049580: 6520 6275 6666 6572 7320 666f 7220 6675 e buffers for fu │ │ │ +00049590: 7475 7265 0a20 636f 6d70 7574 696e 6720 ture. computing │ │ │ +000495a0: 6974 6572 6174 696f 6e73 206f 7665 7220 iterations over │ │ │ +000495b0: 7468 6520 6769 7665 6e20 696d 6167 652e the given image. │ │ │ +000495c0: 2041 6e20 6578 616d 706c 6520 6f66 204c An example of L │ │ │ +000495d0: 5343 2069 7320 696c 7573 7472 6174 6564 SC is ilustrated │ │ │ +000495e0: 2069 6e20 7468 6520 666f 6c6c 6f77 696e in the followin │ │ │ +000495f0: 6720 7069 6374 7572 652e 0a20 466f 7220 g picture.. For │ │ │ +00049600: 656e 616e 6368 6564 2072 6573 756c 7473 enanched results │ │ │ +00049610: 2069 7420 6973 2072 6563 6f6d 6d65 6e64 it is recommend │ │ │ +00049620: 6564 2066 6f72 2063 6f6c 6f72 2069 6d61 ed for color ima │ │ │ +00049630: 6765 7320 746f 2070 7265 7072 6f63 6573 ges to preproces │ │ │ +00049640: 7320 696d 6167 6520 7769 7468 206c 6974 s image with lit │ │ │ +00049650: 746c 6520 6761 7573 7369 616e 2062 6c75 tle gaussian blu │ │ │ +00049660: 720a 2077 6974 6820 6120 736d 616c 6c20 r. with a small │ │ │ +00049670: 3320 7820 3320 6b65 726e 656c 2061 6e64 3 x 3 kernel and │ │ │ +00049680: 2061 6464 6974 696f 6e61 6c20 636f 6e76 additional conv │ │ │ +00049690: 6572 7369 6f6e 2069 6e74 6f20 4369 654c ersion into CieL │ │ │ +000496a0: 4142 2063 6f6c 6f72 2073 7061 6365 2e0a AB color space.. │ │ │ +000496b0: 0a20 215b 696d 6167 655d 2870 6963 732f . ![image](pics/ │ │ │ +000496c0: 7375 7065 7270 6978 656c 735f 6c73 632e superpixels_lsc. │ │ │ +000496d0: 706e 6729 3c2f 6464 3e0a 3c64 743e 5265 png)
    .
    Re │ │ │ +000496e0: 7475 726e 733a 3c2f 6474 3e0a 3c64 643e turns:
    .
    │ │ │ +000496f0: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +00049700: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
    ..
    ..
  • ..

    c │ │ │ +00049760: 7265 6174 6545 6467 6544 7261 7769 6e67 reateEdgeDrawing │ │ │ +00049770: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ +000497b0: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ +000497c0: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ +000497e0: 3c61 2068 7265 663d 2245 6467 6544 7261 │ │ │ +00049820: 4564 6765 4472 6177 696e 673c 2f61 3e3c EdgeDrawing< │ │ │ +00049830: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> createEdg │ │ │ +00049860: 6544 7261 7769 6e67 3c2f 7370 616e 3e28 eDrawing( │ │ │ +00049870: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    Creat │ │ │ +00049890: 6573 2061 2073 6d61 7274 2070 6f69 6e74 es a smart point │ │ │ +000498a0: 6572 2074 6f20 6120 4564 6765 4472 6177 er to a EdgeDraw │ │ │ +000498b0: 696e 6720 6f62 6a65 6374 2061 6e64 2069 ing object and i │ │ │ +000498c0: 6e69 7469 616c 697a 6573 2069 743c 2f64 nitializes it.
    .
    Retur │ │ │ +000498f0: 6e73 3a3c 2f64 743e 0a3c 6464 3e61 7574 ns:
    .
    aut │ │ │ +00049900: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ +00049910: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
    .
    . │ │ │ +00049920: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e .
  • │ │ │ +00049930: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .

    fouri │ │ │ +000499a0: 6572 4465 7363 7269 7074 6f72 3c2f 6833 erDescriptor

    .
    │ │ │ +000499d0: 3c73 7061 6e20 636c 6173 733d 226d 6f64 public s │ │ │ +000499f0: 7461 7469 633c 2f73 7061 6e3e 266e 6273 tatic&nbs │ │ │ +00049a00: 703b 3c73 7061 6e20 636c 6173 733d 2272 p;void │ │ │ +00049a20: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  fourierD │ │ │ +00049a50: 6573 6372 6970 746f 723c 2f73 7061 6e3e escriptor │ │ │ +00049a60: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ +00049a80: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ +00049a90: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ +00049aa0: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +00049ab0: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat src,. Mat dst,. int │ │ │ +00049b20: 266e 6273 703b 6e62 456c 742c 0a20 696e  nbElt,. in │ │ │ +00049b30: 7426 6e62 7370 3b6e 6246 4429 3c2f 7370 t nbFD)
    .
    Fou │ │ │ +00049b60: 7269 6572 2064 6573 6372 6970 746f 7273 rier descriptors │ │ │ +00049b70: 2066 6f72 2070 6c61 6e65 6420 636c 6f73 for planed clos │ │ │ +00049b80: 6564 2063 7572 7665 730a 0a20 466f 7220 ed curves.. For │ │ │ +00049b90: 6d6f 7265 2064 6574 6169 6c73 2061 626f more details abo │ │ │ +00049ba0: 7574 2074 6869 7320 696d 706c 656d 656e ut this implemen │ │ │ +00049bb0: 7461 7469 6f6e 2c20 706c 6561 7365 2073 tation, please s │ │ │ +00049bc0: 6565 2043 4954 453a 2050 6572 736f 6f6e ee CITE: Persoon │ │ │ +00049bd0: 4675 3139 3737 3c2f 6469 763e 0a3c 646c Fu1977
    .
    . │ │ │ +00049bf0: 3c64 743e 5061 7261 6d65 7465 7273 3a3c
    Parameters:< │ │ │ +00049c00: 2f64 743e 0a3c 6464 3e3c 636f 6465 3e73 /dt>.
    s │ │ │ +00049c10: 7263 3c2f 636f 6465 3e20 2d20 6175 746f rc - auto │ │ │ +00049c20: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ +00049c30: 7465 643c 2f64 643e 0a3c 6464 3e3c 636f ted
    .
    dst - │ │ │ +00049c50: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +00049c60: 6e65 7261 7465 643c 2f64 643e 0a3c 6464 nerated
    .
    nbElt - automatica │ │ │ +00049c90: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    nbF │ │ │ +00049cb0: 443c 2f63 6f64 653e 202d 2061 7574 6f6d D - autom │ │ │ +00049cc0: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +00049cd0: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
    .
    ..
  • .< │ │ │ +00049cf0: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    │ │ │ +00049d50: 0a3c 6833 3e66 6f75 7269 6572 4465 7363 .

    fourierDesc │ │ │ +00049d60: 7269 7074 6f72 3c2f 6833 3e0a 3c64 6976 riptor

    .
    public static< │ │ │ +00049db0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> void fourierDescrip │ │ │ +00049e10: 746f 723c 2f73 7061 6e3e 3c77 6272 3e3c tor< │ │ │ +00049e20: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ +00049e30: 6d65 7465 7273 223e 283c 6120 6872 6566 meters">(Mat&nbs │ │ │ +00049e80: 703b 7372 632c 0a20 3c61 2068 7265 663d p;src,. Mat  │ │ │ +00049ed0: 3b64 7374 2c0a 2069 6e74 266e 6273 703b ;dst,. int  │ │ │ +00049ee0: 6e62 456c 7429 3c2f 7370 616e 3e3c 2f64 nbElt).
    Fourier d │ │ │ +00049f10: 6573 6372 6970 746f 7273 2066 6f72 2070 escriptors for p │ │ │ +00049f20: 6c61 6e65 6420 636c 6f73 6564 2063 7572 laned closed cur │ │ │ +00049f30: 7665 730a 0a20 466f 7220 6d6f 7265 2064 ves.. For more d │ │ │ +00049f40: 6574 6169 6c73 2061 626f 7574 2074 6869 etails about thi │ │ │ +00049f50: 7320 696d 706c 656d 656e 7461 7469 6f6e s implementation │ │ │ +00049f60: 2c20 706c 6561 7365 2073 6565 2043 4954 , please see CIT │ │ │ +00049f70: 453a 2050 6572 736f 6f6e 4675 3139 3737 E: PersoonFu1977 │ │ │ +00049f80: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ +00049fa0: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ +00049fb0: 6464 3e3c 636f 6465 3e73 7263 3c2f 636f dd>src - automatica │ │ │ +00049fd0: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    dst │ │ │ +00049ff0: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ +0004a000: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +0004a010: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d
    .
    nbElt - │ │ │ +0004a030: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +0004a040: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
    ..
    ..
  • ..

    fourierDes │ │ │ +0004a0d0: 6372 6970 746f 723c 2f68 333e 0a3c 6469 criptor

    .public static │ │ │ +0004a120: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  void fourierDescri │ │ │ +0004a180: 7074 6f72 3c2f 7370 616e 3e3c 7762 723e ptor │ │ │ +0004a190: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Mat&nb │ │ │ +0004a1f0: 7370 3b73 7263 2c0a 203c 6120 6872 6566 sp;src,. Mat&nbs │ │ │ +0004a240: 703b 6473 7429 3c2f 7370 616e 3e3c 2f64 p;dst).
    Fourier d │ │ │ +0004a270: 6573 6372 6970 746f 7273 2066 6f72 2070 escriptors for p │ │ │ +0004a280: 6c61 6e65 6420 636c 6f73 6564 2063 7572 laned closed cur │ │ │ +0004a290: 7665 730a 0a20 466f 7220 6d6f 7265 2064 ves.. For more d │ │ │ +0004a2a0: 6574 6169 6c73 2061 626f 7574 2074 6869 etails about thi │ │ │ +0004a2b0: 7320 696d 706c 656d 656e 7461 7469 6f6e s implementation │ │ │ +0004a2c0: 2c20 706c 6561 7365 2073 6565 2043 4954 , please see CIT │ │ │ +0004a2d0: 453a 2050 6572 736f 6f6e 4675 3139 3737 E: PersoonFu1977 │ │ │ +0004a2e0: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ +0004a300: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ +0004a310: 6464 3e3c 636f 6465 3e73 7263 3c2f 636f dd>src - automatica │ │ │ +0004a330: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    dst │ │ │ +0004a350: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ +0004a360: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +0004a370: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
    .
    .
    .
  • ..
    .

    transformF │ │ │ +0004a410: 443c 2f68 333e 0a3c 6469 7620 636c 6173 D

    .
    pub │ │ │ +0004a450: 6c69 6320 7374 6174 6963 3c2f 7370 616e lic static void&nbs │ │ │ +0004a490: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;tra │ │ │ +0004a4b0: 6e73 666f 726d 4644 3c2f 7370 616e 3e3c nsformFD< │ │ │ +0004a4c0: 7762 723e 3c73 7061 6e20 636c 6173 733d wbr>(Mat src,. Mat │ │ │ +0004a570: 266e 6273 703b 742c 0a20 3c61 2068 7265  t,. Mat&nb │ │ │ +0004a5c0: 7370 3b64 7374 2c0a 2062 6f6f 6c65 616e sp;dst,. boolean │ │ │ +0004a5d0: 266e 6273 703b 6664 436f 6e74 6f75 7229  fdContour) │ │ │ +0004a5e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .transform a con │ │ │ +0004a610: 746f 7572 3c2f 6469 763e 0a3c 646c 2063 tour
    .
    .Parameters:.
    src │ │ │ +0004a650: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ +0004a660: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +0004a670: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d
    .
    t - auto │ │ │ +0004a690: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ +0004a6a0: 7465 643c 2f64 643e 0a3c 6464 3e3c 636f ted
    .
    dst - │ │ │ +0004a6c0: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +0004a6d0: 6e65 7261 7465 643c 2f64 643e 0a3c 6464 nerated
    .
    fdContour │ │ │ +0004a6f0: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ +0004a700: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +0004a710: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
    .
    .
    .
  • ..
    .

    tr │ │ │ +0004a7a0: 616e 7366 6f72 6d46 443c 2f68 333e 0a3c ansformFD

    .< │ │ │ +0004a7b0: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ +0004a7c0: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ +0004a7f0: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ +0004a800: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ +0004a810: 726e 2d74 7970 6522 3e76 6f69 643c 2f73 rn-type">void
     transformFD │ │ │ +0004a850: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (Mat s │ │ │ +0004a8c0: 7263 2c0a 203c 6120 6872 6566 3d22 2e2e rc,. Mat t, │ │ │ +0004a910: 0a20 3c61 2068 7265 663d 222e 2e2f 636f . Ma │ │ │ +0004a950: 743c 2f61 3e26 6e62 7370 3b64 7374 293c t dst)< │ │ │ +0004a960: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>. │ │ │ +0004a980: 7472 616e 7366 6f72 6d20 6120 636f 6e74 transform a cont │ │ │ +0004a990: 6f75 723c 2f64 6976 3e0a 3c64 6c20 636c our.
    .
    Parameters:
    .
    src< │ │ │ +0004a9d0: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ +0004a9e0: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ +0004a9f0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0004aa00: 743c 2f63 6f64 653e 202d 2061 7574 6f6d t - autom │ │ │ +0004aa10: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +0004aa20: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
    .
    dst - a │ │ │ +0004aa40: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ +0004aa50: 6572 6174 6564 3c2f 6464 3e0a 3c2f 646c erated
    .
    .
    ..
  • .
    .

    contourSa │ │ │ +0004aae0: 6d70 6c69 6e67 3c2f 6833 3e0a 3c64 6976 mpling

    .
    public static< │ │ │ +0004ab30: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> void contourSamplin │ │ │ +0004ab90: 673c 2f73 7061 6e3e 3c77 6272 3e3c 7370 g(Mat  │ │ │ +0004ac00: 7372 632c 0a20 3c61 2068 7265 663d 222e src,. Mat o │ │ │ +0004ac50: 7574 2c0a 2069 6e74 266e 6273 703b 6e62 ut,. int nb │ │ │ +0004ac60: 456c 7429 3c2f 7370 616e 3e3c 2f64 6976 Elt)
    .
    Contour sam │ │ │ +0004ac90: 706c 696e 6720 2e3c 2f64 6976 3e0a 3c64 pling .
    . │ │ │ +0004acb0: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ +0004acc0: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0004acd0: 7372 633c 2f63 6f64 653e 202d 2061 7574 src - aut │ │ │ +0004ace0: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ +0004acf0: 6174 6564 3c2f 6464 3e0a 3c64 643e 3c63 ated
    .
    out - │ │ │ +0004ad10: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ +0004ad20: 656e 6572 6174 6564 3c2f 6464 3e0a 3c64 enerated
    .nbElt - automatic │ │ │ +0004ad50: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated...
  • .
  • . │ │ │ +0004ad80: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    │ │ │ +0004adc0: 6372 6561 7465 436f 6e74 6f75 7246 6974 createContourFit │ │ │ +0004add0: 7469 6e67 3c2f 6833 3e0a 3c64 6976 2063 ting

    .
    │ │ │ +0004ae10: 7075 626c 6963 2073 7461 7469 633c 2f73 public static ContourFi │ │ │ +0004ae90: 7474 696e 673c 2f61 3e3c 2f73 7061 6e3e tting │ │ │ +0004aea0: 266e 6273 703b 3c73 7061 6e20 636c 6173  createContourFi │ │ │ +0004aed0: 7474 696e 673c 2f73 7061 6e3e 3c77 6272 tting(int&n │ │ │ +0004af00: 6273 703b 6374 722c 0a20 696e 7426 6e62 bsp;ctr,. int&nb │ │ │ +0004af10: 7370 3b66 6429 3c2f 7370 616e 3e3c 2f64 sp;fd).
    create Co │ │ │ +0004af40: 6e74 6f75 7246 6974 7469 6e67 2061 6c67 ntourFitting alg │ │ │ +0004af50: 6f72 6974 686d 206f 626a 6563 743c 2f64 orithm object.
    .
    Param │ │ │ +0004af80: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ +0004af90: 3c63 6f64 653e 6374 723c 2f63 6f64 653e ctr │ │ │ +0004afa0: 202d 206e 756d 6265 7220 6f66 2046 6f75 - number of Fou │ │ │ +0004afb0: 7269 6572 2064 6573 6372 6970 746f 7273 rier descriptors │ │ │ +0004afc0: 2065 7175 616c 2074 6f20 6e75 6d62 6572 equal to number │ │ │ +0004afd0: 206f 6620 636f 6e74 6f75 7220 706f 696e of contour poin │ │ │ +0004afe0: 7473 2061 6674 6572 2072 6573 616d 706c ts after resampl │ │ │ +0004aff0: 696e 672e 3c2f 6464 3e0a 3c64 643e 3c63 ing.
    .
    fd - │ │ │ +0004b010: 436f 6e74 6f75 7220 6465 6669 6e69 6e67 Contour defining │ │ │ +0004b020: 2073 6563 6f6e 6420 7368 6170 6520 2854 second shape (T │ │ │ +0004b030: 6172 6765 7429 2e3c 2f64 643e 0a3c 6474 arget).
    .
    Returns:
    .< │ │ │ +0004b050: 6464 3e61 7574 6f6d 6174 6963 616c 6c79 dd>automatically │ │ │ +0004b060: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated. │ │ │ +0004b070: 3c2f 646c 3e0a 3c2f 7365 6374 696f 6e3e
    .
    │ │ │ +0004b080: 0a3c 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 .
  • .
  • ..

    createCo │ │ │ +0004b0d0: 6e74 6f75 7246 6974 7469 6e67 3c2f 6833 ntourFitting

    .
    │ │ │ +0004b100: 3c73 7061 6e20 636c 6173 733d 226d 6f64 public s │ │ │ +0004b120: 7461 7469 633c 2f73 7061 6e3e 266e 6273 tatic&nbs │ │ │ +0004b130: 703b 3c73 7061 6e20 636c 6173 733d 2272 p;C │ │ │ +0004b190: 6f6e 746f 7572 4669 7474 696e 673c 2f61 ontourFitting createC │ │ │ +0004b1d0: 6f6e 746f 7572 4669 7474 696e 673c 2f73 ontourFitting(int ctr) │ │ │ +0004b210: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .create ContourF │ │ │ +0004b240: 6974 7469 6e67 2061 6c67 6f72 6974 686d itting algorithm │ │ │ +0004b250: 206f 626a 6563 743c 2f64 6976 3e0a 3c64 object. │ │ │ +0004b270: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ +0004b280: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0004b290: 6374 723c 2f63 6f64 653e 202d 206e 756d ctr - num │ │ │ +0004b2a0: 6265 7220 6f66 2046 6f75 7269 6572 2064 ber of Fourier d │ │ │ +0004b2b0: 6573 6372 6970 746f 7273 2065 7175 616c escriptors equal │ │ │ +0004b2c0: 2074 6f20 6e75 6d62 6572 206f 6620 636f to number of co │ │ │ +0004b2d0: 6e74 6f75 7220 706f 696e 7473 2061 6674 ntour points aft │ │ │ +0004b2e0: 6572 2072 6573 616d 706c 696e 672e 3c2f er resampling..
    Returns: │ │ │ +0004b300: 3c2f 6474 3e0a 3c64 643e 6175 746f 6d61
    .
    automa │ │ │ +0004b310: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +0004b320: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
    ...
  • ..
    .

    crea │ │ │ +0004b380: 7465 436f 6e74 6f75 7246 6974 7469 6e67 teContourFitting │ │ │ +0004b390: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ +0004b3d0: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ +0004b3e0: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ +0004b400: 3c61 2068 7265 663d 2243 6f6e 746f 7572 ContourFittin │ │ │ +0004b450: 673c 2f61 3e3c 2f73 7061 6e3e 266e 6273 g&nbs │ │ │ +0004b460: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;cre │ │ │ +0004b480: 6174 6543 6f6e 746f 7572 4669 7474 696e ateContourFittin │ │ │ +0004b490: 673c 2f73 7061 6e3e 2829 3c2f 6469 763e g()
    │ │ │ +0004b4a0: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
    create Conto │ │ │ +0004b4c0: 7572 4669 7474 696e 6720 616c 676f 7269 urFitting algori │ │ │ +0004b4d0: 7468 6d20 6f62 6a65 6374 3c2f 6469 763e thm object
    │ │ │ +0004b4e0: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
    .
    Returns: │ │ │ +0004b500: 3c2f 6474 3e0a 3c64 643e 6175 746f 6d61
    .
    automa │ │ │ +0004b510: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +0004b520: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
    .
    ....
    .

    createFastLineD │ │ │ +0004b5b0: 6574 6563 746f 723c 2f68 333e 0a3c 6469 etector

    .public static │ │ │ +0004b600: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  Fast │ │ │ +0004b670: 4c69 6e65 4465 7465 6374 6f72 3c2f 613e LineDetector │ │ │ +0004b680: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  createFa │ │ │ +0004b6b0: 7374 4c69 6e65 4465 7465 6374 6f72 3c2f stLineDetector(int len │ │ │ +0004b6f0: 6774 685f 7468 7265 7368 6f6c 642c 0a20 gth_threshold,. │ │ │ +0004b700: 666c 6f61 7426 6e62 7370 3b64 6973 7461 float dista │ │ │ +0004b710: 6e63 655f 7468 7265 7368 6f6c 642c 0a20 nce_threshold,. │ │ │ +0004b720: 646f 7562 6c65 266e 6273 703b 6361 6e6e double cann │ │ │ +0004b730: 795f 7468 312c 0a20 646f 7562 6c65 266e y_th1,. double&n │ │ │ +0004b740: 6273 703b 6361 6e6e 795f 7468 322c 0a20 bsp;canny_th2,. │ │ │ +0004b750: 696e 7426 6e62 7370 3b63 616e 6e79 5f61 int canny_a │ │ │ +0004b760: 7065 7274 7572 655f 7369 7a65 2c0a 2062 perture_size,. b │ │ │ +0004b770: 6f6f 6c65 616e 266e 6273 703b 646f 5f6d oolean do_m │ │ │ +0004b780: 6572 6765 293c 2f73 7061 6e3e 3c2f 6469 erge).
    Creates a │ │ │ +0004b7b0: 736d 6172 7420 706f 696e 7465 7220 746f smart pointer to │ │ │ +0004b7c0: 2061 2046 6173 744c 696e 6544 6574 6563 a FastLineDetec │ │ │ +0004b7d0: 746f 7220 6f62 6a65 6374 2061 6e64 2069 tor object and i │ │ │ +0004b7e0: 6e69 7469 616c 697a 6573 2069 743c 2f64 nitializes it.
    .
    Param │ │ │ +0004b810: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ +0004b820: 3c63 6f64 653e 6c65 6e67 7468 5f74 6872 length_thr │ │ │ +0004b830: 6573 686f 6c64 3c2f 636f 6465 3e20 2d20 eshold - │ │ │ +0004b840: 5365 676d 656e 7420 7368 6f72 7465 7220 Segment shorter │ │ │ +0004b850: 7468 616e 2074 6869 7320 7769 6c6c 2062 than this will b │ │ │ +0004b860: 6520 6469 7363 6172 6465 643c 2f64 643e e discarded
    │ │ │ +0004b870: 0a3c 6464 3e3c 636f 6465 3e64 6973 7461 .
    dista │ │ │ +0004b880: 6e63 655f 7468 7265 7368 6f6c 643c 2f63 nce_threshold - A point p │ │ │ +0004b8a0: 6c61 6365 6420 6672 6f6d 2061 2068 7970 laced from a hyp │ │ │ +0004b8b0: 6f74 6865 7369 7320 6c69 6e65 0a20 2020 othesis line. │ │ │ +0004b8c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0004b8d0: 2020 2020 2020 2020 2073 6567 6d65 6e74 segment │ │ │ +0004b8e0: 2066 6172 7468 6572 2074 6861 6e20 7468 farther than th │ │ │ +0004b8f0: 6973 2077 696c 6c20 6265 2072 6567 6172 is will be regar │ │ │ +0004b900: 6465 6420 6173 2061 6e20 6f75 746c 6965 ded as an outlie │ │ │ +0004b910: 723c 2f64 643e 0a3c 6464 3e3c 636f 6465 r
    .
    canny_th1 - First thresh │ │ │ +0004b940: 6f6c 6420 666f 7220 6879 7374 6572 6573 old for hysteres │ │ │ +0004b950: 6973 2070 726f 6365 6475 7265 2069 6e20 is procedure in │ │ │ +0004b960: 4361 6e6e 7928 293c 2f64 643e 0a3c 6464 Canny()
    .
    canny_th2 │ │ │ +0004b980: 3c2f 636f 6465 3e20 2d20 5365 636f 6e64 - Second │ │ │ +0004b990: 2074 6872 6573 686f 6c64 2066 6f72 2068 threshold for h │ │ │ +0004b9a0: 7973 7465 7265 7369 7320 7072 6f63 6564 ysteresis proced │ │ │ +0004b9b0: 7572 6520 696e 2043 616e 6e79 2829 3c2f ure in Canny().
    ca │ │ │ +0004b9d0: 6e6e 795f 6170 6572 7475 7265 5f73 697a nny_aperture_siz │ │ │ +0004b9e0: 653c 2f63 6f64 653e 202d 2041 7065 7274 e - Apert │ │ │ +0004b9f0: 7572 6573 697a 6520 666f 7220 7468 6520 uresize for the │ │ │ +0004ba00: 736f 6265 6c20 6f70 6572 6174 6f72 2069 sobel operator i │ │ │ +0004ba10: 6e20 4361 6e6e 7928 292e 0a20 2020 2020 n Canny().. │ │ │ +0004ba20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0004ba30: 2020 2020 2020 2049 6620 7a65 726f 2c20 If zero, │ │ │ +0004ba40: 4361 6e6e 7928 2920 6973 206e 6f74 2061 Canny() is not a │ │ │ +0004ba50: 7070 6c69 6564 2061 6e64 2074 6865 2069 pplied and the i │ │ │ +0004ba60: 6e70 7574 2069 6d61 6765 2069 7320 7461 nput image is ta │ │ │ +0004ba70: 6b65 6e20 6173 2061 6e20 6564 6765 2069 ken as an edge i │ │ │ +0004ba80: 6d61 6765 2e3c 2f64 643e 0a3c 6464 3e3c mage.
    .
    < │ │ │ +0004ba90: 636f 6465 3e64 6f5f 6d65 7267 653c 2f63 code>do_merge - If true, │ │ │ +0004bab0: 696e 6372 656d 656e 7461 6c20 6d65 7267 incremental merg │ │ │ +0004bac0: 696e 6720 6f66 2073 6567 6d65 6e74 7320 ing of segments │ │ │ +0004bad0: 7769 6c6c 2062 6520 7065 7266 6f72 6d65 will be performe │ │ │ +0004bae0: 643c 2f64 643e 0a3c 6474 3e52 6574 7572 d
    .
    Retur │ │ │ +0004baf0: 6e73 3a3c 2f64 743e 0a3c 6464 3e61 7574 ns:
    .
    aut │ │ │ +0004bb00: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ +0004bb10: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
    .
    . │ │ │ +0004bb20: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e
    . │ │ │ +0004bb30: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .

    crea │ │ │ +0004bb90: 7465 4661 7374 4c69 6e65 4465 7465 6374 teFastLineDetect │ │ │ +0004bba0: 6f72 3c2f 6833 3e0a 3c64 6976 2063 6c61 or

    .
    pu │ │ │ +0004bbe0: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static FastLineD │ │ │ +0004bc60: 6574 6563 746f 723c 2f61 3e3c 2f73 7061 etector createFastLin │ │ │ +0004bca0: 6544 6574 6563 746f 723c 2f73 7061 6e3e eDetector │ │ │ +0004bcb0: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (i │ │ │ +0004bcd0: 6e74 266e 6273 703b 6c65 6e67 7468 5f74 nt length_t │ │ │ +0004bce0: 6872 6573 686f 6c64 2c0a 2066 6c6f 6174 hreshold,. float │ │ │ +0004bcf0: 266e 6273 703b 6469 7374 616e 6365 5f74  distance_t │ │ │ +0004bd00: 6872 6573 686f 6c64 2c0a 2064 6f75 626c hreshold,. doubl │ │ │ +0004bd10: 6526 6e62 7370 3b63 616e 6e79 5f74 6831 e canny_th1 │ │ │ +0004bd20: 2c0a 2064 6f75 626c 6526 6e62 7370 3b63 ,. double c │ │ │ +0004bd30: 616e 6e79 5f74 6832 2c0a 2069 6e74 266e anny_th2,. int&n │ │ │ +0004bd40: 6273 703b 6361 6e6e 795f 6170 6572 7475 bsp;canny_apertu │ │ │ +0004bd50: 7265 5f73 697a 6529 3c2f 7370 616e 3e3c re_size)< │ │ │ +0004bd60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Creates │ │ │ +0004bd80: 2061 2073 6d61 7274 2070 6f69 6e74 6572 a smart pointer │ │ │ +0004bd90: 2074 6f20 6120 4661 7374 4c69 6e65 4465 to a FastLineDe │ │ │ +0004bda0: 7465 6374 6f72 206f 626a 6563 7420 616e tector object an │ │ │ +0004bdb0: 6420 696e 6974 6961 6c69 7a65 7320 6974 d initializes it │ │ │ +0004bdc0: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ +0004bde0: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ +0004bdf0: 6464 3e3c 636f 6465 3e6c 656e 6774 685f dd>length_ │ │ │ +0004be00: 7468 7265 7368 6f6c 643c 2f63 6f64 653e threshold │ │ │ +0004be10: 202d 2053 6567 6d65 6e74 2073 686f 7274 - Segment short │ │ │ +0004be20: 6572 2074 6861 6e20 7468 6973 2077 696c er than this wil │ │ │ +0004be30: 6c20 6265 2064 6973 6361 7264 6564 3c2f l be discarded.
    di │ │ │ +0004be50: 7374 616e 6365 5f74 6872 6573 686f 6c64 stance_threshold │ │ │ +0004be60: 3c2f 636f 6465 3e20 2d20 4120 706f 696e - A poin │ │ │ +0004be70: 7420 706c 6163 6564 2066 726f 6d20 6120 t placed from a │ │ │ +0004be80: 6879 706f 7468 6573 6973 206c 696e 650a hypothesis line. │ │ │ +0004be90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0004bea0: 2020 2020 2020 2020 2020 2020 7365 676d segm │ │ │ +0004beb0: 656e 7420 6661 7274 6865 7220 7468 616e ent farther than │ │ │ +0004bec0: 2074 6869 7320 7769 6c6c 2062 6520 7265 this will be re │ │ │ +0004bed0: 6761 7264 6564 2061 7320 616e 206f 7574 garded as an out │ │ │ +0004bee0: 6c69 6572 3c2f 6464 3e0a 3c64 643e 3c63 lier
    .
    canny_th1 - First thr │ │ │ +0004bf10: 6573 686f 6c64 2066 6f72 2068 7973 7465 eshold for hyste │ │ │ +0004bf20: 7265 7369 7320 7072 6f63 6564 7572 6520 resis procedure │ │ │ +0004bf30: 696e 2043 616e 6e79 2829 3c2f 6464 3e0a in Canny()
    . │ │ │ +0004bf40: 3c64 643e 3c63 6f64 653e 6361 6e6e 795f
    canny_ │ │ │ +0004bf50: 7468 323c 2f63 6f64 653e 202d 2053 6563 th2 - Sec │ │ │ +0004bf60: 6f6e 6420 7468 7265 7368 6f6c 6420 666f ond threshold fo │ │ │ +0004bf70: 7220 6879 7374 6572 6573 6973 2070 726f r hysteresis pro │ │ │ +0004bf80: 6365 6475 7265 2069 6e20 4361 6e6e 7928 cedure in Canny( │ │ │ +0004bf90: 293c 2f64 643e 0a3c 6464 3e3c 636f 6465 )
    .
    canny_aperture_ │ │ │ +0004bfb0: 7369 7a65 3c2f 636f 6465 3e20 2d20 4170 size - Ap │ │ │ +0004bfc0: 6572 7475 7265 7369 7a65 2066 6f72 2074 erturesize for t │ │ │ +0004bfd0: 6865 2073 6f62 656c 206f 7065 7261 746f he sobel operato │ │ │ +0004bfe0: 7220 696e 2043 616e 6e79 2829 2e0a 2020 r in Canny().. │ │ │ +0004bff0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0004c000: 2020 2020 2020 2020 2020 4966 207a 6572 If zer │ │ │ +0004c010: 6f2c 2043 616e 6e79 2829 2069 7320 6e6f o, Canny() is no │ │ │ +0004c020: 7420 6170 706c 6965 6420 616e 6420 7468 t applied and th │ │ │ +0004c030: 6520 696e 7075 7420 696d 6167 6520 6973 e input image is │ │ │ +0004c040: 2074 616b 656e 2061 7320 616e 2065 6467 taken as an edg │ │ │ +0004c050: 6520 696d 6167 652e 3c2f 6464 3e0a 3c64 e image.
    .Returns:. │ │ │ +0004c070: 3c64 643e 6175 746f 6d61 7469 6361 6c6c
    automaticall │ │ │ +0004c080: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ +0004c090: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
    .
    .
  • .
  • ..

    c │ │ │ +0004c100: 7265 6174 6546 6173 744c 696e 6544 6574 reateFastLineDet │ │ │ +0004c110: 6563 746f 723c 2f68 333e 0a3c 6469 7620 ector

    .
    public static FastLi │ │ │ +0004c1d0: 6e65 4465 7465 6374 6f72 3c2f 613e 3c2f neDetector createFast │ │ │ +0004c210: 4c69 6e65 4465 7465 6374 6f72 3c2f 7370 LineDetector(int lengt │ │ │ +0004c250: 685f 7468 7265 7368 6f6c 642c 0a20 666c h_threshold,. fl │ │ │ +0004c260: 6f61 7426 6e62 7370 3b64 6973 7461 6e63 oat distanc │ │ │ +0004c270: 655f 7468 7265 7368 6f6c 642c 0a20 646f e_threshold,. do │ │ │ +0004c280: 7562 6c65 266e 6273 703b 6361 6e6e 795f uble canny_ │ │ │ +0004c290: 7468 312c 0a20 646f 7562 6c65 266e 6273 th1,. double&nbs │ │ │ +0004c2a0: 703b 6361 6e6e 795f 7468 3229 3c2f 7370 p;canny_th2)
    .
    Cre │ │ │ +0004c2d0: 6174 6573 2061 2073 6d61 7274 2070 6f69 ates a smart poi │ │ │ +0004c2e0: 6e74 6572 2074 6f20 6120 4661 7374 4c69 nter to a FastLi │ │ │ +0004c2f0: 6e65 4465 7465 6374 6f72 206f 626a 6563 neDetector objec │ │ │ +0004c300: 7420 616e 6420 696e 6974 6961 6c69 7a65 t and initialize │ │ │ +0004c310: 7320 6974 3c2f 6469 763e 0a3c 646c 2063 s it
    .
    .Parameters:.
    len │ │ │ +0004c350: 6774 685f 7468 7265 7368 6f6c 643c 2f63 gth_threshold - Segment s │ │ │ +0004c370: 686f 7274 6572 2074 6861 6e20 7468 6973 horter than this │ │ │ +0004c380: 2077 696c 6c20 6265 2064 6973 6361 7264 will be discard │ │ │ +0004c390: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
    .
    distance_thres │ │ │ +0004c3b0: 686f 6c64 3c2f 636f 6465 3e20 2d20 4120 hold - A │ │ │ +0004c3c0: 706f 696e 7420 706c 6163 6564 2066 726f point placed fro │ │ │ +0004c3d0: 6d20 6120 6879 706f 7468 6573 6973 206c m a hypothesis l │ │ │ +0004c3e0: 696e 650a 2020 2020 2020 2020 2020 2020 ine. │ │ │ +0004c3f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0004c400: 7365 676d 656e 7420 6661 7274 6865 7220 segment farther │ │ │ +0004c410: 7468 616e 2074 6869 7320 7769 6c6c 2062 than this will b │ │ │ +0004c420: 6520 7265 6761 7264 6564 2061 7320 616e e regarded as an │ │ │ +0004c430: 206f 7574 6c69 6572 3c2f 6464 3e0a 3c64 outlier
    .canny_th │ │ │ +0004c450: 313c 2f63 6f64 653e 202d 2046 6972 7374 1 - First │ │ │ +0004c460: 2074 6872 6573 686f 6c64 2066 6f72 2068 threshold for h │ │ │ +0004c470: 7973 7465 7265 7369 7320 7072 6f63 6564 ysteresis proced │ │ │ +0004c480: 7572 6520 696e 2043 616e 6e79 2829 3c2f ure in Canny().
    ca │ │ │ +0004c4a0: 6e6e 795f 7468 323c 2f63 6f64 653e 202d nny_th2 - │ │ │ +0004c4b0: 2053 6563 6f6e 6420 7468 7265 7368 6f6c Second threshol │ │ │ +0004c4c0: 6420 666f 7220 6879 7374 6572 6573 6973 d for hysteresis │ │ │ +0004c4d0: 2070 726f 6365 6475 7265 2069 6e20 4361 procedure in Ca │ │ │ +0004c4e0: 6e6e 7928 290a 2020 2020 2020 2020 2020 nny(). │ │ │ +0004c4f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0004c500: 2020 4966 207a 6572 6f2c 2043 616e 6e79 If zero, Canny │ │ │ +0004c510: 2829 2069 7320 6e6f 7420 6170 706c 6965 () is not applie │ │ │ +0004c520: 6420 616e 6420 7468 6520 696e 7075 7420 d and the input │ │ │ +0004c530: 696d 6167 6520 6973 2074 616b 656e 2061 image is taken a │ │ │ +0004c540: 7320 616e 2065 6467 6520 696d 6167 652e s an edge image. │ │ │ +0004c550: 3c2f 6464 3e0a 3c64 743e 5265 7475 726e
    .
    Return │ │ │ +0004c560: 733a 3c2f 6474 3e0a 3c64 643e 6175 746f s:
    .
    auto │ │ │ +0004c570: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ +0004c580: 7465 643c 2f64 643e 0a3c 2f64 6c3e 0a3c ted
    .
    .< │ │ │ +0004c590: 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 3e0a /section>.
  • . │ │ │ +0004c5a0: 3c6c 693e 0a3c 7365 6374 696f 6e20 636c
  • .
    .

    │ │ │ +0004c5f0: 6372 6561 7465 4661 7374 4c69 6e65 4465 createFastLineDe │ │ │ +0004c600: 7465 6374 6f72 3c2f 6833 3e0a 3c64 6976 tector

    .
    public static< │ │ │ +0004c650: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> FastL │ │ │ +0004c6c0: 696e 6544 6574 6563 746f 723c 2f61 3e3c ineDetector< │ │ │ +0004c6d0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> createFas │ │ │ +0004c700: 744c 696e 6544 6574 6563 746f 723c 2f73 tLineDetector(int leng │ │ │ +0004c740: 7468 5f74 6872 6573 686f 6c64 2c0a 2066 th_threshold,. f │ │ │ +0004c750: 6c6f 6174 266e 6273 703b 6469 7374 616e loat distan │ │ │ +0004c760: 6365 5f74 6872 6573 686f 6c64 2c0a 2064 ce_threshold,. d │ │ │ +0004c770: 6f75 626c 6526 6e62 7370 3b63 616e 6e79 ouble canny │ │ │ +0004c780: 5f74 6831 293c 2f73 7061 6e3e 3c2f 6469 _th1).
    Creates a │ │ │ +0004c7b0: 736d 6172 7420 706f 696e 7465 7220 746f smart pointer to │ │ │ +0004c7c0: 2061 2046 6173 744c 696e 6544 6574 6563 a FastLineDetec │ │ │ +0004c7d0: 746f 7220 6f62 6a65 6374 2061 6e64 2069 tor object and i │ │ │ +0004c7e0: 6e69 7469 616c 697a 6573 2069 743c 2f64 nitializes it.
    .
    Param │ │ │ +0004c810: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ +0004c820: 3c63 6f64 653e 6c65 6e67 7468 5f74 6872 length_thr │ │ │ +0004c830: 6573 686f 6c64 3c2f 636f 6465 3e20 2d20 eshold - │ │ │ +0004c840: 5365 676d 656e 7420 7368 6f72 7465 7220 Segment shorter │ │ │ +0004c850: 7468 616e 2074 6869 7320 7769 6c6c 2062 than this will b │ │ │ +0004c860: 6520 6469 7363 6172 6465 643c 2f64 643e e discarded
    │ │ │ +0004c870: 0a3c 6464 3e3c 636f 6465 3e64 6973 7461 .
    dista │ │ │ +0004c880: 6e63 655f 7468 7265 7368 6f6c 643c 2f63 nce_threshold - A point p │ │ │ +0004c8a0: 6c61 6365 6420 6672 6f6d 2061 2068 7970 laced from a hyp │ │ │ +0004c8b0: 6f74 6865 7369 7320 6c69 6e65 0a20 2020 othesis line. │ │ │ +0004c8c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0004c8d0: 2020 2020 2020 2020 2073 6567 6d65 6e74 segment │ │ │ +0004c8e0: 2066 6172 7468 6572 2074 6861 6e20 7468 farther than th │ │ │ +0004c8f0: 6973 2077 696c 6c20 6265 2072 6567 6172 is will be regar │ │ │ +0004c900: 6465 6420 6173 2061 6e20 6f75 746c 6965 ded as an outlie │ │ │ +0004c910: 723c 2f64 643e 0a3c 6464 3e3c 636f 6465 r
    .
    canny_th1 - First thresh │ │ │ +0004c940: 6f6c 6420 666f 7220 6879 7374 6572 6573 old for hysteres │ │ │ +0004c950: 6973 2070 726f 6365 6475 7265 2069 6e20 is procedure in │ │ │ +0004c960: 4361 6e6e 7928 290a 2020 2020 2020 2020 Canny(). │ │ │ +0004c970: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0004c980: 2020 2020 4966 207a 6572 6f2c 2043 616e If zero, Can │ │ │ +0004c990: 6e79 2829 2069 7320 6e6f 7420 6170 706c ny() is not appl │ │ │ +0004c9a0: 6965 6420 616e 6420 7468 6520 696e 7075 ied and the inpu │ │ │ +0004c9b0: 7420 696d 6167 6520 6973 2074 616b 656e t image is taken │ │ │ +0004c9c0: 2061 7320 616e 2065 6467 6520 696d 6167 as an edge imag │ │ │ +0004c9d0: 652e 3c2f 6464 3e0a 3c64 743e 5265 7475 e.
    .
    Retu │ │ │ +0004c9e0: 726e 733a 3c2f 6474 3e0a 3c64 643e 6175 rns:
    .
    au │ │ │ +0004c9f0: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ +0004ca00: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
    .
    │ │ │ +0004ca10: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .
    .
  • .
  • .
    .

    creat │ │ │ +0004ca70: 6546 6173 744c 696e 6544 6574 6563 746f eFastLineDetecto │ │ │ +0004ca80: 723c 2f68 333e 0a3c 6469 7620 636c 6173 r

    .
    pub │ │ │ +0004cac0: 6c69 6320 7374 6174 6963 3c2f 7370 616e lic static FastLineDe │ │ │ +0004cb40: 7465 6374 6f72 3c2f 613e 3c2f 7370 616e tector createFastLine │ │ │ +0004cb80: 4465 7465 6374 6f72 3c2f 7370 616e 3e3c Detector< │ │ │ +0004cb90: 7762 723e 3c73 7061 6e20 636c 6173 733d wbr>(in │ │ │ +0004cbb0: 7426 6e62 7370 3b6c 656e 6774 685f 7468 t length_th │ │ │ +0004cbc0: 7265 7368 6f6c 642c 0a20 666c 6f61 7426 reshold,. float& │ │ │ +0004cbd0: 6e62 7370 3b64 6973 7461 6e63 655f 7468 nbsp;distance_th │ │ │ +0004cbe0: 7265 7368 6f6c 6429 3c2f 7370 616e 3e3c reshold)< │ │ │ +0004cbf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Creates │ │ │ +0004cc10: 2061 2073 6d61 7274 2070 6f69 6e74 6572 a smart pointer │ │ │ +0004cc20: 2074 6f20 6120 4661 7374 4c69 6e65 4465 to a FastLineDe │ │ │ +0004cc30: 7465 6374 6f72 206f 626a 6563 7420 616e tector object an │ │ │ +0004cc40: 6420 696e 6974 6961 6c69 7a65 7320 6974 d initializes it │ │ │ +0004cc50: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ +0004cc70: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ +0004cc80: 6464 3e3c 636f 6465 3e6c 656e 6774 685f dd>length_ │ │ │ +0004cc90: 7468 7265 7368 6f6c 643c 2f63 6f64 653e threshold │ │ │ +0004cca0: 202d 2053 6567 6d65 6e74 2073 686f 7274 - Segment short │ │ │ +0004ccb0: 6572 2074 6861 6e20 7468 6973 2077 696c er than this wil │ │ │ +0004ccc0: 6c20 6265 2064 6973 6361 7264 6564 3c2f l be discarded.
    di │ │ │ +0004cce0: 7374 616e 6365 5f74 6872 6573 686f 6c64 stance_threshold │ │ │ +0004ccf0: 3c2f 636f 6465 3e20 2d20 4120 706f 696e - A poin │ │ │ +0004cd00: 7420 706c 6163 6564 2066 726f 6d20 6120 t placed from a │ │ │ +0004cd10: 6879 706f 7468 6573 6973 206c 696e 650a hypothesis line. │ │ │ +0004cd20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0004cd30: 2020 2020 2020 2020 2020 2020 7365 676d segm │ │ │ +0004cd40: 656e 7420 6661 7274 6865 7220 7468 616e ent farther than │ │ │ +0004cd50: 2074 6869 7320 7769 6c6c 2062 6520 7265 this will be re │ │ │ +0004cd60: 6761 7264 6564 2061 7320 616e 206f 7574 garded as an out │ │ │ +0004cd70: 6c69 6572 0a20 2020 2020 2020 2020 2020 lier. │ │ │ +0004cd80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0004cd90: 2049 6620 7a65 726f 2c20 4361 6e6e 7928 If zero, Canny( │ │ │ +0004cda0: 2920 6973 206e 6f74 2061 7070 6c69 6564 ) is not applied │ │ │ +0004cdb0: 2061 6e64 2074 6865 2069 6e70 7574 2069 and the input i │ │ │ +0004cdc0: 6d61 6765 2069 7320 7461 6b65 6e20 6173 mage is taken as │ │ │ +0004cdd0: 2061 6e20 6564 6765 2069 6d61 6765 2e3c an edge image.< │ │ │ +0004cde0: 2f64 643e 0a3c 6474 3e52 6574 7572 6e73 /dd>.
    Returns │ │ │ +0004cdf0: 3a3c 2f64 743e 0a3c 6464 3e61 7574 6f6d :
    .
    autom │ │ │ +0004ce00: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +0004ce10: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
    .
    ..
  • .< │ │ │ +0004ce30: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .createFastLine │ │ │ +0004ce80: 4465 7465 6374 6f72 3c2f 6833 3e0a 3c64 Detector.public stati │ │ │ +0004ced0: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c Fas │ │ │ +0004cf40: 744c 696e 6544 6574 6563 746f 723c 2f61 tLineDetector createF │ │ │ +0004cf80: 6173 744c 696e 6544 6574 6563 746f 723c astLineDetector< │ │ │ +0004cf90: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(int le │ │ │ +0004cfc0: 6e67 7468 5f74 6872 6573 686f 6c64 293c ngth_threshold)< │ │ │ +0004cfd0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>. │ │ │ +0004cff0: 4372 6561 7465 7320 6120 736d 6172 7420 Creates a smart │ │ │ +0004d000: 706f 696e 7465 7220 746f 2061 2046 6173 pointer to a Fas │ │ │ +0004d010: 744c 696e 6544 6574 6563 746f 7220 6f62 tLineDetector ob │ │ │ +0004d020: 6a65 6374 2061 6e64 2069 6e69 7469 616c ject and initial │ │ │ +0004d030: 697a 6573 2069 743c 2f64 6976 3e0a 3c64 izes it. │ │ │ +0004d050: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ +0004d060: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0004d070: 6c65 6e67 7468 5f74 6872 6573 686f 6c64 length_threshold │ │ │ +0004d080: 3c2f 636f 6465 3e20 2d20 5365 676d 656e - Segmen │ │ │ +0004d090: 7420 7368 6f72 7465 7220 7468 616e 2074 t shorter than t │ │ │ +0004d0a0: 6869 7320 7769 6c6c 2062 6520 6469 7363 his will be disc │ │ │ +0004d0b0: 6172 6465 640a 2020 2020 2020 2020 2020 arded. │ │ │ +0004d0c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0004d0d0: 2020 7365 676d 656e 7420 6661 7274 6865 segment farthe │ │ │ +0004d0e0: 7220 7468 616e 2074 6869 7320 7769 6c6c r than this will │ │ │ +0004d0f0: 2062 6520 7265 6761 7264 6564 2061 7320 be regarded as │ │ │ +0004d100: 616e 206f 7574 6c69 6572 0a20 2020 2020 an outlier. │ │ │ +0004d110: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0004d120: 2020 2020 2020 2049 6620 7a65 726f 2c20 If zero, │ │ │ +0004d130: 4361 6e6e 7928 2920 6973 206e 6f74 2061 Canny() is not a │ │ │ +0004d140: 7070 6c69 6564 2061 6e64 2074 6865 2069 pplied and the i │ │ │ +0004d150: 6e70 7574 2069 6d61 6765 2069 7320 7461 nput image is ta │ │ │ +0004d160: 6b65 6e20 6173 2061 6e20 6564 6765 2069 ken as an edge i │ │ │ +0004d170: 6d61 6765 2e3c 2f64 643e 0a3c 6474 3e52 mage.
    .
    R │ │ │ +0004d180: 6574 7572 6e73 3a3c 2f64 743e 0a3c 6464 eturns:
    .
    automatically g │ │ │ +0004d1a0: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ..
    .< │ │ │ +0004d1c0: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • . │ │ │ +0004d200: 0a3c 6833 3e63 7265 6174 6546 6173 744c .

    createFastL │ │ │ +0004d210: 696e 6544 6574 6563 746f 723c 2f68 333e ineDetector

    │ │ │ +0004d220: 0a3c 6469 7620 636c 6173 733d 226d 656d .
    < │ │ │ +0004d240: 7370 616e 2063 6c61 7373 3d22 6d6f 6469 span class="modi │ │ │ +0004d250: 6669 6572 7322 3e70 7562 6c69 6320 7374 fiers">public st │ │ │ +0004d260: 6174 6963 3c2f 7370 616e 3e26 6e62 7370 atic  │ │ │ +0004d270: 3b3c 7370 616e 2063 6c61 7373 3d22 7265 ; │ │ │ +0004d2d0: 4661 7374 4c69 6e65 4465 7465 6374 6f72 FastLineDetector │ │ │ +0004d2e0: 3c2f 613e 3c2f 7370 616e 3e26 6e62 7370   │ │ │ +0004d2f0: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;crea │ │ │ +0004d310: 7465 4661 7374 4c69 6e65 4465 7465 6374 teFastLineDetect │ │ │ +0004d320: 6f72 3c2f 7370 616e 3e28 293c 2f64 6976 or()
    .
    Creates a s │ │ │ +0004d350: 6d61 7274 2070 6f69 6e74 6572 2074 6f20 mart pointer to │ │ │ +0004d360: 6120 4661 7374 4c69 6e65 4465 7465 6374 a FastLineDetect │ │ │ +0004d370: 6f72 206f 626a 6563 7420 616e 6420 696e or object and in │ │ │ +0004d380: 6974 6961 6c69 7a65 7320 6974 0a0a 2020 itializes it.. │ │ │ +0004d390: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0004d3a0: 2020 2020 2020 2020 2020 7365 676d 656e segmen │ │ │ +0004d3b0: 7420 6661 7274 6865 7220 7468 616e 2074 t farther than t │ │ │ +0004d3c0: 6869 7320 7769 6c6c 2062 6520 7265 6761 his will be rega │ │ │ +0004d3d0: 7264 6564 2061 7320 616e 206f 7574 6c69 rded as an outli │ │ │ +0004d3e0: 6572 0a20 2020 2020 2020 2020 2020 2020 er. │ │ │ +0004d3f0: 2020 2020 2020 2020 2020 2020 2020 2049 I │ │ │ +0004d400: 6620 7a65 726f 2c20 4361 6e6e 7928 2920 f zero, Canny() │ │ │ +0004d410: 6973 206e 6f74 2061 7070 6c69 6564 2061 is not applied a │ │ │ +0004d420: 6e64 2074 6865 2069 6e70 7574 2069 6d61 nd the input ima │ │ │ +0004d430: 6765 2069 7320 7461 6b65 6e20 6173 2061 ge is taken as a │ │ │ +0004d440: 6e20 6564 6765 2069 6d61 6765 2e3c 2f64 n edge image..
    .
    Retur │ │ │ +0004d470: 6e73 3a3c 2f64 743e 0a3c 6464 3e61 7574 ns:
    .
    aut │ │ │ +0004d480: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ +0004d490: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
    .
    . │ │ │ +0004d4a0: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e
  • . │ │ │ +0004d4b0: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .createGraphSeg │ │ │ +0004d510: 6d65 6e74 6174 696f 6e3c 2f68 333e 0a3c mentation.< │ │ │ +0004d520: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ +0004d530: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ +0004d560: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ +0004d570: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ +0004d580: 726e 2d74 7970 6522 3e3c 6120 6872 6566 rn-type">G │ │ │ +0004d5d0: 7261 7068 5365 676d 656e 7461 7469 6f6e raphSegmentation │ │ │ +0004d5e0: 3c2f 613e 3c2f 7370 616e 3e26 6e62 7370   │ │ │ +0004d5f0: 3b3c 7370 616e 2063 6c61 7373 3d22 656c ;crea │ │ │ +0004d610: 7465 4772 6170 6853 6567 6d65 6e74 6174 teGraphSegmentat │ │ │ +0004d620: 696f 6e3c 2f73 7061 6e3e 3c77 6272 3e3c ion< │ │ │ +0004d630: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ +0004d640: 6d65 7465 7273 223e 2864 6f75 626c 6526 meters">(double& │ │ │ +0004d650: 6e62 7370 3b73 6967 6d61 2c0a 2066 6c6f nbsp;sigma,. flo │ │ │ +0004d660: 6174 266e 6273 703b 6b2c 0a20 696e 7426 at k,. int& │ │ │ +0004d670: 6e62 7370 3b6d 696e 5f73 697a 6529 3c2f nbsp;min_size).
    C │ │ │ +0004d6a0: 7265 6174 6573 2061 2067 7261 7068 2062 reates a graph b │ │ │ +0004d6b0: 6173 6564 2073 6567 6d65 6e74 6f72 3c2f ased segmentor.
    .
    Para │ │ │ +0004d6e0: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    sigma - The sigma │ │ │ +0004d710: 7061 7261 6d65 7465 722c 2075 7365 6420 parameter, used │ │ │ +0004d720: 746f 2073 6d6f 6f74 6820 696d 6167 653c to smooth image< │ │ │ +0004d730: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e6b /dd>.
    k │ │ │ +0004d740: 3c2f 636f 6465 3e20 2d20 5468 6520 6b20 - The k │ │ │ +0004d750: 7061 7261 6d65 7465 7220 6f66 2074 6865 parameter of the │ │ │ +0004d760: 2061 6c67 6f72 7974 686d 3c2f 6464 3e0a algorythm
    . │ │ │ +0004d770: 3c64 643e 3c63 6f64 653e 6d69 6e5f 7369
    min_si │ │ │ +0004d780: 7a65 3c2f 636f 6465 3e20 2d20 5468 6520 ze - The │ │ │ +0004d790: 6d69 6e69 6d75 6d20 7369 7a65 206f 6620 minimum size of │ │ │ +0004d7a0: 7365 676d 656e 7473 3c2f 6464 3e0a 3c64 segments
    .Returns:. │ │ │ +0004d7c0: 3c64 643e 6175 746f 6d61 7469 6361 6c6c
    automaticall │ │ │ +0004d7d0: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ +0004d7e0: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .
    .
    .
  • .
  • . │ │ │ +0004d840: 0a3c 6833 3e63 7265 6174 6547 7261 7068 .

    createGraph │ │ │ +0004d850: 5365 676d 656e 7461 7469 6f6e 3c2f 6833 Segmentation

    .
    │ │ │ +0004d880: 3c73 7061 6e20 636c 6173 733d 226d 6f64 public s │ │ │ +0004d8a0: 7461 7469 633c 2f73 7061 6e3e 266e 6273 tatic&nbs │ │ │ +0004d8b0: 703b 3c73 7061 6e20 636c 6173 733d 2272 p;GraphSegmentat │ │ │ +0004d920: 696f 6e3c 2f61 3e3c 2f73 7061 6e3e 266e ion&n │ │ │ +0004d930: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;c │ │ │ +0004d950: 7265 6174 6547 7261 7068 5365 676d 656e reateGraphSegmen │ │ │ +0004d960: 7461 7469 6f6e 3c2f 7370 616e 3e3c 7762 tation(doub │ │ │ +0004d990: 6c65 266e 6273 703b 7369 676d 612c 0a20 le sigma,. │ │ │ +0004d9a0: 666c 6f61 7426 6e62 7370 3b6b 293c 2f73 float k)
    .
    Cr │ │ │ +0004d9d0: 6561 7465 7320 6120 6772 6170 6820 6261 eates a graph ba │ │ │ +0004d9e0: 7365 6420 7365 676d 656e 746f 723c 2f64 sed segmentor.
    .
    Param │ │ │ +0004da10: 6574 6572 733a 3c2f 6474 3e0a 3c64 643e eters:
    .
    │ │ │ +0004da20: 3c63 6f64 653e 7369 676d 613c 2f63 6f64 sigma - The sigma p │ │ │ +0004da40: 6172 616d 6574 6572 2c20 7573 6564 2074 arameter, used t │ │ │ +0004da50: 6f20 736d 6f6f 7468 2069 6d61 6765 3c2f o smooth image.
    k< │ │ │ +0004da70: 2f63 6f64 653e 202d 2054 6865 206b 2070 /code> - The k p │ │ │ +0004da80: 6172 616d 6574 6572 206f 6620 7468 6520 arameter of the │ │ │ +0004da90: 616c 676f 7279 7468 6d3c 2f64 643e 0a3c algorythm
    .< │ │ │ +0004daa0: 6474 3e52 6574 7572 6e73 3a3c 2f64 743e dt>Returns: │ │ │ +0004dab0: 0a3c 6464 3e61 7574 6f6d 6174 6963 616c .
    automatical │ │ │ +0004dac0: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
    .
    ..
  • .
  • ..

    │ │ │ +0004db30: 6372 6561 7465 4772 6170 6853 6567 6d65 createGraphSegme │ │ │ +0004db40: 6e74 6174 696f 6e3c 2f68 333e 0a3c 6469 ntation

    .public static │ │ │ +0004db90: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  Gra │ │ │ +0004dc00: 7068 5365 676d 656e 7461 7469 6f6e 3c2f phSegmentation < │ │ │ +0004dc20: 7370 616e 2063 6c61 7373 3d22 656c 656d span class="elem │ │ │ +0004dc30: 656e 742d 6e61 6d65 223e 6372 6561 7465 ent-name">create │ │ │ +0004dc40: 4772 6170 6853 6567 6d65 6e74 6174 696f GraphSegmentatio │ │ │ +0004dc50: 6e3c 2f73 7061 6e3e 3c77 6272 3e3c 7370 n(double&nb │ │ │ +0004dc80: 7370 3b73 6967 6d61 293c 2f73 7061 6e3e sp;sigma) │ │ │ +0004dc90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173 .
    Create │ │ │ +0004dcb0: 7320 6120 6772 6170 6820 6261 7365 6420 s a graph based │ │ │ +0004dcc0: 7365 676d 656e 746f 723c 2f64 6976 3e0a segmentor
    . │ │ │ +0004dcd0: 3c64 6c20 636c 6173 733d 226e 6f74 6573
    .
    Parameter │ │ │ +0004dcf0: 733a 3c2f 6474 3e0a 3c64 643e 3c63 6f64 s:
    .
    sigma - │ │ │ +0004dd10: 2054 6865 2073 6967 6d61 2070 6172 616d The sigma param │ │ │ +0004dd20: 6574 6572 2c20 7573 6564 2074 6f20 736d eter, used to sm │ │ │ +0004dd30: 6f6f 7468 2069 6d61 6765 3c2f 6464 3e0a ooth image
    . │ │ │ +0004dd40: 3c64 743e 5265 7475 726e 733a 3c2f 6474
    Returns:
    .
    automatica │ │ │ +0004dd60: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    ..
  • .
  • .< │ │ │ +0004dd90: 7365 6374 696f 6e20 636c 6173 733d 2264 section class="d │ │ │ +0004dda0: 6574 6169 6c22 2069 643d 2263 7265 6174 etail" id="creat │ │ │ +0004ddb0: 6547 7261 7068 5365 676d 656e 7461 7469 eGraphSegmentati │ │ │ +0004ddc0: 6f6e 2829 223e 0a3c 6833 3e63 7265 6174 on()">.

    creat │ │ │ +0004ddd0: 6547 7261 7068 5365 676d 656e 7461 7469 eGraphSegmentati │ │ │ +0004dde0: 6f6e 3c2f 6833 3e0a 3c64 6976 2063 6c61 on

    .
    .
    C │ │ │ +0004df10: 7265 6174 6573 2061 2067 7261 7068 2062 reates a graph b │ │ │ +0004df20: 6173 6564 2073 6567 6d65 6e74 6f72 3c2f ased segmentor.
    .
    Retu │ │ │ +0004df50: 726e 733a 3c2f 6474 3e0a 3c64 643e 6175 rns:
    .
    au │ │ │ +0004df60: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ +0004df70: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
    .
    │ │ │ +0004df80: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 ..
  • .
  • .
    .

    create │ │ │ +0004dff0: 5365 6c65 6374 6976 6553 6561 7263 6853 SelectiveSearchS │ │ │ +0004e000: 6567 6d65 6e74 6174 696f 6e53 7472 6174 egmentationStrat │ │ │ +0004e010: 6567 7943 6f6c 6f72 3c2f 6833 3e0a 3c64 egyColor

    .public stati │ │ │ +0004e060: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c SelectiveSe │ │ │ +0004e0f0: 6172 6368 5365 676d 656e 7461 7469 6f6e archSegmentation │ │ │ +0004e100: 5374 7261 7465 6779 436f 6c6f 723c 2f61 StrategyColor createS │ │ │ +0004e140: 656c 6563 7469 7665 5365 6172 6368 5365 electiveSearchSe │ │ │ +0004e150: 676d 656e 7461 7469 6f6e 5374 7261 7465 gmentationStrate │ │ │ +0004e160: 6779 436f 6c6f 723c 2f73 7061 6e3e 2829 gyColor() │ │ │ +0004e170: 3c2f 6469 763e 0a3c 6469 7620 636c 6173 .
    Create │ │ │ +0004e190: 2061 206e 6577 2063 6f6c 6f72 2d62 6173 a new color-bas │ │ │ +0004e1a0: 6564 2073 7472 6174 6567 793c 2f64 6976 ed strategy
    .
    .
    Returns │ │ │ +0004e1d0: 3a3c 2f64 743e 0a3c 6464 3e61 7574 6f6d :
    .
    autom │ │ │ +0004e1e0: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +0004e1f0: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
    .
    ..
  • .< │ │ │ +0004e210: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    createSele │ │ │ +0004e270: 6374 6976 6553 6561 7263 6853 6567 6d65 ctiveSearchSegme │ │ │ +0004e280: 6e74 6174 696f 6e53 7472 6174 6567 7953 ntationStrategyS │ │ │ +0004e290: 697a 653c 2f68 333e 0a3c 6469 7620 636c ize

    .
    p │ │ │ +0004e2d0: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static S │ │ │ +0004e360: 656c 6563 7469 7665 5365 6172 6368 5365 electiveSearchSe │ │ │ +0004e370: 676d 656e 7461 7469 6f6e 5374 7261 7465 gmentationStrate │ │ │ +0004e380: 6779 5369 7a65 3c2f 613e 3c2f 7370 616e gySize createSelectiv │ │ │ +0004e3c0: 6553 6561 7263 6853 6567 6d65 6e74 6174 eSearchSegmentat │ │ │ +0004e3d0: 696f 6e53 7472 6174 6567 7953 697a 653c ionStrategySize< │ │ │ +0004e3e0: 2f73 7061 6e3e 2829 3c2f 6469 763e 0a3c /span>()
    .< │ │ │ +0004e3f0: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ +0004e400: 223e 4372 6561 7465 2061 206e 6577 2073 ">Create a new s │ │ │ +0004e410: 697a 652d 6261 7365 6420 7374 7261 7465 ize-based strate │ │ │ +0004e420: 6779 3c2f 6469 763e 0a3c 646c 2063 6c61 gy.
    .
    │ │ │ +0004e440: 5265 7475 726e 733a 3c2f 6474 3e0a 3c64 Returns:
    .automatically │ │ │ +0004e460: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated.< │ │ │ +0004e470: 2f64 6c3e 0a3c 2f73 6563 7469 6f6e 3e0a /dl>.
    . │ │ │ +0004e480: 3c2f 6c69 3e0a 3c6c 693e 0a3c 7365 6374 .
  • ..

    │ │ │ +0004e4e0: 6372 6561 7465 5365 6c65 6374 6976 6553 createSelectiveS │ │ │ +0004e4f0: 6561 7263 6853 6567 6d65 6e74 6174 696f earchSegmentatio │ │ │ +0004e500: 6e53 7472 6174 6567 7954 6578 7475 7265 nStrategyTexture │ │ │ +0004e510: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373

    .
    publ │ │ │ +0004e550: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ +0004e560: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ +0004e580: 3c61 2068 7265 663d 2253 656c 6563 7469 S │ │ │ +0004e5e0: 656c 6563 7469 7665 5365 6172 6368 5365 electiveSearchSe │ │ │ +0004e5f0: 676d 656e 7461 7469 6f6e 5374 7261 7465 gmentationStrate │ │ │ +0004e600: 6779 5465 7874 7572 653c 2f61 3e3c 2f73 gyTexture createSelec │ │ │ +0004e640: 7469 7665 5365 6172 6368 5365 676d 656e tiveSearchSegmen │ │ │ +0004e650: 7461 7469 6f6e 5374 7261 7465 6779 5465 tationStrategyTe │ │ │ +0004e660: 7874 7572 653c 2f73 7061 6e3e 2829 3c2f xture().
    Create a │ │ │ +0004e690: 206e 6577 2073 697a 652d 6261 7365 6420 new size-based │ │ │ +0004e6a0: 7374 7261 7465 6779 3c2f 6469 763e 0a3c strategy
    .< │ │ │ +0004e6b0: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ +0004e6c0: 3e0a 3c64 743e 5265 7475 726e 733a 3c2f >.
    Returns:.
    automati │ │ │ +0004e6e0: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +0004e6f0: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>...
  • .
  • │ │ │ +0004e710: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    .< │ │ │ +0004e760: 6833 3e63 7265 6174 6553 656c 6563 7469 h3>createSelecti │ │ │ +0004e770: 7665 5365 6172 6368 5365 676d 656e 7461 veSearchSegmenta │ │ │ +0004e780: 7469 6f6e 5374 7261 7465 6779 4669 6c6c tionStrategyFill │ │ │ +0004e790: 3c2f 6833 3e0a 3c64 6976 2063 6c61 7373 .
    publ │ │ │ +0004e7d0: 6963 2073 7461 7469 633c 2f73 7061 6e3e ic static │ │ │ +0004e7e0: 266e 6273 703b 3c73 7061 6e20 636c 6173   │ │ │ +0004e800: 3c61 2068 7265 663d 2253 656c 6563 7469 Sele │ │ │ +0004e860: 6374 6976 6553 6561 7263 6853 6567 6d65 ctiveSearchSegme │ │ │ +0004e870: 6e74 6174 696f 6e53 7472 6174 6567 7946 ntationStrategyF │ │ │ +0004e880: 696c 6c3c 2f61 3e3c 2f73 7061 6e3e 266e ill&n │ │ │ +0004e890: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;c │ │ │ +0004e8b0: 7265 6174 6553 656c 6563 7469 7665 5365 reateSelectiveSe │ │ │ +0004e8c0: 6172 6368 5365 676d 656e 7461 7469 6f6e archSegmentation │ │ │ +0004e8d0: 5374 7261 7465 6779 4669 6c6c 3c2f 7370 StrategyFill()
    .
    C │ │ │ +0004e900: 7265 6174 6520 6120 6e65 7720 6669 6c6c reate a new fill │ │ │ +0004e910: 2d62 6173 6564 2073 7472 6174 6567 793c -based strategy< │ │ │ +0004e920: 2f64 6976 3e0a 3c64 6c20 636c 6173 733d /div>.
    .
    Ret │ │ │ +0004e940: 7572 6e73 3a3c 2f64 743e 0a3c 6464 3e61 urns:
    .
    a │ │ │ +0004e950: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ +0004e960: 6572 6174 6564 3c2f 6464 3e0a 3c2f 646c erated
    .
    .
    ..
  • .
    .

    cr │ │ │ +0004e9e0: 6561 7465 5365 6c65 6374 6976 6553 6561 eateSelectiveSea │ │ │ +0004e9f0: 7263 6853 6567 6d65 6e74 6174 696f 6e53 rchSegmentationS │ │ │ +0004ea00: 7472 6174 6567 794d 756c 7469 706c 653c trategyMultiple< │ │ │ +0004ea10: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ +0004ea50: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ +0004ea60: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;< │ │ │ +0004ea80: 6120 6872 6566 3d22 5365 6c65 6374 6976 a href="Selectiv │ │ │ +0004ea90: 6553 6561 7263 6853 6567 6d65 6e74 6174 eSearchSegmentat │ │ │ +0004eaa0: 696f 6e53 7472 6174 6567 794d 756c 7469 ionStrategyMulti │ │ │ +0004eab0: 706c 652e 6874 6d6c 2220 7469 746c 653d ple.html" title= │ │ │ +0004eac0: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +0004ead0: 656e 6376 2e78 696d 6770 726f 6322 3e53 encv.ximgproc">S │ │ │ +0004eae0: 656c 6563 7469 7665 5365 6172 6368 5365 electiveSearchSe │ │ │ +0004eaf0: 676d 656e 7461 7469 6f6e 5374 7261 7465 gmentationStrate │ │ │ +0004eb00: 6779 4d75 6c74 6970 6c65 3c2f 613e 3c2f gyMultiple createSele │ │ │ +0004eb40: 6374 6976 6553 6561 7263 6853 6567 6d65 ctiveSearchSegme │ │ │ +0004eb50: 6e74 6174 696f 6e53 7472 6174 6567 794d ntationStrategyM │ │ │ +0004eb60: 756c 7469 706c 653c 2f73 7061 6e3e 2829 ultiple() │ │ │ +0004eb70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    Create │ │ │ +0004eb90: 2061 206e 6577 206d 756c 7469 706c 6520 a new multiple │ │ │ +0004eba0: 7374 7261 7465 6779 3c2f 6469 763e 0a3c strategy
    .< │ │ │ +0004ebb0: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ +0004ebc0: 3e0a 3c64 743e 5265 7475 726e 733a 3c2f >.
    Returns:.
    automati │ │ │ +0004ebe0: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +0004ebf0: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>...

  • .
  • │ │ │ +0004ec10: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    .

    cr │ │ │ +0004eca0: 6561 7465 5365 6c65 6374 6976 6553 6561 eateSelectiveSea │ │ │ +0004ecb0: 7263 6853 6567 6d65 6e74 6174 696f 6e53 rchSegmentationS │ │ │ +0004ecc0: 7472 6174 6567 794d 756c 7469 706c 653c trategyMultiple< │ │ │ +0004ecd0: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ +0004ed10: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ +0004ed20: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;< │ │ │ +0004ed40: 6120 6872 6566 3d22 5365 6c65 6374 6976 a href="Selectiv │ │ │ +0004ed50: 6553 6561 7263 6853 6567 6d65 6e74 6174 eSearchSegmentat │ │ │ +0004ed60: 696f 6e53 7472 6174 6567 794d 756c 7469 ionStrategyMulti │ │ │ +0004ed70: 706c 652e 6874 6d6c 2220 7469 746c 653d ple.html" title= │ │ │ +0004ed80: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +0004ed90: 656e 6376 2e78 696d 6770 726f 6322 3e53 encv.ximgproc">S │ │ │ +0004eda0: 656c 6563 7469 7665 5365 6172 6368 5365 electiveSearchSe │ │ │ +0004edb0: 676d 656e 7461 7469 6f6e 5374 7261 7465 gmentationStrate │ │ │ +0004edc0: 6779 4d75 6c74 6970 6c65 3c2f 613e 3c2f gyMultiple createSele │ │ │ +0004ee00: 6374 6976 6553 6561 7263 6853 6567 6d65 ctiveSearchSegme │ │ │ +0004ee10: 6e74 6174 696f 6e53 7472 6174 6567 794d ntationStrategyM │ │ │ +0004ee20: 756c 7469 706c 653c 2f73 7061 6e3e 3c77 ultiple(SelectiveSe │ │ │ +0004eeb0: 6172 6368 5365 676d 656e 7461 7469 6f6e archSegmentation │ │ │ +0004eec0: 5374 7261 7465 6779 3c2f 613e 266e 6273 Strategy&nbs │ │ │ +0004eed0: 703b 7331 293c 2f73 7061 6e3e 3c2f 6469 p;s1).
    Create a n │ │ │ +0004ef00: 6577 206d 756c 7469 706c 6520 7374 7261 ew multiple stra │ │ │ +0004ef10: 7465 6779 2061 6e64 2073 6574 206f 6e65 tegy and set one │ │ │ +0004ef20: 2073 7562 7472 6174 6567 793c 2f64 6976 subtrategy
    .
    .
    Paramet │ │ │ +0004ef50: 6572 733a 3c2f 6474 3e0a 3c64 643e 3c63 ers:
    .
    s1 - │ │ │ +0004ef70: 5468 6520 6669 7273 7420 7374 7261 7465 The first strate │ │ │ +0004ef80: 6779 3c2f 6464 3e0a 3c64 743e 5265 7475 gy
    .
    Retu │ │ │ +0004ef90: 726e 733a 3c2f 6474 3e0a 3c64 643e 6175 rns:
    .
    au │ │ │ +0004efa0: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ +0004efb0: 7261 7465 643c 2f64 643e 0a3c 2f64 6c3e rated
    .
    │ │ │ +0004efc0: 0a3c 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 .

    .
  • .
  • .
    .

    crea │ │ │ +0004f0a0: 7465 5365 6c65 6374 6976 6553 6561 7263 teSelectiveSearc │ │ │ +0004f0b0: 6853 6567 6d65 6e74 6174 696f 6e53 7472 hSegmentationStr │ │ │ +0004f0c0: 6174 6567 794d 756c 7469 706c 653c 2f68 ategyMultiple.
    public │ │ │ +0004f110: 7374 6174 6963 3c2f 7370 616e 3e26 6e62 static&nb │ │ │ +0004f120: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;Sel │ │ │ +0004f1a0: 6563 7469 7665 5365 6172 6368 5365 676d ectiveSearchSegm │ │ │ +0004f1b0: 656e 7461 7469 6f6e 5374 7261 7465 6779 entationStrategy │ │ │ +0004f1c0: 4d75 6c74 6970 6c65 3c2f 613e 3c2f 7370 Multiple createSelect │ │ │ +0004f200: 6976 6553 6561 7263 6853 6567 6d65 6e74 iveSearchSegment │ │ │ +0004f210: 6174 696f 6e53 7472 6174 6567 794d 756c ationStrategyMul │ │ │ +0004f220: 7469 706c 653c 2f73 7061 6e3e 3c77 6272 tiple(SelectiveSear │ │ │ +0004f2b0: 6368 5365 676d 656e 7461 7469 6f6e 5374 chSegmentationSt │ │ │ +0004f2c0: 7261 7465 6779 3c2f 613e 266e 6273 703b rategy  │ │ │ +0004f2d0: 7331 2c0a 203c 6120 6872 6566 3d22 5365 s1,. Sel │ │ │ +0004f330: 6563 7469 7665 5365 6172 6368 5365 676d ectiveSearchSegm │ │ │ +0004f340: 656e 7461 7469 6f6e 5374 7261 7465 6779 entationStrategy │ │ │ +0004f350: 3c2f 613e 266e 6273 703b 7332 293c 2f73  s2)
    .
    Cr │ │ │ +0004f380: 6561 7465 2061 206e 6577 206d 756c 7469 eate a new multi │ │ │ +0004f390: 706c 6520 7374 7261 7465 6779 2061 6e64 ple strategy and │ │ │ +0004f3a0: 2073 6574 2074 776f 2073 7562 7472 6174 set two subtrat │ │ │ +0004f3b0: 6567 6965 732c 2077 6974 6820 6571 7561 egies, with equa │ │ │ +0004f3c0: 6c20 7765 6967 6874 733c 2f64 6976 3e0a l weights
    . │ │ │ +0004f3d0: 3c64 6c20 636c 6173 733d 226e 6f74 6573
    .
    Parameter │ │ │ +0004f3f0: 733a 3c2f 6474 3e0a 3c64 643e 3c63 6f64 s:
    .
    s1 - Th │ │ │ +0004f410: 6520 6669 7273 7420 7374 7261 7465 6779 e first strategy │ │ │ +0004f420: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0004f430: 7332 3c2f 636f 6465 3e20 2d20 5468 6520 s2 - The │ │ │ +0004f440: 7365 636f 6e64 2073 7472 6174 6567 793c second strategy< │ │ │ +0004f450: 2f64 643e 0a3c 6474 3e52 6574 7572 6e73 /dd>.
    Returns │ │ │ +0004f460: 3a3c 2f64 743e 0a3c 6464 3e61 7574 6f6d :
    .
    autom │ │ │ +0004f470: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +0004f480: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
    .
    ..

  • .< │ │ │ +0004f4a0: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    createSelective │ │ │ +0004f5b0: 5365 6172 6368 5365 676d 656e 7461 7469 SearchSegmentati │ │ │ +0004f5c0: 6f6e 5374 7261 7465 6779 4d75 6c74 6970 onStrategyMultip │ │ │ +0004f5d0: 6c65 3c2f 6833 3e0a 3c64 6976 2063 6c61 le

    .
    pu │ │ │ +0004f610: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static SelectiveSearc │ │ │ +0004f6b0: 6853 6567 6d65 6e74 6174 696f 6e53 7472 hSegmentationStr │ │ │ +0004f6c0: 6174 6567 794d 756c 7469 706c 653c 2f61 ategyMultiple createS │ │ │ +0004f700: 656c 6563 7469 7665 5365 6172 6368 5365 electiveSearchSe │ │ │ +0004f710: 676d 656e 7461 7469 6f6e 5374 7261 7465 gmentationStrate │ │ │ +0004f720: 6779 4d75 6c74 6970 6c65 3c2f 7370 616e gyMultiple( │ │ │ +0004f750: 3c61 2068 7265 663d 2253 656c 6563 7469 Selectiv │ │ │ +0004f7b0: 6553 6561 7263 6853 6567 6d65 6e74 6174 eSearchSegmentat │ │ │ +0004f7c0: 696f 6e53 7472 6174 6567 793c 2f61 3e26 ionStrategy& │ │ │ +0004f7d0: 6e62 7370 3b73 312c 0a20 3c61 2068 7265 nbsp;s1,. SelectiveSearc │ │ │ +0004f840: 6853 6567 6d65 6e74 6174 696f 6e53 7472 hSegmentationStr │ │ │ +0004f850: 6174 6567 793c 2f61 3e26 6e62 7370 3b73 ategy s │ │ │ +0004f860: 322c 0a20 3c61 2068 7265 663d 2253 656c 2,. Sele │ │ │ +0004f8c0: 6374 6976 6553 6561 7263 6853 6567 6d65 ctiveSearchSegme │ │ │ +0004f8d0: 6e74 6174 696f 6e53 7472 6174 6567 793c ntationStrategy< │ │ │ +0004f8e0: 2f61 3e26 6e62 7370 3b73 3329 3c2f 7370 /a> s3)
    .
    Cre │ │ │ +0004f910: 6174 6520 6120 6e65 7720 6d75 6c74 6970 ate a new multip │ │ │ +0004f920: 6c65 2073 7472 6174 6567 7920 616e 6420 le strategy and │ │ │ +0004f930: 7365 7420 7468 7265 6520 7375 6274 7261 set three subtra │ │ │ +0004f940: 7465 6769 6573 2c20 7769 7468 2065 7175 tegies, with equ │ │ │ +0004f950: 616c 2077 6569 6768 7473 3c2f 6469 763e al weights
    │ │ │ +0004f960: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
    .
    Paramete │ │ │ +0004f980: 7273 3a3c 2f64 743e 0a3c 6464 3e3c 636f rs:
    .
    s1 - T │ │ │ +0004f9a0: 6865 2066 6972 7374 2073 7472 6174 6567 he first strateg │ │ │ +0004f9b0: 793c 2f64 643e 0a3c 6464 3e3c 636f 6465 y
    .
    s2 - The │ │ │ +0004f9d0: 2073 6563 6f6e 6420 7374 7261 7465 6779 second strategy │ │ │ +0004f9e0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +0004f9f0: 7333 3c2f 636f 6465 3e20 2d20 5468 6520 s3 - The │ │ │ +0004fa00: 7468 6972 6420 7374 7261 7465 6779 3c2f third strategy.
    Returns: │ │ │ +0004fa20: 3c2f 6474 3e0a 3c64 643e 6175 746f 6d61
    .
    automa │ │ │ +0004fa30: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +0004fa40: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
    .
    .
    ...
    .

    createSe │ │ │ +0004fba0: 6c65 6374 6976 6553 6561 7263 6853 6567 lectiveSearchSeg │ │ │ +0004fbb0: 6d65 6e74 6174 696f 6e53 7472 6174 6567 mentationStrateg │ │ │ +0004fbc0: 794d 756c 7469 706c 653c 2f68 333e 0a3c yMultiple

    .< │ │ │ +0004fbd0: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ +0004fbe0: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ +0004fc10: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ +0004fc20: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ +0004fc30: 726e 2d74 7970 6522 3e3c 6120 6872 6566 rn-type">
    Selecti │ │ │ +0004fca0: 7665 5365 6172 6368 5365 676d 656e 7461 veSearchSegmenta │ │ │ +0004fcb0: 7469 6f6e 5374 7261 7465 6779 4d75 6c74 tionStrategyMult │ │ │ +0004fcc0: 6970 6c65 3c2f 613e 3c2f 7370 616e 3e26 iple& │ │ │ +0004fcd0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ +0004fcf0: 6372 6561 7465 5365 6c65 6374 6976 6553 createSelectiveS │ │ │ +0004fd00: 6561 7263 6853 6567 6d65 6e74 6174 696f earchSegmentatio │ │ │ +0004fd10: 6e53 7472 6174 6567 794d 756c 7469 706c nStrategyMultipl │ │ │ +0004fd20: 653c 2f73 7061 6e3e 3c77 6272 3e3c 7370 e(S │ │ │ +0004fda0: 656c 6563 7469 7665 5365 6172 6368 5365 electiveSearchSe │ │ │ +0004fdb0: 676d 656e 7461 7469 6f6e 5374 7261 7465 gmentationStrate │ │ │ +0004fdc0: 6779 3c2f 613e 266e 6273 703b 7331 2c0a gy s1,. │ │ │ +0004fdd0: 203c 6120 6872 6566 3d22 5365 6c65 6374 Selecti │ │ │ +0004fe30: 7665 5365 6172 6368 5365 676d 656e 7461 veSearchSegmenta │ │ │ +0004fe40: 7469 6f6e 5374 7261 7465 6779 3c2f 613e tionStrategy │ │ │ +0004fe50: 266e 6273 703b 7332 2c0a 203c 6120 6872  s2,. SelectiveSear │ │ │ +0004fec0: 6368 5365 676d 656e 7461 7469 6f6e 5374 chSegmentationSt │ │ │ +0004fed0: 7261 7465 6779 3c2f 613e 266e 6273 703b rategy  │ │ │ +0004fee0: 7333 2c0a 203c 6120 6872 6566 3d22 5365 s3,. Sel │ │ │ +0004ff40: 6563 7469 7665 5365 6172 6368 5365 676d ectiveSearchSegm │ │ │ +0004ff50: 656e 7461 7469 6f6e 5374 7261 7465 6779 entationStrategy │ │ │ +0004ff60: 3c2f 613e 266e 6273 703b 7334 293c 2f73  s4).
    Cr │ │ │ +0004ff90: 6561 7465 2061 206e 6577 206d 756c 7469 eate a new multi │ │ │ +0004ffa0: 706c 6520 7374 7261 7465 6779 2061 6e64 ple strategy and │ │ │ +0004ffb0: 2073 6574 2066 6f75 7220 7375 6274 7261 set four subtra │ │ │ +0004ffc0: 7465 6769 6573 2c20 7769 7468 2065 7175 tegies, with equ │ │ │ +0004ffd0: 616c 2077 6569 6768 7473 3c2f 6469 763e al weights
    │ │ │ +0004ffe0: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
    .
    Paramete │ │ │ +00050000: 7273 3a3c 2f64 743e 0a3c 6464 3e3c 636f rs:
    .
    s1 - T │ │ │ +00050020: 6865 2066 6972 7374 2073 7472 6174 6567 he first strateg │ │ │ +00050030: 793c 2f64 643e 0a3c 6464 3e3c 636f 6465 y
    .
    s2 - The │ │ │ +00050050: 2073 6563 6f6e 6420 7374 7261 7465 6779 second strategy │ │ │ +00050060: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +00050070: 7333 3c2f 636f 6465 3e20 2d20 5468 6520 s3 - The │ │ │ +00050080: 7468 6972 6420 7374 7261 7465 6779 3c2f third strategy.
    s4 │ │ │ +000500a0: 3c2f 636f 6465 3e20 2d20 5468 6520 666f - The fo │ │ │ +000500b0: 7274 6820 7374 7261 7465 6779 3c2f 6464 rth strategy
    .
    Returns:.
    automati │ │ │ +000500e0: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +000500f0: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.
    ...
  • │ │ │ +00050110: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    .

    createSel │ │ │ +00050160: 6563 7469 7665 5365 6172 6368 5365 676d ectiveSearchSegm │ │ │ +00050170: 656e 7461 7469 6f6e 3c2f 6833 3e0a 3c64 entation

    .public stati │ │ │ +000501c0: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c Selectiv │ │ │ +00050240: 6553 6561 7263 6853 6567 6d65 6e74 6174 eSearchSegmentat │ │ │ +00050250: 696f 6e3c 2f61 3e3c 2f73 7061 6e3e 266e ion&n │ │ │ +00050260: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;c │ │ │ +00050280: 7265 6174 6553 656c 6563 7469 7665 5365 reateSelectiveSe │ │ │ +00050290: 6172 6368 5365 676d 656e 7461 7469 6f6e archSegmentation │ │ │ +000502a0: 3c2f 7370 616e 3e28 293c 2f64 6976 3e0a (). │ │ │ +000502b0: 3c64 6976 2063 6c61 7373 3d22 626c 6f63
    Create a new │ │ │ +000502d0: 5365 6c65 6374 6976 6553 6561 7263 6853 SelectiveSearchS │ │ │ +000502e0: 6567 6d65 6e74 6174 696f 6e20 636c 6173 egmentation clas │ │ │ +000502f0: 732e 3c2f 6469 763e 0a3c 646c 2063 6c61 s.
    .
    .
    │ │ │ +00050310: 5265 7475 726e 733a 3c2f 6474 3e0a 3c64 Returns:
    .automatically │ │ │ +00050330: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated.< │ │ │ +00050340: 2f64 6c3e 0a3c 2f73 6563 7469 6f6e 3e0a /dl>.
    . │ │ │ +00050350: 3c2f 6c69 3e0a 3c6c 693e 0a3c 7365 6374
  • .
  • ..

    createSc │ │ │ +000503b0: 616e 5365 676d 656e 743c 2f68 333e 0a3c anSegment

    .< │ │ │ +000503c0: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ +000503d0: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ +00050400: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ +00050410: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ +00050420: 726e 2d74 7970 6522 3e3c 6120 6872 6566 rn-type">ScanSeg │ │ │ +00050470: 6d65 6e74 3c2f 613e 3c2f 7370 616e 3e26 ment& │ │ │ +00050480: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp; │ │ │ +000504a0: 6372 6561 7465 5363 616e 5365 676d 656e createScanSegmen │ │ │ +000504b0: 743c 2f73 7061 6e3e 3c77 6272 3e3c 7370 t(int  │ │ │ +000504e0: 696d 6167 655f 7769 6474 682c 0a20 696e image_width,. in │ │ │ +000504f0: 7426 6e62 7370 3b69 6d61 6765 5f68 6569 t image_hei │ │ │ +00050500: 6768 742c 0a20 696e 7426 6e62 7370 3b6e ght,. int n │ │ │ +00050510: 756d 5f73 7570 6572 7069 7865 6c73 2c0a um_superpixels,. │ │ │ +00050520: 2069 6e74 266e 6273 703b 736c 6963 6573 int slices │ │ │ +00050530: 2c0a 2062 6f6f 6c65 616e 266e 6273 703b ,. boolean  │ │ │ +00050540: 6d65 7267 655f 736d 616c 6c29 3c2f 7370 merge_small).
    Ini │ │ │ +00050570: 7469 616c 697a 6573 2061 2053 6361 6e53 tializes a ScanS │ │ │ +00050580: 6567 6d65 6e74 206f 626a 6563 742e 0a0a egment object... │ │ │ +00050590: 2054 6865 2066 756e 6374 696f 6e20 696e The function in │ │ │ +000505a0: 6974 6961 6c69 7a65 7320 6120 5363 616e itializes a Scan │ │ │ +000505b0: 5365 676d 656e 7420 6f62 6a65 6374 2066 Segment object f │ │ │ +000505c0: 6f72 2074 6865 2069 6e70 7574 2069 6d61 or the input ima │ │ │ +000505d0: 6765 2e20 4974 2073 746f 7265 7320 7468 ge. It stores th │ │ │ +000505e0: 6520 7061 7261 6d65 7465 7273 206f 660a e parameters of. │ │ │ +000505f0: 2074 6865 2069 6d61 6765 3a20 696d 6167 the image: imag │ │ │ +00050600: 655f 7769 6474 6820 616e 6420 696d 6167 e_width and imag │ │ │ +00050610: 655f 6865 6967 6874 2e20 4974 2061 6c73 e_height. It als │ │ │ +00050620: 6f20 7365 7473 2074 6865 2070 6172 616d o sets the param │ │ │ +00050630: 6574 6572 7320 6f66 2074 6865 2046 2d44 eters of the F-D │ │ │ +00050640: 4253 4341 4e20 7375 7065 7270 6978 656c BSCAN superpixel │ │ │ +00050650: 0a20 616c 676f 7269 7468 6d2c 2077 6869 . algorithm, whi │ │ │ +00050660: 6368 2061 7265 3a20 6e75 6d5f 7375 7065 ch are: num_supe │ │ │ +00050670: 7270 6978 656c 732c 2074 6872 6561 6473 rpixels, threads │ │ │ +00050680: 2c20 616e 6420 6d65 7267 655f 736d 616c , and merge_smal │ │ │ +00050690: 6c2e 3c2f 6469 763e 0a3c 646c 2063 6c61 l.
    .
    .
    │ │ │ +000506b0: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
    │ │ │ +000506c0: 0a3c 6464 3e3c 636f 6465 3e69 6d61 6765 .
    image │ │ │ +000506d0: 5f77 6964 7468 3c2f 636f 6465 3e20 2d20 _width - │ │ │ +000506e0: 496d 6167 6520 7769 6474 682e 3c2f 6464 Image width.
    .
    imag │ │ │ +00050700: 655f 6865 6967 6874 3c2f 636f 6465 3e20 e_height │ │ │ +00050710: 2d20 496d 6167 6520 6865 6967 6874 2e3c - Image height.< │ │ │ +00050720: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e6e /dd>.
    n │ │ │ +00050730: 756d 5f73 7570 6572 7069 7865 6c73 3c2f um_superpixels - Desired │ │ │ +00050750: 6e75 6d62 6572 206f 6620 7375 7065 7270 number of superp │ │ │ +00050760: 6978 656c 732e 204e 6f74 6520 7468 6174 ixels. Note that │ │ │ +00050770: 2074 6865 2061 6374 7561 6c20 6e75 6d62 the actual numb │ │ │ +00050780: 6572 206d 6179 2062 6520 736d 616c 6c65 er may be smalle │ │ │ +00050790: 720a 2064 7565 2074 6f20 7265 7374 7269 r. due to restri │ │ │ +000507a0: 6374 696f 6e73 2028 6465 7065 6e64 696e ctions (dependin │ │ │ +000507b0: 6720 6f6e 2074 6865 2069 6d61 6765 2073 g on the image s │ │ │ +000507c0: 697a 6529 2e20 5573 6520 6765 744e 756d ize). Use getNum │ │ │ +000507d0: 6265 724f 6653 7570 6572 7069 7865 6c73 berOfSuperpixels │ │ │ +000507e0: 2829 2074 6f0a 2067 6574 2074 6865 2061 () to. get the a │ │ │ +000507f0: 6374 7561 6c20 6e75 6d62 6572 2e3c 2f64 ctual number..
    sli │ │ │ +00050810: 6365 733c 2f63 6f64 653e 202d 204e 756d ces - Num │ │ │ +00050820: 6265 7220 6f66 2070 726f 6365 7373 696e ber of processin │ │ │ +00050830: 6720 7468 7265 6164 7320 666f 7220 7061 g threads for pa │ │ │ +00050840: 7261 6c6c 656c 6973 6174 696f 6e2e 2053 rallelisation. S │ │ │ +00050850: 6574 7469 6e67 202d 3120 7573 6573 2074 etting -1 uses t │ │ │ +00050860: 6865 206d 6178 696d 756d 206e 756d 6265 he maximum numbe │ │ │ +00050870: 720a 206f 6620 7468 7265 6164 732e 2049 r. of threads. I │ │ │ +00050880: 6e20 7072 6163 7469 6365 2c20 666f 7572 n practice, four │ │ │ +00050890: 2074 6872 6561 6473 2069 7320 656e 6f75 threads is enou │ │ │ +000508a0: 6768 2066 6f72 2073 6d61 6c6c 6572 2069 gh for smaller i │ │ │ +000508b0: 6d61 6765 7320 616e 6420 6569 6768 7420 mages and eight │ │ │ +000508c0: 7468 7265 6164 7320 666f 7220 6c61 7267 threads for larg │ │ │ +000508d0: 6572 206f 6e65 732e 3c2f 6464 3e0a 3c64 er ones.
    .merge_sm │ │ │ +000508f0: 616c 6c3c 2f63 6f64 653e 202d 206d 6572 all - mer │ │ │ +00050900: 6765 2073 6d61 6c6c 2073 6567 6d65 6e74 ge small segment │ │ │ +00050910: 7320 746f 2067 6976 6520 7468 6520 6465 s to give the de │ │ │ +00050920: 7369 7265 6420 6e75 6d62 6572 206f 6620 sired number of │ │ │ +00050930: 7375 7065 7270 6978 656c 732e 2050 726f superpixels. Pro │ │ │ +00050940: 6365 7373 696e 6720 6973 0a20 6d75 6368 cessing is. much │ │ │ +00050950: 2066 6173 7465 7220 7769 7468 6f75 7420 faster without │ │ │ +00050960: 6d65 7267 696e 672c 2062 7574 206d 616e merging, but man │ │ │ +00050970: 7920 736d 616c 6c20 7365 676d 656e 7473 y small segments │ │ │ +00050980: 2077 696c 6c20 6265 206c 6566 7420 696e will be left in │ │ │ +00050990: 2074 6865 2069 6d61 6765 2e3c 2f64 643e the image. │ │ │ +000509a0: 0a3c 6474 3e52 6574 7572 6e73 3a3c 2f64 .
    Returns:.
    automatic │ │ │ +000509c0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    .
    .
  • .
  • . │ │ │ +000509f0: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    │ │ │ +00050a30: 0a3c 6833 3e63 7265 6174 6553 6361 6e53 .

    createScanS │ │ │ +00050a40: 6567 6d65 6e74 3c2f 6833 3e0a 3c64 6976 egment

    .
    public static< │ │ │ +00050a90: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> ScanSegmen │ │ │ +00050b00: 743c 2f61 3e3c 2f73 7061 6e3e 266e 6273 t&nbs │ │ │ +00050b10: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;cre │ │ │ +00050b30: 6174 6553 6361 6e53 6567 6d65 6e74 3c2f ateScanSegment(int ima │ │ │ +00050b70: 6765 5f77 6964 7468 2c0a 2069 6e74 266e ge_width,. int&n │ │ │ +00050b80: 6273 703b 696d 6167 655f 6865 6967 6874 bsp;image_height │ │ │ +00050b90: 2c0a 2069 6e74 266e 6273 703b 6e75 6d5f ,. int num_ │ │ │ +00050ba0: 7375 7065 7270 6978 656c 732c 0a20 696e superpixels,. in │ │ │ +00050bb0: 7426 6e62 7370 3b73 6c69 6365 7329 3c2f t slices)
    .
    I │ │ │ +00050be0: 6e69 7469 616c 697a 6573 2061 2053 6361 nitializes a Sca │ │ │ +00050bf0: 6e53 6567 6d65 6e74 206f 626a 6563 742e nSegment object. │ │ │ +00050c00: 0a0a 2054 6865 2066 756e 6374 696f 6e20 .. The function │ │ │ +00050c10: 696e 6974 6961 6c69 7a65 7320 6120 5363 initializes a Sc │ │ │ +00050c20: 616e 5365 676d 656e 7420 6f62 6a65 6374 anSegment object │ │ │ +00050c30: 2066 6f72 2074 6865 2069 6e70 7574 2069 for the input i │ │ │ +00050c40: 6d61 6765 2e20 4974 2073 746f 7265 7320 mage. It stores │ │ │ +00050c50: 7468 6520 7061 7261 6d65 7465 7273 206f the parameters o │ │ │ +00050c60: 660a 2074 6865 2069 6d61 6765 3a20 696d f. the image: im │ │ │ +00050c70: 6167 655f 7769 6474 6820 616e 6420 696d age_width and im │ │ │ +00050c80: 6167 655f 6865 6967 6874 2e20 4974 2061 age_height. It a │ │ │ +00050c90: 6c73 6f20 7365 7473 2074 6865 2070 6172 lso sets the par │ │ │ +00050ca0: 616d 6574 6572 7320 6f66 2074 6865 2046 ameters of the F │ │ │ +00050cb0: 2d44 4253 4341 4e20 7375 7065 7270 6978 -DBSCAN superpix │ │ │ +00050cc0: 656c 0a20 616c 676f 7269 7468 6d2c 2077 el. algorithm, w │ │ │ +00050cd0: 6869 6368 2061 7265 3a20 6e75 6d5f 7375 hich are: num_su │ │ │ +00050ce0: 7065 7270 6978 656c 732c 2074 6872 6561 perpixels, threa │ │ │ +00050cf0: 6473 2c20 616e 6420 6d65 7267 655f 736d ds, and merge_sm │ │ │ +00050d00: 616c 6c2e 3c2f 6469 763e 0a3c 646c 2063 all.
    .
    .Parameters:.
    ima │ │ │ +00050d40: 6765 5f77 6964 7468 3c2f 636f 6465 3e20 ge_width │ │ │ +00050d50: 2d20 496d 6167 6520 7769 6474 682e 3c2f - Image width..
    im │ │ │ +00050d70: 6167 655f 6865 6967 6874 3c2f 636f 6465 age_height - Image height │ │ │ +00050d90: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    num_superpixels │ │ │ +00050db0: 3c2f 636f 6465 3e20 2d20 4465 7369 7265 - Desire │ │ │ +00050dc0: 6420 6e75 6d62 6572 206f 6620 7375 7065 d number of supe │ │ │ +00050dd0: 7270 6978 656c 732e 204e 6f74 6520 7468 rpixels. Note th │ │ │ +00050de0: 6174 2074 6865 2061 6374 7561 6c20 6e75 at the actual nu │ │ │ +00050df0: 6d62 6572 206d 6179 2062 6520 736d 616c mber may be smal │ │ │ +00050e00: 6c65 720a 2064 7565 2074 6f20 7265 7374 ler. due to rest │ │ │ +00050e10: 7269 6374 696f 6e73 2028 6465 7065 6e64 rictions (depend │ │ │ +00050e20: 696e 6720 6f6e 2074 6865 2069 6d61 6765 ing on the image │ │ │ +00050e30: 2073 697a 6529 2e20 5573 6520 6765 744e size). Use getN │ │ │ +00050e40: 756d 6265 724f 6653 7570 6572 7069 7865 umberOfSuperpixe │ │ │ +00050e50: 6c73 2829 2074 6f0a 2067 6574 2074 6865 ls() to. get the │ │ │ +00050e60: 2061 6374 7561 6c20 6e75 6d62 6572 2e3c actual number.< │ │ │ +00050e70: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e73 /dd>.
    s │ │ │ +00050e80: 6c69 6365 733c 2f63 6f64 653e 202d 204e lices - N │ │ │ +00050e90: 756d 6265 7220 6f66 2070 726f 6365 7373 umber of process │ │ │ +00050ea0: 696e 6720 7468 7265 6164 7320 666f 7220 ing threads for │ │ │ +00050eb0: 7061 7261 6c6c 656c 6973 6174 696f 6e2e parallelisation. │ │ │ +00050ec0: 2053 6574 7469 6e67 202d 3120 7573 6573 Setting -1 uses │ │ │ +00050ed0: 2074 6865 206d 6178 696d 756d 206e 756d the maximum num │ │ │ +00050ee0: 6265 720a 206f 6620 7468 7265 6164 732e ber. of threads. │ │ │ +00050ef0: 2049 6e20 7072 6163 7469 6365 2c20 666f In practice, fo │ │ │ +00050f00: 7572 2074 6872 6561 6473 2069 7320 656e ur threads is en │ │ │ +00050f10: 6f75 6768 2066 6f72 2073 6d61 6c6c 6572 ough for smaller │ │ │ +00050f20: 2069 6d61 6765 7320 616e 6420 6569 6768 images and eigh │ │ │ +00050f30: 7420 7468 7265 6164 7320 666f 7220 6c61 t threads for la │ │ │ +00050f40: 7267 6572 206f 6e65 732e 0a20 6d75 6368 rger ones.. much │ │ │ +00050f50: 2066 6173 7465 7220 7769 7468 6f75 7420 faster without │ │ │ +00050f60: 6d65 7267 696e 672c 2062 7574 206d 616e merging, but man │ │ │ +00050f70: 7920 736d 616c 6c20 7365 676d 656e 7473 y small segments │ │ │ +00050f80: 2077 696c 6c20 6265 206c 6566 7420 696e will be left in │ │ │ +00050f90: 2074 6865 2069 6d61 6765 2e3c 2f64 643e the image.
    │ │ │ +00050fa0: 0a3c 6474 3e52 6574 7572 6e73 3a3c 2f64 .
    Returns:.
    automatic │ │ │ +00050fc0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    ..
  • .
  • . │ │ │ +00050ff0: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    createScanSegme │ │ │ +00051040: 6e74 3c2f 6833 3e0a 3c64 6976 2063 6c61 nt

    .
    pu │ │ │ +00051080: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static ScanSegment createS │ │ │ +00051130: 6361 6e53 6567 6d65 6e74 3c2f 7370 616e canSegment( │ │ │ +00051160: 696e 7426 6e62 7370 3b69 6d61 6765 5f77 int image_w │ │ │ +00051170: 6964 7468 2c0a 2069 6e74 266e 6273 703b idth,. int  │ │ │ +00051180: 696d 6167 655f 6865 6967 6874 2c0a 2069 image_height,. i │ │ │ +00051190: 6e74 266e 6273 703b 6e75 6d5f 7375 7065 nt num_supe │ │ │ +000511a0: 7270 6978 656c 7329 3c2f 7370 616e 3e3c rpixels)< │ │ │ +000511b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Initial │ │ │ +000511d0: 697a 6573 2061 2053 6361 6e53 6567 6d65 izes a ScanSegme │ │ │ +000511e0: 6e74 206f 626a 6563 742e 0a0a 2054 6865 nt object... The │ │ │ +000511f0: 2066 756e 6374 696f 6e20 696e 6974 6961 function initia │ │ │ +00051200: 6c69 7a65 7320 6120 5363 616e 5365 676d lizes a ScanSegm │ │ │ +00051210: 656e 7420 6f62 6a65 6374 2066 6f72 2074 ent object for t │ │ │ +00051220: 6865 2069 6e70 7574 2069 6d61 6765 2e20 he input image. │ │ │ +00051230: 4974 2073 746f 7265 7320 7468 6520 7061 It stores the pa │ │ │ +00051240: 7261 6d65 7465 7273 206f 660a 2074 6865 rameters of. the │ │ │ +00051250: 2069 6d61 6765 3a20 696d 6167 655f 7769 image: image_wi │ │ │ +00051260: 6474 6820 616e 6420 696d 6167 655f 6865 dth and image_he │ │ │ +00051270: 6967 6874 2e20 4974 2061 6c73 6f20 7365 ight. It also se │ │ │ +00051280: 7473 2074 6865 2070 6172 616d 6574 6572 ts the parameter │ │ │ +00051290: 7320 6f66 2074 6865 2046 2d44 4253 4341 s of the F-DBSCA │ │ │ +000512a0: 4e20 7375 7065 7270 6978 656c 0a20 616c N superpixel. al │ │ │ +000512b0: 676f 7269 7468 6d2c 2077 6869 6368 2061 gorithm, which a │ │ │ +000512c0: 7265 3a20 6e75 6d5f 7375 7065 7270 6978 re: num_superpix │ │ │ +000512d0: 656c 732c 2074 6872 6561 6473 2c20 616e els, threads, an │ │ │ +000512e0: 6420 6d65 7267 655f 736d 616c 6c2e 3c2f d merge_small..
    .
    Para │ │ │ +00051310: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    image_wid │ │ │ +00051330: 7468 3c2f 636f 6465 3e20 2d20 496d 6167 th - Imag │ │ │ +00051340: 6520 7769 6474 682e 3c2f 6464 3e0a 3c64 e width.
    .image_he │ │ │ +00051360: 6967 6874 3c2f 636f 6465 3e20 2d20 496d ight - Im │ │ │ +00051370: 6167 6520 6865 6967 6874 2e3c 2f64 643e age height. │ │ │ +00051380: 0a3c 6464 3e3c 636f 6465 3e6e 756d 5f73 .
    num_s │ │ │ +00051390: 7570 6572 7069 7865 6c73 3c2f 636f 6465 uperpixels - Desired numb │ │ │ +000513b0: 6572 206f 6620 7375 7065 7270 6978 656c er of superpixel │ │ │ +000513c0: 732e 204e 6f74 6520 7468 6174 2074 6865 s. Note that the │ │ │ +000513d0: 2061 6374 7561 6c20 6e75 6d62 6572 206d actual number m │ │ │ +000513e0: 6179 2062 6520 736d 616c 6c65 720a 2064 ay be smaller. d │ │ │ +000513f0: 7565 2074 6f20 7265 7374 7269 6374 696f ue to restrictio │ │ │ +00051400: 6e73 2028 6465 7065 6e64 696e 6720 6f6e ns (depending on │ │ │ +00051410: 2074 6865 2069 6d61 6765 2073 697a 6529 the image size) │ │ │ +00051420: 2e20 5573 6520 6765 744e 756d 6265 724f . Use getNumberO │ │ │ +00051430: 6653 7570 6572 7069 7865 6c73 2829 2074 fSuperpixels() t │ │ │ +00051440: 6f0a 2067 6574 2074 6865 2061 6374 7561 o. get the actua │ │ │ +00051450: 6c20 6e75 6d62 6572 2e0a 206f 6620 7468 l number.. of th │ │ │ +00051460: 7265 6164 732e 2049 6e20 7072 6163 7469 reads. In practi │ │ │ +00051470: 6365 2c20 666f 7572 2074 6872 6561 6473 ce, four threads │ │ │ +00051480: 2069 7320 656e 6f75 6768 2066 6f72 2073 is enough for s │ │ │ +00051490: 6d61 6c6c 6572 2069 6d61 6765 7320 616e maller images an │ │ │ +000514a0: 6420 6569 6768 7420 7468 7265 6164 7320 d eight threads │ │ │ +000514b0: 666f 7220 6c61 7267 6572 206f 6e65 732e for larger ones. │ │ │ +000514c0: 0a20 6d75 6368 2066 6173 7465 7220 7769 . much faster wi │ │ │ +000514d0: 7468 6f75 7420 6d65 7267 696e 672c 2062 thout merging, b │ │ │ +000514e0: 7574 206d 616e 7920 736d 616c 6c20 7365 ut many small se │ │ │ +000514f0: 676d 656e 7473 2077 696c 6c20 6265 206c gments will be l │ │ │ +00051500: 6566 7420 696e 2074 6865 2069 6d61 6765 eft in the image │ │ │ +00051510: 2e3c 2f64 643e 0a3c 6474 3e52 6574 7572 .
    .
    Retur │ │ │ +00051520: 6e73 3a3c 2f64 743e 0a3c 6464 3e61 7574 ns:
    .
    aut │ │ │ +00051530: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ +00051540: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
    .
    . │ │ │ +00051550: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e
    .
  • │ │ │ +00051560: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .

    │ │ │ +000515d0: 6669 6e64 456c 6c69 7073 6573 3c2f 6833 findEllipses

    .
    │ │ │ +00051600: 3c73 7061 6e20 636c 6173 733d 226d 6f64 public s │ │ │ +00051620: 7461 7469 633c 2f73 7061 6e3e 266e 6273 tatic&nbs │ │ │ +00051630: 703b 3c73 7061 6e20 636c 6173 733d 2272 p;void │ │ │ +00051650: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  findElli │ │ │ +00051680: 7073 6573 3c2f 7370 616e 3e3c 7762 723e pses │ │ │ +00051690: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Mat&nb │ │ │ +000516f0: 7370 3b69 6d61 6765 2c0a 203c 6120 6872 sp;image,. Mat&n │ │ │ +00051740: 6273 703b 656c 6c69 7073 6573 2c0a 2066 bsp;ellipses,. f │ │ │ +00051750: 6c6f 6174 266e 6273 703b 7363 6f72 6554 loat scoreT │ │ │ +00051760: 6872 6573 686f 6c64 2c0a 2066 6c6f 6174 hreshold,. float │ │ │ +00051770: 266e 6273 703b 7265 6c69 6162 696c 6974  reliabilit │ │ │ +00051780: 7954 6872 6573 686f 6c64 2c0a 2066 6c6f yThreshold,. flo │ │ │ +00051790: 6174 266e 6273 703b 6365 6e74 6572 4469 at centerDi │ │ │ +000517a0: 7374 616e 6365 5468 7265 7368 6f6c 6429 stanceThreshold) │ │ │ +000517b0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .Finds ellipses │ │ │ +000517e0: 6661 7374 6c79 2069 6e20 616e 2069 6d61 fastly in an ima │ │ │ +000517f0: 6765 2075 7369 6e67 2070 726f 6a65 6374 ge using project │ │ │ +00051800: 6976 6520 696e 7661 7269 616e 7420 7072 ive invariant pr │ │ │ +00051810: 756e 696e 672e 0a0a 2054 6865 2066 756e uning... The fun │ │ │ +00051820: 6374 696f 6e20 6465 7465 6374 7320 656c ction detects el │ │ │ +00051830: 6c69 7073 6573 2069 6e20 696d 6167 6573 lipses in images │ │ │ +00051840: 2075 7369 6e67 2070 726f 6a65 6374 6976 using projectiv │ │ │ +00051850: 6520 696e 7661 7269 616e 7420 7072 756e e invariant prun │ │ │ +00051860: 696e 672e 0a20 466f 7220 6d6f 7265 2064 ing.. For more d │ │ │ +00051870: 6574 6169 6c73 2061 626f 7574 2074 6869 etails about thi │ │ │ +00051880: 7320 696d 706c 656d 656e 7461 7469 6f6e s implementation │ │ │ +00051890: 2c20 706c 6561 7365 2073 6565 2043 4954 , please see CIT │ │ │ +000518a0: 453a 206a 6961 3230 3137 6661 7374 0a20 E: jia2017fast. │ │ │ +000518b0: 4a69 612c 2051 6920 6574 2061 6c2c 2028 Jia, Qi et al, ( │ │ │ +000518c0: 3230 3137 292e 0a20 4120 4661 7374 2045 2017).. A Fast E │ │ │ +000518d0: 6c6c 6970 7365 2044 6574 6563 746f 7220 llipse Detector │ │ │ +000518e0: 7573 696e 6720 5072 6f6a 6563 7469 7665 using Projective │ │ │ +000518f0: 2049 6e76 6172 6961 6e74 2050 7275 6e69 Invariant Pruni │ │ │ +00051900: 6e67 2e20 4945 4545 2054 7261 6e73 6163 ng. IEEE Transac │ │ │ +00051910: 7469 6f6e 7320 6f6e 2049 6d61 6765 2050 tions on Image P │ │ │ +00051920: 726f 6365 7373 696e 672e 3c2f 6469 763e rocessing. │ │ │ +00051930: 0a3c 646c 2063 6c61 7373 3d22 6e6f 7465 .
    .
    Paramete │ │ │ +00051950: 7273 3a3c 2f64 743e 0a3c 6464 3e3c 636f rs:
    .
    image │ │ │ +00051970: 2d20 696e 7075 7420 696d 6167 652c 2063 - input image, c │ │ │ +00051980: 6f75 6c64 2062 6520 6772 6179 206f 7220 ould be gray or │ │ │ +00051990: 636f 6c6f 722e 3c2f 6464 3e0a 3c64 643e color.
    .
    │ │ │ +000519a0: 3c63 6f64 653e 656c 6c69 7073 6573 3c2f ellipses - output v │ │ │ +000519c0: 6563 746f 7220 6f66 2066 6f75 6e64 2065 ector of found e │ │ │ +000519d0: 6c6c 6970 7365 732e 2065 6163 6820 7665 llipses. each ve │ │ │ +000519e0: 6374 6f72 2069 7320 656e 636f 6465 6420 ctor is encoded │ │ │ +000519f0: 6173 2066 6976 6520 666c 6f61 7420 2478 as five float $x │ │ │ +00051a00: 2c20 792c 2061 2c20 622c 2072 6164 6975 , y, a, b, radiu │ │ │ +00051a10: 732c 2073 636f 7265 242e 3c2f 6464 3e0a s, score$.
    . │ │ │ +00051a20: 3c64 643e 3c63 6f64 653e 7363 6f72 6554
    scoreT │ │ │ +00051a30: 6872 6573 686f 6c64 3c2f 636f 6465 3e20 hreshold │ │ │ +00051a40: 2d20 666c 6f61 742c 2074 6865 2074 6872 - float, the thr │ │ │ +00051a50: 6573 686f 6c64 206f 6620 656c 6c69 7073 eshold of ellips │ │ │ +00051a60: 6520 7363 6f72 652e 3c2f 6464 3e0a 3c64 e score.
    .reliabil │ │ │ +00051a80: 6974 7954 6872 6573 686f 6c64 3c2f 636f ityThreshold - float, the │ │ │ +00051aa0: 2074 6872 6573 686f 6c64 206f 6620 7265 threshold of re │ │ │ +00051ab0: 6c69 6162 696c 6974 792e 3c2f 6464 3e0a liability.. │ │ │ +00051ac0: 3c64 643e 3c63 6f64 653e 6365 6e74 6572
    center │ │ │ +00051ad0: 4469 7374 616e 6365 5468 7265 7368 6f6c DistanceThreshol │ │ │ +00051ae0: 643c 2f63 6f64 653e 202d 2066 6c6f 6174 d - float │ │ │ +00051af0: 2c20 7468 6520 7468 7265 7368 6f6c 6420 , the threshold │ │ │ +00051b00: 6f66 2063 656e 7465 7220 6469 7374 616e of center distan │ │ │ +00051b10: 6365 2e3c 2f64 643e 0a3c 2f64 6c3e 0a3c ce.
    .
    .< │ │ │ +00051b20: 2f73 6563 7469 6f6e 3e0a 3c2f 6c69 3e0a /section>.
  • . │ │ │ +00051b30: 3c6c 693e 0a3c 7365 6374 696f 6e20 636c
  • .
    .

    findEll │ │ │ +00051ba0: 6970 7365 733c 2f68 333e 0a3c 6469 7620 ipses

    .
    public static void │ │ │ +00051c20: 266e 6273 703b 3c73 7061 6e20 636c 6173  findEllipses(M │ │ │ +00051cb0: 6174 3c2f 613e 266e 6273 703b 696d 6167 at imag │ │ │ +00051cc0: 652c 0a20 3c61 2068 7265 663d 222e 2e2f e,. │ │ │ +00051d00: 4d61 743c 2f61 3e26 6e62 7370 3b65 6c6c Mat ell │ │ │ +00051d10: 6970 7365 732c 0a20 666c 6f61 7426 6e62 ipses,. float&nb │ │ │ +00051d20: 7370 3b73 636f 7265 5468 7265 7368 6f6c sp;scoreThreshol │ │ │ +00051d30: 642c 0a20 666c 6f61 7426 6e62 7370 3b72 d,. float r │ │ │ +00051d40: 656c 6961 6269 6c69 7479 5468 7265 7368 eliabilityThresh │ │ │ +00051d50: 6f6c 6429 3c2f 7370 616e 3e3c 2f64 6976 old)
    .
    Finds ellip │ │ │ +00051d80: 7365 7320 6661 7374 6c79 2069 6e20 616e ses fastly in an │ │ │ +00051d90: 2069 6d61 6765 2075 7369 6e67 2070 726f image using pro │ │ │ +00051da0: 6a65 6374 6976 6520 696e 7661 7269 616e jective invarian │ │ │ +00051db0: 7420 7072 756e 696e 672e 0a0a 2054 6865 t pruning... The │ │ │ +00051dc0: 2066 756e 6374 696f 6e20 6465 7465 6374 function detect │ │ │ +00051dd0: 7320 656c 6c69 7073 6573 2069 6e20 696d s ellipses in im │ │ │ +00051de0: 6167 6573 2075 7369 6e67 2070 726f 6a65 ages using proje │ │ │ +00051df0: 6374 6976 6520 696e 7661 7269 616e 7420 ctive invariant │ │ │ +00051e00: 7072 756e 696e 672e 0a20 466f 7220 6d6f pruning.. For mo │ │ │ +00051e10: 7265 2064 6574 6169 6c73 2061 626f 7574 re details about │ │ │ +00051e20: 2074 6869 7320 696d 706c 656d 656e 7461 this implementa │ │ │ +00051e30: 7469 6f6e 2c20 706c 6561 7365 2073 6565 tion, please see │ │ │ +00051e40: 2043 4954 453a 206a 6961 3230 3137 6661 CITE: jia2017fa │ │ │ +00051e50: 7374 0a20 4a69 612c 2051 6920 6574 2061 st. Jia, Qi et a │ │ │ +00051e60: 6c2c 2028 3230 3137 292e 0a20 4120 4661 l, (2017).. A Fa │ │ │ +00051e70: 7374 2045 6c6c 6970 7365 2044 6574 6563 st Ellipse Detec │ │ │ +00051e80: 746f 7220 7573 696e 6720 5072 6f6a 6563 tor using Projec │ │ │ +00051e90: 7469 7665 2049 6e76 6172 6961 6e74 2050 tive Invariant P │ │ │ +00051ea0: 7275 6e69 6e67 2e20 4945 4545 2054 7261 runing. IEEE Tra │ │ │ +00051eb0: 6e73 6163 7469 6f6e 7320 6f6e 2049 6d61 nsactions on Ima │ │ │ +00051ec0: 6765 2050 726f 6365 7373 696e 672e 3c2f ge Processing..
    .
    Para │ │ │ +00051ef0: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    image - input imag │ │ │ +00051f20: 652c 2063 6f75 6c64 2062 6520 6772 6179 e, could be gray │ │ │ +00051f30: 206f 7220 636f 6c6f 722e 3c2f 6464 3e0a or color.
    . │ │ │ +00051f40: 3c64 643e 3c63 6f64 653e 656c 6c69 7073
    ellips │ │ │ +00051f50: 6573 3c2f 636f 6465 3e20 2d20 6f75 7470 es - outp │ │ │ +00051f60: 7574 2076 6563 746f 7220 6f66 2066 6f75 ut vector of fou │ │ │ +00051f70: 6e64 2065 6c6c 6970 7365 732e 2065 6163 nd ellipses. eac │ │ │ +00051f80: 6820 7665 6374 6f72 2069 7320 656e 636f h vector is enco │ │ │ +00051f90: 6465 6420 6173 2066 6976 6520 666c 6f61 ded as five floa │ │ │ +00051fa0: 7420 2478 2c20 792c 2061 2c20 622c 2072 t $x, y, a, b, r │ │ │ +00051fb0: 6164 6975 732c 2073 636f 7265 242e 3c2f adius, score$..
    sc │ │ │ +00051fd0: 6f72 6554 6872 6573 686f 6c64 3c2f 636f oreThreshold - float, the │ │ │ +00051ff0: 2074 6872 6573 686f 6c64 206f 6620 656c threshold of el │ │ │ +00052000: 6c69 7073 6520 7363 6f72 652e 3c2f 6464 lipse score.
    .
    reli │ │ │ +00052020: 6162 696c 6974 7954 6872 6573 686f 6c64 abilityThreshold │ │ │ +00052030: 3c2f 636f 6465 3e20 2d20 666c 6f61 742c - float, │ │ │ +00052040: 2074 6865 2074 6872 6573 686f 6c64 206f the threshold o │ │ │ +00052050: 6620 7265 6c69 6162 696c 6974 792e 3c2f f reliability..
    ..
  • .
  • . │ │ │ +00052080: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    fi │ │ │ +000520e0: 6e64 456c 6c69 7073 6573 3c2f 6833 3e0a ndEllipses

    . │ │ │ +000520f0: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
    public sta │ │ │ +00052130: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ +00052140: 3c73 7061 6e20 636c 6173 733d 2272 6574 void findEllips │ │ │ +00052190: 6573 3c2f 7370 616e 3e3c 7762 723e 3c73 es(Mat  │ │ │ +00052200: 3b69 6d61 6765 2c0a 203c 6120 6872 6566 ;image,. Mat&nbs │ │ │ +00052250: 703b 656c 6c69 7073 6573 2c0a 2066 6c6f p;ellipses,. flo │ │ │ +00052260: 6174 266e 6273 703b 7363 6f72 6554 6872 at scoreThr │ │ │ +00052270: 6573 686f 6c64 293c 2f73 7061 6e3e 3c2f eshold).
    Finds el │ │ │ +000522a0: 6c69 7073 6573 2066 6173 746c 7920 696e lipses fastly in │ │ │ +000522b0: 2061 6e20 696d 6167 6520 7573 696e 6720 an image using │ │ │ +000522c0: 7072 6f6a 6563 7469 7665 2069 6e76 6172 projective invar │ │ │ +000522d0: 6961 6e74 2070 7275 6e69 6e67 2e0a 0a20 iant pruning... │ │ │ +000522e0: 5468 6520 6675 6e63 7469 6f6e 2064 6574 The function det │ │ │ +000522f0: 6563 7473 2065 6c6c 6970 7365 7320 696e ects ellipses in │ │ │ +00052300: 2069 6d61 6765 7320 7573 696e 6720 7072 images using pr │ │ │ +00052310: 6f6a 6563 7469 7665 2069 6e76 6172 6961 ojective invaria │ │ │ +00052320: 6e74 2070 7275 6e69 6e67 2e0a 2046 6f72 nt pruning.. For │ │ │ +00052330: 206d 6f72 6520 6465 7461 696c 7320 6162 more details ab │ │ │ +00052340: 6f75 7420 7468 6973 2069 6d70 6c65 6d65 out this impleme │ │ │ +00052350: 6e74 6174 696f 6e2c 2070 6c65 6173 6520 ntation, please │ │ │ +00052360: 7365 6520 4349 5445 3a20 6a69 6132 3031 see CITE: jia201 │ │ │ +00052370: 3766 6173 740a 204a 6961 2c20 5169 2065 7fast. Jia, Qi e │ │ │ +00052380: 7420 616c 2c20 2832 3031 3729 2e0a 2041 t al, (2017).. A │ │ │ +00052390: 2046 6173 7420 456c 6c69 7073 6520 4465 Fast Ellipse De │ │ │ +000523a0: 7465 6374 6f72 2075 7369 6e67 2050 726f tector using Pro │ │ │ +000523b0: 6a65 6374 6976 6520 496e 7661 7269 616e jective Invarian │ │ │ +000523c0: 7420 5072 756e 696e 672e 2049 4545 4520 t Pruning. IEEE │ │ │ +000523d0: 5472 616e 7361 6374 696f 6e73 206f 6e20 Transactions on │ │ │ +000523e0: 496d 6167 6520 5072 6f63 6573 7369 6e67 Image Processing │ │ │ +000523f0: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 .
    .
    .
    P │ │ │ +00052410: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ +00052420: 3c64 643e 3c63 6f64 653e 696d 6167 653c
    image< │ │ │ +00052430: 2f63 6f64 653e 202d 2069 6e70 7574 2069 /code> - input i │ │ │ +00052440: 6d61 6765 2c20 636f 756c 6420 6265 2067 mage, could be g │ │ │ +00052450: 7261 7920 6f72 2063 6f6c 6f72 2e3c 2f64 ray or color..
    ell │ │ │ +00052470: 6970 7365 733c 2f63 6f64 653e 202d 206f ipses - o │ │ │ +00052480: 7574 7075 7420 7665 6374 6f72 206f 6620 utput vector of │ │ │ +00052490: 666f 756e 6420 656c 6c69 7073 6573 2e20 found ellipses. │ │ │ +000524a0: 6561 6368 2076 6563 746f 7220 6973 2065 each vector is e │ │ │ +000524b0: 6e63 6f64 6564 2061 7320 6669 7665 2066 ncoded as five f │ │ │ +000524c0: 6c6f 6174 2024 782c 2079 2c20 612c 2062 loat $x, y, a, b │ │ │ +000524d0: 2c20 7261 6469 7573 2c20 7363 6f72 6524 , radius, score$ │ │ │ +000524e0: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    scoreThreshold< │ │ │ +00052500: 2f63 6f64 653e 202d 2066 6c6f 6174 2c20 /code> - float, │ │ │ +00052510: 7468 6520 7468 7265 7368 6f6c 6420 6f66 the threshold of │ │ │ +00052520: 2065 6c6c 6970 7365 2073 636f 7265 2e3c ellipse score.< │ │ │ +00052530: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.
    ..
  • .
  • │ │ │ +00052550: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    .

    findEll │ │ │ +000525b0: 6970 7365 733c 2f68 333e 0a3c 6469 7620 ipses

    .
    public static void │ │ │ +00052630: 266e 6273 703b 3c73 7061 6e20 636c 6173  findEllipses(M │ │ │ +000526c0: 6174 3c2f 613e 266e 6273 703b 696d 6167 at imag │ │ │ +000526d0: 652c 0a20 3c61 2068 7265 663d 222e 2e2f e,. │ │ │ +00052710: 4d61 743c 2f61 3e26 6e62 7370 3b65 6c6c Mat ell │ │ │ +00052720: 6970 7365 7329 3c2f 7370 616e 3e3c 2f64 ipses).
    Finds ell │ │ │ +00052750: 6970 7365 7320 6661 7374 6c79 2069 6e20 ipses fastly in │ │ │ +00052760: 616e 2069 6d61 6765 2075 7369 6e67 2070 an image using p │ │ │ +00052770: 726f 6a65 6374 6976 6520 696e 7661 7269 rojective invari │ │ │ +00052780: 616e 7420 7072 756e 696e 672e 0a0a 2054 ant pruning... T │ │ │ +00052790: 6865 2066 756e 6374 696f 6e20 6465 7465 he function dete │ │ │ +000527a0: 6374 7320 656c 6c69 7073 6573 2069 6e20 cts ellipses in │ │ │ +000527b0: 696d 6167 6573 2075 7369 6e67 2070 726f images using pro │ │ │ +000527c0: 6a65 6374 6976 6520 696e 7661 7269 616e jective invarian │ │ │ +000527d0: 7420 7072 756e 696e 672e 0a20 466f 7220 t pruning.. For │ │ │ +000527e0: 6d6f 7265 2064 6574 6169 6c73 2061 626f more details abo │ │ │ +000527f0: 7574 2074 6869 7320 696d 706c 656d 656e ut this implemen │ │ │ +00052800: 7461 7469 6f6e 2c20 706c 6561 7365 2073 tation, please s │ │ │ +00052810: 6565 2043 4954 453a 206a 6961 3230 3137 ee CITE: jia2017 │ │ │ +00052820: 6661 7374 0a20 4a69 612c 2051 6920 6574 fast. Jia, Qi et │ │ │ +00052830: 2061 6c2c 2028 3230 3137 292e 0a20 4120 al, (2017).. A │ │ │ +00052840: 4661 7374 2045 6c6c 6970 7365 2044 6574 Fast Ellipse Det │ │ │ +00052850: 6563 746f 7220 7573 696e 6720 5072 6f6a ector using Proj │ │ │ +00052860: 6563 7469 7665 2049 6e76 6172 6961 6e74 ective Invariant │ │ │ +00052870: 2050 7275 6e69 6e67 2e20 4945 4545 2054 Pruning. IEEE T │ │ │ +00052880: 7261 6e73 6163 7469 6f6e 7320 6f6e 2049 ransactions on I │ │ │ +00052890: 6d61 6765 2050 726f 6365 7373 696e 672e mage Processing. │ │ │ +000528a0: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ +000528c0: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ +000528d0: 6464 3e3c 636f 6465 3e69 6d61 6765 3c2f dd>image - input im │ │ │ +000528f0: 6167 652c 2063 6f75 6c64 2062 6520 6772 age, could be gr │ │ │ +00052900: 6179 206f 7220 636f 6c6f 722e 3c2f 6464 ay or color..
    elli │ │ │ +00052920: 7073 6573 3c2f 636f 6465 3e20 2d20 6f75 pses - ou │ │ │ +00052930: 7470 7574 2076 6563 746f 7220 6f66 2066 tput vector of f │ │ │ +00052940: 6f75 6e64 2065 6c6c 6970 7365 732e 2065 ound ellipses. e │ │ │ +00052950: 6163 6820 7665 6374 6f72 2069 7320 656e ach vector is en │ │ │ +00052960: 636f 6465 6420 6173 2066 6976 6520 666c coded as five fl │ │ │ +00052970: 6f61 7420 2478 2c20 792c 2061 2c20 622c oat $x, y, a, b, │ │ │ +00052980: 2072 6164 6975 732c 2073 636f 7265 242e radius, score$. │ │ │ +00052990: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365
    .
    ..
  • .
  • .
    .< │ │ │ +00052a10: 6833 3e63 7265 6174 6551 7561 7465 726e h3>createQuatern │ │ │ +00052a20: 696f 6e49 6d61 6765 3c2f 6833 3e0a 3c64 ionImage.public stati │ │ │ +00052a70: 633c 2f73 7061 6e3e 266e 6273 703b 3c73 c void createQuater │ │ │ +00052ad0: 6e69 6f6e 496d 6167 653c 2f73 7061 6e3e nionImage │ │ │ +00052ae0: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ +00052b00: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ +00052b10: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ +00052b20: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +00052b30: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat img,. Mat qimg).
    cre │ │ │ +00052bc0: 6174 6573 2061 2071 7561 7465 726e 696f ates a quaternio │ │ │ +00052bd0: 6e20 696d 6167 652e 3c2f 6469 763e 0a3c n image.
    .< │ │ │ +00052be0: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ +00052bf0: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
    Parameters │ │ │ +00052c00: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
    .
    img - au │ │ │ +00052c20: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ +00052c30: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated
    .
    < │ │ │ +00052c40: 636f 6465 3e71 696d 673c 2f63 6f64 653e code>qimg │ │ │ +00052c50: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ +00052c60: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
    . │ │ │ +00052c70: 3c2f 646c 3e0a 3c2f 7365 6374 696f 6e3e .
    │ │ │ +00052c80: 0a3c 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 .
  • .
  • ..

    qco │ │ │ +00052ce0: 6e6a 3c2f 6833 3e0a 3c64 6976 2063 6c61 nj

    .
    pu │ │ │ +00052d20: 626c 6963 2073 7461 7469 633c 2f73 7061 blic static void&nb │ │ │ +00052d60: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;qc │ │ │ +00052d80: 6f6e 6a3c 2f73 7061 6e3e 3c77 6272 3e3c onj< │ │ │ +00052d90: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ +00052da0: 6d65 7465 7273 223e 283c 6120 6872 6566 meters">(Mat&nbs │ │ │ +00052df0: 703b 7169 6d67 2c0a 203c 6120 6872 6566 p;qimg,. Mat&nbs │ │ │ +00052e40: 703b 7163 696d 6729 3c2f 7370 616e 3e3c p;qcimg)< │ │ │ +00052e50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    calcula │ │ │ +00052e70: 7465 7320 636f 6e6a 7567 6174 6520 6f66 tes conjugate of │ │ │ +00052e80: 2061 2071 7561 7465 726e 696f 6e20 696d a quaternion im │ │ │ +00052e90: 6167 652e 3c2f 6469 763e 0a3c 646c 2063 age.
    .
    .Parameters:.
    qim │ │ │ +00052ed0: 673c 2f63 6f64 653e 202d 2061 7574 6f6d g - autom │ │ │ +00052ee0: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +00052ef0: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
    .
    qcimg - │ │ │ +00052f10: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ +00052f20: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ..
  • .< │ │ │ +00052f40: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..

    qu │ │ │ +00052fa0: 6e69 7461 7279 3c2f 6833 3e0a 3c64 6976 nitary

    .. │ │ │ +00053130: 6469 7669 6465 7320 6561 6368 2065 6c65 divides each ele │ │ │ +00053140: 6d65 6e74 2062 7920 6974 7320 6d6f 6475 ment by its modu │ │ │ +00053150: 6c75 732e 3c2f 6469 763e 0a3c 646c 2063 lus..
    .Parameters:.
    qim │ │ │ +00053190: 673c 2f63 6f64 653e 202d 2061 7574 6f6d g - autom │ │ │ +000531a0: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +000531b0: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
    .
    qnimg - │ │ │ +000531d0: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ +000531e0: 656e 6572 6174 6564 3c2f 6464 3e0a 3c2f enerated
    ..
  • .< │ │ │ +00053200: 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 7469 /li>.
  • ..< │ │ │ +00053270: 6833 3e71 6d75 6c74 6970 6c79 3c2f 6833 h3>qmultiply..
    Calculates │ │ │ +00053460: 7468 6520 7065 722d 656c 656d 656e 7420 the per-element │ │ │ +00053470: 7175 6174 6572 6e69 6f6e 2070 726f 6475 quaternion produ │ │ │ +00053480: 6374 206f 6620 7477 6f20 6172 7261 7973 ct of two arrays │ │ │ +00053490: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ +000534b0: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ +000534c0: 6464 3e3c 636f 6465 3e73 7263 313c 2f63 dd>src1 - automatic │ │ │ +000534e0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    sr │ │ │ +00053500: 6332 3c2f 636f 6465 3e20 2d20 6175 746f c2 - auto │ │ │ +00053510: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ +00053520: 7465 643c 2f64 643e 0a3c 6464 3e3c 636f ted
    .
    dst - │ │ │ +00053540: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +00053550: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
    ....
  • . │ │ │ +000535d0: 0a3c 6833 3e71 6466 743c 2f68 333e 0a3c .

    qdft

    .< │ │ │ +000535e0: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ +000535f0: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ +00053620: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ +00053630: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ +00053640: 726e 2d74 7970 6522 3e76 6f69 643c 2f73 rn-type">void
     qdft │ │ │ +00053680: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ +000536a0: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ +000536b0: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ +000536c0: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +000536d0: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat img,. Mat qimg,. in │ │ │ +00053740: 7426 6e62 7370 3b66 6c61 6773 2c0a 2062 t flags,. b │ │ │ +00053750: 6f6f 6c65 616e 266e 6273 703b 7369 6465 oolean side │ │ │ +00053760: 4c65 6674 293c 2f73 7061 6e3e 3c2f 6469 Left).
    Performs a │ │ │ +00053790: 2066 6f72 7761 7264 206f 7220 696e 7665 forward or inve │ │ │ +000537a0: 7273 6520 4469 7363 7265 7465 2071 7561 rse Discrete qua │ │ │ +000537b0: 7465 726e 696f 6e20 466f 7572 6965 7220 ternion Fourier │ │ │ +000537c0: 7472 616e 7366 6f72 6d20 6f66 2061 2032 transform of a 2 │ │ │ +000537d0: 4420 7175 6174 6572 6e69 6f6e 2061 7272 D quaternion arr │ │ │ +000537e0: 6179 2e3c 2f64 6976 3e0a 3c64 6c20 636c ay.
    .
    .
    Parameters:
    .
    img< │ │ │ +00053820: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ +00053830: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ +00053840: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +00053850: 7169 6d67 3c2f 636f 6465 3e20 2d20 6175 qimg - au │ │ │ +00053860: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ +00053870: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated
    .
    < │ │ │ +00053880: 636f 6465 3e66 6c61 6773 3c2f 636f 6465 code>flags - automaticall │ │ │ +000538a0: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ +000538b0: 0a3c 6464 3e3c 636f 6465 3e73 6964 654c .
    sideL │ │ │ +000538c0: 6566 743c 2f63 6f64 653e 202d 2061 7574 eft - aut │ │ │ +000538d0: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ +000538e0: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
    .
    . │ │ │ +000538f0: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e .
  • │ │ │ +00053900: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    .

    colorMat │ │ │ +00053980: 6368 5465 6d70 6c61 7465 3c2f 6833 3e0a chTemplate

    . │ │ │ +00053990: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
    public sta │ │ │ +000539d0: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ +000539e0: 3c73 7061 6e20 636c 6173 733d 2272 6574 void colorMatch │ │ │ +00053a30: 5465 6d70 6c61 7465 3c2f 7370 616e 3e3c Template< │ │ │ +00053a40: 7762 723e 3c73 7061 6e20 636c 6173 733d wbr>(Mat img,. Mat │ │ │ +00053af0: 266e 6273 703b 7465 6d70 6c2c 0a20 3c61  templ,. Mat result)
    .
    C │ │ │ +00053b70: 6f6d 7061 7265 7320 6120 636f 6c6f 7220 ompares a color │ │ │ +00053b80: 7465 6d70 6c61 7465 2061 6761 696e 7374 template against │ │ │ +00053b90: 206f 7665 726c 6170 7065 6420 636f 6c6f overlapped colo │ │ │ +00053ba0: 7220 696d 6167 6520 7265 6769 6f6e 732e r image regions. │ │ │ +00053bb0: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ +00053bd0: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ +00053be0: 6464 3e3c 636f 6465 3e69 6d67 3c2f 636f dd>img - automatica │ │ │ +00053c00: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    tem │ │ │ +00053c20: 706c 3c2f 636f 6465 3e20 2d20 6175 746f pl - auto │ │ │ +00053c30: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ +00053c40: 7465 643c 2f64 643e 0a3c 6464 3e3c 636f ted
    .
    result │ │ │ +00053c60: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ +00053c70: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
    . │ │ │ +00053c80: 3c2f 646c 3e0a 3c2f 7365 6374 696f 6e3e
    .
    │ │ │ +00053c90: 0a3c 2f6c 693e 0a3c 6c69 3e0a 3c73 6563 .
  • .
  • ..

    createS │ │ │ +00053d00: 7570 6572 7069 7865 6c53 4545 4453 3c2f uperpixelSEEDS.
    public │ │ │ +00053d50: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ +00053d60: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;SuperpixelSEED │ │ │ +00053dd0: 533c 2f61 3e3c 2f73 7061 6e3e 266e 6273 S&nbs │ │ │ +00053de0: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;cre │ │ │ +00053e00: 6174 6553 7570 6572 7069 7865 6c53 4545 ateSuperpixelSEE │ │ │ +00053e10: 4453 3c2f 7370 616e 3e3c 7762 723e 3c73 DS(int  │ │ │ +00053e40: 3b69 6d61 6765 5f77 6964 7468 2c0a 2069 ;image_width,. i │ │ │ +00053e50: 6e74 266e 6273 703b 696d 6167 655f 6865 nt image_he │ │ │ +00053e60: 6967 6874 2c0a 2069 6e74 266e 6273 703b ight,. int  │ │ │ +00053e70: 696d 6167 655f 6368 616e 6e65 6c73 2c0a image_channels,. │ │ │ +00053e80: 2069 6e74 266e 6273 703b 6e75 6d5f 7375 int num_su │ │ │ +00053e90: 7065 7270 6978 656c 732c 0a20 696e 7426 perpixels,. int& │ │ │ +00053ea0: 6e62 7370 3b6e 756d 5f6c 6576 656c 732c nbsp;num_levels, │ │ │ +00053eb0: 0a20 696e 7426 6e62 7370 3b70 7269 6f72 . int prior │ │ │ +00053ec0: 2c0a 2069 6e74 266e 6273 703b 6869 7374 ,. int hist │ │ │ +00053ed0: 6f67 7261 6d5f 6269 6e73 2c0a 2062 6f6f ogram_bins,. boo │ │ │ +00053ee0: 6c65 616e 266e 6273 703b 646f 7562 6c65 lean double │ │ │ +00053ef0: 5f73 7465 7029 3c2f 7370 616e 3e3c 2f64 _step).
    Initializ │ │ │ +00053f20: 6573 2061 2053 7570 6572 7069 7865 6c53 es a SuperpixelS │ │ │ +00053f30: 4545 4453 206f 626a 6563 742e 3c2f 6469 EEDS object..
    .
    Parame │ │ │ +00053f60: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
    .
    < │ │ │ +00053f70: 636f 6465 3e69 6d61 6765 5f77 6964 7468 code>image_width │ │ │ +00053f80: 3c2f 636f 6465 3e20 2d20 496d 6167 6520 - Image │ │ │ +00053f90: 7769 6474 682e 3c2f 6464 3e0a 3c64 643e width.
    .
    │ │ │ +00053fa0: 3c63 6f64 653e 696d 6167 655f 6865 6967 image_heig │ │ │ +00053fb0: 6874 3c2f 636f 6465 3e20 2d20 496d 6167 ht - Imag │ │ │ +00053fc0: 6520 6865 6967 6874 2e3c 2f64 643e 0a3c e height.
    .< │ │ │ +00053fd0: 6464 3e3c 636f 6465 3e69 6d61 6765 5f63 dd>image_c │ │ │ +00053fe0: 6861 6e6e 656c 733c 2f63 6f64 653e 202d hannels - │ │ │ +00053ff0: 204e 756d 6265 7220 6f66 2063 6861 6e6e Number of chann │ │ │ +00054000: 656c 7320 6f66 2074 6865 2069 6d61 6765 els of the image │ │ │ +00054010: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 ..
    num_superpixels │ │ │ +00054030: 3c2f 636f 6465 3e20 2d20 4465 7369 7265 - Desire │ │ │ +00054040: 6420 6e75 6d62 6572 206f 6620 7375 7065 d number of supe │ │ │ +00054050: 7270 6978 656c 732e 204e 6f74 6520 7468 rpixels. Note th │ │ │ +00054060: 6174 2074 6865 2061 6374 7561 6c20 6e75 at the actual nu │ │ │ +00054070: 6d62 6572 206d 6179 2062 6520 736d 616c mber may be smal │ │ │ +00054080: 6c65 720a 2064 7565 2074 6f20 7265 7374 ler. due to rest │ │ │ +00054090: 7269 6374 696f 6e73 2028 6465 7065 6e64 rictions (depend │ │ │ +000540a0: 696e 6720 6f6e 2074 6865 2069 6d61 6765 ing on the image │ │ │ +000540b0: 2073 697a 6520 616e 6420 6e75 6d5f 6c65 size and num_le │ │ │ +000540c0: 7665 6c73 292e 2055 7365 2067 6574 4e75 vels). Use getNu │ │ │ +000540d0: 6d62 6572 4f66 5375 7065 7270 6978 656c mberOfSuperpixel │ │ │ +000540e0: 7328 2920 746f 0a20 6765 7420 7468 6520 s() to. get the │ │ │ +000540f0: 6163 7475 616c 206e 756d 6265 722e 3c2f actual number..
    nu │ │ │ +00054110: 6d5f 6c65 7665 6c73 3c2f 636f 6465 3e20 m_levels │ │ │ +00054120: 2d20 4e75 6d62 6572 206f 6620 626c 6f63 - Number of bloc │ │ │ +00054130: 6b20 6c65 7665 6c73 2e20 5468 6520 6d6f k levels. The mo │ │ │ +00054140: 7265 206c 6576 656c 732c 2074 6865 206d re levels, the m │ │ │ +00054150: 6f72 6520 6163 6375 7261 7465 2069 7320 ore accurate is │ │ │ +00054160: 7468 6520 7365 676d 656e 7461 7469 6f6e the segmentation │ │ │ +00054170: 2c0a 2062 7574 206e 6565 6473 206d 6f72 ,. but needs mor │ │ │ +00054180: 6520 6d65 6d6f 7279 2061 6e64 2043 5055 e memory and CPU │ │ │ +00054190: 2074 696d 652e 3c2f 6464 3e0a 3c64 643e time.
    .
    │ │ │ +000541a0: 3c63 6f64 653e 7072 696f 723c 2f63 6f64 prior - enable 3x3 │ │ │ +000541c0: 7368 6170 6520 736d 6f6f 7468 696e 6720 shape smoothing │ │ │ +000541d0: 7465 726d 2069 6620 2667 743b 302e 2041 term if >0. A │ │ │ +000541e0: 206c 6172 6765 7220 7661 6c75 6520 6c65 larger value le │ │ │ +000541f0: 6164 7320 746f 2073 6d6f 6f74 6865 7220 ads to smoother │ │ │ +00054200: 7368 6170 6573 2e20 7072 696f 720a 206d shapes. prior. m │ │ │ +00054210: 7573 7420 6265 2069 6e20 7468 6520 7261 ust be in the ra │ │ │ +00054220: 6e67 6520 5b30 2c20 355d 2e3c 2f64 643e nge [0, 5].
    │ │ │ +00054230: 0a3c 6464 3e3c 636f 6465 3e68 6973 746f .
    histo │ │ │ +00054240: 6772 616d 5f62 696e 733c 2f63 6f64 653e gram_bins │ │ │ +00054250: 202d 204e 756d 6265 7220 6f66 2068 6973 - Number of his │ │ │ +00054260: 746f 6772 616d 2062 696e 732e 3c2f 6464 togram bins.
    .
    doub │ │ │ +00054280: 6c65 5f73 7465 703c 2f63 6f64 653e 202d le_step - │ │ │ +00054290: 2049 6620 7472 7565 2c20 6974 6572 6174 If true, iterat │ │ │ +000542a0: 6520 6561 6368 2062 6c6f 636b 206c 6576 e each block lev │ │ │ +000542b0: 656c 2074 7769 6365 2066 6f72 2068 6967 el twice for hig │ │ │ +000542c0: 6865 7220 6163 6375 7261 6379 2e0a 0a20 her accuracy... │ │ │ +000542d0: 5468 6520 6675 6e63 7469 6f6e 2069 6e69 The function ini │ │ │ +000542e0: 7469 616c 697a 6573 2061 2053 7570 6572 tializes a Super │ │ │ +000542f0: 7069 7865 6c53 4545 4453 206f 626a 6563 pixelSEEDS objec │ │ │ +00054300: 7420 666f 7220 7468 6520 696e 7075 7420 t for the input │ │ │ +00054310: 696d 6167 652e 2049 7420 7374 6f72 6573 image. It stores │ │ │ +00054320: 2074 6865 2070 6172 616d 6574 6572 7320 the parameters │ │ │ +00054330: 6f66 0a20 7468 6520 696d 6167 653a 2069 of. the image: i │ │ │ +00054340: 6d61 6765 5f77 6964 7468 2c20 696d 6167 mage_width, imag │ │ │ +00054350: 655f 6865 6967 6874 2061 6e64 2069 6d61 e_height and ima │ │ │ +00054360: 6765 5f63 6861 6e6e 656c 732e 2049 7420 ge_channels. It │ │ │ +00054370: 616c 736f 2073 6574 7320 7468 6520 7061 also sets the pa │ │ │ +00054380: 7261 6d65 7465 7273 206f 6620 7468 6520 rameters of the │ │ │ +00054390: 5345 4544 530a 2073 7570 6572 7069 7865 SEEDS. superpixe │ │ │ +000543a0: 6c20 616c 676f 7269 7468 6d2c 2077 6869 l algorithm, whi │ │ │ +000543b0: 6368 2061 7265 3a20 6e75 6d5f 7375 7065 ch are: num_supe │ │ │ +000543c0: 7270 6978 656c 732c 206e 756d 5f6c 6576 rpixels, num_lev │ │ │ +000543d0: 656c 732c 2075 7365 5f70 7269 6f72 2c20 els, use_prior, │ │ │ +000543e0: 6869 7374 6f67 7261 6d5f 6269 6e73 2061 histogram_bins a │ │ │ +000543f0: 6e64 0a20 646f 7562 6c65 5f73 7465 702e nd. double_step. │ │ │ +00054400: 0a0a 2054 6865 206e 756d 6265 7220 6f66 .. The number of │ │ │ +00054410: 206c 6576 656c 7320 696e 206e 756d 5f6c levels in num_l │ │ │ +00054420: 6576 656c 7320 6465 6669 6e65 7320 7468 evels defines th │ │ │ +00054430: 6520 616d 6f75 6e74 206f 6620 626c 6f63 e amount of bloc │ │ │ +00054440: 6b20 6c65 7665 6c73 2074 6861 7420 7468 k levels that th │ │ │ +00054450: 6520 616c 676f 7269 7468 6d20 7573 6520 e algorithm use │ │ │ +00054460: 696e 2074 6865 0a20 6f70 7469 6d69 7a61 in the. optimiza │ │ │ +00054470: 7469 6f6e 2e20 5468 6520 696e 6974 6961 tion. The initia │ │ │ +00054480: 6c69 7a61 7469 6f6e 2069 7320 6120 6772 lization is a gr │ │ │ +00054490: 6964 2c20 696e 2077 6869 6368 2074 6865 id, in which the │ │ │ +000544a0: 2073 7570 6572 7069 7865 6c73 2061 7265 superpixels are │ │ │ +000544b0: 2065 7175 616c 6c79 2064 6973 7472 6962 equally distrib │ │ │ +000544c0: 7574 6564 2074 6872 6f75 6768 0a20 7468 uted through. th │ │ │ +000544d0: 6520 7769 6474 6820 616e 6420 7468 6520 e width and the │ │ │ +000544e0: 6865 6967 6874 206f 6620 7468 6520 696d height of the im │ │ │ +000544f0: 6167 652e 2054 6865 206c 6172 6765 7220 age. The larger │ │ │ +00054500: 626c 6f63 6b73 2063 6f72 7265 7370 6f6e blocks correspon │ │ │ +00054510: 6420 746f 2074 6865 2073 7570 6572 7069 d to the superpi │ │ │ +00054520: 7865 6c20 7369 7a65 2c20 616e 6420 7468 xel size, and th │ │ │ +00054530: 650a 206c 6576 656c 7320 7769 7468 2073 e. levels with s │ │ │ +00054540: 6d61 6c6c 6572 2062 6c6f 636b 7320 6172 maller blocks ar │ │ │ +00054550: 6520 666f 726d 6564 2062 7920 6469 7669 e formed by divi │ │ │ +00054560: 6469 6e67 2074 6865 206c 6172 6765 7220 ding the larger │ │ │ +00054570: 626c 6f63 6b73 2069 6e74 6f20 3220 7820 blocks into 2 x │ │ │ +00054580: 3220 626c 6f63 6b73 206f 6620 7069 7865 2 blocks of pixe │ │ │ +00054590: 6c73 2c0a 2072 6563 7572 7369 7665 6c79 ls,. recursively │ │ │ +000545a0: 2075 6e74 696c 2074 6865 2073 6d61 6c6c until the small │ │ │ +000545b0: 6572 2062 6c6f 636b 206c 6576 656c 2e20 er block level. │ │ │ +000545c0: 416e 2065 7861 6d70 6c65 206f 6620 696e An example of in │ │ │ +000545d0: 6974 6961 6c69 7a61 7469 6f6e 206f 6620 itialization of │ │ │ +000545e0: 3420 626c 6f63 6b20 6c65 7665 6c73 2069 4 block levels i │ │ │ +000545f0: 730a 2069 6c6c 7573 7472 6174 6564 2069 s. illustrated i │ │ │ +00054600: 6e20 7468 6520 666f 6c6c 6f77 696e 6720 n the following │ │ │ +00054610: 6669 6775 7265 2e0a 0a20 215b 696d 6167 figure... ![imag │ │ │ +00054620: 655d 2870 6963 732f 7375 7065 7270 6978 e](pics/superpix │ │ │ +00054630: 656c 735f 626c 6f63 6b73 2e70 6e67 293c els_blocks.png)< │ │ │ +00054640: 2f64 643e 0a3c 6474 3e52 6574 7572 6e73 /dd>.
    Returns │ │ │ +00054650: 3a3c 2f64 743e 0a3c 6464 3e61 7574 6f6d :
    .
    autom │ │ │ +00054660: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +00054670: 6564 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f ed
    .
    ..

  • .< │ │ │ +00054690: 6c69 3e0a 3c73 6563 7469 6f6e 2063 6c61 li>.
    .

    createS │ │ │ +000546f0: 7570 6572 7069 7865 6c53 4545 4453 3c2f uperpixelSEEDS.
    public │ │ │ +00054740: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ +00054750: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;SuperpixelSEED │ │ │ +000547c0: 533c 2f61 3e3c 2f73 7061 6e3e 266e 6273 S&nbs │ │ │ +000547d0: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;cre │ │ │ +000547f0: 6174 6553 7570 6572 7069 7865 6c53 4545 ateSuperpixelSEE │ │ │ +00054800: 4453 3c2f 7370 616e 3e3c 7762 723e 3c73 DS(int  │ │ │ +00054830: 3b69 6d61 6765 5f77 6964 7468 2c0a 2069 ;image_width,. i │ │ │ +00054840: 6e74 266e 6273 703b 696d 6167 655f 6865 nt image_he │ │ │ +00054850: 6967 6874 2c0a 2069 6e74 266e 6273 703b ight,. int  │ │ │ +00054860: 696d 6167 655f 6368 616e 6e65 6c73 2c0a image_channels,. │ │ │ +00054870: 2069 6e74 266e 6273 703b 6e75 6d5f 7375 int num_su │ │ │ +00054880: 7065 7270 6978 656c 732c 0a20 696e 7426 perpixels,. int& │ │ │ +00054890: 6e62 7370 3b6e 756d 5f6c 6576 656c 732c nbsp;num_levels, │ │ │ +000548a0: 0a20 696e 7426 6e62 7370 3b70 7269 6f72 . int prior │ │ │ +000548b0: 2c0a 2069 6e74 266e 6273 703b 6869 7374 ,. int hist │ │ │ +000548c0: 6f67 7261 6d5f 6269 6e73 293c 2f73 7061 ogram_bins)
    .
    Init │ │ │ +000548f0: 6961 6c69 7a65 7320 6120 5375 7065 7270 ializes a Superp │ │ │ +00054900: 6978 656c 5345 4544 5320 6f62 6a65 6374 ixelSEEDS object │ │ │ +00054910: 2e3c 2f64 6976 3e0a 3c64 6c20 636c 6173 .
    .
    .
    P │ │ │ +00054930: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ +00054940: 3c64 643e 3c63 6f64 653e 696d 6167 655f
    image_ │ │ │ +00054950: 7769 6474 683c 2f63 6f64 653e 202d 2049 width - I │ │ │ +00054960: 6d61 6765 2077 6964 7468 2e3c 2f64 643e mage width.
    │ │ │ +00054970: 0a3c 6464 3e3c 636f 6465 3e69 6d61 6765 .
    image │ │ │ +00054980: 5f68 6569 6768 743c 2f63 6f64 653e 202d _height - │ │ │ +00054990: 2049 6d61 6765 2068 6569 6768 742e 3c2f Image height..
    im │ │ │ +000549b0: 6167 655f 6368 616e 6e65 6c73 3c2f 636f age_channels - Number of │ │ │ +000549d0: 6368 616e 6e65 6c73 206f 6620 7468 6520 channels of the │ │ │ +000549e0: 696d 6167 652e 3c2f 6464 3e0a 3c64 643e image.
    .
    │ │ │ +000549f0: 3c63 6f64 653e 6e75 6d5f 7375 7065 7270 num_superp │ │ │ +00054a00: 6978 656c 733c 2f63 6f64 653e 202d 2044 ixels - D │ │ │ +00054a10: 6573 6972 6564 206e 756d 6265 7220 6f66 esired number of │ │ │ +00054a20: 2073 7570 6572 7069 7865 6c73 2e20 4e6f superpixels. No │ │ │ +00054a30: 7465 2074 6861 7420 7468 6520 6163 7475 te that the actu │ │ │ +00054a40: 616c 206e 756d 6265 7220 6d61 7920 6265 al number may be │ │ │ +00054a50: 2073 6d61 6c6c 6572 0a20 6475 6520 746f smaller. due to │ │ │ +00054a60: 2072 6573 7472 6963 7469 6f6e 7320 2864 restrictions (d │ │ │ +00054a70: 6570 656e 6469 6e67 206f 6e20 7468 6520 epending on the │ │ │ +00054a80: 696d 6167 6520 7369 7a65 2061 6e64 206e image size and n │ │ │ +00054a90: 756d 5f6c 6576 656c 7329 2e20 5573 6520 um_levels). Use │ │ │ +00054aa0: 6765 744e 756d 6265 724f 6653 7570 6572 getNumberOfSuper │ │ │ +00054ab0: 7069 7865 6c73 2829 2074 6f0a 2067 6574 pixels() to. get │ │ │ +00054ac0: 2074 6865 2061 6374 7561 6c20 6e75 6d62 the actual numb │ │ │ +00054ad0: 6572 2e3c 2f64 643e 0a3c 6464 3e3c 636f er.
    .
    num_levels - Number of │ │ │ +00054b00: 2062 6c6f 636b 206c 6576 656c 732e 2054 block levels. T │ │ │ +00054b10: 6865 206d 6f72 6520 6c65 7665 6c73 2c20 he more levels, │ │ │ +00054b20: 7468 6520 6d6f 7265 2061 6363 7572 6174 the more accurat │ │ │ +00054b30: 6520 6973 2074 6865 2073 6567 6d65 6e74 e is the segment │ │ │ +00054b40: 6174 696f 6e2c 0a20 6275 7420 6e65 6564 ation,. but need │ │ │ +00054b50: 7320 6d6f 7265 206d 656d 6f72 7920 616e s more memory an │ │ │ +00054b60: 6420 4350 5520 7469 6d65 2e3c 2f64 643e d CPU time.
    │ │ │ +00054b70: 0a3c 6464 3e3c 636f 6465 3e70 7269 6f72 .
    prior │ │ │ +00054b80: 3c2f 636f 6465 3e20 2d20 656e 6162 6c65 - enable │ │ │ +00054b90: 2033 7833 2073 6861 7065 2073 6d6f 6f74 3x3 shape smoot │ │ │ +00054ba0: 6869 6e67 2074 6572 6d20 6966 2026 6774 hing term if > │ │ │ +00054bb0: 3b30 2e20 4120 6c61 7267 6572 2076 616c ;0. A larger val │ │ │ +00054bc0: 7565 206c 6561 6473 2074 6f20 736d 6f6f ue leads to smoo │ │ │ +00054bd0: 7468 6572 2073 6861 7065 732e 2070 7269 ther shapes. pri │ │ │ +00054be0: 6f72 0a20 6d75 7374 2062 6520 696e 2074 or. must be in t │ │ │ +00054bf0: 6865 2072 616e 6765 205b 302c 2035 5d2e he range [0, 5]. │ │ │ +00054c00: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +00054c10: 6869 7374 6f67 7261 6d5f 6269 6e73 3c2f histogram_bins - Number o │ │ │ +00054c30: 6620 6869 7374 6f67 7261 6d20 6269 6e73 f histogram bins │ │ │ +00054c40: 2e0a 0a20 5468 6520 6675 6e63 7469 6f6e ... The function │ │ │ +00054c50: 2069 6e69 7469 616c 697a 6573 2061 2053 initializes a S │ │ │ +00054c60: 7570 6572 7069 7865 6c53 4545 4453 206f uperpixelSEEDS o │ │ │ +00054c70: 626a 6563 7420 666f 7220 7468 6520 696e bject for the in │ │ │ +00054c80: 7075 7420 696d 6167 652e 2049 7420 7374 put image. It st │ │ │ +00054c90: 6f72 6573 2074 6865 2070 6172 616d 6574 ores the paramet │ │ │ +00054ca0: 6572 7320 6f66 0a20 7468 6520 696d 6167 ers of. the imag │ │ │ +00054cb0: 653a 2069 6d61 6765 5f77 6964 7468 2c20 e: image_width, │ │ │ +00054cc0: 696d 6167 655f 6865 6967 6874 2061 6e64 image_height and │ │ │ +00054cd0: 2069 6d61 6765 5f63 6861 6e6e 656c 732e image_channels. │ │ │ +00054ce0: 2049 7420 616c 736f 2073 6574 7320 7468 It also sets th │ │ │ +00054cf0: 6520 7061 7261 6d65 7465 7273 206f 6620 e parameters of │ │ │ +00054d00: 7468 6520 5345 4544 530a 2073 7570 6572 the SEEDS. super │ │ │ +00054d10: 7069 7865 6c20 616c 676f 7269 7468 6d2c pixel algorithm, │ │ │ +00054d20: 2077 6869 6368 2061 7265 3a20 6e75 6d5f which are: num_ │ │ │ +00054d30: 7375 7065 7270 6978 656c 732c 206e 756d superpixels, num │ │ │ +00054d40: 5f6c 6576 656c 732c 2075 7365 5f70 7269 _levels, use_pri │ │ │ +00054d50: 6f72 2c20 6869 7374 6f67 7261 6d5f 6269 or, histogram_bi │ │ │ +00054d60: 6e73 2061 6e64 0a20 646f 7562 6c65 5f73 ns and. double_s │ │ │ +00054d70: 7465 702e 0a0a 2054 6865 206e 756d 6265 tep... The numbe │ │ │ +00054d80: 7220 6f66 206c 6576 656c 7320 696e 206e r of levels in n │ │ │ +00054d90: 756d 5f6c 6576 656c 7320 6465 6669 6e65 um_levels define │ │ │ +00054da0: 7320 7468 6520 616d 6f75 6e74 206f 6620 s the amount of │ │ │ +00054db0: 626c 6f63 6b20 6c65 7665 6c73 2074 6861 block levels tha │ │ │ +00054dc0: 7420 7468 6520 616c 676f 7269 7468 6d20 t the algorithm │ │ │ +00054dd0: 7573 6520 696e 2074 6865 0a20 6f70 7469 use in the. opti │ │ │ +00054de0: 6d69 7a61 7469 6f6e 2e20 5468 6520 696e mization. The in │ │ │ +00054df0: 6974 6961 6c69 7a61 7469 6f6e 2069 7320 itialization is │ │ │ +00054e00: 6120 6772 6964 2c20 696e 2077 6869 6368 a grid, in which │ │ │ +00054e10: 2074 6865 2073 7570 6572 7069 7865 6c73 the superpixels │ │ │ +00054e20: 2061 7265 2065 7175 616c 6c79 2064 6973 are equally dis │ │ │ +00054e30: 7472 6962 7574 6564 2074 6872 6f75 6768 tributed through │ │ │ +00054e40: 0a20 7468 6520 7769 6474 6820 616e 6420 . the width and │ │ │ +00054e50: 7468 6520 6865 6967 6874 206f 6620 7468 the height of th │ │ │ +00054e60: 6520 696d 6167 652e 2054 6865 206c 6172 e image. The lar │ │ │ +00054e70: 6765 7220 626c 6f63 6b73 2063 6f72 7265 ger blocks corre │ │ │ +00054e80: 7370 6f6e 6420 746f 2074 6865 2073 7570 spond to the sup │ │ │ +00054e90: 6572 7069 7865 6c20 7369 7a65 2c20 616e erpixel size, an │ │ │ +00054ea0: 6420 7468 650a 206c 6576 656c 7320 7769 d the. levels wi │ │ │ +00054eb0: 7468 2073 6d61 6c6c 6572 2062 6c6f 636b th smaller block │ │ │ +00054ec0: 7320 6172 6520 666f 726d 6564 2062 7920 s are formed by │ │ │ +00054ed0: 6469 7669 6469 6e67 2074 6865 206c 6172 dividing the lar │ │ │ +00054ee0: 6765 7220 626c 6f63 6b73 2069 6e74 6f20 ger blocks into │ │ │ +00054ef0: 3220 7820 3220 626c 6f63 6b73 206f 6620 2 x 2 blocks of │ │ │ +00054f00: 7069 7865 6c73 2c0a 2072 6563 7572 7369 pixels,. recursi │ │ │ +00054f10: 7665 6c79 2075 6e74 696c 2074 6865 2073 vely until the s │ │ │ +00054f20: 6d61 6c6c 6572 2062 6c6f 636b 206c 6576 maller block lev │ │ │ +00054f30: 656c 2e20 416e 2065 7861 6d70 6c65 206f el. An example o │ │ │ +00054f40: 6620 696e 6974 6961 6c69 7a61 7469 6f6e f initialization │ │ │ +00054f50: 206f 6620 3420 626c 6f63 6b20 6c65 7665 of 4 block leve │ │ │ +00054f60: 6c73 2069 730a 2069 6c6c 7573 7472 6174 ls is. illustrat │ │ │ +00054f70: 6564 2069 6e20 7468 6520 666f 6c6c 6f77 ed in the follow │ │ │ +00054f80: 696e 6720 6669 6775 7265 2e0a 0a20 215b ing figure... ![ │ │ │ +00054f90: 696d 6167 655d 2870 6963 732f 7375 7065 image](pics/supe │ │ │ +00054fa0: 7270 6978 656c 735f 626c 6f63 6b73 2e70 rpixels_blocks.p │ │ │ +00054fb0: 6e67 293c 2f64 643e 0a3c 6474 3e52 6574 ng)
    .
    Ret │ │ │ +00054fc0: 7572 6e73 3a3c 2f64 743e 0a3c 6464 3e61 urns:
    .
    a │ │ │ +00054fd0: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ +00054fe0: 6572 6174 6564 3c2f 6464 3e0a 3c2f 646c erated
    .
    .

    ..
  • .
    .

    createS │ │ │ +00055060: 7570 6572 7069 7865 6c53 4545 4453 3c2f uperpixelSEEDS.
    public │ │ │ +000550b0: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ +000550c0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;SuperpixelSEED │ │ │ +00055130: 533c 2f61 3e3c 2f73 7061 6e3e 266e 6273 S&nbs │ │ │ +00055140: 703b 3c73 7061 6e20 636c 6173 733d 2265 p;cre │ │ │ +00055160: 6174 6553 7570 6572 7069 7865 6c53 4545 ateSuperpixelSEE │ │ │ +00055170: 4453 3c2f 7370 616e 3e3c 7762 723e 3c73 DS(int  │ │ │ +000551a0: 3b69 6d61 6765 5f77 6964 7468 2c0a 2069 ;image_width,. i │ │ │ +000551b0: 6e74 266e 6273 703b 696d 6167 655f 6865 nt image_he │ │ │ +000551c0: 6967 6874 2c0a 2069 6e74 266e 6273 703b ight,. int  │ │ │ +000551d0: 696d 6167 655f 6368 616e 6e65 6c73 2c0a image_channels,. │ │ │ +000551e0: 2069 6e74 266e 6273 703b 6e75 6d5f 7375 int num_su │ │ │ +000551f0: 7065 7270 6978 656c 732c 0a20 696e 7426 perpixels,. int& │ │ │ +00055200: 6e62 7370 3b6e 756d 5f6c 6576 656c 732c nbsp;num_levels, │ │ │ +00055210: 0a20 696e 7426 6e62 7370 3b70 7269 6f72 . int prior │ │ │ +00055220: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    .< │ │ │ +00055230: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ +00055240: 223e 496e 6974 6961 6c69 7a65 7320 6120 ">Initializes a │ │ │ +00055250: 5375 7065 7270 6978 656c 5345 4544 5320 SuperpixelSEEDS │ │ │ +00055260: 6f62 6a65 6374 2e3c 2f64 6976 3e0a 3c64 object.. │ │ │ +00055280: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ +00055290: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +000552a0: 696d 6167 655f 7769 6474 683c 2f63 6f64 image_width - Image width │ │ │ +000552c0: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    image_height - Image hei │ │ │ +000552f0: 6768 742e 3c2f 6464 3e0a 3c64 643e 3c63 ght.
    .
    image_channe │ │ │ +00055310: 6c73 3c2f 636f 6465 3e20 2d20 4e75 6d62 ls - Numb │ │ │ +00055320: 6572 206f 6620 6368 616e 6e65 6c73 206f er of channels o │ │ │ +00055330: 6620 7468 6520 696d 6167 652e 3c2f 6464 f the image.
    .
    num_ │ │ │ +00055350: 7375 7065 7270 6978 656c 733c 2f63 6f64 superpixels - Desired num │ │ │ +00055370: 6265 7220 6f66 2073 7570 6572 7069 7865 ber of superpixe │ │ │ +00055380: 6c73 2e20 4e6f 7465 2074 6861 7420 7468 ls. Note that th │ │ │ +00055390: 6520 6163 7475 616c 206e 756d 6265 7220 e actual number │ │ │ +000553a0: 6d61 7920 6265 2073 6d61 6c6c 6572 0a20 may be smaller. │ │ │ +000553b0: 6475 6520 746f 2072 6573 7472 6963 7469 due to restricti │ │ │ +000553c0: 6f6e 7320 2864 6570 656e 6469 6e67 206f ons (depending o │ │ │ +000553d0: 6e20 7468 6520 696d 6167 6520 7369 7a65 n the image size │ │ │ +000553e0: 2061 6e64 206e 756d 5f6c 6576 656c 7329 and num_levels) │ │ │ +000553f0: 2e20 5573 6520 6765 744e 756d 6265 724f . Use getNumberO │ │ │ +00055400: 6653 7570 6572 7069 7865 6c73 2829 2074 fSuperpixels() t │ │ │ +00055410: 6f0a 2067 6574 2074 6865 2061 6374 7561 o. get the actua │ │ │ +00055420: 6c20 6e75 6d62 6572 2e3c 2f64 643e 0a3c l number.
    .< │ │ │ +00055430: 6464 3e3c 636f 6465 3e6e 756d 5f6c 6576 dd>num_lev │ │ │ +00055440: 656c 733c 2f63 6f64 653e 202d 204e 756d els - Num │ │ │ +00055450: 6265 7220 6f66 2062 6c6f 636b 206c 6576 ber of block lev │ │ │ +00055460: 656c 732e 2054 6865 206d 6f72 6520 6c65 els. The more le │ │ │ +00055470: 7665 6c73 2c20 7468 6520 6d6f 7265 2061 vels, the more a │ │ │ +00055480: 6363 7572 6174 6520 6973 2074 6865 2073 ccurate is the s │ │ │ +00055490: 6567 6d65 6e74 6174 696f 6e2c 0a20 6275 egmentation,. bu │ │ │ +000554a0: 7420 6e65 6564 7320 6d6f 7265 206d 656d t needs more mem │ │ │ +000554b0: 6f72 7920 616e 6420 4350 5520 7469 6d65 ory and CPU time │ │ │ +000554c0: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 ..
    prior - │ │ │ +000554e0: 656e 6162 6c65 2033 7833 2073 6861 7065 enable 3x3 shape │ │ │ +000554f0: 2073 6d6f 6f74 6869 6e67 2074 6572 6d20 smoothing term │ │ │ +00055500: 6966 2026 6774 3b30 2e20 4120 6c61 7267 if >0. A larg │ │ │ +00055510: 6572 2076 616c 7565 206c 6561 6473 2074 er value leads t │ │ │ +00055520: 6f20 736d 6f6f 7468 6572 2073 6861 7065 o smoother shape │ │ │ +00055530: 732e 2070 7269 6f72 0a20 6d75 7374 2062 s. prior. must b │ │ │ +00055540: 6520 696e 2074 6865 2072 616e 6765 205b e in the range [ │ │ │ +00055550: 302c 2035 5d2e 0a0a 2054 6865 2066 756e 0, 5]... The fun │ │ │ +00055560: 6374 696f 6e20 696e 6974 6961 6c69 7a65 ction initialize │ │ │ +00055570: 7320 6120 5375 7065 7270 6978 656c 5345 s a SuperpixelSE │ │ │ +00055580: 4544 5320 6f62 6a65 6374 2066 6f72 2074 EDS object for t │ │ │ +00055590: 6865 2069 6e70 7574 2069 6d61 6765 2e20 he input image. │ │ │ +000555a0: 4974 2073 746f 7265 7320 7468 6520 7061 It stores the pa │ │ │ +000555b0: 7261 6d65 7465 7273 206f 660a 2074 6865 rameters of. the │ │ │ +000555c0: 2069 6d61 6765 3a20 696d 6167 655f 7769 image: image_wi │ │ │ +000555d0: 6474 682c 2069 6d61 6765 5f68 6569 6768 dth, image_heigh │ │ │ +000555e0: 7420 616e 6420 696d 6167 655f 6368 616e t and image_chan │ │ │ +000555f0: 6e65 6c73 2e20 4974 2061 6c73 6f20 7365 nels. It also se │ │ │ +00055600: 7473 2074 6865 2070 6172 616d 6574 6572 ts the parameter │ │ │ +00055610: 7320 6f66 2074 6865 2053 4545 4453 0a20 s of the SEEDS. │ │ │ +00055620: 7375 7065 7270 6978 656c 2061 6c67 6f72 superpixel algor │ │ │ +00055630: 6974 686d 2c20 7768 6963 6820 6172 653a ithm, which are: │ │ │ +00055640: 206e 756d 5f73 7570 6572 7069 7865 6c73 num_superpixels │ │ │ +00055650: 2c20 6e75 6d5f 6c65 7665 6c73 2c20 7573 , num_levels, us │ │ │ +00055660: 655f 7072 696f 722c 2068 6973 746f 6772 e_prior, histogr │ │ │ +00055670: 616d 5f62 696e 7320 616e 640a 2064 6f75 am_bins and. dou │ │ │ +00055680: 626c 655f 7374 6570 2e0a 0a20 5468 6520 ble_step... The │ │ │ +00055690: 6e75 6d62 6572 206f 6620 6c65 7665 6c73 number of levels │ │ │ +000556a0: 2069 6e20 6e75 6d5f 6c65 7665 6c73 2064 in num_levels d │ │ │ +000556b0: 6566 696e 6573 2074 6865 2061 6d6f 756e efines the amoun │ │ │ +000556c0: 7420 6f66 2062 6c6f 636b 206c 6576 656c t of block level │ │ │ +000556d0: 7320 7468 6174 2074 6865 2061 6c67 6f72 s that the algor │ │ │ +000556e0: 6974 686d 2075 7365 2069 6e20 7468 650a ithm use in the. │ │ │ +000556f0: 206f 7074 696d 697a 6174 696f 6e2e 2054 optimization. T │ │ │ +00055700: 6865 2069 6e69 7469 616c 697a 6174 696f he initializatio │ │ │ +00055710: 6e20 6973 2061 2067 7269 642c 2069 6e20 n is a grid, in │ │ │ +00055720: 7768 6963 6820 7468 6520 7375 7065 7270 which the superp │ │ │ +00055730: 6978 656c 7320 6172 6520 6571 7561 6c6c ixels are equall │ │ │ +00055740: 7920 6469 7374 7269 6275 7465 6420 7468 y distributed th │ │ │ +00055750: 726f 7567 680a 2074 6865 2077 6964 7468 rough. the width │ │ │ +00055760: 2061 6e64 2074 6865 2068 6569 6768 7420 and the height │ │ │ +00055770: 6f66 2074 6865 2069 6d61 6765 2e20 5468 of the image. Th │ │ │ +00055780: 6520 6c61 7267 6572 2062 6c6f 636b 7320 e larger blocks │ │ │ +00055790: 636f 7272 6573 706f 6e64 2074 6f20 7468 correspond to th │ │ │ +000557a0: 6520 7375 7065 7270 6978 656c 2073 697a e superpixel siz │ │ │ +000557b0: 652c 2061 6e64 2074 6865 0a20 6c65 7665 e, and the. leve │ │ │ +000557c0: 6c73 2077 6974 6820 736d 616c 6c65 7220 ls with smaller │ │ │ +000557d0: 626c 6f63 6b73 2061 7265 2066 6f72 6d65 blocks are forme │ │ │ +000557e0: 6420 6279 2064 6976 6964 696e 6720 7468 d by dividing th │ │ │ +000557f0: 6520 6c61 7267 6572 2062 6c6f 636b 7320 e larger blocks │ │ │ +00055800: 696e 746f 2032 2078 2032 2062 6c6f 636b into 2 x 2 block │ │ │ +00055810: 7320 6f66 2070 6978 656c 732c 0a20 7265 s of pixels,. re │ │ │ +00055820: 6375 7273 6976 656c 7920 756e 7469 6c20 cursively until │ │ │ +00055830: 7468 6520 736d 616c 6c65 7220 626c 6f63 the smaller bloc │ │ │ +00055840: 6b20 6c65 7665 6c2e 2041 6e20 6578 616d k level. An exam │ │ │ +00055850: 706c 6520 6f66 2069 6e69 7469 616c 697a ple of initializ │ │ │ +00055860: 6174 696f 6e20 6f66 2034 2062 6c6f 636b ation of 4 block │ │ │ +00055870: 206c 6576 656c 7320 6973 0a20 696c 6c75 levels is. illu │ │ │ +00055880: 7374 7261 7465 6420 696e 2074 6865 2066 strated in the f │ │ │ +00055890: 6f6c 6c6f 7769 6e67 2066 6967 7572 652e ollowing figure. │ │ │ +000558a0: 0a0a 2021 5b69 6d61 6765 5d28 7069 6373 .. ![image](pics │ │ │ +000558b0: 2f73 7570 6572 7069 7865 6c73 5f62 6c6f /superpixels_blo │ │ │ +000558c0: 636b 732e 706e 6729 3c2f 6464 3e0a 3c64 cks.png)
    .Returns:. │ │ │ +000558e0: 3c64 643e 6175 746f 6d61 7469 6361 6c6c
    automaticall │ │ │ +000558f0: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ +00055900: 0a3c 2f64 6c3e 0a3c 2f73 6563 7469 6f6e .

  • ..
  • .
  • ..

    create │ │ │ +00055970: 5375 7065 7270 6978 656c 5345 4544 533c SuperpixelSEEDS< │ │ │ +00055980: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ +000559c0: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ +000559d0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;< │ │ │ +000559f0: 6120 6872 6566 3d22 5375 7065 7270 6978 a href="Superpix │ │ │ +00055a00: 656c 5345 4544 532e 6874 6d6c 2220 7469 elSEEDS.html" ti │ │ │ +00055a10: 746c 653d 2263 6c61 7373 2069 6e20 6f72 tle="class in or │ │ │ +00055a20: 672e 6f70 656e 6376 2e78 696d 6770 726f g.opencv.ximgpro │ │ │ +00055a30: 6322 3e53 7570 6572 7069 7865 6c53 4545 c">SuperpixelSEE │ │ │ +00055a40: 4453 3c2f 613e 3c2f 7370 616e 3e26 6e62 DS&nb │ │ │ +00055a50: 7370 3b3c 7370 616e 2063 6c61 7373 3d22 sp;cr │ │ │ +00055a70: 6561 7465 5375 7065 7270 6978 656c 5345 eateSuperpixelSE │ │ │ +00055a80: 4544 533c 2f73 7061 6e3e 3c77 6272 3e3c EDS< │ │ │ +00055a90: 7370 616e 2063 6c61 7373 3d22 7061 7261 span class="para │ │ │ +00055aa0: 6d65 7465 7273 223e 2869 6e74 266e 6273 meters">(int&nbs │ │ │ +00055ab0: 703b 696d 6167 655f 7769 6474 682c 0a20 p;image_width,. │ │ │ +00055ac0: 696e 7426 6e62 7370 3b69 6d61 6765 5f68 int image_h │ │ │ +00055ad0: 6569 6768 742c 0a20 696e 7426 6e62 7370 eight,. int  │ │ │ +00055ae0: 3b69 6d61 6765 5f63 6861 6e6e 656c 732c ;image_channels, │ │ │ +00055af0: 0a20 696e 7426 6e62 7370 3b6e 756d 5f73 . int num_s │ │ │ +00055b00: 7570 6572 7069 7865 6c73 2c0a 2069 6e74 uperpixels,. int │ │ │ +00055b10: 266e 6273 703b 6e75 6d5f 6c65 7665 6c73  num_levels │ │ │ +00055b20: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    .< │ │ │ +00055b30: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ +00055b40: 223e 496e 6974 6961 6c69 7a65 7320 6120 ">Initializes a │ │ │ +00055b50: 5375 7065 7270 6978 656c 5345 4544 5320 SuperpixelSEEDS │ │ │ +00055b60: 6f62 6a65 6374 2e3c 2f64 6976 3e0a 3c64 object.. │ │ │ +00055b80: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ +00055b90: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +00055ba0: 696d 6167 655f 7769 6474 683c 2f63 6f64 image_width - Image width │ │ │ +00055bc0: 2e3c 2f64 643e 0a3c 6464 3e3c 636f 6465 .
    .
    image_height - Image hei │ │ │ +00055bf0: 6768 742e 3c2f 6464 3e0a 3c64 643e 3c63 ght.
    .
    image_channe │ │ │ +00055c10: 6c73 3c2f 636f 6465 3e20 2d20 4e75 6d62 ls - Numb │ │ │ +00055c20: 6572 206f 6620 6368 616e 6e65 6c73 206f er of channels o │ │ │ +00055c30: 6620 7468 6520 696d 6167 652e 3c2f 6464 f the image.
    .
    num_ │ │ │ +00055c50: 7375 7065 7270 6978 656c 733c 2f63 6f64 superpixels - Desired num │ │ │ +00055c70: 6265 7220 6f66 2073 7570 6572 7069 7865 ber of superpixe │ │ │ +00055c80: 6c73 2e20 4e6f 7465 2074 6861 7420 7468 ls. Note that th │ │ │ +00055c90: 6520 6163 7475 616c 206e 756d 6265 7220 e actual number │ │ │ +00055ca0: 6d61 7920 6265 2073 6d61 6c6c 6572 0a20 may be smaller. │ │ │ +00055cb0: 6475 6520 746f 2072 6573 7472 6963 7469 due to restricti │ │ │ +00055cc0: 6f6e 7320 2864 6570 656e 6469 6e67 206f ons (depending o │ │ │ +00055cd0: 6e20 7468 6520 696d 6167 6520 7369 7a65 n the image size │ │ │ +00055ce0: 2061 6e64 206e 756d 5f6c 6576 656c 7329 and num_levels) │ │ │ +00055cf0: 2e20 5573 6520 6765 744e 756d 6265 724f . Use getNumberO │ │ │ +00055d00: 6653 7570 6572 7069 7865 6c73 2829 2074 fSuperpixels() t │ │ │ +00055d10: 6f0a 2067 6574 2074 6865 2061 6374 7561 o. get the actua │ │ │ +00055d20: 6c20 6e75 6d62 6572 2e3c 2f64 643e 0a3c l number.
    .< │ │ │ +00055d30: 6464 3e3c 636f 6465 3e6e 756d 5f6c 6576 dd>num_lev │ │ │ +00055d40: 656c 733c 2f63 6f64 653e 202d 204e 756d els - Num │ │ │ +00055d50: 6265 7220 6f66 2062 6c6f 636b 206c 6576 ber of block lev │ │ │ +00055d60: 656c 732e 2054 6865 206d 6f72 6520 6c65 els. The more le │ │ │ +00055d70: 7665 6c73 2c20 7468 6520 6d6f 7265 2061 vels, the more a │ │ │ +00055d80: 6363 7572 6174 6520 6973 2074 6865 2073 ccurate is the s │ │ │ +00055d90: 6567 6d65 6e74 6174 696f 6e2c 0a20 6275 egmentation,. bu │ │ │ +00055da0: 7420 6e65 6564 7320 6d6f 7265 206d 656d t needs more mem │ │ │ +00055db0: 6f72 7920 616e 6420 4350 5520 7469 6d65 ory and CPU time │ │ │ +00055dc0: 2e0a 206d 7573 7420 6265 2069 6e20 7468 .. must be in th │ │ │ +00055dd0: 6520 7261 6e67 6520 5b30 2c20 355d 2e0a e range [0, 5].. │ │ │ +00055de0: 0a20 5468 6520 6675 6e63 7469 6f6e 2069 . The function i │ │ │ +00055df0: 6e69 7469 616c 697a 6573 2061 2053 7570 nitializes a Sup │ │ │ +00055e00: 6572 7069 7865 6c53 4545 4453 206f 626a erpixelSEEDS obj │ │ │ +00055e10: 6563 7420 666f 7220 7468 6520 696e 7075 ect for the inpu │ │ │ +00055e20: 7420 696d 6167 652e 2049 7420 7374 6f72 t image. It stor │ │ │ +00055e30: 6573 2074 6865 2070 6172 616d 6574 6572 es the parameter │ │ │ +00055e40: 7320 6f66 0a20 7468 6520 696d 6167 653a s of. the image: │ │ │ +00055e50: 2069 6d61 6765 5f77 6964 7468 2c20 696d image_width, im │ │ │ +00055e60: 6167 655f 6865 6967 6874 2061 6e64 2069 age_height and i │ │ │ +00055e70: 6d61 6765 5f63 6861 6e6e 656c 732e 2049 mage_channels. I │ │ │ +00055e80: 7420 616c 736f 2073 6574 7320 7468 6520 t also sets the │ │ │ +00055e90: 7061 7261 6d65 7465 7273 206f 6620 7468 parameters of th │ │ │ +00055ea0: 6520 5345 4544 530a 2073 7570 6572 7069 e SEEDS. superpi │ │ │ +00055eb0: 7865 6c20 616c 676f 7269 7468 6d2c 2077 xel algorithm, w │ │ │ +00055ec0: 6869 6368 2061 7265 3a20 6e75 6d5f 7375 hich are: num_su │ │ │ +00055ed0: 7065 7270 6978 656c 732c 206e 756d 5f6c perpixels, num_l │ │ │ +00055ee0: 6576 656c 732c 2075 7365 5f70 7269 6f72 evels, use_prior │ │ │ +00055ef0: 2c20 6869 7374 6f67 7261 6d5f 6269 6e73 , histogram_bins │ │ │ +00055f00: 2061 6e64 0a20 646f 7562 6c65 5f73 7465 and. double_ste │ │ │ +00055f10: 702e 0a0a 2054 6865 206e 756d 6265 7220 p... The number │ │ │ +00055f20: 6f66 206c 6576 656c 7320 696e 206e 756d of levels in num │ │ │ +00055f30: 5f6c 6576 656c 7320 6465 6669 6e65 7320 _levels defines │ │ │ +00055f40: 7468 6520 616d 6f75 6e74 206f 6620 626c the amount of bl │ │ │ +00055f50: 6f63 6b20 6c65 7665 6c73 2074 6861 7420 ock levels that │ │ │ +00055f60: 7468 6520 616c 676f 7269 7468 6d20 7573 the algorithm us │ │ │ +00055f70: 6520 696e 2074 6865 0a20 6f70 7469 6d69 e in the. optimi │ │ │ +00055f80: 7a61 7469 6f6e 2e20 5468 6520 696e 6974 zation. The init │ │ │ +00055f90: 6961 6c69 7a61 7469 6f6e 2069 7320 6120 ialization is a │ │ │ +00055fa0: 6772 6964 2c20 696e 2077 6869 6368 2074 grid, in which t │ │ │ +00055fb0: 6865 2073 7570 6572 7069 7865 6c73 2061 he superpixels a │ │ │ +00055fc0: 7265 2065 7175 616c 6c79 2064 6973 7472 re equally distr │ │ │ +00055fd0: 6962 7574 6564 2074 6872 6f75 6768 0a20 ibuted through. │ │ │ +00055fe0: 7468 6520 7769 6474 6820 616e 6420 7468 the width and th │ │ │ +00055ff0: 6520 6865 6967 6874 206f 6620 7468 6520 e height of the │ │ │ +00056000: 696d 6167 652e 2054 6865 206c 6172 6765 image. The large │ │ │ +00056010: 7220 626c 6f63 6b73 2063 6f72 7265 7370 r blocks corresp │ │ │ +00056020: 6f6e 6420 746f 2074 6865 2073 7570 6572 ond to the super │ │ │ +00056030: 7069 7865 6c20 7369 7a65 2c20 616e 6420 pixel size, and │ │ │ +00056040: 7468 650a 206c 6576 656c 7320 7769 7468 the. levels with │ │ │ +00056050: 2073 6d61 6c6c 6572 2062 6c6f 636b 7320 smaller blocks │ │ │ +00056060: 6172 6520 666f 726d 6564 2062 7920 6469 are formed by di │ │ │ +00056070: 7669 6469 6e67 2074 6865 206c 6172 6765 viding the large │ │ │ +00056080: 7220 626c 6f63 6b73 2069 6e74 6f20 3220 r blocks into 2 │ │ │ +00056090: 7820 3220 626c 6f63 6b73 206f 6620 7069 x 2 blocks of pi │ │ │ +000560a0: 7865 6c73 2c0a 2072 6563 7572 7369 7665 xels,. recursive │ │ │ +000560b0: 6c79 2075 6e74 696c 2074 6865 2073 6d61 ly until the sma │ │ │ +000560c0: 6c6c 6572 2062 6c6f 636b 206c 6576 656c ller block level │ │ │ +000560d0: 2e20 416e 2065 7861 6d70 6c65 206f 6620 . An example of │ │ │ +000560e0: 696e 6974 6961 6c69 7a61 7469 6f6e 206f initialization o │ │ │ +000560f0: 6620 3420 626c 6f63 6b20 6c65 7665 6c73 f 4 block levels │ │ │ +00056100: 2069 730a 2069 6c6c 7573 7472 6174 6564 is. illustrated │ │ │ +00056110: 2069 6e20 7468 6520 666f 6c6c 6f77 696e in the followin │ │ │ +00056120: 6720 6669 6775 7265 2e0a 0a20 215b 696d g figure... ![im │ │ │ +00056130: 6167 655d 2870 6963 732f 7375 7065 7270 age](pics/superp │ │ │ +00056140: 6978 656c 735f 626c 6f63 6b73 2e70 6e67 ixels_blocks.png │ │ │ +00056150: 293c 2f64 643e 0a3c 6474 3e52 6574 7572 ).
    Retur │ │ │ +00056160: 6e73 3a3c 2f64 743e 0a3c 6464 3e61 7574 ns:
    .
    aut │ │ │ +00056170: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ +00056180: 6174 6564 3c2f 6464 3e0a 3c2f 646c 3e0a ated
    .. │ │ │ +00056190: 3c2f 7365 6374 696f 6e3e 0a3c 2f6c 693e .

  • │ │ │ +000561a0: 0a3c 6c69 3e0a 3c73 6563 7469 6f6e 2063 .
  • .
    │ │ │ +00056220: 0a3c 6833 3e52 6164 6f6e 5472 616e 7366 .

    RadonTransf │ │ │ +00056230: 6f72 6d3c 2f68 333e 0a3c 6469 7620 636c orm

    .
    p │ │ │ +00056270: 7562 6c69 6320 7374 6174 6963 3c2f 7370 ublic static void&n │ │ │ +000562b0: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;R │ │ │ +000562d0: 6164 6f6e 5472 616e 7366 6f72 6d3c 2f73 adonTransform(M │ │ │ +00056340: 6174 3c2f 613e 266e 6273 703b 7372 632c at src, │ │ │ +00056350: 0a20 3c61 2068 7265 663d 222e 2e2f 636f . Ma │ │ │ +00056390: 743c 2f61 3e26 6e62 7370 3b64 7374 2c0a t dst,. │ │ │ +000563a0: 2064 6f75 626c 6526 6e62 7370 3b74 6865 double the │ │ │ +000563b0: 7461 2c0a 2064 6f75 626c 6526 6e62 7370 ta,. double  │ │ │ +000563c0: 3b73 7461 7274 5f61 6e67 6c65 2c0a 2064 ;start_angle,. d │ │ │ +000563d0: 6f75 626c 6526 6e62 7370 3b65 6e64 5f61 ouble end_a │ │ │ +000563e0: 6e67 6c65 2c0a 2062 6f6f 6c65 616e 266e ngle,. boolean&n │ │ │ +000563f0: 6273 703b 6372 6f70 2c0a 2062 6f6f 6c65 bsp;crop,. boole │ │ │ +00056400: 616e 266e 6273 703b 6e6f 726d 293c 2f73 an norm)
    .
    Ca │ │ │ +00056430: 6c63 756c 6174 6520 5261 646f 6e20 5472 lculate Radon Tr │ │ │ +00056440: 616e 7366 6f72 6d20 6f66 2061 6e20 696d ansform of an im │ │ │ +00056450: 6167 652e 0a0a 2054 6869 7320 6675 6e63 age... This func │ │ │ +00056460: 7469 6f6e 2063 616c 6375 6c61 7465 7320 tion calculates │ │ │ +00056470: 7468 6520 5261 646f 6e20 5472 616e 7366 the Radon Transf │ │ │ +00056480: 6f72 6d20 6f66 2061 2067 6976 656e 2069 orm of a given i │ │ │ +00056490: 6d61 6765 2069 6e20 616e 7920 7261 6e67 mage in any rang │ │ │ +000564a0: 652e 0a20 5365 6520 6874 7470 733a 2f2f e.. See https:// │ │ │ +000564b0: 656e 6769 6e65 6572 696e 672e 7075 7264 engineering.purd │ │ │ +000564c0: 7565 2e65 6475 2f7e 6d61 6c63 6f6c 6d2f ue.edu/~malcolm/ │ │ │ +000564d0: 7063 742f 4354 495f 4368 3033 2e70 6466 pct/CTI_Ch03.pdf │ │ │ +000564e0: 2066 6f72 2064 6574 6169 6c2e 0a20 4966 for detail.. If │ │ │ +000564f0: 2074 6865 2069 6e70 7574 2074 7970 6520 the input type │ │ │ +00056500: 6973 2043 565f 3855 2c20 7468 6520 6f75 is CV_8U, the ou │ │ │ +00056510: 7470 7574 2077 696c 6c20 6265 2043 565f tput will be CV_ │ │ │ +00056520: 3332 532e 0a20 4966 2074 6865 2069 6e70 32S.. If the inp │ │ │ +00056530: 7574 2074 7970 6520 6973 2043 565f 3332 ut type is CV_32 │ │ │ +00056540: 4620 6f72 2043 565f 3634 462c 2074 6865 F or CV_64F, the │ │ │ +00056550: 206f 7574 7075 7420 7769 6c6c 2062 6520 output will be │ │ │ +00056560: 4356 5f36 3446 0a20 5468 6520 6f75 7470 CV_64F. The outp │ │ │ +00056570: 7574 2073 697a 6520 7769 6c6c 2062 6520 ut size will be │ │ │ +00056580: 6e75 6d5f 6f66 5f69 6e74 6567 7261 6c20 num_of_integral │ │ │ +00056590: 7820 7372 635f 6469 6167 6f6e 616c 5f6c x src_diagonal_l │ │ │ +000565a0: 656e 6774 682e 0a20 4966 2063 726f 7020 ength.. If crop │ │ │ +000565b0: 6973 2073 656c 6563 7465 642c 2074 6865 is selected, the │ │ │ +000565c0: 2069 6e70 7574 2069 6d61 6765 2077 696c input image wil │ │ │ +000565d0: 6c20 6265 2063 726f 7020 696e 746f 2073 l be crop into s │ │ │ +000565e0: 7175 6172 6520 7468 656e 2063 6972 636c quare then circl │ │ │ +000565f0: 652c 0a20 616e 6420 6f75 7470 7574 2073 e,. and output s │ │ │ +00056600: 697a 6520 7769 6c6c 2062 6520 6e75 6d5f ize will be num_ │ │ │ +00056610: 6f66 5f69 6e74 6567 7261 6c20 7820 6d69 of_integral x mi │ │ │ +00056620: 6e5f 6564 6765 2e3c 2f64 6976 3e0a 3c64 n_edge.
    . │ │ │ +00056640: 0a3c 6474 3e50 6172 616d 6574 6572 733a .
    Parameters: │ │ │ +00056650: 3c2f 6474 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +00056660: 7372 633c 2f63 6f64 653e 202d 2061 7574 src - aut │ │ │ +00056670: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ +00056680: 6174 6564 3c2f 6464 3e0a 3c64 643e 3c63 ated
    .
    dst - │ │ │ +000566a0: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ +000566b0: 656e 6572 6174 6564 3c2f 6464 3e0a 3c64 enerated
    .theta - automatic │ │ │ +000566e0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    st │ │ │ +00056700: 6172 745f 616e 676c 653c 2f63 6f64 653e art_angle │ │ │ +00056710: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ +00056720: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
    . │ │ │ +00056730: 3c64 643e 3c63 6f64 653e 656e 645f 616e
    end_an │ │ │ +00056740: 676c 653c 2f63 6f64 653e 202d 2061 7574 gle - aut │ │ │ +00056750: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ +00056760: 6174 6564 3c2f 6464 3e0a 3c64 643e 3c63 ated
    .
    crop │ │ │ +00056780: 2d20 6175 746f 6d61 7469 6361 6c6c 7920 - automatically │ │ │ +00056790: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated
    .< │ │ │ +000567a0: 6464 3e3c 636f 6465 3e6e 6f72 6d3c 2f63 dd>norm - automatic │ │ │ +000567c0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated...
  • .
  • . │ │ │ +000567f0: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    RadonTran │ │ │ +00056870: 7366 6f72 6d3c 2f68 333e 0a3c 6469 7620 sform

    .
    public static void │ │ │ +000568f0: 266e 6273 703b 3c73 7061 6e20 636c 6173  RadonTransform< │ │ │ +00056920: 2f73 7061 6e3e 3c77 6272 3e3c 7370 616e /span>(Mat sr │ │ │ +00056990: 632c 0a20 3c61 2068 7265 663d 222e 2e2f c,. │ │ │ +000569d0: 4d61 743c 2f61 3e26 6e62 7370 3b64 7374 Mat dst │ │ │ +000569e0: 2c0a 2064 6f75 626c 6526 6e62 7370 3b74 ,. double t │ │ │ +000569f0: 6865 7461 2c0a 2064 6f75 626c 6526 6e62 heta,. double&nb │ │ │ +00056a00: 7370 3b73 7461 7274 5f61 6e67 6c65 2c0a sp;start_angle,. │ │ │ +00056a10: 2064 6f75 626c 6526 6e62 7370 3b65 6e64 double end │ │ │ +00056a20: 5f61 6e67 6c65 2c0a 2062 6f6f 6c65 616e _angle,. boolean │ │ │ +00056a30: 266e 6273 703b 6372 6f70 293c 2f73 7061  crop)
    .
    Calc │ │ │ +00056a60: 756c 6174 6520 5261 646f 6e20 5472 616e ulate Radon Tran │ │ │ +00056a70: 7366 6f72 6d20 6f66 2061 6e20 696d 6167 sform of an imag │ │ │ +00056a80: 652e 0a0a 2054 6869 7320 6675 6e63 7469 e... This functi │ │ │ +00056a90: 6f6e 2063 616c 6375 6c61 7465 7320 7468 on calculates th │ │ │ +00056aa0: 6520 5261 646f 6e20 5472 616e 7366 6f72 e Radon Transfor │ │ │ +00056ab0: 6d20 6f66 2061 2067 6976 656e 2069 6d61 m of a given ima │ │ │ +00056ac0: 6765 2069 6e20 616e 7920 7261 6e67 652e ge in any range. │ │ │ +00056ad0: 0a20 5365 6520 6874 7470 733a 2f2f 656e . See https://en │ │ │ +00056ae0: 6769 6e65 6572 696e 672e 7075 7264 7565 gineering.purdue │ │ │ +00056af0: 2e65 6475 2f7e 6d61 6c63 6f6c 6d2f 7063 .edu/~malcolm/pc │ │ │ +00056b00: 742f 4354 495f 4368 3033 2e70 6466 2066 t/CTI_Ch03.pdf f │ │ │ +00056b10: 6f72 2064 6574 6169 6c2e 0a20 4966 2074 or detail.. If t │ │ │ +00056b20: 6865 2069 6e70 7574 2074 7970 6520 6973 he input type is │ │ │ +00056b30: 2043 565f 3855 2c20 7468 6520 6f75 7470 CV_8U, the outp │ │ │ +00056b40: 7574 2077 696c 6c20 6265 2043 565f 3332 ut will be CV_32 │ │ │ +00056b50: 532e 0a20 4966 2074 6865 2069 6e70 7574 S.. If the input │ │ │ +00056b60: 2074 7970 6520 6973 2043 565f 3332 4620 type is CV_32F │ │ │ +00056b70: 6f72 2043 565f 3634 462c 2074 6865 206f or CV_64F, the o │ │ │ +00056b80: 7574 7075 7420 7769 6c6c 2062 6520 4356 utput will be CV │ │ │ +00056b90: 5f36 3446 0a20 5468 6520 6f75 7470 7574 _64F. The output │ │ │ +00056ba0: 2073 697a 6520 7769 6c6c 2062 6520 6e75 size will be nu │ │ │ +00056bb0: 6d5f 6f66 5f69 6e74 6567 7261 6c20 7820 m_of_integral x │ │ │ +00056bc0: 7372 635f 6469 6167 6f6e 616c 5f6c 656e src_diagonal_len │ │ │ +00056bd0: 6774 682e 0a20 4966 2063 726f 7020 6973 gth.. If crop is │ │ │ +00056be0: 2073 656c 6563 7465 642c 2074 6865 2069 selected, the i │ │ │ +00056bf0: 6e70 7574 2069 6d61 6765 2077 696c 6c20 nput image will │ │ │ +00056c00: 6265 2063 726f 7020 696e 746f 2073 7175 be crop into squ │ │ │ +00056c10: 6172 6520 7468 656e 2063 6972 636c 652c are then circle, │ │ │ +00056c20: 0a20 616e 6420 6f75 7470 7574 2073 697a . and output siz │ │ │ +00056c30: 6520 7769 6c6c 2062 6520 6e75 6d5f 6f66 e will be num_of │ │ │ +00056c40: 5f69 6e74 6567 7261 6c20 7820 6d69 6e5f _integral x min_ │ │ │ +00056c50: 6564 6765 2e3c 2f64 6976 3e0a 3c64 6c20 edge.
    .
    .< │ │ │ +00056c70: 6474 3e50 6172 616d 6574 6572 733a 3c2f dt>Parameters:.
    sr │ │ │ +00056c90: 633c 2f63 6f64 653e 202d 2061 7574 6f6d c - autom │ │ │ +00056ca0: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +00056cb0: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
    .
    dst - a │ │ │ +00056cd0: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ +00056ce0: 6572 6174 6564 3c2f 6464 3e0a 3c64 643e erated
    .
    │ │ │ +00056cf0: 3c63 6f64 653e 7468 6574 613c 2f63 6f64 theta - automatical │ │ │ +00056d10: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated
    .
    star │ │ │ +00056d30: 745f 616e 676c 653c 2f63 6f64 653e 202d t_angle - │ │ │ +00056d40: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ +00056d50: 656e 6572 6174 6564 3c2f 6464 3e0a 3c64 enerated
    .end_angl │ │ │ +00056d70: 653c 2f63 6f64 653e 202d 2061 7574 6f6d e - autom │ │ │ +00056d80: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +00056d90: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed.
    crop - │ │ │ +00056db0: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +00056dc0: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
    ..
    ..
  • ..

    RadonTra │ │ │ +00056e60: 6e73 666f 726d 3c2f 6833 3e0a 3c64 6976 nsform

    .
    public static< │ │ │ +00056eb0: 2f73 7061 6e3e 266e 6273 703b 3c73 7061 /span> void RadonTransform │ │ │ +00056f10: 3c2f 7370 616e 3e3c 7762 723e 3c73 7061 (Mat s │ │ │ +00056f80: 7263 2c0a 203c 6120 6872 6566 3d22 2e2e rc,. Mat ds │ │ │ +00056fd0: 742c 0a20 646f 7562 6c65 266e 6273 703b t,. double  │ │ │ +00056fe0: 7468 6574 612c 0a20 646f 7562 6c65 266e theta,. double&n │ │ │ +00056ff0: 6273 703b 7374 6172 745f 616e 676c 652c bsp;start_angle, │ │ │ +00057000: 0a20 646f 7562 6c65 266e 6273 703b 656e . double en │ │ │ +00057010: 645f 616e 676c 6529 3c2f 7370 616e 3e3c d_angle)< │ │ │ +00057020: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Calcula │ │ │ +00057040: 7465 2052 6164 6f6e 2054 7261 6e73 666f te Radon Transfo │ │ │ +00057050: 726d 206f 6620 616e 2069 6d61 6765 2e0a rm of an image.. │ │ │ +00057060: 0a20 5468 6973 2066 756e 6374 696f 6e20 . This function │ │ │ +00057070: 6361 6c63 756c 6174 6573 2074 6865 2052 calculates the R │ │ │ +00057080: 6164 6f6e 2054 7261 6e73 666f 726d 206f adon Transform o │ │ │ +00057090: 6620 6120 6769 7665 6e20 696d 6167 6520 f a given image │ │ │ +000570a0: 696e 2061 6e79 2072 616e 6765 2e0a 2053 in any range.. S │ │ │ +000570b0: 6565 2068 7474 7073 3a2f 2f65 6e67 696e ee https://engin │ │ │ +000570c0: 6565 7269 6e67 2e70 7572 6475 652e 6564 eering.purdue.ed │ │ │ +000570d0: 752f 7e6d 616c 636f 6c6d 2f70 6374 2f43 u/~malcolm/pct/C │ │ │ +000570e0: 5449 5f43 6830 332e 7064 6620 666f 7220 TI_Ch03.pdf for │ │ │ +000570f0: 6465 7461 696c 2e0a 2049 6620 7468 6520 detail.. If the │ │ │ +00057100: 696e 7075 7420 7479 7065 2069 7320 4356 input type is CV │ │ │ +00057110: 5f38 552c 2074 6865 206f 7574 7075 7420 _8U, the output │ │ │ +00057120: 7769 6c6c 2062 6520 4356 5f33 3253 2e0a will be CV_32S.. │ │ │ +00057130: 2049 6620 7468 6520 696e 7075 7420 7479 If the input ty │ │ │ +00057140: 7065 2069 7320 4356 5f33 3246 206f 7220 pe is CV_32F or │ │ │ +00057150: 4356 5f36 3446 2c20 7468 6520 6f75 7470 CV_64F, the outp │ │ │ +00057160: 7574 2077 696c 6c20 6265 2043 565f 3634 ut will be CV_64 │ │ │ +00057170: 460a 2054 6865 206f 7574 7075 7420 7369 F. The output si │ │ │ +00057180: 7a65 2077 696c 6c20 6265 206e 756d 5f6f ze will be num_o │ │ │ +00057190: 665f 696e 7465 6772 616c 2078 2073 7263 f_integral x src │ │ │ +000571a0: 5f64 6961 676f 6e61 6c5f 6c65 6e67 7468 _diagonal_length │ │ │ +000571b0: 2e0a 2049 6620 6372 6f70 2069 7320 7365 .. If crop is se │ │ │ +000571c0: 6c65 6374 6564 2c20 7468 6520 696e 7075 lected, the inpu │ │ │ +000571d0: 7420 696d 6167 6520 7769 6c6c 2062 6520 t image will be │ │ │ +000571e0: 6372 6f70 2069 6e74 6f20 7371 7561 7265 crop into square │ │ │ +000571f0: 2074 6865 6e20 6369 7263 6c65 2c0a 2061 then circle,. a │ │ │ +00057200: 6e64 206f 7574 7075 7420 7369 7a65 2077 nd output size w │ │ │ +00057210: 696c 6c20 6265 206e 756d 5f6f 665f 696e ill be num_of_in │ │ │ +00057220: 7465 6772 616c 2078 206d 696e 5f65 6467 tegral x min_edg │ │ │ +00057230: 652e 3c2f 6469 763e 0a3c 646c 2063 6c61 e.
    .
    .
    │ │ │ +00057250: 5061 7261 6d65 7465 7273 3a3c 2f64 743e Parameters:
    │ │ │ +00057260: 0a3c 6464 3e3c 636f 6465 3e73 7263 3c2f .
    src - automati │ │ │ +00057280: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +00057290: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e64 /dd>.
    d │ │ │ +000572a0: 7374 3c2f 636f 6465 3e20 2d20 6175 746f st - auto │ │ │ +000572b0: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ +000572c0: 7465 643c 2f64 643e 0a3c 6464 3e3c 636f ted
    .
    theta │ │ │ +000572e0: 2d20 6175 746f 6d61 7469 6361 6c6c 7920 - automatically │ │ │ +000572f0: 6765 6e65 7261 7465 643c 2f64 643e 0a3c generated
    .< │ │ │ +00057300: 6464 3e3c 636f 6465 3e73 7461 7274 5f61 dd>start_a │ │ │ +00057310: 6e67 6c65 3c2f 636f 6465 3e20 2d20 6175 ngle - au │ │ │ +00057320: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ +00057330: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated.
    < │ │ │ +00057340: 636f 6465 3e65 6e64 5f61 6e67 6c65 3c2f code>end_angle - automati │ │ │ +00057360: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +00057370: 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 6563 /dd>.
    ..
  • .
  • │ │ │ +00057390: 0a3c 7365 6374 696f 6e20 636c 6173 733d .
    .

    RadonTr │ │ │ +00057400: 616e 7366 6f72 6d3c 2f68 333e 0a3c 6469 ansform

    .public static │ │ │ +00057450: 3c2f 7370 616e 3e26 6e62 7370 3b3c 7370  void RadonTransfor │ │ │ +000574b0: 6d3c 2f73 7061 6e3e 3c77 6272 3e3c 7370 m(Mat  │ │ │ +00057520: 7372 632c 0a20 3c61 2068 7265 663d 222e src,. Mat d │ │ │ +00057570: 7374 2c0a 2064 6f75 626c 6526 6e62 7370 st,. double  │ │ │ +00057580: 3b74 6865 7461 2c0a 2064 6f75 626c 6526 ;theta,. double& │ │ │ +00057590: 6e62 7370 3b73 7461 7274 5f61 6e67 6c65 nbsp;start_angle │ │ │ +000575a0: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ).< │ │ │ +000575b0: 6469 7620 636c 6173 733d 2262 6c6f 636b div class="block │ │ │ +000575c0: 223e 4361 6c63 756c 6174 6520 5261 646f ">Calculate Rado │ │ │ +000575d0: 6e20 5472 616e 7366 6f72 6d20 6f66 2061 n Transform of a │ │ │ +000575e0: 6e20 696d 6167 652e 0a0a 2054 6869 7320 n image... This │ │ │ +000575f0: 6675 6e63 7469 6f6e 2063 616c 6375 6c61 function calcula │ │ │ +00057600: 7465 7320 7468 6520 5261 646f 6e20 5472 tes the Radon Tr │ │ │ +00057610: 616e 7366 6f72 6d20 6f66 2061 2067 6976 ansform of a giv │ │ │ +00057620: 656e 2069 6d61 6765 2069 6e20 616e 7920 en image in any │ │ │ +00057630: 7261 6e67 652e 0a20 5365 6520 6874 7470 range.. See http │ │ │ +00057640: 733a 2f2f 656e 6769 6e65 6572 696e 672e s://engineering. │ │ │ +00057650: 7075 7264 7565 2e65 6475 2f7e 6d61 6c63 purdue.edu/~malc │ │ │ +00057660: 6f6c 6d2f 7063 742f 4354 495f 4368 3033 olm/pct/CTI_Ch03 │ │ │ +00057670: 2e70 6466 2066 6f72 2064 6574 6169 6c2e .pdf for detail. │ │ │ +00057680: 0a20 4966 2074 6865 2069 6e70 7574 2074 . If the input t │ │ │ +00057690: 7970 6520 6973 2043 565f 3855 2c20 7468 ype is CV_8U, th │ │ │ +000576a0: 6520 6f75 7470 7574 2077 696c 6c20 6265 e output will be │ │ │ +000576b0: 2043 565f 3332 532e 0a20 4966 2074 6865 CV_32S.. If the │ │ │ +000576c0: 2069 6e70 7574 2074 7970 6520 6973 2043 input type is C │ │ │ +000576d0: 565f 3332 4620 6f72 2043 565f 3634 462c V_32F or CV_64F, │ │ │ +000576e0: 2074 6865 206f 7574 7075 7420 7769 6c6c the output will │ │ │ +000576f0: 2062 6520 4356 5f36 3446 0a20 5468 6520 be CV_64F. The │ │ │ +00057700: 6f75 7470 7574 2073 697a 6520 7769 6c6c output size will │ │ │ +00057710: 2062 6520 6e75 6d5f 6f66 5f69 6e74 6567 be num_of_integ │ │ │ +00057720: 7261 6c20 7820 7372 635f 6469 6167 6f6e ral x src_diagon │ │ │ +00057730: 616c 5f6c 656e 6774 682e 0a20 4966 2063 al_length.. If c │ │ │ +00057740: 726f 7020 6973 2073 656c 6563 7465 642c rop is selected, │ │ │ +00057750: 2074 6865 2069 6e70 7574 2069 6d61 6765 the input image │ │ │ +00057760: 2077 696c 6c20 6265 2063 726f 7020 696e will be crop in │ │ │ +00057770: 746f 2073 7175 6172 6520 7468 656e 2063 to square then c │ │ │ +00057780: 6972 636c 652c 0a20 616e 6420 6f75 7470 ircle,. and outp │ │ │ +00057790: 7574 2073 697a 6520 7769 6c6c 2062 6520 ut size will be │ │ │ +000577a0: 6e75 6d5f 6f66 5f69 6e74 6567 7261 6c20 num_of_integral │ │ │ +000577b0: 7820 6d69 6e5f 6564 6765 2e3c 2f64 6976 x min_edge..
    .
    Paramet │ │ │ +000577e0: 6572 733a 3c2f 6474 3e0a 3c64 643e 3c63 ers:
    .
    src - │ │ │ +00057800: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ +00057810: 656e 6572 6174 6564 3c2f 6464 3e0a 3c64 enerated
    .dst - automatical │ │ │ +00057840: 6c79 2067 656e 6572 6174 6564 3c2f 6464 ly generated.
    thet │ │ │ +00057860: 613c 2f63 6f64 653e 202d 2061 7574 6f6d a - autom │ │ │ +00057870: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat │ │ │ +00057880: 6564 3c2f 6464 3e0a 3c64 643e 3c63 6f64 ed
    .
    start_angle - automatic │ │ │ +000578b0: 616c 6c79 2067 656e 6572 6174 6564 3c2f ally generated.
    ..
  • .
  • . │ │ │ +000578e0: 3c73 6563 7469 6f6e 2063 6c61 7373 3d22
    .

    RadonTransform< │ │ │ +00057950: 2f68 333e 0a3c 6469 7620 636c 6173 733d /h3>.
    publi │ │ │ +00057990: 6320 7374 6174 6963 3c2f 7370 616e 3e26 c static& │ │ │ +000579a0: 6e62 7370 3b3c 7370 616e 2063 6c61 7373 nbsp;v │ │ │ +000579c0: 6f69 643c 2f73 7061 6e3e 266e 6273 703b oid  │ │ │ +000579d0: 3c73 7061 6e20 636c 6173 733d 2265 6c65 Radon │ │ │ +000579f0: 5472 616e 7366 6f72 6d3c 2f73 7061 6e3e Transform │ │ │ +00057a00: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ +00057a20: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ +00057a30: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ +00057a40: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +00057a50: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat src,. Mat dst,. dou │ │ │ +00057ac0: 626c 6526 6e62 7370 3b74 6865 7461 293c ble theta)< │ │ │ +00057ad0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ +00057af0: 4361 6c63 756c 6174 6520 5261 646f 6e20 Calculate Radon │ │ │ +00057b00: 5472 616e 7366 6f72 6d20 6f66 2061 6e20 Transform of an │ │ │ +00057b10: 696d 6167 652e 0a0a 2054 6869 7320 6675 image... This fu │ │ │ +00057b20: 6e63 7469 6f6e 2063 616c 6375 6c61 7465 nction calculate │ │ │ +00057b30: 7320 7468 6520 5261 646f 6e20 5472 616e s the Radon Tran │ │ │ +00057b40: 7366 6f72 6d20 6f66 2061 2067 6976 656e sform of a given │ │ │ +00057b50: 2069 6d61 6765 2069 6e20 616e 7920 7261 image in any ra │ │ │ +00057b60: 6e67 652e 0a20 5365 6520 6874 7470 733a nge.. See https: │ │ │ +00057b70: 2f2f 656e 6769 6e65 6572 696e 672e 7075 //engineering.pu │ │ │ +00057b80: 7264 7565 2e65 6475 2f7e 6d61 6c63 6f6c rdue.edu/~malcol │ │ │ +00057b90: 6d2f 7063 742f 4354 495f 4368 3033 2e70 m/pct/CTI_Ch03.p │ │ │ +00057ba0: 6466 2066 6f72 2064 6574 6169 6c2e 0a20 df for detail.. │ │ │ +00057bb0: 4966 2074 6865 2069 6e70 7574 2074 7970 If the input typ │ │ │ +00057bc0: 6520 6973 2043 565f 3855 2c20 7468 6520 e is CV_8U, the │ │ │ +00057bd0: 6f75 7470 7574 2077 696c 6c20 6265 2043 output will be C │ │ │ +00057be0: 565f 3332 532e 0a20 4966 2074 6865 2069 V_32S.. If the i │ │ │ +00057bf0: 6e70 7574 2074 7970 6520 6973 2043 565f nput type is CV_ │ │ │ +00057c00: 3332 4620 6f72 2043 565f 3634 462c 2074 32F or CV_64F, t │ │ │ +00057c10: 6865 206f 7574 7075 7420 7769 6c6c 2062 he output will b │ │ │ +00057c20: 6520 4356 5f36 3446 0a20 5468 6520 6f75 e CV_64F. The ou │ │ │ +00057c30: 7470 7574 2073 697a 6520 7769 6c6c 2062 tput size will b │ │ │ +00057c40: 6520 6e75 6d5f 6f66 5f69 6e74 6567 7261 e num_of_integra │ │ │ +00057c50: 6c20 7820 7372 635f 6469 6167 6f6e 616c l x src_diagonal │ │ │ +00057c60: 5f6c 656e 6774 682e 0a20 4966 2063 726f _length.. If cro │ │ │ +00057c70: 7020 6973 2073 656c 6563 7465 642c 2074 p is selected, t │ │ │ +00057c80: 6865 2069 6e70 7574 2069 6d61 6765 2077 he input image w │ │ │ +00057c90: 696c 6c20 6265 2063 726f 7020 696e 746f ill be crop into │ │ │ +00057ca0: 2073 7175 6172 6520 7468 656e 2063 6972 square then cir │ │ │ +00057cb0: 636c 652c 0a20 616e 6420 6f75 7470 7574 cle,. and output │ │ │ +00057cc0: 2073 697a 6520 7769 6c6c 2062 6520 6e75 size will be nu │ │ │ +00057cd0: 6d5f 6f66 5f69 6e74 6567 7261 6c20 7820 m_of_integral x │ │ │ +00057ce0: 6d69 6e5f 6564 6765 2e3c 2f64 6976 3e0a min_edge.. │ │ │ +00057cf0: 3c64 6c20 636c 6173 733d 226e 6f74 6573
    .
    Parameter │ │ │ +00057d10: 733a 3c2f 6474 3e0a 3c64 643e 3c63 6f64 s:
    .
    src - a │ │ │ +00057d30: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ +00057d40: 6572 6174 6564 3c2f 6464 3e0a 3c64 643e erated
    .
    │ │ │ +00057d50: 3c63 6f64 653e 6473 743c 2f63 6f64 653e dst │ │ │ +00057d60: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ +00057d70: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated
    . │ │ │ +00057d80: 3c64 643e 3c63 6f64 653e 7468 6574 613c
    theta< │ │ │ +00057d90: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ +00057da0: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ +00057db0: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365
    .
    ..

  • .
  • .
    .

    Rado │ │ │ +00057e30: 6e54 7261 6e73 666f 726d 3c2f 6833 3e0a nTransform

    . │ │ │ +00057e40: 3c64 6976 2063 6c61 7373 3d22 6d65 6d62
    public sta │ │ │ +00057e80: 7469 633c 2f73 7061 6e3e 266e 6273 703b tic  │ │ │ +00057e90: 3c73 7061 6e20 636c 6173 733d 2272 6574 void RadonTrans │ │ │ +00057ee0: 666f 726d 3c2f 7370 616e 3e3c 7762 723e form │ │ │ +00057ef0: 3c73 7061 6e20 636c 6173 733d 2270 6172 (Mat&nb │ │ │ +00057f50: 7370 3b73 7263 2c0a 203c 6120 6872 6566 sp;src,. Mat&nbs │ │ │ +00057fa0: 703b 6473 7429 3c2f 7370 616e 3e3c 2f64 p;dst).
    Calculate │ │ │ +00057fd0: 2052 6164 6f6e 2054 7261 6e73 666f 726d Radon Transform │ │ │ +00057fe0: 206f 6620 616e 2069 6d61 6765 2e0a 0a20 of an image... │ │ │ +00057ff0: 5468 6973 2066 756e 6374 696f 6e20 6361 This function ca │ │ │ +00058000: 6c63 756c 6174 6573 2074 6865 2052 6164 lculates the Rad │ │ │ +00058010: 6f6e 2054 7261 6e73 666f 726d 206f 6620 on Transform of │ │ │ +00058020: 6120 6769 7665 6e20 696d 6167 6520 696e a given image in │ │ │ +00058030: 2061 6e79 2072 616e 6765 2e0a 2053 6565 any range.. See │ │ │ +00058040: 2068 7474 7073 3a2f 2f65 6e67 696e 6565 https://enginee │ │ │ +00058050: 7269 6e67 2e70 7572 6475 652e 6564 752f ring.purdue.edu/ │ │ │ +00058060: 7e6d 616c 636f 6c6d 2f70 6374 2f43 5449 ~malcolm/pct/CTI │ │ │ +00058070: 5f43 6830 332e 7064 6620 666f 7220 6465 _Ch03.pdf for de │ │ │ +00058080: 7461 696c 2e0a 2049 6620 7468 6520 696e tail.. If the in │ │ │ +00058090: 7075 7420 7479 7065 2069 7320 4356 5f38 put type is CV_8 │ │ │ +000580a0: 552c 2074 6865 206f 7574 7075 7420 7769 U, the output wi │ │ │ +000580b0: 6c6c 2062 6520 4356 5f33 3253 2e0a 2049 ll be CV_32S.. I │ │ │ +000580c0: 6620 7468 6520 696e 7075 7420 7479 7065 f the input type │ │ │ +000580d0: 2069 7320 4356 5f33 3246 206f 7220 4356 is CV_32F or CV │ │ │ +000580e0: 5f36 3446 2c20 7468 6520 6f75 7470 7574 _64F, the output │ │ │ +000580f0: 2077 696c 6c20 6265 2043 565f 3634 460a will be CV_64F. │ │ │ +00058100: 2054 6865 206f 7574 7075 7420 7369 7a65 The output size │ │ │ +00058110: 2077 696c 6c20 6265 206e 756d 5f6f 665f will be num_of_ │ │ │ +00058120: 696e 7465 6772 616c 2078 2073 7263 5f64 integral x src_d │ │ │ +00058130: 6961 676f 6e61 6c5f 6c65 6e67 7468 2e0a iagonal_length.. │ │ │ +00058140: 2049 6620 6372 6f70 2069 7320 7365 6c65 If crop is sele │ │ │ +00058150: 6374 6564 2c20 7468 6520 696e 7075 7420 cted, the input │ │ │ +00058160: 696d 6167 6520 7769 6c6c 2062 6520 6372 image will be cr │ │ │ +00058170: 6f70 2069 6e74 6f20 7371 7561 7265 2074 op into square t │ │ │ +00058180: 6865 6e20 6369 7263 6c65 2c0a 2061 6e64 hen circle,. and │ │ │ +00058190: 206f 7574 7075 7420 7369 7a65 2077 696c output size wil │ │ │ +000581a0: 6c20 6265 206e 756d 5f6f 665f 696e 7465 l be num_of_inte │ │ │ +000581b0: 6772 616c 2078 206d 696e 5f65 6467 652e gral x min_edge. │ │ │ +000581c0: 3c2f 6469 763e 0a3c 646c 2063 6c61 7373
    .
    .
    Pa │ │ │ +000581e0: 7261 6d65 7465 7273 3a3c 2f64 743e 0a3c rameters:
    .< │ │ │ +000581f0: 6464 3e3c 636f 6465 3e73 7263 3c2f 636f dd>src - automatica │ │ │ +00058210: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    dst │ │ │ +00058230: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ +00058240: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +00058250: 643c 2f64 643e 0a3c 2f64 6c3e 0a3c 2f73 d
    .
    .
    .
  • ..
    .

    weight │ │ │ +00058310: 6564 4d65 6469 616e 4669 6c74 6572 3c2f edMedianFilter.
    public │ │ │ +00058360: 2073 7461 7469 633c 2f73 7061 6e3e 266e static&n │ │ │ +00058370: 6273 703b 3c73 7061 6e20 636c 6173 733d bsp;vo │ │ │ +00058390: 6964 3c2f 7370 616e 3e26 6e62 7370 3b3c id < │ │ │ +000583a0: 7370 616e 2063 6c61 7373 3d22 656c 656d span class="elem │ │ │ +000583b0: 656e 742d 6e61 6d65 223e 7765 6967 6874 ent-name">weight │ │ │ +000583c0: 6564 4d65 6469 616e 4669 6c74 6572 3c2f edMedianFilter( │ │ │ +00058430: 4d61 743c 2f61 3e26 6e62 7370 3b6a 6f69 Mat joi │ │ │ +00058440: 6e74 2c0a 203c 6120 6872 6566 3d22 2e2e nt,. Mat sr │ │ │ +00058490: 632c 0a20 3c61 2068 7265 663d 222e 2e2f c,. │ │ │ +000584d0: 4d61 743c 2f61 3e26 6e62 7370 3b64 7374 Mat dst │ │ │ +000584e0: 2c0a 2069 6e74 266e 6273 703b 722c 0a20 ,. int r,. │ │ │ +000584f0: 646f 7562 6c65 266e 6273 703b 7369 676d double sigm │ │ │ +00058500: 612c 0a20 696e 7426 6e62 7370 3b77 6569 a,. int wei │ │ │ +00058510: 6768 7454 7970 652c 0a20 3c61 2068 7265 ghtType,. Mat&nb │ │ │ +00058560: 7370 3b6d 6173 6b29 3c2f 7370 616e 3e3c sp;mask)< │ │ │ +00058570: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Applies │ │ │ +00058590: 2077 6569 6768 7465 6420 6d65 6469 616e weighted median │ │ │ +000585a0: 2066 696c 7465 7220 746f 2061 6e20 696d filter to an im │ │ │ +000585b0: 6167 652e 0a0a 2046 6f72 206d 6f72 6520 age... For more │ │ │ +000585c0: 6465 7461 696c 7320 6162 6f75 7420 7468 details about th │ │ │ +000585d0: 6973 2069 6d70 6c65 6d65 6e74 6174 696f is implementatio │ │ │ +000585e0: 6e2c 2070 6c65 6173 6520 7365 6520 4349 n, please see CI │ │ │ +000585f0: 5445 3a20 7a68 616e 6732 3031 3431 3030 TE: zhang2014100 │ │ │ +00058600: 2b0a 0a20 7468 6520 7069 7865 6c20 7769 +.. the pixel wi │ │ │ +00058610: 6c6c 2062 6520 6967 6e6f 7265 6420 7768 ll be ignored wh │ │ │ +00058620: 656e 206d 6169 6e74 6169 6e69 6e67 2074 en maintaining t │ │ │ +00058630: 6865 206a 6f69 6e74 2d68 6973 746f 6772 he joint-histogr │ │ │ +00058640: 616d 2e20 5468 6973 2069 7320 7573 6566 am. This is usef │ │ │ +00058650: 756c 2066 6f72 2061 7070 6c69 6361 7469 ul for applicati │ │ │ +00058660: 6f6e 7320 6c69 6b65 206f 7074 6963 616c ons like optical │ │ │ +00058670: 2066 6c6f 7720 6f63 636c 7573 696f 6e20 flow occlusion │ │ │ +00058680: 6861 6e64 6c69 6e67 2e0a 0a20 5345 453a handling... SEE: │ │ │ +00058690: 206d 6564 6961 6e42 6c75 722c 206a 6f69 medianBlur, joi │ │ │ +000586a0: 6e74 4269 6c61 7465 7261 6c46 696c 7465 ntBilateralFilte │ │ │ +000586b0: 723c 2f64 6976 3e0a 3c64 6c20 636c 6173 r
    .
    .
    P │ │ │ +000586d0: 6172 616d 6574 6572 733a 3c2f 6474 3e0a arameters:
    . │ │ │ +000586e0: 3c64 643e 3c63 6f64 653e 6a6f 696e 743c
    joint< │ │ │ +000586f0: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ +00058700: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ +00058710: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +00058720: 7372 633c 2f63 6f64 653e 202d 2061 7574 src - aut │ │ │ +00058730: 6f6d 6174 6963 616c 6c79 2067 656e 6572 omatically gener │ │ │ +00058740: 6174 6564 3c2f 6464 3e0a 3c64 643e 3c63 ated
    .
    dst - │ │ │ +00058760: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ +00058770: 656e 6572 6174 6564 3c2f 6464 3e0a 3c64 enerated
    .r │ │ │ +00058790: 202d 2061 7574 6f6d 6174 6963 616c 6c79 - automatically │ │ │ +000587a0: 2067 656e 6572 6174 6564 3c2f 6464 3e0a generated. │ │ │ +000587b0: 3c64 643e 3c63 6f64 653e 7369 676d 613c
    sigma< │ │ │ +000587c0: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ +000587d0: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ +000587e0: 3c2f 6464 3e0a 3c64 643e 3c63 6f64 653e
    .
    │ │ │ +000587f0: 7765 6967 6874 5479 7065 3c2f 636f 6465 weightType - automaticall │ │ │ +00058810: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ +00058820: 0a3c 6464 3e3c 636f 6465 3e6d 6173 6b3c .
    mask< │ │ │ +00058830: 2f63 6f64 653e 202d 2061 7574 6f6d 6174 /code> - automat │ │ │ +00058840: 6963 616c 6c79 2067 656e 6572 6174 6564 ically generated │ │ │ +00058850: 3c2f 6464 3e0a 3c2f 646c 3e0a 3c2f 7365
    .
    ...
  • .
    │ │ │ +000588f0: 0a3c 6833 3e77 6569 6768 7465 644d 6564 .

    weightedMed │ │ │ +00058900: 6961 6e46 696c 7465 723c 2f68 333e 0a3c ianFilter

    .< │ │ │ +00058910: 6469 7620 636c 6173 733d 226d 656d 6265 div class="membe │ │ │ +00058920: 722d 7369 676e 6174 7572 6522 3e3c 7370 r-signature">public stat │ │ │ +00058950: 6963 3c2f 7370 616e 3e26 6e62 7370 3b3c ic < │ │ │ +00058960: 7370 616e 2063 6c61 7373 3d22 7265 7475 span class="retu │ │ │ +00058970: 726e 2d74 7970 6522 3e76 6f69 643c 2f73 rn-type">void
     weightedMed │ │ │ +000589b0: 6961 6e46 696c 7465 723c 2f73 7061 6e3e ianFilter │ │ │ +000589c0: 3c77 6272 3e3c 7370 616e 2063 6c61 7373 (< │ │ │ +000589e0: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ +000589f0: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ +00058a00: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +00058a10: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat joint,. │ │ │ +00058a30: 3c61 2068 7265 663d 222e 2e2f 636f 7265 Mat< │ │ │ +00058a70: 2f61 3e26 6e62 7370 3b73 7263 2c0a 203c /a> src,. < │ │ │ +00058a80: 6120 6872 6566 3d22 2e2e 2f63 6f72 652f a href="../core/ │ │ │ +00058a90: 4d61 742e 6874 6d6c 2220 7469 746c 653d Mat.html" title= │ │ │ +00058aa0: 2263 6c61 7373 2069 6e20 6f72 672e 6f70 "class in org.op │ │ │ +00058ab0: 656e 6376 2e63 6f72 6522 3e4d 6174 3c2f encv.core">Mat dst,. in │ │ │ +00058ad0: 7426 6e62 7370 3b72 2c0a 2064 6f75 626c t r,. doubl │ │ │ +00058ae0: 6526 6e62 7370 3b73 6967 6d61 2c0a 2069 e sigma,. i │ │ │ +00058af0: 6e74 266e 6273 703b 7765 6967 6874 5479 nt weightTy │ │ │ +00058b00: 7065 293c 2f73 7061 6e3e 3c2f 6469 763e pe)
  • │ │ │ +00058b10: 0a3c 6469 7620 636c 6173 733d 2262 6c6f .
    Applies weig │ │ │ +00058b30: 6874 6564 206d 6564 6961 6e20 6669 6c74 hted median filt │ │ │ +00058b40: 6572 2074 6f20 616e 2069 6d61 6765 2e0a er to an image.. │ │ │ +00058b50: 0a20 466f 7220 6d6f 7265 2064 6574 6169 . For more detai │ │ │ +00058b60: 6c73 2061 626f 7574 2074 6869 7320 696d ls about this im │ │ │ +00058b70: 706c 656d 656e 7461 7469 6f6e 2c20 706c plementation, pl │ │ │ +00058b80: 6561 7365 2073 6565 2043 4954 453a 207a ease see CITE: z │ │ │ +00058b90: 6861 6e67 3230 3134 3130 302b 0a0a 2074 hang2014100+.. t │ │ │ +00058ba0: 6865 2070 6978 656c 2077 696c 6c20 6265 he pixel will be │ │ │ +00058bb0: 2069 676e 6f72 6564 2077 6865 6e20 6d61 ignored when ma │ │ │ +00058bc0: 696e 7461 696e 696e 6720 7468 6520 6a6f intaining the jo │ │ │ +00058bd0: 696e 742d 6869 7374 6f67 7261 6d2e 2054 int-histogram. T │ │ │ +00058be0: 6869 7320 6973 2075 7365 6675 6c20 666f his is useful fo │ │ │ +00058bf0: 7220 6170 706c 6963 6174 696f 6e73 206c r applications l │ │ │ +00058c00: 696b 6520 6f70 7469 6361 6c20 666c 6f77 ike optical flow │ │ │ +00058c10: 206f 6363 6c75 7369 6f6e 2068 616e 646c occlusion handl │ │ │ +00058c20: 696e 672e 0a0a 2053 4545 3a20 6d65 6469 ing... SEE: medi │ │ │ +00058c30: 616e 426c 7572 2c20 6a6f 696e 7442 696c anBlur, jointBil │ │ │ +00058c40: 6174 6572 616c 4669 6c74 6572 3c2f 6469 ateralFilter.
    .
    Parame │ │ │ +00058c70: 7465 7273 3a3c 2f64 743e 0a3c 6464 3e3c ters:
    .
    < │ │ │ +00058c80: 636f 6465 3e6a 6f69 6e74 3c2f 636f 6465 code>joint - automaticall │ │ │ +00058ca0: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ +00058cb0: 0a3c 6464 3e3c 636f 6465 3e73 7263 3c2f .
    src - automati │ │ │ +00058cd0: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +00058ce0: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e64 /dd>.
    d │ │ │ +00058cf0: 7374 3c2f 636f 6465 3e20 2d20 6175 746f st - auto │ │ │ +00058d00: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ +00058d10: 7465 643c 2f64 643e 0a3c 6464 3e3c 636f ted
    .
    r - au │ │ │ +00058d30: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ +00058d40: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated
    .
    < │ │ │ +00058d50: 636f 6465 3e73 6967 6d61 3c2f 636f 6465 code>sigma - automaticall │ │ │ +00058d70: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ +00058d80: 0a3c 6464 3e3c 636f 6465 3e77 6569 6768 .
    weigh │ │ │ +00058d90: 7454 7970 653c 2f63 6f64 653e 202d 2061 tType - a │ │ │ +00058da0: 7574 6f6d 6174 6963 616c 6c79 2067 656e utomatically gen │ │ │ +00058db0: 6572 6174 6564 3c2f 6464 3e0a 3c2f 646c erated
    .
    .

    .
    .
  • .
    .

    weightedM │ │ │ +00058e60: 6564 6961 6e46 696c 7465 723c 2f68 333e edianFilter

    │ │ │ +00058e70: 0a3c 6469 7620 636c 6173 733d 226d 656d .
    . │ │ │ +00059070: 4170 706c 6965 7320 7765 6967 6874 6564 Applies weighted │ │ │ +00059080: 206d 6564 6961 6e20 6669 6c74 6572 2074 median filter t │ │ │ +00059090: 6f20 616e 2069 6d61 6765 2e0a 0a20 466f o an image... Fo │ │ │ +000590a0: 7220 6d6f 7265 2064 6574 6169 6c73 2061 r more details a │ │ │ +000590b0: 626f 7574 2074 6869 7320 696d 706c 656d bout this implem │ │ │ +000590c0: 656e 7461 7469 6f6e 2c20 706c 6561 7365 entation, please │ │ │ +000590d0: 2073 6565 2043 4954 453a 207a 6861 6e67 see CITE: zhang │ │ │ +000590e0: 3230 3134 3130 302b 0a0a 2074 6865 2070 2014100+.. the p │ │ │ +000590f0: 6978 656c 2077 696c 6c20 6265 2069 676e ixel will be ign │ │ │ +00059100: 6f72 6564 2077 6865 6e20 6d61 696e 7461 ored when mainta │ │ │ +00059110: 696e 696e 6720 7468 6520 6a6f 696e 742d ining the joint- │ │ │ +00059120: 6869 7374 6f67 7261 6d2e 2054 6869 7320 histogram. This │ │ │ +00059130: 6973 2075 7365 6675 6c20 666f 7220 6170 is useful for ap │ │ │ +00059140: 706c 6963 6174 696f 6e73 206c 696b 6520 plications like │ │ │ +00059150: 6f70 7469 6361 6c20 666c 6f77 206f 6363 optical flow occ │ │ │ +00059160: 6c75 7369 6f6e 2068 616e 646c 696e 672e lusion handling. │ │ │ +00059170: 0a0a 2053 4545 3a20 6d65 6469 616e 426c .. SEE: medianBl │ │ │ +00059180: 7572 2c20 6a6f 696e 7442 696c 6174 6572 ur, jointBilater │ │ │ +00059190: 616c 4669 6c74 6572 3c2f 6469 763e 0a3c alFilter.< │ │ │ +000591a0: 646c 2063 6c61 7373 3d22 6e6f 7465 7322 dl class="notes" │ │ │ +000591b0: 3e0a 3c64 743e 5061 7261 6d65 7465 7273 >.
    Parameters │ │ │ +000591c0: 3a3c 2f64 743e 0a3c 6464 3e3c 636f 6465 :
    .
    joint - │ │ │ +000591e0: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +000591f0: 6e65 7261 7465 643c 2f64 643e 0a3c 6464 nerated
    .
    src - automaticall │ │ │ +00059220: 7920 6765 6e65 7261 7465 643c 2f64 643e y generated
    │ │ │ +00059230: 0a3c 6464 3e3c 636f 6465 3e64 7374 3c2f .
    dst - automati │ │ │ +00059250: 6361 6c6c 7920 6765 6e65 7261 7465 643c cally generated< │ │ │ +00059260: 2f64 643e 0a3c 6464 3e3c 636f 6465 3e72 /dd>.
    r │ │ │ +00059270: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ +00059280: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +00059290: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d
    .
    sigma - │ │ │ +000592b0: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ +000592c0: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
    ..
    ..
  • ..

    weightedMedianF │ │ │ +00059370: 696c 7465 723c 2f68 333e 0a3c 6469 7620 ilter

    .
    public static void │ │ │ +000593f0: 266e 6273 703b 3c73 7061 6e20 636c 6173  weightedMedianF │ │ │ +00059420: 696c 7465 723c 2f73 7061 6e3e 3c77 6272 ilter(Mat&n │ │ │ +00059490: 6273 703b 6a6f 696e 742c 0a20 3c61 2068 bsp;joint,. Mat& │ │ │ +000594e0: 6e62 7370 3b73 7263 2c0a 203c 6120 6872 nbsp;src,. Mat&n │ │ │ +00059530: 6273 703b 6473 742c 0a20 696e 7426 6e62 bsp;dst,. int&nb │ │ │ +00059540: 7370 3b72 293c 2f73 7061 6e3e 3c2f 6469 sp;r).
    Applies we │ │ │ +00059570: 6967 6874 6564 206d 6564 6961 6e20 6669 ighted median fi │ │ │ +00059580: 6c74 6572 2074 6f20 616e 2069 6d61 6765 lter to an image │ │ │ +00059590: 2e0a 0a20 466f 7220 6d6f 7265 2064 6574 ... For more det │ │ │ +000595a0: 6169 6c73 2061 626f 7574 2074 6869 7320 ails about this │ │ │ +000595b0: 696d 706c 656d 656e 7461 7469 6f6e 2c20 implementation, │ │ │ +000595c0: 706c 6561 7365 2073 6565 2043 4954 453a please see CITE: │ │ │ +000595d0: 207a 6861 6e67 3230 3134 3130 302b 0a0a zhang2014100+.. │ │ │ +000595e0: 2074 6865 2070 6978 656c 2077 696c 6c20 the pixel will │ │ │ +000595f0: 6265 2069 676e 6f72 6564 2077 6865 6e20 be ignored when │ │ │ +00059600: 6d61 696e 7461 696e 696e 6720 7468 6520 maintaining the │ │ │ +00059610: 6a6f 696e 742d 6869 7374 6f67 7261 6d2e joint-histogram. │ │ │ +00059620: 2054 6869 7320 6973 2075 7365 6675 6c20 This is useful │ │ │ +00059630: 666f 7220 6170 706c 6963 6174 696f 6e73 for applications │ │ │ +00059640: 206c 696b 6520 6f70 7469 6361 6c20 666c like optical fl │ │ │ +00059650: 6f77 206f 6363 6c75 7369 6f6e 2068 616e ow occlusion han │ │ │ +00059660: 646c 696e 672e 0a0a 2053 4545 3a20 6d65 dling... SEE: me │ │ │ +00059670: 6469 616e 426c 7572 2c20 6a6f 696e 7442 dianBlur, jointB │ │ │ +00059680: 696c 6174 6572 616c 4669 6c74 6572 3c2f ilateralFilter.
    .
    Para │ │ │ +000596b0: 6d65 7465 7273 3a3c 2f64 743e 0a3c 6464 meters:
    .
    joint - automatica │ │ │ +000596e0: 6c6c 7920 6765 6e65 7261 7465 643c 2f64 lly generated.
    src │ │ │ +00059700: 3c2f 636f 6465 3e20 2d20 6175 746f 6d61 - automa │ │ │ +00059710: 7469 6361 6c6c 7920 6765 6e65 7261 7465 tically generate │ │ │ +00059720: 643c 2f64 643e 0a3c 6464 3e3c 636f 6465 d
    .
    dst - au │ │ │ +00059740: 746f 6d61 7469 6361 6c6c 7920 6765 6e65 tomatically gene │ │ │ +00059750: 7261 7465 643c 2f64 643e 0a3c 6464 3e3c rated
    .
    < │ │ │ +00059760: 636f 6465 3e72 3c2f 636f 6465 3e20 2d20 code>r - │ │ │ 00059770: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge │ │ │ 00059780: 6e65 7261 7465 643c 2f64 643e 0a3c 2f64 nerated
    ......
  • . │ │ │ 000597c0: 0a3c 2f73 6563 7469 6f6e 3e0a 3c21 2d2d .. │ │ │
  • │ │ │
    │ │ │

    Method Details

    │ │ │
      │ │ │
    • │ │ │ -
      │ │ │ -

      createSimpleWB

      │ │ │ -
      public static SimpleWB createSimpleWB()
      │ │ │ -
      Creates an instance of SimpleWB
      │ │ │ -
      │ │ │ -
      Returns:
      │ │ │ -
      automatically generated
      │ │ │ -
      │ │ │ -
      │ │ │ -
    • │ │ │ -
    • │ │ │ -
      │ │ │ -

      createGrayworldWB

      │ │ │ -
      public static GrayworldWB createGrayworldWB()
      │ │ │ -
      Creates an instance of GrayworldWB
      │ │ │ -
      │ │ │ -
      Returns:
      │ │ │ -
      automatically generated
      │ │ │ -
      │ │ │ -
      │ │ │ -
    • │ │ │ -
    • │ │ │ -
      │ │ │ -

      createLearningBasedWB

      │ │ │ -
      public static LearningBasedWB createLearningBasedWB(String path_to_model)
      │ │ │ -
      Creates an instance of LearningBasedWB
      │ │ │ +
      │ │ │ +

      dctDenoising

      │ │ │ +
      public static void dctDenoising(Mat src, │ │ │ + Mat dst, │ │ │ + double sigma, │ │ │ + int psize)
      │ │ │ +
      The function implements simple dct-based denoising │ │ │ + │ │ │ + <http://www.ipol.im/pub/art/2011/ys-dct/>.
      │ │ │
      │ │ │
      Parameters:
      │ │ │ -
      path_to_model - Path to a .yml file with the model. If not specified, the default model is used
      │ │ │ -
      Returns:
      │ │ │ -
      automatically generated
      │ │ │ -
      │ │ │ -
      │ │ │ -
    • │ │ │ -
    • │ │ │ -
      │ │ │ -

      createLearningBasedWB

      │ │ │ -
      public static LearningBasedWB createLearningBasedWB()
      │ │ │ -
      Creates an instance of LearningBasedWB
      │ │ │ -
      │ │ │ -
      Returns:
      │ │ │ -
      automatically generated
      │ │ │ +
      src - source image
      │ │ │ +
      dst - destination image
      │ │ │ +
      sigma - expected noise standard deviation
      │ │ │ +
      psize - size of block side where dct is computed │ │ │ + │ │ │ + SEE: │ │ │ + fastNlMeansDenoising
      │ │ │
      │ │ │
      │ │ │
    • │ │ │
    • │ │ │ -
      │ │ │ -

      applyChannelGains

      │ │ │ -
      public static void applyChannelGains(Mat src, │ │ │ +
      │ │ │ +

      dctDenoising

      │ │ │ +
      public static void dctDenoising(Mat src, │ │ │ Mat dst, │ │ │ - float gainB, │ │ │ - float gainG, │ │ │ - float gainR)
      │ │ │ -
      Implements an efficient fixed-point approximation for applying channel gains, which is │ │ │ - the last step of multiple white balance algorithms.
      │ │ │ + double sigma)
      │ │ │ +
      The function implements simple dct-based denoising │ │ │ + │ │ │ + <http://www.ipol.im/pub/art/2011/ys-dct/>.
      │ │ │
      │ │ │
      Parameters:
      │ │ │ -
      src - Input three-channel image in the BGR color space (either CV_8UC3 or CV_16UC3)
      │ │ │ -
      dst - Output image of the same size and type as src.
      │ │ │ -
      gainB - gain for the B channel
      │ │ │ -
      gainG - gain for the G channel
      │ │ │ -
      gainR - gain for the R channel
      │ │ │ +
      src - source image
      │ │ │ +
      dst - destination image
      │ │ │ +
      sigma - expected noise standard deviation │ │ │ + │ │ │ + SEE: │ │ │ + fastNlMeansDenoising
      │ │ │
      │ │ │
      │ │ │
    • │ │ │
    • │ │ │
      │ │ │

      createTonemapDurand

      │ │ │
      public static TonemapDurand createTonemapDurand(float gamma, │ │ │ @@ -931,52 +907,14 @@ │ │ │
      │ │ │
      Returns:
      │ │ │
      automatically generated
      │ │ │
      │ │ │
      │ │ │
    • │ │ │
    • │ │ │ -
      │ │ │ -

      oilPainting

      │ │ │ -
      public static void oilPainting(Mat src, │ │ │ - Mat dst, │ │ │ - int size, │ │ │ - int dynRatio, │ │ │ - int code)
      │ │ │ -
      oilPainting │ │ │ - See the book CITE: Holzmann1988 for details.
      │ │ │ -
      │ │ │ -
      Parameters:
      │ │ │ -
      src - Input three-channel or one channel image (either CV_8UC3 or CV_8UC1)
      │ │ │ -
      dst - Output image of the same size and type as src.
      │ │ │ -
      size - neighbouring size is 2-size+1
      │ │ │ -
      dynRatio - image is divided by dynRatio before histogram processing
      │ │ │ -
      code - automatically generated
      │ │ │ -
      │ │ │ -
      │ │ │ -
    • │ │ │ -
    • │ │ │ -
      │ │ │ -

      oilPainting

      │ │ │ -
      public static void oilPainting(Mat src, │ │ │ - Mat dst, │ │ │ - int size, │ │ │ - int dynRatio)
      │ │ │ -
      oilPainting │ │ │ - See the book CITE: Holzmann1988 for details.
      │ │ │ -
      │ │ │ -
      Parameters:
      │ │ │ -
      src - Input three-channel or one channel image (either CV_8UC3 or CV_8UC1)
      │ │ │ -
      dst - Output image of the same size and type as src.
      │ │ │ -
      size - neighbouring size is 2-size+1
      │ │ │ -
      dynRatio - image is divided by dynRatio before histogram processing
      │ │ │ -
      │ │ │ -
      │ │ │ -
    • │ │ │ -
    • │ │ │
      │ │ │

      inpaint

      │ │ │
      public static void inpaint(Mat src, │ │ │ Mat mask, │ │ │ Mat dst, │ │ │ int algorithmType)
      │ │ │
      The function implements different single-image inpainting algorithms. │ │ │ @@ -1000,56 +938,14 @@ │ │ │ indicate area to be inpainted │ │ │
      dst - destination image
      │ │ │
      algorithmType - see xphoto::InpaintTypes
      │ │ │ │ │ │
      │ │ │
    • │ │ │
    • │ │ │ -
      │ │ │ -

      dctDenoising

      │ │ │ -
      public static void dctDenoising(Mat src, │ │ │ - Mat dst, │ │ │ - double sigma, │ │ │ - int psize)
      │ │ │ -
      The function implements simple dct-based denoising │ │ │ - │ │ │ - <http://www.ipol.im/pub/art/2011/ys-dct/>.
      │ │ │ -
      │ │ │ -
      Parameters:
      │ │ │ -
      src - source image
      │ │ │ -
      dst - destination image
      │ │ │ -
      sigma - expected noise standard deviation
      │ │ │ -
      psize - size of block side where dct is computed │ │ │ - │ │ │ - SEE: │ │ │ - fastNlMeansDenoising
      │ │ │ -
      │ │ │ -
      │ │ │ -
    • │ │ │ -
    • │ │ │ -
      │ │ │ -

      dctDenoising

      │ │ │ -
      public static void dctDenoising(Mat src, │ │ │ - Mat dst, │ │ │ - double sigma)
      │ │ │ -
      The function implements simple dct-based denoising │ │ │ - │ │ │ - <http://www.ipol.im/pub/art/2011/ys-dct/>.
      │ │ │ -
      │ │ │ -
      Parameters:
      │ │ │ -
      src - source image
      │ │ │ -
      dst - destination image
      │ │ │ -
      sigma - expected noise standard deviation │ │ │ - │ │ │ - SEE: │ │ │ - fastNlMeansDenoising
      │ │ │ -
      │ │ │ -
      │ │ │ -
    • │ │ │ -
    • │ │ │
      │ │ │

      bm3dDenoising

      │ │ │
      public static void bm3dDenoising(Mat src, │ │ │ Mat dstStep1, │ │ │ Mat dstStep2, │ │ │ float h, │ │ │ int templateWindowSize, │ │ │ @@ -2133,14 +2029,118 @@ │ │ │ can be manual denoising of colored image in different colorspaces. │ │ │ │ │ │ SEE: │ │ │ fastNlMeansDenoising │ │ │ │ │ │
      │ │ │
    • │ │ │ +
    • │ │ │ +
      │ │ │ +

      oilPainting

      │ │ │ +
      public static void oilPainting(Mat src, │ │ │ + Mat dst, │ │ │ + int size, │ │ │ + int dynRatio, │ │ │ + int code)
      │ │ │ +
      oilPainting │ │ │ + See the book CITE: Holzmann1988 for details.
      │ │ │ +
      │ │ │ +
      Parameters:
      │ │ │ +
      src - Input three-channel or one channel image (either CV_8UC3 or CV_8UC1)
      │ │ │ +
      dst - Output image of the same size and type as src.
      │ │ │ +
      size - neighbouring size is 2-size+1
      │ │ │ +
      dynRatio - image is divided by dynRatio before histogram processing
      │ │ │ +
      code - automatically generated
      │ │ │ +
      │ │ │ +
      │ │ │ +
    • │ │ │ +
    • │ │ │ +
      │ │ │ +

      oilPainting

      │ │ │ +
      public static void oilPainting(Mat src, │ │ │ + Mat dst, │ │ │ + int size, │ │ │ + int dynRatio)
      │ │ │ +
      oilPainting │ │ │ + See the book CITE: Holzmann1988 for details.
      │ │ │ +
      │ │ │ +
      Parameters:
      │ │ │ +
      src - Input three-channel or one channel image (either CV_8UC3 or CV_8UC1)
      │ │ │ +
      dst - Output image of the same size and type as src.
      │ │ │ +
      size - neighbouring size is 2-size+1
      │ │ │ +
      dynRatio - image is divided by dynRatio before histogram processing
      │ │ │ +
      │ │ │ +
      │ │ │ +
    • │ │ │ +
    • │ │ │ +
      │ │ │ +

      createSimpleWB

      │ │ │ +
      public static SimpleWB createSimpleWB()
      │ │ │ +
      Creates an instance of SimpleWB
      │ │ │ +
      │ │ │ +
      Returns:
      │ │ │ +
      automatically generated
      │ │ │ +
      │ │ │ +
      │ │ │ +
    • │ │ │ +
    • │ │ │ +
      │ │ │ +

      createGrayworldWB

      │ │ │ +
      public static GrayworldWB createGrayworldWB()
      │ │ │ +
      Creates an instance of GrayworldWB
      │ │ │ +
      │ │ │ +
      Returns:
      │ │ │ +
      automatically generated
      │ │ │ +
      │ │ │ +
      │ │ │ +
    • │ │ │ +
    • │ │ │ +
      │ │ │ +

      createLearningBasedWB

      │ │ │ +
      public static LearningBasedWB createLearningBasedWB(String path_to_model)
      │ │ │ +
      Creates an instance of LearningBasedWB
      │ │ │ +
      │ │ │ +
      Parameters:
      │ │ │ +
      path_to_model - Path to a .yml file with the model. If not specified, the default model is used
      │ │ │ +
      Returns:
      │ │ │ +
      automatically generated
      │ │ │ +
      │ │ │ +
      │ │ │ +
    • │ │ │ +
    • │ │ │ +
      │ │ │ +

      createLearningBasedWB

      │ │ │ +
      public static LearningBasedWB createLearningBasedWB()
      │ │ │ +
      Creates an instance of LearningBasedWB
      │ │ │ +
      │ │ │ +
      Returns:
      │ │ │ +
      automatically generated
      │ │ │ +
      │ │ │ +
      │ │ │ +
    • │ │ │ +
    • │ │ │ +
      │ │ │ +

      applyChannelGains

      │ │ │ +
      public static void applyChannelGains(Mat src, │ │ │ + Mat dst, │ │ │ + float gainB, │ │ │ + float gainG, │ │ │ + float gainR)
      │ │ │ +
      Implements an efficient fixed-point approximation for applying channel gains, which is │ │ │ + the last step of multiple white balance algorithms.
      │ │ │ +
      │ │ │ +
      Parameters:
      │ │ │ +
      src - Input three-channel image in the BGR color space (either CV_8UC3 or CV_16UC3)
      │ │ │ +
      dst - Output image of the same size and type as src.
      │ │ │ +
      gainB - gain for the B channel
      │ │ │ +
      gainG - gain for the G channel
      │ │ │ +
      gainR - gain for the R channel
      │ │ │ +
      │ │ │ +
      │ │ │ +
    • │ │ │
    │ │ │
    │ │ │
  • │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -318,51 +318,34 @@ │ │ │ │ public static final int HAAR │ │ │ │ See Also: │ │ │ │ # _C_o_n_s_t_a_n_t_ _F_i_e_l_d_ _V_a_l_u_e_s │ │ │ │ * ********** CCoonnssttrruuccttoorr DDeettaaiillss ********** │ │ │ │ o ******** XXpphhoottoo ******** │ │ │ │ public Xphoto() │ │ │ │ * ********** MMeetthhoodd DDeettaaiillss ********** │ │ │ │ - o ******** ccrreeaatteeSSiimmpplleeWWBB ******** │ │ │ │ - public static _S_i_m_p_l_e_W_B createSimpleWB() │ │ │ │ - Creates an instance of SimpleWB │ │ │ │ - Returns: │ │ │ │ - automatically generated │ │ │ │ - o ******** ccrreeaatteeGGrraayywwoorrllddWWBB ******** │ │ │ │ - public static _G_r_a_y_w_o_r_l_d_W_B createGrayworldWB() │ │ │ │ - Creates an instance of GrayworldWB │ │ │ │ - Returns: │ │ │ │ - automatically generated │ │ │ │ - o ******** ccrreeaatteeLLeeaarrnniinnggBBaasseeddWWBB ******** │ │ │ │ - public static _L_e_a_r_n_i_n_g_B_a_s_e_d_W_B createLearningBasedWB │ │ │ │ - (_S_t_r_i_n_g path_to_model) │ │ │ │ - Creates an instance of LearningBasedWB │ │ │ │ + o ******** ddccttDDeennooiissiinngg ******** │ │ │ │ + public static void dctDenoising(_M_a_t src, _M_a_t dst, double sigma, │ │ │ │ + int psize) │ │ │ │ + The function implements simple dct-based denoising . │ │ │ │ Parameters: │ │ │ │ - path_to_model - Path to a .yml file with the model. If not │ │ │ │ - specified, the default model is used │ │ │ │ - Returns: │ │ │ │ - automatically generated │ │ │ │ - o ******** ccrreeaatteeLLeeaarrnniinnggBBaasseeddWWBB ******** │ │ │ │ - public static _L_e_a_r_n_i_n_g_B_a_s_e_d_W_B createLearningBasedWB() │ │ │ │ - Creates an instance of LearningBasedWB │ │ │ │ - Returns: │ │ │ │ - automatically generated │ │ │ │ - o ******** aappppllyyCChhaannnneellGGaaiinnss ******** │ │ │ │ - public static void applyChannelGains(_M_a_t src, _M_a_t dst, float gainB, │ │ │ │ - float gainG, float gainR) │ │ │ │ - Implements an efficient fixed-point approximation for applying │ │ │ │ - channel gains, which is the last step of multiple white balance │ │ │ │ - algorithms. │ │ │ │ + src - source image │ │ │ │ + dst - destination image │ │ │ │ + sigma - expected noise standard deviation │ │ │ │ + psize - size of block side where dct is computed SEE: │ │ │ │ + fastNlMeansDenoising │ │ │ │ + o ******** ddccttDDeennooiissiinngg ******** │ │ │ │ + public static void dctDenoising(_M_a_t src, _M_a_t dst, double sigma) │ │ │ │ + The function implements simple dct-based denoising . │ │ │ │ Parameters: │ │ │ │ - src - Input three-channel image in the BGR color space │ │ │ │ - (either CV_8UC3 or CV_16UC3) │ │ │ │ - dst - Output image of the same size and type as src. │ │ │ │ - gainB - gain for the B channel │ │ │ │ - gainG - gain for the G channel │ │ │ │ - gainR - gain for the R channel │ │ │ │ + src - source image │ │ │ │ + dst - destination image │ │ │ │ + sigma - expected noise standard deviation SEE: │ │ │ │ + fastNlMeansDenoising │ │ │ │ o ******** ccrreeaatteeTToonneemmaappDDuurraanndd ******** │ │ │ │ public static _T_o_n_e_m_a_p_D_u_r_a_n_d createTonemapDurand(float gamma, │ │ │ │ float contrast, float saturation, float sigma_color, │ │ │ │ float sigma_space) │ │ │ │ Creates TonemapDurand object You need to set the │ │ │ │ OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at │ │ │ │ your own risk. │ │ │ │ @@ -436,37 +419,14 @@ │ │ │ │ public static _T_o_n_e_m_a_p_D_u_r_a_n_d createTonemapDurand() │ │ │ │ Creates TonemapDurand object You need to set the │ │ │ │ OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at │ │ │ │ your own risk. are maximum and minimum luminance values of the │ │ │ │ resulting image. │ │ │ │ Returns: │ │ │ │ automatically generated │ │ │ │ - o ******** ooiillPPaaiinnttiinngg ******** │ │ │ │ - public static void oilPainting(_M_a_t src, _M_a_t dst, int size, │ │ │ │ - int dynRatio, int code) │ │ │ │ - oilPainting See the book CITE: Holzmann1988 for details. │ │ │ │ - Parameters: │ │ │ │ - src - Input three-channel or one channel image (either │ │ │ │ - CV_8UC3 or CV_8UC1) │ │ │ │ - dst - Output image of the same size and type as src. │ │ │ │ - size - neighbouring size is 2-size+1 │ │ │ │ - dynRatio - image is divided by dynRatio before histogram │ │ │ │ - processing │ │ │ │ - code - automatically generated │ │ │ │ - o ******** ooiillPPaaiinnttiinngg ******** │ │ │ │ - public static void oilPainting(_M_a_t src, _M_a_t dst, int size, │ │ │ │ - int dynRatio) │ │ │ │ - oilPainting See the book CITE: Holzmann1988 for details. │ │ │ │ - Parameters: │ │ │ │ - src - Input three-channel or one channel image (either │ │ │ │ - CV_8UC3 or CV_8UC1) │ │ │ │ - dst - Output image of the same size and type as src. │ │ │ │ - size - neighbouring size is 2-size+1 │ │ │ │ - dynRatio - image is divided by dynRatio before histogram │ │ │ │ - processing │ │ │ │ o ******** iinnppaaiinntt ******** │ │ │ │ public static void inpaint(_M_a_t src, _M_a_t mask, _M_a_t dst, │ │ │ │ int algorithmType) │ │ │ │ The function implements different single-image inpainting │ │ │ │ algorithms. See the original papers CITE: He2012 (Shiftmap) or │ │ │ │ CITE: GenserPCS2018 and CITE: SeilerTIP2015 (FSR) for details. │ │ │ │ Parameters: │ │ │ │ @@ -479,34 +439,14 @@ │ │ │ │ Nonetheless you can try any colorspaces. │ │ │ │ # #INPAINT_FSR_BEST or #INPAINT_FSR_FAST: 1-channel │ │ │ │ grayscale or 3-channel BGR image. │ │ │ │ mask - mask (#CV_8UC1), where non-zero pixels indicate valid │ │ │ │ image area, while zero pixels indicate area to be inpainted │ │ │ │ dst - destination image │ │ │ │ algorithmType - see xphoto::InpaintTypes │ │ │ │ - o ******** ddccttDDeennooiissiinngg ******** │ │ │ │ - public static void dctDenoising(_M_a_t src, _M_a_t dst, double sigma, │ │ │ │ - int psize) │ │ │ │ - The function implements simple dct-based denoising . │ │ │ │ - Parameters: │ │ │ │ - src - source image │ │ │ │ - dst - destination image │ │ │ │ - sigma - expected noise standard deviation │ │ │ │ - psize - size of block side where dct is computed SEE: │ │ │ │ - fastNlMeansDenoising │ │ │ │ - o ******** ddccttDDeennooiissiinngg ******** │ │ │ │ - public static void dctDenoising(_M_a_t src, _M_a_t dst, double sigma) │ │ │ │ - The function implements simple dct-based denoising . │ │ │ │ - Parameters: │ │ │ │ - src - source image │ │ │ │ - dst - destination image │ │ │ │ - sigma - expected noise standard deviation SEE: │ │ │ │ - fastNlMeansDenoising │ │ │ │ o ******** bbmm33ddDDeennooiissiinngg ******** │ │ │ │ public static void bm3dDenoising(_M_a_t src, _M_a_t dstStep1, │ │ │ │ _M_a_t dstStep2, float h, int templateWindowSize, │ │ │ │ int searchWindowSize, int blockMatchingStep1, │ │ │ │ int blockMatchingStep2, int groupSize, int slidingStep, float beta, │ │ │ │ int normType, int step, int transformType) │ │ │ │ Performs image denoising using the Block-Matching and 3D-filtering │ │ │ │ @@ -1419,8 +1359,68 @@ │ │ │ │ to reduce border effects. To prevent usage of the window, set │ │ │ │ beta to zero. but yields more accurate results. BM3D_STEP2 is │ │ │ │ not allowed as it requires basic estimate to be present. │ │ │ │ Currently only Haar transform is supported. This function │ │ │ │ expected to be applied to grayscale images. Advanced usage of │ │ │ │ this function can be manual denoising of colored image in │ │ │ │ different colorspaces. SEE: fastNlMeansDenoising │ │ │ │ + o ******** ooiillPPaaiinnttiinngg ******** │ │ │ │ + public static void oilPainting(_M_a_t src, _M_a_t dst, int size, │ │ │ │ + int dynRatio, int code) │ │ │ │ + oilPainting See the book CITE: Holzmann1988 for details. │ │ │ │ + Parameters: │ │ │ │ + src - Input three-channel or one channel image (either │ │ │ │ + CV_8UC3 or CV_8UC1) │ │ │ │ + dst - Output image of the same size and type as src. │ │ │ │ + size - neighbouring size is 2-size+1 │ │ │ │ + dynRatio - image is divided by dynRatio before histogram │ │ │ │ + processing │ │ │ │ + code - automatically generated │ │ │ │ + o ******** ooiillPPaaiinnttiinngg ******** │ │ │ │ + public static void oilPainting(_M_a_t src, _M_a_t dst, int size, │ │ │ │ + int dynRatio) │ │ │ │ + oilPainting See the book CITE: Holzmann1988 for details. │ │ │ │ + Parameters: │ │ │ │ + src - Input three-channel or one channel image (either │ │ │ │ + CV_8UC3 or CV_8UC1) │ │ │ │ + dst - Output image of the same size and type as src. │ │ │ │ + size - neighbouring size is 2-size+1 │ │ │ │ + dynRatio - image is divided by dynRatio before histogram │ │ │ │ + processing │ │ │ │ + o ******** ccrreeaatteeSSiimmpplleeWWBB ******** │ │ │ │ + public static _S_i_m_p_l_e_W_B createSimpleWB() │ │ │ │ + Creates an instance of SimpleWB │ │ │ │ + Returns: │ │ │ │ + automatically generated │ │ │ │ + o ******** ccrreeaatteeGGrraayywwoorrllddWWBB ******** │ │ │ │ + public static _G_r_a_y_w_o_r_l_d_W_B createGrayworldWB() │ │ │ │ + Creates an instance of GrayworldWB │ │ │ │ + Returns: │ │ │ │ + automatically generated │ │ │ │ + o ******** ccrreeaatteeLLeeaarrnniinnggBBaasseeddWWBB ******** │ │ │ │ + public static _L_e_a_r_n_i_n_g_B_a_s_e_d_W_B createLearningBasedWB │ │ │ │ + (_S_t_r_i_n_g path_to_model) │ │ │ │ + Creates an instance of LearningBasedWB │ │ │ │ + Parameters: │ │ │ │ + path_to_model - Path to a .yml file with the model. If not │ │ │ │ + specified, the default model is used │ │ │ │ + Returns: │ │ │ │ + automatically generated │ │ │ │ + o ******** ccrreeaatteeLLeeaarrnniinnggBBaasseeddWWBB ******** │ │ │ │ + public static _L_e_a_r_n_i_n_g_B_a_s_e_d_W_B createLearningBasedWB() │ │ │ │ + Creates an instance of LearningBasedWB │ │ │ │ + Returns: │ │ │ │ + automatically generated │ │ │ │ + o ******** aappppllyyCChhaannnneellGGaaiinnss ******** │ │ │ │ + public static void applyChannelGains(_M_a_t src, _M_a_t dst, float gainB, │ │ │ │ + float gainG, float gainR) │ │ │ │ + Implements an efficient fixed-point approximation for applying │ │ │ │ + channel gains, which is the last step of multiple white balance │ │ │ │ + algorithms. │ │ │ │ + Parameters: │ │ │ │ + src - Input three-channel image in the BGR color space │ │ │ │ + (either CV_8UC3 or CV_16UC3) │ │ │ │ + dst - Output image of the same size and type as src. │ │ │ │ + gainB - gain for the B channel │ │ │ │ + gainG - gain for the G channel │ │ │ │ + gainR - gain for the R channel │ │ │ │ =============================================================================== │ │ ├── ./usr/share/doc/opencv-doc/opencv4/html/opencv.tag.gz │ │ │ ├── opencv.tag │ │ │ │ ├── opencv.tag │ │ │ │ │┄ Ordering differences only │ │ │ │ │ @@ -4695,14 +4695,29 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ table_of_content_sfm.markdown │ │ │ │ │ sfm/tutorials/ │ │ │ │ │ dc/de0/table__of__content__sfm_8markdown.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + shape.hpp │ │ │ │ │ + opencv2/ │ │ │ │ │ + d3/d30/shape_8hpp.html │ │ │ │ │ + opencv2/shape/emdL1.hpp │ │ │ │ │ + opencv2/shape/shape_transformer.hpp │ │ │ │ │ + opencv2/shape/hist_cost.hpp │ │ │ │ │ + opencv2/shape/shape_distance.hpp │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + shape.hpp │ │ │ │ │ + opencv2/shape/ │ │ │ │ │ + db/d0f/shape_2shape_8hpp.html │ │ │ │ │ + opencv2/shape.hpp │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ emdL1.hpp │ │ │ │ │ opencv2/shape/ │ │ │ │ │ dd/dcb/emdL1_8hpp.html │ │ │ │ │ opencv2/core.hpp │ │ │ │ │ cv │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -4714,29 +4729,14 @@ │ │ │ │ │ cv::EMDHistogramCostExtractor │ │ │ │ │ cv::EMDL1HistogramCostExtractor │ │ │ │ │ cv::HistogramCostExtractor │ │ │ │ │ cv::NormHistogramCostExtractor │ │ │ │ │ cv │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - shape.hpp │ │ │ │ │ - opencv2/ │ │ │ │ │ - d3/d30/shape_8hpp.html │ │ │ │ │ - opencv2/shape/emdL1.hpp │ │ │ │ │ - opencv2/shape/shape_transformer.hpp │ │ │ │ │ - opencv2/shape/hist_cost.hpp │ │ │ │ │ - opencv2/shape/shape_distance.hpp │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - shape.hpp │ │ │ │ │ - opencv2/shape/ │ │ │ │ │ - db/d0f/shape_2shape_8hpp.html │ │ │ │ │ - opencv2/shape.hpp │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ shape_distance.hpp │ │ │ │ │ opencv2/shape/ │ │ │ │ │ d4/d7c/shape__distance_8hpp.html │ │ │ │ │ opencv2/core.hpp │ │ │ │ │ opencv2/shape/hist_cost.hpp │ │ │ │ │ opencv2/shape/shape_transformer.hpp │ │ │ │ │ cv::HausdorffDistanceExtractor │ │ │ │ │ @@ -4793,14 +4793,31 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ table_of_content_quasi_dense_stereo.markdown │ │ │ │ │ stereo/tutorials/ │ │ │ │ │ d8/df5/table__of__content__quasi__dense__stereo_8markdown.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + structured_light.hpp │ │ │ │ │ + opencv2/ │ │ │ │ │ + d3/d23/structured__light_8hpp.html │ │ │ │ │ + opencv2/structured_light/structured_light.hpp │ │ │ │ │ + opencv2/structured_light/graycodepattern.hpp │ │ │ │ │ + opencv2/structured_light/sinusoidalpattern.hpp │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + structured_light.hpp │ │ │ │ │ + opencv2/structured_light/ │ │ │ │ │ + df/d33/structured__light_2structured__light_8hpp.html │ │ │ │ │ + opencv2/core.hpp │ │ │ │ │ + cv::structured_light::StructuredLightPattern │ │ │ │ │ + cv │ │ │ │ │ + cv::structured_light │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ graycodepattern.hpp │ │ │ │ │ opencv2/structured_light/ │ │ │ │ │ d7/d9c/graycodepattern_8hpp.html │ │ │ │ │ opencv2/core.hpp │ │ │ │ │ opencv2/structured_light/structured_light.hpp │ │ │ │ │ cv::structured_light::GrayCodePattern │ │ │ │ │ cv::structured_light::GrayCodePattern::Params │ │ │ │ │ @@ -4818,31 +4835,14 @@ │ │ │ │ │ opencv2/calib3d.hpp │ │ │ │ │ cv::structured_light::SinusoidalPattern::Params │ │ │ │ │ cv::structured_light::SinusoidalPattern │ │ │ │ │ cv │ │ │ │ │ cv::structured_light │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - structured_light.hpp │ │ │ │ │ - opencv2/ │ │ │ │ │ - d3/d23/structured__light_8hpp.html │ │ │ │ │ - opencv2/structured_light/structured_light.hpp │ │ │ │ │ - opencv2/structured_light/graycodepattern.hpp │ │ │ │ │ - opencv2/structured_light/sinusoidalpattern.hpp │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - structured_light.hpp │ │ │ │ │ - opencv2/structured_light/ │ │ │ │ │ - df/d33/structured__light_2structured__light_8hpp.html │ │ │ │ │ - opencv2/core.hpp │ │ │ │ │ - cv::structured_light::StructuredLightPattern │ │ │ │ │ - cv │ │ │ │ │ - cv::structured_light │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ capture_pattern.markdown │ │ │ │ │ structured_light/tutorials/capture_pattern/ │ │ │ │ │ d5/df3/capture__pattern_8markdown.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ capturesinpattern.markdown │ │ │ │ │ structured_light/tutorials/capturesinpattern/ │ │ │ │ │ @@ -7503,14 +7503,129 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ intro.markdown │ │ │ │ │ core/doc/ │ │ │ │ │ d0/d2e/intro_8markdown.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + core.hpp │ │ │ │ │ + opencv2/ │ │ │ │ │ + d0/d9c/core_2include_2opencv2_2core_8hpp.html │ │ │ │ │ + opencv2/core/cvdef.h │ │ │ │ │ + opencv2/core/base.hpp │ │ │ │ │ + opencv2/core/cvstd.hpp │ │ │ │ │ + opencv2/core/traits.hpp │ │ │ │ │ + opencv2/core/matx.hpp │ │ │ │ │ + opencv2/core/types.hpp │ │ │ │ │ + opencv2/core/mat.hpp │ │ │ │ │ + opencv2/core/persistence.hpp │ │ │ │ │ + opencv2/core/operations.hpp │ │ │ │ │ + opencv2/core/utility.hpp │ │ │ │ │ + opencv2/core/optim.hpp │ │ │ │ │ + opencv2/core/ovx.hpp │ │ │ │ │ + cv::Algorithm │ │ │ │ │ + cv::Exception │ │ │ │ │ + cv::Formatted │ │ │ │ │ + cv::Formatter │ │ │ │ │ + cv::LDA │ │ │ │ │ + cv::ParamType │ │ │ │ │ + cv::ParamType< _Tp, typename std::enable_if< std::is_enum< _Tp >::value >::type > │ │ │ │ │ + cv::ParamType< Algorithm > │ │ │ │ │ + cv::ParamType< bool > │ │ │ │ │ + cv::ParamType< double > │ │ │ │ │ + cv::ParamType< float > │ │ │ │ │ + cv::ParamType< Mat > │ │ │ │ │ + cv::ParamType< Scalar > │ │ │ │ │ + cv::ParamType< std::vector< Mat > > │ │ │ │ │ + cv::ParamType< String > │ │ │ │ │ + cv::ParamType< uchar > │ │ │ │ │ + cv::ParamType< uint64 > │ │ │ │ │ + cv::ParamType< unsigned > │ │ │ │ │ + cv::PCA │ │ │ │ │ + cv::RNG │ │ │ │ │ + cv::RNG_MT19937 │ │ │ │ │ + cv::SVD │ │ │ │ │ + cv │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + core.hpp │ │ │ │ │ + opencv2/core/ │ │ │ │ │ + d2/ddb/core_2include_2opencv2_2core_2core_8hpp.html │ │ │ │ │ + opencv2/core.hpp │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + core.hpp │ │ │ │ │ + opencv2/gapi/ │ │ │ │ │ + d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html │ │ │ │ │ + opencv2/imgproc.hpp │ │ │ │ │ + opencv2/gapi/imgproc.hpp │ │ │ │ │ + opencv2/gapi/gmat.hpp │ │ │ │ │ + opencv2/gapi/gscalar.hpp │ │ │ │ │ + opencv2/gapi/gkernel.hpp │ │ │ │ │ + opencv2/gapi/streaming/format.hpp │ │ │ │ │ + cv │ │ │ │ │ + cv::gapi │ │ │ │ │ + cv::gapi::core │ │ │ │ │ + cv::gapi::streaming │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + core.hpp │ │ │ │ │ + opencv2/gapi/cpu/ │ │ │ │ │ + d4/df2/gapi_2include_2opencv2_2gapi_2cpu_2core_8hpp.html │ │ │ │ │ + opencv2/gapi/gkernel.hpp │ │ │ │ │ + opencv2/gapi/own/exports.hpp │ │ │ │ │ + cv │ │ │ │ │ + cv::gapi │ │ │ │ │ + cv::gapi::core │ │ │ │ │ + cv::gapi::core::cpu │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + core.hpp │ │ │ │ │ + opencv2/gapi/fluid/ │ │ │ │ │ + d3/d81/gapi_2include_2opencv2_2gapi_2fluid_2core_8hpp.html │ │ │ │ │ + opencv2/gapi/gkernel.hpp │ │ │ │ │ + opencv2/gapi/own/exports.hpp │ │ │ │ │ + cv │ │ │ │ │ + cv::gapi │ │ │ │ │ + cv::gapi::core │ │ │ │ │ + cv::gapi::core::fluid │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + core.hpp │ │ │ │ │ + opencv2/gapi/gpu/ │ │ │ │ │ + d9/d1a/gapi_2include_2opencv2_2gapi_2gpu_2core_8hpp.html │ │ │ │ │ + opencv2/gapi/ocl/core.hpp │ │ │ │ │ + cv │ │ │ │ │ + cv::gapi │ │ │ │ │ + cv::gapi::core │ │ │ │ │ + cv::gapi::core::gpu │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + core.hpp │ │ │ │ │ + opencv2/gapi/ocl/ │ │ │ │ │ + dd/db3/gapi_2include_2opencv2_2gapi_2ocl_2core_8hpp.html │ │ │ │ │ + opencv2/core/cvdef.h │ │ │ │ │ + opencv2/gapi/gkernel.hpp │ │ │ │ │ + cv │ │ │ │ │ + cv::gapi │ │ │ │ │ + cv::gapi::core │ │ │ │ │ + cv::gapi::core::ocl │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + core.hpp │ │ │ │ │ + opencv2/gapi/plaidml/ │ │ │ │ │ + dc/d2d/gapi_2include_2opencv2_2gapi_2plaidml_2core_8hpp.html │ │ │ │ │ + opencv2/gapi/gkernel.hpp │ │ │ │ │ + opencv2/gapi/own/exports.hpp │ │ │ │ │ + cv │ │ │ │ │ + cv::gapi │ │ │ │ │ + cv::gapi::core │ │ │ │ │ + cv::gapi::core::plaidml │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ affine.hpp │ │ │ │ │ opencv2/core/ │ │ │ │ │ de/d48/affine_8hpp.html │ │ │ │ │ opencv2/core.hpp │ │ │ │ │ cv::Affine3 │ │ │ │ │ cv │ │ │ │ │ cv::traits │ │ │ │ │ @@ -7746,129 +7861,14 @@ │ │ │ │ │ CV_DbgCheckNE │ │ │ │ │ d1/d26/check_8hpp.html │ │ │ │ │ ad0d8ba6150790e9434ab91923590ea8d │ │ │ │ │ (v1, v2, msg) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - core.hpp │ │ │ │ │ - opencv2/ │ │ │ │ │ - d0/d9c/core_2include_2opencv2_2core_8hpp.html │ │ │ │ │ - opencv2/core/cvdef.h │ │ │ │ │ - opencv2/core/base.hpp │ │ │ │ │ - opencv2/core/cvstd.hpp │ │ │ │ │ - opencv2/core/traits.hpp │ │ │ │ │ - opencv2/core/matx.hpp │ │ │ │ │ - opencv2/core/types.hpp │ │ │ │ │ - opencv2/core/mat.hpp │ │ │ │ │ - opencv2/core/persistence.hpp │ │ │ │ │ - opencv2/core/operations.hpp │ │ │ │ │ - opencv2/core/utility.hpp │ │ │ │ │ - opencv2/core/optim.hpp │ │ │ │ │ - opencv2/core/ovx.hpp │ │ │ │ │ - cv::Algorithm │ │ │ │ │ - cv::Exception │ │ │ │ │ - cv::Formatted │ │ │ │ │ - cv::Formatter │ │ │ │ │ - cv::LDA │ │ │ │ │ - cv::ParamType │ │ │ │ │ - cv::ParamType< _Tp, typename std::enable_if< std::is_enum< _Tp >::value >::type > │ │ │ │ │ - cv::ParamType< Algorithm > │ │ │ │ │ - cv::ParamType< bool > │ │ │ │ │ - cv::ParamType< double > │ │ │ │ │ - cv::ParamType< float > │ │ │ │ │ - cv::ParamType< Mat > │ │ │ │ │ - cv::ParamType< Scalar > │ │ │ │ │ - cv::ParamType< std::vector< Mat > > │ │ │ │ │ - cv::ParamType< String > │ │ │ │ │ - cv::ParamType< uchar > │ │ │ │ │ - cv::ParamType< uint64 > │ │ │ │ │ - cv::ParamType< unsigned > │ │ │ │ │ - cv::PCA │ │ │ │ │ - cv::RNG │ │ │ │ │ - cv::RNG_MT19937 │ │ │ │ │ - cv::SVD │ │ │ │ │ - cv │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - core.hpp │ │ │ │ │ - opencv2/core/ │ │ │ │ │ - d2/ddb/core_2include_2opencv2_2core_2core_8hpp.html │ │ │ │ │ - opencv2/core.hpp │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - core.hpp │ │ │ │ │ - opencv2/gapi/ │ │ │ │ │ - d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html │ │ │ │ │ - opencv2/imgproc.hpp │ │ │ │ │ - opencv2/gapi/imgproc.hpp │ │ │ │ │ - opencv2/gapi/gmat.hpp │ │ │ │ │ - opencv2/gapi/gscalar.hpp │ │ │ │ │ - opencv2/gapi/gkernel.hpp │ │ │ │ │ - opencv2/gapi/streaming/format.hpp │ │ │ │ │ - cv │ │ │ │ │ - cv::gapi │ │ │ │ │ - cv::gapi::core │ │ │ │ │ - cv::gapi::streaming │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - core.hpp │ │ │ │ │ - opencv2/gapi/cpu/ │ │ │ │ │ - d4/df2/gapi_2include_2opencv2_2gapi_2cpu_2core_8hpp.html │ │ │ │ │ - opencv2/gapi/gkernel.hpp │ │ │ │ │ - opencv2/gapi/own/exports.hpp │ │ │ │ │ - cv │ │ │ │ │ - cv::gapi │ │ │ │ │ - cv::gapi::core │ │ │ │ │ - cv::gapi::core::cpu │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - core.hpp │ │ │ │ │ - opencv2/gapi/fluid/ │ │ │ │ │ - d3/d81/gapi_2include_2opencv2_2gapi_2fluid_2core_8hpp.html │ │ │ │ │ - opencv2/gapi/gkernel.hpp │ │ │ │ │ - opencv2/gapi/own/exports.hpp │ │ │ │ │ - cv │ │ │ │ │ - cv::gapi │ │ │ │ │ - cv::gapi::core │ │ │ │ │ - cv::gapi::core::fluid │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - core.hpp │ │ │ │ │ - opencv2/gapi/gpu/ │ │ │ │ │ - d9/d1a/gapi_2include_2opencv2_2gapi_2gpu_2core_8hpp.html │ │ │ │ │ - opencv2/gapi/ocl/core.hpp │ │ │ │ │ - cv │ │ │ │ │ - cv::gapi │ │ │ │ │ - cv::gapi::core │ │ │ │ │ - cv::gapi::core::gpu │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - core.hpp │ │ │ │ │ - opencv2/gapi/ocl/ │ │ │ │ │ - dd/db3/gapi_2include_2opencv2_2gapi_2ocl_2core_8hpp.html │ │ │ │ │ - opencv2/core/cvdef.h │ │ │ │ │ - opencv2/gapi/gkernel.hpp │ │ │ │ │ - cv │ │ │ │ │ - cv::gapi │ │ │ │ │ - cv::gapi::core │ │ │ │ │ - cv::gapi::core::ocl │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - core.hpp │ │ │ │ │ - opencv2/gapi/plaidml/ │ │ │ │ │ - dc/d2d/gapi_2include_2opencv2_2gapi_2plaidml_2core_8hpp.html │ │ │ │ │ - opencv2/gapi/gkernel.hpp │ │ │ │ │ - opencv2/gapi/own/exports.hpp │ │ │ │ │ - cv │ │ │ │ │ - cv::gapi │ │ │ │ │ - cv::gapi::core │ │ │ │ │ - cv::gapi::core::plaidml │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ cuda.hpp │ │ │ │ │ opencv2/core/ │ │ │ │ │ d8/df5/core_2include_2opencv2_2core_2cuda_8hpp.html │ │ │ │ │ opencv2/core.hpp │ │ │ │ │ opencv2/core/cuda_types.hpp │ │ │ │ │ cv::cuda::GpuMat::Allocator │ │ │ │ │ cv::cuda::BufferPool │ │ │ │ │ @@ -8006,14 +8006,88 @@ │ │ │ │ │ │ │ │ │ │ datamov_utils.hpp │ │ │ │ │ opencv2/core/cuda/ │ │ │ │ │ df/dcf/datamov__utils_8hpp.html │ │ │ │ │ common.hpp │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + reduce.hpp │ │ │ │ │ + opencv2/cudev/block/ │ │ │ │ │ + d3/d33/contrib_2modules_2cudev_2include_2opencv2_2cudev_2block_2reduce_8hpp.html │ │ │ │ │ + ../common.hpp │ │ │ │ │ + ../util/tuple.hpp │ │ │ │ │ + ../warp/reduce.hpp │ │ │ │ │ + cv │ │ │ │ │ + cv::cudev │ │ │ │ │ + │ │ │ │ │ + #define │ │ │ │ │ + OPENCV_CUDEV_BLOCK_REDUCE_HPP │ │ │ │ │ + d3/d33/contrib_2modules_2cudev_2include_2opencv2_2cudev_2block_2reduce_8hpp.html │ │ │ │ │ + ab84f43705d89c8633f6ae8d50223549e │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + reduce.hpp │ │ │ │ │ + opencv2/cudev/grid/ │ │ │ │ │ + d4/d25/contrib_2modules_2cudev_2include_2opencv2_2cudev_2grid_2reduce_8hpp.html │ │ │ │ │ + ../common.hpp │ │ │ │ │ + ../ptr2d/traits.hpp │ │ │ │ │ + ../ptr2d/gpumat.hpp │ │ │ │ │ + ../ptr2d/mask.hpp │ │ │ │ │ + ../ptr2d/transform.hpp │ │ │ │ │ + cv::cudev::DefaultGlobReducePolicy │ │ │ │ │ + cv │ │ │ │ │ + cv::cudev │ │ │ │ │ + │ │ │ │ │ + #define │ │ │ │ │ + OPENCV_CUDEV_GRID_REDUCE_HPP │ │ │ │ │ + d4/d25/contrib_2modules_2cudev_2include_2opencv2_2cudev_2grid_2reduce_8hpp.html │ │ │ │ │ + aeb868ad11b9b6244628b07b98b6c04d4 │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + reduce.hpp │ │ │ │ │ + opencv2/cudev/warp/ │ │ │ │ │ + d7/da3/contrib_2modules_2cudev_2include_2opencv2_2cudev_2warp_2reduce_8hpp.html │ │ │ │ │ + ../common.hpp │ │ │ │ │ + ../util/tuple.hpp │ │ │ │ │ + cv │ │ │ │ │ + cv::cudev │ │ │ │ │ + │ │ │ │ │ + #define │ │ │ │ │ + OPENCV_CUDEV_WARP_REDUCE_HPP │ │ │ │ │ + d7/da3/contrib_2modules_2cudev_2include_2opencv2_2cudev_2warp_2reduce_8hpp.html │ │ │ │ │ + ab460a86ce2356a945df3010b58a97c08 │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + reduce.hpp │ │ │ │ │ + opencv2/core/cuda/detail/ │ │ │ │ │ + da/dca/modules_2core_2include_2opencv2_2core_2cuda_2detail_2reduce_8hpp.html │ │ │ │ │ + ../warp.hpp │ │ │ │ │ + ../warp_shuffle.hpp │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + reduce.hpp │ │ │ │ │ + opencv2/core/cuda/ │ │ │ │ │ + d3/d78/modules_2core_2include_2opencv2_2core_2cuda_2reduce_8hpp.html │ │ │ │ │ + detail/reduce.hpp │ │ │ │ │ + detail/reduce_key_val.hpp │ │ │ │ │ + │ │ │ │ │ + #define │ │ │ │ │ + THRUST_DEBUG │ │ │ │ │ + d3/d78/modules_2core_2include_2opencv2_2core_2cuda_2reduce_8hpp.html │ │ │ │ │ + a307edaa487e6e39fcca95bd1250ec1f9 │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ reduce_key_val.hpp │ │ │ │ │ opencv2/core/cuda/detail/ │ │ │ │ │ d3/dbd/reduce__key__val_8hpp.html │ │ │ │ │ ../warp.hpp │ │ │ │ │ ../warp_shuffle.hpp │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -8393,88 +8467,14 @@ │ │ │ │ │ │ │ │ │ │ limits.hpp │ │ │ │ │ opencv2/core/cuda/ │ │ │ │ │ d7/d42/modules_2core_2include_2opencv2_2core_2cuda_2limits_8hpp.html │ │ │ │ │ common.hpp │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - reduce.hpp │ │ │ │ │ - opencv2/cudev/block/ │ │ │ │ │ - d3/d33/contrib_2modules_2cudev_2include_2opencv2_2cudev_2block_2reduce_8hpp.html │ │ │ │ │ - ../common.hpp │ │ │ │ │ - ../util/tuple.hpp │ │ │ │ │ - ../warp/reduce.hpp │ │ │ │ │ - cv │ │ │ │ │ - cv::cudev │ │ │ │ │ - │ │ │ │ │ - #define │ │ │ │ │ - OPENCV_CUDEV_BLOCK_REDUCE_HPP │ │ │ │ │ - d3/d33/contrib_2modules_2cudev_2include_2opencv2_2cudev_2block_2reduce_8hpp.html │ │ │ │ │ - ab84f43705d89c8633f6ae8d50223549e │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - reduce.hpp │ │ │ │ │ - opencv2/cudev/grid/ │ │ │ │ │ - d4/d25/contrib_2modules_2cudev_2include_2opencv2_2cudev_2grid_2reduce_8hpp.html │ │ │ │ │ - ../common.hpp │ │ │ │ │ - ../ptr2d/traits.hpp │ │ │ │ │ - ../ptr2d/gpumat.hpp │ │ │ │ │ - ../ptr2d/mask.hpp │ │ │ │ │ - ../ptr2d/transform.hpp │ │ │ │ │ - cv::cudev::DefaultGlobReducePolicy │ │ │ │ │ - cv │ │ │ │ │ - cv::cudev │ │ │ │ │ - │ │ │ │ │ - #define │ │ │ │ │ - OPENCV_CUDEV_GRID_REDUCE_HPP │ │ │ │ │ - d4/d25/contrib_2modules_2cudev_2include_2opencv2_2cudev_2grid_2reduce_8hpp.html │ │ │ │ │ - aeb868ad11b9b6244628b07b98b6c04d4 │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - reduce.hpp │ │ │ │ │ - opencv2/cudev/warp/ │ │ │ │ │ - d7/da3/contrib_2modules_2cudev_2include_2opencv2_2cudev_2warp_2reduce_8hpp.html │ │ │ │ │ - ../common.hpp │ │ │ │ │ - ../util/tuple.hpp │ │ │ │ │ - cv │ │ │ │ │ - cv::cudev │ │ │ │ │ - │ │ │ │ │ - #define │ │ │ │ │ - OPENCV_CUDEV_WARP_REDUCE_HPP │ │ │ │ │ - d7/da3/contrib_2modules_2cudev_2include_2opencv2_2cudev_2warp_2reduce_8hpp.html │ │ │ │ │ - ab460a86ce2356a945df3010b58a97c08 │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - reduce.hpp │ │ │ │ │ - opencv2/core/cuda/detail/ │ │ │ │ │ - da/dca/modules_2core_2include_2opencv2_2core_2cuda_2detail_2reduce_8hpp.html │ │ │ │ │ - ../warp.hpp │ │ │ │ │ - ../warp_shuffle.hpp │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - reduce.hpp │ │ │ │ │ - opencv2/core/cuda/ │ │ │ │ │ - d3/d78/modules_2core_2include_2opencv2_2core_2cuda_2reduce_8hpp.html │ │ │ │ │ - detail/reduce.hpp │ │ │ │ │ - detail/reduce_key_val.hpp │ │ │ │ │ - │ │ │ │ │ - #define │ │ │ │ │ - THRUST_DEBUG │ │ │ │ │ - d3/d78/modules_2core_2include_2opencv2_2core_2cuda_2reduce_8hpp.html │ │ │ │ │ - a307edaa487e6e39fcca95bd1250ec1f9 │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ saturate_cast.hpp │ │ │ │ │ opencv2/cudev/util/ │ │ │ │ │ d0/d5e/contrib_2modules_2cudev_2include_2opencv2_2cudev_2util_2saturate__cast_8hpp.html │ │ │ │ │ ../common.hpp │ │ │ │ │ cv │ │ │ │ │ cv::cudev │ │ │ │ │ │ │ │ │ │ @@ -194316,14 +194316,49 @@ │ │ │ │ │ hal_ni_xor8u │ │ │ │ │ d2/d18/group__core__hal__interface__logical.html │ │ │ │ │ gad531f2b142319e9b75e7334f76893d7d │ │ │ │ │ (const uchar *src1_data, size_t src1_step, const uchar *src2_data, size_t src2_step, uchar *dst_data, size_t dst_step, int width, int height) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + dnn.hpp │ │ │ │ │ + opencv2/ │ │ │ │ │ + d9/d8c/dnn_8hpp.html │ │ │ │ │ + opencv2/dnn/dnn.hpp │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + dnn.hpp │ │ │ │ │ + opencv2/dnn/ │ │ │ │ │ + db/ddc/dnn_2dnn_8hpp.html │ │ │ │ │ + opencv2/core.hpp │ │ │ │ │ + opencv2/core/async.hpp │ │ │ │ │ + ../dnn/version.hpp │ │ │ │ │ + opencv2/dnn/dict.hpp │ │ │ │ │ + opencv2/dnn/layer.hpp │ │ │ │ │ + opencv2/dnn/utils/inference_engine.hpp │ │ │ │ │ + cv::dnn::BackendNode │ │ │ │ │ + cv::dnn::BackendWrapper │ │ │ │ │ + cv::dnn::ClassificationModel │ │ │ │ │ + cv::dnn::DetectionModel │ │ │ │ │ + cv::dnn::Image2BlobParams │ │ │ │ │ + cv::dnn::KeypointsModel │ │ │ │ │ + cv::dnn::Layer │ │ │ │ │ + cv::dnn::LayerParams │ │ │ │ │ + cv::dnn::Model │ │ │ │ │ + cv::dnn::Net │ │ │ │ │ + cv::dnn::SegmentationModel │ │ │ │ │ + cv::dnn::TextDetectionModel │ │ │ │ │ + cv::dnn::TextDetectionModel_DB │ │ │ │ │ + cv::dnn::TextDetectionModel_EAST │ │ │ │ │ + cv::dnn::TextRecognitionModel │ │ │ │ │ + cv │ │ │ │ │ + cv::dnn │ │ │ │ │ + cv::dnn::accessor │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ all_layers.hpp │ │ │ │ │ opencv2/dnn/ │ │ │ │ │ dd/d6b/all__layers_8hpp.html │ │ │ │ │ opencv2/dnn.hpp │ │ │ │ │ cv::dnn::AbsLayer │ │ │ │ │ cv::dnn::AccumLayer │ │ │ │ │ cv::dnn::AcoshLayer │ │ │ │ │ @@ -194448,49 +194483,14 @@ │ │ │ │ │ opencv2/dnn/dnn.hpp │ │ │ │ │ cv::dnn::Dict │ │ │ │ │ cv::dnn::DictValue │ │ │ │ │ cv │ │ │ │ │ cv::dnn │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - dnn.hpp │ │ │ │ │ - opencv2/ │ │ │ │ │ - d9/d8c/dnn_8hpp.html │ │ │ │ │ - opencv2/dnn/dnn.hpp │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - dnn.hpp │ │ │ │ │ - opencv2/dnn/ │ │ │ │ │ - db/ddc/dnn_2dnn_8hpp.html │ │ │ │ │ - opencv2/core.hpp │ │ │ │ │ - opencv2/core/async.hpp │ │ │ │ │ - ../dnn/version.hpp │ │ │ │ │ - opencv2/dnn/dict.hpp │ │ │ │ │ - opencv2/dnn/layer.hpp │ │ │ │ │ - opencv2/dnn/utils/inference_engine.hpp │ │ │ │ │ - cv::dnn::BackendNode │ │ │ │ │ - cv::dnn::BackendWrapper │ │ │ │ │ - cv::dnn::ClassificationModel │ │ │ │ │ - cv::dnn::DetectionModel │ │ │ │ │ - cv::dnn::Image2BlobParams │ │ │ │ │ - cv::dnn::KeypointsModel │ │ │ │ │ - cv::dnn::Layer │ │ │ │ │ - cv::dnn::LayerParams │ │ │ │ │ - cv::dnn::Model │ │ │ │ │ - cv::dnn::Net │ │ │ │ │ - cv::dnn::SegmentationModel │ │ │ │ │ - cv::dnn::TextDetectionModel │ │ │ │ │ - cv::dnn::TextDetectionModel_DB │ │ │ │ │ - cv::dnn::TextDetectionModel_EAST │ │ │ │ │ - cv::dnn::TextRecognitionModel │ │ │ │ │ - cv │ │ │ │ │ - cv::dnn │ │ │ │ │ - cv::dnn::accessor │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ layer.details.hpp │ │ │ │ │ opencv2/dnn/ │ │ │ │ │ df/d8c/layer_8details_8hpp.html │ │ │ │ │ opencv2/dnn/layer.hpp │ │ │ │ │ cv::dnn::details::_LayerStaticRegisterer │ │ │ │ │ cv │ │ │ │ │ cv::dnn │ │ │ │ │ @@ -195624,14 +195624,75 @@ │ │ │ │ │ cv::detail::ProtoToParam< cv::GMat > │ │ │ │ │ cv::detail::ProtoToParam< cv::GOpaque< U > > │ │ │ │ │ cv::detail::ProtoToParam< cv::GScalar > │ │ │ │ │ cv │ │ │ │ │ cv::detail │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + infer.hpp │ │ │ │ │ + opencv2/gapi/ │ │ │ │ │ + d6/d32/infer_8hpp.html │ │ │ │ │ + opencv2/gapi/util/util.hpp │ │ │ │ │ + opencv2/gapi/util/any.hpp │ │ │ │ │ + opencv2/gapi/gkernel.hpp │ │ │ │ │ + opencv2/gapi/garg.hpp │ │ │ │ │ + opencv2/gapi/gcommon.hpp │ │ │ │ │ + opencv2/gapi/gmetaarg.hpp │ │ │ │ │ + cv::detail::accepted_infer_types │ │ │ │ │ + cv::detail::CompileArgTag< cv::gapi::GNetPackage > │ │ │ │ │ + cv::gapi::Generic │ │ │ │ │ + cv::GInfer │ │ │ │ │ + cv::GInferBase │ │ │ │ │ + cv::detail::GInferInputsTyped │ │ │ │ │ + cv::GInferList │ │ │ │ │ + cv::GInferList2 │ │ │ │ │ + cv::GInferList2Base │ │ │ │ │ + cv::GInferListBase │ │ │ │ │ + cv::detail::GInferOutputsTyped │ │ │ │ │ + cv::GInferROI │ │ │ │ │ + cv::GInferROIBase │ │ │ │ │ + cv::gapi::GNetPackage │ │ │ │ │ + cv::GNetworkType< K, std::function< R(Args...)> > │ │ │ │ │ + cv::GNetworkType< K, std::function< std::tuple< R... >(Args...)> > │ │ │ │ │ + cv::InferAPI │ │ │ │ │ + cv::InferAPIList │ │ │ │ │ + cv::InferAPIList2 │ │ │ │ │ + cv::InferAPIRoi │ │ │ │ │ + cv::detail::InferROITraits< GInferListBase > │ │ │ │ │ + cv::detail::InferROITraits< GInferROIBase > │ │ │ │ │ + cv::detail::InOutInfo │ │ │ │ │ + cv::detail::valid_infer2_types< std::tuple< Ns... >, std::tuple<> > │ │ │ │ │ + cv::detail::valid_infer2_types< std::tuple<>, std::tuple< Ts... > > │ │ │ │ │ + cv │ │ │ │ │ + cv::detail │ │ │ │ │ + cv::gapi │ │ │ │ │ + │ │ │ │ │ + #define │ │ │ │ │ + G_API_NET │ │ │ │ │ + d6/d32/infer_8hpp.html │ │ │ │ │ + adfb450a1d7992bc72c9afaa758516f27 │ │ │ │ │ + (Class, API, Tag) │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + infer.hpp │ │ │ │ │ + opencv2/gapi/oak/ │ │ │ │ │ + d8/db1/oak_2infer_8hpp.html │ │ │ │ │ + opencv2/gapi/opencv_includes.hpp │ │ │ │ │ + opencv2/gapi/util/any.hpp │ │ │ │ │ + opencv2/core/cvdef.h │ │ │ │ │ + opencv2/gapi/gkernel.hpp │ │ │ │ │ + cv::gapi::oak::detail::ParamDesc │ │ │ │ │ + cv::gapi::oak::Params │ │ │ │ │ + cv │ │ │ │ │ + cv::gapi │ │ │ │ │ + cv::gapi::oak │ │ │ │ │ + cv::gapi::oak::detail │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ bindings_ie.hpp │ │ │ │ │ opencv2/gapi/infer/ │ │ │ │ │ d5/d51/bindings__ie_8hpp.html │ │ │ │ │ opencv2/gapi/util/any.hpp │ │ │ │ │ opencv2/gapi/own/exports.hpp │ │ │ │ │ opencv2/gapi/gkernel.hpp │ │ │ │ │ opencv2/gapi/infer/ie.hpp │ │ │ │ │ @@ -195754,75 +195815,14 @@ │ │ │ │ │ cv::MediaFrame │ │ │ │ │ cv::MediaFrame::View │ │ │ │ │ cv │ │ │ │ │ cv::gapi │ │ │ │ │ cv::gapi::s11n │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - infer.hpp │ │ │ │ │ - opencv2/gapi/ │ │ │ │ │ - d6/d32/infer_8hpp.html │ │ │ │ │ - opencv2/gapi/util/util.hpp │ │ │ │ │ - opencv2/gapi/util/any.hpp │ │ │ │ │ - opencv2/gapi/gkernel.hpp │ │ │ │ │ - opencv2/gapi/garg.hpp │ │ │ │ │ - opencv2/gapi/gcommon.hpp │ │ │ │ │ - opencv2/gapi/gmetaarg.hpp │ │ │ │ │ - cv::detail::accepted_infer_types │ │ │ │ │ - cv::detail::CompileArgTag< cv::gapi::GNetPackage > │ │ │ │ │ - cv::gapi::Generic │ │ │ │ │ - cv::GInfer │ │ │ │ │ - cv::GInferBase │ │ │ │ │ - cv::detail::GInferInputsTyped │ │ │ │ │ - cv::GInferList │ │ │ │ │ - cv::GInferList2 │ │ │ │ │ - cv::GInferList2Base │ │ │ │ │ - cv::GInferListBase │ │ │ │ │ - cv::detail::GInferOutputsTyped │ │ │ │ │ - cv::GInferROI │ │ │ │ │ - cv::GInferROIBase │ │ │ │ │ - cv::gapi::GNetPackage │ │ │ │ │ - cv::GNetworkType< K, std::function< R(Args...)> > │ │ │ │ │ - cv::GNetworkType< K, std::function< std::tuple< R... >(Args...)> > │ │ │ │ │ - cv::InferAPI │ │ │ │ │ - cv::InferAPIList │ │ │ │ │ - cv::InferAPIList2 │ │ │ │ │ - cv::InferAPIRoi │ │ │ │ │ - cv::detail::InferROITraits< GInferListBase > │ │ │ │ │ - cv::detail::InferROITraits< GInferROIBase > │ │ │ │ │ - cv::detail::InOutInfo │ │ │ │ │ - cv::detail::valid_infer2_types< std::tuple< Ns... >, std::tuple<> > │ │ │ │ │ - cv::detail::valid_infer2_types< std::tuple<>, std::tuple< Ts... > > │ │ │ │ │ - cv │ │ │ │ │ - cv::detail │ │ │ │ │ - cv::gapi │ │ │ │ │ - │ │ │ │ │ - #define │ │ │ │ │ - G_API_NET │ │ │ │ │ - d6/d32/infer_8hpp.html │ │ │ │ │ - adfb450a1d7992bc72c9afaa758516f27 │ │ │ │ │ - (Class, API, Tag) │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - infer.hpp │ │ │ │ │ - opencv2/gapi/oak/ │ │ │ │ │ - d8/db1/oak_2infer_8hpp.html │ │ │ │ │ - opencv2/gapi/opencv_includes.hpp │ │ │ │ │ - opencv2/gapi/util/any.hpp │ │ │ │ │ - opencv2/core/cvdef.h │ │ │ │ │ - opencv2/gapi/gkernel.hpp │ │ │ │ │ - cv::gapi::oak::detail::ParamDesc │ │ │ │ │ - cv::gapi::oak::Params │ │ │ │ │ - cv │ │ │ │ │ - cv::gapi │ │ │ │ │ - cv::gapi::oak │ │ │ │ │ - cv::gapi::oak::detail │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ oak.hpp │ │ │ │ │ opencv2/gapi/oak/ │ │ │ │ │ de/d62/oak_8hpp.html │ │ │ │ │ opencv2/gapi/garg.hpp │ │ │ │ │ opencv2/gapi/gkernel.hpp │ │ │ │ │ opencv2/gapi/gstreaming.hpp │ │ │ │ │ cv::gapi::oak::ColorCamera │ │ │ │ │ @@ -197053,21 +197053,14 @@ │ │ │ │ │ util_inl.hpp │ │ │ │ │ opencv2/stitching/detail/ │ │ │ │ │ d7/dab/util__inl_8hpp.html │ │ │ │ │ opencv2/core.hpp │ │ │ │ │ util.hpp │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - warpers_inl.hpp │ │ │ │ │ - opencv2/stitching/detail/ │ │ │ │ │ - d4/d82/warpers__inl_8hpp.html │ │ │ │ │ - opencv2/core.hpp │ │ │ │ │ - warpers.hpp │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ warpers.hpp │ │ │ │ │ opencv2/stitching/detail/ │ │ │ │ │ dc/de7/detail_2warpers_8hpp.html │ │ │ │ │ opencv2/core.hpp │ │ │ │ │ opencv2/core/cuda.hpp │ │ │ │ │ opencv2/imgproc.hpp │ │ │ │ │ warpers_inl.hpp │ │ │ │ │ @@ -197127,14 +197120,57 @@ │ │ │ │ │ cv::SphericalWarper │ │ │ │ │ cv::StereographicWarper │ │ │ │ │ cv::TransverseMercatorWarper │ │ │ │ │ cv::WarperCreator │ │ │ │ │ cv │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + warpers_inl.hpp │ │ │ │ │ + opencv2/stitching/detail/ │ │ │ │ │ + d4/d82/warpers__inl_8hpp.html │ │ │ │ │ + opencv2/core.hpp │ │ │ │ │ + warpers.hpp │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + video.hpp │ │ │ │ │ + opencv2/gapi/cpu/ │ │ │ │ │ + d3/d41/gapi_2include_2opencv2_2gapi_2cpu_2video_8hpp.html │ │ │ │ │ + opencv2/gapi/gkernel.hpp │ │ │ │ │ + cv │ │ │ │ │ + cv::gapi │ │ │ │ │ + cv::gapi::video │ │ │ │ │ + cv::gapi::video::cpu │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + video.hpp │ │ │ │ │ + opencv2/gapi/ │ │ │ │ │ + d6/deb/gapi_2include_2opencv2_2gapi_2video_8hpp.html │ │ │ │ │ + opencv2/gapi/gkernel.hpp │ │ │ │ │ + cv::gapi::video::BackgroundSubtractorParams │ │ │ │ │ + cv::detail::CompileArgTag< cv::gapi::video::BackgroundSubtractorParams > │ │ │ │ │ + cv::gapi::KalmanParams │ │ │ │ │ + cv │ │ │ │ │ + cv::detail │ │ │ │ │ + cv::gapi │ │ │ │ │ + cv::gapi::video │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + video.hpp │ │ │ │ │ + opencv2/ │ │ │ │ │ + d0/d1c/video_2include_2opencv2_2video_8hpp.html │ │ │ │ │ + opencv2/video/tracking.hpp │ │ │ │ │ + opencv2/video/background_segm.hpp │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + video.hpp │ │ │ │ │ + opencv2/video/ │ │ │ │ │ + d9/d44/video_2include_2opencv2_2video_2video_8hpp.html │ │ │ │ │ + opencv2/video.hpp │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ background_segm.hpp │ │ │ │ │ opencv2/video/ │ │ │ │ │ db/d73/background__segm_8hpp.html │ │ │ │ │ opencv2/core.hpp │ │ │ │ │ cv::BackgroundSubtractor │ │ │ │ │ cv::BackgroundSubtractorKNN │ │ │ │ │ cv::BackgroundSubtractorMOG2 │ │ │ │ │ @@ -197199,50 +197235,14 @@ │ │ │ │ │ cv::TrackerMIL │ │ │ │ │ cv::TrackerNano │ │ │ │ │ cv::TrackerVit │ │ │ │ │ cv::VariationalRefinement │ │ │ │ │ cv │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - video.hpp │ │ │ │ │ - opencv2/gapi/cpu/ │ │ │ │ │ - d3/d41/gapi_2include_2opencv2_2gapi_2cpu_2video_8hpp.html │ │ │ │ │ - opencv2/gapi/gkernel.hpp │ │ │ │ │ - cv │ │ │ │ │ - cv::gapi │ │ │ │ │ - cv::gapi::video │ │ │ │ │ - cv::gapi::video::cpu │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - video.hpp │ │ │ │ │ - opencv2/gapi/ │ │ │ │ │ - d6/deb/gapi_2include_2opencv2_2gapi_2video_8hpp.html │ │ │ │ │ - opencv2/gapi/gkernel.hpp │ │ │ │ │ - cv::gapi::video::BackgroundSubtractorParams │ │ │ │ │ - cv::detail::CompileArgTag< cv::gapi::video::BackgroundSubtractorParams > │ │ │ │ │ - cv::gapi::KalmanParams │ │ │ │ │ - cv │ │ │ │ │ - cv::detail │ │ │ │ │ - cv::gapi │ │ │ │ │ - cv::gapi::video │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - video.hpp │ │ │ │ │ - opencv2/ │ │ │ │ │ - d0/d1c/video_2include_2opencv2_2video_8hpp.html │ │ │ │ │ - opencv2/video/tracking.hpp │ │ │ │ │ - opencv2/video/background_segm.hpp │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - video.hpp │ │ │ │ │ - opencv2/video/ │ │ │ │ │ - d9/d44/video_2include_2opencv2_2video_2video_8hpp.html │ │ │ │ │ - opencv2/video.hpp │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ videoio_overview.markdown │ │ │ │ │ videoio/doc/ │ │ │ │ │ dd/de3/videoio__overview_8markdown.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ cap_ios.h │ │ │ │ │ opencv2/videoio/ │ │ ├── ./usr/share/doc/opencv-doc/opencv4/html/search/all_1d.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -438,18 +438,18 @@ │ │ │ │ ['../d6/dd1/tutorial_univ_intrin.html#autotoc_md342', 1, 'Reduce and Mask'] │ │ │ │ ]], │ │ │ │ ['reduce_20noise_171', ['reduce noise', ['../d2/d2c/tutorial_sobel_derivatives.html#autotoc_md706', 1, 'Reduce noise'], │ │ │ │ ['../d5/db5/tutorial_laplace_operator.html#autotoc_md686', 1, 'Reduce noise'] │ │ │ │ ]], │ │ │ │ ['reduce_20noise_20and_20avoid_20false_20circle_20detection_3a_172', ['Apply a Median blur to reduce noise and avoid false circle detection:', ['../d4/d70/tutorial_hough_circle.html#autotoc_md659', 1, '']]], │ │ │ │ ['reduce_2ehpp_173', ['reduce.hpp', ['../d3/d78/modules_2core_2include_2opencv2_2core_2cuda_2reduce_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ - ['../d3/d33/contrib_2modules_2cudev_2include_2opencv2_2cudev_2block_2reduce_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ - ['../d4/d25/contrib_2modules_2cudev_2include_2opencv2_2cudev_2grid_2reduce_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ + ['../da/dca/modules_2core_2include_2opencv2_2core_2cuda_2detail_2reduce_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ ['../d7/da3/contrib_2modules_2cudev_2include_2opencv2_2cudev_2warp_2reduce_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ - ['../da/dca/modules_2core_2include_2opencv2_2core_2cuda_2detail_2reduce_8hpp.html', 1, '(Global Namespace)'] │ │ │ │ + ['../d4/d25/contrib_2modules_2cudev_2include_2opencv2_2cudev_2grid_2reduce_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ + ['../d3/d33/contrib_2modules_2cudev_2include_2opencv2_2cudev_2block_2reduce_8hpp.html', 1, '(Global Namespace)'] │ │ │ │ ]], │ │ │ │ ['reduce_5favg_174', ['REDUCE_AVG', ['../d2/de8/group__core__array.html#gga14cdedf2933367eb9395ec16798af994a85f039992a454ca367bc190529766c7e', 1, 'cv']]], │ │ │ │ ['reduce_5fkey_5fval_2ehpp_175', ['reduce_key_val.hpp', ['../d3/dbd/reduce__key__val_8hpp.html', 1, '']]], │ │ │ │ ['reduce_5fmax_176', ['REDUCE_MAX', ['../d2/de8/group__core__array.html#gga14cdedf2933367eb9395ec16798af994a928b4c3eb0a038ea41b61d122c0495ee', 1, 'cv']]], │ │ │ │ ['reduce_5fmin_177', ['REDUCE_MIN', ['../d2/de8/group__core__array.html#gga14cdedf2933367eb9395ec16798af994a1f40a2ed66c8a8b8198186da47ec7b76', 1, 'cv']]], │ │ │ │ ['reduce_5fsum_178', ['REDUCE_SUM', ['../d2/de8/group__core__array.html#gga14cdedf2933367eb9395ec16798af994a101441e283ed69f20cfc5468114f9867', 1, 'cv']]], │ │ │ │ ['reduce_5fsum2_179', ['REDUCE_SUM2', ['../d2/de8/group__core__array.html#gga14cdedf2933367eb9395ec16798af994aadf86c43faf54c6061fa412050efd469', 1, 'cv']]], │ │ ├── ./usr/share/doc/opencv-doc/opencv4/html/search/all_1e.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -2166,15 +2166,15 @@ │ │ │ │ ['../d8/dd0/classcv_1_1AutoBuffer.html#a3e51a3baa4dcb2d8eaefddc4c3ceb455', 1, 'cv::AutoBuffer::size()'], │ │ │ │ ['../da/dc5/classcv_1_1ImageCollection.html#a0b348c352b8e12eea2a4ac3da53aa367', 1, 'cv::ImageCollection::size()'], │ │ │ │ ['../d4/dac/classcv_1_1DescriptorMatcher_1_1DescriptorCollection.html#a18e35a5bce978c5729ef5ea58b1fee28', 1, 'cv::DescriptorMatcher::DescriptorCollection::size()'], │ │ │ │ ['../d7/d20/classcv_1_1detail_1_1tracking_1_1tbm_1_1Track.html#acee0dd0e63e62f73482101f7e62c0f65', 1, 'cv::detail::tracking::tbm::Track::size()'], │ │ │ │ ['../dc/d5a/classcv_1_1detail_1_1tracking_1_1tbm_1_1ResizedImageDescriptor.html#af5fd082c1a2c03a0561d792cf9ecf561', 1, 'cv::detail::tracking::tbm::ResizedImageDescriptor::size()'], │ │ │ │ ['../d3/daa/classcv_1_1detail_1_1tracking_1_1tbm_1_1IImageDescriptor.html#ad48d0a2441c24e8e44232161a3056b9e', 1, 'cv::detail::tracking::tbm::IImageDescriptor::size()'], │ │ │ │ ['../d5/d49/classcv_1_1optflow_1_1GPCTrainingSamples.html#a111ea435bae91141a418e9ce8f5f31b2', 1, 'cv::optflow::GPCTrainingSamples::size()'], │ │ │ │ - ['../d6/d53/classcv_1_1ogl_1_1Arrays.html#a6f9bc2bcf2fed70c4a6b49f62b7b01bd', 1, 'cv::ogl::Arrays::size()'], │ │ │ │ + ['../de/dd9/classcv_1_1FileNode.html#a05c11e00d20223cde61677de91c71197', 1, 'cv::FileNode::size()'], │ │ │ │ ['../d3/d85/classcv_1_1cann_1_1AscendMat.html#a308a4a7f6bdfb970b7bf9bb2c94a6e8c', 1, 'cv::cann::AscendMat::size()'], │ │ │ │ ['../d5/df1/tutorial_js_some_data_structures.html#autotoc_md1587', 1, 'Size'], │ │ │ │ ['../de/db0/classcv_1_1RMat_1_1View.html#afc129407416a92754b9488f4b1bfcd6a', 1, 'cv::RMat::View::size()'], │ │ │ │ ['../d4/d3a/classcv_1_1GKernelPackage.html#a412b8bb971ec29a340a95fffd7dbad88', 1, 'cv::GKernelPackage::size()'], │ │ │ │ ['../d6/dab/classcv_1_1detail_1_1VectorRef.html#a40c63155692ab1683a62d1fea3ff8247', 1, 'cv::detail::VectorRef::size()'], │ │ │ │ ['../d2/dab/classcv_1_1detail_1_1VectorRefT.html#a873906828ea3a1ea8f1ba438baff9a3f', 1, 'cv::detail::VectorRefT::size()'], │ │ │ │ ['../df/d63/classcv_1_1detail_1_1BasicVectorRef.html#a3c90fda1accc25eb37222f3e9dd63fc2', 1, 'cv::detail::BasicVectorRef::size()'], │ │ │ │ @@ -2191,16 +2191,16 @@ │ │ │ │ ['../d4/d32/classcv_1_1__InputArray.html#a0d8ed64f7bbbda6d34e3289681ffdff0', 1, 'cv::_InputArray::size()'], │ │ │ │ ['../da/d35/classcv_1_1Range.html#a202fc148a0ad8df135215ecf1781a0b8', 1, 'cv::Range::size()'], │ │ │ │ ['../dd/da9/classcv_1_1SparseMat.html#a4fe9c986b3cf0240c68ce985df334c17', 1, 'cv::SparseMat::size()'], │ │ │ │ ['../d1/d9d/classcv_1_1MatOp.html#a80309fab69773987e1c740279b82abd1', 1, 'cv::MatOp::size()'], │ │ │ │ ['../d1/d10/classcv_1_1MatExpr.html#a8b5fcf3cec72903e2692e5c71e1c283b', 1, 'cv::MatExpr::size()'], │ │ │ │ ['../d3/d68/classcv_1_1ogl_1_1Buffer.html#af627f6025672dcd3f054667da63f6ae1', 1, 'cv::ogl::Buffer::size()'], │ │ │ │ ['../d5/ddf/classcv_1_1ogl_1_1Texture2D.html#a65f84b8b7f310fa80d6ca0e1e80be492', 1, 'cv::ogl::Texture2D::size()'], │ │ │ │ + ['../d6/d53/classcv_1_1ogl_1_1Arrays.html#a6f9bc2bcf2fed70c4a6b49f62b7b01bd', 1, 'cv::ogl::Arrays::size()'], │ │ │ │ ['../da/da9/structNppStInterpolationState.html#aa31c426771eec1a37fb4b916671c92a9', 1, 'NppStInterpolationState::size'], │ │ │ │ - ['../de/dd9/classcv_1_1FileNode.html#a05c11e00d20223cde61677de91c71197', 1, 'cv::FileNode::size()'], │ │ │ │ ['../d2/d44/classcv_1_1Rect__.html#a9c727936bddffe38079628e0ec7942cc', 1, 'cv::Rect_::size()'], │ │ │ │ ['../d0/d82/structcv_1_1GMatDesc.html#a77d63c37cb49acd13b4deb35e25c2822', 1, 'cv::GMatDesc::size'], │ │ │ │ ['../d9/daa/structcvhalKeyPoint.html#a595113ae7b221433c941ed1bf1fcfc74', 1, 'cvhalKeyPoint::size'], │ │ │ │ ['../d5/d14/classcv_1_1BOWTrainer.html#a0aa1b9d10cb5790c13977c7ef3d60589', 1, 'cv::BOWTrainer::size'], │ │ │ │ ['../d2/d29/classcv_1_1KeyPoint.html#a308006c9f963547a8cff61548ddd2ef2', 1, 'cv::KeyPoint::size'], │ │ │ │ ['../d8/d8d/classcv_1_1dnn_1_1LRNLayer.html#a04afb9bb9e17c59094a2b1e2a87e44b9', 1, 'cv::dnn::LRNLayer::size'], │ │ │ │ ['../db/dd6/classcv_1_1RotatedRect.html#a68ac6414ed3233245175e2c4f3b2bbfb', 1, 'cv::RotatedRect::size'], │ │ │ │ @@ -2671,18 +2671,18 @@ │ │ │ │ ['sr_5ffixed_1328', ['SR_FIXED', ['../d2/d84/group__optflow.html#ggabd57af723cddf921d0c0601a6e8e789ba039f4856c9cd55fdd1a50c20885f046b', 1, 'cv::optflow']]], │ │ │ │ ['sr_5fgeneral100_1329', ['SR_general100', ['../d5/d19/classcv_1_1datasets_1_1SR__general100.html', 1, 'cv::datasets']]], │ │ │ │ ['sr_5fgeneral100_2ehpp_1330', ['sr_general100.hpp', ['../d4/d6b/sr__general100_8hpp.html', 1, '']]], │ │ │ │ ['sr_5fgeneral100obj_1331', ['SR_general100Obj', ['../da/dad/structcv_1_1datasets_1_1SR__general100Obj.html', 1, 'cv::datasets']]], │ │ │ │ ['src_1332', ['src', ['../da/dfa/structcv_1_1cudev_1_1BrdConstant.html#a0e461dcbe6609290f44f0dd0cfdfe014', 1, 'cv::cudev::BrdConstant::src'], │ │ │ │ ['../df/daa/structcv_1_1cudev_1_1LutPtr.html#a57c863b2fef18a0496ce850f595e6573', 1, 'cv::cudev::LutPtr::src'], │ │ │ │ ['../d4/d89/structcv_1_1cudev_1_1LaplacianPtr_3_013_00_01SrcPtr_01_4.html#a33991dc92063cf0e67005497b259e93c', 1, 'cv::cudev::LaplacianPtr< 3, SrcPtr >::src'], │ │ │ │ - ['../d0/de6/structcv_1_1cudev_1_1LaplacianPtr_3_011_00_01SrcPtr_01_4.html#a5d3403e2a9f0bf0884a715e4224fa1e9', 1, 'cv::cudev::LaplacianPtr< 1, SrcPtr >::src'], │ │ │ │ ['../dc/d09/structcv_1_1cudev_1_1RemapPtr1.html#a1bb3834387ca5de2f8203beb166d26b3', 1, 'cv::cudev::RemapPtr1::src'], │ │ │ │ ['../d1/d32/structcv_1_1cudev_1_1RemapPtr2.html#ab2019553ffaaa44a94da9bcb69317fce', 1, 'cv::cudev::RemapPtr2::src'], │ │ │ │ ['../d5/db1/structcv_1_1cudev_1_1ResizePtr.html#a74b6f1bae461e40b5bcd751b5802a219', 1, 'cv::cudev::ResizePtr::src'], │ │ │ │ + ['../d0/de6/structcv_1_1cudev_1_1LaplacianPtr_3_011_00_01SrcPtr_01_4.html#a5d3403e2a9f0bf0884a715e4224fa1e9', 1, 'cv::cudev::LaplacianPtr< 1, SrcPtr >::src'], │ │ │ │ ['../dd/d01/structcv_1_1cudev_1_1UnaryTransformPtr.html#aaa7399d4841ac33ec7469c162753e97c', 1, 'cv::cudev::UnaryTransformPtr::src'], │ │ │ │ ['../dc/d51/structcv_1_1cudev_1_1DerivYPtr.html#aa1e78c23ab24dcb531bc1d4f8b1298db', 1, 'cv::cudev::DerivYPtr::src'], │ │ │ │ ['../de/dc8/structcv_1_1cudev_1_1SobelXPtr.html#aa965d2eb5adc35fa068158328ddae626', 1, 'cv::cudev::SobelXPtr::src'], │ │ │ │ ['../d0/d70/structcv_1_1cudev_1_1ScharrYPtr.html#ace8f6213d3a601a401acea4dd2f7e5db', 1, 'cv::cudev::ScharrYPtr::src'], │ │ │ │ ['../d0/da6/structcv_1_1cudev_1_1SobelYPtr.html#a332a972a71fc04af4791d58a1e00ad14', 1, 'cv::cudev::SobelYPtr::src'], │ │ │ │ ['../d7/d71/structcv_1_1cudev_1_1ScharrXPtr.html#a9fc7f2466fbe547c1eda7c466d513128', 1, 'cv::cudev::ScharrXPtr::src'], │ │ │ │ ['../dd/d49/structcv_1_1cudev_1_1CountNonZeroExprBody.html#afe56646189c220ebc5d8e726067af322', 1, 'cv::cudev::CountNonZeroExprBody::src'], │ │ │ │ @@ -2717,18 +2717,18 @@ │ │ │ │ ['sse_5futils_2ehpp_1340', ['sse_utils.hpp', ['../d2/d0d/sse__utils_8hpp.html', 1, '']]], │ │ │ │ ['ssim_1341', ['Image similarity - PSNR and SSIM', ['../d5/dc4/tutorial_video_input_psnr_ssim.html#autotoc_md224', 1, '']]], │ │ │ │ ['ssim_20on_20the_20gpu_1342', ['Similarity check (PNSR and SSIM) on the GPU', ['../dd/d3d/tutorial_gpu_basics_similarity.html', 1, 'tutorial_table_of_content_gpu']]], │ │ │ │ ['st_5fbilinear_1343', ['ST_BILINEAR', ['../d2/d84/group__optflow.html#ggaac4a33e26da30a5c5aa1ed3f66fc0998a412f292ae2101f5fd3de778cc597c13c', 1, 'cv::optflow']]], │ │ │ │ ['st_5fstandart_1344', ['ST_STANDART', ['../d2/d84/group__optflow.html#ggaac4a33e26da30a5c5aa1ed3f66fc0998aa4c47a58f231a484eff77183148908a2', 1, 'cv::optflow']]], │ │ │ │ ['stabilization_1345', ['Video Stabilization', ['../d5/d50/group__videostab.html', 1, '']]], │ │ │ │ ['stabilizationmotions_1346', ['stabilizationmotions', ['../d5/d00/classcv_1_1videostab_1_1InpainterBase.html#a5e5a2419777cc35f942874dba51fea2c', 1, 'cv::videostab::InpainterBase::stabilizationMotions()'], │ │ │ │ - ['../d8/d16/classcv_1_1videostab_1_1WobbleSuppressorBase.html#a0fe6a95a5b0629715ed35ae101221e49', 1, 'cv::videostab::WobbleSuppressorBase::stabilizationMotions() const'] │ │ │ │ + ['../d8/d16/classcv_1_1videostab_1_1WobbleSuppressorBase.html#a0fe6a95a5b0629715ed35ae101221e49', 1, 'cv::videostab::WobbleSuppressorBase::stabilizationMotions()'] │ │ │ │ ]], │ │ │ │ - ['stabilizationmotions_5f_1347', ['stabilizationmotions_', ['../d8/d16/classcv_1_1videostab_1_1WobbleSuppressorBase.html#aab16261a43fe5585cff7e2dc0b26e161', 1, 'cv::videostab::WobbleSuppressorBase::stabilizationMotions_'], │ │ │ │ - ['../d2/d6c/classcv_1_1videostab_1_1StabilizerBase.html#aeb86f1064652cceb6f9a1735a81da5af', 1, 'cv::videostab::StabilizerBase::stabilizationMotions_'], │ │ │ │ + ['stabilizationmotions_5f_1347', ['stabilizationmotions_', ['../d2/d6c/classcv_1_1videostab_1_1StabilizerBase.html#aeb86f1064652cceb6f9a1735a81da5af', 1, 'cv::videostab::StabilizerBase::stabilizationMotions_'], │ │ │ │ + ['../d8/d16/classcv_1_1videostab_1_1WobbleSuppressorBase.html#aab16261a43fe5585cff7e2dc0b26e161', 1, 'cv::videostab::WobbleSuppressorBase::stabilizationMotions_'], │ │ │ │ ['../d5/d00/classcv_1_1videostab_1_1InpainterBase.html#ab778e2b654dbd54e36bb0aea388914ef', 1, 'cv::videostab::InpainterBase::stabilizationMotions_'] │ │ │ │ ]], │ │ │ │ ['stabilize_1348', ['stabilize', ['../d3/d59/classcv_1_1videostab_1_1LpMotionStabilizer.html#afa0457ef82cc83b2ffb33260613b88ca', 1, 'cv::videostab::LpMotionStabilizer::stabilize()'], │ │ │ │ ['../de/d06/classcv_1_1videostab_1_1GaussianMotionFilter.html#a730cd1b20cbb7b7ab097d72c9704f527', 1, 'cv::videostab::GaussianMotionFilter::stabilize()'], │ │ │ │ ['../dd/df4/classcv_1_1videostab_1_1MotionFilterBase.html#ae576542f1a966424773bca4b9c51a612', 1, 'cv::videostab::MotionFilterBase::stabilize(int size, const std::vector< Mat > &motions, const Range &range, Mat *stabilizationMotions) CV_OVERRIDE'], │ │ │ │ ['../dd/df4/classcv_1_1videostab_1_1MotionFilterBase.html#a6d225d8210db738480512ed04620e5e9', 1, 'cv::videostab::MotionFilterBase::stabilize(int idx, const std::vector< Mat > &motions, const Range &range)=0'], │ │ │ │ ['../d9/d76/classcv_1_1videostab_1_1MotionStabilizationPipeline.html#a1cf207a73c79fa1ffe7b44a93bec7462', 1, 'cv::videostab::MotionStabilizationPipeline::stabilize()'], │ │ │ │ @@ -2931,32 +2931,32 @@ │ │ │ │ ['../db/d58/group__calib3d__fisheye.html#gac1af58774006689056b0f2ef1db55ecc', 1, 'cv::fisheye::stereoRectify()'] │ │ │ │ ]], │ │ │ │ ['stereorectifyuncalibrated_1451', ['stereoRectifyUncalibrated', ['../d9/d0c/group__calib3d.html#gaadc5b14471ddc004939471339294f052', 1, 'cv']]], │ │ │ │ ['stereoscopic_20image_1452', ['Source Stereoscopic Image', ['../d3/d14/tutorial_ximgproc_disparity_filtering.html#autotoc_md2044', 1, '']]], │ │ │ │ ['stereosgbm_1453', ['StereoSGBM', ['../d2/d85/classcv_1_1StereoSGBM.html', 1, 'cv']]], │ │ │ │ ['stereosgm_1454', ['StereoSGM', ['../d1/ddc/classcv_1_1cuda_1_1StereoSGM.html', 1, 'cv::cuda']]], │ │ │ │ ['stillimageoutput_1455', ['stillImageOutput', ['../d4/d1d/interfaceCvPhotoCamera.html#ad27c86e27dfe3fc626fe9a1bda9e0c73', 1, 'CvPhotoCamera']]], │ │ │ │ - ['stitch_1456', ['stitch', ['../d2/d8d/classcv_1_1Stitcher.html#a3156a44286a7065ba9e8802023ad2074', 1, 'cv::Stitcher::stitch(InputArrayOfArrays images, InputArrayOfArrays masks, OutputArray pano)'], │ │ │ │ - ['../d2/d8d/classcv_1_1Stitcher.html#a37ee5bacf229e9d0fb9f97c8f5ed1acd', 1, 'cv::Stitcher::stitch(InputArrayOfArrays images, OutputArray pano)'] │ │ │ │ + ['stitch_1456', ['stitch', ['../d2/d8d/classcv_1_1Stitcher.html#a37ee5bacf229e9d0fb9f97c8f5ed1acd', 1, 'cv::Stitcher::stitch(InputArrayOfArrays images, OutputArray pano)'], │ │ │ │ + ['../d2/d8d/classcv_1_1Stitcher.html#a3156a44286a7065ba9e8802023ad2074', 1, 'cv::Stitcher::stitch(InputArrayOfArrays images, InputArrayOfArrays masks, OutputArray pano)'] │ │ │ │ ]], │ │ │ │ ['stitcher_1457', ['Stitcher', ['../d2/d8d/classcv_1_1Stitcher.html', 1, 'cv']]], │ │ │ │ ['stitcher_20class_1458', ['High level stitching API (Stitcher class)', ['../d8/d19/tutorial_stitcher.html', 1, 'tutorial_table_of_content_other']]], │ │ │ │ ['stitcher_2emarkdown_1459', ['stitcher.markdown', ['../dd/d7e/stitcher_8markdown.html', 1, '']]], │ │ │ │ ['stitching_1460', ['Images stitching', ['../d1/d46/group__stitching.html', 1, '']]], │ │ │ │ ['stitching_20api_20stitcher_20class_1461', ['High level stitching API (Stitcher class)', ['../d8/d19/tutorial_stitcher.html', 1, 'tutorial_table_of_content_other']]], │ │ │ │ ['stitching_20detailed_20python_20opencv_204_200_201_1462', ['Stitching detailed (python opencv >4.0.1)', ['../d8/d19/tutorial_stitcher.html#autotoc_md1151', 1, '']]], │ │ │ │ ['stitching_20from_20a_20rotating_20camera_1463', ['Demo 5: Basic panorama stitching from a rotating camera', ['../d9/dab/tutorial_homography.html#tutorial_homography_Demo5', 1, '']]], │ │ │ │ ['stitching_20stitching_20module_1464', ['Images stitching (stitching module)', ['../d0/d33/tutorial_table_of_content_stitching.html', 1, '']]], │ │ │ │ ['stitching_20video_1465', ['Other tutorials (ml, objdetect, photo, stitching, video)', ['../d3/dd5/tutorial_table_of_content_other.html', 1, 'tutorial_root']]], │ │ │ │ ['stitching_2ehpp_1466', ['stitching.hpp', ['../dc/d7a/stitching_8hpp.html', 1, '']]], │ │ │ │ ['stitchingloglevel_1467', ['stitchingLogLevel', ['../d1/d46/group__stitching.html#ga24289dcfcb22bb6de3adef8e8e1fc86c', 1, 'cv::detail']]], │ │ │ │ ['stop_1468', ['stop', ['../d9/d6f/classcv_1_1TickMeter.html#aa6dfbdc68373d10e371bd35f92c7adb3', 1, 'cv::TickMeter::stop()'], │ │ │ │ + ['../d1/d9b/classcv_1_1GStreamingCompiled.html#a3974060adbb61cd678387463fc19c0a5', 1, 'cv::GStreamingCompiled::stop()'], │ │ │ │ ['../db/de9/classcv_1_1DetectionBasedTracker.html#ac4061f2d28cf54e48360c8aa06135f38', 1, 'cv::DetectionBasedTracker::stop()'], │ │ │ │ - ['../df/d4a/classcv_1_1ocl_1_1Timer.html#adf6487aa9d91d2282201b197b9bd41d3', 1, 'cv::ocl::Timer::stop()'], │ │ │ │ - ['../d1/d9b/classcv_1_1GStreamingCompiled.html#a3974060adbb61cd678387463fc19c0a5', 1, 'cv::GStreamingCompiled::stop()'] │ │ │ │ + ['../df/d4a/classcv_1_1ocl_1_1Timer.html#adf6487aa9d91d2282201b197b9bd41d3', 1, 'cv::ocl::Timer::stop()'] │ │ │ │ ]], │ │ │ │ ['stopentityanimation_1469', ['stopEntityAnimation', ['../d5/d68/classcv_1_1ovis_1_1WindowScene.html#af64b09bc3720eccdfdeaf13fcc5c8f27', 1, 'cv::ovis::WindowScene']]], │ │ │ │ ['stoploop_1470', ['stopLoop', ['../dc/d46/group__highgui__qt.html#gad4783dd50a6844a04ac8cb4fe158fdf3', 1, 'cv']]], │ │ │ │ ['storage_1471', ['storage', ['../d4/da4/group__core__xml.html#autotoc_md14', 1, 'Reading data from a file storage.'], │ │ │ │ ['../d4/da4/group__core__xml.html#autotoc_md13', 1, 'Writing to a file storage.'] │ │ │ │ ]], │ │ │ │ ['storages_1472', ['XML/YAML/JSON file storages.', ['../d4/da4/group__core__xml.html#xml_storage', 1, '']]], │ │ │ │ @@ -2964,29 +2964,29 @@ │ │ │ │ ['store_20operations_1474', ['store operations', ['../d6/dd1/tutorial_univ_intrin.html#autotoc_md340', 1, 'Load and Store operations'], │ │ │ │ ['../df/d91/group__core__hal__intrin.html#autotoc_md1', 1, 'Load and store operations'] │ │ │ │ ]], │ │ │ │ ['store_5faligned_1475', ['STORE_ALIGNED', ['../d6/d19/namespacecv_1_1hal.html#afe7c2ef8e1924718cfa3a33010834904ab5cb308631f6c97244313f5a4d09d621', 1, 'cv::hal']]], │ │ │ │ ['store_5faligned_5fnocache_1476', ['STORE_ALIGNED_NOCACHE', ['../d6/d19/namespacecv_1_1hal.html#afe7c2ef8e1924718cfa3a33010834904a37cb7fb8de75e609d48468004ffdb4d2', 1, 'cv::hal']]], │ │ │ │ ['store_5funaligned_1477', ['STORE_UNALIGNED', ['../d6/d19/namespacecv_1_1hal.html#afe7c2ef8e1924718cfa3a33010834904adcb5798a4d3a33e327c29d5bb95c080a', 1, 'cv::hal']]], │ │ │ │ ['stored_20in_20memory_1478', ['How is the image matrix stored in memory?', ['../db/da5/tutorial_how_to_scan_images.html#autotoc_md290', 1, '']]], │ │ │ │ - ['storekind_1479', ['storekind', ['../d6/dab/classcv_1_1detail_1_1VectorRef.html#ae3025da47f1f289699d023813691122a', 1, 'cv::detail::VectorRef::storeKind()'], │ │ │ │ - ['../db/d3b/classcv_1_1detail_1_1GArrayU.html#a93aa00b3bcccdfb22a2c5b418d859600', 1, 'cv::detail::GArrayU::storeKind()'], │ │ │ │ - ['../da/dbf/classcv_1_1detail_1_1OpaqueRef.html#a4de1a88e684076e18666a541ad66f3ac', 1, 'cv::detail::OpaqueRef::storeKind()'], │ │ │ │ - ['../d4/ddf/classcv_1_1detail_1_1GOpaqueU.html#a5f1c54fa09db16f49e2d773d7a59f142', 1, 'cv::detail::GOpaqueU::storeKind()'] │ │ │ │ + ['storekind_1479', ['storekind', ['../da/dbf/classcv_1_1detail_1_1OpaqueRef.html#a4de1a88e684076e18666a541ad66f3ac', 1, 'cv::detail::OpaqueRef::storeKind()'], │ │ │ │ + ['../d4/ddf/classcv_1_1detail_1_1GOpaqueU.html#a5f1c54fa09db16f49e2d773d7a59f142', 1, 'cv::detail::GOpaqueU::storeKind()'], │ │ │ │ + ['../d6/dab/classcv_1_1detail_1_1VectorRef.html#ae3025da47f1f289699d023813691122a', 1, 'cv::detail::VectorRef::storeKind()'], │ │ │ │ + ['../db/d3b/classcv_1_1detail_1_1GArrayU.html#a93aa00b3bcccdfb22a2c5b418d859600', 1, 'cv::detail::GArrayU::storeKind()'] │ │ │ │ ]], │ │ │ │ ['storemode_1480', ['StoreMode', ['../d6/d19/namespacecv_1_1hal.html#afe7c2ef8e1924718cfa3a33010834904', 1, 'cv::hal']]], │ │ │ │ ['storing_20methods_1481', ['Storing methods', ['../d6/d6d/tutorial_mat_the_basic_image_container.html#autotoc_md330', 1, '']]], │ │ │ │ ['str_1482', ['STR', ['../de/dd9/classcv_1_1FileNode.html#af6e1ea6a3e856bc681355cf0ab7353f3a3b0470ed27a22c483c56b74d21b41d1e', 1, 'cv::FileNode']]], │ │ │ │ ['straight_20bounding_20rectangle_1483', ['straight bounding rectangle', ['../dc/dcf/tutorial_js_contour_features.html#autotoc_md1632', 1, '7.a. Straight Bounding Rectangle'], │ │ │ │ ['../dd/d49/tutorial_py_contour_features.html#autotoc_md1318', 1, '7.a. Straight Bounding Rectangle'] │ │ │ │ ]], │ │ │ │ - ['stream_1484', ['stream', ['../d9/df3/classcv_1_1cuda_1_1Stream.html#a3da3061ab4b0c737fcb092494b54cec8', 1, 'cv::cuda::Stream::Stream(const Ptr< GpuMat::Allocator > &allocator)'], │ │ │ │ + ['stream_1484', ['stream', ['../dd/d9e/classcv_1_1cann_1_1AscendStream_1_1Impl.html#acd3db381d438075dad61968f2af61f8a', 1, 'cv::cann::AscendStream::Impl::stream'], │ │ │ │ + ['../d9/df3/classcv_1_1cuda_1_1Stream.html#a5da4a3f60245e71dd298f34991edf940', 1, 'cv::cuda::Stream::Stream(const size_t cudaFlags)'], │ │ │ │ + ['../d9/df3/classcv_1_1cuda_1_1Stream.html#a3da3061ab4b0c737fcb092494b54cec8', 1, 'cv::cuda::Stream::Stream(const Ptr< GpuMat::Allocator > &allocator)'], │ │ │ │ ['../d9/df3/classcv_1_1cuda_1_1Stream.html#aa6434e2f5f29bd81406732b39951c246', 1, 'cv::cuda::Stream::Stream()'], │ │ │ │ - ['../dd/d9e/classcv_1_1cann_1_1AscendStream_1_1Impl.html#acd3db381d438075dad61968f2af61f8a', 1, 'cv::cann::AscendStream::Impl::stream'], │ │ │ │ - ['../d9/df3/classcv_1_1cuda_1_1Stream.html#a5da4a3f60245e71dd298f34991edf940', 1, 'cv::cuda::Stream::Stream()'], │ │ │ │ ['../d9/df3/classcv_1_1cuda_1_1Stream.html', 1, 'cv::cuda::Stream'] │ │ │ │ ]], │ │ │ │ ['stream_20online_20camera_20or_20offline_20file_1485', ['How to read a video stream (online-camera or offline-file)?', ['../d5/dc4/tutorial_video_input_psnr_ssim.html#autotoc_md223', 1, '']]], │ │ │ │ ['stream_5faccessor_2ehpp_1486', ['stream_accessor.hpp', ['../d3/d19/stream__accessor_8hpp.html', 1, '']]], │ │ │ │ ['streamaccessor_1487', ['streamaccessor', ['../d9/df3/classcv_1_1cuda_1_1Stream.html#a8362b5c9fdffe61e694647684353b090', 1, 'cv::cuda::Stream::StreamAccessor'], │ │ │ │ ['../d6/df1/structcv_1_1cuda_1_1StreamAccessor.html', 1, 'cv::cuda::StreamAccessor'] │ │ │ │ ]], │ │ │ │ @@ -2994,43 +2994,43 @@ │ │ │ │ ['streaming_20pipeline_1489', ['streaming pipeline', ['../d4/d48/tutorial_gapi_face_beautification.html#gapi_fb_compiling', 1, 'Compiling the streaming pipeline'], │ │ │ │ ['../d4/d48/tutorial_gapi_face_beautification.html#gapi_fb_running', 1, 'Running the streaming pipeline'] │ │ │ │ ]], │ │ │ │ ['streams_1490', ['Copy values greater than 0 to a new gpu matrix while using streams', ['../d8/db9/tutorial_gpu_thrust_interop.html#autotoc_md521', 1, '']]], │ │ │ │ ['streamtype_1491', ['StreamType', ['../d2/d75/namespacecv.html#a172ccaaba996db5201af1c17c04a5fe8', 1, 'cv']]], │ │ │ │ ['street_20view_20text_20dataset_1492', ['The Street View Text Dataset', ['../db/d7b/group__datasets__tr.html#autotoc_md55', 1, '']]], │ │ │ │ ['stride_1493', ['stride', ['../de/d26/classNCVMatrix.html#af82410455b282716daa1c06401596c09', 1, 'NCVMatrix::stride()'], │ │ │ │ - ['../d4/d68/classcv_1_1MediaFrame_1_1View.html#ab8cd44776f89f6dd8fbc0624cc0df1d7', 1, 'cv::MediaFrame::View::stride'], │ │ │ │ - ['../d5/d1f/classcv_1_1dnn_1_1BaseConvolutionLayer.html#a2d2b66c46cc35bda716d05ea4a152ac9', 1, 'cv::dnn::BaseConvolutionLayer::stride'] │ │ │ │ + ['../d5/d1f/classcv_1_1dnn_1_1BaseConvolutionLayer.html#a2d2b66c46cc35bda716d05ea4a152ac9', 1, 'cv::dnn::BaseConvolutionLayer::stride'], │ │ │ │ + ['../d4/d68/classcv_1_1MediaFrame_1_1View.html#ab8cd44776f89f6dd8fbc0624cc0df1d7', 1, 'cv::MediaFrame::View::stride'] │ │ │ │ ]], │ │ │ │ ['strides_1494', ['strides', ['../d4/d68/classcv_1_1MediaFrame_1_1View.html#a39d0b79950b1b792498205d450280bfc', 1, 'cv::MediaFrame::View::Strides'], │ │ │ │ ['../d5/d1f/classcv_1_1dnn_1_1BaseConvolutionLayer.html#aa6acaa46d472fe48978fd889cf65da8d', 1, 'cv::dnn::BaseConvolutionLayer::strides'], │ │ │ │ ['../de/d7d/classcv_1_1dnn_1_1PoolingLayer.html#a3bace2a59639f3f9eb26c83a5a36b8cd', 1, 'cv::dnn::PoolingLayer::strides'] │ │ │ │ ]], │ │ │ │ - ['string_1495', ['string', ['../dc/d84/group__core__basic.html#gga8af2ae1e077644d1dd232d29d988b79aa63b588d5559f64f89a416e656880b949', 1, 'cv::STRING'], │ │ │ │ - ['../de/dd9/classcv_1_1FileNode.html#ae7fa61092f596efa610a7f672885f3d6', 1, 'cv::FileNode::string()'], │ │ │ │ - ['../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2', 1, 'cv::String'], │ │ │ │ - ['../de/dd9/classcv_1_1FileNode.html#af6e1ea6a3e856bc681355cf0ab7353f3a393e00c4e8eca7203f137e1bcb1835e1', 1, 'cv::FileNode::STRING'] │ │ │ │ + ['string_1495', ['string', ['../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2', 1, 'cv::String'], │ │ │ │ + ['../dc/d84/group__core__basic.html#gga8af2ae1e077644d1dd232d29d988b79aa63b588d5559f64f89a416e656880b949', 1, 'cv::STRING'], │ │ │ │ + ['../de/dd9/classcv_1_1FileNode.html#af6e1ea6a3e856bc681355cf0ab7353f3a393e00c4e8eca7203f137e1bcb1835e1', 1, 'cv::FileNode::STRING'], │ │ │ │ + ['../de/dd9/classcv_1_1FileNode.html#ae7fa61092f596efa610a7f672885f3d6', 1, 'cv::FileNode::string() const'] │ │ │ │ ]], │ │ │ │ ['strings_20with_20freetype_20harfbuzz_1496', ['Drawing UTF-8 strings with freetype/harfbuzz', ['../d4/dfc/group__freetype.html', 1, '']]], │ │ │ │ ['strip_1497', ['strip', ['../d2/daf/namespacecv_1_1detail.html#aa3e0fd33a9587046335f9eb87e399f67', 1, 'cv::detail']]], │ │ │ │ - ['strip_5ftype_1498', ['strip_type', ['../da/de0/structcv_1_1detail_1_1GTypeTraits_3_01cv_1_1GOpaque_3_01T_01_4_01_4.html#a77a6e7c7f3160d00a6a41f720200932c', 1, 'cv::detail::GTypeTraits< cv::GOpaque< T > >::strip_type'], │ │ │ │ - ['../da/d1b/structcv_1_1detail_1_1GTypeTraits_3_01cv_1_1GArray_3_01T_01_4_01_4.html#acdb454d1c6a7b3529ca54a5094034d51', 1, 'cv::detail::GTypeTraits< cv::GArray< T > >::strip_type'] │ │ │ │ + ['strip_5ftype_1498', ['strip_type', ['../da/d1b/structcv_1_1detail_1_1GTypeTraits_3_01cv_1_1GArray_3_01T_01_4_01_4.html#acdb454d1c6a7b3529ca54a5094034d51', 1, 'cv::detail::GTypeTraits< cv::GArray< T > >::strip_type'], │ │ │ │ + ['../da/de0/structcv_1_1detail_1_1GTypeTraits_3_01cv_1_1GOpaque_3_01T_01_4_01_4.html#a77a6e7c7f3160d00a6a41f720200932c', 1, 'cv::detail::GTypeTraits< cv::GOpaque< T > >::strip_type'] │ │ │ │ ]], │ │ │ │ ['strong_20cv_20undistort_20strong_1499', ['1. Using <strong>cv.undistort()</strong>', ['../dc/dbb/tutorial_py_calibration.html#autotoc_md1170', 1, '']]], │ │ │ │ ['strong_20remapping_20strong_1500', ['2. Using <strong>remapping</strong>', ['../dc/dbb/tutorial_py_calibration.html#autotoc_md1171', 1, '']]], │ │ │ │ ['strong_5faffinity_5fthr_1501', ['strong_affinity_thr', ['../d7/d92/structcv_1_1detail_1_1tracking_1_1tbm_1_1TrackerParams.html#aa796d8e8f51534a61d16b0a9ae44f3b3', 1, 'cv::detail::tracking::tbm::TrackerParams']]], │ │ │ │ ['strong_5fthreshold_1502', ['strong_threshold', ['../dc/d64/classcv_1_1linemod_1_1ColorGradient.html#aac6fe117f76f42650f0cf8b02d5aed19', 1, 'cv::linemod::ColorGradient']]], │ │ │ │ - ['strongclassifierdirectselection_1503', ['strongclassifierdirectselection', ['../d0/d93/classcv_1_1detail_1_1tracking_1_1online__boosting_1_1StrongClassifierDirectSelection.html#ad5d13857d21805642294084792cb9e7f', 1, 'cv::detail::tracking::online_boosting::StrongClassifierDirectSelection::StrongClassifierDirectSelection()'], │ │ │ │ - ['../d0/d93/classcv_1_1detail_1_1tracking_1_1online__boosting_1_1StrongClassifierDirectSelection.html', 1, 'cv::detail::tracking::StrongClassifierDirectSelection'], │ │ │ │ - ['../d0/d93/classcv_1_1detail_1_1tracking_1_1online__boosting_1_1StrongClassifierDirectSelection.html', 1, 'cv::detail::tracking::online_boosting::StrongClassifierDirectSelection'], │ │ │ │ - ['../d0/d93/classcv_1_1detail_1_1tracking_1_1online__boosting_1_1StrongClassifierDirectSelection.html', 1, 'cv::detail::StrongClassifierDirectSelection'] │ │ │ │ + ['strongclassifierdirectselection_1503', ['strongclassifierdirectselection', ['../d0/d93/classcv_1_1detail_1_1tracking_1_1online__boosting_1_1StrongClassifierDirectSelection.html', 1, 'cv::detail::tracking::online_boosting::StrongClassifierDirectSelection'], │ │ │ │ + ['../d0/d93/classcv_1_1detail_1_1tracking_1_1online__boosting_1_1StrongClassifierDirectSelection.html#ad5d13857d21805642294084792cb9e7f', 1, 'cv::detail::tracking::online_boosting::StrongClassifierDirectSelection::StrongClassifierDirectSelection()'], │ │ │ │ + ['../d0/d93/classcv_1_1detail_1_1tracking_1_1online__boosting_1_1StrongClassifierDirectSelection.html', 1, 'cv::detail::StrongClassifierDirectSelection'], │ │ │ │ + ['../d0/d93/classcv_1_1detail_1_1tracking_1_1online__boosting_1_1StrongClassifierDirectSelection.html', 1, 'cv::detail::tracking::StrongClassifierDirectSelection'] │ │ │ │ ]], │ │ │ │ ['structural_20analysis_20and_20shape_20descriptors_1504', ['structural analysis and shape descriptors', ['../d3/d01/group__gapi__shape.html', 1, 'Graph API: Image Structural Analysis and Shape Descriptors'], │ │ │ │ - ['../d4/de0/group__cudaimgproc__shape.html', 1, 'Structural Analysis and Shape Descriptors'], │ │ │ │ - ['../d3/dc0/group__imgproc__shape.html', 1, 'Structural Analysis and Shape Descriptors'] │ │ │ │ + ['../d3/dc0/group__imgproc__shape.html', 1, 'Structural Analysis and Shape Descriptors'], │ │ │ │ + ['../d4/de0/group__cudaimgproc__shape.html', 1, 'Structural Analysis and Shape Descriptors'] │ │ │ │ ]], │ │ │ │ ['structure_1505', ['structure', ['../d7/dbd/tutorial_android_ocl_intro.html#autotoc_md846', 1, 'Application structure'], │ │ │ │ ['../d3/d7a/tutorial_gapi_anisotropic_segmentation.html#gapi_anisotropic_inspect_graph', 1, 'Understanding the graph structure'], │ │ │ │ ['../d3/dd9/tutorial_crosscompile_with_multiarch.html#autotoc_md927', 1, 'Working folder structure'] │ │ │ │ ]], │ │ │ │ ['structure_20elements_1506', ['Structure elements', ['../dd/dd7/tutorial_morph_lines_detection.html#autotoc_md730', 1, '']]], │ │ │ │ ['structure_20from_20motion_1507', ['structure from motion', ['../de/d7c/tutorial_table_of_content_sfm.html', 1, 'Structure From Motion'], │ │ │ │ @@ -3057,16 +3057,16 @@ │ │ │ │ ['structuredlightpattern_1519', ['StructuredLightPattern', ['../d9/dbb/classcv_1_1structured__light_1_1StructuredLightPattern.html', 1, 'cv::structured_light']]], │ │ │ │ ['structures_1520', ['structures', ['../dc/d84/group__core__basic.html', 1, 'Basic structures'], │ │ │ │ ['../d9/d41/group__cudacore__struct.html', 1, 'Data Structures'], │ │ │ │ ['../d5/dbc/group__cann__struct.html', 1, 'Data Structures'], │ │ │ │ ['../d6/dd1/tutorial_univ_intrin.html#autotoc_md339', 1, 'Register Structures'], │ │ │ │ ['../d5/df1/tutorial_js_some_data_structures.html', 1, 'Some Data Structures'] │ │ │ │ ]], │ │ │ │ - ['structuring_20element_1521', ['structuring element', ['../d9/d61/tutorial_py_morphological_ops.html#autotoc_md1443', 1, 'Structuring Element'], │ │ │ │ - ['../d4/d76/tutorial_js_morphological_ops.html#autotoc_md1749', 1, 'Structuring Element'] │ │ │ │ + ['structuring_20element_1521', ['structuring element', ['../d4/d76/tutorial_js_morphological_ops.html#autotoc_md1749', 1, 'Structuring Element'], │ │ │ │ + ['../d9/d61/tutorial_py_morphological_ops.html#autotoc_md1443', 1, 'Structuring Element'] │ │ │ │ ]], │ │ │ │ ['structuring_20elements_1522', ['Structuring Elements', ['../dd/dd7/tutorial_morph_lines_detection.html#autotoc_md723', 1, '']]], │ │ │ │ ['stsassert_1523', ['StsAssert', ['../d1/d0d/namespacecv_1_1Error.html#a759fa1af92f7aa7377c76ffb142abccaaad9981b6501b20252ca09e719fd260e3', 1, 'cv::Error']]], │ │ │ │ ['stsautotrace_1524', ['StsAutoTrace', ['../d1/d0d/namespacecv_1_1Error.html#a759fa1af92f7aa7377c76ffb142abccaa123b92bc9c5061fc5ee3c83063ae96b0', 1, 'cv::Error']]], │ │ │ │ ['stsbacktrace_1525', ['StsBackTrace', ['../d1/d0d/namespacecv_1_1Error.html#a759fa1af92f7aa7377c76ffb142abccaad6c1f3c096dc99e1337e325b98b3248a', 1, 'cv::Error']]], │ │ │ │ ['stsbadarg_1526', ['StsBadArg', ['../d1/d0d/namespacecv_1_1Error.html#a759fa1af92f7aa7377c76ffb142abccaaf587497af64537041ee62c04a92b755d', 1, 'cv::Error']]], │ │ │ │ ['stsbadflag_1527', ['StsBadFlag', ['../d1/d0d/namespacecv_1_1Error.html#a759fa1af92f7aa7377c76ffb142abccaabaf8225a48e1263fa91ff31ae38742e1', 1, 'cv::Error']]], │ │ │ │ @@ -3111,17 +3111,17 @@ │ │ │ │ ['sub64f_1564', ['sub64f', ['../d3/ddd/group__core__hal__functions.html#gabcefa88a20f298b67912d253ed180a5b', 1, 'cv::hal']]], │ │ │ │ ['sub8s_1565', ['sub8s', ['../d3/ddd/group__core__hal__functions.html#ga9a0c3f4922f9b2097b585085eae353dd', 1, 'cv::hal']]], │ │ │ │ ['sub8u_1566', ['sub8u', ['../d3/ddd/group__core__hal__functions.html#ga66404cf0bb4d0b827efad2c86f0b9139', 1, 'cv::hal']]], │ │ │ │ ['sub_5fbegin_1567', ['SUB_BEGIN', ['../d5/dc3/group__cudalegacy.html#gafbf917e159023218b681c25e8d8756d1', 1, 'NCV.hpp']]], │ │ │ │ ['sub_5fcall_1568', ['SUB_CALL', ['../d5/dc3/group__cudalegacy.html#gae4b5fa6858da79aa4755b3ea49cb5012', 1, 'NCV.hpp']]], │ │ │ │ ['sub_5fend_1569', ['SUB_END', ['../d5/dc3/group__cudalegacy.html#gaca42e8c9cec37125c0341cfd9855435c', 1, 'NCV.hpp']]], │ │ │ │ ['subc_1570', ['subC', ['../da/dd3/group__gapi__math.html#gaa5979f64bab17bf1717f2842d6c1d53f', 1, 'cv::gapi']]], │ │ │ │ - ['subdiv2d_1571', ['subdiv2d', ['../df/dbf/classcv_1_1Subdiv2D.html#aed58be264a17cdbe712b6a35036d13cb', 1, 'cv::Subdiv2D::Subdiv2D()'], │ │ │ │ - ['../df/dbf/classcv_1_1Subdiv2D.html', 1, 'cv::Subdiv2D'], │ │ │ │ - ['../df/dbf/classcv_1_1Subdiv2D.html#aa9ae8faa2f7a78428b115407bfc3df9e', 1, 'cv::Subdiv2D::Subdiv2D()'] │ │ │ │ + ['subdiv2d_1571', ['subdiv2d', ['../df/dbf/classcv_1_1Subdiv2D.html', 1, 'cv::Subdiv2D'], │ │ │ │ + ['../df/dbf/classcv_1_1Subdiv2D.html#aa9ae8faa2f7a78428b115407bfc3df9e', 1, 'cv::Subdiv2D::Subdiv2D(Rect rect)'], │ │ │ │ + ['../df/dbf/classcv_1_1Subdiv2D.html#aed58be264a17cdbe712b6a35036d13cb', 1, 'cv::Subdiv2D::Subdiv2D()'] │ │ │ │ ]], │ │ │ │ ['subdivision_1572', ['Planar Subdivision', ['../df/d5b/group__imgproc__subdiv2d.html', 1, '']]], │ │ │ │ ['submatrix_1573', ['subMatrix', ['../df/d9f/namespacecv_1_1omnidir_1_1internal.html#a892830aff7387b7fa15298250403c95a', 1, 'cv::omnidir::internal']]], │ │ │ │ ['submatrix_5fflag_1574', ['submatrix_flag', ['../d3/d63/classcv_1_1Mat.html#a4f720be545e29c4e7b4ca61482736eb3a1db725f4a7efd16a41581b4fc54e7aad', 1, 'cv::Mat::SUBMATRIX_FLAG'], │ │ │ │ ['../d7/d45/classcv_1_1UMat.html#ae4ec22ea7dec547fed804ff04975dd87a1dadb89fba042bf2b7fb5bca8399aa73', 1, 'cv::UMat::SUBMATRIX_FLAG'] │ │ │ │ ]], │ │ │ │ ['subpixel_20accuracy_1575', ['Corner with SubPixel Accuracy', ['../dc/d0d/tutorial_py_features_harris.html#autotoc_md1234', 1, '']]], │ │ │ │ @@ -3129,45 +3129,45 @@ │ │ │ │ ['subrc_1577', ['subRC', ['../da/dd3/group__gapi__math.html#ga755bf791d27f88ab5b4214575bf4c5a8', 1, 'cv::gapi']]], │ │ │ │ ['subsampling_1578', ['RGB <-> YUV with subsampling', ['../de/d25/imgproc_color_conversions.html#autotoc_md142', 1, '']]], │ │ │ │ ['subsetofs_1579', ['subsetOfs', ['../d9/d37/classcv_1_1ml_1_1DTrees_1_1Split.html#afd2ee09de243483ccbbd9bd5a0676f2f', 1, 'cv::ml::DTrees::Split']]], │ │ │ │ ['subspaceproject_1580', ['subspaceProject', ['../db/d59/classcv_1_1LDA.html#a69c7019a344edc5c55799c16a9fc9ada', 1, 'cv::LDA']]], │ │ │ │ ['subspacereconstruct_1581', ['subspaceReconstruct', ['../db/d59/classcv_1_1LDA.html#acbf9949e7567e23af5f71c29fcef76d4', 1, 'cv::LDA']]], │ │ │ │ ['substitute_1582', ['substitute', ['../dd/db9/structcv_1_1GTransform.html#a65db27befeb10beae9cd452d04bcc589', 1, 'cv::GTransform']]], │ │ │ │ ['subtract_1583', ['subtract', ['../d8/d6f/group__core__hal__interface__addsub.html', 1, 'Element-wise add and subtract'], │ │ │ │ - ['../d5/d2b/group__cannops__elem.html#ga6e0d44cdbb82f7d2af95dcf8859673b0', 1, 'cv::cann::subtract()'], │ │ │ │ + ['../d8/d34/group__cudaarithm__elem.html#ga6eab60fc250059e2fda79c5636bd067f', 1, 'cv::cuda::subtract()'], │ │ │ │ ['../d2/de8/group__core__array.html#gaa0f00d98b4b5edeaeb7b8333b2de353b', 1, 'cv::subtract()'], │ │ │ │ - ['../d1/d9d/classcv_1_1MatOp.html#adf3a27e2d042073f2d765522c3f2c870', 1, 'cv::MatOp::subtract()'], │ │ │ │ ['../d5/d2b/group__cannops__elem.html#gad58525e6cd7ceff3f5a1d563b87e3c63', 1, 'cv::cann::subtract(const InputArray src1, const InputArray src2, OutputArray dst, const InputArray mask=noArray(), int dtype=-1, AscendStream &stream=AscendStream::Null())'], │ │ │ │ + ['../d5/d2b/group__cannops__elem.html#ga6e0d44cdbb82f7d2af95dcf8859673b0', 1, 'cv::cann::subtract(const AscendMat &src1, const AscendMat &src2, AscendMat &dst, const AscendMat &mask=AscendMat(), int dtype=-1, AscendStream &stream=AscendStream::Null())'], │ │ │ │ ['../d5/d2b/group__cannops__elem.html#gaf720c0cbe4a2904846a44b766675623c', 1, 'cv::cann::subtract(const AscendMat &src1, const Scalar &src2, AscendMat &dst, const AscendMat &mask=AscendMat(), int dtype=-1, AscendStream &stream=AscendStream::Null())'], │ │ │ │ - ['../d5/d2b/group__cannops__elem.html#ga03760ebb51d555cf25899a0f0a0e433f', 1, 'cv::cann::subtract(const Scalar &src1, const AscendMat &src2, AscendMat &dst, const AscendMat &mask=AscendMat(), int dtype=-1, AscendStream &stream=AscendStream::Null())'], │ │ │ │ - ['../d8/d34/group__cudaarithm__elem.html#ga6eab60fc250059e2fda79c5636bd067f', 1, 'cv::cuda::subtract()'], │ │ │ │ - ['../d1/d9d/classcv_1_1MatOp.html#a29ace3bec7c07ca07a159c4c6f058ef1', 1, 'cv::MatOp::subtract()'] │ │ │ │ + ['../d1/d9d/classcv_1_1MatOp.html#a29ace3bec7c07ca07a159c4c6f058ef1', 1, 'cv::MatOp::subtract(const Scalar &s, const MatExpr &expr, MatExpr &res) const'], │ │ │ │ + ['../d1/d9d/classcv_1_1MatOp.html#adf3a27e2d042073f2d765522c3f2c870', 1, 'cv::MatOp::subtract(const MatExpr &expr1, const MatExpr &expr2, MatExpr &res) const'], │ │ │ │ + ['../d5/d2b/group__cannops__elem.html#ga03760ebb51d555cf25899a0f0a0e433f', 1, 'cv::cann::subtract()'] │ │ │ │ ]], │ │ │ │ - ['subtraction_1584', ['subtraction', ['../d8/d38/tutorial_bgsegm_bg_subtraction.html', 1, 'Background Subtraction'], │ │ │ │ + ['subtraction_1584', ['subtraction', ['../db/d5c/tutorial_py_bg_subtraction.html', 1, 'Background Subtraction'], │ │ │ │ + ['../d8/d38/tutorial_bgsegm_bg_subtraction.html', 1, 'Background Subtraction'], │ │ │ │ ['../de/df4/tutorial_js_bg_subtraction.html', 1, 'Background Subtraction'], │ │ │ │ - ['../db/d5c/tutorial_py_bg_subtraction.html', 1, 'Background Subtraction'], │ │ │ │ ['../dd/d4d/tutorial_js_image_arithmetics.html#autotoc_md1581', 1, 'Image Subtraction'] │ │ │ │ ]], │ │ │ │ ['subtraction_20methods_1585', ['How to Use Background Subtraction Methods', ['../d1/dc5/tutorial_background_subtraction.html', 1, 'tutorial_table_of_content_other']]], │ │ │ │ ['suggestion_1586', ['Model selection suggestion', ['../d9/d1e/tutorial_dnn_OCR.html#autotoc_md384', 1, '']]], │ │ │ │ ['sum_1587', ['sum', ['../da/d9b/group__core__hal__interface__addWeighted.html', 1, 'Element-wise weighted sum'], │ │ │ │ - ['../d0/d65/classcv_1_1detail_1_1tracking_1_1contrib__feature_1_1CvLBPEvaluator.html#a9ed2b6e355db5387e70f167c3c521f6c', 1, 'cv::detail::tracking::contrib_feature::CvLBPEvaluator::sum'], │ │ │ │ - ['../d5/d89/classcv_1_1detail_1_1tracking_1_1contrib__feature_1_1CvHaarEvaluator.html#a8bc9abc7667b3cd45a1063a4fdd5947e', 1, 'cv::detail::tracking::contrib_feature::CvHaarEvaluator::sum'], │ │ │ │ - ['../d0/d86/group__gapi__matrixop.html#ga58d80f9e109fed142b280d673afb795a', 1, 'cv::gapi::sum()'], │ │ │ │ ['../d5/de6/group__cudaarithm__reduce.html#ga1f582844670199281e8012733b50c582', 1, 'cv::cuda::sum()'], │ │ │ │ + ['../d2/de8/group__core__array.html#ga716e10a2dd9e228e4d3c95818f106722', 1, 'cv::sum()'], │ │ │ │ + ['../d0/d86/group__gapi__matrixop.html#ga58d80f9e109fed142b280d673afb795a', 1, 'cv::gapi::sum()'], │ │ │ │ ['../d8/d60/structcv_1_1cudev_1_1Sum.html', 1, 'cv::cudev::Sum< T >'], │ │ │ │ - ['../d2/de8/group__core__array.html#ga716e10a2dd9e228e4d3c95818f106722', 1, 'cv::sum()'] │ │ │ │ + ['../d5/d89/classcv_1_1detail_1_1tracking_1_1contrib__feature_1_1CvHaarEvaluator.html#a8bc9abc7667b3cd45a1063a4fdd5947e', 1, 'cv::detail::tracking::contrib_feature::CvHaarEvaluator::sum'], │ │ │ │ + ['../d0/d65/classcv_1_1detail_1_1tracking_1_1contrib__feature_1_1CvLBPEvaluator.html#a9ed2b6e355db5387e70f167c3c521f6c', 1, 'cv::detail::tracking::contrib_feature::CvLBPEvaluator::sum'] │ │ │ │ ]], │ │ │ │ ['sum_5f_1588', ['sum_', ['../df/dfc/group__cudev.html#ga37e47704c1c4522d50cc9e9f33f3a36d', 1, 'cv::cudev']]], │ │ │ │ - ['sum_5ftype_1589', ['sum_type', ['../da/d19/structcv_1_1V__TypeTraits_3_01float_01_4.html#addf6559c1c6f35b3d2d1bf41d62276f0', 1, 'cv::V_TypeTraits< float >::sum_type'], │ │ │ │ + ['sum_5ftype_1589', ['sum_type', ['../de/dc3/structcv_1_1V__TypeTraits_3_01short_01_4.html#ad050b1696b786c8fde99df97845d9cdc', 1, 'cv::V_TypeTraits< short >::sum_type'], │ │ │ │ ['../d2/d4d/structcv_1_1V__TypeTraits_3_01uint64_01_4.html#a97cf206cf177db63c3a773c9f1a715f1', 1, 'cv::V_TypeTraits< uint64 >::sum_type'], │ │ │ │ + ['../da/d19/structcv_1_1V__TypeTraits_3_01float_01_4.html#addf6559c1c6f35b3d2d1bf41d62276f0', 1, 'cv::V_TypeTraits< float >::sum_type'], │ │ │ │ ['../db/d59/structcv_1_1V__TypeTraits_3_01int64_01_4.html#aaefd05cc8c592f9f06324390f3869d67', 1, 'cv::V_TypeTraits< int64 >::sum_type'], │ │ │ │ ['../d5/d9e/structcv_1_1V__TypeTraits_3_01double_01_4.html#ae1dcc2903a4fd1b127483d0652c7972d', 1, 'cv::V_TypeTraits< double >::sum_type'], │ │ │ │ ['../d3/d8c/structcv_1_1V__TypeTraits_3_01unsigned_01_4.html#a7770eff9c29998b97d2728791ff47d63', 1, 'cv::V_TypeTraits< unsigned >::sum_type'], │ │ │ │ - ['../de/dc3/structcv_1_1V__TypeTraits_3_01short_01_4.html#ad050b1696b786c8fde99df97845d9cdc', 1, 'cv::V_TypeTraits< short >::sum_type'], │ │ │ │ ['../d6/dd5/structcv_1_1V__TypeTraits_3_01ushort_01_4.html#a206f0b4adab67410212fe9322bf2e583', 1, 'cv::V_TypeTraits< ushort >::sum_type'], │ │ │ │ ['../d0/d9d/structcv_1_1V__TypeTraits_3_01schar_01_4.html#ac218f9ffd228d81f349c86ce4b2d5e06', 1, 'cv::V_TypeTraits< schar >::sum_type'], │ │ │ │ ['../dd/d1d/structcv_1_1V__TypeTraits_3_01uchar_01_4.html#a89d20546254941564a05f5f39212ba38', 1, 'cv::V_TypeTraits< uchar >::sum_type'] │ │ │ │ ]], │ │ │ │ ['sumexprbody_1590', ['SumExprBody', ['../dd/d33/structcv_1_1cudev_1_1SumExprBody.html', 1, 'cv::cudev']]], │ │ │ │ ['sumflag_1591', ['SumFlag', ['../d0/da6/structcv_1_1ximgproc_1_1EdgeDrawing_1_1Params.html#a24e50f5c8f20d1f452f00c3bb79d936c', 1, 'cv::ximgproc::EdgeDrawing::Params']]], │ │ │ │ ['summary_1592', ['Summary', ['../df/d0c/tutorial_py_fast.html#autotoc_md1222', 1, '']]], │ │ │ │ @@ -3188,16 +3188,16 @@ │ │ │ │ ]], │ │ │ │ ['support_1603', ['support', ['../db/d05/tutorial_config_reference.html#autotoc_md897', 1, 'CUDA support'], │ │ │ │ ['../dc/db1/tutorial_dnn_custom_layers.html', 1, 'Custom deep learning layers support'], │ │ │ │ ['../d0/daf/group__core__eigen.html', 1, 'Eigen support'], │ │ │ │ ['../d5/dc3/group__cudalegacy.html', 1, 'Legacy support'], │ │ │ │ ['../d5/d8e/group__f0__math.html', 1, 'Math with F0-transform support'], │ │ │ │ ['../d6/df0/group__f1__math.html', 1, 'Math with F1-transform support'], │ │ │ │ - ['../dc/d83/group__core__opencl.html', 1, 'OpenCL support'], │ │ │ │ ['../db/d05/tutorial_config_reference.html#autotoc_md898', 1, 'OpenCL support'], │ │ │ │ + ['../dc/d83/group__core__opencl.html', 1, 'OpenCL support'], │ │ │ │ ['../df/d24/group__highgui__opengl.html', 1, 'OpenGL support'], │ │ │ │ ['../de/d55/group__core__parallel__backend.html#autotoc_md12', 1, 'Plugins support'], │ │ │ │ ['../db/d05/tutorial_config_reference.html#autotoc_md900', 1, 'PNG, JPEG, TIFF, WEBP support'], │ │ │ │ ['../d7/dcc/group__core__utils__softfloat.html', 1, 'Softfloat support'], │ │ │ │ ['../d6/d2f/group__highgui__winrt.html', 1, 'WinRT support'] │ │ │ │ ]], │ │ │ │ ['support_20both_20versions_1604', ['Support both versions', ['../db/dfa/tutorial_transition_guide.html#tutorial_transition_both', 1, '']]], │ │ │ │ @@ -3207,16 +3207,16 @@ │ │ │ │ ['support_20vector_20machines_20for_20non_20linearly_20separable_20data_1606', ['Support Vector Machines for Non-Linearly Separable Data', ['../d0/dcc/tutorial_non_linear_svms.html', 1, 'tutorial_table_of_content_other']]], │ │ │ │ ['support_20vector_20machines_20svm_1607', ['Support Vector Machines (SVM)', ['../d3/d02/tutorial_py_svm_index.html', 1, 'tutorial_py_table_of_contents_ml']]], │ │ │ │ ['supportbackend_1608', ['supportBackend', ['../d3/d6c/classcv_1_1dnn_1_1Layer.html#a14017804fd5e8c28807263bbdb415383', 1, 'cv::dnn::Layer']]], │ │ │ │ ['supported_20algorithms_1609', ['supported algorithms', ['../d4/d93/group__img__hash.html#autotoc_md71', 1, 'Supported Algorithms'], │ │ │ │ ['../dc/dfe/group__intensity__transform.html#autotoc_md78', 1, 'Supported Algorithms'] │ │ │ │ ]], │ │ │ │ ['supported_20markdown_1610', ['Supported Markdown', ['../d4/db1/tutorial_documentation.html#tutorial_documentation_quick_start_md', 1, '']]], │ │ │ │ - ['supportregiontype_1611', ['supportregiontype', ['../d4/d91/classcv_1_1optflow_1_1RLOFOpticalFlowParameter.html#a203bd482fc0efa091faf0e537768d5d1', 1, 'cv::optflow::RLOFOpticalFlowParameter::supportRegionType'], │ │ │ │ - ['../d2/d84/group__optflow.html#gabd57af723cddf921d0c0601a6e8e789b', 1, 'cv::optflow::SupportRegionType'] │ │ │ │ + ['supportregiontype_1611', ['supportregiontype', ['../d2/d84/group__optflow.html#gabd57af723cddf921d0c0601a6e8e789b', 1, 'cv::optflow::SupportRegionType'], │ │ │ │ + ['../d4/d91/classcv_1_1optflow_1_1RLOFOpticalFlowParameter.html#a203bd482fc0efa091faf0e537768d5d1', 1, 'cv::optflow::RLOFOpticalFlowParameter::supportRegionType'] │ │ │ │ ]], │ │ │ │ ['supports_1612', ['supports', ['../d7/d7c/classcv_1_1cuda_1_1DeviceInfo.html#a67e89f47a61b1bb016e3b20f644f762e', 1, 'cv::cuda::DeviceInfo']]], │ │ │ │ ['suppress_1613', ['suppress', ['../d8/d16/classcv_1_1videostab_1_1WobbleSuppressorBase.html#a1c39fa83a31e7c62d80b029b8cc19e80', 1, 'cv::videostab::WobbleSuppressorBase::suppress()'], │ │ │ │ ['../d0/da4/classcv_1_1videostab_1_1NullWobbleSuppressor.html#a73bca4742402ffcc348a9acbfc52d07b', 1, 'cv::videostab::NullWobbleSuppressor::suppress()'], │ │ │ │ ['../d8/da1/classcv_1_1videostab_1_1MoreAccurateMotionWobbleSuppressor.html#aa829e4bb7e33b11567ec3f040e28a7fc', 1, 'cv::videostab::MoreAccurateMotionWobbleSuppressor::suppress()'] │ │ │ │ ]], │ │ │ │ ['suppress_5funused_5fwarning_1614', ['suppress_unused_warning', ['../d3/dce/namespacecv_1_1util.html#a5f00f5a230b8dc4f63bdd1c8057ace44', 1, 'cv::util']]], │ │ │ │ @@ -3228,16 +3228,16 @@ │ │ │ │ ['../d9/d25/group__surface__matching.html', 1, 'Surface Matching'] │ │ │ │ ]], │ │ │ │ ['surface_20matching_20algorithm_20through_203d_20features_1620', ['Surface Matching Algorithm Through 3D Features', ['../d9/d25/group__surface__matching.html#autotoc_md96', 1, '']]], │ │ │ │ ['surface_5fmatching_2ehpp_1621', ['surface_matching.hpp', ['../d2/d40/surface__matching_8hpp.html', 1, '']]], │ │ │ │ ['surfacealignment_1622', ['surfaceAlignment', ['../d7/d7c/classcv_1_1cuda_1_1DeviceInfo.html#a125e3c0cbd8c63d07637863dff8b0608', 1, 'cv::cuda::DeviceInfo']]], │ │ │ │ ['svbacksubst_1623', ['SVBackSubst', ['../d2/de8/group__core__array.html#gab4e620e6fc6c8a27bb2be3d50a840c0b', 1, 'cv']]], │ │ │ │ ['svd_1624', ['svd', ['../df/df7/classcv_1_1SVD.html', 1, 'cv::SVD'], │ │ │ │ - ['../df/df7/classcv_1_1SVD.html#a3830f50d56ac2ff7b979e6f7f8991e36', 1, 'cv::SVD::SVD()'], │ │ │ │ - ['../df/df7/classcv_1_1SVD.html#a54cb96aef54978a3617cb2a2169b689a', 1, 'cv::SVD::SVD(InputArray src, int flags=0)'] │ │ │ │ + ['../df/df7/classcv_1_1SVD.html#a54cb96aef54978a3617cb2a2169b689a', 1, 'cv::SVD::SVD(InputArray src, int flags=0)'], │ │ │ │ + ['../df/df7/classcv_1_1SVD.html#a3830f50d56ac2ff7b979e6f7f8991e36', 1, 'cv::SVD::SVD()'] │ │ │ │ ]], │ │ │ │ ['svd32f_1625', ['SVD32f', ['../d3/ddd/group__core__hal__functions.html#ga7e379c106c1228dcdac27bab1fb81c6e', 1, 'cv::hal']]], │ │ │ │ ['svd64f_1626', ['SVD64f', ['../d3/ddd/group__core__hal__functions.html#gae50420ada479a479075a154a9e7fb642', 1, 'cv::hal']]], │ │ │ │ ['svdecomp_1627', ['SVDecomp', ['../d2/de8/group__core__array.html#gab477b5b7b39b370bb03e75b19d2d5109', 1, 'cv']]], │ │ │ │ ['svm_1628', ['svm', ['../dd/d3b/tutorial_py_svm_opencv.html', 1, 'OCR of Hand-written Data using SVM'], │ │ │ │ ['../dc/dd6/ml_intro.html#ml_intro_svm_predict', 1, 'Prediction with SVM'], │ │ │ │ ['../d3/d02/tutorial_py_svm_index.html', 1, 'Support Vector Machines (SVM)'], │ │ │ │ @@ -3245,25 +3245,25 @@ │ │ │ │ ['../d4/db1/tutorial_py_svm_basics.html', 1, 'Understanding SVM'], │ │ │ │ ['../d1/d73/tutorial_introduction_to_svm.html#autotoc_md1123', 1, 'What is a SVM?'] │ │ │ │ ]], │ │ │ │ ['svm_20shared_20virtual_20memory_20disabled_20by_20default_1629', ['SVM (Shared Virtual Memory) - disabled by default', ['../d6/dea/tutorial_env_reference.html#autotoc_md967', 1, '']]], │ │ │ │ ['svmdetector_1630', ['svmDetector', ['../d5/d33/structcv_1_1HOGDescriptor.html#a904130d56281ba264e097e9895c648f5', 1, 'cv::HOGDescriptor']]], │ │ │ │ ['svmsgd_1631', ['SVMSGD', ['../de/d54/classcv_1_1ml_1_1SVMSGD.html', 1, 'cv::ml']]], │ │ │ │ ['svmsgdtype_1632', ['SvmsgdType', ['../de/d54/classcv_1_1ml_1_1SVMSGD.html#ab028695cc8ec1491888d8d03f80bc8c2', 1, 'cv::ml::SVMSGD']]], │ │ │ │ - ['swap_1633', ['swap', ['../d0/de1/group__core.html#gaac41913cb7239fd2771b3c3f25349fe0', 1, 'cv::swap()'], │ │ │ │ - ['../d2/d0f/classcv_1_1cuda_1_1GpuMatND.html#aff068aafbcb358f85bf214f51ff3a785', 1, 'cv::cuda::GpuMatND::swap()'], │ │ │ │ - ['../d0/de1/group__core.html#gafbc8f513f40dc1b7c2d48ea6a5a81776', 1, 'cv::swap()'], │ │ │ │ - ['../d3/d1c/classcv_1_1cudev_1_1GpuMat__.html#a0e1c66de99997b6fe13959dfb6794f2f', 1, 'cv::cudev::GpuMat_::swap()'], │ │ │ │ - ['../d3/d85/classcv_1_1cann_1_1AscendMat.html#a2bf9cf1cb5fc17d5da8d2985f54ed4a8', 1, 'cv::cann::AscendMat::swap()'], │ │ │ │ - ['../dc/d3e/classcv_1_1util_1_1variant.html#ac7471fa2590350e45b30cb72da0f7668', 1, 'cv::util::variant::swap()'], │ │ │ │ - ['../d1/dec/classcv_1_1util_1_1optional.html#ac084b122b402d3c64976e0ccad57ddaf', 1, 'cv::util::optional::swap()'], │ │ │ │ + ['swap_1633', ['swap', ['../d1/dec/classcv_1_1util_1_1optional.html#ac084b122b402d3c64976e0ccad57ddaf', 1, 'cv::util::optional::swap()'], │ │ │ │ ['../d9/dc4/classcv_1_1util_1_1any.html#aefa0132aaa70b264555656fd48d7a3f5', 1, 'cv::util::any::swap'], │ │ │ │ ['../d1/d10/classcv_1_1MatExpr.html#a77a3d7d7f1a88cbd26601dbb51856a37', 1, 'cv::MatExpr::swap()'], │ │ │ │ ['../d0/d44/classcv_1_1cuda_1_1HostMem.html#a6eabc73d59936b87292125e17415b053', 1, 'cv::cuda::HostMem::swap()'], │ │ │ │ - ['../d0/d60/classcv_1_1cuda_1_1GpuMat.html#a7135c058aef51c37884a2b2ae8151631', 1, 'cv::cuda::GpuMat::swap()'] │ │ │ │ + ['../dc/d3e/classcv_1_1util_1_1variant.html#ac7471fa2590350e45b30cb72da0f7668', 1, 'cv::util::variant::swap()'], │ │ │ │ + ['../d3/d85/classcv_1_1cann_1_1AscendMat.html#a2bf9cf1cb5fc17d5da8d2985f54ed4a8', 1, 'cv::cann::AscendMat::swap()'], │ │ │ │ + ['../d2/d0f/classcv_1_1cuda_1_1GpuMatND.html#aff068aafbcb358f85bf214f51ff3a785', 1, 'cv::cuda::GpuMatND::swap()'], │ │ │ │ + ['../d0/d60/classcv_1_1cuda_1_1GpuMat.html#a7135c058aef51c37884a2b2ae8151631', 1, 'cv::cuda::GpuMat::swap()'], │ │ │ │ + ['../d3/d1c/classcv_1_1cudev_1_1GpuMat__.html#a0e1c66de99997b6fe13959dfb6794f2f', 1, 'cv::cudev::GpuMat_::swap()'], │ │ │ │ + ['../d0/de1/group__core.html#gafbc8f513f40dc1b7c2d48ea6a5a81776', 1, 'cv::swap(Mat &a, Mat &b)'], │ │ │ │ + ['../d0/de1/group__core.html#gaac41913cb7239fd2771b3c3f25349fe0', 1, 'cv::swap(UMat &a, UMat &b)'] │ │ │ │ ]], │ │ │ │ ['swapchannels_1634', ['swapChannels', ['../db/d8c/group__cudaimgproc__color.html#ga75a29cc4a97cde0d43ea066b01de927e', 1, 'cv::cuda']]], │ │ │ │ ['swapedges_1635', ['swapEdges', ['../df/dbf/classcv_1_1Subdiv2D.html#a1e1fb5d4dceadb03ac61c678cf1afb7f', 1, 'cv::Subdiv2D']]], │ │ │ │ ['swapfeature_1636', ['swapfeature', ['../d0/d82/classcv_1_1detail_1_1tracking_1_1TrackerContribFeatureHAAR.html#a3794907503ff0eb9a67d4830ab3bfe1e', 1, 'cv::detail::tracking::TrackerContribFeatureHAAR::swapFeature(int source, int target)'], │ │ │ │ ['../d0/d82/classcv_1_1detail_1_1tracking_1_1TrackerContribFeatureHAAR.html#afad19967db8fcd1daf35e90e1f8ee4e3', 1, 'cv::detail::tracking::TrackerContribFeatureHAAR::swapFeature(int id, CvHaarEvaluator::FeatureHaar &feature)'] │ │ │ │ ]], │ │ │ │ ['swapping_1637', ['Results after swapping', ['../d1/d52/tutorial_face_swapping_face_landmark_detection.html#autotoc_md1922', 1, '']]], │ │ │ │ @@ -3293,12 +3293,12 @@ │ │ │ │ ]], │ │ │ │ ['system_1656', ['system', ['../db/dfa/tutorial_transition_guide.html#autotoc_md1013', 1, 'Build system'], │ │ │ │ ['../d0/de5/tutorial_mcc_debugging_the_system.html', 1, 'Customising and Debugging the detection system'] │ │ │ │ ]], │ │ │ │ ['system_20functions_20and_20macros_1657', ['Utility and system functions and macros', ['../db/de0/group__core__utils.html', 1, '']]], │ │ │ │ ['systems_1658', ['Cross compilation for ARM based Linux systems', ['../d0/d76/tutorial_arm_crosscompile_with_cmake.html', 1, 'tutorial_table_of_content_introduction']]], │ │ │ │ ['systems_20path_1659', ['Set the OpenCV environment variable and add it to the systems path', ['../d3/d52/tutorial_windows_install.html#tutorial_windows_install_path', 1, '']]], │ │ │ │ - ['sz_1660', ['sz', ['../d3/d17/classcv_1_1ocl_1_1KernelArg.html#a7c4ecb345f1bd57c86f9395c7b82de91', 1, 'cv::ocl::KernelArg::sz'], │ │ │ │ - ['../d8/dd0/classcv_1_1AutoBuffer.html#a6025c7fd11fa230c2c315673d2d293b3', 1, 'cv::AutoBuffer::sz'], │ │ │ │ - ['../d4/d32/classcv_1_1__InputArray.html#a721c16a853d3bae3f41c8c0e9634b5a3', 1, 'cv::_InputArray::sz'] │ │ │ │ + ['sz_1660', ['sz', ['../d4/d32/classcv_1_1__InputArray.html#a721c16a853d3bae3f41c8c0e9634b5a3', 1, 'cv::_InputArray::sz'], │ │ │ │ + ['../d3/d17/classcv_1_1ocl_1_1KernelArg.html#a7c4ecb345f1bd57c86f9395c7b82de91', 1, 'cv::ocl::KernelArg::sz'], │ │ │ │ + ['../d8/dd0/classcv_1_1AutoBuffer.html#a6025c7fd11fa230c2c315673d2d293b3', 1, 'cv::AutoBuffer::sz'] │ │ │ │ ]] │ │ │ │ ]; │ │ ├── ./usr/share/doc/opencv-doc/opencv4/html/search/all_22.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -83,16 +83,16 @@ │ │ │ │ ['../d5/d76/classcv_1_1PyRotationWarper.html#a1d9553ae2b6bdd1ad34e1903e6d1f6c7', 1, 'cv::PyRotationWarper::warpBackward()'] │ │ │ │ ]], │ │ │ │ ['warpcopy_30', ['warpCopy', ['../df/dfc/group__cudev.html#ga3ddaf6e451618b957deea9ab4570f4b3', 1, 'cv::cudev']]], │ │ │ │ ['warper_31', ['warper', ['../d2/d8d/classcv_1_1Stitcher.html#a0f4d7082ba0ef9250298950024a7496d', 1, 'cv::Stitcher::warper() const'], │ │ │ │ ['../d2/d8d/classcv_1_1Stitcher.html#a96084e9ad81687625c8cc92954f18160', 1, 'cv::Stitcher::warper()'] │ │ │ │ ]], │ │ │ │ ['warpercreator_32', ['WarperCreator', ['../d7/d1c/classcv_1_1WarperCreator.html', 1, 'cv']]], │ │ │ │ - ['warpers_2ehpp_33', ['warpers.hpp', ['../dc/de7/detail_2warpers_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ - ['../da/d64/warpers_8hpp.html', 1, '(Global Namespace)'] │ │ │ │ + ['warpers_2ehpp_33', ['warpers.hpp', ['../da/d64/warpers_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ + ['../dc/de7/detail_2warpers_8hpp.html', 1, '(Global Namespace)'] │ │ │ │ ]], │ │ │ │ ['warpers_5finl_2ehpp_34', ['warpers_inl.hpp', ['../d4/d82/warpers__inl_8hpp.html', 1, '']]], │ │ │ │ ['warpfill_35', ['warpFill', ['../df/dfc/group__cudev.html#gaa02a32764180cfb333f398aed49a8516', 1, 'cv::cudev']]], │ │ │ │ ['warpframe_36', ['warpFrame', ['../d2/d3a/group__rgbd.html#gac0db6aeba01fa17ec2c69694497926f0', 1, 'cv::rgbd']]], │ │ │ │ ['warpid_37', ['warpId', ['../d5/d3d/structcv_1_1cudev_1_1Warp.html#a6d9198bfd3cec4e7caa67c4fddb875ab', 1, 'cv::cudev::Warp']]], │ │ │ │ ['warpimage_38', ['warpImage', ['../df/dfe/classcv_1_1ShapeTransformer.html#a3ecb0f13ee58d6cf4a459051c974b5fc', 1, 'cv::ShapeTransformer']]], │ │ │ │ ['warping_39', ['warping', ['../db/d29/group__cudawarping.html', 1, 'Image Warping'], │ │ ├── ./usr/share/doc/opencv-doc/opencv4/html/search/all_e.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -3057,48 +3057,48 @@ │ │ │ │ ['cos_5ffunc_3c_20uchar_20_3e_1739', ['cos_func< uchar >', ['../dd/d3d/structcv_1_1cudev_1_1cos__func_3_01uchar_01_4.html', 1, 'cv::cudev']]], │ │ │ │ ['cos_5ffunc_3c_20uint_20_3e_1740', ['cos_func< uint >', ['../da/dc1/structcv_1_1cudev_1_1cos__func_3_01uint_01_4.html', 1, 'cv::cudev']]], │ │ │ │ ['cos_5ffunc_3c_20ushort_20_3e_1741', ['cos_func< ushort >', ['../df/d35/structcv_1_1cudev_1_1cos__func_3_01ushort_01_4.html', 1, 'cv::cudev']]], │ │ │ │ ['cosdistance_1742', ['cosdistance', ['../da/dd4/classcv_1_1detail_1_1tracking_1_1tbm_1_1CosDistance.html#a295fc7d29259efeb064aab7f3cd91db8', 1, 'cv::detail::tracking::tbm::CosDistance::CosDistance()'], │ │ │ │ ['../da/dd4/classcv_1_1detail_1_1tracking_1_1tbm_1_1CosDistance.html', 1, 'cv::detail::tracking::tbm::CosDistance'] │ │ │ │ ]], │ │ │ │ ['cosh_1743', ['cosh', ['../df/dfc/group__cudev.html#ga38446fad6569393135149ae21e0155db', 1, 'cv::cudev::cosh(const double4 &a)'], │ │ │ │ - ['../df/dfc/group__cudev.html#ga39a476e90ccfbd91a3c1ac9683d42717', 1, 'cv::cudev::cosh(const int3 &a)'], │ │ │ │ + ['../df/dfc/group__cudev.html#ga1a037e284c591470524139208b1025df', 1, 'cv::cudev::cosh(const short3 &a)'], │ │ │ │ + ['../df/dfc/group__cudev.html#gaa21ad815bb9532046f47a05480ade46f', 1, 'cv::cudev::cosh(const uchar4 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#gafa5385058a167c0c40d8f6b340e4a88d', 1, 'cv::cudev::cosh(const char1 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#gaae42205ebe2e6a4ab6de590e3d7f3365', 1, 'cv::cudev::cosh(const char2 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#ga1710177b61623035d671d74d7b1a7f6f', 1, 'cv::cudev::cosh(const char3 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#gafc6eccad17e0e46d9cbd281c3e711aa9', 1, 'cv::cudev::cosh(const char4 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#gae3d36b54ba6e7d9422539e8f5eabc053', 1, 'cv::cudev::cosh(const ushort1 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#ga41a0f2e8c3df8313cd209872fbb077be', 1, 'cv::cudev::cosh(const ushort2 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#gac1754815132974b404ef08a43fce6b3b', 1, 'cv::cudev::cosh(const ushort3 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#gaf9e0ffa2a4ba694240a28d57b3f834e0', 1, 'cv::cudev::cosh(const ushort4 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#gafa35c3ba592ccb566e04d90280066d81', 1, 'cv::cudev::cosh(const short1 &a)'], │ │ │ │ + ['../df/dfc/group__cudev.html#ga59924137a98c7d90f104d514af9763a0', 1, 'cv::cudev::cosh(const float2 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#ga71710adfe141bc6466876c09802c3a7c', 1, 'cv::cudev::cosh(const short2 &a)'], │ │ │ │ - ['../df/dfc/group__cudev.html#ga1a037e284c591470524139208b1025df', 1, 'cv::cudev::cosh(const short3 &a)'], │ │ │ │ + ['../df/dfc/group__cudev.html#ga50bc228a397b21f233bfc9e785699344', 1, 'cv::cudev::cosh(const uint2 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#ga3b5476ae05fe592cb06219258730bda1', 1, 'cv::cudev::cosh(const short4 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#ga8feac9f8209680ba64997b6d9912b96b', 1, 'cv::cudev::cosh(const int1 &a)'], │ │ │ │ + ['../df/dfc/group__cudev.html#ga06c1f05283d886d6fe08833b58a93439', 1, 'cv::cudev::cosh(const float3 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#gadca5aea02a7a85d548f637f972795df3', 1, 'cv::cudev::cosh(const int2 &a)'], │ │ │ │ + ['../df/dfc/group__cudev.html#ga39a476e90ccfbd91a3c1ac9683d42717', 1, 'cv::cudev::cosh(const int3 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#ga19836eff7f699fb4af5ee437366bb38a', 1, 'cv::cudev::cosh(const int4 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#gabc73dc8cc041afbb14d9c980c660ac89', 1, 'cv::cudev::cosh(const uint1 &a)'], │ │ │ │ - ['../df/dfc/group__cudev.html#ga50bc228a397b21f233bfc9e785699344', 1, 'cv::cudev::cosh(const uint2 &a)'], │ │ │ │ + ['../df/dfc/group__cudev.html#ga694f901aa66cf52a8c6c128d2b09a155', 1, 'cv::cudev::cosh(const float4 &a)'], │ │ │ │ + ['../df/dfc/group__cudev.html#ga7307bc4d07873875669d9c9586de2714', 1, 'cv::cudev::cosh(const double1 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#ga047c8aebd23c78678261898a69a0d68f', 1, 'cv::cudev::cosh(const double3 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#gaec1829fdd7ff85865280fc99b9e7c35b', 1, 'cv::cudev::cosh(const double2 &a)'], │ │ │ │ - ['../df/dfc/group__cudev.html#ga7307bc4d07873875669d9c9586de2714', 1, 'cv::cudev::cosh(const double1 &a)'], │ │ │ │ - ['../df/dfc/group__cudev.html#ga694f901aa66cf52a8c6c128d2b09a155', 1, 'cv::cudev::cosh(const float4 &a)'], │ │ │ │ - ['../df/dfc/group__cudev.html#ga06c1f05283d886d6fe08833b58a93439', 1, 'cv::cudev::cosh(const float3 &a)'], │ │ │ │ - ['../df/dfc/group__cudev.html#ga59924137a98c7d90f104d514af9763a0', 1, 'cv::cudev::cosh(const float2 &a)'], │ │ │ │ - ['../df/dfc/group__cudev.html#gadf69361dca85955ba79af70994316581', 1, 'cv::cudev::cosh(const float1 &a)'], │ │ │ │ - ['../df/dfc/group__cudev.html#ga1e07fc50c9ed8d4e32809ed9edb557b6', 1, 'cv::cudev::cosh(const uint4 &a)'], │ │ │ │ - ['../df/dfc/group__cudev.html#ga79a6ce397211e4078419448a1305caf2', 1, 'cv::cudev::cosh(const uint3 &a)'], │ │ │ │ - ['../df/dfc/group__cudev.html#ga1687895cecca5f84f28a584be39cd45e', 1, 'cv::cudev::cosh(const uchar3 &a)'], │ │ │ │ - ['../da/d4a/classcv_1_1Quat.html#a0f8644e26eb9955e9f3440efbebf2e09', 1, 'cv::Quat::cosh'], │ │ │ │ ['../df/dfc/group__cudev.html#ga80abf13c753878730bd80b8d36e4613d', 1, 'cv::cudev::cosh(const uchar2 &a)'], │ │ │ │ ['../df/dfc/group__cudev.html#gae82583ed9295e93a53c94d9753beefa2', 1, 'cv::cudev::cosh(const uchar1 &a)'], │ │ │ │ + ['../da/d4a/classcv_1_1Quat.html#a0f8644e26eb9955e9f3440efbebf2e09', 1, 'cv::Quat::cosh'], │ │ │ │ ['../d0/de1/group__core.html#ga9ec21677768c58f055d7dfd7ea0f570f', 1, 'cv::cosh()'], │ │ │ │ ['../da/d4a/classcv_1_1Quat.html#a068171935c99beda2828713e8a37e8d1', 1, 'cv::Quat::cosh()'], │ │ │ │ - ['../df/dfc/group__cudev.html#gaa21ad815bb9532046f47a05480ade46f', 1, 'cv::cudev::cosh(const uchar4 &a)'] │ │ │ │ + ['../df/dfc/group__cudev.html#gadf69361dca85955ba79af70994316581', 1, 'cv::cudev::cosh(const float1 &a)'], │ │ │ │ + ['../df/dfc/group__cudev.html#ga1687895cecca5f84f28a584be39cd45e', 1, 'cv::cudev::cosh(const uchar3 &a)'], │ │ │ │ + ['../df/dfc/group__cudev.html#ga79a6ce397211e4078419448a1305caf2', 1, 'cv::cudev::cosh(const uint3 &a)'], │ │ │ │ + ['../df/dfc/group__cudev.html#ga1e07fc50c9ed8d4e32809ed9edb557b6', 1, 'cv::cudev::cosh(const uint4 &a)'] │ │ │ │ ]], │ │ │ │ ['cosh_5f_1744', ['cosh_', ['../df/dfc/group__cudev.html#ga8434e34e2d21faac0f7c8a8fe565ba96', 1, 'cv::cudev']]], │ │ │ │ ['cosh_5ffunc_1745', ['cosh_func', ['../dc/d8a/structcv_1_1cudev_1_1cosh__func.html', 1, 'cv::cudev']]], │ │ │ │ ['cosh_5ffunc_3c_20double_20_3e_1746', ['cosh_func< double >', ['../d5/d3a/structcv_1_1cudev_1_1cosh__func_3_01double_01_4.html', 1, 'cv::cudev']]], │ │ │ │ ['cosh_5ffunc_3c_20float_20_3e_1747', ['cosh_func< float >', ['../db/d8d/structcv_1_1cudev_1_1cosh__func_3_01float_01_4.html', 1, 'cv::cudev']]], │ │ │ │ ['cosh_5ffunc_3c_20schar_20_3e_1748', ['cosh_func< schar >', ['../df/dd8/structcv_1_1cudev_1_1cosh__func_3_01schar_01_4.html', 1, 'cv::cudev']]], │ │ │ │ ['cosh_5ffunc_3c_20short_20_3e_1749', ['cosh_func< short >', ['../dc/d8a/structcv_1_1cudev_1_1cosh__func_3_01short_01_4.html', 1, 'cv::cudev']]], │ │ │ │ @@ -3110,16 +3110,16 @@ │ │ │ │ ['cost_5fcolor_1755', ['COST_COLOR', ['../d0/d03/classcv_1_1detail_1_1GraphCutSeamFinderBase.html#a42953bdb4c8a234670d37c5b5f4386cbafe0d275582723d93a0c576584ea90091', 1, 'cv::detail::GraphCutSeamFinderBase']]], │ │ │ │ ['cost_5fcolor_5fgrad_1756', ['COST_COLOR_GRAD', ['../d0/d03/classcv_1_1detail_1_1GraphCutSeamFinderBase.html#a42953bdb4c8a234670d37c5b5f4386cba4e0af02eed7c3f02976244dc832e0e81', 1, 'cv::detail::GraphCutSeamFinderBase']]], │ │ │ │ ['costfunction_1757', ['costfunction', ['../d0/dd5/classcv_1_1detail_1_1DpSeamFinder.html#a6ce104a17b48a0503ccdcf4787ba2ef3', 1, 'cv::detail::DpSeamFinder::CostFunction'], │ │ │ │ ['../d0/dd5/classcv_1_1detail_1_1DpSeamFinder.html#adc483aee372fbff08d564e991e6dd232', 1, 'cv::detail::DpSeamFinder::costFunction() const'] │ │ │ │ ]], │ │ │ │ ['costtype_1758', ['CostType', ['../d0/d03/classcv_1_1detail_1_1GraphCutSeamFinderBase.html#a42953bdb4c8a234670d37c5b5f4386cb', 1, 'cv::detail::GraphCutSeamFinderBase']]], │ │ │ │ ['count_1759', ['count', ['../da/d0b/classcv_1_1videostab_1_1VideoFileSource.html#a76fe6c31e6baa71fd8fa002345c44815', 1, 'cv::videostab::VideoFileSource::count()'], │ │ │ │ - ['../dc/dd2/classcv_1_1LineIterator.html#a78e06b7798ab056aba770b6e49c549b4', 1, 'cv::LineIterator::count'], │ │ │ │ ['../db/da8/classcv_1_1detail_1_1tracking_1_1tbm_1_1ITrackerByMatching.html#a07201a9a6b40c71015db23f78e1601dc', 1, 'cv::detail::tracking::tbm::ITrackerByMatching::count()'], │ │ │ │ + ['../dc/dd2/classcv_1_1LineIterator.html#a78e06b7798ab056aba770b6e49c549b4', 1, 'cv::LineIterator::count'], │ │ │ │ ['../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57aeb9da694ea67b3ef7d524521b580867d', 1, 'cv::TermCriteria::COUNT'] │ │ │ │ ]], │ │ │ │ ['counter_1760', ['counter', ['../dd/d1c/classcv_1_1gapi_1_1wip_1_1GCaptureSource.html#afc9ba6cb30bb6a548a0bcf1b4d9e99e8', 1, 'cv::gapi::wip::GCaptureSource']]], │ │ │ │ ['countframesize_1761', ['countFrameSize', ['../d7/d13/classcv_1_1AVIWriteContainer.html#a21d0a77e972f843701cf5c846b900f1c', 1, 'cv::AVIWriteContainer']]], │ │ │ │ ['counting_1762', ['Memory management and reference counting', ['../d5/d98/tutorial_mat_operations.html#autotoc_md325', 1, '']]], │ │ │ │ ['countnonzero_1763', ['countnonzero', ['../d5/de6/group__cudaarithm__reduce.html#ga55b5d553d28530fae0d9242438396521', 1, 'cv::cuda::countNonZero(InputArray src, OutputArray dst, Stream &stream=Stream::Null())'], │ │ │ │ ['../d5/de6/group__cudaarithm__reduce.html#ga283f3efccb513dbcde9f1dbedb67f805', 1, 'cv::cuda::countNonZero(InputArray src)'], │ │ ├── ./usr/share/doc/opencv-doc/opencv4/html/search/all_f.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1142,16 +1142,16 @@ │ │ │ │ ['../dd/d2c/group__core__hal__interface__divide.html', 1, 'Element-wise divide'] │ │ │ │ ]], │ │ │ │ ['divides_588', ['divides', ['../de/d2a/structcv_1_1cudev_1_1divides.html', 1, 'cv::cudev']]], │ │ │ │ ['division_5fk1_589', ['division_k1', ['../d9/d5a/classcv_1_1sfm_1_1libmv__CameraIntrinsicsOptions.html#a6aa622195d1d02a1796d3931791e70c8', 1, 'cv::sfm::libmv_CameraIntrinsicsOptions']]], │ │ │ │ ['division_5fk2_590', ['division_k2', ['../d9/d5a/classcv_1_1sfm_1_1libmv__CameraIntrinsicsOptions.html#aad01910b47eafea00cbe58fd55e7b5e1', 1, 'cv::sfm::libmv_CameraIntrinsicsOptions']]], │ │ │ │ ['divrc_591', ['divRC', ['../da/dd3/group__gapi__math.html#gab715e84ee54c737916007ff7b8e6dcda', 1, 'cv::gapi']]], │ │ │ │ ['divspectrums_592', ['divSpectrums', ['../d7/df3/group__imgproc__motion.html#gaf40ffe122cf098e3aefe7359a69cad29', 1, 'cv']]], │ │ │ │ - ['divup_593', ['divup', ['../db/de0/group__core__utils.html#ga52d39d0a7310cba0cf526bc9dbda5404', 1, 'cv::divUp(int a, unsigned int b)'], │ │ │ │ - ['../db/de0/group__core__utils.html#ga783150b042a28904f7df9e74788981e6', 1, 'cv::divUp(size_t a, unsigned int b)'], │ │ │ │ + ['divup_593', ['divup', ['../db/de0/group__core__utils.html#ga783150b042a28904f7df9e74788981e6', 1, 'cv::divUp(size_t a, unsigned int b)'], │ │ │ │ + ['../db/de0/group__core__utils.html#ga52d39d0a7310cba0cf526bc9dbda5404', 1, 'cv::divUp(int a, unsigned int b)'], │ │ │ │ ['../df/dfc/group__cudev.html#gae3ea029f9fa3603925b4162590cbf8d6', 1, 'cv::cudev::divUp()'] │ │ │ │ ]], │ │ │ │ ['dmatch_594', ['dmatch', ['../d4/de0/classcv_1_1DMatch.html', 1, 'cv::DMatch'], │ │ │ │ ['../d4/de0/classcv_1_1DMatch.html#a43d07332011940086bae0ae4a43da06e', 1, 'cv::DMatch::DMatch(int _queryIdx, int _trainIdx, int _imgIdx, float _distance)'], │ │ │ │ ['../d4/de0/classcv_1_1DMatch.html#abcedc39e3f9c605472793d81ff5eb318', 1, 'cv::DMatch::DMatch(int _queryIdx, int _trainIdx, float _distance)'], │ │ │ │ ['../d4/de0/classcv_1_1DMatch.html#a546ddb9a87898f06e510e015a6de596e', 1, 'cv::DMatch::DMatch()'] │ │ │ │ ]], │ │ ├── ./usr/share/doc/opencv-doc/opencv4/html/search/files_15.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -6,19 +6,19 @@ │ │ │ │ ['randpattern_2ehpp_4', ['randpattern.hpp', ['../de/dc5/randpattern_8hpp.html', 1, '']]], │ │ │ │ ['rapid_2ehpp_5', ['rapid.hpp', ['../dd/d04/rapid_8hpp.html', 1, '']]], │ │ │ │ ['raster_5fio_5fgdal_2emarkdown_6', ['raster_io_gdal.markdown', ['../d5/d67/raster__io__gdal_8markdown.html', 1, '']]], │ │ │ │ ['read_5fwrite_5fattributes_2emarkdown_7', ['read_write_attributes.markdown', ['../d9/d65/read__write__attributes_8markdown.html', 1, '']]], │ │ │ │ ['readme_2emd_8', ['README.md', ['../da/ddd/README_8md.html', 1, '']]], │ │ │ │ ['real_5ftime_5fpose_2emarkdown_9', ['real_time_pose.markdown', ['../dc/d83/real__time__pose_8markdown.html', 1, '']]], │ │ │ │ ['reconstruct_2ehpp_10', ['reconstruct.hpp', ['../d3/de1/reconstruct_8hpp.html', 1, '']]], │ │ │ │ - ['reduce_2ehpp_11', ['reduce.hpp', ['../da/dca/modules_2core_2include_2opencv2_2core_2cuda_2detail_2reduce_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ - ['../d3/d78/modules_2core_2include_2opencv2_2core_2cuda_2reduce_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ - ['../d7/da3/contrib_2modules_2cudev_2include_2opencv2_2cudev_2warp_2reduce_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ + ['reduce_2ehpp_11', ['reduce.hpp', ['../d3/d78/modules_2core_2include_2opencv2_2core_2cuda_2reduce_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ + ['../da/dca/modules_2core_2include_2opencv2_2core_2cuda_2detail_2reduce_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ ['../d3/d33/contrib_2modules_2cudev_2include_2opencv2_2cudev_2block_2reduce_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ - ['../d4/d25/contrib_2modules_2cudev_2include_2opencv2_2cudev_2grid_2reduce_8hpp.html', 1, '(Global Namespace)'] │ │ │ │ + ['../d4/d25/contrib_2modules_2cudev_2include_2opencv2_2cudev_2grid_2reduce_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ + ['../d7/da3/contrib_2modules_2cudev_2include_2opencv2_2cudev_2warp_2reduce_8hpp.html', 1, '(Global Namespace)'] │ │ │ │ ]], │ │ │ │ ['reduce_5fkey_5fval_2ehpp_12', ['reduce_key_val.hpp', ['../d3/dbd/reduce__key__val_8hpp.html', 1, '']]], │ │ │ │ ['reduce_5fto_5fvec_2ehpp_13', ['reduce_to_vec.hpp', ['../d3/ddc/reduce__to__vec_8hpp.html', 1, '']]], │ │ │ │ ['reduction_2ehpp_14', ['reduction.hpp', ['../d2/da5/reduction_8hpp.html', 1, '']]], │ │ │ │ ['registry_2ehpp_15', ['registry.hpp', ['../d1/da2/registry_8hpp.html', 1, '']]], │ │ │ │ ['remap_2ehpp_16', ['remap.hpp', ['../d1/d59/remap_8hpp.html', 1, '']]], │ │ │ │ ['remap_2emarkdown_17', ['remap.markdown', ['../df/ded/remap_8markdown.html', 1, '']]], │ │ ├── ./usr/share/doc/opencv-doc/opencv4/html/search/files_c.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -4,28 +4,28 @@ │ │ │ │ ['image_5fmanipulation_2emarkdown_2', ['image_manipulation.markdown', ['../d6/dd9/image__manipulation_8markdown.html', 1, '']]], │ │ │ │ ['img_5fhash_2ehpp_3', ['img_hash.hpp', ['../d4/d59/img__hash_8hpp.html', 1, '']]], │ │ │ │ ['img_5fhash_5fbase_2ehpp_4', ['img_hash_base.hpp', ['../d9/db6/img__hash__base_8hpp.html', 1, '']]], │ │ │ │ ['imgcodecs_2ehpp_5', ['imgcodecs.hpp', ['../d6/d87/imgcodecs_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ ['../d7/dd8/imgcodecs_2imgcodecs_8hpp.html', 1, '(Global Namespace)'] │ │ │ │ ]], │ │ │ │ ['imgproc_2ehpp_6', ['imgproc.hpp', ['../d4/d75/gapi_2include_2opencv2_2gapi_2imgproc_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ - ['../d9/dca/gapi_2include_2opencv2_2gapi_2ocl_2imgproc_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ - ['../d0/d08/gapi_2include_2opencv2_2gapi_2cpu_2imgproc_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ ['../d8/d8e/gapi_2include_2opencv2_2gapi_2gpu_2imgproc_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ ['../de/da0/gapi_2include_2opencv2_2gapi_2fluid_2imgproc_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ - ['../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ - ['../dd/d01/imgproc_2include_2opencv2_2imgproc_2imgproc_8hpp.html', 1, '(Global Namespace)'] │ │ │ │ + ['../dd/d01/imgproc_2include_2opencv2_2imgproc_2imgproc_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ + ['../d9/dca/gapi_2include_2opencv2_2gapi_2ocl_2imgproc_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ + ['../d0/d08/gapi_2include_2opencv2_2gapi_2cpu_2imgproc_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ + ['../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html', 1, '(Global Namespace)'] │ │ │ │ ]], │ │ │ │ ['index_5ftesting_2eh_7', ['index_testing.h', ['../db/dd9/index__testing_8h.html', 1, '']]], │ │ │ │ ['infer_2ehpp_8', ['infer.hpp', ['../d6/d32/infer_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ ['../d8/db1/oak_2infer_8hpp.html', 1, '(Global Namespace)'] │ │ │ │ ]], │ │ │ │ ['inference_5fengine_2ehpp_9', ['inference_engine.hpp', ['../d8/dcd/inference__engine_8hpp.html', 1, '']]], │ │ │ │ - ['inpainting_2ehpp_10', ['inpainting.hpp', ['../d7/d72/xphoto_2include_2opencv2_2xphoto_2inpainting_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ - ['../dc/dc7/videostab_2include_2opencv2_2videostab_2inpainting_8hpp.html', 1, '(Global Namespace)'] │ │ │ │ + ['inpainting_2ehpp_10', ['inpainting.hpp', ['../dc/dc7/videostab_2include_2opencv2_2videostab_2inpainting_8hpp.html', 1, '(Global Namespace)'], │ │ │ │ + ['../d7/d72/xphoto_2include_2opencv2_2xphoto_2inpainting_8hpp.html', 1, '(Global Namespace)'] │ │ │ │ ]], │ │ │ │ ['inpainting_2emarkdown_11', ['inpainting.markdown', ['../d0/d0f/inpainting_8markdown.html', 1, '']]], │ │ │ │ ['install_5ftesseract_2emarkdown_12', ['install_tesseract.markdown', ['../de/d5b/install__tesseract_8markdown.html', 1, '']]], │ │ │ │ ['instrumentation_2ehpp_13', ['instrumentation.hpp', ['../df/dab/instrumentation_8hpp.html', 1, '']]], │ │ │ │ ['integral_2ehpp_14', ['integral.hpp', ['../d3/da8/integral_8hpp.html', 1, '']]], │ │ │ │ ['intelperc_2emarkdown_15', ['intelperc.markdown', ['../d8/d80/intelperc_8markdown.html', 1, '']]], │ │ │ │ ['intensity_5ftransform_2ehpp_16', ['intensity_transform.hpp', ['../da/d3c/intensity__transform_8hpp.html', 1, '']]],