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,300 | lessthanoptimal/BoofCV | main/boofcv-types/src/main/java/boofcv/struct/pyramid/ImagePyramidBase.java | ImagePyramidBase.checkScales | protected void checkScales() {
if( getScale(0) < 0 ) {
throw new IllegalArgumentException("The first layer must be more than zero.");
}
double prevScale = 0;
for( int i = 0; i < getNumLayers(); i++ ) {
double s = getScale(i);
if( s < prevScale )
throw new IllegalArgumentException("Higher layers mu... | java | protected void checkScales() {
if( getScale(0) < 0 ) {
throw new IllegalArgumentException("The first layer must be more than zero.");
}
double prevScale = 0;
for( int i = 0; i < getNumLayers(); i++ ) {
double s = getScale(i);
if( s < prevScale )
throw new IllegalArgumentException("Higher layers mu... | [
"protected",
"void",
"checkScales",
"(",
")",
"{",
"if",
"(",
"getScale",
"(",
"0",
")",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"The first layer must be more than zero.\"",
")",
";",
"}",
"double",
"prevScale",
"=",
"0",
";",
... | Used to internally check that the provided scales are valid. | [
"Used",
"to",
"internally",
"check",
"that",
"the",
"provided",
"scales",
"are",
"valid",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/struct/pyramid/ImagePyramidBase.java#L100-L112 |
50,301 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/EllipseClustersIntoRegularGrid.java | EllipseClustersIntoRegularGrid.checkGridSize | static boolean checkGridSize(List<List<NodeInfo>> grid ,
int clusterSize ) {
int total = 0;
int expected = grid.get(0).size();
for (int i = 0; i < grid.size(); i++) {
if( expected != grid.get(i).size() )
return false;
total += grid.get(i).size();
}
return total == clusterSize;
} | java | static boolean checkGridSize(List<List<NodeInfo>> grid ,
int clusterSize ) {
int total = 0;
int expected = grid.get(0).size();
for (int i = 0; i < grid.size(); i++) {
if( expected != grid.get(i).size() )
return false;
total += grid.get(i).size();
}
return total == clusterSize;
} | [
"static",
"boolean",
"checkGridSize",
"(",
"List",
"<",
"List",
"<",
"NodeInfo",
">",
">",
"grid",
",",
"int",
"clusterSize",
")",
"{",
"int",
"total",
"=",
"0",
";",
"int",
"expected",
"=",
"grid",
".",
"get",
"(",
"0",
")",
".",
"size",
"(",
")",... | Makes sure the found grid is the same size as the original cluster. If it's not then.
not all the nodes were used. All lists must have he same size too. | [
"Makes",
"sure",
"the",
"found",
"grid",
"is",
"the",
"same",
"size",
"as",
"the",
"original",
"cluster",
".",
"If",
"it",
"s",
"not",
"then",
".",
"not",
"all",
"the",
"nodes",
"were",
"used",
".",
"All",
"lists",
"must",
"have",
"he",
"same",
"size... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/EllipseClustersIntoRegularGrid.java#L119-L130 |
50,302 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/triangulate/PixelDepthLinearMetric.java | PixelDepthLinearMetric.depthNView | public double depthNView( List<Point2D_F64> obs ,
List<Se3_F64> motion )
{
double top = 0, bottom = 0;
Point2D_F64 a = obs.get(0);
for( int i = 1; i < obs.size(); i++ ) {
Se3_F64 se = motion.get(i-1);
Point2D_F64 b = obs.get(i);
GeometryMath_F64.multCrossA(b, se.getR(), temp0);
GeometryMa... | java | public double depthNView( List<Point2D_F64> obs ,
List<Se3_F64> motion )
{
double top = 0, bottom = 0;
Point2D_F64 a = obs.get(0);
for( int i = 1; i < obs.size(); i++ ) {
Se3_F64 se = motion.get(i-1);
Point2D_F64 b = obs.get(i);
GeometryMath_F64.multCrossA(b, se.getR(), temp0);
GeometryMa... | [
"public",
"double",
"depthNView",
"(",
"List",
"<",
"Point2D_F64",
">",
"obs",
",",
"List",
"<",
"Se3_F64",
">",
"motion",
")",
"{",
"double",
"top",
"=",
"0",
",",
"bottom",
"=",
"0",
";",
"Point2D_F64",
"a",
"=",
"obs",
".",
"get",
"(",
"0",
")",... | Computes the pixel depth from N views of the same object. Pixel depth in the first frame.
@param obs List of observations on a single feature in normalized coordinates
@param motion List of camera motions. Each index 'i' is the motion from view 0 to view i+1.
@return depth of the pixels | [
"Computes",
"the",
"pixel",
"depth",
"from",
"N",
"views",
"of",
"the",
"same",
"object",
".",
"Pixel",
"depth",
"in",
"the",
"first",
"frame",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/triangulate/PixelDepthLinearMetric.java#L70-L91 |
50,303 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/triangulate/PixelDepthLinearMetric.java | PixelDepthLinearMetric.depth2View | public double depth2View( Point2D_F64 a , Point2D_F64 b , Se3_F64 fromAtoB )
{
DMatrixRMaj R = fromAtoB.getR();
Vector3D_F64 T = fromAtoB.getT();
GeometryMath_F64.multCrossA(b, R, temp0);
GeometryMath_F64.mult(temp0,a,temp1);
GeometryMath_F64.cross(b, T, temp2);
return -(temp2.x+temp2.y+temp2.z)/(temp1.... | java | public double depth2View( Point2D_F64 a , Point2D_F64 b , Se3_F64 fromAtoB )
{
DMatrixRMaj R = fromAtoB.getR();
Vector3D_F64 T = fromAtoB.getT();
GeometryMath_F64.multCrossA(b, R, temp0);
GeometryMath_F64.mult(temp0,a,temp1);
GeometryMath_F64.cross(b, T, temp2);
return -(temp2.x+temp2.y+temp2.z)/(temp1.... | [
"public",
"double",
"depth2View",
"(",
"Point2D_F64",
"a",
",",
"Point2D_F64",
"b",
",",
"Se3_F64",
"fromAtoB",
")",
"{",
"DMatrixRMaj",
"R",
"=",
"fromAtoB",
".",
"getR",
"(",
")",
";",
"Vector3D_F64",
"T",
"=",
"fromAtoB",
".",
"getT",
"(",
")",
";",
... | Computes pixel depth in image 'a' from two observations.
@param a Observation in first frame. In calibrated coordinates. Not modified.
@param b Observation in second frame. In calibrated coordinates. Not modified.
@param fromAtoB Transform from frame a to frame b.
@return Pixel depth in first frame. In same units as... | [
"Computes",
"pixel",
"depth",
"in",
"image",
"a",
"from",
"two",
"observations",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/triangulate/PixelDepthLinearMetric.java#L101-L112 |
50,304 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java | ProjectiveStructureByFactorization.initialize | public void initialize( int numFeatures , int numViews ) {
depths.reshape(numViews,numFeatures);
pixels.reshape(numViews*2,numFeatures);
pixelScale = 0;
} | java | public void initialize( int numFeatures , int numViews ) {
depths.reshape(numViews,numFeatures);
pixels.reshape(numViews*2,numFeatures);
pixelScale = 0;
} | [
"public",
"void",
"initialize",
"(",
"int",
"numFeatures",
",",
"int",
"numViews",
")",
"{",
"depths",
".",
"reshape",
"(",
"numViews",
",",
"numFeatures",
")",
";",
"pixels",
".",
"reshape",
"(",
"numViews",
"*",
"2",
",",
"numFeatures",
")",
";",
"pixe... | Initializes internal data structures. Must be called first
@param numFeatures Number of features
@param numViews Number of views | [
"Initializes",
"internal",
"data",
"structures",
".",
"Must",
"be",
"called",
"first"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java#L98-L102 |
50,305 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java | ProjectiveStructureByFactorization.setPixels | public void setPixels(int view , List<Point2D_F64> pixelsInView ) {
if( pixelsInView.size() != pixels.numCols )
throw new IllegalArgumentException("Pixel count must be constant and match "+pixels.numCols);
int row = view*2;
for (int i = 0; i < pixelsInView.size(); i++) {
Point2D_F64 p = pixelsInView.get(i)... | java | public void setPixels(int view , List<Point2D_F64> pixelsInView ) {
if( pixelsInView.size() != pixels.numCols )
throw new IllegalArgumentException("Pixel count must be constant and match "+pixels.numCols);
int row = view*2;
for (int i = 0; i < pixelsInView.size(); i++) {
Point2D_F64 p = pixelsInView.get(i)... | [
"public",
"void",
"setPixels",
"(",
"int",
"view",
",",
"List",
"<",
"Point2D_F64",
">",
"pixelsInView",
")",
"{",
"if",
"(",
"pixelsInView",
".",
"size",
"(",
")",
"!=",
"pixels",
".",
"numCols",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Pi... | Sets pixel observations for a paricular view
@param view the view
@param pixelsInView list of 2D pixel observations | [
"Sets",
"pixel",
"observations",
"for",
"a",
"paricular",
"view"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java#L109-L120 |
50,306 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java | ProjectiveStructureByFactorization.setDepths | public void setDepths( int view , double featureDepths[] ) {
if( featureDepths.length < depths.numCols )
throw new IllegalArgumentException("Pixel count must be constant and match "+pixels.numCols);
int N = depths.numCols;
for (int i = 0; i < N; i++) {
depths.set(view,i, featureDepths[i]);
}
} | java | public void setDepths( int view , double featureDepths[] ) {
if( featureDepths.length < depths.numCols )
throw new IllegalArgumentException("Pixel count must be constant and match "+pixels.numCols);
int N = depths.numCols;
for (int i = 0; i < N; i++) {
depths.set(view,i, featureDepths[i]);
}
} | [
"public",
"void",
"setDepths",
"(",
"int",
"view",
",",
"double",
"featureDepths",
"[",
"]",
")",
"{",
"if",
"(",
"featureDepths",
".",
"length",
"<",
"depths",
".",
"numCols",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Pixel count must be constant... | Sets depths for a particular value to the values in the passed in array
@param view
@param featureDepths | [
"Sets",
"depths",
"for",
"a",
"particular",
"value",
"to",
"the",
"values",
"in",
"the",
"passed",
"in",
"array"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java#L135-L143 |
50,307 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java | ProjectiveStructureByFactorization.setDepthsFrom3D | public void setDepthsFrom3D(int view , List<Point3D_F64> locations ) {
if( locations.size() != pixels.numCols )
throw new IllegalArgumentException("Pixel count must be constant and match "+pixels.numCols);
int N = depths.numCols;
for (int i = 0; i < N; i++) {
depths.set(view,i, locations.get(i).z );
}
} | java | public void setDepthsFrom3D(int view , List<Point3D_F64> locations ) {
if( locations.size() != pixels.numCols )
throw new IllegalArgumentException("Pixel count must be constant and match "+pixels.numCols);
int N = depths.numCols;
for (int i = 0; i < N; i++) {
depths.set(view,i, locations.get(i).z );
}
} | [
"public",
"void",
"setDepthsFrom3D",
"(",
"int",
"view",
",",
"List",
"<",
"Point3D_F64",
">",
"locations",
")",
"{",
"if",
"(",
"locations",
".",
"size",
"(",
")",
"!=",
"pixels",
".",
"numCols",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Pi... | Assigns depth to the z value of all the features in the list. Features must be in the coordinate system
of the view for this to be correct
@param view which view is features are in
@param locations Location of features in the view's reference frame | [
"Assigns",
"depth",
"to",
"the",
"z",
"value",
"of",
"all",
"the",
"features",
"in",
"the",
"list",
".",
"Features",
"must",
"be",
"in",
"the",
"coordinate",
"system",
"of",
"the",
"view",
"for",
"this",
"to",
"be",
"correct"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java#L151-L159 |
50,308 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java | ProjectiveStructureByFactorization.process | public boolean process() {
int numViews = depths.numRows;
int numFeatures = depths.numCols;
P.reshape(3*numViews,4);
X.reshape(4,numFeatures);
A.reshape(numViews*3,numFeatures);
B.reshape(numViews*3,numFeatures);
// Scale depths so that they are close to unity
normalizeDepths(depths);
// Compute th... | java | public boolean process() {
int numViews = depths.numRows;
int numFeatures = depths.numCols;
P.reshape(3*numViews,4);
X.reshape(4,numFeatures);
A.reshape(numViews*3,numFeatures);
B.reshape(numViews*3,numFeatures);
// Scale depths so that they are close to unity
normalizeDepths(depths);
// Compute th... | [
"public",
"boolean",
"process",
"(",
")",
"{",
"int",
"numViews",
"=",
"depths",
".",
"numRows",
";",
"int",
"numFeatures",
"=",
"depths",
".",
"numCols",
";",
"P",
".",
"reshape",
"(",
"3",
"*",
"numViews",
",",
"4",
")",
";",
"X",
".",
"reshape",
... | Performs iteration to find camera matrices and feature locations in world frame
@return true if no exception was thrown. Does not mean it converged to a valid solution | [
"Performs",
"iteration",
"to",
"find",
"camera",
"matrices",
"and",
"feature",
"locations",
"in",
"world",
"frame"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java#L165-L212 |
50,309 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java | ProjectiveStructureByFactorization.getCameraMatrix | public void getCameraMatrix(int view , DMatrixRMaj cameraMatrix ) {
cameraMatrix.reshape(3,4);
CommonOps_DDRM.extract(P,view*3,0,cameraMatrix);
for (int col = 0; col < 4; col++) {
cameraMatrix.data[cameraMatrix.getIndex(0,col)] *= pixelScale;
cameraMatrix.data[cameraMatrix.getIndex(1,col)] *= pixelScale;
... | java | public void getCameraMatrix(int view , DMatrixRMaj cameraMatrix ) {
cameraMatrix.reshape(3,4);
CommonOps_DDRM.extract(P,view*3,0,cameraMatrix);
for (int col = 0; col < 4; col++) {
cameraMatrix.data[cameraMatrix.getIndex(0,col)] *= pixelScale;
cameraMatrix.data[cameraMatrix.getIndex(1,col)] *= pixelScale;
... | [
"public",
"void",
"getCameraMatrix",
"(",
"int",
"view",
",",
"DMatrixRMaj",
"cameraMatrix",
")",
"{",
"cameraMatrix",
".",
"reshape",
"(",
"3",
",",
"4",
")",
";",
"CommonOps_DDRM",
".",
"extract",
"(",
"P",
",",
"view",
"*",
"3",
",",
"0",
",",
"came... | Used to get found camera matrix for a view
@param view Which view
@param cameraMatrix storage for 3x4 projective camera matrix | [
"Used",
"to",
"get",
"found",
"camera",
"matrix",
"for",
"a",
"view"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java#L219-L227 |
50,310 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java | ProjectiveStructureByFactorization.getFeature3D | public void getFeature3D( int feature , Point4D_F64 out ) {
out.x = X.get(0,feature);
out.y = X.get(1,feature);
out.z = X.get(2,feature);
out.w = X.get(3,feature);
} | java | public void getFeature3D( int feature , Point4D_F64 out ) {
out.x = X.get(0,feature);
out.y = X.get(1,feature);
out.z = X.get(2,feature);
out.w = X.get(3,feature);
} | [
"public",
"void",
"getFeature3D",
"(",
"int",
"feature",
",",
"Point4D_F64",
"out",
")",
"{",
"out",
".",
"x",
"=",
"X",
".",
"get",
"(",
"0",
",",
"feature",
")",
";",
"out",
".",
"y",
"=",
"X",
".",
"get",
"(",
"1",
",",
"feature",
")",
";",
... | Returns location of 3D feature for a view
@param feature Index of feature to retrieve
@param out (Output) Storage for 3D feature. homogenous coordinates | [
"Returns",
"location",
"of",
"3D",
"feature",
"for",
"a",
"view"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java#L234-L239 |
50,311 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/disparity/impl/ImplDisparityScoreSadRectFive_U8.java | ImplDisparityScoreSadRectFive_U8.computeScoreFive | protected void computeScoreFive( int top[] , int middle[] , int bottom[] , int score[] , int width ) {
// disparity as the outer loop to maximize common elements in inner loops, reducing redundant calculations
for( int d = minDisparity; d < maxDisparity; d++ ) {
// take in account the different in image border... | java | protected void computeScoreFive( int top[] , int middle[] , int bottom[] , int score[] , int width ) {
// disparity as the outer loop to maximize common elements in inner loops, reducing redundant calculations
for( int d = minDisparity; d < maxDisparity; d++ ) {
// take in account the different in image border... | [
"protected",
"void",
"computeScoreFive",
"(",
"int",
"top",
"[",
"]",
",",
"int",
"middle",
"[",
"]",
",",
"int",
"bottom",
"[",
"]",
",",
"int",
"score",
"[",
"]",
",",
"int",
"width",
")",
"{",
"// disparity as the outer loop to maximize common elements in i... | Compute the final score by sampling the 5 regions. Four regions are sampled around the center
region. Out of those four only the two with the smallest score are used. | [
"Compute",
"the",
"final",
"score",
"by",
"sampling",
"the",
"5",
"regions",
".",
"Four",
"regions",
"are",
"sampled",
"around",
"the",
"center",
"region",
".",
"Out",
"of",
"those",
"four",
"only",
"the",
"two",
"with",
"the",
"smallest",
"score",
"are",
... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/disparity/impl/ImplDisparityScoreSadRectFive_U8.java#L149-L194 |
50,312 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalTransfer.java | TrifocalTransfer.setTrifocal | public void setTrifocal(TrifocalTensor tensor ) {
this.tensor = tensor;
extract.setTensor(tensor);
extract.extractFundmental(F21,F31);
} | java | public void setTrifocal(TrifocalTensor tensor ) {
this.tensor = tensor;
extract.setTensor(tensor);
extract.extractFundmental(F21,F31);
} | [
"public",
"void",
"setTrifocal",
"(",
"TrifocalTensor",
"tensor",
")",
"{",
"this",
".",
"tensor",
"=",
"tensor",
";",
"extract",
".",
"setTensor",
"(",
"tensor",
")",
";",
"extract",
".",
"extractFundmental",
"(",
"F21",
",",
"F31",
")",
";",
"}"
] | Specify the trifocaltensor
@param tensor tensor | [
"Specify",
"the",
"trifocaltensor"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalTransfer.java#L59-L63 |
50,313 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalTransfer.java | TrifocalTransfer.transfer_1_to_3 | public void transfer_1_to_3(double x1 , double y1 ,
double x2 , double y2 , Point3D_F64 p3)
{
// Adjust the observations so that they lie on the epipolar lines exactly
adjuster.process(F21,x1,y1,x2,y2,pa,pb);
GeometryMath_F64.mult(F21,pa,la);
// line through pb and perpendicular to la
l.x = la.y;
... | java | public void transfer_1_to_3(double x1 , double y1 ,
double x2 , double y2 , Point3D_F64 p3)
{
// Adjust the observations so that they lie on the epipolar lines exactly
adjuster.process(F21,x1,y1,x2,y2,pa,pb);
GeometryMath_F64.mult(F21,pa,la);
// line through pb and perpendicular to la
l.x = la.y;
... | [
"public",
"void",
"transfer_1_to_3",
"(",
"double",
"x1",
",",
"double",
"y1",
",",
"double",
"x2",
",",
"double",
"y2",
",",
"Point3D_F64",
"p3",
")",
"{",
"// Adjust the observations so that they lie on the epipolar lines exactly",
"adjuster",
".",
"process",
"(",
... | Transfer a point to third view give its observed location in view one and two.
@param x1 (Input) Observation in view 1. pixels.
@param y1 (Input) Observation in view 1. pixels.
@param x2 (Input) Observation in view 2. pixels.
@param y2 (Input) Observation in view 2. pixels.
@param p3 (Output) Estimated location in vie... | [
"Transfer",
"a",
"point",
"to",
"third",
"view",
"give",
"its",
"observed",
"location",
"in",
"view",
"one",
"and",
"two",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalTransfer.java#L74-L88 |
50,314 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalTransfer.java | TrifocalTransfer.transfer_1_to_2 | public void transfer_1_to_2(double x1 , double y1 ,
double x3 , double y3 , Point3D_F64 p2)
{
// Adjust the observations so that they lie on the epipolar lines exactly
adjuster.process(F31,x1,y1,x3,y3,pa,pb);
GeometryMath_F64.multTran(F31,pa,la);
// line through pb and perpendicular to la
l.x = la.... | java | public void transfer_1_to_2(double x1 , double y1 ,
double x3 , double y3 , Point3D_F64 p2)
{
// Adjust the observations so that they lie on the epipolar lines exactly
adjuster.process(F31,x1,y1,x3,y3,pa,pb);
GeometryMath_F64.multTran(F31,pa,la);
// line through pb and perpendicular to la
l.x = la.... | [
"public",
"void",
"transfer_1_to_2",
"(",
"double",
"x1",
",",
"double",
"y1",
",",
"double",
"x3",
",",
"double",
"y3",
",",
"Point3D_F64",
"p2",
")",
"{",
"// Adjust the observations so that they lie on the epipolar lines exactly",
"adjuster",
".",
"process",
"(",
... | Transfer a point to third view give its observed location in view one and three.
@param x1 (Input) Observation in view 1. pixels.
@param y1 (Input) Observation in view 1. pixels.
@param x3 (Input) Observation in view 3. pixels.
@param y3 (Input) Observation in view 3. pixels.
@param p2 (Output) Estimated location in v... | [
"Transfer",
"a",
"point",
"to",
"third",
"view",
"give",
"its",
"observed",
"location",
"in",
"view",
"one",
"and",
"three",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalTransfer.java#L99-L113 |
50,315 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/deepboof/BaseImageClassifier.java | BaseImageClassifier.classify | @Override
public void classify(Planar<GrayF32> image) {
DataManipulationOps.imageToTensor(preprocess(image),tensorInput,0);
innerProcess(tensorInput);
} | java | @Override
public void classify(Planar<GrayF32> image) {
DataManipulationOps.imageToTensor(preprocess(image),tensorInput,0);
innerProcess(tensorInput);
} | [
"@",
"Override",
"public",
"void",
"classify",
"(",
"Planar",
"<",
"GrayF32",
">",
"image",
")",
"{",
"DataManipulationOps",
".",
"imageToTensor",
"(",
"preprocess",
"(",
"image",
")",
",",
"tensorInput",
",",
"0",
")",
";",
"innerProcess",
"(",
"tensorInput... | The original implementation takes in an image then crops it randomly. This is primarily for training but is
replicated here to reduce the number of differences
@param image Image being processed. Must be RGB image. Pixel values must have values from 0 to 255. | [
"The",
"original",
"implementation",
"takes",
"in",
"an",
"image",
"then",
"crops",
"it",
"randomly",
".",
"This",
"is",
"primarily",
"for",
"training",
"but",
"is",
"replicated",
"here",
"to",
"reduce",
"the",
"number",
"of",
"differences"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/deepboof/BaseImageClassifier.java#L95-L99 |
50,316 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/disparity/impl/UtilDisparityScore.java | UtilDisparityScore.computeScoreRow | public static void computeScoreRow(GrayU8 left, GrayU8 right, int row, int[] scores,
int minDisparity , int maxDisparity , int regionWidth ,
int elementScore[] ) {
// disparity as the outer loop to maximize common elements in inner loops, reducing redundant calculations
for( int d = minDisp... | java | public static void computeScoreRow(GrayU8 left, GrayU8 right, int row, int[] scores,
int minDisparity , int maxDisparity , int regionWidth ,
int elementScore[] ) {
// disparity as the outer loop to maximize common elements in inner loops, reducing redundant calculations
for( int d = minDisp... | [
"public",
"static",
"void",
"computeScoreRow",
"(",
"GrayU8",
"left",
",",
"GrayU8",
"right",
",",
"int",
"row",
",",
"int",
"[",
"]",
"scores",
",",
"int",
"minDisparity",
",",
"int",
"maxDisparity",
",",
"int",
"regionWidth",
",",
"int",
"elementScore",
... | Computes disparity score for an entire row.
For a given disparity, the score for each region on the left share many components in common.
Because of this the scores are computed with disparity being the outer most loop
@param left left image
@param right Right image
@param row Image row being examined
@param scores S... | [
"Computes",
"disparity",
"score",
"for",
"an",
"entire",
"row",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/disparity/impl/UtilDisparityScore.java#L47-L80 |
50,317 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/disparity/impl/UtilDisparityScore.java | UtilDisparityScore.computeScoreRowSad | public static void computeScoreRowSad(GrayF32 left, GrayF32 right,
int elementMax, int indexLeft, int indexRight,
float elementScore[])
{
for( int rCol = 0; rCol < elementMax; rCol++ ) {
float diff = (left.data[ indexLeft++ ]) - (right.data[ indexRight++ ]);
elementScore[rCol] = Math.a... | java | public static void computeScoreRowSad(GrayF32 left, GrayF32 right,
int elementMax, int indexLeft, int indexRight,
float elementScore[])
{
for( int rCol = 0; rCol < elementMax; rCol++ ) {
float diff = (left.data[ indexLeft++ ]) - (right.data[ indexRight++ ]);
elementScore[rCol] = Math.a... | [
"public",
"static",
"void",
"computeScoreRowSad",
"(",
"GrayF32",
"left",
",",
"GrayF32",
"right",
",",
"int",
"elementMax",
",",
"int",
"indexLeft",
",",
"int",
"indexRight",
",",
"float",
"elementScore",
"[",
"]",
")",
"{",
"for",
"(",
"int",
"rCol",
"="... | compute the score for each element all at once to encourage the JVM to optimize and
encourage the JVM to optimize this section of code.
Was original inline, but was actually slightly slower by about 3% consistently, It
is in its own function so that it can be overridden and have different cost functions
inserted easi... | [
"compute",
"the",
"score",
"for",
"each",
"element",
"all",
"at",
"once",
"to",
"encourage",
"the",
"JVM",
"to",
"optimize",
"and",
"encourage",
"the",
"JVM",
"to",
"optimize",
"this",
"section",
"of",
"code",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/disparity/impl/UtilDisparityScore.java#L228-L237 |
50,318 | lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/sfm/ExamplePnP.java | ExamplePnP.estimateOutliers | public Se3_F64 estimateOutliers( List<Point2D3D> observations ) {
// We can no longer trust that each point is a real observation. Let's use RANSAC to separate the points
// You will need to tune the number of iterations and inlier threshold!!!
ModelMatcherMultiview<Se3_F64,Point2D3D> ransac =
FactoryMultiVi... | java | public Se3_F64 estimateOutliers( List<Point2D3D> observations ) {
// We can no longer trust that each point is a real observation. Let's use RANSAC to separate the points
// You will need to tune the number of iterations and inlier threshold!!!
ModelMatcherMultiview<Se3_F64,Point2D3D> ransac =
FactoryMultiVi... | [
"public",
"Se3_F64",
"estimateOutliers",
"(",
"List",
"<",
"Point2D3D",
">",
"observations",
")",
"{",
"// We can no longer trust that each point is a real observation. Let's use RANSAC to separate the points",
"// You will need to tune the number of iterations and inlier threshold!!!",
"... | Uses robust techniques to remove outliers | [
"Uses",
"robust",
"techniques",
"to",
"remove",
"outliers"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/sfm/ExamplePnP.java#L117-L141 |
50,319 | lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/sfm/ExamplePnP.java | ExamplePnP.addOutliers | public void addOutliers( List<Point2D3D> observations , int total ) {
int size = observations.size();
for (int i = 0; i < total; i++) {
// outliers will be created by adding lots of noise to real observations
Point2D3D p = observations.get(rand.nextInt(size));
Point2D3D o = new Point2D3D();
o.observa... | java | public void addOutliers( List<Point2D3D> observations , int total ) {
int size = observations.size();
for (int i = 0; i < total; i++) {
// outliers will be created by adding lots of noise to real observations
Point2D3D p = observations.get(rand.nextInt(size));
Point2D3D o = new Point2D3D();
o.observa... | [
"public",
"void",
"addOutliers",
"(",
"List",
"<",
"Point2D3D",
">",
"observations",
",",
"int",
"total",
")",
"{",
"int",
"size",
"=",
"observations",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"total",
";",
"i",
... | Adds some really bad observations to the mix | [
"Adds",
"some",
"really",
"bad",
"observations",
"to",
"the",
"mix"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/sfm/ExamplePnP.java#L192-L211 |
50,320 | lessthanoptimal/BoofCV | integration/boofcv-swing/src/main/java/boofcv/gui/SelectAlgorithmAndInputPanel.java | SelectAlgorithmAndInputPanel.loadInputData | @Override
public void loadInputData(String fileName) {
Reader r = media.openFile(fileName);
List<PathLabel> refs = new ArrayList<>();
try {
BufferedReader reader = new BufferedReader(r);
String line;
while( (line = reader.readLine()) != null ) {
String[]z = line.split(":");
String[] names = n... | java | @Override
public void loadInputData(String fileName) {
Reader r = media.openFile(fileName);
List<PathLabel> refs = new ArrayList<>();
try {
BufferedReader reader = new BufferedReader(r);
String line;
while( (line = reader.readLine()) != null ) {
String[]z = line.split(":");
String[] names = n... | [
"@",
"Override",
"public",
"void",
"loadInputData",
"(",
"String",
"fileName",
")",
"{",
"Reader",
"r",
"=",
"media",
".",
"openFile",
"(",
"fileName",
")",
";",
"List",
"<",
"PathLabel",
">",
"refs",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"try"... | Loads a standardized file for input references
@param fileName path to config file | [
"Loads",
"a",
"standardized",
"file",
"for",
"input",
"references"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/SelectAlgorithmAndInputPanel.java#L108-L133 |
50,321 | lessthanoptimal/BoofCV | integration/boofcv-swing/src/main/java/boofcv/gui/SelectAlgorithmAndInputPanel.java | SelectAlgorithmAndInputPanel.addToToolbar | public void addToToolbar( JComponent comp ) {
toolbar.add(comp,1+algBoxes.length);
toolbar.revalidate();
addedComponents.add(comp);
} | java | public void addToToolbar( JComponent comp ) {
toolbar.add(comp,1+algBoxes.length);
toolbar.revalidate();
addedComponents.add(comp);
} | [
"public",
"void",
"addToToolbar",
"(",
"JComponent",
"comp",
")",
"{",
"toolbar",
".",
"add",
"(",
"comp",
",",
"1",
"+",
"algBoxes",
".",
"length",
")",
";",
"toolbar",
".",
"revalidate",
"(",
")",
";",
"addedComponents",
".",
"add",
"(",
"comp",
")",... | Adds a new component into the toolbar.
@param comp The component being added | [
"Adds",
"a",
"new",
"component",
"into",
"the",
"toolbar",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/SelectAlgorithmAndInputPanel.java#L147-L151 |
50,322 | lessthanoptimal/BoofCV | integration/boofcv-swing/src/main/java/boofcv/gui/SelectAlgorithmAndInputPanel.java | SelectAlgorithmAndInputPanel.setMainGUI | public void setMainGUI( final Component gui ) {
postAlgorithmEvents = true;
this.gui = gui;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
add(gui,BorderLayout.CENTER);
}});
} | java | public void setMainGUI( final Component gui ) {
postAlgorithmEvents = true;
this.gui = gui;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
add(gui,BorderLayout.CENTER);
}});
} | [
"public",
"void",
"setMainGUI",
"(",
"final",
"Component",
"gui",
")",
"{",
"postAlgorithmEvents",
"=",
"true",
";",
"this",
".",
"gui",
"=",
"gui",
";",
"SwingUtilities",
".",
"invokeLater",
"(",
"new",
"Runnable",
"(",
")",
"{",
"public",
"void",
"run",
... | Used to add the main GUI to this panel. Must use this function.
Algorithm change events will not be posted until this function has been set.
@param gui The main GUI being displayed. | [
"Used",
"to",
"add",
"the",
"main",
"GUI",
"to",
"this",
"panel",
".",
"Must",
"use",
"this",
"function",
".",
"Algorithm",
"change",
"events",
"will",
"not",
"be",
"posted",
"until",
"this",
"function",
"has",
"been",
"set",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/SelectAlgorithmAndInputPanel.java#L165-L172 |
50,323 | lessthanoptimal/BoofCV | integration/boofcv-swing/src/main/java/boofcv/gui/SelectAlgorithmAndInputPanel.java | SelectAlgorithmAndInputPanel.setInputImage | public void setInputImage( BufferedImage image ) {
inputImage = image;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
if( inputImage == null ) {
originalCheck.setEnabled(false);
} else {
originalCheck.setEnabled(true);
origPanel.setImage(inputImage);
origPanel.setPref... | java | public void setInputImage( BufferedImage image ) {
inputImage = image;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
if( inputImage == null ) {
originalCheck.setEnabled(false);
} else {
originalCheck.setEnabled(true);
origPanel.setImage(inputImage);
origPanel.setPref... | [
"public",
"void",
"setInputImage",
"(",
"BufferedImage",
"image",
")",
"{",
"inputImage",
"=",
"image",
";",
"SwingUtilities",
".",
"invokeLater",
"(",
"new",
"Runnable",
"(",
")",
"{",
"public",
"void",
"run",
"(",
")",
"{",
"if",
"(",
"inputImage",
"==",... | Specifies an image which contains the original input image. After this has been called the
view input image widget is activated and when selected this image will be displayed instead
of the main GUI. This functionality is optional.
@param image Original input image. | [
"Specifies",
"an",
"image",
"which",
"contains",
"the",
"original",
"input",
"image",
".",
"After",
"this",
"has",
"been",
"called",
"the",
"view",
"input",
"image",
"widget",
"is",
"activated",
"and",
"when",
"selected",
"this",
"image",
"will",
"be",
"disp... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/SelectAlgorithmAndInputPanel.java#L181-L194 |
50,324 | lessthanoptimal/BoofCV | integration/boofcv-swing/src/main/java/boofcv/gui/SelectAlgorithmAndInputPanel.java | SelectAlgorithmAndInputPanel.setInputList | public void setInputList(final List<PathLabel> inputRefs) {
this.inputRefs = inputRefs;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
for( int i = 0; i < inputRefs.size(); i++ ) {
imageBox.addItem(inputRefs.get(i).getLabel());
}
}});
} | java | public void setInputList(final List<PathLabel> inputRefs) {
this.inputRefs = inputRefs;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
for( int i = 0; i < inputRefs.size(); i++ ) {
imageBox.addItem(inputRefs.get(i).getLabel());
}
}});
} | [
"public",
"void",
"setInputList",
"(",
"final",
"List",
"<",
"PathLabel",
">",
"inputRefs",
")",
"{",
"this",
".",
"inputRefs",
"=",
"inputRefs",
";",
"SwingUtilities",
".",
"invokeLater",
"(",
"new",
"Runnable",
"(",
")",
"{",
"public",
"void",
"run",
"("... | Specifies a list of images to use as input and loads them
@param inputRefs Name of input and where to get it | [
"Specifies",
"a",
"list",
"of",
"images",
"to",
"use",
"as",
"input",
"and",
"loads",
"them"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/SelectAlgorithmAndInputPanel.java#L201-L210 |
50,325 | lessthanoptimal/BoofCV | integration/boofcv-swing/src/main/java/boofcv/gui/SelectAlgorithmAndInputPanel.java | SelectAlgorithmAndInputPanel.getAlgorithmCookie | protected <T> T getAlgorithmCookie( int indexFamily ) {
return (T)algCookies[indexFamily].get( algBoxes[indexFamily].getSelectedIndex() );
} | java | protected <T> T getAlgorithmCookie( int indexFamily ) {
return (T)algCookies[indexFamily].get( algBoxes[indexFamily].getSelectedIndex() );
} | [
"protected",
"<",
"T",
">",
"T",
"getAlgorithmCookie",
"(",
"int",
"indexFamily",
")",
"{",
"return",
"(",
"T",
")",
"algCookies",
"[",
"indexFamily",
"]",
".",
"get",
"(",
"algBoxes",
"[",
"indexFamily",
"]",
".",
"getSelectedIndex",
"(",
")",
")",
";",... | Returns the cookie associated with the specified algorithm family. | [
"Returns",
"the",
"cookie",
"associated",
"with",
"the",
"specified",
"algorithm",
"family",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/SelectAlgorithmAndInputPanel.java#L266-L268 |
50,326 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java | BaseDetectFiducialSquare.checkSideSize | private boolean checkSideSize( Polygon2D_F64 p ) {
double max=0,min=Double.MAX_VALUE;
for (int i = 0; i < p.size(); i++) {
double l = p.getSideLength(i);
max = Math.max(max,l);
min = Math.min(min,l);
}
// See if a side is too small to decode
if( min < 10 )
return false;
// see if it's under e... | java | private boolean checkSideSize( Polygon2D_F64 p ) {
double max=0,min=Double.MAX_VALUE;
for (int i = 0; i < p.size(); i++) {
double l = p.getSideLength(i);
max = Math.max(max,l);
min = Math.min(min,l);
}
// See if a side is too small to decode
if( min < 10 )
return false;
// see if it's under e... | [
"private",
"boolean",
"checkSideSize",
"(",
"Polygon2D_F64",
"p",
")",
"{",
"double",
"max",
"=",
"0",
",",
"min",
"=",
"Double",
".",
"MAX_VALUE",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"p",
".",
"size",
"(",
")",
";",
"i",
"++",
... | Sanity check the polygon based on the size of its sides to see if it could be a fiducial that can
be decoded | [
"Sanity",
"check",
"the",
"polygon",
"based",
"on",
"the",
"size",
"of",
"its",
"sides",
"to",
"see",
"if",
"it",
"could",
"be",
"a",
"fiducial",
"that",
"can",
"be",
"decoded"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java#L325-L340 |
50,327 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java | BaseDetectFiducialSquare.computeFractionBoundary | protected double computeFractionBoundary( float pixelThreshold ) {
// TODO ignore outer pixels from this computation. Will require 8 regions (4 corners + top/bottom + left/right)
final int w = square.width;
int radius = (int) (w * borderWidthFraction);
int innerWidth = w-2*radius;
int total = w*w - innerWid... | java | protected double computeFractionBoundary( float pixelThreshold ) {
// TODO ignore outer pixels from this computation. Will require 8 regions (4 corners + top/bottom + left/right)
final int w = square.width;
int radius = (int) (w * borderWidthFraction);
int innerWidth = w-2*radius;
int total = w*w - innerWid... | [
"protected",
"double",
"computeFractionBoundary",
"(",
"float",
"pixelThreshold",
")",
"{",
"// TODO ignore outer pixels from this computation. Will require 8 regions (4 corners + top/bottom + left/right)",
"final",
"int",
"w",
"=",
"square",
".",
"width",
";",
"int",
"radius",
... | Computes the fraction of pixels inside the image border which are black
@param pixelThreshold Pixel's less than this value are considered black
@return fraction of border that's black | [
"Computes",
"the",
"fraction",
"of",
"pixels",
"inside",
"the",
"image",
"border",
"which",
"are",
"black"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java#L359-L392 |
50,328 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java | BaseDetectFiducialSquare.prepareForOutput | private void prepareForOutput(Polygon2D_F64 imageShape, Result result) {
// the rotation estimate, apply in counter clockwise direction
// since result.rotation is a clockwise rotation in the visual sense, which
// is CCW on the grid
int rotationCCW = (4-result.rotation)%4;
for (int j = 0; j < rotationCCW; j+... | java | private void prepareForOutput(Polygon2D_F64 imageShape, Result result) {
// the rotation estimate, apply in counter clockwise direction
// since result.rotation is a clockwise rotation in the visual sense, which
// is CCW on the grid
int rotationCCW = (4-result.rotation)%4;
for (int j = 0; j < rotationCCW; j+... | [
"private",
"void",
"prepareForOutput",
"(",
"Polygon2D_F64",
"imageShape",
",",
"Result",
"result",
")",
"{",
"// the rotation estimate, apply in counter clockwise direction",
"// since result.rotation is a clockwise rotation in the visual sense, which",
"// is CCW on the grid",
"int",
... | Takes the found quadrilateral and the computed 3D information and prepares it for output | [
"Takes",
"the",
"found",
"quadrilateral",
"and",
"the",
"computed",
"3D",
"information",
"and",
"prepares",
"it",
"for",
"output"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java#L397-L414 |
50,329 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/segmentation/ms/MergeRegionMeanShift.java | MergeRegionMeanShift.process | public void process( GrayS32 pixelToRegion ,
GrowQueue_I32 regionMemberCount,
FastQueue<float[]> regionColor ,
FastQueue<Point2D_I32> modeLocation ) {
stopRequested = false;
initializeMerge(regionMemberCount.size);
markMergeRegions(regionColor,modeLocation,pixelToRegion);
if( stopRequested... | java | public void process( GrayS32 pixelToRegion ,
GrowQueue_I32 regionMemberCount,
FastQueue<float[]> regionColor ,
FastQueue<Point2D_I32> modeLocation ) {
stopRequested = false;
initializeMerge(regionMemberCount.size);
markMergeRegions(regionColor,modeLocation,pixelToRegion);
if( stopRequested... | [
"public",
"void",
"process",
"(",
"GrayS32",
"pixelToRegion",
",",
"GrowQueue_I32",
"regionMemberCount",
",",
"FastQueue",
"<",
"float",
"[",
"]",
">",
"regionColor",
",",
"FastQueue",
"<",
"Point2D_I32",
">",
"modeLocation",
")",
"{",
"stopRequested",
"=",
"fal... | Merges together similar regions which are in close proximity to each other. After merging
most of the input data structures are modified to take in account the changes.
@param pixelToRegion (Input/output) Image that specifies the segmentation. Modified.
@param regionMemberCount (Input/output) Number of pixels in ea... | [
"Merges",
"together",
"similar",
"regions",
"which",
"are",
"in",
"close",
"proximity",
"to",
"each",
"other",
".",
"After",
"merging",
"most",
"of",
"the",
"input",
"data",
"structures",
"are",
"modified",
"to",
"take",
"in",
"account",
"the",
"changes",
".... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/segmentation/ms/MergeRegionMeanShift.java#L65-L77 |
50,330 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/segmentation/ms/MergeRegionMeanShift.java | MergeRegionMeanShift.markMergeRegions | protected void markMergeRegions(FastQueue<float[]> regionColor,
FastQueue<Point2D_I32> modeLocation,
GrayS32 pixelToRegion ) {
for( int targetId = 0; targetId < modeLocation.size &&!stopRequested; targetId++ ) {
float[] color = regionColor.get(targetId);
Point2D_I32 location = modeLocation.g... | java | protected void markMergeRegions(FastQueue<float[]> regionColor,
FastQueue<Point2D_I32> modeLocation,
GrayS32 pixelToRegion ) {
for( int targetId = 0; targetId < modeLocation.size &&!stopRequested; targetId++ ) {
float[] color = regionColor.get(targetId);
Point2D_I32 location = modeLocation.g... | [
"protected",
"void",
"markMergeRegions",
"(",
"FastQueue",
"<",
"float",
"[",
"]",
">",
"regionColor",
",",
"FastQueue",
"<",
"Point2D_I32",
">",
"modeLocation",
",",
"GrayS32",
"pixelToRegion",
")",
"{",
"for",
"(",
"int",
"targetId",
"=",
"0",
";",
"target... | Takes the mode of a region and searches the local area around it for other regions. If the region's mode
is also within the local area its color is checked to see if it's similar enough. If the color is similar
enough then the two regions are marked for merger. | [
"Takes",
"the",
"mode",
"of",
"a",
"region",
"and",
"searches",
"the",
"local",
"area",
"around",
"it",
"for",
"other",
"regions",
".",
"If",
"the",
"region",
"s",
"mode",
"is",
"also",
"within",
"the",
"local",
"area",
"its",
"color",
"is",
"checked",
... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/segmentation/ms/MergeRegionMeanShift.java#L84-L129 |
50,331 | lessthanoptimal/BoofCV | integration/boofcv-jcodec/src/main/java/boofcv/io/jcodec/UtilJCodec.java | UtilJCodec.convertToBoof | public static void convertToBoof(Picture input, ImageBase output) {
if( input.getColor() == ColorSpace.RGB ) {
ImplConvertJCodecPicture.RGB_to_PLU8(input, (Planar) output);
} else if( input.getColor() == ColorSpace.YUV420 ) {
if( output instanceof Planar) {
Planar ms = (Planar)output;
if( ms.getImageT... | java | public static void convertToBoof(Picture input, ImageBase output) {
if( input.getColor() == ColorSpace.RGB ) {
ImplConvertJCodecPicture.RGB_to_PLU8(input, (Planar) output);
} else if( input.getColor() == ColorSpace.YUV420 ) {
if( output instanceof Planar) {
Planar ms = (Planar)output;
if( ms.getImageT... | [
"public",
"static",
"void",
"convertToBoof",
"(",
"Picture",
"input",
",",
"ImageBase",
"output",
")",
"{",
"if",
"(",
"input",
".",
"getColor",
"(",
")",
"==",
"ColorSpace",
".",
"RGB",
")",
"{",
"ImplConvertJCodecPicture",
".",
"RGB_to_PLU8",
"(",
"input",... | Converts an image in JCodec format into one in BoofCV format.
@param input JCodec image
@param output BoofCV image | [
"Converts",
"an",
"image",
"in",
"JCodec",
"format",
"into",
"one",
"in",
"BoofCV",
"format",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-jcodec/src/main/java/boofcv/io/jcodec/UtilJCodec.java#L34-L53 |
50,332 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/PositionFromPairLinear2.java | PositionFromPairLinear2.process | public boolean process( DMatrixRMaj R , List<Point3D_F64> worldPts , List<Point2D_F64> observed )
{
if( worldPts.size() != observed.size() )
throw new IllegalArgumentException("Number of worldPts and observed must be the same");
if( worldPts.size() < 2 )
throw new IllegalArgumentException("A minimum of two p... | java | public boolean process( DMatrixRMaj R , List<Point3D_F64> worldPts , List<Point2D_F64> observed )
{
if( worldPts.size() != observed.size() )
throw new IllegalArgumentException("Number of worldPts and observed must be the same");
if( worldPts.size() < 2 )
throw new IllegalArgumentException("A minimum of two p... | [
"public",
"boolean",
"process",
"(",
"DMatrixRMaj",
"R",
",",
"List",
"<",
"Point3D_F64",
">",
"worldPts",
",",
"List",
"<",
"Point2D_F64",
">",
"observed",
")",
"{",
"if",
"(",
"worldPts",
".",
"size",
"(",
")",
"!=",
"observed",
".",
"size",
"(",
")"... | Computes the translation given two or more feature observations and the known rotation
@param R Rotation matrix. World to view.
@param worldPts Location of features in world coordinates.
@param observed Observations of point in current view. Normalized coordinates.
@return true if it succeeded. | [
"Computes",
"the",
"translation",
"given",
"two",
"or",
"more",
"feature",
"observations",
"and",
"the",
"known",
"rotation"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/PositionFromPairLinear2.java#L78-L121 |
50,333 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetectorPixel.java | BinaryEllipseDetectorPixel.process | public void process( GrayU8 binary ) {
found.reset();
labeled.reshape(binary.width, binary.height);
contourFinder.process(binary, labeled);
List<ContourPacked> blobs = contourFinder.getContours();
for (int i = 0; i < blobs.size(); i++) {
ContourPacked c = blobs.get(i);
contourFinder.loadContour(c.ext... | java | public void process( GrayU8 binary ) {
found.reset();
labeled.reshape(binary.width, binary.height);
contourFinder.process(binary, labeled);
List<ContourPacked> blobs = contourFinder.getContours();
for (int i = 0; i < blobs.size(); i++) {
ContourPacked c = blobs.get(i);
contourFinder.loadContour(c.ext... | [
"public",
"void",
"process",
"(",
"GrayU8",
"binary",
")",
"{",
"found",
".",
"reset",
"(",
")",
";",
"labeled",
".",
"reshape",
"(",
"binary",
".",
"width",
",",
"binary",
".",
"height",
")",
";",
"contourFinder",
".",
"process",
"(",
"binary",
",",
... | Finds all valid ellipses in the binary image
@param binary binary image | [
"Finds",
"all",
"valid",
"ellipses",
"in",
"the",
"binary",
"image"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetectorPixel.java#L132-L152 |
50,334 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetectorPixel.java | BinaryEllipseDetectorPixel.adjustElipseForBinaryBias | protected void adjustElipseForBinaryBias( EllipseRotated_F64 ellipse ) {
ellipse.center.x += 0.5;
ellipse.center.y += 0.5;
ellipse.a += 0.5;
ellipse.b += 0.5;
} | java | protected void adjustElipseForBinaryBias( EllipseRotated_F64 ellipse ) {
ellipse.center.x += 0.5;
ellipse.center.y += 0.5;
ellipse.a += 0.5;
ellipse.b += 0.5;
} | [
"protected",
"void",
"adjustElipseForBinaryBias",
"(",
"EllipseRotated_F64",
"ellipse",
")",
"{",
"ellipse",
".",
"center",
".",
"x",
"+=",
"0.5",
";",
"ellipse",
".",
"center",
".",
"y",
"+=",
"0.5",
";",
"ellipse",
".",
"a",
"+=",
"0.5",
";",
"ellipse",
... | In a binary image the contour on the right and bottom is off by one pixel. This is because the block region
extends the entire pixel not just the lower extent which is where it is indexed from. | [
"In",
"a",
"binary",
"image",
"the",
"contour",
"on",
"the",
"right",
"and",
"bottom",
"is",
"off",
"by",
"one",
"pixel",
".",
"This",
"is",
"because",
"the",
"block",
"region",
"extends",
"the",
"entire",
"pixel",
"not",
"just",
"the",
"lower",
"extent"... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetectorPixel.java#L210-L216 |
50,335 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetectorPixel.java | BinaryEllipseDetectorPixel.undistortContour | void undistortContour(List<Point2D_I32> external, FastQueue<Point2D_F64> pointsF ) {
for (int j = 0; j < external.size(); j++) {
Point2D_I32 p = external.get(j);
if( distToUndist != null ) {
distToUndist.compute(p.x,p.y,distortedPoint);
pointsF.grow().set( distortedPoint.x , distortedPoint.y );
} el... | java | void undistortContour(List<Point2D_I32> external, FastQueue<Point2D_F64> pointsF ) {
for (int j = 0; j < external.size(); j++) {
Point2D_I32 p = external.get(j);
if( distToUndist != null ) {
distToUndist.compute(p.x,p.y,distortedPoint);
pointsF.grow().set( distortedPoint.x , distortedPoint.y );
} el... | [
"void",
"undistortContour",
"(",
"List",
"<",
"Point2D_I32",
">",
"external",
",",
"FastQueue",
"<",
"Point2D_F64",
">",
"pointsF",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"external",
".",
"size",
"(",
")",
";",
"j",
"++",
")",
"... | Undistort the contour points and convert into a floating point format for the fitting operation
@param external The external contour
@param pointsF Output of converted points | [
"Undistort",
"the",
"contour",
"points",
"and",
"convert",
"into",
"a",
"floating",
"point",
"format",
"for",
"the",
"fitting",
"operation"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetectorPixel.java#L239-L250 |
50,336 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetectorPixel.java | BinaryEllipseDetectorPixel.isApproximatelyElliptical | boolean isApproximatelyElliptical(EllipseRotated_F64 ellipse , List<Point2D_F64> points , int maxSamples ) {
closestPoint.setEllipse(ellipse);
double maxDistance2 = maxDistanceFromEllipse*maxDistanceFromEllipse;
if( points.size() <= maxSamples ) {
for( int i = 0; i < points.size(); i++ ) {
Point2D_F64 p... | java | boolean isApproximatelyElliptical(EllipseRotated_F64 ellipse , List<Point2D_F64> points , int maxSamples ) {
closestPoint.setEllipse(ellipse);
double maxDistance2 = maxDistanceFromEllipse*maxDistanceFromEllipse;
if( points.size() <= maxSamples ) {
for( int i = 0; i < points.size(); i++ ) {
Point2D_F64 p... | [
"boolean",
"isApproximatelyElliptical",
"(",
"EllipseRotated_F64",
"ellipse",
",",
"List",
"<",
"Point2D_F64",
">",
"points",
",",
"int",
"maxSamples",
")",
"{",
"closestPoint",
".",
"setEllipse",
"(",
"ellipse",
")",
";",
"double",
"maxDistance2",
"=",
"maxDistan... | Look at the maximum distance contour points are from the ellipse and see if they exceed a maximum threshold | [
"Look",
"at",
"the",
"maximum",
"distance",
"contour",
"points",
"are",
"from",
"the",
"ellipse",
"and",
"see",
"if",
"they",
"exceed",
"a",
"maximum",
"threshold"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetectorPixel.java#L255-L283 |
50,337 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardPolygonHelper.java | ChessboardPolygonHelper.filterPixelPolygon | @Override
public boolean filterPixelPolygon(Polygon2D_F64 undistorted , Polygon2D_F64 distorted,
GrowQueue_B touches, boolean touchesBorder) {
if( touchesBorder ) {
if( distorted.size() < 3)
return false;
int totalRegular = distorted.size();
for (int i = 0; i < distorted.size(); i++) {
i... | java | @Override
public boolean filterPixelPolygon(Polygon2D_F64 undistorted , Polygon2D_F64 distorted,
GrowQueue_B touches, boolean touchesBorder) {
if( touchesBorder ) {
if( distorted.size() < 3)
return false;
int totalRegular = distorted.size();
for (int i = 0; i < distorted.size(); i++) {
i... | [
"@",
"Override",
"public",
"boolean",
"filterPixelPolygon",
"(",
"Polygon2D_F64",
"undistorted",
",",
"Polygon2D_F64",
"distorted",
",",
"GrowQueue_B",
"touches",
",",
"boolean",
"touchesBorder",
")",
"{",
"if",
"(",
"touchesBorder",
")",
"{",
"if",
"(",
"distorte... | If not touching the border then the number of corners must be 4. If touching the border there must be
at least 3 corners not touching the border. 7 corners at most. If there were 8 then all sides of a square
would be touching the border. No more than 3 corners since that's the most number of non-border corners
a ... | [
"If",
"not",
"touching",
"the",
"border",
"then",
"the",
"number",
"of",
"corners",
"must",
"be",
"4",
".",
"If",
"touching",
"the",
"border",
"there",
"must",
"be",
"at",
"least",
"3",
"corners",
"not",
"touching",
"the",
"border",
".",
"7",
"corners",
... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardPolygonHelper.java#L57-L74 |
50,338 | lessthanoptimal/BoofCV | integration/boofcv-ffmpeg/src/main/java/org/bytedeco/copiedstuff/Java2DFrameConverter.java | Java2DFrameConverter.getFrame | public Frame getFrame(BufferedImage image, double gamma, boolean flipChannels) {
if (image == null) {
return null;
}
SampleModel sm = image.getSampleModel();
int depth = 0, numChannels = sm.getNumBands();
switch (image.getType()) {
case BufferedImage.TYPE_INT_RGB:
case BufferedImage.TYPE_INT_ARGB:
... | java | public Frame getFrame(BufferedImage image, double gamma, boolean flipChannels) {
if (image == null) {
return null;
}
SampleModel sm = image.getSampleModel();
int depth = 0, numChannels = sm.getNumBands();
switch (image.getType()) {
case BufferedImage.TYPE_INT_RGB:
case BufferedImage.TYPE_INT_ARGB:
... | [
"public",
"Frame",
"getFrame",
"(",
"BufferedImage",
"image",
",",
"double",
"gamma",
",",
"boolean",
"flipChannels",
")",
"{",
"if",
"(",
"image",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"SampleModel",
"sm",
"=",
"image",
".",
"getSampleModel"... | Returns a Frame based on a BufferedImage, given gamma, and inverted channels flag. | [
"Returns",
"a",
"Frame",
"based",
"on",
"a",
"BufferedImage",
"given",
"gamma",
"and",
"inverted",
"channels",
"flag",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-ffmpeg/src/main/java/org/bytedeco/copiedstuff/Java2DFrameConverter.java#L680-L712 |
50,339 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldOps.java | GaliosFieldOps.multiply | public static int multiply( int x , int y , int primitive , int domain ) {
int r = 0;
while( y > 0 ) {
if( (y&1) != 0 ) {
r = r ^ x;
}
y = y >> 1;
x = x << 1;
if( x >= domain) {
x ^= primitive;
}
}
return r;
} | java | public static int multiply( int x , int y , int primitive , int domain ) {
int r = 0;
while( y > 0 ) {
if( (y&1) != 0 ) {
r = r ^ x;
}
y = y >> 1;
x = x << 1;
if( x >= domain) {
x ^= primitive;
}
}
return r;
} | [
"public",
"static",
"int",
"multiply",
"(",
"int",
"x",
",",
"int",
"y",
",",
"int",
"primitive",
",",
"int",
"domain",
")",
"{",
"int",
"r",
"=",
"0",
";",
"while",
"(",
"y",
">",
"0",
")",
"{",
"if",
"(",
"(",
"y",
"&",
"1",
")",
"!=",
"0... | Implementation of multiplication with a primitive polynomial. The result will be a member of the same field
as the inputs, provided primitive is an appropriate irreducible polynomial for that field.
Uses 'Russian Peasant Multiplication' that should be a faster algorithm.
@param x polynomial
@param y polynomial
@param... | [
"Implementation",
"of",
"multiplication",
"with",
"a",
"primitive",
"polynomial",
".",
"The",
"result",
"will",
"be",
"a",
"member",
"of",
"the",
"same",
"field",
"as",
"the",
"inputs",
"provided",
"primitive",
"is",
"an",
"appropriate",
"irreducible",
"polynomi... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldOps.java#L76-L90 |
50,340 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/DetectCircleHexagonalGrid.java | DetectCircleHexagonalGrid.isClockWise | private static boolean isClockWise( Grid g ) {
EllipseRotated_F64 v00 = g.get(0,0);
EllipseRotated_F64 v02 = g.columns<3?g.get(1,1):g.get(0,2);
EllipseRotated_F64 v20 = g.rows<3?g.get(1,1):g.get(2,0);
double a_x = v02.center.x - v00.center.x;
double a_y = v02.center.y - v00.center.y;
double b_x = v20.cent... | java | private static boolean isClockWise( Grid g ) {
EllipseRotated_F64 v00 = g.get(0,0);
EllipseRotated_F64 v02 = g.columns<3?g.get(1,1):g.get(0,2);
EllipseRotated_F64 v20 = g.rows<3?g.get(1,1):g.get(2,0);
double a_x = v02.center.x - v00.center.x;
double a_y = v02.center.y - v00.center.y;
double b_x = v20.cent... | [
"private",
"static",
"boolean",
"isClockWise",
"(",
"Grid",
"g",
")",
"{",
"EllipseRotated_F64",
"v00",
"=",
"g",
".",
"get",
"(",
"0",
",",
"0",
")",
";",
"EllipseRotated_F64",
"v02",
"=",
"g",
".",
"columns",
"<",
"3",
"?",
"g",
".",
"get",
"(",
... | Uses the cross product to determine if the grid is in clockwise order | [
"Uses",
"the",
"cross",
"product",
"to",
"determine",
"if",
"the",
"grid",
"is",
"in",
"clockwise",
"order"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/DetectCircleHexagonalGrid.java#L136-L148 |
50,341 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java | FDistort.init | public FDistort init(ImageBase input, ImageBase output) {
this.input = input;
this.output = output;
inputType = input.getImageType();
interp(InterpolationType.BILINEAR);
border(0);
cached = false;
distorter = null;
outputToInput = null;
return this;
} | java | public FDistort init(ImageBase input, ImageBase output) {
this.input = input;
this.output = output;
inputType = input.getImageType();
interp(InterpolationType.BILINEAR);
border(0);
cached = false;
distorter = null;
outputToInput = null;
return this;
} | [
"public",
"FDistort",
"init",
"(",
"ImageBase",
"input",
",",
"ImageBase",
"output",
")",
"{",
"this",
".",
"input",
"=",
"input",
";",
"this",
".",
"output",
"=",
"output",
";",
"inputType",
"=",
"input",
".",
"getImageType",
"(",
")",
";",
"interp",
... | Specifies the input and output image and sets interpolation to BILINEAR, black image border, cache is off. | [
"Specifies",
"the",
"input",
"and",
"output",
"image",
"and",
"sets",
"interpolation",
"to",
"BILINEAR",
"black",
"image",
"border",
"cache",
"is",
"off",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java#L97-L110 |
50,342 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java | FDistort.setRefs | public FDistort setRefs( ImageBase input, ImageBase output ) {
this.input = input;
this.output = output;
inputType = input.getImageType();
return this;
} | java | public FDistort setRefs( ImageBase input, ImageBase output ) {
this.input = input;
this.output = output;
inputType = input.getImageType();
return this;
} | [
"public",
"FDistort",
"setRefs",
"(",
"ImageBase",
"input",
",",
"ImageBase",
"output",
")",
"{",
"this",
".",
"input",
"=",
"input",
";",
"this",
".",
"output",
"=",
"output",
";",
"inputType",
"=",
"input",
".",
"getImageType",
"(",
")",
";",
"return",... | All this does is set the references to the images. Nothing else is changed and its up to the
user to correctly update everything else.
If called the first time you need to do the following
<pre>
1) specify the interpolation method
2) specify the transform
3) specify the border
</pre>
If called again and the image sh... | [
"All",
"this",
"does",
"is",
"set",
"the",
"references",
"to",
"the",
"images",
".",
"Nothing",
"else",
"is",
"changed",
"and",
"its",
"up",
"to",
"the",
"user",
"to",
"correctly",
"update",
"everything",
"else",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java#L128-L134 |
50,343 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java | FDistort.input | public FDistort input( ImageBase input ) {
if( this.input == null || this.input.width != input.width || this.input.height != input.height ) {
distorter = null;
}
this.input = input;
inputType = input.getImageType();
return this;
} | java | public FDistort input( ImageBase input ) {
if( this.input == null || this.input.width != input.width || this.input.height != input.height ) {
distorter = null;
}
this.input = input;
inputType = input.getImageType();
return this;
} | [
"public",
"FDistort",
"input",
"(",
"ImageBase",
"input",
")",
"{",
"if",
"(",
"this",
".",
"input",
"==",
"null",
"||",
"this",
".",
"input",
".",
"width",
"!=",
"input",
".",
"width",
"||",
"this",
".",
"input",
".",
"height",
"!=",
"input",
".",
... | Changes the input image. The previous distortion is thrown away only if the input
image has a different shape | [
"Changes",
"the",
"input",
"image",
".",
"The",
"previous",
"distortion",
"is",
"thrown",
"away",
"only",
"if",
"the",
"input",
"image",
"has",
"a",
"different",
"shape"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java#L140-L147 |
50,344 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java | FDistort.output | public FDistort output( ImageBase output ) {
if( this.output == null || this.output.width != output.width || this.output.height != output.height ) {
distorter = null;
}
this.output = output;
return this;
} | java | public FDistort output( ImageBase output ) {
if( this.output == null || this.output.width != output.width || this.output.height != output.height ) {
distorter = null;
}
this.output = output;
return this;
} | [
"public",
"FDistort",
"output",
"(",
"ImageBase",
"output",
")",
"{",
"if",
"(",
"this",
".",
"output",
"==",
"null",
"||",
"this",
".",
"output",
".",
"width",
"!=",
"output",
".",
"width",
"||",
"this",
".",
"output",
".",
"height",
"!=",
"output",
... | Changes the output image. The previous distortion is thrown away only if the output
image has a different shape | [
"Changes",
"the",
"output",
"image",
".",
"The",
"previous",
"distortion",
"is",
"thrown",
"away",
"only",
"if",
"the",
"output",
"image",
"has",
"a",
"different",
"shape"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java#L153-L159 |
50,345 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java | FDistort.border | public FDistort border( BorderType type ) {
if( borderType == type )
return this;
borderType = type;
return border(FactoryImageBorder.generic(type, inputType));
} | java | public FDistort border( BorderType type ) {
if( borderType == type )
return this;
borderType = type;
return border(FactoryImageBorder.generic(type, inputType));
} | [
"public",
"FDistort",
"border",
"(",
"BorderType",
"type",
")",
"{",
"if",
"(",
"borderType",
"==",
"type",
")",
"return",
"this",
";",
"borderType",
"=",
"type",
";",
"return",
"border",
"(",
"FactoryImageBorder",
".",
"generic",
"(",
"type",
",",
"inputT... | Sets the border by type. | [
"Sets",
"the",
"border",
"by",
"type",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java#L172-L177 |
50,346 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java | FDistort.border | public FDistort border( double value ) {
// to recycle here the value also needs to be saved
// if( borderType == BorderType.VALUE )
// return this;
borderType = BorderType.ZERO;
return border(FactoryImageBorder.genericValue(value, inputType));
} | java | public FDistort border( double value ) {
// to recycle here the value also needs to be saved
// if( borderType == BorderType.VALUE )
// return this;
borderType = BorderType.ZERO;
return border(FactoryImageBorder.genericValue(value, inputType));
} | [
"public",
"FDistort",
"border",
"(",
"double",
"value",
")",
"{",
"// to recycle here the value also needs to be saved",
"//\t\tif( borderType == BorderType.VALUE )",
"//\t\t\treturn this;",
"borderType",
"=",
"BorderType",
".",
"ZERO",
";",
"return",
"border",
"(",
"FactoryI... | Sets the border to a fixed gray-scale value | [
"Sets",
"the",
"border",
"to",
"a",
"fixed",
"gray",
"-",
"scale",
"value"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java#L182-L188 |
50,347 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java | FDistort.interp | public FDistort interp(InterpolationType type) {
distorter = null;
this.interp = FactoryInterpolation.createPixel(0, 255, type, BorderType.EXTENDED, inputType);
return this;
} | java | public FDistort interp(InterpolationType type) {
distorter = null;
this.interp = FactoryInterpolation.createPixel(0, 255, type, BorderType.EXTENDED, inputType);
return this;
} | [
"public",
"FDistort",
"interp",
"(",
"InterpolationType",
"type",
")",
"{",
"distorter",
"=",
"null",
";",
"this",
".",
"interp",
"=",
"FactoryInterpolation",
".",
"createPixel",
"(",
"0",
",",
"255",
",",
"type",
",",
"BorderType",
".",
"EXTENDED",
",",
"... | Specifies the interpolation used by type. | [
"Specifies",
"the",
"interpolation",
"used",
"by",
"type",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java#L215-L220 |
50,348 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java | FDistort.affine | public FDistort affine(double a11, double a12, double a21, double a22,
double dx, double dy) {
PixelTransformAffine_F32 transform;
if( outputToInput != null && outputToInput instanceof PixelTransformAffine_F32 ) {
transform = (PixelTransformAffine_F32)outputToInput;
} else {
transform = new Pixel... | java | public FDistort affine(double a11, double a12, double a21, double a22,
double dx, double dy) {
PixelTransformAffine_F32 transform;
if( outputToInput != null && outputToInput instanceof PixelTransformAffine_F32 ) {
transform = (PixelTransformAffine_F32)outputToInput;
} else {
transform = new Pixel... | [
"public",
"FDistort",
"affine",
"(",
"double",
"a11",
",",
"double",
"a12",
",",
"double",
"a21",
",",
"double",
"a22",
",",
"double",
"dx",
",",
"double",
"dy",
")",
"{",
"PixelTransformAffine_F32",
"transform",
";",
"if",
"(",
"outputToInput",
"!=",
"nul... | Affine transform from input to output | [
"Affine",
"transform",
"from",
"input",
"to",
"output"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java#L256-L279 |
50,349 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java | FDistort.rotate | public FDistort rotate( double angleInputToOutput ) {
PixelTransform<Point2D_F32> outputToInput = DistortSupport.transformRotate(input.width/2,input.height/2,
output.width/2,output.height/2,(float)angleInputToOutput);
return transform(outputToInput);
} | java | public FDistort rotate( double angleInputToOutput ) {
PixelTransform<Point2D_F32> outputToInput = DistortSupport.transformRotate(input.width/2,input.height/2,
output.width/2,output.height/2,(float)angleInputToOutput);
return transform(outputToInput);
} | [
"public",
"FDistort",
"rotate",
"(",
"double",
"angleInputToOutput",
")",
"{",
"PixelTransform",
"<",
"Point2D_F32",
">",
"outputToInput",
"=",
"DistortSupport",
".",
"transformRotate",
"(",
"input",
".",
"width",
"/",
"2",
",",
"input",
".",
"height",
"/",
"2... | Applies a distortion which will rotate the input image by the specified amount. | [
"Applies",
"a",
"distortion",
"which",
"will",
"rotate",
"the",
"input",
"image",
"by",
"the",
"specified",
"amount",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java#L316-L321 |
50,350 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java | FDistort.apply | public void apply() {
// see if the distortion class needs to be created again
if( distorter == null ) {
Class typeOut = output.getImageType().getImageClass();
switch( input.getImageType().getFamily() ) {
case GRAY:
distorter = FactoryDistort.distortSB(cached, (InterpolatePixelS)interp, typeOut);
... | java | public void apply() {
// see if the distortion class needs to be created again
if( distorter == null ) {
Class typeOut = output.getImageType().getImageClass();
switch( input.getImageType().getFamily() ) {
case GRAY:
distorter = FactoryDistort.distortSB(cached, (InterpolatePixelS)interp, typeOut);
... | [
"public",
"void",
"apply",
"(",
")",
"{",
"// see if the distortion class needs to be created again",
"if",
"(",
"distorter",
"==",
"null",
")",
"{",
"Class",
"typeOut",
"=",
"output",
".",
"getImageType",
"(",
")",
".",
"getImageClass",
"(",
")",
";",
"switch",... | Applies the distortion. | [
"Applies",
"the",
"distortion",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/abst/distort/FDistort.java#L326-L350 |
50,351 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/impl/ProjectiveToIdentity.java | ProjectiveToIdentity.process | public boolean process( DMatrixRMaj P ) {
if( !svd.decompose(P) )
return false;
svd.getU(Ut,true);
svd.getV(V,false);
double sv[] = svd.getSingularValues();
SingularOps_DDRM.descendingOrder(Ut,true,sv,3,V,false);
// compute W+, which is transposed and non-negative inverted
for (int i = 0; i < 3; i++... | java | public boolean process( DMatrixRMaj P ) {
if( !svd.decompose(P) )
return false;
svd.getU(Ut,true);
svd.getV(V,false);
double sv[] = svd.getSingularValues();
SingularOps_DDRM.descendingOrder(Ut,true,sv,3,V,false);
// compute W+, which is transposed and non-negative inverted
for (int i = 0; i < 3; i++... | [
"public",
"boolean",
"process",
"(",
"DMatrixRMaj",
"P",
")",
"{",
"if",
"(",
"!",
"svd",
".",
"decompose",
"(",
"P",
")",
")",
"return",
"false",
";",
"svd",
".",
"getU",
"(",
"Ut",
",",
"true",
")",
";",
"svd",
".",
"getV",
"(",
"V",
",",
"fa... | Compute projective transform that converts P into identity
@param P (Input) 3x4 camera matrix
@return true if no errors | [
"Compute",
"projective",
"transform",
"that",
"converts",
"P",
"into",
"identity"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/impl/ProjectiveToIdentity.java#L52-L76 |
50,352 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/impl/ProjectiveToIdentity.java | ProjectiveToIdentity.computeH | public void computeH( DMatrixRMaj H ) {
H.reshape(4,4);
CommonOps_DDRM.insert(PA,H,0,0);
for (int i = 0; i < 4; i++) {
H.unsafe_set(i,3,ns.data[i]);
}
} | java | public void computeH( DMatrixRMaj H ) {
H.reshape(4,4);
CommonOps_DDRM.insert(PA,H,0,0);
for (int i = 0; i < 4; i++) {
H.unsafe_set(i,3,ns.data[i]);
}
} | [
"public",
"void",
"computeH",
"(",
"DMatrixRMaj",
"H",
")",
"{",
"H",
".",
"reshape",
"(",
"4",
",",
"4",
")",
";",
"CommonOps_DDRM",
".",
"insert",
"(",
"PA",
",",
"H",
",",
"0",
",",
"0",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i"... | Retrieve projective transform H | [
"Retrieve",
"projective",
"transform",
"H"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/impl/ProjectiveToIdentity.java#L81-L90 |
50,353 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/bundle/jacobians/JacobianSo3Numerical.java | JacobianSo3Numerical.init | public void init() {
N = getParameterLength();
jacR = new DMatrixRMaj[N];
for (int i = 0; i < N; i++) {
jacR[i] = new DMatrixRMaj(3,3);
}
jacobian = new DMatrixRMaj(N,9);
paramInternal = new double[N];
numericalJac = createNumericalAlgorithm(function);
} | java | public void init() {
N = getParameterLength();
jacR = new DMatrixRMaj[N];
for (int i = 0; i < N; i++) {
jacR[i] = new DMatrixRMaj(3,3);
}
jacobian = new DMatrixRMaj(N,9);
paramInternal = new double[N];
numericalJac = createNumericalAlgorithm(function);
} | [
"public",
"void",
"init",
"(",
")",
"{",
"N",
"=",
"getParameterLength",
"(",
")",
";",
"jacR",
"=",
"new",
"DMatrixRMaj",
"[",
"N",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"N",
";",
"i",
"++",
")",
"{",
"jacR",
"[",
"i",
... | Initializes data structures. Separate function to make it easier to extend the class | [
"Initializes",
"data",
"structures",
".",
"Separate",
"function",
"to",
"make",
"it",
"easier",
"to",
"extend",
"the",
"class"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/bundle/jacobians/JacobianSo3Numerical.java#L49-L58 |
50,354 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/abst/geo/bundle/SceneObservations.java | SceneObservations.checkOneObservationPerView | public void checkOneObservationPerView() {
for (int viewIdx = 0; viewIdx < views.length; viewIdx++) {
SceneObservations.View v = views[viewIdx];
for (int obsIdx = 0; obsIdx < v.size(); obsIdx++) {
int a = v.point.get(obsIdx);
for (int i = obsIdx+1; i < v.size(); i++) {
if( a == v.point.get(i)) {
... | java | public void checkOneObservationPerView() {
for (int viewIdx = 0; viewIdx < views.length; viewIdx++) {
SceneObservations.View v = views[viewIdx];
for (int obsIdx = 0; obsIdx < v.size(); obsIdx++) {
int a = v.point.get(obsIdx);
for (int i = obsIdx+1; i < v.size(); i++) {
if( a == v.point.get(i)) {
... | [
"public",
"void",
"checkOneObservationPerView",
"(",
")",
"{",
"for",
"(",
"int",
"viewIdx",
"=",
"0",
";",
"viewIdx",
"<",
"views",
".",
"length",
";",
"viewIdx",
"++",
")",
"{",
"SceneObservations",
".",
"View",
"v",
"=",
"views",
"[",
"viewIdx",
"]",
... | Makes sure that each feature is only observed in each view | [
"Makes",
"sure",
"that",
"each",
"feature",
"is",
"only",
"observed",
"in",
"each",
"view"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/abst/geo/bundle/SceneObservations.java#L166-L179 |
50,355 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/misc/ProfileOperation.java | ProfileOperation.profile | public static void profile( Performer performer , int num ) {
long deltaTime = measureTime(performer,num);
System.out.printf("%30s time = %8d ms per frame = %8.3f\n",
performer.getName(),deltaTime,(deltaTime/(double)num));
// System.out.println(performer.getClass().getSimpleName... | java | public static void profile( Performer performer , int num ) {
long deltaTime = measureTime(performer,num);
System.out.printf("%30s time = %8d ms per frame = %8.3f\n",
performer.getName(),deltaTime,(deltaTime/(double)num));
// System.out.println(performer.getClass().getSimpleName... | [
"public",
"static",
"void",
"profile",
"(",
"Performer",
"performer",
",",
"int",
"num",
")",
"{",
"long",
"deltaTime",
"=",
"measureTime",
"(",
"performer",
",",
"num",
")",
";",
"System",
".",
"out",
".",
"printf",
"(",
"\"%30s time = %8d ms per frame = %8.3... | See how long it takes to run the process 'num' times and print the results
to standard out | [
"See",
"how",
"long",
"it",
"takes",
"to",
"run",
"the",
"process",
"num",
"times",
"and",
"print",
"the",
"results",
"to",
"standard",
"out"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/misc/ProfileOperation.java#L31-L39 |
50,356 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/segmentation/fh04/SegmentFelzenszwalbHuttenlocher04.java | SegmentFelzenszwalbHuttenlocher04.initialize | protected void initialize(T input , GrayS32 output ) {
this.graph = output;
final int N = input.width*input.height;
regionSize.resize(N);
threshold.resize(N);
for( int i = 0; i < N; i++ ) {
regionSize.data[i] = 1;
threshold.data[i] = K;
graph.data[i] = i; // assign a unique label to each pixel since... | java | protected void initialize(T input , GrayS32 output ) {
this.graph = output;
final int N = input.width*input.height;
regionSize.resize(N);
threshold.resize(N);
for( int i = 0; i < N; i++ ) {
regionSize.data[i] = 1;
threshold.data[i] = K;
graph.data[i] = i; // assign a unique label to each pixel since... | [
"protected",
"void",
"initialize",
"(",
"T",
"input",
",",
"GrayS32",
"output",
")",
"{",
"this",
".",
"graph",
"=",
"output",
";",
"final",
"int",
"N",
"=",
"input",
".",
"width",
"*",
"input",
".",
"height",
";",
"regionSize",
".",
"resize",
"(",
"... | Predeclares all memory required and sets data structures to their initial values | [
"Predeclares",
"all",
"memory",
"required",
"and",
"sets",
"data",
"structures",
"to",
"their",
"initial",
"values"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/segmentation/fh04/SegmentFelzenszwalbHuttenlocher04.java#L170-L184 |
50,357 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/segmentation/fh04/SegmentFelzenszwalbHuttenlocher04.java | SegmentFelzenszwalbHuttenlocher04.mergeSmallRegions | protected void mergeSmallRegions() {
for( int i = 0; i < edgesNotMatched.size(); i++ ) {
Edge e = edgesNotMatched.get(i);
int rootA = find(e.indexA);
int rootB = find(e.indexB);
// see if they are already part of the same segment
if( rootA == rootB )
continue;
int sizeA = regionSize.get(rootA... | java | protected void mergeSmallRegions() {
for( int i = 0; i < edgesNotMatched.size(); i++ ) {
Edge e = edgesNotMatched.get(i);
int rootA = find(e.indexA);
int rootB = find(e.indexB);
// see if they are already part of the same segment
if( rootA == rootB )
continue;
int sizeA = regionSize.get(rootA... | [
"protected",
"void",
"mergeSmallRegions",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"edgesNotMatched",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"Edge",
"e",
"=",
"edgesNotMatched",
".",
"get",
"(",
"i",
")",
";",
"in... | Look at the remaining regions and if there are any small ones marge them into a larger region | [
"Look",
"at",
"the",
"remaining",
"regions",
"and",
"if",
"there",
"are",
"any",
"small",
"ones",
"marge",
"them",
"into",
"a",
"larger",
"region"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/segmentation/fh04/SegmentFelzenszwalbHuttenlocher04.java#L245-L269 |
50,358 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/segmentation/fh04/SegmentFelzenszwalbHuttenlocher04.java | SegmentFelzenszwalbHuttenlocher04.find | protected int find( int child ) {
int root = graph.data[child];
if( root == graph.data[root] )
return root;
int inputChild = child;
while( root != child ) {
child = root;
root = graph.data[child];
}
graph.data[inputChild] = root;
return root;
} | java | protected int find( int child ) {
int root = graph.data[child];
if( root == graph.data[root] )
return root;
int inputChild = child;
while( root != child ) {
child = root;
root = graph.data[child];
}
graph.data[inputChild] = root;
return root;
} | [
"protected",
"int",
"find",
"(",
"int",
"child",
")",
"{",
"int",
"root",
"=",
"graph",
".",
"data",
"[",
"child",
"]",
";",
"if",
"(",
"root",
"==",
"graph",
".",
"data",
"[",
"root",
"]",
")",
"return",
"root",
";",
"int",
"inputChild",
"=",
"c... | Finds the root given child. If the child does not point directly to the parent find the parent and make
the child point directly towards it. | [
"Finds",
"the",
"root",
"given",
"child",
".",
"If",
"the",
"child",
"does",
"not",
"point",
"directly",
"to",
"the",
"parent",
"find",
"the",
"parent",
"and",
"make",
"the",
"child",
"point",
"directly",
"towards",
"it",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/segmentation/fh04/SegmentFelzenszwalbHuttenlocher04.java#L275-L289 |
50,359 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/segmentation/fh04/SegmentFelzenszwalbHuttenlocher04.java | SegmentFelzenszwalbHuttenlocher04.computeOutput | protected void computeOutput() {
outputRegionId.reset();
outputRegionSizes.reset();
for( int y = 0; y < graph.height; y++ ) {
int indexGraph = graph.startIndex + y*graph.stride;
for( int x = 0; x < graph.width; x++ , indexGraph++) {
int parent = graph.data[indexGraph];
if( parent == indexGraph ) {
... | java | protected void computeOutput() {
outputRegionId.reset();
outputRegionSizes.reset();
for( int y = 0; y < graph.height; y++ ) {
int indexGraph = graph.startIndex + y*graph.stride;
for( int x = 0; x < graph.width; x++ , indexGraph++) {
int parent = graph.data[indexGraph];
if( parent == indexGraph ) {
... | [
"protected",
"void",
"computeOutput",
"(",
")",
"{",
"outputRegionId",
".",
"reset",
"(",
")",
";",
"outputRegionSizes",
".",
"reset",
"(",
")",
";",
"for",
"(",
"int",
"y",
"=",
"0",
";",
"y",
"<",
"graph",
".",
"height",
";",
"y",
"++",
")",
"{",... | Searches for root nodes in the graph and adds their size to the list of region sizes. Makes sure all
other nodes in the graph point directly at their root. | [
"Searches",
"for",
"root",
"nodes",
"in",
"the",
"graph",
"and",
"adds",
"their",
"size",
"to",
"the",
"list",
"of",
"region",
"sizes",
".",
"Makes",
"sure",
"all",
"other",
"nodes",
"in",
"the",
"graph",
"point",
"directly",
"at",
"their",
"root",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/segmentation/fh04/SegmentFelzenszwalbHuttenlocher04.java#L295-L316 |
50,360 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/NormalizationPoint2D.java | NormalizationPoint2D.apply | public void apply( DMatrixRMaj H , DMatrixRMaj output ) {
output.reshape(3,H.numCols);
int stride = H.numCols;
for (int col = 0; col < H.numCols; col++) {
// This column in H
double h1 = H.data[col], h2 = H.data[col+stride], h3 = H.data[col+2*stride];
output.data[col] = h1/stdX - meanX*h3/stdX;
outpu... | java | public void apply( DMatrixRMaj H , DMatrixRMaj output ) {
output.reshape(3,H.numCols);
int stride = H.numCols;
for (int col = 0; col < H.numCols; col++) {
// This column in H
double h1 = H.data[col], h2 = H.data[col+stride], h3 = H.data[col+2*stride];
output.data[col] = h1/stdX - meanX*h3/stdX;
outpu... | [
"public",
"void",
"apply",
"(",
"DMatrixRMaj",
"H",
",",
"DMatrixRMaj",
"output",
")",
"{",
"output",
".",
"reshape",
"(",
"3",
",",
"H",
".",
"numCols",
")",
";",
"int",
"stride",
"=",
"H",
".",
"numCols",
";",
"for",
"(",
"int",
"col",
"=",
"0",
... | Applies normalization to a H=3xN matrix
out = Norm*H
@param H 3xN matrix. Can be same as input matrix | [
"Applies",
"normalization",
"to",
"a",
"H",
"=",
"3xN",
"matrix"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/NormalizationPoint2D.java#L76-L87 |
50,361 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/NormalizationPoint2D.java | NormalizationPoint2D.apply | public void apply(DMatrix3x3 C, DMatrix3x3 output) {
DMatrix3x3 Hinv = matrixInv3(work);
PerspectiveOps.multTranA(Hinv,C,Hinv,output);
} | java | public void apply(DMatrix3x3 C, DMatrix3x3 output) {
DMatrix3x3 Hinv = matrixInv3(work);
PerspectiveOps.multTranA(Hinv,C,Hinv,output);
} | [
"public",
"void",
"apply",
"(",
"DMatrix3x3",
"C",
",",
"DMatrix3x3",
"output",
")",
"{",
"DMatrix3x3",
"Hinv",
"=",
"matrixInv3",
"(",
"work",
")",
";",
"PerspectiveOps",
".",
"multTranA",
"(",
"Hinv",
",",
"C",
",",
"Hinv",
",",
"output",
")",
";",
"... | Apply transform to conic in 3x3 matrix format. | [
"Apply",
"transform",
"to",
"conic",
"in",
"3x3",
"matrix",
"format",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/NormalizationPoint2D.java#L132-L135 |
50,362 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/factory/transform/wavelet/FactoryWaveletHaar.java | FactoryWaveletHaar.generateInv_I32 | private static WlCoef_I32 generateInv_I32() {
WlCoef_I32 ret = new WlCoef_I32();
ret.scaling = new int[]{1,1};
ret.wavelet = new int[]{ret.scaling[0],-ret.scaling[0]};
ret.denominatorScaling = 2;
ret.denominatorWavelet = 2;
return ret;
} | java | private static WlCoef_I32 generateInv_I32() {
WlCoef_I32 ret = new WlCoef_I32();
ret.scaling = new int[]{1,1};
ret.wavelet = new int[]{ret.scaling[0],-ret.scaling[0]};
ret.denominatorScaling = 2;
ret.denominatorWavelet = 2;
return ret;
} | [
"private",
"static",
"WlCoef_I32",
"generateInv_I32",
"(",
")",
"{",
"WlCoef_I32",
"ret",
"=",
"new",
"WlCoef_I32",
"(",
")",
";",
"ret",
".",
"scaling",
"=",
"new",
"int",
"[",
"]",
"{",
"1",
",",
"1",
"}",
";",
"ret",
".",
"wavelet",
"=",
"new",
... | Create a description for the inverse transform. Note that this will NOT produce
an exact copy of the original due to rounding error.
@return Wavelet inverse coefficient description. | [
"Create",
"a",
"description",
"for",
"the",
"inverse",
"transform",
".",
"Note",
"that",
"this",
"will",
"NOT",
"produce",
"an",
"exact",
"copy",
"of",
"the",
"original",
"due",
"to",
"rounding",
"error",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/transform/wavelet/FactoryWaveletHaar.java#L69-L78 |
50,363 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/tracker/combined/CombinedTrackerScalePoint.java | CombinedTrackerScalePoint.updateTracks | public void updateTracks( I input ,
PyramidDiscrete<I> pyramid ,
D[] derivX,
D[] derivY ) {
// forget recently dropped or spawned tracks
tracksSpawned.clear();
// save references
this.input = input;
trackerKlt.setInputs(pyramid, derivX, derivY);
trackUsingKlt(tracksPureKlt);
... | java | public void updateTracks( I input ,
PyramidDiscrete<I> pyramid ,
D[] derivX,
D[] derivY ) {
// forget recently dropped or spawned tracks
tracksSpawned.clear();
// save references
this.input = input;
trackerKlt.setInputs(pyramid, derivX, derivY);
trackUsingKlt(tracksPureKlt);
... | [
"public",
"void",
"updateTracks",
"(",
"I",
"input",
",",
"PyramidDiscrete",
"<",
"I",
">",
"pyramid",
",",
"D",
"[",
"]",
"derivX",
",",
"D",
"[",
"]",
"derivY",
")",
"{",
"// forget recently dropped or spawned tracks",
"tracksSpawned",
".",
"clear",
"(",
"... | Updates the location and description of tracks using KLT. Saves a reference
to the input image for future processing.
@param input Input image.
@param pyramid Image pyramid of input.
@param derivX Derivative pyramid of input x-axis
@param derivY Derivative pyramid of input y-axis | [
"Updates",
"the",
"location",
"and",
"description",
"of",
"tracks",
"using",
"KLT",
".",
"Saves",
"a",
"reference",
"to",
"the",
"input",
"image",
"for",
"future",
"processing",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/tracker/combined/CombinedTrackerScalePoint.java#L123-L137 |
50,364 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/tracker/combined/CombinedTrackerScalePoint.java | CombinedTrackerScalePoint.trackUsingKlt | private void trackUsingKlt(List<CombinedTrack<TD>> tracks) {
for( int i = 0; i < tracks.size(); ) {
CombinedTrack<TD> track = tracks.get(i);
if( !trackerKlt.performTracking(track.track) ) {
// handle the dropped track
tracks.remove(i);
tracksDormant.add(track);
} else {
track.set(track.trac... | java | private void trackUsingKlt(List<CombinedTrack<TD>> tracks) {
for( int i = 0; i < tracks.size(); ) {
CombinedTrack<TD> track = tracks.get(i);
if( !trackerKlt.performTracking(track.track) ) {
// handle the dropped track
tracks.remove(i);
tracksDormant.add(track);
} else {
track.set(track.trac... | [
"private",
"void",
"trackUsingKlt",
"(",
"List",
"<",
"CombinedTrack",
"<",
"TD",
">",
">",
"tracks",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"tracks",
".",
"size",
"(",
")",
";",
")",
"{",
"CombinedTrack",
"<",
"TD",
">",
"tra... | Tracks features in the list using KLT and update their state | [
"Tracks",
"features",
"in",
"the",
"list",
"using",
"KLT",
"and",
"update",
"their",
"state"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/tracker/combined/CombinedTrackerScalePoint.java#L142-L155 |
50,365 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/tracker/combined/CombinedTrackerScalePoint.java | CombinedTrackerScalePoint.spawnTracksFromDetected | public void spawnTracksFromDetected() {
// mark detected features with no matches as available
FastQueue<AssociatedIndex> matches = associate.getMatches();
int N = detector.getNumberOfFeatures();
for( int i = 0; i < N; i++ )
associated[i] = false;
for( AssociatedIndex i : matches.toList() ) {
associat... | java | public void spawnTracksFromDetected() {
// mark detected features with no matches as available
FastQueue<AssociatedIndex> matches = associate.getMatches();
int N = detector.getNumberOfFeatures();
for( int i = 0; i < N; i++ )
associated[i] = false;
for( AssociatedIndex i : matches.toList() ) {
associat... | [
"public",
"void",
"spawnTracksFromDetected",
"(",
")",
"{",
"// mark detected features with no matches as available",
"FastQueue",
"<",
"AssociatedIndex",
">",
"matches",
"=",
"associate",
".",
"getMatches",
"(",
")",
";",
"int",
"N",
"=",
"detector",
".",
"getNumberO... | From the found interest points create new tracks. Tracks are only created at points
where there are no existing tracks.
Note: Must be called after {@link #associateAllToDetected}. | [
"From",
"the",
"found",
"interest",
"points",
"create",
"new",
"tracks",
".",
"Tracks",
"are",
"only",
"created",
"at",
"points",
"where",
"there",
"are",
"no",
"existing",
"tracks",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/tracker/combined/CombinedTrackerScalePoint.java#L163-L205 |
50,366 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/tracker/combined/CombinedTrackerScalePoint.java | CombinedTrackerScalePoint.associateToDetected | private void associateToDetected( List<CombinedTrack<TD>> known ) {
// initialize data structures
detectedDesc.reset();
knownDesc.reset();
// create a list of detected feature descriptions
int N = detector.getNumberOfFeatures();
for( int i = 0; i < N; i++ ) {
detectedDesc.add(detector.getDescription(i))... | java | private void associateToDetected( List<CombinedTrack<TD>> known ) {
// initialize data structures
detectedDesc.reset();
knownDesc.reset();
// create a list of detected feature descriptions
int N = detector.getNumberOfFeatures();
for( int i = 0; i < N; i++ ) {
detectedDesc.add(detector.getDescription(i))... | [
"private",
"void",
"associateToDetected",
"(",
"List",
"<",
"CombinedTrack",
"<",
"TD",
">",
">",
"known",
")",
"{",
"// initialize data structures",
"detectedDesc",
".",
"reset",
"(",
")",
";",
"knownDesc",
".",
"reset",
"(",
")",
";",
"// create a list of dete... | Associates pre-existing tracks to newly detected features
@param known List of known tracks | [
"Associates",
"pre",
"-",
"existing",
"tracks",
"to",
"newly",
"detected",
"features"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/tracker/combined/CombinedTrackerScalePoint.java#L213-L237 |
50,367 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/tracker/combined/CombinedTrackerScalePoint.java | CombinedTrackerScalePoint.associateAllToDetected | public void associateAllToDetected() {
// initialize data structures
List<CombinedTrack<TD>> all = new ArrayList<>();
all.addAll(tracksReactivated);
all.addAll(tracksDormant);
all.addAll(tracksPureKlt);
int numTainted = tracksReactivated.size() + tracksDormant.size();
tracksReactivated.clear();
tracks... | java | public void associateAllToDetected() {
// initialize data structures
List<CombinedTrack<TD>> all = new ArrayList<>();
all.addAll(tracksReactivated);
all.addAll(tracksDormant);
all.addAll(tracksPureKlt);
int numTainted = tracksReactivated.size() + tracksDormant.size();
tracksReactivated.clear();
tracks... | [
"public",
"void",
"associateAllToDetected",
"(",
")",
"{",
"// initialize data structures",
"List",
"<",
"CombinedTrack",
"<",
"TD",
">>",
"all",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"all",
".",
"addAll",
"(",
"tracksReactivated",
")",
";",
"all",
"... | Associate all tracks in any state to the latest observations. If a dormant track is associated it
will be reactivated. If a reactivated track is associated it's state will be updated. PureKLT
tracks are left unmodified. | [
"Associate",
"all",
"tracks",
"in",
"any",
"state",
"to",
"the",
"latest",
"observations",
".",
"If",
"a",
"dormant",
"track",
"is",
"associated",
"it",
"will",
"be",
"reactivated",
".",
"If",
"a",
"reactivated",
"track",
"is",
"associated",
"it",
"s",
"st... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/tracker/combined/CombinedTrackerScalePoint.java#L244-L286 |
50,368 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/tracker/combined/CombinedTrackerScalePoint.java | CombinedTrackerScalePoint.dropTrack | public boolean dropTrack( CombinedTrack<TD> track ) {
if( !tracksPureKlt.remove(track) )
if( !tracksReactivated.remove(track) )
if( !tracksDormant.remove(track) )
return false;
tracksUnused.add(track);
return true;
} | java | public boolean dropTrack( CombinedTrack<TD> track ) {
if( !tracksPureKlt.remove(track) )
if( !tracksReactivated.remove(track) )
if( !tracksDormant.remove(track) )
return false;
tracksUnused.add(track);
return true;
} | [
"public",
"boolean",
"dropTrack",
"(",
"CombinedTrack",
"<",
"TD",
">",
"track",
")",
"{",
"if",
"(",
"!",
"tracksPureKlt",
".",
"remove",
"(",
"track",
")",
")",
"if",
"(",
"!",
"tracksReactivated",
".",
"remove",
"(",
"track",
")",
")",
"if",
"(",
... | Stops tracking the specified track and recycles its data.
@param track The track being dropped
@return true if the track was being tracked and data was recycled false if not. | [
"Stops",
"tracking",
"the",
"specified",
"track",
"and",
"recycles",
"its",
"data",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/tracker/combined/CombinedTrackerScalePoint.java#L294-L302 |
50,369 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/tracker/combined/CombinedTrackerScalePoint.java | CombinedTrackerScalePoint.dropAllTracks | public void dropAllTracks() {
tracksUnused.addAll(tracksDormant);
tracksUnused.addAll(tracksPureKlt);
tracksUnused.addAll(tracksReactivated);
tracksSpawned.clear();
tracksPureKlt.clear();
tracksReactivated.clear();
tracksSpawned.clear();
tracksDormant.clear();
} | java | public void dropAllTracks() {
tracksUnused.addAll(tracksDormant);
tracksUnused.addAll(tracksPureKlt);
tracksUnused.addAll(tracksReactivated);
tracksSpawned.clear();
tracksPureKlt.clear();
tracksReactivated.clear();
tracksSpawned.clear();
tracksDormant.clear();
} | [
"public",
"void",
"dropAllTracks",
"(",
")",
"{",
"tracksUnused",
".",
"addAll",
"(",
"tracksDormant",
")",
";",
"tracksUnused",
".",
"addAll",
"(",
"tracksPureKlt",
")",
";",
"tracksUnused",
".",
"addAll",
"(",
"tracksReactivated",
")",
";",
"tracksSpawned",
... | Drops all tracks and recycles the data | [
"Drops",
"all",
"tracks",
"and",
"recycles",
"the",
"data"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/tracker/combined/CombinedTrackerScalePoint.java#L331-L341 |
50,370 | lessthanoptimal/BoofCV | demonstrations/src/main/java/boofcv/demonstrations/feature/associate/VisualizeAssociationScoreApp.java | VisualizeAssociationScoreApp.processImage | private void processImage() {
final List<Point2D_F64> leftPts = new ArrayList<>();
final List<Point2D_F64> rightPts = new ArrayList<>();
final List<TupleDesc> leftDesc = new ArrayList<>();
final List<TupleDesc> rightDesc = new ArrayList<>();
final ProgressMonitor progressMonitor = new ProgressMonitor(this,
... | java | private void processImage() {
final List<Point2D_F64> leftPts = new ArrayList<>();
final List<Point2D_F64> rightPts = new ArrayList<>();
final List<TupleDesc> leftDesc = new ArrayList<>();
final List<TupleDesc> rightDesc = new ArrayList<>();
final ProgressMonitor progressMonitor = new ProgressMonitor(this,
... | [
"private",
"void",
"processImage",
"(",
")",
"{",
"final",
"List",
"<",
"Point2D_F64",
">",
"leftPts",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"final",
"List",
"<",
"Point2D_F64",
">",
"rightPts",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"fi... | Extracts image information and then passes that info onto scorePanel for display. Data is not
recycled to avoid threading issues. | [
"Extracts",
"image",
"information",
"and",
"then",
"passes",
"that",
"info",
"onto",
"scorePanel",
"for",
"display",
".",
"Data",
"is",
"not",
"recycled",
"to",
"avoid",
"threading",
"issues",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/demonstrations/feature/associate/VisualizeAssociationScoreApp.java#L172-L192 |
50,371 | lessthanoptimal/BoofCV | demonstrations/src/main/java/boofcv/demonstrations/feature/associate/VisualizeAssociationScoreApp.java | VisualizeAssociationScoreApp.extractImageFeatures | private void extractImageFeatures(final ProgressMonitor progressMonitor, final int progress,
T image,
List<TupleDesc> descs, List<Point2D_F64> locs) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
progressMonitor.setNote("Detecting");
}
});
detector.detect(image);... | java | private void extractImageFeatures(final ProgressMonitor progressMonitor, final int progress,
T image,
List<TupleDesc> descs, List<Point2D_F64> locs) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
progressMonitor.setNote("Detecting");
}
});
detector.detect(image);... | [
"private",
"void",
"extractImageFeatures",
"(",
"final",
"ProgressMonitor",
"progressMonitor",
",",
"final",
"int",
"progress",
",",
"T",
"image",
",",
"List",
"<",
"TupleDesc",
">",
"descs",
",",
"List",
"<",
"Point2D_F64",
">",
"locs",
")",
"{",
"SwingUtilit... | Detects the locations of the features in the image and extracts descriptions of each of
the features. | [
"Detects",
"the",
"locations",
"of",
"the",
"features",
"in",
"the",
"image",
"and",
"extracts",
"descriptions",
"of",
"each",
"of",
"the",
"features",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/demonstrations/feature/associate/VisualizeAssociationScoreApp.java#L198-L257 |
50,372 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/flow/BroxWarpingSpacial.java | BroxWarpingSpacial.resizeForLayer | protected void resizeForLayer( int width , int height ) {
deriv1X.reshape(width,height);
deriv1Y.reshape(width,height);
deriv2X.reshape(width,height);
deriv2Y.reshape(width,height);
deriv2XX.reshape(width,height);
deriv2YY.reshape(width,height);
deriv2XY.reshape(width,height);
warpImage2.reshape(width,... | java | protected void resizeForLayer( int width , int height ) {
deriv1X.reshape(width,height);
deriv1Y.reshape(width,height);
deriv2X.reshape(width,height);
deriv2Y.reshape(width,height);
deriv2XX.reshape(width,height);
deriv2YY.reshape(width,height);
deriv2XY.reshape(width,height);
warpImage2.reshape(width,... | [
"protected",
"void",
"resizeForLayer",
"(",
"int",
"width",
",",
"int",
"height",
")",
"{",
"deriv1X",
".",
"reshape",
"(",
"width",
",",
"height",
")",
";",
"deriv1Y",
".",
"reshape",
"(",
"width",
",",
"height",
")",
";",
"deriv2X",
".",
"reshape",
"... | Resize images for the current layer being processed | [
"Resize",
"images",
"for",
"the",
"current",
"layer",
"being",
"processed"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/flow/BroxWarpingSpacial.java#L182-L213 |
50,373 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/flow/BroxWarpingSpacial.java | BroxWarpingSpacial.computePsiSmooth | private void computePsiSmooth(GrayF32 ux , GrayF32 uy , GrayF32 vx , GrayF32 vy ,
GrayF32 psiSmooth ) {
int N = derivFlowUX.width * derivFlowUX.height;
for( int i = 0; i < N; i++ ) {
float vux = ux.data[i];
float vuy = uy.data[i];
float vvx = vx.data[i];
float vvy = vy.data[i];
float mu =... | java | private void computePsiSmooth(GrayF32 ux , GrayF32 uy , GrayF32 vx , GrayF32 vy ,
GrayF32 psiSmooth ) {
int N = derivFlowUX.width * derivFlowUX.height;
for( int i = 0; i < N; i++ ) {
float vux = ux.data[i];
float vuy = uy.data[i];
float vvx = vx.data[i];
float vvy = vy.data[i];
float mu =... | [
"private",
"void",
"computePsiSmooth",
"(",
"GrayF32",
"ux",
",",
"GrayF32",
"uy",
",",
"GrayF32",
"vx",
",",
"GrayF32",
"vy",
",",
"GrayF32",
"psiSmooth",
")",
"{",
"int",
"N",
"=",
"derivFlowUX",
".",
"width",
"*",
"derivFlowUX",
".",
"height",
";",
"f... | Equation 5. Psi_s | [
"Equation",
"5",
".",
"Psi_s"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/flow/BroxWarpingSpacial.java#L377-L392 |
50,374 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/flow/BroxWarpingSpacial.java | BroxWarpingSpacial.computePsiDataPsiGradient | protected void computePsiDataPsiGradient(GrayF32 image1, GrayF32 image2,
GrayF32 deriv1x, GrayF32 deriv1y,
GrayF32 deriv2x, GrayF32 deriv2y,
GrayF32 deriv2xx, GrayF32 deriv2yy, GrayF32 deriv2xy,
GrayF32 du, GrayF32 dv,
GrayF32 psiData, GrayF32 psiGradient ) {
... | java | protected void computePsiDataPsiGradient(GrayF32 image1, GrayF32 image2,
GrayF32 deriv1x, GrayF32 deriv1y,
GrayF32 deriv2x, GrayF32 deriv2y,
GrayF32 deriv2xx, GrayF32 deriv2yy, GrayF32 deriv2xy,
GrayF32 du, GrayF32 dv,
GrayF32 psiData, GrayF32 psiGradient ) {
... | [
"protected",
"void",
"computePsiDataPsiGradient",
"(",
"GrayF32",
"image1",
",",
"GrayF32",
"image2",
",",
"GrayF32",
"deriv1x",
",",
"GrayF32",
"deriv1y",
",",
"GrayF32",
"deriv2x",
",",
"GrayF32",
"deriv2y",
",",
"GrayF32",
"deriv2xx",
",",
"GrayF32",
"deriv2yy"... | Compute Psi-data using equation 6 and approximation in equation 5 | [
"Compute",
"Psi",
"-",
"data",
"using",
"equation",
"6",
"and",
"approximation",
"in",
"equation",
"5"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/flow/BroxWarpingSpacial.java#L397-L423 |
50,375 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/flow/BroxWarpingSpacial.java | BroxWarpingSpacial.computeDivUVD | private void computeDivUVD(GrayF32 u , GrayF32 v , GrayF32 psi ,
GrayF32 divU , GrayF32 divV , GrayF32 divD ) {
final int stride = psi.stride;
// compute the inside pixel
for (int y = 1; y < psi.height-1; y++) {
// index of the current pixel
int index = y*stride + 1;
for (int x = 1; x < psi... | java | private void computeDivUVD(GrayF32 u , GrayF32 v , GrayF32 psi ,
GrayF32 divU , GrayF32 divV , GrayF32 divD ) {
final int stride = psi.stride;
// compute the inside pixel
for (int y = 1; y < psi.height-1; y++) {
// index of the current pixel
int index = y*stride + 1;
for (int x = 1; x < psi... | [
"private",
"void",
"computeDivUVD",
"(",
"GrayF32",
"u",
",",
"GrayF32",
"v",
",",
"GrayF32",
"psi",
",",
"GrayF32",
"divU",
",",
"GrayF32",
"divV",
",",
"GrayF32",
"divD",
")",
"{",
"final",
"int",
"stride",
"=",
"psi",
".",
"stride",
";",
"// compute t... | Computes the divergence for u,v, and d. Equation 8 and Equation 10. | [
"Computes",
"the",
"divergence",
"for",
"u",
"v",
"and",
"d",
".",
"Equation",
"8",
"and",
"Equation",
"10",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/flow/BroxWarpingSpacial.java#L428-L471 |
50,376 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java | TldTemplateMatching.reset | public void reset() {
unused.addAll(templateNegative);
unused.addAll(templatePositive);
templateNegative.clear();
templatePositive.clear();
} | java | public void reset() {
unused.addAll(templateNegative);
unused.addAll(templatePositive);
templateNegative.clear();
templatePositive.clear();
} | [
"public",
"void",
"reset",
"(",
")",
"{",
"unused",
".",
"addAll",
"(",
"templateNegative",
")",
";",
"unused",
".",
"addAll",
"(",
"templatePositive",
")",
";",
"templateNegative",
".",
"clear",
"(",
")",
";",
"templatePositive",
".",
"clear",
"(",
")",
... | Discard previous results and puts it back into its initial state | [
"Discard",
"previous",
"results",
"and",
"puts",
"it",
"back",
"into",
"its",
"initial",
"state"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java#L63-L68 |
50,377 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java | TldTemplateMatching.addDescriptor | public void addDescriptor( boolean positive , ImageRectangle rect ) {
addDescriptor(positive, rect.x0, rect.y0, rect.x1, rect.y1);
} | java | public void addDescriptor( boolean positive , ImageRectangle rect ) {
addDescriptor(positive, rect.x0, rect.y0, rect.x1, rect.y1);
} | [
"public",
"void",
"addDescriptor",
"(",
"boolean",
"positive",
",",
"ImageRectangle",
"rect",
")",
"{",
"addDescriptor",
"(",
"positive",
",",
"rect",
".",
"x0",
",",
"rect",
".",
"y0",
",",
"rect",
".",
"x1",
",",
"rect",
".",
"y1",
")",
";",
"}"
] | Creates a new descriptor for the specified region
@param positive if it is a positive or negative example | [
"Creates",
"a",
"new",
"descriptor",
"for",
"the",
"specified",
"region"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java#L84-L87 |
50,378 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java | TldTemplateMatching.addDescriptor | private void addDescriptor(boolean positive, NccFeature f) {
// avoid adding the same descriptor twice or adding contradicting results
if( positive)
if( distance(f,templatePositive) < 0.05 ) {
return;
}
if( !positive) {
if( distance(f,templateNegative) < 0.05 ) {
return;
}
// a positive pos... | java | private void addDescriptor(boolean positive, NccFeature f) {
// avoid adding the same descriptor twice or adding contradicting results
if( positive)
if( distance(f,templatePositive) < 0.05 ) {
return;
}
if( !positive) {
if( distance(f,templateNegative) < 0.05 ) {
return;
}
// a positive pos... | [
"private",
"void",
"addDescriptor",
"(",
"boolean",
"positive",
",",
"NccFeature",
"f",
")",
"{",
"// avoid adding the same descriptor twice or adding contradicting results",
"if",
"(",
"positive",
")",
"if",
"(",
"distance",
"(",
"f",
",",
"templatePositive",
")",
"<... | Adds a descriptor to the positive or negative list. If it is very similar to an existing one it is not
added. Look at code for details
@param positive true for positive list and false for negative list
@param f The feature which is to be added | [
"Adds",
"a",
"descriptor",
"to",
"the",
"positive",
"or",
"negative",
"list",
".",
"If",
"it",
"is",
"very",
"similar",
"to",
"an",
"existing",
"one",
"it",
"is",
"not",
"added",
".",
"Look",
"at",
"code",
"for",
"details"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java#L103-L124 |
50,379 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java | TldTemplateMatching.computeNccDescriptor | public void computeNccDescriptor( NccFeature f , float x0 , float y0 , float x1 , float y1 ) {
double mean = 0;
float widthStep = (x1-x0)/15.0f;
float heightStep = (y1-y0)/15.0f;
// compute the mean value
int index = 0;
for( int y = 0; y < 15; y++ ) {
float sampleY = y0 + y*heightStep;
for( int x = 0... | java | public void computeNccDescriptor( NccFeature f , float x0 , float y0 , float x1 , float y1 ) {
double mean = 0;
float widthStep = (x1-x0)/15.0f;
float heightStep = (y1-y0)/15.0f;
// compute the mean value
int index = 0;
for( int y = 0; y < 15; y++ ) {
float sampleY = y0 + y*heightStep;
for( int x = 0... | [
"public",
"void",
"computeNccDescriptor",
"(",
"NccFeature",
"f",
",",
"float",
"x0",
",",
"float",
"y0",
",",
"float",
"x1",
",",
"float",
"y1",
")",
"{",
"double",
"mean",
"=",
"0",
";",
"float",
"widthStep",
"=",
"(",
"x1",
"-",
"x0",
")",
"/",
... | Computes the NCC descriptor by sample points at evenly spaced distances inside the rectangle | [
"Computes",
"the",
"NCC",
"descriptor",
"by",
"sample",
"points",
"at",
"evenly",
"spaced",
"distances",
"inside",
"the",
"rectangle"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java#L129-L156 |
50,380 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java | TldTemplateMatching.createDescriptor | public NccFeature createDescriptor() {
NccFeature f;
if( unused.isEmpty() )
f = new NccFeature(15*15);
else
f = unused.pop();
return f;
} | java | public NccFeature createDescriptor() {
NccFeature f;
if( unused.isEmpty() )
f = new NccFeature(15*15);
else
f = unused.pop();
return f;
} | [
"public",
"NccFeature",
"createDescriptor",
"(",
")",
"{",
"NccFeature",
"f",
";",
"if",
"(",
"unused",
".",
"isEmpty",
"(",
")",
")",
"f",
"=",
"new",
"NccFeature",
"(",
"15",
"*",
"15",
")",
";",
"else",
"f",
"=",
"unused",
".",
"pop",
"(",
")",
... | Creates a new descriptor or recycles an old one | [
"Creates",
"a",
"new",
"descriptor",
"or",
"recycles",
"an",
"old",
"one"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java#L161-L168 |
50,381 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java | TldTemplateMatching.computeConfidence | public double computeConfidence( int x0 , int y0 , int x1 , int y1 ) {
computeNccDescriptor(observed,x0,y0,x1,y1);
// distance from each set of templates
if( templateNegative.size() > 0 && templatePositive.size() > 0 ) {
double distancePositive = distance(observed,templatePositive);
double distanceNegativ... | java | public double computeConfidence( int x0 , int y0 , int x1 , int y1 ) {
computeNccDescriptor(observed,x0,y0,x1,y1);
// distance from each set of templates
if( templateNegative.size() > 0 && templatePositive.size() > 0 ) {
double distancePositive = distance(observed,templatePositive);
double distanceNegativ... | [
"public",
"double",
"computeConfidence",
"(",
"int",
"x0",
",",
"int",
"y0",
",",
"int",
"x1",
",",
"int",
"y1",
")",
"{",
"computeNccDescriptor",
"(",
"observed",
",",
"x0",
",",
"y0",
",",
"x1",
",",
"y1",
")",
";",
"// distance from each set of template... | Compute a value which indicates how confident the specified region is to be a member of the positive set.
The confidence value is from 0 to 1. 1 indicates 100% confidence.
Positive and negative templates are used to compute the confidence value. Only the point in each set
which is closest to the specified region are... | [
"Compute",
"a",
"value",
"which",
"indicates",
"how",
"confident",
"the",
"specified",
"region",
"is",
"to",
"be",
"a",
"member",
"of",
"the",
"positive",
"set",
".",
"The",
"confidence",
"value",
"is",
"from",
"0",
"to",
"1",
".",
"1",
"indicates",
"100... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java#L179-L194 |
50,382 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java | TldTemplateMatching.computeConfidence | public double computeConfidence( ImageRectangle r ) {
return computeConfidence(r.x0,r.y0,r.x1,r.y1);
} | java | public double computeConfidence( ImageRectangle r ) {
return computeConfidence(r.x0,r.y0,r.x1,r.y1);
} | [
"public",
"double",
"computeConfidence",
"(",
"ImageRectangle",
"r",
")",
"{",
"return",
"computeConfidence",
"(",
"r",
".",
"x0",
",",
"r",
".",
"y0",
",",
"r",
".",
"x1",
",",
"r",
".",
"y1",
")",
";",
"}"
] | see the other function with the same name | [
"see",
"the",
"other",
"function",
"with",
"the",
"same",
"name"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java#L199-L201 |
50,383 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java | TldTemplateMatching.distance | public double distance( NccFeature observed , List<NccFeature> candidates ) {
double maximum = -Double.MAX_VALUE;
// The feature which has the best fit will maximize the score
for( NccFeature f : candidates ) {
double score = DescriptorDistance.ncc(observed, f);
if( score > maximum )
maximum = score;
... | java | public double distance( NccFeature observed , List<NccFeature> candidates ) {
double maximum = -Double.MAX_VALUE;
// The feature which has the best fit will maximize the score
for( NccFeature f : candidates ) {
double score = DescriptorDistance.ncc(observed, f);
if( score > maximum )
maximum = score;
... | [
"public",
"double",
"distance",
"(",
"NccFeature",
"observed",
",",
"List",
"<",
"NccFeature",
">",
"candidates",
")",
"{",
"double",
"maximum",
"=",
"-",
"Double",
".",
"MAX_VALUE",
";",
"// The feature which has the best fit will maximize the score",
"for",
"(",
"... | Computes the best distance to 'observed' from the candidate list.
@param observed Feature being matched
@param candidates Set of candidate matches
@return score from 0 to 1, where lower is closer | [
"Computes",
"the",
"best",
"distance",
"to",
"observed",
"from",
"the",
"candidate",
"list",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java#L209-L221 |
50,384 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/chess/DetectChessboardCornersPyramid.java | DetectChessboardCornersPyramid.process | public void process(GrayF32 input ) {
constructPyramid(input);
corners.reset();
// top to bottom. This way the intensity image is at the input image's scale. Which is useful
// for visualiztion purposes
double scale = Math.pow(2.0,pyramid.size()-1);
for (int level = pyramid.size()-1; level >= 0; level--) ... | java | public void process(GrayF32 input ) {
constructPyramid(input);
corners.reset();
// top to bottom. This way the intensity image is at the input image's scale. Which is useful
// for visualiztion purposes
double scale = Math.pow(2.0,pyramid.size()-1);
for (int level = pyramid.size()-1; level >= 0; level--) ... | [
"public",
"void",
"process",
"(",
"GrayF32",
"input",
")",
"{",
"constructPyramid",
"(",
"input",
")",
";",
"corners",
".",
"reset",
"(",
")",
";",
"// top to bottom. This way the intensity image is at the input image's scale. Which is useful",
"// for visualiztion purposes",... | Detects corner features inside the input gray scale image. | [
"Detects",
"corner",
"features",
"inside",
"the",
"input",
"gray",
"scale",
"image",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/chess/DetectChessboardCornersPyramid.java#L73-L131 |
50,385 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/chess/DetectChessboardCornersPyramid.java | DetectChessboardCornersPyramid.markSeenAsFalse | void markSeenAsFalse(FastQueue<ChessboardCorner> corners0 , FastQueue<ChessboardCorner> corners1 ) {
nn.setPoints(corners1.toList(),false);
// radius of the blob in the intensity image is 2*kernelRadius
int radius = detector.shiRadius *2+1;
for (int i = 0; i < corners0.size; i++) {
ChessboardCorner c0 = corn... | java | void markSeenAsFalse(FastQueue<ChessboardCorner> corners0 , FastQueue<ChessboardCorner> corners1 ) {
nn.setPoints(corners1.toList(),false);
// radius of the blob in the intensity image is 2*kernelRadius
int radius = detector.shiRadius *2+1;
for (int i = 0; i < corners0.size; i++) {
ChessboardCorner c0 = corn... | [
"void",
"markSeenAsFalse",
"(",
"FastQueue",
"<",
"ChessboardCorner",
">",
"corners0",
",",
"FastQueue",
"<",
"ChessboardCorner",
">",
"corners1",
")",
"{",
"nn",
".",
"setPoints",
"(",
"corners1",
".",
"toList",
"(",
")",
",",
"false",
")",
";",
"// radius ... | Finds corners in list 1 which match corners in list 0. If the feature in list 0 has already been
seen then the feature in list 1 will be marked as seen. Otherwise the feature which is the most intense
is marked as first. | [
"Finds",
"corners",
"in",
"list",
"1",
"which",
"match",
"corners",
"in",
"list",
"0",
".",
"If",
"the",
"feature",
"in",
"list",
"0",
"has",
"already",
"been",
"seen",
"then",
"the",
"feature",
"in",
"list",
"1",
"will",
"be",
"marked",
"as",
"seen",
... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/chess/DetectChessboardCornersPyramid.java#L138-L162 |
50,386 | lessthanoptimal/BoofCV | demonstrations/src/main/java/boofcv/demonstrations/fiducial/DetectQrCodeApp.java | DetectQrCodeApp.processImage | @Override
public void processImage(int sourceID, long frameID, final BufferedImage buffered, ImageBase input) {
System.out.flush();
synchronized (bufferedImageLock) {
original = ConvertBufferedImage.checkCopy(buffered, original);
work = ConvertBufferedImage.checkDeclare(buffered, work);
}
if( saveReque... | java | @Override
public void processImage(int sourceID, long frameID, final BufferedImage buffered, ImageBase input) {
System.out.flush();
synchronized (bufferedImageLock) {
original = ConvertBufferedImage.checkCopy(buffered, original);
work = ConvertBufferedImage.checkDeclare(buffered, work);
}
if( saveReque... | [
"@",
"Override",
"public",
"void",
"processImage",
"(",
"int",
"sourceID",
",",
"long",
"frameID",
",",
"final",
"BufferedImage",
"buffered",
",",
"ImageBase",
"input",
")",
"{",
"System",
".",
"out",
".",
"flush",
"(",
")",
";",
"synchronized",
"(",
"buff... | Override this function so that it doesn't threshold the image twice | [
"Override",
"this",
"function",
"so",
"that",
"it",
"doesn",
"t",
"threshold",
"the",
"image",
"twice"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/demonstrations/fiducial/DetectQrCodeApp.java#L191-L241 |
50,387 | lessthanoptimal/BoofCV | main/boofcv-calibration/src/main/java/boofcv/alg/geo/calibration/Zhang99ComputeTargetHomography.java | Zhang99ComputeTargetHomography.computeHomography | public boolean computeHomography( CalibrationObservation observedPoints )
{
if( observedPoints.size() < 4)
throw new IllegalArgumentException("At least 4 points needed in each set of observations. " +
" Filter these first please");
List<AssociatedPair> pairs = new ArrayList<>();
for( int i = 0; i < obse... | java | public boolean computeHomography( CalibrationObservation observedPoints )
{
if( observedPoints.size() < 4)
throw new IllegalArgumentException("At least 4 points needed in each set of observations. " +
" Filter these first please");
List<AssociatedPair> pairs = new ArrayList<>();
for( int i = 0; i < obse... | [
"public",
"boolean",
"computeHomography",
"(",
"CalibrationObservation",
"observedPoints",
")",
"{",
"if",
"(",
"observedPoints",
".",
"size",
"(",
")",
"<",
"4",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"At least 4 points needed in each set of observations... | Computes the homography from a list of detected grid points in the image. The
order of the grid points is important and must follow the expected row major
starting at the top left.
@param observedPoints List of ordered detected grid points in image pixels.
@return True if it computed a Homography and false if it fail... | [
"Computes",
"the",
"homography",
"from",
"a",
"list",
"of",
"detected",
"grid",
"points",
"in",
"the",
"image",
".",
"The",
"order",
"of",
"the",
"grid",
"points",
"is",
"important",
"and",
"must",
"follow",
"the",
"expected",
"row",
"major",
"starting",
"... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-calibration/src/main/java/boofcv/alg/geo/calibration/Zhang99ComputeTargetHomography.java#L65-L85 |
50,388 | lessthanoptimal/BoofCV | main/boofcv-types/src/main/java/boofcv/concurrency/FWorkArrays.java | FWorkArrays.recycle | public synchronized void recycle( float[] array ) {
if( array.length != length ) {
throw new IllegalArgumentException("Unexpected array length. Expected "+length+" found "+array.length);
}
storage.add(array);
} | java | public synchronized void recycle( float[] array ) {
if( array.length != length ) {
throw new IllegalArgumentException("Unexpected array length. Expected "+length+" found "+array.length);
}
storage.add(array);
} | [
"public",
"synchronized",
"void",
"recycle",
"(",
"float",
"[",
"]",
"array",
")",
"{",
"if",
"(",
"array",
".",
"length",
"!=",
"length",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Unexpected array length. Expected \"",
"+",
"length",
"+",
... | Adds the array to storage. if the array length is unexpected an exception is thrown
@param array array to be recycled. | [
"Adds",
"the",
"array",
"to",
"storage",
".",
"if",
"the",
"array",
"length",
"is",
"unexpected",
"an",
"exception",
"is",
"thrown"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/concurrency/FWorkArrays.java#L67-L72 |
50,389 | lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/sfm/ExampleMultiviewSceneReconstruction.java | ExampleMultiviewSceneReconstruction.visualizeResults | private void visualizeResults( SceneStructureMetric structure,
List<BufferedImage> colorImages ) {
List<Point3D_F64> cloudXyz = new ArrayList<>();
GrowQueue_I32 cloudRgb = new GrowQueue_I32();
Point3D_F64 world = new Point3D_F64();
Point3D_F64 camera = new Point3D_F64();
Point2D_F64 pixel = new Po... | java | private void visualizeResults( SceneStructureMetric structure,
List<BufferedImage> colorImages ) {
List<Point3D_F64> cloudXyz = new ArrayList<>();
GrowQueue_I32 cloudRgb = new GrowQueue_I32();
Point3D_F64 world = new Point3D_F64();
Point3D_F64 camera = new Point3D_F64();
Point2D_F64 pixel = new Po... | [
"private",
"void",
"visualizeResults",
"(",
"SceneStructureMetric",
"structure",
",",
"List",
"<",
"BufferedImage",
">",
"colorImages",
")",
"{",
"List",
"<",
"Point3D_F64",
">",
"cloudXyz",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"GrowQueue_I32",
"cloudRg... | Opens a window showing the found point cloud. Points are colorized using the pixel value inside
one of the input images | [
"Opens",
"a",
"window",
"showing",
"the",
"found",
"point",
"cloud",
".",
"Points",
"are",
"colorized",
"using",
"the",
"pixel",
"value",
"inside",
"one",
"of",
"the",
"input",
"images"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/sfm/ExampleMultiviewSceneReconstruction.java#L153-L198 |
50,390 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePolynomialMath.java | QrCodePolynomialMath.decodeFormatMessage | public static void decodeFormatMessage(int message , QrCode qr ) {
int error = message >> 3;
qr.error = QrCode.ErrorLevel.lookup(error);
qr.mask = QrCodeMaskPattern.lookupMask(message&0x07);
} | java | public static void decodeFormatMessage(int message , QrCode qr ) {
int error = message >> 3;
qr.error = QrCode.ErrorLevel.lookup(error);
qr.mask = QrCodeMaskPattern.lookupMask(message&0x07);
} | [
"public",
"static",
"void",
"decodeFormatMessage",
"(",
"int",
"message",
",",
"QrCode",
"qr",
")",
"{",
"int",
"error",
"=",
"message",
">>",
"3",
";",
"qr",
".",
"error",
"=",
"QrCode",
".",
"ErrorLevel",
".",
"lookup",
"(",
"error",
")",
";",
"qr",
... | Assumes that the format message has no errors in it and decodes its data and saves it into the qr code
@param message format data bits after the mask has been remove and shifted over 10 bits
@param qr Where the results are written to | [
"Assumes",
"that",
"the",
"format",
"message",
"has",
"no",
"errors",
"in",
"it",
"and",
"decodes",
"its",
"data",
"and",
"saves",
"it",
"into",
"the",
"qr",
"code"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePolynomialMath.java#L94-L99 |
50,391 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePolynomialMath.java | QrCodePolynomialMath.correctDCH | public static int correctDCH( int N , int messageNoMask , int generator , int totalBits, int dataBits) {
int bestHamming = 255;
int bestMessage = -1;
int errorBits = totalBits-dataBits;
// exhaustively check all possibilities
for (int i = 0; i < N; i++) {
int test = i << errorBits;
test = test ^ bitPo... | java | public static int correctDCH( int N , int messageNoMask , int generator , int totalBits, int dataBits) {
int bestHamming = 255;
int bestMessage = -1;
int errorBits = totalBits-dataBits;
// exhaustively check all possibilities
for (int i = 0; i < N; i++) {
int test = i << errorBits;
test = test ^ bitPo... | [
"public",
"static",
"int",
"correctDCH",
"(",
"int",
"N",
",",
"int",
"messageNoMask",
",",
"int",
"generator",
",",
"int",
"totalBits",
",",
"int",
"dataBits",
")",
"{",
"int",
"bestHamming",
"=",
"255",
";",
"int",
"bestMessage",
"=",
"-",
"1",
";",
... | Applies a brute force algorithm to find the message which has the smallest hamming distance. if two
messages have the same distance -1 is returned.
@param N Number of possible messages. 32 or 64
@param messageNoMask The observed message with mask removed
@param generator Generator polynomial
@param totalBits Total numb... | [
"Applies",
"a",
"brute",
"force",
"algorithm",
"to",
"find",
"the",
"message",
"which",
"has",
"the",
"smallest",
"hamming",
"distance",
".",
"if",
"two",
"messages",
"have",
"the",
"same",
"distance",
"-",
"1",
"is",
"returned",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePolynomialMath.java#L120-L143 |
50,392 | lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/calibration/ExampleRemoveLensDistortion.java | ExampleRemoveLensDistortion.displayResults | private static void displayResults(BufferedImage orig,
Planar<GrayF32> distortedImg,
ImageDistort allInside, ImageDistort fullView ) {
// render the results
Planar<GrayF32> undistortedImg = new Planar<>(GrayF32.class,
distortedImg.getWidth(),distortedImg.getHeight(),distortedImg.getNumBa... | java | private static void displayResults(BufferedImage orig,
Planar<GrayF32> distortedImg,
ImageDistort allInside, ImageDistort fullView ) {
// render the results
Planar<GrayF32> undistortedImg = new Planar<>(GrayF32.class,
distortedImg.getWidth(),distortedImg.getHeight(),distortedImg.getNumBa... | [
"private",
"static",
"void",
"displayResults",
"(",
"BufferedImage",
"orig",
",",
"Planar",
"<",
"GrayF32",
">",
"distortedImg",
",",
"ImageDistort",
"allInside",
",",
"ImageDistort",
"fullView",
")",
"{",
"// render the results",
"Planar",
"<",
"GrayF32",
">",
"u... | Displays results in a window for easy comparison.. | [
"Displays",
"results",
"in",
"a",
"window",
"for",
"easy",
"comparison",
".."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/calibration/ExampleRemoveLensDistortion.java#L92-L112 |
50,393 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/StabilitySquareFiducialEstimate.java | StabilitySquareFiducialEstimate.process | public boolean process( double sampleRadius , Quadrilateral_F64 input ) {
work.set(input);
samples.reset();
estimator.process(work,false);
estimator.getWorldToCamera().invert(referenceCameraToWorld);
samples.reset();
createSamples(sampleRadius,work.a,input.a);
createSamples(sampleRadius,work.b,input.b)... | java | public boolean process( double sampleRadius , Quadrilateral_F64 input ) {
work.set(input);
samples.reset();
estimator.process(work,false);
estimator.getWorldToCamera().invert(referenceCameraToWorld);
samples.reset();
createSamples(sampleRadius,work.a,input.a);
createSamples(sampleRadius,work.b,input.b)... | [
"public",
"boolean",
"process",
"(",
"double",
"sampleRadius",
",",
"Quadrilateral_F64",
"input",
")",
"{",
"work",
".",
"set",
"(",
"input",
")",
";",
"samples",
".",
"reset",
"(",
")",
";",
"estimator",
".",
"process",
"(",
"work",
",",
"false",
")",
... | Processes the observation and generates a stability estimate
@param sampleRadius Radius around the corner pixels it will sample
@param input Observed corner location of the fiducial in distorted pixels. Must be in correct order.
@return true if successful or false if it failed | [
"Processes",
"the",
"observation",
"and",
"generates",
"a",
"stability",
"estimate"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/StabilitySquareFiducialEstimate.java#L68-L106 |
50,394 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/StabilitySquareFiducialEstimate.java | StabilitySquareFiducialEstimate.createSamples | private void createSamples( double sampleRadius , Point2D_F64 workPoint , Point2D_F64 originalPoint ) {
workPoint.x = originalPoint.x + sampleRadius;
if( estimator.process(work,false) ) {
samples.grow().set( estimator.getWorldToCamera() );
}
workPoint.x = originalPoint.x - sampleRadius;
if( estimator.proc... | java | private void createSamples( double sampleRadius , Point2D_F64 workPoint , Point2D_F64 originalPoint ) {
workPoint.x = originalPoint.x + sampleRadius;
if( estimator.process(work,false) ) {
samples.grow().set( estimator.getWorldToCamera() );
}
workPoint.x = originalPoint.x - sampleRadius;
if( estimator.proc... | [
"private",
"void",
"createSamples",
"(",
"double",
"sampleRadius",
",",
"Point2D_F64",
"workPoint",
",",
"Point2D_F64",
"originalPoint",
")",
"{",
"workPoint",
".",
"x",
"=",
"originalPoint",
".",
"x",
"+",
"sampleRadius",
";",
"if",
"(",
"estimator",
".",
"pr... | Samples around the provided corner +- in x and y directions | [
"Samples",
"around",
"the",
"provided",
"corner",
"+",
"-",
"in",
"x",
"and",
"y",
"directions"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/StabilitySquareFiducialEstimate.java#L111-L132 |
50,395 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldLearning.java | TldLearning.initialLearning | public void initialLearning( Rectangle2D_F64 targetRegion ,
FastQueue<ImageRectangle> cascadeRegions ) {
storageMetric.reset();
fernNegative.clear();
// learn the initial descriptor
TldHelperFunctions.convertRegion(targetRegion, targetRegion_I32);
// select the variance the first time using user s... | java | public void initialLearning( Rectangle2D_F64 targetRegion ,
FastQueue<ImageRectangle> cascadeRegions ) {
storageMetric.reset();
fernNegative.clear();
// learn the initial descriptor
TldHelperFunctions.convertRegion(targetRegion, targetRegion_I32);
// select the variance the first time using user s... | [
"public",
"void",
"initialLearning",
"(",
"Rectangle2D_F64",
"targetRegion",
",",
"FastQueue",
"<",
"ImageRectangle",
">",
"cascadeRegions",
")",
"{",
"storageMetric",
".",
"reset",
"(",
")",
";",
"fernNegative",
".",
"clear",
"(",
")",
";",
"// learn the initial ... | Select positive and negative examples based on the region the user's initially selected region. The selected
region is used as a positive example while all the other regions far away are used as negative examples.
@param targetRegion user selected region
@param cascadeRegions Set of regions used by the cascade detect... | [
"Select",
"positive",
"and",
"negative",
"examples",
"based",
"on",
"the",
"region",
"the",
"user",
"s",
"initially",
"selected",
"region",
".",
"The",
"selected",
"region",
"is",
"used",
"as",
"a",
"positive",
"example",
"while",
"all",
"the",
"other",
"reg... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldLearning.java#L83-L126 |
50,396 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldLearning.java | TldLearning.updateLearning | public void updateLearning( Rectangle2D_F64 targetRegion ) {
storageMetric.reset();
// learn the initial descriptor
TldHelperFunctions.convertRegion(targetRegion, targetRegion_I32);
template.addDescriptor(true, targetRegion_I32);
fern.learnFernNoise(true, targetRegion_I32);
// mark only a few of the far... | java | public void updateLearning( Rectangle2D_F64 targetRegion ) {
storageMetric.reset();
// learn the initial descriptor
TldHelperFunctions.convertRegion(targetRegion, targetRegion_I32);
template.addDescriptor(true, targetRegion_I32);
fern.learnFernNoise(true, targetRegion_I32);
// mark only a few of the far... | [
"public",
"void",
"updateLearning",
"(",
"Rectangle2D_F64",
"targetRegion",
")",
"{",
"storageMetric",
".",
"reset",
"(",
")",
";",
"// learn the initial descriptor",
"TldHelperFunctions",
".",
"convertRegion",
"(",
"targetRegion",
",",
"targetRegion_I32",
")",
";",
"... | Updates learning using the latest tracking results.
@param targetRegion Region selected by the fused tracking | [
"Updates",
"learning",
"using",
"the",
"latest",
"tracking",
"results",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldLearning.java#L133-L162 |
50,397 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldLearning.java | TldLearning.learnAmbiguousNegative | protected void learnAmbiguousNegative(Rectangle2D_F64 targetRegion) {
TldHelperFunctions.convertRegion(targetRegion, targetRegion_I32);
if( detection.isSuccess() ) {
TldRegion best = detection.getBest();
// see if it found the correct solution
double overlap = helper.computeOverlap(best.rect,targetRegio... | java | protected void learnAmbiguousNegative(Rectangle2D_F64 targetRegion) {
TldHelperFunctions.convertRegion(targetRegion, targetRegion_I32);
if( detection.isSuccess() ) {
TldRegion best = detection.getBest();
// see if it found the correct solution
double overlap = helper.computeOverlap(best.rect,targetRegio... | [
"protected",
"void",
"learnAmbiguousNegative",
"(",
"Rectangle2D_F64",
"targetRegion",
")",
"{",
"TldHelperFunctions",
".",
"convertRegion",
"(",
"targetRegion",
",",
"targetRegion_I32",
")",
";",
"if",
"(",
"detection",
".",
"isSuccess",
"(",
")",
")",
"{",
"TldR... | Mark regions which were local maximums and had high confidence as negative. These regions were
candidates for the tracker but were not selected | [
"Mark",
"regions",
"which",
"were",
"local",
"maximums",
"and",
"had",
"high",
"confidence",
"as",
"negative",
".",
"These",
"regions",
"were",
"candidates",
"for",
"the",
"tracker",
"but",
"were",
"not",
"selected"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldLearning.java#L168-L192 |
50,398 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/factory/filter/binary/FactoryThresholdBinary.java | FactoryThresholdBinary.localOtsu | public static <T extends ImageGray<T>>
InputToBinary<T> localOtsu(ConfigLength regionWidth, double scale, boolean down, boolean otsu2, double tuning, Class<T> inputType) {
if( BOverrideFactoryThresholdBinary.localOtsu != null )
return BOverrideFactoryThresholdBinary.localOtsu.handle(otsu2,regionWidth, tuning, sca... | java | public static <T extends ImageGray<T>>
InputToBinary<T> localOtsu(ConfigLength regionWidth, double scale, boolean down, boolean otsu2, double tuning, Class<T> inputType) {
if( BOverrideFactoryThresholdBinary.localOtsu != null )
return BOverrideFactoryThresholdBinary.localOtsu.handle(otsu2,regionWidth, tuning, sca... | [
"public",
"static",
"<",
"T",
"extends",
"ImageGray",
"<",
"T",
">",
">",
"InputToBinary",
"<",
"T",
">",
"localOtsu",
"(",
"ConfigLength",
"regionWidth",
",",
"double",
"scale",
",",
"boolean",
"down",
",",
"boolean",
"otsu2",
",",
"double",
"tuning",
","... | Applies a local Otsu threshold
@see ThresholdLocalOtsu
@param regionWidth About how wide and tall you wish a block to be in pixels.
@param scale Scale factor adjust for threshold. 1.0 means no change.
@param down Should it threshold up or down.
@param tuning Tuning parameter. 0 = standard Otsu. Greater than 0 will p... | [
"Applies",
"a",
"local",
"Otsu",
"threshold"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/filter/binary/FactoryThresholdBinary.java#L128-L140 |
50,399 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/factory/filter/binary/FactoryThresholdBinary.java | FactoryThresholdBinary.blockMean | public static <T extends ImageGray<T>>
InputToBinary<T> blockMean(ConfigLength regionWidth, double scale , boolean down, boolean thresholdFromLocalBlocks,
Class<T> inputType) {
if( BOverrideFactoryThresholdBinary.blockMean != null )
return BOverrideFactoryThresholdBinary.blockMean.handle(regionWidth, sc... | java | public static <T extends ImageGray<T>>
InputToBinary<T> blockMean(ConfigLength regionWidth, double scale , boolean down, boolean thresholdFromLocalBlocks,
Class<T> inputType) {
if( BOverrideFactoryThresholdBinary.blockMean != null )
return BOverrideFactoryThresholdBinary.blockMean.handle(regionWidth, sc... | [
"public",
"static",
"<",
"T",
"extends",
"ImageGray",
"<",
"T",
">",
">",
"InputToBinary",
"<",
"T",
">",
"blockMean",
"(",
"ConfigLength",
"regionWidth",
",",
"double",
"scale",
",",
"boolean",
"down",
",",
"boolean",
"thresholdFromLocalBlocks",
",",
"Class",... | Applies a non-overlapping block mean threshold
@see ThresholdBlockMean
@param scale Scale factor adjust for threshold. 1.0 means no change.
@param down Should it threshold up or down.
@param regionWidth Approximate size of block region
@param inputType Type of input image
@return Filter to binary | [
"Applies",
"a",
"non",
"-",
"overlapping",
"block",
"mean",
"threshold"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/filter/binary/FactoryThresholdBinary.java#L186-L204 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.