id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
50,200 | lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/imageprocessing/ExampleFourierTransform.java | ExampleFourierTransform.displayTransform | public static void displayTransform( InterleavedF32 transform , String name ) {
// declare storage
GrayF32 magnitude = new GrayF32(transform.width,transform.height);
GrayF32 phase = new GrayF32(transform.width,transform.height);
// Make a copy so that you don't modify the input
transform = transform.clone()... | java | public static void displayTransform( InterleavedF32 transform , String name ) {
// declare storage
GrayF32 magnitude = new GrayF32(transform.width,transform.height);
GrayF32 phase = new GrayF32(transform.width,transform.height);
// Make a copy so that you don't modify the input
transform = transform.clone()... | [
"public",
"static",
"void",
"displayTransform",
"(",
"InterleavedF32",
"transform",
",",
"String",
"name",
")",
"{",
"// declare storage",
"GrayF32",
"magnitude",
"=",
"new",
"GrayF32",
"(",
"transform",
".",
"width",
",",
"transform",
".",
"height",
")",
";",
... | Display the fourier transform's magnitude and phase. | [
"Display",
"the",
"fourier",
"transform",
"s",
"magnitude",
"and",
"phase",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/imageprocessing/ExampleFourierTransform.java#L116-L141 |
50,201 | lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/stereo/ExampleFundamentalMatrix.java | ExampleFundamentalMatrix.robustFundamental | public static DMatrixRMaj robustFundamental( List<AssociatedPair> matches ,
List<AssociatedPair> inliers , double inlierThreshold ) {
ConfigRansac configRansac = new ConfigRansac();
configRansac.inlierThreshold = inlierThreshold;
configRansac.maxIterations = 1000;
ConfigFundamental configFundament... | java | public static DMatrixRMaj robustFundamental( List<AssociatedPair> matches ,
List<AssociatedPair> inliers , double inlierThreshold ) {
ConfigRansac configRansac = new ConfigRansac();
configRansac.inlierThreshold = inlierThreshold;
configRansac.maxIterations = 1000;
ConfigFundamental configFundament... | [
"public",
"static",
"DMatrixRMaj",
"robustFundamental",
"(",
"List",
"<",
"AssociatedPair",
">",
"matches",
",",
"List",
"<",
"AssociatedPair",
">",
"inliers",
",",
"double",
"inlierThreshold",
")",
"{",
"ConfigRansac",
"configRansac",
"=",
"new",
"ConfigRansac",
... | Given a set of noisy observations, compute the Fundamental matrix while removing
the noise.
@param matches List of associated features between the two images
@param inliers List of feature pairs that were determined to not be noise.
@return The found fundamental matrix. | [
"Given",
"a",
"set",
"of",
"noisy",
"observations",
"compute",
"the",
"Fundamental",
"matrix",
"while",
"removing",
"the",
"noise",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/stereo/ExampleFundamentalMatrix.java#L74-L107 |
50,202 | lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/stereo/ExampleFundamentalMatrix.java | ExampleFundamentalMatrix.simpleFundamental | public static DMatrixRMaj simpleFundamental( List<AssociatedPair> matches ) {
// Use the 8-point algorithm since it will work with an arbitrary number of points
Estimate1ofEpipolar estimateF = FactoryMultiView.fundamental_1(EnumFundamental.LINEAR_8, 0);
DMatrixRMaj F = new DMatrixRMaj(3,3);
if( !estimateF.proc... | java | public static DMatrixRMaj simpleFundamental( List<AssociatedPair> matches ) {
// Use the 8-point algorithm since it will work with an arbitrary number of points
Estimate1ofEpipolar estimateF = FactoryMultiView.fundamental_1(EnumFundamental.LINEAR_8, 0);
DMatrixRMaj F = new DMatrixRMaj(3,3);
if( !estimateF.proc... | [
"public",
"static",
"DMatrixRMaj",
"simpleFundamental",
"(",
"List",
"<",
"AssociatedPair",
">",
"matches",
")",
"{",
"// Use the 8-point algorithm since it will work with an arbitrary number of points",
"Estimate1ofEpipolar",
"estimateF",
"=",
"FactoryMultiView",
".",
"fundament... | If the set of associated features are known to be correct, then the fundamental matrix can
be computed directly with a lot less code. The down side is that this technique is very
sensitive to noise. | [
"If",
"the",
"set",
"of",
"associated",
"features",
"are",
"known",
"to",
"be",
"correct",
"then",
"the",
"fundamental",
"matrix",
"can",
"be",
"computed",
"directly",
"with",
"a",
"lot",
"less",
"code",
".",
"The",
"down",
"side",
"is",
"that",
"this",
... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/stereo/ExampleFundamentalMatrix.java#L114-L125 |
50,203 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java | QrCodeDecoderBits.applyErrorCorrection | public boolean applyErrorCorrection( QrCode qr) {
// System.out.println("decoder ver "+qr.version);
// System.out.println("decoder mask "+qr.mask);
// System.out.println("decoder error "+qr.error);
QrCode.VersionInfo info = QrCode.VERSION_INFO[qr.version];
QrCode.BlockInfo block = info.levels.get(qr.error);
... | java | public boolean applyErrorCorrection( QrCode qr) {
// System.out.println("decoder ver "+qr.version);
// System.out.println("decoder mask "+qr.mask);
// System.out.println("decoder error "+qr.error);
QrCode.VersionInfo info = QrCode.VERSION_INFO[qr.version];
QrCode.BlockInfo block = info.levels.get(qr.error);
... | [
"public",
"boolean",
"applyErrorCorrection",
"(",
"QrCode",
"qr",
")",
"{",
"//\t\tSystem.out.println(\"decoder ver \"+qr.version);",
"//\t\tSystem.out.println(\"decoder mask \"+qr.mask);",
"//\t\tSystem.out.println(\"decoder error \"+qr.error);",
"QrCode",
".",
"VersionInfo",
"info",... | Reconstruct the data while applying error correction. | [
"Reconstruct",
"the",
"data",
"while",
"applying",
"error",
"correction",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java#L67-L95 |
50,204 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java | QrCodeDecoderBits.updateModeLogic | private QrCode.Mode updateModeLogic( QrCode.Mode current , QrCode.Mode candidate )
{
if( current == candidate )
return current;
else if( current == QrCode.Mode.UNKNOWN ) {
return candidate;
} else {
return QrCode.Mode.MIXED;
}
} | java | private QrCode.Mode updateModeLogic( QrCode.Mode current , QrCode.Mode candidate )
{
if( current == candidate )
return current;
else if( current == QrCode.Mode.UNKNOWN ) {
return candidate;
} else {
return QrCode.Mode.MIXED;
}
} | [
"private",
"QrCode",
".",
"Mode",
"updateModeLogic",
"(",
"QrCode",
".",
"Mode",
"current",
",",
"QrCode",
".",
"Mode",
"candidate",
")",
"{",
"if",
"(",
"current",
"==",
"candidate",
")",
"return",
"current",
";",
"else",
"if",
"(",
"current",
"==",
"Qr... | If only one mode then that mode is used. If more than one mode is used then set to multiple | [
"If",
"only",
"one",
"mode",
"then",
"that",
"mode",
"is",
"used",
".",
"If",
"more",
"than",
"one",
"mode",
"is",
"used",
"then",
"set",
"to",
"multiple"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java#L188-L197 |
50,205 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java | QrCodeDecoderBits.checkPaddingBytes | boolean checkPaddingBytes(QrCode qr, int lengthBytes) {
boolean a = true;
for (int i = lengthBytes; i < qr.corrected.length; i++) {
if (a) {
if (0b00110111 != (qr.corrected[i] & 0xFF))
return false;
} else {
if (0b10001000 != (qr.corrected[i] & 0xFF)) {
// the pattern starts over at the beg... | java | boolean checkPaddingBytes(QrCode qr, int lengthBytes) {
boolean a = true;
for (int i = lengthBytes; i < qr.corrected.length; i++) {
if (a) {
if (0b00110111 != (qr.corrected[i] & 0xFF))
return false;
} else {
if (0b10001000 != (qr.corrected[i] & 0xFF)) {
// the pattern starts over at the beg... | [
"boolean",
"checkPaddingBytes",
"(",
"QrCode",
"qr",
",",
"int",
"lengthBytes",
")",
"{",
"boolean",
"a",
"=",
"true",
";",
"for",
"(",
"int",
"i",
"=",
"lengthBytes",
";",
"i",
"<",
"qr",
".",
"corrected",
".",
"length",
";",
"i",
"++",
")",
"{",
... | Makes sure the used bytes have the expected values
@param lengthBytes Number of bytes that data should be been written to and not filled with padding. | [
"Makes",
"sure",
"the",
"used",
"bytes",
"have",
"the",
"expected",
"values"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java#L208-L231 |
50,206 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java | QrCodeDecoderBits.decodeNumeric | private int decodeNumeric( QrCode qr , PackedBits8 data, int bitLocation ) {
int lengthBits = QrCodeEncoder.getLengthBitsNumeric(qr.version);
int length = data.read(bitLocation,lengthBits,true);
bitLocation += lengthBits;
while( length >= 3 ) {
if( data.size < bitLocation+10 ) {
qr.failureCause = QrCod... | java | private int decodeNumeric( QrCode qr , PackedBits8 data, int bitLocation ) {
int lengthBits = QrCodeEncoder.getLengthBitsNumeric(qr.version);
int length = data.read(bitLocation,lengthBits,true);
bitLocation += lengthBits;
while( length >= 3 ) {
if( data.size < bitLocation+10 ) {
qr.failureCause = QrCod... | [
"private",
"int",
"decodeNumeric",
"(",
"QrCode",
"qr",
",",
"PackedBits8",
"data",
",",
"int",
"bitLocation",
")",
"{",
"int",
"lengthBits",
"=",
"QrCodeEncoder",
".",
"getLengthBitsNumeric",
"(",
"qr",
".",
"version",
")",
";",
"int",
"length",
"=",
"data"... | Decodes a numeric message
@param qr QR code
@param data encoded data
@return Location it has read up to in bits | [
"Decodes",
"a",
"numeric",
"message"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java#L240-L287 |
50,207 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java | QrCodeDecoderBits.decodeAlphanumeric | private int decodeAlphanumeric( QrCode qr , PackedBits8 data, int bitLocation ) {
int lengthBits = QrCodeEncoder.getLengthBitsAlphanumeric(qr.version);
int length = data.read(bitLocation,lengthBits,true);
bitLocation += lengthBits;
while( length >= 2 ) {
if( data.size < bitLocation+11 ) {
qr.failureCau... | java | private int decodeAlphanumeric( QrCode qr , PackedBits8 data, int bitLocation ) {
int lengthBits = QrCodeEncoder.getLengthBitsAlphanumeric(qr.version);
int length = data.read(bitLocation,lengthBits,true);
bitLocation += lengthBits;
while( length >= 2 ) {
if( data.size < bitLocation+11 ) {
qr.failureCau... | [
"private",
"int",
"decodeAlphanumeric",
"(",
"QrCode",
"qr",
",",
"PackedBits8",
"data",
",",
"int",
"bitLocation",
")",
"{",
"int",
"lengthBits",
"=",
"QrCodeEncoder",
".",
"getLengthBitsAlphanumeric",
"(",
"qr",
".",
"version",
")",
";",
"int",
"length",
"="... | Decodes alphanumeric messages
@param qr QR code
@param data encoded data
@return Location it has read up to in bits | [
"Decodes",
"alphanumeric",
"messages"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java#L296-L328 |
50,208 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java | QrCodeDecoderBits.decodeByte | private int decodeByte( QrCode qr , PackedBits8 data, int bitLocation ) {
int lengthBits = QrCodeEncoder.getLengthBitsBytes(qr.version);
int length = data.read(bitLocation,lengthBits,true);
bitLocation += lengthBits;
if( length*8 > data.size-bitLocation ) {
qr.failureCause = QrCode.Failure.MESSAGE_OVERFLOW... | java | private int decodeByte( QrCode qr , PackedBits8 data, int bitLocation ) {
int lengthBits = QrCodeEncoder.getLengthBitsBytes(qr.version);
int length = data.read(bitLocation,lengthBits,true);
bitLocation += lengthBits;
if( length*8 > data.size-bitLocation ) {
qr.failureCause = QrCode.Failure.MESSAGE_OVERFLOW... | [
"private",
"int",
"decodeByte",
"(",
"QrCode",
"qr",
",",
"PackedBits8",
"data",
",",
"int",
"bitLocation",
")",
"{",
"int",
"lengthBits",
"=",
"QrCodeEncoder",
".",
"getLengthBitsBytes",
"(",
"qr",
".",
"version",
")",
";",
"int",
"length",
"=",
"data",
"... | Decodes byte messages
@param qr QR code
@param data encoded data
@return Location it has read up to in bits | [
"Decodes",
"byte",
"messages"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java#L337-L367 |
50,209 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java | QrCodeDecoderBits.decodeKanji | private int decodeKanji( QrCode qr , PackedBits8 data, int bitLocation ) {
int lengthBits = QrCodeEncoder.getLengthBitsKanji(qr.version);
int length = data.read(bitLocation,lengthBits,true);
bitLocation += lengthBits;
byte rawdata[] = new byte[ length*2 ];
for (int i = 0; i < length; i++) {
if( data.siz... | java | private int decodeKanji( QrCode qr , PackedBits8 data, int bitLocation ) {
int lengthBits = QrCodeEncoder.getLengthBitsKanji(qr.version);
int length = data.read(bitLocation,lengthBits,true);
bitLocation += lengthBits;
byte rawdata[] = new byte[ length*2 ];
for (int i = 0; i < length; i++) {
if( data.siz... | [
"private",
"int",
"decodeKanji",
"(",
"QrCode",
"qr",
",",
"PackedBits8",
"data",
",",
"int",
"bitLocation",
")",
"{",
"int",
"lengthBits",
"=",
"QrCodeEncoder",
".",
"getLengthBitsKanji",
"(",
"qr",
".",
"version",
")",
";",
"int",
"length",
"=",
"data",
... | Decodes Kanji messages
@param qr QR code
@param data encoded data
@return Location it has read up to in bits | [
"Decodes",
"Kanji",
"messages"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java#L376-L414 |
50,210 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/EllipseClustersIntoHexagonalGrid.java | EllipseClustersIntoHexagonalGrid.selectSeedCorner | NodeInfo selectSeedCorner() {
NodeInfo best = null;
double bestScore = 0;
double minAngle = Math.PI+0.1;
for (int i = 0; i < contour.size; i++) {
NodeInfo info = contour.get(i);
if( info.angleBetween < minAngle )
continue;
Edge middleR = selectClosest(info.right,info,true);
if( middleR == nul... | java | NodeInfo selectSeedCorner() {
NodeInfo best = null;
double bestScore = 0;
double minAngle = Math.PI+0.1;
for (int i = 0; i < contour.size; i++) {
NodeInfo info = contour.get(i);
if( info.angleBetween < minAngle )
continue;
Edge middleR = selectClosest(info.right,info,true);
if( middleR == nul... | [
"NodeInfo",
"selectSeedCorner",
"(",
")",
"{",
"NodeInfo",
"best",
"=",
"null",
";",
"double",
"bestScore",
"=",
"0",
";",
"double",
"minAngle",
"=",
"Math",
".",
"PI",
"+",
"0.1",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"contour",
".... | Pick a corner but avoid the pointy edges at the other end | [
"Pick",
"a",
"corner",
"but",
"avoid",
"the",
"pointy",
"edges",
"at",
"the",
"other",
"end"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/EllipseClustersIntoHexagonalGrid.java#L148-L186 |
50,211 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/EllipseClustersIntoHexagonalGrid.java | EllipseClustersIntoHexagonalGrid.bottomTwoColumns | static void bottomTwoColumns(NodeInfo first, NodeInfo second, List<NodeInfo> column0, List<NodeInfo> column1) {
column0.add(first);
column0.add(second);
NodeInfo a = selectClosestN(first,second);
if( a == null ) {
return;
}
a.marked = true;
column1.add(a);
NodeInfo b = second;
while( true ) {
... | java | static void bottomTwoColumns(NodeInfo first, NodeInfo second, List<NodeInfo> column0, List<NodeInfo> column1) {
column0.add(first);
column0.add(second);
NodeInfo a = selectClosestN(first,second);
if( a == null ) {
return;
}
a.marked = true;
column1.add(a);
NodeInfo b = second;
while( true ) {
... | [
"static",
"void",
"bottomTwoColumns",
"(",
"NodeInfo",
"first",
",",
"NodeInfo",
"second",
",",
"List",
"<",
"NodeInfo",
">",
"column0",
",",
"List",
"<",
"NodeInfo",
">",
"column1",
")",
"{",
"column0",
".",
"add",
"(",
"first",
")",
";",
"column0",
"."... | Traverses along the first two columns and sets them up | [
"Traverses",
"along",
"the",
"first",
"two",
"columns",
"and",
"sets",
"them",
"up"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/EllipseClustersIntoHexagonalGrid.java#L228-L253 |
50,212 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/EllipseClustersIntoHexagonalGrid.java | EllipseClustersIntoHexagonalGrid.selectClosest | static Edge selectClosest( NodeInfo a , NodeInfo b , boolean checkSide ) {
double bestScore = Double.MAX_VALUE;
Edge bestEdgeA = null;
Edge edgeAB = a.findEdge(b);
double distAB = a.distance(b);
if( edgeAB == null ) {
return null;// TODO BUG! FIX!
}
for (int i = 0; i < a.edges.size; i++) {
Edge ... | java | static Edge selectClosest( NodeInfo a , NodeInfo b , boolean checkSide ) {
double bestScore = Double.MAX_VALUE;
Edge bestEdgeA = null;
Edge edgeAB = a.findEdge(b);
double distAB = a.distance(b);
if( edgeAB == null ) {
return null;// TODO BUG! FIX!
}
for (int i = 0; i < a.edges.size; i++) {
Edge ... | [
"static",
"Edge",
"selectClosest",
"(",
"NodeInfo",
"a",
",",
"NodeInfo",
"b",
",",
"boolean",
"checkSide",
")",
"{",
"double",
"bestScore",
"=",
"Double",
".",
"MAX_VALUE",
";",
"Edge",
"bestEdgeA",
"=",
"null",
";",
"Edge",
"edgeAB",
"=",
"a",
".",
"fi... | Finds the closest that is the same distance from the two nodes and part of an approximate equilateral triangle | [
"Finds",
"the",
"closest",
"that",
"is",
"the",
"same",
"distance",
"from",
"the",
"two",
"nodes",
"and",
"part",
"of",
"an",
"approximate",
"equilateral",
"triangle"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/EllipseClustersIntoHexagonalGrid.java#L258-L314 |
50,213 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/EllipseClustersIntoHexagonalGrid.java | EllipseClustersIntoHexagonalGrid.selectClosestSide | static NodeInfo selectClosestSide( NodeInfo a , NodeInfo b ) {
double ratio = 1.7321;
NodeInfo best = null;
double bestDistance = Double.MAX_VALUE;
Edge bestEdgeA = null;
Edge bestEdgeB = null;
for (int i = 0; i < a.edges.size; i++) {
NodeInfo aa = a.edges.get(i).target;
if( aa.marked ) continue;
... | java | static NodeInfo selectClosestSide( NodeInfo a , NodeInfo b ) {
double ratio = 1.7321;
NodeInfo best = null;
double bestDistance = Double.MAX_VALUE;
Edge bestEdgeA = null;
Edge bestEdgeB = null;
for (int i = 0; i < a.edges.size; i++) {
NodeInfo aa = a.edges.get(i).target;
if( aa.marked ) continue;
... | [
"static",
"NodeInfo",
"selectClosestSide",
"(",
"NodeInfo",
"a",
",",
"NodeInfo",
"b",
")",
"{",
"double",
"ratio",
"=",
"1.7321",
";",
"NodeInfo",
"best",
"=",
"null",
";",
"double",
"bestDistance",
"=",
"Double",
".",
"MAX_VALUE",
";",
"Edge",
"bestEdgeA",... | Selects the closest node with the assumption that it's along the side of the grid. | [
"Selects",
"the",
"closest",
"node",
"with",
"the",
"assumption",
"that",
"it",
"s",
"along",
"the",
"side",
"of",
"the",
"grid",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/EllipseClustersIntoHexagonalGrid.java#L327-L388 |
50,214 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/color/ColorYuv.java | ColorYuv.rgbToYuv | public static void rgbToYuv( double r , double g , double b , double yuv[] ) {
double y = yuv[0] = 0.299*r + 0.587*g + 0.114*b;
yuv[1] = 0.492*(b-y);
yuv[2] = 0.877*(r-y);
} | java | public static void rgbToYuv( double r , double g , double b , double yuv[] ) {
double y = yuv[0] = 0.299*r + 0.587*g + 0.114*b;
yuv[1] = 0.492*(b-y);
yuv[2] = 0.877*(r-y);
} | [
"public",
"static",
"void",
"rgbToYuv",
"(",
"double",
"r",
",",
"double",
"g",
",",
"double",
"b",
",",
"double",
"yuv",
"[",
"]",
")",
"{",
"double",
"y",
"=",
"yuv",
"[",
"0",
"]",
"=",
"0.299",
"*",
"r",
"+",
"0.587",
"*",
"g",
"+",
"0.114"... | Conversion from RGB to YUV using same equations as Intel IPP. | [
"Conversion",
"from",
"RGB",
"to",
"YUV",
"using",
"same",
"equations",
"as",
"Intel",
"IPP",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/color/ColorYuv.java#L64-L68 |
50,215 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/color/ColorYuv.java | ColorYuv.yuvToRgb | public static void yuvToRgb( double y , double u , double v , double rgb[] ) {
rgb[0] = y + 1.13983*v;
rgb[1] = y - 0.39465*u - 0.58060*v;
rgb[2] = y + 2.032*u;
} | java | public static void yuvToRgb( double y , double u , double v , double rgb[] ) {
rgb[0] = y + 1.13983*v;
rgb[1] = y - 0.39465*u - 0.58060*v;
rgb[2] = y + 2.032*u;
} | [
"public",
"static",
"void",
"yuvToRgb",
"(",
"double",
"y",
",",
"double",
"u",
",",
"double",
"v",
",",
"double",
"rgb",
"[",
"]",
")",
"{",
"rgb",
"[",
"0",
"]",
"=",
"y",
"+",
"1.13983",
"*",
"v",
";",
"rgb",
"[",
"1",
"]",
"=",
"y",
"-",
... | Conversion from YUV to RGB using same equations as Intel IPP. | [
"Conversion",
"from",
"YUV",
"to",
"RGB",
"using",
"same",
"equations",
"as",
"Intel",
"IPP",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/color/ColorYuv.java#L82-L86 |
50,216 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalLinearPoint7.java | TrifocalLinearPoint7.process | public boolean process( List<AssociatedTriple> observations , TrifocalTensor solution ) {
if( observations.size() < 7 )
throw new IllegalArgumentException(
"At least 7 correspondences must be provided. Found "+observations.size());
// compute normalization to reduce numerical errors
LowLevelMultiViewOps... | java | public boolean process( List<AssociatedTriple> observations , TrifocalTensor solution ) {
if( observations.size() < 7 )
throw new IllegalArgumentException(
"At least 7 correspondences must be provided. Found "+observations.size());
// compute normalization to reduce numerical errors
LowLevelMultiViewOps... | [
"public",
"boolean",
"process",
"(",
"List",
"<",
"AssociatedTriple",
">",
"observations",
",",
"TrifocalTensor",
"solution",
")",
"{",
"if",
"(",
"observations",
".",
"size",
"(",
")",
"<",
"7",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"At leas... | Estimates the trifocal tensor given the set of observations
@param observations Set of observations
@param solution Output: Where the solution is written to
@return true if successful and false if it fails | [
"Estimates",
"the",
"trifocal",
"tensor",
"given",
"the",
"set",
"of",
"observations"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalLinearPoint7.java#L97-L122 |
50,217 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalLinearPoint7.java | TrifocalLinearPoint7.createLinearSystem | protected void createLinearSystem( List<AssociatedTriple> observations ) {
int N = observations.size();
A.reshape(4*N,27);
A.zero();
for( int i = 0; i < N; i++ ) {
AssociatedTriple t = observations.get(i);
N1.apply(t.p1,p1_norm);
N2.apply(t.p2,p2_norm);
N3.apply(t.p3,p3_norm);
insert(i,0 , p1... | java | protected void createLinearSystem( List<AssociatedTriple> observations ) {
int N = observations.size();
A.reshape(4*N,27);
A.zero();
for( int i = 0; i < N; i++ ) {
AssociatedTriple t = observations.get(i);
N1.apply(t.p1,p1_norm);
N2.apply(t.p2,p2_norm);
N3.apply(t.p3,p3_norm);
insert(i,0 , p1... | [
"protected",
"void",
"createLinearSystem",
"(",
"List",
"<",
"AssociatedTriple",
">",
"observations",
")",
"{",
"int",
"N",
"=",
"observations",
".",
"size",
"(",
")",
";",
"A",
".",
"reshape",
"(",
"4",
"*",
"N",
",",
"27",
")",
";",
"A",
".",
"zero... | Constructs the linear matrix that describes from the 3-point constraint with linear
dependent rows removed | [
"Constructs",
"the",
"linear",
"matrix",
"that",
"describes",
"from",
"the",
"3",
"-",
"point",
"constraint",
"with",
"linear",
"dependent",
"rows",
"removed"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalLinearPoint7.java#L128-L145 |
50,218 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalLinearPoint7.java | TrifocalLinearPoint7.solveLinearSystem | protected boolean solveLinearSystem() {
if( !svdNull.decompose(A) )
return false;
SingularOps_DDRM.nullVector(svdNull,true,vectorizedSolution);
solutionN.convertFrom(vectorizedSolution);
return true;
} | java | protected boolean solveLinearSystem() {
if( !svdNull.decompose(A) )
return false;
SingularOps_DDRM.nullVector(svdNull,true,vectorizedSolution);
solutionN.convertFrom(vectorizedSolution);
return true;
} | [
"protected",
"boolean",
"solveLinearSystem",
"(",
")",
"{",
"if",
"(",
"!",
"svdNull",
".",
"decompose",
"(",
"A",
")",
")",
"return",
"false",
";",
"SingularOps_DDRM",
".",
"nullVector",
"(",
"svdNull",
",",
"true",
",",
"vectorizedSolution",
")",
";",
"s... | Computes the null space of the linear system to find the trifocal tensor | [
"Computes",
"the",
"null",
"space",
"of",
"the",
"linear",
"system",
"to",
"find",
"the",
"trifocal",
"tensor"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalLinearPoint7.java#L190-L199 |
50,219 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalLinearPoint7.java | TrifocalLinearPoint7.removeNormalization | protected void removeNormalization( TrifocalTensor solution ) {
DMatrixRMaj N2_inv = N2.matrixInv();
DMatrixRMaj N3_inv = N3.matrixInv();
DMatrixRMaj N1 = this.N1.matrix();
for( int i = 0; i < 3; i++ ) {
DMatrixRMaj T = solution.getT(i);
for( int j = 0; j < 3; j++ ) {
for( int k = 0; k < 3; k++ ) {
... | java | protected void removeNormalization( TrifocalTensor solution ) {
DMatrixRMaj N2_inv = N2.matrixInv();
DMatrixRMaj N3_inv = N3.matrixInv();
DMatrixRMaj N1 = this.N1.matrix();
for( int i = 0; i < 3; i++ ) {
DMatrixRMaj T = solution.getT(i);
for( int j = 0; j < 3; j++ ) {
for( int k = 0; k < 3; k++ ) {
... | [
"protected",
"void",
"removeNormalization",
"(",
"TrifocalTensor",
"solution",
")",
"{",
"DMatrixRMaj",
"N2_inv",
"=",
"N2",
".",
"matrixInv",
"(",
")",
";",
"DMatrixRMaj",
"N3_inv",
"=",
"N3",
".",
"matrixInv",
"(",
")",
";",
"DMatrixRMaj",
"N1",
"=",
"this... | Translates the trifocal tensor back into regular coordinate system | [
"Translates",
"the",
"trifocal",
"tensor",
"back",
"into",
"regular",
"coordinate",
"system"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalLinearPoint7.java#L204-L232 |
50,220 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/shapes/edge/ScoreLineSegmentEdge.java | ScoreLineSegmentEdge.computeAverageDerivative | public double computeAverageDerivative(Point2D_F64 a, Point2D_F64 b, double tanX, double tanY) {
samplesInside = 0;
averageUp = averageDown = 0;
for (int i = 0; i < numSamples; i++) {
double x = (b.x-a.x)*i/(numSamples-1) + a.x;
double y = (b.y-a.y)*i/(numSamples-1) + a.y;
double x0 = x+tanX;
double... | java | public double computeAverageDerivative(Point2D_F64 a, Point2D_F64 b, double tanX, double tanY) {
samplesInside = 0;
averageUp = averageDown = 0;
for (int i = 0; i < numSamples; i++) {
double x = (b.x-a.x)*i/(numSamples-1) + a.x;
double y = (b.y-a.y)*i/(numSamples-1) + a.y;
double x0 = x+tanX;
double... | [
"public",
"double",
"computeAverageDerivative",
"(",
"Point2D_F64",
"a",
",",
"Point2D_F64",
"b",
",",
"double",
"tanX",
",",
"double",
"tanY",
")",
"{",
"samplesInside",
"=",
"0",
";",
"averageUp",
"=",
"averageDown",
"=",
"0",
";",
"for",
"(",
"int",
"i"... | Returns average tangential derivative along the line segment. Derivative is computed in direction
of tangent. A positive step in the tangent direction will have a positive value. If all samples
go outside the image then zero is returned.
@param a start point
@param b end point
@param tanX unit tangent x-axis. dete... | [
"Returns",
"average",
"tangential",
"derivative",
"along",
"the",
"line",
"segment",
".",
"Derivative",
"is",
"computed",
"in",
"direction",
"of",
"tangent",
".",
"A",
"positive",
"step",
"in",
"the",
"tangent",
"direction",
"will",
"have",
"a",
"positive",
"v... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/edge/ScoreLineSegmentEdge.java#L75-L110 |
50,221 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/color/ColorXyz.java | ColorXyz.rgbToXyz | public static void rgbToXyz( int r , int g , int b , double xyz[] ) {
srgbToXyz(r/255.0,g/255.0,b/255.0,xyz);
} | java | public static void rgbToXyz( int r , int g , int b , double xyz[] ) {
srgbToXyz(r/255.0,g/255.0,b/255.0,xyz);
} | [
"public",
"static",
"void",
"rgbToXyz",
"(",
"int",
"r",
",",
"int",
"g",
",",
"int",
"b",
",",
"double",
"xyz",
"[",
"]",
")",
"{",
"srgbToXyz",
"(",
"r",
"/",
"255.0",
",",
"g",
"/",
"255.0",
",",
"b",
"/",
"255.0",
",",
"xyz",
")",
";",
"}... | Conversion from 8-bit RGB into XYZ. 8-bit = range of 0 to 255. | [
"Conversion",
"from",
"8",
"-",
"bit",
"RGB",
"into",
"XYZ",
".",
"8",
"-",
"bit",
"=",
"range",
"of",
"0",
"to",
"255",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/color/ColorXyz.java#L56-L58 |
50,222 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomMonoOverheadMotion2D.java | VisOdomMonoOverheadMotion2D.configureCamera | public void configureCamera(CameraPinholeBrown intrinsic ,
Se3_F64 planeToCamera ) {
this.planeToCamera = planeToCamera;
if( !selectOverhead.process(intrinsic,planeToCamera) )
throw new IllegalArgumentException("Can't find a reasonable overhead map. Can the camera view the plane?");
overhead.centerX... | java | public void configureCamera(CameraPinholeBrown intrinsic ,
Se3_F64 planeToCamera ) {
this.planeToCamera = planeToCamera;
if( !selectOverhead.process(intrinsic,planeToCamera) )
throw new IllegalArgumentException("Can't find a reasonable overhead map. Can the camera view the plane?");
overhead.centerX... | [
"public",
"void",
"configureCamera",
"(",
"CameraPinholeBrown",
"intrinsic",
",",
"Se3_F64",
"planeToCamera",
")",
"{",
"this",
".",
"planeToCamera",
"=",
"planeToCamera",
";",
"if",
"(",
"!",
"selectOverhead",
".",
"process",
"(",
"intrinsic",
",",
"planeToCamera... | Camera the camera's intrinsic and extrinsic parameters. Can be called at any time.
@param intrinsic Intrinsic camera parameters
@param planeToCamera Transform from the plane to camera. | [
"Camera",
"the",
"camera",
"s",
"intrinsic",
"and",
"extrinsic",
"parameters",
".",
"Can",
"be",
"called",
"at",
"any",
"time",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomMonoOverheadMotion2D.java#L105-L125 |
50,223 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomMonoOverheadMotion2D.java | VisOdomMonoOverheadMotion2D.getWorldToCurr3D | public Se3_F64 getWorldToCurr3D() {
// 2D to 3D coordinates
worldToCurr3D.getT().set(-worldToCurr2D.T.y,0,worldToCurr2D.T.x);
DMatrixRMaj R = worldToCurr3D.getR();
// set rotation around Y axis.
// Transpose the 2D transform since the rotation are pointing in opposite directions
R.unsafe_set(0, 0, worldToC... | java | public Se3_F64 getWorldToCurr3D() {
// 2D to 3D coordinates
worldToCurr3D.getT().set(-worldToCurr2D.T.y,0,worldToCurr2D.T.x);
DMatrixRMaj R = worldToCurr3D.getR();
// set rotation around Y axis.
// Transpose the 2D transform since the rotation are pointing in opposite directions
R.unsafe_set(0, 0, worldToC... | [
"public",
"Se3_F64",
"getWorldToCurr3D",
"(",
")",
"{",
"// 2D to 3D coordinates",
"worldToCurr3D",
".",
"getT",
"(",
")",
".",
"set",
"(",
"-",
"worldToCurr2D",
".",
"T",
".",
"y",
",",
"0",
",",
"worldToCurr2D",
".",
"T",
".",
"x",
")",
";",
"DMatrixRM... | 3D motion.
@return from world to current frame. | [
"3D",
"motion",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomMonoOverheadMotion2D.java#L172-L188 |
50,224 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetector.java | BinaryEllipseDetector.process | public void process(T gray, GrayU8 binary) {
results.reset();
ellipseDetector.process(binary);
if( ellipseRefiner != null)
ellipseRefiner.setImage(gray);
intensityCheck.setImage(gray);
List<BinaryEllipseDetectorPixel.Found> found = ellipseDetector.getFound();
for( BinaryEllipseDetectorPixel.Found f : ... | java | public void process(T gray, GrayU8 binary) {
results.reset();
ellipseDetector.process(binary);
if( ellipseRefiner != null)
ellipseRefiner.setImage(gray);
intensityCheck.setImage(gray);
List<BinaryEllipseDetectorPixel.Found> found = ellipseDetector.getFound();
for( BinaryEllipseDetectorPixel.Found f : ... | [
"public",
"void",
"process",
"(",
"T",
"gray",
",",
"GrayU8",
"binary",
")",
"{",
"results",
".",
"reset",
"(",
")",
";",
"ellipseDetector",
".",
"process",
"(",
"binary",
")",
";",
"if",
"(",
"ellipseRefiner",
"!=",
"null",
")",
"ellipseRefiner",
".",
... | Detects ellipses inside the binary image and refines the edges for all detections inside the gray image
@param gray Grayscale image
@param binary Binary image of grayscale. 1 = ellipse and 0 = ignored background | [
"Detects",
"ellipses",
"inside",
"the",
"binary",
"image",
"and",
"refines",
"the",
"edges",
"for",
"all",
"detections",
"inside",
"the",
"gray",
"image"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetector.java#L100-L136 |
50,225 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetector.java | BinaryEllipseDetector.refine | public boolean refine( EllipseRotated_F64 ellipse ) {
if( autoRefine )
throw new IllegalArgumentException("Autorefine is true, no need to refine again");
if( ellipseRefiner == null )
throw new IllegalArgumentException("Refiner has not been passed in");
if (!ellipseRefiner.process(ellipse,ellipse)) {
retu... | java | public boolean refine( EllipseRotated_F64 ellipse ) {
if( autoRefine )
throw new IllegalArgumentException("Autorefine is true, no need to refine again");
if( ellipseRefiner == null )
throw new IllegalArgumentException("Refiner has not been passed in");
if (!ellipseRefiner.process(ellipse,ellipse)) {
retu... | [
"public",
"boolean",
"refine",
"(",
"EllipseRotated_F64",
"ellipse",
")",
"{",
"if",
"(",
"autoRefine",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Autorefine is true, no need to refine again\"",
")",
";",
"if",
"(",
"ellipseRefiner",
"==",
"null",
")",
... | If auto refine is turned off an ellipse can be refined after the fact using this function, provided
that the refinement algorithm was passed in to the constructor
@param ellipse The ellipse to be refined
@return true if refine was successful or false if not | [
"If",
"auto",
"refine",
"is",
"turned",
"off",
"an",
"ellipse",
"can",
"be",
"refined",
"after",
"the",
"fact",
"using",
"this",
"function",
"provided",
"that",
"the",
"refinement",
"algorithm",
"was",
"passed",
"in",
"to",
"the",
"constructor"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetector.java#L144-L154 |
50,226 | lessthanoptimal/BoofCV | integration/boofcv-android/src/main/java/boofcv/android/VisualizeImageData.java | VisualizeImageData.colorizeSign | public static void colorizeSign( GrayF32 input , float maxAbsValue , Bitmap output , byte[] storage ) {
shapeShape(input, output);
if( storage == null )
storage = declareStorage(output,null);
if( maxAbsValue < 0 )
maxAbsValue = ImageStatistics.maxAbs(input);
int indexDst = 0;
for( int y = 0; y < inp... | java | public static void colorizeSign( GrayF32 input , float maxAbsValue , Bitmap output , byte[] storage ) {
shapeShape(input, output);
if( storage == null )
storage = declareStorage(output,null);
if( maxAbsValue < 0 )
maxAbsValue = ImageStatistics.maxAbs(input);
int indexDst = 0;
for( int y = 0; y < inp... | [
"public",
"static",
"void",
"colorizeSign",
"(",
"GrayF32",
"input",
",",
"float",
"maxAbsValue",
",",
"Bitmap",
"output",
",",
"byte",
"[",
"]",
"storage",
")",
"{",
"shapeShape",
"(",
"input",
",",
"output",
")",
";",
"if",
"(",
"storage",
"==",
"null"... | Renders positive and negative values as two different colors.
@param input (Input) Image with positive and negative values.
@param maxAbsValue The largest absolute value of any pixel in the image. Set to < 0 if not known.
@param output (Output) Bitmap ARGB_8888 image.
@param storage Optional working buffer for Bitma... | [
"Renders",
"positive",
"and",
"negative",
"values",
"as",
"two",
"different",
"colors",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/VisualizeImageData.java#L137-L166 |
50,227 | lessthanoptimal/BoofCV | integration/boofcv-android/src/main/java/boofcv/android/VisualizeImageData.java | VisualizeImageData.grayMagnitude | public static void grayMagnitude(GrayS32 input , int maxAbsValue , Bitmap output , byte[] storage) {
shapeShape(input, output);
if( storage == null )
storage = declareStorage(output,null);
if( maxAbsValue < 0 )
maxAbsValue = ImageStatistics.maxAbs(input);
int indexDst = 0;
for( int y = 0; y < input.... | java | public static void grayMagnitude(GrayS32 input , int maxAbsValue , Bitmap output , byte[] storage) {
shapeShape(input, output);
if( storage == null )
storage = declareStorage(output,null);
if( maxAbsValue < 0 )
maxAbsValue = ImageStatistics.maxAbs(input);
int indexDst = 0;
for( int y = 0; y < input.... | [
"public",
"static",
"void",
"grayMagnitude",
"(",
"GrayS32",
"input",
",",
"int",
"maxAbsValue",
",",
"Bitmap",
"output",
",",
"byte",
"[",
"]",
"storage",
")",
"{",
"shapeShape",
"(",
"input",
",",
"output",
")",
";",
"if",
"(",
"storage",
"==",
"null",... | Renders the image using its gray magnitude
@param input (Input) Image image
@param maxAbsValue (Input) Largest absolute value of a pixel in the image
@param output (Output) Bitmap ARGB_8888 image.
@param storage Optional working buffer for Bitmap image. | [
"Renders",
"the",
"image",
"using",
"its",
"gray",
"magnitude"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/VisualizeImageData.java#L176-L199 |
50,228 | lessthanoptimal/BoofCV | integration/boofcv-android/src/main/java/boofcv/android/VisualizeImageData.java | VisualizeImageData.disparity | public static void disparity( GrayI disparity, int minValue, int maxValue,
int invalidColor, Bitmap output , byte[] storage ) {
shapeShape(disparity, output);
if( storage == null )
storage = declareStorage(output,null);
int range = maxValue - minValue;
int indexDst = 0;
for (int y = 0; y < di... | java | public static void disparity( GrayI disparity, int minValue, int maxValue,
int invalidColor, Bitmap output , byte[] storage ) {
shapeShape(disparity, output);
if( storage == null )
storage = declareStorage(output,null);
int range = maxValue - minValue;
int indexDst = 0;
for (int y = 0; y < di... | [
"public",
"static",
"void",
"disparity",
"(",
"GrayI",
"disparity",
",",
"int",
"minValue",
",",
"int",
"maxValue",
",",
"int",
"invalidColor",
",",
"Bitmap",
"output",
",",
"byte",
"[",
"]",
"storage",
")",
"{",
"shapeShape",
"(",
"disparity",
",",
"outpu... | Colorizes a disparity image.
@param disparity (Input) disparity image.
@param minValue Minimum possible disparity
@param maxValue Maximum possible disparity
@param invalidColor RGB value of an invalid pixel
@param output (Output) Bitmap ARGB_8888 image.
@param storage Optional working buffer for Bitmap image. Can be n... | [
"Colorizes",
"a",
"disparity",
"image",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/VisualizeImageData.java#L362-L400 |
50,229 | lessthanoptimal/BoofCV | integration/boofcv-android/src/main/java/boofcv/android/VisualizeImageData.java | VisualizeImageData.drawEdgeContours | public static void drawEdgeContours( List<EdgeContour> contours , int color , Bitmap output , byte[] storage ) {
if( output.getConfig() != Bitmap.Config.ARGB_8888 )
throw new IllegalArgumentException("Only ARGB_8888 is supported");
if( storage == null )
storage = declareStorage(output,null);
else
Arrays... | java | public static void drawEdgeContours( List<EdgeContour> contours , int color , Bitmap output , byte[] storage ) {
if( output.getConfig() != Bitmap.Config.ARGB_8888 )
throw new IllegalArgumentException("Only ARGB_8888 is supported");
if( storage == null )
storage = declareStorage(output,null);
else
Arrays... | [
"public",
"static",
"void",
"drawEdgeContours",
"(",
"List",
"<",
"EdgeContour",
">",
"contours",
",",
"int",
"color",
",",
"Bitmap",
"output",
",",
"byte",
"[",
"]",
"storage",
")",
"{",
"if",
"(",
"output",
".",
"getConfig",
"(",
")",
"!=",
"Bitmap",
... | Draws each contour using a single color.
@param contours List of edge contours
@param color The RGB color that each edge pixel should be drawn
@param output Where the output is written to
@param storage Optional working buffer for Bitmap image. Can be null. | [
"Draws",
"each",
"contour",
"using",
"a",
"single",
"color",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/VisualizeImageData.java#L501-L535 |
50,230 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/deepboof/ClipAndReduce.java | ClipAndReduce.massage | public void massage( T input , T output ) {
if( clip ) {
T inputAdjusted = clipInput(input, output);
// configure a simple change in scale for both axises
transform.a11 = input.width / (float) output.width;
transform.a22 = input.height / (float) output.height;
// this change is automatically reflected... | java | public void massage( T input , T output ) {
if( clip ) {
T inputAdjusted = clipInput(input, output);
// configure a simple change in scale for both axises
transform.a11 = input.width / (float) output.width;
transform.a22 = input.height / (float) output.height;
// this change is automatically reflected... | [
"public",
"void",
"massage",
"(",
"T",
"input",
",",
"T",
"output",
")",
"{",
"if",
"(",
"clip",
")",
"{",
"T",
"inputAdjusted",
"=",
"clipInput",
"(",
"input",
",",
"output",
")",
";",
"// configure a simple change in scale for both axises",
"transform",
".",... | Clipps and scales the input iamge as neccisary
@param input Input image. Typically larger than output
@param output Output image | [
"Clipps",
"and",
"scales",
"the",
"input",
"iamge",
"as",
"neccisary"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/deepboof/ClipAndReduce.java#L71-L89 |
50,231 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/deepboof/ClipAndReduce.java | ClipAndReduce.clipInput | T clipInput(T input, T output) {
double ratioInput = input.width/(double)input.height;
double ratioOutput = output.width/(double)output.height;
T a = input;
if( ratioInput > ratioOutput ) { // clip the width
int width = input.height*output.width/output.height;
int x0 = (input.width-width)/2;
int x1 =... | java | T clipInput(T input, T output) {
double ratioInput = input.width/(double)input.height;
double ratioOutput = output.width/(double)output.height;
T a = input;
if( ratioInput > ratioOutput ) { // clip the width
int width = input.height*output.width/output.height;
int x0 = (input.width-width)/2;
int x1 =... | [
"T",
"clipInput",
"(",
"T",
"input",
",",
"T",
"output",
")",
"{",
"double",
"ratioInput",
"=",
"input",
".",
"width",
"/",
"(",
"double",
")",
"input",
".",
"height",
";",
"double",
"ratioOutput",
"=",
"output",
".",
"width",
"/",
"(",
"double",
")"... | Clip the input image to ensure a constant aspect ratio | [
"Clip",
"the",
"input",
"image",
"to",
"ensure",
"a",
"constant",
"aspect",
"ratio"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/deepboof/ClipAndReduce.java#L94-L117 |
50,232 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/transform/fft/DiscreteFourierTransformOps.java | DiscreteFourierTransformOps.nextPow2 | public static int nextPow2(int x) {
if (x < 1)
throw new IllegalArgumentException("x must be greater or equal 1");
if ((x & (x - 1)) == 0) {
if( x == 1 )
return 2;
return x; // x is already a power-of-two number
}
x |= (x >>> 1);
x |= (x >>> 2);
x |= (x >>> 4);
x |= (x >>> 8);
x |= (x >>> 1... | java | public static int nextPow2(int x) {
if (x < 1)
throw new IllegalArgumentException("x must be greater or equal 1");
if ((x & (x - 1)) == 0) {
if( x == 1 )
return 2;
return x; // x is already a power-of-two number
}
x |= (x >>> 1);
x |= (x >>> 2);
x |= (x >>> 4);
x |= (x >>> 8);
x |= (x >>> 1... | [
"public",
"static",
"int",
"nextPow2",
"(",
"int",
"x",
")",
"{",
"if",
"(",
"x",
"<",
"1",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"x must be greater or equal 1\"",
")",
";",
"if",
"(",
"(",
"x",
"&",
"(",
"x",
"-",
"1",
")",
")",
"=... | Returns the closest power-of-two number greater than or equal to x.
@param x
@return the closest power-of-two number greater than or equal to x | [
"Returns",
"the",
"closest",
"power",
"-",
"of",
"-",
"two",
"number",
"greater",
"than",
"or",
"equal",
"to",
"x",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/transform/fft/DiscreteFourierTransformOps.java#L74-L89 |
50,233 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/transform/fft/DiscreteFourierTransformOps.java | DiscreteFourierTransformOps.checkImageArguments | public static void checkImageArguments( ImageBase image , ImageInterleaved transform ) {
InputSanityCheck.checkSameShape(image,transform);
if( 2 != transform.getNumBands() )
throw new IllegalArgumentException("The transform must have two bands");
} | java | public static void checkImageArguments( ImageBase image , ImageInterleaved transform ) {
InputSanityCheck.checkSameShape(image,transform);
if( 2 != transform.getNumBands() )
throw new IllegalArgumentException("The transform must have two bands");
} | [
"public",
"static",
"void",
"checkImageArguments",
"(",
"ImageBase",
"image",
",",
"ImageInterleaved",
"transform",
")",
"{",
"InputSanityCheck",
".",
"checkSameShape",
"(",
"image",
",",
"transform",
")",
";",
"if",
"(",
"2",
"!=",
"transform",
".",
"getNumBand... | Checks to see if the image and its transform are appropriate sizes . The transform should have
twice the width and twice the height as the image.
@param image Storage for an image
@param transform Storage for a Fourier Transform | [
"Checks",
"to",
"see",
"if",
"the",
"image",
"and",
"its",
"transform",
"are",
"appropriate",
"sizes",
".",
"The",
"transform",
"should",
"have",
"twice",
"the",
"width",
"and",
"twice",
"the",
"height",
"as",
"the",
"image",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/transform/fft/DiscreteFourierTransformOps.java#L98-L102 |
50,234 | lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/stereo/ExampleStereoTwoViewsOneCamera.java | ExampleStereoTwoViewsOneCamera.estimateCameraMotion | public static Se3_F64 estimateCameraMotion(CameraPinholeBrown intrinsic,
List<AssociatedPair> matchedNorm, List<AssociatedPair> inliers)
{
ModelMatcherMultiview<Se3_F64, AssociatedPair> epipolarMotion =
FactoryMultiViewRobust.baselineRansac(new ConfigEssential(),new ConfigRansac(200,0.5));
epipol... | java | public static Se3_F64 estimateCameraMotion(CameraPinholeBrown intrinsic,
List<AssociatedPair> matchedNorm, List<AssociatedPair> inliers)
{
ModelMatcherMultiview<Se3_F64, AssociatedPair> epipolarMotion =
FactoryMultiViewRobust.baselineRansac(new ConfigEssential(),new ConfigRansac(200,0.5));
epipol... | [
"public",
"static",
"Se3_F64",
"estimateCameraMotion",
"(",
"CameraPinholeBrown",
"intrinsic",
",",
"List",
"<",
"AssociatedPair",
">",
"matchedNorm",
",",
"List",
"<",
"AssociatedPair",
">",
"inliers",
")",
"{",
"ModelMatcherMultiview",
"<",
"Se3_F64",
",",
"Associ... | Estimates the camera motion robustly using RANSAC and a set of associated points.
@param intrinsic Intrinsic camera parameters
@param matchedNorm set of matched point features in normalized image coordinates
@param inliers OUTPUT: Set of inlier features from RANSAC
@return Found camera motion. Note translation ... | [
"Estimates",
"the",
"camera",
"motion",
"robustly",
"using",
"RANSAC",
"and",
"a",
"set",
"of",
"associated",
"points",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/stereo/ExampleStereoTwoViewsOneCamera.java#L155-L170 |
50,235 | lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/stereo/ExampleStereoTwoViewsOneCamera.java | ExampleStereoTwoViewsOneCamera.convertToNormalizedCoordinates | public static List<AssociatedPair> convertToNormalizedCoordinates(List<AssociatedPair> matchedFeatures, CameraPinholeBrown intrinsic) {
Point2Transform2_F64 p_to_n = LensDistortionFactory.narrow(intrinsic).undistort_F64(true, false);
List<AssociatedPair> calibratedFeatures = new ArrayList<>();
for (AssociatedP... | java | public static List<AssociatedPair> convertToNormalizedCoordinates(List<AssociatedPair> matchedFeatures, CameraPinholeBrown intrinsic) {
Point2Transform2_F64 p_to_n = LensDistortionFactory.narrow(intrinsic).undistort_F64(true, false);
List<AssociatedPair> calibratedFeatures = new ArrayList<>();
for (AssociatedP... | [
"public",
"static",
"List",
"<",
"AssociatedPair",
">",
"convertToNormalizedCoordinates",
"(",
"List",
"<",
"AssociatedPair",
">",
"matchedFeatures",
",",
"CameraPinholeBrown",
"intrinsic",
")",
"{",
"Point2Transform2_F64",
"p_to_n",
"=",
"LensDistortionFactory",
".",
"... | Convert a set of associated point features from pixel coordinates into normalized image coordinates. | [
"Convert",
"a",
"set",
"of",
"associated",
"point",
"features",
"from",
"pixel",
"coordinates",
"into",
"normalized",
"image",
"coordinates",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/stereo/ExampleStereoTwoViewsOneCamera.java#L175-L191 |
50,236 | lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/stereo/ExampleStereoTwoViewsOneCamera.java | ExampleStereoTwoViewsOneCamera.rectifyImages | public static <T extends ImageBase<T>>
void rectifyImages(T distortedLeft,
T distortedRight,
Se3_F64 leftToRight,
CameraPinholeBrown intrinsicLeft,
CameraPinholeBrown intrinsicRight,
T rectifiedLeft,
T rectifiedRight,
GrayU8 rectifiedMask,
DMatrixRMaj rec... | java | public static <T extends ImageBase<T>>
void rectifyImages(T distortedLeft,
T distortedRight,
Se3_F64 leftToRight,
CameraPinholeBrown intrinsicLeft,
CameraPinholeBrown intrinsicRight,
T rectifiedLeft,
T rectifiedRight,
GrayU8 rectifiedMask,
DMatrixRMaj rec... | [
"public",
"static",
"<",
"T",
"extends",
"ImageBase",
"<",
"T",
">",
">",
"void",
"rectifyImages",
"(",
"T",
"distortedLeft",
",",
"T",
"distortedRight",
",",
"Se3_F64",
"leftToRight",
",",
"CameraPinholeBrown",
"intrinsicLeft",
",",
"CameraPinholeBrown",
"intrins... | Remove lens distortion and rectify stereo images
@param distortedLeft Input distorted image from left camera.
@param distortedRight Input distorted image from right camera.
@param leftToRight Camera motion from left to right
@param intrinsicLeft Intrinsic camera parameters
@param rectifiedLeft Output rectified i... | [
"Remove",
"lens",
"distortion",
"and",
"rectify",
"stereo",
"images"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/stereo/ExampleStereoTwoViewsOneCamera.java#L205-L250 |
50,237 | lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/stereo/ExampleStereoTwoViewsOneCamera.java | ExampleStereoTwoViewsOneCamera.drawInliers | public static void drawInliers(BufferedImage left, BufferedImage right, CameraPinholeBrown intrinsic,
List<AssociatedPair> normalized) {
Point2Transform2_F64 n_to_p = LensDistortionFactory.narrow(intrinsic).distort_F64(false,true);
List<AssociatedPair> pixels = new ArrayList<>();
for (AssociatedPair ... | java | public static void drawInliers(BufferedImage left, BufferedImage right, CameraPinholeBrown intrinsic,
List<AssociatedPair> normalized) {
Point2Transform2_F64 n_to_p = LensDistortionFactory.narrow(intrinsic).distort_F64(false,true);
List<AssociatedPair> pixels = new ArrayList<>();
for (AssociatedPair ... | [
"public",
"static",
"void",
"drawInliers",
"(",
"BufferedImage",
"left",
",",
"BufferedImage",
"right",
",",
"CameraPinholeBrown",
"intrinsic",
",",
"List",
"<",
"AssociatedPair",
">",
"normalized",
")",
"{",
"Point2Transform2_F64",
"n_to_p",
"=",
"LensDistortionFacto... | Draw inliers for debugging purposes. Need to convert from normalized to pixel coordinates. | [
"Draw",
"inliers",
"for",
"debugging",
"purposes",
".",
"Need",
"to",
"convert",
"from",
"normalized",
"to",
"pixel",
"coordinates",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/stereo/ExampleStereoTwoViewsOneCamera.java#L255-L276 |
50,238 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/descriptor/DescriptorDistance.java | DescriptorDistance.euclideanSq | public static double euclideanSq(TupleDesc_F64 a, TupleDesc_F64 b) {
final int N = a.value.length;
double total = 0;
for( int i = 0; i < N; i++ ) {
double d = a.value[i]-b.value[i];
total += d*d;
}
return total;
} | java | public static double euclideanSq(TupleDesc_F64 a, TupleDesc_F64 b) {
final int N = a.value.length;
double total = 0;
for( int i = 0; i < N; i++ ) {
double d = a.value[i]-b.value[i];
total += d*d;
}
return total;
} | [
"public",
"static",
"double",
"euclideanSq",
"(",
"TupleDesc_F64",
"a",
",",
"TupleDesc_F64",
"b",
")",
"{",
"final",
"int",
"N",
"=",
"a",
".",
"value",
".",
"length",
";",
"double",
"total",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"... | Returns the Euclidean distance squared between the two descriptors.
@param a First descriptor
@param b Second descriptor
@return Euclidean distance squared | [
"Returns",
"the",
"Euclidean",
"distance",
"squared",
"between",
"the",
"two",
"descriptors",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/descriptor/DescriptorDistance.java#L55-L64 |
50,239 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunckPyramid.java | HornSchunckPyramid.iterationSorSafe | private float iterationSorSafe(GrayF32 image1, int x, int y, int pixelIndex) {
float w = SOR_RELAXATION;
float uf;
float vf;
float ui = initFlowX.data[pixelIndex];
float vi = initFlowY.data[pixelIndex];
float u = flowX.data[pixelIndex];
float v = flowY.data[pixelIndex];
float I1 = image1.data[pixelIn... | java | private float iterationSorSafe(GrayF32 image1, int x, int y, int pixelIndex) {
float w = SOR_RELAXATION;
float uf;
float vf;
float ui = initFlowX.data[pixelIndex];
float vi = initFlowY.data[pixelIndex];
float u = flowX.data[pixelIndex];
float v = flowY.data[pixelIndex];
float I1 = image1.data[pixelIn... | [
"private",
"float",
"iterationSorSafe",
"(",
"GrayF32",
"image1",
",",
"int",
"x",
",",
"int",
"y",
",",
"int",
"pixelIndex",
")",
"{",
"float",
"w",
"=",
"SOR_RELAXATION",
";",
"float",
"uf",
";",
"float",
"vf",
";",
"float",
"ui",
"=",
"initFlowX",
"... | SOR iteration for border pixels | [
"SOR",
"iteration",
"for",
"border",
"pixels"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunckPyramid.java#L295-L319 |
50,240 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunckPyramid.java | HornSchunckPyramid.A_safe | protected static float A_safe( int x , int y , GrayF32 flow ) {
float u0 = safe(x-1,y ,flow);
float u1 = safe(x+1,y ,flow);
float u2 = safe(x ,y-1,flow);
float u3 = safe(x ,y+1,flow);
float u4 = safe(x-1,y-1,flow);
float u5 = safe(x+1,y-1,flow);
float u6 = safe(x-1,y+1,flow);
float u7 = safe(x+1,y+... | java | protected static float A_safe( int x , int y , GrayF32 flow ) {
float u0 = safe(x-1,y ,flow);
float u1 = safe(x+1,y ,flow);
float u2 = safe(x ,y-1,flow);
float u3 = safe(x ,y+1,flow);
float u4 = safe(x-1,y-1,flow);
float u5 = safe(x+1,y-1,flow);
float u6 = safe(x-1,y+1,flow);
float u7 = safe(x+1,y+... | [
"protected",
"static",
"float",
"A_safe",
"(",
"int",
"x",
",",
"int",
"y",
",",
"GrayF32",
"flow",
")",
"{",
"float",
"u0",
"=",
"safe",
"(",
"x",
"-",
"1",
",",
"y",
",",
"flow",
")",
";",
"float",
"u1",
"=",
"safe",
"(",
"x",
"+",
"1",
","... | See equation 25. Safe version | [
"See",
"equation",
"25",
".",
"Safe",
"version"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunckPyramid.java#L324-L336 |
50,241 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunckPyramid.java | HornSchunckPyramid.A | protected static float A( int x , int y , GrayF32 flow ) {
int index = flow.getIndex(x,y);
float u0 = flow.data[index-1];
float u1 = flow.data[index+1];
float u2 = flow.data[index-flow.stride];
float u3 = flow.data[index+flow.stride];
float u4 = flow.data[index-1-flow.stride];
float u5 = flow.data[index... | java | protected static float A( int x , int y , GrayF32 flow ) {
int index = flow.getIndex(x,y);
float u0 = flow.data[index-1];
float u1 = flow.data[index+1];
float u2 = flow.data[index-flow.stride];
float u3 = flow.data[index+flow.stride];
float u4 = flow.data[index-1-flow.stride];
float u5 = flow.data[index... | [
"protected",
"static",
"float",
"A",
"(",
"int",
"x",
",",
"int",
"y",
",",
"GrayF32",
"flow",
")",
"{",
"int",
"index",
"=",
"flow",
".",
"getIndex",
"(",
"x",
",",
"y",
")",
";",
"float",
"u0",
"=",
"flow",
".",
"data",
"[",
"index",
"-",
"1"... | See equation 25. Fast unsafe version | [
"See",
"equation",
"25",
".",
"Fast",
"unsafe",
"version"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunckPyramid.java#L341-L355 |
50,242 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunckPyramid.java | HornSchunckPyramid.safe | protected static float safe( int x , int y , GrayF32 image ) {
if( x < 0 ) x = 0;
else if( x >= image.width ) x = image.width-1;
if( y < 0 ) y = 0;
else if( y >= image.height ) y = image.height-1;
return image.unsafe_get(x,y);
} | java | protected static float safe( int x , int y , GrayF32 image ) {
if( x < 0 ) x = 0;
else if( x >= image.width ) x = image.width-1;
if( y < 0 ) y = 0;
else if( y >= image.height ) y = image.height-1;
return image.unsafe_get(x,y);
} | [
"protected",
"static",
"float",
"safe",
"(",
"int",
"x",
",",
"int",
"y",
",",
"GrayF32",
"image",
")",
"{",
"if",
"(",
"x",
"<",
"0",
")",
"x",
"=",
"0",
";",
"else",
"if",
"(",
"x",
">=",
"image",
".",
"width",
")",
"x",
"=",
"image",
".",
... | Ensures pixel values are inside the image. If output it is assigned to the nearest pixel inside the image | [
"Ensures",
"pixel",
"values",
"are",
"inside",
"the",
"image",
".",
"If",
"output",
"it",
"is",
"assigned",
"to",
"the",
"nearest",
"pixel",
"inside",
"the",
"image"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunckPyramid.java#L360-L367 |
50,243 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/peak/MeanShiftPeak.java | MeanShiftPeak.search | public void search( float cx , float cy ) {
peakX = cx; peakY = cy;
setRegion(cx, cy);
for( int i = 0; i < maxIterations; i++ ) {
float total = 0;
float sumX = 0, sumY = 0;
int kernelIndex = 0;
// see if it can use fast interpolation otherwise use the safer technique
if( interpolate.isInFastBou... | java | public void search( float cx , float cy ) {
peakX = cx; peakY = cy;
setRegion(cx, cy);
for( int i = 0; i < maxIterations; i++ ) {
float total = 0;
float sumX = 0, sumY = 0;
int kernelIndex = 0;
// see if it can use fast interpolation otherwise use the safer technique
if( interpolate.isInFastBou... | [
"public",
"void",
"search",
"(",
"float",
"cx",
",",
"float",
"cy",
")",
"{",
"peakX",
"=",
"cx",
";",
"peakY",
"=",
"cy",
";",
"setRegion",
"(",
"cx",
",",
"cy",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"maxIterations",
";",
... | Performs a mean-shift search center at the specified coordinates | [
"Performs",
"a",
"mean",
"-",
"shift",
"search",
"center",
"at",
"the",
"specified",
"coordinates"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/peak/MeanShiftPeak.java#L97-L146 |
50,244 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/peak/MeanShiftPeak.java | MeanShiftPeak.setRegion | protected void setRegion(float cx, float cy) {
x0 = cx - radius;
y0 = cy - radius;
if( x0 < 0 ) { x0 = 0;}
else if( x0+width > image.width ) { x0 = image.width-width; }
if( y0 < 0 ) { y0 = 0;}
else if( y0+width > image.height ) { y0 = image.height-width; }
} | java | protected void setRegion(float cx, float cy) {
x0 = cx - radius;
y0 = cy - radius;
if( x0 < 0 ) { x0 = 0;}
else if( x0+width > image.width ) { x0 = image.width-width; }
if( y0 < 0 ) { y0 = 0;}
else if( y0+width > image.height ) { y0 = image.height-width; }
} | [
"protected",
"void",
"setRegion",
"(",
"float",
"cx",
",",
"float",
"cy",
")",
"{",
"x0",
"=",
"cx",
"-",
"radius",
";",
"y0",
"=",
"cy",
"-",
"radius",
";",
"if",
"(",
"x0",
"<",
"0",
")",
"{",
"x0",
"=",
"0",
";",
"}",
"else",
"if",
"(",
... | Updates the location of the rectangular bounding box
@param cx Image center x-axis
@param cy Image center y-axis | [
"Updates",
"the",
"location",
"of",
"the",
"rectangular",
"bounding",
"box"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/peak/MeanShiftPeak.java#L153-L162 |
50,245 | lessthanoptimal/BoofCV | demonstrations/src/main/java/boofcv/demonstrations/transform/pyramid/EdgeIntensitiesApp.java | EdgeIntensitiesApp.gaussianDerivToDirectDeriv | public void gaussianDerivToDirectDeriv() {
T blur = GeneralizedImageOps.createSingleBand(imageType, width, height);
T blurDeriv = GeneralizedImageOps.createSingleBand(imageType, width, height);
T gaussDeriv = GeneralizedImageOps.createSingleBand(imageType, width, height);
BlurStorageFilter<T> funcBlur = Factor... | java | public void gaussianDerivToDirectDeriv() {
T blur = GeneralizedImageOps.createSingleBand(imageType, width, height);
T blurDeriv = GeneralizedImageOps.createSingleBand(imageType, width, height);
T gaussDeriv = GeneralizedImageOps.createSingleBand(imageType, width, height);
BlurStorageFilter<T> funcBlur = Factor... | [
"public",
"void",
"gaussianDerivToDirectDeriv",
"(",
")",
"{",
"T",
"blur",
"=",
"GeneralizedImageOps",
".",
"createSingleBand",
"(",
"imageType",
",",
"width",
",",
"height",
")",
";",
"T",
"blurDeriv",
"=",
"GeneralizedImageOps",
".",
"createSingleBand",
"(",
... | Compare computing the image | [
"Compare",
"computing",
"the",
"image"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/demonstrations/transform/pyramid/EdgeIntensitiesApp.java#L102-L118 |
50,246 | lessthanoptimal/BoofCV | applications/src/main/java/boofcv/app/PaperSize.java | PaperSize.lookup | public static PaperSize lookup( String word ) {
for( PaperSize paper : values ) {
if( paper.name.compareToIgnoreCase(word) == 0 ) {
return paper;
}
}
return null;
} | java | public static PaperSize lookup( String word ) {
for( PaperSize paper : values ) {
if( paper.name.compareToIgnoreCase(word) == 0 ) {
return paper;
}
}
return null;
} | [
"public",
"static",
"PaperSize",
"lookup",
"(",
"String",
"word",
")",
"{",
"for",
"(",
"PaperSize",
"paper",
":",
"values",
")",
"{",
"if",
"(",
"paper",
".",
"name",
".",
"compareToIgnoreCase",
"(",
"word",
")",
"==",
"0",
")",
"{",
"return",
"paper"... | Sees if the specified work matches any of the units full name or short name. | [
"Sees",
"if",
"the",
"specified",
"work",
"matches",
"any",
"of",
"the",
"units",
"full",
"name",
"or",
"short",
"name",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/applications/src/main/java/boofcv/app/PaperSize.java#L74-L82 |
50,247 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/filter/convolve/GConvolveImageOps.java | GConvolveImageOps.horizontal | public static <In extends ImageBase<In>, Out extends ImageBase<Out>, K extends Kernel1D, B extends ImageBorder<In>>
void horizontal(K kernel, In input, Out output , B border ) {
switch( input.getImageType().getFamily() ) {
case GRAY: {
if( input instanceof GrayF32) {
ConvolveImage.horizontal((Kernel1D_F3... | java | public static <In extends ImageBase<In>, Out extends ImageBase<Out>, K extends Kernel1D, B extends ImageBorder<In>>
void horizontal(K kernel, In input, Out output , B border ) {
switch( input.getImageType().getFamily() ) {
case GRAY: {
if( input instanceof GrayF32) {
ConvolveImage.horizontal((Kernel1D_F3... | [
"public",
"static",
"<",
"In",
"extends",
"ImageBase",
"<",
"In",
">",
",",
"Out",
"extends",
"ImageBase",
"<",
"Out",
">",
",",
"K",
"extends",
"Kernel1D",
",",
"B",
"extends",
"ImageBorder",
"<",
"In",
">",
">",
"void",
"horizontal",
"(",
"K",
"kerne... | Performs a horizontal 1D convolution across the image. Borders are handled as specified by the 'border'
parameter.
@param input The original image. Not modified.
@param output Where the resulting image is written to. Modified.
@param kernel The kernel that is being convolved. Not modified.
@param border How the image... | [
"Performs",
"a",
"horizontal",
"1D",
"convolution",
"across",
"the",
"image",
".",
"Borders",
"are",
"handled",
"as",
"specified",
"by",
"the",
"border",
"parameter",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/convolve/GConvolveImageOps.java#L39-L81 |
50,248 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/filter/convolve/GConvolveImageOps.java | GConvolveImageOps.horizontal | public static <In extends ImageBase<In>, Out extends ImageBase<Out>, K extends Kernel1D>
void horizontal(K kernel, In input, Out output ) {
switch (input.getImageType().getFamily()) {
case GRAY: {
if (input instanceof GrayF32) {
ConvolveImageNoBorder.horizontal((Kernel1D_F32) kernel, (GrayF32) input, (Gr... | java | public static <In extends ImageBase<In>, Out extends ImageBase<Out>, K extends Kernel1D>
void horizontal(K kernel, In input, Out output ) {
switch (input.getImageType().getFamily()) {
case GRAY: {
if (input instanceof GrayF32) {
ConvolveImageNoBorder.horizontal((Kernel1D_F32) kernel, (GrayF32) input, (Gr... | [
"public",
"static",
"<",
"In",
"extends",
"ImageBase",
"<",
"In",
">",
",",
"Out",
"extends",
"ImageBase",
"<",
"Out",
">",
",",
"K",
"extends",
"Kernel1D",
">",
"void",
"horizontal",
"(",
"K",
"kernel",
",",
"In",
"input",
",",
"Out",
"output",
")",
... | Performs a horizontal 1D convolution across the image. The horizontal border is not processed.
@param input The original image. Not modified.
@param output Where the resulting image is written to. Modified.
@param kernel The kernel that is being convolved. Not modified. | [
"Performs",
"a",
"horizontal",
"1D",
"convolution",
"across",
"the",
"image",
".",
"The",
"horizontal",
"border",
"is",
"not",
"processed",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/convolve/GConvolveImageOps.java#L196-L240 |
50,249 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/filter/convolve/GConvolveImageOps.java | GConvolveImageOps.horizontalNormalized | public static <In extends ImageBase, Out extends ImageBase, K extends Kernel1D>
void horizontalNormalized(K kernel, In input, Out output ) {
switch (input.getImageType().getFamily()) {
case GRAY: {
if (input instanceof GrayF32) {
ConvolveImageNormalized.horizontal((Kernel1D_F32) kernel, (GrayF32) input, ... | java | public static <In extends ImageBase, Out extends ImageBase, K extends Kernel1D>
void horizontalNormalized(K kernel, In input, Out output ) {
switch (input.getImageType().getFamily()) {
case GRAY: {
if (input instanceof GrayF32) {
ConvolveImageNormalized.horizontal((Kernel1D_F32) kernel, (GrayF32) input, ... | [
"public",
"static",
"<",
"In",
"extends",
"ImageBase",
",",
"Out",
"extends",
"ImageBase",
",",
"K",
"extends",
"Kernel1D",
">",
"void",
"horizontalNormalized",
"(",
"K",
"kernel",
",",
"In",
"input",
",",
"Out",
"output",
")",
"{",
"switch",
"(",
"input",... | Performs a horizontal 1D convolution across the image while re-normalizing the kernel depending on its
overlap with the image.
@param input The original image. Not modified.
@param output Where the resulting image is written to. Modified.
@param kernel The kernel that is being convolved. Not modified. | [
"Performs",
"a",
"horizontal",
"1D",
"convolution",
"across",
"the",
"image",
"while",
"re",
"-",
"normalizing",
"the",
"kernel",
"depending",
"on",
"its",
"overlap",
"with",
"the",
"image",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/convolve/GConvolveImageOps.java#L355-L401 |
50,250 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/filter/convolve/GConvolveImageOps.java | GConvolveImageOps.convolveNormalized | public static <T extends ImageBase<T>, K extends Kernel2D>
void convolveNormalized(K kernel, T input, T output ) {
switch (input.getImageType().getFamily()) {
case GRAY: {
if (input instanceof GrayF32) {
ConvolveImageNormalized.convolve((Kernel2D_F32) kernel, (GrayF32) input, (GrayF32) output);
} els... | java | public static <T extends ImageBase<T>, K extends Kernel2D>
void convolveNormalized(K kernel, T input, T output ) {
switch (input.getImageType().getFamily()) {
case GRAY: {
if (input instanceof GrayF32) {
ConvolveImageNormalized.convolve((Kernel2D_F32) kernel, (GrayF32) input, (GrayF32) output);
} els... | [
"public",
"static",
"<",
"T",
"extends",
"ImageBase",
"<",
"T",
">",
",",
"K",
"extends",
"Kernel2D",
">",
"void",
"convolveNormalized",
"(",
"K",
"kernel",
",",
"T",
"input",
",",
"T",
"output",
")",
"{",
"switch",
"(",
"input",
".",
"getImageType",
"... | Performs a 2D convolution across the image while re-normalizing the kernel depending on its
overlap with the image.
@param input The original image. Not modified.
@param output Where the resulting image is written to. Modified.
@param kernel The kernel that is being convolved. Not modified. | [
"Performs",
"a",
"2D",
"convolution",
"across",
"the",
"image",
"while",
"re",
"-",
"normalizing",
"the",
"kernel",
"depending",
"on",
"its",
"overlap",
"with",
"the",
"image",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/convolve/GConvolveImageOps.java#L465-L508 |
50,251 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/edge/HysteresisEdgeTracePoints.java | HysteresisEdgeTracePoints.addFirstSegment | private void addFirstSegment(int x, int y) {
Point2D_I32 p = queuePoints.grow();
p.set(x,y);
EdgeSegment s = new EdgeSegment();
s.points.add(p);
s.index = 0;
s.parent = s.parentPixel = -1;
e.segments.add(s);
open.add(s);
} | java | private void addFirstSegment(int x, int y) {
Point2D_I32 p = queuePoints.grow();
p.set(x,y);
EdgeSegment s = new EdgeSegment();
s.points.add(p);
s.index = 0;
s.parent = s.parentPixel = -1;
e.segments.add(s);
open.add(s);
} | [
"private",
"void",
"addFirstSegment",
"(",
"int",
"x",
",",
"int",
"y",
")",
"{",
"Point2D_I32",
"p",
"=",
"queuePoints",
".",
"grow",
"(",
")",
";",
"p",
".",
"set",
"(",
"x",
",",
"y",
")",
";",
"EdgeSegment",
"s",
"=",
"new",
"EdgeSegment",
"(",... | Starts a new segment at the first point in the contour | [
"Starts",
"a",
"new",
"segment",
"at",
"the",
"first",
"point",
"in",
"the",
"contour"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/edge/HysteresisEdgeTracePoints.java#L247-L256 |
50,252 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/misc/GPixelMath.java | GPixelMath.abs | public static <T extends ImageBase<T>> void abs( T input , T output )
{
if( input instanceof ImageGray) {
if (GrayS8.class == input.getClass()) {
PixelMath.abs((GrayS8) input, (GrayS8) output);
} else if (GrayS16.class == input.getClass()) {
PixelMath.abs((GrayS16) input, (GrayS16) output);
} else i... | java | public static <T extends ImageBase<T>> void abs( T input , T output )
{
if( input instanceof ImageGray) {
if (GrayS8.class == input.getClass()) {
PixelMath.abs((GrayS8) input, (GrayS8) output);
} else if (GrayS16.class == input.getClass()) {
PixelMath.abs((GrayS16) input, (GrayS16) output);
} else i... | [
"public",
"static",
"<",
"T",
"extends",
"ImageBase",
"<",
"T",
">",
">",
"void",
"abs",
"(",
"T",
"input",
",",
"T",
"output",
")",
"{",
"if",
"(",
"input",
"instanceof",
"ImageGray",
")",
"{",
"if",
"(",
"GrayS8",
".",
"class",
"==",
"input",
"."... | Sets each pixel in the output image to be the absolute value of the input image.
Both the input and output image can be the same instance.
@param input The input image. Not modified.
@param output Where the absolute value image is written to. Modified. | [
"Sets",
"each",
"pixel",
"in",
"the",
"output",
"image",
"to",
"be",
"the",
"absolute",
"value",
"of",
"the",
"input",
"image",
".",
"Both",
"the",
"input",
"and",
"output",
"image",
"can",
"be",
"the",
"same",
"instance",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/misc/GPixelMath.java#L37-L76 |
50,253 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/misc/GPixelMath.java | GPixelMath.boundImage | public static <T extends ImageBase<T>> void boundImage(T input , double min , double max ) {
if( input instanceof ImageGray ) {
if (GrayU8.class == input.getClass()) {
PixelMath.boundImage((GrayU8) input, (int) min, (int) max);
} else if (GrayS8.class == input.getClass()) {
PixelMath.boundImage((GrayS8)... | java | public static <T extends ImageBase<T>> void boundImage(T input , double min , double max ) {
if( input instanceof ImageGray ) {
if (GrayU8.class == input.getClass()) {
PixelMath.boundImage((GrayU8) input, (int) min, (int) max);
} else if (GrayS8.class == input.getClass()) {
PixelMath.boundImage((GrayS8)... | [
"public",
"static",
"<",
"T",
"extends",
"ImageBase",
"<",
"T",
">",
">",
"void",
"boundImage",
"(",
"T",
"input",
",",
"double",
"min",
",",
"double",
"max",
")",
"{",
"if",
"(",
"input",
"instanceof",
"ImageGray",
")",
"{",
"if",
"(",
"GrayU8",
"."... | Bounds image pixels to be between these two values.
@param input Input image.
@param min minimum value. Inclusive.
@param max maximum value. Inclusive. | [
"Bounds",
"image",
"pixels",
"to",
"be",
"between",
"these",
"two",
"values",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/misc/GPixelMath.java#L1039-L1067 |
50,254 | lessthanoptimal/BoofCV | demonstrations/src/main/java/boofcv/demonstrations/feature/describe/VisualizeRegionDescriptionApp.java | VisualizeRegionDescriptionApp.updateTargetDescription | private void updateTargetDescription() {
if( targetPt != null ) {
TupleDesc feature = describe.createDescription();
describe.process(targetPt.x,targetPt.y,targetOrientation,targetRadius,feature);
tuplePanel.setDescription(feature);
} else {
tuplePanel.setDescription(null);
}
tuplePanel.repaint();
} | java | private void updateTargetDescription() {
if( targetPt != null ) {
TupleDesc feature = describe.createDescription();
describe.process(targetPt.x,targetPt.y,targetOrientation,targetRadius,feature);
tuplePanel.setDescription(feature);
} else {
tuplePanel.setDescription(null);
}
tuplePanel.repaint();
} | [
"private",
"void",
"updateTargetDescription",
"(",
")",
"{",
"if",
"(",
"targetPt",
"!=",
"null",
")",
"{",
"TupleDesc",
"feature",
"=",
"describe",
".",
"createDescription",
"(",
")",
";",
"describe",
".",
"process",
"(",
"targetPt",
".",
"x",
",",
"targe... | Extracts the target description and updates the panel. Should only be called from a swing thread | [
"Extracts",
"the",
"target",
"description",
"and",
"updates",
"the",
"panel",
".",
"Should",
"only",
"be",
"called",
"from",
"a",
"swing",
"thread"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/demonstrations/feature/describe/VisualizeRegionDescriptionApp.java#L163-L172 |
50,255 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java | MultiViewOps.inducedHomography13 | public static DMatrixRMaj inducedHomography13( TrifocalTensor tensor ,
Vector3D_F64 line2 ,
DMatrixRMaj output ) {
if( output == null )
output = new DMatrixRMaj(3,3);
DMatrixRMaj T = tensor.T1;
// H(:,0) = transpose(T1)*line
output.data[0] = T.data[0]*line2.x + T.data[3]*line2... | java | public static DMatrixRMaj inducedHomography13( TrifocalTensor tensor ,
Vector3D_F64 line2 ,
DMatrixRMaj output ) {
if( output == null )
output = new DMatrixRMaj(3,3);
DMatrixRMaj T = tensor.T1;
// H(:,0) = transpose(T1)*line
output.data[0] = T.data[0]*line2.x + T.data[3]*line2... | [
"public",
"static",
"DMatrixRMaj",
"inducedHomography13",
"(",
"TrifocalTensor",
"tensor",
",",
"Vector3D_F64",
"line2",
",",
"DMatrixRMaj",
"output",
")",
"{",
"if",
"(",
"output",
"==",
"null",
")",
"output",
"=",
"new",
"DMatrixRMaj",
"(",
"3",
",",
"3",
... | Computes the homography induced from view 1 to 3 by a line in view 2. The provided line in
view 2 must contain the view 2 observation.
p3 = H13*p1
@param tensor Input: Trifocal tensor
@param line2 Input: Line in view 2. {@link LineGeneral2D_F64 General notation}.
@param output Output: Optional storage for homograph... | [
"Computes",
"the",
"homography",
"induced",
"from",
"view",
"1",
"to",
"3",
"by",
"a",
"line",
"in",
"view",
"2",
".",
"The",
"provided",
"line",
"in",
"view",
"2",
"must",
"contain",
"the",
"view",
"2",
"observation",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L438-L473 |
50,256 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java | MultiViewOps.inducedHomography12 | public static DMatrixRMaj inducedHomography12( TrifocalTensor tensor ,
Vector3D_F64 line3 ,
DMatrixRMaj output ) {
if( output == null )
output = new DMatrixRMaj(3,3);
// H(:,0) = T1*line
DMatrixRMaj T = tensor.T1;
output.data[0] = T.data[0]*line3.x + T.data[1]*line3.y + T.data[... | java | public static DMatrixRMaj inducedHomography12( TrifocalTensor tensor ,
Vector3D_F64 line3 ,
DMatrixRMaj output ) {
if( output == null )
output = new DMatrixRMaj(3,3);
// H(:,0) = T1*line
DMatrixRMaj T = tensor.T1;
output.data[0] = T.data[0]*line3.x + T.data[1]*line3.y + T.data[... | [
"public",
"static",
"DMatrixRMaj",
"inducedHomography12",
"(",
"TrifocalTensor",
"tensor",
",",
"Vector3D_F64",
"line3",
",",
"DMatrixRMaj",
"output",
")",
"{",
"if",
"(",
"output",
"==",
"null",
")",
"output",
"=",
"new",
"DMatrixRMaj",
"(",
"3",
",",
"3",
... | Computes the homography induced from view 1 to 2 by a line in view 3. The provided line in
view 3 must contain the view 3 observation.
p2 = H12*p1
@param tensor Input: Trifocal tensor
@param line3 Input: Line in view 3. {@link LineGeneral2D_F64 General notation}.
@param output Output: Optional storage for homograph... | [
"Computes",
"the",
"homography",
"induced",
"from",
"view",
"1",
"to",
"2",
"by",
"a",
"line",
"in",
"view",
"3",
".",
"The",
"provided",
"line",
"in",
"view",
"3",
"must",
"contain",
"the",
"view",
"3",
"observation",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L486-L520 |
50,257 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java | MultiViewOps.homographyStereo3Pts | public static DMatrixRMaj homographyStereo3Pts( DMatrixRMaj F , AssociatedPair p1, AssociatedPair p2, AssociatedPair p3) {
HomographyInducedStereo3Pts alg = new HomographyInducedStereo3Pts();
alg.setFundamental(F,null);
if( !alg.process(p1,p2,p3) )
return null;
return alg.getHomography();
} | java | public static DMatrixRMaj homographyStereo3Pts( DMatrixRMaj F , AssociatedPair p1, AssociatedPair p2, AssociatedPair p3) {
HomographyInducedStereo3Pts alg = new HomographyInducedStereo3Pts();
alg.setFundamental(F,null);
if( !alg.process(p1,p2,p3) )
return null;
return alg.getHomography();
} | [
"public",
"static",
"DMatrixRMaj",
"homographyStereo3Pts",
"(",
"DMatrixRMaj",
"F",
",",
"AssociatedPair",
"p1",
",",
"AssociatedPair",
"p2",
",",
"AssociatedPair",
"p3",
")",
"{",
"HomographyInducedStereo3Pts",
"alg",
"=",
"new",
"HomographyInducedStereo3Pts",
"(",
"... | Computes the homography induced from a planar surface when viewed from two views using correspondences
of three points. Observations must be on the planar surface.
@see boofcv.alg.geo.h.HomographyInducedStereo3Pts
@param F Fundamental matrix
@param p1 Associated point observation
@param p2 Associated point observatio... | [
"Computes",
"the",
"homography",
"induced",
"from",
"a",
"planar",
"surface",
"when",
"viewed",
"from",
"two",
"views",
"using",
"correspondences",
"of",
"three",
"points",
".",
"Observations",
"must",
"be",
"on",
"the",
"planar",
"surface",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L534-L541 |
50,258 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java | MultiViewOps.homographyStereoLinePt | public static DMatrixRMaj homographyStereoLinePt( DMatrixRMaj F , PairLineNorm line, AssociatedPair point) {
HomographyInducedStereoLinePt alg = new HomographyInducedStereoLinePt();
alg.setFundamental(F,null);
alg.process(line,point);
return alg.getHomography();
} | java | public static DMatrixRMaj homographyStereoLinePt( DMatrixRMaj F , PairLineNorm line, AssociatedPair point) {
HomographyInducedStereoLinePt alg = new HomographyInducedStereoLinePt();
alg.setFundamental(F,null);
alg.process(line,point);
return alg.getHomography();
} | [
"public",
"static",
"DMatrixRMaj",
"homographyStereoLinePt",
"(",
"DMatrixRMaj",
"F",
",",
"PairLineNorm",
"line",
",",
"AssociatedPair",
"point",
")",
"{",
"HomographyInducedStereoLinePt",
"alg",
"=",
"new",
"HomographyInducedStereoLinePt",
"(",
")",
";",
"alg",
".",... | Computes the homography induced from a planar surface when viewed from two views using correspondences
of a line and a point. Observations must be on the planar surface.
@see HomographyInducedStereoLinePt
@param F Fundamental matrix
@param line Line on the plane
@param point Point on the plane
@return The homography ... | [
"Computes",
"the",
"homography",
"induced",
"from",
"a",
"planar",
"surface",
"when",
"viewed",
"from",
"two",
"views",
"using",
"correspondences",
"of",
"a",
"line",
"and",
"a",
"point",
".",
"Observations",
"must",
"be",
"on",
"the",
"planar",
"surface",
"... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L554-L560 |
50,259 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java | MultiViewOps.homographyStereo2Lines | public static DMatrixRMaj homographyStereo2Lines( DMatrixRMaj F , PairLineNorm line0, PairLineNorm line1) {
HomographyInducedStereo2Line alg = new HomographyInducedStereo2Line();
alg.setFundamental(F,null);
if( !alg.process(line0,line1) )
return null;
return alg.getHomography();
} | java | public static DMatrixRMaj homographyStereo2Lines( DMatrixRMaj F , PairLineNorm line0, PairLineNorm line1) {
HomographyInducedStereo2Line alg = new HomographyInducedStereo2Line();
alg.setFundamental(F,null);
if( !alg.process(line0,line1) )
return null;
return alg.getHomography();
} | [
"public",
"static",
"DMatrixRMaj",
"homographyStereo2Lines",
"(",
"DMatrixRMaj",
"F",
",",
"PairLineNorm",
"line0",
",",
"PairLineNorm",
"line1",
")",
"{",
"HomographyInducedStereo2Line",
"alg",
"=",
"new",
"HomographyInducedStereo2Line",
"(",
")",
";",
"alg",
".",
... | Computes the homography induced from a planar surface when viewed from two views using correspondences
of two lines. Observations must be on the planar surface.
@see HomographyInducedStereo2Line
@param F Fundamental matrix
@param line0 Line on the plane
@param line1 Line on the plane
@return The homography from view ... | [
"Computes",
"the",
"homography",
"induced",
"from",
"a",
"planar",
"surface",
"when",
"viewed",
"from",
"two",
"views",
"using",
"correspondences",
"of",
"two",
"lines",
".",
"Observations",
"must",
"be",
"on",
"the",
"planar",
"surface",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L573-L580 |
50,260 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java | MultiViewOps.createFundamental | public static DMatrixRMaj createFundamental(DMatrixRMaj E, CameraPinhole intrinsic ) {
DMatrixRMaj K = PerspectiveOps.pinholeToMatrix(intrinsic,(DMatrixRMaj)null);
return createFundamental(E,K);
} | java | public static DMatrixRMaj createFundamental(DMatrixRMaj E, CameraPinhole intrinsic ) {
DMatrixRMaj K = PerspectiveOps.pinholeToMatrix(intrinsic,(DMatrixRMaj)null);
return createFundamental(E,K);
} | [
"public",
"static",
"DMatrixRMaj",
"createFundamental",
"(",
"DMatrixRMaj",
"E",
",",
"CameraPinhole",
"intrinsic",
")",
"{",
"DMatrixRMaj",
"K",
"=",
"PerspectiveOps",
".",
"pinholeToMatrix",
"(",
"intrinsic",
",",
"(",
"DMatrixRMaj",
")",
"null",
")",
";",
"re... | Computes a Fundamental matrix given an Essential matrix and the camera's intrinsic
parameters.
@see #createFundamental(DMatrixRMaj, DMatrixRMaj)
@param E Essential matrix
@param intrinsic Intrinsic camera calibration
@return Fundamental matrix | [
"Computes",
"a",
"Fundamental",
"matrix",
"given",
"an",
"Essential",
"matrix",
"and",
"the",
"camera",
"s",
"intrinsic",
"parameters",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L707-L710 |
50,261 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java | MultiViewOps.projectiveToMetric | public static void projectiveToMetric( DMatrixRMaj cameraMatrix , DMatrixRMaj H ,
Se3_F64 worldToView , DMatrixRMaj K )
{
DMatrixRMaj tmp = new DMatrixRMaj(3,4);
CommonOps_DDRM.mult(cameraMatrix,H,tmp);
MultiViewOps.decomposeMetricCamera(tmp,K,worldToView);
} | java | public static void projectiveToMetric( DMatrixRMaj cameraMatrix , DMatrixRMaj H ,
Se3_F64 worldToView , DMatrixRMaj K )
{
DMatrixRMaj tmp = new DMatrixRMaj(3,4);
CommonOps_DDRM.mult(cameraMatrix,H,tmp);
MultiViewOps.decomposeMetricCamera(tmp,K,worldToView);
} | [
"public",
"static",
"void",
"projectiveToMetric",
"(",
"DMatrixRMaj",
"cameraMatrix",
",",
"DMatrixRMaj",
"H",
",",
"Se3_F64",
"worldToView",
",",
"DMatrixRMaj",
"K",
")",
"{",
"DMatrixRMaj",
"tmp",
"=",
"new",
"DMatrixRMaj",
"(",
"3",
",",
"4",
")",
";",
"C... | Elevates a projective camera matrix into a metric one using the rectifying homography.
Extracts calibration and Se3 pose.
<pre>
P'=P*H
K,R,t = decompose(P')
</pre>
where P is the camera matrix, H is the homography, (K,R,t) are the intrinsic calibration matrix, rotation,
and translation
@see MultiViewOps#absoluteQuadr... | [
"Elevates",
"a",
"projective",
"camera",
"matrix",
"into",
"a",
"metric",
"one",
"using",
"the",
"rectifying",
"homography",
".",
"Extracts",
"calibration",
"and",
"Se3",
"pose",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L1358-L1365 |
50,262 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java | MultiViewOps.projectiveToMetricKnownK | public static void projectiveToMetricKnownK( DMatrixRMaj cameraMatrix ,
DMatrixRMaj H , DMatrixRMaj K,
Se3_F64 worldToView )
{
DMatrixRMaj tmp = new DMatrixRMaj(3,4);
CommonOps_DDRM.mult(cameraMatrix,H,tmp);
DMatrixRMaj K_inv = new DMatrixRMaj(3,3);
CommonOps_DDRM.invert(K,K_inv);
... | java | public static void projectiveToMetricKnownK( DMatrixRMaj cameraMatrix ,
DMatrixRMaj H , DMatrixRMaj K,
Se3_F64 worldToView )
{
DMatrixRMaj tmp = new DMatrixRMaj(3,4);
CommonOps_DDRM.mult(cameraMatrix,H,tmp);
DMatrixRMaj K_inv = new DMatrixRMaj(3,3);
CommonOps_DDRM.invert(K,K_inv);
... | [
"public",
"static",
"void",
"projectiveToMetricKnownK",
"(",
"DMatrixRMaj",
"cameraMatrix",
",",
"DMatrixRMaj",
"H",
",",
"DMatrixRMaj",
"K",
",",
"Se3_F64",
"worldToView",
")",
"{",
"DMatrixRMaj",
"tmp",
"=",
"new",
"DMatrixRMaj",
"(",
"3",
",",
"4",
")",
";"... | Convert the projective camera matrix into a metric transform given the rectifying homography and a
known calibration matrix.
{@code P = K*[R|T]*H} where H is the inverse of the rectifying homography.
@param cameraMatrix (Input) camera matrix. 3x4
@param H (Input) Rectifying homography. 4x4
@param K (Input) Known cali... | [
"Convert",
"the",
"projective",
"camera",
"matrix",
"into",
"a",
"metric",
"transform",
"given",
"the",
"rectifying",
"homography",
"and",
"a",
"known",
"calibration",
"matrix",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L1378-L1410 |
50,263 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java | MultiViewOps.rectifyHToAbsoluteQuadratic | public static void rectifyHToAbsoluteQuadratic(DMatrixRMaj H , DMatrixRMaj Q ) {
int indexQ = 0;
for (int rowA = 0; rowA < 4; rowA++) {
for (int colB = 0; colB < 4; colB++) {
int indexA = rowA*4;
int indexB = colB*4;
double sum = 0;
for (int i = 0; i < 3; i++) {
// sum += H.get(rowA,i)*H.get... | java | public static void rectifyHToAbsoluteQuadratic(DMatrixRMaj H , DMatrixRMaj Q ) {
int indexQ = 0;
for (int rowA = 0; rowA < 4; rowA++) {
for (int colB = 0; colB < 4; colB++) {
int indexA = rowA*4;
int indexB = colB*4;
double sum = 0;
for (int i = 0; i < 3; i++) {
// sum += H.get(rowA,i)*H.get... | [
"public",
"static",
"void",
"rectifyHToAbsoluteQuadratic",
"(",
"DMatrixRMaj",
"H",
",",
"DMatrixRMaj",
"Q",
")",
"{",
"int",
"indexQ",
"=",
"0",
";",
"for",
"(",
"int",
"rowA",
"=",
"0",
";",
"rowA",
"<",
"4",
";",
"rowA",
"++",
")",
"{",
"for",
"("... | Rectifying homography to dual absolute quadratic.
<p>Q = H*I*H<sup>T</sup> = H(:,1:3)*H(:,1:3)'</p>
<p>where I = diag(1 1 1 0)</p>
@param H (Input) 4x4 rectifying homography.
@param Q (Output) Absolute quadratic. Typically found in auto calibration. Not modified. | [
"Rectifying",
"homography",
"to",
"dual",
"absolute",
"quadratic",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L1489-L1506 |
50,264 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java | MultiViewOps.intrinsicFromAbsoluteQuadratic | public static void intrinsicFromAbsoluteQuadratic( DMatrixRMaj Q , DMatrixRMaj P , CameraPinhole intrinsic )
{
DMatrixRMaj tmp = new DMatrixRMaj(3,4);
DMatrixRMaj tmp2 = new DMatrixRMaj(3,3);
CommonOps_DDRM.mult(P,Q,tmp);
CommonOps_DDRM.multTransB(tmp,P,tmp2);
decomposeDiac(tmp2,intrinsic);
} | java | public static void intrinsicFromAbsoluteQuadratic( DMatrixRMaj Q , DMatrixRMaj P , CameraPinhole intrinsic )
{
DMatrixRMaj tmp = new DMatrixRMaj(3,4);
DMatrixRMaj tmp2 = new DMatrixRMaj(3,3);
CommonOps_DDRM.mult(P,Q,tmp);
CommonOps_DDRM.multTransB(tmp,P,tmp2);
decomposeDiac(tmp2,intrinsic);
} | [
"public",
"static",
"void",
"intrinsicFromAbsoluteQuadratic",
"(",
"DMatrixRMaj",
"Q",
",",
"DMatrixRMaj",
"P",
",",
"CameraPinhole",
"intrinsic",
")",
"{",
"DMatrixRMaj",
"tmp",
"=",
"new",
"DMatrixRMaj",
"(",
"3",
",",
"4",
")",
";",
"DMatrixRMaj",
"tmp2",
"... | Extracts the intrinsic camera matrix from a view given its camera matrix and the dual absolute quadratic.
<p>w<sub>i</sub> = P<sub>i</sub>*Q*P<sub>i</sub><sup>T</sup>, where w<sub>i</sub> = K<sub>i</sub>*K'<sub>i</sub></p>
@param Q (Input) Dual absolute qudratic
@param P (Input) Camera matrix for a view
@param intrin... | [
"Extracts",
"the",
"intrinsic",
"camera",
"matrix",
"from",
"a",
"view",
"given",
"its",
"camera",
"matrix",
"and",
"the",
"dual",
"absolute",
"quadratic",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L1517-L1525 |
50,265 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java | MultiViewOps.split2 | public static Tuple2<List<Point2D_F64>,List<Point2D_F64>> split2( List<AssociatedPair> input )
{
List<Point2D_F64> list1 = new ArrayList<>();
List<Point2D_F64> list2 = new ArrayList<>();
for (int i = 0; i < input.size(); i++) {
list1.add( input.get(i).p1 );
list2.add( input.get(i).p2 );
}
return new ... | java | public static Tuple2<List<Point2D_F64>,List<Point2D_F64>> split2( List<AssociatedPair> input )
{
List<Point2D_F64> list1 = new ArrayList<>();
List<Point2D_F64> list2 = new ArrayList<>();
for (int i = 0; i < input.size(); i++) {
list1.add( input.get(i).p1 );
list2.add( input.get(i).p2 );
}
return new ... | [
"public",
"static",
"Tuple2",
"<",
"List",
"<",
"Point2D_F64",
">",
",",
"List",
"<",
"Point2D_F64",
">",
">",
"split2",
"(",
"List",
"<",
"AssociatedPair",
">",
"input",
")",
"{",
"List",
"<",
"Point2D_F64",
">",
"list1",
"=",
"new",
"ArrayList",
"<>",
... | Splits the associated pairs into two lists
@param input List of associated features
@return two lists containing each set of features | [
"Splits",
"the",
"associated",
"pairs",
"into",
"two",
"lists"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L1623-L1634 |
50,266 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java | MultiViewOps.split3 | public static Tuple3<List<Point2D_F64>,List<Point2D_F64>,List<Point2D_F64>> split3(List<AssociatedTriple> input )
{
List<Point2D_F64> list1 = new ArrayList<>();
List<Point2D_F64> list2 = new ArrayList<>();
List<Point2D_F64> list3 = new ArrayList<>();
for (int i = 0; i < input.size(); i++) {
list1.add( inpu... | java | public static Tuple3<List<Point2D_F64>,List<Point2D_F64>,List<Point2D_F64>> split3(List<AssociatedTriple> input )
{
List<Point2D_F64> list1 = new ArrayList<>();
List<Point2D_F64> list2 = new ArrayList<>();
List<Point2D_F64> list3 = new ArrayList<>();
for (int i = 0; i < input.size(); i++) {
list1.add( inpu... | [
"public",
"static",
"Tuple3",
"<",
"List",
"<",
"Point2D_F64",
">",
",",
"List",
"<",
"Point2D_F64",
">",
",",
"List",
"<",
"Point2D_F64",
">",
">",
"split3",
"(",
"List",
"<",
"AssociatedTriple",
">",
"input",
")",
"{",
"List",
"<",
"Point2D_F64",
">",
... | Splits the associated triple into three lists
@param input List of associated features
@return three lists containing each set of features | [
"Splits",
"the",
"associated",
"triple",
"into",
"three",
"lists"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L1641-L1654 |
50,267 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/denoise/wavelet/SubbandShrink.java | SubbandShrink.performShrinkage | protected void performShrinkage( I transform , int numLevels ) {
// step through each layer in the pyramid.
for( int i = 0; i < numLevels; i++ ) {
int w = transform.width;
int h = transform.height;
int ww = w/2;
int hh = h/2;
Number threshold;
I subband;
// HL
subband = transform.subimage(... | java | protected void performShrinkage( I transform , int numLevels ) {
// step through each layer in the pyramid.
for( int i = 0; i < numLevels; i++ ) {
int w = transform.width;
int h = transform.height;
int ww = w/2;
int hh = h/2;
Number threshold;
I subband;
// HL
subband = transform.subimage(... | [
"protected",
"void",
"performShrinkage",
"(",
"I",
"transform",
",",
"int",
"numLevels",
")",
"{",
"// step through each layer in the pyramid.",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numLevels",
";",
"i",
"++",
")",
"{",
"int",
"w",
"=",
"trans... | Performs wavelet shrinking using the specified rule and by computing a threshold
for each subband.
@param transform The image being transformed.
@param numLevels Number of levels in the transform. | [
"Performs",
"wavelet",
"shrinking",
"using",
"the",
"specified",
"rule",
"and",
"by",
"computing",
"a",
"threshold",
"for",
"each",
"subband",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/denoise/wavelet/SubbandShrink.java#L56-L91 |
50,268 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/denoise/wavelet/DenoiseVisuShrink_F32.java | DenoiseVisuShrink_F32.denoise | @Override
public void denoise(GrayF32 transform , int numLevels ) {
int scale = UtilWavelet.computeScale(numLevels);
final int h = transform.height;
final int w = transform.width;
// width and height of scaling image
final int innerWidth = w/scale;
final int innerHeight = h/scale;
GrayF32 subbandHH = ... | java | @Override
public void denoise(GrayF32 transform , int numLevels ) {
int scale = UtilWavelet.computeScale(numLevels);
final int h = transform.height;
final int w = transform.width;
// width and height of scaling image
final int innerWidth = w/scale;
final int innerHeight = h/scale;
GrayF32 subbandHH = ... | [
"@",
"Override",
"public",
"void",
"denoise",
"(",
"GrayF32",
"transform",
",",
"int",
"numLevels",
")",
"{",
"int",
"scale",
"=",
"UtilWavelet",
".",
"computeScale",
"(",
"numLevels",
")",
";",
"final",
"int",
"h",
"=",
"transform",
".",
"height",
";",
... | Applies VisuShrink denoising to the provided multilevel wavelet transform using
the provided threshold.
@param transform Mult-level wavelet transform. Modified.
@param numLevels Number of levels in the transform. | [
"Applies",
"VisuShrink",
"denoising",
"to",
"the",
"provided",
"multilevel",
"wavelet",
"transform",
"using",
"the",
"provided",
"threshold",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/denoise/wavelet/DenoiseVisuShrink_F32.java#L51-L69 |
50,269 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/factory/transform/wavelet/FactoryWaveletCoiflet.java | FactoryWaveletCoiflet.generate_F32 | public static WaveletDescription<WlCoef_F32> generate_F32( int I ) {
if( I != 6 ) {
throw new IllegalArgumentException("Only 6 is currently supported");
}
WlCoef_F32 coef = new WlCoef_F32();
coef.offsetScaling = -2;
coef.offsetWavelet = -2;
coef.scaling = new float[6];
coef.wavelet = new float[6];
... | java | public static WaveletDescription<WlCoef_F32> generate_F32( int I ) {
if( I != 6 ) {
throw new IllegalArgumentException("Only 6 is currently supported");
}
WlCoef_F32 coef = new WlCoef_F32();
coef.offsetScaling = -2;
coef.offsetWavelet = -2;
coef.scaling = new float[6];
coef.wavelet = new float[6];
... | [
"public",
"static",
"WaveletDescription",
"<",
"WlCoef_F32",
">",
"generate_F32",
"(",
"int",
"I",
")",
"{",
"if",
"(",
"I",
"!=",
"6",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Only 6 is currently supported\"",
")",
";",
"}",
"WlCoef_F32",
... | Creates a description of a Coiflet of order I wavelet.
@param I order of the wavelet.
@return Wavelet description. | [
"Creates",
"a",
"description",
"of",
"a",
"Coiflet",
"of",
"order",
"I",
"wavelet",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/transform/wavelet/FactoryWaveletCoiflet.java#L58-L90 |
50,270 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/shapes/ShapeFittingOps.java | ShapeFittingOps.fitEllipse_F64 | public static FitData<EllipseRotated_F64> fitEllipse_F64( List<Point2D_F64> points, int iterations ,
boolean computeError ,
FitData<EllipseRotated_F64> outputStorage ) {
if( outputStorage == null ) {
outputStorage = new FitData<>(new EllipseRotated_F64());
}
// Compute the o... | java | public static FitData<EllipseRotated_F64> fitEllipse_F64( List<Point2D_F64> points, int iterations ,
boolean computeError ,
FitData<EllipseRotated_F64> outputStorage ) {
if( outputStorage == null ) {
outputStorage = new FitData<>(new EllipseRotated_F64());
}
// Compute the o... | [
"public",
"static",
"FitData",
"<",
"EllipseRotated_F64",
">",
"fitEllipse_F64",
"(",
"List",
"<",
"Point2D_F64",
">",
"points",
",",
"int",
"iterations",
",",
"boolean",
"computeError",
",",
"FitData",
"<",
"EllipseRotated_F64",
">",
"outputStorage",
")",
"{",
... | Computes the best fit ellipse based on minimizing Euclidean distance. An estimate is initially provided
using algebraic algorithm which is then refined using non-linear optimization. The amount of non-linear
optimization can be controlled using 'iterations' parameter. Will work with partial and complete contours
of ... | [
"Computes",
"the",
"best",
"fit",
"ellipse",
"based",
"on",
"minimizing",
"Euclidean",
"distance",
".",
"An",
"estimate",
"is",
"initially",
"provided",
"using",
"algebraic",
"algorithm",
"which",
"is",
"then",
"refined",
"using",
"non",
"-",
"linear",
"optimiza... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ShapeFittingOps.java#L104-L148 |
50,271 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/shapes/ShapeFittingOps.java | ShapeFittingOps.convert_I32_F64 | public static List<Point2D_F64> convert_I32_F64(List<Point2D_I32> points) {
return convert_I32_F64(points,null).toList();
} | java | public static List<Point2D_F64> convert_I32_F64(List<Point2D_I32> points) {
return convert_I32_F64(points,null).toList();
} | [
"public",
"static",
"List",
"<",
"Point2D_F64",
">",
"convert_I32_F64",
"(",
"List",
"<",
"Point2D_I32",
">",
"points",
")",
"{",
"return",
"convert_I32_F64",
"(",
"points",
",",
"null",
")",
".",
"toList",
"(",
")",
";",
"}"
] | Converts a list of I32 points into F64
@param points Original points
@return Converted points | [
"Converts",
"a",
"list",
"of",
"I32",
"points",
"into",
"F64"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ShapeFittingOps.java#L174-L176 |
50,272 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/shapes/ShapeFittingOps.java | ShapeFittingOps.averageCircle_I32 | public static FitData<Circle2D_F64> averageCircle_I32(List<Point2D_I32> points, GrowQueue_F64 optional,
FitData<Circle2D_F64> outputStorage) {
if( outputStorage == null ) {
outputStorage = new FitData<>(new Circle2D_F64());
}
if( optional == null ) {
optional = new GrowQueue_F64();
}
Ci... | java | public static FitData<Circle2D_F64> averageCircle_I32(List<Point2D_I32> points, GrowQueue_F64 optional,
FitData<Circle2D_F64> outputStorage) {
if( outputStorage == null ) {
outputStorage = new FitData<>(new Circle2D_F64());
}
if( optional == null ) {
optional = new GrowQueue_F64();
}
Ci... | [
"public",
"static",
"FitData",
"<",
"Circle2D_F64",
">",
"averageCircle_I32",
"(",
"List",
"<",
"Point2D_I32",
">",
"points",
",",
"GrowQueue_F64",
"optional",
",",
"FitData",
"<",
"Circle2D_F64",
">",
"outputStorage",
")",
"{",
"if",
"(",
"outputStorage",
"==",... | Computes a circle which has it's center at the mean position of the provided points and radius is equal to the
average distance of each point from the center. While fast to compute the provided circle is not a best
fit circle by any reasonable metric, except for special cases.
@param points (Input) Set of unordered p... | [
"Computes",
"a",
"circle",
"which",
"has",
"it",
"s",
"center",
"at",
"the",
"mean",
"position",
"of",
"the",
"provided",
"points",
"and",
"radius",
"is",
"equal",
"to",
"the",
"average",
"distance",
"of",
"each",
"point",
"from",
"the",
"center",
".",
"... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ShapeFittingOps.java#L218-L265 |
50,273 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java | ProjectiveInitializeAllCommon.fixate | public void fixate() {
ransac = FactoryMultiViewRobust.trifocalRansac(configTriRansac,configError,configRansac);
sba = FactoryMultiView.bundleSparseProjective(configSBA);
} | java | public void fixate() {
ransac = FactoryMultiViewRobust.trifocalRansac(configTriRansac,configError,configRansac);
sba = FactoryMultiView.bundleSparseProjective(configSBA);
} | [
"public",
"void",
"fixate",
"(",
")",
"{",
"ransac",
"=",
"FactoryMultiViewRobust",
".",
"trifocalRansac",
"(",
"configTriRansac",
",",
"configError",
",",
"configRansac",
")",
";",
"sba",
"=",
"FactoryMultiView",
".",
"bundleSparseProjective",
"(",
"configSBA",
"... | Must call if you change configurations. | [
"Must",
"call",
"if",
"you",
"change",
"configurations",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java#L128-L131 |
50,274 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java | ProjectiveInitializeAllCommon.selectInitialTriplet | boolean selectInitialTriplet( View seed , GrowQueue_I32 motions , int selected[] ) {
double bestScore = 0;
for (int i = 0; i < motions.size; i++) {
View viewB = seed.connections.get(i).other(seed);
for (int j = i+1; j < motions.size; j++) {
View viewC = seed.connections.get(j).other(seed);
double s ... | java | boolean selectInitialTriplet( View seed , GrowQueue_I32 motions , int selected[] ) {
double bestScore = 0;
for (int i = 0; i < motions.size; i++) {
View viewB = seed.connections.get(i).other(seed);
for (int j = i+1; j < motions.size; j++) {
View viewC = seed.connections.get(j).other(seed);
double s ... | [
"boolean",
"selectInitialTriplet",
"(",
"View",
"seed",
",",
"GrowQueue_I32",
"motions",
",",
"int",
"selected",
"[",
"]",
")",
"{",
"double",
"bestScore",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"motions",
".",
"size",
";",
"... | Exhaustively look at all triplets that connect with the seed view | [
"Exhaustively",
"look",
"at",
"all",
"triplets",
"that",
"connect",
"with",
"the",
"seed",
"view"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java#L185-L202 |
50,275 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java | ProjectiveInitializeAllCommon.triangulateFeatures | private void triangulateFeatures(List<AssociatedTriple> inliers,
DMatrixRMaj P1, DMatrixRMaj P2, DMatrixRMaj P3) {
List<DMatrixRMaj> cameraMatrices = new ArrayList<>();
cameraMatrices.add(P1);
cameraMatrices.add(P2);
cameraMatrices.add(P3);
// need elements to be non-empty so that it can use set().... | java | private void triangulateFeatures(List<AssociatedTriple> inliers,
DMatrixRMaj P1, DMatrixRMaj P2, DMatrixRMaj P3) {
List<DMatrixRMaj> cameraMatrices = new ArrayList<>();
cameraMatrices.add(P1);
cameraMatrices.add(P2);
cameraMatrices.add(P3);
// need elements to be non-empty so that it can use set().... | [
"private",
"void",
"triangulateFeatures",
"(",
"List",
"<",
"AssociatedTriple",
">",
"inliers",
",",
"DMatrixRMaj",
"P1",
",",
"DMatrixRMaj",
"P2",
",",
"DMatrixRMaj",
"P3",
")",
"{",
"List",
"<",
"DMatrixRMaj",
">",
"cameraMatrices",
"=",
"new",
"ArrayList",
... | Triangulates the location of each features in homogenous space | [
"Triangulates",
"the",
"location",
"of",
"each",
"features",
"in",
"homogenous",
"space"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java#L275-L304 |
50,276 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java | ProjectiveInitializeAllCommon.initializeProjective3 | private void initializeProjective3(FastQueue<AssociatedTriple> associated ,
FastQueue<AssociatedTripleIndex> associatedIdx ,
int totalViews,
View viewA , View viewB , View viewC ,
int idxViewB , int idxViewC ) {
ransac.process(associated.toList());
List<AssociatedTri... | java | private void initializeProjective3(FastQueue<AssociatedTriple> associated ,
FastQueue<AssociatedTripleIndex> associatedIdx ,
int totalViews,
View viewA , View viewB , View viewC ,
int idxViewB , int idxViewC ) {
ransac.process(associated.toList());
List<AssociatedTri... | [
"private",
"void",
"initializeProjective3",
"(",
"FastQueue",
"<",
"AssociatedTriple",
">",
"associated",
",",
"FastQueue",
"<",
"AssociatedTripleIndex",
">",
"associatedIdx",
",",
"int",
"totalViews",
",",
"View",
"viewA",
",",
"View",
"viewB",
",",
"View",
"view... | Initializes projective reconstruction from 3-views.
1) RANSAC to fit a trifocal tensor
2) Extract camera matrices that have a common projective space
3) Triangulate location of 3D homogenous points
@param associated List of associated pixels
@param associatedIdx List of associated feature indexes | [
"Initializes",
"projective",
"reconstruction",
"from",
"3",
"-",
"views",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java#L331-L377 |
50,277 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java | ProjectiveInitializeAllCommon.findRemainingCameraMatrices | boolean findRemainingCameraMatrices(LookupSimilarImages db, View seed, GrowQueue_I32 motions) {
points3D.reset(); // points in 3D
for (int i = 0; i < structure.points.length; i++) {
structure.points[i].get(points3D.grow());
}
// contains associated pairs of pixel observations
// save a call to db by using ... | java | boolean findRemainingCameraMatrices(LookupSimilarImages db, View seed, GrowQueue_I32 motions) {
points3D.reset(); // points in 3D
for (int i = 0; i < structure.points.length; i++) {
structure.points[i].get(points3D.grow());
}
// contains associated pairs of pixel observations
// save a call to db by using ... | [
"boolean",
"findRemainingCameraMatrices",
"(",
"LookupSimilarImages",
"db",
",",
"View",
"seed",
",",
"GrowQueue_I32",
"motions",
")",
"{",
"points3D",
".",
"reset",
"(",
")",
";",
"// points in 3D",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"structur... | Uses the triangulated points and observations in the root view to estimate the camera matrix for
all the views which are remaining
@return true if successful or false if not | [
"Uses",
"the",
"triangulated",
"points",
"and",
"observations",
"in",
"the",
"root",
"view",
"to",
"estimate",
"the",
"camera",
"matrix",
"for",
"all",
"the",
"views",
"which",
"are",
"remaining"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java#L384-L421 |
50,278 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java | ProjectiveInitializeAllCommon.computeCameraMatrix | private boolean computeCameraMatrix(View seed, Motion edge, FastQueue<Point2D_F64> featsB, DMatrixRMaj cameraMatrix ) {
boolean seedSrc = edge.src == seed;
int matched = 0;
for (int i = 0; i < edge.inliers.size; i++) {
// need to go from i to index of detected features in view 'seed' to index index of feature... | java | private boolean computeCameraMatrix(View seed, Motion edge, FastQueue<Point2D_F64> featsB, DMatrixRMaj cameraMatrix ) {
boolean seedSrc = edge.src == seed;
int matched = 0;
for (int i = 0; i < edge.inliers.size; i++) {
// need to go from i to index of detected features in view 'seed' to index index of feature... | [
"private",
"boolean",
"computeCameraMatrix",
"(",
"View",
"seed",
",",
"Motion",
"edge",
",",
"FastQueue",
"<",
"Point2D_F64",
">",
"featsB",
",",
"DMatrixRMaj",
"cameraMatrix",
")",
"{",
"boolean",
"seedSrc",
"=",
"edge",
".",
"src",
"==",
"seed",
";",
"int... | Computes camera matrix between the seed view and a connected view
@param seed This will be the source view. It's observations have already been added to assocPixel
@param edge The edge which connects them
@param featsB The dst view
@param cameraMatrix (Output) resulting camera matrix
@return true if successful | [
"Computes",
"camera",
"matrix",
"between",
"the",
"seed",
"view",
"and",
"a",
"connected",
"view"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java#L431-L456 |
50,279 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java | ProjectiveInitializeAllCommon.createObservationsForBundleAdjustment | private SceneObservations createObservationsForBundleAdjustment(LookupSimilarImages db, View seed, GrowQueue_I32 motions) {
// seed view + the motions
SceneObservations observations = new SceneObservations(motions.size+1);
// Observations for the seed view are a special case
SceneObservations.View obsView = ob... | java | private SceneObservations createObservationsForBundleAdjustment(LookupSimilarImages db, View seed, GrowQueue_I32 motions) {
// seed view + the motions
SceneObservations observations = new SceneObservations(motions.size+1);
// Observations for the seed view are a special case
SceneObservations.View obsView = ob... | [
"private",
"SceneObservations",
"createObservationsForBundleAdjustment",
"(",
"LookupSimilarImages",
"db",
",",
"View",
"seed",
",",
"GrowQueue_I32",
"motions",
")",
"{",
"// seed view + the motions",
"SceneObservations",
"observations",
"=",
"new",
"SceneObservations",
"(",
... | Convert observations into a format which bundle adjustment will understand
@param seed The first view which all other views are connected to
@param motions Which edges in seed
@return observations for SBA | [
"Convert",
"observations",
"into",
"a",
"format",
"which",
"bundle",
"adjustment",
"will",
"understand"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java#L464-L495 |
50,280 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java | ProjectiveInitializeAllCommon.refineWithBundleAdjustment | private boolean refineWithBundleAdjustment(SceneObservations observations) {
if( scaleSBA ) {
scaler.applyScale(structure,observations);
}
sba.setVerbose(verbose,verboseLevel);
sba.setParameters(structure,observations);
sba.configure(converge.ftol,converge.gtol,converge.maxIterations);
if( !sba.optimiz... | java | private boolean refineWithBundleAdjustment(SceneObservations observations) {
if( scaleSBA ) {
scaler.applyScale(structure,observations);
}
sba.setVerbose(verbose,verboseLevel);
sba.setParameters(structure,observations);
sba.configure(converge.ftol,converge.gtol,converge.maxIterations);
if( !sba.optimiz... | [
"private",
"boolean",
"refineWithBundleAdjustment",
"(",
"SceneObservations",
"observations",
")",
"{",
"if",
"(",
"scaleSBA",
")",
"{",
"scaler",
".",
"applyScale",
"(",
"structure",
",",
"observations",
")",
";",
"}",
"sba",
".",
"setVerbose",
"(",
"verbose",
... | Last step is to refine the current initial estimate with bundle adjustment | [
"Last",
"step",
"is",
"to",
"refine",
"the",
"current",
"initial",
"estimate",
"with",
"bundle",
"adjustment"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java#L500-L522 |
50,281 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/core/encoding/ConvertNV21.java | ConvertNV21.nv21ToBoof | public static void nv21ToBoof(byte[] data, int width, int height, ImageBase output) {
if( output instanceof Planar) {
Planar ms = (Planar) output;
if (ms.getBandType() == GrayU8.class) {
ConvertNV21.nv21TPlanarRgb_U8(data, width, height, ms);
} else if (ms.getBandType() == GrayF32.class) {
ConvertN... | java | public static void nv21ToBoof(byte[] data, int width, int height, ImageBase output) {
if( output instanceof Planar) {
Planar ms = (Planar) output;
if (ms.getBandType() == GrayU8.class) {
ConvertNV21.nv21TPlanarRgb_U8(data, width, height, ms);
} else if (ms.getBandType() == GrayF32.class) {
ConvertN... | [
"public",
"static",
"void",
"nv21ToBoof",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"width",
",",
"int",
"height",
",",
"ImageBase",
"output",
")",
"{",
"if",
"(",
"output",
"instanceof",
"Planar",
")",
"{",
"Planar",
"ms",
"=",
"(",
"Planar",
")",
... | Converts a NV21 encoded byte array into a BoofCV formatted image.
@param data (input) NV21 byte array
@param width (input) image width
@param height (input) image height
@param output (output) BoofCV image | [
"Converts",
"a",
"NV21",
"encoded",
"byte",
"array",
"into",
"a",
"BoofCV",
"formatted",
"image",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/core/encoding/ConvertNV21.java#L44-L75 |
50,282 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/core/encoding/ConvertNV21.java | ConvertNV21.nv21ToGray | public static <T extends ImageGray<T>>
T nv21ToGray( byte[] data , int width , int height ,
T output , Class<T> outputType ) {
if( outputType == GrayU8.class ) {
return (T)nv21ToGray(data,width,height,(GrayU8)output);
} else if( outputType == GrayF32.class ) {
return (T)nv21ToGray(data,width,height,(G... | java | public static <T extends ImageGray<T>>
T nv21ToGray( byte[] data , int width , int height ,
T output , Class<T> outputType ) {
if( outputType == GrayU8.class ) {
return (T)nv21ToGray(data,width,height,(GrayU8)output);
} else if( outputType == GrayF32.class ) {
return (T)nv21ToGray(data,width,height,(G... | [
"public",
"static",
"<",
"T",
"extends",
"ImageGray",
"<",
"T",
">",
">",
"T",
"nv21ToGray",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"width",
",",
"int",
"height",
",",
"T",
"output",
",",
"Class",
"<",
"T",
">",
"outputType",
")",
"{",
"if",
... | Converts an NV21 image into a gray scale image. Image type is determined at runtime.
@param data Input: NV21 image data
@param width Input: NV21 image width
@param height Input: NV21 image height
@param output Output: Optional storage for output image. Can be null.
@param outputType Output: Type of output image
@pa... | [
"Converts",
"an",
"NV21",
"image",
"into",
"a",
"gray",
"scale",
"image",
".",
"Image",
"type",
"is",
"determined",
"at",
"runtime",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/core/encoding/ConvertNV21.java#L88-L99 |
50,283 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/core/encoding/ConvertNV21.java | ConvertNV21.nv21ToGray | public static GrayU8 nv21ToGray(byte[] data , int width , int height , GrayU8 output ) {
if( output != null ) {
output.reshape(width,height);
} else {
output = new GrayU8(width,height);
}
if(BoofConcurrency.USE_CONCURRENT ) {
ImplConvertNV21_MT.nv21ToGray(data, output);
} else {
ImplConvertNV21.n... | java | public static GrayU8 nv21ToGray(byte[] data , int width , int height , GrayU8 output ) {
if( output != null ) {
output.reshape(width,height);
} else {
output = new GrayU8(width,height);
}
if(BoofConcurrency.USE_CONCURRENT ) {
ImplConvertNV21_MT.nv21ToGray(data, output);
} else {
ImplConvertNV21.n... | [
"public",
"static",
"GrayU8",
"nv21ToGray",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"width",
",",
"int",
"height",
",",
"GrayU8",
"output",
")",
"{",
"if",
"(",
"output",
"!=",
"null",
")",
"{",
"output",
".",
"reshape",
"(",
"width",
",",
"height... | Converts an NV21 image into a gray scale U8 image.
@param data Input: NV21 image data
@param width Input: NV21 image width
@param height Input: NV21 image height
@param output Output: Optional storage for output image. Can be null.
@return Gray scale image | [
"Converts",
"an",
"NV21",
"image",
"into",
"a",
"gray",
"scale",
"U8",
"image",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/core/encoding/ConvertNV21.java#L110-L124 |
50,284 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/FiducialSquareGenerator.java | FiducialSquareGenerator.generate | public void generate( long value , int gridWidth ) {
renderer.init();
drawBorder();
double whiteBorder = whiteBorderDoc /markerWidth;
double X0 = whiteBorder+blackBorder;
double Y0 = whiteBorder+blackBorder;
double bw = (1.0-2*X0)/gridWidth;
// Draw the black corner used to ID the orientation
square... | java | public void generate( long value , int gridWidth ) {
renderer.init();
drawBorder();
double whiteBorder = whiteBorderDoc /markerWidth;
double X0 = whiteBorder+blackBorder;
double Y0 = whiteBorder+blackBorder;
double bw = (1.0-2*X0)/gridWidth;
// Draw the black corner used to ID the orientation
square... | [
"public",
"void",
"generate",
"(",
"long",
"value",
",",
"int",
"gridWidth",
")",
"{",
"renderer",
".",
"init",
"(",
")",
";",
"drawBorder",
"(",
")",
";",
"double",
"whiteBorder",
"=",
"whiteBorderDoc",
"/",
"markerWidth",
";",
"double",
"X0",
"=",
"whi... | Renders a binary square fiducial
@param value Value encoded in the fiducial
@param gridWidth number of cells wide the grid is | [
"Renders",
"a",
"binary",
"square",
"fiducial"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/FiducialSquareGenerator.java#L92-L133 |
50,285 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CameraPlaneProjection.java | CameraPlaneProjection.setConfiguration | public void setConfiguration( Se3_F64 planeToCamera ,
CameraPinholeBrown intrinsic )
{
this.planeToCamera = planeToCamera;
normToPixel = LensDistortionFactory.narrow(intrinsic).distort_F64(false, true);
pixelToNorm = LensDistortionFactory.narrow(intrinsic).undistort_F64(true, false);
planeToCamera.i... | java | public void setConfiguration( Se3_F64 planeToCamera ,
CameraPinholeBrown intrinsic )
{
this.planeToCamera = planeToCamera;
normToPixel = LensDistortionFactory.narrow(intrinsic).distort_F64(false, true);
pixelToNorm = LensDistortionFactory.narrow(intrinsic).undistort_F64(true, false);
planeToCamera.i... | [
"public",
"void",
"setConfiguration",
"(",
"Se3_F64",
"planeToCamera",
",",
"CameraPinholeBrown",
"intrinsic",
")",
"{",
"this",
".",
"planeToCamera",
"=",
"planeToCamera",
";",
"normToPixel",
"=",
"LensDistortionFactory",
".",
"narrow",
"(",
"intrinsic",
")",
".",
... | Configures the camera's intrinsic and extrinsic parameters
@param planeToCamera Transform from the plane to the camera
@param intrinsic Pixel to normalized image coordinates | [
"Configures",
"the",
"camera",
"s",
"intrinsic",
"and",
"extrinsic",
"parameters"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CameraPlaneProjection.java#L64-L72 |
50,286 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CameraPlaneProjection.java | CameraPlaneProjection.setIntrinsic | public void setIntrinsic(CameraPinholeBrown intrinsic )
{
normToPixel = LensDistortionFactory.narrow(intrinsic).distort_F64(false, true);
pixelToNorm = LensDistortionFactory.narrow(intrinsic).undistort_F64(true, false);
} | java | public void setIntrinsic(CameraPinholeBrown intrinsic )
{
normToPixel = LensDistortionFactory.narrow(intrinsic).distort_F64(false, true);
pixelToNorm = LensDistortionFactory.narrow(intrinsic).undistort_F64(true, false);
} | [
"public",
"void",
"setIntrinsic",
"(",
"CameraPinholeBrown",
"intrinsic",
")",
"{",
"normToPixel",
"=",
"LensDistortionFactory",
".",
"narrow",
"(",
"intrinsic",
")",
".",
"distort_F64",
"(",
"false",
",",
"true",
")",
";",
"pixelToNorm",
"=",
"LensDistortionFacto... | Configures the camera's intrinsic parameters
@param intrinsic Intrinsic camera parameters | [
"Configures",
"the",
"camera",
"s",
"intrinsic",
"parameters"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CameraPlaneProjection.java#L78-L82 |
50,287 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CameraPlaneProjection.java | CameraPlaneProjection.setPlaneToCamera | public void setPlaneToCamera(Se3_F64 planeToCamera, boolean computeInverse ) {
this.planeToCamera = planeToCamera;
if( computeInverse )
planeToCamera.invert(cameraToPlane);
} | java | public void setPlaneToCamera(Se3_F64 planeToCamera, boolean computeInverse ) {
this.planeToCamera = planeToCamera;
if( computeInverse )
planeToCamera.invert(cameraToPlane);
} | [
"public",
"void",
"setPlaneToCamera",
"(",
"Se3_F64",
"planeToCamera",
",",
"boolean",
"computeInverse",
")",
"{",
"this",
".",
"planeToCamera",
"=",
"planeToCamera",
";",
"if",
"(",
"computeInverse",
")",
"planeToCamera",
".",
"invert",
"(",
"cameraToPlane",
")",... | Specifies camera's extrinsic parameters.
@param planeToCamera Transform from plane to camera reference frame
@param computeInverse Set to true if pixelToPlane is going to be called. performs extra calculation | [
"Specifies",
"camera",
"s",
"extrinsic",
"parameters",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CameraPlaneProjection.java#L90-L95 |
50,288 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CameraPlaneProjection.java | CameraPlaneProjection.planeToPixel | public boolean planeToPixel( double pointX , double pointY , Point2D_F64 pixel ) {
// convert it into a 3D coordinate and transform into camera reference frame
plain3D.set(-pointY, 0, pointX);
SePointOps_F64.transform(planeToCamera, plain3D, camera3D);
// if it's behind the camera it can't be seen
if( camera... | java | public boolean planeToPixel( double pointX , double pointY , Point2D_F64 pixel ) {
// convert it into a 3D coordinate and transform into camera reference frame
plain3D.set(-pointY, 0, pointX);
SePointOps_F64.transform(planeToCamera, plain3D, camera3D);
// if it's behind the camera it can't be seen
if( camera... | [
"public",
"boolean",
"planeToPixel",
"(",
"double",
"pointX",
",",
"double",
"pointY",
",",
"Point2D_F64",
"pixel",
")",
"{",
"// convert it into a 3D coordinate and transform into camera reference frame",
"plain3D",
".",
"set",
"(",
"-",
"pointY",
",",
"0",
",",
"poi... | Given a point on the plane find the pixel in the image.
@param pointX (input) Point on the plane, x-axis
@param pointY (input) Point on the plane, y-axis
@param pixel (output) Pixel in the image
@return true if the point is in front of the camera. False if not. | [
"Given",
"a",
"point",
"on",
"the",
"plane",
"find",
"the",
"pixel",
"in",
"the",
"image",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CameraPlaneProjection.java#L105-L120 |
50,289 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CameraPlaneProjection.java | CameraPlaneProjection.planeToNormalized | public boolean planeToNormalized( double pointX , double pointY , Point2D_F64 normalized ) {
// convert it into a 3D coordinate and transform into camera reference frame
plain3D.set(-pointY, 0, pointX);
SePointOps_F64.transform(planeToCamera, plain3D, camera3D);
// if it's behind the camera it can't be seen
... | java | public boolean planeToNormalized( double pointX , double pointY , Point2D_F64 normalized ) {
// convert it into a 3D coordinate and transform into camera reference frame
plain3D.set(-pointY, 0, pointX);
SePointOps_F64.transform(planeToCamera, plain3D, camera3D);
// if it's behind the camera it can't be seen
... | [
"public",
"boolean",
"planeToNormalized",
"(",
"double",
"pointX",
",",
"double",
"pointY",
",",
"Point2D_F64",
"normalized",
")",
"{",
"// convert it into a 3D coordinate and transform into camera reference frame",
"plain3D",
".",
"set",
"(",
"-",
"pointY",
",",
"0",
"... | Given a point on the plane find the normalized image coordinate
@param pointX (input) Point on the plane, x-axis
@param pointY (input) Point on the plane, y-axis
@param normalized (output) Normalized image coordinate of pixel
@return true if the point is in front of the camera. False if not. | [
"Given",
"a",
"point",
"on",
"the",
"plane",
"find",
"the",
"normalized",
"image",
"coordinate"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CameraPlaneProjection.java#L130-L144 |
50,290 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerGraph.java | ChessboardCornerGraph.convert | public void convert( FeatureGraph2D graph ) {
graph.nodes.resize(corners.size);
graph.reset();
for (int i = 0; i < corners.size; i++) {
Node c = corners.get(i);
FeatureGraph2D.Node n = graph.nodes.grow();
n.reset();
n.set(c.x,c.y);
n.index = c.index;
}
for (int i = 0; i < corners.size; i++) {
... | java | public void convert( FeatureGraph2D graph ) {
graph.nodes.resize(corners.size);
graph.reset();
for (int i = 0; i < corners.size; i++) {
Node c = corners.get(i);
FeatureGraph2D.Node n = graph.nodes.grow();
n.reset();
n.set(c.x,c.y);
n.index = c.index;
}
for (int i = 0; i < corners.size; i++) {
... | [
"public",
"void",
"convert",
"(",
"FeatureGraph2D",
"graph",
")",
"{",
"graph",
".",
"nodes",
".",
"resize",
"(",
"corners",
".",
"size",
")",
";",
"graph",
".",
"reset",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"corners",
... | Convert into a generic graph. | [
"Convert",
"into",
"a",
"generic",
"graph",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerGraph.java#L42-L61 |
50,291 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/ImageMotionPointTrackerKey.java | ImageMotionPointTrackerKey.process | public boolean process( I frame ) {
keyFrame = false;
// update the feature tracker
tracker.process(frame);
totalFramesProcessed++;
List<PointTrack> tracks = tracker.getActiveTracks(null);
if( tracks.size() == 0 )
return false;
List<AssociatedPair> pairs = new ArrayList<>();
for( PointTrack t : ... | java | public boolean process( I frame ) {
keyFrame = false;
// update the feature tracker
tracker.process(frame);
totalFramesProcessed++;
List<PointTrack> tracks = tracker.getActiveTracks(null);
if( tracks.size() == 0 )
return false;
List<AssociatedPair> pairs = new ArrayList<>();
for( PointTrack t : ... | [
"public",
"boolean",
"process",
"(",
"I",
"frame",
")",
"{",
"keyFrame",
"=",
"false",
";",
"// update the feature tracker",
"tracker",
".",
"process",
"(",
"frame",
")",
";",
"totalFramesProcessed",
"++",
";",
"List",
"<",
"PointTrack",
">",
"tracks",
"=",
... | Processes the next frame in the sequence.
@param frame Next frame in the video sequence
@return true if motion was estimated and false if no motion was estimated | [
"Processes",
"the",
"next",
"frame",
"in",
"the",
"sequence",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/ImageMotionPointTrackerKey.java#L110-L152 |
50,292 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/ImageMotionPointTrackerKey.java | ImageMotionPointTrackerKey.changeKeyFrame | public void changeKeyFrame() {
// drop all inactive tracks since their location is unknown in the current frame
List<PointTrack> inactive = tracker.getInactiveTracks(null);
for( PointTrack l : inactive ) {
tracker.dropTrack(l);
}
// set the keyframe for active tracks as their current location
List<Point... | java | public void changeKeyFrame() {
// drop all inactive tracks since their location is unknown in the current frame
List<PointTrack> inactive = tracker.getInactiveTracks(null);
for( PointTrack l : inactive ) {
tracker.dropTrack(l);
}
// set the keyframe for active tracks as their current location
List<Point... | [
"public",
"void",
"changeKeyFrame",
"(",
")",
"{",
"// drop all inactive tracks since their location is unknown in the current frame",
"List",
"<",
"PointTrack",
">",
"inactive",
"=",
"tracker",
".",
"getInactiveTracks",
"(",
"null",
")",
";",
"for",
"(",
"PointTrack",
... | Change the current frame into the keyframe. p1 location of existing tracks is set to
their current location and new tracks are spawned. Reference frame transformations are also updated | [
"Change",
"the",
"current",
"frame",
"into",
"the",
"keyframe",
".",
"p1",
"location",
"of",
"existing",
"tracks",
"is",
"set",
"to",
"their",
"current",
"location",
"and",
"new",
"tracks",
"are",
"spawned",
".",
"Reference",
"frame",
"transformations",
"are",... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/ImageMotionPointTrackerKey.java#L170-L203 |
50,293 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/cloud/PointCloudUtils.java | PointCloudUtils.autoScale | public static double autoScale( List<Point3D_F64> cloud , double target ) {
Point3D_F64 mean = new Point3D_F64();
Point3D_F64 stdev = new Point3D_F64();
statistics(cloud, mean, stdev);
double scale = target/(Math.max(Math.max(stdev.x,stdev.y),stdev.z));
int N = cloud.size();
for (int i = 0; i < N ; i++... | java | public static double autoScale( List<Point3D_F64> cloud , double target ) {
Point3D_F64 mean = new Point3D_F64();
Point3D_F64 stdev = new Point3D_F64();
statistics(cloud, mean, stdev);
double scale = target/(Math.max(Math.max(stdev.x,stdev.y),stdev.z));
int N = cloud.size();
for (int i = 0; i < N ; i++... | [
"public",
"static",
"double",
"autoScale",
"(",
"List",
"<",
"Point3D_F64",
">",
"cloud",
",",
"double",
"target",
")",
"{",
"Point3D_F64",
"mean",
"=",
"new",
"Point3D_F64",
"(",
")",
";",
"Point3D_F64",
"stdev",
"=",
"new",
"Point3D_F64",
"(",
")",
";",
... | Automatically rescales the point cloud based so that it has a standard deviation of 'target'
@param cloud The point cloud
@param target The desired standard deviation of the cloud. Try 100
@return The selected scale factor | [
"Automatically",
"rescales",
"the",
"point",
"cloud",
"based",
"so",
"that",
"it",
"has",
"a",
"standard",
"deviation",
"of",
"target"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/cloud/PointCloudUtils.java#L42-L57 |
50,294 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/cloud/PointCloudUtils.java | PointCloudUtils.statistics | public static void statistics( List<Point3D_F64> cloud , Point3D_F64 mean , Point3D_F64 stdev ) {
final int N = cloud.size();
for (int i = 0; i < N; i++) {
Point3D_F64 p = cloud.get(i);
mean.x += p.x / N;
mean.y += p.y / N;
mean.z += p.z / N;
}
for (int i = 0; i < N; i++) {
Point3D_F64 p = cloud... | java | public static void statistics( List<Point3D_F64> cloud , Point3D_F64 mean , Point3D_F64 stdev ) {
final int N = cloud.size();
for (int i = 0; i < N; i++) {
Point3D_F64 p = cloud.get(i);
mean.x += p.x / N;
mean.y += p.y / N;
mean.z += p.z / N;
}
for (int i = 0; i < N; i++) {
Point3D_F64 p = cloud... | [
"public",
"static",
"void",
"statistics",
"(",
"List",
"<",
"Point3D_F64",
">",
"cloud",
",",
"Point3D_F64",
"mean",
",",
"Point3D_F64",
"stdev",
")",
"{",
"final",
"int",
"N",
"=",
"cloud",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0... | Computes the mean and standard deviation of each axis in the point cloud computed in dependently
@param cloud (Input) Cloud
@param mean (Output) mean of each axis
@param stdev (Output) standard deviation of each axis | [
"Computes",
"the",
"mean",
"and",
"standard",
"deviation",
"of",
"each",
"axis",
"in",
"the",
"point",
"cloud",
"computed",
"in",
"dependently"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/cloud/PointCloudUtils.java#L65-L87 |
50,295 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/cloud/PointCloudUtils.java | PointCloudUtils.prune | public static void prune(List<Point3D_F64> cloud , int minNeighbors , double radius ) {
if( minNeighbors < 0 )
throw new IllegalArgumentException("minNeighbors must be >= 0");
NearestNeighbor<Point3D_F64> nn = FactoryNearestNeighbor.kdtree(new KdTreePoint3D_F64() );
NearestNeighbor.Search<Point3D_F64> search =... | java | public static void prune(List<Point3D_F64> cloud , int minNeighbors , double radius ) {
if( minNeighbors < 0 )
throw new IllegalArgumentException("minNeighbors must be >= 0");
NearestNeighbor<Point3D_F64> nn = FactoryNearestNeighbor.kdtree(new KdTreePoint3D_F64() );
NearestNeighbor.Search<Point3D_F64> search =... | [
"public",
"static",
"void",
"prune",
"(",
"List",
"<",
"Point3D_F64",
">",
"cloud",
",",
"int",
"minNeighbors",
",",
"double",
"radius",
")",
"{",
"if",
"(",
"minNeighbors",
"<",
"0",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"minNeighbors must b... | Prunes points from the point cloud if they have very few neighbors
@param cloud Point cloud
@param minNeighbors Minimum number of neighbors for it to not be pruned
@param radius search distance for neighbors | [
"Prunes",
"points",
"from",
"the",
"point",
"cloud",
"if",
"they",
"have",
"very",
"few",
"neighbors"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/cloud/PointCloudUtils.java#L96-L118 |
50,296 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/LowLevelMultiViewOps.java | LowLevelMultiViewOps.computeNormalizationLL | public static void computeNormalizationLL(List<List<Point2D_F64>> points, NormalizationPoint2D normalize )
{
double meanX = 0;
double meanY = 0;
int count = 0;
for (int i = 0; i < points.size(); i++) {
List<Point2D_F64> l = points.get(i);
for (int j = 0; j < l.size(); j++) {
Point2D_F64 p = l.get(j... | java | public static void computeNormalizationLL(List<List<Point2D_F64>> points, NormalizationPoint2D normalize )
{
double meanX = 0;
double meanY = 0;
int count = 0;
for (int i = 0; i < points.size(); i++) {
List<Point2D_F64> l = points.get(i);
for (int j = 0; j < l.size(); j++) {
Point2D_F64 p = l.get(j... | [
"public",
"static",
"void",
"computeNormalizationLL",
"(",
"List",
"<",
"List",
"<",
"Point2D_F64",
">",
">",
"points",
",",
"NormalizationPoint2D",
"normalize",
")",
"{",
"double",
"meanX",
"=",
"0",
";",
"double",
"meanY",
"=",
"0",
";",
"int",
"count",
... | Computes normalization when points are contained in a list of lists
@param points Input: List of observed points. Not modified.
@param normalize Output: 3x3 normalization matrix for first set of points. Modified. | [
"Computes",
"normalization",
"when",
"points",
"are",
"contained",
"in",
"a",
"list",
"of",
"lists"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/LowLevelMultiViewOps.java#L82-L121 |
50,297 | lessthanoptimal/BoofCV | main/autocode/src/main/java/boofcv/AutocodeConcurrentApp.java | AutocodeConcurrentApp.convertFile | public static void convertFile( File original ) throws IOException {
File outputFile = determineClassName(original);
String classNameOld = className(original);
String classNameNew = className(outputFile);
// Read the file and split it up into lines
List<String> inputLines = FileUtils.readLines(original,"UTF... | java | public static void convertFile( File original ) throws IOException {
File outputFile = determineClassName(original);
String classNameOld = className(original);
String classNameNew = className(outputFile);
// Read the file and split it up into lines
List<String> inputLines = FileUtils.readLines(original,"UTF... | [
"public",
"static",
"void",
"convertFile",
"(",
"File",
"original",
")",
"throws",
"IOException",
"{",
"File",
"outputFile",
"=",
"determineClassName",
"(",
"original",
")",
";",
"String",
"classNameOld",
"=",
"className",
"(",
"original",
")",
";",
"String",
... | Converts the file from single thread into concurrent implementation | [
"Converts",
"the",
"file",
"from",
"single",
"thread",
"into",
"concurrent",
"implementation"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/autocode/src/main/java/boofcv/AutocodeConcurrentApp.java#L54-L119 |
50,298 | lessthanoptimal/BoofCV | main/autocode/src/main/java/boofcv/AutocodeConcurrentApp.java | AutocodeConcurrentApp.determineClassName | private static File determineClassName( File original ) throws IOException {
String text = FileUtils.readFileToString(original, "UTF-8");
if(!text.contains("//CONCURRENT"))
throw new IOException("Not a concurrent file");
String pattern = "//CONCURRENT_CLASS_NAME ";
int where = text.indexOf(pattern);
if( ... | java | private static File determineClassName( File original ) throws IOException {
String text = FileUtils.readFileToString(original, "UTF-8");
if(!text.contains("//CONCURRENT"))
throw new IOException("Not a concurrent file");
String pattern = "//CONCURRENT_CLASS_NAME ";
int where = text.indexOf(pattern);
if( ... | [
"private",
"static",
"File",
"determineClassName",
"(",
"File",
"original",
")",
"throws",
"IOException",
"{",
"String",
"text",
"=",
"FileUtils",
".",
"readFileToString",
"(",
"original",
",",
"\"UTF-8\"",
")",
";",
"if",
"(",
"!",
"text",
".",
"contains",
... | Searches the input file for an override. If none is found then _MT is added to the class name.
@param original Input file
@return Output file | [
"Searches",
"the",
"input",
"file",
"for",
"an",
"override",
".",
"If",
"none",
"is",
"found",
"then",
"_MT",
"is",
"added",
"to",
"the",
"class",
"name",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/autocode/src/main/java/boofcv/AutocodeConcurrentApp.java#L208-L223 |
50,299 | lessthanoptimal/BoofCV | main/boofcv-types/src/main/java/boofcv/struct/pyramid/ImagePyramidBase.java | ImagePyramidBase.initialize | @Override
public void initialize(int width, int height) {
// see if it has already been initialized
if( bottomWidth == width && bottomHeight == height )
return;
this.bottomWidth = width;
this.bottomHeight = height;
layers = imageType.createArray(getNumLayers());
double scaleFactor = getScale(0);
if ... | java | @Override
public void initialize(int width, int height) {
// see if it has already been initialized
if( bottomWidth == width && bottomHeight == height )
return;
this.bottomWidth = width;
this.bottomHeight = height;
layers = imageType.createArray(getNumLayers());
double scaleFactor = getScale(0);
if ... | [
"@",
"Override",
"public",
"void",
"initialize",
"(",
"int",
"width",
",",
"int",
"height",
")",
"{",
"// see if it has already been initialized",
"if",
"(",
"bottomWidth",
"==",
"width",
"&&",
"bottomHeight",
"==",
"height",
")",
"return",
";",
"this",
".",
"... | Initializes internal data structures based on the input image's size. Should be called each time a new image
is processed.
@param width Image width
@param height Image height | [
"Initializes",
"internal",
"data",
"structures",
"based",
"on",
"the",
"input",
"image",
"s",
"size",
".",
"Should",
"be",
"called",
"each",
"time",
"a",
"new",
"image",
"is",
"processed",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/struct/pyramid/ImagePyramidBase.java#L72-L95 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.