001// 002// This file is auto-generated. Please don't modify it! 003// 004package org.opencv.video; 005 006import org.opencv.core.Size; 007import org.opencv.core.TermCriteria; 008import org.opencv.video.SparseOpticalFlow; 009import org.opencv.video.SparsePyrLKOpticalFlow; 010 011// C++: class SparsePyrLKOpticalFlow 012/** 013 * Class used for calculating a sparse optical flow. 014 * 015 * The class can calculate an optical flow for a sparse feature set using the 016 * iterative Lucas-Kanade method with pyramids. 017 * 018 * SEE: calcOpticalFlowPyrLK 019 */ 020public class SparsePyrLKOpticalFlow extends SparseOpticalFlow { 021 022 protected SparsePyrLKOpticalFlow(long addr) { super(addr); } 023 024 // internal usage only 025 public static SparsePyrLKOpticalFlow __fromPtr__(long addr) { return new SparsePyrLKOpticalFlow(addr); } 026 027 // 028 // C++: Size cv::SparsePyrLKOpticalFlow::getWinSize() 029 // 030 031 public Size getWinSize() { 032 return new Size(getWinSize_0(nativeObj)); 033 } 034 035 036 // 037 // C++: void cv::SparsePyrLKOpticalFlow::setWinSize(Size winSize) 038 // 039 040 public void setWinSize(Size winSize) { 041 setWinSize_0(nativeObj, winSize.width, winSize.height); 042 } 043 044 045 // 046 // C++: int cv::SparsePyrLKOpticalFlow::getMaxLevel() 047 // 048 049 public int getMaxLevel() { 050 return getMaxLevel_0(nativeObj); 051 } 052 053 054 // 055 // C++: void cv::SparsePyrLKOpticalFlow::setMaxLevel(int maxLevel) 056 // 057 058 public void setMaxLevel(int maxLevel) { 059 setMaxLevel_0(nativeObj, maxLevel); 060 } 061 062 063 // 064 // C++: TermCriteria cv::SparsePyrLKOpticalFlow::getTermCriteria() 065 // 066 067 public TermCriteria getTermCriteria() { 068 return new TermCriteria(getTermCriteria_0(nativeObj)); 069 } 070 071 072 // 073 // C++: void cv::SparsePyrLKOpticalFlow::setTermCriteria(TermCriteria crit) 074 // 075 076 public void setTermCriteria(TermCriteria crit) { 077 setTermCriteria_0(nativeObj, crit.type, crit.maxCount, crit.epsilon); 078 } 079 080 081 // 082 // C++: int cv::SparsePyrLKOpticalFlow::getFlags() 083 // 084 085 public int getFlags() { 086 return getFlags_0(nativeObj); 087 } 088 089 090 // 091 // C++: void cv::SparsePyrLKOpticalFlow::setFlags(int flags) 092 // 093 094 public void setFlags(int flags) { 095 setFlags_0(nativeObj, flags); 096 } 097 098 099 // 100 // C++: double cv::SparsePyrLKOpticalFlow::getMinEigThreshold() 101 // 102 103 public double getMinEigThreshold() { 104 return getMinEigThreshold_0(nativeObj); 105 } 106 107 108 // 109 // C++: void cv::SparsePyrLKOpticalFlow::setMinEigThreshold(double minEigThreshold) 110 // 111 112 public void setMinEigThreshold(double minEigThreshold) { 113 setMinEigThreshold_0(nativeObj, minEigThreshold); 114 } 115 116 117 // 118 // C++: static Ptr_SparsePyrLKOpticalFlow cv::SparsePyrLKOpticalFlow::create(Size winSize = Size(21, 21), int maxLevel = 3, TermCriteria crit = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), int flags = 0, double minEigThreshold = 1e-4) 119 // 120 121 public static SparsePyrLKOpticalFlow create(Size winSize, int maxLevel, TermCriteria crit, int flags, double minEigThreshold) { 122 return SparsePyrLKOpticalFlow.__fromPtr__(create_0(winSize.width, winSize.height, maxLevel, crit.type, crit.maxCount, crit.epsilon, flags, minEigThreshold)); 123 } 124 125 public static SparsePyrLKOpticalFlow create(Size winSize, int maxLevel, TermCriteria crit, int flags) { 126 return SparsePyrLKOpticalFlow.__fromPtr__(create_1(winSize.width, winSize.height, maxLevel, crit.type, crit.maxCount, crit.epsilon, flags)); 127 } 128 129 public static SparsePyrLKOpticalFlow create(Size winSize, int maxLevel, TermCriteria crit) { 130 return SparsePyrLKOpticalFlow.__fromPtr__(create_2(winSize.width, winSize.height, maxLevel, crit.type, crit.maxCount, crit.epsilon)); 131 } 132 133 public static SparsePyrLKOpticalFlow create(Size winSize, int maxLevel) { 134 return SparsePyrLKOpticalFlow.__fromPtr__(create_3(winSize.width, winSize.height, maxLevel)); 135 } 136 137 public static SparsePyrLKOpticalFlow create(Size winSize) { 138 return SparsePyrLKOpticalFlow.__fromPtr__(create_4(winSize.width, winSize.height)); 139 } 140 141 public static SparsePyrLKOpticalFlow create() { 142 return SparsePyrLKOpticalFlow.__fromPtr__(create_5()); 143 } 144 145 146 @Override 147 protected void finalize() throws Throwable { 148 delete(nativeObj); 149 } 150 151 152 153 // C++: Size cv::SparsePyrLKOpticalFlow::getWinSize() 154 private static native double[] getWinSize_0(long nativeObj); 155 156 // C++: void cv::SparsePyrLKOpticalFlow::setWinSize(Size winSize) 157 private static native void setWinSize_0(long nativeObj, double winSize_width, double winSize_height); 158 159 // C++: int cv::SparsePyrLKOpticalFlow::getMaxLevel() 160 private static native int getMaxLevel_0(long nativeObj); 161 162 // C++: void cv::SparsePyrLKOpticalFlow::setMaxLevel(int maxLevel) 163 private static native void setMaxLevel_0(long nativeObj, int maxLevel); 164 165 // C++: TermCriteria cv::SparsePyrLKOpticalFlow::getTermCriteria() 166 private static native double[] getTermCriteria_0(long nativeObj); 167 168 // C++: void cv::SparsePyrLKOpticalFlow::setTermCriteria(TermCriteria crit) 169 private static native void setTermCriteria_0(long nativeObj, int crit_type, int crit_maxCount, double crit_epsilon); 170 171 // C++: int cv::SparsePyrLKOpticalFlow::getFlags() 172 private static native int getFlags_0(long nativeObj); 173 174 // C++: void cv::SparsePyrLKOpticalFlow::setFlags(int flags) 175 private static native void setFlags_0(long nativeObj, int flags); 176 177 // C++: double cv::SparsePyrLKOpticalFlow::getMinEigThreshold() 178 private static native double getMinEigThreshold_0(long nativeObj); 179 180 // C++: void cv::SparsePyrLKOpticalFlow::setMinEigThreshold(double minEigThreshold) 181 private static native void setMinEigThreshold_0(long nativeObj, double minEigThreshold); 182 183 // C++: static Ptr_SparsePyrLKOpticalFlow cv::SparsePyrLKOpticalFlow::create(Size winSize = Size(21, 21), int maxLevel = 3, TermCriteria crit = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), int flags = 0, double minEigThreshold = 1e-4) 184 private static native long create_0(double winSize_width, double winSize_height, int maxLevel, int crit_type, int crit_maxCount, double crit_epsilon, int flags, double minEigThreshold); 185 private static native long create_1(double winSize_width, double winSize_height, int maxLevel, int crit_type, int crit_maxCount, double crit_epsilon, int flags); 186 private static native long create_2(double winSize_width, double winSize_height, int maxLevel, int crit_type, int crit_maxCount, double crit_epsilon); 187 private static native long create_3(double winSize_width, double winSize_height, int maxLevel); 188 private static native long create_4(double winSize_width, double winSize_height); 189 private static native long create_5(); 190 191 // native support for java finalize() 192 private static native void delete(long nativeObj); 193 194}