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
49,900
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/factory/interpolate/FactoryInterpolation.java
FactoryInterpolation.createPixelS
public static <T extends ImageGray<T>> InterpolatePixelS<T> createPixelS(double min, double max, InterpolationType type, BorderType borderType, Class<T> imageType) { InterpolatePixelS<T> alg; switch( type ) { case NEAREST_NEIGHBOR: alg = nearestNeighborPixelS(imageType); break; case BILINEAR: ...
java
public static <T extends ImageGray<T>> InterpolatePixelS<T> createPixelS(double min, double max, InterpolationType type, BorderType borderType, Class<T> imageType) { InterpolatePixelS<T> alg; switch( type ) { case NEAREST_NEIGHBOR: alg = nearestNeighborPixelS(imageType); break; case BILINEAR: ...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "InterpolatePixelS", "<", "T", ">", "createPixelS", "(", "double", "min", ",", "double", "max", ",", "InterpolationType", "type", ",", "BorderType", "borderType", ",", "Class", "<", ...
Creates an interpolation class of the specified type for the specified image type. @param min Minimum possible pixel value. Inclusive. @param max Maximum possible pixel value. Inclusive. @param type Interpolation type @param borderType Border type. If null then it will not be set here. @param imageType Type of input...
[ "Creates", "an", "interpolation", "class", "of", "the", "specified", "type", "for", "the", "specified", "image", "type", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/interpolate/FactoryInterpolation.java#L80-L108
49,901
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/factory/interpolate/FactoryInterpolation.java
FactoryInterpolation.createPixelMB
public static <T extends ImageBase<T>> InterpolatePixelMB<T> createPixelMB(double min, double max, InterpolationType type, BorderType borderType, ImageType<T> imageType ) { switch (imageType.getFamily()) { case PLANAR: return (InterpolatePixelMB<T>) createPixelPL((InterpolatePixelS)createPixelS(min, max, ty...
java
public static <T extends ImageBase<T>> InterpolatePixelMB<T> createPixelMB(double min, double max, InterpolationType type, BorderType borderType, ImageType<T> imageType ) { switch (imageType.getFamily()) { case PLANAR: return (InterpolatePixelMB<T>) createPixelPL((InterpolatePixelS)createPixelS(min, max, ty...
[ "public", "static", "<", "T", "extends", "ImageBase", "<", "T", ">", ">", "InterpolatePixelMB", "<", "T", ">", "createPixelMB", "(", "double", "min", ",", "double", "max", ",", "InterpolationType", "type", ",", "BorderType", "borderType", ",", "ImageType", "...
Pixel based interpolation on multi-band image @param min Minimum possible pixel value. Inclusive. @param max Maximum possible pixel value. Inclusive. @param type Interpolation type @param imageType Type of input image
[ "Pixel", "based", "interpolation", "on", "multi", "-", "band", "image" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/interpolate/FactoryInterpolation.java#L118-L146
49,902
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/core/encoding/ConvertYV12.java
ConvertYV12.yu12ToBoof
public static void yu12ToBoof(byte[] data, int width, int height, ImageBase output) { if( output instanceof Planar) { Planar ms = (Planar) output; ms.reshape(width,height,3); if( BoofConcurrency.USE_CONCURRENT ) { if (ms.getBandType() == GrayU8.class) { ...
java
public static void yu12ToBoof(byte[] data, int width, int height, ImageBase output) { if( output instanceof Planar) { Planar ms = (Planar) output; ms.reshape(width,height,3); if( BoofConcurrency.USE_CONCURRENT ) { if (ms.getBandType() == GrayU8.class) { ...
[ "public", "static", "void", "yu12ToBoof", "(", "byte", "[", "]", "data", ",", "int", "width", ",", "int", "height", ",", "ImageBase", "output", ")", "{", "if", "(", "output", "instanceof", "Planar", ")", "{", "Planar", "ms", "=", "(", "Planar", ")", ...
Converts a YU12 encoded byte array into a BoofCV formatted image. @param data (input) YU12 byte array @param width (input) image width @param height (input) image height @param output (output) BoofCV image
[ "Converts", "a", "YU12", "encoded", "byte", "array", "into", "a", "BoofCV", "formatted", "image", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/core/encoding/ConvertYV12.java#L45-L99
49,903
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/core/encoding/ConvertYV12.java
ConvertYV12.yu12ToGray
public static GrayU8 yu12ToGray(byte[] data , int width , int height , GrayU8 output ) { if( output != null ) { if( output.width != width || output.height != height ) throw new IllegalArgumentException("output width and height must be "+width+" "+height); } else { ...
java
public static GrayU8 yu12ToGray(byte[] data , int width , int height , GrayU8 output ) { if( output != null ) { if( output.width != width || output.height != height ) throw new IllegalArgumentException("output width and height must be "+width+" "+height); } else { ...
[ "public", "static", "GrayU8", "yu12ToGray", "(", "byte", "[", "]", "data", ",", "int", "width", ",", "int", "height", ",", "GrayU8", "output", ")", "{", "if", "(", "output", "!=", "null", ")", "{", "if", "(", "output", ".", "width", "!=", "width", ...
Converts an YV12 image into a gray scale U8 image. @param data Input: YV12 image data @param width Input: image width @param height Input: image height @param output Output: Optional storage for output image. Can be null. @return Gray scale image
[ "Converts", "an", "YV12", "image", "into", "a", "gray", "scale", "U8", "image", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/core/encoding/ConvertYV12.java#L110-L125
49,904
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/factory/feature/associate/FactoryAssociation.java
FactoryAssociation.scoreEuclidean
public static <D> ScoreAssociation<D> scoreEuclidean( Class<D> tupleType , boolean squared ) { if( TupleDesc_F64.class.isAssignableFrom(tupleType) ) { if( squared ) return (ScoreAssociation)new ScoreAssociateEuclideanSq_F64(); else return (ScoreAssociation)new ScoreAssociateEuclidean_F64(); } else if...
java
public static <D> ScoreAssociation<D> scoreEuclidean( Class<D> tupleType , boolean squared ) { if( TupleDesc_F64.class.isAssignableFrom(tupleType) ) { if( squared ) return (ScoreAssociation)new ScoreAssociateEuclideanSq_F64(); else return (ScoreAssociation)new ScoreAssociateEuclidean_F64(); } else if...
[ "public", "static", "<", "D", ">", "ScoreAssociation", "<", "D", ">", "scoreEuclidean", "(", "Class", "<", "D", ">", "tupleType", ",", "boolean", "squared", ")", "{", "if", "(", "TupleDesc_F64", ".", "class", ".", "isAssignableFrom", "(", "tupleType", ")",...
Scores features based on the Euclidean distance between them. The square is often used instead of the Euclidean distance since it is much faster to compute. @param tupleType Type of descriptor being scored @param squared IF true the distance squared is returned. Usually true @return Euclidean distance measure
[ "Scores", "features", "based", "on", "the", "Euclidean", "distance", "between", "them", ".", "The", "square", "is", "often", "used", "instead", "of", "the", "Euclidean", "distance", "since", "it", "is", "much", "faster", "to", "compute", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/factory/feature/associate/FactoryAssociation.java#L196-L209
49,905
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/factory/feature/associate/FactoryAssociation.java
FactoryAssociation.scoreHamming
public static <D> ScoreAssociation<D> scoreHamming( Class<D> tupleType ) { if( tupleType == TupleDesc_B.class ) { return (ScoreAssociation)new ScoreAssociateHamming_B(); } throw new IllegalArgumentException("Hamming distance not yet supported for type "+tupleType.getSimpleName()); }
java
public static <D> ScoreAssociation<D> scoreHamming( Class<D> tupleType ) { if( tupleType == TupleDesc_B.class ) { return (ScoreAssociation)new ScoreAssociateHamming_B(); } throw new IllegalArgumentException("Hamming distance not yet supported for type "+tupleType.getSimpleName()); }
[ "public", "static", "<", "D", ">", "ScoreAssociation", "<", "D", ">", "scoreHamming", "(", "Class", "<", "D", ">", "tupleType", ")", "{", "if", "(", "tupleType", "==", "TupleDesc_B", ".", "class", ")", "{", "return", "(", "ScoreAssociation", ")", "new", ...
Hamming distance between two binary descriptors. @param tupleType Type of descriptor being scored @return Hamming distance measure
[ "Hamming", "distance", "between", "two", "binary", "descriptors", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/factory/feature/associate/FactoryAssociation.java#L217-L224
49,906
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/extract/ThresholdCornerExtractor.java
ThresholdCornerExtractor.process
public void process(GrayF32 intensity, QueueCorner corners ) { corners.reset(); float data[] = intensity.data; for( int y = 0; y < intensity.height; y++ ) { int startIndex = intensity.startIndex + y*intensity.stride; int endIndex = startIndex + intensity.width; for( int index = startIndex; index < end...
java
public void process(GrayF32 intensity, QueueCorner corners ) { corners.reset(); float data[] = intensity.data; for( int y = 0; y < intensity.height; y++ ) { int startIndex = intensity.startIndex + y*intensity.stride; int endIndex = startIndex + intensity.width; for( int index = startIndex; index < end...
[ "public", "void", "process", "(", "GrayF32", "intensity", ",", "QueueCorner", "corners", ")", "{", "corners", ".", "reset", "(", ")", ";", "float", "data", "[", "]", "=", "intensity", ".", "data", ";", "for", "(", "int", "y", "=", "0", ";", "y", "<...
Selects pixels as corners which are above the threshold.
[ "Selects", "pixels", "as", "corners", "which", "are", "above", "the", "threshold", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/extract/ThresholdCornerExtractor.java#L44-L60
49,907
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/associate/AssociateSurfBasic.java
AssociateSurfBasic.swapLists
public void swapLists() { FastQueue<Helper> tmp = srcPositive; srcPositive = dstPositive; dstPositive = tmp; tmp = srcNegative; srcNegative = dstNegative; dstNegative = tmp; }
java
public void swapLists() { FastQueue<Helper> tmp = srcPositive; srcPositive = dstPositive; dstPositive = tmp; tmp = srcNegative; srcNegative = dstNegative; dstNegative = tmp; }
[ "public", "void", "swapLists", "(", ")", "{", "FastQueue", "<", "Helper", ">", "tmp", "=", "srcPositive", ";", "srcPositive", "=", "dstPositive", ";", "dstPositive", "=", "tmp", ";", "tmp", "=", "srcNegative", ";", "srcNegative", "=", "dstNegative", ";", "...
Swaps the source and dest feature list. Useful when processing a sequence of images and don't want to resort everything.
[ "Swaps", "the", "source", "and", "dest", "feature", "list", ".", "Useful", "when", "processing", "a", "sequence", "of", "images", "and", "don", "t", "want", "to", "resort", "everything", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/associate/AssociateSurfBasic.java#L70-L78
49,908
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/associate/AssociateSurfBasic.java
AssociateSurfBasic.associate
public void associate() { // initialize data structures matches.reset(); unassociatedSrc.reset(); if( srcPositive.size == 0 && srcNegative.size == 0 ) return; if( dstPositive.size == 0 && dstNegative.size == 0 ) return; // find and add the matches assoc.setSource((FastQueue)srcPositive); assoc....
java
public void associate() { // initialize data structures matches.reset(); unassociatedSrc.reset(); if( srcPositive.size == 0 && srcNegative.size == 0 ) return; if( dstPositive.size == 0 && dstNegative.size == 0 ) return; // find and add the matches assoc.setSource((FastQueue)srcPositive); assoc....
[ "public", "void", "associate", "(", ")", "{", "// initialize data structures", "matches", ".", "reset", "(", ")", ";", "unassociatedSrc", ".", "reset", "(", ")", ";", "if", "(", "srcPositive", ".", "size", "==", "0", "&&", "srcNegative", ".", "size", "==",...
Associates the features together.
[ "Associates", "the", "features", "together", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/associate/AssociateSurfBasic.java#L83-L123
49,909
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/associate/AssociateSurfBasic.java
AssociateSurfBasic.sort
private void sort(FastQueue<BrightFeature> input , FastQueue<Helper> pos , FastQueue<Helper> neg ) { pos.reset(); neg.reset(); for( int i = 0; i < input.size; i++ ) { BrightFeature f = input.get(i); if( f.white) { pos.grow().wrap(f,i); } else { neg.grow().wrap(f,i); } } }
java
private void sort(FastQueue<BrightFeature> input , FastQueue<Helper> pos , FastQueue<Helper> neg ) { pos.reset(); neg.reset(); for( int i = 0; i < input.size; i++ ) { BrightFeature f = input.get(i); if( f.white) { pos.grow().wrap(f,i); } else { neg.grow().wrap(f,i); } } }
[ "private", "void", "sort", "(", "FastQueue", "<", "BrightFeature", ">", "input", ",", "FastQueue", "<", "Helper", ">", "pos", ",", "FastQueue", "<", "Helper", ">", "neg", ")", "{", "pos", ".", "reset", "(", ")", ";", "neg", ".", "reset", "(", ")", ...
Splits the set of input features into positive and negative laplacian lists. Keep track of the feature's index in the original input list. This is the index that needs to be returned.
[ "Splits", "the", "set", "of", "input", "features", "into", "positive", "and", "negative", "laplacian", "lists", ".", "Keep", "track", "of", "the", "feature", "s", "index", "in", "the", "original", "input", "list", ".", "This", "is", "the", "index", "that",...
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/associate/AssociateSurfBasic.java#L137-L150
49,910
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/factory/filter/derivative/FactoryDerivative.java
FactoryDerivative.gradientReduce
public static <I extends ImageMultiBand<I>, M extends ImageMultiBand<M>, D extends ImageGray<D>> ImageGradient<I,D> gradientReduce( ImageGradient<I,M> gradient , DerivativeReduceType type, Class<D> outputType ) { String name; switch( type ) { case MAX_F: name = "maxf"; break; defau...
java
public static <I extends ImageMultiBand<I>, M extends ImageMultiBand<M>, D extends ImageGray<D>> ImageGradient<I,D> gradientReduce( ImageGradient<I,M> gradient , DerivativeReduceType type, Class<D> outputType ) { String name; switch( type ) { case MAX_F: name = "maxf"; break; defau...
[ "public", "static", "<", "I", "extends", "ImageMultiBand", "<", "I", ">", ",", "M", "extends", "ImageMultiBand", "<", "M", ">", ",", "D", "extends", "ImageGray", "<", "D", ">", ">", "ImageGradient", "<", "I", ",", "D", ">", "gradientReduce", "(", "Imag...
Computes the image gradient inside a multi-band image then reduces the output to a single band before returning the results @param gradient Computes the multi-band image gradient @param type Specifies which method is to be used to reduce the output into single band image @param outputType Type of output image @param <...
[ "Computes", "the", "image", "gradient", "inside", "a", "multi", "-", "band", "image", "then", "reduces", "the", "output", "to", "a", "single", "band", "before", "returning", "the", "results" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/filter/derivative/FactoryDerivative.java#L52-L85
49,911
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/factory/filter/derivative/FactoryDerivative.java
FactoryDerivative.gradientSB
public static <I extends ImageGray<I>, D extends ImageGray<D>> ImageGradient<I,D> gradientSB( DerivativeType type , Class<I> inputType , Class<D> derivType ) { if( derivType == null ) derivType = GImageDerivativeOps.getDerivativeType(inputType); Class which; switch( type ) { case PREWITT: which = Gr...
java
public static <I extends ImageGray<I>, D extends ImageGray<D>> ImageGradient<I,D> gradientSB( DerivativeType type , Class<I> inputType , Class<D> derivType ) { if( derivType == null ) derivType = GImageDerivativeOps.getDerivativeType(inputType); Class which; switch( type ) { case PREWITT: which = Gr...
[ "public", "static", "<", "I", "extends", "ImageGray", "<", "I", ">", ",", "D", "extends", "ImageGray", "<", "D", ">", ">", "ImageGradient", "<", "I", ",", "D", ">", "gradientSB", "(", "DerivativeType", "type", ",", "Class", "<", "I", ">", "inputType", ...
Returns the gradient for single band images of the specified type @param type Type of gradient @param inputType Type of input image @param derivType Type of gradient image. null for default @param <I> Input image @param <D> Derivative image @return gradient filter
[ "Returns", "the", "gradient", "for", "single", "band", "images", "of", "the", "specified", "type" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/filter/derivative/FactoryDerivative.java#L96-L131
49,912
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/DetectFiducialSquareImage.java
DetectFiducialSquareImage.addPattern
public int addPattern(GrayU8 inputBinary, double lengthSide) { if( inputBinary == null ) { throw new IllegalArgumentException("Input image is null."); } else if( lengthSide <= 0 ) { throw new IllegalArgumentException("Parameter lengthSide must be more than zero"); } else if(ImageStatistics.max(inputBinary) ...
java
public int addPattern(GrayU8 inputBinary, double lengthSide) { if( inputBinary == null ) { throw new IllegalArgumentException("Input image is null."); } else if( lengthSide <= 0 ) { throw new IllegalArgumentException("Parameter lengthSide must be more than zero"); } else if(ImageStatistics.max(inputBinary) ...
[ "public", "int", "addPattern", "(", "GrayU8", "inputBinary", ",", "double", "lengthSide", ")", "{", "if", "(", "inputBinary", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Input image is null.\"", ")", ";", "}", "else", "if", "(",...
Adds a new image to the detector. Image must be gray-scale and is converted into a binary image using the specified threshold. All input images are rescaled to be square and of the appropriate size. Thus the original shape of the image doesn't matter. Square shapes are highly recommended since that's what the targe...
[ "Adds", "a", "new", "image", "to", "the", "detector", ".", "Image", "must", "be", "gray", "-", "scale", "and", "is", "converted", "into", "a", "binary", "image", "using", "the", "specified", "threshold", ".", "All", "input", "images", "are", "rescaled", ...
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/DetectFiducialSquareImage.java#L114-L158
49,913
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/DetectFiducialSquareImage.java
DetectFiducialSquareImage.binaryToDef
protected static void binaryToDef(GrayU8 binary , short[] desc ) { for (int i = 0; i < binary.data.length; i+=16) { int value = 0; for (int j = 0; j < 16; j++) { value |= binary.data[i+j] << j; } desc[i/16] = (short)value; } }
java
protected static void binaryToDef(GrayU8 binary , short[] desc ) { for (int i = 0; i < binary.data.length; i+=16) { int value = 0; for (int j = 0; j < 16; j++) { value |= binary.data[i+j] << j; } desc[i/16] = (short)value; } }
[ "protected", "static", "void", "binaryToDef", "(", "GrayU8", "binary", ",", "short", "[", "]", "desc", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "binary", ".", "data", ".", "length", ";", "i", "+=", "16", ")", "{", "int", "value"...
Converts a binary image into the compressed bit format
[ "Converts", "a", "binary", "image", "into", "the", "compressed", "bit", "format" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/DetectFiducialSquareImage.java#L163-L171
49,914
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/DetectFiducialSquareImage.java
DetectFiducialSquareImage.hamming
protected int hamming(short[] a, short[] b) { int distance = 0; for (int i = 0; i < a.length; i++) { distance += DescriptorDistance.hamming((a[i]&0xFFFF) ^ (b[i]&0xFFFF)); } return distance; }
java
protected int hamming(short[] a, short[] b) { int distance = 0; for (int i = 0; i < a.length; i++) { distance += DescriptorDistance.hamming((a[i]&0xFFFF) ^ (b[i]&0xFFFF)); } return distance; }
[ "protected", "int", "hamming", "(", "short", "[", "]", "a", ",", "short", "[", "]", "b", ")", "{", "int", "distance", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "a", ".", "length", ";", "i", "++", ")", "{", "distance", ...
Computes the hamming score between two descriptions. Larger the number better the fit
[ "Computes", "the", "hamming", "score", "between", "two", "descriptions", ".", "Larger", "the", "number", "better", "the", "fit" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/DetectFiducialSquareImage.java#L211-L217
49,915
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/descriptor/UtilFeature.java
UtilFeature.combine
public static TupleDesc_F64 combine( List<TupleDesc_F64> inputs , TupleDesc_F64 combined ) { int N = 0; for (int i = 0; i < inputs.size(); i++) { N += inputs.get(i).size(); } if( combined == null ) { combined = new TupleDesc_F64(N); } else { if (N != combined.size()) throw new RuntimeException("T...
java
public static TupleDesc_F64 combine( List<TupleDesc_F64> inputs , TupleDesc_F64 combined ) { int N = 0; for (int i = 0; i < inputs.size(); i++) { N += inputs.get(i).size(); } if( combined == null ) { combined = new TupleDesc_F64(N); } else { if (N != combined.size()) throw new RuntimeException("T...
[ "public", "static", "TupleDesc_F64", "combine", "(", "List", "<", "TupleDesc_F64", ">", "inputs", ",", "TupleDesc_F64", "combined", ")", "{", "int", "N", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "inputs", ".", "size", "(", ")",...
Concats the list of tuples together into one big feature. The combined feature must be large enough to store all the inputs. @param inputs List of tuples. @param combined Storage for combined output. If null a new instance will be declared. @return Resulting combined.
[ "Concats", "the", "list", "of", "tuples", "together", "into", "one", "big", "feature", ".", "The", "combined", "feature", "must", "be", "large", "enough", "to", "store", "all", "the", "inputs", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/descriptor/UtilFeature.java#L67-L87
49,916
lessthanoptimal/BoofCV
integration/boofcv-android/src/main/java/boofcv/android/camera/VideoDisplayActivity.java
VideoDisplayActivity.setProcessing
public void setProcessing( VideoProcessing processing ) { if( this.processing != null ) { // kill the old process this.processing.stopProcessing(); } if (Looper.getMainLooper().getThread() != Thread.currentThread()) { throw new RuntimeException("Not called from a GUI thread. Bad stuff could happen"); ...
java
public void setProcessing( VideoProcessing processing ) { if( this.processing != null ) { // kill the old process this.processing.stopProcessing(); } if (Looper.getMainLooper().getThread() != Thread.currentThread()) { throw new RuntimeException("Not called from a GUI thread. Bad stuff could happen"); ...
[ "public", "void", "setProcessing", "(", "VideoProcessing", "processing", ")", "{", "if", "(", "this", ".", "processing", "!=", "null", ")", "{", "// kill the old process", "this", ".", "processing", ".", "stopProcessing", "(", ")", ";", "}", "if", "(", "Loop...
Changes the CV algorithm running. Should only be called from a GUI thread.
[ "Changes", "the", "CV", "algorithm", "running", ".", "Should", "only", "be", "called", "from", "a", "GUI", "thread", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/camera/VideoDisplayActivity.java#L88-L103
49,917
lessthanoptimal/BoofCV
integration/boofcv-android/src/main/java/boofcv/android/camera/VideoDisplayActivity.java
VideoDisplayActivity.setUpAndConfigureCamera
private void setUpAndConfigureCamera() { // Open and configure the camera mCamera = openConfigureCamera(mCameraInfo); setCameraDisplayOrientation(mCameraInfo,mCamera); // Create an instance of Camera mPreview.setCamera(mCamera); if( processing != null ) { processing.init(mDraw,mCamera,mCameraInfo,previ...
java
private void setUpAndConfigureCamera() { // Open and configure the camera mCamera = openConfigureCamera(mCameraInfo); setCameraDisplayOrientation(mCameraInfo,mCamera); // Create an instance of Camera mPreview.setCamera(mCamera); if( processing != null ) { processing.init(mDraw,mCamera,mCameraInfo,previ...
[ "private", "void", "setUpAndConfigureCamera", "(", ")", "{", "// Open and configure the camera", "mCamera", "=", "openConfigureCamera", "(", "mCameraInfo", ")", ";", "setCameraDisplayOrientation", "(", "mCameraInfo", ",", "mCamera", ")", ";", "// Create an instance of Camer...
Sets up the camera if it is not already setup.
[ "Sets", "up", "the", "camera", "if", "it", "is", "not", "already", "setup", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/camera/VideoDisplayActivity.java#L179-L190
49,918
lessthanoptimal/BoofCV
integration/boofcv-android/src/main/java/boofcv/android/camera/VideoDisplayActivity.java
VideoDisplayActivity.setProgressMessage
protected void setProgressMessage(final String message) { runOnUiThread(new Runnable() { public void run() { synchronized ( lockProgress ) { if( progressDialog != null ) { // a dialog is already open, change the message progressDialog.setMessage(message); return; } progressDial...
java
protected void setProgressMessage(final String message) { runOnUiThread(new Runnable() { public void run() { synchronized ( lockProgress ) { if( progressDialog != null ) { // a dialog is already open, change the message progressDialog.setMessage(message); return; } progressDial...
[ "protected", "void", "setProgressMessage", "(", "final", "String", "message", ")", "{", "runOnUiThread", "(", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "synchronized", "(", "lockProgress", ")", "{", "if", "(", "progressDialog"...
Displays an indeterminate progress dialog. If the dialog is already open this will change the message being displayed. Function blocks until the dialog has been declared. @param message Text shown in dialog
[ "Displays", "an", "indeterminate", "progress", "dialog", ".", "If", "the", "dialog", "is", "already", "open", "this", "will", "change", "the", "message", "being", "displayed", ".", "Function", "blocks", "until", "the", "dialog", "has", "been", "declared", "." ...
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/camera/VideoDisplayActivity.java#L294-L325
49,919
lessthanoptimal/BoofCV
integration/boofcv-android/src/main/java/boofcv/android/camera/VideoDisplayActivity.java
VideoDisplayActivity.hideProgressDialog
protected void hideProgressDialog() { // do nothing if the dialog is already being displayed synchronized ( lockProgress ) { if( progressDialog == null ) return; } if (Looper.getMainLooper().getThread() == Thread.currentThread()) { // if inside the UI thread just dismiss the dialog and avoid a potent...
java
protected void hideProgressDialog() { // do nothing if the dialog is already being displayed synchronized ( lockProgress ) { if( progressDialog == null ) return; } if (Looper.getMainLooper().getThread() == Thread.currentThread()) { // if inside the UI thread just dismiss the dialog and avoid a potent...
[ "protected", "void", "hideProgressDialog", "(", ")", "{", "// do nothing if the dialog is already being displayed", "synchronized", "(", "lockProgress", ")", "{", "if", "(", "progressDialog", "==", "null", ")", "return", ";", "}", "if", "(", "Looper", ".", "getMainL...
Dismisses the progress dialog. Can be called even if there is no progressDialog being shown.
[ "Dismisses", "the", "progress", "dialog", ".", "Can", "be", "called", "even", "if", "there", "is", "no", "progressDialog", "being", "shown", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/camera/VideoDisplayActivity.java#L330-L357
49,920
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/struct/calib/CameraUniversalOmni.java
CameraUniversalOmni.set
public void set( CameraUniversalOmni original ) { super.set(original); this.mirrorOffset = original.mirrorOffset; if( radial.length != original.radial.length ) radial = new double[ original.radial.length ]; System.arraycopy(original.radial,0,radial,0,radial.length); this.t1 = original.t1; this.t2 = or...
java
public void set( CameraUniversalOmni original ) { super.set(original); this.mirrorOffset = original.mirrorOffset; if( radial.length != original.radial.length ) radial = new double[ original.radial.length ]; System.arraycopy(original.radial,0,radial,0,radial.length); this.t1 = original.t1; this.t2 = or...
[ "public", "void", "set", "(", "CameraUniversalOmni", "original", ")", "{", "super", ".", "set", "(", "original", ")", ";", "this", ".", "mirrorOffset", "=", "original", ".", "mirrorOffset", ";", "if", "(", "radial", ".", "length", "!=", "original", ".", ...
Assigns this model to be identical to the passed in model @param original Model which is to be copied
[ "Assigns", "this", "model", "to", "be", "identical", "to", "the", "passed", "in", "model" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/struct/calib/CameraUniversalOmni.java#L110-L121
49,921
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunck.java
HornSchunck.process
public void process( T image1 , T image2 , ImageFlow output) { InputSanityCheck.checkSameShape(image1,image2); derivX.reshape(image1.width,image1.height); derivY.reshape(image1.width,image1.height); derivT.reshape(image1.width,image1.height); averageFlow.reshape(output.width,output.height); if( resetOut...
java
public void process( T image1 , T image2 , ImageFlow output) { InputSanityCheck.checkSameShape(image1,image2); derivX.reshape(image1.width,image1.height); derivY.reshape(image1.width,image1.height); derivT.reshape(image1.width,image1.height); averageFlow.reshape(output.width,output.height); if( resetOut...
[ "public", "void", "process", "(", "T", "image1", ",", "T", "image2", ",", "ImageFlow", "output", ")", "{", "InputSanityCheck", ".", "checkSameShape", "(", "image1", ",", "image2", ")", ";", "derivX", ".", "reshape", "(", "image1", ".", "width", ",", "ima...
Computes dense optical flow from the first image's gradient and the difference between the second and the first image. @param image1 First image @param image2 Second image @param output Found dense optical flow
[ "Computes", "dense", "optical", "flow", "from", "the", "first", "image", "s", "gradient", "and", "the", "difference", "between", "the", "second", "and", "the", "first", "image", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunck.java#L92-L110
49,922
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunck.java
HornSchunck.innerAverageFlow
protected static void innerAverageFlow( ImageFlow flow , ImageFlow averageFlow ) { int endX = flow.width-1; int endY = flow.height-1; for( int y = 1; y < endY; y++ ) { int index = flow.width*y + 1; for( int x = 1; x < endX; x++ , index++) { ImageFlow.D average = averageFlow.data[index]; ImageFlow...
java
protected static void innerAverageFlow( ImageFlow flow , ImageFlow averageFlow ) { int endX = flow.width-1; int endY = flow.height-1; for( int y = 1; y < endY; y++ ) { int index = flow.width*y + 1; for( int x = 1; x < endX; x++ , index++) { ImageFlow.D average = averageFlow.data[index]; ImageFlow...
[ "protected", "static", "void", "innerAverageFlow", "(", "ImageFlow", "flow", ",", "ImageFlow", "averageFlow", ")", "{", "int", "endX", "=", "flow", ".", "width", "-", "1", ";", "int", "endY", "=", "flow", ".", "height", "-", "1", ";", "for", "(", "int"...
Computes average flow using an 8-connect neighborhood for the inner image
[ "Computes", "average", "flow", "using", "an", "8", "-", "connect", "neighborhood", "for", "the", "inner", "image" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunck.java#L125-L149
49,923
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunck.java
HornSchunck.borderAverageFlow
protected static void borderAverageFlow( ImageFlow flow , ImageFlow averageFlow) { for( int y = 0; y < flow.height; y++ ) { computeBorder(flow,averageFlow, 0, y); computeBorder(flow,averageFlow, flow.width-1, y); } for( int x = 1; x < flow.width-1; x++ ) { computeBorder(flow,averageFlow, x, 0); comp...
java
protected static void borderAverageFlow( ImageFlow flow , ImageFlow averageFlow) { for( int y = 0; y < flow.height; y++ ) { computeBorder(flow,averageFlow, 0, y); computeBorder(flow,averageFlow, flow.width-1, y); } for( int x = 1; x < flow.width-1; x++ ) { computeBorder(flow,averageFlow, x, 0); comp...
[ "protected", "static", "void", "borderAverageFlow", "(", "ImageFlow", "flow", ",", "ImageFlow", "averageFlow", ")", "{", "for", "(", "int", "y", "=", "0", ";", "y", "<", "flow", ".", "height", ";", "y", "++", ")", "{", "computeBorder", "(", "flow", ","...
Computes average flow using an 8-connect neighborhood for the image border
[ "Computes", "average", "flow", "using", "an", "8", "-", "connect", "neighborhood", "for", "the", "image", "border" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunck.java#L154-L165
49,924
lessthanoptimal/BoofCV
main/boofcv-simulation/src/main/java/boofcv/simulation/SimulatePlanarWorld.java
SimulatePlanarWorld.computeProjectionTable
void computeProjectionTable( int width , int height ) { output.reshape(width,height); depthMap.reshape(width,height); ImageMiscOps.fill(depthMap,-1); pointing = new float[width*height*3]; for (int y = 0; y < output.height; y++) { for (int x = 0; x < output.width; x++) { // Should this add 0.5 so tha...
java
void computeProjectionTable( int width , int height ) { output.reshape(width,height); depthMap.reshape(width,height); ImageMiscOps.fill(depthMap,-1); pointing = new float[width*height*3]; for (int y = 0; y < output.height; y++) { for (int x = 0; x < output.width; x++) { // Should this add 0.5 so tha...
[ "void", "computeProjectionTable", "(", "int", "width", ",", "int", "height", ")", "{", "output", ".", "reshape", "(", "width", ",", "height", ")", ";", "depthMap", ".", "reshape", "(", "width", ",", "height", ")", ";", "ImageMiscOps", ".", "fill", "(", ...
Computes 3D pointing vector for every pixel in the simulated camera frame @param width width of simulated camera @param height height of simulated camera
[ "Computes", "3D", "pointing", "vector", "for", "every", "pixel", "in", "the", "simulated", "camera", "frame" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-simulation/src/main/java/boofcv/simulation/SimulatePlanarWorld.java#L120-L142
49,925
lessthanoptimal/BoofCV
main/boofcv-simulation/src/main/java/boofcv/simulation/SimulatePlanarWorld.java
SimulatePlanarWorld.render
public GrayF32 render() { ImageMiscOps.fill(output,background); ImageMiscOps.fill(depthMap,Float.MAX_VALUE); for (int i = 0; i < scene.size(); i++) { SurfaceRect r = scene.get(i); r.rectInCamera(); } if( BoofConcurrency.USE_CONCURRENT ) { renderMultiThread(); } else { renderSingleThread(); ...
java
public GrayF32 render() { ImageMiscOps.fill(output,background); ImageMiscOps.fill(depthMap,Float.MAX_VALUE); for (int i = 0; i < scene.size(); i++) { SurfaceRect r = scene.get(i); r.rectInCamera(); } if( BoofConcurrency.USE_CONCURRENT ) { renderMultiThread(); } else { renderSingleThread(); ...
[ "public", "GrayF32", "render", "(", ")", "{", "ImageMiscOps", ".", "fill", "(", "output", ",", "background", ")", ";", "ImageMiscOps", ".", "fill", "(", "depthMap", ",", "Float", ".", "MAX_VALUE", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i",...
Render the scene and returns the rendered image. @see #getOutput() @return rendered image
[ "Render", "the", "scene", "and", "returns", "the", "rendered", "image", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-simulation/src/main/java/boofcv/simulation/SimulatePlanarWorld.java#L177-L194
49,926
lessthanoptimal/BoofCV
main/boofcv-simulation/src/main/java/boofcv/simulation/SimulatePlanarWorld.java
SimulatePlanarWorld.computePixel
public void computePixel(int which, double x, double y, Point2D_F64 output) { SurfaceRect r = scene.get(which); Point3D_F64 p3 = new Point3D_F64(-x,-y,0); SePointOps_F64.transform(r.rectToCamera, p3, p3); // unit sphere p3.scale(1.0/p3.norm()); sphereToPixel.compute(p3.x,p3.y,p3.z,output); }
java
public void computePixel(int which, double x, double y, Point2D_F64 output) { SurfaceRect r = scene.get(which); Point3D_F64 p3 = new Point3D_F64(-x,-y,0); SePointOps_F64.transform(r.rectToCamera, p3, p3); // unit sphere p3.scale(1.0/p3.norm()); sphereToPixel.compute(p3.x,p3.y,p3.z,output); }
[ "public", "void", "computePixel", "(", "int", "which", ",", "double", "x", ",", "double", "y", ",", "Point2D_F64", "output", ")", "{", "SurfaceRect", "r", "=", "scene", ".", "get", "(", "which", ")", ";", "Point3D_F64", "p3", "=", "new", "Point3D_F64", ...
Project a point which lies on the 2D planar polygon's surface onto the rendered image
[ "Project", "a", "point", "which", "lies", "on", "the", "2D", "planar", "polygon", "s", "surface", "onto", "the", "rendered", "image" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-simulation/src/main/java/boofcv/simulation/SimulatePlanarWorld.java#L307-L317
49,927
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/alg/sfm/DepthSparse3D.java
DepthSparse3D.configure
public void configure(LensDistortionNarrowFOV model , PixelTransform<Point2D_F32> visualToDepth ) { this.visualToDepth = visualToDepth; this.p2n = model.undistort_F64(true,false); }
java
public void configure(LensDistortionNarrowFOV model , PixelTransform<Point2D_F32> visualToDepth ) { this.visualToDepth = visualToDepth; this.p2n = model.undistort_F64(true,false); }
[ "public", "void", "configure", "(", "LensDistortionNarrowFOV", "model", ",", "PixelTransform", "<", "Point2D_F32", ">", "visualToDepth", ")", "{", "this", ".", "visualToDepth", "=", "visualToDepth", ";", "this", ".", "p2n", "=", "model", ".", "undistort_F64", "(...
Configures intrinsic camera parameters @param model Model for narrow FOV cameras @param visualToDepth Transform from visual to depth camera pixel coordinate systems.
[ "Configures", "intrinsic", "camera", "parameters" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/DepthSparse3D.java#L79-L82
49,928
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/alg/sfm/DepthSparse3D.java
DepthSparse3D.process
public boolean process( int x , int y ) { visualToDepth.compute(x, y,distorted); int depthX = (int)distorted.x; int depthY = (int)distorted.y; if( depthImage.isInBounds(depthX,depthY) ) { // get the depth at the specified location double value = lookupDepth(depthX, depthY); // see if its an invalid ...
java
public boolean process( int x , int y ) { visualToDepth.compute(x, y,distorted); int depthX = (int)distorted.x; int depthY = (int)distorted.y; if( depthImage.isInBounds(depthX,depthY) ) { // get the depth at the specified location double value = lookupDepth(depthX, depthY); // see if its an invalid ...
[ "public", "boolean", "process", "(", "int", "x", ",", "int", "y", ")", "{", "visualToDepth", ".", "compute", "(", "x", ",", "y", ",", "distorted", ")", ";", "int", "depthX", "=", "(", "int", ")", "distorted", ".", "x", ";", "int", "depthY", "=", ...
Given a pixel coordinate in the visual camera, compute the 3D coordinate of that point. @param x x-coordinate of point in visual camera @param y y-coordinate of point in visual camera @return true if a 3D point could be computed and false if not
[ "Given", "a", "pixel", "coordinate", "in", "the", "visual", "camera", "compute", "the", "3D", "coordinate", "of", "that", "point", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/DepthSparse3D.java#L101-L127
49,929
lessthanoptimal/BoofCV
applications/src/main/java/boofcv/app/calib/AssistedCalibration.java
AssistedCalibration.captureFiducialPoints
private void captureFiducialPoints() { Polygon2D_F64 p = regions.grow(); p.vertexes.resize(sidesCollision.size()); for (int i = 0; i < sidesCollision.size(); i++) { p.get(i).set( sidesCollision.get(i) ); } quality.addObservations(detector.getDetectedPoints()); gui.getInfoPanel().updateGeometry(quality.ge...
java
private void captureFiducialPoints() { Polygon2D_F64 p = regions.grow(); p.vertexes.resize(sidesCollision.size()); for (int i = 0; i < sidesCollision.size(); i++) { p.get(i).set( sidesCollision.get(i) ); } quality.addObservations(detector.getDetectedPoints()); gui.getInfoPanel().updateGeometry(quality.ge...
[ "private", "void", "captureFiducialPoints", "(", ")", "{", "Polygon2D_F64", "p", "=", "regions", ".", "grow", "(", ")", ";", "p", ".", "vertexes", ".", "resize", "(", "sidesCollision", ".", "size", "(", ")", ")", ";", "for", "(", "int", "i", "=", "0"...
Record the area covered in the image by the fiducial, update the quality calculation, and see if it should enable the save button.
[ "Record", "the", "area", "covered", "in", "the", "image", "by", "the", "fiducial", "update", "the", "quality", "calculation", "and", "see", "if", "it", "should", "enable", "the", "save", "button", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/applications/src/main/java/boofcv/app/calib/AssistedCalibration.java#L477-L491
49,930
lessthanoptimal/BoofCV
applications/src/main/java/boofcv/app/calib/AssistedCalibration.java
AssistedCalibration.checkMagnetCapturePicture
private boolean checkMagnetCapturePicture() { boolean captured = false; Iterator<Magnet> iter = magnets.iterator(); while( iter.hasNext() ) { Magnet i = iter.next(); if( i.handlePictureTaken() ) { iter.remove(); captured = true; } } return captured; }
java
private boolean checkMagnetCapturePicture() { boolean captured = false; Iterator<Magnet> iter = magnets.iterator(); while( iter.hasNext() ) { Magnet i = iter.next(); if( i.handlePictureTaken() ) { iter.remove(); captured = true; } } return captured; }
[ "private", "boolean", "checkMagnetCapturePicture", "(", ")", "{", "boolean", "captured", "=", "false", ";", "Iterator", "<", "Magnet", ">", "iter", "=", "magnets", ".", "iterator", "(", ")", ";", "while", "(", "iter", ".", "hasNext", "(", ")", ")", "{", ...
Checks to see if its near one of the magnets in the image broder
[ "Checks", "to", "see", "if", "its", "near", "one", "of", "the", "magnets", "in", "the", "image", "broder" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/applications/src/main/java/boofcv/app/calib/AssistedCalibration.java#L496-L507
49,931
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/RefinePolyLineCorner.java
RefinePolyLineCorner.fit
public boolean fit( List<Point2D_I32> contour , GrowQueue_I32 corners ) { if( corners.size() < 3 ) { return false; } searchRadius = Math.min(6,Math.max(contour.size()/12,3)); int startCorner,endCorner; if( looping ) { startCorner = 0; endCorner = corners.size; } else { // the end point positio...
java
public boolean fit( List<Point2D_I32> contour , GrowQueue_I32 corners ) { if( corners.size() < 3 ) { return false; } searchRadius = Math.min(6,Math.max(contour.size()/12,3)); int startCorner,endCorner; if( looping ) { startCorner = 0; endCorner = corners.size; } else { // the end point positio...
[ "public", "boolean", "fit", "(", "List", "<", "Point2D_I32", ">", "contour", ",", "GrowQueue_I32", "corners", ")", "{", "if", "(", "corners", ".", "size", "(", ")", "<", "3", ")", "{", "return", "false", ";", "}", "searchRadius", "=", "Math", ".", "m...
Fits a polygon to the contour given an initial set of candidate corners. If not looping the corners must include the end points still. Minimum of 3 points required. Otherwise there's no corner!. @param contour Contours around the shape @param corners (Input) initial set of corners. (output) refined set of corners
[ "Fits", "a", "polygon", "to", "the", "contour", "given", "an", "initial", "set", "of", "candidate", "corners", ".", "If", "not", "looping", "the", "corners", "must", "include", "the", "end", "points", "still", ".", "Minimum", "of", "3", "points", "required...
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/RefinePolyLineCorner.java#L92-L125
49,932
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/RefinePolyLineCorner.java
RefinePolyLineCorner.optimize
protected int optimize( List<Point2D_I32> contour , int c0,int c1,int c2 ) { double bestDistance = computeCost(contour,c0,c1,c2,0); int bestIndex = 0; for( int i = -searchRadius; i <= searchRadius; i++ ) { if( i == 0 ) { // if it found a better point in the first half stop the search since that's probably...
java
protected int optimize( List<Point2D_I32> contour , int c0,int c1,int c2 ) { double bestDistance = computeCost(contour,c0,c1,c2,0); int bestIndex = 0; for( int i = -searchRadius; i <= searchRadius; i++ ) { if( i == 0 ) { // if it found a better point in the first half stop the search since that's probably...
[ "protected", "int", "optimize", "(", "List", "<", "Point2D_I32", ">", "contour", ",", "int", "c0", ",", "int", "c1", ",", "int", "c2", ")", "{", "double", "bestDistance", "=", "computeCost", "(", "contour", ",", "c0", ",", "c1", ",", "c2", ",", "0", ...
Searches around the current c1 point for the best place to put the corner @return location of best corner in local search region
[ "Searches", "around", "the", "current", "c1", "point", "for", "the", "best", "place", "to", "put", "the", "corner" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/RefinePolyLineCorner.java#L133-L152
49,933
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/RefinePolyLineCorner.java
RefinePolyLineCorner.computeCost
protected double computeCost(List<Point2D_I32> contour, int c0, int c1, int c2, int offset) { c1 = CircularIndex.addOffset(c1, offset, contour.size()); createLine(c0,c1,contour,line0); createLine(c1,c2,contour,line1); return distanceSum(line0,c0,c1,contour)+distanceSum(line1,c1,c2,contour); }
java
protected double computeCost(List<Point2D_I32> contour, int c0, int c1, int c2, int offset) { c1 = CircularIndex.addOffset(c1, offset, contour.size()); createLine(c0,c1,contour,line0); createLine(c1,c2,contour,line1); return distanceSum(line0,c0,c1,contour)+distanceSum(line1,c1,c2,contour); }
[ "protected", "double", "computeCost", "(", "List", "<", "Point2D_I32", ">", "contour", ",", "int", "c0", ",", "int", "c1", ",", "int", "c2", ",", "int", "offset", ")", "{", "c1", "=", "CircularIndex", ".", "addOffset", "(", "c1", ",", "offset", ",", ...
Computes the distance between the two lines defined by corner points in the contour @param contour list of contour points @param c0 end point of line 0 @param c1 start of line 0 and 1 @param c2 end point of line 1 @param offset added to c1 to make start of lines @return sum of distance of points along contour
[ "Computes", "the", "distance", "between", "the", "two", "lines", "defined", "by", "corner", "points", "in", "the", "contour" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/RefinePolyLineCorner.java#L163-L170
49,934
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/RefinePolyLineCorner.java
RefinePolyLineCorner.distanceSum
protected double distanceSum( LineGeneral2D_F64 line , int c0 , int c1 , List<Point2D_I32> contour ) { double total = 0; if( c0 < c1 ) { int length = c1-c0+1; int samples = Math.min(maxLineSamples,length); for (int i = 0; i < samples; i++) { int index = c0 + i*(length-1)/(samples-1); total += dis...
java
protected double distanceSum( LineGeneral2D_F64 line , int c0 , int c1 , List<Point2D_I32> contour ) { double total = 0; if( c0 < c1 ) { int length = c1-c0+1; int samples = Math.min(maxLineSamples,length); for (int i = 0; i < samples; i++) { int index = c0 + i*(length-1)/(samples-1); total += dis...
[ "protected", "double", "distanceSum", "(", "LineGeneral2D_F64", "line", ",", "int", "c0", ",", "int", "c1", ",", "List", "<", "Point2D_I32", ">", "contour", ")", "{", "double", "total", "=", "0", ";", "if", "(", "c0", "<", "c1", ")", "{", "int", "len...
Sum of Euclidean distance of contour points along the line
[ "Sum", "of", "Euclidean", "distance", "of", "contour", "points", "along", "the", "line" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/RefinePolyLineCorner.java#L175-L205
49,935
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/RefinePolyLineCorner.java
RefinePolyLineCorner.createLine
private void createLine( int index0 , int index1 , List<Point2D_I32> contour , LineGeneral2D_F64 line ) { if( index1 < 0 ) System.out.println("SHIT"); Point2D_I32 p0 = contour.get(index0); Point2D_I32 p1 = contour.get(index1); // System.out.println("createLine "+p0+" "+p1); work.a.set(p0.x, p0.y); work...
java
private void createLine( int index0 , int index1 , List<Point2D_I32> contour , LineGeneral2D_F64 line ) { if( index1 < 0 ) System.out.println("SHIT"); Point2D_I32 p0 = contour.get(index0); Point2D_I32 p1 = contour.get(index1); // System.out.println("createLine "+p0+" "+p1); work.a.set(p0.x, p0.y); work...
[ "private", "void", "createLine", "(", "int", "index0", ",", "int", "index1", ",", "List", "<", "Point2D_I32", ">", "contour", ",", "LineGeneral2D_F64", "line", ")", "{", "if", "(", "index1", "<", "0", ")", "System", ".", "out", ".", "println", "(", "\"...
Given segment information create a line in general notation which has been normalized
[ "Given", "segment", "information", "create", "a", "line", "in", "general", "notation", "which", "has", "been", "normalized" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/RefinePolyLineCorner.java#L217-L233
49,936
lessthanoptimal/BoofCV
main/boofcv-types/src/main/java/boofcv/struct/image/ImageGray.java
ImageGray.createSameShape
public <B extends ImageGray<B>> B createSameShape( Class<B> type ) { return GeneralizedImageOps.createSingleBand(type,width,height); }
java
public <B extends ImageGray<B>> B createSameShape( Class<B> type ) { return GeneralizedImageOps.createSingleBand(type,width,height); }
[ "public", "<", "B", "extends", "ImageGray", "<", "B", ">", ">", "B", "createSameShape", "(", "Class", "<", "B", ">", "type", ")", "{", "return", "GeneralizedImageOps", ".", "createSingleBand", "(", "type", ",", "width", ",", "height", ")", ";", "}" ]
Creates a single band image of the specified type that will have the same shape as this image
[ "Creates", "a", "single", "band", "image", "of", "the", "specified", "type", "that", "will", "have", "the", "same", "shape", "as", "this", "image" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/struct/image/ImageGray.java#L190-L193
49,937
lessthanoptimal/BoofCV
demonstrations/src/main/java/boofcv/demonstrations/feature/disparity/VisualizeStereoDisparity.java
VisualizeStereoDisparity.changeImageView
private synchronized void changeImageView() { JComponent comp; if( control.selectedView < 3 ) { BufferedImage img; switch (control.selectedView) { case 0: img = disparityOut; break; case 1: img = colorLeft; break; case 2: img = colorRight; break; default: ...
java
private synchronized void changeImageView() { JComponent comp; if( control.selectedView < 3 ) { BufferedImage img; switch (control.selectedView) { case 0: img = disparityOut; break; case 1: img = colorLeft; break; case 2: img = colorRight; break; default: ...
[ "private", "synchronized", "void", "changeImageView", "(", ")", "{", "JComponent", "comp", ";", "if", "(", "control", ".", "selectedView", "<", "3", ")", "{", "BufferedImage", "img", ";", "switch", "(", "control", ".", "selectedView", ")", "{", "case", "0"...
Changes which image is being displayed depending on GUI selection
[ "Changes", "which", "image", "is", "being", "displayed", "depending", "on", "GUI", "selection" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/demonstrations/feature/disparity/VisualizeStereoDisparity.java#L164-L215
49,938
lessthanoptimal/BoofCV
demonstrations/src/main/java/boofcv/demonstrations/feature/disparity/VisualizeStereoDisparity.java
VisualizeStereoDisparity.rectifyInputImages
private void rectifyInputImages() { // get intrinsic camera calibration matrices DMatrixRMaj K1 = PerspectiveOps.pinholeToMatrix(calib.left, (DMatrixRMaj)null); DMatrixRMaj K2 = PerspectiveOps.pinholeToMatrix(calib.right, (DMatrixRMaj)null); // compute rectification matrices rectifyAlg.process(K1,new Se3_F64...
java
private void rectifyInputImages() { // get intrinsic camera calibration matrices DMatrixRMaj K1 = PerspectiveOps.pinholeToMatrix(calib.left, (DMatrixRMaj)null); DMatrixRMaj K2 = PerspectiveOps.pinholeToMatrix(calib.right, (DMatrixRMaj)null); // compute rectification matrices rectifyAlg.process(K1,new Se3_F64...
[ "private", "void", "rectifyInputImages", "(", ")", "{", "// get intrinsic camera calibration matrices", "DMatrixRMaj", "K1", "=", "PerspectiveOps", ".", "pinholeToMatrix", "(", "calib", ".", "left", ",", "(", "DMatrixRMaj", ")", "null", ")", ";", "DMatrixRMaj", "K2"...
Removes distortion and rectifies images.
[ "Removes", "distortion", "and", "rectifies", "images", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/demonstrations/feature/disparity/VisualizeStereoDisparity.java#L247-L283
49,939
lessthanoptimal/BoofCV
demonstrations/src/main/java/boofcv/demonstrations/feature/disparity/VisualizeStereoDisparity.java
VisualizeStereoDisparity.changeGuiActive
private void changeGuiActive( final boolean error , final boolean reverse ) { SwingUtilities.invokeLater(new Runnable() { public void run() { control.setActiveGui(error,reverse); } }); }
java
private void changeGuiActive( final boolean error , final boolean reverse ) { SwingUtilities.invokeLater(new Runnable() { public void run() { control.setActiveGui(error,reverse); } }); }
[ "private", "void", "changeGuiActive", "(", "final", "boolean", "error", ",", "final", "boolean", "reverse", ")", "{", "SwingUtilities", ".", "invokeLater", "(", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "control", ".", "setA...
Active and deactivates different GUI configurations
[ "Active", "and", "deactivates", "different", "GUI", "configurations" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/demonstrations/feature/disparity/VisualizeStereoDisparity.java#L386-L392
49,940
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/EciEncoding.java
EciEncoding.guessEncoding
public static String guessEncoding( byte[] message ) { // this function is inspired by a similarly named function in ZXing, but was written from scratch // using specifications for each encoding since I didn't understand what they were doing boolean isUtf8 = true; boolean isJis = true; boolean isIso = true; ...
java
public static String guessEncoding( byte[] message ) { // this function is inspired by a similarly named function in ZXing, but was written from scratch // using specifications for each encoding since I didn't understand what they were doing boolean isUtf8 = true; boolean isJis = true; boolean isIso = true; ...
[ "public", "static", "String", "guessEncoding", "(", "byte", "[", "]", "message", ")", "{", "// this function is inspired by a similarly named function in ZXing, but was written from scratch", "// using specifications for each encoding since I didn't understand what they were doing", "boole...
The encoding for byte messages should be ISO8859_1 or JIS, depending on which version of the specification you follow. In reality people use whatever they want and expect it to magically work. This attempts to figure out if it's ISO8859_1, JIS, or UTF8. UTF-8 is the most common and is used if its ambiguous. @param mes...
[ "The", "encoding", "for", "byte", "messages", "should", "be", "ISO8859_1", "or", "JIS", "depending", "on", "which", "version", "of", "the", "specification", "you", "follow", ".", "In", "reality", "people", "use", "whatever", "they", "want", "and", "expect", ...
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/EciEncoding.java#L39-L68
49,941
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/core/image/GConvertImage.java
GConvertImage.convert
public static <T extends ImageGray<T>> T convert(ImageGray<?> src , T dst , Class<T> typeDst ) { if (dst == null) { dst =(T) GeneralizedImageOps.createSingleBand(typeDst, src.width, src.height); } else { InputSanityCheck.checkSameShape(src, dst); } convert(src,dst); return dst; }
java
public static <T extends ImageGray<T>> T convert(ImageGray<?> src , T dst , Class<T> typeDst ) { if (dst == null) { dst =(T) GeneralizedImageOps.createSingleBand(typeDst, src.width, src.height); } else { InputSanityCheck.checkSameShape(src, dst); } convert(src,dst); return dst; }
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "T", "convert", "(", "ImageGray", "<", "?", ">", "src", ",", "T", "dst", ",", "Class", "<", "T", ">", "typeDst", ")", "{", "if", "(", "dst", "==", "null", ")", "{", "dst"...
Converts an image from one type to another type. Creates a new image instance if an output is not provided. @param src Input image. Not modified. @param dst Converted output image. If null a new one will be declared. Modified. @param typeDst The type of output image. @return Converted image.
[ "Converts", "an", "image", "from", "one", "type", "to", "another", "type", ".", "Creates", "a", "new", "image", "instance", "if", "an", "output", "is", "not", "provided", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/core/image/GConvertImage.java#L299-L309
49,942
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalExtractGeometries.java
TrifocalExtractGeometries.setTensor
public void setTensor( TrifocalTensor tensor ) { this.tensor = tensor; if( !svd.decompose(tensor.T1) ) throw new RuntimeException("SVD failed?!"); SingularOps_DDRM.nullVector(svd, true, v1); SingularOps_DDRM.nullVector(svd, false,u1); // DMatrixRMaj zero = new DMatrixRMaj(3,1); // CommonOps_DDRM.mult(ten...
java
public void setTensor( TrifocalTensor tensor ) { this.tensor = tensor; if( !svd.decompose(tensor.T1) ) throw new RuntimeException("SVD failed?!"); SingularOps_DDRM.nullVector(svd, true, v1); SingularOps_DDRM.nullVector(svd, false,u1); // DMatrixRMaj zero = new DMatrixRMaj(3,1); // CommonOps_DDRM.mult(ten...
[ "public", "void", "setTensor", "(", "TrifocalTensor", "tensor", ")", "{", "this", ".", "tensor", "=", "tensor", ";", "if", "(", "!", "svd", ".", "decompose", "(", "tensor", ".", "T1", ")", ")", "throw", "new", "RuntimeException", "(", "\"SVD failed?!\"", ...
Specifies the input tensor. The epipoles are immediately extracted since they are needed to extract all other data structures @param tensor The tensor. Reference is saved but not modified
[ "Specifies", "the", "input", "tensor", ".", "The", "epipoles", "are", "immediately", "extracted", "since", "they", "are", "needed", "to", "extract", "all", "other", "data", "structures" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalExtractGeometries.java#L92-L135
49,943
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalExtractGeometries.java
TrifocalExtractGeometries.extractEpipoles
public void extractEpipoles( Point3D_F64 e2 , Point3D_F64 e3 ) { e2.set(this.e2); e3.set(this.e3); }
java
public void extractEpipoles( Point3D_F64 e2 , Point3D_F64 e3 ) { e2.set(this.e2); e3.set(this.e3); }
[ "public", "void", "extractEpipoles", "(", "Point3D_F64", "e2", ",", "Point3D_F64", "e3", ")", "{", "e2", ".", "set", "(", "this", ".", "e2", ")", ";", "e3", ".", "set", "(", "this", ".", "e3", ")", ";", "}" ]
Extracts the epipoles from the trifocal tensor. Extracted epipoles will have a norm of 1 as an artifact of using SVD. @param e2 Output: Epipole in image 2. Homogeneous coordinates. Modified @param e3 Output: Epipole in image 3. Homogeneous coordinates. Modified
[ "Extracts", "the", "epipoles", "from", "the", "trifocal", "tensor", ".", "Extracted", "epipoles", "will", "have", "a", "norm", "of", "1", "as", "an", "artifact", "of", "using", "SVD", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/TrifocalExtractGeometries.java#L144-L147
49,944
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/color/GHistogramFeatureOps.java
GHistogramFeatureOps.histogram
public static <T extends ImageGray<T>> void histogram( T image , double minPixelValue , double maxPixelValue , TupleDesc_F64 histogram ) { if( image.getClass() == GrayU8.class ) { HistogramFeatureOps.histogram((GrayU8) image, (int) maxPixelValue, histogram); } else if( image.getClass() == GrayU16.class ) { ...
java
public static <T extends ImageGray<T>> void histogram( T image , double minPixelValue , double maxPixelValue , TupleDesc_F64 histogram ) { if( image.getClass() == GrayU8.class ) { HistogramFeatureOps.histogram((GrayU8) image, (int) maxPixelValue, histogram); } else if( image.getClass() == GrayU16.class ) { ...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "void", "histogram", "(", "T", "image", ",", "double", "minPixelValue", ",", "double", "maxPixelValue", ",", "TupleDesc_F64", "histogram", ")", "{", "if", "(", "image", ".", "getClas...
Computes a single-band normalized histogram for any single band image. @param image Input image. Not modified. @param minPixelValue Minimum possible value for a pixel. @param maxPixelValue Maximum possible value for a pixel. @param histogram The output histogram.
[ "Computes", "a", "single", "-", "band", "normalized", "histogram", "for", "any", "single", "band", "image", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/color/GHistogramFeatureOps.java#L41-L52
49,945
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/color/GHistogramFeatureOps.java
GHistogramFeatureOps.histogram
public static void histogram( double[] colors, int length , Histogram_F64 histogram ) { if( length % histogram.getDimensions() != 0 ) throw new IllegalArgumentException("Length does not match dimensions"); int coordinate[] = new int[ histogram.getDimensions() ]; histogram.fill(0); for (int i = 0; i < len...
java
public static void histogram( double[] colors, int length , Histogram_F64 histogram ) { if( length % histogram.getDimensions() != 0 ) throw new IllegalArgumentException("Length does not match dimensions"); int coordinate[] = new int[ histogram.getDimensions() ]; histogram.fill(0); for (int i = 0; i < len...
[ "public", "static", "void", "histogram", "(", "double", "[", "]", "colors", ",", "int", "length", ",", "Histogram_F64", "histogram", ")", "{", "if", "(", "length", "%", "histogram", ".", "getDimensions", "(", ")", "!=", "0", ")", "throw", "new", "Illegal...
Computes a coupled histogram from a list of colors. If the input is for integer values then add one to the maximum value. For example if the range of values is 0 to 255, then make it 0 to 256. @param colors List of colors stored in an interleaved format @param length Length of usable portion of colors @param histogr...
[ "Computes", "a", "coupled", "histogram", "from", "a", "list", "of", "colors", ".", "If", "the", "input", "is", "for", "integer", "values", "then", "add", "one", "to", "the", "maximum", "value", ".", "For", "example", "if", "the", "range", "of", "values",...
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/color/GHistogramFeatureOps.java#L84-L101
49,946
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/abst/geo/bundle/ScaleSceneStructure.java
ScaleSceneStructure.computePointStatistics
void computePointStatistics(Point[] points ) { final int length = points.length; double v[] = new double[length]; for (int axis = 0; axis < 3; axis++) { double maxAbs = 0; for (int i = 0; i < length; i++) { v[i] = points[i].coordinate[axis]; maxAbs = Math.max( maxAbs , Math.abs(v[i])); } dou...
java
void computePointStatistics(Point[] points ) { final int length = points.length; double v[] = new double[length]; for (int axis = 0; axis < 3; axis++) { double maxAbs = 0; for (int i = 0; i < length; i++) { v[i] = points[i].coordinate[axis]; maxAbs = Math.max( maxAbs , Math.abs(v[i])); } dou...
[ "void", "computePointStatistics", "(", "Point", "[", "]", "points", ")", "{", "final", "int", "length", "=", "points", ".", "length", ";", "double", "v", "[", "]", "=", "new", "double", "[", "length", "]", ";", "for", "(", "int", "axis", "=", "0", ...
For 3D points, computes the median value and variance along each dimension.
[ "For", "3D", "points", "computes", "the", "median", "value", "and", "variance", "along", "each", "dimension", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/abst/geo/bundle/ScaleSceneStructure.java#L217-L244
49,947
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/abst/geo/bundle/ScaleSceneStructure.java
ScaleSceneStructure.undoScale
public void undoScale( SceneStructureMetric structure , SceneObservations observations ) { if( structure.homogenous ) return; double scale = desiredDistancePoint / medianDistancePoint; undoNormPoints3D(structure, scale); Point3D_F64 c = new Point3D_F64(); for (int i = 0; i < structure.views.le...
java
public void undoScale( SceneStructureMetric structure , SceneObservations observations ) { if( structure.homogenous ) return; double scale = desiredDistancePoint / medianDistancePoint; undoNormPoints3D(structure, scale); Point3D_F64 c = new Point3D_F64(); for (int i = 0; i < structure.views.le...
[ "public", "void", "undoScale", "(", "SceneStructureMetric", "structure", ",", "SceneObservations", "observations", ")", "{", "if", "(", "structure", ".", "homogenous", ")", "return", ";", "double", "scale", "=", "desiredDistancePoint", "/", "medianDistancePoint", ";...
Undoes scale transform for metric. @param structure scene's structure @param observations observations of the scene
[ "Undoes", "scale", "transform", "for", "metric", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/abst/geo/bundle/ScaleSceneStructure.java#L282-L308
49,948
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/distort/RemovePerspectiveDistortion.java
RemovePerspectiveDistortion.apply
public boolean apply( T input , Point2D_F64 corner0 , Point2D_F64 corner1 , Point2D_F64 corner2 , Point2D_F64 corner3 ) { if( createTransform(corner0, corner1, corner2, corner3)) { distort.input(input).apply(); return true; } else { return false; } }
java
public boolean apply( T input , Point2D_F64 corner0 , Point2D_F64 corner1 , Point2D_F64 corner2 , Point2D_F64 corner3 ) { if( createTransform(corner0, corner1, corner2, corner3)) { distort.input(input).apply(); return true; } else { return false; } }
[ "public", "boolean", "apply", "(", "T", "input", ",", "Point2D_F64", "corner0", ",", "Point2D_F64", "corner1", ",", "Point2D_F64", "corner2", ",", "Point2D_F64", "corner3", ")", "{", "if", "(", "createTransform", "(", "corner0", ",", "corner1", ",", "corner2",...
Applies distortion removal to the specified region in the input image. The undistorted image is returned. @param input Input image @param corner0 Top left corner @param corner1 Top right corner @param corner2 Bottom right corner @param corner3 Bottom left corner @return true if successful or false if it failed
[ "Applies", "distortion", "removal", "to", "the", "specified", "region", "in", "the", "input", "image", ".", "The", "undistorted", "image", "is", "returned", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/distort/RemovePerspectiveDistortion.java#L103-L114
49,949
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/distort/RemovePerspectiveDistortion.java
RemovePerspectiveDistortion.createTransform
public boolean createTransform( Point2D_F64 tl , Point2D_F64 tr , Point2D_F64 br , Point2D_F64 bl ) { associatedPairs.get(0).p2.set(tl); associatedPairs.get(1).p2.set(tr); associatedPairs.get(2).p2.set(br); associatedPairs.get(3).p2.set(bl); if( !computeHomography.process(associatedPairs, H) ) r...
java
public boolean createTransform( Point2D_F64 tl , Point2D_F64 tr , Point2D_F64 br , Point2D_F64 bl ) { associatedPairs.get(0).p2.set(tl); associatedPairs.get(1).p2.set(tr); associatedPairs.get(2).p2.set(br); associatedPairs.get(3).p2.set(bl); if( !computeHomography.process(associatedPairs, H) ) r...
[ "public", "boolean", "createTransform", "(", "Point2D_F64", "tl", ",", "Point2D_F64", "tr", ",", "Point2D_F64", "br", ",", "Point2D_F64", "bl", ")", "{", "associatedPairs", ".", "get", "(", "0", ")", ".", "p2", ".", "set", "(", "tl", ")", ";", "associate...
Compues the distortion removal transform @param tl Top left corner @param tr Top right corner @param br Bottom right corner @param bl Bottom left corner @return true if successful or false if it failed
[ "Compues", "the", "distortion", "removal", "transform" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/distort/RemovePerspectiveDistortion.java#L125-L145
49,950
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/filter/convolve/ConvolveImageDownNormalized.java
ConvolveImageDownNormalized.vertical
public static void vertical(Kernel1D_F32 kernel, GrayF32 image, GrayF32 dest , int skip ) { checkParameters(image, dest, skip); if( kernel.width >= image.width ) { ConvolveDownNormalizedNaive.vertical(kernel,image,dest,skip); } else { ConvolveImageDownNoBorder.vertical(kernel,image,dest,skip); ConvolveD...
java
public static void vertical(Kernel1D_F32 kernel, GrayF32 image, GrayF32 dest , int skip ) { checkParameters(image, dest, skip); if( kernel.width >= image.width ) { ConvolveDownNormalizedNaive.vertical(kernel,image,dest,skip); } else { ConvolveImageDownNoBorder.vertical(kernel,image,dest,skip); ConvolveD...
[ "public", "static", "void", "vertical", "(", "Kernel1D_F32", "kernel", ",", "GrayF32", "image", ",", "GrayF32", "dest", ",", "int", "skip", ")", "{", "checkParameters", "(", "image", ",", "dest", ",", "skip", ")", ";", "if", "(", "kernel", ".", "width", ...
Performs a vertical 1D down convolution across the image while re-normalizing the kernel depending on its overlap with the image. @param image The original image. Not modified. @param dest Where the resulting image is written to. Modified. @param kernel The kernel that is being convolved. Not modified.
[ "Performs", "a", "vertical", "1D", "down", "convolution", "across", "the", "image", "while", "re", "-", "normalizing", "the", "kernel", "depending", "on", "its", "overlap", "with", "the", "image", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/convolve/ConvolveImageDownNormalized.java#L71-L80
49,951
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/distort/brown/RemoveBrownNtoN_F32.java
RemoveBrownNtoN_F32.removeRadial
public static void removeRadial(float x, float y, float[] radial, float t1, float t2, Point2D_F32 out, float tol ) { float origX = x; float origY = y; float prevSum = 0; for( int iter = 0; iter < 500; iter++ ) { // estimate the radial distance float r2 = x*x + y*y; float ri2 = r2; float...
java
public static void removeRadial(float x, float y, float[] radial, float t1, float t2, Point2D_F32 out, float tol ) { float origX = x; float origY = y; float prevSum = 0; for( int iter = 0; iter < 500; iter++ ) { // estimate the radial distance float r2 = x*x + y*y; float ri2 = r2; float...
[ "public", "static", "void", "removeRadial", "(", "float", "x", ",", "float", "y", ",", "float", "[", "]", "radial", ",", "float", "t1", ",", "float", "t2", ",", "Point2D_F32", "out", ",", "float", "tol", ")", "{", "float", "origX", "=", "x", ";", "...
Static function for removing radial and tangential distortion @param x Distorted x-coordinate normalized image coordinate @param y Distorted y-coordinate normalized image coordinate @param radial Radial distortion parameters @param t1 tangential distortion @param t2 tangential distortion @param out Undistorted normali...
[ "Static", "function", "for", "removing", "radial", "and", "tangential", "distortion" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/distort/brown/RemoveBrownNtoN_F32.java#L85-L117
49,952
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/SnapToEllipseEdge.java
SnapToEllipseEdge.process
public boolean process(EllipseRotated_F64 input, EllipseRotated_F64 refined) { refined.set(input); previous.set(input); for (int iteration = 0; iteration < maxIterations; iteration++) { refined.set(previous); computePointsAndWeights(refined); if( fitter.process(samplePts.toList(),weights.data) ) { ...
java
public boolean process(EllipseRotated_F64 input, EllipseRotated_F64 refined) { refined.set(input); previous.set(input); for (int iteration = 0; iteration < maxIterations; iteration++) { refined.set(previous); computePointsAndWeights(refined); if( fitter.process(samplePts.toList(),weights.data) ) { ...
[ "public", "boolean", "process", "(", "EllipseRotated_F64", "input", ",", "EllipseRotated_F64", "refined", ")", "{", "refined", ".", "set", "(", "input", ")", ";", "previous", ".", "set", "(", "input", ")", ";", "for", "(", "int", "iteration", "=", "0", "...
Refines provided list by snapping it to edges found in the image @param input (Output) Close approximation of the ellipse in the image @param refined (Output) Storage for refined estimate. Can be same instance as input @return True if a refined estimate could be found, false if it failed
[ "Refines", "provided", "list", "by", "snapping", "it", "to", "edges", "found", "in", "the", "image" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/SnapToEllipseEdge.java#L81-L111
49,953
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/SnapToEllipseEdge.java
SnapToEllipseEdge.change
protected static double change( EllipseRotated_F64 a , EllipseRotated_F64 b ) { double total = 0; total += Math.abs(a.center.x - b.center.x); total += Math.abs(a.center.y - b.center.y); total += Math.abs(a.a - b.a); total += Math.abs(a.b - b.b); // only care about the change of angle when it is not a circ...
java
protected static double change( EllipseRotated_F64 a , EllipseRotated_F64 b ) { double total = 0; total += Math.abs(a.center.x - b.center.x); total += Math.abs(a.center.y - b.center.y); total += Math.abs(a.a - b.a); total += Math.abs(a.b - b.b); // only care about the change of angle when it is not a circ...
[ "protected", "static", "double", "change", "(", "EllipseRotated_F64", "a", ",", "EllipseRotated_F64", "b", ")", "{", "double", "total", "=", "0", ";", "total", "+=", "Math", ".", "abs", "(", "a", ".", "center", ".", "x", "-", "b", ".", "center", ".", ...
Computes a numerical value for the difference in parameters between the two ellipses
[ "Computes", "a", "numerical", "value", "for", "the", "difference", "in", "parameters", "between", "the", "two", "ellipses" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/SnapToEllipseEdge.java#L116-L129
49,954
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryVisualOdometry.java
FactoryVisualOdometry.monoPlaneInfinity
public static <T extends ImageGray<T>> MonocularPlaneVisualOdometry<T> monoPlaneInfinity(int thresholdAdd, int thresholdRetire, double inlierPixelTol, int ransacIterations, PointTracker<T> tracker, ImageType<T> imageType) { //squared pixel...
java
public static <T extends ImageGray<T>> MonocularPlaneVisualOdometry<T> monoPlaneInfinity(int thresholdAdd, int thresholdRetire, double inlierPixelTol, int ransacIterations, PointTracker<T> tracker, ImageType<T> imageType) { //squared pixel...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "MonocularPlaneVisualOdometry", "<", "T", ">", "monoPlaneInfinity", "(", "int", "thresholdAdd", ",", "int", "thresholdRetire", ",", "double", "inlierPixelTol", ",", "int", "ransacIterations"...
Monocular plane based visual odometry algorithm which uses both points on the plane and off plane for motion estimation. @see VisOdomMonoPlaneInfinity @param thresholdAdd New points are spawned when the number of on plane inliers drops below this value. @param thresholdRetire Tracks are dropped when they are not con...
[ "Monocular", "plane", "based", "visual", "odometry", "algorithm", "which", "uses", "both", "points", "on", "the", "plane", "and", "off", "plane", "for", "motion", "estimation", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryVisualOdometry.java#L94-L118
49,955
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryVisualOdometry.java
FactoryVisualOdometry.monoPlaneOverhead
public static <T extends ImageGray<T>> MonocularPlaneVisualOdometry<T> monoPlaneOverhead(double cellSize, double maxCellsPerPixel, double mapHeightFraction , double inlierGroundTol, int ransacIterations , int thresholdRetire , ...
java
public static <T extends ImageGray<T>> MonocularPlaneVisualOdometry<T> monoPlaneOverhead(double cellSize, double maxCellsPerPixel, double mapHeightFraction , double inlierGroundTol, int ransacIterations , int thresholdRetire , ...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "MonocularPlaneVisualOdometry", "<", "T", ">", "monoPlaneOverhead", "(", "double", "cellSize", ",", "double", "maxCellsPerPixel", ",", "double", "mapHeightFraction", ",", "double", "inlierGr...
Monocular plane based visual odometry algorithm which creates a synthetic overhead view and tracks image features inside this synthetic view. @see VisOdomMonoOverheadMotion2D @param cellSize (Overhead) size of ground cells in overhead image in world units @param maxCellsPerPixel (Overhead) Specifies the minimum resol...
[ "Monocular", "plane", "based", "visual", "odometry", "algorithm", "which", "creates", "a", "synthetic", "overhead", "view", "and", "tracks", "image", "features", "inside", "this", "synthetic", "view", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryVisualOdometry.java#L145-L170
49,956
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryVisualOdometry.java
FactoryVisualOdometry.stereoDepth
public static <T extends ImageGray<T>> StereoVisualOdometry<T> stereoDepth(double inlierPixelTol, int thresholdAdd, int thresholdRetire , int ransacIterations , int refineIterations , boolean doublePass , StereoDisparitySparse<T> sparseDisparity, Po...
java
public static <T extends ImageGray<T>> StereoVisualOdometry<T> stereoDepth(double inlierPixelTol, int thresholdAdd, int thresholdRetire , int ransacIterations , int refineIterations , boolean doublePass , StereoDisparitySparse<T> sparseDisparity, Po...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "StereoVisualOdometry", "<", "T", ">", "stereoDepth", "(", "double", "inlierPixelTol", ",", "int", "thresholdAdd", ",", "int", "thresholdRetire", ",", "int", "ransacIterations", ",", "in...
Stereo vision based visual odometry algorithm which runs a sparse feature tracker in the left camera and estimates the range of tracks once when first detected using disparity between left and right cameras. @see VisOdomPixelDepthPnP @param thresholdAdd Add new tracks when less than this number are in the inlier set....
[ "Stereo", "vision", "based", "visual", "odometry", "algorithm", "which", "runs", "a", "sparse", "feature", "tracker", "in", "the", "left", "camera", "and", "estimates", "the", "range", "of", "tracks", "once", "when", "first", "detected", "using", "disparity", ...
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryVisualOdometry.java#L185-L222
49,957
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryVisualOdometry.java
FactoryVisualOdometry.depthDepthPnP
public static <Vis extends ImageGray<Vis>, Depth extends ImageGray<Depth>> DepthVisualOdometry<Vis,Depth> depthDepthPnP(double inlierPixelTol, int thresholdAdd, int thresholdRetire , int ransacIterations , int refineIterations , boolean doublePass , ...
java
public static <Vis extends ImageGray<Vis>, Depth extends ImageGray<Depth>> DepthVisualOdometry<Vis,Depth> depthDepthPnP(double inlierPixelTol, int thresholdAdd, int thresholdRetire , int ransacIterations , int refineIterations , boolean doublePass , ...
[ "public", "static", "<", "Vis", "extends", "ImageGray", "<", "Vis", ">", ",", "Depth", "extends", "ImageGray", "<", "Depth", ">", ">", "DepthVisualOdometry", "<", "Vis", ",", "Depth", ">", "depthDepthPnP", "(", "double", "inlierPixelTol", ",", "int", "thresh...
Depth sensor based visual odometry algorithm which runs a sparse feature tracker in the visual camera and estimates the range of tracks once when first detected using the depth sensor. @see VisOdomPixelDepthPnP @param thresholdAdd Add new tracks when less than this number are in the inlier set. Tracker dependent. Se...
[ "Depth", "sensor", "based", "visual", "odometry", "algorithm", "which", "runs", "a", "sparse", "feature", "tracker", "in", "the", "visual", "camera", "and", "estimates", "the", "range", "of", "tracks", "once", "when", "first", "detected", "using", "the", "dept...
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryVisualOdometry.java#L238-L275
49,958
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryVisualOdometry.java
FactoryVisualOdometry.stereoDualTrackerPnP
public static <T extends ImageGray<T>, Desc extends TupleDesc> StereoVisualOdometry<T> stereoDualTrackerPnP(int thresholdAdd, int thresholdRetire, double inlierPixelTol, double epipolarPixelTol, int ransacIterations, int refineIterations, PointTracker<T>...
java
public static <T extends ImageGray<T>, Desc extends TupleDesc> StereoVisualOdometry<T> stereoDualTrackerPnP(int thresholdAdd, int thresholdRetire, double inlierPixelTol, double epipolarPixelTol, int ransacIterations, int refineIterations, PointTracker<T>...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ",", "Desc", "extends", "TupleDesc", ">", "StereoVisualOdometry", "<", "T", ">", "stereoDualTrackerPnP", "(", "int", "thresholdAdd", ",", "int", "thresholdRetire", ",", "double", "inlierPixelTo...
Creates a stereo visual odometry algorithm that independently tracks features in left and right camera. @see VisOdomDualTrackPnP @param thresholdAdd When the number of inliers is below this number new features are detected @param thresholdRetire When a feature has not been in the inlier list for this many ticks it is...
[ "Creates", "a", "stereo", "visual", "odometry", "algorithm", "that", "independently", "tracks", "features", "in", "left", "and", "right", "camera", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryVisualOdometry.java#L293-L340
49,959
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/UtilLepetitEPnP.java
UtilLepetitEPnP.computeCameraControl
public static void computeCameraControl(double beta[], List<Point3D_F64> nullPts[], FastQueue<Point3D_F64> cameraPts , int numControl ) { cameraPts.reset(); for( int i = 0; i < numControl; i++ ) { cameraPts.grow().set(0,0,0); } for( int i = 0; i < numControl; i++ ) { dou...
java
public static void computeCameraControl(double beta[], List<Point3D_F64> nullPts[], FastQueue<Point3D_F64> cameraPts , int numControl ) { cameraPts.reset(); for( int i = 0; i < numControl; i++ ) { cameraPts.grow().set(0,0,0); } for( int i = 0; i < numControl; i++ ) { dou...
[ "public", "static", "void", "computeCameraControl", "(", "double", "beta", "[", "]", ",", "List", "<", "Point3D_F64", ">", "nullPts", "[", "]", ",", "FastQueue", "<", "Point3D_F64", ">", "cameraPts", ",", "int", "numControl", ")", "{", "cameraPts", ".", "r...
Computes the camera control points as weighted sum of null points. @param beta Beta values which describe the weights of null points @param nullPts Null points that the camera point is a weighted sum of @param cameraPts The output
[ "Computes", "the", "camera", "control", "points", "as", "weighted", "sum", "of", "null", "points", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/UtilLepetitEPnP.java#L41-L63
49,960
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/UtilLepetitEPnP.java
UtilLepetitEPnP.constraintMatrix6x3
public static void constraintMatrix6x3( DMatrixRMaj L_6x10 , DMatrixRMaj L_6x3 ) { int index = 0; for( int i = 0; i < 6; i++ ) { L_6x3.data[index++] = L_6x10.get(i,0); L_6x3.data[index++] = L_6x10.get(i,1); L_6x3.data[index++] = L_6x10.get(i,4); } }
java
public static void constraintMatrix6x3( DMatrixRMaj L_6x10 , DMatrixRMaj L_6x3 ) { int index = 0; for( int i = 0; i < 6; i++ ) { L_6x3.data[index++] = L_6x10.get(i,0); L_6x3.data[index++] = L_6x10.get(i,1); L_6x3.data[index++] = L_6x10.get(i,4); } }
[ "public", "static", "void", "constraintMatrix6x3", "(", "DMatrixRMaj", "L_6x10", ",", "DMatrixRMaj", "L_6x3", ")", "{", "int", "index", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "6", ";", "i", "++", ")", "{", "L_6x3", ".", "da...
Extracts the linear constraint matrix for case 2 from the full 6x10 constraint matrix.
[ "Extracts", "the", "linear", "constraint", "matrix", "for", "case", "2", "from", "the", "full", "6x10", "constraint", "matrix", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/UtilLepetitEPnP.java#L82-L90
49,961
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/UtilLepetitEPnP.java
UtilLepetitEPnP.constraintMatrix6x6
public static void constraintMatrix6x6( DMatrixRMaj L_6x10 , DMatrixRMaj L_6x6 ) { int index = 0; for( int i = 0; i < 6; i++ ) { L_6x6.data[index++] = L_6x10.get(i,0); L_6x6.data[index++] = L_6x10.get(i,1); L_6x6.data[index++] = L_6x10.get(i,2); L_6x6.data[index++] = L_6x10.get(i,4); L_6x6.data[inde...
java
public static void constraintMatrix6x6( DMatrixRMaj L_6x10 , DMatrixRMaj L_6x6 ) { int index = 0; for( int i = 0; i < 6; i++ ) { L_6x6.data[index++] = L_6x10.get(i,0); L_6x6.data[index++] = L_6x10.get(i,1); L_6x6.data[index++] = L_6x10.get(i,2); L_6x6.data[index++] = L_6x10.get(i,4); L_6x6.data[inde...
[ "public", "static", "void", "constraintMatrix6x6", "(", "DMatrixRMaj", "L_6x10", ",", "DMatrixRMaj", "L_6x6", ")", "{", "int", "index", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "6", ";", "i", "++", ")", "{", "L_6x6", ".", "da...
Extracts the linear constraint matrix for case 3 from the full 6x10 constraint matrix.
[ "Extracts", "the", "linear", "constraint", "matrix", "for", "case", "3", "from", "the", "full", "6x10", "constraint", "matrix", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/UtilLepetitEPnP.java#L95-L106
49,962
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/UtilLepetitEPnP.java
UtilLepetitEPnP.constraintMatrix3x3
public static void constraintMatrix3x3( DMatrixRMaj L_3x6 , DMatrixRMaj L_6x3 ) { int index = 0; for( int i = 0; i < 3; i++ ) { L_6x3.data[index++] = L_3x6.get(i,0); L_6x3.data[index++] = L_3x6.get(i,1); L_6x3.data[index++] = L_3x6.get(i,3); } }
java
public static void constraintMatrix3x3( DMatrixRMaj L_3x6 , DMatrixRMaj L_6x3 ) { int index = 0; for( int i = 0; i < 3; i++ ) { L_6x3.data[index++] = L_3x6.get(i,0); L_6x3.data[index++] = L_3x6.get(i,1); L_6x3.data[index++] = L_3x6.get(i,3); } }
[ "public", "static", "void", "constraintMatrix3x3", "(", "DMatrixRMaj", "L_3x6", ",", "DMatrixRMaj", "L_6x3", ")", "{", "int", "index", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "3", ";", "i", "++", ")", "{", "L_6x3", ".", "dat...
Extracts the linear constraint matrix for planar case 2 from the full 4x6 constraint matrix.
[ "Extracts", "the", "linear", "constraint", "matrix", "for", "planar", "case", "2", "from", "the", "full", "4x6", "constraint", "matrix", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/UtilLepetitEPnP.java#L194-L203
49,963
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/UtilLepetitEPnP.java
UtilLepetitEPnP.constraintMatrix3x6
public static void constraintMatrix3x6( DMatrixRMaj L , DMatrixRMaj y , FastQueue<Point3D_F64> controlWorldPts , List<Point3D_F64> nullPts[] ) { int row = 0; for( int i = 0; i < 3; i++ ) { Point3D_F64 ci = controlWorldPts.get(i); Point3D_F64 vai = nullPts[0].get(i); Point3D_F64 vbi = ...
java
public static void constraintMatrix3x6( DMatrixRMaj L , DMatrixRMaj y , FastQueue<Point3D_F64> controlWorldPts , List<Point3D_F64> nullPts[] ) { int row = 0; for( int i = 0; i < 3; i++ ) { Point3D_F64 ci = controlWorldPts.get(i); Point3D_F64 vai = nullPts[0].get(i); Point3D_F64 vbi = ...
[ "public", "static", "void", "constraintMatrix3x6", "(", "DMatrixRMaj", "L", ",", "DMatrixRMaj", "y", ",", "FastQueue", "<", "Point3D_F64", ">", "controlWorldPts", ",", "List", "<", "Point3D_F64", ">", "nullPts", "[", "]", ")", "{", "int", "row", "=", "0", ...
Linear constraint matrix for case 4 in the planar case @param L Constraint matrix @param y Vector containing distance between world control points @param controlWorldPts List of world control points @param nullPts Null points
[ "Linear", "constraint", "matrix", "for", "case", "4", "in", "the", "planar", "case" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/UtilLepetitEPnP.java#L213-L259
49,964
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/UtilLepetitEPnP.java
UtilLepetitEPnP.jacobian_Control4
public static void jacobian_Control4( DMatrixRMaj L_full , double beta[] , DMatrixRMaj A ) { int indexA = 0; double b0 = beta[0]; double b1 = beta[1]; double b2 = beta[2]; double b3 = beta[3]; final double ld[] = L_full.data; for( int i = 0; i < 6; i++ ) { int li = L_full.numCols*i; A.data...
java
public static void jacobian_Control4( DMatrixRMaj L_full , double beta[] , DMatrixRMaj A ) { int indexA = 0; double b0 = beta[0]; double b1 = beta[1]; double b2 = beta[2]; double b3 = beta[3]; final double ld[] = L_full.data; for( int i = 0; i < 6; i++ ) { int li = L_full.numCols*i; A.data...
[ "public", "static", "void", "jacobian_Control4", "(", "DMatrixRMaj", "L_full", ",", "double", "beta", "[", "]", ",", "DMatrixRMaj", "A", ")", "{", "int", "indexA", "=", "0", ";", "double", "b0", "=", "beta", "[", "0", "]", ";", "double", "b1", "=", "...
Computes the Jacobian given 4 control points.
[ "Computes", "the", "Jacobian", "given", "4", "control", "points", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/UtilLepetitEPnP.java#L316-L332
49,965
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/UtilLepetitEPnP.java
UtilLepetitEPnP.jacobian_Control3
public static void jacobian_Control3( DMatrixRMaj L_full , double beta[] , DMatrixRMaj A) { int indexA = 0; double b0 = beta[0]; double b1 = beta[1]; double b2 = beta[2]; final double ld[] = L_full.data; for( int i = 0; i < 3; i++ ) { int li = L_full.numCols*i; A.data[indexA++] = 2*ld[li+...
java
public static void jacobian_Control3( DMatrixRMaj L_full , double beta[] , DMatrixRMaj A) { int indexA = 0; double b0 = beta[0]; double b1 = beta[1]; double b2 = beta[2]; final double ld[] = L_full.data; for( int i = 0; i < 3; i++ ) { int li = L_full.numCols*i; A.data[indexA++] = 2*ld[li+...
[ "public", "static", "void", "jacobian_Control3", "(", "DMatrixRMaj", "L_full", ",", "double", "beta", "[", "]", ",", "DMatrixRMaj", "A", ")", "{", "int", "indexA", "=", "0", ";", "double", "b0", "=", "beta", "[", "0", "]", ";", "double", "b1", "=", "...
Computes the Jacobian given 3 control points.
[ "Computes", "the", "Jacobian", "given", "3", "control", "points", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/UtilLepetitEPnP.java#L337-L352
49,966
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/flow/DenseOpticalFlowBlockPyramid.java
DenseOpticalFlowBlockPyramid.process
public void process( ImagePyramid<T> pyramidPrev , ImagePyramid<T> pyramidCurr ) { InputSanityCheck.checkSameShape(pyramidPrev, pyramidCurr); int numLayers = pyramidPrev.getNumLayers(); for( int i = numLayers-1; i >= 0; i-- ) { T prev = pyramidPrev.getLayer(i); T curr = pyramidCurr.getLayer(i); flow...
java
public void process( ImagePyramid<T> pyramidPrev , ImagePyramid<T> pyramidCurr ) { InputSanityCheck.checkSameShape(pyramidPrev, pyramidCurr); int numLayers = pyramidPrev.getNumLayers(); for( int i = numLayers-1; i >= 0; i-- ) { T prev = pyramidPrev.getLayer(i); T curr = pyramidCurr.getLayer(i); flow...
[ "public", "void", "process", "(", "ImagePyramid", "<", "T", ">", "pyramidPrev", ",", "ImagePyramid", "<", "T", ">", "pyramidCurr", ")", "{", "InputSanityCheck", ".", "checkSameShape", "(", "pyramidPrev", ",", "pyramidCurr", ")", ";", "int", "numLayers", "=", ...
Computes the optical flow form 'prev' to 'curr' and stores the output into output @param pyramidPrev Previous image @param pyramidCurr Current image
[ "Computes", "the", "optical", "flow", "form", "prev", "to", "curr", "and", "stores", "the", "output", "into", "output" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/flow/DenseOpticalFlowBlockPyramid.java#L103-L179
49,967
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/distort/spherical/EquirectangularDistortBase_F64.java
EquirectangularDistortBase_F64.setDirection
public void setDirection(double yaw, double pitch, double roll ) { ConvertRotation3D_F64.eulerToMatrix(EulerType.YZX,pitch,yaw,roll,R); }
java
public void setDirection(double yaw, double pitch, double roll ) { ConvertRotation3D_F64.eulerToMatrix(EulerType.YZX,pitch,yaw,roll,R); }
[ "public", "void", "setDirection", "(", "double", "yaw", ",", "double", "pitch", ",", "double", "roll", ")", "{", "ConvertRotation3D_F64", ".", "eulerToMatrix", "(", "EulerType", ".", "YZX", ",", "pitch", ",", "yaw", ",", "roll", ",", "R", ")", ";", "}" ]
Specifies the rotation offset from the canonical location using yaw and pitch. @param yaw Radian from -pi to pi @param pitch Radian from -pi/2 to pi/2 @param roll Radian from -pi to pi
[ "Specifies", "the", "rotation", "offset", "from", "the", "canonical", "location", "using", "yaw", "and", "pitch", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/distort/spherical/EquirectangularDistortBase_F64.java#L69-L71
49,968
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/distort/spherical/EquirectangularDistortBase_F64.java
EquirectangularDistortBase_F64.declareVectors
protected void declareVectors( int width , int height ) { this.outWidth = width; if( vectors.length < width*height ) { Point3D_F64[] tmp = new Point3D_F64[width*height]; System.arraycopy(vectors,0,tmp,0,vectors.length); for (int i = vectors.length; i < tmp.length; i++) { tmp[i] = new Point3D_F64(); ...
java
protected void declareVectors( int width , int height ) { this.outWidth = width; if( vectors.length < width*height ) { Point3D_F64[] tmp = new Point3D_F64[width*height]; System.arraycopy(vectors,0,tmp,0,vectors.length); for (int i = vectors.length; i < tmp.length; i++) { tmp[i] = new Point3D_F64(); ...
[ "protected", "void", "declareVectors", "(", "int", "width", ",", "int", "height", ")", "{", "this", ".", "outWidth", "=", "width", ";", "if", "(", "vectors", ".", "length", "<", "width", "*", "height", ")", "{", "Point3D_F64", "[", "]", "tmp", "=", "...
Declares storage for precomputed pointing vectors to output image @param width output image width @param height output image height
[ "Declares", "storage", "for", "precomputed", "pointing", "vectors", "to", "output", "image" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/distort/spherical/EquirectangularDistortBase_F64.java#L87-L99
49,969
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java
GaliosFieldTableOps.polyScale
public void polyScale(GrowQueue_I8 input , int scale , GrowQueue_I8 output) { output.resize(input.size); for (int i = 0; i < input.size; i++) { output.data[i] = (byte)multiply(input.data[i]&0xFF, scale); } }
java
public void polyScale(GrowQueue_I8 input , int scale , GrowQueue_I8 output) { output.resize(input.size); for (int i = 0; i < input.size; i++) { output.data[i] = (byte)multiply(input.data[i]&0xFF, scale); } }
[ "public", "void", "polyScale", "(", "GrowQueue_I8", "input", ",", "int", "scale", ",", "GrowQueue_I8", "output", ")", "{", "output", ".", "resize", "(", "input", ".", "size", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "input", ".", ...
Scales the polynomial. <p>Coefficients for largest powers are first, e.g. 2*x**3 + 8*x**2+1 = [2,8,0,1]</p> @param input Input polynomial. @param scale scale @param output Output polynomial.
[ "Scales", "the", "polynomial", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java#L129-L136
49,970
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java
GaliosFieldTableOps.polyAdd
public void polyAdd(GrowQueue_I8 polyA , GrowQueue_I8 polyB , GrowQueue_I8 output ) { output.resize(Math.max(polyA.size,polyB.size)); // compute offset that would align the smaller polynomial with the larger polynomial int offsetA = Math.max(0,polyB.size-polyA.size); int offsetB = Math.max(0,polyA.size-polyB.s...
java
public void polyAdd(GrowQueue_I8 polyA , GrowQueue_I8 polyB , GrowQueue_I8 output ) { output.resize(Math.max(polyA.size,polyB.size)); // compute offset that would align the smaller polynomial with the larger polynomial int offsetA = Math.max(0,polyB.size-polyA.size); int offsetB = Math.max(0,polyA.size-polyB.s...
[ "public", "void", "polyAdd", "(", "GrowQueue_I8", "polyA", ",", "GrowQueue_I8", "polyB", ",", "GrowQueue_I8", "output", ")", "{", "output", ".", "resize", "(", "Math", ".", "max", "(", "polyA", ".", "size", ",", "polyB", ".", "size", ")", ")", ";", "//...
Adds two polynomials together. output = polyA + polyB <p>Coefficients for largest powers are first, e.g. 2*x**3 + 8*x**2+1 = [2,8,0,1]</p> @param polyA (Input) First polynomial @param polyB (Input) Second polynomial @param output (Output) Results of addition
[ "Adds", "two", "polynomials", "together", ".", "output", "=", "polyA", "+", "polyB" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java#L147-L164
49,971
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java
GaliosFieldTableOps.polyAdd_S
public void polyAdd_S(GrowQueue_I8 polyA , GrowQueue_I8 polyB , GrowQueue_I8 output ) { output.resize(Math.max(polyA.size,polyB.size)); int M = Math.min(polyA.size, polyB.size); for (int i = M; i < polyA.size; i++) { output.data[i] = polyA.data[i]; } for (int i = M; i < polyB.size; i++) { output.data[i...
java
public void polyAdd_S(GrowQueue_I8 polyA , GrowQueue_I8 polyB , GrowQueue_I8 output ) { output.resize(Math.max(polyA.size,polyB.size)); int M = Math.min(polyA.size, polyB.size); for (int i = M; i < polyA.size; i++) { output.data[i] = polyA.data[i]; } for (int i = M; i < polyB.size; i++) { output.data[i...
[ "public", "void", "polyAdd_S", "(", "GrowQueue_I8", "polyA", ",", "GrowQueue_I8", "polyB", ",", "GrowQueue_I8", "output", ")", "{", "output", ".", "resize", "(", "Math", ".", "max", "(", "polyA", ".", "size", ",", "polyB", ".", "size", ")", ")", ";", "...
Adds two polynomials together. <p>Coefficients for smallest powers are first, e.g. 2*x**3 + 8*x**2+1 = [1,0,2,8]</p> @param polyA (Input) First polynomial @param polyB (Input) Second polynomial @param output (Output) Results of addition
[ "Adds", "two", "polynomials", "together", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java#L175-L189
49,972
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java
GaliosFieldTableOps.polyAddScaleB
public void polyAddScaleB(GrowQueue_I8 polyA , GrowQueue_I8 polyB , int scaleB , GrowQueue_I8 output ) { output.resize(Math.max(polyA.size,polyB.size)); // compute offset that would align the smaller polynomial with the larger polynomial int offsetA = Math.max(0,polyB.size-polyA.size); int offsetB = Math.max(0...
java
public void polyAddScaleB(GrowQueue_I8 polyA , GrowQueue_I8 polyB , int scaleB , GrowQueue_I8 output ) { output.resize(Math.max(polyA.size,polyB.size)); // compute offset that would align the smaller polynomial with the larger polynomial int offsetA = Math.max(0,polyB.size-polyA.size); int offsetB = Math.max(0...
[ "public", "void", "polyAddScaleB", "(", "GrowQueue_I8", "polyA", ",", "GrowQueue_I8", "polyB", ",", "int", "scaleB", ",", "GrowQueue_I8", "output", ")", "{", "output", ".", "resize", "(", "Math", ".", "max", "(", "polyA", ".", "size", ",", "polyB", ".", ...
Adds two polynomials together while scaling the second. <p>Coefficients for largest powers are first, e.g. 2*x**3 + 8*x**2+1 = [2,8,0,1]</p> @param polyA (Input) First polynomial @param polyB (Input) Second polynomial @param scaleB (Input) Scale factor applied to polyB @param output (Output) Results of addition
[ "Adds", "two", "polynomials", "together", "while", "scaling", "the", "second", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java#L201-L218
49,973
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java
GaliosFieldTableOps.polyEval
public int polyEval(GrowQueue_I8 input , int x ) { int y = input.data[0]&0xFF; for (int i = 1; i < input.size; i++) { y = multiply(y,x) ^ (input.data[i]&0xFF); } return y; }
java
public int polyEval(GrowQueue_I8 input , int x ) { int y = input.data[0]&0xFF; for (int i = 1; i < input.size; i++) { y = multiply(y,x) ^ (input.data[i]&0xFF); } return y; }
[ "public", "int", "polyEval", "(", "GrowQueue_I8", "input", ",", "int", "x", ")", "{", "int", "y", "=", "input", ".", "data", "[", "0", "]", "&", "0xFF", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "input", ".", "size", ";", "i", "++...
Evaluate the polynomial using Horner's method. Avoids explicit calculating the powers of x. <p>01x**4 + 0fx**3 + 36x**2 + 78x + 40 = (((01 x + 0f) x + 36) x + 78) x + 40</p> <p>Coefficients for largest powers are first, e.g. 2*x**3 + 8*x**2+1 = [2,8,0,1]</p> @param input Polynomial being evaluated @param x Value of...
[ "Evaluate", "the", "polynomial", "using", "Horner", "s", "method", ".", "Avoids", "explicit", "calculating", "the", "powers", "of", "x", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java#L295-L303
49,974
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java
GaliosFieldTableOps.polyEvalContinue
public int polyEvalContinue( int previousOutput, GrowQueue_I8 part , int x ) { int y = previousOutput; for (int i = 0; i < part.size; i++) { y = multiply(y,x) ^ (part.data[i]&0xFF); } return y; }
java
public int polyEvalContinue( int previousOutput, GrowQueue_I8 part , int x ) { int y = previousOutput; for (int i = 0; i < part.size; i++) { y = multiply(y,x) ^ (part.data[i]&0xFF); } return y; }
[ "public", "int", "polyEvalContinue", "(", "int", "previousOutput", ",", "GrowQueue_I8", "part", ",", "int", "x", ")", "{", "int", "y", "=", "previousOutput", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "part", ".", "size", ";", "i", "++", ...
Continue evaluating a polynomial which has been broken up into multiple arrays. @param previousOutput Output from the evaluation of the prior part of the polynomial @param part Additional segment of the polynomial @param x Point it's being evaluated at @return results
[ "Continue", "evaluating", "a", "polynomial", "which", "has", "been", "broken", "up", "into", "multiple", "arrays", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java#L335-L342
49,975
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java
GaliosFieldTableOps.polyDivide
public void polyDivide(GrowQueue_I8 dividend , GrowQueue_I8 divisor , GrowQueue_I8 quotient, GrowQueue_I8 remainder ) { // handle special case if( divisor.size > dividend.size ) { remainder.setTo(dividend); quotient.resize(0); return; } else { remainder.resize(divisor.size-1); quotient.se...
java
public void polyDivide(GrowQueue_I8 dividend , GrowQueue_I8 divisor , GrowQueue_I8 quotient, GrowQueue_I8 remainder ) { // handle special case if( divisor.size > dividend.size ) { remainder.setTo(dividend); quotient.resize(0); return; } else { remainder.resize(divisor.size-1); quotient.se...
[ "public", "void", "polyDivide", "(", "GrowQueue_I8", "dividend", ",", "GrowQueue_I8", "divisor", ",", "GrowQueue_I8", "quotient", ",", "GrowQueue_I8", "remainder", ")", "{", "// handle special case", "if", "(", "divisor", ".", "size", ">", "dividend", ".", "size",...
Performs polynomial division using a synthetic division algorithm. <p>Coefficients for largest powers are first, e.g. 2*x**3 + 8*x**2+1 = [2,8,0,1]</p> @param dividend (Input) Polynomial dividend @param divisor (Input) Polynomial divisor @param quotient (Output) Division's quotient @param remainder (Output) Divisions...
[ "Performs", "polynomial", "division", "using", "a", "synthetic", "division", "algorithm", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java#L354-L388
49,976
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/factory/fiducial/ConfigQrCode.java
ConfigQrCode.fast
public static ConfigQrCode fast() { // A global threshold is faster than any local algorithm // plus it will generate a simpler set of internal contours speeding up that process ConfigQrCode config = new ConfigQrCode(); config.threshold = ConfigThreshold.global(ThresholdType.GLOBAL_OTSU); return config; }
java
public static ConfigQrCode fast() { // A global threshold is faster than any local algorithm // plus it will generate a simpler set of internal contours speeding up that process ConfigQrCode config = new ConfigQrCode(); config.threshold = ConfigThreshold.global(ThresholdType.GLOBAL_OTSU); return config; }
[ "public", "static", "ConfigQrCode", "fast", "(", ")", "{", "// A global threshold is faster than any local algorithm", "// plus it will generate a simpler set of internal contours speeding up that process", "ConfigQrCode", "config", "=", "new", "ConfigQrCode", "(", ")", ";", "confi...
Default configuration for a QR Code detector which is optimized for speed
[ "Default", "configuration", "for", "a", "QR", "Code", "detector", "which", "is", "optimized", "for", "speed" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/factory/fiducial/ConfigQrCode.java#L96-L102
49,977
lessthanoptimal/BoofCV
integration/boofcv-swing/src/main/java/boofcv/gui/feature/AssociationScorePanel.java
AssociationScorePanel.drawDistribution
private void drawDistribution( Graphics2D g2 , List<Point2D_F64> candidates , int offX, int offY , double scale) { findStatistics(); // draw all the features, adjusting their size based on the first score g2.setColor(Color.RED); g2.setStroke(new BasicStroke(3)); double normalizer; if( scorer.getSco...
java
private void drawDistribution( Graphics2D g2 , List<Point2D_F64> candidates , int offX, int offY , double scale) { findStatistics(); // draw all the features, adjusting their size based on the first score g2.setColor(Color.RED); g2.setStroke(new BasicStroke(3)); double normalizer; if( scorer.getSco...
[ "private", "void", "drawDistribution", "(", "Graphics2D", "g2", ",", "List", "<", "Point2D_F64", ">", "candidates", ",", "int", "offX", ",", "int", "offY", ",", "double", "scale", ")", "{", "findStatistics", "(", ")", ";", "// draw all the features, adjusting th...
Visualizes score distribution. Larger circles mean its closer to the best fit score.
[ "Visualizes", "score", "distribution", ".", "Larger", "circles", "mean", "its", "closer", "to", "the", "best", "fit", "score", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/feature/AssociationScorePanel.java#L138-L178
49,978
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java
ChessboardCornerClusterFinder.process
public void process(List<ChessboardCorner> corners ) { this.corners = corners; // reset internal data structures vertexes.reset(); edges.reset(); clusters.reset(); // Create a vertex for each corner for (int idx = 0; idx < corners.size(); idx++) { Vertex v = vertexes.grow(); v.reset(); v.index ...
java
public void process(List<ChessboardCorner> corners ) { this.corners = corners; // reset internal data structures vertexes.reset(); edges.reset(); clusters.reset(); // Create a vertex for each corner for (int idx = 0; idx < corners.size(); idx++) { Vertex v = vertexes.grow(); v.reset(); v.index ...
[ "public", "void", "process", "(", "List", "<", "ChessboardCorner", ">", "corners", ")", "{", "this", ".", "corners", "=", "corners", ";", "// reset internal data structures", "vertexes", ".", "reset", "(", ")", ";", "edges", ".", "reset", "(", ")", ";", "c...
Processes corners and finds clusters of chessboard patterns @param corners Detected chessboard patterns. Not modified.
[ "Processes", "corners", "and", "finds", "clusters", "of", "chessboard", "patterns" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java#L137-L208
49,979
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java
ChessboardCornerClusterFinder.printDualGraph
public void printDualGraph() { System.out.println("============= Dual"); int l = BoofMiscOps.numDigits(vertexes.size); String format = "%"+l+"d"; for( Vertex n : vertexes.toList() ) { ChessboardCorner c = corners.get(n.index); System.out.printf("["+format+"] {%3.0f, %3.0f} -> 90[ ",n.index,c.x,c.y); ...
java
public void printDualGraph() { System.out.println("============= Dual"); int l = BoofMiscOps.numDigits(vertexes.size); String format = "%"+l+"d"; for( Vertex n : vertexes.toList() ) { ChessboardCorner c = corners.get(n.index); System.out.printf("["+format+"] {%3.0f, %3.0f} -> 90[ ",n.index,c.x,c.y); ...
[ "public", "void", "printDualGraph", "(", ")", "{", "System", ".", "out", ".", "println", "(", "\"============= Dual\"", ")", ";", "int", "l", "=", "BoofMiscOps", ".", "numDigits", "(", "vertexes", ".", "size", ")", ";", "String", "format", "=", "\"%\"", ...
Prints the graph. Used for debugging the code.
[ "Prints", "the", "graph", ".", "Used", "for", "debugging", "the", "code", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java#L213-L233
49,980
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java
ChessboardCornerClusterFinder.findVertexNeighbors
void findVertexNeighbors(Vertex target , List<ChessboardCorner> corners ) { // if( target.index == 18 ) { // System.out.println("Vertex Neighbors "+target.index); // } ChessboardCorner targetCorner = corners.get(target.index); // distance is Euclidean squared double maxDist = Double.MAX_VALUE==maxNeighborDi...
java
void findVertexNeighbors(Vertex target , List<ChessboardCorner> corners ) { // if( target.index == 18 ) { // System.out.println("Vertex Neighbors "+target.index); // } ChessboardCorner targetCorner = corners.get(target.index); // distance is Euclidean squared double maxDist = Double.MAX_VALUE==maxNeighborDi...
[ "void", "findVertexNeighbors", "(", "Vertex", "target", ",", "List", "<", "ChessboardCorner", ">", "corners", ")", "{", "//\t\tif( target.index == 18 ) {", "//\t\t\tSystem.out.println(\"Vertex Neighbors \"+target.index);", "//\t\t}", "ChessboardCorner", "targetCorner", "=", "co...
Use nearest neighbor search to find closest corners. Split those into two groups, parallel and perpendicular.
[ "Use", "nearest", "neighbor", "search", "to", "find", "closest", "corners", ".", "Split", "those", "into", "two", "groups", "parallel", "and", "perpendicular", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java#L255-L326
49,981
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java
ChessboardCornerClusterFinder.handleAmbiguousVertexes
void handleAmbiguousVertexes(List<ChessboardCorner> corners) { List<Vertex> candidates = new ArrayList<>(); for (int idx = 0; idx < vertexes.size(); idx++) { Vertex target = vertexes.get(idx); // median distance was previously found based on the closer neighbors. In an actual chessboard // there are solid...
java
void handleAmbiguousVertexes(List<ChessboardCorner> corners) { List<Vertex> candidates = new ArrayList<>(); for (int idx = 0; idx < vertexes.size(); idx++) { Vertex target = vertexes.get(idx); // median distance was previously found based on the closer neighbors. In an actual chessboard // there are solid...
[ "void", "handleAmbiguousVertexes", "(", "List", "<", "ChessboardCorner", ">", "corners", ")", "{", "List", "<", "Vertex", ">", "candidates", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "int", "idx", "=", "0", ";", "idx", "<", "vertexes", ...
Identify ambiguous vertexes which are too close to each other. Select the corner with the highest intensity score and remove the rest
[ "Identify", "ambiguous", "vertexes", "which", "are", "too", "close", "to", "each", "other", ".", "Select", "the", "corner", "with", "the", "highest", "intensity", "score", "and", "remove", "the", "rest" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java#L332-L376
49,982
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java
ChessboardCornerClusterFinder.disconnectInvalidVertices
void disconnectInvalidVertices() { // add elements with 1 or 2 edges openVertexes.clear(); for (int idxVert = 0; idxVert < vertexes.size; idxVert++) { Vertex n = vertexes.get(idxVert); if( n.connections.size() == 1 || n.connections.size()==2) { openVertexes.add(n); } } // continue until there ar...
java
void disconnectInvalidVertices() { // add elements with 1 or 2 edges openVertexes.clear(); for (int idxVert = 0; idxVert < vertexes.size; idxVert++) { Vertex n = vertexes.get(idxVert); if( n.connections.size() == 1 || n.connections.size()==2) { openVertexes.add(n); } } // continue until there ar...
[ "void", "disconnectInvalidVertices", "(", ")", "{", "// add elements with 1 or 2 edges", "openVertexes", ".", "clear", "(", ")", ";", "for", "(", "int", "idxVert", "=", "0", ";", "idxVert", "<", "vertexes", ".", "size", ";", "idxVert", "++", ")", "{", "Verte...
Disconnect the edges from invalid vertices. Invalid ones have only one edge or two edges which do not connect to a common vertex, i.e. they are point 180 degrees away from each other.
[ "Disconnect", "the", "edges", "from", "invalid", "vertices", ".", "Invalid", "ones", "have", "only", "one", "edge", "or", "two", "edges", "which", "do", "not", "connect", "to", "a", "common", "vertex", "i", ".", "e", ".", "they", "are", "point", "180", ...
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java#L382-L433
49,983
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java
ChessboardCornerClusterFinder.removeReferences
void removeReferences( Vertex remove , EdgeType type ) { EdgeSet removeSet = remove.getEdgeSet(type); for (int i = removeSet.size()-1; i >= 0; i--) { Vertex v = removeSet.get(i).dst; EdgeSet setV = v.getEdgeSet(type); // remove the connection from v to 'remove'. Be careful since the connection isn't always...
java
void removeReferences( Vertex remove , EdgeType type ) { EdgeSet removeSet = remove.getEdgeSet(type); for (int i = removeSet.size()-1; i >= 0; i--) { Vertex v = removeSet.get(i).dst; EdgeSet setV = v.getEdgeSet(type); // remove the connection from v to 'remove'. Be careful since the connection isn't always...
[ "void", "removeReferences", "(", "Vertex", "remove", ",", "EdgeType", "type", ")", "{", "EdgeSet", "removeSet", "=", "remove", ".", "getEdgeSet", "(", "type", ")", ";", "for", "(", "int", "i", "=", "removeSet", ".", "size", "(", ")", "-", "1", ";", "...
Go through all the vertexes that 'remove' is connected to and remove that link. if it is in the connected list swap it with 'replaceWith'.
[ "Go", "through", "all", "the", "vertexes", "that", "remove", "is", "connected", "to", "and", "remove", "that", "link", ".", "if", "it", "is", "in", "the", "connected", "list", "swap", "it", "with", "replaceWith", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java#L439-L451
49,984
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java
ChessboardCornerClusterFinder.selectConnections
void selectConnections( Vertex target ) { // There needs to be at least two corners if( target.perpendicular.size() <= 1 ) return; // if( target.index == 16 ) { // System.out.println("ASDSAD"); // } // System.out.println("======= Connecting "+target.index); double bestError = Double.MAX_VALUE; List<Ed...
java
void selectConnections( Vertex target ) { // There needs to be at least two corners if( target.perpendicular.size() <= 1 ) return; // if( target.index == 16 ) { // System.out.println("ASDSAD"); // } // System.out.println("======= Connecting "+target.index); double bestError = Double.MAX_VALUE; List<Ed...
[ "void", "selectConnections", "(", "Vertex", "target", ")", "{", "// There needs to be at least two corners", "if", "(", "target", ".", "perpendicular", ".", "size", "(", ")", "<=", "1", ")", "return", ";", "//\t\tif( target.index == 16 ) {", "//\t\t\tSystem.out.println(...
Select the best 2,3, or 4 perpendicular vertexes to connect to. These are the output grid connections.
[ "Select", "the", "best", "2", "3", "or", "4", "perpendicular", "vertexes", "to", "connect", "to", ".", "These", "are", "the", "output", "grid", "connections", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java#L456-L515
49,985
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java
ChessboardCornerClusterFinder.findNext
boolean findNext( int firstIdx , EdgeSet splitterSet , EdgeSet candidateSet , double parallel, SearchResults results ) { Edge e0 = candidateSet.get(firstIdx); results.index = -1; results.error = Double.MAX_VALUE; boolean checkParallel = !Double.isNaN(parallel); for (int i = 0; i < candidateSet...
java
boolean findNext( int firstIdx , EdgeSet splitterSet , EdgeSet candidateSet , double parallel, SearchResults results ) { Edge e0 = candidateSet.get(firstIdx); results.index = -1; results.error = Double.MAX_VALUE; boolean checkParallel = !Double.isNaN(parallel); for (int i = 0; i < candidateSet...
[ "boolean", "findNext", "(", "int", "firstIdx", ",", "EdgeSet", "splitterSet", ",", "EdgeSet", "candidateSet", ",", "double", "parallel", ",", "SearchResults", "results", ")", "{", "Edge", "e0", "=", "candidateSet", ".", "get", "(", "firstIdx", ")", ";", "res...
Greedily select the next edge that will belong to the final graph. @param firstIdx Index of the edge CW of the one being considered @param splitterSet Set of edges that the splitter can belong to @param candidateSet Set of edges that the next edge can belong to @param parallel if NaN this is the angle the edge should ...
[ "Greedily", "select", "the", "next", "edge", "that", "will", "belong", "to", "the", "final", "graph", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java#L527-L598
49,986
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java
ChessboardCornerClusterFinder.findSplitter
boolean findSplitter(double ccw0 , double ccw1 , EdgeSet master , EdgeSet other1 , EdgeSet other2 , TupleI32 output ) { double bestDistance = Double.MAX_VALUE; for (int i = 0; i < master.size(); i++) { // select the splitter Edge me = master.get(i); // TODO decide if this is helpful or not...
java
boolean findSplitter(double ccw0 , double ccw1 , EdgeSet master , EdgeSet other1 , EdgeSet other2 , TupleI32 output ) { double bestDistance = Double.MAX_VALUE; for (int i = 0; i < master.size(); i++) { // select the splitter Edge me = master.get(i); // TODO decide if this is helpful or not...
[ "boolean", "findSplitter", "(", "double", "ccw0", ",", "double", "ccw1", ",", "EdgeSet", "master", ",", "EdgeSet", "other1", ",", "EdgeSet", "other2", ",", "TupleI32", "output", ")", "{", "double", "bestDistance", "=", "Double", ".", "MAX_VALUE", ";", "for",...
Splitter is a vertex that has an angle between two edges being considered. @param ccw0 angle of edge 0 @param ccw1 angle of edge 1 @param master Set of edges that contains all potential spitters @param other1 set of perpendicular edges to vertex ccw0 @param other2 set of perpendicular edges to vertex ccw1 @param outpu...
[ "Splitter", "is", "a", "vertex", "that", "has", "an", "angle", "between", "two", "edges", "being", "considered", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java#L611-L665
49,987
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java
ChessboardCornerClusterFinder.repairVertexes
private void repairVertexes() { // System.out.println("######## Repair"); for (int idxV = 0; idxV < dirtyVertexes.size(); idxV++) { final Vertex v = dirtyVertexes.get(idxV); // System.out.println(" dirty="+v.index); bestSolution.clear(); for (int idxE = 0; idxE < v.perpendicular.size(); idxE++) { /...
java
private void repairVertexes() { // System.out.println("######## Repair"); for (int idxV = 0; idxV < dirtyVertexes.size(); idxV++) { final Vertex v = dirtyVertexes.get(idxV); // System.out.println(" dirty="+v.index); bestSolution.clear(); for (int idxE = 0; idxE < v.perpendicular.size(); idxE++) { /...
[ "private", "void", "repairVertexes", "(", ")", "{", "//\t\tSystem.out.println(\"######## Repair\");", "for", "(", "int", "idxV", "=", "0", ";", "idxV", "<", "dirtyVertexes", ".", "size", "(", ")", ";", "idxV", "++", ")", "{", "final", "Vertex", "v", "=", "...
Given the current graph, attempt to replace edges from vertexes which lost them in an apparent bad decision. This is a very simple algorithm and gives up if the graph around the current node is less than perfect. 1) Can only connect to vertexes which lost edges 2) Can't modify an existing edge 3) Parallel lines must b...
[ "Given", "the", "current", "graph", "attempt", "to", "replace", "edges", "from", "vertexes", "which", "lost", "them", "in", "an", "apparent", "bad", "decision", ".", "This", "is", "a", "very", "simple", "algorithm", "and", "gives", "up", "if", "the", "grap...
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java#L677-L765
49,988
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java
ChessboardCornerClusterFinder.convertToOutput
private void convertToOutput(List<ChessboardCorner> corners) { c2n.resize(corners.size()); n2c.resize(vertexes.size()); open.reset(); n2c.fill(-1); c2n.fill(-1); for (int seedIdx = 0; seedIdx < vertexes.size; seedIdx++) { Vertex seedN = vertexes.get(seedIdx); if( seedN.marked) continue; Chess...
java
private void convertToOutput(List<ChessboardCorner> corners) { c2n.resize(corners.size()); n2c.resize(vertexes.size()); open.reset(); n2c.fill(-1); c2n.fill(-1); for (int seedIdx = 0; seedIdx < vertexes.size; seedIdx++) { Vertex seedN = vertexes.get(seedIdx); if( seedN.marked) continue; Chess...
[ "private", "void", "convertToOutput", "(", "List", "<", "ChessboardCorner", ">", "corners", ")", "{", "c2n", ".", "resize", "(", "corners", ".", "size", "(", ")", ")", ";", "n2c", ".", "resize", "(", "vertexes", ".", "size", "(", ")", ")", ";", "open...
Converts the internal graphs into unordered chessboard grids.
[ "Converts", "the", "internal", "graphs", "into", "unordered", "chessboard", "grids", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java#L771-L815
49,989
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java
ChessboardCornerClusterFinder.growCluster
private void growCluster(List<ChessboardCorner> corners, int seedIdx, ChessboardCornerGraph graph) { // open contains corner list indexes open.add(seedIdx); while( open.size > 0 ) { int cornerIdx = open.pop(); Vertex v = vertexes.get(cornerIdx); // make sure it hasn't already been processed if( v.mar...
java
private void growCluster(List<ChessboardCorner> corners, int seedIdx, ChessboardCornerGraph graph) { // open contains corner list indexes open.add(seedIdx); while( open.size > 0 ) { int cornerIdx = open.pop(); Vertex v = vertexes.get(cornerIdx); // make sure it hasn't already been processed if( v.mar...
[ "private", "void", "growCluster", "(", "List", "<", "ChessboardCorner", ">", "corners", ",", "int", "seedIdx", ",", "ChessboardCornerGraph", "graph", ")", "{", "// open contains corner list indexes", "open", ".", "add", "(", "seedIdx", ")", ";", "while", "(", "o...
Given the initial seed, add all connected nodes to the output cluster while keeping track of how to convert one node index into another one, between the two graphs
[ "Given", "the", "initial", "seed", "add", "all", "connected", "nodes", "to", "the", "output", "cluster", "while", "keeping", "track", "of", "how", "to", "convert", "one", "node", "index", "into", "another", "one", "between", "the", "two", "graphs" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java#L821-L847
49,990
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/edge/BaseIntegralEdge.java
BaseIntegralEdge.setTransform
public void setTransform( PixelTransform<Point2D_F32> undistToDist ) { if( undistToDist != null ) { InterpolatePixelS<T> interpolate = FactoryInterpolation.bilinearPixelS(imageType, BorderType.EXTENDED); integralImage = new GImageGrayDistorted<>(undistToDist, interpolate); } else { integralImage = FactoryG...
java
public void setTransform( PixelTransform<Point2D_F32> undistToDist ) { if( undistToDist != null ) { InterpolatePixelS<T> interpolate = FactoryInterpolation.bilinearPixelS(imageType, BorderType.EXTENDED); integralImage = new GImageGrayDistorted<>(undistToDist, interpolate); } else { integralImage = FactoryG...
[ "public", "void", "setTransform", "(", "PixelTransform", "<", "Point2D_F32", ">", "undistToDist", ")", "{", "if", "(", "undistToDist", "!=", "null", ")", "{", "InterpolatePixelS", "<", "T", ">", "interpolate", "=", "FactoryInterpolation", ".", "bilinearPixelS", ...
Used to specify a transform that is applied to pixel coordinates to bring them back into original input image coordinates. For example if the input image has lens distortion but the edge were found in undistorted coordinates this code needs to know how to go from undistorted back into distorted image coordinates in or...
[ "Used", "to", "specify", "a", "transform", "that", "is", "applied", "to", "pixel", "coordinates", "to", "bring", "them", "back", "into", "original", "input", "image", "coordinates", ".", "For", "example", "if", "the", "input", "image", "has", "lens", "distor...
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/edge/BaseIntegralEdge.java#L58-L65
49,991
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/EnforceTrifocalGeometry.java
EnforceTrifocalGeometry.process
public void process( Point3D_F64 e2 , Point3D_F64 e3 , DMatrixRMaj A ) { // construct the linear system that the solution which solves the unknown square // matrices in the camera matrices constructE(e2, e3); // Computes U, which is used to map the 18 unknowns onto the 27 trifocal unknowns svdU.decompose(E);...
java
public void process( Point3D_F64 e2 , Point3D_F64 e3 , DMatrixRMaj A ) { // construct the linear system that the solution which solves the unknown square // matrices in the camera matrices constructE(e2, e3); // Computes U, which is used to map the 18 unknowns onto the 27 trifocal unknowns svdU.decompose(E);...
[ "public", "void", "process", "(", "Point3D_F64", "e2", ",", "Point3D_F64", "e3", ",", "DMatrixRMaj", "A", ")", "{", "// construct the linear system that the solution which solves the unknown square", "// matrices in the camera matrices", "constructE", "(", "e2", ",", "e3", ...
Computes a trifocal tensor which minimizes the algebraic error given the two epipoles and the linear constraint matrix. The epipoles are from a previously computed trifocal tensor. @param e2 Epipole of first image in the second image @param e3 Epipole of first image in the third image @param A Linear constraint matri...
[ "Computes", "a", "trifocal", "tensor", "which", "minimizes", "the", "algebraic", "error", "given", "the", "two", "epipoles", "and", "the", "linear", "constraint", "matrix", ".", "The", "epipoles", "are", "from", "a", "previously", "computed", "trifocal", "tensor...
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/EnforceTrifocalGeometry.java#L85-L117
49,992
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/EnforceTrifocalGeometry.java
EnforceTrifocalGeometry.constructE
protected void constructE( Point3D_F64 e2 , Point3D_F64 e3 ) { E.zero(); for( int i = 0; i < 3; i++ ) { for( int j = 0; j < 3; j++ ) { for( int k = 0; k < 3; k++ ) { // which element in the trifocal tensor is being manipulated int row = 9*i + 3*j + k; // which unknowns are being multiplied by...
java
protected void constructE( Point3D_F64 e2 , Point3D_F64 e3 ) { E.zero(); for( int i = 0; i < 3; i++ ) { for( int j = 0; j < 3; j++ ) { for( int k = 0; k < 3; k++ ) { // which element in the trifocal tensor is being manipulated int row = 9*i + 3*j + k; // which unknowns are being multiplied by...
[ "protected", "void", "constructE", "(", "Point3D_F64", "e2", ",", "Point3D_F64", "e3", ")", "{", "E", ".", "zero", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "3", ";", "i", "++", ")", "{", "for", "(", "int", "j", "=", "0"...
The matrix E is a linear system for computing the trifocal tensor. The columns are the unknown square matrices from view 2 and 3. The right most column in both projection matrices are the provided epipoles, whose values are inserted into E
[ "The", "matrix", "E", "is", "a", "linear", "system", "for", "computing", "the", "trifocal", "tensor", ".", "The", "columns", "are", "the", "unknown", "square", "matrices", "from", "view", "2", "and", "3", ".", "The", "right", "most", "column", "in", "bot...
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/EnforceTrifocalGeometry.java#L140-L157
49,993
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/struct/geo/TrifocalTensor.java
TrifocalTensor.copy
public TrifocalTensor copy() { TrifocalTensor ret = new TrifocalTensor(); ret.T1.set(T1); ret.T2.set(T2); ret.T3.set(T3); return ret; }
java
public TrifocalTensor copy() { TrifocalTensor ret = new TrifocalTensor(); ret.T1.set(T1); ret.T2.set(T2); ret.T3.set(T3); return ret; }
[ "public", "TrifocalTensor", "copy", "(", ")", "{", "TrifocalTensor", "ret", "=", "new", "TrifocalTensor", "(", ")", ";", "ret", ".", "T1", ".", "set", "(", "T1", ")", ";", "ret", ".", "T2", ".", "set", "(", "T2", ")", ";", "ret", ".", "T3", ".", ...
Returns a new copy of the TrifocalTensor @return Copy of the trifocal tensor
[ "Returns", "a", "new", "copy", "of", "the", "TrifocalTensor" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/struct/geo/TrifocalTensor.java#L101-L107
49,994
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/disparity/DisparitySparseScoreSadRect.java
DisparitySparseScoreSadRect.setImages
public void setImages( Input left , Input right ) { InputSanityCheck.checkSameShape(left, right); this.left = left; this.right = right; }
java
public void setImages( Input left , Input right ) { InputSanityCheck.checkSameShape(left, right); this.left = left; this.right = right; }
[ "public", "void", "setImages", "(", "Input", "left", ",", "Input", "right", ")", "{", "InputSanityCheck", ".", "checkSameShape", "(", "left", ",", "right", ")", ";", "this", ".", "left", "=", "left", ";", "this", ".", "right", "=", "right", ";", "}" ]
Specify inputs for left and right camera images. @param left Rectified left camera image. @param right Rectified right camera image.
[ "Specify", "inputs", "for", "left", "and", "right", "camera", "images", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/disparity/DisparitySparseScoreSadRect.java#L72-L77
49,995
lessthanoptimal/BoofCV
demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java
DemonstrationBase.getImageType
protected <T extends ImageBase> ImageType<T> getImageType( int which ) { synchronized ( inputStreams ) { return inputStreams.get(which).imageType; } }
java
protected <T extends ImageBase> ImageType<T> getImageType( int which ) { synchronized ( inputStreams ) { return inputStreams.get(which).imageType; } }
[ "protected", "<", "T", "extends", "ImageBase", ">", "ImageType", "<", "T", ">", "getImageType", "(", "int", "which", ")", "{", "synchronized", "(", "inputStreams", ")", "{", "return", "inputStreams", ".", "get", "(", "which", ")", ".", "imageType", ";", ...
Get input input type for a stream safely
[ "Get", "input", "input", "type", "for", "a", "stream", "safely" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java#L150-L154
49,996
lessthanoptimal/BoofCV
demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java
DemonstrationBase.updateRecentItems
private void updateRecentItems() { if( menuRecent == null ) return; menuRecent.removeAll(); List<String> recentFiles = BoofSwingUtil.getListOfRecentFiles(this); for( String filePath : recentFiles ) { final File f = new File(filePath); JMenuItem recentItem = new JMenuItem(f.getName()); recentItem.add...
java
private void updateRecentItems() { if( menuRecent == null ) return; menuRecent.removeAll(); List<String> recentFiles = BoofSwingUtil.getListOfRecentFiles(this); for( String filePath : recentFiles ) { final File f = new File(filePath); JMenuItem recentItem = new JMenuItem(f.getName()); recentItem.add...
[ "private", "void", "updateRecentItems", "(", ")", "{", "if", "(", "menuRecent", "==", "null", ")", "return", ";", "menuRecent", ".", "removeAll", "(", ")", ";", "List", "<", "String", ">", "recentFiles", "=", "BoofSwingUtil", ".", "getListOfRecentFiles", "("...
Updates the list in recent menu
[ "Updates", "the", "list", "in", "recent", "menu" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java#L230-L246
49,997
lessthanoptimal/BoofCV
demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java
DemonstrationBase.openExample
public void openExample( Object o ) { if (o instanceof PathLabel) { PathLabel p = (PathLabel)o; if( p.path.length == 1 ) openFile(new File(p.path[0])); else { // openFile(new File(p.path[0])); openImageSet(p.path); } } else if (o instanceof String) { openFile(new File((String) o)); } els...
java
public void openExample( Object o ) { if (o instanceof PathLabel) { PathLabel p = (PathLabel)o; if( p.path.length == 1 ) openFile(new File(p.path[0])); else { // openFile(new File(p.path[0])); openImageSet(p.path); } } else if (o instanceof String) { openFile(new File((String) o)); } els...
[ "public", "void", "openExample", "(", "Object", "o", ")", "{", "if", "(", "o", "instanceof", "PathLabel", ")", "{", "PathLabel", "p", "=", "(", "PathLabel", ")", "o", ";", "if", "(", "p", ".", "path", ".", "length", "==", "1", ")", "openFile", "(",...
Function that is invoked when an example has been selected
[ "Function", "that", "is", "invoked", "when", "an", "example", "has", "been", "selected" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java#L251-L265
49,998
lessthanoptimal/BoofCV
demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java
DemonstrationBase.stopAllInputProcessing
public void stopAllInputProcessing() { ProcessThread threadProcess; synchronized (inputStreams) { threadProcess = this.threadProcess; if( threadProcess != null ) { if( threadProcess.running ) { threadProcess.requestStop = true; } else { threadProcess = this.threadProcess = null; } } ...
java
public void stopAllInputProcessing() { ProcessThread threadProcess; synchronized (inputStreams) { threadProcess = this.threadProcess; if( threadProcess != null ) { if( threadProcess.running ) { threadProcess.requestStop = true; } else { threadProcess = this.threadProcess = null; } } ...
[ "public", "void", "stopAllInputProcessing", "(", ")", "{", "ProcessThread", "threadProcess", ";", "synchronized", "(", "inputStreams", ")", "{", "threadProcess", "=", "this", ".", "threadProcess", ";", "if", "(", "threadProcess", "!=", "null", ")", "{", "if", ...
Blocks until it kills all input streams from running
[ "Blocks", "until", "it", "kills", "all", "input", "streams", "from", "running" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java#L270-L304
49,999
lessthanoptimal/BoofCV
demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java
DemonstrationBase.openFile
public void openFile(File file) { final String path = massageFilePath(file); if( path == null ) return; inputFilePath = path; // update recent items menu BoofSwingUtil.invokeNowOrLater(() -> { BoofSwingUtil.addToRecentFiles(DemonstrationBase.this,path); updateRecentItems(); }); BufferedImage bu...
java
public void openFile(File file) { final String path = massageFilePath(file); if( path == null ) return; inputFilePath = path; // update recent items menu BoofSwingUtil.invokeNowOrLater(() -> { BoofSwingUtil.addToRecentFiles(DemonstrationBase.this,path); updateRecentItems(); }); BufferedImage bu...
[ "public", "void", "openFile", "(", "File", "file", ")", "{", "final", "String", "path", "=", "massageFilePath", "(", "file", ")", ";", "if", "(", "path", "==", "null", ")", "return", ";", "inputFilePath", "=", "path", ";", "// update recent items menu", "B...
Opens a file. First it will attempt to open it as an image. If that fails it will try opening it as a video. If all else fails tell the user it has failed. If a streaming source was running before it will be stopped.
[ "Opens", "a", "file", ".", "First", "it", "will", "attempt", "to", "open", "it", "as", "an", "image", ".", "If", "that", "fails", "it", "will", "try", "opening", "it", "as", "a", "video", ".", "If", "all", "else", "fails", "tell", "the", "user", "i...
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/demonstrations/src/main/java/boofcv/gui/DemonstrationBase.java#L346-L365