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,000 | lessthanoptimal/BoofCV | demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java | DemonstrationBase.openImageSet | public void openImageSet(String ...files ) {
synchronized (lockStartingProcess) {
if( startingProcess ) {
System.out.println("Ignoring open image set request. Detected spamming");
return;
}
startingProcess = true;
}
stopAllInputProcessing();
synchronized (inputStreams) {
inputMethod = Inp... | java | public void openImageSet(String ...files ) {
synchronized (lockStartingProcess) {
if( startingProcess ) {
System.out.println("Ignoring open image set request. Detected spamming");
return;
}
startingProcess = true;
}
stopAllInputProcessing();
synchronized (inputStreams) {
inputMethod = Inp... | [
"public",
"void",
"openImageSet",
"(",
"String",
"...",
"files",
")",
"{",
"synchronized",
"(",
"lockStartingProcess",
")",
"{",
"if",
"(",
"startingProcess",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"Ignoring open image set request. Detected spamming... | Opens a set of images
@param files | [
"Opens",
"a",
"set",
"of",
"images"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java#L404-L424 |
50,001 | lessthanoptimal/BoofCV | demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java | DemonstrationBase.openNextFile | public void openNextFile() {
if( inputFilePath == null || inputMethod != InputMethod.IMAGE )
return;
String path;
try {
// need to remove annoying %20 from the path is there is whitespace
path = URLDecoder.decode(inputFilePath, "utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace(... | java | public void openNextFile() {
if( inputFilePath == null || inputMethod != InputMethod.IMAGE )
return;
String path;
try {
// need to remove annoying %20 from the path is there is whitespace
path = URLDecoder.decode(inputFilePath, "utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace(... | [
"public",
"void",
"openNextFile",
"(",
")",
"{",
"if",
"(",
"inputFilePath",
"==",
"null",
"||",
"inputMethod",
"!=",
"InputMethod",
".",
"IMAGE",
")",
"return",
";",
"String",
"path",
";",
"try",
"{",
"// need to remove annoying %20 from the path is there is whites... | Opens the next file in the directory by lexicographical order. | [
"Opens",
"the",
"next",
"file",
"in",
"the",
"directory",
"by",
"lexicographical",
"order",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java#L429-L474 |
50,002 | lessthanoptimal/BoofCV | demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java | DemonstrationBase.openVideo | protected void openVideo(boolean reopen , String ...filePaths) {
synchronized (lockStartingProcess) {
if( startingProcess ) {
System.out.println("Ignoring video request. Detected spamming");
return;
}
startingProcess = true;
}
synchronized (inputStreams) {
if (inputStreams.size() != filePath... | java | protected void openVideo(boolean reopen , String ...filePaths) {
synchronized (lockStartingProcess) {
if( startingProcess ) {
System.out.println("Ignoring video request. Detected spamming");
return;
}
startingProcess = true;
}
synchronized (inputStreams) {
if (inputStreams.size() != filePath... | [
"protected",
"void",
"openVideo",
"(",
"boolean",
"reopen",
",",
"String",
"...",
"filePaths",
")",
"{",
"synchronized",
"(",
"lockStartingProcess",
")",
"{",
"if",
"(",
"startingProcess",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"Ignoring video ... | Before invoking this function make sure waitingToOpenImage is false AND that the previous input has been stopped | [
"Before",
"invoking",
"this",
"function",
"make",
"sure",
"waitingToOpenImage",
"is",
"false",
"AND",
"that",
"the",
"previous",
"input",
"has",
"been",
"stopped"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java#L479-L541 |
50,003 | lessthanoptimal/BoofCV | demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java | DemonstrationBase.display | public void display(String appName ) {
waitUntilInputSizeIsKnown();
this.appName = appName;
window = ShowImages.showWindow(this,appName,true);
window.setJMenuBar(menuBar);
} | java | public void display(String appName ) {
waitUntilInputSizeIsKnown();
this.appName = appName;
window = ShowImages.showWindow(this,appName,true);
window.setJMenuBar(menuBar);
} | [
"public",
"void",
"display",
"(",
"String",
"appName",
")",
"{",
"waitUntilInputSizeIsKnown",
"(",
")",
";",
"this",
".",
"appName",
"=",
"appName",
";",
"window",
"=",
"ShowImages",
".",
"showWindow",
"(",
"this",
",",
"appName",
",",
"true",
")",
";",
... | Opens a window with this application inside of it
@param appName Name of the application | [
"Opens",
"a",
"window",
"with",
"this",
"application",
"inside",
"of",
"it"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java#L658-L663 |
50,004 | lessthanoptimal/BoofCV | demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java | DemonstrationBase.openFileMenuBar | protected void openFileMenuBar() {
List<BoofSwingUtil.FileTypes> types = new ArrayList<>();
if( allowImages )
types.add(BoofSwingUtil.FileTypes.IMAGES);
if( allowVideos )
types.add(BoofSwingUtil.FileTypes.VIDEOS);
BoofSwingUtil.FileTypes array[] = types.toArray(new BoofSwingUtil.FileTypes[0]);
File fil... | java | protected void openFileMenuBar() {
List<BoofSwingUtil.FileTypes> types = new ArrayList<>();
if( allowImages )
types.add(BoofSwingUtil.FileTypes.IMAGES);
if( allowVideos )
types.add(BoofSwingUtil.FileTypes.VIDEOS);
BoofSwingUtil.FileTypes array[] = types.toArray(new BoofSwingUtil.FileTypes[0]);
File fil... | [
"protected",
"void",
"openFileMenuBar",
"(",
")",
"{",
"List",
"<",
"BoofSwingUtil",
".",
"FileTypes",
">",
"types",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"if",
"(",
"allowImages",
")",
"types",
".",
"add",
"(",
"BoofSwingUtil",
".",
"FileTypes",
... | Open file in the menu bar was invoked by the user | [
"Open",
"file",
"in",
"the",
"menu",
"bar",
"was",
"invoked",
"by",
"the",
"user"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java#L693-L705 |
50,005 | lessthanoptimal/BoofCV | demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java | DemonstrationBase.reprocessInput | public void reprocessInput() {
if ( inputMethod == InputMethod.VIDEO ) {
openVideo(true,inputFilePath);
} else if( inputMethod == InputMethod.IMAGE ) {
BufferedImage buff = inputStreams.get(0).getBufferedImage();
openImage(true,new File(inputFilePath).getName(),buff);// TODO still does a pointless image co... | java | public void reprocessInput() {
if ( inputMethod == InputMethod.VIDEO ) {
openVideo(true,inputFilePath);
} else if( inputMethod == InputMethod.IMAGE ) {
BufferedImage buff = inputStreams.get(0).getBufferedImage();
openImage(true,new File(inputFilePath).getName(),buff);// TODO still does a pointless image co... | [
"public",
"void",
"reprocessInput",
"(",
")",
"{",
"if",
"(",
"inputMethod",
"==",
"InputMethod",
".",
"VIDEO",
")",
"{",
"openVideo",
"(",
"true",
",",
"inputFilePath",
")",
";",
"}",
"else",
"if",
"(",
"inputMethod",
"==",
"InputMethod",
".",
"IMAGE",
... | If just a single image was processed it will process it again. If it's a stream
there is no need to reprocess, the next image will be handled soon enough. | [
"If",
"just",
"a",
"single",
"image",
"was",
"processed",
"it",
"will",
"process",
"it",
"again",
".",
"If",
"it",
"s",
"a",
"stream",
"there",
"is",
"no",
"need",
"to",
"reprocess",
"the",
"next",
"image",
"will",
"be",
"handled",
"soon",
"enough",
".... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java#L880-L889 |
50,006 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/interest/GeneralFeatureDetector.java | GeneralFeatureDetector.process | public void process(I image, D derivX, D derivY, D derivXX, D derivYY, D derivXY) {
intensity.process(image, derivX, derivY, derivXX, derivYY, derivXY);
GrayF32 intensityImage = intensity.getIntensity();
int numSelectMin = -1;
int numSelectMax = -1;
if( maxFeatures > 0 ) {
if( intensity.localMinimums() )
... | java | public void process(I image, D derivX, D derivY, D derivXX, D derivYY, D derivXY) {
intensity.process(image, derivX, derivY, derivXX, derivYY, derivXY);
GrayF32 intensityImage = intensity.getIntensity();
int numSelectMin = -1;
int numSelectMax = -1;
if( maxFeatures > 0 ) {
if( intensity.localMinimums() )
... | [
"public",
"void",
"process",
"(",
"I",
"image",
",",
"D",
"derivX",
",",
"D",
"derivY",
",",
"D",
"derivXX",
",",
"D",
"derivYY",
",",
"D",
"derivXY",
")",
"{",
"intensity",
".",
"process",
"(",
"image",
",",
"derivX",
",",
"derivY",
",",
"derivXX",
... | Computes point features from image gradients.
@param image Original image.
@param derivX image derivative in along the x-axis. Only needed if {@link #getRequiresGradient()} is true.
@param derivY image derivative in along the y-axis. Only needed if {@link #getRequiresGradient()} is true.
@param derivXX Second deri... | [
"Computes",
"point",
"features",
"from",
"image",
"gradients",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/interest/GeneralFeatureDetector.java#L107-L149 |
50,007 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/factory/feature/describe/FactoryDescribeRegionPoint.java | FactoryDescribeRegionPoint.surfColorStable | public static <T extends ImageBase<T>, II extends ImageGray<II>>
DescribeRegionPoint<T,BrightFeature> surfColorStable(ConfigSurfDescribe.Stability config, ImageType<T> imageType) {
Class bandType = imageType.getImageClass();
Class<II> integralType = GIntegralImageOps.getIntegralType(bandType);
DescribePointSur... | java | public static <T extends ImageBase<T>, II extends ImageGray<II>>
DescribeRegionPoint<T,BrightFeature> surfColorStable(ConfigSurfDescribe.Stability config, ImageType<T> imageType) {
Class bandType = imageType.getImageClass();
Class<II> integralType = GIntegralImageOps.getIntegralType(bandType);
DescribePointSur... | [
"public",
"static",
"<",
"T",
"extends",
"ImageBase",
"<",
"T",
">",
",",
"II",
"extends",
"ImageGray",
"<",
"II",
">",
">",
"DescribeRegionPoint",
"<",
"T",
",",
"BrightFeature",
">",
"surfColorStable",
"(",
"ConfigSurfDescribe",
".",
"Stability",
"config",
... | Color variant of the SURF descriptor which has been designed for stability.
@see DescribePointSurfPlanar
@param config SURF configuration. Pass in null for default options.
@param imageType Type of input image.
@return SURF color description extractor | [
"Color",
"variant",
"of",
"the",
"SURF",
"descriptor",
"which",
"has",
"been",
"designed",
"for",
"stability",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/factory/feature/describe/FactoryDescribeRegionPoint.java#L127-L142 |
50,008 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/factory/feature/describe/FactoryDescribeRegionPoint.java | FactoryDescribeRegionPoint.pixel | @SuppressWarnings({"unchecked"})
public static <T extends ImageGray<T>, D extends TupleDesc>
DescribeRegionPoint<T,D> pixel( int regionWidth , int regionHeight , Class<T> imageType ) {
return new WrapDescribePixelRegion(
FactoryDescribePointAlgs.pixelRegion(regionWidth,regionHeight,imageType),imageType);
} | java | @SuppressWarnings({"unchecked"})
public static <T extends ImageGray<T>, D extends TupleDesc>
DescribeRegionPoint<T,D> pixel( int regionWidth , int regionHeight , Class<T> imageType ) {
return new WrapDescribePixelRegion(
FactoryDescribePointAlgs.pixelRegion(regionWidth,regionHeight,imageType),imageType);
} | [
"@",
"SuppressWarnings",
"(",
"{",
"\"unchecked\"",
"}",
")",
"public",
"static",
"<",
"T",
"extends",
"ImageGray",
"<",
"T",
">",
",",
"D",
"extends",
"TupleDesc",
">",
"DescribeRegionPoint",
"<",
"T",
",",
"D",
">",
"pixel",
"(",
"int",
"regionWidth",
... | Creates a region descriptor based on pixel intensity values alone. A classic and fast to compute
descriptor, but much less stable than more modern ones.
@see boofcv.alg.feature.describe.DescribePointPixelRegion
@param regionWidth How wide the pixel region is.
@param regionHeight How tall the pixel region is.
@param ... | [
"Creates",
"a",
"region",
"descriptor",
"based",
"on",
"pixel",
"intensity",
"values",
"alone",
".",
"A",
"classic",
"and",
"fast",
"to",
"compute",
"descriptor",
"but",
"much",
"less",
"stable",
"than",
"more",
"modern",
"ones",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/factory/feature/describe/FactoryDescribeRegionPoint.java#L215-L220 |
50,009 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/factory/feature/describe/FactoryDescribeRegionPoint.java | FactoryDescribeRegionPoint.pixelNCC | @SuppressWarnings({"unchecked"})
public static <T extends ImageGray<T>>
DescribeRegionPoint<T,NccFeature> pixelNCC( int regionWidth , int regionHeight , Class<T> imageType ) {
return new WrapDescribePixelRegionNCC(
FactoryDescribePointAlgs.pixelRegionNCC(regionWidth,regionHeight,imageType),imageType);
} | java | @SuppressWarnings({"unchecked"})
public static <T extends ImageGray<T>>
DescribeRegionPoint<T,NccFeature> pixelNCC( int regionWidth , int regionHeight , Class<T> imageType ) {
return new WrapDescribePixelRegionNCC(
FactoryDescribePointAlgs.pixelRegionNCC(regionWidth,regionHeight,imageType),imageType);
} | [
"@",
"SuppressWarnings",
"(",
"{",
"\"unchecked\"",
"}",
")",
"public",
"static",
"<",
"T",
"extends",
"ImageGray",
"<",
"T",
">",
">",
"DescribeRegionPoint",
"<",
"T",
",",
"NccFeature",
">",
"pixelNCC",
"(",
"int",
"regionWidth",
",",
"int",
"regionHeight"... | Creates a region descriptor based on normalized pixel intensity values alone. This descriptor
is designed to be light invariance, but is still less stable than more modern ones.
@see boofcv.alg.feature.describe.DescribePointPixelRegionNCC
@param regionWidth How wide the pixel region is.
@param regionHeight How tall ... | [
"Creates",
"a",
"region",
"descriptor",
"based",
"on",
"normalized",
"pixel",
"intensity",
"values",
"alone",
".",
"This",
"descriptor",
"is",
"designed",
"to",
"be",
"light",
"invariance",
"but",
"is",
"still",
"less",
"stable",
"than",
"more",
"modern",
"one... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/factory/feature/describe/FactoryDescribeRegionPoint.java#L233-L238 |
50,010 | lessthanoptimal/BoofCV | main/boofcv-io/src/main/java/boofcv/io/calibration/CalibrationIO.java | CalibrationIO.save | public static <T extends CameraPinhole> void save(T parameters , Writer outputWriter ) {
PrintWriter out = new PrintWriter(outputWriter);
Yaml yaml = createYmlObject();
Map<String, Object> data = new HashMap<>();
if( parameters instanceof CameraPinholeBrown) {
out.println("# Pinhole camera model with radi... | java | public static <T extends CameraPinhole> void save(T parameters , Writer outputWriter ) {
PrintWriter out = new PrintWriter(outputWriter);
Yaml yaml = createYmlObject();
Map<String, Object> data = new HashMap<>();
if( parameters instanceof CameraPinholeBrown) {
out.println("# Pinhole camera model with radi... | [
"public",
"static",
"<",
"T",
"extends",
"CameraPinhole",
">",
"void",
"save",
"(",
"T",
"parameters",
",",
"Writer",
"outputWriter",
")",
"{",
"PrintWriter",
"out",
"=",
"new",
"PrintWriter",
"(",
"outputWriter",
")",
";",
"Yaml",
"yaml",
"=",
"createYmlObj... | Saves intrinsic camera model to disk
@param parameters Camera parameters
@param outputWriter Path to where it should be saved | [
"Saves",
"intrinsic",
"camera",
"model",
"to",
"disk"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-io/src/main/java/boofcv/io/calibration/CalibrationIO.java#L56-L89 |
50,011 | lessthanoptimal/BoofCV | main/boofcv-io/src/main/java/boofcv/io/calibration/CalibrationIO.java | CalibrationIO.save | public static void save(StereoParameters parameters , Writer outputWriter ) {
Map<String, Object> map = new HashMap<>();
map.put("model",MODEL_STEREO);
map.put(VERSION,0);
map.put("left",putModelRadial(parameters.left,null));
map.put("right",putModelRadial(parameters.right,null));
map.put("rightToLeft",put... | java | public static void save(StereoParameters parameters , Writer outputWriter ) {
Map<String, Object> map = new HashMap<>();
map.put("model",MODEL_STEREO);
map.put(VERSION,0);
map.put("left",putModelRadial(parameters.left,null));
map.put("right",putModelRadial(parameters.right,null));
map.put("rightToLeft",put... | [
"public",
"static",
"void",
"save",
"(",
"StereoParameters",
"parameters",
",",
"Writer",
"outputWriter",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"map",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"map",
".",
"put",
"(",
"\"model\"",
",",
"... | Saves stereo camera model to disk
@param parameters Camera parameters
@param outputWriter Stream to save the parameters to | [
"Saves",
"stereo",
"camera",
"model",
"to",
"disk"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-io/src/main/java/boofcv/io/calibration/CalibrationIO.java#L115-L129 |
50,012 | lessthanoptimal/BoofCV | main/boofcv-io/src/main/java/boofcv/io/calibration/CalibrationIO.java | CalibrationIO.load | public static <T> T load(Reader reader ) {
Yaml yaml = createYmlObject();
Map<String,Object> data = (Map<String, Object>) yaml.load(reader);
try {
reader.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
return load(data);
} | java | public static <T> T load(Reader reader ) {
Yaml yaml = createYmlObject();
Map<String,Object> data = (Map<String, Object>) yaml.load(reader);
try {
reader.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
return load(data);
} | [
"public",
"static",
"<",
"T",
">",
"T",
"load",
"(",
"Reader",
"reader",
")",
"{",
"Yaml",
"yaml",
"=",
"createYmlObject",
"(",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"data",
"=",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"... | Loads intrinsic parameters from disk
@param reader Reader
@return Camera model | [
"Loads",
"intrinsic",
"parameters",
"from",
"disk"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-io/src/main/java/boofcv/io/calibration/CalibrationIO.java#L238-L250 |
50,013 | lessthanoptimal/BoofCV | main/boofcv-calibration/src/main/java/boofcv/alg/geo/calibration/CalibrationPlanarGridZhang99.java | CalibrationPlanarGridZhang99.process | public boolean process( List<CalibrationObservation> observations ) {
// compute initial parameter estimates using linear algebra
if( !linearEstimate(observations) )
return false;
status("Non-linear refinement");
// perform non-linear optimization to improve results
if( !performBundleAdjustment())
ret... | java | public boolean process( List<CalibrationObservation> observations ) {
// compute initial parameter estimates using linear algebra
if( !linearEstimate(observations) )
return false;
status("Non-linear refinement");
// perform non-linear optimization to improve results
if( !performBundleAdjustment())
ret... | [
"public",
"boolean",
"process",
"(",
"List",
"<",
"CalibrationObservation",
">",
"observations",
")",
"{",
"// compute initial parameter estimates using linear algebra",
"if",
"(",
"!",
"linearEstimate",
"(",
"observations",
")",
")",
"return",
"false",
";",
"status",
... | Processes observed calibration point coordinates and computes camera intrinsic and extrinsic
parameters.
@param observations Set of observed grid locations in pixel coordinates.
@return true if successful and false if it failed | [
"Processes",
"observed",
"calibration",
"point",
"coordinates",
"and",
"computes",
"camera",
"intrinsic",
"and",
"extrinsic",
"parameters",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-calibration/src/main/java/boofcv/alg/geo/calibration/CalibrationPlanarGridZhang99.java#L122-L134 |
50,014 | lessthanoptimal/BoofCV | main/boofcv-calibration/src/main/java/boofcv/alg/geo/calibration/CalibrationPlanarGridZhang99.java | CalibrationPlanarGridZhang99.linearEstimate | protected boolean linearEstimate(List<CalibrationObservation> observations )
{
status("Estimating Homographies");
List<DMatrixRMaj> homographies = new ArrayList<>();
List<Se3_F64> motions = new ArrayList<>();
for( CalibrationObservation obs : observations ) {
if( !computeHomography.computeHomography(obs) ... | java | protected boolean linearEstimate(List<CalibrationObservation> observations )
{
status("Estimating Homographies");
List<DMatrixRMaj> homographies = new ArrayList<>();
List<Se3_F64> motions = new ArrayList<>();
for( CalibrationObservation obs : observations ) {
if( !computeHomography.computeHomography(obs) ... | [
"protected",
"boolean",
"linearEstimate",
"(",
"List",
"<",
"CalibrationObservation",
">",
"observations",
")",
"{",
"status",
"(",
"\"Estimating Homographies\"",
")",
";",
"List",
"<",
"DMatrixRMaj",
">",
"homographies",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
... | Find an initial estimate for calibration parameters using linear techniques. | [
"Find",
"an",
"initial",
"estimate",
"for",
"calibration",
"parameters",
"using",
"linear",
"techniques",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-calibration/src/main/java/boofcv/alg/geo/calibration/CalibrationPlanarGridZhang99.java#L139-L171 |
50,015 | lessthanoptimal/BoofCV | main/boofcv-calibration/src/main/java/boofcv/alg/geo/calibration/CalibrationPlanarGridZhang99.java | CalibrationPlanarGridZhang99.performBundleAdjustment | public boolean performBundleAdjustment()
{
// Configure the sparse Levenberg-Marquardt solver
ConfigLevenbergMarquardt configLM = new ConfigLevenbergMarquardt();
configLM.hessianScaling = false;
ConfigBundleAdjustment configSBA = new ConfigBundleAdjustment();
configSBA.configOptimizer = configLM;
BundleA... | java | public boolean performBundleAdjustment()
{
// Configure the sparse Levenberg-Marquardt solver
ConfigLevenbergMarquardt configLM = new ConfigLevenbergMarquardt();
configLM.hessianScaling = false;
ConfigBundleAdjustment configSBA = new ConfigBundleAdjustment();
configSBA.configOptimizer = configLM;
BundleA... | [
"public",
"boolean",
"performBundleAdjustment",
"(",
")",
"{",
"// Configure the sparse Levenberg-Marquardt solver",
"ConfigLevenbergMarquardt",
"configLM",
"=",
"new",
"ConfigLevenbergMarquardt",
"(",
")",
";",
"configLM",
".",
"hessianScaling",
"=",
"false",
";",
"ConfigB... | Use non-linear optimization to improve the parameter estimates | [
"Use",
"non",
"-",
"linear",
"optimization",
"to",
"improve",
"the",
"parameter",
"estimates"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-calibration/src/main/java/boofcv/alg/geo/calibration/CalibrationPlanarGridZhang99.java#L183-L206 |
50,016 | lessthanoptimal/BoofCV | main/boofcv-calibration/src/main/java/boofcv/alg/geo/calibration/CalibrationPlanarGridZhang99.java | CalibrationPlanarGridZhang99.applyDistortion | public static void applyDistortion(Point2D_F64 normPt, double[] radial, double t1 , double t2 )
{
final double x = normPt.x;
final double y = normPt.y;
double a = 0;
double r2 = x*x + y*y;
double r2i = r2;
for( int i = 0; i < radial.length; i++ ) {
a += radial[i]*r2i;
r2i *= r2;
}
normPt.x = x ... | java | public static void applyDistortion(Point2D_F64 normPt, double[] radial, double t1 , double t2 )
{
final double x = normPt.x;
final double y = normPt.y;
double a = 0;
double r2 = x*x + y*y;
double r2i = r2;
for( int i = 0; i < radial.length; i++ ) {
a += radial[i]*r2i;
r2i *= r2;
}
normPt.x = x ... | [
"public",
"static",
"void",
"applyDistortion",
"(",
"Point2D_F64",
"normPt",
",",
"double",
"[",
"]",
"radial",
",",
"double",
"t1",
",",
"double",
"t2",
")",
"{",
"final",
"double",
"x",
"=",
"normPt",
".",
"x",
";",
"final",
"double",
"y",
"=",
"norm... | Applies radial and tangential distortion to the normalized image coordinate.
@param normPt point in normalized image coordinates
@param radial radial distortion parameters
@param t1 tangential parameter
@param t2 tangential parameter | [
"Applies",
"radial",
"and",
"tangential",
"distortion",
"to",
"the",
"normalized",
"image",
"coordinate",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-calibration/src/main/java/boofcv/alg/geo/calibration/CalibrationPlanarGridZhang99.java#L303-L318 |
50,017 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/robust/DistanceSe3SymmetricSq.java | DistanceSe3SymmetricSq.computeDistance | @Override
public double computeDistance(AssociatedPair obs) {
// triangulate the point in 3D space
triangulate.triangulate(obs.p1,obs.p2,keyToCurr,p);
if( p.z < 0 )
return Double.MAX_VALUE;
// compute observational error in each view
double error = errorCam1.errorSq(obs.p1.x,obs.p1.y,p.x/p.z,p.y/p.z);
... | java | @Override
public double computeDistance(AssociatedPair obs) {
// triangulate the point in 3D space
triangulate.triangulate(obs.p1,obs.p2,keyToCurr,p);
if( p.z < 0 )
return Double.MAX_VALUE;
// compute observational error in each view
double error = errorCam1.errorSq(obs.p1.x,obs.p1.y,p.x/p.z,p.y/p.z);
... | [
"@",
"Override",
"public",
"double",
"computeDistance",
"(",
"AssociatedPair",
"obs",
")",
"{",
"// triangulate the point in 3D space",
"triangulate",
".",
"triangulate",
"(",
"obs",
".",
"p1",
",",
"obs",
".",
"p2",
",",
"keyToCurr",
",",
"p",
")",
";",
"if",... | Computes the error given the motion model
@param obs Observation in normalized pixel coordinates
@return observation error | [
"Computes",
"the",
"error",
"given",
"the",
"motion",
"model"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/robust/DistanceSe3SymmetricSq.java#L93-L112 |
50,018 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/GImageDerivativeOps.java | GImageDerivativeOps.getDerivativeType | public static <I extends ImageGray<I>, D extends ImageGray<D>>
Class<D> getDerivativeType( Class<I> imageType ) {
if( imageType == GrayF32.class ) {
return (Class<D>) GrayF32.class;
} else if( imageType == GrayU8.class ) {
return (Class<D>) GrayS16.class;
} else if( imageType == GrayU16.class ) {
retur... | java | public static <I extends ImageGray<I>, D extends ImageGray<D>>
Class<D> getDerivativeType( Class<I> imageType ) {
if( imageType == GrayF32.class ) {
return (Class<D>) GrayF32.class;
} else if( imageType == GrayU8.class ) {
return (Class<D>) GrayS16.class;
} else if( imageType == GrayU16.class ) {
retur... | [
"public",
"static",
"<",
"I",
"extends",
"ImageGray",
"<",
"I",
">",
",",
"D",
"extends",
"ImageGray",
"<",
"D",
">",
">",
"Class",
"<",
"D",
">",
"getDerivativeType",
"(",
"Class",
"<",
"I",
">",
"imageType",
")",
"{",
"if",
"(",
"imageType",
"==",
... | Returns the type of image the derivative should be for the specified input type.
@param imageType Input image type.
@return Appropriate output image type. | [
"Returns",
"the",
"type",
"of",
"image",
"the",
"derivative",
"should",
"be",
"for",
"the",
"specified",
"input",
"type",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/GImageDerivativeOps.java#L57-L68 |
50,019 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/GImageDerivativeOps.java | GImageDerivativeOps.hessian | public static <I extends ImageGray<I>, D extends ImageGray<D>>
void hessian( DerivativeType type , I input , D derivXX , D derivYY , D derivXY , BorderType borderType ) {
ImageBorder<I> border = BorderType.SKIP == borderType ? null : FactoryImageBorder.wrap(borderType, input);
switch( type ) {
case SOBEL:
... | java | public static <I extends ImageGray<I>, D extends ImageGray<D>>
void hessian( DerivativeType type , I input , D derivXX , D derivYY , D derivXY , BorderType borderType ) {
ImageBorder<I> border = BorderType.SKIP == borderType ? null : FactoryImageBorder.wrap(borderType, input);
switch( type ) {
case SOBEL:
... | [
"public",
"static",
"<",
"I",
"extends",
"ImageGray",
"<",
"I",
">",
",",
"D",
"extends",
"ImageGray",
"<",
"D",
">",
">",
"void",
"hessian",
"(",
"DerivativeType",
"type",
",",
"I",
"input",
",",
"D",
"derivXX",
",",
"D",
"derivYY",
",",
"D",
"deriv... | Computes the hessian from the original input image. Only Sobel and Three supported.
@param type Type of gradient to compute
@param input Input image
@param derivXX Output. Derivative XX
@param derivYY Output. Derivative YY
@param derivXY Output. Derivative XY
@param borderType How it should handle borders. null == ... | [
"Computes",
"the",
"hessian",
"from",
"the",
"original",
"input",
"image",
".",
"Only",
"Sobel",
"and",
"Three",
"supported",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/GImageDerivativeOps.java#L181-L209 |
50,020 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/GImageDerivativeOps.java | GImageDerivativeOps.hessian | public static <D extends ImageGray<D>>
void hessian( DerivativeType type , D derivX , D derivY , D derivXX , D derivYY , D derivXY , BorderType borderType ) {
ImageBorder<D> border = BorderType.SKIP == borderType ? null : FactoryImageBorder.wrap(borderType, derivX);
switch( type ) {
case PREWITT:
if( deriv... | java | public static <D extends ImageGray<D>>
void hessian( DerivativeType type , D derivX , D derivY , D derivXX , D derivYY , D derivXY , BorderType borderType ) {
ImageBorder<D> border = BorderType.SKIP == borderType ? null : FactoryImageBorder.wrap(borderType, derivX);
switch( type ) {
case PREWITT:
if( deriv... | [
"public",
"static",
"<",
"D",
"extends",
"ImageGray",
"<",
"D",
">",
">",
"void",
"hessian",
"(",
"DerivativeType",
"type",
",",
"D",
"derivX",
",",
"D",
"derivY",
",",
"D",
"derivXX",
",",
"D",
"derivYY",
",",
"D",
"derivXY",
",",
"BorderType",
"borde... | Computes the hessian from the gradient. Only Prewitt, Sobel and Three supported.
@param type Type of gradient to compute
@param derivX Input derivative X
@param derivY Input derivative Y
@param derivXX Output. Derivative XX
@param derivYY Output. Derivative YY
@param derivXY Output. Derivative XY
@param borderType H... | [
"Computes",
"the",
"hessian",
"from",
"the",
"gradient",
".",
"Only",
"Prewitt",
"Sobel",
"and",
"Three",
"supported",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/GImageDerivativeOps.java#L222-L260 |
50,021 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/GImageDerivativeOps.java | GImageDerivativeOps.lookupKernelX | public static KernelBase lookupKernelX( DerivativeType type , boolean isInteger) {
switch( type ) {
case PREWITT:
return GradientPrewitt.getKernelX(isInteger);
case SOBEL:
return GradientSobel.getKernelX(isInteger);
case THREE:
return GradientThree.getKernelX(isInteger);
case TWO_0:
ret... | java | public static KernelBase lookupKernelX( DerivativeType type , boolean isInteger) {
switch( type ) {
case PREWITT:
return GradientPrewitt.getKernelX(isInteger);
case SOBEL:
return GradientSobel.getKernelX(isInteger);
case THREE:
return GradientThree.getKernelX(isInteger);
case TWO_0:
ret... | [
"public",
"static",
"KernelBase",
"lookupKernelX",
"(",
"DerivativeType",
"type",
",",
"boolean",
"isInteger",
")",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"PREWITT",
":",
"return",
"GradientPrewitt",
".",
"getKernelX",
"(",
"isInteger",
")",
";",
"case"... | Returns the kernel for finding the X derivative.
@param type Type of gradient
@param isInteger integer or floating point kernels
@return The kernel. Can be 1D or 2D | [
"Returns",
"the",
"kernel",
"for",
"finding",
"the",
"X",
"derivative",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/GImageDerivativeOps.java#L268-L287 |
50,022 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/KeyPointsCircleHexagonalGrid.java | KeyPointsCircleHexagonalGrid.computeEllipseCenters | boolean computeEllipseCenters() {
keypoints.reset();
for (int tangentIdx = 0; tangentIdx < tangents.size(); tangentIdx++) {
// System.out.println("tangent id "+tangentIdx);
Tangents t = tangents.get(tangentIdx);
Point2D_F64 center = keypoints.grow();
center.set(0,0);
double totalWeight = 0;
for (... | java | boolean computeEllipseCenters() {
keypoints.reset();
for (int tangentIdx = 0; tangentIdx < tangents.size(); tangentIdx++) {
// System.out.println("tangent id "+tangentIdx);
Tangents t = tangents.get(tangentIdx);
Point2D_F64 center = keypoints.grow();
center.set(0,0);
double totalWeight = 0;
for (... | [
"boolean",
"computeEllipseCenters",
"(",
")",
"{",
"keypoints",
".",
"reset",
"(",
")",
";",
"for",
"(",
"int",
"tangentIdx",
"=",
"0",
";",
"tangentIdx",
"<",
"tangents",
".",
"size",
"(",
")",
";",
"tangentIdx",
"++",
")",
"{",
"//\t\t\tSystem.out.printl... | Finds the intersection of all the tangent lines with each other the computes the average of those points.
That location is where the center is set to. Each intersection of lines is weighted by the acute angle.
lines which are 90 degrees to each other are less sensitive to noise | [
"Finds",
"the",
"intersection",
"of",
"all",
"the",
"tangent",
"lines",
"with",
"each",
"other",
"the",
"computes",
"the",
"average",
"of",
"those",
"points",
".",
"That",
"location",
"is",
"where",
"the",
"center",
"is",
"set",
"to",
".",
"Each",
"interse... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/KeyPointsCircleHexagonalGrid.java#L190-L237 |
50,023 | lessthanoptimal/BoofCV | main/boofcv-types/src/main/java/boofcv/struct/image/Planar.java | Planar.getBand | public T getBand(int band) {
if (band >= bands.length || band < 0)
throw new IllegalArgumentException("The specified band is out of bounds: "+band);
return bands[band];
} | java | public T getBand(int band) {
if (band >= bands.length || band < 0)
throw new IllegalArgumentException("The specified band is out of bounds: "+band);
return bands[band];
} | [
"public",
"T",
"getBand",
"(",
"int",
"band",
")",
"{",
"if",
"(",
"band",
">=",
"bands",
".",
"length",
"||",
"band",
"<",
"0",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"The specified band is out of bounds: \"",
"+",
"band",
")",
";",
"return... | Returns a band in the multi-band image.
@param band Which band should be returned.
@return Image band | [
"Returns",
"a",
"band",
"in",
"the",
"multi",
"-",
"band",
"image",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/struct/image/Planar.java#L132-L137 |
50,024 | lessthanoptimal/BoofCV | main/boofcv-types/src/main/java/boofcv/struct/image/Planar.java | Planar.setTo | @Override
public void setTo( Planar<T> orig) {
if (orig.width != width || orig.height != height)
reshape(orig.width,orig.height);
if( orig.getBandType() != getBandType() )
throw new IllegalArgumentException("The band type must be the same");
int N = orig.getNumBands();
if( N != getNumBands() ) {
setN... | java | @Override
public void setTo( Planar<T> orig) {
if (orig.width != width || orig.height != height)
reshape(orig.width,orig.height);
if( orig.getBandType() != getBandType() )
throw new IllegalArgumentException("The band type must be the same");
int N = orig.getNumBands();
if( N != getNumBands() ) {
setN... | [
"@",
"Override",
"public",
"void",
"setTo",
"(",
"Planar",
"<",
"T",
">",
"orig",
")",
"{",
"if",
"(",
"orig",
".",
"width",
"!=",
"width",
"||",
"orig",
".",
"height",
"!=",
"height",
")",
"reshape",
"(",
"orig",
".",
"width",
",",
"orig",
".",
... | Sets the values of each pixel equal to the pixels in the specified matrix.
Automatically resized to match the input image.
@param orig The original image whose value is to be copied into this one | [
"Sets",
"the",
"values",
"of",
"each",
"pixel",
"equal",
"to",
"the",
"pixels",
"in",
"the",
"specified",
"matrix",
".",
"Automatically",
"resized",
"to",
"match",
"the",
"input",
"image",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/struct/image/Planar.java#L181-L196 |
50,025 | lessthanoptimal/BoofCV | main/boofcv-types/src/main/java/boofcv/struct/image/Planar.java | Planar.createNew | @Override
public Planar<T> createNew(int imgWidth, int imgHeight) {
return new Planar<>(type, imgWidth, imgHeight, bands.length);
} | java | @Override
public Planar<T> createNew(int imgWidth, int imgHeight) {
return new Planar<>(type, imgWidth, imgHeight, bands.length);
} | [
"@",
"Override",
"public",
"Planar",
"<",
"T",
">",
"createNew",
"(",
"int",
"imgWidth",
",",
"int",
"imgHeight",
")",
"{",
"return",
"new",
"Planar",
"<>",
"(",
"type",
",",
"imgWidth",
",",
"imgHeight",
",",
"bands",
".",
"length",
")",
";",
"}"
] | Creates a new image of the same type and number of bands
@param imgWidth image width
@param imgHeight image height
@return new image | [
"Creates",
"a",
"new",
"image",
"of",
"the",
"same",
"type",
"and",
"number",
"of",
"bands"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/struct/image/Planar.java#L255-L258 |
50,026 | lessthanoptimal/BoofCV | main/boofcv-types/src/main/java/boofcv/struct/image/Planar.java | Planar.reorderBands | public void reorderBands( int ...order ) {
T[] bands = (T[]) Array.newInstance(type, order.length);
for (int i = 0; i < order.length; i++) {
bands[i] = this.bands[order[i]];
}
this.bands = bands;
} | java | public void reorderBands( int ...order ) {
T[] bands = (T[]) Array.newInstance(type, order.length);
for (int i = 0; i < order.length; i++) {
bands[i] = this.bands[order[i]];
}
this.bands = bands;
} | [
"public",
"void",
"reorderBands",
"(",
"int",
"...",
"order",
")",
"{",
"T",
"[",
"]",
"bands",
"=",
"(",
"T",
"[",
"]",
")",
"Array",
".",
"newInstance",
"(",
"type",
",",
"order",
".",
"length",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";"... | Changes the bands order
@param order The new band order | [
"Changes",
"the",
"bands",
"order"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/struct/image/Planar.java#L284-L291 |
50,027 | lessthanoptimal/BoofCV | main/boofcv-types/src/main/java/boofcv/struct/image/Planar.java | Planar.setNumberOfBands | @Override
public void setNumberOfBands( int numberOfBands ) {
if( numberOfBands == this.bands.length )
return;
T[] bands = (T[]) Array.newInstance(type, numberOfBands);
int N = Math.min(numberOfBands, this.bands.length );
for (int i = 0; i < N; i++) {
bands[i] = this.bands[i];
}
for (int i = N; i < ... | java | @Override
public void setNumberOfBands( int numberOfBands ) {
if( numberOfBands == this.bands.length )
return;
T[] bands = (T[]) Array.newInstance(type, numberOfBands);
int N = Math.min(numberOfBands, this.bands.length );
for (int i = 0; i < N; i++) {
bands[i] = this.bands[i];
}
for (int i = N; i < ... | [
"@",
"Override",
"public",
"void",
"setNumberOfBands",
"(",
"int",
"numberOfBands",
")",
"{",
"if",
"(",
"numberOfBands",
"==",
"this",
".",
"bands",
".",
"length",
")",
"return",
";",
"T",
"[",
"]",
"bands",
"=",
"(",
"T",
"[",
"]",
")",
"Array",
".... | Changes the number of bands in the image. A new array is declared and individual bands are recycled
if possible
@param numberOfBands New number of bands in the image. | [
"Changes",
"the",
"number",
"of",
"bands",
"in",
"the",
"image",
".",
"A",
"new",
"array",
"is",
"declared",
"and",
"individual",
"bands",
"are",
"recycled",
"if",
"possible"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/struct/image/Planar.java#L298-L312 |
50,028 | lessthanoptimal/BoofCV | main/boofcv-learning/src/main/java/boofcv/struct/learning/Confusion.java | Confusion.computeAccuracy | public double computeAccuracy() {
double totalCorrect = 0;
double totalIncorrect = 0;
for (int i = 0; i < actualCounts.length; i++) {
for (int j = 0; j < actualCounts.length; j++) {
if( i == j ) {
totalCorrect += matrix.get(i,j);
} else {
totalIncorrect += matrix.get(i,j);
}
}
}
... | java | public double computeAccuracy() {
double totalCorrect = 0;
double totalIncorrect = 0;
for (int i = 0; i < actualCounts.length; i++) {
for (int j = 0; j < actualCounts.length; j++) {
if( i == j ) {
totalCorrect += matrix.get(i,j);
} else {
totalIncorrect += matrix.get(i,j);
}
}
}
... | [
"public",
"double",
"computeAccuracy",
"(",
")",
"{",
"double",
"totalCorrect",
"=",
"0",
";",
"double",
"totalIncorrect",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"actualCounts",
".",
"length",
";",
"i",
"++",
")",
"{",
"for",... | Computes accuracy from the confusion matrix. This is the sum of the fraction correct divide by total number
of types. The number of each sample for each type is not taken in account.
@return overall accuracy | [
"Computes",
"accuracy",
"from",
"the",
"confusion",
"matrix",
".",
"This",
"is",
"the",
"sum",
"of",
"the",
"fraction",
"correct",
"divide",
"by",
"total",
"number",
"of",
"types",
".",
"The",
"number",
"of",
"each",
"sample",
"for",
"each",
"type",
"is",
... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-learning/src/main/java/boofcv/struct/learning/Confusion.java#L48-L63 |
50,029 | lessthanoptimal/BoofCV | main/boofcv-calibration/src/main/java/boofcv/abst/geo/calibration/CalibrateMonoPlanar.java | CalibrateMonoPlanar.addImage | public void addImage( CalibrationObservation observation ) {
if( imageWidth == 0 ) {
this.imageWidth = observation.getWidth();
this.imageHeight = observation.getHeight();
} else if( observation.getWidth() != this.imageWidth || observation.getHeight() != this.imageHeight) {
throw new IllegalArgumentExceptio... | java | public void addImage( CalibrationObservation observation ) {
if( imageWidth == 0 ) {
this.imageWidth = observation.getWidth();
this.imageHeight = observation.getHeight();
} else if( observation.getWidth() != this.imageWidth || observation.getHeight() != this.imageHeight) {
throw new IllegalArgumentExceptio... | [
"public",
"void",
"addImage",
"(",
"CalibrationObservation",
"observation",
")",
"{",
"if",
"(",
"imageWidth",
"==",
"0",
")",
"{",
"this",
".",
"imageWidth",
"=",
"observation",
".",
"getWidth",
"(",
")",
";",
"this",
".",
"imageHeight",
"=",
"observation",... | Adds the observations from a calibration target detector
@param observation Detected calibration points | [
"Adds",
"the",
"observations",
"from",
"a",
"calibration",
"target",
"detector"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-calibration/src/main/java/boofcv/abst/geo/calibration/CalibrateMonoPlanar.java#L139-L147 |
50,030 | lessthanoptimal/BoofCV | main/boofcv-calibration/src/main/java/boofcv/abst/geo/calibration/CalibrateMonoPlanar.java | CalibrateMonoPlanar.process | public <T extends CameraModel>T process() {
if( zhang99 == null )
throw new IllegalArgumentException("Please call configure first.");
zhang99.setVerbose(verbose,0);
if( !zhang99.process(observations) ) {
throw new RuntimeException("Zhang99 algorithm failed!");
}
structure = zhang99.getStructure();
e... | java | public <T extends CameraModel>T process() {
if( zhang99 == null )
throw new IllegalArgumentException("Please call configure first.");
zhang99.setVerbose(verbose,0);
if( !zhang99.process(observations) ) {
throw new RuntimeException("Zhang99 algorithm failed!");
}
structure = zhang99.getStructure();
e... | [
"public",
"<",
"T",
"extends",
"CameraModel",
">",
"T",
"process",
"(",
")",
"{",
"if",
"(",
"zhang99",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Please call configure first.\"",
")",
";",
"zhang99",
".",
"setVerbose",
"(",
"verbos... | After calibration points have been found this invokes the Zhang99 algorithm to
estimate calibration parameters. Error statistics are also computed. | [
"After",
"calibration",
"points",
"have",
"been",
"found",
"this",
"invokes",
"the",
"Zhang99",
"algorithm",
"to",
"estimate",
"calibration",
"parameters",
".",
"Error",
"statistics",
"are",
"also",
"computed",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-calibration/src/main/java/boofcv/abst/geo/calibration/CalibrateMonoPlanar.java#L160-L177 |
50,031 | lessthanoptimal/BoofCV | main/boofcv-calibration/src/main/java/boofcv/abst/geo/calibration/CalibrateMonoPlanar.java | CalibrateMonoPlanar.printErrors | public static void printErrors( List<ImageResults> results ) {
double totalError = 0;
for( int i = 0; i < results.size(); i++ ) {
ImageResults r = results.get(i);
totalError += r.meanError;
System.out.printf("image %3d Euclidean ( mean = %7.1e max = %7.1e ) bias ( X = %8.1e Y %8.1e )\n",i,r.meanError,r.ma... | java | public static void printErrors( List<ImageResults> results ) {
double totalError = 0;
for( int i = 0; i < results.size(); i++ ) {
ImageResults r = results.get(i);
totalError += r.meanError;
System.out.printf("image %3d Euclidean ( mean = %7.1e max = %7.1e ) bias ( X = %8.1e Y %8.1e )\n",i,r.meanError,r.ma... | [
"public",
"static",
"void",
"printErrors",
"(",
"List",
"<",
"ImageResults",
">",
"results",
")",
"{",
"double",
"totalError",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"results",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
... | Prints out error information to standard out | [
"Prints",
"out",
"error",
"information",
"to",
"standard",
"out"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-calibration/src/main/java/boofcv/abst/geo/calibration/CalibrateMonoPlanar.java#L189-L198 |
50,032 | lessthanoptimal/BoofCV | integration/boofcv-swing/src/main/java/boofcv/gui/learning/ConfusionMatrixPanel.java | ConfusionMatrixPanel.renderLabels | private void renderLabels(Graphics2D g2, double fontSize) {
int numCategories = confusion.getNumRows();
int longestLabel = 0;
if(renderLabels) {
for (int i = 0; i < numCategories; i++) {
longestLabel = Math.max(longestLabel,labels.get(i).length());
}
}
Font fontLabel = new Font("monospaced", Font.... | java | private void renderLabels(Graphics2D g2, double fontSize) {
int numCategories = confusion.getNumRows();
int longestLabel = 0;
if(renderLabels) {
for (int i = 0; i < numCategories; i++) {
longestLabel = Math.max(longestLabel,labels.get(i).length());
}
}
Font fontLabel = new Font("monospaced", Font.... | [
"private",
"void",
"renderLabels",
"(",
"Graphics2D",
"g2",
",",
"double",
"fontSize",
")",
"{",
"int",
"numCategories",
"=",
"confusion",
".",
"getNumRows",
"(",
")",
";",
"int",
"longestLabel",
"=",
"0",
";",
"if",
"(",
"renderLabels",
")",
"{",
"for",
... | Renders the names on each category to the side of the confusion matrix | [
"Renders",
"the",
"names",
"on",
"each",
"category",
"to",
"the",
"side",
"of",
"the",
"confusion",
"matrix"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/learning/ConfusionMatrixPanel.java#L200-L236 |
50,033 | lessthanoptimal/BoofCV | integration/boofcv-swing/src/main/java/boofcv/gui/learning/ConfusionMatrixPanel.java | ConfusionMatrixPanel.renderMatrix | private void renderMatrix(Graphics2D g2, double fontSize) {
int numCategories = confusion.getNumRows();
Font fontNumber = new Font("Serif", Font.BOLD, (int)(0.6*fontSize + 0.5));
g2.setFont(fontNumber);
FontMetrics metrics = g2.getFontMetrics(fontNumber);
for (int i = 0; i < numCategories; i++) {
int y0 =... | java | private void renderMatrix(Graphics2D g2, double fontSize) {
int numCategories = confusion.getNumRows();
Font fontNumber = new Font("Serif", Font.BOLD, (int)(0.6*fontSize + 0.5));
g2.setFont(fontNumber);
FontMetrics metrics = g2.getFontMetrics(fontNumber);
for (int i = 0; i < numCategories; i++) {
int y0 =... | [
"private",
"void",
"renderMatrix",
"(",
"Graphics2D",
"g2",
",",
"double",
"fontSize",
")",
"{",
"int",
"numCategories",
"=",
"confusion",
".",
"getNumRows",
"(",
")",
";",
"Font",
"fontNumber",
"=",
"new",
"Font",
"(",
"\"Serif\"",
",",
"Font",
".",
"BOLD... | Renders the confusion matrix and visualizes the value in each cell with a color and optionally a color. | [
"Renders",
"the",
"confusion",
"matrix",
"and",
"visualizes",
"the",
"value",
"in",
"each",
"cell",
"with",
"a",
"color",
"and",
"optionally",
"a",
"color",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/learning/ConfusionMatrixPanel.java#L241-L290 |
50,034 | lessthanoptimal/BoofCV | integration/boofcv-swing/src/main/java/boofcv/gui/learning/ConfusionMatrixPanel.java | ConfusionMatrixPanel.whatIsAtPoint | public LocationInfo whatIsAtPoint( int pixelX , int pixelY , LocationInfo output ) {
if( output == null )
output = new LocationInfo();
int numCategories = confusion.getNumRows();
synchronized ( this ) {
if( pixelX >= gridWidth ) {
output.insideMatrix = false;
output.col = output.row = pixelY*numCa... | java | public LocationInfo whatIsAtPoint( int pixelX , int pixelY , LocationInfo output ) {
if( output == null )
output = new LocationInfo();
int numCategories = confusion.getNumRows();
synchronized ( this ) {
if( pixelX >= gridWidth ) {
output.insideMatrix = false;
output.col = output.row = pixelY*numCa... | [
"public",
"LocationInfo",
"whatIsAtPoint",
"(",
"int",
"pixelX",
",",
"int",
"pixelY",
",",
"LocationInfo",
"output",
")",
"{",
"if",
"(",
"output",
"==",
"null",
")",
"output",
"=",
"new",
"LocationInfo",
"(",
")",
";",
"int",
"numCategories",
"=",
"confu... | Use to sample the panel to see what is being displayed at the location clicked. All coordinates
are in panel coordinates.
@param pixelX x-axis in panel coordinates
@param pixelY y-axis in panel coordinates
@param output (Optional) storage for output.
@return Information on what is at the specified location | [
"Use",
"to",
"sample",
"the",
"panel",
"to",
"see",
"what",
"is",
"being",
"displayed",
"at",
"the",
"location",
"clicked",
".",
"All",
"coordinates",
"are",
"in",
"panel",
"coordinates",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/learning/ConfusionMatrixPanel.java#L301-L319 |
50,035 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/StitchingFromMotion2D.java | StitchingFromMotion2D.configure | public void configure( int widthStitch, int heightStitch , IT worldToInit ) {
this.worldToInit = (IT)worldToCurr.createInstance();
if( worldToInit != null )
this.worldToInit.set(worldToInit);
this.widthStitch = widthStitch;
this.heightStitch = heightStitch;
} | java | public void configure( int widthStitch, int heightStitch , IT worldToInit ) {
this.worldToInit = (IT)worldToCurr.createInstance();
if( worldToInit != null )
this.worldToInit.set(worldToInit);
this.widthStitch = widthStitch;
this.heightStitch = heightStitch;
} | [
"public",
"void",
"configure",
"(",
"int",
"widthStitch",
",",
"int",
"heightStitch",
",",
"IT",
"worldToInit",
")",
"{",
"this",
".",
"worldToInit",
"=",
"(",
"IT",
")",
"worldToCurr",
".",
"createInstance",
"(",
")",
";",
"if",
"(",
"worldToInit",
"!=",
... | Specifies size of stitch image and the location of the initial coordinate system.
@param widthStitch Width of the image being stitched into
@param heightStitch Height of the image being stitched into
@param worldToInit (Option) Used to change the location of the initial frame in stitched image.
null means no transform... | [
"Specifies",
"size",
"of",
"stitch",
"image",
"and",
"the",
"location",
"of",
"the",
"initial",
"coordinate",
"system",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/StitchingFromMotion2D.java#L120-L126 |
50,036 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/StitchingFromMotion2D.java | StitchingFromMotion2D.reset | public void reset() {
if( stitchedImage != null )
GImageMiscOps.fill(stitchedImage, 0);
motion.reset();
worldToCurr.reset();
first = true;
} | java | public void reset() {
if( stitchedImage != null )
GImageMiscOps.fill(stitchedImage, 0);
motion.reset();
worldToCurr.reset();
first = true;
} | [
"public",
"void",
"reset",
"(",
")",
"{",
"if",
"(",
"stitchedImage",
"!=",
"null",
")",
"GImageMiscOps",
".",
"fill",
"(",
"stitchedImage",
",",
"0",
")",
";",
"motion",
".",
"reset",
"(",
")",
";",
"worldToCurr",
".",
"reset",
"(",
")",
";",
"first... | Throws away current results and starts over again | [
"Throws",
"away",
"current",
"results",
"and",
"starts",
"over",
"again"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/StitchingFromMotion2D.java#L155-L161 |
50,037 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/StitchingFromMotion2D.java | StitchingFromMotion2D.checkLargeMotion | private boolean checkLargeMotion( int width , int height ) {
if( first ) {
getImageCorners(width,height,corners);
previousArea = computeArea(corners);
first = false;
} else {
getImageCorners(width,height,corners);
double area = computeArea(corners);
double change = Math.max(area/previousArea,pre... | java | private boolean checkLargeMotion( int width , int height ) {
if( first ) {
getImageCorners(width,height,corners);
previousArea = computeArea(corners);
first = false;
} else {
getImageCorners(width,height,corners);
double area = computeArea(corners);
double change = Math.max(area/previousArea,pre... | [
"private",
"boolean",
"checkLargeMotion",
"(",
"int",
"width",
",",
"int",
"height",
")",
"{",
"if",
"(",
"first",
")",
"{",
"getImageCorners",
"(",
"width",
",",
"height",
",",
"corners",
")",
";",
"previousArea",
"=",
"computeArea",
"(",
"corners",
")",
... | Looks for sudden large changes in corner location to detect motion estimation faults.
@param width image width
@param height image height
@return true for fault | [
"Looks",
"for",
"sudden",
"large",
"changes",
"in",
"corner",
"location",
"to",
"detect",
"motion",
"estimation",
"faults",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/StitchingFromMotion2D.java#L169-L188 |
50,038 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/StitchingFromMotion2D.java | StitchingFromMotion2D.update | private void update(I image) {
computeCurrToInit_PixelTran();
// only process a cropped portion to speed up processing
RectangleLength2D_I32 box = DistortImageOps.boundBox(image.width, image.height,
stitchedImage.width, stitchedImage.height,work, tranCurrToWorld);
int x0 = box.x0;
int y0 = box.y0;
int... | java | private void update(I image) {
computeCurrToInit_PixelTran();
// only process a cropped portion to speed up processing
RectangleLength2D_I32 box = DistortImageOps.boundBox(image.width, image.height,
stitchedImage.width, stitchedImage.height,work, tranCurrToWorld);
int x0 = box.x0;
int y0 = box.y0;
int... | [
"private",
"void",
"update",
"(",
"I",
"image",
")",
"{",
"computeCurrToInit_PixelTran",
"(",
")",
";",
"// only process a cropped portion to speed up processing",
"RectangleLength2D_I32",
"box",
"=",
"DistortImageOps",
".",
"boundBox",
"(",
"image",
".",
"width",
",",
... | Adds the latest image into the stitched image
@param image | [
"Adds",
"the",
"latest",
"image",
"into",
"the",
"stitched",
"image"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/StitchingFromMotion2D.java#L200-L214 |
50,039 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/StitchingFromMotion2D.java | StitchingFromMotion2D.resizeStitchImage | public void resizeStitchImage( int widthStitch, int heightStitch , IT newToOldStitch ) {
// copy the old image into the new one
workImage.reshape(widthStitch,heightStitch);
GImageMiscOps.fill(workImage, 0);
if( newToOldStitch != null ) {
PixelTransform<Point2D_F32> newToOld = converter.convertPixel(newToOld... | java | public void resizeStitchImage( int widthStitch, int heightStitch , IT newToOldStitch ) {
// copy the old image into the new one
workImage.reshape(widthStitch,heightStitch);
GImageMiscOps.fill(workImage, 0);
if( newToOldStitch != null ) {
PixelTransform<Point2D_F32> newToOld = converter.convertPixel(newToOld... | [
"public",
"void",
"resizeStitchImage",
"(",
"int",
"widthStitch",
",",
"int",
"heightStitch",
",",
"IT",
"newToOldStitch",
")",
"{",
"// copy the old image into the new one",
"workImage",
".",
"reshape",
"(",
"widthStitch",
",",
"heightStitch",
")",
";",
"GImageMiscOp... | Resizes the stitch image. If no transform is provided then the old stitch region is simply
places on top of the new one and copied. Pixels which do not exist in the old image are filled with zero.
@param widthStitch The new width of the stitch image.
@param heightStitch The new height of the stitch image.
@param new... | [
"Resizes",
"the",
"stitch",
"image",
".",
"If",
"no",
"transform",
"is",
"provided",
"then",
"the",
"old",
"stitch",
"region",
"is",
"simply",
"places",
"on",
"top",
"of",
"the",
"new",
"one",
"and",
"copied",
".",
"Pixels",
"which",
"do",
"not",
"exist"... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/StitchingFromMotion2D.java#L264-L292 |
50,040 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/StitchingFromMotion2D.java | StitchingFromMotion2D.getImageCorners | public Corners getImageCorners( int width , int height , Corners corners ) {
if( corners == null )
corners = new Corners();
int w = width;
int h = height;
tranCurrToWorld.compute(0,0,work); corners.p0.set(work.x, work.y);
tranCurrToWorld.compute(w,0,work); corners.p1.set(work.x, work.y);
tranCurrTo... | java | public Corners getImageCorners( int width , int height , Corners corners ) {
if( corners == null )
corners = new Corners();
int w = width;
int h = height;
tranCurrToWorld.compute(0,0,work); corners.p0.set(work.x, work.y);
tranCurrToWorld.compute(w,0,work); corners.p1.set(work.x, work.y);
tranCurrTo... | [
"public",
"Corners",
"getImageCorners",
"(",
"int",
"width",
",",
"int",
"height",
",",
"Corners",
"corners",
")",
"{",
"if",
"(",
"corners",
"==",
"null",
")",
"corners",
"=",
"new",
"Corners",
"(",
")",
";",
"int",
"w",
"=",
"width",
";",
"int",
"h... | Returns the location of the input image's corners inside the stitch image.
@return image corners | [
"Returns",
"the",
"location",
"of",
"the",
"input",
"image",
"s",
"corners",
"inside",
"the",
"stitch",
"image",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/StitchingFromMotion2D.java#L299-L313 |
50,041 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalAlgebraicPoint7.java | TrifocalAlgebraicPoint7.minimizeWithGeometricConstraints | private void minimizeWithGeometricConstraints() {
extractEpipoles.setTensor(solutionN);
extractEpipoles.extractEpipoles(e2,e3);
// encode the parameters being optimized
param[0] = e2.x; param[1] = e2.y; param[2] = e2.z;
param[3] = e3.x; param[4] = e3.y; param[5] = e3.z;
// adjust the error function for th... | java | private void minimizeWithGeometricConstraints() {
extractEpipoles.setTensor(solutionN);
extractEpipoles.extractEpipoles(e2,e3);
// encode the parameters being optimized
param[0] = e2.x; param[1] = e2.y; param[2] = e2.z;
param[3] = e3.x; param[4] = e3.y; param[5] = e3.z;
// adjust the error function for th... | [
"private",
"void",
"minimizeWithGeometricConstraints",
"(",
")",
"{",
"extractEpipoles",
".",
"setTensor",
"(",
"solutionN",
")",
";",
"extractEpipoles",
".",
"extractEpipoles",
"(",
"e2",
",",
"e3",
")",
";",
"// encode the parameters being optimized",
"param",
"[",
... | Minimize the algebraic error using LM. The two epipoles are the parameters being optimized. | [
"Minimize",
"the",
"algebraic",
"error",
"using",
"LM",
".",
"The",
"two",
"epipoles",
"are",
"the",
"parameters",
"being",
"optimized",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalAlgebraicPoint7.java#L103-L127 |
50,042 | lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/PositiveDepthConstraintCheck.java | PositiveDepthConstraintCheck.checkConstraint | public boolean checkConstraint( Point2D_F64 viewA , Point2D_F64 viewB , Se3_F64 fromAtoB ) {
triangulate.triangulate(viewA,viewB,fromAtoB,P);
if( P.z > 0 ) {
SePointOps_F64.transform(fromAtoB,P,P);
return P.z > 0;
}
return false;
} | java | public boolean checkConstraint( Point2D_F64 viewA , Point2D_F64 viewB , Se3_F64 fromAtoB ) {
triangulate.triangulate(viewA,viewB,fromAtoB,P);
if( P.z > 0 ) {
SePointOps_F64.transform(fromAtoB,P,P);
return P.z > 0;
}
return false;
} | [
"public",
"boolean",
"checkConstraint",
"(",
"Point2D_F64",
"viewA",
",",
"Point2D_F64",
"viewB",
",",
"Se3_F64",
"fromAtoB",
")",
"{",
"triangulate",
".",
"triangulate",
"(",
"viewA",
",",
"viewB",
",",
"fromAtoB",
",",
"P",
")",
";",
"if",
"(",
"P",
".",... | Checks to see if a single point meets the constraint.
@param viewA View of the 3D point from the first camera. Calibrated coordinates.
@param viewB View of the 3D point from the second camera. Calibrated coordinates.
@param fromAtoB Transform from the B to A camera frame.
@return If the triangulated point appears in... | [
"Checks",
"to",
"see",
"if",
"a",
"single",
"point",
"meets",
"the",
"constraint",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/PositiveDepthConstraintCheck.java#L67-L76 |
50,043 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryMotion2D.java | FactoryMotion2D.createMotion2D | public static <I extends ImageBase<I>, IT extends InvertibleTransform>
ImageMotion2D<I,IT> createMotion2D( int ransacIterations , double inlierThreshold,int outlierPrune,
int absoluteMinimumTracks, double respawnTrackFraction,
double respawnCoverageFraction,
boolean refineEstimate ,
... | java | public static <I extends ImageBase<I>, IT extends InvertibleTransform>
ImageMotion2D<I,IT> createMotion2D( int ransacIterations , double inlierThreshold,int outlierPrune,
int absoluteMinimumTracks, double respawnTrackFraction,
double respawnCoverageFraction,
boolean refineEstimate ,
... | [
"public",
"static",
"<",
"I",
"extends",
"ImageBase",
"<",
"I",
">",
",",
"IT",
"extends",
"InvertibleTransform",
">",
"ImageMotion2D",
"<",
"I",
",",
"IT",
">",
"createMotion2D",
"(",
"int",
"ransacIterations",
",",
"double",
"inlierThreshold",
",",
"int",
... | Estimates the 2D motion of an image using different models.
@param ransacIterations Number of RANSAC iterations
@param inlierThreshold Threshold which defines an inlier.
@param outlierPrune If a feature is an outlier for this many turns in a row it is dropped. Try 2
@param absoluteMinimumTracks New features will be re... | [
"Estimates",
"the",
"2D",
"motion",
"of",
"an",
"image",
"using",
"different",
"models",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryMotion2D.java#L73-L121 |
50,044 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryMotion2D.java | FactoryMotion2D.createVideoStitch | @SuppressWarnings("unchecked")
public static <I extends ImageBase<I>, IT extends InvertibleTransform>
StitchingFromMotion2D<I, IT>
createVideoStitch( double maxJumpFraction , ImageMotion2D<I,IT> motion2D , ImageType<I> imageType ) {
StitchingTransform<IT> transform;
if( motion2D.getTransformType() == Affine2D_F... | java | @SuppressWarnings("unchecked")
public static <I extends ImageBase<I>, IT extends InvertibleTransform>
StitchingFromMotion2D<I, IT>
createVideoStitch( double maxJumpFraction , ImageMotion2D<I,IT> motion2D , ImageType<I> imageType ) {
StitchingTransform<IT> transform;
if( motion2D.getTransformType() == Affine2D_F... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"I",
"extends",
"ImageBase",
"<",
"I",
">",
",",
"IT",
"extends",
"InvertibleTransform",
">",
"StitchingFromMotion2D",
"<",
"I",
",",
"IT",
">",
"createVideoStitch",
"(",
"double",
"m... | Estimates the image motion then combines images together. Typically used for mosaics and stabilization.
@param maxJumpFraction If the area changes by this much between two consecuative frames then the transform
is reset.
@param motion2D Estimates the image motion.
@param imageType Type of image processed
@param <I> I... | [
"Estimates",
"the",
"image",
"motion",
"then",
"combines",
"images",
"together",
".",
"Typically",
"used",
"for",
"mosaics",
"and",
"stabilization",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryMotion2D.java#L134-L159 |
50,045 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageStatistics.java | ImageStatistics.min | public static int min( GrayS32 input ) {
if( BoofConcurrency.USE_CONCURRENT ) {
return ImplImageStatistics_MT.min(input.data, input.startIndex, input.height, input.width , input.stride);
} else {
return ImplImageStatistics.min(input.data, input.startIndex, input.height, input.width , input.stride);
}
} | java | public static int min( GrayS32 input ) {
if( BoofConcurrency.USE_CONCURRENT ) {
return ImplImageStatistics_MT.min(input.data, input.startIndex, input.height, input.width , input.stride);
} else {
return ImplImageStatistics.min(input.data, input.startIndex, input.height, input.width , input.stride);
}
} | [
"public",
"static",
"int",
"min",
"(",
"GrayS32",
"input",
")",
"{",
"if",
"(",
"BoofConcurrency",
".",
"USE_CONCURRENT",
")",
"{",
"return",
"ImplImageStatistics_MT",
".",
"min",
"(",
"input",
".",
"data",
",",
"input",
".",
"startIndex",
",",
"input",
".... | Returns the minimum element value.
@param input Input image. Not modified.
@return Minimum pixel value. | [
"Returns",
"the",
"minimum",
"element",
"value",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageStatistics.java#L971-L977 |
50,046 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageStatistics.java | ImageStatistics.maxAbs | public static float maxAbs( InterleavedF32 input ) {
if( BoofConcurrency.USE_CONCURRENT ) {
return ImplImageStatistics_MT.maxAbs(input.data, input.startIndex, input.height, input.width*input.numBands , input.stride);
} else {
return ImplImageStatistics.maxAbs(input.data, input.startIndex, input.height, input.... | java | public static float maxAbs( InterleavedF32 input ) {
if( BoofConcurrency.USE_CONCURRENT ) {
return ImplImageStatistics_MT.maxAbs(input.data, input.startIndex, input.height, input.width*input.numBands , input.stride);
} else {
return ImplImageStatistics.maxAbs(input.data, input.startIndex, input.height, input.... | [
"public",
"static",
"float",
"maxAbs",
"(",
"InterleavedF32",
"input",
")",
"{",
"if",
"(",
"BoofConcurrency",
".",
"USE_CONCURRENT",
")",
"{",
"return",
"ImplImageStatistics_MT",
".",
"maxAbs",
"(",
"input",
".",
"data",
",",
"input",
".",
"startIndex",
",",
... | Returns the maximum element value.
@param input Input image. Not modified.
@return Maximum pixel value. | [
"Returns",
"the",
"maximum",
"element",
"value",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageStatistics.java#L1503-L1509 |
50,047 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/line/ConnectLinesGrid.java | ConnectLinesGrid.connectToNeighbors | private void connectToNeighbors(int x, int y ) {
List<LineSegment2D_F32> lines = grid.get(x,y);
Iterator<LineSegment2D_F32> iter = lines.iterator();
while( iter.hasNext() )
{
LineSegment2D_F32 l = iter.next();
boolean connected = false;
if( connectTry(l,x+1,y) )
connected = true;
if( !connecte... | java | private void connectToNeighbors(int x, int y ) {
List<LineSegment2D_F32> lines = grid.get(x,y);
Iterator<LineSegment2D_F32> iter = lines.iterator();
while( iter.hasNext() )
{
LineSegment2D_F32 l = iter.next();
boolean connected = false;
if( connectTry(l,x+1,y) )
connected = true;
if( !connecte... | [
"private",
"void",
"connectToNeighbors",
"(",
"int",
"x",
",",
"int",
"y",
")",
"{",
"List",
"<",
"LineSegment2D_F32",
">",
"lines",
"=",
"grid",
".",
"get",
"(",
"x",
",",
"y",
")",
";",
"Iterator",
"<",
"LineSegment2D_F32",
">",
"iter",
"=",
"lines",... | Connect lines in the target region to lines in neighboring regions. Regions are selected such that
no two regions are compared against each other more than once.
@param x target region grid x-coordinate
@param y target region grid y-coordinate | [
"Connect",
"lines",
"in",
"the",
"target",
"region",
"to",
"lines",
"in",
"neighboring",
"regions",
".",
"Regions",
"are",
"selected",
"such",
"that",
"no",
"two",
"regions",
"are",
"compared",
"against",
"each",
"other",
"more",
"than",
"once",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/line/ConnectLinesGrid.java#L113-L136 |
50,048 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/line/ConnectLinesGrid.java | ConnectLinesGrid.connectTry | private boolean connectTry( LineSegment2D_F32 target , int x , int y ) {
if( !grid.isInBounds(x,y) )
return false;
List<LineSegment2D_F32> lines = grid.get(x,y);
int index = findBestCompatible(target,lines,0);
if( index == -1 )
return false;
LineSegment2D_F32 b = lines.remove(index);
// join the ... | java | private boolean connectTry( LineSegment2D_F32 target , int x , int y ) {
if( !grid.isInBounds(x,y) )
return false;
List<LineSegment2D_F32> lines = grid.get(x,y);
int index = findBestCompatible(target,lines,0);
if( index == -1 )
return false;
LineSegment2D_F32 b = lines.remove(index);
// join the ... | [
"private",
"boolean",
"connectTry",
"(",
"LineSegment2D_F32",
"target",
",",
"int",
"x",
",",
"int",
"y",
")",
"{",
"if",
"(",
"!",
"grid",
".",
"isInBounds",
"(",
"x",
",",
"y",
")",
")",
"return",
"false",
";",
"List",
"<",
"LineSegment2D_F32",
">",
... | See if there is a line that matches in this adjacent region.
@param target Line being connected.
@param x x-coordinate of adjacent region.
@param y y-coordinate of adjacent region.
@return true if a connection was made. | [
"See",
"if",
"there",
"is",
"a",
"line",
"that",
"matches",
"in",
"this",
"adjacent",
"region",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/line/ConnectLinesGrid.java#L146-L171 |
50,049 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/line/ConnectLinesGrid.java | ConnectLinesGrid.connectInSameElement | private void connectInSameElement(List<LineSegment2D_F32> lines ) {
for( int i = 0; i < lines.size(); i++ ) {
LineSegment2D_F32 a = lines.get(i);
int index = findBestCompatible(a,lines,i+1);
if( index == -1 )
continue;
// remove the line from the index which it is being connected to
LineSegment2D... | java | private void connectInSameElement(List<LineSegment2D_F32> lines ) {
for( int i = 0; i < lines.size(); i++ ) {
LineSegment2D_F32 a = lines.get(i);
int index = findBestCompatible(a,lines,i+1);
if( index == -1 )
continue;
// remove the line from the index which it is being connected to
LineSegment2D... | [
"private",
"void",
"connectInSameElement",
"(",
"List",
"<",
"LineSegment2D_F32",
">",
"lines",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"lines",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"LineSegment2D_F32",
"a",
"=",
"lines... | Search for lines in the same region for it to be connected to.
@param lines All the lines in the region. | [
"Search",
"for",
"lines",
"in",
"the",
"same",
"region",
"for",
"it",
"to",
"be",
"connected",
"to",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/line/ConnectLinesGrid.java#L178-L196 |
50,050 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/line/ConnectLinesGrid.java | ConnectLinesGrid.findBestCompatible | private int findBestCompatible( LineSegment2D_F32 target ,
List<LineSegment2D_F32> candidates ,
int start )
{
int bestIndex = -1;
double bestDistance = Double.MAX_VALUE;
int bestFarthest = 0;
float targetAngle = UtilAngle.atanSafe(target.slopeY(),target.slopeX());
float cos = (float)Math.c... | java | private int findBestCompatible( LineSegment2D_F32 target ,
List<LineSegment2D_F32> candidates ,
int start )
{
int bestIndex = -1;
double bestDistance = Double.MAX_VALUE;
int bestFarthest = 0;
float targetAngle = UtilAngle.atanSafe(target.slopeY(),target.slopeX());
float cos = (float)Math.c... | [
"private",
"int",
"findBestCompatible",
"(",
"LineSegment2D_F32",
"target",
",",
"List",
"<",
"LineSegment2D_F32",
">",
"candidates",
",",
"int",
"start",
")",
"{",
"int",
"bestIndex",
"=",
"-",
"1",
";",
"double",
"bestDistance",
"=",
"Double",
".",
"MAX_VALU... | Searches for a line in the list which the target is compatible with and can
be connected to.
@param target Line being connected to.
@param candidates List of candidate lines.
@param start First index in the candidate list it should start searching at.
@return Index of the candidate it can connect to. -1 if there is n... | [
"Searches",
"for",
"a",
"line",
"in",
"the",
"list",
"which",
"the",
"target",
"is",
"compatible",
"with",
"and",
"can",
"be",
"connected",
"to",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/line/ConnectLinesGrid.java#L207-L263 |
50,051 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/line/ConnectLinesGrid.java | ConnectLinesGrid.closestFarthestPoints | private void closestFarthestPoints(LineSegment2D_F32 a, LineSegment2D_F32 b)
{
dist[0] = a.a.distance2(b.a);
dist[1] = a.a.distance2(b.b);
dist[2] = a.b.distance2(b.a);
dist[3] = a.b.distance2(b.b);
// find the two points which are closest together and save which ones those are
// for future reference
f... | java | private void closestFarthestPoints(LineSegment2D_F32 a, LineSegment2D_F32 b)
{
dist[0] = a.a.distance2(b.a);
dist[1] = a.a.distance2(b.b);
dist[2] = a.b.distance2(b.a);
dist[3] = a.b.distance2(b.b);
// find the two points which are closest together and save which ones those are
// for future reference
f... | [
"private",
"void",
"closestFarthestPoints",
"(",
"LineSegment2D_F32",
"a",
",",
"LineSegment2D_F32",
"b",
")",
"{",
"dist",
"[",
"0",
"]",
"=",
"a",
".",
"a",
".",
"distance2",
"(",
"b",
".",
"a",
")",
";",
"dist",
"[",
"1",
"]",
"=",
"a",
".",
"a"... | Finds the points on each line which are closest and farthest away from each other. | [
"Finds",
"the",
"points",
"on",
"each",
"line",
"which",
"are",
"closest",
"and",
"farthest",
"away",
"from",
"each",
"other",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/line/ConnectLinesGrid.java#L268-L291 |
50,052 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/CalibrationFiducialDetector.java | CalibrationFiducialDetector.selectBoundaryCorners | protected void selectBoundaryCorners() {
List<Point2D_F64> layout = detector.getLayout();
Polygon2D_F64 hull = new Polygon2D_F64();
UtilPolygons2D_F64.convexHull(layout,hull);
UtilPolygons2D_F64.removeAlmostParallel(hull,0.02);
boundaryIndexes = new int[hull.size()];
for (int i = 0; i < hull.size(); i++) ... | java | protected void selectBoundaryCorners() {
List<Point2D_F64> layout = detector.getLayout();
Polygon2D_F64 hull = new Polygon2D_F64();
UtilPolygons2D_F64.convexHull(layout,hull);
UtilPolygons2D_F64.removeAlmostParallel(hull,0.02);
boundaryIndexes = new int[hull.size()];
for (int i = 0; i < hull.size(); i++) ... | [
"protected",
"void",
"selectBoundaryCorners",
"(",
")",
"{",
"List",
"<",
"Point2D_F64",
">",
"layout",
"=",
"detector",
".",
"getLayout",
"(",
")",
";",
"Polygon2D_F64",
"hull",
"=",
"new",
"Polygon2D_F64",
"(",
")",
";",
"UtilPolygons2D_F64",
".",
"convexHul... | Selects points which will be the corners in the boundary. Finds the convex hull. | [
"Selects",
"points",
"which",
"will",
"be",
"the",
"corners",
"in",
"the",
"boundary",
".",
"Finds",
"the",
"convex",
"hull",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/CalibrationFiducialDetector.java#L203-L225 |
50,053 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/CalibrationFiducialDetector.java | CalibrationFiducialDetector.getCenter | @Override
public void getCenter(int which, Point2D_F64 location) {
CalibrationObservation view = detector.getDetectedPoints();
location.set(0,0);
for (int i = 0; i < view.size(); i++) {
PointIndex2D_F64 p = view.get(i);
location.x += p.x;
location.y += p.y;
}
location.x /= view.size();
location.... | java | @Override
public void getCenter(int which, Point2D_F64 location) {
CalibrationObservation view = detector.getDetectedPoints();
location.set(0,0);
for (int i = 0; i < view.size(); i++) {
PointIndex2D_F64 p = view.get(i);
location.x += p.x;
location.y += p.y;
}
location.x /= view.size();
location.... | [
"@",
"Override",
"public",
"void",
"getCenter",
"(",
"int",
"which",
",",
"Point2D_F64",
"location",
")",
"{",
"CalibrationObservation",
"view",
"=",
"detector",
".",
"getDetectedPoints",
"(",
")",
";",
"location",
".",
"set",
"(",
"0",
",",
"0",
")",
";",... | Returns the detection point average location. This will NOT be the same as the geometric center.
@param which Fiducial's index
@param location (output) Storage for the transform. modified. | [
"Returns",
"the",
"detection",
"point",
"average",
"location",
".",
"This",
"will",
"NOT",
"be",
"the",
"same",
"as",
"the",
"geometric",
"center",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/CalibrationFiducialDetector.java#L280-L293 |
50,054 | lessthanoptimal/BoofCV | main/boofcv-calibration/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationLinearRotationMulti.java | SelfCalibrationLinearRotationMulti.setConstraints | public void setConstraints( boolean zeroSkew ,
boolean principlePointOrigin ,
boolean knownAspect,
double aspect )
{
if( knownAspect && !zeroSkew )
throw new IllegalArgumentException("If aspect is known then skew must be zero");
this.zeroSkew = zeroSkew;
this.principlePointOrigin = pr... | java | public void setConstraints( boolean zeroSkew ,
boolean principlePointOrigin ,
boolean knownAspect,
double aspect )
{
if( knownAspect && !zeroSkew )
throw new IllegalArgumentException("If aspect is known then skew must be zero");
this.zeroSkew = zeroSkew;
this.principlePointOrigin = pr... | [
"public",
"void",
"setConstraints",
"(",
"boolean",
"zeroSkew",
",",
"boolean",
"principlePointOrigin",
",",
"boolean",
"knownAspect",
",",
"double",
"aspect",
")",
"{",
"if",
"(",
"knownAspect",
"&&",
"!",
"zeroSkew",
")",
"throw",
"new",
"IllegalArgumentExceptio... | Specifies linear constraints
Known aspect ratio constraint can only be used if zero skew is also assumped.
@param zeroSkew Assume that skew is zero
@param principlePointOrigin Principle point is at the origin
@param knownAspect that the aspect ratio is known
@param aspect If aspect is known then this is the aspect. r... | [
"Specifies",
"linear",
"constraints"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-calibration/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationLinearRotationMulti.java#L97-L122 |
50,055 | lessthanoptimal/BoofCV | main/boofcv-calibration/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationLinearRotationMulti.java | SelfCalibrationLinearRotationMulti.extractReferenceW | void extractReferenceW(DMatrixRMaj nv ) {
W0.a11 = nv.data[0];
W0.a12 = W0.a21 = nv.data[1];
W0.a13 = W0.a31 = nv.data[2];
W0.a22 = nv.data[3];
W0.a23 = W0.a32 = nv.data[4];
W0.a33 = nv.data[5];
} | java | void extractReferenceW(DMatrixRMaj nv ) {
W0.a11 = nv.data[0];
W0.a12 = W0.a21 = nv.data[1];
W0.a13 = W0.a31 = nv.data[2];
W0.a22 = nv.data[3];
W0.a23 = W0.a32 = nv.data[4];
W0.a33 = nv.data[5];
} | [
"void",
"extractReferenceW",
"(",
"DMatrixRMaj",
"nv",
")",
"{",
"W0",
".",
"a11",
"=",
"nv",
".",
"data",
"[",
"0",
"]",
";",
"W0",
".",
"a12",
"=",
"W0",
".",
"a21",
"=",
"nv",
".",
"data",
"[",
"1",
"]",
";",
"W0",
".",
"a13",
"=",
"W0",
... | Extracts calibration for the reference frame | [
"Extracts",
"calibration",
"for",
"the",
"reference",
"frame"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-calibration/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationLinearRotationMulti.java#L231-L238 |
50,056 | lessthanoptimal/BoofCV | main/boofcv-calibration/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationLinearRotationMulti.java | SelfCalibrationLinearRotationMulti.convertW | void convertW( Homography2D_F64 w , CameraPinhole c ) {
// inv(w) = K*K'
tmp.set(w);
CommonOps_DDF3.divide(tmp,tmp.a33);
CommonOps_DDF3.cholU(tmp);
CommonOps_DDF3.invert(tmp,K);
CommonOps_DDF3.divide(K,K.a33);
c.fx = K.a11;
c.fy = knownAspectRatio ? (K.a22 + c.fx*aspectRatio)/2.0 : K.a22;
c.skew = ze... | java | void convertW( Homography2D_F64 w , CameraPinhole c ) {
// inv(w) = K*K'
tmp.set(w);
CommonOps_DDF3.divide(tmp,tmp.a33);
CommonOps_DDF3.cholU(tmp);
CommonOps_DDF3.invert(tmp,K);
CommonOps_DDF3.divide(K,K.a33);
c.fx = K.a11;
c.fy = knownAspectRatio ? (K.a22 + c.fx*aspectRatio)/2.0 : K.a22;
c.skew = ze... | [
"void",
"convertW",
"(",
"Homography2D_F64",
"w",
",",
"CameraPinhole",
"c",
")",
"{",
"// inv(w) = K*K'",
"tmp",
".",
"set",
"(",
"w",
")",
";",
"CommonOps_DDF3",
".",
"divide",
"(",
"tmp",
",",
"tmp",
".",
"a33",
")",
";",
"CommonOps_DDF3",
".",
"cholU... | Converts W into a pinhole camera model by finding the cholesky decomposition | [
"Converts",
"W",
"into",
"a",
"pinhole",
"camera",
"model",
"by",
"finding",
"the",
"cholesky",
"decomposition"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-calibration/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationLinearRotationMulti.java#L245-L258 |
50,057 | lessthanoptimal/BoofCV | main/boofcv-calibration/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationLinearRotationMulti.java | SelfCalibrationLinearRotationMulti.extractCalibration | void extractCalibration( Homography2D_F64 Hinv , CameraPinhole c ) {
CommonOps_DDF3.multTransA(Hinv,W0,tmp);
CommonOps_DDF3.mult(tmp,Hinv,Wi);
convertW(Wi,c);
} | java | void extractCalibration( Homography2D_F64 Hinv , CameraPinhole c ) {
CommonOps_DDF3.multTransA(Hinv,W0,tmp);
CommonOps_DDF3.mult(tmp,Hinv,Wi);
convertW(Wi,c);
} | [
"void",
"extractCalibration",
"(",
"Homography2D_F64",
"Hinv",
",",
"CameraPinhole",
"c",
")",
"{",
"CommonOps_DDF3",
".",
"multTransA",
"(",
"Hinv",
",",
"W0",
",",
"tmp",
")",
";",
"CommonOps_DDF3",
".",
"mult",
"(",
"tmp",
",",
"Hinv",
",",
"Wi",
")",
... | Extracts calibration for the non-reference frames
w = H^-T*w*H^-1 | [
"Extracts",
"calibration",
"for",
"the",
"non",
"-",
"reference",
"frames"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-calibration/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationLinearRotationMulti.java#L265-L270 |
50,058 | lessthanoptimal/BoofCV | main/boofcv-calibration/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationLinearRotationMulti.java | SelfCalibrationLinearRotationMulti.computeInverseH | public boolean computeInverseH(List<Homography2D_F64> homography0toI) {
listHInv.reset();
int N = homography0toI.size();
for (int i = 0; i < N; i++) {
Homography2D_F64 H = homography0toI.get(i);
Homography2D_F64 Hinv = listHInv.grow();
// Ensure the determinant is one
double d = CommonOps_DDF3.det(H)... | java | public boolean computeInverseH(List<Homography2D_F64> homography0toI) {
listHInv.reset();
int N = homography0toI.size();
for (int i = 0; i < N; i++) {
Homography2D_F64 H = homography0toI.get(i);
Homography2D_F64 Hinv = listHInv.grow();
// Ensure the determinant is one
double d = CommonOps_DDF3.det(H)... | [
"public",
"boolean",
"computeInverseH",
"(",
"List",
"<",
"Homography2D_F64",
">",
"homography0toI",
")",
"{",
"listHInv",
".",
"reset",
"(",
")",
";",
"int",
"N",
"=",
"homography0toI",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";"... | Ensures the determinant is one then inverts the homogrpahy | [
"Ensures",
"the",
"determinant",
"is",
"one",
"then",
"inverts",
"the",
"homogrpahy"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-calibration/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationLinearRotationMulti.java#L275-L295 |
50,059 | lessthanoptimal/BoofCV | integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java | SimpleCamera2Activity.startCameraTexture | protected void startCameraTexture( TextureView view ) {
if( verbose )
Log.i(TAG,"startCamera(TextureView="+(view!=null)+")");
this.mTextureView = view;
this.mView = null;
this.mTextureView.setSurfaceTextureListener(mSurfaceTextureListener);
} | java | protected void startCameraTexture( TextureView view ) {
if( verbose )
Log.i(TAG,"startCamera(TextureView="+(view!=null)+")");
this.mTextureView = view;
this.mView = null;
this.mTextureView.setSurfaceTextureListener(mSurfaceTextureListener);
} | [
"protected",
"void",
"startCameraTexture",
"(",
"TextureView",
"view",
")",
"{",
"if",
"(",
"verbose",
")",
"Log",
".",
"i",
"(",
"TAG",
",",
"\"startCamera(TextureView=\"",
"+",
"(",
"view",
"!=",
"null",
")",
"+",
"\")\"",
")",
";",
"this",
".",
"mText... | After this function is called the camera will be start. It might not start immediately
and there can be a delay.
@param view The view the camera is displayed inside or null if not displayed | [
"After",
"this",
"function",
"is",
"called",
"the",
"camera",
"will",
"be",
"start",
".",
"It",
"might",
"not",
"start",
"immediately",
"and",
"there",
"can",
"be",
"a",
"delay",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java#L125-L131 |
50,060 | lessthanoptimal/BoofCV | integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java | SimpleCamera2Activity.configureCamera | protected void configureCamera( CameraDevice device ,
CameraCharacteristics characteristics,
CaptureRequest.Builder captureRequestBuilder ) {
if( verbose )
Log.i(TAG,"configureCamera() default function");
captureRequestBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_C... | java | protected void configureCamera( CameraDevice device ,
CameraCharacteristics characteristics,
CaptureRequest.Builder captureRequestBuilder ) {
if( verbose )
Log.i(TAG,"configureCamera() default function");
captureRequestBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_C... | [
"protected",
"void",
"configureCamera",
"(",
"CameraDevice",
"device",
",",
"CameraCharacteristics",
"characteristics",
",",
"CaptureRequest",
".",
"Builder",
"captureRequestBuilder",
")",
"{",
"if",
"(",
"verbose",
")",
"Log",
".",
"i",
"(",
"TAG",
",",
"\"config... | Override to do custom configuration of the camera's settings. By default the camera
is put into auto mode.
@param device The camera being configured
@param characteristics Used to get information on the device
@param captureRequestBuilder used to configure the camera | [
"Override",
"to",
"do",
"custom",
"configuration",
"of",
"the",
"camera",
"s",
"settings",
".",
"By",
"default",
"the",
"camera",
"is",
"put",
"into",
"auto",
"mode",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java#L308-L315 |
50,061 | lessthanoptimal/BoofCV | integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java | SimpleCamera2Activity.selectCamera | protected boolean selectCamera( String id , CameraCharacteristics characteristics ) {
if( verbose )
Log.i(TAG,"selectCamera() default function");
Integer facing = characteristics.get(CameraCharacteristics.LENS_FACING);
return facing == null || facing != CameraCharacteristics.LENS_FACING_FRONT;
} | java | protected boolean selectCamera( String id , CameraCharacteristics characteristics ) {
if( verbose )
Log.i(TAG,"selectCamera() default function");
Integer facing = characteristics.get(CameraCharacteristics.LENS_FACING);
return facing == null || facing != CameraCharacteristics.LENS_FACING_FRONT;
} | [
"protected",
"boolean",
"selectCamera",
"(",
"String",
"id",
",",
"CameraCharacteristics",
"characteristics",
")",
"{",
"if",
"(",
"verbose",
")",
"Log",
".",
"i",
"(",
"TAG",
",",
"\"selectCamera() default function\"",
")",
";",
"Integer",
"facing",
"=",
"chara... | By default this will select the backfacing camera. override to change the camera it selects. | [
"By",
"default",
"this",
"will",
"select",
"the",
"backfacing",
"camera",
".",
"override",
"to",
"change",
"the",
"camera",
"it",
"selects",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java#L320-L325 |
50,062 | lessthanoptimal/BoofCV | integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java | SimpleCamera2Activity.reopenCameraAtResolution | protected void reopenCameraAtResolution(int cameraWidth, int cameraHeight) {
if (Looper.getMainLooper().getThread() != Thread.currentThread()) {
throw new RuntimeException("Attempted to reopenCameraAtResolution main looper thread!");
}
boolean releaseLock = true;
open.mLock.lock();
try {
if (verbose)
... | java | protected void reopenCameraAtResolution(int cameraWidth, int cameraHeight) {
if (Looper.getMainLooper().getThread() != Thread.currentThread()) {
throw new RuntimeException("Attempted to reopenCameraAtResolution main looper thread!");
}
boolean releaseLock = true;
open.mLock.lock();
try {
if (verbose)
... | [
"protected",
"void",
"reopenCameraAtResolution",
"(",
"int",
"cameraWidth",
",",
"int",
"cameraHeight",
")",
"{",
"if",
"(",
"Looper",
".",
"getMainLooper",
"(",
")",
".",
"getThread",
"(",
")",
"!=",
"Thread",
".",
"currentThread",
"(",
")",
")",
"{",
"th... | Re-opens the camera with the same settings at the specified resolution. It is assumed that you know
what you're doing and that this is a valid resolution.
WARNING: UNTESTED | [
"Re",
"-",
"opens",
"the",
"camera",
"with",
"the",
"same",
"settings",
"at",
"the",
"specified",
"resolution",
".",
"It",
"is",
"assumed",
"that",
"you",
"know",
"what",
"you",
"re",
"doing",
"and",
"that",
"this",
"is",
"a",
"valid",
"resolution",
"."
... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java#L487-L534 |
50,063 | lessthanoptimal/BoofCV | integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java | SimpleCamera2Activity.closeCamera | protected boolean closeCamera() {
if( verbose )
Log.i(TAG,"closeCamera() activity="+getClass().getSimpleName());
if (Looper.getMainLooper().getThread() != Thread.currentThread()) {
throw new RuntimeException("Attempted to close camera not on the main looper thread!");
}
boolean closed = false;
// if( v... | java | protected boolean closeCamera() {
if( verbose )
Log.i(TAG,"closeCamera() activity="+getClass().getSimpleName());
if (Looper.getMainLooper().getThread() != Thread.currentThread()) {
throw new RuntimeException("Attempted to close camera not on the main looper thread!");
}
boolean closed = false;
// if( v... | [
"protected",
"boolean",
"closeCamera",
"(",
")",
"{",
"if",
"(",
"verbose",
")",
"Log",
".",
"i",
"(",
"TAG",
",",
"\"closeCamera() activity=\"",
"+",
"getClass",
"(",
")",
".",
"getSimpleName",
"(",
")",
")",
";",
"if",
"(",
"Looper",
".",
"getMainLoope... | Closes the camera. Returns true if the camera was not already closed and it closed it
@return | [
"Closes",
"the",
"camera",
".",
"Returns",
"true",
"if",
"the",
"camera",
"was",
"not",
"already",
"closed",
"and",
"it",
"closed",
"it"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java#L540-L583 |
50,064 | lessthanoptimal/BoofCV | integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java | SimpleCamera2Activity.startPreview | private void startPreview() {
// Sanity check. Parts of this code assume it's on this thread. If it has been put into a handle
// that's fine just be careful nothing assumes it's on the main looper
if (Looper.getMainLooper().getThread() != Thread.currentThread()) {
throw new RuntimeException("Not on main loope... | java | private void startPreview() {
// Sanity check. Parts of this code assume it's on this thread. If it has been put into a handle
// that's fine just be careful nothing assumes it's on the main looper
if (Looper.getMainLooper().getThread() != Thread.currentThread()) {
throw new RuntimeException("Not on main loope... | [
"private",
"void",
"startPreview",
"(",
")",
"{",
"// Sanity check. Parts of this code assume it's on this thread. If it has been put into a handle",
"// that's fine just be careful nothing assumes it's on the main looper",
"if",
"(",
"Looper",
".",
"getMainLooper",
"(",
")",
".",
"g... | Start the camera preview. | [
"Start",
"the",
"camera",
"preview",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java#L588-L633 |
50,065 | lessthanoptimal/BoofCV | integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java | SimpleCamera2Activity.cameraIntrinsicNominal | public void cameraIntrinsicNominal(CameraPinhole intrinsic ) {
open.mLock.lock();
try {
// This might be called before the camera is open
if (open.mCameraCharacterstics != null) {
SizeF physicalSize = open.mCameraCharacterstics.get(CameraCharacteristics.SENSOR_INFO_PHYSICAL_SIZE);
Rect activeSize = op... | java | public void cameraIntrinsicNominal(CameraPinhole intrinsic ) {
open.mLock.lock();
try {
// This might be called before the camera is open
if (open.mCameraCharacterstics != null) {
SizeF physicalSize = open.mCameraCharacterstics.get(CameraCharacteristics.SENSOR_INFO_PHYSICAL_SIZE);
Rect activeSize = op... | [
"public",
"void",
"cameraIntrinsicNominal",
"(",
"CameraPinhole",
"intrinsic",
")",
"{",
"open",
".",
"mLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"// This might be called before the camera is open",
"if",
"(",
"open",
".",
"mCameraCharacterstics",
"!=",
"null",... | Returns the camera intrinsic parameters estimated from the physical parameters returned by
the camera2 API | [
"Returns",
"the",
"camera",
"intrinsic",
"parameters",
"estimated",
"from",
"the",
"physical",
"parameters",
"returned",
"by",
"the",
"camera2",
"API"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java#L917-L950 |
50,066 | lessthanoptimal/BoofCV | integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java | SimpleCamera2Activity.displayDensityAdjusted | private float displayDensityAdjusted() {
open.mLock.lock();
try {
if (open.mCameraSize == null)
return displayMetrics.density;
int rotation = getWindowManager().getDefaultDisplay().getRotation();
int screenWidth = (rotation == 0 || rotation == 2) ? displayMetrics.widthPixels : displayMetrics.heightPix... | java | private float displayDensityAdjusted() {
open.mLock.lock();
try {
if (open.mCameraSize == null)
return displayMetrics.density;
int rotation = getWindowManager().getDefaultDisplay().getRotation();
int screenWidth = (rotation == 0 || rotation == 2) ? displayMetrics.widthPixels : displayMetrics.heightPix... | [
"private",
"float",
"displayDensityAdjusted",
"(",
")",
"{",
"open",
".",
"mLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"if",
"(",
"open",
".",
"mCameraSize",
"==",
"null",
")",
"return",
"displayMetrics",
".",
"density",
";",
"int",
"rotation",
"=",
... | Some times the size of a font of stroke needs to be specified in the input image
but then gets scaled to image resolution. This compensates for that. | [
"Some",
"times",
"the",
"size",
"of",
"a",
"font",
"of",
"stroke",
"needs",
"to",
"be",
"specified",
"in",
"the",
"input",
"image",
"but",
"then",
"gets",
"scaled",
"to",
"image",
"resolution",
".",
"This",
"compensates",
"for",
"that",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java#L1028-L1043 |
50,067 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/factory/feature/disparity/FactoryStereoDisparity.java | FactoryStereoDisparity.regionSparseWta | public static <T extends ImageGray<T>> StereoDisparitySparse<T>
regionSparseWta( int minDisparity , int maxDisparity,
int regionRadiusX, int regionRadiusY ,
double maxPerPixelError ,
double texture ,
boolean subpixelInterpolation ,
Class<T> imageType ) {
double maxError = (regionRadius... | java | public static <T extends ImageGray<T>> StereoDisparitySparse<T>
regionSparseWta( int minDisparity , int maxDisparity,
int regionRadiusX, int regionRadiusY ,
double maxPerPixelError ,
double texture ,
boolean subpixelInterpolation ,
Class<T> imageType ) {
double maxError = (regionRadius... | [
"public",
"static",
"<",
"T",
"extends",
"ImageGray",
"<",
"T",
">",
">",
"StereoDisparitySparse",
"<",
"T",
">",
"regionSparseWta",
"(",
"int",
"minDisparity",
",",
"int",
"maxDisparity",
",",
"int",
"regionRadiusX",
",",
"int",
"regionRadiusY",
",",
"double"... | WTA algorithms that computes disparity on a sparse per-pixel basis as requested..
@param minDisparity Minimum disparity that it will check. Must be ≥ 0 and < maxDisparity
@param maxDisparity Maximum disparity that it will calculate. Must be > 0
@param regionRadiusX Radius of the rectangular region along x-axi... | [
"WTA",
"algorithms",
"that",
"computes",
"disparity",
"on",
"a",
"sparse",
"per",
"-",
"pixel",
"basis",
"as",
"requested",
".."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/factory/feature/disparity/FactoryStereoDisparity.java#L241-L275 |
50,068 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/direct/FeatureSpatialDiversity_F32.java | FeatureSpatialDiversity_F32.addPoint | public void addPoint( float x , float y , float z ) {
norm.grow().set(x/z, y/z);
} | java | public void addPoint( float x , float y , float z ) {
norm.grow().set(x/z, y/z);
} | [
"public",
"void",
"addPoint",
"(",
"float",
"x",
",",
"float",
"y",
",",
"float",
"z",
")",
"{",
"norm",
".",
"grow",
"(",
")",
".",
"set",
"(",
"x",
"/",
"z",
",",
"y",
"/",
"z",
")",
";",
"}"
] | Adds the estimated 3D location of a feature. | [
"Adds",
"the",
"estimated",
"3D",
"location",
"of",
"a",
"feature",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/direct/FeatureSpatialDiversity_F32.java#L50-L52 |
50,069 | lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/direct/FeatureSpatialDiversity_F32.java | FeatureSpatialDiversity_F32.process | public void process() {
computeCovarince();
float eigenvalue = smallestEigenvalue();
// eigenvalue is the variance, convert to standard deviation
double stdev = Math.sqrt(eigenvalue);
// System.out.println("stdev "+stdev+" total "+norm.size()+" mean "+meanX+" "+meanY);
// approximate the spread in by d... | java | public void process() {
computeCovarince();
float eigenvalue = smallestEigenvalue();
// eigenvalue is the variance, convert to standard deviation
double stdev = Math.sqrt(eigenvalue);
// System.out.println("stdev "+stdev+" total "+norm.size()+" mean "+meanX+" "+meanY);
// approximate the spread in by d... | [
"public",
"void",
"process",
"(",
")",
"{",
"computeCovarince",
"(",
")",
";",
"float",
"eigenvalue",
"=",
"smallestEigenvalue",
"(",
")",
";",
"// eigenvalue is the variance, convert to standard deviation",
"double",
"stdev",
"=",
"Math",
".",
"sqrt",
"(",
"eigenva... | Computes the worst case spread for how features are laid out | [
"Computes",
"the",
"worst",
"case",
"spread",
"for",
"how",
"features",
"are",
"laid",
"out"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/direct/FeatureSpatialDiversity_F32.java#L57-L72 |
50,070 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/factory/scene/FactoryImageClassifier.java | FactoryImageClassifier.vgg_cifar10 | public static ClassifierAndSource vgg_cifar10() {
List<String> sources = new ArrayList<>();
sources.add( "http://boofcv.org/notwiki/largefiles/likevgg_cifar10.zip" );
ClassifierAndSource ret = new ClassifierAndSource();
ret.data0 = new ImageClassifierVggCifar10();
ret.data1 = sources;
return ret;
} | java | public static ClassifierAndSource vgg_cifar10() {
List<String> sources = new ArrayList<>();
sources.add( "http://boofcv.org/notwiki/largefiles/likevgg_cifar10.zip" );
ClassifierAndSource ret = new ClassifierAndSource();
ret.data0 = new ImageClassifierVggCifar10();
ret.data1 = sources;
return ret;
} | [
"public",
"static",
"ClassifierAndSource",
"vgg_cifar10",
"(",
")",
"{",
"List",
"<",
"String",
">",
"sources",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"sources",
".",
"add",
"(",
"\"http://boofcv.org/notwiki/largefiles/likevgg_cifar10.zip\"",
")",
";",
"Cla... | VGG trained on CIFAR10 data
@see ImageClassifierVggCifar10
@return The classifier and where to download the model | [
"VGG",
"trained",
"on",
"CIFAR10",
"data"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/factory/scene/FactoryImageClassifier.java#L41-L51 |
50,071 | lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/factory/scene/FactoryImageClassifier.java | FactoryImageClassifier.nin_imagenet | public static ClassifierAndSource nin_imagenet() {
List<String> sources = new ArrayList<>();
sources.add( "http://boofcv.org/notwiki/largefiles/nin_imagenet.zip" );
ClassifierAndSource ret = new ClassifierAndSource();
ret.data0 = new ImageClassifierNiNImageNet();
ret.data1 = sources;
return ret;
} | java | public static ClassifierAndSource nin_imagenet() {
List<String> sources = new ArrayList<>();
sources.add( "http://boofcv.org/notwiki/largefiles/nin_imagenet.zip" );
ClassifierAndSource ret = new ClassifierAndSource();
ret.data0 = new ImageClassifierNiNImageNet();
ret.data1 = sources;
return ret;
} | [
"public",
"static",
"ClassifierAndSource",
"nin_imagenet",
"(",
")",
"{",
"List",
"<",
"String",
">",
"sources",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"sources",
".",
"add",
"(",
"\"http://boofcv.org/notwiki/largefiles/nin_imagenet.zip\"",
")",
";",
"Class... | NIN trained on ImageNet data
@see ImageClassifierNiNImageNet
@return The classifier and where to download the model | [
"NIN",
"trained",
"on",
"ImageNet",
"data"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/factory/scene/FactoryImageClassifier.java#L60-L70 |
50,072 | lessthanoptimal/BoofCV | integration/boofcv-swing/src/main/java/boofcv/gui/JavaRuntimeLauncher.java | JavaRuntimeLauncher.launch | public Exit launch( Class mainClass , String ...args ) {
jvmArgs = configureArguments(mainClass,args);
try {
Runtime rt = Runtime.getRuntime();
Process pr = rt.exec(jvmArgs);
// If it exits too quickly it might not get any error messages if it crashes right away
... | java | public Exit launch( Class mainClass , String ...args ) {
jvmArgs = configureArguments(mainClass,args);
try {
Runtime rt = Runtime.getRuntime();
Process pr = rt.exec(jvmArgs);
// If it exits too quickly it might not get any error messages if it crashes right away
... | [
"public",
"Exit",
"launch",
"(",
"Class",
"mainClass",
",",
"String",
"...",
"args",
")",
"{",
"jvmArgs",
"=",
"configureArguments",
"(",
"mainClass",
",",
"args",
")",
";",
"try",
"{",
"Runtime",
"rt",
"=",
"Runtime",
".",
"getRuntime",
"(",
")",
";",
... | Launches the class with the provided arguments. Blocks until the process stops.
@param mainClass Class
@param args it's arguments
@return true if successful or false if it ended on error | [
"Launches",
"the",
"class",
"with",
"the",
"provided",
"arguments",
".",
"Blocks",
"until",
"the",
"process",
"stops",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/JavaRuntimeLauncher.java#L106-L137 |
50,073 | lessthanoptimal/BoofCV | integration/boofcv-swing/src/main/java/boofcv/gui/JavaRuntimeLauncher.java | JavaRuntimeLauncher.monitorSlave | private boolean monitorSlave(Process pr,
BufferedReader input, BufferedReader error)
throws IOException, InterruptedException {
// flush the input buffer
System.in.skip(System.in.available());
// If the total amount of time allocated to the slave ex... | java | private boolean monitorSlave(Process pr,
BufferedReader input, BufferedReader error)
throws IOException, InterruptedException {
// flush the input buffer
System.in.skip(System.in.available());
// If the total amount of time allocated to the slave ex... | [
"private",
"boolean",
"monitorSlave",
"(",
"Process",
"pr",
",",
"BufferedReader",
"input",
",",
"BufferedReader",
"error",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"// flush the input buffer",
"System",
".",
"in",
".",
"skip",
"(",
"System",
... | Prints printOut the standard printOut and error from the slave and checks its health. Exits if
the slave has finished or is declared frozen.
@return true if successful or false if it was forced to kill the slave because it was frozen | [
"Prints",
"printOut",
"the",
"standard",
"printOut",
"and",
"error",
"from",
"the",
"slave",
"and",
"checks",
"its",
"health",
".",
"Exits",
"if",
"the",
"slave",
"has",
"finished",
"or",
"is",
"declared",
"frozen",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/JavaRuntimeLauncher.java#L145-L210 |
50,074 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/dense/DescribeDenseHogAlg.java | DescribeDenseHogAlg.computeWeightBlockPixels | protected void computeWeightBlockPixels() {
int rows = cellsPerBlockY*pixelsPerCell;
int cols = cellsPerBlockX*pixelsPerCell;
weights = new double[ rows*cols ];
double offsetRow=0,offsetCol=0;
int radiusRow=rows/2,radiusCol=cols/2;
if( rows%2 == 0 ) {
offsetRow = 0.5;
}
if( cols%2 == 0 ) {
offs... | java | protected void computeWeightBlockPixels() {
int rows = cellsPerBlockY*pixelsPerCell;
int cols = cellsPerBlockX*pixelsPerCell;
weights = new double[ rows*cols ];
double offsetRow=0,offsetCol=0;
int radiusRow=rows/2,radiusCol=cols/2;
if( rows%2 == 0 ) {
offsetRow = 0.5;
}
if( cols%2 == 0 ) {
offs... | [
"protected",
"void",
"computeWeightBlockPixels",
"(",
")",
"{",
"int",
"rows",
"=",
"cellsPerBlockY",
"*",
"pixelsPerCell",
";",
"int",
"cols",
"=",
"cellsPerBlockX",
"*",
"pixelsPerCell",
";",
"weights",
"=",
"new",
"double",
"[",
"rows",
"*",
"cols",
"]",
... | Compute gaussian weights applied to each pixel in the block | [
"Compute",
"gaussian",
"weights",
"applied",
"to",
"each",
"pixel",
"in",
"the",
"block"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/dense/DescribeDenseHogAlg.java#L121-L161 |
50,075 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/dense/DescribeDenseHogAlg.java | DescribeDenseHogAlg.computePixelFeatures | private void computePixelFeatures() {
for (int y = 0; y < derivX.height; y++) {
int pixelIndex = y*derivX.width;
int endIndex = pixelIndex+derivX.width;
for (; pixelIndex < endIndex; pixelIndex++ ) {
float dx = derivX.data[pixelIndex];
float dy = derivY.data[pixelIndex];
// angle from 0 to pi ra... | java | private void computePixelFeatures() {
for (int y = 0; y < derivX.height; y++) {
int pixelIndex = y*derivX.width;
int endIndex = pixelIndex+derivX.width;
for (; pixelIndex < endIndex; pixelIndex++ ) {
float dx = derivX.data[pixelIndex];
float dy = derivY.data[pixelIndex];
// angle from 0 to pi ra... | [
"private",
"void",
"computePixelFeatures",
"(",
")",
"{",
"for",
"(",
"int",
"y",
"=",
"0",
";",
"y",
"<",
"derivX",
".",
"height",
";",
"y",
"++",
")",
"{",
"int",
"pixelIndex",
"=",
"y",
"*",
"derivX",
".",
"width",
";",
"int",
"endIndex",
"=",
... | Computes the orientation and magnitude of each pixel | [
"Computes",
"the",
"orientation",
"and",
"magnitude",
"of",
"each",
"pixel"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/dense/DescribeDenseHogAlg.java#L179-L193 |
50,076 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/dense/DescribeDenseHogAlg.java | DescribeDenseHogAlg.addToHistogram | void addToHistogram(int cellX, int cellY, int orientationIndex, double magnitude) {
// see if it's being applied to a valid cell in the histogram
if( cellX < 0 || cellX >= cellsPerBlockX)
return;
if( cellY < 0 || cellY >= cellsPerBlockY)
return;
int index = (cellY*cellsPerBlockX + cellX)*orientationBins ... | java | void addToHistogram(int cellX, int cellY, int orientationIndex, double magnitude) {
// see if it's being applied to a valid cell in the histogram
if( cellX < 0 || cellX >= cellsPerBlockX)
return;
if( cellY < 0 || cellY >= cellsPerBlockY)
return;
int index = (cellY*cellsPerBlockX + cellX)*orientationBins ... | [
"void",
"addToHistogram",
"(",
"int",
"cellX",
",",
"int",
"cellY",
",",
"int",
"orientationIndex",
",",
"double",
"magnitude",
")",
"{",
"// see if it's being applied to a valid cell in the histogram",
"if",
"(",
"cellX",
"<",
"0",
"||",
"cellX",
">=",
"cellsPerBlo... | Adds the magnitude to the histogram at the specified cell and orientation
@param cellX cell coordinate
@param cellY cell coordinate
@param orientationIndex orientation coordinate
@param magnitude edge magnitude | [
"Adds",
"the",
"magnitude",
"to",
"the",
"histogram",
"at",
"the",
"specified",
"cell",
"and",
"orientation"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/dense/DescribeDenseHogAlg.java#L330-L339 |
50,077 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/interpolate/array/Interpolate1D_F32.java | Interpolate1D_F32.setInput | public void setInput(float x[], float y[], int size) {
if (x.length < size || y.length < size) {
throw new IllegalArgumentException("Arrays too small for size.");
}
if (size < M) {
throw new IllegalArgumentException("Not enough data points for M");
}
this.x = x;
this.y = y;
this.size = size;
this... | java | public void setInput(float x[], float y[], int size) {
if (x.length < size || y.length < size) {
throw new IllegalArgumentException("Arrays too small for size.");
}
if (size < M) {
throw new IllegalArgumentException("Not enough data points for M");
}
this.x = x;
this.y = y;
this.size = size;
this... | [
"public",
"void",
"setInput",
"(",
"float",
"x",
"[",
"]",
",",
"float",
"y",
"[",
"]",
",",
"int",
"size",
")",
"{",
"if",
"(",
"x",
".",
"length",
"<",
"size",
"||",
"y",
".",
"length",
"<",
"size",
")",
"{",
"throw",
"new",
"IllegalArgumentExc... | Sets the data that is being interpolated.
@param x Where the points are sample at. Not modifed. Reference saved.
@param y The value at the sample points. Not modifed. Reference saved.
@param size The number of points used. | [
"Sets",
"the",
"data",
"that",
"is",
"being",
"interpolated",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/interpolate/array/Interpolate1D_F32.java#L80-L93 |
50,078 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/interpolate/array/Interpolate1D_F32.java | Interpolate1D_F32.process | public float process(float testX) {
if (doHunt) {
hunt(testX);
} else {
bisectionSearch(testX, 0, size - 1);
}
return compute(testX);
} | java | public float process(float testX) {
if (doHunt) {
hunt(testX);
} else {
bisectionSearch(testX, 0, size - 1);
}
return compute(testX);
} | [
"public",
"float",
"process",
"(",
"float",
"testX",
")",
"{",
"if",
"(",
"doHunt",
")",
"{",
"hunt",
"(",
"testX",
")",
";",
"}",
"else",
"{",
"bisectionSearch",
"(",
"testX",
",",
"0",
",",
"size",
"-",
"1",
")",
";",
"}",
"return",
"compute",
... | Performs interpolation at the sample point.
@param testX Where the interpolated value is done at.
@return The interpolated value at sampleX. | [
"Performs",
"interpolation",
"at",
"the",
"sample",
"point",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/interpolate/array/Interpolate1D_F32.java#L101-L109 |
50,079 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/interpolate/array/Interpolate1D_F32.java | Interpolate1D_F32.hunt | protected void hunt(float val) {
int lowerLimit = center;
int upperLimit;
int inc = 1;
if (val >= x[lowerLimit] && ascend) {
// hunt up
for (; ; ) {
upperLimit = lowerLimit + inc;
// see if it is outside the table
if (upperLimit >= size - 1) {
upperLimit = size - 1;
break;
} els... | java | protected void hunt(float val) {
int lowerLimit = center;
int upperLimit;
int inc = 1;
if (val >= x[lowerLimit] && ascend) {
// hunt up
for (; ; ) {
upperLimit = lowerLimit + inc;
// see if it is outside the table
if (upperLimit >= size - 1) {
upperLimit = size - 1;
break;
} els... | [
"protected",
"void",
"hunt",
"(",
"float",
"val",
")",
"{",
"int",
"lowerLimit",
"=",
"center",
";",
"int",
"upperLimit",
";",
"int",
"inc",
"=",
"1",
";",
"if",
"(",
"val",
">=",
"x",
"[",
"lowerLimit",
"]",
"&&",
"ascend",
")",
"{",
"// hunt up",
... | To speed up finding the appropriate indexes to use in the interpolation it can use its
previous results to search a smaller region than it would otherwise.
@param val The value that is to be interpolated. | [
"To",
"speed",
"up",
"finding",
"the",
"appropriate",
"indexes",
"to",
"use",
"in",
"the",
"interpolation",
"it",
"can",
"use",
"its",
"previous",
"results",
"to",
"search",
"a",
"smaller",
"region",
"than",
"it",
"would",
"otherwise",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/interpolate/array/Interpolate1D_F32.java#L150-L188 |
50,080 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/impl/GradientSobel_Naive.java | GradientSobel_Naive.process | public static void process( GrayI orig,
GrayI derivX,
GrayI derivY) {
final int width = orig.getWidth();
final int height = orig.getHeight();
for (int y = 1; y < height - 1; y++) {
for (int x = 1; x < width - 1; x++) {
int dy = -(orig.get(x - 1, y - 1) + 2 * orig.get(x, y - 1) + orig.get... | java | public static void process( GrayI orig,
GrayI derivX,
GrayI derivY) {
final int width = orig.getWidth();
final int height = orig.getHeight();
for (int y = 1; y < height - 1; y++) {
for (int x = 1; x < width - 1; x++) {
int dy = -(orig.get(x - 1, y - 1) + 2 * orig.get(x, y - 1) + orig.get... | [
"public",
"static",
"void",
"process",
"(",
"GrayI",
"orig",
",",
"GrayI",
"derivX",
",",
"GrayI",
"derivY",
")",
"{",
"final",
"int",
"width",
"=",
"orig",
".",
"getWidth",
"(",
")",
";",
"final",
"int",
"height",
"=",
"orig",
".",
"getHeight",
"(",
... | Computes the derivative of 'orig' along the x and y axes | [
"Computes",
"the",
"derivative",
"of",
"orig",
"along",
"the",
"x",
"and",
"y",
"axes"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/impl/GradientSobel_Naive.java#L42-L63 |
50,081 | lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/segmentation/ExampleSegmentSuperpixels.java | ExampleSegmentSuperpixels.performSegmentation | public static <T extends ImageBase<T>>
void performSegmentation( ImageSuperpixels<T> alg , T color )
{
// Segmentation often works better after blurring the image. Reduces high frequency image components which
// can cause over segmentation
GBlurImageOps.gaussian(color, color, 0.5, -1, null);
// Storage for... | java | public static <T extends ImageBase<T>>
void performSegmentation( ImageSuperpixels<T> alg , T color )
{
// Segmentation often works better after blurring the image. Reduces high frequency image components which
// can cause over segmentation
GBlurImageOps.gaussian(color, color, 0.5, -1, null);
// Storage for... | [
"public",
"static",
"<",
"T",
"extends",
"ImageBase",
"<",
"T",
">",
">",
"void",
"performSegmentation",
"(",
"ImageSuperpixels",
"<",
"T",
">",
"alg",
",",
"T",
"color",
")",
"{",
"// Segmentation often works better after blurring the image. Reduces high frequency ima... | Segments and visualizes the image | [
"Segments",
"and",
"visualizes",
"the",
"image"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/segmentation/ExampleSegmentSuperpixels.java#L53-L69 |
50,082 | lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/segmentation/ExampleSegmentSuperpixels.java | ExampleSegmentSuperpixels.visualize | public static <T extends ImageBase<T>>
void visualize(GrayS32 pixelToRegion , T color , int numSegments )
{
// Computes the mean color inside each region
ImageType<T> type = color.getImageType();
ComputeRegionMeanColor<T> colorize = FactorySegmentationAlg.regionMeanColor(type);
FastQueue<float[]> segmentCol... | java | public static <T extends ImageBase<T>>
void visualize(GrayS32 pixelToRegion , T color , int numSegments )
{
// Computes the mean color inside each region
ImageType<T> type = color.getImageType();
ComputeRegionMeanColor<T> colorize = FactorySegmentationAlg.regionMeanColor(type);
FastQueue<float[]> segmentCol... | [
"public",
"static",
"<",
"T",
"extends",
"ImageBase",
"<",
"T",
">",
">",
"void",
"visualize",
"(",
"GrayS32",
"pixelToRegion",
",",
"T",
"color",
",",
"int",
"numSegments",
")",
"{",
"// Computes the mean color inside each region",
"ImageType",
"<",
"T",
">",
... | Visualizes results three ways. 1) Colorized segmented image where each region is given a random color.
2) Each pixel is assigned the mean color through out the region. 3) Black pixels represent the border
between regions. | [
"Visualizes",
"results",
"three",
"ways",
".",
"1",
")",
"Colorized",
"segmented",
"image",
"where",
"each",
"region",
"is",
"given",
"a",
"random",
"color",
".",
"2",
")",
"Each",
"pixel",
"is",
"assigned",
"the",
"mean",
"color",
"through",
"out",
"the",... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/segmentation/ExampleSegmentSuperpixels.java#L76-L108 |
50,083 | lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/stereo/ExampleStereoDisparity.java | ExampleStereoDisparity.denseDisparity | public static GrayU8 denseDisparity(GrayU8 rectLeft , GrayU8 rectRight ,
int regionSize,
int minDisparity , int maxDisparity )
{
// A slower but more accuracy algorithm is selected
// All of these parameters should be turned
StereoDisparity<GrayU8,GrayU8> disparityAlg =
FactoryStereoDispa... | java | public static GrayU8 denseDisparity(GrayU8 rectLeft , GrayU8 rectRight ,
int regionSize,
int minDisparity , int maxDisparity )
{
// A slower but more accuracy algorithm is selected
// All of these parameters should be turned
StereoDisparity<GrayU8,GrayU8> disparityAlg =
FactoryStereoDispa... | [
"public",
"static",
"GrayU8",
"denseDisparity",
"(",
"GrayU8",
"rectLeft",
",",
"GrayU8",
"rectRight",
",",
"int",
"regionSize",
",",
"int",
"minDisparity",
",",
"int",
"maxDisparity",
")",
"{",
"// A slower but more accuracy algorithm is selected",
"// All of these param... | Computes the dense disparity between between two stereo images. The input images
must be rectified with lens distortion removed to work! Floating point images
are also supported.
@param rectLeft Rectified left camera image
@param rectRight Rectified right camera image
@param regionSize Radius of region being matched... | [
"Computes",
"the",
"dense",
"disparity",
"between",
"between",
"two",
"stereo",
"images",
".",
"The",
"input",
"images",
"must",
"be",
"rectified",
"with",
"lens",
"distortion",
"removed",
"to",
"work!",
"Floating",
"point",
"images",
"are",
"also",
"supported",... | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/stereo/ExampleStereoDisparity.java#L74-L88 |
50,084 | lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/stereo/ExampleStereoDisparity.java | ExampleStereoDisparity.denseDisparitySubpixel | public static GrayF32 denseDisparitySubpixel(GrayU8 rectLeft , GrayU8 rectRight ,
int regionSize ,
int minDisparity , int maxDisparity )
{
// A slower but more accuracy algorithm is selected
// All of these parameters should be turned
StereoDisparity<GrayU8,GrayF32> disparityAlg =
F... | java | public static GrayF32 denseDisparitySubpixel(GrayU8 rectLeft , GrayU8 rectRight ,
int regionSize ,
int minDisparity , int maxDisparity )
{
// A slower but more accuracy algorithm is selected
// All of these parameters should be turned
StereoDisparity<GrayU8,GrayF32> disparityAlg =
F... | [
"public",
"static",
"GrayF32",
"denseDisparitySubpixel",
"(",
"GrayU8",
"rectLeft",
",",
"GrayU8",
"rectRight",
",",
"int",
"regionSize",
",",
"int",
"minDisparity",
",",
"int",
"maxDisparity",
")",
"{",
"// A slower but more accuracy algorithm is selected",
"// All of th... | Same as above, but compute disparity to within sub-pixel accuracy. The difference between the
two is more apparent when a 3D point cloud is computed. | [
"Same",
"as",
"above",
"but",
"compute",
"disparity",
"to",
"within",
"sub",
"-",
"pixel",
"accuracy",
".",
"The",
"difference",
"between",
"the",
"two",
"is",
"more",
"apparent",
"when",
"a",
"3D",
"point",
"cloud",
"is",
"computed",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/stereo/ExampleStereoDisparity.java#L94-L108 |
50,085 | lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/stereo/ExampleStereoDisparity.java | ExampleStereoDisparity.rectify | public static RectifyCalibrated rectify(GrayU8 origLeft , GrayU8 origRight ,
StereoParameters param ,
GrayU8 rectLeft , GrayU8 rectRight )
{
// Compute rectification
RectifyCalibrated rectifyAlg = RectifyImageOps.createCalibrated();
Se3_F64 leftToRight = param.getRightToLeft().invert(null);... | java | public static RectifyCalibrated rectify(GrayU8 origLeft , GrayU8 origRight ,
StereoParameters param ,
GrayU8 rectLeft , GrayU8 rectRight )
{
// Compute rectification
RectifyCalibrated rectifyAlg = RectifyImageOps.createCalibrated();
Se3_F64 leftToRight = param.getRightToLeft().invert(null);... | [
"public",
"static",
"RectifyCalibrated",
"rectify",
"(",
"GrayU8",
"origLeft",
",",
"GrayU8",
"origRight",
",",
"StereoParameters",
"param",
",",
"GrayU8",
"rectLeft",
",",
"GrayU8",
"rectRight",
")",
"{",
"// Compute rectification",
"RectifyCalibrated",
"rectifyAlg",
... | Rectified the input images using known calibration. | [
"Rectified",
"the",
"input",
"images",
"using",
"known",
"calibration",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/stereo/ExampleStereoDisparity.java#L113-L151 |
50,086 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/color/Histogram_F64.java | Histogram_F64.isRangeSet | public boolean isRangeSet() {
for (int i = 0; i < getDimensions(); i++) {
if( valueMin[i] == 0 && valueMax[i] == 0 ) {
return false;
}
}
return true;
} | java | public boolean isRangeSet() {
for (int i = 0; i < getDimensions(); i++) {
if( valueMin[i] == 0 && valueMax[i] == 0 ) {
return false;
}
}
return true;
} | [
"public",
"boolean",
"isRangeSet",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"getDimensions",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
"valueMin",
"[",
"i",
"]",
"==",
"0",
"&&",
"valueMax",
"[",
"i",
"]",
"==",
"0... | Returns true if the min and max value for each dimension has been set
@return true if range has been set | [
"Returns",
"true",
"if",
"the",
"min",
"and",
"max",
"value",
"for",
"each",
"dimension",
"has",
"been",
"set"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/color/Histogram_F64.java#L81-L89 |
50,087 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/color/Histogram_F64.java | Histogram_F64.setRange | public void setRange( int dimension , double min , double max ) {
valueMin[dimension] = min;
valueMax[dimension] = max;
} | java | public void setRange( int dimension , double min , double max ) {
valueMin[dimension] = min;
valueMax[dimension] = max;
} | [
"public",
"void",
"setRange",
"(",
"int",
"dimension",
",",
"double",
"min",
",",
"double",
"max",
")",
"{",
"valueMin",
"[",
"dimension",
"]",
"=",
"min",
";",
"valueMax",
"[",
"dimension",
"]",
"=",
"max",
";",
"}"
] | Specifies the minimum and maximum values for a specific dimension
@param dimension Which dimension
@param min The minimum value
@param max The maximum value | [
"Specifies",
"the",
"minimum",
"and",
"maximum",
"values",
"for",
"a",
"specific",
"dimension"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/color/Histogram_F64.java#L115-L118 |
50,088 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/color/Histogram_F64.java | Histogram_F64.getDimensionIndex | public int getDimensionIndex( int dimension , int value ) {
double min = valueMin[dimension];
double max = valueMax[dimension];
double fraction = ((value-min)/(max-min+1.0));
return (int)(fraction*length[dimension]);
} | java | public int getDimensionIndex( int dimension , int value ) {
double min = valueMin[dimension];
double max = valueMax[dimension];
double fraction = ((value-min)/(max-min+1.0));
return (int)(fraction*length[dimension]);
} | [
"public",
"int",
"getDimensionIndex",
"(",
"int",
"dimension",
",",
"int",
"value",
")",
"{",
"double",
"min",
"=",
"valueMin",
"[",
"dimension",
"]",
";",
"double",
"max",
"=",
"valueMax",
"[",
"dimension",
"]",
";",
"double",
"fraction",
"=",
"(",
"(",... | Given a value it returns the corresponding bin index in this histogram for integer values. The discretion
is taken in account and 1 is added to the range.
@param dimension Which dimension the value belongs to
@param value Floating point value between min and max, inclusive.
@return The index/bin | [
"Given",
"a",
"value",
"it",
"returns",
"the",
"corresponding",
"bin",
"index",
"in",
"this",
"histogram",
"for",
"integer",
"values",
".",
"The",
"discretion",
"is",
"taken",
"in",
"account",
"and",
"1",
"is",
"added",
"to",
"the",
"range",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/color/Histogram_F64.java#L184-L190 |
50,089 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/color/Histogram_F64.java | Histogram_F64.getIndex | public final int getIndex( int coordinate[] ) {
int index = coordinate[0]*strides[0];
for (int i = 1; i < coordinate.length; i++) {
index += strides[i]*coordinate[i];
}
return index;
} | java | public final int getIndex( int coordinate[] ) {
int index = coordinate[0]*strides[0];
for (int i = 1; i < coordinate.length; i++) {
index += strides[i]*coordinate[i];
}
return index;
} | [
"public",
"final",
"int",
"getIndex",
"(",
"int",
"coordinate",
"[",
"]",
")",
"{",
"int",
"index",
"=",
"coordinate",
"[",
"0",
"]",
"*",
"strides",
"[",
"0",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<",
"coordinate",
".",
"length"... | For a N-Dimensional histogram it will return the array index for the N-D coordinate
@param coordinate N-D coordinate
@return index | [
"For",
"a",
"N",
"-",
"Dimensional",
"histogram",
"it",
"will",
"return",
"the",
"array",
"index",
"for",
"the",
"N",
"-",
"D",
"coordinate"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/color/Histogram_F64.java#L219-L226 |
50,090 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/color/Histogram_F64.java | Histogram_F64.copy | public Histogram_F64 copy() {
Histogram_F64 out = newInstance();
System.arraycopy(value,0,out.value,0,length.length);
return out;
} | java | public Histogram_F64 copy() {
Histogram_F64 out = newInstance();
System.arraycopy(value,0,out.value,0,length.length);
return out;
} | [
"public",
"Histogram_F64",
"copy",
"(",
")",
"{",
"Histogram_F64",
"out",
"=",
"newInstance",
"(",
")",
";",
"System",
".",
"arraycopy",
"(",
"value",
",",
"0",
",",
"out",
".",
"value",
",",
"0",
",",
"length",
".",
"length",
")",
";",
"return",
"ou... | Creates an exact copy of "this" histogram | [
"Creates",
"an",
"exact",
"copy",
"of",
"this",
"histogram"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/color/Histogram_F64.java#L261-L267 |
50,091 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/shapes/polygon/RefinePolygonToGrayLine.java | RefinePolygonToGrayLine.refine | @Override
public boolean refine(Polygon2D_F64 input, Polygon2D_F64 output)
{
if( input.size() != output.size())
throw new IllegalArgumentException("Input and output sides do not match. "+input.size()+" "+output.size());
// sanity check input. If it's too small this algorithm won't work
if( checkShapeTooSma... | java | @Override
public boolean refine(Polygon2D_F64 input, Polygon2D_F64 output)
{
if( input.size() != output.size())
throw new IllegalArgumentException("Input and output sides do not match. "+input.size()+" "+output.size());
// sanity check input. If it's too small this algorithm won't work
if( checkShapeTooSma... | [
"@",
"Override",
"public",
"boolean",
"refine",
"(",
"Polygon2D_F64",
"input",
",",
"Polygon2D_F64",
"output",
")",
"{",
"if",
"(",
"input",
".",
"size",
"(",
")",
"!=",
"output",
".",
"size",
"(",
")",
")",
"throw",
"new",
"IllegalArgumentException",
"(",... | Refines the fit a polygon by snapping it to the edges.
@param input (input) Initial estimate for the polygon. CW or CCW ordering doesn't matter.
@param output (output) the fitted polygon | [
"Refines",
"the",
"fit",
"a",
"polygon",
"by",
"snapping",
"it",
"to",
"the",
"edges",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/polygon/RefinePolygonToGrayLine.java#L144-L164 |
50,092 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/shapes/polygon/RefinePolygonToGrayLine.java | RefinePolygonToGrayLine.checkShapeTooSmall | private boolean checkShapeTooSmall(Polygon2D_F64 input) {
// must be longer than the border plus some small fudge factor
double minLength = cornerOffset*2 + 2;
for (int i = 0; i < input.size(); i++) {
int j = (i+1)%input.size();
Point2D_F64 a = input.get(i);
Point2D_F64 b = input.get(j);
if( a.distanc... | java | private boolean checkShapeTooSmall(Polygon2D_F64 input) {
// must be longer than the border plus some small fudge factor
double minLength = cornerOffset*2 + 2;
for (int i = 0; i < input.size(); i++) {
int j = (i+1)%input.size();
Point2D_F64 a = input.get(i);
Point2D_F64 b = input.get(j);
if( a.distanc... | [
"private",
"boolean",
"checkShapeTooSmall",
"(",
"Polygon2D_F64",
"input",
")",
"{",
"// must be longer than the border plus some small fudge factor",
"double",
"minLength",
"=",
"cornerOffset",
"*",
"2",
"+",
"2",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
... | Looks at the distance between each vertex. If that distance is so small the edge can't be measured the
return true.
@param input polygon
@return true if too small or false if not | [
"Looks",
"at",
"the",
"distance",
"between",
"each",
"vertex",
".",
"If",
"that",
"distance",
"is",
"so",
"small",
"the",
"edge",
"can",
"t",
"be",
"measured",
"the",
"return",
"true",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/polygon/RefinePolygonToGrayLine.java#L172-L184 |
50,093 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/shapes/polygon/RefinePolygonToGrayLine.java | RefinePolygonToGrayLine.optimize | protected boolean optimize(Polygon2D_F64 seed , Polygon2D_F64 current ) {
previous.set(seed);
// pixels squares is faster to compute
double convergeTol = convergeTolPixels*convergeTolPixels;
// initialize the lines since they are used to check for corner divergence
for (int i = 0; i < seed.size(); i++) {
... | java | protected boolean optimize(Polygon2D_F64 seed , Polygon2D_F64 current ) {
previous.set(seed);
// pixels squares is faster to compute
double convergeTol = convergeTolPixels*convergeTolPixels;
// initialize the lines since they are used to check for corner divergence
for (int i = 0; i < seed.size(); i++) {
... | [
"protected",
"boolean",
"optimize",
"(",
"Polygon2D_F64",
"seed",
",",
"Polygon2D_F64",
"current",
")",
"{",
"previous",
".",
"set",
"(",
"seed",
")",
";",
"// pixels squares is faster to compute",
"double",
"convergeTol",
"=",
"convergeTolPixels",
"*",
"convergeTolPi... | Refines the initial line estimates using EM. The number of iterations is fixed. | [
"Refines",
"the",
"initial",
"line",
"estimates",
"using",
"EM",
".",
"The",
"number",
"of",
"iterations",
"is",
"fixed",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/polygon/RefinePolygonToGrayLine.java#L189-L261 |
50,094 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/shapes/polygon/RefinePolygonToGrayLine.java | RefinePolygonToGrayLine.optimize | protected boolean optimize( Point2D_F64 a , Point2D_F64 b , LineGeneral2D_F64 found ) {
computeAdjustedEndPoints(a, b);
return snapToEdge.refine(adjA, adjB, found);
} | java | protected boolean optimize( Point2D_F64 a , Point2D_F64 b , LineGeneral2D_F64 found ) {
computeAdjustedEndPoints(a, b);
return snapToEdge.refine(adjA, adjB, found);
} | [
"protected",
"boolean",
"optimize",
"(",
"Point2D_F64",
"a",
",",
"Point2D_F64",
"b",
",",
"LineGeneral2D_F64",
"found",
")",
"{",
"computeAdjustedEndPoints",
"(",
"a",
",",
"b",
")",
";",
"return",
"snapToEdge",
".",
"refine",
"(",
"adjA",
",",
"adjB",
",",... | Fits a line defined by the two points. When fitting the line the weight of the edge is used to determine
how influential the point is
@param a Corner point in image coordinates.
@param b Corner point in image coordinates.
@param found (output) Line in image coordinates
@return true if successful or false if it failed | [
"Fits",
"a",
"line",
"defined",
"by",
"the",
"two",
"points",
".",
"When",
"fitting",
"the",
"line",
"the",
"weight",
"of",
"the",
"edge",
"is",
"used",
"to",
"determine",
"how",
"influential",
"the",
"point",
"is"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/polygon/RefinePolygonToGrayLine.java#L271-L276 |
50,095 | lessthanoptimal/BoofCV | integration/boofcv-swing/src/main/java/boofcv/gui/feature/VisualizeRegions.java | VisualizeRegions.watersheds | public static BufferedImage watersheds(GrayS32 segments , BufferedImage output , int radius ) {
if( output == null )
output = new BufferedImage(segments.width,segments.height,BufferedImage.TYPE_INT_RGB);
if( radius <= 0 ) {
for (int y = 0; y < segments.height; y++) {
for (int x = 0; x < segments.width; x... | java | public static BufferedImage watersheds(GrayS32 segments , BufferedImage output , int radius ) {
if( output == null )
output = new BufferedImage(segments.width,segments.height,BufferedImage.TYPE_INT_RGB);
if( radius <= 0 ) {
for (int y = 0; y < segments.height; y++) {
for (int x = 0; x < segments.width; x... | [
"public",
"static",
"BufferedImage",
"watersheds",
"(",
"GrayS32",
"segments",
",",
"BufferedImage",
"output",
",",
"int",
"radius",
")",
"{",
"if",
"(",
"output",
"==",
"null",
")",
"output",
"=",
"new",
"BufferedImage",
"(",
"segments",
".",
"width",
",",
... | Sets the pixels of each watershed as red in the output image. Watersheds have a value of 0
@param segments Conversion from pixel to region
@param output Storage for output image. Can be null.
@param radius Thickness of watershed. 0 is 1 pixel wide. 1 is 3 pixels wide.
@return Output image. | [
"Sets",
"the",
"pixels",
"of",
"each",
"watershed",
"as",
"red",
"in",
"the",
"output",
"image",
".",
"Watersheds",
"have",
"a",
"value",
"of",
"0"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/feature/VisualizeRegions.java#L43-L76 |
50,096 | lessthanoptimal/BoofCV | integration/boofcv-swing/src/main/java/boofcv/gui/feature/VisualizeRegions.java | VisualizeRegions.regions | public static BufferedImage regions(GrayS32 pixelToRegion , int numRegions , BufferedImage output ) {
return VisualizeBinaryData.renderLabeled(pixelToRegion,numRegions,output);
} | java | public static BufferedImage regions(GrayS32 pixelToRegion , int numRegions , BufferedImage output ) {
return VisualizeBinaryData.renderLabeled(pixelToRegion,numRegions,output);
} | [
"public",
"static",
"BufferedImage",
"regions",
"(",
"GrayS32",
"pixelToRegion",
",",
"int",
"numRegions",
",",
"BufferedImage",
"output",
")",
"{",
"return",
"VisualizeBinaryData",
".",
"renderLabeled",
"(",
"pixelToRegion",
",",
"numRegions",
",",
"output",
")",
... | Draws each region with a random color
@param pixelToRegion Conversion from pixel to region
@param numRegions Total number of regions.
@param output Storage for output image. Can be null.
@return Output image. | [
"Draws",
"each",
"region",
"with",
"a",
"random",
"color"
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/feature/VisualizeRegions.java#L85-L87 |
50,097 | lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/describe/brief/FactoryBriefDefinition.java | FactoryBriefDefinition.randomGaussian | private static void randomGaussian( Random rand , double sigma , int radius , Point2D_I32 pt ) {
int x,y;
while( true ) {
x = (int)(rand.nextGaussian()*sigma);
y = (int)(rand.nextGaussian()*sigma);
if( Math.sqrt(x*x + y*y) < radius )
break;
}
pt.set(x,y);
} | java | private static void randomGaussian( Random rand , double sigma , int radius , Point2D_I32 pt ) {
int x,y;
while( true ) {
x = (int)(rand.nextGaussian()*sigma);
y = (int)(rand.nextGaussian()*sigma);
if( Math.sqrt(x*x + y*y) < radius )
break;
}
pt.set(x,y);
} | [
"private",
"static",
"void",
"randomGaussian",
"(",
"Random",
"rand",
",",
"double",
"sigma",
",",
"int",
"radius",
",",
"Point2D_I32",
"pt",
")",
"{",
"int",
"x",
",",
"y",
";",
"while",
"(",
"true",
")",
"{",
"x",
"=",
"(",
"int",
")",
"(",
"rand... | Randomly selects a point which is inside a square region using a Gaussian distribution. | [
"Randomly",
"selects",
"a",
"point",
"which",
"is",
"inside",
"a",
"square",
"region",
"using",
"a",
"Gaussian",
"distribution",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/describe/brief/FactoryBriefDefinition.java#L73-L85 |
50,098 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/factory/transform/pyramid/FactoryPyramid.java | FactoryPyramid.discreteGaussian | public static <T extends ImageBase<T>>
PyramidDiscrete<T> discreteGaussian( int[] scaleFactors , double sigma , int radius ,
boolean saveOriginalReference, ImageType<T> imageType )
{
Class<Kernel1D> kernelType = FactoryKernel.getKernelType(imageType.getDataType(),1);
Kernel1D kernel = FactoryKernelGau... | java | public static <T extends ImageBase<T>>
PyramidDiscrete<T> discreteGaussian( int[] scaleFactors , double sigma , int radius ,
boolean saveOriginalReference, ImageType<T> imageType )
{
Class<Kernel1D> kernelType = FactoryKernel.getKernelType(imageType.getDataType(),1);
Kernel1D kernel = FactoryKernelGau... | [
"public",
"static",
"<",
"T",
"extends",
"ImageBase",
"<",
"T",
">",
">",
"PyramidDiscrete",
"<",
"T",
">",
"discreteGaussian",
"(",
"int",
"[",
"]",
"scaleFactors",
",",
"double",
"sigma",
",",
"int",
"radius",
",",
"boolean",
"saveOriginalReference",
",",
... | Creates an updater for discrete pyramids where a Gaussian is convolved across the input
prior to sub-sampling.
@param imageType Type of input image.
@param sigma Gaussian sigma. If < 0 then a sigma is selected using the radius. Try -1.
@param radius Radius of the Gaussian kernel. If < 0 then the radius is selected ... | [
"Creates",
"an",
"updater",
"for",
"discrete",
"pyramids",
"where",
"a",
"Gaussian",
"is",
"convolved",
"across",
"the",
"input",
"prior",
"to",
"sub",
"-",
"sampling",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/transform/pyramid/FactoryPyramid.java#L52-L61 |
50,099 | lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/factory/transform/pyramid/FactoryPyramid.java | FactoryPyramid.floatGaussian | public static <T extends ImageGray<T>>
PyramidFloat<T> floatGaussian( double scaleFactors[], double []sigmas , Class<T> imageType ) {
InterpolatePixelS<T> interp = FactoryInterpolation.bilinearPixelS(imageType, BorderType.EXTENDED);
return new PyramidFloatGaussianScale<>(interp, scaleFactors, sigmas, imageType);... | java | public static <T extends ImageGray<T>>
PyramidFloat<T> floatGaussian( double scaleFactors[], double []sigmas , Class<T> imageType ) {
InterpolatePixelS<T> interp = FactoryInterpolation.bilinearPixelS(imageType, BorderType.EXTENDED);
return new PyramidFloatGaussianScale<>(interp, scaleFactors, sigmas, imageType);... | [
"public",
"static",
"<",
"T",
"extends",
"ImageGray",
"<",
"T",
">",
">",
"PyramidFloat",
"<",
"T",
">",
"floatGaussian",
"(",
"double",
"scaleFactors",
"[",
"]",
",",
"double",
"[",
"]",
"sigmas",
",",
"Class",
"<",
"T",
">",
"imageType",
")",
"{",
... | Creates a float pyramid where each layer is blurred using a Gaussian with the specified
sigma. Bilinear interpolation is used when sub-sampling.
@param scaleFactors The scale factor of each layer relative to the previous layer.
Layer 0 is relative to the input image.
@param sigmas Gaussian blur magnitude for each lay... | [
"Creates",
"a",
"float",
"pyramid",
"where",
"each",
"layer",
"is",
"blurred",
"using",
"a",
"Gaussian",
"with",
"the",
"specified",
"sigma",
".",
"Bilinear",
"interpolation",
"is",
"used",
"when",
"sub",
"-",
"sampling",
"."
] | f01c0243da0ec086285ee722183804d5923bc3ac | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/transform/pyramid/FactoryPyramid.java#L73-L79 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.