001// 002// This file is auto-generated. Please don't modify it! 003// 004package org.opencv.objdetect; 005 006import org.opencv.core.Mat; 007import org.opencv.core.Size; 008import org.opencv.objdetect.Board; 009import org.opencv.objdetect.Dictionary; 010 011// C++: class GridBoard 012/** 013 * Planar board with grid arrangement of markers 014 * 015 * More common type of board. All markers are placed in the same plane in a grid arrangement. 016 * The board image can be drawn using generateImage() method. 017 */ 018public class GridBoard extends Board { 019 020 protected GridBoard(long addr) { super(addr); } 021 022 // internal usage only 023 public static GridBoard __fromPtr__(long addr) { return new GridBoard(addr); } 024 025 // 026 // C++: cv::aruco::GridBoard::GridBoard(Size size, float markerLength, float markerSeparation, Dictionary dictionary, Mat ids = Mat()) 027 // 028 029 /** 030 * GridBoard constructor 031 * 032 * @param size number of markers in x and y directions 033 * @param markerLength marker side length (normally in meters) 034 * @param markerSeparation separation between two markers (same unit as markerLength) 035 * @param dictionary dictionary of markers indicating the type of markers 036 * @param ids set of marker ids in dictionary to use on board. 037 */ 038 public GridBoard(Size size, float markerLength, float markerSeparation, Dictionary dictionary, Mat ids) { 039 super(GridBoard_0(size.width, size.height, markerLength, markerSeparation, dictionary.nativeObj, ids.nativeObj)); 040 } 041 042 /** 043 * GridBoard constructor 044 * 045 * @param size number of markers in x and y directions 046 * @param markerLength marker side length (normally in meters) 047 * @param markerSeparation separation between two markers (same unit as markerLength) 048 * @param dictionary dictionary of markers indicating the type of markers 049 */ 050 public GridBoard(Size size, float markerLength, float markerSeparation, Dictionary dictionary) { 051 super(GridBoard_1(size.width, size.height, markerLength, markerSeparation, dictionary.nativeObj)); 052 } 053 054 055 // 056 // C++: Size cv::aruco::GridBoard::getGridSize() 057 // 058 059 public Size getGridSize() { 060 return new Size(getGridSize_0(nativeObj)); 061 } 062 063 064 // 065 // C++: float cv::aruco::GridBoard::getMarkerLength() 066 // 067 068 public float getMarkerLength() { 069 return getMarkerLength_0(nativeObj); 070 } 071 072 073 // 074 // C++: float cv::aruco::GridBoard::getMarkerSeparation() 075 // 076 077 public float getMarkerSeparation() { 078 return getMarkerSeparation_0(nativeObj); 079 } 080 081 082 @Override 083 protected void finalize() throws Throwable { 084 delete(nativeObj); 085 } 086 087 088 089 // C++: cv::aruco::GridBoard::GridBoard(Size size, float markerLength, float markerSeparation, Dictionary dictionary, Mat ids = Mat()) 090 private static native long GridBoard_0(double size_width, double size_height, float markerLength, float markerSeparation, long dictionary_nativeObj, long ids_nativeObj); 091 private static native long GridBoard_1(double size_width, double size_height, float markerLength, float markerSeparation, long dictionary_nativeObj); 092 093 // C++: Size cv::aruco::GridBoard::getGridSize() 094 private static native double[] getGridSize_0(long nativeObj); 095 096 // C++: float cv::aruco::GridBoard::getMarkerLength() 097 private static native float getMarkerLength_0(long nativeObj); 098 099 // C++: float cv::aruco::GridBoard::getMarkerSeparation() 100 private static native float getMarkerSeparation_0(long nativeObj); 101 102 // native support for java finalize() 103 private static native void delete(long nativeObj); 104 105}